idea-react 1.0.0-rc.30 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +27 -4
- package/dist/index.d.ts +10 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +51 -50
- package/source/CodeBlock.tsx +4 -2
- package/source/Dialog.tsx +4 -5
- package/source/Editor.tsx +3 -8
- package/source/MonthCalendar.tsx +11 -16
- package/source/PageNav.tsx +6 -11
- package/source/TypeEcho.tsx +8 -5
- package/tsconfig.json +4 -3
package/ReadMe.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstrap][3], built by **[idea2app][4] remote developers team**.
|
|
4
4
|
|
|
5
|
-
[][5]
|
|
6
6
|
[][6]
|
|
7
7
|
[][7]
|
|
8
8
|
|
|
@@ -12,6 +12,13 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
|
|
|
12
12
|
- Preview site: https://idea2app.github.io/Idea-React/preview/
|
|
13
13
|
- Storybook playground: https://idea-react.vercel.app/
|
|
14
14
|
|
|
15
|
+
## Versions
|
|
16
|
+
|
|
17
|
+
| SemVer | status | ES decorator | MobX |
|
|
18
|
+
| :----: | :----------: | :----------: | :---------: |
|
|
19
|
+
| `>=2` | ✅developing | stage-3 | `>=6.11` |
|
|
20
|
+
| `<2` | ❌deprecated | stage-2 | `>=4 <6.11` |
|
|
21
|
+
|
|
15
22
|
## Content
|
|
16
23
|
|
|
17
24
|
### Components
|
|
@@ -59,11 +66,11 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
|
|
|
59
66
|
```html
|
|
60
67
|
<link
|
|
61
68
|
rel="stylesheet"
|
|
62
|
-
href="https://unpkg.com/bootstrap@5.3.
|
|
69
|
+
href="https://unpkg.com/bootstrap@5.3.2/dist/css/bootstrap.min.css"
|
|
63
70
|
/>
|
|
64
71
|
<link
|
|
65
72
|
rel="stylesheet"
|
|
66
|
-
href="https://unpkg.com/bootstrap-icons@1.
|
|
73
|
+
href="https://unpkg.com/bootstrap-icons@1.11.3/font/bootstrap-icons.css"
|
|
67
74
|
/>
|
|
68
75
|
<link
|
|
69
76
|
rel="stylesheet"
|
|
@@ -75,6 +82,22 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
|
|
|
75
82
|
/>
|
|
76
83
|
```
|
|
77
84
|
|
|
85
|
+
### `tsconfig.json`
|
|
86
|
+
|
|
87
|
+
Compatible with MobX 6/7:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"compilerOptions": {
|
|
92
|
+
"target": "ES6",
|
|
93
|
+
"moduleResolution": "Node",
|
|
94
|
+
"useDefineForClassFields": true,
|
|
95
|
+
"experimentalDecorators": false,
|
|
96
|
+
"jsx": "react-jsx"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
78
101
|
### Dialog
|
|
79
102
|
|
|
80
103
|
```tsx
|
|
@@ -149,7 +172,7 @@ export class ExamplePage extends PureComponent {
|
|
|
149
172
|
2. add Git tag
|
|
150
173
|
|
|
151
174
|
```shell
|
|
152
|
-
git tag vx.xx.x # such as
|
|
175
|
+
git tag vx.xx.x # such as v2.0.0
|
|
153
176
|
```
|
|
154
177
|
|
|
155
178
|
3. review tag
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from 'react-bootstrap';
|
|
2
2
|
import { Color } from 'react-bootstrap/esm/types';
|
|
3
|
+
import { Component } from 'react';
|
|
3
4
|
import createParser from 'editorjs-html';
|
|
4
5
|
import { CSSProperties } from 'react';
|
|
5
6
|
import { Defer } from 'iterable-observer';
|
|
@@ -59,7 +60,7 @@ export declare interface DateData {
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
export declare class Dialog<T = any> {
|
|
62
|
-
defer
|
|
63
|
+
accessor defer: Defer<T> | undefined;
|
|
63
64
|
Component: FC;
|
|
64
65
|
constructor(Factory: FC<DialogProps<T>>);
|
|
65
66
|
open(): Promise<T>;
|
|
@@ -75,9 +76,8 @@ export declare interface DialogProps<T = any> {
|
|
|
75
76
|
|
|
76
77
|
export declare class Editor extends PureComponent<EditorProps> {
|
|
77
78
|
static displayName: string;
|
|
78
|
-
constructor(props: EditorProps);
|
|
79
79
|
private core?;
|
|
80
|
-
innerValue: OutputData;
|
|
80
|
+
accessor innerValue: OutputData;
|
|
81
81
|
save: () => Promise<OutputData>;
|
|
82
82
|
render(): JSX_2.Element;
|
|
83
83
|
}
|
|
@@ -107,12 +107,11 @@ export declare type LoadingProps = PropsWithChildren<{}>;
|
|
|
107
107
|
/**
|
|
108
108
|
* Re-implement from https://github.com/EasyWebApp/BootCell/blob/3d30027a97fe0a8c4ab8fabc8dfef22aede04de7/source/Calendar/MonthCalendar.tsx
|
|
109
109
|
*/
|
|
110
|
-
export declare class MonthCalendar extends
|
|
110
|
+
export declare class MonthCalendar extends Component<MonthCalendarProps> {
|
|
111
111
|
static displayName: string;
|
|
112
|
-
constructor(props: MonthCalendarProps);
|
|
113
112
|
observedProps: MonthCalendarProps;
|
|
114
113
|
get weekFormatter(): Intl.DateTimeFormat;
|
|
115
|
-
currentDate: Date;
|
|
114
|
+
accessor currentDate: Date;
|
|
116
115
|
get dateGrid(): Date[][];
|
|
117
116
|
changeMonth(delta: number): void;
|
|
118
117
|
renderDate: (date: Date) => JSX_2.Element;
|
|
@@ -154,9 +153,8 @@ export declare interface OverlayBoxProps extends Omit<OverlayTriggerProps, 'over
|
|
|
154
153
|
|
|
155
154
|
export declare class PageNav extends PureComponent<PageNavProps> {
|
|
156
155
|
static displayName: string;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
scrollY: number;
|
|
156
|
+
accessor list: HeadingMeta[];
|
|
157
|
+
accessor scrollY: number;
|
|
160
158
|
get currentActiveId(): string;
|
|
161
159
|
updateScrollY: () => number;
|
|
162
160
|
componentDidMount(): void;
|
|
@@ -186,17 +184,13 @@ export declare interface SpinnerButtonProps extends ButtonProps, Pick<SpinnerPro
|
|
|
186
184
|
loading?: boolean;
|
|
187
185
|
}
|
|
188
186
|
|
|
189
|
-
declare type State = {
|
|
190
|
-
echoed: string;
|
|
191
|
-
};
|
|
192
|
-
|
|
193
187
|
export declare const TableSpinner: FC<TableSpinnerProps>;
|
|
194
188
|
|
|
195
189
|
export declare type TableSpinnerProps = PropsWithoutRef<{
|
|
196
190
|
colSpan: number;
|
|
197
191
|
}>;
|
|
198
192
|
|
|
199
|
-
export declare function text2color(raw: string, excludeColors?: VariantColor[]):
|
|
193
|
+
export declare function text2color(raw: string, excludeColors?: VariantColor[]): string;
|
|
200
194
|
|
|
201
195
|
export declare const TimeDistance: FC<TimeDistanceProps>;
|
|
202
196
|
|
|
@@ -208,9 +202,9 @@ export declare type TimeDistanceProps = PropsWithoutRef<{
|
|
|
208
202
|
afterWord?: string;
|
|
209
203
|
}>;
|
|
210
204
|
|
|
211
|
-
export declare class TypeEcho extends PureComponent<TypeEchoProps
|
|
205
|
+
export declare class TypeEcho extends PureComponent<TypeEchoProps> {
|
|
212
206
|
static displayName: string;
|
|
213
|
-
|
|
207
|
+
accessor echoed: string;
|
|
214
208
|
init: RefCallback<HTMLPreElement>;
|
|
215
209
|
render(): JSX_2.Element;
|
|
216
210
|
}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAEA,wBAAwB,IAAI,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAiB1D;AChBD,4BAA6B,SAAQ,kBAAkB,gBAAgB,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,MAAM,QAAQ,GAAG,WAAW,CAelC,CAAC;ACdF,iCAAiC,kBAC7B;IACI,YAAY,CAAC,EAAE,CAAC,KAAK,EAA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I,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAaH,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAqB9C,CAAC;ACrCF,4BAA4B,gBAAgB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,qBACsB,SAAQ,cAAc,aAAa,CAAC;IACtD,MAAM,CAAC,WAAW,SAAc;IAGhC,QAAQ,CAAC,MAAM,SAAM;IAErB,IAAI,EAAE,YAAY,cAAc,CAAC,CAcZ;IAErB,MAAM;CAUT","sources":["source/source/animate.ts","source/source/Avatar.tsx","source/source/ClickBoundary.tsx","source/source/CodeBlock.tsx","source/source/color.ts","source/source/Dialog.tsx","source/source/Editor.tsx","source/source/EditorHTML.tsx","source/source/Icon.tsx","source/source/Loading.tsx","source/source/OverlayBox.tsx","source/source/MonthCalendar.tsx","source/source/Nameplate.tsx","source/source/PageNav.tsx","source/source/Select.tsx","source/source/SpinnerButton.tsx","source/source/TableSpinner.tsx","source/source/TimeDistance.tsx","source/source/TypeEcho.tsx","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from './animate';\nexport * from './Avatar';\nexport * from './ClickBoundary';\nexport * from './CodeBlock';\nexport * from './color';\nexport * from './Dialog';\nexport * from './Editor';\nexport * from './EditorHTML';\nexport * from './Icon';\nexport * from './Loading';\nexport * from './MonthCalendar';\nexport * from './Nameplate';\nexport * from './OverlayBox';\nexport * from './PageNav';\nexport * from './Select';\nexport * from './SpinnerButton';\nexport * from './TableSpinner';\nexport * from './TimeDistance';\nexport * from './TypeEcho';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
var /*#__PURE__*/e,/*#__PURE__*/r,/*#__PURE__*/t,n=require("@swc/helpers/cjs/_sliced_to_array.cjs"),a=require("@swc/helpers/cjs/_to_consumable_array.cjs"),i=require("@swc/helpers/cjs/_object_spread.cjs"),o=require("@swc/helpers/cjs/_object_without_properties.cjs"),s=require("react/jsx-runtime"),l=require("classnames"),c=require("@swc/helpers/cjs/_class_call_check.cjs"),u=require("@swc/helpers/cjs/_create_class.cjs"),d=require("@swc/helpers/cjs/_inherits.cjs"),v=require("@swc/helpers/cjs/_object_spread_props.cjs"),h=require("@swc/helpers/cjs/_create_super.cjs"),p=require("react"),m=require("prismjs"),f=require("react-element-to-jsx-string"),_=require("@swc/helpers/cjs/_wrap_native_super.cjs"),y=require("@swc/helpers/cjs/_ts_decorate.cjs"),x=require("iterable-observer"),j=require("mobx"),b=require("mobx-react"),g=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),w=require("@swc/helpers/cjs/_async_to_generator.cjs"),k=require("@swc/helpers/cjs/_ts_generator.cjs"),N=require("react-editor-js"),D=require("editorjs-html"),C=require("react-bootstrap"),q=require("mobx-react-helper"),S=require("web-utility");function M(e,r){return Object.keys(r).forEach(function(t){"default"===t||"__esModule"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),e}function T(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}function Y(e){return e&&e.__esModule?e.default:e}var I={};function O(e){return function(r){return r&&new IntersectionObserver(function(r,t){var i,o,s=(0,n._)(r,1)[0],l=s.isIntersecting,c=s.target;if(l){var u=["animate__animated","animate__".concat(e)];(i=c.classList).add.apply(i,(0,a._)(u)),c.addEventListener("animationend",function(){return(o=c.classList).remove.apply(o,(0,a._)(u))},{once:!0}),t.disconnect()}}).observe(r)}}T(I,"animate",function(){return O});var L={};T(L,"Avatar",function(){return P});var P=function(e)/*#__PURE__*/{var r=e.className,t=e.style,n=e.size,a=void 0===n?3:n,c=(0,o._)(e,["className","style","size"]);return(0,s.jsx)("img",(0,i._)({className:Y(l)("object-fit-cover rounded-circle",r),style:(0,i._)({width:"".concat(a,"rem"),height:"".concat(a,"rem")},t)},c))};P.displayName="Avatar";var E={};T(E,"ClickBoundary",function(){return A});var A=/*#__PURE__*/function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(){var e;return(0,c._)(this,t),e=r.apply(this,arguments),e.root=/*#__PURE__*/(0,p.createRef)(),e.switchClick=function(r){var t,n=e.props,a=n.onInnerClick,i=n.onOuterClick;(null===(t=e.root.current)||void 0===t?void 0:t.contains(r.target))?null==a||a(r):null==i||i(r)},e}return(0,u._)(t,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,r=e.children,t=(e.onInnerClick,e.onOuterClick,(0,o._)(e,["children","onInnerClick","onOuterClick"]));return/*#__PURE__*/(0,s.jsx)("div",(0,v._)((0,i._)({ref:this.root},t),{children:r}))}}]),t}(p.PureComponent),B={};function z(e){var r=e.language,t=e.children,n=(0,m.highlight)(Y(f)(t),m.languages[r],r);return/*#__PURE__*/(0,s.jsx)("pre",{children:/*#__PURE__*/(0,s.jsx)("code",{className:"language-".concat(r),dangerouslySetInnerHTML:{__html:n}})})}T(B,"CodeBlock",function(){return z});var V={};T(V,"VariantColors",function(){return F}),T(V,"text2color",function(){return H});var F=["primary","secondary","success","danger","warning","info","dark","light"];function H(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=r[0]?F.filter(function(e){return!r.find(function(r){return r===e})}):F;return t[(0,a._)(e).reduce(function(e,r){return e+r.charCodeAt(0)},0)%t.length]}var W={};T(W,"DialogClose",function(){return J}),T(W,"Dialog",function(){return R});var J=/*#__PURE__*/function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,c._)(this,t),r.call(this,e)}return t}((0,_._)(Error)),R=/*#__PURE__*/function(){function e(r){var t,n=this;(0,c._)(this,e),this.defer=void 0,null===(t=j.makeObservable)||void 0===t||t.call(j,this),this.Component=(0,b.observer)(function(){return/*#__PURE__*/(0,s.jsx)(r,{defer:n.defer})})}return(0,u._)(e,[{key:"open",value:function(){var e=this;return this.defer=new x.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}();(0,y._)([j.observable],R.prototype,"defer",void 0);var G={};T(G,"Editor",function(){return K});var U=(0,N.createReactEditorJS)(),K=((e=function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(e){(0,c._)(this,t),(n=r.call(this,e)).innerValue=n.props.defaultValue;var n,a,i=(0,g._)(n);return n.save=/*#__PURE__*/(0,w._)(function(){var e;return(0,k._)(this,function(r){switch(r.label){case 0:if(!(e=i.core))return[3,2];return[4,i.core.save()];case 1:e=i.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})}),null===(a=j.makeObservable)||void 0===a||a.call(j,(0,g._)(n)),n}return(0,u._)(t,[{key:"render",value:function(){var e=this,r=this.props,t=r.name,n=r.required,a=(r.children,(0,o._)(r,["name","required","children"])),l=this.innerValue;return/*#__PURE__*/(0,s.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[/*#__PURE__*/(0,s.jsx)("input",{hidden:!0,name:t,required:n,value:JSON.stringify(l)}),/*#__PURE__*/(0,s.jsx)(U,(0,v._)((0,i._)({},a),{onInitialize:function(r){var t;e.core=r,null===(t=a.onInitialize)||void 0===t||t.call(a,r)}}))]})}}]),t}(p.PureComponent)).displayName="Editor",e);(0,y._)([j.observable],K.prototype,"innerValue",void 0),K=(0,y._)([b.observer],K);var Q={};T(Q,"parser",function(){return X}),T(Q,"EditorHTML",function(){return Z});var X=Y(D)({link:function(e){var r=e.data.link;return'<a href="'.concat(r,'">').concat(r,"</a>")}}),Z=function(e){var r=e.className,t=e.data,n=X.parse(t).join("");return/*#__PURE__*/(0,s.jsx)("article",{className:r,dangerouslySetInnerHTML:{__html:n}})};Z.displayName="EditorHTML";var $={};T($,"Icon",function(){return ee});var ee=function(e)/*#__PURE__*/{var r=e.className,t=e.style,n=e.name,a=e.size,c=(0,o._)(e,["className","style","name","size"]);return(0,s.jsx)("i",(0,i._)({className:Y(l)("bi-".concat(n),r),style:(0,i._)({fontSize:a&&"".concat(a,"rem")},t)},c))};ee.displayName="Icon";var er={};T(er,"Loading",function(){return et});var et=function(e){var r=e.children;return/*#__PURE__*/(0,s.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[/*#__PURE__*/(0,s.jsx)(C.Spinner,{animation:"border",variant:"success"}),/*#__PURE__*/(0,s.jsx)("span",{className:"ml-3 text-white",children:void 0===r?"Loading...":r})]})};et.displayName="Loading";var en={};T(en,"MonthCalendar",function(){return eo});var ea={};T(ea,"OverlayBox",function(){return ei});var ei=function(e)/*#__PURE__*/{var r=e.title,t=e.detail,n=e.children,a=(0,o._)(e,["title","detail","children"]);return(0,s.jsx)(C.OverlayTrigger,(0,v._)((0,i._)({},a),{overlay:t?/*#__PURE__*/(0,s.jsxs)(C.Popover,{children:[/*#__PURE__*/(0,s.jsx)(C.Popover.Header,{children:r}),/*#__PURE__*/(0,s.jsx)(C.Popover.Body,{children:t})]}):/*#__PURE__*/(0,s.jsx)(C.Tooltip,{children:r}),children:n}))};ei.displayName="OverlayBox";var eo=((r=function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(e){var n,a;return(0,c._)(this,t),(n=r.call(this,e)).currentDate=new Date,n.renderDate=function(e){var r=n.observedProps,t=(r.variant,r.value),a=r.onSelect,i=(0,S.formatDate)(e,"YYYY-MM-DD"),o=null==t?void 0:t.filter(function(e){var r=e.date;return(0,S.formatDate)(r,"YYYY-MM-DD")===i});return/*#__PURE__*/(0,s.jsxs)("td",{className:Y(l)({"opacity-50":e.getMonth()!==n.currentDate.getMonth(),"fw-bold":i===(0,S.formatDate)(new Date,"YYYY-MM-DD")}),children:[/*#__PURE__*/(0,s.jsx)("time",{className:"d-block",dateTime:e.toJSON(),children:e.getDate()}),null==o?void 0:o.map(function(e){return"object"==typeof e.content?e.content:/*#__PURE__*/(0,s.jsx)(ei,{title:e.content,children:/*#__PURE__*/(0,s.jsx)(C.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:H(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},e+"")},null===(a=j.makeObservable)||void 0===a||a.call(j,(0,g._)(n)),n}return(0,u._)(t,[{key:"weekFormatter",get:function(){var e,r=this.observedProps.locale,t=void 0===r?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:r;return new Intl.DateTimeFormat(t,{weekday:"long"})}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*S.Day);var r=Array.from(Array(42),function(r,t){return new Date(+e+t*S.Day)});return(0,S.splitArray)(r,7)}},{key:"changeMonth",value:function(e){var r,t;this.currentDate=(0,S.changeMonth)(this.currentDate,e),null===(t=(r=this.props).onChange)||void 0===t||t.call(r,this.currentDate)}},{key:"render",value:function(){var e=this,r=this.weekFormatter,t=this.currentDate,n=this.dateGrid,a=this.observedProps,l=a.style,c=a.variant,u=void 0===c?"primary":c,d=(a.onChange,a.onSelect,(0,o._)(a,["style","variant","onChange","onSelect"]));return/*#__PURE__*/(0,s.jsxs)(C.Table,(0,v._)((0,i._)({},d),{style:(0,i._)({tableLayout:"fixed"},l),children:[/*#__PURE__*/(0,s.jsx)("caption",{children:/*#__PURE__*/(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[/*#__PURE__*/(0,s.jsx)(C.Button,{variant:u,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,S.formatDate)(t,"YYYY-MM"),/*#__PURE__*/(0,s.jsx)(C.Button,{variant:u,onClick:function(){return e.changeMonth(1)},children:">"})]})}),/*#__PURE__*/(0,s.jsx)("thead",{children:/*#__PURE__*/(0,s.jsx)("tr",{children:n[0].map(function(e,t,n){var a=n.length;return/*#__PURE__*/(0,s.jsx)("td",{className:"bg-".concat(u," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:r.format(e)},t)})})}),/*#__PURE__*/(0,s.jsx)("tbody",{children:n.map(function(r){return/*#__PURE__*/(0,s.jsx)("tr",{children:r.map(e.renderDate)},r[0]+"")})})]}))}}]),t}(p.PureComponent)).displayName="MonthCalendar",r);(0,y._)([j.computed],eo.prototype,"weekFormatter",null),(0,y._)([j.observable],eo.prototype,"currentDate",void 0),(0,y._)([j.computed],eo.prototype,"dateGrid",null),eo=(0,y._)([b.observer,q.observePropsState],eo);var es={};T(es,"Nameplate",function(){return el});var el=function(e){var r=e.avatar,t=e.name;return/*#__PURE__*/(0,s.jsxs)(s.Fragment,{children:[/*#__PURE__*/(0,s.jsx)(P,{size:2,style:{marginRight:"0.5rem"},src:r}),/*#__PURE__*/(0,s.jsx)("span",{className:"align-middle",children:t})]})};el.displayName="Nameplate";var ec={};T(ec,"PageNav",function(){return ed});var eu=Array.from(Array(6),function(e,r){return"h".concat(++r)})+"",ed=((t=function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(e){var n,a;return(0,c._)(this,t),(n=r.call(this,e)).list=[],n.scrollY=0,n.updateScrollY=function(){return n.scrollY=window.scrollY},n.scrollTo=function(e){return function(){var r,t;setTimeout(function(){return(0,S.scrollTo)('[id="'.concat(e.id,'"]'))}),null===(t=(r=n.props).onItemClick)||void 0===t||t.call(r,e)}},n.renderLink=function(e){var r=e.id,t=e.level,a=e.text,i=e.top,o=(0,g._)(n).currentActiveId,l=n.props.depth;return t<=(void 0===l?1/0:l)&&/*#__PURE__*/(0,s.jsx)(C.Nav.Item,{style:{textIndent:"".concat(t-1,"rem")},children:/*#__PURE__*/(0,s.jsx)(C.Nav.Link,{href:"#".concat(r),active:o===r,onClick:n.scrollTo({id:r,level:t,text:a,top:i}),children:a})},r)},null===(a=j.makeObservable)||void 0===a||a.call(j,(0,g._)(n)),n}return(0,u._)(t,[{key:"currentActiveId",get:function(){var e,r=this.list,t=this.scrollY,n=r.findIndex(function(e){return e.top>t});return null===(e=r[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(eu),function(e){e.id||(e.id=(0,S.uniqueID)());var r=e.id,t=e.tagName,n=e.textContent,a=e.offsetTop;return{id:r,level:+t[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,r=this.props,t=r.style,n=r.variant,a=(0,o._)(r,["style","variant"]);return/*#__PURE__*/(0,s.jsx)(C.Nav,(0,v._)((0,i._)({},a),{variant:void 0===n?"underline":n,style:(0,i._)({flexDirection:"column"},t),children:e.map(this.renderLink)}))}}]),t}(p.PureComponent)).displayName="PageNav",t);(0,y._)([j.observable],ed.prototype,"list",void 0),(0,y._)([j.observable],ed.prototype,"scrollY",void 0),(0,y._)([j.computed],ed.prototype,"currentActiveId",null),ed=(0,y._)([b.observer],ed);var ev={};T(ev,"Option",function(){return eh}),T(ev,"Select",function(){return ep});var eh=function(e)/*#__PURE__*/{var r=e.value,t=e.children,n=(0,o._)(e,["value","children"]);return(0,s.jsx)(C.Dropdown.Item,(0,v._)((0,i._)({},n),{"data-value":r,children:t}))};eh.displayName="Option";var ep=function(e){var r=e.className,t=e.style,n=e.variant,a=e.menuVariant,i=e.children,o=e.value,c=e.onChange,u=e.valueRender,d=(0,S.makeArray)(i).flat(1/0).find(function(e){return/*#__PURE__*/(0,p.isValidElement)(e)&&e.type===eh&&e.props.value===o});return/*#__PURE__*/(0,s.jsxs)(C.Dropdown,{onClick:function(e){var r=e.target.closest(".dropdown-item");if(r){var t=r.dataset.value;null==c||c(t)}},children:[/*#__PURE__*/(0,s.jsx)(C.Dropdown.Toggle,{className:Y(l)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",r),style:t,variant:n,children:(null==u?void 0:u(o))||/*#__PURE__*/(0,s.jsx)("div",{className:null==d?void 0:d.props.className,children:null==d?void 0:d.props.children})}),/*#__PURE__*/(0,s.jsx)(C.Dropdown.Menu,{variant:a,children:i})]})};ep.displayName="Select";var em={};T(em,"SpinnerButton",function(){return ef});var ef=function(e)/*#__PURE__*/{var r=e.animation,t=e.loading,n=e.disabled,a=e.children,l=(0,o._)(e,["animation","loading","disabled","children"]);return(0,s.jsxs)(C.Button,(0,v._)((0,i._)({},l),{disabled:t||n,children:[t&&/*#__PURE__*/(0,s.jsxs)(s.Fragment,{children:[/*#__PURE__*/(0,s.jsx)(C.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:r,role:"status","aria-hidden":"true"}),!a&&/*#__PURE__*/(0,s.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};ef.displayName="SpinnerButton";var e_={};T(e_,"TableSpinner",function(){return ey});var ey=function(e){var r=e.colSpan;return/*#__PURE__*/(0,s.jsx)("tr",{children:/*#__PURE__*/(0,s.jsx)("td",{className:"text-center p-4",colSpan:r,children:/*#__PURE__*/(0,s.jsx)(C.Spinner,{animation:"border",variant:"primary"})})})};ey.displayName="TableSpinner";var ex={};T(ex,"TimeDistance",function(){return eb});var ej={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},eb=function(e){var r=e.className,t=e.date,n=e.unitWords,a=void 0===n?ej:n,i=e.beforeWord,o=e.afterWord;t=new Date(t);var l=(0,S.diffTime)(t),c=l.distance,u=l.unit;return/*#__PURE__*/(0,s.jsxs)("time",{className:r,dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(c)," ",a[u],c<0?void 0===i?" before":i:void 0===o?" after":o]})};eb.displayName="TimeDistance";var eg={};T(eg,"TypeEcho",function(){return ew});var ew=/*#__PURE__*/function(e){(0,d._)(t,e);var r=(0,h._)(t);function t(){(0,c._)(this,t),e=r.apply(this,arguments),e.state={echoed:""};var e,a=(0,g._)(e);return e.init=function(e){var r;return e&&new IntersectionObserver((r=(0,w._)(function(e,r){var t,i,o,s,l,c,u,d,v,h,p;return(0,k._)(this,function(m){switch(m.label){case 0:if(!(0,n._)(e,1)[0].isIntersecting)return[2];r.disconnect(),i=(t=a.props).text,s=void 0===(o=t.intervals)?150:o,l=!0,c=!1,u=void 0,m.label=1;case 1:m.trys.push([1,6,7,8]),d=i[Symbol.iterator](),m.label=2;case 2:if(l=(v=d.next()).done)return[3,5];return h=v.value,[4,(0,S.sleep)(s/1e3)];case 3:m.sent(),a.setState({echoed:a.state.echoed+h}),m.label=4;case 4:return l=!0,[3,2];case 5:return[3,8];case 6:return p=m.sent(),c=!0,u=p,[3,8];case 7:try{l||null==d.return||d.return()}finally{if(c)throw u}return[7];case 8:return[2]}})}),function(e,t){return r.apply(this,arguments)})).observe(e)},e}return(0,u._)(t,[{key:"render",value:function(){var e=this.props,r=e.className,t=e.text,n=this.state.echoed;return/*#__PURE__*/(0,s.jsx)("pre",{className:Y(l)("text-wrap",r),ref:this.init,children:n+(n===t?"":"_")})}}]),t}(p.PureComponent);ew.displayName="TypeEcho",M(module.exports,I),M(module.exports,L),M(module.exports,E),M(module.exports,B),M(module.exports,V),M(module.exports,W),M(module.exports,G),M(module.exports,Q),M(module.exports,$),M(module.exports,er),M(module.exports,en),M(module.exports,es),M(module.exports,ea),M(module.exports,ec),M(module.exports,ev),M(module.exports,em),M(module.exports,e_),M(module.exports,ex),M(module.exports,eg);//# sourceMappingURL=index.js.map
|
|
2
|
-
|
|
1
|
+
var e,t,r,n,a,o,i,c,l,s,u,d,f,p,v,h,m,y,b,g,w,j,O,x,_,P,k,T,E,S,N,D,C,I,M,q,Y,A,z,L,F,B,V,W,H,G,J,R,U,K,Q,X,Z,$,ee,et,er,en,ea,eo,ei,ec,el,es,eu,ed=require("@swc/helpers/cjs/_sliced_to_array.cjs"),ef=require("@swc/helpers/cjs/_to_consumable_array.cjs"),ep=require("react/jsx-runtime"),ev=require("classnames"),eh=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),em=require("@swc/helpers/cjs/_class_call_check.cjs"),ey=require("@swc/helpers/cjs/_create_class.cjs"),eb=require("@swc/helpers/cjs/_inherits.cjs"),eg=require("@swc/helpers/cjs/_create_super.cjs"),ew=require("react"),ej=require("prismjs"),eO=require("react-element-to-jsx-string"),ex=require("@swc/helpers/cjs/_wrap_native_super.cjs"),e_=require("iterable-observer"),eP=require("mobx"),ek=require("mobx-react"),eT=require("@swc/helpers/cjs/_type_of.cjs"),eE=require("@swc/helpers/cjs/_ts_generator.cjs"),eS=require("react-editor-js"),eN=require("editorjs-html"),eD=require("react-bootstrap"),eC=require("mobx-react-helper"),eI=require("web-utility");function eM(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function eq(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function eY(e){return e&&e.__esModule?e.default:e}var eA={};function ez(e){return function(t){return t&&new IntersectionObserver(function(t,r){var n,a,o=(0,ed._)(t,1)[0],i=o.isIntersecting,c=o.target;if(i){var l=["animate__animated","animate__".concat(e)];(n=c.classList).add.apply(n,(0,ef._)(l)),c.addEventListener("animationend",function(){return(a=c.classList).remove.apply(a,(0,ef._)(l))},{once:!0}),r.disconnect()}}).observe(t)}}eq(eA,"animate",function(){return ez});var eL={};eq(eL,"Avatar",function(){return eB});var eF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},eB=function(e){var t=e.className,r=e.style,n=e.size,a=void 0===n?3:n,o=eF(e,["className","style","size"]);return(0,ep.jsx)("img",Object.assign({className:eY(ev)("object-fit-cover rounded-circle",t),style:Object.assign({width:"".concat(a,"rem"),height:"".concat(a,"rem")},r)},o))};eB.displayName="Avatar";var eV={};eq(eV,"ClickBoundary",function(){return eH});var eW=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},eH=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eh._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(0,ew.createRef)()}),Object.defineProperty((0,eh._)(e),"switchClick",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r,n=e.props,a=n.onInnerClick,o=n.onOuterClick;(null===(r=e.root.current)||void 0===r?void 0:r.contains(t.target))?null==a||a(t):null==o||o(t)}}),e}return(0,ey._)(r,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.onInnerClick,e.onOuterClick,eW(e,["children","onInnerClick","onOuterClick"]));return(0,ep.jsx)("div",Object.assign({ref:this.root},r,{children:t}))}}]),r}(ew.PureComponent),eG={};function eJ(e){var t=e.language,r=e.children,n=(0,ej.highlight)(eY(eO)((0,ew.isValidElement)(r)?r:(0,ep.jsx)(ep.Fragment,{children:r})),ej.languages[t],t);return(0,ep.jsx)("pre",{children:(0,ep.jsx)("code",{className:"language-".concat(t),dangerouslySetInnerHTML:{__html:n}})})}eq(eG,"CodeBlock",function(){return eJ});var eR={};eq(eR,"VariantColors",function(){return eU}),eq(eR,"text2color",function(){return eK});var eU=["primary","secondary","success","danger","warning","info","dark","light"];function eK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t[0]?eU.filter(function(e){return!t.find(function(t){return t===e})}):eU;return r[(0,ef._)(e).reduce(function(e,t){return e+t.charCodeAt(0)},0)%r.length]}var eQ={};eq(eQ,"DialogClose",function(){return e0}),eq(eQ,"Dialog",function(){return e1});var eX=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},eZ=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},e$=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},e0=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,em._)(this,r),t.call(this,e)}return r}((0,ex._)(Error)),e1=(r=[],n=[],e=function(){function e(a){var o=this;(0,em._)(this,e),t.set(this,(eX(this,r),eX(this,n,void 0))),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Component=(0,ek.observer)(function(){return(0,ep.jsx)(a,{defer:o.defer})}),this.Component.displayName="DialogComponent"}return(0,ey._)(e,[{key:"defer",get:function(){return eZ(this,t,"f")},set:function(e){e$(this,t,e,"f")}},{key:"open",value:function(){var e=this;return this.defer=new e_.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}(),t=new WeakMap,a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0}(e,null,[eP.observable],{kind:"accessor",name:"defer",static:!1,private:!1,access:{has:function(e){return"defer"in e},get:function(e){return e.defer},set:function(e,t){e.defer=t}},metadata:a},n,r),a&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e),e2={};eq(e2,"Editor",function(){return e9});var e3=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},e4=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},e5=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},e7=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},e8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e6=(0,eS.createReactEditorJS)(),e9=(l=[ek.observer],s=[],u=ew.PureComponent,d=[],f=[],c=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eh._)(e),"core",{enumerable:!0,configurable:!0,writable:!0,value:void e3((0,eh._)(e),d)}),o.set((0,eh._)(e),e3((0,eh._)(e),f,e.props.defaultValue)),Object.defineProperty((0,eh._)(e),"save",{enumerable:!0,configurable:!0,writable:!0,value:function(){var t,r,n,a;return t=(0,eh._)(e),r=void 0,n=void 0,a=function(){var e,t;return(0,eE._)(this,function(r){switch(r.label){case 0:if(!(e=this.core))return[3,2];return t=this,[4,this.core.save()];case 1:e=t.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})},new(n||(n=Promise))(function(e,o){function i(e){try{l(a.next(e))}catch(e){o(e)}}function c(e){try{l(a.throw(e))}catch(e){o(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(i,c)}l((a=a.apply(t,r||[])).next())})}}),e}return(0,ey._)(r,[{key:"innerValue",get:function(){return e5(this,o,"f")},set:function(e){e7(this,o,e,"f")}},{key:"render",value:function(){var e=this,t=this.props,r=t.name,n=t.required,a=(t.children,e8(t,["name","required","children"])),o=this.innerValue;return(0,ep.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[(0,ep.jsx)("input",{hidden:!0,name:r,required:n,value:JSON.stringify(o)}),(0,ep.jsx)(e6,Object.assign({},a,{onInitialize:function(t){var r;e.core=t,null===(r=a.onInitialize)||void 0===r||r.call(a,t)}}))]})}}]),r}(u),o=new WeakMap,p=c,v="Editor","symbol"===(0,eT._)(v)&&(v=v.description?"[".concat(v.description,"]"):""),Object.defineProperty(p,"name",{configurable:!0,value:h?"".concat(h," ",v):v}),y="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(m=u[Symbol.metadata])&&void 0!==m?m:null):void 0,e4(c,null,[eP.observable],{kind:"accessor",name:"innerValue",static:!1,private:!1,access:{has:function(e){return"innerValue"in e},get:function(e){return e.innerValue},set:function(e,t){e.innerValue=t}},metadata:y},f,d),e4(null,i={value:c},l,{kind:"class",name:c.name,metadata:y},null,s),c=i.value,y&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(c,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Editor"}),e3(c,s),c),te={};eq(te,"parser",function(){return tt}),eq(te,"EditorHTML",function(){return tr});var tt=eY(eN)({link:function(e){var t=e.data.link;return'<a href="'.concat(t,'">').concat(t,"</a>")}}),tr=function(e){var t=e.className,r=e.data,n=tt.parse(r).join("");return(0,ep.jsx)("article",{className:t,dangerouslySetInnerHTML:{__html:n}})};tr.displayName="EditorHTML";var tn={};eq(tn,"Icon",function(){return to});var ta=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},to=function(e){var t=e.className,r=e.style,n=e.name,a=e.size,o=ta(e,["className","style","name","size"]);return(0,ep.jsx)("i",Object.assign({className:eY(ev)("bi-".concat(n),t),style:Object.assign({fontSize:a&&"".concat(a,"rem")},r)},o))};to.displayName="Icon";var ti={};eq(ti,"Loading",function(){return tc});var tc=function(e){var t=e.children;return(0,ep.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[(0,ep.jsx)(eD.Spinner,{animation:"border",variant:"success"}),(0,ep.jsx)("span",{className:"ml-3 text-white",children:void 0===t?"Loading...":t})]})};tc.displayName="Loading";var tl={};eq(tl,"MonthCalendar",function(){return ty});var ts={};eq(ts,"OverlayBox",function(){return td});var tu=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},td=function(e){var t=e.title,r=e.detail,n=e.children,a=tu(e,["title","detail","children"]);return(0,ep.jsx)(eD.OverlayTrigger,Object.assign({},a,{overlay:r?(0,ep.jsxs)(eD.Popover,{children:[(0,ep.jsx)(eD.Popover.Header,{children:t}),(0,ep.jsx)(eD.Popover.Body,{children:r})]}):(0,ep.jsx)(eD.Tooltip,{children:t}),children:n}))};td.displayName="OverlayBox";var tf=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tp=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tv=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},th=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},ty=(_=[ek.observer,eC.observePropsState],P=[],k=ew.Component,T=[],E=[],w=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),b.set((0,eh._)(e),(tp((0,eh._)(e),T),tp((0,eh._)(e),E,new Date))),Object.defineProperty((0,eh._)(e),"renderDate",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=e.observedProps,n=(r.variant,r.value),a=r.onSelect,o=(0,eI.formatDate)(t,"YYYY-MM-DD"),i=null==n?void 0:n.filter(function(e){var t=e.date;return(0,eI.formatDate)(t,"YYYY-MM-DD")===o});return(0,ep.jsxs)("td",{className:eY(ev)({"opacity-50":t.getMonth()!==e.currentDate.getMonth(),"fw-bold":o===(0,eI.formatDate)(new Date,"YYYY-MM-DD")}),children:[(0,ep.jsx)("time",{className:"d-block",dateTime:t.toJSON(),children:t.getDate()}),null==i?void 0:i.map(function(e){return"object"==typeof e.content?e.content:(0,ep.jsx)(td,{title:e.content,children:(0,ep.jsx)(eD.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:eK(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},t+"")}}),e}return(0,ey._)(r,[{key:"weekFormatter",get:function(){var e,t=this.observedProps.locale,r=void 0===t?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:t;return new Intl.DateTimeFormat(r,{weekday:"long"})}},{key:"currentDate",get:function(){return tv(this,b,"f")},set:function(e){th(this,b,e,"f")}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*eI.Day);var t=Array.from(Array(42),function(t,r){return new Date(+e+r*eI.Day)});return(0,eI.splitArray)(t,7)}},{key:"changeMonth",value:function(e){var t,r;this.currentDate=(0,eI.changeMonth)(this.currentDate,e),null===(r=(t=this.props).onChange)||void 0===r||r.call(t,this.currentDate)}},{key:"render",value:function(){var e=this,t=this.weekFormatter,r=this.currentDate,n=this.dateGrid,a=this.observedProps,o=a.style,i=a.variant,c=void 0===i?"primary":i,l=(a.onChange,a.onSelect,tm(a,["style","variant","onChange","onSelect"]));return(0,ep.jsxs)(eD.Table,Object.assign({},l,{style:Object.assign({tableLayout:"fixed"},o),children:[(0,ep.jsx)("caption",{children:(0,ep.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,ep.jsx)(eD.Button,{variant:c,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,eI.formatDate)(r,"YYYY-MM"),(0,ep.jsx)(eD.Button,{variant:c,onClick:function(){return e.changeMonth(1)},children:">"})]})}),(0,ep.jsx)("thead",{children:(0,ep.jsx)("tr",{children:n[0].map(function(e,r,n){var a=n.length;return(0,ep.jsx)("td",{className:"bg-".concat(c," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:t.format(e)},r)})})}),(0,ep.jsx)("tbody",{children:n.map(function(t){return(0,ep.jsx)("tr",{children:t.map(e.renderDate)},t[0]+"")})})]}))}}]),r}(k),b=new WeakMap,S=w,N="MonthCalendar","symbol"===(0,eT._)(N)&&(N=N.description?"[".concat(N.description,"]"):""),Object.defineProperty(S,"name",{configurable:!0,value:D?"".concat(D," ",N):N}),I="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(C=k[Symbol.metadata])&&void 0!==C?C:null):void 0,j=[eP.computed],O=[eP.observable],x=[eP.computed],tf(w,null,j,{kind:"getter",name:"weekFormatter",static:!1,private:!1,access:{has:function(e){return"weekFormatter"in e},get:function(e){return e.weekFormatter}},metadata:I},null,T),tf(w,null,O,{kind:"accessor",name:"currentDate",static:!1,private:!1,access:{has:function(e){return"currentDate"in e},get:function(e){return e.currentDate},set:function(e,t){e.currentDate=t}},metadata:I},E,T),tf(w,null,x,{kind:"getter",name:"dateGrid",static:!1,private:!1,access:{has:function(e){return"dateGrid"in e},get:function(e){return e.dateGrid}},metadata:I},null,T),tf(null,g={value:w},_,{kind:"class",name:w.name,metadata:I},null,P),w=g.value,I&&Object.defineProperty(w,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:I}),Object.defineProperty(w,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"MonthCalendar"}),tp(w,P),w),tb={};eq(tb,"Nameplate",function(){return tg});var tg=function(e){var t=e.avatar,r=e.name;return(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(eB,{size:2,style:{marginRight:"0.5rem"},src:t}),(0,ep.jsx)("span",{className:"align-middle",children:r})]})};tg.displayName="Nameplate";var tw={};eq(tw,"PageNav",function(){return tT});var tj=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tO=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tx=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},t_=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tP=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tk=Array.from(Array(6),function(e,t){return"h".concat(++t)})+"",tT=(B=[ek.observer],V=[],W=ew.PureComponent,H=[],G=[],J=[],A=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),M.set((0,eh._)(e),(tO((0,eh._)(e),H),tO((0,eh._)(e),G,[]))),q.set((0,eh._)(e),tO((0,eh._)(e),J,0)),Object.defineProperty((0,eh._)(e),"updateScrollY",{enumerable:!0,configurable:!0,writable:!0,value:function(){return e.scrollY=window.scrollY}}),Object.defineProperty((0,eh._)(e),"scrollTo",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return function(){var r,n;setTimeout(function(){return(0,eI.scrollTo)('[id="'.concat(t.id,'"]'))}),null===(n=(r=e.props).onItemClick)||void 0===n||n.call(r,t)}}}),Object.defineProperty((0,eh._)(e),"renderLink",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=t.id,n=t.level,a=t.text,o=t.top,i=(0,eh._)(e).currentActiveId,c=e.props.depth;return n<=(void 0===c?1/0:c)&&(0,ep.jsx)(eD.Nav.Item,{style:{textIndent:"".concat(n-1,"rem")},children:(0,ep.jsx)(eD.Nav.Link,{href:"#".concat(r),active:i===r,onClick:e.scrollTo({id:r,level:n,text:a,top:o}),children:a})},r)}}),e}return(0,ey._)(r,[{key:"list",get:function(){return tx(this,M,"f")},set:function(e){t_(this,M,e,"f")}},{key:"scrollY",get:function(){return tx(this,q,"f")},set:function(e){t_(this,q,e,"f")}},{key:"currentActiveId",get:function(){var e,t=this.list,r=this.scrollY,n=t.findIndex(function(e){return e.top>r});return null===(e=t[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(tk),function(e){e.id||(e.id=(0,eI.uniqueID)());var t=e.id,r=e.tagName,n=e.textContent,a=e.offsetTop;return{id:t,level:+r[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,t=this.props,r=t.style,n=t.variant,a=tP(t,["style","variant"]);return(0,ep.jsx)(eD.Nav,Object.assign({},a,{variant:void 0===n?"underline":n,style:Object.assign({flexDirection:"column"},r),children:e.map(this.renderLink)}))}}]),r}(W),M=new WeakMap,q=new WeakMap,R=A,U="PageNav","symbol"===(0,eT._)(U)&&(U=U.description?"[".concat(U.description,"]"):""),Object.defineProperty(R,"name",{configurable:!0,value:K?"".concat(K," ",U):U}),X="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(Q=W[Symbol.metadata])&&void 0!==Q?Q:null):void 0,z=[eP.observable],L=[eP.observable],F=[eP.computed],tj(A,null,z,{kind:"accessor",name:"list",static:!1,private:!1,access:{has:function(e){return"list"in e},get:function(e){return e.list},set:function(e,t){e.list=t}},metadata:X},G,H),tj(A,null,L,{kind:"accessor",name:"scrollY",static:!1,private:!1,access:{has:function(e){return"scrollY"in e},get:function(e){return e.scrollY},set:function(e,t){e.scrollY=t}},metadata:X},J,H),tj(A,null,F,{kind:"getter",name:"currentActiveId",static:!1,private:!1,access:{has:function(e){return"currentActiveId"in e},get:function(e){return e.currentActiveId}},metadata:X},null,H),tj(null,Y={value:A},B,{kind:"class",name:A.name,metadata:X},null,V),A=Y.value,X&&Object.defineProperty(A,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(A,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"PageNav"}),tO(A,V),A),tE={};eq(tE,"Option",function(){return tN}),eq(tE,"Select",function(){return tD});var tS=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tN=function(e){var t=e.value,r=e.children,n=tS(e,["value","children"]);return(0,ep.jsx)(eD.Dropdown.Item,Object.assign({},n,{"data-value":t,children:r}))};tN.displayName="Option";var tD=function(e){var t=e.className,r=e.style,n=e.variant,a=e.menuVariant,o=e.children,i=e.value,c=e.onChange,l=e.valueRender,s=(0,eI.makeArray)(o).flat(1/0).find(function(e){return(0,ew.isValidElement)(e)&&e.type===tN&&e.props.value===i});return(0,ep.jsxs)(eD.Dropdown,{onClick:function(e){var t=e.target.closest(".dropdown-item");if(t){var r=t.dataset.value;null==c||c(r)}},children:[(0,ep.jsx)(eD.Dropdown.Toggle,{className:eY(ev)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",t),style:r,variant:n,children:(null==l?void 0:l(i))||(0,ep.jsx)("div",{className:null==s?void 0:s.props.className,children:null==s?void 0:s.props.children})}),(0,ep.jsx)(eD.Dropdown.Menu,{variant:a,children:o})]})};tD.displayName="Select";var tC={};eq(tC,"SpinnerButton",function(){return tM});var tI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tM=function(e){var t=e.animation,r=e.loading,n=e.disabled,a=e.children,o=tI(e,["animation","loading","disabled","children"]);return(0,ep.jsxs)(eD.Button,Object.assign({},o,{disabled:r||n,children:[r&&(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(eD.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:t,role:"status","aria-hidden":"true"}),!a&&(0,ep.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};tM.displayName="SpinnerButton";var tq={};eq(tq,"TableSpinner",function(){return tY});var tY=function(e){var t=e.colSpan;return(0,ep.jsx)("tr",{children:(0,ep.jsx)("td",{className:"text-center p-4",colSpan:t,children:(0,ep.jsx)(eD.Spinner,{animation:"border",variant:"primary"})})})};tY.displayName="TableSpinner";var tA={};eq(tA,"TimeDistance",function(){return tL});var tz={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},tL=function(e){var t=e.className,r=e.date,n=e.unitWords,a=void 0===n?tz:n,o=e.beforeWord,i=e.afterWord;r=new Date(r);var c=(0,eI.diffTime)(r),l=c.distance,s=c.unit;return(0,ep.jsxs)("time",{className:t,dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(l)," ",a[s],l<0?void 0===o?" before":o:void 0===i?" after":i]})};tL.displayName="TimeDistance";var tF={};eq(tF,"TypeEcho",function(){return tG});var tB=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tV=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tW=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tH=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tG=(et=[ek.observer],er=[],en=ew.PureComponent,ea=[],eo=[],ee=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Z.set((0,eh._)(e),(tV((0,eh._)(e),ea),tV((0,eh._)(e),eo,""))),Object.defineProperty((0,eh._)(e),"init",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t&&new IntersectionObserver(function(t,r){var n,a,o,i=(0,ed._)(t,1)[0].isIntersecting;return n=void 0,a=void 0,o=function(){var e,t,n,a,o,c,l,s,u,d,f;return(0,eE._)(this,function(p){switch(p.label){case 0:if(!i)return[2];r.disconnect(),t=(e=this.props).text,a=void 0===(n=e.intervals)?150:n,o=!0,c=!1,l=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),s=t[Symbol.iterator](),p.label=2;case 2:if(o=(u=s.next()).done)return[3,5];return d=u.value,[4,(0,eI.sleep)(a/1e3)];case 3:p.sent(),this.echoed+=d,p.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return f=p.sent(),c=!0,l=f,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(c)throw l}return[7];case 8:return[2]}})},new(a||(a=Promise))(function(t,r){function i(e){try{l(o.next(e))}catch(e){r(e)}}function c(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(e){e(r)})).then(i,c)}l((o=o.apply(e,n||[])).next())})}).observe(t)}}),e}return(0,ey._)(r,[{key:"echoed",get:function(){return tW(this,Z,"f")},set:function(e){tH(this,Z,e,"f")}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.text,n=this.echoed;return(0,ep.jsx)("pre",{className:eY(ev)("text-wrap",t),ref:this.init,children:n+(n===r?"":"_")})}}]),r}(en),Z=new WeakMap,ei=ee,ec="TypeEcho","symbol"===(0,eT._)(ec)&&(ec=ec.description?"[".concat(ec.description,"]"):""),Object.defineProperty(ei,"name",{configurable:!0,value:el?"".concat(el," ",ec):ec}),eu="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(es=en[Symbol.metadata])&&void 0!==es?es:null):void 0,tB(ee,null,[eP.observable],{kind:"accessor",name:"echoed",static:!1,private:!1,access:{has:function(e){return"echoed"in e},get:function(e){return e.echoed},set:function(e,t){e.echoed=t}},metadata:eu},eo,ea),tB(null,$={value:ee},et,{kind:"class",name:ee.name,metadata:eu},null,er),ee=$.value,eu&&Object.defineProperty(ee,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eu}),Object.defineProperty(ee,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TypeEcho"}),tV(ee,er),ee);eM(module.exports,eA),eM(module.exports,eL),eM(module.exports,eV),eM(module.exports,eG),eM(module.exports,eR),eM(module.exports,eQ),eM(module.exports,e2),eM(module.exports,te),eM(module.exports,tn),eM(module.exports,ti),eM(module.exports,tl),eM(module.exports,tb),eM(module.exports,ts),eM(module.exports,tw),eM(module.exports,tE),eM(module.exports,tC),eM(module.exports,tq),eM(module.exports,tA),eM(module.exports,tF);
|
|
3
2
|
//# sourceMappingURL=index.js.map
|