idea-react 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +388 -0
- package/dist/index.d.ts +388 -430
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -2
- package/dist/style.css +403 -0
- package/package.json +21 -12
- package/source/CodeBlock.tsx +18 -7
- package/source/LiveTSX.tsx +0 -5
- package/tsconfig.json +1 -1
- package/tsdown.config.mts +34 -0
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/tsconfig.build.json +0 -11
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("@swc/helpers/_/_object_spread"),l=require("@swc/helpers/_/_object_without_properties"),u=require("react/jsx-runtime"),d=require("classnames");d=s(d);let f=require("@swc/helpers/_/_define_property"),p=require("@swc/helpers/_/_object_spread_props"),m=require("react"),ee=require("@shikijs/langs/javascript");ee=s(ee);let h=require("@shikijs/langs/jsx");h=s(h);let te=require("@shikijs/langs/tsx");te=s(te);let ne=require("@shikijs/langs/typescript");ne=s(ne);let re=require("@shikijs/themes/github-light");re=s(re);let g=require("react-element-to-jsx-string");g=s(g);let ie=require("shiki/core"),ae=require("shiki/engine/javascript"),_=require("@swc/helpers/_/_apply_decs_2203_r"),v=require("@swc/helpers/_/_class_private_field_get"),y=require("@swc/helpers/_/_class_private_field_init"),b=require("@swc/helpers/_/_class_private_field_set"),x=require("@swc/helpers/_/_identity"),S=require("mobx"),C=require("mobx-react"),w=require("mobx-react-helper"),T=require("web-utility"),oe=require("iterable-observer"),E=require("@swc/helpers/_/_async_to_generator"),se=require("react-editor-js"),ce=require("editorjs-html");ce=s(ce);let D=require("react-live"),O=require("react-bootstrap"),le=require("html2canvas");le=s(le);function ue(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)}const de=e=>{let{className:t,style:n,size:r=3}=e,i=(0,l._)(e,[`className`,`style`,`size`]);return(0,u.jsx)(`img`,(0,c._)({className:(0,d.default)(`object-fit-cover rounded-circle`,t),style:(0,c._)({width:`${r}rem`,height:`${r}rem`},n)},i))};de.displayName=`Avatar`;var fe=class extends m.PureComponent{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=(0,l._)(e,[`children`,`onInnerClick`,`onOuterClick`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({ref:this.root},i),{children:t}))}constructor(...e){super(...e),(0,f._)(this,`root`,(0,m.createRef)()),(0,f._)(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)})}};const pe=(0,ie.createHighlighterCoreSync)({themes:[re.default],langs:[ee.default,h.default,ne.default,te.default],engine:(0,ae.createJavaScriptRegexEngine)()}),me=e=>{let{className:t=``,language:n,children:r}=e,i=(0,l._)(e,[`className`,`language`,`children`]),a=typeof r==`string`?r:(0,g.default)((0,m.isValidElement)(r)?r:(0,u.jsx)(u.Fragment,{children:r})),o=pe.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,u.jsx)(`pre`,(0,p._)((0,c._)({className:`m-0 language-${n} ${t}`},i),{children:(0,u.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},he=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function ge(e,t=[]){let n=t[0]?he.filter(e=>!t.find(t=>t===e)):he;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let _e;var k,ve,ye,be,xe,Se=(0,w.reaction)(e=>e.observedProps.endTime),Ce,we;let Te;new(_e=(k=new WeakMap,ve=class extends (xe=w.ObservedComponent){get rest(){return(0,v._)(this,k)}set rest(e){(0,b._)(this,k,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}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()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,T.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=(0,l._)(e,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:s}=this;return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled m-0 ${t}`},o),{children:s.map(({value:e,label:t})=>(0,u.jsxs)(`li`,{className:n,children:[(0,u.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,u.jsx)(`span`,{children:t})]},t))}))}constructor(...e){super(...e),(0,y._)(this,k,{writable:!0,value:(we(this),Ce(this,0))}),(0,f._)(this,`timer`,0),(0,f._)(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))})}},{e:[Ce,we],c:[Te,be]}=(0,_._)(ve,[[S.observable,1,`rest`],[S.computed,3,`timeSections`],[Se,2,`initTimer`]],[C.observer],xe),ve),ye=class extends x._{constructor(){super(Te),(0,f._)(this,`displayName`,`Countdown`),be()}},(0,f._)(ye,_e,void 0),ye);var Ee,De,Oe,ke=class extends Error{constructor(e=`Dialog closed`){super(e)}},Ae=new WeakMap,je=new WeakMap,Me=class{get input(){return(0,v._)(this,Ae)}set input(e){(0,b._)(this,Ae,e)}get defer(){return(0,v._)(this,je)}set defer(e){(0,b._)(this,je,e)}open(e){return e&&(this.input=e),this.defer=new oe.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(e){(0,y._)(this,Ae,{writable:!0,value:(Oe(this),Ee(this,{}))}),(0,y._)(this,je,{writable:!0,value:De(this)}),(0,f._)(this,`Component`,void 0),this.Component=(0,C.observer)(t=>(0,u.jsx)(e,(0,p._)((0,c._)({},t,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[Ee,De,Oe]}=(0,_._)(Me,[[S.observable,1,`input`],[S.observable,1,`defer`]],[]));let Ne;var A,Pe,Fe,Ie,Le,Re,ze;const Be=(0,se.createReactEditorJS)();let Ve;new(Ne=(A=new WeakMap,Pe=class extends (Le=m.Component){get innerValue(){return(0,v._)(this,A)}set innerValue(e){(0,b._)(this,A,e)}render(){let e=this.props,{name:t,required:n,children:r}=e,i=(0,l._)(e,[`name`,`required`,`children`]),{innerValue:a}=this;return(0,u.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,u.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,u.jsx)(Be,(0,p._)((0,c._)({},i),{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`core`,void 0),(0,y._)(this,A,{writable:!0,value:(ze(this),Re(this,this.props.defaultValue))}),(0,f._)(this,`save`,()=>(0,E._)(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Re,ze],c:[Ve,Ie]}=(0,_._)(Pe,[[S.observable,1,`innerValue`]],[C.observer],Le),Pe),Fe=class extends x._{constructor(){super(Ve),(0,f._)(this,`displayName`,`Editor`),Ie()}},(0,f._)(Fe,Ne,void 0),Fe);const He=(0,ce.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Ue=e=>{let{data:t}=e,n=(0,l._)(e,[`data`]);return(0,u.jsx)(`article`,(0,p._)((0,c._)({},n),{dangerouslySetInnerHTML:{__html:He.parse(t)}}))};Ue.displayName=`EditorHTML`;const j=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=(0,l._)(e,[`className`,`children`,`maxWidth`,`duration`,`height`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden mw-100 ${t}`},o),{children:(0,u.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,u.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},We=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,u.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,u.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,u.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,u.jsx)(j,{duration:n,children:e})]})}):(0,u.jsx)(j,{maxWidth:t,duration:n,height:r,children:e});j.displayName=`HorizontalMarquee`;const M=e=>{let{className:t,style:n,name:r,size:i}=e,a=(0,l._)(e,[`className`,`style`,`name`,`size`]);return(0,u.jsx)(`span`,(0,c._)({className:(0,d.default)(`bi-${r}`,t),style:(0,c._)({fontSize:i&&`${i}rem`},n)},a))};M.displayName=`Icon`;const Ge=({scope:e,children:t})=>{let n=typeof t==`string`?t:(0,g.default)((0,m.isValidElement)(t)?t:(0,u.jsx)(u.Fragment,{children:t}));return(0,u.jsxs)(D.LiveProvider,{code:n,scope:e,language:`tsx`,children:[(0,u.jsx)(D.LivePreview,{className:`mb-3`}),(0,u.jsx)(D.LiveEditor,{}),(0,u.jsx)(D.LiveError,{className:`text-danger small p-2`})]})},N=e=>{let{className:t=``,children:n=`Loading...`}=e,r=(0,l._)(e,[`className`,`children`]);return(0,u.jsxs)(`div`,(0,p._)((0,c._)({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{children:[(0,u.jsx)(O.Spinner,{animation:`border`,variant:`success`}),(0,u.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};N.displayName=`Loading`;const P=e=>{let{title:t,detail:n,children:r}=e,i=(0,l._)(e,[`title`,`detail`,`children`]);return(0,u.jsx)(O.OverlayTrigger,(0,p._)((0,c._)({},i),{overlay:n?(0,u.jsxs)(O.Popover,{children:[(0,u.jsx)(O.Popover.Header,{children:t}),(0,u.jsx)(O.Popover.Body,{children:n})]}):(0,u.jsx)(O.Tooltip,{children:t}),children:r}))};P.displayName=`OverlayBox`;let Ke;var F,I,L,qe,Je,Ye,Xe;let R;new(Ke=(F=new WeakMap,I=class extends (Je=w.ObservedComponent){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return(0,v._)(this,F)}set currentDate(e){(0,b._)(this,F,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*T.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*T.Day));return(0,T.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,T.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,d=(0,l._)(r,[`style`,`variant`,`onChange`,`onSelect`]);return(0,u.jsxs)(O.Table,(0,p._)((0,c._)({},d),{style:(0,c._)({tableLayout:`fixed`},i),children:[(0,u.jsx)(`caption`,{children:(0,u.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,T.formatDate)(t,`YYYY-MM`),(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,u.jsx)(`thead`,{children:(0,u.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,u.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,u.jsx)(`tbody`,{children:n.map(e=>(0,u.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),(0,y._)(this,F,{writable:!0,value:(Xe(this),Ye(this,new Date))}),(0,f._)(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,T.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,T.formatDate)(e,`YYYY-MM-DD`)===i);return(0,u.jsxs)(`td`,{className:(0,d.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,T.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,u.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,u.jsx)(P,{title:e.content,children:(0,u.jsx)(O.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:ge(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Ye,Xe],c:[R,qe]}=(0,_._)(I,[[S.computed,3,`weekFormatter`],[S.observable,1,`currentDate`],[S.computed,3,`dateGrid`]],[C.observer],Je),I),L=class extends x._{constructor(){super(R),(0,f._)(this,`displayName`,`MonthCalendar`),qe()}},(0,f._)(L,Ke,void 0),L);const z=({avatar:e,name:t})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(de,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,u.jsx)(`span`,{className:`align-middle`,children:t})]});z.displayName=`Nameplate`;let Ze;var B,V,Qe,$e,et,tt,nt,rt,it;const at=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let ot;new(Ze=(B=new WeakMap,V=new WeakMap,Qe=class extends (tt=m.Component){get list(){return(0,v._)(this,B)}set list(e){(0,b._)(this,B,e)}get scrollY(){return(0,v._)(this,V)}set scrollY(e){(0,b._)(this,V,e)}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(at),e=>{var t;(t=e).id||(t.id=(0,T.uniqueID)());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}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=(0,l._)(t,[`style`,`variant`]);return(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},i),{variant:r,style:(0,c._)({flexDirection:`column`},n),children:e.map(this.renderLink)}))}constructor(...e){super(...e),(0,y._)(this,B,{writable:!0,value:(it(this),nt(this,[]))}),(0,y._)(this,V,{writable:!0,value:rt(this,0)}),(0,f._)(this,`updateScrollY`,()=>this.scrollY=window.scrollY),(0,f._)(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,T.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),(0,f._)(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,u.jsx)(O.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,u.jsx)(O.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}},{e:[nt,rt,it],c:[ot,et]}=(0,_._)(Qe,[[S.observable,1,`list`],[S.observable,1,`scrollY`],[S.computed,3,`currentActiveId`]],[C.observer],tt),Qe),$e=class extends x._{constructor(){super(ot),(0,f._)(this,`displayName`,`PageNav`),et()}},(0,f._)($e,Ze,void 0),$e);let st;var H,U,W,ct,lt,ut,dt,ft,pt,mt,ht;let gt;new(st=(H=new WeakMap,U=new WeakMap,W=new WeakMap,ct=class extends (dt=m.Component){get scrollLeft(){return(0,v._)(this,H)}set scrollLeft(e){(0,b._)(this,H,e)}get scrollWidth(){return(0,v._)(this,U)}set scrollWidth(e){(0,b._)(this,U,e)}get clientWidth(){return(0,v._)(this,W)}set clientWidth(e){(0,b._)(this,W,e)}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;(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=(0,l._)(n,[`className`,`children`]);return(0,u.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,u.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,u.jsx)(M,{name:`caret-left-fill`})}),(0,u.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},a),{className:`flex-nowrap`,children:i}))}),t&&(0,u.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,u.jsx)(M,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),(0,f._)(this,`scrollerRef`,(ht(this),(0,m.createRef)())),(0,y._)(this,H,{writable:!0,value:ft(this,0)}),(0,y._)(this,U,{writable:!0,value:pt(this,0)}),(0,y._)(this,W,{writable:!0,value:mt(this,0)}),(0,f._)(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),(0,f._)(this,`resizeObserver`,void 0),(0,f._)(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[ft,pt,mt,ht],c:[gt,ut]}=(0,_._)(ct,[[S.observable,1,`scrollLeft`],[S.observable,1,`scrollWidth`],[S.observable,1,`clientWidth`],[S.computed,3,`canScrollLeft`],[S.computed,3,`canScrollRight`]],[C.observer],dt),ct),lt=class extends x._{constructor(){super(gt),(0,f._)(this,`displayName`,`ScrollNav`),ut()}},(0,f._)(lt,st,void 0),lt);const _t=e=>{let{value:t,children:n}=e,r=(0,l._)(e,[`value`,`children`]);return(0,u.jsx)(O.Dropdown.Item,(0,p._)((0,c._)({},r),{"data-value":t,children:n}))};_t.displayName=`Option`;const vt=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let c=(0,T.makeArray)(i).flat(1/0).find(e=>(0,m.isValidElement)(e)&&e.type===_t&&e.props.value===a);return(0,u.jsxs)(O.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,u.jsx)(O.Dropdown.Toggle,{className:(0,d.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,u.jsx)(`div`,{className:c==null?void 0:c.props.className,children:c==null?void 0:c.props.children})}),(0,u.jsx)(O.Dropdown.Menu,{variant:r,children:i})]})};vt.displayName=`Select`;let yt;var G,K,bt,xt,St,Ct,wt,Tt,Et;function Dt(e,t,n){return(0,E._)(function*(){let r=yield(0,le.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let Ot;new(yt=(G=new WeakMap,K=new WeakMap,bt=class extends (Ct=m.Component){get loading(){return(0,v._)(this,G)}set loading(e){(0,b._)(this,G,e)}get imageURI(){return(0,v._)(this,K)}set imageURI(e){(0,b._)(this,K,e)}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=(0,l._)(e,[`className`,`children`]),{loading:i,imageURI:a}=this;return(0,u.jsxs)(u.Fragment,{children:[i&&(0,u.jsx)(N,{}),(0,u.jsxs)(`div`,(0,p._)((0,c._)({},r),{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,u.jsx)(O.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`root`,(Et(this),(0,m.createRef)())),(0,y._)(this,G,{writable:!0,value:wt(this,!1)}),(0,y._)(this,K,{writable:!0,value:Tt(this,``)}),(0,f._)(this,`generateImage`,()=>(0,E._)(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield Dt(t.root.current),t.loading=!1})()),(0,f._)(this,`share`,e=>(0,E._)(function*(){var n,r;e.stopPropagation();let i=yield(0,T.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,(0,c._)({files:[a]},t.props))})())}},{e:[wt,Tt,Et],c:[Ot,St]}=(0,_._)(bt,[[S.observable,1,`loading`],[S.observable,1,`imageURI`]],[C.observer],Ct),bt),xt=class extends x._{constructor(){super(Ot),(0,f._)(this,`displayName`,`ShareBox`),St()}},(0,f._)(xt,yt,void 0),xt);const kt=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=(0,l._)(e,[`animation`,`loading`,`disabled`,`children`]);return(0,u.jsxs)(O.Button,(0,p._)((0,c._)({},a),{disabled:n||r,children:[n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(O.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,u.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};kt.displayName=`SpinnerButton`;const At=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=(0,l._)(e,[`animation`,`variant`,`size`,`colSpan`]);return(0,u.jsx)(`tr`,(0,p._)((0,c._)({},a),{children:(0,u.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,u.jsx)(O.Spinner,{animation:t,variant:n,size:r})})}))};At.displayName=`TableSpinner`;let jt;var q,J,Y,Mt,Nt,Pt,Ft,It,Lt;let Rt;new(jt=(q=new WeakMap,J=new WeakMap,Y=class extends (Pt=m.Component){get expanded(){return(0,v._)(this,q)}set expanded(e){(0,b._)(this,q,e)}get overflowed(){return(0,v._)(this,J)}set overflowed(e){(0,b._)(this,J,e)}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=(0,l._)(e,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:o,overflowed:s}=this,d={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,u.jsxs)(`div`,(0,p._)((0,c._)({},a),{children:[(0,u.jsx)(`p`,{ref:this.contentRef,style:o?void 0:d,children:t}),(s||o)&&(0,u.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}constructor(...e){super(...e),(0,y._)(this,q,{writable:!0,value:(Lt(this),Ft(this,!1))}),(0,y._)(this,J,{writable:!0,value:It(this,!1)}),(0,f._)(this,`contentRef`,(0,m.createRef)()),(0,f._)(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),(0,f._)(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Ft,It,Lt],c:[Rt,Nt]}=(0,_._)(Y,[[S.observable,1,`expanded`],[S.observable,1,`overflowed`]],[C.observer],Pt),Y),Mt=class extends x._{constructor(){super(Rt),(0,f._)(this,`displayName`,`TextTruncate`),Nt()}},(0,f._)(Mt,jt,void 0),Mt);let zt;var X,Bt,Vt,Ht,Ut,Wt=(0,w.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t),Gt,Kt;let Z;new(zt=(X=new WeakMap,Bt=class extends (Ut=w.ObservedComponent){updateText(){let{dateTime:e,format:t}=this.props;return(0,T.formatDate)(e,t)}get timeText(){return(0,v._)(this,X)}set timeText(e){(0,b._)(this,X,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=(0,l._)(e,[`dateTime`]);return(0,u.jsx)(`time`,(0,p._)((0,c._)({dateTime:new Date(t).toJSON()},n),{children:this.timeText}))}constructor(...e){super(...e),(0,y._)(this,X,{writable:!0,value:(Kt(this),Gt(this,this.updateText()))})}},{e:[Gt,Kt],c:[Z,Ht]}=(0,_._)(Bt,[[Wt,2,`updateText`],[S.observable,1,`timeText`]],[C.observer],Ut),Bt),Vt=class extends x._{constructor(){super(Z),(0,f._)(this,`displayName`,`Time`),Ht()}},(0,f._)(Vt,zt,void 0),Vt);const qt={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Jt=e=>{let{date:t,unitWords:n=qt,beforeWord:r=` before`,afterWord:i=` after`}=e,a=(0,l._)(e,[`date`,`unitWords`,`beforeWord`,`afterWord`]);t=new Date(t);let{distance:o,unit:s}=(0,T.diffTime)(t);return(0,u.jsxs)(`time`,(0,p._)((0,c._)({},a),{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};Jt.displayName=`TimeDistance`;const Yt=e=>{let{className:t,events:n,timeFormat:r}=e,i=(0,l._)(e,[`className`,`events`,`timeFormat`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled hsu__a_timeline ${t}`},i),{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,u.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,u.jsx)(O.Card,{children:(0,u.jsxs)(O.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,u.jsx)(`h3`,{className:`h5 m-0`,children:(0,u.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,u.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,u.jsx)(Z,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,u.jsx)(Z,{dateTime:n[1],format:r})]}),(0,u.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,u.jsx)(`li`,{children:(0,u.jsx)(z,(0,c._)({},e))},e.name))}),(0,u.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};Yt.displayName=`Timeline`;var Xt,Zt;const Qt=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,$t=class{get messages(){return(0,v._)(this,Q)}set messages(e){(0,b._)(this,Q,e)}open(e){let t=(0,T.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,(0,p._)((0,c._)({id:t},e),{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=(0,l._)(t,[`resolve`]);n==null||n((0,p._)((0,c._)({},r),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}constructor(e=T.Timestamp){(0,f._)(this,`TimeScalar`,void 0),(0,y._)(this,Q,{writable:!0,value:void 0}),(0,f._)(this,`Component`,void 0),(0,f._)(this,`renderMessage`,void 0),this.TimeScalar=e,(0,b._)(this,Q,(Zt(this),Xt(this,[]))),this.Component=(0,C.observer)(({position:e=`top-end`})=>(0,u.jsx)(O.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!Qt.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,u.jsxs)(O.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,u.jsxs)(O.Toast.Header,{children:[(0,u.jsx)(`strong`,{className:`me-auto`,children:n}),(0,u.jsx)(`small`,{children:c})]}),(0,u.jsx)(O.Toast.Body,{className:o,children:r})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Xt,Zt]}=(0,_._)($t,[[S.observable,1,`messages`]],[]));let en;var $,tn,nn,rn,an,on,sn;let cn;new(en=($=new WeakMap,tn=class extends (an=m.Component){get echoed(){return(0,v._)(this,$)}set echoed(e){(0,b._)(this,$,e)}render(){let e=this.props,{className:t,text:n}=e,r=(0,l._)(e,[`className`,`text`]),{echoed:i}=this;return(0,u.jsx)(`pre`,(0,p._)((0,c._)({},r),{ref:this.init,className:(0,d.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}constructor(...e){var t;super(...e),t=this,(0,y._)(this,$,{writable:!0,value:(sn(this),on(this,``))}),(0,f._)(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>(0,E._)(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,T.sleep)(i/1e3),t.echoed+=e})()).observe(e))}},{e:[on,sn],c:[cn,rn]}=(0,_._)(tn,[[S.observable,1,`echoed`]],[C.observer],an),tn),nn=class extends x._{constructor(){super(cn),(0,f._)(this,`displayName`,`TypeEcho`),rn()}},(0,f._)(nn,en,void 0),nn);const ln=({email:e,website:t})=>(0,u.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,u.jsx)(M,{name:`envelope`})}),t&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,u.jsx)(M,{name:`globe2`})})]}),un=`X5DLia_image`;var dn=class extends m.PureComponent{render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=(0,l._)(e,[`className`,`title`,`rank`,`linkOf`]);return(0,u.jsxs)(O.Row,(0,p._)((0,c._)({className:`X5DLia_rankBox ${t}`},a),{children:[(0,u.jsxs)(O.Col,{sm:12,xs:12,lg:7,children:[(0,u.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,u.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,u.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,u.jsx)(O.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,u.jsx)(O.Col,{xs:12,sm:12,lg:5,children:(0,u.jsx)(O.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,u.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}constructor(...e){super(...e),(0,f._)(this,`renderMedal`,e=>{var t,n;return(0,u.jsxs)(O.Col,{as:`li`,children:[(0,u.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,u.jsxs)(`div`,{className:`position-relative`,children:[(0,u.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,u.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,u.jsx)(`strong`,{children:e.score})]}),(0,u.jsx)(ln,(0,c._)({},e))]})]},e.id)}),(0,f._)(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,u.jsxs)(`tr`,{className:`position-relative`,children:[(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(O.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,u.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,u.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.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,u.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(ln,(0,c._)({},e))})]},e.id)})}};(0,f._)(dn,`displayName`,`UserRankView`);const fn=e=>{let{className:t=``,children:n,duration:r}=e,i=(0,l._)(e,[`className`,`children`,`duration`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden ${t}`},i),{children:(0,u.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,u.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};fn.displayName=`VerticalMarquee`;const pn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],mn=e=>{let t=e<0?e+1:e;return pn[(t%12+12)%12]},hn=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=(0,l._)(e,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({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=mn(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,u.jsx)(`li`,{className:n,children:(0,u.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,u.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};hn.displayName=`ZodiacBar`,exports.Avatar=de,exports.ClickBoundary=fe,exports.CodeBlock=me,Object.defineProperty(exports,"Countdown",{enumerable:!0,get:function(){return Te}}),exports.Dialog=Me,exports.DialogClose=ke,Object.defineProperty(exports,"Editor",{enumerable:!0,get:function(){return Ve}}),exports.EditorHTML=Ue,exports.HorizontalMarquee=j,exports.HorizontalMarqueeBox=We,exports.Icon=M,exports.LiveTSX=Ge,exports.Loading=N,Object.defineProperty(exports,"MonthCalendar",{enumerable:!0,get:function(){return R}}),exports.Nameplate=z,exports.Option=_t,exports.OverlayBox=P,Object.defineProperty(exports,"PageNav",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"ScrollNav",{enumerable:!0,get:function(){return gt}}),exports.Select=vt,Object.defineProperty(exports,"ShareBox",{enumerable:!0,get:function(){return Ot}}),exports.SpinnerButton=kt,exports.TableSpinner=At,Object.defineProperty(exports,"TextTruncate",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"Time",{enumerable:!0,get:function(){return Z}}),exports.TimeDistance=Jt,exports.Timeline=Yt,exports.Toast=$t,Object.defineProperty(exports,"TypeEcho",{enumerable:!0,get:function(){return cn}}),exports.UserRankView=dn,exports.VariantColors=he,exports.VerticalMarquee=fn,exports.ZodiacBar=hn,exports.ZodiacSigns=pn,exports.animate=ue,exports.elementToImage=Dt,exports.parser=He,exports.text2color=ge,exports.zodiacOf=mn;
|
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{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_define_property";import{_ as s}from"@swc/helpers/_/_object_spread_props";import{Component as c,PureComponent as l,createRef as u,isValidElement as d}from"react";import f from"@shikijs/langs/javascript";import ee from"@shikijs/langs/jsx";import te from"@shikijs/langs/tsx";import ne from"@shikijs/langs/typescript";import re from"@shikijs/themes/github-light";import ie from"react-element-to-jsx-string";import{createHighlighterCoreSync as ae}from"shiki/core";import{createJavaScriptRegexEngine as oe}from"shiki/engine/javascript";import{_ as p}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as m}from"@swc/helpers/_/_class_private_field_get";import{_ as h}from"@swc/helpers/_/_class_private_field_init";import{_ as g}from"@swc/helpers/_/_class_private_field_set";import{_}from"@swc/helpers/_/_identity";import{computed as v,observable as y}from"mobx";import{observer as b}from"mobx-react";import{ObservedComponent as x,reaction as se}from"mobx-react-helper";import{Day as ce,Second as le,Timestamp as ue,blobOf as de,changeMonth as fe,diffTime as pe,formatDate as S,makeArray as me,scrollTo as he,sleep as ge,splitArray as _e,uniqueID as ve}from"web-utility";import{Defer as ye}from"iterable-observer";import{_ as C}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as be}from"react-editor-js";import xe from"editorjs-html";import{LiveEditor as Se,LiveError as Ce,LivePreview as we,LiveProvider as Te}from"react-live";import{Badge as Ee,Button as De,Card as Oe,Col as ke,Dropdown as w,Image as Ae,Nav as T,OverlayTrigger as je,Popover as Me,Row as Ne,Spinner as Pe,Table as Fe,Toast as E,ToastContainer as Ie,Tooltip as Le}from"react-bootstrap";import Re from"html2canvas";function ze(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)}const D=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};D.displayName=`Avatar`;var Be=class extends l{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:o}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return r(`div`,s(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),o(this,`root`,u()),o(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)})}};const Ve=ae({themes:[re],langs:[f,ee,ne,te],engine:oe()}),He=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:ie(d(c)?c:r(n,{children:c})),f=Ve.codeToHtml(u,{lang:o,theme:`github-light`,structure:`inline`});return r(`pre`,s(e({className:`m-0 language-${o} ${a}`},l),{children:r(`code`,{dangerouslySetInnerHTML:{__html:f},className:`language-${o}`})}))},O=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Ue(e,t=[]){let n=t[0]?O.filter(e=>!t.find(t=>t===e)):O;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let We;var k,Ge,Ke,qe,Je,Ye=se(e=>e.observedProps.endTime),Xe,Ze;let Qe;new(We=(k=new WeakMap,Ge=class extends (Je=x){get rest(){return m(this,k)}set rest(e){g(this,k,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}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()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,le)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=n,d=t(n,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return r(`ol`,s(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>i(`li`,{className:o,children:[r(`strong`,{children:(e+``).padStart(2,`0`)}),r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),h(this,k,{writable:!0,value:(Ze(this),Xe(this,0))}),o(this,`timer`,0),o(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))})}},{e:[Xe,Ze],c:[Qe,qe]}=p(Ge,[[y,1,`rest`],[v,3,`timeSections`],[Ye,2,`initTimer`]],[b],Je),Ge),Ke=class extends _{constructor(){super(Qe),o(this,`displayName`,`Countdown`),qe()}},o(Ke,We,void 0),Ke);var $e,et,tt,nt=class extends Error{constructor(e=`Dialog closed`){super(e)}},rt=new WeakMap,it=new WeakMap,at=class{get input(){return m(this,rt)}set input(e){g(this,rt,e)}get defer(){return m(this,it)}set defer(e){g(this,it,e)}open(e){return e&&(this.input=e),this.defer=new ye,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){h(this,rt,{writable:!0,value:(tt(this),$e(this,{}))}),h(this,it,{writable:!0,value:et(this)}),o(this,`Component`,void 0),this.Component=b(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[$e,et,tt]}=p(at,[[y,1,`input`],[y,1,`defer`]],[]));let ot;var A,st,ct,lt,ut,dt,ft;const pt=be();let mt;new(ot=(A=new WeakMap,st=class extends (ut=c){get innerValue(){return m(this,A)}set innerValue(e){g(this,A,e)}render(){let n=this.props,{name:a,required:o,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[r(`input`,{hidden:!0,name:a,required:o,value:JSON.stringify(u)}),r(pt,s(e({},l),{onInitialize:e=>{var t;this.core=e,(t=l.onInitialize)==null||t.call(l,e)}}))]})}constructor(...e){var t;super(...e),t=this,o(this,`core`,void 0),h(this,A,{writable:!0,value:(ft(this),dt(this,this.props.defaultValue))}),o(this,`save`,()=>C(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[dt,ft],c:[mt,lt]}=p(st,[[y,1,`innerValue`]],[b],ut),st),ct=class extends _{constructor(){super(mt),o(this,`displayName`,`Editor`),lt()}},o(ct,ot,void 0),ct);const ht=xe({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),gt=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:ht.parse(i)}}))};gt.displayName=`EditorHTML`;const j=n=>{let{className:i=``,children:a,maxWidth:o=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return r(`div`,s(e({className:`overflow-hidden mw-100 ${i}`},u),{children:r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:o,animationDuration:c,height:l,lineHeight:l},children:r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},_t=({children:e,maxWidth:t,duration:n,height:a})=>a?r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),r(j,{duration:n,children:e})]})}):r(j,{maxWidth:t,duration:n,height:a,children:e});j.displayName=`HorizontalMarquee`;const M=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};M.displayName=`Icon`;const vt=({scope:e,children:t})=>{let a=typeof t==`string`?t:ie(d(t)?t:r(n,{children:t}));return i(Te,{code:a,scope:e,language:`tsx`,children:[r(we,{className:`mb-3`}),r(Se,{}),r(Ce,{className:`text-danger small p-2`})]})},N=n=>{let{className:a=``,children:o=`Loading...`}=n,c=t(n,[`className`,`children`]);return i(`div`,s(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[r(Pe,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};N.displayName=`Loading`;const P=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(je,s(e({},l),{overlay:o?i(Me,{children:[r(Me.Header,{children:a}),r(Me.Body,{children:o})]}):r(Le,{children:a}),children:c}))};P.displayName=`OverlayBox`;let yt;var F,I,L,bt,xt,St,Ct;let R;new(yt=(F=new WeakMap,I=class extends (xt=x){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return m(this,F)}set currentDate(e){g(this,F,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*ce);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ce));return _e(t,7)}changeMonth(e){var t,n;this.currentDate=fe(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:o}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,ee=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return i(Fe,s(e({},ee),{style:e({tableLayout:`fixed`},l),children:[r(`caption`,{children:i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[r(De,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),S(a,`YYYY-MM`),r(De,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),r(`thead`,{children:r(`tr`,{children:o[0].map((e,t,{length:i})=>r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),r(`tbody`,{children:o.map(e=>r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),h(this,F,{writable:!0,value:(Ct(this),St(this,new Date))}),o(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=S(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>S(e,`YYYY-MM-DD`)===s);return i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===S(new Date,`YYYY-MM-DD`)}),children:[r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:r(P,{title:e.content,children:r(Ee,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Ue(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[St,Ct],c:[R,bt]}=p(I,[[v,3,`weekFormatter`],[y,1,`currentDate`],[v,3,`dateGrid`]],[b],xt),I),L=class extends _{constructor(){super(R),o(this,`displayName`,`MonthCalendar`),bt()}},o(L,yt,void 0),L);const z=({avatar:e,name:t})=>i(n,{children:[r(D,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});z.displayName=`Nameplate`;let wt;var B,V,Tt,Et,Dt,Ot,kt,At,jt;const Mt=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Nt;new(wt=(B=new WeakMap,V=new WeakMap,Tt=class extends (Ot=c){get list(){return m(this,B)}set list(e){g(this,B,e)}get scrollY(){return m(this,V)}set scrollY(e){g(this,V,e)}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(Mt),e=>{var t;(t=e).id||(t.id=ve());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:n}=this,i=this.props,{style:a,variant:o=`underline`}=i,c=t(i,[`style`,`variant`]);return r(T,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),h(this,B,{writable:!0,value:(jt(this),kt(this,[]))}),h(this,V,{writable:!0,value:At(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>he(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),o(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&r(T.Item,{style:{textIndent:`${t-1}rem`},children:r(T.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[kt,At,jt],c:[Nt,Dt]}=p(Tt,[[y,1,`list`],[y,1,`scrollY`],[v,3,`currentActiveId`]],[b],Ot),Tt),Et=class extends _{constructor(){super(Nt),o(this,`displayName`,`PageNav`),Dt()}},o(Et,wt,void 0),Et);let Pt;var H,U,W,Ft,It,Lt,Rt,zt,Bt,Vt,Ht;let G;new(Pt=(H=new WeakMap,U=new WeakMap,W=new WeakMap,Ft=class extends (Rt=c){get scrollLeft(){return m(this,H)}set scrollLeft(e){g(this,H,e)}get scrollWidth(){return m(this,U)}set scrollWidth(e){g(this,U,e)}get clientWidth(){return m(this,W)}set clientWidth(e){g(this,W,e)}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;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:n,canScrollRight:a}=this,o=this.props,{className:c=``,children:l}=o,u=t(o,[`className`,`children`]);return i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&r(`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:r(M,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(T,s(e({},u),{className:`flex-nowrap`,children:l}))}),a&&r(`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:r(M,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(Ht(this),u())),h(this,H,{writable:!0,value:zt(this,0)}),h(this,U,{writable:!0,value:Bt(this,0)}),h(this,W,{writable:!0,value:Vt(this,0)}),o(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),o(this,`resizeObserver`,void 0),o(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[zt,Bt,Vt,Ht],c:[G,Lt]}=p(Ft,[[y,1,`scrollLeft`],[y,1,`scrollWidth`],[y,1,`clientWidth`],[v,3,`canScrollLeft`],[v,3,`canScrollRight`]],[b],Rt),Ft),It=class extends _{constructor(){super(G),o(this,`displayName`,`ScrollNav`),Lt()}},o(It,Pt,void 0),It);const Ut=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(w.Item,s(e({},o),{"data-value":i,children:a}))};Ut.displayName=`Option`;const Wt=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let f=me(s).flat(1/0).find(e=>d(e)&&e.type===Ut&&e.props.value===c);return i(w,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[r(w.Toggle,{className:a(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(u==null?void 0:u(c))||r(`div`,{className:f==null?void 0:f.props.className,children:f==null?void 0:f.props.children})}),r(w.Menu,{variant:o,children:s})]})};Wt.displayName=`Select`;let Gt;var K,q,Kt,qt,Jt,Yt,Xt,Zt,Qt;function $t(e,t,n){return C(function*(){let r=yield Re(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let en;new(Gt=(K=new WeakMap,q=new WeakMap,Kt=class extends (Yt=c){get loading(){return m(this,K)}set loading(e){g(this,K,e)}get imageURI(){return m(this,q)}set imageURI(e){g(this,q,e)}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 a=this.props,{className:o=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return i(n,{children:[u&&r(N,{}),i(`div`,s(e({},l),{ref:this.root,className:`position-relative ${o}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&r(Ae,{className:`position-absolute start-0 top-0 w-100 h-100`,src:d,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...t){var n;super(...t),n=this,o(this,`root`,(Qt(this),u())),h(this,K,{writable:!0,value:Xt(this,!1)}),h(this,q,{writable:!0,value:Zt(this,``)}),o(this,`generateImage`,()=>C(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield $t(n.root.current),n.loading=!1})()),o(this,`share`,t=>C(function*(){var r,i;t.stopPropagation();let a=yield de(n.imageURI),o=new File([a],`${n.props.title}.png`,{type:a.type});yield(r=(i=navigator).share)==null?void 0:r.call(i,e({files:[o]},n.props))})())}},{e:[Xt,Zt,Qt],c:[en,Jt]}=p(Kt,[[y,1,`loading`],[y,1,`imageURI`]],[b],Yt),Kt),qt=class extends _{constructor(){super(en),o(this,`displayName`,`ShareBox`),Jt()}},o(qt,Gt,void 0),qt);const tn=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(De,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(Pe,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};tn.displayName=`SpinnerButton`;const nn=n=>{let{animation:i=`border`,variant:a=`primary`,size:o,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return r(`tr`,s(e({},l),{children:r(`td`,{className:`text-center p-4`,colSpan:c,children:r(Pe,{animation:i,variant:a,size:o})})}))};nn.displayName=`TableSpinner`;let rn;var J,Y,an,on,sn,cn,ln,un,dn;let fn;new(rn=(J=new WeakMap,Y=new WeakMap,an=class extends (cn=c){get expanded(){return m(this,J)}set expanded(e){g(this,J,e)}get overflowed(){return m(this,Y)}set overflowed(e){g(this,Y,e)}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 n=this.props,{children:a,rows:o=3,expandText:c=`⏬`,collapseText:l=`⏫`}=n,u=t(n,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:d,overflowed:f}=this,ee={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:o};return i(`div`,s(e({},u),{children:[r(`p`,{ref:this.contentRef,style:d?void 0:ee,children:a}),(f||d)&&r(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":d,onClick:this.toggle,children:d?l:c})]}))}constructor(...e){super(...e),h(this,J,{writable:!0,value:(dn(this),ln(this,!1))}),h(this,Y,{writable:!0,value:un(this,!1)}),o(this,`contentRef`,u()),o(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),o(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[ln,un,dn],c:[fn,sn]}=p(an,[[y,1,`expanded`],[y,1,`overflowed`]],[b],cn),an),on=class extends _{constructor(){super(fn),o(this,`displayName`,`TextTruncate`),sn()}},o(on,rn,void 0),on);let pn;var X,mn,hn,gn,_n,vn=se(({observedProps:{dateTime:e,format:t}})=>e+t),yn,bn;let Z;new(pn=(X=new WeakMap,mn=class extends (_n=x){updateText(){let{dateTime:e,format:t}=this.props;return S(e,t)}get timeText(){return m(this,X)}set timeText(e){g(this,X,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return r(`time`,s(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),h(this,X,{writable:!0,value:(bn(this),yn(this,this.updateText()))})}},{e:[yn,bn],c:[Z,gn]}=p(mn,[[vn,2,`updateText`],[y,1,`timeText`]],[b],_n),mn),hn=class extends _{constructor(){super(Z),o(this,`displayName`,`Time`),gn()}},o(hn,pn,void 0),hn);const xn={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Sn=n=>{let{date:r,unitWords:a=xn,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=pe(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Sn.displayName=`TimeDistance`;const Cn=n=>{let{className:a,events:o,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return r(`ol`,s(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:o.map(({title:t,summary:n,time:a,link:o,people:s})=>r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:r(Oe,{children:i(Oe.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[r(`h3`,{className:`h5 m-0`,children:r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,r(Z,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r(Z,{dateTime:a[1],format:c})]}),r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>r(`li`,{children:r(z,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};Cn.displayName=`Timeline`;var wn,Tn;const En=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,Dn=class{get messages(){return m(this,Q)}set messages(e){g(this,Q,e)}open(t){let n=ve(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,s(e({id:n},t),{openedAt:r,resolve:a})],i}close(n){let r=this.messages.find(e=>e.id===n)||{},{resolve:i}=r,a=t(r,[`resolve`]);i==null||i(s(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=ue){o(this,`TimeScalar`,void 0),h(this,Q,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,g(this,Q,(Tn(this),wn(this,[]))),this.Component=b(({position:e=`top-end`})=>r(Ie,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:a,variant:o,delay:s=3e3})=>{let c=o&&!En.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(E,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(E.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(E.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[wn,Tn]}=p(Dn,[[y,1,`messages`]],[]));let On;var $,kn,An,jn,Mn,Nn,Pn;let Fn;new(On=($=new WeakMap,kn=class extends (Mn=c){get echoed(){return m(this,$)}set echoed(e){g(this,$,e)}render(){let n=this.props,{className:i,text:o}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return r(`pre`,s(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===o?``:`_`)}))}constructor(...e){var t;super(...e),t=this,h(this,$,{writable:!0,value:(Pn(this),Nn(this,``))}),o(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>C(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield ge(i/1e3),t.echoed+=e})()).observe(e))}},{e:[Nn,Pn],c:[Fn,jn]}=p(kn,[[y,1,`echoed`]],[b],Mn),kn),An=class extends _{constructor(){super(Fn),o(this,`displayName`,`TypeEcho`),jn()}},o(An,On,void 0),An);const In=({email:e,website:t})=>i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:r(M,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(M,{name:`globe2`})})]}),Ln=`X5DLia_image`;var Rn=class extends l{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(Ne,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(ke,{sm:12,xs:12,lg:7,children:[i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[i(`div`,{className:`X5DLia_medal`,children:[r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),r(`h3`,{"data-text":o,className:`position-relative m-auto mb-0 fw-bold text-center`,children:o})]}),r(Ne,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(this.renderMedal)})]}),r(ke,{xs:12,sm:12,lg:5,children:r(Fe,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),o(this,`renderMedal`,t=>{var n,a;return i(ke,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Ln}`,children:r(Ae,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[i(`div`,{className:`position-relative`,children:[r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),r(`a`,{className:`d-block mb-0 stretched-link`,href:((n=(a=this.props).linkOf)==null?void 0:n.call(a,t))||`#`,children:t.name}),r(`strong`,{children:t.score})]}),r(In,e({},t))]})]},t.id)}),o(this,`renderRow`,(t,n,{length:a})=>{var o,s;return i(`tr`,{className:`position-relative`,children:[r(`td`,{className:`align-middle`,children:r(Ee,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Ln}`,children:r(Ae,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),r(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:((o=(s=this.props).linkOf)==null?void 0:o.call(s,t))||`#`,children:t.name})]}),r(`td`,{className:`align-middle`,children:t.score}),r(`td`,{className:`align-middle`,children:r(In,e({},t))})]},t.id)})}};o(Rn,`displayName`,`UserRankView`);const zn=n=>{let{className:i=``,children:a,duration:o}=n,c=t(n,[`className`,`children`,`duration`]);return r(`div`,s(e({className:`overflow-hidden ${i}`},c),{children:r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":o},children:r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};zn.displayName=`VerticalMarquee`;const Bn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],Vn=e=>{let t=e<0?e+1:e;return Bn[(t%12+12)%12]},Hn=n=>{let{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=new Date().getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return r(`ol`,s(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${a}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let a=Vn(n),{link:s=`#`,title:c}=(u==null?void 0:u(n,a))||{};return r(`li`,{className:o,children:i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};Hn.displayName=`ZodiacBar`;export{D as Avatar,Be as ClickBoundary,He as CodeBlock,Qe as Countdown,at as Dialog,nt as DialogClose,mt as Editor,gt as EditorHTML,j as HorizontalMarquee,_t as HorizontalMarqueeBox,M as Icon,vt as LiveTSX,N as Loading,R as MonthCalendar,z as Nameplate,Ut as Option,P as OverlayBox,Nt as PageNav,G as ScrollNav,Wt as Select,en as ShareBox,tn as SpinnerButton,nn as TableSpinner,fn as TextTruncate,Z as Time,Sn as TimeDistance,Cn as Timeline,Dn as Toast,Fn as TypeEcho,Rn as UserRankView,O as VariantColors,zn as VerticalMarquee,Hn as ZodiacBar,Bn as ZodiacSigns,ze as animate,$t as elementToImage,ht as parser,Ue as text2color,Vn as zodiacOf};
|