idea-react 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("classnames");c=s(c);let l=require("react/jsx-runtime"),u=require("react"),d=require("@shikijs/langs/javascript");d=s(d);let f=require("@shikijs/langs/jsx");f=s(f);let p=require("@shikijs/langs/tsx");p=s(p);let m=require("@shikijs/langs/typescript");m=s(m);let h=require("@shikijs/themes/github-light");h=s(h);let g=require("react-element-to-jsx-string");g=s(g);let ee=require("shiki/core"),te=require("shiki/engine/javascript"),_=require("mobx"),v=require("mobx-react"),y=require("mobx-react-helper"),b=require("web-utility"),ne=require("iterable-observer"),re=require("react-editor-js"),x=require("editorjs-html");x=s(x);let S=require("react-live"),C=require("react-bootstrap"),w=require("html2canvas");w=s(w);function ie(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}function ae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function T(e,t){if(e==null)return{};var n,r,i=ae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){"@babel/helpers - typeof";return E=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},E(e)}function oe(e,t){if(E(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(E(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function se(e){var t=oe(e,`string`);return E(t)==`symbol`?t:t+``}function D(e,t,n){return(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?O(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ce=[`className`,`style`,`size`],A=e=>{let{className:t,style:n,size:r=3}=e,i=T(e,ce);return(0,l.jsx)(`img`,k({className:(0,c.default)(`object-fit-cover rounded-circle`,t),style:k({width:`${r}rem`,height:`${r}rem`},n)},i))};A.displayName=`Avatar`;const le=[`children`,`onInnerClick`,`onOuterClick`];var ue=class extends u.PureComponent{constructor(...e){super(...e),D(this,`root`,(0,u.createRef)()),D(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:n,onOuterClick:r}=e,i=T(e,le);return(0,l.jsx)(`div`,k(k({ref:this.root},i),{},{children:t}))}};const de=[`className`,`language`,`children`],fe=(0,ee.createHighlighterCoreSync)({themes:[h.default],langs:[d.default,f.default,m.default,p.default],engine:(0,te.createJavaScriptRegexEngine)()}),pe=e=>{let{className:t=``,language:n,children:r}=e,i=T(e,de),a=typeof r==`string`?r:(0,g.default)((0,u.isValidElement)(r)?r:(0,l.jsx)(l.Fragment,{children:r})),o=fe.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,l.jsx)(`pre`,k(k({className:`m-0 language-${n} ${t}`},i),{},{children:(0,l.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},j=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function M(e,t=[]){let n=t[0]?j.filter(e=>!t.find(t=>t===e)):j;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}const me=[`className`,`itemClassName`,`units`,`endTime`,`onEnd`];var he=@v.observer class extends y.ObservedComponent{constructor(...e){super(...e),D(this,`timer`,0),D(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}@_.observable accessor rest=0;get endTimestamp(){return+new Date(this.props.endTime||Date.now())}@_.computed get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}@((0,y.reaction)(e=>e.observedProps.endTime))initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,b.Second)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:r,endTime:i,onEnd:a}=e,o=T(e,me),{timeSections:s}=this;return(0,l.jsx)(`ol`,k(k({className:`list-unstyled m-0 ${t}`},o),{},{children:s.map(({value:e,label:t})=>(0,l.jsxs)(`li`,{className:n,children:[(0,l.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,l.jsx)(`span`,{children:t})]},t))}))}};D(he,`displayName`,`Countdown`);var ge=class extends Error{constructor(e=`Dialog closed`){super(e)}},_e=class{@_.observable accessor input={};@_.observable accessor defer;constructor(e){D(this,`Component`,void 0),this.Component=(0,v.observer)(t=>(0,l.jsx)(e,k(k(k({},t),this.input),{},{defer:this.defer}))),this.Component.displayName=`DialogComponent`}open(e){return e&&(this.input=e),this.defer=new ne.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}};function N(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function P(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){N(a,r,i,o,s,`next`,e)}function s(e){N(a,r,i,o,s,`throw`,e)}o(void 0)})}}const ve=[`name`,`required`,`children`],ye=(0,re.createReactEditorJS)();var F=@v.observer class extends u.Component{constructor(...e){var t;super(...e),t=this,D(this,`core`,void 0),D(this,`save`,P(function*(){return t.core&&(t.innerValue=yield t.core.save())}))}@_.observable accessor innerValue=this.props.defaultValue;render(){let e=this.props,{name:t,required:n,children:r}=e,i=T(e,ve),{innerValue:a}=this;return(0,l.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,l.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,l.jsx)(ye,k(k({},i),{},{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}};D(F,`displayName`,`Editor`);const be=[`data`],I=(0,x.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),L=e=>{let{data:t}=e,n=T(e,be);return(0,l.jsx)(`article`,k(k({},n),{},{dangerouslySetInnerHTML:{__html:I.parse(t)}}))};L.displayName=`EditorHTML`;const xe=[`className`,`children`,`maxWidth`,`duration`,`height`],R=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=T(e,xe);return(0,l.jsx)(`div`,k(k({className:`overflow-hidden mw-100 ${t}`},o),{},{children:(0,l.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,l.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},Se=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,l.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,l.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,l.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,l.jsx)(R,{duration:n,children:e})]})}):(0,l.jsx)(R,{maxWidth:t,duration:n,height:r,children:e});R.displayName=`HorizontalMarquee`;const Ce=[`className`,`style`,`name`,`size`],z=e=>{let{className:t,style:n,name:r,size:i}=e,a=T(e,Ce);return(0,l.jsx)(`span`,k({className:(0,c.default)(`bi-${r}`,t),style:k({fontSize:i&&`${i}rem`},n)},a))};z.displayName=`Icon`;const we=({scope:e,children:t})=>{let n=(0,u.isValidElement)(t)?t:(0,l.jsx)(l.Fragment,{children:t}),r=typeof t==`string`?t:(0,g.default)(n);return(0,l.jsxs)(S.LiveProvider,{code:r,scope:e,language:`tsx`,children:[(0,l.jsx)(S.LivePreview,{className:`mb-3`}),(0,l.jsx)(S.LiveEditor,{}),(0,l.jsx)(S.LiveError,{className:`text-danger small p-2`})]})},Te=[`className`,`children`],B=e=>{let{className:t=``,children:n=`Loading...`}=e,r=T(e,Te);return(0,l.jsxs)(`div`,k(k({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{},{children:[(0,l.jsx)(C.Spinner,{animation:`border`,variant:`success`}),(0,l.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};B.displayName=`Loading`;const Ee=[`title`,`detail`,`children`],V=e=>{let{title:t,detail:n,children:r}=e,i=T(e,Ee);return(0,l.jsx)(C.OverlayTrigger,k(k({},i),{},{overlay:n?(0,l.jsxs)(C.Popover,{children:[(0,l.jsx)(C.Popover.Header,{children:t}),(0,l.jsx)(C.Popover.Body,{children:n})]}):(0,l.jsx)(C.Tooltip,{children:t}),children:r}))};V.displayName=`OverlayBox`;const De=[`style`,`variant`,`onChange`,`onSelect`];var H=@v.observer class extends y.ObservedComponent{constructor(...e){super(...e),D(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,b.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,b.formatDate)(e,`YYYY-MM-DD`)===i);return(0,l.jsxs)(`td`,{className:(0,c.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,b.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,l.jsx)(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),a==null?void 0:a.map(e=>typeof e.content==`object`?e.content:(0,l.jsx)(V,{title:e.content,children:(0,l.jsx)(C.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:M(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}@_.computed get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}@_.observable accessor currentDate=new Date;@_.computed get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*b.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*b.Day));return(0,b.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,b.changeMonth)(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:n}=this,r=this.observedProps,{style:i,variant:a=`primary`,onChange:o,onSelect:s}=r,c=T(r,De);return(0,l.jsxs)(C.Table,k(k({},c),{},{style:k({tableLayout:`fixed`},i),children:[(0,l.jsx)(`caption`,{children:(0,l.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,l.jsx)(C.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,b.formatDate)(t,`YYYY-MM`),(0,l.jsx)(C.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,l.jsx)(`thead`,{children:(0,l.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,l.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,l.jsx)(`tbody`,{children:n.map(e=>(0,l.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}};D(H,`displayName`,`MonthCalendar`);const U=({avatar:e,name:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,l.jsx)(`span`,{className:`align-middle`,children:t})]});U.displayName=`Nameplate`;const Oe=[`style`,`variant`],ke=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;var W=@v.observer class extends u.Component{constructor(...e){super(...e),D(this,`updateScrollY`,()=>this.scrollY=window.scrollY),D(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,b.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),D(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,l.jsx)(C.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,l.jsx)(C.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}@_.observable accessor list=[];@_.observable accessor scrollY=0;@_.computed get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(ke),e=>{e.id||(e.id=(0,b.uniqueID)());let{id:t,tagName:n,textContent:r,offsetTop:i}=e;return{id:t,level:+n[1],text:r.trim(),top:i}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:e}=this,t=this.props,{style:n,variant:r=`underline`}=t,i=T(t,Oe);return(0,l.jsx)(C.Nav,k(k({},k(k({},i),{},{variant:r})),{},{style:k({flexDirection:`column`},n),children:e.map(this.renderLink)}))}};D(W,`displayName`,`PageNav`);const Ae=[`className`,`children`];var G=@v.observer class extends u.Component{constructor(...e){super(...e),D(this,`scrollerRef`,(0,u.createRef)()),D(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),D(this,`resizeObserver`,void 0),D(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}@_.observable accessor scrollLeft=0;@_.observable accessor scrollWidth=0;@_.observable accessor clientWidth=0;@_.computed get canScrollLeft(){return this.scrollLeft>0}@_.computed get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,n=this.props,{className:r=``,children:i}=n,a=T(n,Ae);return(0,l.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,l.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:(0,l.jsx)(z,{name:`caret-left-fill`})}),(0,l.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,l.jsx)(C.Nav,k(k({},a),{},{className:`flex-nowrap`,children:i}))}),t&&(0,l.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:(0,l.jsx)(z,{name:`caret-right-fill`})})]})}};D(G,`displayName`,`ScrollNav`);const je=[`value`,`children`],K=e=>{let{value:t,children:n}=e,r=T(e,je);return(0,l.jsx)(C.Dropdown.Item,k(k({},r),{},{"data-value":t,children:n}))};K.displayName=`Option`;const q=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let d=(0,b.makeArray)(i).flat(1/0).find(e=>(0,u.isValidElement)(e)&&e.type===K&&e.props.value===a);return(0,l.jsxs)(C.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,l.jsx)(C.Dropdown.Toggle,{className:(0,c.default)(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(s==null?void 0:s(a))||(0,l.jsx)(`div`,{className:d==null?void 0:d.props.className,children:d==null?void 0:d.props.children})}),(0,l.jsx)(C.Dropdown.Menu,{variant:r,children:i})]})};q.displayName=`Select`;const Me=[`className`,`children`];function J(e,t,n){return Y.apply(this,arguments)}function Y(){return Y=P(function*(e,t,n){let r=yield(0,w.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))}),Y.apply(this,arguments)}var X=@v.observer class extends u.Component{constructor(...e){var t;super(...e),t=this,D(this,`root`,(0,u.createRef)()),D(this,`generateImage`,P(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield J(t.root.current),t.loading=!1})),D(this,`share`,function(){var e=P(function*(e){var n,r;e.stopPropagation();let i=yield(0,b.blobOf)(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,k({files:[a]},t.props))});return function(t){return e.apply(this,arguments)}}())}@_.observable accessor loading=!1;@_.observable accessor imageURI=``;componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let e=this.props,{className:t=``,children:n}=e,r=T(e,Me),{loading:i,imageURI:a}=this;return(0,l.jsxs)(l.Fragment,{children:[i&&(0,l.jsx)(B,{}),(0,l.jsxs)(`div`,k(k({},r),{},{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,l.jsx)(C.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}};D(X,`displayName`,`ShareBox`);const Ne=[`animation`,`loading`,`disabled`,`children`],Z=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=T(e,Ne);return(0,l.jsxs)(C.Button,k(k({},a),{},{disabled:n||r,children:[n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(C.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,l.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};Z.displayName=`SpinnerButton`;const Pe=[`animation`,`variant`,`size`,`colSpan`],Q=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=T(e,Pe);return(0,l.jsx)(`tr`,k(k({},a),{},{children:(0,l.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,l.jsx)(C.Spinner,{animation:t,variant:n,size:r})})}))};Q.displayName=`TableSpinner`;const Fe=[`children`,`rows`,`expandText`,`collapseText`];var Ie=@v.observer class extends u.Component{constructor(...e){super(...e),D(this,`contentRef`,(0,u.createRef)()),D(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),D(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}@_.observable accessor expanded=!1;@_.observable accessor overflowed=!1;componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let e=this.props,{children:t,rows:n=3,expandText:r=`⏬`,collapseText:i=`⏫`}=e,a=T(e,Fe),{expanded:o,overflowed:s}=this,c={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,l.jsxs)(`div`,k(k({},a),{},{children:[(0,l.jsx)(`p`,{ref:this.contentRef,style:o?void 0:c,children:t}),(s||o)&&(0,l.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}};D(Ie,`displayName`,`TextTruncate`);const Le=[`dateTime`];var $=@v.observer class extends y.ObservedComponent{@((0,y.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t))updateText(){let{dateTime:e,format:t}=this.props;return(0,b.formatDate)(e,t)}@_.observable accessor timeText=this.updateText();componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=T(e,Le);return(0,l.jsx)(`time`,k(k({dateTime:new Date(t).toJSON()},n),{},{children:this.timeText}))}};D($,`displayName`,`Time`);const Re=[`date`,`unitWords`,`beforeWord`,`afterWord`],ze={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Be=e=>{let{date:t,unitWords:n=ze,beforeWord:r=` before`,afterWord:i=` after`}=e,a=T(e,Re);t=new Date(t);let{distance:o,unit:s}=(0,b.diffTime)(t);return(0,l.jsxs)(`time`,k(k({},a),{},{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};Be.displayName=`TimeDistance`;const Ve=[`className`,`events`,`timeFormat`],He=e=>{let{className:t,events:n,timeFormat:r}=e,i=T(e,Ve);return(0,l.jsx)(`ol`,k(k({className:`list-unstyled hsu__a_timeline ${t}`},i),{},{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,l.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,l.jsx)(C.Card,{children:(0,l.jsxs)(C.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,l.jsx)(`h3`,{className:`h5 m-0`,children:(0,l.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,l.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,l.jsx)($,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,l.jsx)($,{dateTime:n[1],format:r})]}),(0,l.jsx)(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:a==null?void 0:a.map(e=>(0,l.jsx)(`li`,{children:(0,l.jsx)(U,k({},e))},e.name))}),(0,l.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};He.displayName=`Timeline`;const Ue=[`resolve`],We=new Set([`warning`,`info`,`light`]);var Ge=class{@_.observable accessor messages=[];constructor(e=b.Timestamp){this.TimeScalar=e,D(this,`Component`,(0,v.observer)(({position:e=`top-end`})=>(0,l.jsx)(C.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)}))),D(this,`renderMessage`,({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!We.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,l.jsxs)(C.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,l.jsxs)(C.Toast.Header,{children:[(0,l.jsx)(`strong`,{className:`me-auto`,children:n}),(0,l.jsx)(`small`,{children:c})]}),(0,l.jsx)(C.Toast.Body,{className:o,children:r})]},e)}),this.Component.displayName=`ToastComponent`}open(e){let t=(0,b.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,k(k({id:t},e),{},{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=T(t,Ue);n==null||n(k(k({},r),{},{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}};const Ke=[`className`,`text`];var qe=@v.observer class extends u.Component{constructor(...e){var t;super(...e),t=this,D(this,`init`,e=>e&&new IntersectionObserver(function(){var e=P(function*([{isIntersecting:e}],n){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,b.sleep)(i/1e3),t.echoed+=e});return function(t,n){return e.apply(this,arguments)}}()).observe(e))}@_.observable accessor echoed=``;render(){let e=this.props,{className:t,text:n}=e,r=T(e,Ke),{echoed:i}=this;return(0,l.jsx)(`pre`,k(k({},r),{},{ref:this.init,className:(0,c.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}};D(qe,`displayName`,`TypeEcho`);const Je=({email:e,website:t})=>(0,l.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,l.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,l.jsx)(z,{name:`envelope`})}),t&&(0,l.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,l.jsx)(z,{name:`globe2`})})]}),Ye=`X5DLia_image`,Xe=[`className`,`title`,`rank`,`linkOf`];var Ze=class extends u.PureComponent{constructor(...e){super(...e),D(this,`renderMedal`,e=>{var t,n;return(0,l.jsxs)(C.Col,{as:`li`,children:[(0,l.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Ye}`,children:(0,l.jsx)(C.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,l.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,l.jsxs)(`div`,{className:`position-relative`,children:[(0,l.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,l.jsx)(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(n=this.props).linkOf)==null?void 0:t.call(n,e))||`#`,children:e.name}),(0,l.jsx)(`strong`,{children:e.score})]}),(0,l.jsx)(Je,k({},e))]})]},e.id)}),D(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,l.jsxs)(`tr`,{className:`position-relative`,children:[(0,l.jsx)(`td`,{className:`align-middle`,children:(0,l.jsx)(C.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,l.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,l.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Ye}`,children:(0,l.jsx)(C.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,l.jsx)(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((r=(i=this.props).linkOf)==null?void 0:r.call(i,e))||`#`,children:e.name})]}),(0,l.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,l.jsx)(`td`,{className:`align-middle`,children:(0,l.jsx)(Je,k({},e))})]},e.id)})}render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=T(e,Xe);return(0,l.jsxs)(C.Row,k(k({className:`X5DLia_rankBox ${t}`},a),{},{children:[(0,l.jsxs)(C.Col,{sm:12,xs:12,lg:7,children:[(0,l.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,l.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,l.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,l.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,l.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,l.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,l.jsx)(C.Row,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:r.slice(0,3).map(this.renderMedal)})]}),(0,l.jsx)(C.Col,{xs:12,sm:12,lg:5,children:(0,l.jsx)(C.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,l.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}};D(Ze,`displayName`,`UserRankView`);const Qe=[`className`,`children`,`duration`],$e=e=>{let{className:t=``,children:n,duration:r}=e,i=T(e,Qe);return(0,l.jsx)(`div`,k(k({className:`overflow-hidden ${t}`},i),{},{children:(0,l.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,l.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};$e.displayName=`VerticalMarquee`;const et=[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`],tt=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],nt=e=>{let t=e<0?e+1:e;return tt[(t%12+12)%12]},rt=e=>{let{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:r,endYear:i=new Date().getFullYear(),itemOf:a}=e,o=T(e,et);return(0,l.jsx)(`ol`,k(k({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},o),{},{children:Array.from({length:i-r+1},(e,t)=>{let r=i-t;if(r===0)return null;let o=nt(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,l.jsx)(`li`,{className:n,children:(0,l.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,l.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};rt.displayName=`ZodiacBar`,exports.Avatar=A,exports.ClickBoundary=ue,exports.CodeBlock=pe,exports.Countdown=he,exports.Dialog=_e,exports.DialogClose=ge,exports.Editor=F,exports.EditorHTML=L,exports.HorizontalMarquee=R,exports.HorizontalMarqueeBox=Se,exports.Icon=z,exports.LiveTSX=we,exports.Loading=B,exports.MonthCalendar=H,exports.Nameplate=U,exports.Option=K,exports.OverlayBox=V,exports.PageNav=W,exports.ScrollNav=G,exports.Select=q,exports.ShareBox=X,exports.SpinnerButton=Z,exports.TableSpinner=Q,exports.TextTruncate=Ie,exports.Time=$,exports.TimeDistance=Be,exports.Timeline=He,exports.Toast=Ge,exports.TypeEcho=qe,exports.UserRankView=Ze,exports.VariantColors=j,exports.VerticalMarquee=$e,exports.ZodiacBar=rt,exports.ZodiacSigns=tt,exports.animate=ie,exports.elementToImage=J,exports.parser=I,exports.text2color=M,exports.zodiacOf=nt;
package/dist/index.mjs CHANGED
@@ -1,2 +1 @@
1
- let e,t,r,a,n,i,o,l,s,c,d,u,f,p,m,h,b,v,y,g,w,O,j,x,P,T,S,N,k,E,$,C,I,D,M,W,z,L,R,_,U,B,Y,A,F,G,V,q,H,Z,J,Q,X,K,ee,et,er,ea,en,ei,eo,el,es,ec,ed,eu,ef,ep,em,eh,eb,ev,ey,eg,ew,eO,ej,ex,eP,eT,eS,eN,ek,eE,e$,eC,eI,eD,eM,eW,ez,eL,eR,e_,eU,eB,eY,eA,eF,eG,eV,eq,eH,eZ,eJ,eQ,eX,eK,e0,e1,e2,e5,e4,e3,e7,e8,e9;import{jsx as e6,Fragment as te,jsxs as tt}from"react/jsx-runtime";import tr from"classnames";import{createRef as ta,PureComponent as tn,isValidElement as ti,Component as to}from"react";import tl from"react-element-to-jsx-string";import{highlight as ts,languages as tc}from"prismjs";import"prismjs/components/prism-javascript";import"prismjs/components/prism-jsx";import"prismjs/components/prism-tsx";import"prismjs/components/prism-typescript";import{observable as td,computed as tu}from"mobx";import{observer as tf}from"mobx-react";import{ObservedComponent as tp,reaction as tm}from"mobx-react-helper";import{Second as th,formatDate as tb,Day as tv,splitArray as ty,changeMonth as tg,scrollTo as tw,uniqueID as tO,makeArray as tj,blobOf as tx,diffTime as tP,Timestamp as tT,sleep as tS}from"web-utility";import{Defer as tN}from"iterable-observer";import{createReactEditorJS as tk}from"react-editor-js";import tE from"editorjs-html";import{LiveProvider as t$,LivePreview as tC,LiveEditor as tI,LiveError as tD}from"react-live";import{Spinner as tM,Badge as tW,Table as tz,Button as tL,OverlayTrigger as tR,Popover as t_,Tooltip as tU,Nav as tB,Dropdown as tY,Image as tA,Card as tF,ToastContainer as tG,Toast as tV,Col as tq,Row as tH}from"react-bootstrap";import tZ from"html2canvas";function tJ(e,t,r,a){Object.defineProperty(e,t,{get:r,set:a,enumerable:!0,configurable:!0})}function tQ(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:r}],a)=>{if(!t)return;let n=["animate__animated",`animate__${e}`];r.classList.add(...n),r.addEventListener("animationend",()=>r.classList.remove(...n),{once:!0}),a.disconnect()}).observe(t)}tJ({},"animate",function(){return tQ}),tJ({},"Avatar",function(){return rW});var tX,tK,t0,t1,t2,t5,t4,t3,t7,t8,t9,t6,re,rt,rr,ra,rn,ri,ro,rl,rs,rc,rd,ru,rf,rp,rm,rh,rb,rv,ry,rg,rw,rO,rj,rx,rP,rT,rS,rN,rk,rE,r$,rC,rI,rD,rM=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let rW=e=>{var{className:t,style:r,size:a=3}=e,n=rM(e,["className","style","size"]);return e6("img",Object.assign({className:tr("object-fit-cover rounded-circle",t),style:Object.assign({width:`${a}rem`,height:`${a}rem`},r)},n))};rW.displayName="Avatar",tJ({},"ClickBoundary",function(){return rL});var rz=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};class rL extends tn{constructor(){super(...arguments),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:ta()}),Object.defineProperty(this,"switchClick",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t;let{onInnerClick:r,onOuterClick:a}=this.props;(null==(t=this.root.current)?void 0:t.contains(e.target))?null==r||r(e):null==a||a(e)}})}componentDidMount(){window.addEventListener("click",this.switchClick,!0)}componentWillUnmount(){window.removeEventListener("click",this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:r,onOuterClick:a}=e,n=rz(e,["children","onInnerClick","onOuterClick"]);return e6("div",Object.assign({ref:this.root},n,{children:t}))}}tJ({},"CodeBlock",function(){return r_});var rR=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let r_=e=>{var{className:t="",language:r,children:a}=e,n=rR(e,["className","language","children"]);let i=ts("string"==typeof a?a:tl(ti(a)?a:e6(te,{children:a})),tc[r],r);return e6("pre",Object.assign({className:`language-${r} ${t}`},n,{children:e6("code",{dangerouslySetInnerHTML:{__html:i},className:`language-${r}`})}))};var rU={};tJ(rU,"VariantColors",function(){return rB}),tJ(rU,"text2color",function(){return rY});let rB=["primary","secondary","success","danger","warning","info","dark","light"];function rY(e,t=[]){let r=t[0]?rB.filter(e=>!t.find(t=>t===e)):rB;return r[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%r.length]}tJ({},"Countdown",function(){return rH});var rA=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},rF=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},rG=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},rV=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},rq=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let rH=(i=[tf],o=[],l=tp,s=[],c=[],d=[],t=class extends l{constructor(){super(...arguments),tX.set(this,(rA(this,s),rA(this,c,0))),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:(rA(this,d),0)}),Object.defineProperty(this,"tick",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let{onEnd:e,endTime:t}=this.props,r=this.endTimestamp-Date.now();r>0?this.rest=r:(this.rest=0,this.stop(),null==e||e(t))}})}get rest(){return rG(this,tX,"f")}set rest(e){rV(this,tX,e,"f")}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((r,{label:a},n)=>{let i=e.slice(n).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/i);return t-=o*i,r.push({value:o,label:a}),r},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,th)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t="",itemClassName:r="border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center",units:a,endTime:n,onEnd:i}=e,o=rq(e,["className","itemClassName","units","endTime","onEnd"]),{timeSections:l}=this;return e6("ol",Object.assign({className:`list-unstyled m-0 ${t}`},o,{children:l.map(({value:e,label:t})=>tt("li",{className:r,children:[e6("strong",{children:(e+"").padStart(2,"0")}),e6("span",{children:t})]},t))}))}},tX=new WeakMap,tK=t,"symbol"==typeof(t0="Countdown")&&(t0=t0.description?"[".concat(t0.description,"]"):""),Object.defineProperty(tK,"name",{configurable:!0,value:t0}),u="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(t1=l[Symbol.metadata])?t1:null):void 0,r=[td],a=[tu],n=[tm(e=>e.observedProps.endTime)],rF(t,null,r,{kind:"accessor",name:"rest",static:!1,private:!1,access:{has:e=>"rest"in e,get:e=>e.rest,set:(e,t)=>{e.rest=t}},metadata:u},c,d),rF(t,null,a,{kind:"getter",name:"timeSections",static:!1,private:!1,access:{has:e=>"timeSections"in e,get:e=>e.timeSections},metadata:u},null,s),rF(t,null,n,{kind:"method",name:"initTimer",static:!1,private:!1,access:{has:e=>"initTimer"in e,get:e=>e.initTimer},metadata:u},null,s),rF(null,e={value:t},i,{kind:"class",name:t.name,metadata:u},null,o),t=e.value,u&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(t,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Countdown"}),rA(t,o),t);var rZ={};tJ(rZ,"DialogClose",function(){return r0}),tJ(rZ,"Dialog",function(){return r1});var rJ=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},rQ=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},rX=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},rK=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r};class r0 extends Error{constructor(e="Dialog closed"){super(e)}}let r1=(m=[],h=[],b=[],v=[],t2=class{get input(){return rX(this,t5,"f")}set input(e){rK(this,t5,e,"f")}get defer(){return rX(this,t4,"f")}set defer(e){rK(this,t4,e,"f")}constructor(e){t5.set(this,rQ(this,m,{})),t4.set(this,(rQ(this,h),rQ(this,b,void 0))),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:rQ(this,v)}),this.Component=tf(t=>e6(e,Object.assign({},t,this.input,{defer:this.defer}))),this.Component.displayName="DialogComponent"}open(e){return e&&(this.input=e),this.defer=new tN,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}},t5=new WeakMap,t4=new WeakMap,y="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,f=[td],p=[td],rJ(t2,null,f,{kind:"accessor",name:"input",static:!1,private:!1,access:{has:e=>"input"in e,get:e=>e.input,set:(e,t)=>{e.input=t}},metadata:y},m,h),rJ(t2,null,p,{kind:"accessor",name:"defer",static:!1,private:!1,access:{has:e=>"defer"in e,get:e=>e.defer,set:(e,t)=>{e.defer=t}},metadata:y},b,v),y&&Object.defineProperty(t2,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),t2);tJ({},"Editor",function(){return r9});var r2=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},r5=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},r4=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},r3=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},r7=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let r8=tk(),r9=(O=[tf],j=[],x=to,P=[],T=[],w=class extends x{constructor(){super(...arguments),Object.defineProperty(this,"core",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t3.set(this,r5(this,P,this.props.defaultValue)),Object.defineProperty(this,"save",{enumerable:!0,configurable:!0,writable:!0,value:(r5(this,T),()=>{var e,t,r,a;return e=this,t=void 0,a=function*(){return this.core&&(this.innerValue=yield this.core.save())},new(r=void 0,r=Promise)(function(n,i){function o(e){try{s(a.next(e))}catch(e){i(e)}}function l(e){try{s(a.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,l)}s((a=a.apply(e,t||[])).next())})})})}get innerValue(){return r4(this,t3,"f")}set innerValue(e){r3(this,t3,e,"f")}render(){let e=this.props,{name:t,required:r,children:a}=e,n=r7(e,["name","required","children"]),{innerValue:i}=this;return tt("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[e6("input",{hidden:!0,name:t,required:r,value:JSON.stringify(i)}),e6(r8,Object.assign({},n,{onInitialize:e=>{var t;this.core=e,null==(t=n.onInitialize)||t.call(n,e)}}))]})}},t3=new WeakMap,t7=w,"symbol"==typeof(t8="Editor")&&(t8=t8.description?"[".concat(t8.description,"]"):""),Object.defineProperty(t7,"name",{configurable:!0,value:t8}),r2(w,null,[td],{kind:"accessor",name:"innerValue",static:!1,private:!1,access:{has:e=>"innerValue"in e,get:e=>e.innerValue,set:(e,t)=>{e.innerValue=t}},metadata:S="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(t9=x[Symbol.metadata])?t9:null):void 0},P,T),r2(null,g={value:w},O,{kind:"class",name:w.name,metadata:S},null,j),w=g.value,S&&Object.defineProperty(w,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:S}),Object.defineProperty(w,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Editor"}),r5(w,j),w);var r6={};tJ(r6,"parser",function(){return at}),tJ(r6,"EditorHTML",function(){return ar});var ae=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let at=tE({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),ar=e=>{var{data:t}=e;return e6("article",Object.assign({},ae(e,["data"]),{dangerouslySetInnerHTML:{__html:at.parse(t)}}))};ar.displayName="EditorHTML";var aa={};tJ(aa,"HorizontalMarquee",function(){return ai}),tJ(aa,"HorizontalMarqueeBox",function(){return ao});var an=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let ai=e=>{var{className:t="",children:r,maxWidth:a="100%",duration:n,height:i}=e;return e6("div",Object.assign({className:`overflow-hidden mw-100 ${t}`},an(e,["className","children","maxWidth","duration","height"]),{children:e6("div",{className:"d-inline-block align-top text-nowrap _4_3lnG_scrollWrap",style:{maxWidth:a,animationDuration:n,height:i,lineHeight:i},children:e6("div",{className:"d-inline-block _4_3lnG_scrollItem",style:{animationDuration:n},children:r})})}))},ao=({children:e,maxWidth:t,duration:r,height:a})=>a?e6("div",{className:"overflow-hidden _4_3lnG_scrollHeightWrap",style:{maxWidth:t,"--scroll-height":a},children:tt("div",{className:"d-inline-block overflow-hidden mw-100 _4_3lnG_scrollContainer",children:[e6("div",{className:"d-block overflow-hidden text-wrap text-break _4_3lnG_unScrollItem",children:e}),e6(ai,{duration:r,children:e})]})}):e6(ai,{maxWidth:t,duration:r,height:a,children:e});ai.displayName="HorizontalMarquee",tJ({},"Icon",function(){return as});var al=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let as=e=>{var{className:t,style:r,name:a,size:n}=e,i=al(e,["className","style","name","size"]);return e6("span",Object.assign({className:tr(`bi-${a}`,t),style:Object.assign({fontSize:n&&`${n}rem`},r)},i))};as.displayName="Icon",tJ({},"LiveTSX",function(){return ac});let ac=({scope:e,children:t})=>{let r=ti(t)?t:e6(te,{children:t});return tt(t$,{code:"string"==typeof t?t:tl(r),scope:e,language:"tsx",children:[e6(tC,{className:"mb-3"}),e6(tI,{}),e6(tD,{className:"text-danger small p-2"})]})};tJ({},"Loading",function(){return au});var ad=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let au=e=>{var{className:t="",children:r="Loading..."}=e;return tt("div",Object.assign({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},ad(e,["className","children"]),{children:[e6(tM,{animation:"border",variant:"success"}),e6("span",{className:"ml-3 text-white",children:r})]}))};au.displayName="Loading",tJ({},"MonthCalendar",function(){return ag}),tJ({},"OverlayBox",function(){return ap});var af=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let ap=e=>{var{title:t,detail:r,children:a}=e;return e6(tR,Object.assign({},af(e,["title","detail","children"]),{overlay:r?tt(t_,{children:[e6(t_.Header,{children:t}),e6(t_.Body,{children:r})]}):e6(tU,{children:t}),children:a}))};ap.displayName="OverlayBox";var am=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},ah=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},ab=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},av=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},ay=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let ag=(I=[tf],D=[],M=tp,W=[],z=[],L=[],k=class extends M{constructor(){super(...arguments),t6.set(this,(am(this,W),am(this,z,new Date))),Object.defineProperty(this,"renderDate",{enumerable:!0,configurable:!0,writable:!0,value:(am(this,L),e=>{let{variant:t="primary",value:r,onSelect:a}=this.observedProps,n=tb(e,"YYYY-MM-DD"),i=null==r?void 0:r.filter(({date:e})=>tb(e,"YYYY-MM-DD")===n);return tt("td",{className:tr({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":n===tb(new Date,"YYYY-MM-DD")}),children:[e6("time",{className:"d-block",dateTime:e.toJSON(),children:e.getDate()}),null==i?void 0:i.map(e=>"object"==typeof e.content?e.content:e6(ap,{title:e.content,children:e6(tW,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:rY(e.content+"",["light"]),href:e.link,onClick:()=>null==a?void 0:a(e),children:e.content})},e.date+""))]},e+"")})})}get weekFormatter(){var e;let{locale:t=null==(e=globalThis.navigator)?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:"long"})}get currentDate(){return ab(this,t6,"f")}set currentDate(e){av(this,t6,e,"f")}get dateGrid(){let e=new Date(this.currentDate);return e.setDate(1),e=new Date(e-e.getDay()*tv),ty(Array.from(Array(42),(t,r)=>new Date(+e+r*tv)),7)}changeMonth(e){var t,r;this.currentDate=tg(this.currentDate,e),null==(r=(t=this.props).onChange)||r.call(t,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:r}=this,a=this.observedProps,{style:n,variant:i="primary",onChange:o,onSelect:l}=a;return tt(tz,Object.assign({},ay(a,["style","variant","onChange","onSelect"]),{style:Object.assign({tableLayout:"fixed"},n),children:[e6("caption",{children:tt("div",{className:"d-flex justify-content-between align-items-center",children:[e6(tL,{variant:i,onClick:()=>this.changeMonth(-1),children:"<"}),tb(t,"YYYY-MM"),e6(tL,{variant:i,onClick:()=>this.changeMonth(1),children:">"})]})}),e6("thead",{children:e6("tr",{children:r[0].map((t,r,{length:a})=>e6("td",{className:`bg-${i} text-white`,style:{width:`calc(100% / ${a})`},children:e.format(t)},r))})}),e6("tbody",{children:r.map(e=>e6("tr",{children:e.map(this.renderDate)},e[0]+""))})]}))}},t6=new WeakMap,re=k,"symbol"==typeof(rt="MonthCalendar")&&(rt=rt.description?"[".concat(rt.description,"]"):""),Object.defineProperty(re,"name",{configurable:!0,value:rt}),R="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rr=M[Symbol.metadata])?rr:null):void 0,E=[tu],$=[td],C=[tu],ah(k,null,E,{kind:"getter",name:"weekFormatter",static:!1,private:!1,access:{has:e=>"weekFormatter"in e,get:e=>e.weekFormatter},metadata:R},null,W),ah(k,null,$,{kind:"accessor",name:"currentDate",static:!1,private:!1,access:{has:e=>"currentDate"in e,get:e=>e.currentDate,set:(e,t)=>{e.currentDate=t}},metadata:R},z,L),ah(k,null,C,{kind:"getter",name:"dateGrid",static:!1,private:!1,access:{has:e=>"dateGrid"in e,get:e=>e.dateGrid},metadata:R},null,W),ah(null,N={value:k},I,{kind:"class",name:k.name,metadata:R},null,D),k=N.value,R&&Object.defineProperty(k,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:R}),Object.defineProperty(k,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"MonthCalendar"}),am(k,D),k);tJ({},"Nameplate",function(){return aw});let aw=({avatar:e,name:t})=>tt(te,{children:[e6(rW,{size:2,style:{marginRight:"0.5rem"},src:e}),e6("span",{className:"align-middle",children:t})]});aw.displayName="Nameplate",tJ({},"PageNav",function(){return aN});var aO=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},aj=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},ax=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},aP=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},aT=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let aS=Array.from(Array(6),(e,t)=>`h${++t}`)+"",aN=(F=[tf],G=[],V=to,q=[],H=[],Z=[],J=[],Q=[],U=class extends V{constructor(){super(...arguments),ra.set(this,(aO(this,q),aO(this,H,[]))),rn.set(this,(aO(this,Z),aO(this,J,0))),Object.defineProperty(this,"updateScrollY",{enumerable:!0,configurable:!0,writable:!0,value:(aO(this,Q),()=>this.scrollY=window.scrollY)}),Object.defineProperty(this,"scrollTo",{enumerable:!0,configurable:!0,writable:!0,value:e=>()=>{var t,r;setTimeout(()=>tw(`[id="${e.id}"]`)),null==(r=(t=this.props).onItemClick)||r.call(t,e)}}),Object.defineProperty(this,"renderLink",{enumerable:!0,configurable:!0,writable:!0,value:({id:e,level:t,text:r,top:a})=>{let{currentActiveId:n}=this,{depth:i=1/0}=this.props;return t<=i&&e6(tB.Item,{style:{textIndent:`${t-1}rem`},children:e6(tB.Link,{href:`#${e}`,active:n===e,onClick:this.scrollTo({id:e,level:t,text:r,top:a}),children:r})},e)}})}get list(){return ax(this,ra,"f")}set list(e){aP(this,ra,e,"f")}get scrollY(){return ax(this,rn,"f")}set scrollY(e){aP(this,rn,e,"f")}get currentActiveId(){var e;let{list:t,scrollY:r}=this,a=t.findIndex(({top:e})=>e>r);return null==(e=t[a-1])?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(aS),e=>{e.id||(e.id=tO());let{id:t,tagName:r,textContent:a,offsetTop:n}=e;return{id:t,level:+r[1],text:a.trim(),top:n}}))}componentWillUnmount(){var e;null==(e=globalThis.removeEventListener)||e.call(globalThis,"scroll",this.updateScrollY)}render(){let{list:e}=this,t=this.props,{style:r,variant:a="underline"}=t;return e6(tB,Object.assign({},aT(t,["style","variant"]),{variant:a,style:Object.assign({flexDirection:"column"},r),children:e.map(this.renderLink)}))}},ra=new WeakMap,rn=new WeakMap,ri=U,"symbol"==typeof(ro="PageNav")&&(ro=ro.description?"[".concat(ro.description,"]"):""),Object.defineProperty(ri,"name",{configurable:!0,value:ro}),X="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rl=V[Symbol.metadata])?rl:null):void 0,B=[td],Y=[td],A=[tu],aj(U,null,B,{kind:"accessor",name:"list",static:!1,private:!1,access:{has:e=>"list"in e,get:e=>e.list,set:(e,t)=>{e.list=t}},metadata:X},H,Z),aj(U,null,Y,{kind:"accessor",name:"scrollY",static:!1,private:!1,access:{has:e=>"scrollY"in e,get:e=>e.scrollY,set:(e,t)=>{e.scrollY=t}},metadata:X},J,Q),aj(U,null,A,{kind:"getter",name:"currentActiveId",static:!1,private:!1,access:{has:e=>"currentActiveId"in e,get:e=>e.currentActiveId},metadata:X},null,q),aj(null,_={value:U},F,{kind:"class",name:U.name,metadata:X},null,G),U=_.value,X&&Object.defineProperty(U,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(U,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"PageNav"}),aO(U,G),U);tJ({},"ScrollNav",function(){return aD});var ak=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},aE=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},a$=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},aC=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},aI=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let aD=(eo=[tf],el=[],es=to,ec=[],ed=[],eu=[],ef=[],ep=[],em=[],eh=[],ee=class extends es{constructor(){super(...arguments),Object.defineProperty(this,"scrollerRef",{enumerable:!0,configurable:!0,writable:!0,value:(ak(this,ec),ta())}),rs.set(this,ak(this,ed,0)),rc.set(this,(ak(this,eu),ak(this,ef,0))),rd.set(this,(ak(this,ep),ak(this,em,0))),Object.defineProperty(this,"updateScroll",{enumerable:!0,configurable:!0,writable:!0,value:(ak(this,eh),()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e})}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scrollBy",{enumerable:!0,configurable:!0,writable:!0,value:e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:"smooth"})}})}get scrollLeft(){return a$(this,rs,"f")}set scrollLeft(e){aC(this,rs,e,"f")}get scrollWidth(){return a$(this,rc,"f")}set scrollWidth(e){aC(this,rc,e,"f")}get clientWidth(){return a$(this,rd,"f")}set clientWidth(e){aC(this,rd,e,"f")}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener("scroll",this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;null==(e=this.resizeObserver)||e.disconnect(),null==(t=this.scrollerRef.current)||t.removeEventListener("scroll",this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,r=this.props,{className:a="",children:n}=r,i=aI(r,["className","children"]);return tt("div",{className:`position-relative overflow-y-hidden ${a}`,children:[e&&e6("button",{type:"button",className:"position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 _1MZNfG_scrollButtonLeft","aria-label":"Scroll left",onClick:this.scrollBy(-1),children:e6(as,{name:"caret-left-fill"})}),e6("div",{ref:this.scrollerRef,className:"overflow-x-auto _1MZNfG_scrollerInner",children:e6(tB,Object.assign({},i,{className:"flex-nowrap",children:n}))}),t&&e6("button",{type:"button",className:"position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 _1MZNfG_scrollButtonRight","aria-label":"Scroll right",onClick:this.scrollBy(1),children:e6(as,{name:"caret-right-fill"})})]})}},rs=new WeakMap,rc=new WeakMap,rd=new WeakMap,ru=ee,"symbol"==typeof(rf="ScrollNav")&&(rf=rf.description?"[".concat(rf.description,"]"):""),Object.defineProperty(ru,"name",{configurable:!0,value:rf}),eb="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rp=es[Symbol.metadata])?rp:null):void 0,et=[td],er=[td],ea=[td],en=[tu],ei=[tu],aE(ee,null,et,{kind:"accessor",name:"scrollLeft",static:!1,private:!1,access:{has:e=>"scrollLeft"in e,get:e=>e.scrollLeft,set:(e,t)=>{e.scrollLeft=t}},metadata:eb},ed,eu),aE(ee,null,er,{kind:"accessor",name:"scrollWidth",static:!1,private:!1,access:{has:e=>"scrollWidth"in e,get:e=>e.scrollWidth,set:(e,t)=>{e.scrollWidth=t}},metadata:eb},ef,ep),aE(ee,null,ea,{kind:"accessor",name:"clientWidth",static:!1,private:!1,access:{has:e=>"clientWidth"in e,get:e=>e.clientWidth,set:(e,t)=>{e.clientWidth=t}},metadata:eb},em,eh),aE(ee,null,en,{kind:"getter",name:"canScrollLeft",static:!1,private:!1,access:{has:e=>"canScrollLeft"in e,get:e=>e.canScrollLeft},metadata:eb},null,ec),aE(ee,null,ei,{kind:"getter",name:"canScrollRight",static:!1,private:!1,access:{has:e=>"canScrollRight"in e,get:e=>e.canScrollRight},metadata:eb},null,ec),aE(null,K={value:ee},eo,{kind:"class",name:ee.name,metadata:eb},null,el),ee=K.value,eb&&Object.defineProperty(ee,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eb}),Object.defineProperty(ee,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"ScrollNav"}),ak(ee,el),ee);var aM={};tJ(aM,"Option",function(){return az}),tJ(aM,"Select",function(){return aL});var aW=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let az=e=>{var{value:t,children:r}=e,a=aW(e,["value","children"]);return e6(tY.Item,Object.assign({},a,{"data-value":t,children:r}))};az.displayName="Option";let aL=({className:e,style:t,variant:r,menuVariant:a,children:n,value:i,onChange:o,valueRender:l})=>{let s=tj(n).flat(1/0).find(e=>ti(e)&&e.type===az&&e.props.value===i);return tt(tY,{onClick:({target:e})=>{let t=e.closest(".dropdown-item");if(!t)return;let{value:r}=t.dataset;null==o||o(r)},children:[e6(tY.Toggle,{className:tr("w-100","d-flex","justify-content-between","align-items-center",!r&&"bg-white text-dark",e),style:t,variant:r,children:(null==l?void 0:l(i))||e6("div",{className:null==s?void 0:s.props.className,children:null==s?void 0:s.props.children})}),e6(tY.Menu,{variant:a,children:n})]})};aL.displayName="Select";var aR={};tJ(aR,"elementToImage",function(){return aG}),tJ(aR,"ShareBox",function(){return aV});var a_=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},aU=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},aB=function(e,t,r,a){return new(r||(r=Promise))(function(n,i){function o(e){try{s(a.next(e))}catch(e){i(e)}}function l(e){try{s(a.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,l)}s((a=a.apply(e,t||[])).next())})},aY=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},aA=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},aF=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};function aG(e,t,r){return aB(this,void 0,void 0,function*(){let a=yield tZ(e,{useCORS:!0});return new Promise((e,n)=>a.toBlob(t=>t?e(URL.createObjectURL(t)):n(),t,r))})}let aV=(eO=[tf],ej=[],ex=to,eP=[],eT=[],eS=[],eN=[],ey=class extends ex{constructor(){super(...arguments),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:ta()}),rm.set(this,aU(this,eP,!1)),rh.set(this,(aU(this,eT),aU(this,eS,""))),Object.defineProperty(this,"generateImage",{enumerable:!0,configurable:!0,writable:!0,value:(aU(this,eN),()=>aB(this,void 0,void 0,function*(){this.imageURI&&(URL.revokeObjectURL(this.imageURI),this.imageURI=""),this.loading=!0,this.imageURI=yield aG(this.root.current),this.loading=!1}))}),Object.defineProperty(this,"share",{enumerable:!0,configurable:!0,writable:!0,value:e=>aB(this,void 0,void 0,function*(){var t;e.stopPropagation();let r=yield tx(this.imageURI),a=new File([r],`${this.props.title}.png`,{type:r.type});yield null==(t=navigator.share)?void 0:t.call(navigator,Object.assign({files:[a]},this.props))})})}get loading(){return aY(this,rm,"f")}set loading(e){aA(this,rm,e,"f")}get imageURI(){return aY(this,rh,"f")}set imageURI(e){aA(this,rh,e,"f")}componentDidMount(){var e;null==(e=globalThis.addEventListener)||e.call(globalThis,"resize",this.generateImage)}componentWillUnmount(){var e;null==(e=globalThis.removeEventListener)||e.call(globalThis,"resize",this.generateImage)}render(){let e=this.props,{className:t="",children:r}=e,a=aF(e,["className","children"]),{loading:n,imageURI:i}=this;return tt(te,{children:[n&&e6(au,{}),tt("div",Object.assign({},a,{ref:this.root,className:`position-relative ${t}`,onMouseEnter:i?void 0:this.generateImage,onTouchStart:i?void 0:this.generateImage,children:[r,i&&e6(tA,{className:"position-absolute start-0 top-0 w-100 h-100",src:i,alt:"Share Image",fluid:!0,onClick:this.share})]}))]})}},rm=new WeakMap,rh=new WeakMap,rb=ey,"symbol"==typeof(rv="ShareBox")&&(rv=rv.description?"[".concat(rv.description,"]"):""),Object.defineProperty(rb,"name",{configurable:!0,value:rv}),ek="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(ry=ex[Symbol.metadata])?ry:null):void 0,eg=[td],ew=[td],a_(ey,null,eg,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:e=>"loading"in e,get:e=>e.loading,set:(e,t)=>{e.loading=t}},metadata:ek},eP,eT),a_(ey,null,ew,{kind:"accessor",name:"imageURI",static:!1,private:!1,access:{has:e=>"imageURI"in e,get:e=>e.imageURI,set:(e,t)=>{e.imageURI=t}},metadata:ek},eS,eN),a_(null,ev={value:ey},eO,{kind:"class",name:ey.name,metadata:ek},null,ej),ey=ev.value,ek&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:ek}),Object.defineProperty(ey,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"ShareBox"}),aU(ey,ej),ey);tJ({},"SpinnerButton",function(){return aH});var aq=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let aH=e=>{var{animation:t,loading:r,disabled:a,children:n}=e;return tt(tL,Object.assign({},aq(e,["animation","loading","disabled","children"]),{disabled:r||a,children:[r&&tt(te,{children:[e6(tM,{as:"span",className:n?"me-2":"",size:"sm",animation:t,role:"status","aria-hidden":"true"}),!n&&e6("span",{className:"visually-hidden",children:"Loading..."})]}),n]}))};aH.displayName="SpinnerButton",tJ({},"TableSpinner",function(){return aJ});var aZ=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let aJ=e=>{var{animation:t="border",variant:r="primary",size:a,colSpan:n}=e;return e6("tr",Object.assign({},aZ(e,["animation","variant","size","colSpan"]),{children:e6("td",{className:"text-center p-4",colSpan:n,children:e6(tM,{animation:t,variant:r,size:a})})}))};aJ.displayName="TableSpinner",tJ({},"TextTruncate",function(){return a2});var aQ=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},aX=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},aK=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},a0=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},a1=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let a2=(eD=[tf],eM=[],eW=to,ez=[],eL=[],eR=[],e_=[],e$=class extends eW{constructor(){super(...arguments),rg.set(this,aX(this,ez,!1)),rw.set(this,(aX(this,eL),aX(this,eR,!1))),Object.defineProperty(this,"contentRef",{enumerable:!0,configurable:!0,writable:!0,value:(aX(this,e_),ta())}),Object.defineProperty(this,"checkOverflow",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}}),Object.defineProperty(this,"toggle",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)}})}get expanded(){return aK(this,rg,"f")}set expanded(e){a0(this,rg,e,"f")}get overflowed(){return aK(this,rw,"f")}set overflowed(e){a0(this,rw,e,"f")}componentDidMount(){this.checkOverflow(),window.addEventListener("resize",this.checkOverflow)}componentDidUpdate({rows:e,children:t}){this.expanded||t===this.props.children&&e===this.props.rows||this.checkOverflow()}componentWillUnmount(){window.removeEventListener("resize",this.checkOverflow)}render(){let e=this.props,{children:t,rows:r=3,expandText:a="⏬",collapseText:n="⏫"}=e,i=a1(e,["children","rows","expandText","collapseText"]),{expanded:o,overflowed:l}=this;return tt("div",Object.assign({},i,{children:[e6("p",{ref:this.contentRef,style:o?void 0:{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r},children:t}),(l||o)&&e6("button",{type:"button",className:"bg-transparent border-0 p-0","aria-expanded":o,onClick:this.toggle,children:o?n:a})]}))}},rg=new WeakMap,rw=new WeakMap,rO=e$,"symbol"==typeof(rj="TextTruncate")&&(rj=rj.description?"[".concat(rj.description,"]"):""),Object.defineProperty(rO,"name",{configurable:!0,value:rj}),eU="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rx=eW[Symbol.metadata])?rx:null):void 0,eC=[td],eI=[td],aQ(e$,null,eC,{kind:"accessor",name:"expanded",static:!1,private:!1,access:{has:e=>"expanded"in e,get:e=>e.expanded,set:(e,t)=>{e.expanded=t}},metadata:eU},ez,eL),aQ(e$,null,eI,{kind:"accessor",name:"overflowed",static:!1,private:!1,access:{has:e=>"overflowed"in e,get:e=>e.overflowed,set:(e,t)=>{e.overflowed=t}},metadata:eU},eR,e_),aQ(null,eE={value:e$},eD,{kind:"class",name:e$.name,metadata:eU},null,eM),e$=eE.value,eU&&Object.defineProperty(e$,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eU}),Object.defineProperty(e$,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TextTruncate"}),aX(e$,eM),e$);tJ({},"Time",function(){return a9});var a5=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},a4=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},a3=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},a7=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},a8=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let a9=(eG=[tf],eV=[],eq=tp,eH=[],eZ=[],eJ=[],eY=class extends eq{updateText(){let{dateTime:e,format:t}=this.props;return tb(e,t)}get timeText(){return a3(this,rP,"f")}set timeText(e){a7(this,rP,e,"f")}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,r=a8(e,["dateTime"]);return e6("time",Object.assign({dateTime:new Date(t).toJSON()},r,{children:this.timeText}))}constructor(){super(...arguments),rP.set(this,(a5(this,eH),a5(this,eZ,this.updateText()))),a5(this,eJ)}},rP=new WeakMap,rT=eY,"symbol"==typeof(rS="Time")&&(rS=rS.description?"[".concat(rS.description,"]"):""),Object.defineProperty(rT,"name",{configurable:!0,value:rS}),eQ="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rN=eq[Symbol.metadata])?rN:null):void 0,eA=[tm(({observedProps:{dateTime:e,format:t}})=>e+t)],eF=[td],a4(eY,null,eA,{kind:"method",name:"updateText",static:!1,private:!1,access:{has:e=>"updateText"in e,get:e=>e.updateText},metadata:eQ},null,eH),a4(eY,null,eF,{kind:"accessor",name:"timeText",static:!1,private:!1,access:{has:e=>"timeText"in e,get:e=>e.timeText,set:(e,t)=>{e.timeText=t}},metadata:eQ},eZ,eJ),a4(null,eB={value:eY},eG,{kind:"class",name:eY.name,metadata:eQ},null,eV),eY=eB.value,eQ&&Object.defineProperty(eY,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eQ}),Object.defineProperty(eY,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Time"}),a5(eY,eV),eY);tJ({},"TimeDistance",function(){return nt});var a6=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let ne={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},nt=e=>{var{date:t,unitWords:r=ne,beforeWord:a=" before",afterWord:n=" after"}=e,i=a6(e,["date","unitWords","beforeWord","afterWord"]);let{distance:o,unit:l}=tP(t=new Date(t));return tt("time",Object.assign({},i,{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o)," ",r[l],o<0?a:n]}))};nt.displayName="TimeDistance",tJ({},"Timeline",function(){return na});var nr=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let na=e=>{var{className:t,events:r,timeFormat:a}=e;return e6("ol",Object.assign({className:`list-unstyled TOztta_timeline ${t}`},nr(e,["className","events","timeFormat"]),{children:r.map(({title:e,summary:t,time:r,link:n,people:i})=>e6("li",{className:"position-relative TOztta_timelineItem TOztta_right",children:e6(tF,{children:tt(tF.Body,{className:"p-4 d-flex flex-column gap-3 align-items-center",children:[e6("h3",{className:"h5 m-0",children:e6("a",{className:"text-decoration-none stretched-link",href:n,children:e})}),tt("div",{className:"small text-muted d-flex gap-2",children:["⏲️",e6(a9,{dateTime:r[0],format:a}),r[1]&&"~",r[1]&&e6(a9,{dateTime:r[1],format:a})]}),e6("ul",{className:"list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around",children:null==i?void 0:i.map(e=>e6("li",{children:e6(aw,Object.assign({},e))},e.name))}),e6("p",{className:"m-0",children:t})]})})},e))}))};na.displayName="Timeline",tJ({},"Toast",function(){return nc});var nn=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},ni=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},no=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},nl=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let ns=new Set(["warning","info","light"]),nc=(eX=[],eK=[],rk=class{get messages(){return ni(this,rE,"f")}set messages(e){no(this,rE,e,"f")}constructor(e=tT){Object.defineProperty(this,"TimeScalar",{enumerable:!0,configurable:!0,writable:!0,value:e}),rE.set(this,nn(this,eX,[])),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:(nn(this,eK),tf(({position:e="top-end"})=>e6(tG,{position:e,className:"position-fixed p-3",children:this.messages.map(this.renderMessage)})))}),Object.defineProperty(this,"renderMessage",{enumerable:!0,configurable:!0,writable:!0,value:({id:e,openedAt:t,title:r,body:a,variant:n,delay:i=3e3})=>{let o=n&&!ns.has(n)?"text-white":void 0,l=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return tt(tV,{bg:n,delay:i,autohide:0!==i,onClose:()=>this.close(e),children:[(!!r||0===i)&&tt(tV.Header,{children:[e6("strong",{className:"me-auto",children:r}),e6("small",{children:l})]}),e6(tV.Body,{className:o,children:a})]},e)}}),this.Component.displayName="ToastComponent"}open(e){let t=tO(),r=Date.now(),{promise:a,resolve:n}=Promise.withResolvers();return this.messages=[...this.messages,Object.assign(Object.assign({id:t},e),{openedAt:r,resolve:n})],a}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:r}=t,a=nl(t,["resolve"]);null==r||r(Object.assign(Object.assign({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}},rE=new WeakMap,function(e,t,r,a,n){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,l=r.kind,s="getter"===l?"get":"setter"===l?"set":"value",c=e?r.static?e:e.prototype:null,d=c?Object.getOwnPropertyDescriptor(c,r.name):{},u=!1,f=t.length-1;f>=0;f--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");n.push(i(e||null))};var h=(0,t[f])("accessor"===l?{get:d.get,set:d.set}:d[s],p);if("accessor"===l){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(o=i(h.get))&&(d.get=o),(o=i(h.set))&&(d.set=o),(o=i(h.init))&&a.unshift(o)}else(o=i(h))&&("field"===l?a.unshift(o):d[s]=o)}c&&Object.defineProperty(c,r.name,d),u=!0}(rk,[td],{kind:"accessor",name:"messages",static:!1,private:!1,access:{has:e=>"messages"in e,get:e=>e.messages,set:(e,t)=>{e.messages=t}},metadata:e0="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0},eX,eK),e0&&Object.defineProperty(rk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e0}),rk);tJ({},"TypeEcho",function(){return nh});var nd=function(e,t,r,a,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,s=a.kind,c="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?a.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,a.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var h in a)m[h]="access"===h?{}:a[h];for(var h in a.access)m.access[h]=a.access[h];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,r[p])("accessor"===s?{get:u.get,set:u.set}:u[c],m);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(l=o(b.get))&&(u.get=l),(l=o(b.set))&&(u.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===s?n.unshift(l):u[c]=l)}d&&Object.defineProperty(d,a.name,u),f=!0},nu=function(e,t,r){for(var a=arguments.length>2,n=0;n<t.length;n++)r=a?t[n].call(e,r):t[n].call(e);return a?r:void 0},nf=function(e,t,r,a){if("a"===r&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)},np=function(e,t,r,a,n){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?n.call(e,r):n?n.value=r:t.set(e,r),r},nm=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let nh=(e5=[tf],e4=[],e3=to,e7=[],e8=[],e2=class extends e3{constructor(){super(...arguments),r$.set(this,nu(this,e7,"")),Object.defineProperty(this,"init",{enumerable:!0,configurable:!0,writable:!0,value:(nu(this,e8),e=>e&&new IntersectionObserver((e,t)=>{var r,a,n,i;return r=this,a=[e,t],n=void 0,i=function*([{isIntersecting:e}],t){if(!e)return;t.disconnect();let{text:r,intervals:a=150}=this.props;for(let e of r)yield tS(a/1e3),this.echoed+=e},new(n||(n=Promise))(function(e,t){function o(e){try{s(i.next(e))}catch(e){t(e)}}function l(e){try{s(i.throw(e))}catch(e){t(e)}}function s(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(o,l)}s((i=i.apply(r,a||[])).next())})}).observe(e))})}get echoed(){return nf(this,r$,"f")}set echoed(e){np(this,r$,e,"f")}render(){let e=this.props,{className:t,text:r}=e,a=nm(e,["className","text"]),{echoed:n}=this;return e6("pre",Object.assign({},a,{ref:this.init,className:tr("text-wrap",t),children:n+(n===r?"":"_")}))}},r$=new WeakMap,rC=e2,"symbol"==typeof(rI="TypeEcho")&&(rI=rI.description?"[".concat(rI.description,"]"):""),Object.defineProperty(rC,"name",{configurable:!0,value:rI}),nd(e2,null,[td],{kind:"accessor",name:"echoed",static:!1,private:!1,access:{has:e=>"echoed"in e,get:e=>e.echoed,set:(e,t)=>{e.echoed=t}},metadata:e9="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(rD=e3[Symbol.metadata])?rD:null):void 0},e7,e8),nd(null,e1={value:e2},e5,{kind:"class",name:e2.name,metadata:e9},null,e4),e2=e1.value,e9&&Object.defineProperty(e2,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e9}),Object.defineProperty(e2,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TypeEcho"}),nu(e2,e4),e2);tJ({},"UserRankView",function(){return ny});let nb=({email:e,website:t})=>tt("address",{className:"mb-0 d-flex justify-content-around gap-2",children:[e&&e6("a",{rel:"noreferrer",target:"_blank",href:"mailto:"+e,children:e6(as,{name:"envelope"})}),t&&e6("a",{rel:"noreferrer",target:"_blank",href:t,children:e6(as,{name:"globe2"})})]});var nv=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};class ny extends tn{constructor(){super(...arguments),Object.defineProperty(this,"renderMedal",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t,r;return tt(tq,{as:"li",children:[e6("div",{className:"shadow-lg overflow-hidden rounded-circle m-auto WavURG_image",children:e6(tA,{src:e.avatar,alt:e.name,loading:"lazy",fluid:!0})}),tt("div",{className:"position-relative overflow-hidden WavURG_topUser",children:[tt("div",{className:"position-relative",children:[e6("i",{className:"d-block overflow-hidden m-auto mb-1 rounded-circle"}),e6("a",{className:"d-block mb-0 stretched-link",href:(null==(r=(t=this.props).linkOf)?void 0:r.call(t,e))||"#",children:e.name}),e6("strong",{children:e.score})]}),e6(nb,Object.assign({},e))]})]},e.id)}}),Object.defineProperty(this,"renderRow",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,{length:r})=>{var a,n;return tt("tr",{className:"position-relative",children:[e6("td",{className:"align-middle",children:e6(tW,{className:"fw-bold fst-italic",children:(t+4+"").padStart((r+"").length,"0")})}),tt("td",{className:"position-relative mw-50 text-truncate WavURG_name",children:[e6("div",{className:"d-inline-block overflow-hidden align-middle rounded-circle WavURG_image",children:e6(tA,{src:e.avatar,alt:e.name,loading:"lazy",fluid:!0})}),e6("a",{className:"ms-2 d-inline-block align-middle stretched-link",style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:(null==(n=(a=this.props).linkOf)?void 0:n.call(a,e))||"#",children:e.name})]}),e6("td",{className:"align-middle",children:e.score}),e6("td",{className:"align-middle",children:e6(nb,Object.assign({},e))})]},e.id)}})}render(){let e=this.props,{className:t="",title:r,rank:a=[],linkOf:n}=e;return tt(tH,Object.assign({className:`WavURG_rankBox ${t}`},nv(e,["className","title","rank","linkOf"]),{children:[tt(tq,{sm:12,xs:12,lg:7,children:[tt("div",{className:"shadow rounded-3 WavURG_title",children:[tt("div",{className:"WavURG_medal",children:[e6("i",{className:"d-inline-block ms-1 overflow-hidden rounded-circle"}),e6("i",{className:"d-inline-block ms-1 overflow-hidden rounded-circle"}),e6("i",{className:"d-inline-block ms-1 overflow-hidden rounded-circle"})]}),e6("h3",{"data-text":r,className:"position-relative m-auto mb-0 fw-bold text-center",children:r})]}),e6(tH,{as:"ul",className:"mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled WavURG_topUsers",children:a.slice(0,3).map(this.renderMedal)})]}),e6(tq,{xs:12,sm:12,lg:5,children:e6(tz,{className:"my-3 pt-2 WavURG_restUsers",responsive:!0,children:e6("tbody",{children:a.slice(3,10).map(this.renderRow)})})})]}))}}Object.defineProperty(ny,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"UserRankView"}),tJ({},"VerticalMarquee",function(){return nw});var ng=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let nw=e=>{var{className:t="",children:r,duration:a}=e;return e6("div",Object.assign({className:`overflow-hidden ${t}`},ng(e,["className","children","duration"]),{children:e6("div",{className:"d-inline-block mw-100 mh-100 QSMqAq_scrollWrap",style:{"--duration":a},children:e6("div",{className:"d-inline-block QSMqAq_scrollItem",children:r})})}))};nw.displayName="VerticalMarquee";var nO={};tJ(nO,"ZodiacSigns",function(){return nx}),tJ(nO,"zodiacOf",function(){return nP}),tJ(nO,"ZodiacBar",function(){return nT});var nj=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let nx=["🐵","🐔","🐶","🐷","🐭","🐮","🐯","🐰","🐲","🐍","🐴","🐐"],nP=e=>nx[((e<0?e+1:e)%12+12)%12],nT=e=>{var{className:t="",itemClassName:r="border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center",startYear:a,endYear:n=new Date().getFullYear(),itemOf:i}=e;return e6("ol",Object.assign({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},nj(e,["className","itemClassName","startYear","endYear","itemOf"]),{children:Array.from({length:n-a+1},(e,t)=>{let a=n-t;if(0===a)return null;let o=nP(a),{link:l="#",title:s}=(null==i?void 0:i(a,o))||{};return e6("li",{className:r,children:tt("a",{className:"d-inline-block p-3 text-decoration-none text-center",href:l,children:[e6("div",{className:"fs-1",children:o}),s]})},a)})}))};nT.displayName="ZodiacBar";export{tQ as animate,rW as Avatar,rL as ClickBoundary,r_ as CodeBlock,rB as VariantColors,rY as text2color,rH as Countdown,r0 as DialogClose,r1 as Dialog,r9 as Editor,at as parser,ar as EditorHTML,ai as HorizontalMarquee,ao as HorizontalMarqueeBox,as as Icon,ac as LiveTSX,au as Loading,ag as MonthCalendar,aw as Nameplate,ap as OverlayBox,aN as PageNav,aD as ScrollNav,az as Option,aL as Select,aG as elementToImage,aV as ShareBox,aH as SpinnerButton,aJ as TableSpinner,a2 as TextTruncate,a9 as Time,nt as TimeDistance,na as Timeline,nc as Toast,nh as TypeEcho,ny as UserRankView,nw as VerticalMarquee,nx as ZodiacSigns,nP as zodiacOf,nT as ZodiacBar};
2
- //# sourceMappingURL=index.mjs.map
1
+ import e from"classnames";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";import{Component as i,PureComponent as a,createRef as o,isValidElement as s}from"react";import c from"@shikijs/langs/javascript";import l from"@shikijs/langs/jsx";import u from"@shikijs/langs/tsx";import d from"@shikijs/langs/typescript";import f from"@shikijs/themes/github-light";import p from"react-element-to-jsx-string";import{createHighlighterCoreSync as ee}from"shiki/core";import{createJavaScriptRegexEngine as te}from"shiki/engine/javascript";import{computed as m,observable as h}from"mobx";import{observer as g}from"mobx-react";import{ObservedComponent as _,reaction as ne}from"mobx-react-helper";import{Day as v,Second as re,Timestamp as ie,blobOf as ae,changeMonth as oe,diffTime as se,formatDate as y,makeArray as ce,scrollTo as le,sleep as ue,splitArray as de,uniqueID as b}from"web-utility";import{Defer as fe}from"iterable-observer";import{createReactEditorJS as pe}from"react-editor-js";import me from"editorjs-html";import{LiveEditor as he,LiveError as ge,LivePreview as _e,LiveProvider as ve}from"react-live";import{Badge as x,Button as S,Card as ye,Col as C,Dropdown as w,Image as T,Nav as E,OverlayTrigger as be,Popover as D,Row as xe,Spinner as O,Table as k,Toast as A,ToastContainer as Se,Tooltip as Ce}from"react-bootstrap";import we from"html2canvas";function Te(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}function Ee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function j(e,t){if(e==null)return{};var n,r,i=Ee(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function M(e){"@babel/helpers - typeof";return M=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},M(e)}function De(e,t){if(M(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(M(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Oe(e){var t=De(e,`string`);return M(t)==`symbol`?t:t+``}function N(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?P(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ke=[`className`,`style`,`size`],I=t=>{let{className:r,style:i,size:a=3}=t,o=j(t,ke);return n(`img`,F({className:e(`object-fit-cover rounded-circle`,r),style:F({width:`${a}rem`,height:`${a}rem`},i)},o))};I.displayName=`Avatar`;const Ae=[`children`,`onInnerClick`,`onOuterClick`];var je=class extends a{constructor(...e){super(...e),N(this,`root`,o()),N(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:r,onOuterClick:i}=e,a=j(e,Ae);return n(`div`,F(F({ref:this.root},a),{},{children:t}))}};const Me=[`className`,`language`,`children`],Ne=ee({themes:[f],langs:[c,l,d,u],engine:te()}),Pe=e=>{let{className:r=``,language:i,children:a}=e,o=j(e,Me),c=typeof a==`string`?a:p(s(a)?a:n(t,{children:a})),l=Ne.codeToHtml(c,{lang:i,theme:`github-light`,structure:`inline`});return n(`pre`,F(F({className:`m-0 language-${i} ${r}`},o),{},{children:n(`code`,{dangerouslySetInnerHTML:{__html:l},className:`language-${i}`})}))},L=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Fe(e,t=[]){let n=t[0]?L.filter(e=>!t.find(t=>t===e)):L;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}const Ie=[`className`,`itemClassName`,`units`,`endTime`,`onEnd`];var Le=@g class extends _{constructor(...e){super(...e),N(this,`timer`,0),N(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}@h accessor rest=0;get endTimestamp(){return+new Date(this.props.endTime||Date.now())}@m get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}@ne(e=>e.observedProps.endTime)initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,re)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:i=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:a,endTime:o,onEnd:s}=e,c=j(e,Ie),{timeSections:l}=this;return n(`ol`,F(F({className:`list-unstyled m-0 ${t}`},c),{},{children:l.map(({value:e,label:t})=>r(`li`,{className:i,children:[n(`strong`,{children:(e+``).padStart(2,`0`)}),n(`span`,{children:t})]},t))}))}};N(Le,`displayName`,`Countdown`);var Re=class extends Error{constructor(e=`Dialog closed`){super(e)}},ze=class{@h accessor input={};@h accessor defer;constructor(e){N(this,`Component`,void 0),this.Component=g(t=>n(e,F(F(F({},t),this.input),{},{defer:this.defer}))),this.Component.displayName=`DialogComponent`}open(e){return e&&(this.input=e),this.defer=new fe,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}};function Be(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function R(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Be(a,r,i,o,s,`next`,e)}function s(e){Be(a,r,i,o,s,`throw`,e)}o(void 0)})}}const Ve=[`name`,`required`,`children`],He=pe();var z=@g class extends i{constructor(...e){var t;super(...e),t=this,N(this,`core`,void 0),N(this,`save`,R(function*(){return t.core&&(t.innerValue=yield t.core.save())}))}@h accessor innerValue=this.props.defaultValue;render(){let e=this.props,{name:t,required:i,children:a}=e,o=j(e,Ve),{innerValue:s}=this;return r(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[n(`input`,{hidden:!0,name:t,required:i,value:JSON.stringify(s)}),n(He,F(F({},o),{},{onInitialize:e=>{var t;this.core=e,(t=o.onInitialize)==null||t.call(o,e)}}))]})}};N(z,`displayName`,`Editor`);const Ue=[`data`],B=me({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),V=e=>{let{data:t}=e,r=j(e,Ue);return n(`article`,F(F({},r),{},{dangerouslySetInnerHTML:{__html:B.parse(t)}}))};V.displayName=`EditorHTML`;const We=[`className`,`children`,`maxWidth`,`duration`,`height`],H=e=>{let{className:t=``,children:r,maxWidth:i=`100%`,duration:a,height:o}=e,s=j(e,We);return n(`div`,F(F({className:`overflow-hidden mw-100 ${t}`},s),{},{children:n(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:i,animationDuration:a,height:o,lineHeight:o},children:n(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:a},children:r})})}))},Ge=({children:e,maxWidth:t,duration:i,height:a})=>a?n(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:r(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[n(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),n(H,{duration:i,children:e})]})}):n(H,{maxWidth:t,duration:i,height:a,children:e});H.displayName=`HorizontalMarquee`;const Ke=[`className`,`style`,`name`,`size`],U=t=>{let{className:r,style:i,name:a,size:o}=t,s=j(t,Ke);return n(`span`,F({className:e(`bi-${a}`,r),style:F({fontSize:o&&`${o}rem`},i)},s))};U.displayName=`Icon`;const qe=({scope:e,children:i})=>{let a=s(i)?i:n(t,{children:i}),o=typeof i==`string`?i:p(a);return r(ve,{code:o,scope:e,language:`tsx`,children:[n(_e,{className:`mb-3`}),n(he,{}),n(ge,{className:`text-danger small p-2`})]})},Je=[`className`,`children`],W=e=>{let{className:t=``,children:i=`Loading...`}=e,a=j(e,Je);return r(`div`,F(F({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},a),{},{children:[n(O,{animation:`border`,variant:`success`}),n(`span`,{className:`ml-3 text-white`,children:i})]}))};W.displayName=`Loading`;const Ye=[`title`,`detail`,`children`],G=e=>{let{title:t,detail:i,children:a}=e,o=j(e,Ye);return n(be,F(F({},o),{},{overlay:i?r(D,{children:[n(D.Header,{children:t}),n(D.Body,{children:i})]}):n(Ce,{children:t}),children:a}))};G.displayName=`OverlayBox`;const Xe=[`style`,`variant`,`onChange`,`onSelect`];var K=@g class extends _{constructor(...t){super(...t),N(this,`renderDate`,t=>{let{variant:i=`primary`,value:a,onSelect:o}=this.observedProps,s=y(t,`YYYY-MM-DD`),c=a==null?void 0:a.filter(({date:e})=>y(e,`YYYY-MM-DD`)===s);return r(`td`,{className:e({"opacity-50":t.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===y(new Date,`YYYY-MM-DD`)}),children:[n(`time`,{className:`d-block`,dateTime:t.toJSON(),children:t.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:n(G,{title:e.content,children:n(x,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Fe(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},t+``)})}@m get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}@h accessor currentDate=new Date;@m get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*v);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*v));return de(t,7)}changeMonth(e){var t,n;this.currentDate=oe(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:i}=this,a=this.observedProps,{style:o,variant:s=`primary`,onChange:c,onSelect:l}=a,u=j(a,Xe);return r(k,F(F({},u),{},{style:F({tableLayout:`fixed`},o),children:[n(`caption`,{children:r(`div`,{className:`d-flex justify-content-between align-items-center`,children:[n(S,{variant:s,onClick:()=>this.changeMonth(-1),children:`<`}),y(t,`YYYY-MM`),n(S,{variant:s,onClick:()=>this.changeMonth(1),children:`>`})]})}),n(`thead`,{children:n(`tr`,{children:i[0].map((t,r,{length:i})=>n(`td`,{className:`bg-${s} text-white`,style:{width:`calc(100% / ${i})`},children:e.format(t)},r))})}),n(`tbody`,{children:i.map(e=>n(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}};N(K,`displayName`,`MonthCalendar`);const q=({avatar:e,name:i})=>r(t,{children:[n(I,{size:2,style:{marginRight:`0.5rem`},src:e}),n(`span`,{className:`align-middle`,children:i})]});q.displayName=`Nameplate`;const Ze=[`style`,`variant`],Qe=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;var J=@g class extends i{constructor(...e){super(...e),N(this,`updateScrollY`,()=>this.scrollY=window.scrollY),N(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>le(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),N(this,`renderLink`,({id:e,level:t,text:r,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&n(E.Item,{style:{textIndent:`${t-1}rem`},children:n(E.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:r,top:i}),children:r})},e)})}@h accessor list=[];@h accessor scrollY=0;@m get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(Qe),e=>{e.id||(e.id=b());let{id:t,tagName:n,textContent:r,offsetTop:i}=e;return{id:t,level:+n[1],text:r.trim(),top:i}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:e}=this,t=this.props,{style:r,variant:i=`underline`}=t,a=j(t,Ze);return n(E,F(F({},F(F({},a),{},{variant:i})),{},{style:F({flexDirection:`column`},r),children:e.map(this.renderLink)}))}};N(J,`displayName`,`PageNav`);const $e=[`className`,`children`];var Y=@g class extends i{constructor(...e){super(...e),N(this,`scrollerRef`,o()),N(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),N(this,`resizeObserver`,void 0),N(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}@h accessor scrollLeft=0;@h accessor scrollWidth=0;@h accessor clientWidth=0;@m get canScrollLeft(){return this.scrollLeft>0}@m get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,i=this.props,{className:a=``,children:o}=i,s=j(i,$e);return r(`div`,{className:`position-relative overflow-y-hidden ${a}`,children:[e&&n(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:n(U,{name:`caret-left-fill`})}),n(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:n(E,F(F({},s),{},{className:`flex-nowrap`,children:o}))}),t&&n(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:n(U,{name:`caret-right-fill`})})]})}};N(Y,`displayName`,`ScrollNav`);const et=[`value`,`children`],X=e=>{let{value:t,children:r}=e,i=j(e,et);return n(w.Item,F(F({},i),{},{"data-value":t,children:r}))};X.displayName=`Option`;const tt=({className:t,style:i,variant:a,menuVariant:o,children:c,value:l,onChange:u,valueRender:d})=>{let f=ce(c).flat(1/0).find(e=>s(e)&&e.type===X&&e.props.value===l);return r(w,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;u==null||u(n)},children:[n(w.Toggle,{className:e(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!a&&`bg-white text-dark`,t),style:i,variant:a,children:(d==null?void 0:d(l))||n(`div`,{className:f==null?void 0:f.props.className,children:f==null?void 0:f.props.children})}),n(w.Menu,{variant:o,children:c})]})};tt.displayName=`Select`;const nt=[`className`,`children`];function rt(e,t,n){return Z.apply(this,arguments)}function Z(){return Z=R(function*(e,t,n){let r=yield we(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))}),Z.apply(this,arguments)}var it=@g class extends i{constructor(...e){var t;super(...e),t=this,N(this,`root`,o()),N(this,`generateImage`,R(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield rt(t.root.current),t.loading=!1})),N(this,`share`,function(){var e=R(function*(e){var n,r;e.stopPropagation();let i=yield ae(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,F({files:[a]},t.props))});return function(t){return e.apply(this,arguments)}}())}@h accessor loading=!1;@h accessor imageURI=``;componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let e=this.props,{className:i=``,children:a}=e,o=j(e,nt),{loading:s,imageURI:c}=this;return r(t,{children:[s&&n(W,{}),r(`div`,F(F({},o),{},{ref:this.root,className:`position-relative ${i}`,onMouseEnter:c?void 0:this.generateImage,onTouchStart:c?void 0:this.generateImage,children:[a,c&&n(T,{className:`position-absolute start-0 top-0 w-100 h-100`,src:c,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}};N(it,`displayName`,`ShareBox`);const at=[`animation`,`loading`,`disabled`,`children`],ot=e=>{let{animation:i,loading:a,disabled:o,children:s}=e,c=j(e,at);return r(S,F(F({},c),{},{disabled:a||o,children:[a&&r(t,{children:[n(O,{as:`span`,className:s?`me-2`:``,size:`sm`,animation:i,role:`status`,"aria-hidden":`true`}),!s&&n(`span`,{className:`visually-hidden`,children:`Loading...`})]}),s]}))};ot.displayName=`SpinnerButton`;const st=[`animation`,`variant`,`size`,`colSpan`],ct=e=>{let{animation:t=`border`,variant:r=`primary`,size:i,colSpan:a}=e,o=j(e,st);return n(`tr`,F(F({},o),{},{children:n(`td`,{className:`text-center p-4`,colSpan:a,children:n(O,{animation:t,variant:r,size:i})})}))};ct.displayName=`TableSpinner`;const lt=[`children`,`rows`,`expandText`,`collapseText`];var ut=@g class extends i{constructor(...e){super(...e),N(this,`contentRef`,o()),N(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),N(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}@h accessor expanded=!1;@h accessor overflowed=!1;componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let e=this.props,{children:t,rows:i=3,expandText:a=`⏬`,collapseText:o=`⏫`}=e,s=j(e,lt),{expanded:c,overflowed:l}=this,u={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:i};return r(`div`,F(F({},s),{},{children:[n(`p`,{ref:this.contentRef,style:c?void 0:u,children:t}),(l||c)&&n(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":c,onClick:this.toggle,children:c?o:a})]}))}};N(ut,`displayName`,`TextTruncate`);const dt=[`dateTime`];var Q=@g class extends _{@ne(({observedProps:{dateTime:e,format:t}})=>e+t)updateText(){let{dateTime:e,format:t}=this.props;return y(e,t)}@h accessor timeText=this.updateText();componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,r=j(e,dt);return n(`time`,F(F({dateTime:new Date(t).toJSON()},r),{},{children:this.timeText}))}};N(Q,`displayName`,`Time`);const ft=[`date`,`unitWords`,`beforeWord`,`afterWord`],pt={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},mt=e=>{let{date:t,unitWords:n=pt,beforeWord:i=` before`,afterWord:a=` after`}=e,o=j(e,ft);t=new Date(t);let{distance:s,unit:c}=se(t);return r(`time`,F(F({},o),{},{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(s),` `,n[c],s<0?i:a]}))};mt.displayName=`TimeDistance`;const ht=[`className`,`events`,`timeFormat`],gt=e=>{let{className:t,events:i,timeFormat:a}=e,o=j(e,ht);return n(`ol`,F(F({className:`list-unstyled hsu__a_timeline ${t}`},o),{},{children:i.map(({title:e,summary:t,time:i,link:o,people:s})=>n(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:n(ye,{children:r(ye.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[n(`h3`,{className:`h5 m-0`,children:n(`a`,{className:`text-decoration-none stretched-link`,href:o,children:e})}),r(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,n(Q,{dateTime:i[0],format:a}),i[1]&&`~`,i[1]&&n(Q,{dateTime:i[1],format:a})]}),n(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(e=>n(`li`,{children:n(q,F({},e))},e.name))}),n(`p`,{className:`m-0`,children:t})]})})},e))}))};gt.displayName=`Timeline`;const _t=[`resolve`],vt=new Set([`warning`,`info`,`light`]);var yt=class{@h accessor messages=[];constructor(e=ie){this.TimeScalar=e,N(this,`Component`,g(({position:e=`top-end`})=>n(Se,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)}))),N(this,`renderMessage`,({id:e,openedAt:t,title:i,body:a,variant:o,delay:s=3e3})=>{let c=o&&!vt.has(o)?`text-white`:void 0,l=!!i||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return r(A,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&r(A.Header,{children:[n(`strong`,{className:`me-auto`,children:i}),n(`small`,{children:u})]}),n(A.Body,{className:c,children:a})]},e)}),this.Component.displayName=`ToastComponent`}open(e){let t=b(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,F(F({id:t},e),{},{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=j(t,_t);n==null||n(F(F({},r),{},{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}};const bt=[`className`,`text`];var xt=@g class extends i{constructor(...e){var t;super(...e),t=this,N(this,`init`,e=>e&&new IntersectionObserver(function(){var e=R(function*([{isIntersecting:e}],n){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield ue(i/1e3),t.echoed+=e});return function(t,n){return e.apply(this,arguments)}}()).observe(e))}@h accessor echoed=``;render(){let t=this.props,{className:r,text:i}=t,a=j(t,bt),{echoed:o}=this;return n(`pre`,F(F({},a),{},{ref:this.init,className:e(`text-wrap`,r),children:o+(o===i?``:`_`)}))}};N(xt,`displayName`,`TypeEcho`);const St=({email:e,website:t})=>r(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&n(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:n(U,{name:`envelope`})}),t&&n(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:n(U,{name:`globe2`})})]}),Ct=`X5DLia_image`,wt=[`className`,`title`,`rank`,`linkOf`];var $=class extends a{constructor(...e){super(...e),N(this,`renderMedal`,e=>{var t,i;return r(C,{as:`li`,children:[n(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Ct}`,children:n(T,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),r(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[r(`div`,{className:`position-relative`,children:[n(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),n(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(i=this.props).linkOf)==null?void 0:t.call(i,e))||`#`,children:e.name}),n(`strong`,{children:e.score})]}),n(St,F({},e))]})]},e.id)}),N(this,`renderRow`,(e,t,{length:i})=>{var a,o;return r(`tr`,{className:`position-relative`,children:[n(`td`,{className:`align-middle`,children:n(x,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((i+``).length,`0`)})}),r(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[n(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Ct}`,children:n(T,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),n(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((a=(o=this.props).linkOf)==null?void 0:a.call(o,e))||`#`,children:e.name})]}),n(`td`,{className:`align-middle`,children:e.score}),n(`td`,{className:`align-middle`,children:n(St,F({},e))})]},e.id)})}render(){let e=this.props,{className:t=``,title:i,rank:a=[],linkOf:o}=e,s=j(e,wt);return r(xe,F(F({className:`X5DLia_rankBox ${t}`},s),{},{children:[r(C,{sm:12,xs:12,lg:7,children:[r(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[r(`div`,{className:`X5DLia_medal`,children:[n(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),n(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),n(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),n(`h3`,{"data-text":i,className:`position-relative m-auto mb-0 fw-bold text-center`,children:i})]}),n(xe,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:a.slice(0,3).map(this.renderMedal)})]}),n(C,{xs:12,sm:12,lg:5,children:n(k,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:n(`tbody`,{children:a.slice(3,10).map(this.renderRow)})})})]}))}};N($,`displayName`,`UserRankView`);const Tt=[`className`,`children`,`duration`],Et=e=>{let{className:t=``,children:r,duration:i}=e,a=j(e,Tt);return n(`div`,F(F({className:`overflow-hidden ${t}`},a),{},{children:n(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":i},children:n(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:r})})}))};Et.displayName=`VerticalMarquee`;const Dt=[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`],Ot=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],kt=e=>{let t=e<0?e+1:e;return Ot[(t%12+12)%12]},At=e=>{let{className:t=``,itemClassName:i=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:a,endYear:o=new Date().getFullYear(),itemOf:s}=e,c=j(e,Dt);return n(`ol`,F(F({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},c),{},{children:Array.from({length:o-a+1},(e,t)=>{let a=o-t;if(a===0)return null;let c=kt(a),{link:l=`#`,title:u}=(s==null?void 0:s(a,c))||{};return n(`li`,{className:i,children:r(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:l,children:[n(`div`,{className:`fs-1`,children:c}),u]})},a)})}))};At.displayName=`ZodiacBar`;export{I as Avatar,je as ClickBoundary,Pe as CodeBlock,Le as Countdown,ze as Dialog,Re as DialogClose,z as Editor,V as EditorHTML,H as HorizontalMarquee,Ge as HorizontalMarqueeBox,U as Icon,qe as LiveTSX,W as Loading,K as MonthCalendar,q as Nameplate,X as Option,G as OverlayBox,J as PageNav,Y as ScrollNav,tt as Select,it as ShareBox,ot as SpinnerButton,ct as TableSpinner,ut as TextTruncate,Q as Time,mt as TimeDistance,gt as Timeline,yt as Toast,xt as TypeEcho,$ as UserRankView,L as VariantColors,Et as VerticalMarquee,At as ZodiacBar,Ot as ZodiacSigns,Te as animate,rt as elementToImage,B as parser,Fe as text2color,kt as zodiacOf};