hardpy 0.6.1__py3-none-any.whl → 0.8.0__py3-none-any.whl
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.
- hardpy/__init__.py +49 -49
- hardpy/cli/cli.py +8 -9
- hardpy/cli/template.py +6 -6
- hardpy/common/config.py +19 -18
- hardpy/hardpy_panel/api.py +9 -9
- hardpy/hardpy_panel/frontend/dist/asset-manifest.json +3 -3
- hardpy/hardpy_panel/frontend/dist/index.html +1 -1
- hardpy/hardpy_panel/frontend/dist/logo192.png +0 -0
- hardpy/hardpy_panel/frontend/dist/static/css/main.e8a862f1.css.map +1 -1
- hardpy/hardpy_panel/frontend/dist/static/js/main.6f09d61a.js +3 -0
- hardpy/hardpy_panel/frontend/dist/static/js/{main.7c954faf.js.map → main.6f09d61a.js.map} +1 -1
- hardpy/pytest_hardpy/db/__init__.py +4 -5
- hardpy/pytest_hardpy/db/base_connector.py +6 -5
- hardpy/pytest_hardpy/db/base_server.py +1 -1
- hardpy/pytest_hardpy/db/base_store.py +23 -9
- hardpy/pytest_hardpy/db/const.py +3 -1
- hardpy/pytest_hardpy/db/runstore.py +13 -15
- hardpy/pytest_hardpy/db/schema/__init__.py +9 -0
- hardpy/pytest_hardpy/db/{schema.py → schema/v1.py} +120 -79
- hardpy/pytest_hardpy/db/statestore.py +7 -20
- hardpy/pytest_hardpy/plugin.py +128 -85
- hardpy/pytest_hardpy/pytest_call.py +80 -32
- hardpy/pytest_hardpy/pytest_wrapper.py +8 -8
- hardpy/pytest_hardpy/reporter/__init__.py +2 -2
- hardpy/pytest_hardpy/reporter/base.py +32 -7
- hardpy/pytest_hardpy/reporter/hook_reporter.py +66 -37
- hardpy/pytest_hardpy/reporter/runner_reporter.py +6 -8
- hardpy/pytest_hardpy/result/__init__.py +2 -2
- hardpy/pytest_hardpy/result/couchdb_config.py +20 -16
- hardpy/pytest_hardpy/result/report_loader/couchdb_loader.py +2 -2
- hardpy/pytest_hardpy/result/report_reader/couchdb_reader.py +36 -20
- hardpy/pytest_hardpy/utils/__init__.py +34 -29
- hardpy/pytest_hardpy/utils/connection_data.py +6 -8
- hardpy/pytest_hardpy/utils/const.py +1 -1
- hardpy/pytest_hardpy/utils/dialog_box.py +105 -66
- hardpy/pytest_hardpy/utils/exception.py +14 -8
- hardpy/pytest_hardpy/utils/machineid.py +15 -0
- hardpy/pytest_hardpy/utils/node_info.py +45 -16
- hardpy/pytest_hardpy/utils/progress_calculator.py +4 -3
- hardpy/pytest_hardpy/utils/singleton.py +23 -16
- {hardpy-0.6.1.dist-info → hardpy-0.8.0.dist-info}/METADATA +26 -33
- {hardpy-0.6.1.dist-info → hardpy-0.8.0.dist-info}/RECORD +46 -43
- hardpy/hardpy_panel/frontend/dist/static/js/main.7c954faf.js +0 -3
- /hardpy/hardpy_panel/frontend/dist/static/js/{main.7c954faf.js.LICENSE.txt → main.6f09d61a.js.LICENSE.txt} +0 -0
- {hardpy-0.6.1.dist-info → hardpy-0.8.0.dist-info}/WHEEL +0 -0
- {hardpy-0.6.1.dist-info → hardpy-0.8.0.dist-info}/entry_points.txt +0 -0
- {hardpy-0.6.1.dist-info → hardpy-0.8.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see main.7c954faf.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={1856:(e,t,n)=>{"use strict";n.d(t,{c:()=>Ck});var r=n(9060),o=n.t(r,2),i=n(7328),a=n(264),s=n.n(a),c={CENTER:"center",LEFT:"left",RIGHT:"right"},l=0,u=1,d=2,f=3,h=4,p={NONE:"none",PRIMARY:"primary",SUCCESS:"success",WARNING:"warning",DANGER:"danger"},m={BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",LEFT:"left",LEFT_BOTTOM:"left-bottom",LEFT_TOP:"left-top",RIGHT:"right",RIGHT_BOTTOM:"right-bottom",RIGHT_TOP:"right-top",TOP:"top",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var g="bp5";"undefined"!==typeof BLUEPRINT_NAMESPACE?g=BLUEPRINT_NAMESPACE:"undefined"!==typeof REACT_APP_BLUEPRINT_NAMESPACE&&(g=REACT_APP_BLUEPRINT_NAMESPACE);var v="".concat(g,"-active"),y="".concat(g,"-align-left"),b="".concat(g,"-align-right"),_="".concat(g,"-compact"),w="".concat(g,"-dark"),x="".concat(g,"-disabled"),C="".concat(g,"-fill"),S=("".concat(g,"-fixed"),"".concat(g,"-fixed-top")),k="".concat(g,"-inline"),E="".concat(g,"-interactive"),O="".concat(g,"-large"),T="".concat(g,"-loading"),A="".concat(g,"-minimal"),R="".concat(g,"-outlined"),P=("".concat(g,"-padded"),"".concat(g,"-multiline"),"".concat(g,"-read-only")),N="".concat(g,"-round"),D="".concat(g,"-selected"),M="".concat(g,"-small"),I="".concat(g,"-vertical"),L=(rn(m.TOP),rn(m.BOTTOM),rn(m.LEFT),rn(m.RIGHT),en(l),en(u),en(d),en(f),en(h),nn(p.PRIMARY),nn(p.SUCCESS),nn(p.WARNING),nn(p.DANGER),"".concat(g,"-focus-disabled"),"".concat(g,"-focus-style-manager-ignore"),"".concat(g,"-ui-text"),"".concat(g,"-running-text"),"".concat(g,"-monospace-text"),"".concat(g,"-text-large"),"".concat(g,"-text-small"),"".concat(g,"-text-muted"),"".concat(g,"-text-disabled")),j="".concat(g,"-text-overflow-ellipsis"),F="".concat(g,"-blockquote"),B="".concat(g,"-code"),z="".concat(g,"-code-block"),H="".concat(g,"-heading"),V="".concat(g,"-list"),q=("".concat(g,"-list-unstyled"),"".concat(g,"-rtl"),"".concat(g,"-alert")),U="".concat(q,"-body"),W="".concat(q,"-contents"),$="".concat(q,"-footer"),G="".concat(g,"-breadcrumb"),K=("".concat(G,"-current"),"".concat(G,"s"),"".concat(G,"s-collapsed"),"".concat(g,"-button")),X=("".concat(K,"-group"),"".concat(K,"-spinner")),Y="".concat(K,"-text"),Q="".concat(g,"-callout"),Z="".concat(Q,"-has-body-content"),J="".concat(Q,"-icon"),ee="".concat(g,"-card"),te="".concat(g,"-control-card"),ne=("".concat(te,"-label"),"".concat(g,"-switch-control-card"),"".concat(g,"-checkbox-control-card"),"".concat(g,"-radio-control-card"),"".concat(g,"-card-list")),re=("".concat(ne,"-bordered"),"".concat(g,"-collapse")),oe="".concat(re,"-body"),ie="".concat(g,"-context-menu"),ae=("".concat(ie,"-virtual-target"),"".concat(ie,"-popover"),"".concat(ie,"-backdrop"),"".concat(g,"-control-group"),"".concat(g,"-dialog")),se="".concat(ae,"-container"),ce="".concat(ae,"-header"),le="".concat(ae,"-body"),ue=("".concat(ae,"-body-scroll-container"),"".concat(ae,"-close-button")),de="".concat(ae,"-footer"),fe=("".concat(ae,"-footer-fixed"),"".concat(ae,"-footer-main-section"),"".concat(ae,"-footer-actions"),"".concat(g,"-dialog-step")),he=("".concat(fe,"-container"),"".concat(fe,"-title"),"".concat(fe,"-icon"),"".concat(fe,"-viewed"),"".concat(g,"-divider")),pe="".concat(g,"-drawer"),me="".concat(pe,"-body"),ge="".concat(pe,"-footer"),ve=("".concat(pe,"-header"),"".concat(g,"-editable-text")),ye=("".concat(ve,"-content"),"".concat(ve,"-editing"),"".concat(ve,"-input"),"".concat(ve,"-placeholder"),"".concat(g,"-entity-title")),be=("".concat(g,"-entity-title-ellipsize"),"".concat(ye,"-has-subtitle"),"".concat(ye,"-icon-container"),"".concat(ye,"-subtitle"),"".concat(ye,"-tags-container"),"".concat(ye,"-text"),"".concat(ye,"-title"),"".concat(ye,"-title-and-tags"),"".concat(g,"-flex-expander")),_e=("".concat(g,"-html-select"),"".concat(g,"-select"),"".concat(g,"-html-table")),we=("".concat(_e,"-bordered"),"".concat(_e,"-striped"),"".concat(g,"-input")),xe=("".concat(we,"-ghost"),"".concat(we,"-group")),Ce="".concat(we,"-left-container"),Se="".concat(we,"-action"),ke=("".concat(g,"-resizable-input-span"),"".concat(g,"-text-area")),Ee=("".concat(ke,"-auto-resize"),"".concat(g,"-control")),Oe="".concat(Ee,"-indicator"),Te="".concat(Oe,"-child"),Ae="".concat(g,"-checkbox"),Re="".concat(g,"-radio"),Pe=("".concat(g,"-radio-group"),"".concat(g,"-switch")),Ne="".concat(Pe,"-inner-text"),De=("".concat(g,"-file-input"),"".concat(g,"-file-input-has-selection"),"".concat(g,"-file-upload-input"),"".concat(g,"-file-upload-input-custom-text"),"".concat(g,"-key")),Me=("".concat(De,"-combo"),"".concat(g,"-modifier-key"),"".concat(g,"-hotkey")),Ie=("".concat(Me,"-label"),"".concat(Me,"-column"),"".concat(Me,"-dialog"),"".concat(g,"-label")),Le=("".concat(g,"-form-group"),"".concat(g,"-form-content"),"".concat(g,"-form-helper-text"),"".concat(g,"-form-group-sub-label"),"".concat(g,"-menu")),je="".concat(Le,"-item"),Fe="".concat(je,"-is-selectable"),Be="".concat(je,"-selected-icon"),ze="".concat(je,"-icon"),He="".concat(je,"-label"),Ve="".concat(g,"-submenu"),qe="".concat(Ve,"-icon"),Ue=("".concat(Le,"-divider"),"".concat(Le,"-header"),"".concat(g,"-multistep-dialog")),We=("".concat(Ue,"-panels"),"".concat(Ue,"-left-panel"),"".concat(Ue,"-right-panel"),"".concat(Ue,"-nav-top"),"".concat(Ue,"-nav-right"),"".concat(g,"-section")),$e=("".concat(We,"-collapsed"),"".concat(We,"-header")),Ge=("".concat($e,"-left"),"".concat($e,"-title"),"".concat($e,"-sub-title"),"".concat($e,"-divider"),"".concat($e,"-tabs"),"".concat($e,"-right"),"".concat(We,"-card"),"".concat(g,"-navbar")),Ke="".concat(Ge,"-group"),Xe="".concat(Ge,"-heading"),Ye="".concat(Ge,"-divider"),Qe="".concat(g,"-non-ideal-state"),Ze=("".concat(Qe,"-visual"),"".concat(Qe,"-text"),"".concat(g,"-numeric-input"),"".concat(g,"-overflow-list")),Je=("".concat(Ze,"-spacer"),"".concat(g,"-overlay")),et="".concat(Je,"-backdrop"),tt=("".concat(Je,"-container"),"".concat(Je,"-content")),nt="".concat(Je,"-inline"),rt="".concat(Je,"-open"),ot="".concat(Je,"-scroll-container"),it="".concat(Je,"-start-focus-trap"),at="".concat(Je,"-end-focus-trap"),st="".concat(g,"-panel-stack"),ct=("".concat(st,"-header"),"".concat(st,"-header-back"),"".concat(st,"-view"),"".concat(g,"-panel-stack2"),"".concat(st,"-header"),"".concat(st,"-header-back"),"".concat(st,"-view"),"".concat(g,"-popover")),lt="".concat(ct,"-arrow"),ut="".concat(ct,"-backdrop"),dt="".concat(ct,"-capturing-dismiss"),ft="".concat(ct,"-content"),ht="".concat(ct,"-placement"),pt=("".concat(ft,"-sizing"),"".concat(ct,"-dismiss")),mt="".concat(pt,"-override"),gt="".concat(ct,"-match-target-width"),vt="".concat(ct,"-open"),yt="".concat(ct,"-popper-escaped"),bt="".concat(ct,"-reference-hidden"),_t="".concat(ct,"-target"),wt="".concat(ct,"-transition-container"),xt=("".concat(ct,"-wrapper"),"".concat(g,"-progress-bar")),Ct="".concat(g,"-progress-meter"),St="".concat(g,"-no-stripes"),kt="".concat(g,"-no-animation"),Et="".concat(g,"-portal"),Ot="".concat(g,"-skeleton"),Tt="".concat(g,"-slider"),At=("".concat(Tt,"-axis"),"".concat(Tt,"-handle"),"".concat(Tt,"-label"),"".concat(Tt,"-track"),"".concat(Tt,"-progress"),"".concat(g,"-start"),"".concat(g,"-end"),"".concat(g,"-spinner")),Rt="".concat(At,"-animation"),Pt="".concat(At,"-head"),Nt="".concat(g,"-no-spin"),Dt="".concat(At,"-track"),Mt=("".concat(g,"-segmented-control"),"".concat(g,"-tab")),It="".concat(Mt,"-icon"),Lt="".concat(Mt,"-tag"),jt="".concat(Mt,"-indicator"),Ft="".concat(jt,"-wrapper"),Bt="".concat(Mt,"-list"),zt="".concat(Mt,"-panel"),Ht="".concat(Mt,"s"),Vt="".concat(g,"-tag"),qt="".concat(Vt,"-remove"),Ut="".concat(g,"-compound-tag"),Wt=("".concat(Ut,"-left"),"".concat(Ut,"-left-content"),"".concat(Ut,"-right"),"".concat(Ut,"-right-content"),"".concat(g,"-tag-input")),$t=("".concat(Wt,"-icon"),"".concat(Wt,"-values"),"".concat(g,"-toast")),Gt=("".concat($t,"-container"),"".concat($t,"-message"),"".concat(g,"-tooltip")),Kt=("".concat(Gt,"-indicator"),"".concat(g,"-tree"),"".concat(g,"-tree-node")),Xt="".concat(Kt,"-caret"),Yt=("".concat(Xt,"-closed"),"".concat(Xt,"-none"),"".concat(Xt,"-open"),"".concat(Kt,"-content"),"".concat(Kt,"-expanded"),"".concat(Kt,"-icon"),"".concat(Kt,"-label"),"".concat(Kt,"-list"),"".concat(Kt,"-secondary-label"),"".concat(Kt,"-selected"),"".concat(g,"-tree-root"),"".concat(g,"-icon")),Qt="".concat(Yt,"-standard"),Zt="".concat(Yt,"-large");"".concat(Yt,"-muted");function Jt(e){switch(e){case c.LEFT:return y;case c.RIGHT:return b;default:return}}function en(e){if(void 0!==e)return"".concat(g,"-elevation-").concat(e)}function tn(e){if(null!=e)return 0===e.indexOf("".concat(g,"-icon-"))?e:"".concat(g,"-icon-").concat(e)}function nn(e){if(null!=e&&e!==p.NONE)return"".concat(g,"-intent-").concat(e.toLowerCase())}function rn(e){if(void 0!==e)return"".concat(g,"-position-").concat(e)}var on="Blueprint5",an=["active","alignText","asyncControl","containerRef","current","elementRef","ellipsizeText","fill","icon","iconSize","inputClassName","inputRef","intent","inline","large","loading","leftElement","leftIcon","minimal","onRemove","outlined","panel","panelClassName","popoverProps","rightElement","rightIcon","round","size","small","tagName","text","textClassName"];function sn(e,t,n){return void 0===t&&(t=an),void 0===n&&(n=!1),n&&(t=t.concat(an)),t.reduce((function(e,t){return-1!==t.indexOf("-")||e.hasOwnProperty(t)&&delete e[t],e}),(0,i.C3)({},e))}var cn=r.forwardRef((function(e,t){var n,o=e.className,a=e.elevation,c=e.interactive,l=e.selected,u=e.compact,d=(0,i.sX)(e,["className","elevation","interactive","selected","compact"]),f=s()(o,ee,en(a),((n={})[E]=c,n[_]=u,n[D]=l,n));return r.createElement("div",(0,i.C3)({className:f,ref:t},d))}));function ln(e,t){return r.forwardRef((function(n,o){var a=n.className,c=n.children,l=(0,i.sX)(n,["className","children"]);return r.createElement(e,(0,i.C3)((0,i.C3)({},l),{className:s()(t,a),ref:o}),c)}))}cn.defaultProps={elevation:l,interactive:!1},cn.displayName="".concat(on,".Card");var un=ln("h1",H),dn=ln("h2",H),fn=(ln("h3",H),ln("h4",H)),hn=ln("h5",H),pn=ln("h6",H),mn=(ln("blockquote",F),ln("code",B),ln("pre",z),ln("label",Ie),ln("ol",V),ln("ul",V),"[Blueprint]"),gn=mn+" clamp: max cannot be less than min",vn=mn+" <Alert> cancelButtonText and onCancel should be set together.",yn=mn+" <Alert> canEscapeKeyCancel enabled without onCancel or onClose handler.",bn=mn+" <Alert> canOutsideClickCancel enabled without onCancel or onClose handler.",_n=mn+" <InputGroup> leftElement and leftIcon prop are mutually exclusive, with leftElement taking priority.",wn="".concat(mn," <Popover> requires renderTarget prop or a child element."),xn="".concat(mn,' <Popover hasBackdrop={true}> requires interactionKind="click".'),Cn="".concat(mn," <Popover> supports only one child which is rendered as its target; additional children are ignored."),Sn=mn+" <Popover> with children ignores renderTarget prop; use either prop or children.",kn=mn+" Disabling <Popover> with empty/whitespace content...",En=mn+" <Popover usePortal={false}> ignores hasBackdrop",On=mn+" <Popover> supports either placement or position prop, not both.",Tn=mn+" <Popover> onInteraction is ignored when uncontrolled.",An=mn+" <Popover> targetProps value is ignored when renderTarget API is used.",Rn=mn+" <Portal> context blueprintPortalClassName must be string",Pn=mn+" setting blueprintPortalClassName via legacy React context API is deprecated, use <PortalProvider> instead.",Nn=mn+" <Spinner> Classes.SMALL/LARGE are ignored if size prop is set.",Dn=mn+" <Dialog> iconName is ignored if title is omitted.",Mn=mn+" <Dialog> isCloseButtonShown prop is ignored if title is omitted.",In=mn+" <Overlay2> was used outside of a <OverlaysProvider> context. This will no longer be supported in Blueprint v6. See https://github.com/palantir/blueprint/wiki/Overlay2-migration",Ln=mn+" <Overlay2> cannot use childRef and childRefs props simultaneously",jn=mn+" <Overlay2> requires childRefs prop when rendering multiple child elements",Fn=mn+" <Overlay2> requires each child element to have a unique key prop when childRefs is used";function Bn(e){return"undefined"!==typeof NODE_ENV&&NODE_ENV===e}function zn(e,t,n){if(null==e)return e;if(n<t)throw new Error(gn);return Math.min(Math.max(e,t),n)}var Hn=new Map;function Vn(e){return"string"===typeof e&&0===e.trim().length}var qn=function(e){function t(t){var n=e.call(this,t)||this;return n.timeoutIds=[],n.requestIds=[],n.clearTimeouts=function(){if(n.timeoutIds.length>0){for(var e=0,t=n.timeoutIds;e<t.length;e++){var r=t[e];window.clearTimeout(r)}n.timeoutIds=[]}},n.cancelAnimationFrames=function(){if(n.requestIds.length>0){for(var e=0,t=n.requestIds;e<t.length;e++){var r=t[e];window.cancelAnimationFrame(r)}n.requestIds=[]}},Bn("production")||n.validateProps(n.props),n}return(0,i.ct)(t,e),t.prototype.componentDidUpdate=function(e,t,n){Bn("production")||this.validateProps(this.props)},t.prototype.componentWillUnmount=function(){this.clearTimeouts(),this.cancelAnimationFrames()},t.prototype.requestAnimationFrame=function(e){var t=window.requestAnimationFrame(e);return this.requestIds.push(t),function(){return window.cancelAnimationFrame(t)}},t.prototype.setTimeout=function(e,t){var n=window.setTimeout(e,t);return this.timeoutIds.push(n),function(){return window.clearTimeout(n)}},t.prototype.validateProps=function(e){},t}(r.PureComponent),Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,o=t.children,a=t.large,c=t.small,l=t.ulRef,u=(0,i.sX)(t,["className","children","large","small","ulRef"]),d=s()(n,Le,((e={})[O]=a,e[M]=c,e));return r.createElement("ul",(0,i.C3)({role:"menu"},u,{className:d,ref:l}),o)},t.displayName="".concat(on,".Menu"),t}(qn),Wn=n(5384),$n="".concat("bp5","-icon"),Gn=new Map;var Kn=r.forwardRef((function(e,t){var n=e.children,o=e.className,a=e.color,c=e.htmlTitle,l=e.iconName,u=e.size,d=void 0===u?Wn.L.STANDARD:u,f=e.svgProps,h=e.tagName,p=void 0===h?"span":h,m=e.title,g=(0,i.sX)(e,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),v=d>=Wn.L.LARGE?Wn.L.LARGE:Wn.L.STANDARD,y="0 0 ".concat(v," ").concat(v),b=function(e){var t,n=null!==(t=Gn.get(e))&&void 0!==t?t:0;return Gn.set(e,n+1),"".concat(e,"-").concat(n)}("iconTitle"),_=(0,i.C3)({fill:a,height:d,role:"img",viewBox:y,width:d},f);return null===p?r.createElement("svg",(0,i.C3)({"aria-labelledby":m?b:void 0,"data-icon":l,ref:t},_,g,{className:s()(o,null===f||void 0===f?void 0:f.className)}),m&&r.createElement("title",{id:b},m),n):r.createElement(p,(0,i.C3)((0,i.C3)({"aria-hidden":!m||void 0},g),{className:s()($n,"".concat($n,"-").concat(l),o),ref:t,title:c}),r.createElement("svg",(0,i.C3)({"data-icon":l},_,{className:null===f||void 0===f?void 0:f.className}),m&&r.createElement("title",null,m),n))}));Kn.displayName="Blueprint5.SVGIconContainer";var Xn=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"small-tick",ref:t},e),r.createElement("path",{d:n?"M300 300C294.4000000000001 300 289.4000000000001 297.8 285.8 294.2L160 168.2L114.2 214.2C110.6 217.8 105.6 220 100 220C89 220 80 211 80 200C80 194.4 82.2 189.4 85.8 185.8L145.8 125.8C149.4 122.2 154.4 120 160 120S170.6 122.2 174.2 125.8L314.2000000000001 265.8C317.8 269.4 320 274.4 320 280C320 291 311 300 300 300z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L140 128.2L94.2 174.2C90.6 177.8 85.6 180 80 180C69 180 60 171 60 160C60 154.4 62.2 149.4 65.8 145.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));Xn.defaultProps={size:Wn.L.STANDARD},Xn.displayName="Blueprint5.Icon.SmallTick";var Yn=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"caret-right",ref:t},e),r.createElement("path",{d:n?"M280 200C280 206.2 277 211.4 272.6 215.2L272.8 215.4L152.8 315.4L152.6 315.2C149.2 318 144.8 320 140 320C129 320 120 311 120 300V100C120 89 129 80 140 80C144.8 80 149.2 82 152.6 84.8L152.8 84.6L272.8 184.6L272.6 184.8C277 188.6 280 193.8 280 200z":"M220 160C220 163 218.6 165.6 216.6 167.4L216.6 167.4L136.6 237.4L136.6 237.4C134.8 239 132.6 240 130 240C124.4 240 120 235.6 120 230V90C120 84.4 124.4 80 130 80C132.6 80 134.8 81 136.6 82.6C136.6 82.6 136.6 82.6 136.6 82.6L216.6 152.6L216.6 152.6C218.6 154.4 220 157 220 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));Yn.defaultProps={size:Wn.L.STANDARD},Yn.displayName="Blueprint5.Icon.CaretRight";function Qn(){return"undefined"!==typeof window&&null!=window.document}function Zn(e,t){var n;return null==e?document.activeElement:(null!==(n=e.getRootNode(t))&&void 0!==n?n:document).activeElement}function Jn(e){return function(t){return e.some((function(e){return t.key===e}))&&t.target.dispatchEvent(new MouseEvent("click",(0,i.C3)((0,i.C3)({},t),{view:void 0})))}}var er,tr,nr=n(9504),rr=n(3816);function or(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),(0,rr.u)(e,(0,i.C3)({delimiter:"."},t))}(e,(0,i.C3)({delimiter:"_"},t))}!function(e){e.AddClip="add-clip",e.AddColumnLeft="add-column-left",e.AddColumnRight="add-column-right",e.AddLocation="add-location",e.AddRowBottom="add-row-bottom",e.AddRowTop="add-row-top",e.AddToArtifact="add-to-artifact",e.AddToFolder="add-to-folder",e.Add="add",e.AimpointsTarget="aimpoints-target",e.Airplane="airplane",e.AlignCenter="align-center",e.AlignJustify="align-justify",e.AlignLeft="align-left",e.AlignRight="align-right",e.AlignmentBottom="alignment-bottom",e.AlignmentHorizontalCenter="alignment-horizontal-center",e.AlignmentLeft="alignment-left",e.AlignmentRight="alignment-right",e.AlignmentTop="alignment-top",e.AlignmentVerticalCenter="alignment-vertical-center",e.Ammunition="ammunition",e.Anchor="anchor",e.Annotation="annotation",e.Antenna="antenna",e.AppHeader="app-header",e.Application="application",e.Applications="applications",e.Archive="archive",e.AreaOfInterest="area-of-interest",e.ArrayBoolean="array-boolean",e.ArrayDate="array-date",e.ArrayFloatingPoint="array-floating-point",e.ArrayNumeric="array-numeric",e.ArrayString="array-string",e.ArrayTimestamp="array-timestamp",e.Array="array",e.ArrowBottomLeft="arrow-bottom-left",e.ArrowBottomRight="arrow-bottom-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowTopLeft="arrow-top-left",e.ArrowTopRight="arrow-top-right",e.ArrowUp="arrow-up",e.ArrowsHorizontal="arrows-horizontal",e.ArrowsVertical="arrows-vertical",e.Asterisk="asterisk",e.At="at",e.AutomaticUpdates="automatic-updates",e.Axle="axle",e.Backlink="backlink",e.Badge="badge",e.BanCircle="ban-circle",e.BankAccount="bank-account",e.Barcode="barcode",e.Blank="blank",e.BlockedPerson="blocked-person",e.Bold="bold",e.Book="book",e.Bookmark="bookmark",e.Box="box",e.Briefcase="briefcase",e.BringData="bring-data",e.BringForward="bring-forward",e.Bug="bug",e.Buggy="buggy",e.Build="build",e.Calculator="calculator",e.Calendar="calendar",e.Camera="camera",e.CaretDown="caret-down",e.CaretLeft="caret-left",e.CaretRight="caret-right",e.CaretUp="caret-up",e.CargoShip="cargo-ship",e.CellTower="cell-tower",e.Changes="changes",e.Chart="chart",e.Chat="chat",e.ChevronBackward="chevron-backward",e.ChevronDown="chevron-down",e.ChevronForward="chevron-forward",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.ChevronUp="chevron-up",e.CircleArrowDown="circle-arrow-down",e.CircleArrowLeft="circle-arrow-left",e.CircleArrowRight="circle-arrow-right",e.CircleArrowUp="circle-arrow-up",e.Circle="circle",e.Citation="citation",e.Clean="clean",e.Clip="clip",e.Clipboard="clipboard",e.CloudDownload="cloud-download",e.CloudTick="cloud-tick",e.CloudUpload="cloud-upload",e.Cloud="cloud",e.CodeBlock="code-block",e.Code="code",e.Cog="cog",e.CollapseAll="collapse-all",e.ColorFill="color-fill",e.ColumnLayout="column-layout",e.Comment="comment",e.Comparison="comparison",e.Compass="compass",e.Compressed="compressed",e.Confirm="confirm",e.Console="console",e.Contrast="contrast",e.Control="control",e.CreditCard="credit-card",e.Crop="crop",e.CrossCircle="cross-circle",e.Cross="cross",e.Crown="crown",e.CubeAdd="cube-add",e.CubeRemove="cube-remove",e.Cube="cube",e.CurvedRangeChart="curved-range-chart",e.Cut="cut",e.Cycle="cycle",e.Dashboard="dashboard",e.DataConnection="data-connection",e.DataLineage="data-lineage",e.Database="database",e.Delete="delete",e.Delta="delta",e.DeriveColumn="derive-column",e.Desktop="desktop",e.Detection="detection",e.Diagnosis="diagnosis",e.DiagramTree="diagram-tree",e.DirectionLeft="direction-left",e.DirectionRight="direction-right",e.Disable="disable",e.Divide="divide",e.DocumentOpen="document-open",e.DocumentShare="document-share",e.Document="document",e.Dollar="dollar",e.Dot="dot",e.DoubleCaretHorizontal="double-caret-horizontal",e.DoubleCaretVertical="double-caret-vertical",e.DoubleChevronDown="double-chevron-down",e.DoubleChevronLeft="double-chevron-left",e.DoubleChevronRight="double-chevron-right",e.DoubleChevronUp="double-chevron-up",e.DoughnutChart="doughnut-chart",e.Download="download",e.DragHandleHorizontal="drag-handle-horizontal",e.DragHandleVertical="drag-handle-vertical",e.Draw="draw",e.DrawerLeftFilled="drawer-left-filled",e.DrawerLeft="drawer-left",e.DrawerRightFilled="drawer-right-filled",e.DrawerRight="drawer-right",e.DriveTime="drive-time",e.Duplicate="duplicate",e.Edit="edit",e.Eject="eject",e.Emoji="emoji",e.Endnote="endnote",e.Endorsed="endorsed",e.Envelope="envelope",e.Equals="equals",e.Eraser="eraser",e.Error="error",e.Euro="euro",e.Exchange="exchange",e.ExcludeRow="exclude-row",e.ExpandAll="expand-all",e.Explain="explain",e.Export="export",e.EyeOff="eye-off",e.EyeOn="eye-on",e.EyeOpen="eye-open",e.FastBackward="fast-backward",e.FastForward="fast-forward",e.FeedSubscribed="feed-subscribed",e.Feed="feed",e.Film="film",e.FilterKeep="filter-keep",e.FilterList="filter-list",e.FilterOpen="filter-open",e.FilterRemove="filter-remove",e.Filter="filter",e.Flag="flag",e.Flame="flame",e.Flash="flash",e.FloatingPoint="floating-point",e.FloppyDisk="floppy-disk",e.FlowBranch="flow-branch",e.FlowEnd="flow-end",e.FlowLinear="flow-linear",e.FlowReviewBranch="flow-review-branch",e.FlowReview="flow-review",e.Flows="flows",e.FolderClose="folder-close",e.FolderNew="folder-new",e.FolderOpen="folder-open",e.FolderSharedOpen="folder-shared-open",e.FolderShared="folder-shared",e.Follower="follower",e.Following="following",e.Font="font",e.Fork="fork",e.Form="form",e.Fuel="fuel",e.FullCircle="full-circle",e.FullStackedChart="full-stacked-chart",e.Fullscreen="fullscreen",e.Function="function",e.GanttChart="gantt-chart",e.Generate="generate",e.Geofence="geofence",e.Geolocation="geolocation",e.Geosearch="geosearch",e.Geotime="geotime",e.GitBranch="git-branch",e.GitCommit="git-commit",e.GitMerge="git-merge",e.GitNewBranch="git-new-branch",e.GitPull="git-pull",e.GitPush="git-push",e.GitRepo="git-repo",e.Glass="glass",e.GlobeNetwork="globe-network",e.Globe="globe",e.GraphRemove="graph-remove",e.Graph="graph",e.GreaterThanOrEqualTo="greater-than-or-equal-to",e.GreaterThan="greater-than",e.GridView="grid-view",e.Grid="grid",e.GroupItem="group-item",e.GroupObjects="group-objects",e.GroupedBarChart="grouped-bar-chart",e.HandDown="hand-down",e.HandLeft="hand-left",e.HandRight="hand-right",e.HandUp="hand-up",e.Hand="hand",e.Hat="hat",e.HeaderOne="header-one",e.HeaderThree="header-three",e.HeaderTwo="header-two",e.Header="header",e.Headset="headset",e.HeartBroken="heart-broken",e.Heart="heart",e.HeatGrid="heat-grid",e.Heatmap="heatmap",e.Helicopter="helicopter",e.Help="help",e.HelperManagement="helper-management",e.HighPriority="high-priority",e.HighVoltagePole="high-voltage-pole",e.Highlight="highlight",e.History="history",e.Home="home",e.HorizontalBarChartAsc="horizontal-bar-chart-asc",e.HorizontalBarChartDesc="horizontal-bar-chart-desc",e.HorizontalBarChart="horizontal-bar-chart",e.HorizontalDistribution="horizontal-distribution",e.HorizontalInbetween="horizontal-inbetween",e.Hurricane="hurricane",e.IdNumber="id-number",e.ImageRotateLeft="image-rotate-left",e.ImageRotateRight="image-rotate-right",e.Import="import",e.InboxFiltered="inbox-filtered",e.InboxGeo="inbox-geo",e.InboxSearch="inbox-search",e.InboxUpdate="inbox-update",e.Inbox="inbox",e.InfoSign="info-sign",e.Inheritance="inheritance",e.InheritedGroup="inherited-group",e.InnerJoin="inner-join",e.Input="input",e.Insert="insert",e.Intelligence="intelligence",e.Intersection="intersection",e.IpAddress="ip-address",e.IssueClosed="issue-closed",e.IssueNew="issue-new",e.Issue="issue",e.Italic="italic",e.JoinTable="join-table",e.KeyBackspace="key-backspace",e.KeyCommand="key-command",e.KeyControl="key-control",e.KeyDelete="key-delete",e.KeyEnter="key-enter",e.KeyEscape="key-escape",e.KeyOption="key-option",e.KeyShift="key-shift",e.KeyTab="key-tab",e.Key="key",e.KnownVehicle="known-vehicle",e.LabTest="lab-test",e.Label="label",e.LayerOutline="layer-outline",e.Layer="layer",e.Layers="layers",e.LayoutAuto="layout-auto",e.LayoutBalloon="layout-balloon",e.LayoutCircle="layout-circle",e.LayoutGrid="layout-grid",e.LayoutGroupBy="layout-group-by",e.LayoutHierarchy="layout-hierarchy",e.LayoutLinear="layout-linear",e.LayoutSkewGrid="layout-skew-grid",e.LayoutSortedClusters="layout-sorted-clusters",e.Layout="layout",e.Learning="learning",e.LeftJoin="left-join",e.LengthenText="lengthen-text",e.LessThanOrEqualTo="less-than-or-equal-to",e.LessThan="less-than",e.Lifesaver="lifesaver",e.Lightbulb="lightbulb",e.Lightning="lightning",e.Link="link",e.ListColumns="list-columns",e.ListDetailView="list-detail-view",e.List="list",e.Locate="locate",e.Lock="lock",e.Locomotive="locomotive",e.LogIn="log-in",e.LogOut="log-out",e.LowVoltagePole="low-voltage-pole",e.Manual="manual",e.ManuallyEnteredData="manually-entered-data",e.ManyToMany="many-to-many",e.ManyToOne="many-to-one",e.MapCreate="map-create",e.MapMarker="map-marker",e.Map="map",e.Maximize="maximize",e.Media="media",e.MenuClosed="menu-closed",e.MenuOpen="menu-open",e.Menu="menu",e.MergeColumns="merge-columns",e.MergeLinks="merge-links",e.Microphone="microphone",e.Minimize="minimize",e.Minus="minus",e.MobilePhone="mobile-phone",e.MobileVideo="mobile-video",e.ModalFilled="modal-filled",e.Modal="modal",e.Model="model",e.Moon="moon",e.More="more",e.Mountain="mountain",e.Move="move",e.Mugshot="mugshot",e.MultiSelect="multi-select",e.Music="music",e.Nest="nest",e.NewDrawing="new-drawing",e.NewGridItem="new-grid-item",e.NewLayer="new-layer",e.NewLayers="new-layers",e.NewLink="new-link",e.NewObject="new-object",e.NewPerson="new-person",e.NewPrescription="new-prescription",e.NewShield="new-shield",e.NewTextBox="new-text-box",e.Ninja="ninja",e.NotEqualTo="not-equal-to",e.NotificationsSnooze="notifications-snooze",e.NotificationsUpdated="notifications-updated",e.Notifications="notifications",e.NumberedList="numbered-list",e.Numerical="numerical",e.Office="office",e.Offline="offline",e.OilField="oil-field",e.OneColumn="one-column",e.OneToMany="one-to-many",e.OneToOne="one-to-one",e.OpenApplication="open-application",e.Outdated="outdated",e.PageLayout="page-layout",e.PanelStats="panel-stats",e.PanelTable="panel-table",e.Paperclip="paperclip",e.Paragraph="paragraph",e.PasteVariable="paste-variable",e.PathSearch="path-search",e.Path="path",e.Pause="pause",e.People="people",e.Percentage="percentage",e.Person="person",e.PhoneCall="phone-call",e.PhoneForward="phone-forward",e.Phone="phone",e.PieChart="pie-chart",e.Pin="pin",e.PivotTable="pivot-table",e.Pivot="pivot",e.Play="play",e.Playbook="playbook",e.Plus="plus",e.PolygonFilter="polygon-filter",e.Power="power",e.PredictiveAnalysis="predictive-analysis",e.Prescription="prescription",e.Presentation="presentation",e.Print="print",e.Projects="projects",e.Properties="properties",e.Property="property",e.PublishFunction="publish-function",e.Pulse="pulse",e.Rain="rain",e.Random="random",e.Record="record",e.RectHeight="rect-height",e.RectWidth="rect-width",e.Rectangle="rectangle",e.Redo="redo",e.Refresh="refresh",e.Regex="regex",e.RegressionChart="regression-chart",e.RemoveColumnLeft="remove-column-left",e.RemoveColumnRight="remove-column-right",e.RemoveColumn="remove-column",e.RemoveRowBottom="remove-row-bottom",e.RemoveRowTop="remove-row-top",e.Remove="remove",e.Repeat="repeat",e.Reset="reset",e.Resolve="resolve",e.Rig="rig",e.RightJoin="right-join",e.Ring="ring",e.RocketSlant="rocket-slant",e.Rocket="rocket",e.RotateDocument="rotate-document",e.RotatePage="rotate-page",e.Route="route",e.Satellite="satellite",e.Saved="saved",e.ScatterPlot="scatter-plot",e.SearchAround="search-around",e.SearchTemplate="search-template",e.SearchText="search-text",e.Search="search",e.SegmentedControl="segmented-control",e.Select="select",e.Selection="selection",e.SendBackward="send-backward",e.SendMessage="send-message",e.SendToGraph="send-to-graph",e.SendToMap="send-to-map",e.SendTo="send-to",e.Sensor="sensor",e.SeriesAdd="series-add",e.SeriesConfiguration="series-configuration",e.SeriesDerived="series-derived",e.SeriesFiltered="series-filtered",e.SeriesSearch="series-search",e.Settings="settings",e.Shapes="shapes",e.Share="share",e.SharedFilter="shared-filter",e.Shield="shield",e.Ship="ship",e.Shop="shop",e.ShoppingCart="shopping-cart",e.ShortenText="shorten-text",e.SignalSearch="signal-search",e.SimCard="sim-card",e.Slash="slash",e.SmallCross="small-cross",e.SmallInfoSign="small-info-sign",e.SmallMinus="small-minus",e.SmallPlus="small-plus",e.SmallSquare="small-square",e.SmallTick="small-tick",e.Snowflake="snowflake",e.SoccerBall="soccer-ball",e.SocialMedia="social-media",e.SortAlphabeticalDesc="sort-alphabetical-desc",e.SortAlphabetical="sort-alphabetical",e.SortAsc="sort-asc",e.SortDesc="sort-desc",e.SortNumericalDesc="sort-numerical-desc",e.SortNumerical="sort-numerical",e.Sort="sort",e.SpellCheck="spell-check",e.SplitColumns="split-columns",e.SportsStadium="sports-stadium",e.Square="square",e.StackedChart="stacked-chart",e.StadiumGeometry="stadium-geometry",e.StarEmpty="star-empty",e.Star="star",e.StepBackward="step-backward",e.StepChart="step-chart",e.StepForward="step-forward",e.Stop="stop",e.Stopwatch="stopwatch",e.Strikethrough="strikethrough",e.Style="style",e.Subscript="subscript",e.Superscript="superscript",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Switch="switch",e.SymbolCircle="symbol-circle",e.SymbolCross="symbol-cross",e.SymbolDiamond="symbol-diamond",e.SymbolRectangle="symbol-rectangle",e.SymbolSquare="symbol-square",e.SymbolTriangleDown="symbol-triangle-down",e.SymbolTriangleUp="symbol-triangle-up",e.Syringe="syringe",e.Tag="tag",e.TakeAction="take-action",e.Tank="tank",e.Target="target",e.Taxi="taxi",e.Team="team",e.Temperature="temperature",e.TextHighlight="text-highlight",e.ThDerived="th-derived",e.ThDisconnect="th-disconnect",e.ThFiltered="th-filtered",e.ThList="th-list",e.Th="th",e.ThirdParty="third-party",e.ThumbsDown="thumbs-down",e.ThumbsUp="thumbs-up",e.TickCircle="tick-circle",e.Tick="tick",e.Time="time",e.TimelineAreaChart="timeline-area-chart",e.TimelineBarChart="timeline-bar-chart",e.TimelineEvents="timeline-events",e.TimelineLineChart="timeline-line-chart",e.Tint="tint",e.Torch="torch",e.Tractor="tractor",e.Train="train",e.Translate="translate",e.Trash="trash",e.Tree="tree",e.TrendingDown="trending-down",e.TrendingUp="trending-up",e.Trophy="trophy",e.Truck="truck",e.TwoColumns="two-columns",e.Unarchive="unarchive",e.Underline="underline",e.Undo="undo",e.UngroupObjects="ungroup-objects",e.UnknownVehicle="unknown-vehicle",e.Unlink="unlink",e.Unlock="unlock",e.Unpin="unpin",e.Unresolve="unresolve",e.Updated="updated",e.Upload="upload",e.User="user",e.Variable="variable",e.VerticalBarChartAsc="vertical-bar-chart-asc",e.VerticalBarChartDesc="vertical-bar-chart-desc",e.VerticalDistribution="vertical-distribution",e.VerticalInbetween="vertical-inbetween",e.Video="video",e.Virus="virus",e.VolumeDown="volume-down",e.VolumeOff="volume-off",e.VolumeUp="volume-up",e.Walk="walk",e.WarningSign="warning-sign",e.WaterfallChart="waterfall-chart",e.Waves="waves",e.WidgetButton="widget-button",e.WidgetFooter="widget-footer",e.WidgetHeader="widget-header",e.Widget="widget",e.Wind="wind",e.Wrench="wrench",e.ZoomIn="zoom-in",e.ZoomOut="zoom-out",e.ZoomToFit="zoom-to-fit"}(tr||(tr={}));(er={})[tr.AddClip]="61697",er[tr.AddColumnLeft]="61698",er[tr.AddColumnRight]="61699",er[tr.AddLocation]="61700",er[tr.AddRowBottom]="61701",er[tr.AddRowTop]="61702",er[tr.AddToArtifact]="61703",er[tr.AddToFolder]="61704",er[tr.Add]="61705",er[tr.AimpointsTarget]="62261",er[tr.Airplane]="61706",er[tr.AlignCenter]="61707",er[tr.AlignJustify]="61708",er[tr.AlignLeft]="61709",er[tr.AlignRight]="61710",er[tr.AlignmentBottom]="61711",er[tr.AlignmentHorizontalCenter]="61712",er[tr.AlignmentLeft]="61713",er[tr.AlignmentRight]="61714",er[tr.AlignmentTop]="61715",er[tr.AlignmentVerticalCenter]="61716",er[tr.Ammunition]="62274",er[tr.Anchor]="62256",er[tr.Annotation]="61717",er[tr.Antenna]="61718",er[tr.AppHeader]="61719",er[tr.Application]="61720",er[tr.Applications]="61721",er[tr.Archive]="61722",er[tr.AreaOfInterest]="61723",er[tr.ArrayBoolean]="61724",er[tr.ArrayDate]="61725",er[tr.ArrayFloatingPoint]="62253",er[tr.ArrayNumeric]="61726",er[tr.ArrayString]="61727",er[tr.ArrayTimestamp]="61728",er[tr.Array]="61729",er[tr.ArrowBottomLeft]="61730",er[tr.ArrowBottomRight]="61731",er[tr.ArrowDown]="61732",er[tr.ArrowLeft]="61733",er[tr.ArrowRight]="61734",er[tr.ArrowTopLeft]="61735",er[tr.ArrowTopRight]="61736",er[tr.ArrowUp]="61737",er[tr.ArrowsHorizontal]="61738",er[tr.ArrowsVertical]="61739",er[tr.Asterisk]="61740",er[tr.At]="62257",er[tr.AutomaticUpdates]="61741",er[tr.Axle]="62264",er[tr.Backlink]="61742",er[tr.Badge]="61743",er[tr.BanCircle]="61744",er[tr.BankAccount]="61745",er[tr.Barcode]="61746",er[tr.Blank]="61747",er[tr.BlockedPerson]="61748",er[tr.Bold]="61749",er[tr.Book]="61750",er[tr.Bookmark]="61751",er[tr.Box]="61752",er[tr.Briefcase]="61753",er[tr.BringData]="61754",er[tr.BringForward]="62292",er[tr.Bug]="62254",er[tr.Buggy]="61755",er[tr.Build]="61756",er[tr.Calculator]="61757",er[tr.Calendar]="61758",er[tr.Camera]="61759",er[tr.CaretDown]="61760",er[tr.CaretLeft]="61761",er[tr.CaretRight]="61762",er[tr.CaretUp]="61763",er[tr.CargoShip]="61764",er[tr.CellTower]="61765",er[tr.Changes]="61766",er[tr.Chart]="61767",er[tr.Chat]="61768",er[tr.ChevronBackward]="61769",er[tr.ChevronDown]="61770",er[tr.ChevronForward]="61771",er[tr.ChevronLeft]="61772",er[tr.ChevronRight]="61773",er[tr.ChevronUp]="61774",er[tr.CircleArrowDown]="61775",er[tr.CircleArrowLeft]="61776",er[tr.CircleArrowRight]="61777",er[tr.CircleArrowUp]="61778",er[tr.Circle]="61779",er[tr.Citation]="61780",er[tr.Clean]="61781",er[tr.Clip]="61782",er[tr.Clipboard]="61783",er[tr.CloudDownload]="61784",er[tr.CloudTick]="62286",er[tr.CloudUpload]="61785",er[tr.Cloud]="61786",er[tr.CodeBlock]="61787",er[tr.Code]="61788",er[tr.Cog]="61789",er[tr.CollapseAll]="61790",er[tr.ColorFill]="62248",er[tr.ColumnLayout]="61791",er[tr.Comment]="61792",er[tr.Comparison]="61793",er[tr.Compass]="61794",er[tr.Compressed]="61795",er[tr.Confirm]="61796",er[tr.Console]="61797",er[tr.Contrast]="61798",er[tr.Control]="61799",er[tr.CreditCard]="61800",er[tr.Crop]="62291",er[tr.CrossCircle]="62262",er[tr.Cross]="61801",er[tr.Crown]="61802",er[tr.CubeAdd]="61803",er[tr.CubeRemove]="61804",er[tr.Cube]="61805",er[tr.CurvedRangeChart]="61806",er[tr.Cut]="61807",er[tr.Cycle]="61808",er[tr.Dashboard]="61809",er[tr.DataConnection]="61810",er[tr.DataLineage]="61811",er[tr.Database]="61812",er[tr.Delete]="61813",er[tr.Delta]="61814",er[tr.DeriveColumn]="61815",er[tr.Desktop]="61816",er[tr.Detection]="62273",er[tr.Diagnosis]="61817",er[tr.DiagramTree]="61818",er[tr.DirectionLeft]="61819",er[tr.DirectionRight]="61820",er[tr.Disable]="61821",er[tr.Divide]="62247",er[tr.DocumentOpen]="61822",er[tr.DocumentShare]="61823",er[tr.Document]="61824",er[tr.Dollar]="61825",er[tr.Dot]="61826",er[tr.DoubleCaretHorizontal]="61827",er[tr.DoubleCaretVertical]="61828",er[tr.DoubleChevronDown]="61829",er[tr.DoubleChevronLeft]="61830",er[tr.DoubleChevronRight]="61831",er[tr.DoubleChevronUp]="61832",er[tr.DoughnutChart]="61833",er[tr.Download]="61834",er[tr.DragHandleHorizontal]="61835",er[tr.DragHandleVertical]="61836",er[tr.Draw]="61837",er[tr.DrawerLeftFilled]="61838",er[tr.DrawerLeft]="61839",er[tr.DrawerRightFilled]="61840",er[tr.DrawerRight]="61841",er[tr.DriveTime]="61842",er[tr.Duplicate]="61843",er[tr.Edit]="61844",er[tr.Eject]="61845",er[tr.Emoji]="61846",er[tr.Endnote]="62294",er[tr.Endorsed]="61847",er[tr.Envelope]="61848",er[tr.Equals]="61849",er[tr.Eraser]="61850",er[tr.Error]="61851",er[tr.Euro]="61852",er[tr.Exchange]="61853",er[tr.ExcludeRow]="61854",er[tr.ExpandAll]="61855",er[tr.Explain]="62285",er[tr.Export]="61856",er[tr.EyeOff]="61857",er[tr.EyeOn]="61858",er[tr.EyeOpen]="61859",er[tr.FastBackward]="61860",er[tr.FastForward]="61861",er[tr.FeedSubscribed]="61862",er[tr.Feed]="61863",er[tr.Film]="61864",er[tr.FilterKeep]="61865",er[tr.FilterList]="61866",er[tr.FilterOpen]="61867",er[tr.FilterRemove]="61868",er[tr.Filter]="61869",er[tr.Flag]="61870",er[tr.Flame]="61871",er[tr.Flash]="61872",er[tr.FloatingPoint]="62252",er[tr.FloppyDisk]="61873",er[tr.FlowBranch]="61874",er[tr.FlowEnd]="61875",er[tr.FlowLinear]="61876",er[tr.FlowReviewBranch]="61877",er[tr.FlowReview]="61878",er[tr.Flows]="61879",er[tr.FolderClose]="61880",er[tr.FolderNew]="61881",er[tr.FolderOpen]="61882",er[tr.FolderSharedOpen]="61883",er[tr.FolderShared]="61884",er[tr.Follower]="61885",er[tr.Following]="61886",er[tr.Font]="61887",er[tr.Fork]="61888",er[tr.Form]="61889",er[tr.Fuel]="62243",er[tr.FullCircle]="61890",er[tr.FullStackedChart]="61891",er[tr.Fullscreen]="61892",er[tr.Function]="61893",er[tr.GanttChart]="61894",er[tr.Generate]="62284",er[tr.Geofence]="61895",er[tr.Geolocation]="61896",er[tr.Geosearch]="61897",er[tr.Geotime]="62276",er[tr.GitBranch]="61898",er[tr.GitCommit]="61899",er[tr.GitMerge]="61900",er[tr.GitNewBranch]="61901",er[tr.GitPull]="61902",er[tr.GitPush]="61903",er[tr.GitRepo]="61904",er[tr.Glass]="61905",er[tr.GlobeNetwork]="61906",er[tr.Globe]="61907",er[tr.GraphRemove]="61908",er[tr.Graph]="61909",er[tr.GreaterThanOrEqualTo]="61910",er[tr.GreaterThan]="61911",er[tr.GridView]="61912",er[tr.Grid]="61913",er[tr.GroupItem]="62282",er[tr.GroupObjects]="61914",er[tr.GroupedBarChart]="61915",er[tr.HandDown]="61916",er[tr.HandLeft]="61917",er[tr.HandRight]="61918",er[tr.HandUp]="61919",er[tr.Hand]="61920",er[tr.Hat]="61921",er[tr.HeaderOne]="61922",er[tr.HeaderThree]="61923",er[tr.HeaderTwo]="61924",er[tr.Header]="61925",er[tr.Headset]="61926",er[tr.HeartBroken]="61927",er[tr.Heart]="61928",er[tr.HeatGrid]="61929",er[tr.Heatmap]="61930",er[tr.Helicopter]="61931",er[tr.Help]="61932",er[tr.HelperManagement]="61933",er[tr.HighPriority]="61934",er[tr.HighVoltagePole]="62259",er[tr.Highlight]="61935",er[tr.History]="61936",er[tr.Home]="61937",er[tr.HorizontalBarChartAsc]="61938",er[tr.HorizontalBarChartDesc]="61939",er[tr.HorizontalBarChart]="61940",er[tr.HorizontalDistribution]="61941",er[tr.HorizontalInbetween]="62249",er[tr.Hurricane]="61942",er[tr.IdNumber]="61943",er[tr.ImageRotateLeft]="61944",er[tr.ImageRotateRight]="61945",er[tr.Import]="61946",er[tr.InboxFiltered]="61947",er[tr.InboxGeo]="61948",er[tr.InboxSearch]="61949",er[tr.InboxUpdate]="61950",er[tr.Inbox]="61951",er[tr.InfoSign]="61952",er[tr.Inheritance]="61953",er[tr.InheritedGroup]="61954",er[tr.InnerJoin]="61955",er[tr.Input]="62283",er[tr.Insert]="61956",er[tr.Intelligence]="62263",er[tr.Intersection]="61957",er[tr.IpAddress]="61958",er[tr.IssueClosed]="61959",er[tr.IssueNew]="61960",er[tr.Issue]="61961",er[tr.Italic]="61962",er[tr.JoinTable]="61963",er[tr.KeyBackspace]="61964",er[tr.KeyCommand]="61965",er[tr.KeyControl]="61966",er[tr.KeyDelete]="61967",er[tr.KeyEnter]="61968",er[tr.KeyEscape]="61969",er[tr.KeyOption]="61970",er[tr.KeyShift]="61971",er[tr.KeyTab]="61972",er[tr.Key]="61973",er[tr.KnownVehicle]="61974",er[tr.LabTest]="61975",er[tr.Label]="61976",er[tr.LayerOutline]="61977",er[tr.Layer]="61978",er[tr.Layers]="61979",er[tr.LayoutAuto]="61980",er[tr.LayoutBalloon]="61981",er[tr.LayoutCircle]="61982",er[tr.LayoutGrid]="61983",er[tr.LayoutGroupBy]="61984",er[tr.LayoutHierarchy]="61985",er[tr.LayoutLinear]="61986",er[tr.LayoutSkewGrid]="61987",er[tr.LayoutSortedClusters]="61988",er[tr.Layout]="61989",er[tr.Learning]="61990",er[tr.LeftJoin]="61991",er[tr.LengthenText]="62270",er[tr.LessThanOrEqualTo]="61992",er[tr.LessThan]="61993",er[tr.Lifesaver]="61994",er[tr.Lightbulb]="61995",er[tr.Lightning]="61996",er[tr.Link]="61997",er[tr.ListColumns]="61998",er[tr.ListDetailView]="61999",er[tr.List]="62000",er[tr.Locate]="62001",er[tr.Lock]="62002",er[tr.Locomotive]="62267",er[tr.LogIn]="62003",er[tr.LogOut]="62004",er[tr.LowVoltagePole]="62258",er[tr.Manual]="62005",er[tr.ManuallyEnteredData]="62006",er[tr.ManyToMany]="62007",er[tr.ManyToOne]="62008",er[tr.MapCreate]="62009",er[tr.MapMarker]="62010",er[tr.Map]="62011",er[tr.Maximize]="62012",er[tr.Media]="62013",er[tr.MenuClosed]="62014",er[tr.MenuOpen]="62015",er[tr.Menu]="62016",er[tr.MergeColumns]="62017",er[tr.MergeLinks]="62018",er[tr.Microphone]="62275",er[tr.Minimize]="62019",er[tr.Minus]="62020",er[tr.MobilePhone]="62021",er[tr.MobileVideo]="62022",er[tr.ModalFilled]="62023",er[tr.Modal]="62024",er[tr.Model]="62269",er[tr.Moon]="62025",er[tr.More]="62026",er[tr.Mountain]="62027",er[tr.Move]="62028",er[tr.Mugshot]="62029",er[tr.MultiSelect]="62030",er[tr.Music]="62031",er[tr.Nest]="62032",er[tr.NewDrawing]="62033",er[tr.NewGridItem]="62034",er[tr.NewLayer]="62035",er[tr.NewLayers]="62036",er[tr.NewLink]="62037",er[tr.NewObject]="62038",er[tr.NewPerson]="62039",er[tr.NewPrescription]="62040",er[tr.NewShield]="62281",er[tr.NewTextBox]="62041",er[tr.Ninja]="62042",er[tr.NotEqualTo]="62043",er[tr.NotificationsSnooze]="62044",er[tr.NotificationsUpdated]="62045",er[tr.Notifications]="62046",er[tr.NumberedList]="62047",er[tr.Numerical]="62048",er[tr.Office]="62049",er[tr.Offline]="62050",er[tr.OilField]="62051",er[tr.OneColumn]="62052",er[tr.OneToMany]="62053",er[tr.OneToOne]="62054",er[tr.OpenApplication]="62251",er[tr.Outdated]="62055",er[tr.PageLayout]="62056",er[tr.PanelStats]="62057",er[tr.PanelTable]="62058",er[tr.Paperclip]="62059",er[tr.Paragraph]="62060",er[tr.PasteVariable]="62278",er[tr.PathSearch]="62061",er[tr.Path]="62062",er[tr.Pause]="62063",er[tr.People]="62064",er[tr.Percentage]="62065",er[tr.Person]="62066",er[tr.PhoneCall]="62279",er[tr.PhoneForward]="62280",er[tr.Phone]="62067",er[tr.PieChart]="62068",er[tr.Pin]="62069",er[tr.PivotTable]="62070",er[tr.Pivot]="62071",er[tr.Play]="62072",er[tr.Playbook]="62244",er[tr.Plus]="62073",er[tr.PolygonFilter]="62074",er[tr.Power]="62075",er[tr.PredictiveAnalysis]="62076",er[tr.Prescription]="62077",er[tr.Presentation]="62078",er[tr.Print]="62079",er[tr.Projects]="62080",er[tr.Properties]="62081",er[tr.Property]="62082",er[tr.PublishFunction]="62083",er[tr.Pulse]="62084",er[tr.Rain]="62085",er[tr.Random]="62086",er[tr.Record]="62087",er[tr.RectHeight]="62245",er[tr.RectWidth]="62246",er[tr.Rectangle]="62241",er[tr.Redo]="62088",er[tr.Refresh]="62089",er[tr.Regex]="62255",er[tr.RegressionChart]="62090",er[tr.RemoveColumnLeft]="62091",er[tr.RemoveColumnRight]="62092",er[tr.RemoveColumn]="62093",er[tr.RemoveRowBottom]="62094",er[tr.RemoveRowTop]="62095",er[tr.Remove]="62096",er[tr.Repeat]="62097",er[tr.Reset]="62098",er[tr.Resolve]="62099",er[tr.Rig]="62100",er[tr.RightJoin]="62101",er[tr.Ring]="62102",er[tr.RocketSlant]="62103",er[tr.Rocket]="62104",er[tr.RotateDocument]="62105",er[tr.RotatePage]="62106",er[tr.Route]="62107",er[tr.Satellite]="62108",er[tr.Saved]="62109",er[tr.ScatterPlot]="62110",er[tr.SearchAround]="62111",er[tr.SearchTemplate]="62112",er[tr.SearchText]="62113",er[tr.Search]="62114",er[tr.SegmentedControl]="62115",er[tr.Select]="62116",er[tr.Selection]="62117",er[tr.SendBackward]="62293",er[tr.SendMessage]="62118",er[tr.SendToGraph]="62119",er[tr.SendToMap]="62120",er[tr.SendTo]="62121",er[tr.Sensor]="62268",er[tr.SeriesAdd]="62122",er[tr.SeriesConfiguration]="62123",er[tr.SeriesDerived]="62124",er[tr.SeriesFiltered]="62125",er[tr.SeriesSearch]="62126",er[tr.Settings]="62127",er[tr.Shapes]="62128",er[tr.Share]="62129",er[tr.SharedFilter]="62130",er[tr.Shield]="62131",er[tr.Ship]="62132",er[tr.Shop]="62133",er[tr.ShoppingCart]="62134",er[tr.ShortenText]="62271",er[tr.SignalSearch]="62135",er[tr.SimCard]="62136",er[tr.Slash]="62137",er[tr.SmallCross]="62138",er[tr.SmallInfoSign]="62260",er[tr.SmallMinus]="62139",er[tr.SmallPlus]="62140",er[tr.SmallSquare]="62141",er[tr.SmallTick]="62142",er[tr.Snowflake]="62143",er[tr.SoccerBall]="62288",er[tr.SocialMedia]="62144",er[tr.SortAlphabeticalDesc]="62145",er[tr.SortAlphabetical]="62146",er[tr.SortAsc]="62147",er[tr.SortDesc]="62148",er[tr.SortNumericalDesc]="62149",er[tr.SortNumerical]="62150",er[tr.Sort]="62151",er[tr.SpellCheck]="62272",er[tr.SplitColumns]="62152",er[tr.SportsStadium]="62289",er[tr.Square]="62153",er[tr.StackedChart]="62154",er[tr.StadiumGeometry]="62155",er[tr.StarEmpty]="62156",er[tr.Star]="62157",er[tr.StepBackward]="62158",er[tr.StepChart]="62159",er[tr.StepForward]="62160",er[tr.Stop]="62161",er[tr.Stopwatch]="62162",er[tr.Strikethrough]="62163",er[tr.Style]="62164",er[tr.Subscript]="62265",er[tr.Superscript]="62266",er[tr.SwapHorizontal]="62165",er[tr.SwapVertical]="62166",er[tr.Switch]="62167",er[tr.SymbolCircle]="62168",er[tr.SymbolCross]="62169",er[tr.SymbolDiamond]="62170",er[tr.SymbolRectangle]="62242",er[tr.SymbolSquare]="62171",er[tr.SymbolTriangleDown]="62172",er[tr.SymbolTriangleUp]="62173",er[tr.Syringe]="62174",er[tr.Tag]="62175",er[tr.TakeAction]="62176",er[tr.Tank]="62177",er[tr.Target]="62178",er[tr.Taxi]="62179",er[tr.Team]="62290",er[tr.Temperature]="62180",er[tr.TextHighlight]="62181",er[tr.ThDerived]="62182",er[tr.ThDisconnect]="62183",er[tr.ThFiltered]="62184",er[tr.ThList]="62185",er[tr.Th]="62186",er[tr.ThirdParty]="62187",er[tr.ThumbsDown]="62188",er[tr.ThumbsUp]="62189",er[tr.TickCircle]="62190",er[tr.Tick]="62191",er[tr.Time]="62192",er[tr.TimelineAreaChart]="62193",er[tr.TimelineBarChart]="62194",er[tr.TimelineEvents]="62195",er[tr.TimelineLineChart]="62196",er[tr.Tint]="62197",er[tr.Torch]="62198",er[tr.Tractor]="62199",er[tr.Train]="62200",er[tr.Translate]="62201",er[tr.Trash]="62202",er[tr.Tree]="62203",er[tr.TrendingDown]="62204",er[tr.TrendingUp]="62205",er[tr.Trophy]="62287",er[tr.Truck]="62206",er[tr.TwoColumns]="62207",er[tr.Unarchive]="62208",er[tr.Underline]="62209",er[tr.Undo]="62210",er[tr.UngroupObjects]="62211",er[tr.UnknownVehicle]="62212",er[tr.Unlink]="62277",er[tr.Unlock]="62213",er[tr.Unpin]="62214",er[tr.Unresolve]="62215",er[tr.Updated]="62216",er[tr.Upload]="62217",er[tr.User]="62218",er[tr.Variable]="62219",er[tr.VerticalBarChartAsc]="62220",er[tr.VerticalBarChartDesc]="62221",er[tr.VerticalDistribution]="62222",er[tr.VerticalInbetween]="62250",er[tr.Video]="62223",er[tr.Virus]="62224",er[tr.VolumeDown]="62225",er[tr.VolumeOff]="62226",er[tr.VolumeUp]="62227",er[tr.Walk]="62228",er[tr.WarningSign]="62229",er[tr.WaterfallChart]="62230",er[tr.Waves]="62231",er[tr.WidgetButton]="62232",er[tr.WidgetFooter]="62233",er[tr.WidgetHeader]="62234",er[tr.Widget]="62235",er[tr.Wind]="62236",er[tr.Wrench]="62237",er[tr.ZoomIn]="62238",er[tr.ZoomOut]="62239",er[tr.ZoomToFit]="62240";for(var ir={},ar={},sr=0,cr=Object.values(tr);sr<cr.length;sr++){var lr=cr[sr];ir[(0,nr.Yd)(lr)]=lr,ar[or(lr).toUpperCase()]=lr}var ur=(0,i.C3)((0,i.C3)({},ir),ar),dr=new Set(Object.values(ur));function fr(e,t){return(0,i.kH)(this,void 0,void 0,(function(){var n,r,o;return(0,i.KE)(this,(function(i){switch(i.label){case 0:return a="development",(n="undefined"!==typeof NODE_ENV&&NODE_ENV===a&&"undefined"!==typeof performance)&&(r=performance.now(),console.info("Started '".concat(e,"'..."))),[4,t()];case 1:return i.sent(),n&&(o=Math.round(performance.now()-r),console.info("Finished '".concat(e,"' in ").concat(o,"ms"))),[2]}var a}))}))}function hr(e){return(0,i.kH)(this,void 0,void 0,(function(){var t,r;return(0,i.KE)(this,(function(o){switch(o.label){case 0:return t=e.loader,"function"!==typeof(r=void 0===t?mr.defaultLoader:t)?[3,1]:[2,r];case 1:return"all"!==r?[3,3]:[4,n.e(400).then(n.bind(n,3776))];case 2:return[2,o.sent().allPathsLoader];case 3:return[4,n.e(520).then(n.bind(n,6548))];case 4:return[2,o.sent().splitPathsBySizeLoader]}}))}))}var pr=function(){function e(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return e.setLoaderOptions=function(e){void 0!==e.loader&&(mr.defaultLoader=e.loader)},e.load=function(e,t,n){return(0,i.kH)(this,void 0,void 0,(function(){var r=this;return(0,i.KE)(this,(function(o){switch(o.label){case 0:return Array.isArray(e)||(e=[e]),[4,Promise.all(e.map((function(e){return r.loadImpl(e,t,n)})))];case 1:return o.sent(),[2]}}))}))},e.loadAll=function(e){return(0,i.kH)(this,void 0,void 0,(function(){var t,n=this;return(0,i.KE)(this,(function(r){return t=Object.values(ur),fr("[Blueprint] loading all icons",(function(){return(0,i.kH)(n,void 0,void 0,(function(){return(0,i.KE)(this,(function(n){switch(n.label){case 0:return[4,Promise.all([this.load(t,Wn.L.STANDARD,e),this.load(t,Wn.L.LARGE,e)])];case 1:return n.sent(),[2]}}))}))})),[2]}))}))},e.getPaths=function(e,t){if(this.isValidIconName(e))return(t<Wn.L.LARGE?mr.loadedIconPaths16:mr.loadedIconPaths20).get(e)},e.loadImpl=function(e,t,n){return void 0===n&&(n={}),(0,i.kH)(this,void 0,void 0,(function(){var r,o,a,s,c;return(0,i.KE)(this,(function(i){switch(i.label){case 0:return this.isValidIconName(e)?(r=t<Wn.L.LARGE?mr.loadedIconPaths16:mr.loadedIconPaths20).has(e)?[2]:[4,hr(n)]:(console.error("[Blueprint] Unknown icon '".concat(e,"'")),[2]);case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),a=t<Wn.L.LARGE?Wn.L.STANDARD:Wn.L.LARGE,[4,o(e,a)];case 3:return s=i.sent(),r.set(e,s),[3,5];case 4:return c=i.sent(),console.error("[Blueprint] Unable to load ".concat(t,"px icon '").concat(e,"'"),c),[3,5];case 5:return[2]}}))}))},e.isValidIconName=function(e){return dr.has(e)},e}(),mr=new pr,gr=r.forwardRef((function(e,t){var n,o,a=e.autoLoad,c=e.className,l=e.color,u=e.icon,d=e.intent,f=e.tagName,h=e.svgProps,p=e.title,m=e.htmlTitle,g=(0,i.sX)(e,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),v=null!==(o=null!==(n=e.iconSize)&&void 0!==n?n:e.size)&&void 0!==o?o:Wn.L.STANDARD,y=r.useState((function(){return"string"===typeof u?pr.getPaths(u,v):void 0})),b=y[0],_=y[1];if(r.useEffect((function(){var e=!1;if("string"===typeof u){var t=pr.getPaths(u,v);void 0!==t?_(t):a?pr.load(u,v).then((function(){e||_(pr.getPaths(u,v))})).catch((function(e){console.error("[Blueprint] Icon '".concat(u,"' (").concat(v,"px) could not be loaded."),e)})):console.error("[Blueprint] Icon '".concat(u,"' (").concat(v,"px) is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(u,"', ").concat(v,")?"))}return function(){e=!0}}),[a,u,v]),null==u||"boolean"===typeof u)return null;if("string"!==typeof u)return u;if(null==b){var w=v===Wn.L.STANDARD?Qt:v===Wn.L.LARGE?Zt:void 0;return r.createElement(f,(0,i.C3)((0,i.C3)({"aria-hidden":!p||void 0},sn(g)),{className:s()(Yt,w,tn(u),nn(d),c),"data-icon":u,ref:t,title:m}))}var x=b.map((function(e,t){return r.createElement("path",{d:e,key:t,fillRule:"evenodd"})}));return r.createElement(Kn,(0,i.C3)({children:x,className:s()(nn(d),c),color:l,htmlTitle:m,iconName:u,ref:t,size:v,svgProps:h,tagName:f,title:p},sn(g)))}));gr.defaultProps={autoLoad:!0,tagName:"span"},gr.displayName="".concat(on,".Icon");var vr=r.createContext(),yr=r.createContext();function br(e){var t=e.children,n=r.useState(null),o=n[0],i=n[1],a=r.useRef(!1);r.useEffect((function(){return function(){a.current=!0}}),[]);var s=r.useCallback((function(e){a.current||i(e)}),[]);return r.createElement(vr.Provider,{value:o},r.createElement(yr.Provider,{value:s},t))}var _r=n(1568),wr=n.n(_r),xr=function(e){return Array.isArray(e)?e[0]:e},Cr=function(e){if("function"===typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},Sr=function(e,t){if("function"===typeof e)return Cr(e,t);null!=e&&(e.current=t)},kr=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},Er="undefined"!==typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect;function Or(e){var t=e.children,n=e.innerRef,o=r.useContext(yr),i=r.useCallback((function(e){Sr(n,e),Cr(o,e)}),[n,o]);return r.useEffect((function(){return function(){return Sr(n,null)}}),[]),r.useEffect((function(){wr()(Boolean(o),"`Reference` should not be used outside of a `Manager` component.")}),[o]),xr(t)({ref:i})}var Tr=n(1292),Ar=n.t(Tr,2);function Rr(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pr(e){return e instanceof Rr(e).Element||e instanceof Element}function Nr(e){return e instanceof Rr(e).HTMLElement||e instanceof HTMLElement}function Dr(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Rr(e).ShadowRoot||e instanceof ShadowRoot)}var Mr=Math.max,Ir=Math.min,Lr=Math.round;function jr(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Fr(){return!/^((?!chrome|android).)*safari/i.test(jr())}function Br(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Nr(e)&&(o=e.offsetWidth>0&&Lr(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Lr(r.height)/e.offsetHeight||1);var a=(Pr(e)?Rr(e):window).visualViewport,s=!Fr()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/o,l=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function zr(e){var t=Rr(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Hr(e){return e?(e.nodeName||"").toLowerCase():null}function Vr(e){return((Pr(e)?e.ownerDocument:e.document)||window.document).documentElement}function qr(e){return Br(Vr(e)).left+zr(e).scrollLeft}function Ur(e){return Rr(e).getComputedStyle(e)}function Wr(e){var t=Ur(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function $r(e,t,n){void 0===n&&(n=!1);var r=Nr(t),o=Nr(t)&&function(e){var t=e.getBoundingClientRect(),n=Lr(t.width)/e.offsetWidth||1,r=Lr(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Vr(t),a=Br(e,o,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(("body"!==Hr(t)||Wr(i))&&(s=function(e){return e!==Rr(e)&&Nr(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:zr(e);var t}(t)),Nr(t)?((c=Br(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=qr(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function Gr(e){var t=Br(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Kr(e){return"html"===Hr(e)?e:e.assignedSlot||e.parentNode||(Dr(e)?e.host:null)||Vr(e)}function Xr(e){return["html","body","#document"].indexOf(Hr(e))>=0?e.ownerDocument.body:Nr(e)&&Wr(e)?e:Xr(Kr(e))}function Yr(e,t){var n;void 0===t&&(t=[]);var r=Xr(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Rr(r),a=o?[i].concat(i.visualViewport||[],Wr(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Yr(Kr(a)))}function Qr(e){return["table","td","th"].indexOf(Hr(e))>=0}function Zr(e){return Nr(e)&&"fixed"!==Ur(e).position?e.offsetParent:null}function Jr(e){for(var t=Rr(e),n=Zr(e);n&&Qr(n)&&"static"===Ur(n).position;)n=Zr(n);return n&&("html"===Hr(n)||"body"===Hr(n)&&"static"===Ur(n).position)?t:n||function(e){var t=/firefox/i.test(jr());if(/Trident/i.test(jr())&&Nr(e)&&"fixed"===Ur(e).position)return null;var n=Kr(e);for(Dr(n)&&(n=n.host);Nr(n)&&["html","body"].indexOf(Hr(n))<0;){var r=Ur(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var eo="top",to="bottom",no="right",ro="left",oo="auto",io=[eo,to,no,ro],ao="start",so="end",co="clippingParents",lo="viewport",uo="popper",fo="reference",ho=io.reduce((function(e,t){return e.concat([t+"-"+ao,t+"-"+so])}),[]),po=[].concat(io,[oo]).reduce((function(e,t){return e.concat([t,t+"-"+ao,t+"-"+so])}),[]),mo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function go(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function vo(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var yo={placement:"bottom",modifiers:[],strategy:"absolute"};function bo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function _o(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?yo:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},yo,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,c={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;l(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Pr(e)?Yr(e):e.contextElement?Yr(e.contextElement):[],popper:Yr(t)};var u=function(e){var t=go(e);return mo.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:c,options:r}),l=function(){};a.push(s||l)}})),c.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(bo(t,n)){o.rects={reference:$r(t,Jr(n),"fixed"===o.options.strategy),popper:Gr(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,l=i.options,u=void 0===l?{}:l,d=i.name;"function"===typeof a&&(o=a({state:o,options:u,name:d,instance:c})||o)}else o.reset=!1,r=-1}}},update:vo((function(){return new Promise((function(e){c.forceUpdate(),e(o)}))})),destroy:function(){l(),s=!0}};if(!bo(e,t))return c;function l(){a.forEach((function(e){return e()})),a=[]}return c.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var wo={passive:!0};function xo(e){return e.split("-")[0]}function Co(e){return e.split("-")[1]}function So(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ko(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?xo(o):null,a=o?Co(o):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case eo:t={x:s,y:n.y-r.height};break;case to:t={x:s,y:n.y+n.height};break;case no:t={x:n.x+n.width,y:c};break;case ro:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?So(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case ao:t[l]=t[l]-(n[u]/2-r[u]/2);break;case so:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}var Eo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oo(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,h=void 0===f?0:f,p=a.y,m=void 0===p?0:p,g="function"===typeof u?u({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=ro,_=eo,w=window;if(l){var x=Jr(n),C="clientHeight",S="clientWidth";if(x===Rr(n)&&"static"!==Ur(x=Vr(n)).position&&"absolute"===s&&(C="scrollHeight",S="scrollWidth"),o===eo||(o===ro||o===no)&&i===so)_=to,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[C])-r.height,m*=c?1:-1;if(o===ro||(o===eo||o===to)&&i===so)b=no,h-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[S])-r.width,h*=c?1:-1}var k,E=Object.assign({position:s},l&&Eo),O=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Lr(n*o)/o||0,y:Lr(r*o)/o||0}}({x:h,y:m},Rr(n)):{x:h,y:m};return h=O.x,m=O.y,c?Object.assign({},E,((k={})[_]=y?"0":"",k[b]=v?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",k)):Object.assign({},E,((t={})[_]=y?m+"px":"",t[b]=v?h+"px":"",t.transform="",t))}const To={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Nr(o)&&Hr(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Nr(r)&&Hr(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const Ao={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=po.reduce((function(e,n){return e[n]=function(e,t,n){var r=xo(e),o=[ro,eo].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[ro,no].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var Ro={left:"right",right:"left",bottom:"top",top:"bottom"};function Po(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ro[e]}))}var No={start:"end",end:"start"};function Do(e){return e.replace(/start|end/g,(function(e){return No[e]}))}function Mo(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dr(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Io(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lo(e,t,n){return t===lo?Io(function(e,t){var n=Rr(e),r=Vr(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var l=Fr();(l||!l&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+qr(e),y:c}}(e,n)):Pr(t)?function(e,t){var n=Br(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Io(function(e){var t,n=Vr(e),r=zr(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Mr(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Mr(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+qr(e),c=-r.scrollTop;return"rtl"===Ur(o||n).direction&&(s+=Mr(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(Vr(e)))}function jo(e,t,n,r){var o="clippingParents"===t?function(e){var t=Yr(Kr(e)),n=["absolute","fixed"].indexOf(Ur(e).position)>=0&&Nr(e)?Jr(e):e;return Pr(n)?t.filter((function(e){return Pr(e)&&Mo(e,n)&&"body"!==Hr(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=Lo(e,n,r);return t.top=Mr(o.top,t.top),t.right=Ir(o.right,t.right),t.bottom=Ir(o.bottom,t.bottom),t.left=Mr(o.left,t.left),t}),Lo(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fo(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Bo(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function zo(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?co:s,l=n.rootBoundary,u=void 0===l?lo:l,d=n.elementContext,f=void 0===d?uo:d,h=n.altBoundary,p=void 0!==h&&h,m=n.padding,g=void 0===m?0:m,v=Fo("number"!==typeof g?g:Bo(g,io)),y=f===uo?fo:uo,b=e.rects.popper,_=e.elements[p?y:f],w=jo(Pr(_)?_:_.contextElement||Vr(e.elements.popper),c,u,a),x=Br(e.elements.reference),C=ko({reference:x,element:b,strategy:"absolute",placement:o}),S=Io(Object.assign({},b,C)),k=f===uo?S:x,E={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},O=e.modifiersData.offset;if(f===uo&&O){var T=O[o];Object.keys(E).forEach((function(e){var t=[no,to].indexOf(e)>=0?1:-1,n=[eo,to].indexOf(e)>=0?"y":"x";E[e]+=T[n]*t}))}return E}const Ho={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,v=xo(g),y=c||(v===g||!p?[Po(g)]:function(e){if(xo(e)===oo)return[];var t=Po(e);return[Do(e),t,Do(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(xo(n)===oo?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?po:c,u=Co(r),d=u?s?ho:ho.filter((function(e){return Co(e)===u})):io,f=d.filter((function(e){return l.indexOf(e)>=0}));0===f.length&&(f=d);var h=f.reduce((function(t,n){return t[n]=zo(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[xo(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,w=t.rects.popper,x=new Map,C=!0,S=b[0],k=0;k<b.length;k++){var E=b[k],O=xo(E),T=Co(E)===ao,A=[eo,to].indexOf(O)>=0,R=A?"width":"height",P=zo(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),N=A?T?no:ro:T?to:eo;_[R]>w[R]&&(N=Po(N));var D=Po(N),M=[];if(i&&M.push(P[O]<=0),s&&M.push(P[N]<=0,P[D]<=0),M.every((function(e){return e}))){S=E,C=!1;break}x.set(E,M)}if(C)for(var I=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},L=p?3:1;L>0;L--){if("break"===I(L))break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Vo(e,t,n){return Mr(e,Ir(t,n))}const qo={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=void 0===f||f,p=n.tetherOffset,m=void 0===p?0:p,g=zo(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),v=xo(t.placement),y=Co(t.placement),b=!y,_=So(v),w="x"===_?"y":"x",x=t.modifiersData.popperOffsets,C=t.rects.reference,S=t.rects.popper,k="function"===typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,E="number"===typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(x){if(i){var A,R="y"===_?eo:ro,P="y"===_?to:no,N="y"===_?"height":"width",D=x[_],M=D+g[R],I=D-g[P],L=h?-S[N]/2:0,j=y===ao?C[N]:S[N],F=y===ao?-S[N]:-C[N],B=t.elements.arrow,z=h&&B?Gr(B):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=H[R],q=H[P],U=Vo(0,C[N],z[N]),W=b?C[N]/2-L-U-V-E.mainAxis:j-U-V-E.mainAxis,$=b?-C[N]/2+L+U+q+E.mainAxis:F+U+q+E.mainAxis,G=t.elements.arrow&&Jr(t.elements.arrow),K=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,X=null!=(A=null==O?void 0:O[_])?A:0,Y=D+$-X,Q=Vo(h?Ir(M,D+W-X-K):M,D,h?Mr(I,Y):I);x[_]=Q,T[_]=Q-D}if(s){var Z,J="x"===_?eo:ro,ee="x"===_?to:no,te=x[w],ne="y"===w?"height":"width",re=te+g[J],oe=te-g[ee],ie=-1!==[eo,ro].indexOf(v),ae=null!=(Z=null==O?void 0:O[w])?Z:0,se=ie?re:te-C[ne]-S[ne]-ae+E.altAxis,ce=ie?te+C[ne]+S[ne]-ae-E.altAxis:oe,le=h&&ie?function(e,t,n){var r=Vo(e,t,n);return r>n?n:r}(se,te,ce):Vo(h?se:re,te,h?ce:oe);x[w]=le,T[w]=le-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};const Uo={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xo(n.placement),c=So(s),l=[ro,no].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Fo("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Bo(e,io))}(o.padding,n),d=Gr(i),f="y"===c?eo:ro,h="y"===c?to:no,p=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],m=a[c]-n.rects.reference[c],g=Jr(i),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=p/2-m/2,b=u[f],_=v-d[l]-u[h],w=v/2-d[l]/2+y,x=Vo(b,w,_),C=c;n.modifiersData[r]=((t={})[C]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&Mo(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wo(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $o(e){return[eo,no,to,ro].some((function(t){return e[t]>=0}))}var Go=_o({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,c=Rr(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach((function(e){e.addEventListener("scroll",n.update,wo)})),s&&c.addEventListener("resize",n.update,wo),function(){i&&l.forEach((function(e){e.removeEventListener("scroll",n.update,wo)})),s&&c.removeEventListener("resize",n.update,wo)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ko({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:xo(t.placement),variation:Co(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Oo(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Oo(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},To,Ao,Ho,qo,Uo,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zo(t,{elementContext:"reference"}),s=zo(t,{altBoundary:!0}),c=Wo(a,r),l=Wo(s,o,i),u=$o(c),d=$o(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Ko=n(5012),Xo=n.n(Ko),Yo=[],Qo=function(){},Zo=function(){return Promise.resolve(null)},Jo=[];function ei(e){var t=e.placement,n=void 0===t?"bottom":t,o=e.strategy,i=void 0===o?"absolute":o,a=e.modifiers,s=void 0===a?Jo:a,c=e.referenceElement,l=e.onFirstUpdate,u=e.innerRef,d=e.children,f=r.useContext(vr),h=r.useState(null),p=h[0],m=h[1],g=r.useState(null),v=g[0],y=g[1];r.useEffect((function(){Sr(u,p)}),[u,p]);var b=r.useMemo((function(){return{placement:n,strategy:i,onFirstUpdate:l,modifiers:[].concat(s,[{name:"arrow",enabled:null!=v,options:{element:v}}])}}),[n,i,l,s,v]),_=function(e,t,n){void 0===n&&(n={});var o=r.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Yo},a=r.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],l=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);Tr.flushSync((function(){c({styles:kr(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:kr(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),u=r.useMemo((function(){var e={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[l,{name:"applyStyles",enabled:!1}])};return Xo()(o.current,e)?o.current||e:(o.current=e,e)}),[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,l]),d=r.useRef();return Er((function(){d.current&&d.current.setOptions(u)}),[u]),Er((function(){if(null!=e&&null!=t){var r=(n.createPopper||Go)(e,t,u);return d.current=r,function(){r.destroy(),d.current=null}}}),[e,t,n.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}}(c||f,p,b),w=_.state,x=_.styles,C=_.forceUpdate,S=_.update,k=r.useMemo((function(){return{ref:m,style:x.popper,placement:w?w.placement:n,hasPopperEscaped:w&&w.modifiersData.hide?w.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:w&&w.modifiersData.hide?w.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:x.arrow,ref:y},forceUpdate:C||Qo,update:S||Zo}}),[m,y,n,w,x,S,C]);return xr(d)(k)}function ti(e,t){var n;null!=(n=e)&&"function"!==typeof n?e.current=t:function(e){return"function"===typeof e}(e)&&e(t)}function ni(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach((function(e){ti(e,t)}))}}function ri(e){return null===e?null:"undefined"===typeof e.current?e:e.current}function oi(e,t){return void 0===t&&(t=!1),null==e||""===e||!1===e||!t&&Array.isArray(e)&&(0===e.length||e.every((function(e){return oi(e,!0)})))}function ii(e,t,n){return void 0===t&&(t="span"),void 0===n&&(n={}),null==e||"boolean"===typeof e||Vn(e)?void 0:"string"===typeof e||"number"===typeof e||function(e){return"symbol"===typeof e.type}(e)||function(e){return Array.isArray(e)}(e)?r.createElement(t,n,e):ai(e)?Object.keys(n).length>0?r.cloneElement(e,n):e:void 0}function ai(e){return"object"===typeof e&&"undefined"!==typeof e.type&&"undefined"!==typeof e.props}function si(e,t){return null!=e&&null!=e.type&&null!=e.type.displayName&&e.type.displayName===t.displayName}function ci(e){return"Enter"===e.key||" "===e.key}function li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},li.apply(this,arguments)}function ui(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function di(e,t){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},di(e,t)}function fi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,di(e,t)}function hi(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const pi=!1,mi=r.createContext(null);var gi=function(e){return e.scrollTop},vi="unmounted",yi="exited",bi="entering",_i="entered",wi="exiting",xi=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=yi,r.appearStatus=bi):o=_i:o=t.unmountOnExit||t.mountOnEnter?vi:yi,r.state={status:o},r.nextCallback=null,r}fi(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===vi?{status:yi}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==bi&&n!==_i&&(t=bi):n!==bi&&n!==_i||(t=wi)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===bi){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Tr.findDOMNode(this);n&&gi(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===yi&&this.setState({status:vi})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Tr.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||pi?this.safeSetState({status:_i},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:bi},(function(){t.props.onEntering(i,a),t.onTransitionEnd(c,(function(){t.safeSetState({status:_i},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Tr.findDOMNode(this);t&&!pi?(this.props.onExit(r),this.safeSetState({status:wi},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:yi},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:yi},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Tr.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===vi)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,ui(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r.createElement(mi.Provider,{value:null},"function"===typeof n?n(e,o):r.cloneElement(r.Children.only(n),o))},t}(r.Component);function Ci(){}xi.contextType=mi,xi.propTypes={},xi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ci,onEntering:Ci,onEntered:Ci,onExit:Ci,onExiting:Ci,onExited:Ci},xi.UNMOUNTED=vi,xi.EXITED=yi,xi.ENTERING=bi,xi.ENTERED=_i,xi.EXITING=wi;const Si=xi;var ki=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=hi(n.className,r):n.setAttribute("class",hi(n.className&&n.className.baseVal||"",r)));var n,r}))},Ei=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}fi(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&gi(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&ki(e,r),o&&ki(e,o),i&&ki(e,i)},n.render=function(){var e=this.props,t=(e.classNames,ui(e,["classNames"]));return r.createElement(Si,li({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(r.Component);Ei.defaultProps={classNames:""},Ei.propTypes={};const Oi=Ei;function Ti(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function Ri(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Pi(e,t,n){var o=Ai(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r<o[c].length;r++){var l=o[c][r];s[o[c][r]]=n(l)}s[c]=n(c)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,o);return Object.keys(i).forEach((function(a){var s=i[a];if((0,r.isValidElement)(s)){var c=a in t,l=a in o,u=t[a],d=(0,r.isValidElement)(u)&&!u.props.in;!l||c&&!d?l||!c||d?l&&c&&(0,r.isValidElement)(u)&&(i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:Ri(s,"exit",e),enter:Ri(s,"enter",e)})):i[a]=(0,r.cloneElement)(s,{in:!1}):i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:Ri(s,"exit",e),enter:Ri(s,"enter",e)})}})),i}var Ni=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Di=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Ti(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}fi(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,o=a,Ai(n.children,(function(e){return(0,r.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:Ri(e,"appear",n),enter:Ri(e,"enter",n),exit:Ri(e,"exit",n)})}))):Pi(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=Ai(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=li({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=ui(e,["component","childFactory"]),i=this.state.contextValue,a=Ni(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.createElement(mi.Provider,{value:i},a):r.createElement(mi.Provider,{value:i},r.createElement(t,o,a))},t}(r.Component);Di.propTypes={},Di.defaultProps={component:"div",childFactory:function(e){return e}};const Mi=Di;var Ii=function(){var e=1,t=new WeakMap,n=function(r,o){return"number"===typeof r||"string"===typeof r?o?"idx-".concat(o):"val-".concat(r):t.has(r)?"uid"+t.get(r):(t.set(r,e++),n(r))};return n},Li=(Ii(),function(e){return void 0===e&&(e=""),{value:1,prefix:e,uid:Ii()}}),ji=Li(),Fi=r.createContext(Li()),Bi=function(){var e=(0,r.useContext)(Fi),t=(0,r.useState)((function(){return function(e){var t=e||ji,n=function(e){return e?e.prefix:""}(t),r=function(e){return e.value++}(t),o=n+r;return{uid:o,gen:function(e){return o+t.uid(e)}}}(e)}))[0];return t},zi=r.createContext({hasProvider:!1,stack:{current:[]}}),Hi=n(7844),Vi=[],qi=[],Ui=function(e){e(Vi),qi.forEach((function(e){return e()}))},Wi={getSnapshot:function(){return Vi},subscribe:function(e){return qi.push(e),function(){var t=qi.indexOf(e);qi.splice(t,1)}}};function $i(){var e=r.useContext(zi),t=e.stack,n=e.hasProvider,o=function(){var e=(0,Hi.useSyncExternalStore)(Wi.subscribe,Wi.getSnapshot,Wi.getSnapshot),t=r.useCallback((function(){return e.at(-1)}),[e]),n=r.useCallback((function(t){var n=e.findIndex((function(e){return e.id===t}));return e.slice(n)}),[e]),o=r.useCallback((function(){Ui((function(e){return e.splice(0,e.length)}))}),[]),i=r.useCallback((function(e){Vi.push(e),e.props.usePortal&&e.props.hasBackdrop&&document.body.classList.add(rt)}),[]),a=r.useCallback((function(t){var n=e.filter((function(e){return e.props.usePortal&&e.props.hasBackdrop&&e.id!==t})),r=Vi.findIndex((function(e){return e.id===t}));r>-1&&Vi.splice(r,1),0===n.length&&document.body.classList.remove(rt)}),[e]);return{closeOverlay:a,getLastOpened:t,getThisOverlayAndDescendants:n,openOverlay:i,resetStack:o}}(),i=r.useCallback((function(){return t.current.at(-1)}),[t]),a=r.useCallback((function(e){var n=t.current.findIndex((function(t){return t.id===e}));return-1===n?[]:t.current.slice(n)}),[t]),s=r.useCallback((function(){t.current=[]}),[t]),c=r.useCallback((function(e){t.current.push(e),e.props.usePortal&&e.props.hasBackdrop&&document.body.classList.add(rt)}),[t]),l=r.useCallback((function(e){var n=t.current.filter((function(t){return t.props.usePortal&&t.props.hasBackdrop&&t.id!==e})),r=t.current.findIndex((function(t){return t.id===e}));r>-1&&t.current.splice(r,1),0===n.length&&document.body.classList.remove(rt)}),[t]);return n?{closeOverlay:l,getLastOpened:i,getThisOverlayAndDescendants:a,openOverlay:c,resetStack:s}:(Bn("development")&&console.error(In),o)}function Gi(e){var t=ri(e);return(null!=t?Array.from(t.querySelectorAll(['a[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','details:not([tabindex="-1"])','input:not([disabled]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].join(","))):[]).filter((function(e){return!e.classList.contains(it)&&!e.classList.contains(at)}))}var Ki=r.createContext({}),Xi={blueprintPortalClassName:function(e,t){if(null!=e[t]&&"string"!==typeof e[t])return new Error(Rn)}};function Yi(e,t){var n,o=e.className,i=e.stopPropagationEvents,a=e.container,s=e.onChildrenMount,c=e.children;void 0===t&&(t={});var l=r.useContext(Ki),u=null!==(n=null!==a&&void 0!==a?a:l.portalContainer)&&void 0!==n?n:"undefined"!==typeof document?document.body:void 0,d=r.useState(),f=d[0],h=d[1],p=r.useCallback((function(){var e=document.createElement("div");e.classList.add(Et),Qi(e.classList,o),Qi(e.classList,l.portalClassName),Zi(e,i);var n=t.blueprintPortalClassName;return null!=n&&""!==n&&(console.error(Pn),Qi(e.classList,n)),e}),[o,l.portalClassName,t.blueprintPortalClassName,i]);return r.useEffect((function(){if(null!=u){var e=p();return u.appendChild(e),h(e),function(){Ji(e,i),e.remove(),h(void 0)}}}),[u,p,i]),r.useEffect((function(){null!=f&&(null===s||void 0===s||s())}),[f,s]),r.useEffect((function(){if(null!=f)return Qi(f.classList,o),function(){return function(e,t){null!=t&&""!==t&&e.remove.apply(e,t.split(" "))}(f.classList,o)}}),[o,f]),r.useEffect((function(){if(null!=f)return Zi(f,i),function(){return Ji(f,i)}}),[f,i]),"undefined"===typeof document||null==f?null:Tr.createPortal(c,f)}function Qi(e,t){null!=t&&""!==t&&e.add.apply(e,t.split(" "))}function Zi(e,t){null===t||void 0===t||t.forEach((function(t){return e.addEventListener(t,ea)}))}function Ji(e,t){null===t||void 0===t||t.forEach((function(t){return e.removeEventListener(t,ea)}))}function ea(e){e.stopPropagation()}Yi.displayName="".concat(on,".Portal"),r.version.startsWith("18")||(Yi.contextTypes=Xi);var ta=r.forwardRef((function(e,t){var n,o,a,c=e.autoFocus,l=e.backdropClassName,u=e.backdropProps,d=e.canEscapeKeyClose,f=e.canOutsideClickClose,h=e.childRef,p=e.childRefs,m=e.children,g=e.className,v=e.enforceFocus,y=e.hasBackdrop,b=e.isOpen,_=e.lazy,w=e.onClose,x=e.onClosed,C=e.onClosing,S=e.onOpened,k=e.onOpening,E=e.portalClassName,O=e.portalContainer,T=e.shouldReturnFocusOnClose,A=e.transitionDuration,R=e.transitionName,P=e.usePortal;!function(e){var t=e.childRef,n=e.childRefs,o=e.children,i=r.Children.count(o);r.useEffect((function(){Bn("production")||(null!=t&&null!=n&&console.error(Ln),i>1&&null==n&&console.error(jn))}),[t,n,i])}(e);var N=$i(),D=N.closeOverlay,M=N.getLastOpened,I=N.getThisOverlayAndDescendants,L=N.openOverlay,j=r.useState(!1),F=j[0],B=j[1],z=r.useState(!1),H=z[0],V=z[1],q=r.useRef(null),U=r.useRef(null),W=r.useRef(null),$=r.useRef(null),G=r.useRef(null),K=r.useRef(null),X=r.useCallback((function(){return requestAnimationFrame((function(){var e,t=ri(U),n=Zn(t);null!=t&&null!=n&&(!t.contains(n)&&(null===(e=ri($))||void 0===e||e.focus({preventScroll:!0}),B(!1)))}))}),[]),Y=function(){var e=Bi().uid;return"".concat(ta.displayName,"-").concat(e)}(),Q=r.useRef(null),Z=r.useCallback((function(e){var t=e.composed?e.composedPath()[0]:e.target,n=ri(U);null!=n&&t instanceof Node&&!n.contains(t)&&(e.preventDefault(),e.stopImmediatePropagation(),X())}),[X]),J=r.useCallback((function(e){var t=e.composed?e.composedPath()[0]:e.target,n=I(Y).some((function(e){var n=ri(e.containerElement);return(null===n||void 0===n?void 0:n.contains(t))&&!n.isSameNode(t)}));n||null===w||void 0===w||w(e)}),[I,Y,w]);r.useEffect((function(){document.removeEventListener("mousedown",J)}),[J]),r.useEffect((function(){document.removeEventListener("focus",Z,!0)}),[Z]);var ee=r.useMemo((function(){return ni(t,Q)}),[t]);r.useImperativeHandle(ee,(function(){return{bringFocusInsideOverlay:X,containerElement:U,handleDocumentFocus:Z,handleDocumentMousedown:J,id:Y,props:{autoFocus:c,enforceFocus:v,hasBackdrop:y,usePortal:P}}}),[c,X,v,Z,J,y,Y,P]);var te=r.useCallback((function(e){"Escape"===e.key&&d&&(null===w||void 0===w||w(e),e.stopPropagation(),e.preventDefault())}),[d,w]),ne=r.useCallback((function(){if(null!=Q.current){var e=M();void 0!==(null===e||void 0===e?void 0:e.handleDocumentFocus)&&document.removeEventListener("focus",e.handleDocumentFocus,!0),L(Q.current),c&&(B(!0),X()),v&&document.addEventListener("focus",Z,!0),f&&!y&&document.addEventListener("mousedown",J),ti(q,Zn(ri(U)))}}),[c,X,f,v,M,J,Z,y,L]),re=r.useCallback((function(){var e;document.removeEventListener("focus",Z,!0),document.removeEventListener("mousedown",J),D(Y);var t=M();void 0!==t&&t.props.autoFocus&&t.props.enforceFocus&&(null===(e=t.bringFocusInsideOverlay)||void 0===e||e.call(t),void 0!==t.handleDocumentFocus&&document.addEventListener("focus",t.handleDocumentFocus,!0))}),[D,M,Z,J,Y]),oe=null!==(o=function(e){var t=r.useRef();return r.useEffect((function(){t.current=e}),[e]),t.current}(b))&&void 0!==o&&o;r.useEffect((function(){b&&V(!0),!oe&&b&&ne(),oe&&!b&&re()}),[b,ne,re,oe]),r.useEffect((function(){return function(){b&&re()}}),[]);var ie=r.useCallback((function(e){var t=ri(q);T&&t instanceof HTMLElement&&t.focus(),null===x||void 0===x||x(e)}),[x,T]),ae=r.useCallback((function(){}),[]),se=r.useCallback((function(e){if(null!=h)return h;if(null!=p){var t=e.key;return null==t?void(Bn("production")||console.error(Fn)):p[t]}}),[h,p]),ce=r.useCallback((function(e){if(null==e||Vn(e))return null;var t=se(e),n=ai(e)?e.props:{},o=ii(e,"span",{className:s()(n.className,tt),ref:void 0===t?K:void 0,tabIndex:v||c?0:void 0}),i=null!==t&&void 0!==t?t:K;return r.createElement(Oi,{addEndListener:ae,classNames:R,nodeRef:i,onEntered:na(S,i),onEntering:na(k,i),onExited:na(ie,i),onExiting:na(C,i),timeout:A},o)}),[c,v,se,ae,ie,C,S,k,A,R]),le=r.useCallback((function(e){var t;f&&(null===w||void 0===w||w(e)),v&&X(),null===(t=null===u||void 0===u?void 0:u.onMouseDown)||void 0===t||t.call(u,e)}),[u,X,f,v,w]),ue=r.useCallback((function(e,t){return r.createElement(Oi,{addEndListener:ae,classNames:R,key:e,nodeRef:t.ref,timeout:A,unmountOnExit:!0},r.createElement("div",(0,i.C3)({tabIndex:0},t)))}),[ae,A,R]),de=r.useCallback((function(e){if(v&&!F){var t=ri(U),n=ri(G);null!=e.relatedTarget&&(null===t||void 0===t?void 0:t.contains(e.relatedTarget))&&e.relatedTarget!==n&&(null===n||void 0===n||n.focus({preventScroll:!0}))}}),[v,F]),fe=r.useCallback((function(e){var t;if(v&&e.shiftKey&&"Tab"===e.key){var n=Gi(U).pop();null!=n?n.focus():null===(t=ri(G))||void 0===t||t.focus({preventScroll:!0})}}),[v]),he=r.useCallback((function(e){var t,n=ri($);if(null!=e.relatedTarget&&(null===(t=ri(U))||void 0===t?void 0:t.contains(e.relatedTarget))&&e.relatedTarget!==n){var r=Gi(U).shift();F||null==r||r===e.relatedTarget?null===n||void 0===n||n.focus({preventScroll:!0}):r.focus()}else{var o=Gi(U).pop();null!=o?o.focus():null===n||void 0===n||n.focus({preventScroll:!0})}}),[F]),pe=r.useMemo((function(){return y&&b?r.createElement(Oi,{classNames:R,key:"__backdrop",nodeRef:W,timeout:A,addEndListener:ae},r.createElement("div",(0,i.C3)({},u,{className:s()(et,l,null===u||void 0===u?void 0:u.className),onMouseDown:le,ref:W}))):null}),[l,u,le,ae,y,b,A,R]);if(_&&!H)return null;var me=b&&null!==(a=r.Children.map(m,ce))&&void 0!==a?a:[];null!==pe&&me.unshift(pe),b&&(c||v)&&me.length>0&&(me.unshift(ue("__start",{className:it,onFocus:de,onKeyDown:fe,ref:$})),v&&me.push(ue("__end",{className:at,onFocus:he,ref:G})));var ge=r.createElement("div",{"aria-live":"polite",className:s()(Je,(n={},n[rt]=b,n[nt]=!P,n),g),onKeyDown:te,ref:U},r.createElement(Mi,{appear:!0,component:null},me));return P?r.createElement(Yi,{className:E,container:O},ge):ge}));function na(e,t){return function(){null!=(null===t||void 0===t?void 0:t.current)&&(null===e||void 0===e||e(t.current))}}ta.defaultProps={autoFocus:!0,backdropProps:{},canEscapeKeyClose:!0,canOutsideClickClose:!0,enforceFocus:!0,hasBackdrop:!0,isOpen:!1,lazy:Qn(),shouldReturnFocusOnClose:!0,transitionDuration:300,transitionName:Je,usePortal:!0},ta.displayName="".concat(on,".Overlay2");var ra=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.targetRef=null!==(t=n.props.targetRef)&&void 0!==t?t:r.createRef(),n.prevElement=void 0,n}return(0,i.ct)(t,e),t.prototype.render=function(){var e=r.Children.only(this.props.children);return void 0!==this.props.targetRef?e:r.cloneElement(e,{ref:this.targetRef})},t.prototype.componentDidMount=function(){var e=this;this.observer=null!=globalThis.ResizeObserver?new ResizeObserver((function(t){var n,r;return null===(r=(n=e.props).onResize)||void 0===r?void 0:r.call(n,t)})):void 0,this.observeElement()},t.prototype.componentDidUpdate=function(e){this.observeElement(this.props.observeParents!==e.observeParents)},t.prototype.componentWillUnmount=function(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.prevElement=void 0},t.prototype.observeElement=function(e){if(void 0===e&&(e=!1),void 0!==this.observer)if(this.targetRef.current instanceof Element){if((this.targetRef.current!==this.prevElement||e)&&(this.observer.disconnect(),this.prevElement=this.targetRef.current,this.observer.observe(this.targetRef.current),this.props.observeParents))for(var t=this.targetRef.current.parentElement;null!=t;)this.observer.observe(t),t=t.parentElement}else this.observer.disconnect()},t.displayName="".concat(on,".ResizeSensor"),t}(qn);function oa(e){return e.split("-")[0]}function ia(e){return-1!==["left","right"].indexOf(e)}function aa(e){switch(e){case"top":return"bottom";case"left":return"right";case"bottom":return"top";default:return"left"}}function sa(e){switch(e.split("-")[1]){case"start":return"left";case"end":return"right";default:return"center"}}function ca(e){if(null==e)return 0;switch(oa(e)){case"top":return-90;case"left":return 180;case"bottom":return 90;default:return 0}}function la(e){switch(oa(e)){case"top":return{bottom:-11};case"left":return{right:-11};case"bottom":return{top:-11};default:return{left:-11}}}var ua=function(e){var t=e.arrowProps,n=t.ref,o=t.style,a=e.placement;return r.createElement("div",{"aria-hidden":!0,className:lt,"data-popper-arrow":!0,ref:n,style:(0,i.C3)((0,i.C3)({},o),la(a))},r.createElement("svg",{viewBox:"0 0 ".concat(30," ").concat(30),style:{transform:"rotate(".concat(ca(a),"deg)")}},r.createElement("path",{className:lt+"-border",d:"M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z"}),r.createElement("path",{className:lt+"-fill",d:"M8.787 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z"})))};ua.displayName="".concat(on,".PopoverArrow");var da=r.createContext([{},function(){return null}]),fa=function(e,t){switch(t.type){case"FORCE_DISABLED_STATE":return{forceDisabled:!0};case"RESET_DISABLED_STATE":return{};default:return e}},ha=function(e){var t=e.children,n=e.forceDisable,o=r.useReducer(fa,{}),i=o[0],a=o[1],s=r.useMemo((function(){return[i,a]}),[i,a]);return r.useEffect((function(){a(n?{type:"FORCE_DISABLED_STATE"}:{type:"RESET_DISABLED_STATE"})}),[n]),r.createElement(da.Provider,{value:s},"function"===typeof t?t(i):t)},pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverRef=r.createRef(),t.renderPopover=function(e){var n,o,a=t.props,c=a.children,l=a.compact,u=a.disabled,d=a.intent,f=a.popoverClassName,h=(0,i.sX)(a,["children","compact","disabled","intent","popoverClassName"]),p=s()(Gt,nn(d),f,((n={})[_]=l,n));return r.createElement(wa,(0,i.C3)({modifiers:{arrow:{enabled:!t.props.minimal},offset:{options:{offset:[0,11]}}}},h,{autoFocus:!1,canEscapeKeyClose:!1,disabled:null!==(o=e.forceDisabled)&&void 0!==o?o:u,enforceFocus:!1,lazy:!0,popoverClassName:p,portalContainer:t.props.portalContainer,ref:t.popoverRef}),c)},t}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this;return r.createElement(da.Consumer,null,(function(t){var n=t[0];return r.createElement(ha,(0,i.C3)({},n),e.renderPopover)}))},t.prototype.reposition=function(){var e;null===(e=this.popoverRef.current)||void 0===e||e.reposition()},t.displayName="".concat(on,".Tooltip"),t.defaultProps={compact:!1,hoverCloseDelay:0,hoverOpenDelay:100,interactionKind:"hover-target",minimal:!1,transitionDuration:100},t}(qn),ma={enabled:!0,name:"matchReferenceWidth",phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state,n=t.elements.reference.getBoundingClientRect().width;t.elements.popper.style.width="".concat(n,"px")}},ga=(0,i.C3)((0,i.C3)({},m),{AUTO:"auto",AUTO_END:"auto-end",AUTO_START:"auto-start"});function va(e){switch(e){case ga.TOP_LEFT:return"top-start";case ga.TOP:return"top";case ga.TOP_RIGHT:return"top-end";case ga.RIGHT_TOP:return"right-start";case ga.RIGHT:return"right";case ga.RIGHT_BOTTOM:return"right-end";case ga.BOTTOM_RIGHT:return"bottom-end";case ga.BOTTOM:return"bottom";case ga.BOTTOM_LEFT:return"bottom-start";case ga.LEFT_BOTTOM:return"left-end";case ga.LEFT:return"left";case ga.LEFT_TOP:return"left-start";case"auto":case"auto-start":case"auto-end":return e;default:return function(e){throw new Error("Unexpected position: "+e)}(e)}}var ya="click",ba="hover",_a="hover-target",wa=function(e){function t(){var t,n,o,a=null!==e&&e.apply(this,arguments)||this;return a.state={hasDarkParent:!1,isClosingViaEscapeKeypress:!1,isOpen:a.getIsOpen(a.props)},a.popoverElement=null,a.popoverRef=(t=a,n="popoverElement",o=a.props.popoverRef,function(e){t[n]=e,ti(o,e)}),a.targetRef=r.createRef(),a.transitionContainerElement=r.createRef(),a.isMouseInTargetOrPopover=!1,a.lostFocusOnSamePage=!0,a.isControlled=function(){return void 0!==a.props.isOpen},a.isArrowEnabled=function(){var e,t;return!a.props.minimal&&!1!==(null===(t=null===(e=a.props.modifiers)||void 0===e?void 0:e.arrow)||void 0===t?void 0:t.enabled)},a.isHoverInteractionKind=function(){return a.props.interactionKind===ba||a.props.interactionKind===_a},a.reposition=function(){var e;return null===(e=a.popperScheduleUpdate)||void 0===e?void 0:e.call(a)},a.renderTarget=function(e){var t,n,o,c,l=e.ref,u=a.props,d=u.children,f=u.className,h=u.fill,p=u.openOnTargetFocus,m=u.renderTarget,g=a.state.isOpen,y=a.isControlled(),b=a.isHoverInteractionKind(),_=a.props.targetTagName;h&&(_="div");var w,x=ni(l,a.targetRef),S=b?{onBlur:a.handleTargetBlur,onContextMenu:a.handleTargetContextMenu,onFocus:a.handleTargetFocus,onMouseEnter:a.handleMouseEnter,onMouseLeave:a.handleMouseLeave}:{onClick:a.handleTargetClick,onKeyDown:a.handleKeyDown},k=p&&b?0:void 0,E=(0,i.C3)({className:s()(f,_t,(t={},t[vt]=g,t[v]=g&&!y&&!b,t)),ref:x},S),O={"aria-expanded":g,"aria-haspopup":a.props.interactionKind===_a?void 0:null!==(o=a.props.popupKind)&&void 0!==o?o:"menu"},T=((n={})[v]=g&&!y&&!b,n[C]=h,n);if(void 0!==m)w=m((0,i.C3)((0,i.C3)((0,i.C3)({},E),O),{className:s()(E.className,T),isOpen:g,tabIndex:k}));else{var A=ii(r.Children.toArray(d)[0]);if(void 0===A)return null;var R=r.cloneElement(A,(0,i.C3)((0,i.C3)({},O),{className:s()(A.props.className,T),disabled:!(!g||!si(A,pa))||A.props.disabled,tabIndex:null!==(c=A.props.tabIndex)&&void 0!==c?c:k}));w=r.createElement(_,(0,i.C3)((0,i.C3)({},E),a.props.targetProps),R)}return r.createElement(ra,{targetRef:a.targetRef,onResize:a.reposition},w)},a.renderPopover=function(e){var t,n=a.props,o=n.autoFocus,c=n.enforceFocus,l=n.backdropProps,u=n.canEscapeKeyClose,d=n.hasBackdrop,f=n.interactionKind,h=n.usePortal,p=a.state,m=p.isClosingViaEscapeKeypress,g=p.isOpen,v=function(e,t){var n=oa(e);return void 0===t?ia(n)?"".concat(aa(n)," ").concat(sa(n)):"".concat(sa(n)," ").concat(aa(n)):ia(n)?"".concat(aa(n)," ").concat(parseInt(t.top,10)+15,"px"):"".concat(parseInt(t.left,10)+15,"px ").concat(aa(n))}(e.placement,a.isArrowEnabled()?e.arrowProps.style:void 0);a.popperScheduleUpdate=e.update;var y={onClick:a.handlePopoverClick,onKeyDown:function(e){return ci(e)&&a.handlePopoverClick(e)}};(f===ba||!h&&f===_a)&&(y.onMouseEnter=a.handleMouseEnter,y.onMouseLeave=a.handleMouseLeave);var b=oa(e.placement),_=s()(ct,((t={})[w]=a.props.inheritDarkTheme&&a.state.hasDarkParent,t[A]=a.props.minimal,t[dt]=a.props.captureDismiss,t[gt]=a.props.matchTargetWidth,t[bt]=!0===e.isReferenceHidden,t[yt]=!0===e.hasPopperEscaped,t),"".concat(ht,"-").concat(b),a.props.popoverClassName),x=!a.isHoverInteractionKind()&&void 0,C=!a.isHoverInteractionKind()&&(!!m||a.props.shouldReturnFocusOnClose);return r.createElement(ta,{autoFocus:null!==o&&void 0!==o?o:x,backdropClassName:ut,backdropProps:l,canEscapeKeyClose:u,canOutsideClickClose:f===ya,childRef:a.transitionContainerElement,enforceFocus:c,hasBackdrop:d,isOpen:g,lazy:a.props.lazy,onClose:a.handleOverlayClose,onClosed:a.props.onClosed,onClosing:a.props.onClosing,onOpened:a.props.onOpened,onOpening:a.props.onOpening,transitionDuration:a.props.transitionDuration,transitionName:ct,usePortal:h,portalClassName:a.props.portalClassName,portalContainer:a.props.portalContainer,portalStopPropagationEvents:a.props.portalStopPropagationEvents,shouldReturnFocusOnClose:C},r.createElement("div",{className:wt,ref:ni(e.ref,a.transitionContainerElement),style:e.style},r.createElement(ra,{onResize:a.reposition},r.createElement("div",(0,i.C3)({className:_,style:{transformOrigin:v},ref:a.popoverRef},y),a.isArrowEnabled()&&r.createElement(ua,{arrowProps:e.arrowProps,placement:e.placement}),r.createElement("div",{className:ft},a.props.content)))))},a.handleTargetFocus=function(e){if(a.props.openOnTargetFocus&&a.isHoverInteractionKind()){if(null==e.relatedTarget&&!a.lostFocusOnSamePage)return;a.handleMouseEnter(e)}},a.handleTargetBlur=function(e){a.props.openOnTargetFocus&&a.isHoverInteractionKind()&&(null!=e.relatedTarget&&(e.relatedTarget===a.popoverElement||a.isElementInPopover(e.relatedTarget))||a.handleMouseLeave(e)),a.lostFocusOnSamePage=null!=e.relatedTarget},a.handleTargetContextMenu=function(e){e.defaultPrevented&&a.setOpenState(!1,e)},a.handleMouseEnter=function(e){a.isMouseInTargetOrPopover=!0,a.props.usePortal||!a.isElementInPopover(e.target)||a.props.interactionKind!==_a||a.props.openOnTargetFocus?a.props.disabled||a.setOpenState(!0,e,a.props.hoverOpenDelay):a.handleMouseLeave(e)},a.handleMouseLeave=function(e){a.isMouseInTargetOrPopover=!1,e.persist(),a.setTimeout((function(){a.isMouseInTargetOrPopover||a.setOpenState(!1,e,a.props.hoverCloseDelay)}))},a.handlePopoverClick=function(e){var t,n,r,o=e.target,i=o.closest(".".concat(ct)),s=o.closest(".".concat(ct)),c=(null!==i&&void 0!==i?i:s)===a.getPopoverElement(),l=null!==(n=null!==(t=null===i||void 0===i?void 0:i.classList.contains(dt))&&void 0!==t?t:null===s||void 0===s?void 0:s.classList.contains(dt))&&void 0!==n&&n,u=o.closest(".".concat(pt,", .").concat(mt)),d=null!==(r=null===u||void 0===u?void 0:u.classList.contains(pt))&&void 0!==r&&r,f=null!=o.closest(":disabled, .".concat(x));!d||f||l&&!c||a.setOpenState(!1,e)},a.handleOverlayClose=function(e){var t;if(null!=a.targetRef.current&&void 0!==e){var n,r,o=null!==(t=e.nativeEvent)&&void 0!==t?t:e,i=o.composed?o.composedPath()[0]:o.target;((n=a.targetRef.current)!==(r=i)&&!n.contains(r)||e.nativeEvent instanceof KeyboardEvent)&&a.setOpenState(!1,e)}},a.handleKeyDown=function(e){ci(e)&&a.handleTargetClick(e)},a.handleTargetClick=function(e){a.state.isOpen&&a.isSimulatedButtonClick(e)||a.props.disabled||a.isElementInPopover(e.target)||(null==a.props.isOpen?a.setState((function(e){return{isOpen:!e.isOpen}})):a.setOpenState(!a.props.isOpen,e))},a.isSimulatedButtonClick=function(e){return!e.isTrusted&&e.target.matches(".".concat(K))},a}return(0,i.ct)(t,e),t.prototype.getPopoverElement=function(){var e;return null===(e=this.popoverElement)||void 0===e?void 0:e.querySelector(".".concat(ct))},t.prototype.getIsOpen=function(e){var t;return!e.disabled&&(null!==(t=e.isOpen)&&void 0!==t?t:e.defaultIsOpen)},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.content,o=e.placement,i=e.position,a=void 0===i?"auto":i,s=e.positioningStrategy,c=this.state.isOpen;return null==n||"string"===typeof n&&""===n.trim()?(t||!1===c||Bn("production")||console.warn(kn),this.renderTarget({ref:Ca})):r.createElement(br,null,r.createElement(Or,null,this.renderTarget),r.createElement(ei,{innerRef:this.popoverRef,placement:null!==o&&void 0!==o?o:va(a),strategy:s,modifiers:this.getPopperModifiers()},this.renderPopover))},t.prototype.componentDidMount=function(){this.updateDarkParent()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDarkParent();var r=this.getIsOpen(this.props);null!=this.props.isOpen&&r!==this.state.isOpen?(this.setOpenState(r),this.setState({isOpen:r})):this.props.disabled&&this.state.isOpen&&null==this.props.isOpen&&this.setOpenState(!1)},t.prototype.validateProps=function(e){null==e.isOpen&&null!=e.onInteraction&&console.warn(Tn),e.hasBackdrop&&!e.usePortal&&console.warn(En),e.hasBackdrop&&e.interactionKind!==ya&&console.warn(xn),void 0!==e.placement&&void 0!==e.position&&console.warn(On);var t=r.Children.count(e.children),n=void 0!==e.renderTarget,o=void 0!==e.targetProps;0!==t||n||console.warn(wn),t>1&&console.warn(Cn),t>0&&n&&console.warn(Sn),n&&o&&console.warn(An)},t.prototype.getPopperModifiers=function(){var e,t,n,r,o=this.props,a=o.matchTargetWidth,s=o.modifiers,c=o.modifiersCustom,l=[(0,i.C3)({enabled:this.isArrowEnabled(),name:"arrow"},null===s||void 0===s?void 0:s.arrow),(0,i.C3)((0,i.C3)({name:"computeStyles"},null===s||void 0===s?void 0:s.computeStyles),{options:(0,i.C3)({adaptive:!0,gpuAcceleration:!1},null===(e=null===s||void 0===s?void 0:s.computeStyles)||void 0===e?void 0:e.options)}),(0,i.C3)((0,i.C3)({enabled:this.isArrowEnabled(),name:"offset"},null===s||void 0===s?void 0:s.offset),{options:(0,i.C3)({offset:[0,15]},null===(t=null===s||void 0===s?void 0:s.offset)||void 0===t?void 0:t.options)}),(0,i.C3)((0,i.C3)({name:"flip"},null===s||void 0===s?void 0:s.flip),{options:(0,i.C3)({boundary:this.props.boundary,rootBoundary:this.props.rootBoundary},null===(n=null===s||void 0===s?void 0:s.flip)||void 0===n?void 0:n.options)}),(0,i.C3)((0,i.C3)({name:"preventOverflow"},null===s||void 0===s?void 0:s.preventOverflow),{options:(0,i.C3)({boundary:this.props.boundary,rootBoundary:this.props.rootBoundary},null===(r=null===s||void 0===s?void 0:s.preventOverflow)||void 0===r?void 0:r.options)})];return a&&l.push(ma),void 0!==c&&l.push.apply(l,c),l},t.prototype.setOpenState=function(e,t,n){var r,o,i,a,s,c=this;null===(r=this.cancelOpenTimeout)||void 0===r||r.call(this),void 0!==n&&n>0?(null===t||void 0===t||t.persist(),this.cancelOpenTimeout=this.setTimeout((function(){c.setOpenState(e,t)}),n)):(null==this.props.isOpen?this.setState({isOpen:e}):null===(i=(o=this.props).onInteraction)||void 0===i||i.call(o,e,t),e||(null===(s=(a=this.props).onClose)||void 0===s||s.call(a,t),this.setState({isClosingViaEscapeKeypress:xa(null===t||void 0===t?void 0:t.nativeEvent)})))},t.prototype.updateDarkParent=function(){var e;if(this.props.usePortal&&this.state.isOpen){var t=null!=(null===(e=this.targetRef.current)||void 0===e?void 0:e.closest(".".concat(w)));this.setState({hasDarkParent:t})}},t.prototype.isElementInPopover=function(e){var t,n;return null!==(n=null===(t=this.getPopoverElement())||void 0===t?void 0:t.contains(e))&&void 0!==n&&n},t.displayName="".concat(on,".Popover"),t.defaultProps={boundary:"clippingParents",captureDismiss:!1,defaultIsOpen:!1,disabled:!1,fill:!1,hasBackdrop:!1,hoverCloseDelay:300,hoverOpenDelay:150,inheritDarkTheme:!0,interactionKind:ya,matchTargetWidth:!1,minimal:!1,openOnTargetFocus:!0,positioningStrategy:"absolute",renderTarget:void 0,shouldReturnFocusOnClose:!1,targetTagName:"span",transitionDuration:300,usePortal:!0},t}(qn);function xa(e){return e instanceof KeyboardEvent&&"Escape"===e.key}function Ca(){}var Sa=Qn()?r.useLayoutEffect:r.useEffect,ka=r.forwardRef((function(e,t){var n,o=e.children,a=e.tagName,c=void 0===a?"div":a,l=e.title,u=e.className,d=e.ellipsize,f=(0,i.sX)(e,["children","tagName","title","className","ellipsize"]),h=r.useRef(),p=r.useMemo((function(){return ni(h,t)}),[t]),m=r.useState(""),g=m[0],v=m[1],y=r.useState(),b=y[0],_=y[1];return Sa((function(){var e;null!=(null===(e=h.current)||void 0===e?void 0:e.textContent)&&(_(d&&h.current.scrollWidth>h.current.clientWidth),v(h.current.textContent))}),[h,o,d]),r.createElement(c,(0,i.C3)((0,i.C3)({},f),{className:s()((n={},n[j]=d,n),u),ref:p,title:null!==l&&void 0!==l?l:b?g:void 0}),o)}));ka.defaultProps={ellipsize:!1},ka.displayName="".concat(on,".Text");var Ea=r.forwardRef((function(e,t){var n,o,a=e.active,c=e.className,l=e.children,u=e.disabled,d=e.icon,f=e.intent,h=e.labelClassName,p=e.labelElement,m=e.multiline,g=e.popoverProps,y=e.roleStructure,b=void 0===y?"menuitem":y,_=e.selected,w=e.shouldDismissPopover,S=e.submenuProps,k=e.text,E=e.textClassName,O=e.tagName,T=void 0===O?"a":O,A=e.htmlTitle,R=(0,i.sX)(e,["active","className","children","disabled","icon","intent","labelClassName","labelElement","multiline","popoverProps","roleStructure","selected","shouldDismissPopover","submenuProps","text","textClassName","tagName","htmlTitle"]),P="listoption"===b?["option",void 0,Boolean(_)]:"menuitem"===b?["none","menuitem",void 0]:"none"===b?["none",void 0,void 0]:[void 0,void 0,void 0],N=P[0],M=P[1],I=P[2],L="listoption"===b,j=L&&_,F=null!=d,B=null!=l,z=nn(f),H=s()(je,z,((n={})[v]=a,n[x]=u,n[pt]=w&&!u&&!B,n[Fe]=L,n[D]=j,n),c),V=null==e.label&&null==p?null:r.createElement("span",{className:s()(He,h)},e.label,p),q=r.createElement(T,(0,i.C3)((0,i.C3)((0,i.C3)({onKeyDown:Jn(["Enter"," "]),role:B?"none":M,tabIndex:B?-1:0},sn(R)),u?Aa:{}),{className:H}),j?r.createElement(Xn,{className:Be}):void 0,F?r.createElement("span",{className:ze},r.createElement(gr,{icon:d,"aria-hidden":!0,tabIndex:-1})):void 0,r.createElement(ka,{className:s()(C,E),ellipsize:!m,title:A},k),V,B?r.createElement(Yn,{className:qe,title:"Open sub menu"}):void 0),U=s()(((o={})[Ve]=B,o));return r.createElement("li",{className:U,ref:t,role:N,"aria-selected":I},null==l?q:r.createElement(wa,(0,i.C3)({autoFocus:!1,captureDismiss:!1,disabled:u,enforceFocus:!1,hoverCloseDelay:0,interactionKind:"hover",modifiers:Ta,targetProps:{role:M,tabIndex:0},placement:"right-start",usePortal:!1},g,{content:r.createElement(Un,(0,i.C3)({},S),l),minimal:!0,popoverClassName:s()(Ve,null===g||void 0===g?void 0:g.popoverClassName)}),q))}));Ea.defaultProps={active:!1,disabled:!1,multiline:!1,popoverProps:{},selected:void 0,shouldDismissPopover:!0,text:""},Ea.displayName="".concat(on,".MenuItem");var Oa,Ta={flip:{options:{rootBoundary:"viewport",padding:20},enabled:!0},offset:{options:{offset:[-5,0]},enabled:!0},preventOverflow:{options:{rootBoundary:"viewport",padding:20},enabled:!0}},Aa={"aria-disabled":!0,href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1},Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=(0,i.sX)(e,["className"]);return r.createElement("div",(0,i.C3)({className:s()(Ye,t)},n))},t.displayName="".concat(on,".NavbarDivider"),t}(qn),Pa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.align,n=e.children,o=e.className,a=(0,i.sX)(e,["align","children","className"]),c=s()(Ke,Jt(t),o);return r.createElement("div",(0,i.C3)({className:c},a),n)},t.displayName="".concat(on,".NavbarGroup"),t.defaultProps={align:c.LEFT},t}(qn),Na=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=(0,i.sX)(e,["children","className"]);return r.createElement("div",(0,i.C3)({className:s()(Xe,n)},o),t)},t.displayName="".concat(on,".NavbarHeading"),t}(qn),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.children,o=t.className,a=t.fixedToTop,c=(0,i.sX)(t,["children","className","fixedToTop"]),l=s()(Ge,((e={})[S]=a,e),o);return r.createElement("div",(0,i.C3)({className:l},c),n)},t.displayName="".concat(on,".Navbar"),t.Divider=Ra,t.Group=Pa,t.Heading=Na,t}(qn),Ma=(0,i.C3)((0,i.C3)((0,i.C3)({},{BLACK:"#111418",DARK_GRAY1:"#1C2127",DARK_GRAY2:"#252A31",DARK_GRAY3:"#2F343C",DARK_GRAY4:"#383E47",DARK_GRAY5:"#404854",GRAY1:"#5F6B7C",GRAY2:"#738091",GRAY3:"#8F99A8",GRAY4:"#ABB3BF",GRAY5:"#C5CBD3",LIGHT_GRAY1:"#D3D8DE",LIGHT_GRAY2:"#DCE0E5",LIGHT_GRAY3:"#E5E8EB",LIGHT_GRAY4:"#EDEFF2",LIGHT_GRAY5:"#F6F7F9",WHITE:"#FFFFFF"}),{BLUE1:"#184A90",BLUE2:"#215DB0",BLUE3:"#2D72D2",BLUE4:"#4C90F0",BLUE5:"#8ABBFF",GREEN1:"#165A36",GREEN2:"#1C6E42",GREEN3:"#238551",GREEN4:"#32A467",GREEN5:"#72CA9B",ORANGE1:"#77450D",ORANGE2:"#935610",ORANGE3:"#C87619",ORANGE4:"#EC9A3C",ORANGE5:"#FBB360",RED1:"#8E292C",RED2:"#AC2F33",RED3:"#CD4246",RED4:"#E76A6E",RED5:"#FA999C"}),{CERULEAN1:"#0C5174",CERULEAN2:"#0F6894",CERULEAN3:"#147EB3",CERULEAN4:"#3FA6DA",CERULEAN5:"#68C1EE",FOREST1:"#1D7324",FOREST2:"#238C2C",FOREST3:"#29A634",FOREST4:"#43BF4D",FOREST5:"#62D96B",GOLD1:"#5C4405",GOLD2:"#866103",GOLD3:"#D1980B",GOLD4:"#F0B726",GOLD5:"#FBD065",INDIGO1:"#5642A6",INDIGO2:"#634DBF",INDIGO3:"#7961DB",INDIGO4:"#9881F3",INDIGO5:"#BDADFF",LIME1:"#43501B",LIME2:"#5A701A",LIME3:"#8EB125",LIME4:"#B6D94C",LIME5:"#D4F17E",ROSE1:"#A82255",ROSE2:"#C22762",ROSE3:"#DB2C6F",ROSE4:"#F5498B",ROSE5:"#FF66A1",SEPIA1:"#5E4123",SEPIA2:"#7A542E",SEPIA3:"#946638",SEPIA4:"#AF855A",SEPIA5:"#D0B090",TURQUOISE1:"#004D46",TURQUOISE2:"#007067",TURQUOISE3:"#00A396",TURQUOISE4:"#13C9BA",TURQUOISE5:"#7AE1D8",VERMILION1:"#96290D",VERMILION2:"#B83211",VERMILION3:"#D33D17",VERMILION4:"#EB6847",VERMILION5:"#FF9980",VIOLET1:"#5C255C",VIOLET2:"#7C327C",VIOLET3:"#9D3F9D",VIOLET4:"#BD6BBD",VIOLET5:"#D69FD6"});!function(e){e[e.SMALL=20]="SMALL",e[e.STANDARD=50]="STANDARD",e[e.LARGE=100]="LARGE"}(Oa||(Oa={}));var Ia=45,La="M 50,50 m 0,-".concat(Ia," a ").concat(Ia,",").concat(Ia," 0 1 1 0,").concat(90," a ").concat(Ia,",").concat(Ia," 0 1 1 0,-").concat(90),ja=280,Fa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.forceUpdate()},t.prototype.render=function(){var e,t=this.props,n=t.className,o=t.intent,a=t.value,c=t.tagName,l=void 0===c?"div":c,u=(0,i.sX)(t,["className","intent","value","tagName"]),d=this.getSize(),f=s()(At,nn(o),((e={})[Nt]=null!=a,e),n),h=Math.min(16,4*Oa.LARGE/d),p=ja-ja*(null==a?.25:zn(a,0,1));return r.createElement(l,(0,i.C3)({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":void 0===a?void 0:100*a,className:f,role:"progressbar"},u),r.createElement(l,{className:Rt},r.createElement("svg",{width:d,height:d,strokeWidth:h.toFixed(2),viewBox:this.getViewBox(h)},r.createElement("path",{className:Dt,d:La}),r.createElement("path",{className:Pt,d:La,pathLength:ja,strokeDasharray:"".concat(ja," ").concat(ja),strokeDashoffset:p}))))},t.prototype.validateProps=function(e){var t=e.className,n=void 0===t?"":t;null!=e.size&&(n.indexOf(M)>=0||n.indexOf(O)>=0)&&console.warn(Nn)},t.prototype.getSize=function(){var e=this.props,t=e.className,n=void 0===t?"":t,r=e.size;return null==r?n.indexOf(M)>=0?Oa.SMALL:n.indexOf(O)>=0?Oa.LARGE:Oa.STANDARD:Math.max(10,r)},t.prototype.getViewBox=function(e){var t=Ia+e/2,n=(50-t).toFixed(2),r=(2*t).toFixed(2);return"".concat(n," ").concat(n," ").concat(r," ").concat(r)},t.displayName="".concat(on,".Spinner"),t}(qn),Ba=r.forwardRef((function(e,t){var n=Ha(e,t);return r.createElement("button",(0,i.C3)({type:"button"},sn(e),n),Va(e))}));Ba.displayName="".concat(on,".Button");var za=r.forwardRef((function(e,t){var n=e.href,o=e.tabIndex,a=void 0===o?0:o,s=Ha(e,t);return r.createElement("a",(0,i.C3)({role:"button"},sn(e),s,{"aria-disabled":s.disabled,href:s.disabled?void 0:n,tabIndex:s.disabled?-1:a}),Va(e))}));function Ha(e,t){var n,o=e.active,i=void 0!==o&&o,a=e.alignText,c=e.fill,l=e.large,u=e.loading,d=void 0!==u&&u,f=e.minimal,h=e.onBlur,p=e.onKeyDown,m=e.onKeyUp,g=e.outlined,y=e.small,b=e.tabIndex,_=e.disabled||d,w=r.useState(),S=w[0],k=w[1],E=r.useState(!1),P=E[0],N=E[1],D=r.useRef(null),I=r.useCallback((function(e){P&&N(!1),null===h||void 0===h||h(e)}),[P,h]),L=r.useCallback((function(e){ci(e)&&(e.preventDefault(),e.key!==S&&N(!0)),k(e.key),null===p||void 0===p||p(e)}),[S,p]),j=r.useCallback((function(e){var t;ci(e)&&(N(!1),null===(t=D.current)||void 0===t||t.click()),k(void 0),null===m||void 0===m||m(e)}),[m]);return{className:s()(K,((n={})[v]=!_&&(i||P),n[x]=_,n[C]=c,n[O]=l,n[T]=d,n[A]=f,n[R]=g,n[M]=y,n),Jt(a),nn(e.intent),e.className),disabled:_,onBlur:I,onClick:_?void 0:e.onClick,onFocus:_?void 0:e.onFocus,onKeyDown:L,onKeyUp:j,ref:ni(D,t),tabIndex:_?-1:b}}function Va(e){var t=e.children,n=e.ellipsizeText,o=e.icon,i=e.loading,a=e.rightIcon,c=e.text,l=e.textClassName,u=!oi(c)||!oi(t);return r.createElement(r.Fragment,null,i&&r.createElement(Fa,{key:"loading",className:X,size:Oa.SMALL}),r.createElement(gr,{key:"leftIcon",icon:o}),u&&r.createElement(ka,{key:"text",className:s()(Y,l),ellipsize:n,tagName:"span"},c,t),r.createElement(gr,{key:"rightIcon",icon:a}))}function qa(e){var t=e.children,n=e.prefixCls,o=e.id,i=e.overlayInnerStyle,a=e.className,c=e.style;return r.createElement("div",{className:s()("".concat(n,"-content"),a),style:c},r.createElement("div",{className:"".concat(n,"-inner"),id:o,role:"tooltip",style:i},"function"===typeof t?t():t))}function Ua(e){return Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ua(e)}function Wa(e){var t=function(e,t){if("object"!=Ua(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ua(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ua(t)?t:String(t)}function $a(e,t,n){return(t=Wa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ga(Object(n),!0).forEach((function(t){$a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ga(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xa(e,t){if(null==e)return{};var n,r,o=ui(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ya(e){if(Array.isArray(e))return e}function Qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Za(e,t){if(e){if("string"===typeof e)return Qa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qa(e,t):void 0}}function Ja(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function es(e,t){return Ya(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||Za(e,t)||Ja()}function ts(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}za.displayName="".concat(on,".AnchorButton");var ns={},rs=[];function os(e,t){}function is(e,t){}function as(e,t,n){t||ns[n]||(e(!1,n),ns[n]=!0)}function ss(e,t){as(os,e,t)}ss.preMessage=function(e){rs.push(e)},ss.resetWarned=function(){ns={}},ss.noteOnce=function(e,t){as(is,e,t)};const cs=ss;var ls=n(3184);function us(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}function ds(e,t){"function"===typeof e?e(t):"object"===Ua(e)&&e&&"current"in e&&(e.current=t)}function fs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){ds(t,e)}))}}function hs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return us((function(){return fs.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))}function ps(e){var t,n,r=(0,ls.isMemo)(e)?e.type.type:e.type;return!!("function"!==typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render)&&!!("function"!==typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render)}const ms=r.createContext(null);function gs(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function vs(e){return function(e){if(Array.isArray(e))return Qa(e)}(e)||gs(e)||Za(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ys=ts()?r.useLayoutEffect:r.useEffect,bs=function(e,t){var n=r.useRef(!0);ys((function(){return e(n.current)}),t),ys((function(){return n.current=!1,function(){n.current=!0}}),[])},_s=function(e,t){bs((function(t){if(!t)return e()}),t)};const ws=bs;var xs=[];var Cs,Ss="data-rc-order",ks="data-rc-priority",Es="rc-util-key",Os=new Map;function Ts(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Es}function As(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Rs(e){return Array.from((Os.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Ps(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ts())return null;var n=t.csp,r=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),s="prependQueue"===a,c=document.createElement("style");c.setAttribute(Ss,a),s&&i&&c.setAttribute(ks,"".concat(i)),null!==n&&void 0!==n&&n.nonce&&(c.nonce=null===n||void 0===n?void 0:n.nonce),c.innerHTML=e;var l=As(t),u=l.firstChild;if(r){if(s){var d=Rs(l).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Ss)))return!1;var t=Number(e.getAttribute(ks)||0);return i>=t}));if(d.length)return l.insertBefore(c,d[d.length-1].nextSibling),c}l.insertBefore(c,u)}else l.appendChild(c);return c}function Ns(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Rs(As(t)).find((function(n){return n.getAttribute(Ts(t))===e}))}function Ds(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ns(e,t);n&&As(t).removeChild(n)}function Ms(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Os.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=Ps("",t),o=r.parentNode;Os.set(e,o),e.removeChild(r)}}(As(n),n);var r=Ns(t,n);if(r){var o,i,a;if(null!==(o=n.csp)&&void 0!==o&&o.nonce&&r.nonce!==(null===(i=n.csp)||void 0===i?void 0:i.nonce))r.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var s=Ps(e,n);return s.setAttribute(Ts(n),t),s}function Is(e){var t=e.match(/^(.*)px$/),n=Number(null===t||void 0===t?void 0:t[1]);return Number.isNaN(n)?function(e){if("undefined"===typeof document)return 0;if(e||void 0===Cs){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var o=t.offsetWidth;n.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=n.clientWidth),document.body.removeChild(n),Cs=o-i}return Cs}():n}var Ls="rc-util-locker-".concat(Date.now()),js=0;function Fs(e){var t=!!e,n=es(r.useState((function(){return js+=1,"".concat(Ls,"_").concat(js)})),1)[0];ws((function(){if(t){var e=function(e){if("undefined"===typeof document||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:Is(n),height:Is(r)}}(document.body).width,r=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;Ms("\nhtml body {\n overflow-y: hidden;\n ".concat(r?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else Ds(n);return function(){Ds(n)}}),[t,n])}var Bs=!1;var zs=function(e){return!1!==e&&(ts()&&e?"string"===typeof e?document.querySelector(e):"function"===typeof e?e():e:null)},Hs=r.forwardRef((function(e,t){var n=e.open,o=e.autoLock,i=e.getContainer,a=(e.debug,e.autoDestroy),s=void 0===a||a,c=e.children,l=es(r.useState(n),2),u=l[0],d=l[1],f=u||n;r.useEffect((function(){(s||n)&&d(n)}),[n,s]);var h=es(r.useState((function(){return zs(i)})),2),p=h[0],m=h[1];r.useEffect((function(){var e=zs(i);m(null!==e&&void 0!==e?e:null)}));var g=function(e,t){var n=es(r.useState((function(){return ts()?document.createElement("div"):null})),1)[0],o=r.useRef(!1),i=r.useContext(ms),a=es(r.useState(xs),2),s=a[0],c=a[1],l=i||(o.current?void 0:function(e){c((function(t){return[e].concat(vs(t))}))});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function d(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return ws((function(){return e?i?i(u):u():d(),d}),[e]),ws((function(){s.length&&(s.forEach((function(e){return e()})),c(xs))}),[s]),[n,l]}(f&&!p),v=es(g,2),y=v[0],b=v[1],_=null!==p&&void 0!==p?p:y;Fs(o&&n&&ts()&&(_===y||_===document.body));var w=null;c&&ps(c)&&t&&(w=c.ref);var x=hs(w,t);if(!f||!ts()||void 0===p)return null;var C,S=!1===_||("boolean"===typeof C&&(Bs=C),Bs),k=c;return t&&(k=r.cloneElement(c,{ref:x})),r.createElement(ms.Provider,{value:b},S?k:(0,Tr.createPortal)(k,_))}));const Vs=Hs;function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.Children.forEach(e,(function(e){(void 0!==e&&null!==e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(qs(e)):(0,ls.isFragment)(e)&&e.props?n=n.concat(qs(e.props.children,t)):n.push(e))})),n}function Us(e){return e instanceof HTMLElement||e instanceof SVGElement}function Ws(e){return Us(e)?e:e instanceof r.Component?Tr.findDOMNode(e):null}var $s=r.createContext(null);var Gs=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),Ks="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,Xs="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),Ys="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(Xs):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Qs=["top","right","bottom","left","width","height","size","weight"],Zs="undefined"!==typeof MutationObserver,Js=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&s()}function a(){Ys(i)}function s(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);o=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Ks&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Zs?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Ks&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Qs.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),ec=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},tc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Xs},nc=cc(0,0,0,0);function rc(e){return parseFloat(e)||0}function oc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+rc(e["border-"+n+"-width"])}),0)}function ic(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return nc;var r=tc(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=rc(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,s=rc(r.width),c=rc(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==t&&(s-=oc(r,"left","right")+i),Math.round(c+a)!==n&&(c-=oc(r,"top","bottom")+a)),!function(e){return e===tc(e).document.documentElement}(e)){var l=Math.round(s+i)-t,u=Math.round(c+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(u)&&(c-=u)}return cc(o.left,o.top,s,c)}var ac="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof tc(e).SVGGraphicsElement}:function(e){return e instanceof tc(e).SVGElement&&"function"===typeof e.getBBox};function sc(e){return Ks?ac(e)?function(e){var t=e.getBBox();return cc(0,0,t.width,t.height)}(e):ic(e):nc}function cc(e,t,n,r){return{x:e,y:t,width:n,height:r}}var lc=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=cc(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=sc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),uc=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return ec(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}(t);ec(this,{target:e,contentRect:n})},dc=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Gs,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof tc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new lc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof tc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new uc(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),fc="undefined"!==typeof WeakMap?new WeakMap:new Gs,hc=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Js.getInstance(),r=new dc(t,n,this);fc.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){hc.prototype[e]=function(){var t;return(t=fc.get(this))[e].apply(t,arguments)}}));const pc="undefined"!==typeof Xs.ResizeObserver?Xs.ResizeObserver:hc;var mc=new Map;var gc=new pc((function(e){e.forEach((function(e){var t,n=e.target;null===(t=mc.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));function vc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wa(r.key),r)}}function bc(e,t,n){return t&&yc(e.prototype,t),n&&yc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&di(e,t)}function wc(e){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wc(e)}function xc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xc=function(){return!!e})()}function Cc(e,t){if(t&&("object"===Ua(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ti(e)}function Sc(e){var t=xc();return function(){var n,r=wc(e);if(t){var o=wc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cc(this,n)}}var kc=function(e){_c(n,e);var t=Sc(n);function n(){return vc(this,n),t.apply(this,arguments)}return bc(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function Ec(e,t){var n=e.children,o=e.disabled,i=r.useRef(null),a=r.useRef(null),s=r.useContext($s),c="function"===typeof n,l=c?n(i):n,u=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!c&&r.isValidElement(l)&&ps(l),f=hs(d?l.ref:null,i),h=function(){var e;return Ws(i.current)||(i.current&&"object"===Ua(i.current)?Ws(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||Ws(a.current)};r.useImperativeHandle(t,(function(){return h()}));var p=r.useRef(e);p.current=e;var m=r.useCallback((function(e){var t=p.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,c=e.offsetWidth,l=e.offsetHeight,d=Math.floor(i),f=Math.floor(a);if(u.current.width!==d||u.current.height!==f||u.current.offsetWidth!==c||u.current.offsetHeight!==l){var h={width:d,height:f,offsetWidth:c,offsetHeight:l};u.current=h;var m=c===Math.round(i)?i:c,g=l===Math.round(a)?a:l,v=Ka(Ka({},h),{},{offsetWidth:m,offsetHeight:g});null===s||void 0===s||s(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return r.useEffect((function(){var e,t,n=h();return n&&!o&&(e=n,t=m,mc.has(e)||(mc.set(e,new Set),gc.observe(e)),mc.get(e).add(t)),function(){return function(e,t){mc.has(e)&&(mc.get(e).delete(t),mc.get(e).size||(gc.unobserve(e),mc.delete(e)))}(n,m)}}),[i.current,o]),r.createElement(kc,{ref:a},d?r.cloneElement(l,{ref:f}):l)}const Oc=r.forwardRef(Ec);function Tc(e,t){var n=e.children;return("function"===typeof n?[n]:qs(n)).map((function(n,o){var i=(null===n||void 0===n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return r.createElement(Oc,li({},e,{key:i,ref:0===o?t:void 0}),n)}))}var Ac=r.forwardRef(Tc);Ac.Collection=function(e){var t=e.children,n=e.onBatchResize,o=r.useRef(0),i=r.useRef([]),a=r.useContext($s),s=r.useCallback((function(e,t,r){o.current+=1;var s=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){s===o.current&&(null===n||void 0===n||n(i.current),i.current=[])})),null===a||void 0===a||a(e,t,r)}),[n,a]);return r.createElement($s.Provider,{value:s},t)};const Rc=Ac;function Pc(e){var t;return null===e||void 0===e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function Nc(e){return function(e){return Pc(e)instanceof ShadowRoot}(e)?Pc(e):null}function Dc(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}var Mc=0;var Ic=Ka({},o).useId;const Lc=Ic?function(e){var t=Ic();return e||t}:function(e){var t=es(r.useState("ssr-id"),2),n=t[0],o=t[1];return r.useEffect((function(){var e=Mc;Mc+=1,o("rc_unique_".concat(e))}),[]),e||n};var jc=["children"],Fc=r.createContext({});function Bc(e){var t=e.children,n=Xa(e,jc);return r.createElement(Fc.Provider,{value:n},t)}var zc=function(e){_c(n,e);var t=Sc(n);function n(){return vc(this,n),t.apply(this,arguments)}return bc(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);const Hc=zc;function Vc(e){var t=r.useRef(!1),n=es(r.useState(e),2),o=n[0],i=n[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[o,function(e,n){n&&t.current||i(e)}]}var qc="none",Uc="appear",Wc="enter",$c="leave",Gc="none",Kc="prepare",Xc="start",Yc="active",Qc="end",Zc="prepared";function Jc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var el=function(e,t){var n={animationend:Jc("Animation","AnimationEnd"),transitionend:Jc("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(ts(),"undefined"!==typeof window?window:{}),tl={};if(ts()){var nl=document.createElement("div");tl=nl.style}var rl={};function ol(e){if(rl[e])return rl[e];var t=el[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in tl)return rl[e]=t[i],rl[e]}return""}var il=ol("animationend"),al=ol("transitionend"),sl=!(!il||!al),cl=il||"animationend",ll=al||"transitionend";function ul(e,t){if(!e)return null;if("object"===Ua(e)){var n=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[n]}return"".concat(e,"-").concat(t)}const dl=function(e){var t=(0,r.useRef)(),n=(0,r.useRef)(e);n.current=e;var o=r.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(ll,o),e.removeEventListener(cl,o))}return r.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(ll,o),e.addEventListener(cl,o),t.current=e)},i]};const fl=ts()?r.useLayoutEffect:r.useEffect;var hl=function(e){return+setTimeout(e,16)},pl=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(hl=function(e){return window.requestAnimationFrame(e)},pl=function(e){return window.cancelAnimationFrame(e)});var ml=0,gl=new Map;function vl(e){gl.delete(e)}var yl=function(e){var t=ml+=1;return function n(r){if(0===r)vl(t),e();else{var o=hl((function(){n(r-1)}));gl.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};yl.cancel=function(e){var t=gl.get(e);return vl(e),pl(t)};const bl=yl;var _l=[Kc,Xc,Yc,Qc],wl=[Kc,Zc],xl=!1,Cl=!0;function Sl(e){return e===Yc||e===Qc}const kl=function(e,t,n){var o=es(Vc(Gc),2),i=o[0],a=o[1],s=function(){var e=r.useRef(null);function t(){bl.cancel(e.current)}return r.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=bl((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),c=es(s,2),l=c[0],u=c[1];var d=t?wl:_l;return fl((function(){if(i!==Gc&&i!==Qc){var e=d.indexOf(i),t=d[e+1],r=n(i);r===xl?a(t,!0):t&&l((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,i]),r.useEffect((function(){return function(){u()}}),[]),[function(){a(Kc,!0)},i]};const El=function(e){var t=e;"object"===Ua(e)&&(t=e.transitionSupport);var n=r.forwardRef((function(e,n){var o=e.visible,i=void 0===o||o,a=e.removeOnLeave,c=void 0===a||a,l=e.forceRender,u=e.children,d=e.motionName,f=e.leavedClassName,h=e.eventProps,p=function(e,n){return!(!e.motionName||!t||!1===n)}(e,r.useContext(Fc).motion),m=(0,r.useRef)(),g=(0,r.useRef)();var v=function(e,t,n,o){var i=o.motionEnter,a=void 0===i||i,s=o.motionAppear,c=void 0===s||s,l=o.motionLeave,u=void 0===l||l,d=o.motionDeadline,f=o.motionLeaveImmediately,h=o.onAppearPrepare,p=o.onEnterPrepare,m=o.onLeavePrepare,g=o.onAppearStart,v=o.onEnterStart,y=o.onLeaveStart,b=o.onAppearActive,_=o.onEnterActive,w=o.onLeaveActive,x=o.onAppearEnd,C=o.onEnterEnd,S=o.onLeaveEnd,k=o.onVisibleChanged,E=es(Vc(),2),O=E[0],T=E[1],A=es(Vc(qc),2),R=A[0],P=A[1],N=es(Vc(null),2),D=N[0],M=N[1],I=(0,r.useRef)(!1),L=(0,r.useRef)(null);function j(){return n()}var F=(0,r.useRef)(!1);function B(){P(qc,!0),M(null,!0)}function z(e){var t=j();if(!e||e.deadline||e.target===t){var n,r=F.current;R===Uc&&r?n=null===x||void 0===x?void 0:x(t,e):R===Wc&&r?n=null===C||void 0===C?void 0:C(t,e):R===$c&&r&&(n=null===S||void 0===S?void 0:S(t,e)),R!==qc&&r&&!1!==n&&B()}}var H=es(dl(z),1)[0],V=function(e){var t,n,r;switch(e){case Uc:return $a(t={},Kc,h),$a(t,Xc,g),$a(t,Yc,b),t;case Wc:return $a(n={},Kc,p),$a(n,Xc,v),$a(n,Yc,_),n;case $c:return $a(r={},Kc,m),$a(r,Xc,y),$a(r,Yc,w),r;default:return{}}},q=r.useMemo((function(){return V(R)}),[R]),U=es(kl(R,!e,(function(e){if(e===Kc){var t=q[Kc];return t?t(j()):xl}var n;return $ in q&&M((null===(n=q[$])||void 0===n?void 0:n.call(q,j(),null))||null),$===Yc&&(H(j()),d>0&&(clearTimeout(L.current),L.current=setTimeout((function(){z({deadline:!0})}),d))),$===Zc&&B(),Cl})),2),W=U[0],$=U[1],G=Sl($);F.current=G,fl((function(){T(t);var n,r=I.current;I.current=!0,!r&&t&&c&&(n=Uc),r&&t&&a&&(n=Wc),(r&&!t&&u||!r&&f&&!t&&u)&&(n=$c);var o=V(n);n&&(e||o[Kc])?(P(n),W()):P(qc)}),[t]),(0,r.useEffect)((function(){(R===Uc&&!c||R===Wc&&!a||R===$c&&!u)&&P(qc)}),[c,a,u]),(0,r.useEffect)((function(){return function(){I.current=!1,clearTimeout(L.current)}}),[]);var K=r.useRef(!1);(0,r.useEffect)((function(){O&&(K.current=!0),void 0!==O&&R===qc&&((K.current||O)&&(null===k||void 0===k||k(O)),K.current=!0)}),[O,R]);var X=D;return q[Kc]&&$===Xc&&(X=Ka({transition:"none"},X)),[R,$,X,null!==O&&void 0!==O?O:t]}(p,i,(function(){try{return m.current instanceof HTMLElement?m.current:Ws(g.current)}catch(e){return null}}),e),y=es(v,4),b=y[0],_=y[1],w=y[2],x=y[3],C=r.useRef(x);x&&(C.current=!0);var S,k=r.useCallback((function(e){m.current=e,ds(n,e)}),[n]),E=Ka(Ka({},h),{},{visible:i});if(u)if(b===qc)S=x?u(Ka({},E),k):!c&&C.current&&f?u(Ka(Ka({},E),{},{className:f}),k):l||!c&&!f?u(Ka(Ka({},E),{},{style:{display:"none"}}),k):null;else{var O,T;_===Kc?T="prepare":Sl(_)?T="active":_===Xc&&(T="start");var A=ul(d,"".concat(b,"-").concat(T));S=u(Ka(Ka({},E),{},{className:s()(ul(d,b),(O={},$a(O,A,A&&T),$a(O,d,"string"===typeof d),O)),style:w}),k)}else S=null;r.isValidElement(S)&&ps(S)&&(S.ref||(S=r.cloneElement(S,{ref:k})));return r.createElement(Hc,{ref:g},S)}));return n.displayName="CSSMotion",n}(sl);var Ol="add",Tl="keep",Al="remove",Rl="removed";function Pl(e){var t;return Ka(Ka({},t=e&&"object"===Ua(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Nl(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(Pl)}var Dl=["component","children","onVisibleChanged","onAllRemoved"],Ml=["status"],Il=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const Ll=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:El,n=function(e){_c(o,e);var n=Sc(o);function o(){var e;vc(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return $a(Ti(e=n.call.apply(n,[this].concat(r))),"state",{keyEntities:[]}),$a(Ti(e),"removeKey",(function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:Ka(Ka({},e),{},{status:Rl})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==Rl})).length})),e}return bc(o,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,s=o.onVisibleChanged,c=o.onAllRemoved,l=Xa(o,Dl),u=i||r.Fragment,d={};return Il.forEach((function(e){d[e]=l[e],delete l[e]})),delete l.keys,r.createElement(u,l,n.map((function(n,o){var i=n.status,l=Xa(n,Ml),u=i===Ol||i===Tl;return r.createElement(t,li({},d,{key:l.key,visible:u,eventProps:l,onVisibleChanged:function(t){(null===s||void 0===s||s(t,{key:l.key}),t)||0===e.removeKey(l.key)&&c&&c()}}),(function(e,t){return a(Ka(Ka({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=Nl(n),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=Nl(e),a=Nl(t);i.forEach((function(e){for(var t=!1,i=r;i<o;i+=1){var s=a[i];if(s.key===e.key){r<i&&(n=n.concat(a.slice(r,i).map((function(e){return Ka(Ka({},e),{},{status:Ol})}))),r=i),n.push(Ka(Ka({},s),{},{status:Tl})),r+=1,t=!0;break}}t||n.push(Ka(Ka({},e),{},{status:Al}))})),r<o&&(n=n.concat(a.slice(r).map((function(e){return Ka(Ka({},e),{},{status:Ol})}))));var s={};return n.forEach((function(e){var t=e.key;s[t]=(s[t]||0)+1})),Object.keys(s).filter((function(e){return s[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==Al}))).forEach((function(t){t.key===e&&(t.status=Tl)}))})),n}(r,o);return{keyEntities:i.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==Rl||e.status!==Al}))}}}]),o}(r.Component);return $a(n,"defaultProps",{component:"div"}),n}(sl),jl=El;function Fl(e){var t=e.prefixCls,n=e.align,o=e.arrow,i=e.arrowPos,a=o||{},c=a.className,l=a.content,u=i.x,d=void 0===u?0:u,f=i.y,h=void 0===f?0:f,p=r.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],v=n.points[1],y=g[0],b=g[1],_=v[0],w=v[1];y!==_&&["t","b"].includes(y)?"t"===y?m.top=0:m.bottom=0:m.top=h,b!==w&&["l","r"].includes(b)?"l"===b?m.left=0:m.right=0:m.left=d}return r.createElement("div",{ref:p,className:s()("".concat(t,"-arrow"),c),style:m},l)}function Bl(e){var t=e.prefixCls,n=e.open,o=e.zIndex,i=e.mask,a=e.motion;return i?r.createElement(jl,li({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return r.createElement("div",{style:{zIndex:o},className:s()("".concat(t,"-mask"),n)})})):null}var zl=r.memo((function(e){return e.children}),(function(e,t){return t.cache}));const Hl=zl;var Vl=r.forwardRef((function(e,t){var n=e.popup,o=e.className,i=e.prefixCls,a=e.style,c=e.target,l=e.onVisibleChanged,u=e.open,d=e.keepDom,f=e.fresh,h=e.onClick,p=e.mask,m=e.arrow,g=e.arrowPos,v=e.align,y=e.motion,b=e.maskMotion,_=e.forceRender,w=e.getPopupContainer,x=e.autoDestroy,C=e.portal,S=e.zIndex,k=e.onMouseEnter,E=e.onMouseLeave,O=e.onPointerEnter,T=e.ready,A=e.offsetX,R=e.offsetY,P=e.offsetR,N=e.offsetB,D=e.onAlign,M=e.onPrepare,I=e.stretch,L=e.targetWidth,j=e.targetHeight,F="function"===typeof n?n():n,B=u||d,z=(null===w||void 0===w?void 0:w.length)>0,H=es(r.useState(!w||!z),2),V=H[0],q=H[1];if(ws((function(){!V&&z&&c&&q(!0)}),[V,z,c]),!V)return null;var U="auto",W={left:"-1000vw",top:"-1000vh",right:U,bottom:U};if(T||!u){var $,G=v.points,K=v.dynamicInset||(null===($=v._experimental)||void 0===$?void 0:$.dynamicInset),X=K&&"r"===G[0][1],Y=K&&"b"===G[0][0];X?(W.right=P,W.left=U):(W.left=A,W.right=U),Y?(W.bottom=N,W.top=U):(W.top=R,W.bottom=U)}var Q={};return I&&(I.includes("height")&&j?Q.height=j:I.includes("minHeight")&&j&&(Q.minHeight=j),I.includes("width")&&L?Q.width=L:I.includes("minWidth")&&L&&(Q.minWidth=L)),u||(Q.pointerEvents="none"),r.createElement(C,{open:_||B,getContainer:w&&function(){return w(c)},autoDestroy:x},r.createElement(Bl,{prefixCls:i,open:u,zIndex:S,mask:p,motion:b}),r.createElement(Rc,{onResize:D,disabled:!u},(function(e){return r.createElement(jl,li({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:_,leavedClassName:"".concat(i,"-hidden")},y,{onAppearPrepare:M,onEnterPrepare:M,visible:u,onVisibleChanged:function(e){var t;null===y||void 0===y||null===(t=y.onVisibleChanged)||void 0===t||t.call(y,e),l(e)}}),(function(n,c){var l=n.className,d=n.style,p=s()(i,l,o);return r.createElement("div",{ref:fs(e,t,c),className:p,style:Ka(Ka(Ka(Ka({"--arrow-x":"".concat(g.x||0,"px"),"--arrow-y":"".concat(g.y||0,"px")},W),Q),d),{},{boxSizing:"border-box",zIndex:S},a),onMouseEnter:k,onMouseLeave:E,onPointerEnter:O,onClick:h},m&&r.createElement(Fl,{prefixCls:i,arrow:m,arrowPos:g,align:v}),r.createElement(Hl,{cache:!u&&!f},F))}))})))}));const ql=Vl;var Ul=r.forwardRef((function(e,t){var n=e.children,o=e.getTriggerDOMNode,i=ps(n),a=r.useCallback((function(e){ds(t,o?o(e):e)}),[o]),s=hs(a,n.ref);return i?r.cloneElement(n,{ref:s}):n}));const Wl=Ul;const $l=r.createContext(null);function Gl(e){return e?Array.isArray(e)?e:[e]:[]}const Kl=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1};function Xl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Yl(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Ql(e){return e.ownerDocument.defaultView}function Zl(e){for(var t=[],n=null===e||void 0===e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Ql(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function Jl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function eu(e){return Jl(parseFloat(e),0)}function tu(e,t){var n=Ka({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=Ql(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,c=t.borderRightWidth,l=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,h=e.clientWidth,p=eu(i),m=eu(a),g=eu(s),v=eu(c),y=Jl(Math.round(l.width/f*1e3)/1e3),b=Jl(Math.round(l.height/u*1e3)/1e3),_=(f-h-g-v)*y,w=(u-d-p-m)*b,x=p*b,C=m*b,S=g*y,k=v*y,E=0,O=0;if("clip"===r){var T=eu(o);E=T*y,O=T*b}var A=l.x+S-E,R=l.y+x-O,P=A+l.width+2*E-S-k-_,N=R+l.height+2*O-x-C-w;n.left=Math.max(n.left,A),n.top=Math.max(n.top,R),n.right=Math.min(n.right,P),n.bottom=Math.min(n.bottom,N)}})),n}function nu(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function ru(e,t){var n=es(t||[],2),r=n[0],o=n[1];return[nu(e.width,r),nu(e.height,o)]}function ou(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function iu(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function au(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var su=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const cu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vs,t=r.forwardRef((function(t,n){var o=t.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=t.children,c=t.action,l=void 0===c?"hover":c,u=t.showAction,d=t.hideAction,f=t.popupVisible,h=t.defaultPopupVisible,p=t.onPopupVisibleChange,m=t.afterPopupVisibleChange,g=t.mouseEnterDelay,v=t.mouseLeaveDelay,y=void 0===v?.1:v,b=t.focusDelay,_=t.blurDelay,w=t.mask,x=t.maskClosable,C=void 0===x||x,S=t.getPopupContainer,k=t.forceRender,E=t.autoDestroy,O=t.destroyPopupOnHide,T=t.popup,A=t.popupClassName,R=t.popupStyle,P=t.popupPlacement,N=t.builtinPlacements,D=void 0===N?{}:N,M=t.popupAlign,I=t.zIndex,L=t.stretch,j=t.getPopupClassNameFromAlign,F=t.fresh,B=t.alignPoint,z=t.onPopupClick,H=t.onPopupAlign,V=t.arrow,q=t.popupMotion,U=t.maskMotion,W=t.popupTransitionName,$=t.popupAnimation,G=t.maskTransitionName,K=t.maskAnimation,X=t.className,Y=t.getTriggerDOMNode,Q=Xa(t,su),Z=E||O||!1,J=es(r.useState(!1),2),ee=J[0],te=J[1];ws((function(){te(function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))}())}),[]);var ne=r.useRef({}),re=r.useContext($l),oe=r.useMemo((function(){return{registerSubPopup:function(e,t){ne.current[e]=t,null===re||void 0===re||re.registerSubPopup(e,t)}}}),[re]),ie=Lc(),ae=es(r.useState(null),2),se=ae[0],ce=ae[1],le=Dc((function(e){Us(e)&&se!==e&&ce(e),null===re||void 0===re||re.registerSubPopup(ie,e)})),ue=es(r.useState(null),2),de=ue[0],fe=ue[1],he=r.useRef(null),pe=Dc((function(e){Us(e)&&de!==e&&(fe(e),he.current=e)})),me=r.Children.only(a),ge=(null===me||void 0===me?void 0:me.props)||{},ve={},ye=Dc((function(e){var t,n,r=de;return(null===r||void 0===r?void 0:r.contains(e))||(null===(t=Nc(r))||void 0===t?void 0:t.host)===e||e===r||(null===se||void 0===se?void 0:se.contains(e))||(null===(n=Nc(se))||void 0===n?void 0:n.host)===e||e===se||Object.values(ne.current).some((function(t){return(null===t||void 0===t?void 0:t.contains(e))||e===t}))})),be=Yl(i,q,$,W),_e=Yl(i,U,K,G),we=es(r.useState(h||!1),2),xe=we[0],Ce=we[1],Se=null!==f&&void 0!==f?f:xe,ke=Dc((function(e){void 0===f&&Ce(e)}));ws((function(){Ce(f||!1)}),[f]);var Ee=r.useRef(Se);Ee.current=Se;var Oe=r.useRef([]);Oe.current=[];var Te=Dc((function(e){var t;ke(e),(null!==(t=Oe.current[Oe.current.length-1])&&void 0!==t?t:Se)!==e&&(Oe.current.push(e),null===p||void 0===p||p(e))})),Ae=r.useRef(),Re=function(){clearTimeout(Ae.current)},Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Re(),0===t?Te(e):Ae.current=setTimeout((function(){Te(e)}),1e3*t)};r.useEffect((function(){return Re}),[]);var Ne=es(r.useState(!1),2),De=Ne[0],Me=Ne[1];ws((function(e){e&&!Se||Me(!0)}),[Se]);var Ie=es(r.useState(null),2),Le=Ie[0],je=Ie[1],Fe=es(r.useState([0,0]),2),Be=Fe[0],ze=Fe[1],He=function(e){ze([e.clientX,e.clientY])},Ve=function(e,t,n,o,i,a,s){var c=es(r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),l=c[0],u=c[1],d=r.useRef(0),f=r.useMemo((function(){return t?Zl(t):[]}),[t]),h=r.useRef({});e||(h.current={});var p=Dc((function(){if(t&&n&&e){var r,c,l,d=t,p=d.ownerDocument,m=Ql(d).getComputedStyle(d),g=m.width,v=m.height,y=m.position,b=d.style.left,_=d.style.top,w=d.style.right,x=d.style.bottom,C=d.style.overflow,S=Ka(Ka({},i[o]),a),k=p.createElement("div");if(null===(r=d.parentElement)||void 0===r||r.appendChild(k),k.style.left="".concat(d.offsetLeft,"px"),k.style.top="".concat(d.offsetTop,"px"),k.style.position=y,k.style.height="".concat(d.offsetHeight,"px"),k.style.width="".concat(d.offsetWidth,"px"),d.style.left="0",d.style.top="0",d.style.right="auto",d.style.bottom="auto",d.style.overflow="hidden",Array.isArray(n))l={x:n[0],y:n[1],width:0,height:0};else{var E=n.getBoundingClientRect();l={x:E.x,y:E.y,width:E.width,height:E.height}}var O=d.getBoundingClientRect(),T=p.documentElement,A=T.clientWidth,R=T.clientHeight,P=T.scrollWidth,N=T.scrollHeight,D=T.scrollTop,M=T.scrollLeft,I=O.height,L=O.width,j=l.height,F=l.width,B={left:0,top:0,right:A,bottom:R},z={left:-M,top:-D,right:P-M,bottom:N-D},H=S.htmlRegion,V="visible",q="visibleFirst";"scroll"!==H&&H!==q&&(H=V);var U=H===q,W=tu(z,f),$=tu(B,f),G=H===V?$:W,K=U?$:G;d.style.left="auto",d.style.top="auto",d.style.right="0",d.style.bottom="0";var X=d.getBoundingClientRect();d.style.left=b,d.style.top=_,d.style.right=w,d.style.bottom=x,d.style.overflow=C,null===(c=d.parentElement)||void 0===c||c.removeChild(k);var Y=Jl(Math.round(L/parseFloat(g)*1e3)/1e3),Q=Jl(Math.round(I/parseFloat(v)*1e3)/1e3);if(0===Y||0===Q||Us(n)&&!Kl(n))return;var Z=S.offset,J=S.targetOffset,ee=es(ru(O,Z),2),te=ee[0],ne=ee[1],re=es(ru(l,J),2),oe=re[0],ie=re[1];l.x-=oe,l.y-=ie;var ae=es(S.points||[],2),se=ae[0],ce=ou(ae[1]),le=ou(se),ue=iu(l,ce),de=iu(O,le),fe=Ka({},S),he=ue.x-de.x+te,pe=ue.y-de.y+ne;function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G,r=O.x+e,o=O.y+t,i=r+L,a=o+I,s=Math.max(r,n.left),c=Math.max(o,n.top),l=Math.min(i,n.right),u=Math.min(a,n.bottom);return Math.max(0,(l-s)*(u-c))}var me,ge,ve,ye,be=st(he,pe),_e=st(he,pe,$),we=iu(l,["t","l"]),xe=iu(O,["t","l"]),Ce=iu(l,["b","r"]),Se=iu(O,["b","r"]),ke=S.overflow||{},Ee=ke.adjustX,Oe=ke.adjustY,Te=ke.shiftX,Ae=ke.shiftY,Re=function(e){return"boolean"===typeof e?e:e>=0};function ct(){me=O.y+pe,ge=me+I,ve=O.x+he,ye=ve+L}ct();var Pe=Re(Oe),Ne=le[0]===ce[0];if(Pe&&"t"===le[0]&&(ge>K.bottom||h.current.bt)){var De=pe;Ne?De-=I-j:De=we.y-Se.y-ne;var Me=st(he,De),Ie=st(he,De,$);Me>be||Me===be&&(!U||Ie>=_e)?(h.current.bt=!0,pe=De,ne=-ne,fe.points=[au(le,0),au(ce,0)]):h.current.bt=!1}if(Pe&&"b"===le[0]&&(me<K.top||h.current.tb)){var Le=pe;Ne?Le+=I-j:Le=Ce.y-xe.y-ne;var je=st(he,Le),Fe=st(he,Le,$);je>be||je===be&&(!U||Fe>=_e)?(h.current.tb=!0,pe=Le,ne=-ne,fe.points=[au(le,0),au(ce,0)]):h.current.tb=!1}var Be=Re(Ee),ze=le[1]===ce[1];if(Be&&"l"===le[1]&&(ye>K.right||h.current.rl)){var He=he;ze?He-=L-F:He=we.x-Se.x-te;var Ve=st(He,pe),qe=st(He,pe,$);Ve>be||Ve===be&&(!U||qe>=_e)?(h.current.rl=!0,he=He,te=-te,fe.points=[au(le,1),au(ce,1)]):h.current.rl=!1}if(Be&&"r"===le[1]&&(ve<K.left||h.current.lr)){var Ue=he;ze?Ue+=L-F:Ue=Ce.x-xe.x-te;var We=st(Ue,pe),$e=st(Ue,pe,$);We>be||We===be&&(!U||$e>=_e)?(h.current.lr=!0,he=Ue,te=-te,fe.points=[au(le,1),au(ce,1)]):h.current.lr=!1}ct();var Ge=!0===Te?0:Te;"number"===typeof Ge&&(ve<$.left&&(he-=ve-$.left-te,l.x+F<$.left+Ge&&(he+=l.x-$.left+F-Ge)),ye>$.right&&(he-=ye-$.right-te,l.x>$.right-Ge&&(he+=l.x-$.right+Ge)));var Ke=!0===Ae?0:Ae;"number"===typeof Ke&&(me<$.top&&(pe-=me-$.top-ne,l.y+j<$.top+Ke&&(pe+=l.y-$.top+j-Ke)),ge>$.bottom&&(pe-=ge-$.bottom-ne,l.y>$.bottom-Ke&&(pe+=l.y-$.bottom+Ke)));var Xe=O.x+he,Ye=Xe+L,Qe=O.y+pe,Ze=Qe+I,Je=l.x,et=Je+F,tt=l.y,nt=tt+j,rt=(Math.max(Xe,Je)+Math.min(Ye,et))/2-Xe,ot=(Math.max(Qe,tt)+Math.min(Ze,nt))/2-Qe;null===s||void 0===s||s(t,fe);var it=X.right-O.x-(he+O.width),at=X.bottom-O.y-(pe+O.height);u({ready:!0,offsetX:he/Y,offsetY:pe/Q,offsetR:it/Y,offsetB:at/Q,arrowX:rt/Y,arrowY:ot/Q,scaleX:Y,scaleY:Q,align:fe})}})),m=function(){u((function(e){return Ka(Ka({},e),{},{ready:!1})}))};return ws(m,[o]),ws((function(){e||m()}),[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,function(){d.current+=1;var e=d.current;Promise.resolve().then((function(){d.current===e&&p()}))}]}(Se,se,B?Be:de,P,D,M,H),qe=es(Ve,11),Ue=qe[0],We=qe[1],$e=qe[2],Ge=qe[3],Ke=qe[4],Xe=qe[5],Ye=qe[6],Qe=qe[7],Ze=qe[8],Je=qe[9],et=qe[10],tt=function(e,t,n,o){return r.useMemo((function(){var r=Gl(null!==n&&void 0!==n?n:t),i=Gl(null!==o&&void 0!==o?o:t),a=new Set(r),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[e,t,n,o])}(ee,l,u,d),nt=es(tt,2),rt=nt[0],ot=nt[1],it=rt.has("click"),at=ot.has("click")||ot.has("contextMenu"),st=Dc((function(){De||et()}));!function(e,t,n,r,o){ws((function(){if(e&&t&&n){var i=n,a=Zl(t),s=Zl(i),c=Ql(i),l=new Set([c].concat(vs(a),vs(s)));function u(){r(),o()}return l.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),c.addEventListener("resize",u,{passive:!0}),r(),function(){l.forEach((function(e){e.removeEventListener("scroll",u),c.removeEventListener("resize",u)}))}}}),[e,t,n])}(Se,de,se,st,(function(){Ee.current&&B&&at&&Pe(!1)})),ws((function(){st()}),[Be,P]),ws((function(){!Se||null!==D&&void 0!==D&&D[P]||st()}),[JSON.stringify(M)]);var ct=r.useMemo((function(){var e=function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s,c=i[a];if(Xl(null===(s=e[c])||void 0===s?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(c)}return""}(D,i,Je,B);return s()(e,null===j||void 0===j?void 0:j(Je))}),[Je,j,D,i,B]);r.useImperativeHandle(n,(function(){return{nativeElement:he.current,forceAlign:st}}));var lt=es(r.useState(0),2),ut=lt[0],dt=lt[1],ft=es(r.useState(0),2),ht=ft[0],pt=ft[1],mt=function(){if(L&&de){var e=de.getBoundingClientRect();dt(e.width),pt(e.height)}};function gt(e,t,n,r){ve[e]=function(o){var i;null===r||void 0===r||r(o),Pe(t,n);for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];null===(i=ge[e])||void 0===i||i.call.apply(i,[ge,o].concat(s))}}ws((function(){Le&&(et(),Le(),je(null))}),[Le]),(it||at)&&(ve.onClick=function(e){var t;Ee.current&&at?Pe(!1):!Ee.current&&it&&(He(e),Pe(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=ge.onClick)||void 0===t||t.call.apply(t,[ge,e].concat(r))}),function(e,t,n,o,i,a,s,c){var l=r.useRef(e),u=r.useRef(!1);l.current!==e&&(u.current=!0,l.current=e),r.useEffect((function(){var e=bl((function(){u.current=!1}));return function(){bl.cancel(e)}}),[e]),r.useEffect((function(){if(t&&o&&(!i||a)){var e=function(){var e=!1;return[function(t){var n=t.target;e=s(n)},function(t){var n=t.target;u.current||!l.current||e||s(n)||c(!1)}]},r=es(e(),2),d=r[0],f=r[1],h=es(e(),2),p=h[0],m=h[1],g=Ql(o);g.addEventListener("mousedown",d,!0),g.addEventListener("click",f,!0),g.addEventListener("contextmenu",f,!0);var v=Nc(n);return v&&(v.addEventListener("mousedown",p,!0),v.addEventListener("click",m,!0),v.addEventListener("contextmenu",m,!0)),function(){g.removeEventListener("mousedown",d,!0),g.removeEventListener("click",f,!0),g.removeEventListener("contextmenu",f,!0),v&&(v.removeEventListener("mousedown",p,!0),v.removeEventListener("click",m,!0),v.removeEventListener("contextmenu",m,!0))}}}),[t,n,o,i,a])}(Se,at,de,se,w,C,ye,Pe);var vt,yt,bt=rt.has("hover"),_t=ot.has("hover");bt&&(gt("onMouseEnter",!0,g,(function(e){He(e)})),gt("onPointerEnter",!0,g,(function(e){He(e)})),vt=function(e){(Se||De)&&null!==se&&void 0!==se&&se.contains(e.target)&&Pe(!0,g)},B&&(ve.onMouseMove=function(e){var t;null===(t=ge.onMouseMove)||void 0===t||t.call(ge,e)})),_t&&(gt("onMouseLeave",!1,y),gt("onPointerLeave",!1,y),yt=function(){Pe(!1,y)}),rt.has("focus")&>("onFocus",!0,b),ot.has("focus")&>("onBlur",!1,_),rt.has("contextMenu")&&(ve.onContextMenu=function(e){var t;Ee.current&&ot.has("contextMenu")?Pe(!1):(He(e),Pe(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=ge.onContextMenu)||void 0===t||t.call.apply(t,[ge,e].concat(r))}),X&&(ve.className=s()(ge.className,X));var wt=Ka(Ka({},ge),ve),xt={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){Q[e]&&(xt[e]=function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=wt[e])||void 0===t||t.call.apply(t,[wt].concat(r)),Q[e].apply(Q,r)})}));var Ct=r.cloneElement(me,Ka(Ka({},wt),xt)),St={x:Xe,y:Ye},kt=V?Ka({},!0!==V?V:{}):null;return r.createElement(r.Fragment,null,r.createElement(Rc,{disabled:!Se,ref:pe,onResize:function(){mt(),st()}},r.createElement(Wl,{getTriggerDOMNode:Y},Ct)),r.createElement($l.Provider,{value:oe},r.createElement(ql,{portal:e,ref:le,prefixCls:i,popup:T,className:s()(A,ct),style:R,target:de,onMouseEnter:vt,onMouseLeave:yt,onPointerEnter:vt,zIndex:I,open:Se,keepDom:De,fresh:F,onClick:z,mask:w,motion:be,maskMotion:_e,onVisibleChanged:function(e){Me(!1),et(),null===m||void 0===m||m(e)},onPrepare:function(){return new Promise((function(e){mt(),je((function(){return e}))}))},forceRender:k,autoDestroy:Z,getPopupContainer:S,align:Je,arrow:kt,arrowPos:St,ready:Ue,offsetX:We,offsetY:$e,offsetR:Ge,offsetB:Ke,onAlign:st,stretch:L,targetWidth:ut/Qe,targetHeight:ht/Ze})))}));return t}(Vs);var lu={shiftX:64,adjustY:1},uu={adjustX:1,shiftY:!0},du=[0,0],fu={left:{points:["cr","cl"],overflow:uu,offset:[-4,0],targetOffset:du},right:{points:["cl","cr"],overflow:uu,offset:[4,0],targetOffset:du},top:{points:["bc","tc"],overflow:lu,offset:[0,-4],targetOffset:du},bottom:{points:["tc","bc"],overflow:lu,offset:[0,4],targetOffset:du},topLeft:{points:["bl","tl"],overflow:lu,offset:[0,-4],targetOffset:du},leftTop:{points:["tr","tl"],overflow:uu,offset:[-4,0],targetOffset:du},topRight:{points:["br","tr"],overflow:lu,offset:[0,-4],targetOffset:du},rightTop:{points:["tl","tr"],overflow:uu,offset:[4,0],targetOffset:du},bottomRight:{points:["tr","br"],overflow:lu,offset:[0,4],targetOffset:du},rightBottom:{points:["bl","br"],overflow:uu,offset:[4,0],targetOffset:du},bottomLeft:{points:["tl","bl"],overflow:lu,offset:[0,4],targetOffset:du},leftBottom:{points:["br","bl"],overflow:uu,offset:[-4,0],targetOffset:du}};var hu=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],pu=function(e,t){var n=e.overlayClassName,o=e.trigger,i=void 0===o?["hover"]:o,a=e.mouseEnterDelay,s=void 0===a?0:a,c=e.mouseLeaveDelay,l=void 0===c?.1:c,u=e.overlayStyle,d=e.prefixCls,f=void 0===d?"rc-tooltip":d,h=e.children,p=e.onVisibleChange,m=e.afterVisibleChange,g=e.transitionName,v=e.animation,y=e.motion,b=e.placement,_=void 0===b?"right":b,w=e.align,x=void 0===w?{}:w,C=e.destroyTooltipOnHide,S=void 0!==C&&C,k=e.defaultVisible,E=e.getTooltipContainer,O=e.overlayInnerStyle,T=(e.arrowContent,e.overlay),A=e.id,R=e.showArrow,P=void 0===R||R,N=Xa(e,hu),D=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return D.current}));var M=Ka({},N);"visible"in e&&(M.popupVisible=e.visible);return r.createElement(cu,li({popupClassName:n,prefixCls:f,popup:function(){return r.createElement(qa,{key:"content",prefixCls:f,id:A,overlayInnerStyle:O},T)},action:i,builtinPlacements:fu,popupPlacement:_,ref:D,popupAlign:x,getPopupContainer:E,onPopupVisibleChange:p,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:v,popupMotion:y,defaultPopupVisible:k,autoDestroy:S,mouseLeaveDelay:l,popupStyle:u,mouseEnterDelay:s,arrow:P},M),h)};const mu=(0,r.forwardRef)(pu);function gu(e){return void 0!==e}const vu=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const yu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(cs(!a,"Warning: There may be circular references"),a)return!1;if(t===o)return!0;if(n&&i>1)return!1;r.add(t);var s=i+1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],o[c],s))return!1;return!0}if(t&&o&&"object"===Ua(t)&&"object"===Ua(o)){var l=Object.keys(t);return l.length===Object.keys(o).length&&l.every((function(n){return e(t[n],o[n],s)}))}return!1}(e,t)};var bu="%";function _u(e){return e.join(bu)}var wu=function(){function e(t){vc(this,e),$a(this,"instanceId",void 0),$a(this,"cache",new Map),this.instanceId=t}return bc(e,[{key:"get",value:function(e){return this.opGet(_u(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(_u(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();const xu=wu;var Cu="data-token-hash",Su="data-css-hash",ku="__cssinjs_instance__";function Eu(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Su,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[ku]=t[ku]||e,t[ku]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(Su,"]"))).forEach((function(t){var n,o=t.getAttribute(Su);r[o]?t[ku]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0}))}return new xu(e)}var Ou=r.createContext({hashPriority:"low",cache:Eu(),defaultCache:!0});const Tu=Ou;var Au=function(){function e(){vc(this,e),$a(this,"cache",void 0),$a(this,"keys",void 0),$a(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return bc(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach((function(e){var t;o?o=null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):o=void 0})),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=es(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),i=es(o,1)[0];this.delete(i)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,o){if(o===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var i=a.get(e);i?i.map||(i.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var o=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();$a(Au,"MAX_CACHE_SIZE",20),$a(Au,"MAX_CACHE_OFFSET",5);var Ru=0,Pu=function(){function e(t){vc(this,e),$a(this,"derivatives",void 0),$a(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Ru,0===t.length&&t.length,Ru+=1}return bc(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),Nu=new Au;function Du(e){var t=Array.isArray(e)?e:[e];return Nu.has(t)||Nu.set(t,new Pu(t)),Nu.get(t)}var Mu=new WeakMap,Iu={};var Lu=new WeakMap;function ju(e){var t=Lu.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof Pu?t+=r.id:r&&"object"===Ua(r)?t+=ju(r):t+=r})),Lu.set(e,t)),t}function Fu(e,t){return vu("".concat(t,"_").concat(ju(e)))}var Bu="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),zu="_bAmBoO_";function Hu(e,t,n){if(ts()){var r,o;Ms(e,Bu);var i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",null===t||void 0===t||t(i),document.body.appendChild(i);var a=n?n(i):null===(r=getComputedStyle(i).content)||void 0===r?void 0:r.includes(zu);return null===(o=i.parentNode)||void 0===o||o.removeChild(i),Ds(Bu),a}return!1}var Vu=void 0;var qu=ts();function Uu(e){return"number"===typeof e?"".concat(e,"px"):e}function Wu(e,t,n){var r;if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var o=Ka(Ka({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},($a(r={},Cu,t),$a(r,Su,n),r)),i=Object.keys(o).map((function(e){var t=o[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}var $u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},Gu=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=es(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},Ku=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,i,a=es(e,2),s=a[0],c=a[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[s])o[s]=c;else if(("string"===typeof c||"number"===typeof c)&&(null===n||void 0===n||null===(i=n.ignore)||void 0===i||!i[s])){var l,u=$u(s,null===n||void 0===n?void 0:n.prefix);r[u]="number"!==typeof c||null!==n&&void 0!==n&&null!==(l=n.unitless)&&void 0!==l&&l[s]?String(c):"".concat(c,"px"),o[s]="var(".concat(u,")")}})),[o,Gu(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},Xu=Ka({},o).useInsertionEffect,Yu=Xu?function(e,t,n){return Xu((function(){return e(),t()}),n)}:function(e,t,n){r.useMemo(e,n),ws((function(){return t(!0)}),n)};const Qu=Yu;const Zu="undefined"!==typeof Ka({},o).useInsertionEffect?function(e){var t=[],n=!1;return r.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}};const Ju=function(){return!1};function ed(e,t,n,o,i){var a=r.useContext(Tu).cache,s=_u([e].concat(vs(t))),c=Zu([s]),l=(Ju(),function(e){a.opUpdate(s,(function(t){var r=es(t||[void 0,void 0],2),o=r[0];var i=[void 0===o?0:o,r[1]||n()];return e?e(i):i}))});r.useMemo((function(){l()}),[s]);var u=a.opGet(s)[1];return Qu((function(){null===i||void 0===i||i(u)}),(function(e){return l((function(t){var n=es(t,2),r=n[0],o=n[1];return e&&0===r&&(null===i||void 0===i||i(u)),[r+1,o]})),function(){a.opUpdate(s,(function(t){var n=es(t||[],2),r=n[0],i=void 0===r?0:r,l=n[1];return 0===i-1?(c((function(){!e&&a.opGet(s)||null===o||void 0===o||o(l,!1)})),null):[i-1,l]}))}}),[s]),u}var td={},nd="css",rd=new Map;var od=0;function id(e,t){rd.set(e,(rd.get(e)||0)-1);var n=Array.from(rd.keys()),r=n.filter((function(e){return(rd.get(e)||0)<=0}));n.length-r.length>od&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(Cu,'="').concat(e,'"]')).forEach((function(e){var n;e[ku]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),rd.delete(e)}))}var ad=function(e,t,n,r){var o=Ka(Ka({},n.getDerivativeToken(e)),t);return r&&(o=r(o)),o},sd="token";function cd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(0,r.useContext)(Tu),i=o.cache.instanceId,a=o.container,s=n.salt,c=void 0===s?"":s,l=n.override,u=void 0===l?td:l,d=n.formatToken,f=n.getComputedToken,h=n.cssVar,p=function(e,t){for(var n=Mu,r=0;r<t.length;r+=1){var o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(Iu)||n.set(Iu,e()),n.get(Iu)}((function(){return Object.assign.apply(Object,[{}].concat(vs(t)))}),t),m=ju(p),g=ju(u),v=h?ju(h):"",y=ed(sd,[c,e.id,m,g,v],(function(){var t,n=f?f(p,u,e):ad(p,u,e,d),r=Ka({},n),o="";if(h){var i=es(Ku(n,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),2);n=i[0],o=i[1]}var a=Fu(n,c);n._tokenKey=a,r._tokenKey=Fu(r,c);var s=null!==(t=null===h||void 0===h?void 0:h.key)&&void 0!==t?t:a;n._themeKey=s,function(e){rd.set(e,(rd.get(e)||0)+1)}(s);var l="".concat(nd,"-").concat(vu(a));return n._hashId=l,[n,l,r,o,(null===h||void 0===h?void 0:h.key)||""]}),(function(e){id(e[0]._themeKey,i)}),(function(e){var t=es(e,4),n=t[0],r=t[3];if(h&&r){var o=Ms(r,vu("css-variables-".concat(n._themeKey)),{mark:Su,prepend:"queue",attachTo:a,priority:-999});o[ku]=i,o.setAttribute(Cu,n._themeKey)}}));return y}var ld=n(2768),ud="comm",dd="rule",fd="decl",hd="@import",pd="@keyframes",md="@layer",gd=Math.abs,vd=String.fromCharCode;Object.assign;function yd(e){return e.trim()}function bd(e,t,n){return e.replace(t,n)}function _d(e,t,n){return e.indexOf(t,n)}function wd(e,t){return 0|e.charCodeAt(t)}function xd(e,t,n){return e.slice(t,n)}function Cd(e){return e.length}function Sd(e,t){return t.push(e),e}function kd(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Ed(e,t,n,r){switch(e.type){case md:if(e.children.length)break;case hd:case fd:return e.return=e.return||e.value;case ud:return"";case pd:return e.return=e.value+"{"+kd(e.children,r)+"}";case dd:if(!Cd(e.value=e.props.join(",")))return""}return Cd(n=kd(e.children,r))?e.return=e.value+"{"+n+"}":""}var Od=1,Td=1,Ad=0,Rd=0,Pd=0,Nd="";function Dd(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Od,column:Td,length:a,return:"",siblings:s}}function Md(){return Pd=Rd>0?wd(Nd,--Rd):0,Td--,10===Pd&&(Td=1,Od--),Pd}function Id(){return Pd=Rd<Ad?wd(Nd,Rd++):0,Td++,10===Pd&&(Td=1,Od++),Pd}function Ld(){return wd(Nd,Rd)}function jd(){return Rd}function Fd(e,t){return xd(Nd,e,t)}function Bd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zd(e){return Od=Td=1,Ad=Cd(Nd=e),Rd=0,[]}function Hd(e){return Nd="",e}function Vd(e){return yd(Fd(Rd-1,Wd(91===e?e+2:40===e?e+1:e)))}function qd(e){for(;(Pd=Ld())&&Pd<33;)Id();return Bd(e)>2||Bd(Pd)>3?"":" "}function Ud(e,t){for(;--t&&Id()&&!(Pd<48||Pd>102||Pd>57&&Pd<65||Pd>70&&Pd<97););return Fd(e,jd()+(t<6&&32==Ld()&&32==Id()))}function Wd(e){for(;Id();)switch(Pd){case e:return Rd;case 34:case 39:34!==e&&39!==e&&Wd(Pd);break;case 40:41===e&&Wd(e);break;case 92:Id()}return Rd}function $d(e,t){for(;Id()&&e+Pd!==57&&(e+Pd!==84||47!==Ld()););return"/*"+Fd(t,Rd-1)+"*"+vd(47===e?e:Id())}function Gd(e){for(;!Bd(Ld());)Id();return Fd(e,Rd)}function Kd(e){return Hd(Xd("",null,null,null,[""],e=zd(e),0,[0],e))}function Xd(e,t,n,r,o,i,a,s,c){for(var l=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,v=1,y=0,b="",_=o,w=i,x=r,C=b;g;)switch(p=y,y=Id()){case 40:if(108!=p&&58==wd(C,d-1)){-1!=_d(C+=bd(Vd(y),"&","&\f"),"&\f",gd(l?s[l-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=Vd(y);break;case 9:case 10:case 13:case 32:C+=qd(p);break;case 92:C+=Ud(jd()-1,7);continue;case 47:switch(Ld()){case 42:case 47:Sd(Qd($d(Id(),jd()),t,n,c),c);break;default:C+="/"}break;case 123*m:s[l++]=Cd(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==v&&(C=bd(C,/\f/g,"")),h>0&&Cd(C)-d&&Sd(h>32?Zd(C+";",r,n,d-1,c):Zd(bd(C," ","")+";",r,n,d-2,c),c);break;case 59:C+=";";default:if(Sd(x=Yd(C,t,n,l,u,o,s,b,_=[],w=[],d,i),i),123===y)if(0===u)Xd(C,t,x,x,_,i,d,s,w);else switch(99===f&&110===wd(C,3)?100:f){case 100:case 108:case 109:case 115:Xd(e,x,x,r&&Sd(Yd(e,x,x,0,0,o,s,b,o,_=[],d,w),w),o,w,d,s,r?_:w);break;default:Xd(C,x,x,x,[""],w,0,s,w)}}l=u=h=0,m=v=1,b=C="",d=a;break;case 58:d=1+Cd(C),h=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==Md())continue;switch(C+=vd(y),y*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[l++]=(Cd(C)-1)*v,v=1;break;case 64:45===Ld()&&(C+=Vd(Id())),f=Ld(),u=d=Cd(b=C+=Gd(jd())),y++;break;case 45:45===p&&2==Cd(C)&&(m=0)}}return i}function Yd(e,t,n,r,o,i,a,s,c,l,u,d){for(var f=o-1,h=0===o?i:[""],p=function(e){return e.length}(h),m=0,g=0,v=0;m<r;++m)for(var y=0,b=xd(e,f+1,f=gd(g=a[m])),_=e;y<p;++y)(_=yd(g>0?h[y]+" "+b:bd(b,/&\f/g,h[y])))&&(c[v++]=_);return Dd(e,t,n,0===o?dd:s,c,l,u,d)}function Qd(e,t,n,r){return Dd(e,t,n,ud,vd(Pd),xd(e,2,-2),0,r)}function Zd(e,t,n,r,o){return Dd(e,t,n,fd,xd(e,0,r),xd(e,r+1,-1),r,o)}var Jd,ef="data-ant-cssinjs-cache-path",tf="_FILE_STYLE__";var nf=!0;function rf(e){return function(){if(!Jd&&(Jd={},ts())){var e=document.createElement("div");e.className=ef,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=es(e.split(":"),2),n=t[0],r=t[1];Jd[n]=r}));var n,r=document.querySelector("style[".concat(ef,"]"));r&&(nf=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!Jd[e]}var of="_multi_value_";function af(e){return kd(Kd(e),Ed).replace(/\{%%%\:[^;];}/g,";")}var sf=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,a=r.parentSelectors,s=n.hashId,c=n.layer,l=(n.path,n.hashPriority),u=n.transformers,d=void 0===u?[]:u,f=(n.linters,""),h={};function p(t){var r=t.getName(s);if(!h[r]){var o=es(e(t.style,n,{root:!1,parentSelectors:a}),1)[0];h[r]="@keyframes ".concat(t.getName(s)).concat(o)}}var m=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);if(m.forEach((function(t){var r="string"!==typeof t||o?t:{};if("string"===typeof r)f+="".concat(r,"\n");else if(r._keyframe)p(r);else{var c=d.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(c).forEach((function(t){var r=c[t];if("object"!==Ua(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===Ua(e)&&e&&("_skip_check_"in e||of in e)}(r)){var u;function w(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;ld.c[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(p(t),r=t.getName(s)),f+="".concat(n,":").concat(r,";")}var d=null!==(u=null===r||void 0===r?void 0:r.value)&&void 0!==u?u:r;"object"===Ua(r)&&null!==r&&void 0!==r&&r[of]&&Array.isArray(d)?d.forEach((function(e){w(t,e)})):w(t,d)}else{var m=!1,g=t.trim(),v=!1;(o||i)&&s?g.startsWith("@")?m=!0:g=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r,i=e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",i=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(i).concat(o).concat(r.slice(i.length))].concat(vs(n.slice(1))).join(" ")}));return i.join(",")}(t,s,l):!o||s||"&"!==g&&""!==g||(g="",v=!0);var y=es(e(r,n,{root:v,injectHash:m,parentSelectors:[].concat(vs(a),[g])}),2),b=y[0],_=y[1];h=Ka(Ka({},h),_),f+="".concat(g).concat(b)}}))}})),o){if(c&&(void 0===Vu&&(Vu=Hu("@layer ".concat(Bu," { .").concat(Bu,' { content: "').concat(zu,'"!important; } }'),(function(e){e.className=Bu}))),Vu)){var g=c.split(","),v=g[g.length-1].trim();f="@layer ".concat(v," {").concat(f,"}"),g.length>1&&(f="@layer ".concat(c,"{%%%:%}").concat(f))}}else f="{".concat(f,"}");return[f,h]};function cf(e,t){return vu("".concat(e.join("%")).concat(t))}function lf(){return null}var uf="style";function df(e,t){var n=e.token,o=e.path,i=e.hashId,a=e.layer,s=e.nonce,c=e.clientOnly,l=e.order,u=void 0===l?0:l,d=r.useContext(Tu),f=d.autoClear,h=(d.mock,d.defaultCache),p=d.hashPriority,m=d.container,g=d.ssrInline,v=d.transformers,y=d.linters,b=d.cache,_=n._tokenKey,w=[_].concat(vs(o)),x=qu;var C=ed(uf,w,(function(){var e=w.join("|");if(rf(e)){var n=function(e){var t=Jd[e],n=null;if(t&&ts())if(nf)n=tf;else{var r=document.querySelector("style[".concat(Su,'="').concat(Jd[e],'"]'));r?n=r.innerHTML:delete Jd[e]}return[n,t]}(e),r=es(n,2),s=r[0],l=r[1];if(s)return[s,_,l,{},c,u]}var d=t(),f=es(sf(d,{hashId:i,hashPriority:p,layer:a,path:o.join("-"),transformers:v,linters:y}),2),h=f[0],m=f[1],g=af(h),b=cf(w,g);return[g,_,b,m,c,u]}),(function(e,t){var n=es(e,3)[2];(t||f)&&qu&&Ds(n,{mark:Su})}),(function(e){var t=es(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(x&&n!==tf){var i={mark:Su,prepend:"queue",attachTo:m,priority:u},a="function"===typeof s?s():s;a&&(i.csp={nonce:a});var c=Ms(n,r,i);c[ku]=b.instanceId,c.setAttribute(Cu,_),Object.keys(o).forEach((function(e){Ms(af(o[e]),"_effect-".concat(e),i)}))}})),S=es(C,3),k=S[0],E=S[1],O=S[2];return function(e){var t,n;g&&!x&&h?t=r.createElement("style",li({},($a(n={},Cu,E),$a(n,Su,O),n),{dangerouslySetInnerHTML:{__html:k}})):t=r.createElement(lf,null);return r.createElement(r.Fragment,null,t,e)}}var ff="cssVar";const hf=function(e,t){var n=e.key,o=e.prefix,i=e.unitless,a=e.ignore,s=e.token,c=e.scope,l=void 0===c?"":c,u=(0,r.useContext)(Tu),d=u.cache.instanceId,f=u.container,h=s._tokenKey,p=[].concat(vs(e.path),[n,l,h]),m=ed(ff,p,(function(){var e=t(),r=es(Ku(e,n,{prefix:o,unitless:i,ignore:a,scope:l}),2),s=r[0],c=r[1];return[s,c,cf(p,c),n]}),(function(e){var t=es(e,3)[2];qu&&Ds(t,{mark:Su})}),(function(e){var t=es(e,3),r=t[1],o=t[2];if(r){var i=Ms(r,o,{mark:Su,prepend:"queue",attachTo:f,priority:-999});i[ku]=d,i.setAttribute(Cu,n)}}));return m};var pf;$a(pf={},uf,(function(e,t,n){var r=es(e,6),o=r[0],i=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=(n||{}).plain;if(c)return null;var d=o,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(l)};return d=Wu(o,i,a,f,u),s&&Object.keys(s).forEach((function(e){if(!t[e]){t[e]=!0;var n=af(s[e]);d+=Wu(n,i,"_effect-".concat(e),f,u)}})),[l,a,d]})),$a(pf,sd,(function(e,t,n){var r=es(e,5),o=r[2],i=r[3],a=r[4],s=(n||{}).plain;if(!i)return null;var c=o._tokenKey;return[-999,c,Wu(i,a,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]})),$a(pf,ff,(function(e,t,n){var r=es(e,4),o=r[1],i=r[2],a=r[3],s=(n||{}).plain;if(!o)return null;return[-999,i,Wu(o,a,i,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}));var mf=function(){function e(t,n){vc(this,e),$a(this,"name",void 0),$a(this,"style",void 0),$a(this,"_keyframe",!0),this.name=t,this.style=n}return bc(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();const gf=mf;function vf(e){return e.notSplit=!0,e}vf(["borderTop","borderBottom"]),vf(["borderTop"]),vf(["borderBottom"]),vf(["borderLeft","borderRight"]),vf(["borderLeft"]),vf(["borderRight"]);const yf="5.14.0";function bf(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function _f(e){return Math.min(1,Math.max(0,e))}function wf(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function xf(e){return e<=1?"".concat(100*Number(e),"%"):e}function Cf(e){return 1===e.length?"0"+e:String(e)}function Sf(e,t,n){e=bf(e,255),t=bf(t,255),n=bf(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var c=r-o;switch(a=s>.5?c/(2-r-o):c/(r+o),r){case e:i=(t-n)/c+(t<n?6:0);break;case t:i=(n-e)/c+2;break;case n:i=(e-t)/c+4}i/=6}return{h:i,s:a,l:s}}function kf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ef(e,t,n){e=bf(e,255),t=bf(t,255),n=bf(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=r,s=r-o,c=0===r?0:s/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/s+(t<n?6:0);break;case t:i=(n-e)/s+2;break;case n:i=(e-t)/s+4}i/=6}return{h:i,s:c,v:a}}function Of(e,t,n,r){var o=[Cf(Math.round(e).toString(16)),Cf(Math.round(t).toString(16)),Cf(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Tf(e){return Math.round(255*parseFloat(e)).toString(16)}function Af(e){return Rf(e)/255}function Rf(e){return parseInt(e,16)}var Pf={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nf(e){var t,n,r,o={r:0,g:0,b:0},i=1,a=null,s=null,c=null,l=!1,u=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Pf[e])e=Pf[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Lf.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Lf.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Lf.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Lf.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Lf.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Lf.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Lf.hex8.exec(e),n)return{r:Rf(n[1]),g:Rf(n[2]),b:Rf(n[3]),a:Af(n[4]),format:t?"name":"hex8"};if(n=Lf.hex6.exec(e),n)return{r:Rf(n[1]),g:Rf(n[2]),b:Rf(n[3]),format:t?"name":"hex"};if(n=Lf.hex4.exec(e),n)return{r:Rf(n[1]+n[1]),g:Rf(n[2]+n[2]),b:Rf(n[3]+n[3]),a:Af(n[4]+n[4]),format:t?"name":"hex8"};if(n=Lf.hex3.exec(e),n)return{r:Rf(n[1]+n[1]),g:Rf(n[2]+n[2]),b:Rf(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(jf(e.r)&&jf(e.g)&&jf(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*bf(t,255),g:255*bf(n,255),b:255*bf(r,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):jf(e.h)&&jf(e.s)&&jf(e.v)?(a=xf(e.s),s=xf(e.v),o=function(e,t,n){e=6*bf(e,360),t=bf(t,100),n=bf(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),c=r%6;return{r:255*[n,a,i,i,s,n][c],g:255*[s,n,n,a,i,i][c],b:255*[i,i,s,n,n,a][c]}}(e.h,a,s),l=!0,u="hsv"):jf(e.h)&&jf(e.s)&&jf(e.l)&&(a=xf(e.s),c=xf(e.l),o=function(e,t,n){var r,o,i;if(e=bf(e,360),t=bf(t,100),n=bf(n,100),0===t)o=n,i=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=kf(s,a,e+1/3),o=kf(s,a,e),i=kf(s,a,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,a,c),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=wf(i),{ok:l,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:i}}var Df="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Mf="[\\s|\\(]+(".concat(Df,")[,|\\s]+(").concat(Df,")[,|\\s]+(").concat(Df,")\\s*\\)?"),If="[\\s|\\(]+(".concat(Df,")[,|\\s]+(").concat(Df,")[,|\\s]+(").concat(Df,")[,|\\s]+(").concat(Df,")\\s*\\)?"),Lf={CSS_UNIT:new RegExp(Df),rgb:new RegExp("rgb"+Mf),rgba:new RegExp("rgba"+If),hsl:new RegExp("hsl"+Mf),hsla:new RegExp("hsla"+If),hsv:new RegExp("hsv"+Mf),hsva:new RegExp("hsva"+If),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function jf(e){return Boolean(Lf.CSS_UNIT.exec(String(e)))}var Ff=2,Bf=.16,zf=.05,Hf=.05,Vf=.15,qf=5,Uf=4,Wf=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function $f(e){var t=Ef(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Gf(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Of(t,n,r,!1))}function Kf(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Ff*t:Math.round(e.h)+Ff*t:n?Math.round(e.h)+Ff*t:Math.round(e.h)-Ff*t)<0?r+=360:r>=360&&(r-=360),r}function Xf(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Bf*t:t===Uf?e.s+Bf:e.s+zf*t)>1&&(r=1),n&&t===qf&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Yf(e,t,n){var r;return(r=n?e.v+Hf*t:e.v-Vf*t)>1&&(r=1),Number(r.toFixed(2))}function Qf(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Nf(e),o=qf;o>0;o-=1){var i=$f(r),a=Gf(Nf({h:Kf(i,o,!0),s:Xf(i,o,!0),v:Yf(i,o,!0)}));n.push(a)}n.push(Gf(r));for(var s=1;s<=Uf;s+=1){var c=$f(r),l=Gf(Nf({h:Kf(c,s),s:Xf(c,s),v:Yf(c,s)}));n.push(l)}return"dark"===t.theme?Wf.map((function(e){var r=e.index,o=e.opacity;return Gf(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}(Nf(t.backgroundColor||"#141414"),Nf(n[r]),100*o))})):n}var Zf={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jf={},eh={};Object.keys(Zf).forEach((function(e){Jf[e]=Qf(Zf[e]),Jf[e].primary=Jf[e][5],eh[e]=Qf(Zf[e],{theme:"dark",backgroundColor:"#141414"}),eh[e].primary=eh[e][5]}));Jf.red,Jf.volcano,Jf.gold,Jf.orange,Jf.yellow,Jf.lime,Jf.green,Jf.cyan;var th=Jf.blue;Jf.geekblue,Jf.purple,Jf.magenta,Jf.grey,Jf.grey;const nh=e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}};const rh={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},oh=Object.assign(Object.assign({},rh),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});var ih=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=Nf(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=wf(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=Ef(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Ef(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=Sf(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=Sf(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Of(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var i=[Cf(Math.round(e).toString(16)),Cf(Math.round(t).toString(16)),Cf(Math.round(n).toString(16)),Cf(Tf(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*bf(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*bf(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Of(this.r,this.g,this.b,!1),t=0,n=Object.entries(Pf);t<n.length;t++){var r=n[t],o=r[0];if(e===r[1])return o}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!==e&&void 0!==e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=_f(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=_f(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=_f(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=_f(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const ah=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};const sh=(e,t)=>new ih(e).setAlpha(t).toRgbString(),ch=(e,t)=>new ih(e).darken(t).toHexString(),lh=e=>{const t=Qf(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},uh=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:sh(r,.88),colorTextSecondary:sh(r,.65),colorTextTertiary:sh(r,.45),colorTextQuaternary:sh(r,.25),colorFill:sh(r,.15),colorFillSecondary:sh(r,.06),colorFillTertiary:sh(r,.04),colorFillQuaternary:sh(r,.02),colorBgLayout:ch(n,4),colorBgContainer:ch(n,0),colorBgElevated:ch(n,0),colorBgSpotlight:sh(r,.85),colorBgBlur:"transparent",colorBorder:ch(n,15),colorBorderSecondary:ch(n,6)}};const dh=e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,o=e*Math.pow(2.71828,r/5),i=n>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(i/2)}));return t[1]=e,t.map((e=>{return{size:e,lineHeight:(t=e,(t+8)/t)};var t}))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),o=n[1],i=n[0],a=n[2],s=r[1],c=r[0],l=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:l,lineHeightSM:c,fontHeight:Math.round(s*o),fontHeightLG:Math.round(l*a),fontHeightSM:Math.round(c*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};const fh=Du((function(e){const t=Object.keys(rh).map((t=>{const n=Qf(e[t]);return new Array(10).fill(1).reduce(((e,r,o)=>(e["".concat(t,"-").concat(o+1)]=n[o],e["".concat(t).concat(o+1)]=n[o],e)),{})})).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:c,colorBgBase:l,colorTextBase:u}=e,d=n(c),f=n(o),h=n(i),p=n(a),m=n(s),g=r(l,u),v=n(e.colorLink||e.colorInfo);return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new ih("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:lh,generateNeutralColorPalettes:uh})),dh(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),nh(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:"".concat((n+t).toFixed(1),"s"),motionDurationMid:"".concat((n+2*t).toFixed(1),"s"),motionDurationSlow:"".concat((n+3*t).toFixed(1),"s"),lineWidthBold:o+1},ah(r))}(e))})),hh={token:oh,override:{override:oh},hashed:!0},ph=r.createContext(hh);function mh(e){return e>=0&&e<=255}const gh=function(e,t){const{r:n,g:r,b:o,a:i}=new ih(e).toRgb();if(i<1)return e;const{r:a,g:s,b:c}=new ih(t).toRgb();for(let l=.01;l<=1;l+=.01){const e=Math.round((n-a*(1-l))/l),t=Math.round((r-s*(1-l))/l),i=Math.round((o-c*(1-l))/l);if(mh(e)&&mh(t)&&mh(i))return new ih({r:e,g:t,b:i,a:Math.round(100*l)/100}).toRgbString()}return new ih({r:n,g:r,b:o,a:1}).toRgbString()};var vh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function yh(e){const{override:t}=e,n=vh(e,["override"]),r=Object.assign({},t);Object.keys(oh).forEach((e=>{delete r[e]}));const o=Object.assign(Object.assign({},n),r),i=1200,a=1600;if(!1===o.motion){const e="0s";o.motionDurationFast=e,o.motionDurationMid=e,o.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:gh(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:gh(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:gh(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:4*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:gh(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:i,screenXLMin:i,screenXLMax:1599,screenXXL:a,screenXXLMin:a,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n 0 1px 2px -2px ".concat(new ih("rgba(0, 0, 0, 0.16)").toRgbString(),",\n 0 3px 6px 0 ").concat(new ih("rgba(0, 0, 0, 0.12)").toRgbString(),",\n 0 5px 12px 4px ").concat(new ih("rgba(0, 0, 0, 0.09)").toRgbString(),"\n "),boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var bh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const _h={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0},wh={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},xh={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},Ch=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,i=bh(t,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=yh(a),i&&Object.entries(i).forEach((e=>{let[t,n]=e;const{theme:r}=n,o=bh(n,["theme"]);let i=o;r&&(i=Ch(Object.assign(Object.assign({},a),o),{override:o},r)),a[t]=i})),a};function Sh(){const{token:e,hashed:t,theme:n,override:o,cssVar:i}=r.useContext(ph),a="".concat(yf,"-").concat(t||""),s=n||fh,[c,l,u]=cd(s,[oh,e],{salt:a,override:o,getComputedToken:Ch,formatToken:yh,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:_h,ignore:wh,preserve:xh}});return[s,u,t?l:"",c,i]}const kh=r.createContext(void 0),Eh=100,Oh={Modal:Eh,Drawer:Eh,Popover:Eh,Popconfirm:Eh,Tooltip:Eh,Tour:Eh},Th={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function Ah(e,t){const[,n]=Sh(),o=r.useContext(kh),i=e in Oh;if(void 0!==t)return[t,t];let a=null!==o&&void 0!==o?o:0;return i?(a+=(o?0:n.zIndexPopupBase)+Oh[e],a=Math.min(a,n.zIndexPopupBase+1e3)):a+=Th[e],[void 0===o?t:a,a]}const Rh=(e,t,n)=>void 0!==n?n:"".concat(e,"-").concat(t);const Ph=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:c}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:"0 0 ".concat(Uu(s)," 0")},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},Nh=8;function Dh(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?Nh:r}}function Mh(e,t){return e?t:{}}function Ih(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({["".concat(r,"-arrow")]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},Ph(e,t,o)),{"&:before":{background:t}})]},Mh(!!c.top,{[["&-placement-top > ".concat(r,"-arrow"),"&-placement-topLeft > ".concat(r,"-arrow"),"&-placement-topRight > ".concat(r,"-arrow")].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},["&-placement-top > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},["&-placement-topLeft > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:a}},["&-placement-topRight > ".concat(r,"-arrow")]:{right:{_skip_check_:!0,value:a}}})),Mh(!!c.bottom,{[["&-placement-bottom > ".concat(r,"-arrow"),"&-placement-bottomLeft > ".concat(r,"-arrow"),"&-placement-bottomRight > ".concat(r,"-arrow")].join(",")]:{top:s,transform:"translateY(-100%)"},["&-placement-bottom > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},["&-placement-bottomLeft > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:a}},["&-placement-bottomRight > ".concat(r,"-arrow")]:{right:{_skip_check_:!0,value:a}}})),Mh(!!c.left,{[["&-placement-left > ".concat(r,"-arrow"),"&-placement-leftTop > ".concat(r,"-arrow"),"&-placement-leftBottom > ".concat(r,"-arrow")].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},["&-placement-left > ".concat(r,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},["&-placement-leftTop > ".concat(r,"-arrow")]:{top:i},["&-placement-leftBottom > ".concat(r,"-arrow")]:{bottom:i}})),Mh(!!c.right,{[["&-placement-right > ".concat(r,"-arrow"),"&-placement-rightTop > ".concat(r,"-arrow"),"&-placement-rightBottom > ".concat(r,"-arrow")].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},["&-placement-right > ".concat(r,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},["&-placement-rightTop > ".concat(r,"-arrow")]:{top:i},["&-placement-rightBottom > ".concat(r,"-arrow")]:{bottom:i}}))}}const Lh={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},jh={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Fh=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Bh(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,c={};return Object.keys(Lh).forEach((e=>{const l=r&&jh[e]||Lh[e],u=Object.assign(Object.assign({},l),{offset:[0,0],dynamicInset:!0});switch(c[e]=u,Fh.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=s+o}const d=Dh({contentRadius:i,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":u.offset[1]=-d.arrowOffsetHorizontal-s;break;case"leftBottom":case"rightBottom":u.offset[1]=d.arrowOffsetHorizontal+s}u.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const o=r&&"object"===typeof r?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+n,i.shiftX=!0,i.adjustX=!0}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}(e,d,t,n),a&&(u.htmlRegion="visibleFirst")})),c}const{isValidElement:zh}=o;function Hh(e,t){return function(e,t,n){return zh(e)?r.cloneElement(e,"function"===typeof n?n(e.props||{}):n):t}(e,e,t)}function Vh(){}const qh=r.createContext({}),Uh=()=>{const e=()=>{};return e.deprecated=Vh,e},Wh="anticon",$h=r.createContext({getPrefixCls:(e,t)=>t||(e?"ant-".concat(e):"ant"),iconPrefixCls:Wh}),{Consumer:Gh}=$h;const Kh=r.createContext(null),Xh=e=>{let{children:t}=e;return r.createElement(Kh.Provider,{value:null},t)},Yh=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},Qh=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Zh=(e,t,n)=>{const{fontFamily:r,fontSize:o}=e,i='[class^="'.concat(t,'"], [class*=" ').concat(t,'"]');return{[n?".".concat(n):i]:{fontFamily:r,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[i]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},Jh=e=>({animationDuration:e,animationFillMode:"both"}),ep=e=>({animationDuration:e,animationFillMode:"both"}),tp=function(e,t,n,r){const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{["\n ".concat(o).concat(e,"-enter,\n ").concat(o).concat(e,"-appear\n ")]:Object.assign(Object.assign({},Jh(r)),{animationPlayState:"paused"}),["".concat(o).concat(e,"-leave")]:Object.assign(Object.assign({},ep(r)),{animationPlayState:"paused"}),["\n ".concat(o).concat(e,"-enter").concat(e,"-enter-active,\n ").concat(o).concat(e,"-appear").concat(e,"-appear-active\n ")]:{animationName:t,animationPlayState:"running"},["".concat(o).concat(e,"-leave").concat(e,"-leave-active")]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},np=new gf("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),rp=new gf("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),op=new gf("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ip=new gf("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),ap=new gf("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),sp=new gf("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),cp={zoom:{inKeyframes:np,outKeyframes:rp},"zoom-big":{inKeyframes:op,outKeyframes:ip},"zoom-big-fast":{inKeyframes:op,outKeyframes:ip},"zoom-left":{inKeyframes:new gf("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new gf("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new gf("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new gf("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:ap,outKeyframes:sp},"zoom-down":{inKeyframes:new gf("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new gf("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},lp=(e,t)=>{const{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:i}=cp[t];return[tp(r,o,i,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]},up=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function dp(e,t){return up.reduce(((n,r)=>{const o=e["".concat(r,"1")],i=e["".concat(r,"3")],a=e["".concat(r,"6")],s=e["".concat(r,"7")];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))}),{})}const fp="undefined"!==typeof CSSINJS_STATISTIC;let hp=!0;function pp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!fp)return Object.assign.apply(Object,[{}].concat(t));hp=!1;const r={};return t.forEach((e=>{Object.keys(e).forEach((t=>{Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:()=>e[t]})}))})),hp=!0,r}const mp={};function gp(){}const vp=e=>{let t,n=e,r=gp;return fp&&"undefined"!==typeof Proxy&&(t=new Set,n=new Proxy(e,{get:(e,n)=>(hp&&t.add(n),e[n])}),r=(e,n)=>{var r;mp[e]={global:Array.from(t),component:Object.assign(Object.assign({},null===(r=mp[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}};function yp(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}function bp(e,t,n,r){if(!t.length)return n;var o,i,a=Ya(o=t)||gs(o)||Za(o)||Ja(),s=a[0],c=a.slice(1);return i=e||"number"!==typeof s?Array.isArray(e)?vs(e):Ka({},e):[],r&&void 0===n&&1===c.length?delete i[s][c[0]]:i[s]=bp(i[s],c,n,r),i}function _p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!yp(e,t.slice(0,-1))?e:bp(e,t,n,r)}function wp(e){return Array.isArray(e)?[]:{}}var xp="undefined"===typeof Reflect?Object.keys:Reflect.ownKeys;function Cp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=wp(t[0]);return t.forEach((function(e){!function t(n,o){var i,a=new Set(o),s=yp(e,n),c=Array.isArray(s);if(c||"object"===Ua(i=s)&&null!==i&&Object.getPrototypeOf(i)===Object.prototype){if(!a.has(s)){a.add(s);var l=yp(r,n);c?r=_p(r,n,[]):l&&"object"===Ua(l)||(r=_p(r,n,wp(s))),xp(s).forEach((function(e){t([].concat(vs(n),[e]),a)}))}}else r=_p(r,n,s)}([])})),r}const Sp=bc((function e(){vc(this,e)}));let kp=function(e){function t(e){var n,r,o,i;return vc(this,t),r=this,o=wc(o=t),(n=Cc(r,xc()?Reflect.construct(o,i||[],wc(r).constructor):o.apply(r,i))).result=0,e instanceof t?n.result=e.result:"number"===typeof e&&(n.result=e),n}return _c(t,e),bc(t,[{key:"add",value:function(e){return e instanceof t?this.result+=e.result:"number"===typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof t?this.result-=e.result:"number"===typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof t?this.result*=e.result:"number"===typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof t?this.result/=e.result:"number"===typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),t}(Sp);const Ep="CALC_UNIT";function Op(e){return"number"===typeof e?"".concat(e).concat(Ep):e}let Tp=function(e){function t(e){var n,r,o,i;return vc(this,t),r=this,o=wc(o=t),(n=Cc(r,xc()?Reflect.construct(o,i||[],wc(r).constructor):o.apply(r,i))).result="",e instanceof t?n.result="(".concat(e.result,")"):"number"===typeof e?n.result=Op(e):"string"===typeof e&&(n.result=e),n}return _c(t,e),bc(t,[{key:"add",value:function(e){return e instanceof t?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," + ").concat(Op(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof t?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," - ").concat(Op(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){const{unit:t=!0}=e||{},n=new RegExp("".concat(Ep),"g");return this.result=this.result.replace(n,t?"px":""),"undefined"!==typeof this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),t}(Sp);const Ap=e=>{const t="css"===e?Tp:kp;return e=>new t(e)};const Rp=(e,t)=>{const[n,r]=Sh();return df({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null===t||void 0===t?void 0:t.nonce},(()=>[{[".".concat(e)]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[".".concat(e," .").concat(e,"-icon")]:{display:"block"}})}]))},Pp=(e,t,n)=>{var r;return"function"===typeof n?n(pp(t,null!==(r=t[e])&&void 0!==r?r:{})):null!==n&&void 0!==n?n:{}},Np=(e,t,n,r)=>{const o=Object.assign({},t[e]);if(null===r||void 0===r?void 0:r.deprecatedTokens){const{deprecatedTokens:e}=r;e.forEach((e=>{let[t,n]=e;var r;((null===o||void 0===o?void 0:o[t])||(null===o||void 0===o?void 0:o[n]))&&(null!==(r=o[n])&&void 0!==r||(o[n]=null===o||void 0===o?void 0:o[t]))}))}const i=Object.assign(Object.assign({},n),o);return Object.keys(i).forEach((e=>{i[e]===t[e]&&delete i[e]})),i};function Dp(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Array.isArray(e)?e:[e,e],[a]=i,s=i.join("-");return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const[c,l,u,d,f]=Sh(),{getPrefixCls:h,iconPrefixCls:p,csp:m}=(0,r.useContext)($h),g=h(),v=f?"css":"js",y=Ap(v),{max:b,min:_}=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((e=>Uu(e))).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((e=>Uu(e))).join(","),")")}}}(v),w={theme:c,token:d,hashId:u,nonce:()=>null===m||void 0===m?void 0:m.nonce,clientOnly:o.clientOnly,order:o.order||-999};df(Object.assign(Object.assign({},w),{clientOnly:!1,path:["Shared",g]}),(()=>[{"&":Qh(d)}])),Rp(p,m);const x=df(Object.assign(Object.assign({},w),{path:[s,e,p]}),(()=>{if(!1===o.injectStyle)return[];const{token:r,flush:s}=vp(d),c=Pp(a,l,n),h=".".concat(e),m=Np(a,l,c,{deprecatedTokens:o.deprecatedTokens});f&&Object.keys(c).forEach((e=>{c[e]="var(".concat($u(e,((e,t)=>"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")))(a,f.prefix)),")")}));const v=pp(r,{componentCls:h,prefixCls:e,iconCls:".".concat(p),antCls:".".concat(g),calc:y,max:b,min:_},f?c:m),w=t(v,{hashId:u,prefixCls:e,rootPrefixCls:g,iconPrefixCls:p});return s(a,m),[!1===o.resetStyle?null:Zh(v,e,i),w]}));return[x,u]}}const Mp=(e,t,n,o)=>{const i=Dp(e,t,n,o),a=((e,t,n)=>{function o(t){return"".concat(e).concat(t.slice(0,1).toUpperCase()).concat(t.slice(1))}const{unitless:i={},injectStyle:a=!0}=null!==n&&void 0!==n?n:{},s={[o("zIndexPopup")]:!0};Object.keys(i).forEach((e=>{s[o(e)]=i[e]}));const c=r=>{let{rootCls:i,cssVar:a}=r;const[,c]=Sh();return hf({path:[e],prefix:a.prefix,key:null===a||void 0===a?void 0:a.key,unitless:Object.assign(Object.assign({},_h),s),ignore:wh,token:c,scope:i},(()=>{const r=Pp(e,c,t),i=Np(e,c,r,{deprecatedTokens:null===n||void 0===n?void 0:n.deprecatedTokens});return Object.keys(r).forEach((e=>{i[o(e)]=i[e],delete i[e]})),i})),null};return t=>{const[,,,,n]=Sh();return[o=>a&&n?r.createElement(r.Fragment,null,r.createElement(c,{rootCls:t,cssVar:n,component:e}),o):o,null===n||void 0===n?void 0:n.key]}})(Array.isArray(e)?e[0]:e,n,o);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const[,n]=i(e,t),[r,o]=a(t);return[r,n,o]}},Ip=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:o,tooltipBorderRadius:i,zIndexPopup:a,controlHeight:s,boxShadowSecondary:c,paddingSM:l,paddingXS:u}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Yh(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":o,["".concat(t,"-inner")]:{minWidth:s,minHeight:s,padding:"".concat(Uu(e.calc(l).div(2).equal())," ").concat(Uu(u)),color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:i,boxShadow:c,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{["".concat(t,"-inner")]:{borderRadius:e.min(i,Nh)}},["".concat(t,"-content")]:{position:"relative"}}),dp(e,((e,n)=>{let{darkColor:r}=n;return{["&".concat(t,"-").concat(e)]:{["".concat(t,"-inner")]:{backgroundColor:r},["".concat(t,"-arrow")]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},Ih(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},Lp=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Dh({contentRadius:e.borderRadius,limitVerticalRadius:!0})),function(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=o,a=1*r/Math.sqrt(2),s=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),l=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*o-c,d=l,f=2*o-a,h=s,p=2*o-0,m=i,g=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),v=r*(Math.sqrt(2)-1),y="polygon(".concat(v,"px 100%, 50% ").concat(v,"px, ").concat(2*o-v,"px 100%, ").concat(v,"px 100%)");return{arrowShadowWidth:g,arrowPath:"path('M ".concat(0," ").concat(i," A ").concat(r," ").concat(r," 0 0 0 ").concat(a," ").concat(s," L ").concat(c," ").concat(l," A ").concat(n," ").concat(n," 0 0 1 ").concat(u," ").concat(d," L ").concat(f," ").concat(h," A ").concat(r," ").concat(r," 0 0 0 ").concat(p," ").concat(m," Z')"),arrowPolygon:y}}(pp(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),jp=function(e){const t=Mp("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,o=pp(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Ip(o),lp(e,"zoom-big-fast")]}),Lp,{resetStyle:!1,injectStyle:!(arguments.length>1&&void 0!==arguments[1])||arguments[1]});return t(e)},Fp=up.map((e=>"".concat(e,"-inverse")));function Bp(e,t){const n=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?up.includes(e):[].concat(vs(Fp),vs(up)).includes(e)}(t),r=s()({["".concat(e,"-").concat(t)]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const zp=e=>{const{prefixCls:t,className:n,placement:o="top",title:i,color:a,overlayInnerStyle:c}=e,{getPrefixCls:l}=r.useContext($h),u=l("tooltip",t),[d,f,h]=jp(u),p=Bp(u,a),m=p.arrowStyle,g=Object.assign(Object.assign({},c),p.overlayStyle),v=s()(f,h,u,"".concat(u,"-pure"),"".concat(u,"-placement-").concat(o),n,p.className);return d(r.createElement("div",{className:v,style:m},r.createElement("div",{className:"".concat(u,"-arrow")}),r.createElement(qa,Object.assign({},e,{className:f,prefixCls:u,overlayInnerStyle:g}),i)))};var Hp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Vp=r.forwardRef(((e,t)=>{var n,o;const{prefixCls:i,openClassName:a,getTooltipContainer:c,overlayClassName:l,color:u,overlayInnerStyle:d,children:f,afterOpenChange:h,afterVisibleChange:p,destroyTooltipOnHide:m,arrow:g=!0,title:v,overlay:y,builtinPlacements:b,arrowPointAtCenter:_=!1,autoAdjustOverflow:w=!0}=e,x=!!g,[,C]=Sh(),{getPopupContainer:S,getPrefixCls:k,direction:E}=r.useContext($h),O=Uh("Tooltip"),T=r.useRef(null),A=()=>{var e;null===(e=T.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,(()=>({forceAlign:A,forcePopupAlign:()=>{O.deprecated(!1,"forcePopupAlign","forceAlign"),A()}})));const[R,P]=function(e,t){var n=t||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=es(Vc((function(){return gu(o)?o:gu(r)?"function"===typeof r?r():r:"function"===typeof e?e():e})),2),c=s[0],l=s[1],u=void 0!==o?o:c,d=a?a(u):u,f=Dc(i),h=es(Vc([u]),2),p=h[0],m=h[1];return _s((function(){var e=p[0];c!==e&&f(c,e)}),[p]),_s((function(){gu(o)||l(o)}),[o]),[d,Dc((function(e,t){l(e,t),m([u],t)}))]}(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),N=!v&&!y&&0!==v,D=r.useMemo((()=>{var e,t;let n=_;return"object"===typeof g&&(n=null!==(t=null!==(e=g.pointAtCenter)&&void 0!==e?e:g.arrowPointAtCenter)&&void 0!==t?t:_),b||Bh({arrowPointAtCenter:n,autoAdjustOverflow:w,arrowWidth:x?C.sizePopupArrow:0,borderRadius:C.borderRadius,offset:C.marginXXS,visibleFirst:!0})}),[_,g,b,C]),M=r.useMemo((()=>0===v?v:y||v||""),[y,v]),I=r.createElement(Xh,null,"function"===typeof M?M():M),{getPopupContainer:L,placement:j="top",mouseEnterDelay:F=.1,mouseLeaveDelay:B=.1,overlayStyle:z,rootClassName:H}=e,V=Hp(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),q=k("tooltip",i),U=k(),W=e["data-popover-inject"];let $=R;"open"in e||"visible"in e||!N||($=!1);const G=zh(f)&&!function(e){return e&&zh(e)&&e.type===r.Fragment}(f)?f:r.createElement("span",null,f),K=G.props,X=K.className&&"string"!==typeof K.className?K.className:s()(K.className,a||"".concat(q,"-open")),[Y,Q,Z]=jp(q,!W),J=Bp(q,u),ee=J.arrowStyle,te=Object.assign(Object.assign({},d),J.overlayStyle),ne=s()(l,{["".concat(q,"-rtl")]:"rtl"===E},J.className,H,Q,Z),[re,oe]=Ah("Tooltip",V.zIndex),ie=r.createElement(mu,Object.assign({},V,{zIndex:re,showArrow:x,placement:j,mouseEnterDelay:F,mouseLeaveDelay:B,prefixCls:q,overlayClassName:ne,overlayStyle:Object.assign(Object.assign({},ee),z),getTooltipContainer:L||c||S,ref:T,builtinPlacements:D,overlay:I,visible:$,onVisibleChange:t=>{var n,r;P(!N&&t),N||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!==h&&void 0!==h?h:p,overlayInnerStyle:te,arrowContent:r.createElement("span",{className:"".concat(q,"-arrow-content")}),motion:{motionName:Rh(U,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!m}),$?Hh(G,{className:X}):G);return Y(r.createElement(kh.Provider,{value:oe},ie))}));Vp._InternalPanelDoNotUseOrYouWillBeFired=zp;const qp=Vp;var Up=n(2496);class Wp extends r.Component{constructor(e){super(e),this.hardpy_start_with_space=e=>{const t="run"==this.props.testing_status;" "===e.key&&!t&&this.props.is_authenticated&&this.hardpy_start()},this.handleButtonClick=()=>{this.props.is_authenticated?this.hardpy_start():console.log("Authentication required")},this.hardpy_start=this.hardpy_start.bind(this),this.hardpy_stop=this.hardpy_stop.bind(this)}hardpy_call(e){fetch(e).then((e=>{if(e.ok)return e.text();console.log("Request failed. Status: "+e.status)})).catch((e=>{console.log("Request failed. Error: "+e)}))}hardpy_start(){this.hardpy_call("api/start")}hardpy_stop(){this.hardpy_call("api/stop")}componentDidMount(){window.addEventListener("keydown",this.hardpy_start_with_space)}componentWillUnmount(){window.removeEventListener("keydown",this.hardpy_start_with_space)}render(){const e=1==this.props.is_authenticated,t="run"==this.props.testing_status,n=t?{text:"Stop",intent:"danger",large:!0,rightIcon:"stop",onClick:this.hardpy_stop,id:"start-stop-button"}:{text:"Start",intent:e?"primary":t?"danger":void 0,large:!0,rightIcon:"play",onClick:e?this.handleButtonClick:()=>{console.log("Authentication required")},id:"start-stop-button"};return(0,Up.jsx)(qp,{title:"It is impossible to connect to the database",placement:"top",trigger:"hover",visible:!e,children:(0,Up.jsx)(za,{...n})},"leftButton")}}const $p=Wp;var Gp=n(4104),Kp=n.n(Gp);var Xp=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"small-cross",ref:t},e),r.createElement("path",{d:n?"M228.2 200L294 265.8C297.8 269.4 300 274.4 300 280C300 291 291 300 280 300C274.4000000000001 300 269.4000000000001 297.8 265.8 294.2L200 228.2L134.2 294.2C130.6 297.8 125.6 300 120 300C109 300 100 291 100 280C100 274.4 102.2 269.4 105.8 265.8L171.8 200L106 134.2000000000001C102.2 130.6 100 125.6 100 120C100 109 109 100 120 100C125.6 100 130.6 102.2 134.2 105.8L200 171.8L265.8 106C269.4000000000001 102.2 274.4000000000001 100 280 100C291 100 300 109 300 120C300 125.6 297.8 130.6 294.2000000000001 134.2000000000001L228.2 200z":"M188.2 160L234 205.8C237.8 209.4 240 214.4 240 220C240 231 231 240 220 240C214.4 240 209.4 237.8 205.8 234.2L160 188.2L114.2 234.2C110.6 237.8 105.6 240 100 240C89 240 80 231 80 220C80 214.4 82.2 209.4 85.8 205.8L131.8 160L86 114.2C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L160 131.8L205.8 86C209.4 82.2 214.4 80 220 80C231 80 240 89 240 100C240 105.6 237.8 110.6 234.2 114.2L188.2 160z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));Xp.defaultProps={size:Wn.L.STANDARD},Xp.displayName="Blueprint5.Icon.SmallCross";var Yp=function(e){var t=e.className,n=e.large,o=e.onRemove,i=e.tabIndex,a=n||(null===t||void 0===t?void 0:t.includes(O)),s=r.useCallback((function(t){null===o||void 0===o||o(t,e)}),[o,e]);return r.createElement("button",{"aria-label":"Remove tag",type:"button",className:qt,onClick:s,tabIndex:i},r.createElement(Xp,{size:a?Wn.L.LARGE:Wn.L.STANDARD}))};Yp.displayName="".concat(on,".TagRemoveButton");var Qp=r.forwardRef((function(e,t){var n,o=e.active,a=e.children,c=e.className,l=e.fill,u=e.icon,d=e.intent,f=e.interactive,h=e.large,p=e.minimal,m=e.multiline,g=e.onRemove,y=e.rightIcon,b=e.round,_=e.tabIndex,w=void 0===_?0:_,x=e.htmlTitle,S=(0,i.sX)(e,["active","children","className","fill","icon","intent","interactive","large","minimal","multiline","onRemove","rightIcon","round","tabIndex","htmlTitle"]),k="function"===typeof g,T=s()(Vt,nn(d),((n={})[v]=o,n[C]=l,n[E]=f,n[O]=h,n[A]=p,n[N]=b,n),c);return r.createElement("span",(0,i.C3)({},S,{className:T,tabIndex:f?w:void 0,ref:t}),r.createElement(gr,{icon:u}),!oi(a)&&r.createElement(ka,{className:C,ellipsize:!m,tagName:"span",title:x},a),r.createElement(gr,{icon:y}),k&&r.createElement(Yp,(0,i.C3)({},e)))}));Qp.defaultProps={active:!1,fill:!1,interactive:!1,large:!1,minimal:!1,round:!1},Qp.displayName="".concat(on,".Tag");var Zp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.tagName,o=void 0===n?"div":n,a=(0,i.sX)(e,["className","tagName"]),c=s()(he,t);return r.createElement(o,(0,i.C3)((0,i.C3)({},a),{className:c}))},t.displayName="".concat(on,".Divider"),t}(qn),Jp=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"error",ref:t},e),r.createElement("path",{d:n?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM220 80H180V120H220V80zM220 140H180V320H220V140z":"M159.8 320.2C71.4 320.2 -0.2 248.6 -0.2 160.2S71.4 0.2 159.8 0.2S319.8 71.8 319.8 160.2S248.2 320.2 159.8 320.2zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V260.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));Jp.defaultProps={size:Wn.L.STANDARD},Jp.displayName="Blueprint5.Icon.Error";var em=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"info-sign",ref:t},e),r.createElement("path",{d:n?"M200 400C89.6 400 0 310.4 0 200C0 89.6 89.6 0 200 0S400 89.6 400 200C400 310.4 310.4 400 200 400zM180 320H220V280H180V320zM260 80H140V100H180V240H160V260H220V100H260V80z":"M160 320C71.6 320 0 248.4 0 160S71.6 0 160 0S320 71.6 320 160S248.4 320 160 320zM140 260H180V220H140V260zM200 60H120V80H140V180H120V200H180V80H200V60z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));em.defaultProps={size:Wn.L.STANDARD},em.displayName="Blueprint5.Icon.InfoSign";var tm=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"warning-sign",ref:t},e),r.createElement("path",{d:n?"M397.2 49.6C397.2 49.6 397.4000000000001 49.8000000000001 397.4000000000001 49.8000000000001L217.4 369.8000000000001C217.4 369.8000000000001 217.2 369.6 217.2 369.6C213.8 375.8 207.4 380 200 380S186.2 375.8 182.8 369.6L182.6 369.8L2.6 49.8L2.8 49.5999999999999C1.2 46.8 0 43.6 0 40C0 29 9 20 20 20H380C391 20 400 29 400 40C400 43.6 398.8 46.8 397.2 49.6zM220 60H180V100H220V60zM220 120H180V280H220V120z":"M316.8 50L317 50.2L177 290.2L176.8 290C173.4 296 167.2 300 159.8 300S146.4 296 142.8 290C142.8 290 142.6 290.2 142.6 290.2L2.6 50.2L2.8 50C1 47 -0.2 43.8 -0.2 40C-0.2 29 8.8 20 19.8 20H299.8C310.8 20 319.8 29 319.8 40C319.8 43.8 318.6 47 316.8 50zM179.8 60.2H139.8V100.2H179.8V60.2zM179.8 120.2H139.8V220.2H179.8V120.2z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));tm.defaultProps={size:Wn.L.STANDARD},tm.displayName="Blueprint5.Icon.WarningSign";var nm=r.forwardRef((function(e,t){var n=e.size>=Wn.L.LARGE,o=n?Wn.L.LARGE:Wn.L.STANDARD,a="".concat(-1*o/.05/2);return r.createElement(Kn,(0,i.C3)({iconName:"tick",ref:t},e),r.createElement("path",{d:n?"M340 320C334.4 320 329.4 317.8 325.8 314.2L140 128.2L74.2 194C70.6 197.8 65.6 200 60 200C49 200 40 191 40 180C40 174.4 42.2 169.4 45.8 165.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L354.2000000000001 285.8C357.8 289.4 360 294.4 360 300C360 311 351 320 340 320z":"M280 260C274.4000000000001 260 269.4000000000001 257.8 265.8 254.2L120 108.2L54.2 174.2C50.6 177.8 45.6 180 40 180C29 180 20 171 20 160C20 154.4 22.2 149.4 25.8 145.8L105.8 65.8C109.4 62.2 114.4 60 120 60S130.6 62.2 134.2 65.8L294.2000000000001 225.8C297.8 229.4 300 234.4 300 240C300 251 291 260 280 260z",fillRule:"evenodd",transform:"scale(0.05, -0.05) translate(".concat(a,", ").concat(a,")"),style:{transformOrigin:"center"}}))}));nm.defaultProps={size:Wn.L.STANDARD},nm.displayName="Blueprint5.Icon.Tick";var rm,om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,o=t.children,a=t.icon,c=t.intent,l=t.title,u=t.compact,d=(0,i.sX)(t,["className","children","icon","intent","title","compact"]),f=this.renderIcon(a,c),h=s()(Q,nn(c),n,((e={})[Z]=!oi(o),e[J]=null!=f,e[_]=u,e));return r.createElement("div",(0,i.C3)({className:h},d),f,l&&r.createElement(hn,null,l),o)},t.prototype.renderIcon=function(e,t){if(null!==e&&!1!==e){var n={"aria-hidden":!0,tabIndex:-1};if(void 0!==e)return r.createElement(gr,(0,i.C3)({icon:e},n));switch(t){case p.DANGER:return r.createElement(Jp,(0,i.C3)({},n));case p.PRIMARY:return r.createElement(em,(0,i.C3)({},n));case p.WARNING:return r.createElement(tm,(0,i.C3)({},n));case p.SUCCESS:return r.createElement(nm,(0,i.C3)({},n));default:return}}},t.displayName="".concat(on,".Callout"),t}(qn);!function(e){e[e.OPEN_START=0]="OPEN_START",e[e.OPENING=1]="OPENING",e[e.OPEN=2]="OPEN",e[e.CLOSING_START=3]="CLOSING_START",e[e.CLOSING=4]="CLOSING",e[e.CLOSED=5]="CLOSED"}(rm||(rm={}));var im=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={animationState:t.props.isOpen?rm.OPEN:rm.CLOSED,height:void 0,heightWhenOpen:void 0},t.contents=null,t.contentsRefHandler=function(e){if(t.contents=e,null!=t.contents){var n=t.contents.clientHeight;t.setState({animationState:t.props.isOpen?rm.OPEN:rm.CLOSED,height:0===n?void 0:"".concat(n,"px"),heightWhenOpen:0===n?void 0:n})}},t}return(0,i.ct)(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.isOpen,r=t.animationState;if(n)switch(r){case rm.OPEN:case rm.OPENING:break;default:return{animationState:rm.OPEN_START}}else switch(r){case rm.CLOSED:case rm.CLOSING:break;default:return{animationState:rm.CLOSING_START,height:"".concat(t.heightWhenOpen,"px")}}return null},t.prototype.render=function(){var e=this.state.animationState!==rm.CLOSED,t=e||this.props.keepChildrenMounted,n=e&&this.state.animationState!==rm.CLOSING,o="auto"===this.state.height,i={height:e?this.state.height:void 0,overflowY:o?"visible":void 0,transition:o?"none":void 0},a={transform:n?"translateY(0)":"translateY(-".concat(this.state.heightWhenOpen,"px)"),transition:o?"none":void 0};return r.createElement(this.props.component,{className:s()(re,this.props.className),style:i},r.createElement("div",{className:oe,ref:this.contentsRefHandler,style:a,"aria-hidden":!e},t?this.props.children:null))},t.prototype.componentDidMount=function(){this.forceUpdate(),this.props.isOpen?this.setState({animationState:rm.OPEN,height:"auto"}):this.setState({animationState:rm.CLOSED,height:"0px"})},t.prototype.componentDidUpdate=function(){var e=this;if(null!=this.contents){var t=this.props.transitionDuration,n=this.state.animationState;if(n===rm.OPEN_START){var r=this.contents.clientHeight;this.setState({animationState:rm.OPENING,height:"".concat(r,"px"),heightWhenOpen:r}),this.setTimeout((function(){return e.onDelayedStateChange()}),t)}else if(n===rm.CLOSING_START){var o=this.contents.clientHeight;this.setTimeout((function(){return e.setState({animationState:rm.CLOSING,height:"0px",heightWhenOpen:o})})),this.setTimeout((function(){return e.onDelayedStateChange()}),t)}}},t.prototype.onDelayedStateChange=function(){switch(this.state.animationState){case rm.OPENING:this.setState({animationState:rm.OPEN,height:"auto"});break;case rm.CLOSING:this.setState({animationState:rm.CLOSED})}},t.displayName="".concat(on,".Collapse"),t.defaultProps={component:"div",isOpen:!1,keepChildrenMounted:!1,transitionDuration:200},t}(qn),am=n(2635);const sm={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const cm=(0,r.createContext)({});function lm(e){return"object"===Ua(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===Ua(e.icon)||"function"===typeof e.icon)}function um(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,o=e[n];if("class"===n)t.className=o,delete t.class;else delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=o;return t}),{})}function dm(e,t,n){return n?r.createElement(e.tag,Ka(Ka({key:t},um(e.attrs)),n),(e.children||[]).map((function(n,r){return dm(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.createElement(e.tag,Ka({key:t},um(e.attrs)),(e.children||[]).map((function(n,r){return dm(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function fm(e){return Qf(e)[0]}function hm(e){return e?Array.isArray(e)?e:[e]:[]}var pm=["icon","className","onClick","style","primaryColor","secondaryColor"],mm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var gm=function(e){var t,n,o=e.icon,i=e.className,a=e.onClick,s=e.style,c=e.primaryColor,l=e.secondaryColor,u=Xa(e,pm),d=r.useRef(),f=mm;if(c&&(f={primaryColor:c,secondaryColor:l||fm(c)}),function(e){var t=(0,r.useContext)(cm),n=t.csp,o=t.prefixCls,i="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";o&&(i=i.replace(/anticon/g,o)),(0,r.useEffect)((function(){var t=Nc(e.current);Ms(i,"@ant-design-icons",{prepend:!0,csp:n,attachTo:t})}),[])}(d),t=lm(o),n="icon should be icon definiton, but got ".concat(o),cs(t,"[@ant-design/icons] ".concat(n)),!lm(o))return null;var h=o;return h&&"function"===typeof h.icon&&(h=Ka(Ka({},h),{},{icon:h.icon(f.primaryColor,f.secondaryColor)})),dm(h.icon,"svg-".concat(h.name),Ka(Ka({className:i,onClick:a,style:s,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:d}))};gm.displayName="IconReact",gm.getTwoToneColors=function(){return Ka({},mm)},gm.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;mm.primaryColor=t,mm.secondaryColor=n||fm(t),mm.calculated=!!n};const vm=gm;function ym(e){var t=es(hm(e),2),n=t[0],r=t[1];return vm.setTwoToneColors({primaryColor:n,secondaryColor:r})}var bm=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ym(th.primary);var _m=r.forwardRef((function(e,t){var n=e.className,o=e.icon,i=e.spin,a=e.rotate,c=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=Xa(e,bm),f=r.useContext(cm),h=f.prefixCls,p=void 0===h?"anticon":h,m=f.rootClassName,g=s()(m,p,$a($a({},"".concat(p,"-").concat(o.name),!!o.name),"".concat(p,"-spin"),!!i||"loading"===o.name),n),v=c;void 0===v&&l&&(v=-1);var y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=es(hm(u),2),_=b[0],w=b[1];return r.createElement("span",li({role:"img","aria-label":o.name},d,{ref:t,tabIndex:v,onClick:l,className:g}),r.createElement(vm,{icon:o,primaryColor:_,secondaryColor:w,style:y}))}));_m.displayName="AntdIcon",_m.getTwoToneColor=function(){var e=vm.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},_m.setTwoToneColor=ym;const wm=_m;var xm=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:sm}))};const Cm=r.forwardRef(xm);var Sm=n(6536),km=n.n(Sm),Em=function(e){function t(t){var n=e.call(this,t)||this;n.childRef=r.createRef();var o=function(e){var t,n=null!==(t=Hn.get(e))&&void 0!==t?t:0;return Hn.set(e,n+1),"".concat(e,"-").concat(n)}("bp-dialog");return n.titleId="title-".concat(o),n}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,o=e.containerRef,a=e.style,c=e.title,l=(0,i.sX)(e,["className","children","containerRef","style","title"]);return r.createElement(ta,(0,i.C3)({},l,{className:ot,childRef:this.childRef,hasBackdrop:!0}),r.createElement("div",{className:se,ref:void 0===o?this.childRef:ni(o,this.childRef)},r.createElement("div",{className:s()(ae,t),role:"dialog","aria-labelledby":this.props["aria-labelledby"]||(c?this.titleId:void 0),"aria-describedby":this.props["aria-describedby"],style:a},this.maybeRenderHeader(),n)))},t.prototype.validateProps=function(e){null==e.title&&(null!=e.icon&&console.warn(Dn),null!=e.isCloseButtonShown&&console.warn(Mn))},t.prototype.maybeRenderCloseButton=function(){return!1!==this.props.isCloseButtonShown?r.createElement(Ba,{"aria-label":"Close",className:ue,icon:r.createElement(Xp,{size:Wn.L.STANDARD}),minimal:!0,onClick:this.props.onClose}):void 0},t.prototype.maybeRenderHeader=function(){var e=this.props,t=e.icon,n=e.title;if(null!=n)return r.createElement("div",{className:ce},r.createElement(gr,{icon:t,size:Wn.L.STANDARD,"aria-hidden":!0,tabIndex:-1}),r.createElement(pn,{id:this.titleId},n),this.maybeRenderCloseButton())},t.defaultProps={canOutsideClickClose:!0,isOpen:!1},t.displayName="".concat(on,".Dialog"),t}(qn),Om=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hasPendingUpdate:!1,isComposing:!1,nextValue:n.props.value,value:n.props.value},n.cancelPendingCompositionEnd=null,n.handleCompositionStart=function(e){var t,r,o;null===(t=n.cancelPendingCompositionEnd)||void 0===t||t.call(n),n.setState({isComposing:!0}),null===(o=(r=n.props).onCompositionStart)||void 0===o||o.call(r,e)},n.handleCompositionEnd=function(e){var r,o;n.cancelPendingCompositionEnd=n.setTimeout((function(){return n.setState({isComposing:!1})}),t.COMPOSITION_END_DELAY),null===(o=(r=n.props).onCompositionEnd)||void 0===o||o.call(r,e)},n.handleChange=function(e){var t,r,o=e.target.value;n.setState({nextValue:o}),null===(r=(t=n.props).onChange)||void 0===r||r.call(t,e)},n}return(0,i.ct)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isComposing||void 0===e.value?null:t.nextValue!==t.value?e.value===t.nextValue?t.hasPendingUpdate?{value:e.value,hasPendingUpdate:!1}:{value:t.nextValue}:e.value===t.value?{hasPendingUpdate:!0}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}},t.prototype.render=function(){var e=this.state,t=e.isComposing,n=e.hasPendingUpdate,o=e.value,a=e.nextValue,s=this.props,c=s.inputRef,l=(0,i.sX)(s,["inputRef"]);return r.createElement("input",(0,i.C3)({},l,{ref:c,value:t||n?a:o,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange}))},t.displayName="".concat(on,".AsyncControllableInput"),t.COMPOSITION_END_DELAY=10,t}(qn),Tm=["onValueChange"],Am=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={},t.leftElement=null,t.rightElement=null,t.refHandlers={leftElement:function(e){return t.leftElement=e},rightElement:function(e){return t.rightElement=e}},t.handleInputChange=function(e){var n,r,o,i,a=e.target.value;null===(r=(n=t.props).onChange)||void 0===r||r.call(n,e),null===(i=(o=t.props).onValueChange)||void 0===i||i.call(o,a,e.target)},t}return(0,i.ct)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.asyncControl,o=void 0!==n&&n,a=t.className,c=t.disabled,l=t.fill,u=t.inputClassName,d=t.inputRef,f=t.intent,h=t.large,p=t.readOnly,m=t.round,g=t.small,v=t.tagName,y=void 0===v?"div":v,b=s()(xe,nn(f),((e={})[x]=c,e[P]=p,e[C]=l,e[O]=h,e[M]=g,e[N]=m,e),a),_=(0,i.C3)((0,i.C3)({},this.props.style),{paddingLeft:this.state.leftElementWidth,paddingRight:this.state.rightElementWidth}),w=(0,i.C3)((0,i.C3)({type:"text"},sn(this.props,Tm,!0)),{"aria-disabled":c,className:s()(we,u),onChange:this.handleInputChange,style:_}),S=o?r.createElement(Om,(0,i.C3)({},w,{inputRef:d})):r.createElement("input",(0,i.C3)({},w,{ref:d}));return r.createElement(y,{className:b},this.maybeRenderLeftElement(),S,this.maybeRenderRightElement())},t.prototype.componentDidMount=function(){this.updateInputWidth()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.leftElement,r=t.rightElement;e.leftElement===n&&e.rightElement===r||this.updateInputWidth()},t.prototype.validateProps=function(e){null!=e.leftElement&&null!=e.leftIcon&&console.warn(_n)},t.prototype.maybeRenderLeftElement=function(){var e=this.props,t=e.leftElement,n=e.leftIcon;return null!=t?r.createElement("span",{className:Ce,ref:this.refHandlers.leftElement},t):null!=n?r.createElement(gr,{icon:n,"aria-hidden":!0,tabIndex:-1}):void 0},t.prototype.maybeRenderRightElement=function(){var e=this.props.rightElement;if(null!=e)return r.createElement("span",{className:Se,ref:this.refHandlers.rightElement},e)},t.prototype.updateInputWidth=function(){var e=this.state,t=e.leftElementWidth,n=e.rightElementWidth;if(null!=this.leftElement){var r=this.leftElement.clientWidth;(void 0===t||Math.abs(r-t)>2)&&this.setState({leftElementWidth:r})}else this.setState({leftElementWidth:void 0});if(null!=this.rightElement){r=this.rightElement.clientWidth;(void 0===n||Math.abs(r-n)>2)&&this.setState({rightElementWidth:r})}else this.setState({rightElementWidth:void 0})},t.displayName="".concat(on,".InputGroup"),t}(qn),Rm=r.forwardRef((function(e,t){var n,o=e.alignIndicator,a=e.children,c=e.className,l=e.indicatorChildren,u=e.inline,d=e.inputRef,f=e.label,h=e.labelElement,p=e.large,m=e.style,g=e.type,v=e.typeClassName,y=e.tagName,b=void 0===y?"label":y,_=(0,i.sX)(e,["alignIndicator","children","className","indicatorChildren","inline","inputRef","label","labelElement","large","style","type","typeClassName","tagName"]),w=s()(Ee,v,((n={})[x]=_.disabled,n[k]=u,n[O]=p,n),Jt(o),c);return r.createElement(b,{className:w,style:m,ref:t},r.createElement("input",(0,i.C3)({},_,{ref:d,type:g})),r.createElement("span",{className:Oe},l),f,h,a)}));Rm.displayName="".concat(on,".Control");var Pm=r.forwardRef((function(e,t){var n=e.innerLabelChecked,o=e.innerLabel,a=(0,i.sX)(e,["innerLabelChecked","innerLabel"]),s=o||n?[r.createElement("div",{key:"checked",className:Te},r.createElement("div",{className:Ne},n||o)),r.createElement("div",{key:"unchecked",className:Te},r.createElement("div",{className:Ne},o))]:null;return r.createElement(Rm,(0,i.C3)({},a,{indicatorChildren:s,ref:t,type:"checkbox",typeClassName:Pe}))}));Pm.displayName="".concat(on,".Switch");var Nm=r.forwardRef((function(e,t){return r.createElement(Rm,(0,i.C3)({},e,{ref:t,type:"radio",typeClassName:Re}))}));Nm.displayName="".concat(on,".Radio");var Dm=r.forwardRef((function(e,t){var n=e.defaultIndeterminate,o=e.indeterminate,a=e.onChange,s=(0,i.sX)(e,["defaultIndeterminate","indeterminate","onChange"]),c=r.useState(o||n||!1),l=c[0],u=c[1],d=r.useRef(null),f=void 0===e.inputRef?d:ni(e.inputRef,d),h=r.useCallback((function(e){void 0===o&&u(e.target.indeterminate),null===a||void 0===a||a(e)}),[o,a]);return r.useEffect((function(){void 0!==o&&u(o)}),[o]),r.useEffect((function(){null!=d.current&&(d.current.indeterminate=l)}),[d,l]),r.createElement(Rm,(0,i.C3)({},s,{inputRef:f,onChange:h,ref:t,type:"checkbox",typeClassName:Ae}))}));function Mm(e,t,n){return void 0===n&&(n=function(e,t){return e===t}),null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function Im(e,t,n){if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!=n)return Lm(e,t,n);var r=Object.keys(e),o=Object.keys(t);return Lm(e,t,{include:r})&&Lm(e,t,{include:o})}function Lm(e,t,n){return function(e,t,n){if(function(e){return null!=e&&null!=e.include}(n))return n.include;if(function(e){return null!=e&&null!=e.exclude}(n)){var r=Object.keys(e),o=Object.keys(t),i=jm(r.concat(o));return n.exclude.forEach((function(e){return delete i[e]})),Object.keys(i)}return[]}(e,t,n).every((function(n){return e.hasOwnProperty(n)===t.hasOwnProperty(n)&&e[n]===t[n]}))}function jm(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}Dm.displayName="".concat(on,".Checkbox");var Fm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.panel;return r.createElement("div",{className:s()(zt,t),role:"tablist"},n)},t.defaultProps={disabled:!1},t.displayName="".concat(on,".Tab"),t}(qn),Bm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.id,e)},t}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,o=e.disabled,a=e.id,c=e.parentId,l=e.selected,u=e.title,d=e.icon,f=e.tagContent,h=e.tagProps,m=(0,i.sX)(e,["className","children","disabled","id","parentId","selected","title","icon","tagContent","tagProps"]),g=l?p.PRIMARY:p.NONE;return r.createElement("div",(0,i.C3)({},sn(m),{"aria-controls":zm(c,a),"aria-disabled":o,"aria-expanded":l,"aria-selected":l,className:s()(Mt,t),"data-tab-id":a,id:Hm(c,a),onClick:o?void 0:this.handleClick,role:"tab",tabIndex:o?void 0:l?0:-1}),null!=d&&r.createElement(gr,{icon:d,intent:g,className:It}),u,n,null!=f&&r.createElement(Qp,(0,i.C3)({minimal:!0,intent:g},h,{className:s()(Lt,null===h||void 0===h?void 0:h.className)}),f))},t.displayName="".concat(on,".TabTitle"),t}(qn);function zm(e,t){return"".concat(zt,"_").concat(e,"_").concat(t)}function Hm(e,t){return"".concat(Mt,"-title_").concat(e,"_").concat(t)}var Vm=function(){return r.createElement("div",{className:be})},qm=".".concat(Mt),Um=function(e){function t(t){var n=e.call(this,t)||this;n.tablistElement=null,n.refHandlers={tablist:function(e){return n.tablistElement=e}},n.handleKeyDown=function(e){var t,r=null===(t=Zn(n.tablistElement))||void 0===t?void 0:t.closest(qm);if(null!=r){var o=n.getTabElements().filter((function(e){return"false"===e.getAttribute("aria-disabled")})),i=o.indexOf(r),a=n.getKeyCodeDirection(e);if(i>=0&&void 0!==a){e.preventDefault();var s=o.length;o[(i+a+s)%s].focus()}}},n.handleKeyPress=function(e){var t=e.target.closest(qm);null!=t&&ci(e)&&(e.preventDefault(),t.click())},n.handleTabClick=function(e,t){var r,o;null===(o=(r=n.props).onChange)||void 0===o||o.call(r,e,n.state.selectedTabId,t),void 0===n.props.selectedTabId&&n.setState({selectedTabId:e})},n.renderTabPanel=function(e){var t=e.props,o=t.className,i=t.panel,a=t.id,c=t.panelClassName;if(void 0!==i)return r.createElement("div",{"aria-labelledby":Hm(n.props.id,a),"aria-hidden":a!==n.state.selectedTabId,className:s()(zt,o,c),id:zm(n.props.id,a),key:a,role:"tabpanel"},i)},n.renderTabTitle=function(e){if(Wm(e)){var t=e.props.id;return r.createElement(Bm,(0,i.C3)({},e.props,{parentId:n.props.id,onClick:n.handleTabClick,selected:t===n.state.selectedTabId}))}return e};var o=n.getInitialSelectedTabId();return n.state={selectedTabId:o},n}return(0,i.ct)(t,e),t.getDerivedStateFromProps=function(e){var t=e.selectedTabId;return void 0!==t?{selectedTabId:t}:null},t.prototype.render=function(){var e,t,n=this.state,o=n.indicatorWrapperStyle,i=n.selectedTabId,a=r.Children.map(this.props.children,this.renderTabTitle),c=this.getTabChildren().filter(this.props.renderActiveTabPanelOnly?function(e){return e.props.id===i}:function(){return!0}).map(this.renderTabPanel),l=this.props.animate?r.createElement("div",{className:Ft,style:o},r.createElement("div",{className:jt})):null,u=s()(Ht,this.props.className,((e={})[I]=this.props.vertical,e[C]=this.props.fill,e)),d=s()(Bt,((t={})[O]=this.props.large,t));return r.createElement("div",{className:u},r.createElement("div",{className:d,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,ref:this.refHandlers.tablist,role:"tablist"},l,a),c)},t.prototype.componentDidMount=function(){this.moveSelectionIndicator(!1)},t.prototype.componentDidUpdate=function(e,t){if(this.state.selectedTabId!==t.selectedTabId)this.moveSelectionIndicator();else if(null!=t.selectedTabId){!Mm(this.getTabChildrenProps(e),this.getTabChildrenProps(),Im)&&this.moveSelectionIndicator()}},t.prototype.getInitialSelectedTabId=function(){var e=this.props,t=e.defaultSelectedTabId,n=e.selectedTabId;if(void 0!==n)return n;if(void 0!==t)return t;var r=this.getTabChildren();return 0===r.length?void 0:r[0].props.id},t.prototype.getKeyCodeDirection=function(e){return"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:"ArrowRight"===e.key||"ArrowDown"===e.key?1:void 0},t.prototype.getTabChildrenProps=function(e){return void 0===e&&(e=this.props),this.getTabChildren(e).map((function(e){return e.props}))},t.prototype.getTabChildren=function(e){return void 0===e&&(e=this.props),r.Children.toArray(e.children).filter(Wm)},t.prototype.getTabElements=function(e){return void 0===e&&(e=""),null==this.tablistElement?[]:Array.from(this.tablistElement.querySelectorAll(qm+e))},t.prototype.moveSelectionIndicator=function(e){if(void 0===e&&(e=!0),null!=this.tablistElement&&this.props.animate){var t="".concat(qm,'[data-tab-id="').concat(this.state.selectedTabId,'"]'),n=this.tablistElement.querySelector(t),r={display:"none"};if(null!=n){var o=n.clientHeight,i=n.clientWidth,a=n.offsetLeft,s=n.offsetTop;r={height:o,transform:"translateX(".concat(Math.floor(a),"px) translateY(").concat(Math.floor(s),"px)"),width:i},e||(r.transition="none")}this.setState({indicatorWrapperStyle:r})}},t.Expander=Vm,t.Tab=Fm,t.defaultProps={animate:!0,fill:!1,large:!1,renderActiveTabPanelOnly:!1,vertical:!1},t.displayName="".concat(on,".Tabs"),t}(qn);function Wm(e){return si(e,Fm)}var $m,Gm=Ka({},Ar),Km=Gm.version,Xm=Gm.render;Gm.unmountComponentAtNode;try{Number((Km||"").split(".")[0])>=18&&($m=Gm.createRoot)}catch(Sk){}function Ym(e){var t=Gm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===Ua(t)&&(t.usingClientEntryPoint=e)}var Qm="__rc_react_root__";function Zm(e,t){$m?function(e,t){Ym(!0);var n=t[Qm]||$m(t);Ym(!1),n.render(e),t[Qm]=n}(e,t):function(e,t){Xm(e,t)}(e,t)}const Jm=r.createContext({}),eg=(0,r.createContext)(void 0);const tg={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};const ng={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},rg={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},og={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},ng),timePickerLocale:Object.assign({},rg)},ig="${label} is not a valid ${type}",ag={locale:"en",Pagination:tg,DatePicker:og,TimePicker:rg,Calendar:og,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ig,method:ig,array:ig,object:ig,number:ig,date:ig,boolean:ig,integer:ig,float:ig,regexp:ig,email:ig,url:ig,hex:ig},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}};let sg=Object.assign({},ag.Modal),cg=[];const lg=()=>cg.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),ag.Modal);const ug=(0,r.createContext)(void 0);const dg=e=>{const{locale:t={},children:n,_ANT_MARK__:o}=e;r.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return cg.push(t),sg=lg(),()=>{cg=cg.filter((e=>e!==t)),sg=lg()}}sg=Object.assign({},ag.Modal)}(t&&t.Modal);return e}),[t]);const i=r.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return r.createElement(ug.Provider,{value:i},n)},fg="-ant-".concat(Date.now(),"-").concat(Math.random());function hg(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null===t||void 0===t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new ih(e),i=Qf(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=i[1],n["".concat(t,"-color-hover")]=i[4],n["".concat(t,"-color-active")]=i[6],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=i[0],n["".concat(t,"-color-deprecated-border")]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new ih(t.primaryColor),i=Qf(e.toRgbString());i.forEach(((e,t)=>{n["primary-".concat(t+1)]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setAlpha(.12*e.getAlpha())));const a=new ih(i[0]);n["primary-color-active-deprecated-f-30"]=r(a,(e=>e.setAlpha(.3*e.getAlpha()))),n["primary-color-active-deprecated-d-02"]=r(a,(e=>e.darken(2)))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");const i=Object.keys(n).map((t=>"--".concat(e,"-").concat(t,": ").concat(n[t],";")));return"\n :root {\n ".concat(i.join("\n"),"\n }\n ").trim()}(e,t);ts()&&Ms(n,"".concat(fg,"-dynamic-theme"))}const pg=r.createContext(!1),mg=e=>{let{children:t,disabled:n}=e;const o=r.useContext(pg);return r.createElement(pg.Provider,{value:null!==n&&void 0!==n?n:o},t)},gg=pg,vg=r.createContext(void 0),yg=e=>{let{children:t,size:n}=e;const o=r.useContext(vg);return r.createElement(vg.Provider,{value:n||o},t)},bg=vg;const _g=function(){return{componentDisabled:(0,r.useContext)(gg),componentSize:(0,r.useContext)(bg)}},wg=Object.assign({},o),{useId:xg}=wg,Cg="undefined"===typeof xg?()=>"":xg;function Sg(e){const{children:t}=e,[,n]=Sh(),{motion:o}=n,i=r.useRef(!1);return i.current=i.current||!1===o,i.current?r.createElement(Bc,{motion:o},t):t}const kg=()=>null;var Eg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Og=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Tg,Ag,Rg,Pg;function Ng(){return Tg||"ant"}function Dg(){return Ag||Wh}const Mg=()=>({getPrefixCls:(e,t)=>t||(e?"".concat(Ng(),"-").concat(e):Ng()),getIconPrefixCls:Dg,getRootPrefixCls:()=>Tg||Ng(),getTheme:()=>Rg,holderRender:Pg}),Ig=e=>{const{children:t,csp:n,autoInsertSpaceInButton:o,alert:i,anchor:a,form:s,locale:c,componentSize:l,direction:u,space:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:y,theme:b,componentDisabled:_,segmented:w,statistic:x,spin:C,calendar:S,carousel:k,cascader:E,collapse:O,typography:T,checkbox:A,descriptions:R,divider:P,drawer:N,skeleton:D,steps:M,image:I,layout:L,list:j,mentions:F,modal:B,progress:z,result:H,slider:V,breadcrumb:q,menu:U,pagination:W,input:$,empty:G,badge:K,radio:X,rate:Y,switch:Q,transfer:Z,avatar:J,message:ee,tag:te,table:ne,card:re,tabs:oe,timeline:ie,timePicker:ae,upload:se,notification:ce,tree:le,colorPicker:ue,datePicker:de,rangePicker:fe,flex:he,wave:pe,dropdown:me,warning:ge,tour:ve}=e,ye=r.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||v.getPrefixCls("");return t?"".concat(o,"-").concat(t):o}),[v.getPrefixCls,e.prefixCls]),be=y||v.iconPrefixCls||Wh,_e=n||v.csp;Rp(be,_e);const we=function(e,t){Uh("ConfigProvider");const n=e||{},r=!1!==n.inherit&&t?t:hh,o=Cg();return us((()=>{var i,a;if(!e)return t;const s=Object.assign({},r.components);Object.keys(e.components||{}).forEach((t=>{s[t]=Object.assign(Object.assign({},s[t]),e.components[t])}));const c="css-var-".concat(o.replace(/:/g,"")),l=(null!==(i=n.cssVar)&&void 0!==i?i:r.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"===typeof r.cssVar?r.cssVar:{}),"object"===typeof n.cssVar?n.cssVar:{}),{key:"object"===typeof n.cssVar&&(null===(a=n.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:s,cssVar:l})}),[n,r],((e,t)=>e.some(((e,n)=>{const r=t[n];return!yu(e,r,!0)}))))}(b,v.theme);const xe={csp:_e,autoInsertSpaceInButton:o,alert:i,anchor:a,locale:c||g,direction:u,space:d,virtual:f,popupMatchSelectWidth:null!==p&&void 0!==p?p:h,popupOverflow:m,getPrefixCls:ye,iconPrefixCls:be,theme:we,segmented:w,statistic:x,spin:C,calendar:S,carousel:k,cascader:E,collapse:O,typography:T,checkbox:A,descriptions:R,divider:P,drawer:N,skeleton:D,steps:M,image:I,input:$,layout:L,list:j,mentions:F,modal:B,progress:z,result:H,slider:V,breadcrumb:q,menu:U,pagination:W,empty:G,badge:K,radio:X,rate:Y,switch:Q,transfer:Z,avatar:J,message:ee,tag:te,table:ne,card:re,tabs:oe,timeline:ie,timePicker:ae,upload:se,notification:ce,tree:le,colorPicker:ue,datePicker:de,rangePicker:fe,flex:he,wave:pe,dropdown:me,warning:ge,tour:ve},Ce=Object.assign({},v);Object.keys(xe).forEach((e=>{void 0!==xe[e]&&(Ce[e]=xe[e])})),Og.forEach((t=>{const n=e[t];n&&(Ce[t]=n)}));const Se=us((()=>Ce),Ce,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),ke=r.useMemo((()=>({prefixCls:be,csp:_e})),[be,_e]);let Ee=r.createElement(r.Fragment,null,r.createElement(kg,{dropdownMatchSelectWidth:h}),t);const Oe=r.useMemo((()=>{var e,t,n,r;return Cp((null===(e=ag.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=Se.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=Se.form)||void 0===r?void 0:r.validateMessages)||{},(null===s||void 0===s?void 0:s.validateMessages)||{})}),[Se,null===s||void 0===s?void 0:s.validateMessages]);Object.keys(Oe).length>0&&(Ee=r.createElement(eg.Provider,{value:Oe},Ee)),c&&(Ee=r.createElement(dg,{locale:c,_ANT_MARK__:"internalMark"},Ee)),(be||_e)&&(Ee=r.createElement(cm.Provider,{value:ke},Ee)),l&&(Ee=r.createElement(yg,{size:l},Ee)),Ee=r.createElement(Sg,null,Ee);const Te=r.useMemo((()=>{const e=we||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=Eg(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?Du(t):fh,s={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=a:(Array.isArray(r.algorithm)||"function"===typeof r.algorithm)&&(r.theme=Du(r.algorithm)),delete r.algorithm),s[t]=r}));const c=Object.assign(Object.assign({},oh),n);return Object.assign(Object.assign({},i),{theme:a,token:c,components:s,override:Object.assign({override:c},s),cssVar:o})}),[we]);return b&&(Ee=r.createElement(ph.Provider,{value:Te},Ee)),Se.warning&&(Ee=r.createElement(qh.Provider,{value:Se.warning},Ee)),void 0!==_&&(Ee=r.createElement(mg,{disabled:_},Ee)),r.createElement($h.Provider,{value:Se},Ee)},Lg=e=>{const t=r.useContext($h),n=r.useContext(ug);return r.createElement(Ig,Object.assign({parentContext:t,legacyLocale:n},e))};Lg.ConfigContext=$h,Lg.SizeContext=bg,Lg.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;void 0!==t&&(Tg=t),void 0!==n&&(Ag=n),"holderRender"in e&&(Pg=o),r&&(!function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?Rg=r:hg(Ng(),r))},Lg.useConfig=_g,Object.defineProperty(Lg,"SizeContext",{get:()=>bg});const jg=Lg;const Fg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var Bg=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:Fg}))};const zg=r.forwardRef(Bg);const Hg={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var Vg=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:Hg}))};const qg=r.forwardRef(Vg);const Ug={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var Wg=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:Ug}))};const $g=r.forwardRef(Wg);const Gg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var Kg=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:Gg}))};const Xg=r.forwardRef(Kg);const Yg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var Qg=function(e,t){return r.createElement(wm,li({},e,{ref:t,icon:Yg}))};const Zg=r.forwardRef(Qg);var Jg={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Jg.F1&&t<=Jg.F12)return!1;switch(t){case Jg.ALT:case Jg.CAPS_LOCK:case Jg.CONTEXT_MENU:case Jg.CTRL:case Jg.DOWN:case Jg.END:case Jg.ESC:case Jg.HOME:case Jg.INSERT:case Jg.LEFT:case Jg.MAC_FF_META:case Jg.META:case Jg.NUMLOCK:case Jg.NUM_CENTER:case Jg.PAGE_DOWN:case Jg.PAGE_UP:case Jg.PAUSE:case Jg.PRINT_SCREEN:case Jg.RIGHT:case Jg.SHIFT:case Jg.UP:case Jg.WIN_KEY:case Jg.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Jg.ZERO&&e<=Jg.NINE)return!0;if(e>=Jg.NUM_ZERO&&e<=Jg.NUM_MULTIPLY)return!0;if(e>=Jg.A&&e<=Jg.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Jg.SPACE:case Jg.QUESTION_MARK:case Jg.NUM_PLUS:case Jg.NUM_MINUS:case Jg.NUM_PERIOD:case Jg.NUM_DIVISION:case Jg.SEMICOLON:case Jg.DASH:case Jg.EQUALS:case Jg.COMMA:case Jg.PERIOD:case Jg.SLASH:case Jg.APOSTROPHE:case Jg.SINGLE_QUOTE:case Jg.OPEN_SQUARE_BRACKET:case Jg.BACKSLASH:case Jg.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const ev=Jg;var tv=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.style,i=e.className,a=e.duration,c=void 0===a?4.5:a,l=e.eventKey,u=e.content,d=e.closable,f=e.closeIcon,h=void 0===f?"x":f,p=e.props,m=e.onClick,g=e.onNoticeClose,v=e.times,y=e.hovering,b=es(r.useState(!1),2),_=b[0],w=b[1],x=y||_,C=function(){g(l)};r.useEffect((function(){if(!x&&c>0){var e=setTimeout((function(){C()}),1e3*c);return function(){clearTimeout(e)}}}),[c,x,v]);var S="".concat(n,"-notice");return r.createElement("div",li({},p,{ref:t,className:s()(S,i,$a({},"".concat(S,"-closable"),d)),style:o,onMouseEnter:function(e){var t;w(!0),null===p||void 0===p||null===(t=p.onMouseEnter)||void 0===t||t.call(p,e)},onMouseLeave:function(e){var t;w(!1),null===p||void 0===p||null===(t=p.onMouseLeave)||void 0===t||t.call(p,e)},onClick:m}),r.createElement("div",{className:"".concat(S,"-content")},u),d&&r.createElement("a",{tabIndex:0,className:"".concat(S,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==ev.ENTER||C()},onClick:function(e){e.preventDefault(),e.stopPropagation(),C()}},h))}));const nv=tv;var rv=r.createContext({});const ov=function(e){var t=e.children,n=e.classNames;return r.createElement(rv.Provider,{value:{classNames:n}},t)};const iv=function(e){var t,n,r,o={offset:8,threshold:3,gap:16};e&&"object"===Ua(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16);return[!!e,o]};var av=["className","style","classNames","styles"];const sv=function(e){var t,n=e.configList,o=e.placement,i=e.prefixCls,a=e.className,c=e.style,l=e.motion,u=e.onAllNoticeRemoved,d=e.onNoticeClose,f=e.stack,h=(0,r.useContext)(rv).classNames,p=(0,r.useRef)({}),m=es((0,r.useState)(null),2),g=m[0],v=m[1],y=es((0,r.useState)([]),2),b=y[0],_=y[1],w=n.map((function(e){return{config:e,key:String(e.key)}})),x=es(iv(f),2),C=x[0],S=x[1],k=S.offset,E=S.threshold,O=S.gap,T=C&&(b.length>0||w.length<=E),A="function"===typeof l?l(o):l;return(0,r.useEffect)((function(){C&&b.length>1&&_((function(e){return e.filter((function(e){return w.some((function(t){var n=t.key;return e===n}))}))}))}),[b,w,C]),(0,r.useEffect)((function(){var e,t;C&&p.current[null===(e=w[w.length-1])||void 0===e?void 0:e.key]&&v(p.current[null===(t=w[w.length-1])||void 0===t?void 0:t.key])}),[w,C]),r.createElement(Ll,li({key:o,className:s()(i,"".concat(i,"-").concat(o),null===h||void 0===h?void 0:h.list,a,(t={},$a(t,"".concat(i,"-stack"),!!C),$a(t,"".concat(i,"-stack-expanded"),T),t)),style:c,keys:w,motionAppear:!0},A,{onAllRemoved:function(){u(o)}}),(function(e,t){var n=e.config,a=e.className,c=e.style,l=e.index,u=n,f=u.key,m=u.times,v=String(f),y=n,x=y.className,S=y.style,E=y.classNames,A=y.styles,R=Xa(y,av),P=w.findIndex((function(e){return e.key===v})),N={};if(C){var D=w.length-1-(P>-1?P:l-1),M="top"===o||"bottom"===o?"-50%":"0";if(D>0){var I,L,j;N.height=T?null===(I=p.current[v])||void 0===I?void 0:I.offsetHeight:null===g||void 0===g?void 0:g.offsetHeight;for(var F=0,B=0;B<D;B++){var z;F+=(null===(z=p.current[w[w.length-1-B].key])||void 0===z?void 0:z.offsetHeight)+O}var H=(T?F:D*k)*(o.startsWith("top")?1:-1),V=!T&&null!==g&&void 0!==g&&g.offsetWidth&&null!==(L=p.current[v])&&void 0!==L&&L.offsetWidth?((null===g||void 0===g?void 0:g.offsetWidth)-2*k*(D<3?D:3))/(null===(j=p.current[v])||void 0===j?void 0:j.offsetWidth):1;N.transform="translate3d(".concat(M,", ").concat(H,"px, 0) scaleX(").concat(V,")")}else N.transform="translate3d(".concat(M,", 0, 0)")}return r.createElement("div",{ref:t,className:s()("".concat(i,"-notice-wrapper"),a,null===E||void 0===E?void 0:E.wrapper),style:Ka(Ka(Ka({},c),N),null===A||void 0===A?void 0:A.wrapper),onMouseEnter:function(){return _((function(e){return e.includes(v)?e:[].concat(vs(e),[v])}))},onMouseLeave:function(){return _((function(e){return e.filter((function(e){return e!==v}))}))}},r.createElement(nv,li({},R,{ref:function(e){P>-1?p.current[v]=e:delete p.current[v]},prefixCls:i,classNames:E,styles:A,className:s()(x,null===h||void 0===h?void 0:h.notice),style:S,times:m,key:f,eventKey:f,onNoticeClose:d,hovering:C&&b.length>0})))}))};var cv=r.forwardRef((function(e,t){var n=e.prefixCls,o=void 0===n?"rc-notification":n,i=e.container,a=e.motion,s=e.maxCount,c=e.className,l=e.style,u=e.onAllRemoved,d=e.stack,f=e.renderNotifications,h=es(r.useState([]),2),p=h[0],m=h[1],g=function(e){var t,n=p.find((function(t){return t.key===e}));null===n||void 0===n||null===(t=n.onClose)||void 0===t||t.call(n),m((function(t){return t.filter((function(t){return t.key!==e}))}))};r.useImperativeHandle(t,(function(){return{open:function(e){m((function(t){var n,r=vs(t),o=r.findIndex((function(t){return t.key===e.key})),i=Ka({},e);o>=0?(i.times=((null===(n=t[o])||void 0===n?void 0:n.times)||0)+1,r[o]=i):(i.times=0,r.push(i));return s>0&&r.length>s&&(r=r.slice(-s)),r}))},close:function(e){g(e)},destroy:function(){m([])}}}));var v=es(r.useState({}),2),y=v[0],b=v[1];r.useEffect((function(){var e={};p.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(y).forEach((function(t){e[t]=e[t]||[]})),b(e)}),[p]);var _=function(e){b((function(t){var n=Ka({},t);return(n[e]||[]).length||delete n[e],n}))},w=r.useRef(!1);if(r.useEffect((function(){Object.keys(y).length>0?w.current=!0:w.current&&(null===u||void 0===u||u(),w.current=!1)}),[y]),!i)return null;var x=Object.keys(y);return(0,Tr.createPortal)(r.createElement(r.Fragment,null,x.map((function(e){var t=y[e],n=r.createElement(sv,{key:e,configList:t,placement:e,prefixCls:o,className:null===c||void 0===c?void 0:c(e),style:null===l||void 0===l?void 0:l(e),motion:a,onNoticeClose:g,onAllNoticeRemoved:_,stack:d});return f?f(n,{prefixCls:o,key:e}):n}))),i)}));const lv=cv;var uv=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],dv=function(){return document.body},fv=0;function hv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?dv:t,o=e.motion,i=e.prefixCls,a=e.maxCount,s=e.className,c=e.style,l=e.onAllRemoved,u=e.stack,d=e.renderNotifications,f=Xa(e,uv),h=es(r.useState(),2),p=h[0],m=h[1],g=r.useRef(),v=r.createElement(lv,{container:p,ref:g,prefixCls:i,motion:o,maxCount:a,className:s,style:c,onAllRemoved:l,stack:u,renderNotifications:d}),y=es(r.useState([]),2),b=y[0],_=y[1],w=r.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];void 0!==r&&(e[n]=r)}))})),e}(f,e);null!==t.key&&void 0!==t.key||(t.key="rc-notification-".concat(fv),fv+=1),_((function(e){return[].concat(vs(e),[{type:"open",config:t}])}))},close:function(e){_((function(t){return[].concat(vs(t),[{type:"close",key:e}])}))},destroy:function(){_((function(e){return[].concat(vs(e),[{type:"destroy"}])}))}}}),[]);return r.useEffect((function(){m(n())})),r.useEffect((function(){g.current&&b.length&&(b.forEach((function(e){switch(e.type){case"open":g.current.open(e.config);break;case"close":g.current.close(e.key);break;case"destroy":g.current.destroy()}})),_((function(e){return e.filter((function(e){return!b.includes(e)}))})))}),[b]),[w,v]}const pv=e=>{const[,,,,t]=Sh();return t?"".concat(e,"-css-var"):""},mv=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o="".concat(t,"-notice"),i=new gf("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new gf("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new gf("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new gf("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[t]:{["&".concat(t,"-top, &").concat(t,"-bottom")]:{marginInline:0,[o]:{marginInline:"auto auto"}},["&".concat(t,"-top")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:a}},["&".concat(t,"-bottom")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:s}},["&".concat(t,"-topRight, &").concat(t,"-bottomRight")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:i}},["&".concat(t,"-topLeft, &").concat(t,"-bottomLeft")]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[o]:{marginInlineEnd:"auto",marginInlineStart:0},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:c}}}}},gv=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],vv={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},yv=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={overflow:"hidden",["& > ".concat(e.componentCls,"-notice")]:{opacity:0,transition:"opacity ".concat(e.motionDurationMid)}};return Object.assign({["&:not(:nth-last-child(-n+".concat(e.notificationStackLayer,"))")]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},t)},bv=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={background:e.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return Object.assign({},t)},_v=e=>{const{componentCls:t}=e;return Object.assign({["".concat(t,"-stack")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({transition:"all ".concat(e.motionDurationSlow,", backdrop-filter 0s"),position:"absolute"},yv(e))},["".concat(t,"-stack:not(").concat(t,"-stack-expanded)")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({},bv(e))},["".concat(t,"-stack").concat(t,"-stack-expanded")]:{["& > ".concat(t,"-notice-wrapper")]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",["& > ".concat(e.componentCls,"-notice")]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},gv.map((t=>((e,t)=>{const{componentCls:n}=e;return{["".concat(n,"-").concat(t)]:{["&".concat(n,"-stack > ").concat(n,"-notice-wrapper")]:{[t.startsWith("top")?"top":"bottom"]:0,[vv[t]]:{value:0,_skip_check_:!0}}}}})(e,t))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))},wv=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:s,colorInfo:c,colorWarning:l,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,fontSize:m,lineHeight:g,width:v,notificationIconSize:y,colorText:b}=e,_="".concat(n,"-notice");return{position:"relative",marginBottom:i,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[_]:{padding:h,width:v,maxWidth:"calc(100vw - ".concat(Uu(e.calc(p).mul(2).equal()),")"),overflow:"hidden",lineHeight:g,wordWrap:"break-word"},["".concat(n,"-close-icon")]:{fontSize:m,cursor:"pointer"},["".concat(_,"-message")]:{marginBottom:e.marginXS,color:d,fontSize:o,lineHeight:e.lineHeightLG},["".concat(_,"-description")]:{fontSize:m,color:b},["".concat(_,"-closable ").concat(_,"-message")]:{paddingInlineEnd:e.paddingLG},["".concat(_,"-with-icon ").concat(_,"-message")]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(y).equal(),fontSize:o},["".concat(_,"-with-icon ").concat(_,"-description")]:{marginInlineStart:e.calc(e.marginSM).add(y).equal(),fontSize:m},["".concat(_,"-icon")]:{position:"absolute",fontSize:y,lineHeight:1,["&-success".concat(t)]:{color:s},["&-info".concat(t)]:{color:c},["&-warning".concat(t)]:{color:l},["&-error".concat(t)]:{color:u}},["".concat(_,"-close")]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:"background-color ".concat(e.motionDurationMid,", color ").concat(e.motionDurationMid),display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.closeBtnHoverBg}},["".concat(_,"-btn")]:{float:"right",marginTop:e.marginSM}}},xv=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:i}=e,a="".concat(t,"-notice"),s=new gf("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:Object.assign(Object.assign({},Yh(e)),{position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},["".concat(t,"-hook-holder")]:{position:"relative"},["".concat(t,"-fade-appear-prepare")]:{opacity:"0 !important"},["".concat(t,"-fade-enter, ").concat(t,"-fade-appear")]:{animationDuration:e.motionDurationMid,animationTimingFunction:i,animationFillMode:"both",opacity:0,animationPlayState:"paused"},["".concat(t,"-fade-leave")]:{animationTimingFunction:i,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationPlayState:"running"},["".concat(t,"-fade-leave").concat(t,"-fade-leave-active")]:{animationName:s,animationPlayState:"running"},"&-rtl":{direction:"rtl",["".concat(a,"-btn")]:{float:"left"}}})},{[t]:{["".concat(a,"-wrapper")]:Object.assign({},wv(e))}}]},Cv=e=>({zIndexPopup:e.zIndexPopupBase+1e3+50,width:384,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent}),Sv=e=>{const t=e.paddingMD,n=e.paddingLG;return pp(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:"".concat(Uu(e.paddingMD)," ").concat(Uu(e.paddingContentHorizontalLG)),notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3})},kv=Mp("Notification",(e=>{const t=Sv(e);return[xv(t),mv(t),_v(t)]}),Cv),Ev=((e,t,n,r)=>{const o=Dp(e,t,n,Object.assign({resetStyle:!1,order:-998},r));return e=>{let{prefixCls:t,rootCls:n=t}=e;return o(t,n),null}})(["Notification","PurePanel"],(e=>{const t="".concat(e.componentCls,"-notice"),n=Sv(e);return{["".concat(t,"-pure-panel")]:Object.assign(Object.assign({},wv(n)),{width:n.width,maxWidth:"calc(100vw - ".concat(Uu(e.calc(n.notificationMarginEdge).mul(2).equal()),")"),margin:0})}}),Cv);var Ov=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Tv(e,t){return null===t||!1===t?null:t||r.createElement("span",{className:"".concat(e,"-close-x")},r.createElement($g,{className:"".concat(e,"-close-icon")}))}const Av={success:zg,info:Zg,error:qg,warning:Xg},Rv=e=>{const{prefixCls:t,icon:n,type:o,message:i,description:a,btn:c,role:l="alert"}=e;let u=null;return n?u=r.createElement("span",{className:"".concat(t,"-icon")},n):o&&(u=r.createElement(Av[o]||null,{className:s()("".concat(t,"-icon"),"".concat(t,"-icon-").concat(o))})),r.createElement("div",{className:s()({["".concat(t,"-with-icon")]:u}),role:l},u,r.createElement("div",{className:"".concat(t,"-message")},i),r.createElement("div",{className:"".concat(t,"-description")},a),c&&r.createElement("div",{className:"".concat(t,"-btn")},c))},Pv=e=>{const{prefixCls:t,className:n,icon:o,type:i,message:a,description:c,btn:l,closable:u=!0,closeIcon:d,className:f}=e,h=Ov(e,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon","className"]),{getPrefixCls:p}=r.useContext($h),m=t||p("notification"),g="".concat(m,"-notice"),v=pv(m),[y,b,_]=kv(m,v);return y(r.createElement("div",{className:s()("".concat(g,"-pure-panel"),b,n,_,v)},r.createElement(Ev,{prefixCls:m}),r.createElement(nv,Object.assign({},h,{prefixCls:m,eventKey:"pure",duration:null,closable:u,className:s()({notificationClassName:f}),closeIcon:Tv(m,d),content:r.createElement(Rv,{prefixCls:g,icon:o,type:i,message:a,description:c,btn:l})}))))};var Nv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Dv="topRight",Mv=e=>{let{children:t,prefixCls:n}=e;const o=pv(n),[i,a,c]=kv(n,o);return i(r.createElement(ov,{classNames:{list:s()(a,c,o)}},t))},Iv=(e,t)=>{let{prefixCls:n,key:o}=t;return r.createElement(Mv,{prefixCls:n,key:o},e)},Lv=r.forwardRef(((e,t)=>{const{top:n,bottom:o,prefixCls:i,getContainer:a,maxCount:c,rtl:l,onAllRemoved:u,stack:d,duration:f}=e,{getPrefixCls:h,getPopupContainer:p,notification:m,direction:g}=(0,r.useContext)($h),[,v]=Sh(),y=i||h("notification"),[b,_]=hv({prefixCls:y,style:e=>function(e,t,n){let r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n}}return r}(e,null!==n&&void 0!==n?n:24,null!==o&&void 0!==o?o:24),className:()=>s()({["".concat(y,"-rtl")]:null!==l&&void 0!==l?l:"rtl"===g}),motion:()=>function(e){return{motionName:"".concat(e,"-fade")}}(y),closable:!0,closeIcon:Tv(y),duration:null!==f&&void 0!==f?f:4.5,getContainer:()=>(null===a||void 0===a?void 0:a())||(null===p||void 0===p?void 0:p())||document.body,maxCount:c,onAllRemoved:u,renderNotifications:Iv,stack:!1!==d&&{threshold:"object"===typeof d?null===d||void 0===d?void 0:d.threshold:void 0,offset:8,gap:v.margin}});return r.useImperativeHandle(t,(()=>Object.assign(Object.assign({},b),{prefixCls:y,notification:m}))),_}));function jv(e){const t=r.useRef(null),n=(Uh("Notification"),r.useMemo((()=>{const n=n=>{var o;if(!t.current)return;const{open:i,prefixCls:a,notification:c}=t.current,l="".concat(a,"-notice"),{message:u,description:d,icon:f,type:h,btn:p,className:m,style:g,role:v="alert",closeIcon:y}=n,b=Nv(n,["message","description","icon","type","btn","className","style","role","closeIcon"]),_=Tv(l,"undefined"!==typeof y?y:null===c||void 0===c?void 0:c.closeIcon);return i(Object.assign(Object.assign({placement:null!==(o=null===e||void 0===e?void 0:e.placement)&&void 0!==o?o:Dv},b),{content:r.createElement(Rv,{prefixCls:l,icon:f,type:h,message:u,description:d,btn:p,role:v}),className:s()(h&&"".concat(l,"-").concat(h),m,null===c||void 0===c?void 0:c.className),style:Object.assign(Object.assign({},null===c||void 0===c?void 0:c.style),g),closeIcon:_,closable:!!_}))},o={open:n,destroy:e=>{var n,r;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(r=t.current)||void 0===r||r.destroy()}};return["success","info","warning","error"].forEach((e=>{o[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))})),o}),[]));return[n,r.createElement(Lv,Object.assign({key:"notification-holder"},e,{ref:t}))]}let Fv=null,Bv=e=>e(),zv=[],Hv={};function Vv(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o}=Hv,i=(null===e||void 0===e?void 0:e())||document.body;return{getContainer:()=>i,rtl:t,maxCount:n,top:r,bottom:o}}const qv=r.forwardRef(((e,t)=>{const{notificationConfig:n,sync:o}=e,{getPrefixCls:i}=(0,r.useContext)($h),a=Hv.prefixCls||i("notification"),s=(0,r.useContext)(Jm),[c,l]=jv(Object.assign(Object.assign(Object.assign({},n),{prefixCls:a}),s.notification));return r.useEffect(o,[]),r.useImperativeHandle(t,(()=>{const e=Object.assign({},c);return Object.keys(e).forEach((t=>{e[t]=function(){return o(),c[t].apply(c,arguments)}})),{instance:e,sync:o}})),l})),Uv=r.forwardRef(((e,t)=>{const[n,o]=r.useState(Vv),i=()=>{o(Vv)};r.useEffect(i,[]);const a=Mg(),s=a.getRootPrefixCls(),c=a.getIconPrefixCls(),l=a.getTheme(),u=r.createElement(qv,{ref:t,sync:i,notificationConfig:n});return r.createElement(jg,{prefixCls:s,iconPrefixCls:c,theme:l},a.holderRender?a.holderRender(u):u)}));function Wv(){if(!Fv){const e=document.createDocumentFragment(),t={fragment:e};return Fv=t,void Bv((()=>{Zm(r.createElement(Uv,{ref:e=>{const{instance:n,sync:r}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=r,Wv())}))}}),e)}))}Fv.instance&&(zv.forEach((e=>{switch(e.type){case"open":Bv((()=>{Fv.instance.open(Object.assign(Object.assign({},Hv),e.config))}));break;case"destroy":Bv((()=>{null===Fv||void 0===Fv||Fv.instance.destroy(e.key)}))}})),zv=[])}function $v(e){Mg();zv.push({type:"open",config:e}),Wv()}const Gv={open:$v,destroy:function(e){zv.push({type:"destroy",key:e}),Wv()},config:function(e){Hv=Object.assign(Object.assign({},Hv),e),Bv((()=>{var e;null===(e=null===Fv||void 0===Fv?void 0:Fv.sync)||void 0===e||e.call(Fv)}))},useNotification:function(e){return jv(e)},_InternalPanelDoNotUseOrYouWillBeFired:Pv},Kv=Gv;["success","info","warning","error"].forEach((e=>{Kv[e]=t=>$v(Object.assign(Object.assign({},t),{type:e}))}));const Xv=Kv;let Yv=function(e){return e.Base="base",e.TextInput="textinput",e.NumericInput="numericinput",e.RadioButton="radiobutton",e.Checkbox="checkbox",e.Image="image",e.Multistep="multistep",e}({});function Qv(e){var t,n,o,i,a;const[s,c]=(0,r.useState)(!0),[l,u]=(0,r.useState)(""),[d,f]=(0,r.useState)(""),[h,p]=(0,r.useState)([]),m=async()=>{if(e.widget_type)switch(e.widget_type){case Yv.TextInput:case Yv.NumericInput:if(""===l.trim()||"."===l||".."===l)return void alert("The field must not be empty");break;case Yv.RadioButton:if(""===d)return void alert("The field must not be empty");break;case Yv.Checkbox:if(0===h.length)return void alert("The field must not be empty")}c(!1);let t="";function n(e){return encodeURIComponent(e).replace(/[!-'()*+,/:;<=>?@[\]^`{|}~]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}switch(e.widget_type){case Yv.TextInput:t=n(l);break;case Yv.NumericInput:t=l;break;case Yv.RadioButton:t=n(d);break;case Yv.Checkbox:t=JSON.stringify(h.map((e=>n(e))));break;default:t="ok"}e.onConfirm&&e.onConfirm(t);try{const e=await km().post("/api/confirm_dialog_box/".concat(t));console.log(e.data)}catch(r){console.error("Error confirming dialog box:",r)}},g=e=>{"Enter"===e.key&&m()},v=e.widget_type||Yv.Base,y="enter answer";return(0,Up.jsxs)(Em,{title:e.title_bar,icon:"info-sign",isOpen:s,onClose:()=>{c(!1),fetch("api/stop").then((e=>{if(e.ok)return e.text();console.log("Request failed. Status: "+e.status)})).catch((e=>{console.log("Request failed. Error: "+e)})),Xv.error({message:"Notification",description:"The window was closed. Tests stopped."})},canOutsideClickClose:!1,style:{width:"auto",height:"auto",minWidth:"300px",minHeight:"200px",maxWidth:"800px"},children:[(0,Up.jsxs)("div",{className:le,style:{wordWrap:"break-word",wordBreak:"break-word"},children:[(0,Up.jsx)("p",{children:e.dialog_text}),v===Yv.TextInput&&(0,Up.jsx)(Am,{value:l,onChange:e=>u(e.target.value),onKeyDown:g,placeholder:y,type:"text",autoFocus:!0}),v===Yv.NumericInput&&(0,Up.jsx)(Am,{value:l,onChange:e=>u(e.target.value),onKeyDown:g,placeholder:y,type:"number",autoFocus:!0}),v===Yv.RadioButton&&(0,Up.jsx)(Up.Fragment,{children:e.widget_info&&e.widget_info.fields&&e.widget_info.fields.map((e=>(0,Up.jsx)(Nm,{label:e,checked:d===e,onChange:()=>f(e)},e)))}),v===Yv.Checkbox&&(0,Up.jsx)(Up.Fragment,{children:e.widget_info&&e.widget_info.fields&&e.widget_info.fields.map((e=>(0,Up.jsx)(Dm,{label:e,checked:h.includes(e),onChange:()=>{h.includes(e)?p(h.filter((t=>t!==e))):p([...h,e])}},e)))}),v===Yv.Image&&(0,Up.jsx)("img",{src:"data:image/".concat(null===(t=e.widget_info)||void 0===t?void 0:t.format,";base64,").concat(null===(n=e.widget_info)||void 0===n?void 0:n.base64),alt:"Image",style:{width:"".concat(null===(o=e.widget_info)||void 0===o?void 0:o.width,"%")}}),v===Yv.Multistep&&(0,Up.jsx)(Um,{id:e.title_bar,children:null===(i=e.widget_info)||void 0===i||null===(a=i.steps)||void 0===a?void 0:a.map((e=>{var t,n,r,o,i,a,s,c,l;return(0,Up.jsx)(Fm,{id:null===(t=e.info)||void 0===t?void 0:t.title,title:null===(r=e.info)||void 0===r?void 0:r.title,panel:(0,Up.jsx)("div",{className:"step-container",children:(0,Up.jsxs)("div",{className:"step-content",style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,Up.jsx)("p",{children:null===(o=e.info)||void 0===o?void 0:o.text}),(null===(i=e.info)||void 0===i||null===(a=i.widget)||void 0===a?void 0:a.type)===Yv.Image&&(0,Up.jsx)("img",{src:"data:image/".concat(null===(s=e.info.widget)||void 0===s?void 0:s.info.format,";base64,").concat(null===(c=e.info.widget)||void 0===c?void 0:c.info.base64),alt:"Image",style:{width:"".concat(null===(l=e.info.widget)||void 0===l?void 0:l.info.width,"%")}})]})})},null===(n=e.info)||void 0===n?void 0:n.title)}))})]}),(0,Up.jsx)("div",{className:de,children:(0,Up.jsx)(Ba,{intent:"primary",onClick:m,autoFocus:v===Yv.Base,children:"Confirm"})})]})}function Zv(e){return(0,Up.jsx)(Up.Fragment,{children:e.val})}function Jv(e){return(0,Up.jsx)(r.Fragment,{children:e.name})}function ey(e){switch(e.status){case"ready":return(0,Up.jsx)(gr,{icon:"time",intent:"success",className:"status-icon status-icon-wait"});case"run":return(0,Up.jsxs)("div",{style:{marginTop:"4px"},className:"status-icon status-icon-run",children:[" ",(0,Up.jsx)(Fa,{size:15})]});case"passed":return(0,Up.jsx)(gr,{icon:"tick-circle",intent:"success",className:"status-icon status-icon-success"});case"failed":return(0,Up.jsx)(gr,{icon:"cross",intent:"danger",className:"status-icon status-icon-fail"});case"":return(0,Up.jsx)(gr,{icon:"time",intent:"none",className:"status-icon status-icon-wait"});default:return(0,Up.jsx)(gr,{icon:"circle",intent:"none",className:"status-icon status-icon-empty"})}}ey.defaultProps={defaultOpen:!0};const ty=ey,ny={margin:2};const ry=function(e){return(0,Up.jsxs)("div",{className:"test-data",children:[Kp().map(e.msg,((e,t)=>e&&(0,Up.jsx)(Qp,{style:ny,minimal:!0,intent:"primary",children:e},t))),e.assertion_msg&&(0,Up.jsx)(Qp,{style:ny,minimal:!0,intent:"warning",children:e.assertion_msg},"assertion")]})};class oy extends r.Component{constructor(e){super(e),this.startTime=void 0;const t=new Date;this.startTime=t.getTime(),this.state={elapsedTime:0,clock:null},this.initClock=this.initClock.bind(this),this.updateClock=this.updateClock.bind(this),"run"==this.props.status&&(this.setState({elapsedTime:0}),this.initClock())}formatMilliseconds(e){return(e/1e3).toFixed(1)}render(){return(0,Up.jsx)("div",{children:this.formatMilliseconds(this.state.elapsedTime)})}componentWillUnmount(){this.state.clock&&clearInterval(this.state.clock)}updateClock(){const e=new Date;"run"==this.props.status&&"run"==this.props.commonTestRunStatus?this.setState({elapsedTime:e.getTime()-this.startTime}):this.state.clock&&clearInterval(this.state.clock)}initClock(){this.setState({clock:setInterval(this.updateClock,100)})}}const iy=oy;function ay(e,t,n){var r=(n||{}).atBegin;return function(e,t,n){var r,o=n||{},i=o.noTrailing,a=void 0!==i&&i,s=o.noLeading,c=void 0!==s&&s,l=o.debounceMode,u=void 0===l?void 0:l,d=!1,f=0;function h(){r&&clearTimeout(r)}function p(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var s=this,l=Date.now()-f;function p(){f=Date.now(),t.apply(s,o)}function m(){r=void 0}d||(c||!u||r||p(),h(),void 0===u&&l>e?c?(f=Date.now(),a||(r=setTimeout(u?m:p,e))):p():!0!==a&&(r=setTimeout(u?m:p,void 0===u?e-l:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;h(),d=!n},p}(e,t,{debounceMode:!1!==(void 0!==r&&r)})}const sy=new gf("antSpinMove",{to:{opacity:1}}),cy=new gf("antRotate",{to:{transform:"rotate(405deg)"}}),ly=e=>{const{componentCls:t,calc:n}=e;return{["".concat(t)]:Object.assign(Object.assign({},Yh(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:"transform ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc),"&-spinning":{position:"static",display:"inline-block",opacity:1},["".concat(t,"-text")]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:"all ".concat(e.motionDurationMid),"&-show":{opacity:1,visibility:"visible"},["".concat(t,"-dot ").concat(t,"-dot-item")]:{backgroundColor:e.colorWhite},["".concat(t,"-text")]:{color:e.colorTextLightSolid}},"&-nested-loading":{position:"relative",["> div > ".concat(t)]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,["".concat(t,"-dot")]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},["".concat(t,"-text")]:{position:"absolute",top:"50%",width:"100%",textShadow:"0 1px 2px ".concat(e.colorBgContainer)},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{["".concat(t,"-dot")]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{["".concat(t,"-dot")]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},["".concat(t,"-container")]:{position:"relative",transition:"opacity ".concat(e.motionDurationSlow),"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'""',pointerEvents:"none"}},["".concat(t,"-blur")]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},["".concat(t,"-dot")]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:sy,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:cy,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&-sm ".concat(t,"-dot")]:{fontSize:e.dotSizeSM,i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},["&-lg ".concat(t,"-dot")]:{fontSize:e.dotSizeLG,i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},["&".concat(t,"-show-text ").concat(t,"-text")]:{display:"block"}})}},uy=Mp("Spin",(e=>{const t=pp(e,{spinDotDefault:e.colorTextDescription});return[ly(t)]}),(e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}));var dy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};let fy=null;const hy=e=>{const{prefixCls:t,spinning:n=!0,delay:o=0,className:i,rootClassName:a,size:c="default",tip:l,wrapperClassName:u,style:d,children:f,fullscreen:h=!1}=e,p=dy(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen"]),{getPrefixCls:m}=r.useContext($h),g=m("spin",t),[v,y,b]=uy(g),[_,w]=r.useState((()=>n&&!function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(n,o)));r.useEffect((()=>{if(n){const e=ay(o,(()=>{w(!0)}));return e(),()=>{var t;null===(t=null===e||void 0===e?void 0:e.cancel)||void 0===t||t.call(e)}}w(!1)}),[o,n]);const x=r.useMemo((()=>"undefined"!==typeof f&&!h),[f,h]);const{direction:C,spin:S}=r.useContext($h),k=s()(g,null===S||void 0===S?void 0:S.className,{["".concat(g,"-sm")]:"small"===c,["".concat(g,"-lg")]:"large"===c,["".concat(g,"-spinning")]:_,["".concat(g,"-show-text")]:!!l,["".concat(g,"-fullscreen")]:h,["".concat(g,"-fullscreen-show")]:h&&_,["".concat(g,"-rtl")]:"rtl"===C},i,a,y,b),E=s()("".concat(g,"-container"),{["".concat(g,"-blur")]:_}),O=function(e,t){var n=Ka({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}(p,["indicator"]),T=Object.assign(Object.assign({},null===S||void 0===S?void 0:S.style),d),A=r.createElement("div",Object.assign({},O,{style:T,className:k,"aria-live":"polite","aria-busy":_}),function(e,t){const{indicator:n}=t,o="".concat(e,"-dot");return null===n?null:zh(n)?Hh(n,{className:s()(n.props.className,o)}):zh(fy)?Hh(fy,{className:s()(fy.props.className,o)}):r.createElement("span",{className:s()(o,"".concat(e,"-dot-spin"))},r.createElement("i",{className:"".concat(e,"-dot-item"),key:1}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:2}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:3}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:4}))}(g,e),l&&(x||h)?r.createElement("div",{className:"".concat(g,"-text")},l):null);return v(x?r.createElement("div",Object.assign({},O,{className:s()("".concat(g,"-nested-loading"),u,y,b)}),_&&r.createElement("div",{key:"loading"},A),r.createElement("div",{className:E,key:"container"},f)):A)};hy.setDefaultIndicator=e=>{fy=e};const py=hy;class my extends r.Component{render(){return(0,Up.jsxs)(om,{style:{padding:0,borderRadius:0},className:"test-suite",children:[(0,Up.jsxs)("div",{style:{display:"flex"},children:[(0,Up.jsx)("div",{style:{flex:"1 1 0%"},children:(0,Up.jsx)(Ba,{style:{margin:"2px"},minimal:!0,onClick:this.handleClick,children:(0,Up.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Up.jsx)(ey,{status:"run"==this.props.commonTestRunStatus||"run"!=this.props.test.status&&"ready"!=this.props.test.status?this.props.test.status:"stucked"}),(0,Up.jsx)(gr,{style:{marginRight:"10px",marginLeft:"10px"},icon:this.state.isOpen?"chevron-down":"chevron-right"}),(0,Up.jsx)("span",{children:this.renderName(this.props.test.name,this.props.index+1)})]})})}),this.renderTestSuiteRightPanel(this.props.test)]}),(0,Up.jsx)(im,{isOpen:this.state.isOpen,keepChildrenMounted:!0,className:"test-suite-content",children:"busy"!=this.props.test.status?this.renderTests(this.props.test.cases):(0,Up.jsx)(py,{indicator:my.LOADING_ICON})})]})}constructor(e){super(e),this.render_timer_id=void 0,this.handleClick=()=>this.setState((e=>({isOpen:!e.isOpen}))),this.state={isOpen:e.defaultOpen},this.handleClick=this.handleClick.bind(this)}renderName(e,t){const n=Kp().isEmpty(e);return(0,Up.jsxs)(fn,{className:"test-suite-name ".concat(n?Ot:""),children:[(0,Up.jsx)("span",{className:L,children:t}),(0,Up.jsx)("span",{style:{marginLeft:"0.5em"},children:n?"Lorem ipsum":e})]})}renderTests(e){let t=[];e&&(t=Object.keys(e));const n=t.map((t=>e[t])),r=[{id:"status",name:"",selector:e=>e,cell:this.cellRendererStatus.bind(this,n),grow:.5,width:"10px"},{id:"test_number",name:"",selector:e=>e,cell:this.cellRendererNumber.bind(this,n),grow:.5,width:"65px"},{id:"name",name:"Name",selector:e=>e,cell:this.cellRendererName.bind(this,n),grow:6},{id:"data",name:"Data",selector:e=>e,cell:this.cellRendererData.bind(this,n),grow:18}];return(0,Up.jsx)("div",{style:{margin:"3px",paddingBottom:"4px",borderRadius:"2px"},children:(0,Up.jsx)(am.cp,{noHeader:!0,columns:r,data:t,highlightOnHover:!0,dense:!0})})}renderTestSuiteRightPanel(e){return(0,Up.jsxs)("div",{className:b,style:{display:"flex",padding:"5px"},children:[!this.state.isOpen&&(0,Up.jsx)(Up.Fragment,{children:Object.entries(e.cases).map((e=>{let[t,n]=e;return(0,Up.jsx)("span",{style:{margin:"2px"},children:(0,Up.jsx)(ey,{status:n.status})},n.name)}))}),(0,Up.jsx)(Qp,{minimal:!0,style:{margin:"2px",minWidth:"30px"},children:"ready"!=e.status&&(0,Up.jsx)(iy,{status:e.status,commonTestRunStatus:this.props.commonTestRunStatus})})]})}commonCellRender(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,Up.jsx)("div",{className:n?Ot:void 0,style:{display:"inline-block",verticalAlign:"middle"},children:e},t)}cellRendererNumber(e,t,n){return this.commonCellRender((0,Up.jsx)("div",{style:{marginTop:"0.2em",marginBottom:"0.2em"},children:(0,Up.jsx)(Zv,{val:n+1})}),"number_".concat(n,"_").concat(t,"}"))}cellRendererName(e,t,n){const r=e[n];return this.commonCellRender((0,Up.jsx)("div",{style:{marginTop:"0.2em",marginBottom:"0.2em"},children:(0,Up.jsx)(Jv,{name:r.name})}),"name_".concat(n,"_").concat(t))}cellRendererData(e,t,n){const r=e[n];return this.commonCellRender((0,Up.jsx)("div",{style:{marginTop:"0.2em",marginBottom:"0.2em"},children:(0,Up.jsx)(ry,{assertion_msg:r.assertion_msg,msg:r.msg})}),"data_".concat(n,"_").concat(t))}cellRendererStatus(e,t,n){const r=e[n],{info:o,type:i}=r.dialog_box.widget||{};return this.commonCellRender((0,Up.jsxs)("div",{style:{marginTop:"0.2em",marginBottom:"0.2em"},children:[r.dialog_box.dialog_text&&"run"===r.status&&"run"===this.props.commonTestRunStatus&&(0,Up.jsx)(Qv,{title_bar:r.dialog_box.title_bar||r.name,dialog_text:r.dialog_box.dialog_text,widget_info:o,widget_type:i}),(0,Up.jsx)(ey,{status:"run"===this.props.commonTestRunStatus||"run"!==r.status&&"ready"!==r.status?r.status:"stucked"})]}),"status_".concat(n,"_").concat(t))}}my.DEBONCE_TESTS_RENDER_TIME_MS=500,my.LOADING_ICON=(0,Up.jsx)("div",{style:{margin:30},children:(0,Up.jsx)(Cm,{spin:!0})}),my.defaultProps=void 0,my.defaultProps={defaultOpen:!0};const gy=function(e){const[t,n]=(0,r.useState)(!0);return(0,Up.jsx)(Em,{title:e.title||"Message",icon:"info-sign",isOpen:t,onClose:async()=>{n(!1);try{const e=await km().post("/api/confirm_operator_msg/".concat(JSON.stringify(false)));console.log(e.data)}catch(e){console.error("Error confirming dialog box:",e)}},canOutsideClickClose:!1,style:{width:"auto",height:"auto",minWidth:"300px",minHeight:"200px",maxWidth:"800px"},children:(0,Up.jsx)("div",{className:le,style:{wordWrap:"break-word",wordBreak:"break-word"},children:(0,Up.jsx)("p",{children:e.msg})})})};class vy extends r.Component{constructor(){super(...arguments),this.elements_count=0}render(){var e,t,n;if(void 0==this.props.db_state.name)return(0,Up.jsxs)("div",{children:[(0,Up.jsx)(dn,{children:"Loading tests... \ud83e\udd14"}),(0,Up.jsx)(fn,{children:"Try refreshing the page."})]});const r=this.props.db_state,o=r.start_time?new Date(1e3*r.start_time).toLocaleString():"",i=r.stop_time?new Date(1e3*r.stop_time).toLocaleString():"",a=r.timezone?r.timezone[0]:"",s=r.timezone?r.timezone[1]:"";let c=[],l={};r.modules&&(c=Object.keys(r.modules),l=r.modules,this.elements_count=c.length);const u={margin:1};return(0,Up.jsxs)(Up.Fragment,{children:[(0,Up.jsxs)("div",{children:[(0,Up.jsx)(un,{children:r.name}),r.test_stand&&(0,Up.jsxs)(Qp,{minimal:!0,style:u,children:["Stand name: ",null===(e=r.test_stand)||void 0===e?void 0:e.name]}),r.status&&(0,Up.jsxs)(Qp,{minimal:!0,style:u,children:["Status: ",r.status]}),o&&(0,Up.jsxs)(Qp,{minimal:!0,style:u,children:["Start time: ",o+a]}),i&&(0,Up.jsxs)(Qp,{minimal:!0,style:u,children:["Finish time: ",i+s]}),(0,Up.jsx)(Zp,{}),Kp().map([...c],((e,t)=>this.suiteRender(t,{name:e,test:l[e]})))]}),(0,Up.jsx)("div",{children:this.props.db_state.operator_msg&&this.props.db_state.operator_msg.msg&&this.props.db_state.operator_msg.msg.length>0&&1==this.props.db_state.operator_msg.visible&&(0,Up.jsx)(gy,{msg:null===(t=this.props.db_state.operator_msg)||void 0===t?void 0:t.msg,title:(null===(n=this.props.db_state.operator_msg)||void 0===n?void 0:n.title)||"Message"})})]})}suiteRender(e,t){return(0,Up.jsx)(my,{index:e,test:t.test,defaultOpen:this.elements_count<5&&0==this.props.defaultClose,commonTestRunStatus:this.props.db_state.status},"".concat(t.name,"_").concat(e))}}var yy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ct)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.animate,o=void 0===n||n,i=t.className,a=t.intent,c=t.stripes,l=void 0===c||c,u=t.value,d=s()(xt,nn(a),((e={})[kt]=!o,e[St]=!l,e),i),f=null==u?void 0:100*zn(u,0,1),h=null==f?void 0:f+"%";return r.createElement("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":null==f?void 0:Math.round(f),className:d,role:"progressbar"},r.createElement("div",{className:Ct,style:{width:h}}))},t.displayName="".concat(on,".ProgressBar"),t}(qn);class by extends r.Component{render(){return(0,Up.jsx)(yy,{intent:(e=>{switch(e){case"run":return p.PRIMARY;case"failed":return p.DANGER;case"passed":return p.SUCCESS;default:return p.NONE}})(this.props.status),value:this.props.percentage/100,animate:this.props.percentage/100<1&&"run"==this.props.status})}}const _y=by;var wy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleCancel=function(e){return t.internalHandleCallbacks(!1,e)},t.handleConfirm=function(e){return t.internalHandleCallbacks(!0,e)},t}return(0,i.ct)(t,e),t.prototype.render=function(){var e=this.props,t=e.canEscapeKeyCancel,n=e.canOutsideClickCancel,o=e.children,a=e.className,c=e.icon,l=e.intent,u=e.loading,d=e.cancelButtonText,f=e.confirmButtonText,h=(e.onClose,(0,i.sX)(e,["canEscapeKeyCancel","canOutsideClickCancel","children","className","icon","intent","loading","cancelButtonText","confirmButtonText","onClose"]));return r.createElement(Em,(0,i.C3)({},h,{className:s()(q,a),canEscapeKeyClose:t,canOutsideClickClose:n,onClose:this.handleCancel}),r.createElement("div",{className:U},r.createElement(gr,{icon:c,size:40,intent:l}),r.createElement("div",{className:W},o)),r.createElement("div",{className:$},r.createElement(Ba,{loading:u,intent:l,text:f,onClick:this.handleConfirm}),d&&r.createElement(Ba,{text:d,disabled:u,onClick:this.handleCancel})))},t.prototype.validateProps=function(e){null==e.onClose&&null==e.cancelButtonText!==(null==e.onCancel)&&console.warn(vn);var t=null!=e.onCancel||null!=e.onClose;e.canEscapeKeyCancel&&!t&&console.warn(yn),e.canOutsideClickCancel&&!t&&console.warn(bn)},t.prototype.internalHandleCallbacks=function(e,t){var n,r=this.props,o=r.onCancel,i=r.onClose,a=r.onConfirm;null===(n=e?a:o)||void 0===n||n(t),null===i||void 0===i||i(e,t)},t.defaultProps={canEscapeKeyCancel:!1,canOutsideClickCancel:!1,confirmButtonText:"OK",isOpen:!1,loading:!1},t.displayName="".concat(on,".Alert"),t}(qn);function xy(e,t){switch(t){case"RELOAD_START":return"WAIT_RELOAD";case"RELOAD":return"RELOAD";default:throw new Error}}const Cy=function(e){const[t,n]=r.useReducer(xy,"BEFORE_RELOAD");return r.useEffect((()=>{switch(t){case"WAIT_RELOAD":return void setTimeout((()=>{n("RELOAD")}),1e3*e.reload_timeout_s);case"RELOAD":return void window.location.reload();default:return}}),[t,e.reload_timeout_s]),(0,Up.jsx)(wy,{isOpen:"WAIT_RELOAD"==t,confirmButtonText:"Reboot now",onClose:()=>n("RELOAD"),icon:"warning-sign",children:(0,Up.jsx)("p",{children:(o=e.reload_timeout_s,"The application will be updated in ".concat(o," seconds!"))})});var o},Sy="14.7.77";var ky=n(9528);const Ey=new WeakSet,Oy=new WeakMap,Ty=new WeakMap,Ay=new WeakMap,Ry=new WeakMap,Py=new WeakMap,Ny=new WeakMap,Dy=new WeakMap,My=new WeakMap,Iy=new WeakMap,Ly={construct:()=>Ly},jy=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,Fy=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),o=r.match(jy);for(;null!==o;){const e=o[1].slice(1,-1),i=o[0].replace(/([\s]+)?;?$/,"").replace(e,new URL(e,t).toString());n.push(i),r=r.slice(o[0].length).replace(/^[\s]+/,""),o=r.match(jy)}return[n.join(";"),r]},By=e=>{if(void 0!==e&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},zy=e=>{if(!(e=>{try{new new Proxy(e,Ly)}catch{return!1}return!0})(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===e.prototype||"object"!==typeof e.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},Hy=(e,t)=>{const n=e.get(t);if(void 0===n)throw new Error("A value with the given key could not be found.");return n},Vy=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return e.delete(r),r},qy=(e,t,n,r)=>{const o=Hy(e,t),i=Vy(o,(e=>e[0]===n&&e[1]===r));return 0===o.size&&e.delete(t),i},Uy=e=>Hy(Ny,e),Wy=e=>{if(Ey.has(e))throw new Error("The AudioNode is already stored.");Ey.add(e),Uy(e).forEach((e=>e(!0)))},$y=e=>"port"in e,Gy=e=>{if(!Ey.has(e))throw new Error("The AudioNode is not stored.");Ey.delete(e),Uy(e).forEach((e=>e(!1)))},Ky=(e,t)=>{!$y(e)&&t.every((e=>0===e.size))&&Gy(e)},Xy={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},Yy=(e,t)=>e.context===t,Qy=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Zy=()=>new DOMException("","IndexSizeError"),Jy=e=>{var t;e.getChannelData=(t=e.getChannelData,n=>{try{return t.call(e,n)}catch(r){if(12===r.code)throw Zy();throw r}})},eb={numberOfChannels:1},tb=-34028234663852886e22,nb=-tb,rb=e=>Ey.has(e),ob={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ib=e=>Hy(Oy,e),ab=e=>Hy(Ay,e),sb=(e,t)=>{const{activeInputs:n}=ib(e);n.forEach((n=>n.forEach((n=>{let[r]=n;t.includes(e)||sb(r,[...t,e])}))));const r=(e=>"playbackRate"in e)(e)?[e.playbackRate]:$y(e)?Array.from(e.parameters.values()):(e=>"frequency"in e&&"gain"in e)(e)?[e.Q,e.detune,e.frequency,e.gain]:(e=>"offset"in e)(e)?[e.offset]:(e=>!("frequency"in e)&&"gain"in e)(e)?[e.gain]:(e=>"detune"in e&&"frequency"in e)(e)?[e.detune,e.frequency]:(e=>"pan"in e)(e)?[e.pan]:[];for(const o of r){const e=ab(o);void 0!==e&&e.activeInputs.forEach((e=>{let[n]=e;return sb(n,t)}))}rb(e)&&Gy(e)},cb=e=>{sb(e.destination,[])},lb=e=>void 0===e||"number"===typeof e||"string"===typeof e&&("balanced"===e||"interactive"===e||"playback"===e),ub=e=>"context"in e,db=e=>ub(e[0]),fb=(e,t,n,r)=>{for(const o of e)if(n(o)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},hb=(e,t,n,r)=>{let[o,i]=n;fb(e,[t,o,i],(e=>e[0]===t&&e[1]===o),r)},pb=(e,t,n)=>{let[r,o,i]=t;const a=e.get(r);void 0===a?e.set(r,new Set([[o,i]])):fb(a,[o,i],(e=>e[0]===o),n)},mb=e=>"inputs"in e,gb=(e,t,n,r)=>{if(mb(t)){const o=t.inputs[r];return e.connect(o,n,0),[o,n,0]}return e.connect(t,n,r),[t,n,r]},vb=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},yb=(e,t)=>{if(!Uy(e).delete(t))throw new Error("Missing the expected event listener.")},bb=(e,t,n)=>{const r=Hy(e,t),o=Vy(r,(e=>e[0]===n));return 0===r.size&&e.delete(t),o},_b=(e,t,n,r)=>{mb(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},wb=e=>Hy(Ty,e),xb=e=>Hy(Ry,e),Cb=e=>Dy.has(e),Sb=e=>!Ey.has(e),kb=(e,t)=>new Promise((n=>{if(null!==t)n(!0);else{const t=e.createScriptProcessor(256,1,1),r=e.createGain(),o=e.createBuffer(1,2,44100),i=o.getChannelData(0);i[0]=1,i[1]=1;const a=e.createBufferSource();a.buffer=o,a.loop=!0,a.connect(t).connect(e.destination),a.connect(r),a.disconnect(r),t.onaudioprocess=r=>{const o=r.inputBuffer.getChannelData(0);Array.prototype.some.call(o,(e=>1===e))?n(!0):n(!1),a.stop(),t.onaudioprocess=null,a.disconnect(t),t.disconnect(e.destination)},a.start()}})),Eb=(e,t)=>{const n=new Map;for(const r of e)for(const e of r){const t=n.get(e);n.set(e,void 0===t?1:t+1)}n.forEach(((e,n)=>t(n,e)))},Ob=e=>"context"in e,Tb=e=>{const t=new Map;e.connect=(e=>function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const i=Ob(n)?e(n,r,o):e(n,r),a=t.get(n);return void 0===a?t.set(n,[{input:o,output:r}]):a.every((e=>e.input!==o||e.output!==r))&&a.push({input:o,output:r}),i})(e.connect.bind(e)),e.disconnect=(n=>(r,o,i)=>{if(n.apply(e),void 0===r)t.clear();else if("number"===typeof r)for(const[e,n]of t){const o=n.filter((e=>e.output!==r));0===o.length?t.delete(e):t.set(e,o)}else if(t.has(r))if(void 0===o)t.delete(r);else{const e=t.get(r);if(void 0!==e){const n=e.filter((e=>e.output!==o&&(e.input!==i||void 0===i)));0===n.length?t.delete(r):t.set(r,n)}}for(const[n,a]of t)a.forEach((t=>{Ob(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)}))})(e.disconnect)},Ab=(e,t,n,r)=>{const{activeInputs:o,passiveInputs:i}=ab(t),{outputs:a}=ib(e),s=Uy(e),c=a=>{const s=wb(e),c=xb(t);if(a){const t=bb(i,e,n);hb(o,e,t,!1),r||Cb(e)||s.connect(c,n)}else{const t=((e,t,n)=>Vy(e,(e=>e[0]===t&&e[1]===n)))(o,e,n);pb(i,t,!1),r||Cb(e)||s.disconnect(c,n)}};return!!fb(a,[t,n],(e=>e[0]===t&&e[1]===n),!0)&&(s.add(c),rb(e)?hb(o,e,[n,c],!0):pb(i,[e,n,c],!0),!0)},Rb=(e,t,n,r,o)=>{const[i,a]=((e,t,n,r)=>{const{activeInputs:o,passiveInputs:i}=ib(t),a=vb(o[r],e,n);if(null===a)return[qy(i,e,n,r)[2],!1];return[a[2],!0]})(e,n,r,o);if(null!==i&&(yb(e,i),!a||t||Cb(e)||_b(wb(e),wb(n),r,o)),rb(n)){const{activeInputs:e}=ib(n);Ky(n,e)}},Pb=(e,t,n,r)=>{const[o,i]=((e,t,n)=>{const{activeInputs:r,passiveInputs:o}=ab(t),i=vb(r,e,n);if(null===i)return[bb(o,e,n)[1],!1];return[i[2],!0]})(e,n,r);null!==o&&(yb(e,o),!i||t||Cb(e)||wb(e).disconnect(xb(n),r))};class Nb{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._map.forEach(((n,r)=>e.call(t,n,r,this)))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const Db={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Mb(e,t,n,r,o){if("function"===typeof e.copyFromChannel)0===t[n].byteLength&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,o);else{const i=e.getChannelData(r);if(0===t[n].byteLength)t[n]=i.slice(o,o+128);else{const e=new Float32Array(i.buffer,o*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}const Ib=(e,t,n,r,o)=>{"function"===typeof e.copyToChannel?0!==t[n].byteLength&&e.copyToChannel(t[n],r,o):0!==t[n].byteLength&&e.getChannelData(r).set(t[n],o)},Lb=(e,t)=>{const n=[];for(let r=0;r<e;r+=1){const e=[],o="number"===typeof t?t:t[r];for(let t=0;t<o;t+=1)e.push(new Float32Array(128));n.push(e)}return n},jb=async(e,t,n,r,o,i,a)=>{const s=null===t?128*Math.ceil(e.context.length/128):t.length,c=r.channelCount*r.numberOfInputs,l=o.reduce(((e,t)=>e+t),0),u=0===l?null:n.createBuffer(l,s,n.sampleRate);if(void 0===i)throw new Error("Missing the processor constructor.");const d=ib(e),f=await((e,t)=>{const n=Hy(Iy,e),r=wb(t);return Hy(n,r)})(n,e),h=Lb(r.numberOfInputs,r.channelCount),p=Lb(r.numberOfOutputs,o),m=Array.from(e.parameters.keys()).reduce(((e,t)=>({...e,[t]:new Float32Array(128)})),{});for(let v=0;v<s;v+=128){if(r.numberOfInputs>0&&null!==t)for(let e=0;e<r.numberOfInputs;e+=1)for(let n=0;n<r.channelCount;n+=1)Mb(t,h[e],n,n,v);void 0!==i.parameterDescriptors&&null!==t&&i.parameterDescriptors.forEach(((e,n)=>{let{name:r}=e;Mb(t,m,r,c+n,v)}));for(let e=0;e<r.numberOfInputs;e+=1)for(let t=0;t<o[e];t+=1)0===p[e][t].byteLength&&(p[e][t]=new Float32Array(128));try{const e=h.map(((e,t)=>0===d.activeInputs[t].size?[]:e)),t=a(v/n.sampleRate,n.sampleRate,(()=>f.process(e,p,m)));if(null!==u)for(let n=0,i=0;n<r.numberOfOutputs;n+=1){for(let e=0;e<o[n];e+=1)Ib(u,p[n],e,i+e,v);i+=o[n]}if(!t)break}catch(g){e.dispatchEvent(new ErrorEvent("processorerror",{colno:g.colno,filename:g.filename,lineno:g.lineno,message:g.message}));break}}return u},Fb={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},Bb={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},zb={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},Hb={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Vb={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},qb=e=>{const{port1:t,port2:n}=new MessageChannel;return new Promise((r=>{const o=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>o();try{t.postMessage(e,[e])}catch{}finally{o()}}))},Ub={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},Wb=(e,t,n)=>{const r=t[n];if(void 0===r)throw e();return r},$b={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},Gb={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},Kb=()=>new DOMException("","InvalidStateError"),Xb=()=>new DOMException("","InvalidAccessError"),Yb={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},Qb=(e,t,n,r,o,i,a,s,c,l,u)=>{const d=l.length;let f=s;for(let h=0;h<d;h+=1){let s=n[0]*l[h];for(let t=1;t<o;t+=1){const r=f-t&c-1;s+=n[t]*i[r],s-=e[t]*a[r]}for(let e=o;e<r;e+=1)s+=n[e]*i[f-e&c-1];for(let n=o;n<t;n+=1)s-=e[n]*a[f-n&c-1];i[f]=l[h],a[f]=s,f=f+1&c-1,u[h]=s}return f},Zb={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},Jb=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,(()=>{}));return void 0!==n&&(n.catch((()=>{})),!0)}catch{}return!1},e_={numberOfChannels:1},t_=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n]&&(e[n]=r)},n_=(e,t)=>{t_(e,t,"channelCount"),t_(e,t,"channelCountMode"),t_(e,t,"channelInterpretation")},r_=e=>"function"===typeof e.getFloatTimeDomainData,o_=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n].value&&(e[n].value=r)},i_=e=>{e.start=(t=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0;if("number"===typeof o&&o<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,o)})(e.start)},a_=e=>{var t;e.stop=(t=e.stop,function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})},s_=(e,t)=>null===e?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),c_=async(e,t)=>{const n=await(e=>new Promise(((t,n)=>{const{port1:r,port2:o}=new MessageChannel;r.onmessage=e=>{let{data:n}=e;r.close(),o.close(),t(n)},r.onmessageerror=e=>{let{data:t}=e;r.close(),o.close(),n(t)},o.postMessage(e)})))(t);return new e(n)},l_=(e,t)=>{const n=e.createBiquadFilter();return n_(n,t),o_(n,t,"Q"),o_(n,t,"detune"),o_(n,t,"frequency"),o_(n,t,"gain"),t_(n,t,"type"),n},u_=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return n_(n,t),(e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw Kb()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:e=>{if("explicit"!==e)throw Kb()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:e=>{if("discrete"!==e)throw Kb()}})})(n),n},d_=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),f_=(e,t)=>{const n=e.createDelay(t.maxDelayTime);return n_(n,t),o_(n,t,"delayTime"),n},h_=(e,t)=>{const n=e.createGain();return n_(n,t),o_(n,t,"gain"),n};function p_(e,t){const n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function m_(e,t){let n=[0,0];for(let i=e.length-1;i>=0;i-=1)o=t,n=[(r=n)[0]*o[0]-r[1]*o[1],r[0]*o[1]+r[1]*o[0]],n[0]+=e[i];var r,o;return n}const g_=(e,t,n,r)=>e.createScriptProcessor(t,n,r),v_=()=>new DOMException("","NotSupportedError"),y_={numberOfChannels:1},b_={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},__={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},w_={disableNormalization:!1},x_={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},C_=()=>new DOMException("","UnknownError"),S_={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},k_=(e,t,n)=>void 0===e.copyFromChannel?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),E_=e=>{if(null===e)return!1;const t=e.length;return t%2!==0?0!==e[Math.floor(t/2)]:e[t/2-1]+e[t/2]!==0},O_=(e,t,n,r)=>{let o=e;for(;!o.hasOwnProperty(t);)o=Object.getPrototypeOf(o);const{get:i,set:a}=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,{get:n(i),set:r(a)})},T_=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(9!==r.code)throw r;T_(e,t,n+1e-7)}},A_=e=>{const t=e.createOscillator();try{t.start(-1)}catch(n){return n instanceof RangeError}return!1},R_=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},P_=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(n){return n instanceof RangeError}return!1},N_=(e,t)=>{const n=t.createGain();e.connect(n);const r=(t=>()=>{t.call(e,n),e.removeEventListener("ended",r)})(e.disconnect);e.addEventListener("ended",r),d_(e,n),e.stop=(t=>{let r=!1;return function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(r)try{t.call(e,o)}catch{n.gain.setValueAtTime(0,o)}else t.call(e,o),r=!0}})(e.stop)},D_=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"===typeof t?t.call(e,n):t.handleEvent.call(e,n)},M_=(e=>(t,n,r,o)=>{let[i,a,s]=r;e(t[a],[n,i,s],(e=>e[0]===n&&e[1]===i),o)})(fb),I_=(e=>(t,n,r,o)=>{let[i,a,s]=r;const c=t.get(i);void 0===c?t.set(i,new Set([[a,n,s]])):e(c,[a,n,s],(e=>e[0]===a&&e[1]===n),o)})(fb),L_=(e=>(t,n,r,o)=>e(t[o],(e=>e[0]===n&&e[1]===r)))(Vy),j_=new WeakMap,F_=(e=>t=>{var n;return null!==(n=e.get(t))&&void 0!==n?n:0})(j_),B_=(z_=new Map,H_=new WeakMap,(e,t)=>{const n=H_.get(e);if(void 0!==n)return n;const r=z_.get(e);if(void 0!==r)return r;try{const n=t();return n instanceof Promise?(z_.set(e,n),n.catch((()=>!1)).then((t=>(z_.delete(e),H_.set(e,t),t)))):(H_.set(e,n),n)}catch{return H_.set(e,!1),!1}});var z_,H_;const V_="undefined"===typeof window?null:window,q_=((e,t)=>(n,r)=>{const o=n.createAnalyser();if(n_(o,r),!(r.maxDecibels>r.minDecibels))throw t();return t_(o,r,"fftSize"),t_(o,r,"maxDecibels"),t_(o,r,"minDecibels"),t_(o,r,"smoothingTimeConstant"),e(r_,(()=>r_(o)))||(e=>{e.getFloatTimeDomainData=t=>{const n=new Uint8Array(t.length);e.getByteTimeDomainData(n);const r=Math.max(n.length,e.fftSize);for(let e=0;e<r;e+=1)t[e]=.0078125*(n[e]-128);return t}})(o),o})(B_,Zy),U_=(e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return n.renderer})(ib),W_=((e,t,n)=>async(r,o,i)=>{const a=e(r);await Promise.all(a.activeInputs.map(((e,a)=>Array.from(e).map((async e=>{let[s,c]=e;const l=t(s),u=await l.render(s,o),d=r.context.destination;n(s)||r===d&&n(r)||u.connect(i,c,a)})))).reduce(((e,t)=>[...e,...t]),[]))})(ib,U_,Cb),$_=((e,t,n)=>()=>{const r=new WeakMap;return{render(o,i){const a=r.get(i);return void 0!==a?Promise.resolve(a):(async(o,i)=>{let a=t(o);if(!Yy(a,i)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=e(i,t)}return r.set(i,a),await n(o,i,a),a})(o,i)}}})(q_,wb,W_),G_=(K_=Py,e=>{const t=K_.get(e);if(void 0===t)throw Kb();return t});var K_;const X_=(e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null)(V_),Y_=(e=>t=>null!==e&&t instanceof e)(X_),Q_=new WeakMap,Z_=(e=>class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(t,n,r){if(null!==n){let o=this._listeners.get(n);void 0===o&&(o=e(this,n),"function"===typeof n&&this._listeners.set(n,o)),this._nativeEventTarget.addEventListener(t,o,r)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){const r=null===t?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,void 0===r?null:r,n)}})(D_),J_=(e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null)(V_),ew=(e=>t=>null!==e&&t instanceof e)(J_),tw=(e=>t=>null!==e&&"function"===typeof e.AudioNode&&t instanceof e.AudioNode)(V_),nw=(e=>t=>null!==e&&"function"===typeof e.AudioParam&&t instanceof e.AudioParam)(V_),rw=(e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null)(V_),ow=((e,t,n,r,o,i,a,s,c,l,u,d,f,h,p,m)=>class extends l{constructor(t,r,o,i){super(o),this._context=t,this._nativeAudioNode=o;const a=u(t);d(a)&&!0!==n(kb,(()=>kb(a,m)))&&Tb(o),Ty.set(this,o),Ny.set(this,new Set),"closed"!==t.state&&r&&Wy(this),e(this,i,o)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw o();const l=u(this._context),d=p(l);if(f(e)||h(e))throw i();if(ub(e)){const o=wb(e);try{const t=gb(this._nativeAudioNode,o,n,s),r=Sb(this);(d||r)&&this._nativeAudioNode.disconnect(...t),"closed"!==this.context.state&&!r&&Sb(e)&&Wy(e)}catch(g){if(12===g.code)throw i();throw g}if(t(this,e,n,s,d)){const t=c([this],e);Eb(t,r(d))}return e}const m=xb(e);if("playbackRate"===m.name&&1024===m.maxValue)throw a();try{this._nativeAudioNode.connect(m,n),(d||Sb(this))&&this._nativeAudioNode.disconnect(m,n)}catch(g){if(12===g.code)throw i();throw g}if(Ab(this,e,n,d)){const t=c([this],e);Eb(t,r(d))}}disconnect(e,t,n){let r;const a=u(this._context),l=p(a);if(void 0===e)r=((e,t)=>{const n=ib(e),r=[];for(const o of n.outputs)db(o)?Rb(e,t,...o):Pb(e,t,...o),r.push(o[0]);return n.outputs.clear(),r})(this,l);else if("number"===typeof e){if(e<0||e>=this.numberOfOutputs)throw o();r=((e,t,n)=>{const r=ib(e),o=[];for(const i of r.outputs)i[1]===n&&(db(i)?Rb(e,t,...i):Pb(e,t,...i),o.push(i[0]),r.outputs.delete(i));return o})(this,l,e)}else{if(void 0!==t&&(t<0||t>=this.numberOfOutputs))throw o();if(ub(e)&&void 0!==n&&(n<0||n>=e.numberOfInputs))throw o();if(r=((e,t,n,r,o)=>{const i=ib(e);return Array.from(i.outputs).filter((e=>e[0]===n&&(void 0===r||e[1]===r)&&(void 0===o||e[2]===o))).map((n=>(db(n)?Rb(e,t,...n):Pb(e,t,...n),i.outputs.delete(n),n[0])))})(this,l,e,t,n),0===r.length)throw i()}for(const o of r){const e=c([this],o);Eb(e,s)}}})((iw=Oy,(e,t,n)=>{const r=[];for(let o=0;o<n.numberOfInputs;o+=1)r.push(new Set);iw.set(e,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:t})}),((e,t,n,r,o,i,a,s,c,l,u,d,f)=>{const h=new WeakMap;return(p,m,g,v,y)=>{const{activeInputs:b,passiveInputs:_}=i(m),{outputs:w}=i(p),x=s(p),C=i=>{const s=c(m),l=c(p);if(i){const t=qy(_,p,g,v);e(b,p,t,!1),y||d(p)||n(l,s,g,v),f(m)&&Wy(m)}else{const e=r(b,p,g,v);t(_,v,e,!1),y||d(p)||o(l,s,g,v);const n=a(m);if(0===n)u(m)&&Ky(m,b);else{const e=h.get(m);void 0!==e&&clearTimeout(e),h.set(m,setTimeout((()=>{u(m)&&Ky(m,b)}),1e3*n))}}};return!!l(w,[m,g,v],(e=>e[0]===m&&e[1]===g&&e[2]===v),!0)&&(x.add(C),u(p)?e(b,p,[g,v,C],!0):t(_,v,[p,g,C],!0),!0)}})(M_,I_,gb,L_,_b,ib,F_,Uy,wb,fb,rb,Cb,Sb),B_,((e,t,n,r,o,i)=>a=>(s,c)=>{const l=e.get(s);if(void 0===l){if(!a&&i(s)){const e=r(s),{outputs:i}=n(s);for(const n of i)if(db(n)){const o=r(n[0]);t(e,o,n[1],n[2])}else{const t=o(n[0]);e.disconnect(t,n[1])}}e.set(s,c)}else e.set(s,l+c)})(Dy,_b,ib,wb,xb,rb),Zy,Xb,v_,((e,t,n,r,o,i,a,s)=>(c,l)=>{const u=t.get(c);if(void 0===u)throw new Error("Missing the expected cycle count.");const d=i(c.context),f=s(d);if(u===l){if(t.delete(c),!f&&a(c)){const t=r(c),{outputs:i}=n(c);for(const n of i)if(db(n)){const o=r(n[0]);e(t,o,n[1],n[2])}else{const e=o(n[0]);t.connect(e,n[1])}}}else t.set(c,u-l)})(gb,Dy,ib,wb,xb,G_,rb,Y_),((e,t,n)=>function r(o,i){const a=ub(i)?i:n(e,i);if((e=>"delayTime"in e)(a))return[];if(o[0]===a)return[o];if(o.includes(a))return[];const{outputs:s}=t(a);return Array.from(s).map((e=>r([...o,a],e[0]))).reduce(((e,t)=>e.concat(t)),[])})(Q_,ib,Hy),Z_,G_,ew,tw,nw,Y_,rw);var iw;const aw=((e,t,n,r,o,i)=>class extends e{constructor(e,n){const a=o(e),s={...Xy,...n},c=r(a,s);super(e,!1,c,i(a)?t():null),this._nativeAnalyserNode=c}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){const t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){const t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}})(ow,$_,Zy,q_,G_,Y_),sw=new WeakSet,cw=(e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null)(V_),lw=(uw=new Uint32Array(1),e=>(uw[0]=e,uw[0]));var uw;const dw=((e,t)=>n=>{n.copyFromChannel=function(r,o){const i=e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),a=e(o);if(a>=n.numberOfChannels)throw t();const s=n.length,c=n.getChannelData(a),l=r.length;for(let e=i<0?-i:0;e+i<s&&e<l;e+=1)r[e]=c[e+i]},n.copyToChannel=function(r,o){const i=e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),a=e(o);if(a>=n.numberOfChannels)throw t();const s=n.length,c=n.getChannelData(a),l=r.length;for(let e=i<0?-i:0;e+i<s&&e<l;e+=1)c[e+i]=r[e]}})(lw,Zy),fw=(e=>t=>{t.copyFromChannel=(n=>function(r,o){const i=e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),a=e(o);if(i<t.length)return n.call(t,r,a,i)})(t.copyFromChannel),t.copyToChannel=(n=>function(r,o){const i=e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),a=e(o);if(i<t.length)return n.call(t,r,a,i)})(t.copyToChannel)})(lw),hw=((e,t,n,r,o,i,a,s)=>{let c=null;return class l{constructor(l){if(null===o)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:u,numberOfChannels:d,sampleRate:f}={...eb,...l};null===c&&(c=new o(1,1,44100));const h=null!==r&&t(i,i)?new r({length:u,numberOfChannels:d,sampleRate:f}):c.createBuffer(d,u,f);if(0===h.numberOfChannels)throw n();return"function"!==typeof h.copyFromChannel?(a(h),Jy(h)):t(Qy,(()=>Qy(h)))||s(h),e.add(h),h}static[Symbol.hasInstance](t){return null!==t&&"object"===typeof t&&Object.getPrototypeOf(t)===l.prototype||e.has(t)}}})(sw,B_,v_,cw,X_,(e=>()=>{if(null===e)return!1;try{new e({length:1,sampleRate:44100})}catch{return!1}return!0})(cw),dw,fw),pw=(e=>(t,n)=>{const r=e(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});n.connect(r).connect(t.destination);const o=()=>{n.removeEventListener("ended",o),n.disconnect(r),r.disconnect()};n.addEventListener("ended",o)})(h_),mw=((e,t,n)=>async(r,o,i)=>{const a=t(r);await Promise.all(Array.from(a.activeInputs).map((async t=>{let[r,a]=t;const s=e(r),c=await s.render(r,o);n(r)||c.connect(i,a)})))})(U_,ab,Cb),gw=(e=>(t,n,r)=>e(n,t,r))(mw),vw=((e,t,n,r,o,i,a,s,c,l,u)=>(d,f)=>{const h=d.createBufferSource();return n_(h,f),o_(h,f,"playbackRate"),t_(h,f,"buffer"),t_(h,f,"loop"),t_(h,f,"loopEnd"),t_(h,f,"loopStart"),t(n,(()=>n(d)))||(e=>{e.start=(t=>{let n=!1;return function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;if(n)throw Kb();t.call(e,r,o,i),n=!0}})(e.start)})(h),t(r,(()=>r(d)))||c(h),t(o,(()=>o(d)))||l(h,d),t(i,(()=>i(d)))||i_(h),t(a,(()=>a(d)))||u(h,d),t(s,(()=>s(d)))||a_(h),e(d,h),h})(pw,B_,(e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1}),(e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0}),(e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0}),A_,R_,P_,(e=>{e.start=(t=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0;const i=e.buffer,a=null===i?r:Math.min(i.duration,r);null!==i&&a>i.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,a,o)})(e.start)}),(e=>(t,n)=>{const r=n.createBuffer(1,1,44100);null===t.buffer&&(t.buffer=r),e(t,"buffer",(e=>()=>{const n=e.call(t);return n===r?null:n}),(e=>n=>e.call(t,null===n?r:n)))})(O_),N_),yw=((e,t)=>(n,r,o)=>(e(r).replay(o),t(r,n,o)))((e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer})(ab),mw),bw=((e,t,n,r,o)=>()=>{const i=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(c,l){const u=i.get(l);return void 0!==u?Promise.resolve(u):(async(c,l)=>{let u=n(c);const d=Yy(u,l);if(!d){const e={buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value};u=t(l,e),null!==a&&u.start(...a),null!==s&&u.stop(s)}return i.set(l,u),d?await e(l,c.playbackRate,u.playbackRate):await r(l,c.playbackRate,u.playbackRate),await o(c,l,u),u})(c,l)}}})(gw,vw,wb,yw,W_),_w=((e,t,n,r,o,i,a,s,c,l,u,d,f)=>function(h,p,m){let g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,v=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const y=m.value,b=new ky.AutomationEventList(y),_=p?r(b):null,w={get defaultValue(){return y},get maxValue(){return null===g?m.maxValue:g},get minValue(){return null===v?m.minValue:v},get value(){return m.value},set value(e){m.value=e,w.setValueAtTime(e,h.context.currentTime)},cancelAndHoldAtTime(e){if("function"===typeof m.cancelAndHoldAtTime)null===_&&b.flush(h.context.currentTime),b.add(o(e)),m.cancelAndHoldAtTime(e);else{const t=Array.from(b).pop();null===_&&b.flush(h.context.currentTime),b.add(o(e));const n=Array.from(b).pop();m.cancelScheduledValues(e),t!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return w},cancelScheduledValues:e=>(null===_&&b.flush(h.context.currentTime),b.add(i(e)),m.cancelScheduledValues(e),w),exponentialRampToValueAtTime(e,t){if(0===e)throw new RangeError;if(!Number.isFinite(t)||t<0)throw new RangeError;const n=h.context.currentTime;return null===_&&b.flush(n),0===Array.from(b).length&&(b.add(l(y,n)),m.setValueAtTime(y,n)),b.add(a(e,t)),m.exponentialRampToValueAtTime(e,t),w},linearRampToValueAtTime(e,t){const n=h.context.currentTime;return null===_&&b.flush(n),0===Array.from(b).length&&(b.add(l(y,n)),m.setValueAtTime(y,n)),b.add(s(e,t)),m.linearRampToValueAtTime(e,t),w},setTargetAtTime:(e,t,n)=>(null===_&&b.flush(h.context.currentTime),b.add(c(e,t,n)),m.setTargetAtTime(e,t,n),w),setValueAtTime:(e,t)=>(null===_&&b.flush(h.context.currentTime),b.add(l(e,t)),m.setValueAtTime(e,t),w),setValueCurveAtTime(e,t,n){const r=e instanceof Float32Array?e:new Float32Array(e);if(null!==d&&"webkitAudioContext"===d.name){const e=t+n,o=h.context.sampleRate,i=Math.ceil(t*o),a=Math.floor(e*o),s=a-i,c=new Float32Array(s);for(let u=0;u<s;u+=1){const e=(r.length-1)/n*((i+u)/o-t),a=Math.floor(e),s=Math.ceil(e);c[u]=a===s?r[a]:(1-(e-a))*r[a]+(1-(s-e))*r[s]}null===_&&b.flush(h.context.currentTime),b.add(u(c,t,n)),m.setValueCurveAtTime(c,t,n);const l=a/o;l<e&&f(w,c[c.length-1],l),f(w,r[r.length-1],e)}else null===_&&b.flush(h.context.currentTime),b.add(u(r,t,n)),m.setValueCurveAtTime(r,t,n);return w}};return n.set(w,m),t.set(w,h),e(w,_),w})((ww=Ay,(e,t)=>{ww.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})}),Q_,Ry,(e=>({replay(t){for(const n of e)if("exponentialRampToValue"===n.type){const{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if("linearRampToValue"===n.type){const{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if("setTarget"===n.type){const{startTime:e,target:r,timeConstant:o}=n;t.setTargetAtTime(r,e,o)}else if("setValue"===n.type){const{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:e,startTime:r,values:o}=n;t.setValueCurveAtTime(o,r,e)}}}})),ky.createCancelAndHoldAutomationEvent,ky.createCancelScheduledValuesAutomationEvent,ky.createExponentialRampToValueAutomationEvent,ky.createLinearRampToValueAutomationEvent,ky.createSetTargetAutomationEvent,ky.createSetValueAutomationEvent,ky.createSetValueCurveAutomationEvent,J_,T_);var ww;const xw=((e,t,n,r,o,i,a,s)=>class extends e{constructor(e,r){const s=i(e),c={...ob,...r},l=o(s,c),u=a(s),d=u?t():null;super(e,!1,l,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=null!==c.buffer,this._nativeAudioBufferSourceNode=l,this._onended=null,this._playbackRate=n(this,u,l.playbackRate,nb,tb)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,null!==e){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){const t="function"===typeof e?s(this,e):null;this._nativeAudioBufferSourceNode.onended=t;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===t?e:n}get playbackRate(){return this._playbackRate}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;if(this._nativeAudioBufferSourceNode.start(e,t,n),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===n?[e,t]:[e,t,n]),"closed"!==this.context.state){Wy(this);const e=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",e),rb(this)&&Gy(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",e)}}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._nativeAudioBufferSourceNode.stop(e),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=e)}})(ow,bw,_w,Kb,vw,G_,Y_,D_),Cw=((e,t,n,r,o,i,a,s)=>class extends e{constructor(e,n){const r=i(e),c=a(r),l=o(r,n,c);super(e,!1,l,c?t(s):null),this._isNodeOfNativeOfflineAudioContext=c,this._nativeAudioDestinationNode=l}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(ow,(e=>{const t=new WeakMap;return{render(n,r){const o=t.get(r);return void 0!==o?Promise.resolve(o):(async(n,r)=>{const o=r.destination;return t.set(r,o),await e(n,r,o),o})(n,r)}}}),Zy,Kb,((e,t)=>(n,r,o)=>{const i=n.destination;if(i.channelCount!==r)try{i.channelCount=r}catch{}o&&"explicit"!==i.channelCountMode&&(i.channelCountMode="explicit"),0===i.maxChannelCount&&Object.defineProperty(i,"maxChannelCount",{value:r});const a=e(n,{channelCount:r,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return t(a,"channelCount",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t);try{i.channelCount=t}catch(n){if(t>i.maxChannelCount)throw n}})),t(a,"channelCountMode",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),i.channelCountMode=t})),t(a,"channelInterpretation",(e=>()=>e.call(a)),(e=>t=>{e.call(a,t),i.channelInterpretation=t})),Object.defineProperty(a,"maxChannelCount",{get:()=>i.maxChannelCount}),a.connect(i),a})(h_,O_),G_,Y_,W_),Sw=((e,t,n,r,o)=>()=>{const i=new WeakMap;return{render(a,s){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s)=>{let c=n(a);const l=Yy(c,s);if(!l){const e={Q:c.Q.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,detune:c.detune.value,frequency:c.frequency.value,gain:c.gain.value,type:c.type};c=t(s,e)}return i.set(s,c),l?(await e(s,a.Q,c.Q),await e(s,a.detune,c.detune),await e(s,a.frequency,c.frequency),await e(s,a.gain,c.gain)):(await r(s,a.Q,c.Q),await r(s,a.detune,c.detune),await r(s,a.frequency,c.frequency),await r(s,a.gain,c.gain)),await o(a,s,c),c})(a,s)}}})(gw,l_,wb,yw,W_),kw=(e=>(t,n)=>e.set(t,n))(j_),Ew=((e,t,n,r,o,i,a,s)=>class extends e{constructor(e,r){const c=i(e),l={...Fb,...r},u=o(c,l),d=a(c);super(e,!1,u,d?n():null),this._Q=t(this,d,u.Q,nb,tb),this._detune=t(this,d,u.detune,1200*Math.log2(nb),-1200*Math.log2(nb)),this._frequency=t(this,d,u.frequency,e.sampleRate/2,0),this._gain=t(this,d,u.gain,40*Math.log10(nb),tb),this._nativeBiquadFilterNode=u,s(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(o){if(11===o.code)throw r();throw o}if(e.length!==t.length||t.length!==n.length)throw r()}})(ow,_w,Sw,Xb,l_,G_,Y_,kw),Ow=((e,t)=>(n,r,o)=>{const i=new Set;return n.connect=(o=>function(a){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const l=0===i.size;if(t(a))return o.call(n,a,s,c),e(i,[a,s,c],(e=>e[0]===a&&e[1]===s&&e[2]===c),!0),l&&r(),a;o.call(n,a,s),e(i,[a,s],(e=>e[0]===a&&e[1]===s),!0),l&&r()})(n.connect),n.disconnect=(e=>(r,a,s)=>{const c=i.size>0;if(void 0===r)e.apply(n),i.clear();else if("number"===typeof r){e.call(n,r);for(const e of i)e[1]===r&&i.delete(e)}else{t(r)?e.call(n,r,a,s):e.call(n,r,a);for(const e of i)e[0]!==r||void 0!==a&&e[1]!==a||void 0!==s&&e[2]!==s||i.delete(e)}const l=0===i.size;c&&l&&o()})(n.disconnect),n})(fb,tw),Tw=((e,t)=>(n,r)=>{r.channelCount=1,r.channelCountMode="explicit",Object.defineProperty(r,"channelCount",{get:()=>1,set:()=>{throw e()}}),Object.defineProperty(r,"channelCountMode",{get:()=>"explicit",set:()=>{throw e()}});const o=n.createBufferSource();t(r,(()=>{const e=r.numberOfInputs;for(let t=0;t<e;t+=1)o.connect(r,0,t)}),(()=>o.disconnect(r)))})(Kb,Ow),Aw=((e,t)=>(n,r)=>{const o=n.createChannelMerger(r.numberOfInputs);return null!==e&&"webkitAudioContext"===e.name&&t(n,o),n_(o,r),o})(J_,Tw),Rw=((e,t,n)=>()=>{const r=new WeakMap;return{render(o,i){const a=r.get(i);return void 0!==a?Promise.resolve(a):(async(o,i)=>{let a=t(o);if(!Yy(a,i)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=e(i,t)}return r.set(i,a),await n(o,i,a),a})(o,i)}}})(Aw,wb,W_),Pw=((e,t,n,r,o)=>class extends e{constructor(e,i){const a=r(e),s={...Bb,...i};super(e,!1,n(a,s),o(a)?t():null)}})(ow,Rw,Aw,G_,Y_),Nw=((e,t,n)=>()=>{const r=new WeakMap;return{render(o,i){const a=r.get(i);return void 0!==a?Promise.resolve(a):(async(o,i)=>{let a=t(o);if(!Yy(a,i)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=e(i,t)}return r.set(i,a),await n(o,i,a),a})(o,i)}}})(u_,wb,W_),Dw=((e,t,n,r,o,i)=>class extends e{constructor(e,a){const s=r(e),c=i({...zb,...a});super(e,!1,n(s,c),o(s)?t():null)}})(ow,Nw,u_,G_,Y_,(e=>({...e,channelCount:e.numberOfOutputs}))),Mw=((e,t,n,r)=>(o,i)=>{let{offset:a,...s}=i;const c=o.createBuffer(1,2,44100),l=t(o,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),u=n(o,{...s,gain:a}),d=c.getChannelData(0);d[0]=1,d[1]=1,l.buffer=c,l.loop=!0;const f={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get offset(){return u.gain},get onended(){return l.onended},set onended(e){l.onended=e},addEventListener(){return l.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},dispatchEvent(){return l.dispatchEvent(arguments.length<=0?void 0:arguments[0])},removeEventListener(){return l.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;l.start.call(l,e)},stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;l.stop.call(l,e)}};return e(o,l),r(d_(f,u),(()=>l.connect(u)),(()=>l.disconnect(u)))})(pw,vw,h_,Ow),Iw=((e,t,n,r,o)=>(i,a)=>{if(void 0===i.createConstantSource)return n(i,a);const s=i.createConstantSource();return n_(s,a),o_(s,a,"offset"),t(r,(()=>r(i)))||i_(s),t(o,(()=>o(i)))||a_(s),e(i,s),s})(pw,B_,Mw,A_,P_),Lw=((e,t,n,r,o)=>()=>{const i=new WeakMap;let a=null,s=null;return{set start(e){a=e},set stop(e){s=e},render(c,l){const u=i.get(l);return void 0!==u?Promise.resolve(u):(async(c,l)=>{let u=n(c);const d=Yy(u,l);if(!d){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value};u=t(l,e),null!==a&&u.start(a),null!==s&&u.stop(s)}return i.set(l,u),d?await e(l,c.offset,u.offset):await r(l,c.offset,u.offset),await o(c,l,u),u})(c,l)}}})(gw,Iw,wb,yw,W_),jw=((e,t,n,r,o,i,a)=>class extends e{constructor(e,a){const s=o(e),c={...Hb,...a},l=r(s,c),u=i(s),d=u?n():null;super(e,!1,l,d),this._constantSourceNodeRenderer=d,this._nativeConstantSourceNode=l,this._offset=t(this,u,l.offset,nb,tb),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){const t="function"===typeof e?a(this,e):null;this._nativeConstantSourceNode.onended=t;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===t?e:n}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._nativeConstantSourceNode.start(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=e),"closed"!==this.context.state){Wy(this);const e=()=>{this._nativeConstantSourceNode.removeEventListener("ended",e),rb(this)&&Gy(this)};this._nativeConstantSourceNode.addEventListener("ended",e)}}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._nativeConstantSourceNode.stop(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=e)}})(ow,_w,Lw,Iw,G_,Y_,D_),Fw=((e,t)=>(n,r)=>{const o=n.createConvolver();if(n_(o,r),r.disableNormalization===o.normalize&&(o.normalize=!r.disableNormalization),t_(o,r,"buffer"),r.channelCount>2)throw e();if(t(o,"channelCount",(e=>()=>e.call(o)),(t=>n=>{if(n>2)throw e();return t.call(o,n)})),"max"===r.channelCountMode)throw e();return t(o,"channelCountMode",(e=>()=>e.call(o)),(t=>n=>{if("max"===n)throw e();return t.call(o,n)})),o})(v_,O_),Bw=((e,t,n)=>()=>{const r=new WeakMap;return{render(o,i){const a=r.get(i);return void 0!==a?Promise.resolve(a):(async(o,i)=>{let a=t(o);if(!Yy(a,i)){const t={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=e(i,t)}return r.set(i,a),mb(a)?await n(o,i,a.inputs[0]):await n(o,i,a),a})(o,i)}}})(Fw,wb,W_),zw=((e,t,n,r,o,i)=>class extends e{constructor(e,a){const s=r(e),c={...Vb,...a},l=n(s,c);super(e,!1,l,o(s)?t():null),this._isBufferNullified=!1,this._nativeConvolverNode=l,null!==c.buffer&&i(this,c.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,null===e&&null!==this._nativeConvolverNode.buffer){const e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,i(this,0)}else this._isBufferNullified=!1,i(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}})(ow,Bw,Fw,G_,Y_,kw),Hw=((e,t,n,r,o)=>i=>{const a=new WeakMap;return{render(s,c){const l=a.get(c);return void 0!==l?Promise.resolve(l):(async(s,c)=>{let l=n(s);const u=Yy(l,c);if(!u){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,delayTime:l.delayTime.value,maxDelayTime:i};l=t(c,e)}return a.set(c,l),u?await e(c,s.delayTime,l.delayTime):await r(c,s.delayTime,l.delayTime),await o(s,c,l),l})(s,c)}}})(gw,f_,wb,yw,W_),Vw=((e,t,n,r,o,i,a)=>class extends e{constructor(e,s){const c=o(e),l={...Ub,...s},u=r(c,l),d=i(c);super(e,!1,u,d?n(l.maxDelayTime):null),this._delayTime=t(this,d,u.delayTime),a(this,l.maxDelayTime)}get delayTime(){return this._delayTime}})(ow,_w,Hw,f_,G_,Y_,kw),qw=(e=>(t,n)=>{const r=t.createDynamicsCompressor();if(n_(r,n),n.channelCount>2)throw e();if("max"===n.channelCountMode)throw e();return o_(r,n,"attack"),o_(r,n,"knee"),o_(r,n,"ratio"),o_(r,n,"release"),o_(r,n,"threshold"),r})(v_),Uw=((e,t,n,r,o)=>()=>{const i=new WeakMap;return{render(a,s){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s)=>{let c=n(a);const l=Yy(c,s);if(!l){const e={attack:c.attack.value,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,knee:c.knee.value,ratio:c.ratio.value,release:c.release.value,threshold:c.threshold.value};c=t(s,e)}return i.set(s,c),l?(await e(s,a.attack,c.attack),await e(s,a.knee,c.knee),await e(s,a.ratio,c.ratio),await e(s,a.release,c.release),await e(s,a.threshold,c.threshold)):(await r(s,a.attack,c.attack),await r(s,a.knee,c.knee),await r(s,a.ratio,c.ratio),await r(s,a.release,c.release),await r(s,a.threshold,c.threshold)),await o(a,s,c),c})(a,s)}}})(gw,qw,wb,yw,W_),Ww=((e,t,n,r,o,i,a,s)=>class extends e{constructor(e,o){const c=i(e),l={...$b,...o},u=r(c,l),d=a(c);super(e,!1,u,d?n():null),this._attack=t(this,d,u.attack),this._knee=t(this,d,u.knee),this._nativeDynamicsCompressorNode=u,this._ratio=t(this,d,u.ratio),this._release=t(this,d,u.release),this._threshold=t(this,d,u.threshold),s(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){const t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,o()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){const t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,"max"===e)throw this._nativeDynamicsCompressorNode.channelCountMode=t,o()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"===typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(ow,_w,Uw,qw,v_,G_,Y_,kw),$w=((e,t,n,r,o)=>()=>{const i=new WeakMap;return{render(a,s){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s)=>{let c=n(a);const l=Yy(c,s);if(!l){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,gain:c.gain.value};c=t(s,e)}return i.set(s,c),l?await e(s,a.gain,c.gain):await r(s,a.gain,c.gain),await o(a,s,c),c})(a,s)}}})(gw,h_,wb,yw,W_),Gw=((e,t,n,r,o,i)=>class extends e{constructor(e,a){const s=o(e),c={...Gb,...a},l=r(s,c),u=i(s);super(e,!1,l,u?n():null),this._gain=t(this,u,l.gain,nb,tb)}get gain(){return this._gain}})(ow,_w,$w,h_,G_,Y_),Kw=((e,t,n,r)=>(o,i,a)=>{let{channelCount:s,channelCountMode:c,channelInterpretation:l,feedback:u,feedforward:d}=a;const f=s_(i,o.sampleRate),h=u instanceof Float64Array?u:new Float64Array(u),p=d instanceof Float64Array?d:new Float64Array(d),m=h.length,g=p.length,v=Math.min(m,g);if(0===m||m>20)throw r();if(0===h[0])throw t();if(0===g||g>20)throw r();if(0===p[0])throw t();if(1!==h[0]){for(let e=0;e<g;e+=1)p[e]/=h[0];for(let e=1;e<m;e+=1)h[e]/=h[0]}const y=n(o,f,s,s);y.channelCount=s,y.channelCountMode=c,y.channelInterpretation=l;const b=[],_=[],w=[];for(let e=0;e<s;e+=1){b.push(0);const e=new Float32Array(32),t=new Float32Array(32);e.fill(0),t.fill(0),_.push(e),w.push(t)}y.onaudioprocess=e=>{const t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let o=0;o<r;o+=1){const e=t.getChannelData(o),r=n.getChannelData(o);b[o]=Qb(h,m,p,g,v,_[o],w[o],b[o],32,e,r)}};const x=o.sampleRate/2;return d_({get bufferSize(){return f},get channelCount(){return y.channelCount},set channelCount(e){y.channelCount=e},get channelCountMode(){return y.channelCountMode},set channelCountMode(e){y.channelCountMode=e},get channelInterpretation(){return y.channelInterpretation},set channelInterpretation(e){y.channelInterpretation=e},get context(){return y.context},get inputs(){return[y]},get numberOfInputs(){return y.numberOfInputs},get numberOfOutputs(){return y.numberOfOutputs},addEventListener(){return y.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},dispatchEvent(){return y.dispatchEvent(arguments.length<=0?void 0:arguments[0])},getFrequencyResponse(t,n,r){if(t.length!==n.length||n.length!==r.length)throw e();const o=t.length;for(let e=0;e<o;e+=1){const o=-Math.PI*(t[e]/x),i=[Math.cos(o),Math.sin(o)],a=p_(m_(p,i),m_(h,i));n[e]=Math.sqrt(a[0]*a[0]+a[1]*a[1]),r[e]=Math.atan2(a[1],a[0])}},removeEventListener(){return y.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])}},y)})(Xb,Kb,g_,v_),Xw=((e,t,n,r)=>o=>e(Jb,(()=>Jb(o)))?Promise.resolve(e(r,r)).then((e=>{if(!e){const e=n(o,512,0,1);o.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>o.currentTime,e.connect(o.destination)}return o.startRendering()})):new Promise((e=>{const n=t(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});o.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(o.destination),o.startRendering()})))(B_,h_,g_,((e,t)=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((e=>{n.oncomplete=()=>{r.disconnect(),e(0!==n.currentTime)},n.startRendering()}))})(h_,X_)),Yw=((e,t,n,r,o)=>(i,a)=>{const s=new WeakMap;let c=null;const l=async(l,u)=>{let d=null,f=t(l);const h=Yy(f,u);if(void 0===u.createIIRFilter?d=e(u,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):h||(f=u.createIIRFilter(a,i)),s.set(u,null===d?f:d),null!==d){if(null===c){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new n(l.context.destination.channelCount,l.context.length,u.sampleRate);c=(async()=>{await r(l,e,e.destination);return((e,t,n,r)=>{const o=n instanceof Float64Array?n:new Float64Array(n),i=r instanceof Float64Array?r:new Float64Array(r),a=o.length,s=i.length,c=Math.min(a,s);if(1!==o[0]){for(let e=0;e<a;e+=1)i[e]/=o[0];for(let e=1;e<s;e+=1)o[e]/=o[0]}const l=new Float32Array(32),u=new Float32Array(32),d=t.createBuffer(e.numberOfChannels,e.length,e.sampleRate),f=e.numberOfChannels;for(let h=0;h<f;h+=1){const t=e.getChannelData(h),n=d.getChannelData(h);l.fill(0),u.fill(0),Qb(o,a,i,s,c,l,u,0,32,t,n)}return d})(await o(e),u,i,a)})()}const e=await c;return d.buffer=e,d.start(0),d}return await r(l,u,f),f};return{render(e,t){const n=s.get(t);return void 0!==n?Promise.resolve(n):l(e,t)}}})(vw,wb,X_,W_,Xw),Qw=(e=>(t,n,r)=>{if(void 0===t.createIIRFilter)return e(t,n,r);const o=t.createIIRFilter(r.feedforward,r.feedback);return n_(o,r),o})(Kw),Zw=((e,t,n,r,o,i)=>class extends e{constructor(e,a){const s=r(e),c=o(s),l={...Yb,...a},u=t(s,c?null:e.baseLatency,l);super(e,!1,u,c?n(l.feedback,l.feedforward):null),(e=>{var t;e.getFrequencyResponse=(t=e.getFrequencyResponse,(n,r,o)=>{if(n.length!==r.length||r.length!==o.length)throw Xb();return t.call(e,n,r,o)})})(u),this._nativeIIRFilterNode=u,i(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}})(ow,Qw,Yw,G_,Y_,kw),Jw=((e,t,n,r,o,i,a,s)=>(c,l)=>{const u=l.listener,{forwardX:d,forwardY:f,forwardZ:h,positionX:p,positionY:m,positionZ:g,upX:v,upY:y,upZ:b}=void 0===u.forwardX?(()=>{const d=new Float32Array(1),f=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),h=a(l);let p=!1,m=[0,0,-1,0,1,0],g=[0,0,0];const v=()=>{if(p)return;p=!0;const e=r(l,256,9,0);e.onaudioprocess=e=>{let{inputBuffer:t}=e;const n=[i(t,d,0),i(t,d,1),i(t,d,2),i(t,d,3),i(t,d,4),i(t,d,5)];n.some(((e,t)=>e!==m[t]))&&(u.setOrientation(...n),m=n);const r=[i(t,d,6),i(t,d,7),i(t,d,8)];r.some(((e,t)=>e!==g[t]))&&(u.setPosition(...r),g=r)},f.connect(e)},y=e=>t=>{t!==m[e]&&(m[e]=t,u.setOrientation(...m))},b=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},_=(t,r,i)=>{const a=n(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});a.connect(f,0,t),a.start(),Object.defineProperty(a.offset,"defaultValue",{get:()=>r});const u=e({context:c},h,a.offset,nb,tb);var d,p,m,g,y,b,_;return s(u,"value",(e=>()=>e.call(u)),(e=>t=>{try{e.call(u,t)}catch(n){if(9!==n.code)throw n}v(),h&&i(t)})),u.cancelAndHoldAtTime=(d=u.cancelAndHoldAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=d.apply(u,t);return v(),r}),u.cancelScheduledValues=(p=u.cancelScheduledValues,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=p.apply(u,t);return v(),r}),u.exponentialRampToValueAtTime=(m=u.exponentialRampToValueAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=m.apply(u,t);return v(),r}),u.linearRampToValueAtTime=(g=u.linearRampToValueAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=g.apply(u,t);return v(),r}),u.setTargetAtTime=(y=u.setTargetAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=y.apply(u,t);return v(),r}),u.setValueAtTime=(b=u.setValueAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=b.apply(u,t);return v(),r}),u.setValueCurveAtTime=(_=u.setValueCurveAtTime,h?()=>{throw o()}:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=_.apply(u,t);return v(),r}),u};return{forwardX:_(0,0,y(0)),forwardY:_(1,0,y(1)),forwardZ:_(2,-1,y(2)),positionX:_(6,0,b(0)),positionY:_(7,0,b(1)),positionZ:_(8,0,b(2)),upX:_(3,0,y(3)),upY:_(4,1,y(4)),upZ:_(5,0,y(5))}})():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return h},get positionX(){return p},get positionY(){return m},get positionZ(){return g},get upX(){return v},get upY(){return y},get upZ(){return b}}})(_w,Aw,Iw,g_,v_,k_,Y_,O_),ex=new WeakMap,tx=((e,t,n,r,o,i)=>class extends n{constructor(n,i){super(n),this._nativeContext=n,Py.set(this,n),r(n)&&o.set(n,new Set),this._destination=new e(this,i),this._listener=t(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(e){const t="function"===typeof e?i(this,e):null;this._nativeContext.onstatechange=t;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(Cw,Jw,Z_,Y_,ex,D_),nx=((e,t,n,r,o,i)=>(a,s)=>{const c=a.createOscillator();return n_(c,s),o_(c,s,"detune"),o_(c,s,"frequency"),void 0!==s.periodicWave?c.setPeriodicWave(s.periodicWave):t_(c,s,"type"),t(n,(()=>n(a)))||i_(c),t(r,(()=>r(a)))||i(c,a),t(o,(()=>o(a)))||a_(c),e(a,c),c})(pw,B_,A_,R_,P_,N_),rx=((e,t,n,r,o)=>()=>{const i=new WeakMap;let a=null,s=null,c=null;return{set periodicWave(e){a=e},set start(e){s=e},set stop(e){c=e},render(l,u){const d=i.get(u);return void 0!==d?Promise.resolve(d):(async(l,u)=>{let d=n(l);const f=Yy(d,u);if(!f){const e={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:null===a?void 0:a,type:d.type};d=t(u,e),null!==s&&d.start(s),null!==c&&d.stop(c)}return i.set(u,d),f?(await e(u,l.detune,d.detune),await e(u,l.frequency,d.frequency)):(await r(u,l.detune,d.detune),await r(u,l.frequency,d.frequency)),await o(l,u,d),d})(l,u)}}})(gw,nx,wb,yw,W_),ox=((e,t,n,r,o,i,a)=>class extends e{constructor(e,a){const s=o(e),c={...b_,...a},l=n(s,c),u=i(s),d=u?r():null,f=e.sampleRate/2;super(e,!1,l,d),this._detune=t(this,u,l.detune,153600,-153600),this._frequency=t(this,u,l.frequency,f,-f),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=d,null!==this._oscillatorNodeRenderer&&void 0!==c.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=c.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){const t="function"===typeof e?a(this,e):null;this._nativeOscillatorNode.onended=t;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=e)}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._nativeOscillatorNode.start(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=e),"closed"!==this.context.state){Wy(this);const e=()=>{this._nativeOscillatorNode.removeEventListener("ended",e),rb(this)&&Gy(this)};this._nativeOscillatorNode.addEventListener("ended",e)}}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._nativeOscillatorNode.stop(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=e)}})(ow,_w,nx,rx,G_,Y_,D_),ix=(e=>(t,n)=>{const r=e(t,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),o=t.createBuffer(1,2,44100);return r.buffer=o,r.loop=!0,r.connect(n),r.start(),()=>{r.stop(),r.disconnect(n)}})(vw),ax=((e,t,n,r,o)=>(i,a)=>{let{curve:s,oversample:c,...l}=a;const u=i.createWaveShaper(),d=i.createWaveShaper();n_(u,l),n_(d,l);const f=n(i,{...l,gain:1}),h=n(i,{...l,gain:-1}),p=n(i,{...l,gain:1}),m=n(i,{...l,gain:-1});let g=null,v=!1,y=null;const b={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){f.channelCount=e,h.channelCount=e,u.channelCount=e,p.channelCount=e,d.channelCount=e,m.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){f.channelCountMode=e,h.channelCountMode=e,u.channelCountMode=e,p.channelCountMode=e,d.channelCountMode=e,m.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){f.channelInterpretation=e,h.channelInterpretation=e,u.channelInterpretation=e,p.channelInterpretation=e,d.channelInterpretation=e,m.channelInterpretation=e},get context(){return u.context},get curve(){return y},set curve(n){if(null!==n&&n.length<2)throw t();if(null===n)u.curve=n,d.curve=n;else{const e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];const o=Math.ceil((e+1)/2),i=(e+1)/2-1;for(let a=1;a<o;a+=1){const s=a/o*i,c=Math.floor(s),l=Math.ceil(s);t[a]=c===l?n[c]:(1-(s-c))*n[c]+(1-(l-s))*n[l],r[a]=c===l?-n[e-1-c]:-(1-(s-c))*n[e-1-c]-(1-(l-s))*n[e-1-l]}t[o]=e%2===1?n[o-1]:(n[o-2]+n[o-1])/2,u.curve=t,d.curve=r}y=n,v&&(r(y)&&null===g?g=e(i,f):null!==g&&(g(),g=null))},get inputs(){return[f]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get oversample(){return u.oversample},set oversample(e){u.oversample=e,d.oversample=e},addEventListener(){return f.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},dispatchEvent(){return f.dispatchEvent(arguments.length<=0?void 0:arguments[0])},removeEventListener(){return f.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])}};null!==s&&(b.curve=s instanceof Float32Array?s:new Float32Array(s)),c!==b.oversample&&(b.oversample=c);return o(d_(b,p),(()=>{f.connect(u).connect(p),f.connect(h).connect(d).connect(m).connect(p),v=!0,r(y)&&(g=e(i,f))}),(()=>{f.disconnect(u),u.disconnect(p),f.disconnect(h),h.disconnect(d),d.disconnect(m),m.disconnect(p),v=!1,null!==g&&(g(),g=null)}))})(ix,Kb,h_,E_,Ow),sx=((e,t,n,r,o,i,a)=>(s,c)=>{const l=s.createWaveShaper();if(null!==i&&"webkitAudioContext"===i.name&&void 0===s.createGain().gain.automationRate)return n(s,c);n_(l,c);const u=null===c.curve||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(null!==u&&u.length<2)throw t();t_(l,{curve:u},"curve"),t_(l,c,"oversample");let d=null,f=!1;a(l,"curve",(e=>()=>e.call(l)),(t=>n=>(t.call(l,n),f&&(r(n)&&null===d?d=e(s,l):r(n)||null===d||(d(),d=null)),n)));return o(l,(()=>{f=!0,r(l.curve)&&(d=e(s,l))}),(()=>{f=!1,null!==d&&(d(),d=null)}))})(ix,Kb,ax,E_,Ow,J_,O_),cx=((e,t,n,r,o,i,a,s,c,l)=>(u,d)=>{let{coneInnerAngle:f,coneOuterAngle:h,coneOuterGain:p,distanceModel:m,maxDistance:g,orientationX:v,orientationY:y,orientationZ:b,panningModel:_,positionX:w,positionY:x,positionZ:C,refDistance:S,rolloffFactor:k,...E}=d;const O=u.createPanner();if(E.channelCount>2)throw a();if("max"===E.channelCountMode)throw a();n_(O,E);const T={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},A=n(u,{...T,channelInterpretation:"speakers",numberOfInputs:6}),R=r(u,{...E,gain:1}),P=r(u,{...T,gain:1}),N=r(u,{...T,gain:0}),D=r(u,{...T,gain:0}),M=r(u,{...T,gain:0}),I=r(u,{...T,gain:0}),L=r(u,{...T,gain:0}),j=o(u,256,6,1),F=i(u,{...T,curve:new Float32Array([1,1]),oversample:"none"});let B=[v,y,b],z=[w,x,C];const H=new Float32Array(1);j.onaudioprocess=e=>{let{inputBuffer:t}=e;const n=[c(t,H,0),c(t,H,1),c(t,H,2)];n.some(((e,t)=>e!==B[t]))&&(O.setOrientation(...n),B=n);const r=[c(t,H,3),c(t,H,4),c(t,H,5)];r.some(((e,t)=>e!==z[t]))&&(O.setPosition(...r),z=r)},Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(D.gain,"defaultValue",{get:()=>0}),Object.defineProperty(M.gain,"defaultValue",{get:()=>0}),Object.defineProperty(I.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0});const V={get bufferSize(){},get channelCount(){return O.channelCount},set channelCount(e){if(e>2)throw a();R.channelCount=e,O.channelCount=e},get channelCountMode(){return O.channelCountMode},set channelCountMode(e){if("max"===e)throw a();R.channelCountMode=e,O.channelCountMode=e},get channelInterpretation(){return O.channelInterpretation},set channelInterpretation(e){R.channelInterpretation=e,O.channelInterpretation=e},get coneInnerAngle(){return O.coneInnerAngle},set coneInnerAngle(e){O.coneInnerAngle=e},get coneOuterAngle(){return O.coneOuterAngle},set coneOuterAngle(e){O.coneOuterAngle=e},get coneOuterGain(){return O.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();O.coneOuterGain=e},get context(){return O.context},get distanceModel(){return O.distanceModel},set distanceModel(e){O.distanceModel=e},get inputs(){return[R]},get maxDistance(){return O.maxDistance},set maxDistance(e){if(e<0)throw new RangeError;O.maxDistance=e},get numberOfInputs(){return O.numberOfInputs},get numberOfOutputs(){return O.numberOfOutputs},get orientationX(){return P.gain},get orientationY(){return N.gain},get orientationZ(){return D.gain},get panningModel(){return O.panningModel},set panningModel(e){O.panningModel=e},get positionX(){return M.gain},get positionY(){return I.gain},get positionZ(){return L.gain},get refDistance(){return O.refDistance},set refDistance(e){if(e<0)throw new RangeError;O.refDistance=e},get rolloffFactor(){return O.rolloffFactor},set rolloffFactor(e){if(e<0)throw new RangeError;O.rolloffFactor=e},addEventListener(){return R.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},dispatchEvent(){return R.dispatchEvent(arguments.length<=0?void 0:arguments[0])},removeEventListener(){return R.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])}};f!==V.coneInnerAngle&&(V.coneInnerAngle=f),h!==V.coneOuterAngle&&(V.coneOuterAngle=h),p!==V.coneOuterGain&&(V.coneOuterGain=p),m!==V.distanceModel&&(V.distanceModel=m),g!==V.maxDistance&&(V.maxDistance=g),v!==V.orientationX.value&&(V.orientationX.value=v),y!==V.orientationY.value&&(V.orientationY.value=y),b!==V.orientationZ.value&&(V.orientationZ.value=b),_!==V.panningModel&&(V.panningModel=_),w!==V.positionX.value&&(V.positionX.value=w),x!==V.positionY.value&&(V.positionY.value=x),C!==V.positionZ.value&&(V.positionZ.value=C),S!==V.refDistance&&(V.refDistance=S),k!==V.rolloffFactor&&(V.rolloffFactor=k),1===B[0]&&0===B[1]&&0===B[2]||O.setOrientation(...B),0===z[0]&&0===z[1]&&0===z[2]||O.setPosition(...z);return l(d_(V,O),(()=>{R.connect(O),e(R,F,0,0),F.connect(P).connect(A,0,0),F.connect(N).connect(A,0,1),F.connect(D).connect(A,0,2),F.connect(M).connect(A,0,3),F.connect(I).connect(A,0,4),F.connect(L).connect(A,0,5),A.connect(j).connect(u.destination)}),(()=>{R.disconnect(O),s(R,F,0,0),F.disconnect(P),P.disconnect(A),F.disconnect(N),N.disconnect(A),F.disconnect(D),D.disconnect(A),F.disconnect(M),M.disconnect(A),F.disconnect(I),I.disconnect(A),F.disconnect(L),L.disconnect(A),A.disconnect(j),j.disconnect(u.destination)}))})(gb,Kb,Aw,h_,g_,sx,v_,_b,k_,Ow),lx=(e=>(t,n)=>{const r=t.createPanner();return void 0===r.orientationX?e(t,n):(n_(r,n),o_(r,n,"orientationX"),o_(r,n,"orientationY"),o_(r,n,"orientationZ"),o_(r,n,"positionX"),o_(r,n,"positionY"),o_(r,n,"positionZ"),t_(r,n,"coneInnerAngle"),t_(r,n,"coneOuterAngle"),t_(r,n,"coneOuterGain"),t_(r,n,"distanceModel"),t_(r,n,"maxDistance"),t_(r,n,"panningModel"),t_(r,n,"refDistance"),t_(r,n,"rolloffFactor"),r)})(cx),ux=((e,t,n,r,o,i,a,s,c,l)=>()=>{const u=new WeakMap;let d=null;return{render(f,h){const p=u.get(h);return void 0!==p?Promise.resolve(p):(async(f,h)=>{let p=null,m=i(f);const g={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},v={...g,coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor},y=Yy(m,h);if("bufferSize"in m)p=r(h,{...g,gain:1});else if(!y){const e={...v,orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value};m=o(h,e)}if(u.set(h,null===p?m:p),null!==p){if(null===d){if(null===a)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new a(6,f.context.length,h.sampleRate),r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(e.destination),d=(async()=>{const t=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map((async(t,r)=>{const o=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await s(e,t,o.offset),o})));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return l(e)})()}const e=await d,i=r(h,{...g,gain:1});await c(f,h,i);const u=[];for(let t=0;t<e.numberOfChannels;t+=1)u.push(e.getChannelData(t));let m=[u[0][0],u[1][0],u[2][0]],y=[u[3][0],u[4][0],u[5][0]],b=r(h,{...g,gain:1}),_=o(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]});i.connect(b).connect(_.inputs[0]),_.connect(p);for(let t=128;t<e.length;t+=128){const e=[u[0][t],u[1][t],u[2][t]],n=[u[3][t],u[4][t],u[5][t]];if(e.some(((e,t)=>e!==m[t]))||n.some(((e,t)=>e!==y[t]))){m=e,y=n;const a=t/h.sampleRate;b.gain.setValueAtTime(0,a),b=r(h,{...g,gain:0}),_=o(h,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),b.gain.setValueAtTime(1,a),i.connect(b).connect(_.inputs[0]),_.connect(p)}}return p}return y?(await e(h,f.orientationX,m.orientationX),await e(h,f.orientationY,m.orientationY),await e(h,f.orientationZ,m.orientationZ),await e(h,f.positionX,m.positionX),await e(h,f.positionY,m.positionY),await e(h,f.positionZ,m.positionZ)):(await s(h,f.orientationX,m.orientationX),await s(h,f.orientationY,m.orientationY),await s(h,f.orientationZ,m.orientationZ),await s(h,f.positionX,m.positionX),await s(h,f.positionY,m.positionY),await s(h,f.positionZ,m.positionZ)),mb(m)?await c(f,h,m.inputs[0]):await c(f,h,m),m})(f,h)}}})(gw,Aw,Iw,h_,lx,wb,X_,yw,W_,Xw),dx=((e,t,n,r,o,i,a)=>class extends e{constructor(e,s){const c=o(e),l={...__,...s},u=n(c,l),d=i(c);super(e,!1,u,d?r():null),this._nativePannerNode=u,this._orientationX=t(this,d,u.orientationX,nb,tb),this._orientationY=t(this,d,u.orientationY,nb,tb),this._orientationZ=t(this,d,u.orientationZ,nb,tb),this._positionX=t(this,d,u.positionX,nb,tb),this._positionY=t(this,d,u.positionY,nb,tb),this._positionZ=t(this,d,u.positionZ,nb,tb),a(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}})(ow,_w,lx,ux,G_,Y_,kw),fx=(e=>(t,n)=>{let{disableNormalization:r,imag:o,real:i}=n;const a=o instanceof Float32Array?o:new Float32Array(o),s=i instanceof Float32Array?i:new Float32Array(i),c=t.createPeriodicWave(s,a,{disableNormalization:r});if(Array.from(o).length<2)throw e();return c})(Zy),hx=((e,t,n,r)=>class o{constructor(o,i){const a=t(o),s=r({...w_,...i}),c=e(a,s);return n.add(c),c}static[Symbol.hasInstance](e){return null!==e&&"object"===typeof e&&Object.getPrototypeOf(e)===o.prototype||n.has(e)}})(fx,G_,new WeakSet,(e=>{const{imag:t,real:n}=e;return void 0===t?void 0===n?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...e,imag:t,real:Array.from(t,(()=>0))}:{...e,imag:t,real:n}})),px=((e,t,n,r,o,i)=>{const a=16385,s=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},d=(e,i,d,f,h)=>{if(1===i)return((e,t,o,i)=>{const d=new Float32Array(a),f=new Float32Array(a);for(let n=0;n<a;n+=1){const e=n/16384*c;d[n]=Math.cos(e),f[n]=Math.sin(e)}const h=n(e,{...l,gain:0}),p=r(e,{...u,curve:d}),m=r(e,{...u,curve:s}),g=n(e,{...l,gain:0}),v=r(e,{...u,curve:f});return{connectGraph(){t.connect(h),t.connect(void 0===m.inputs?m:m.inputs[0]),t.connect(g),m.connect(o),o.connect(void 0===p.inputs?p:p.inputs[0]),o.connect(void 0===v.inputs?v:v.inputs[0]),p.connect(h.gain),v.connect(g.gain),h.connect(i,0,0),g.connect(i,0,1)},disconnectGraph(){t.disconnect(h),t.disconnect(void 0===m.inputs?m:m.inputs[0]),t.disconnect(g),m.disconnect(o),o.disconnect(void 0===p.inputs?p:p.inputs[0]),o.disconnect(void 0===v.inputs?v:v.inputs[0]),p.disconnect(h.gain),v.disconnect(g.gain),h.disconnect(i,0,0),g.disconnect(i,0,1)}}})(e,d,f,h);if(2===i)return((e,o,i,d)=>{const f=new Float32Array(a),h=new Float32Array(a),p=new Float32Array(a),m=new Float32Array(a),g=Math.floor(8192.5);for(let t=0;t<a;t+=1)if(t>g){const e=(t-g)/(16384-g)*c;f[t]=Math.cos(e),h[t]=Math.sin(e),p[t]=0,m[t]=1}else{const e=t/(16384-g)*c;f[t]=1,h[t]=0,p[t]=Math.cos(e),m[t]=Math.sin(e)}const v=t(e,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(e,{...l,gain:0}),b=r(e,{...u,curve:f}),_=n(e,{...l,gain:0}),w=r(e,{...u,curve:h}),x=r(e,{...u,curve:s}),C=n(e,{...l,gain:0}),S=r(e,{...u,curve:p}),k=n(e,{...l,gain:0}),E=r(e,{...u,curve:m});return{connectGraph(){o.connect(v),o.connect(void 0===x.inputs?x:x.inputs[0]),v.connect(y,0),v.connect(_,0),v.connect(C,1),v.connect(k,1),x.connect(i),i.connect(void 0===b.inputs?b:b.inputs[0]),i.connect(void 0===w.inputs?w:w.inputs[0]),i.connect(void 0===S.inputs?S:S.inputs[0]),i.connect(void 0===E.inputs?E:E.inputs[0]),b.connect(y.gain),w.connect(_.gain),S.connect(C.gain),E.connect(k.gain),y.connect(d,0,0),C.connect(d,0,0),_.connect(d,0,1),k.connect(d,0,1)},disconnectGraph(){o.disconnect(v),o.disconnect(void 0===x.inputs?x:x.inputs[0]),v.disconnect(y,0),v.disconnect(_,0),v.disconnect(C,1),v.disconnect(k,1),x.disconnect(i),i.disconnect(void 0===b.inputs?b:b.inputs[0]),i.disconnect(void 0===w.inputs?w:w.inputs[0]),i.disconnect(void 0===S.inputs?S:S.inputs[0]),i.disconnect(void 0===E.inputs?E:E.inputs[0]),b.disconnect(y.gain),w.disconnect(_.gain),S.disconnect(C.gain),E.disconnect(k.gain),y.disconnect(d,0,0),C.disconnect(d,0,0),_.disconnect(d,0,1),k.disconnect(d,0,1)}}})(e,d,f,h);throw o()};return(t,r)=>{let{channelCount:a,channelCountMode:s,pan:c,...l}=r;if("max"===s)throw o();const u=e(t,{...l,channelCount:1,channelCountMode:s,numberOfInputs:2}),f=n(t,{...l,channelCount:a,channelCountMode:s,gain:1}),h=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:c});let{connectGraph:p,disconnectGraph:m}=d(t,a,f,h,u);Object.defineProperty(h.gain,"defaultValue",{get:()=>0}),Object.defineProperty(h.gain,"maxValue",{get:()=>1}),Object.defineProperty(h.gain,"minValue",{get:()=>-1});const g={get bufferSize(){},get channelCount(){return f.channelCount},set channelCount(e){f.channelCount!==e&&(v&&m(),({connectGraph:p,disconnectGraph:m}=d(t,e,f,h,u)),v&&p()),f.channelCount=e},get channelCountMode(){return f.channelCountMode},set channelCountMode(e){if("clamped-max"===e||"max"===e)throw o();f.channelCountMode=e},get channelInterpretation(){return f.channelInterpretation},set channelInterpretation(e){f.channelInterpretation=e},get context(){return f.context},get inputs(){return[f]},get numberOfInputs(){return f.numberOfInputs},get numberOfOutputs(){return f.numberOfOutputs},get pan(){return h.gain},addEventListener(){return f.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},dispatchEvent(){return f.dispatchEvent(arguments.length<=0?void 0:arguments[0])},removeEventListener(){return f.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])}};let v=!1;return i(d_(g,u),(()=>{p(),v=!0}),(()=>{m(),v=!1}))}})(Aw,u_,h_,sx,v_,Ow),mx=((e,t)=>(n,r)=>{const o=r.channelCountMode;if("clamped-max"===o)throw t();if(void 0===n.createStereoPanner)return e(n,r);const i=n.createStereoPanner();return n_(i,r),o_(i,r,"pan"),Object.defineProperty(i,"channelCountMode",{get:()=>o,set:e=>{if(e!==o)throw t()}}),i})(px,v_),gx=((e,t,n,r,o)=>()=>{const i=new WeakMap;return{render(a,s){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s)=>{let c=n(a);const l=Yy(c,s);if(!l){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,pan:c.pan.value};c=t(s,e)}return i.set(s,c),l?await e(s,a.pan,c.pan):await r(s,a.pan,c.pan),mb(c)?await o(a,s,c.inputs[0]):await o(a,s,c),c})(a,s)}}})(gw,mx,wb,yw,W_),vx=((e,t,n,r,o,i)=>class extends e{constructor(e,a){const s=o(e),c={...x_,...a},l=n(s,c),u=i(s);super(e,!1,l,u?r():null),this._pan=t(this,u,l.pan)}get pan(){return this._pan}})(ow,_w,mx,gx,G_,Y_),yx=((e,t,n)=>()=>{const r=new WeakMap;return{render(o,i){const a=r.get(i);return void 0!==a?Promise.resolve(a):(async(o,i)=>{let a=t(o);if(!Yy(a,i)){const t={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=e(i,t)}return r.set(i,a),mb(a)?await n(o,i,a.inputs[0]):await n(o,i,a),a})(o,i)}}})(sx,wb,W_),bx=((e,t,n,r,o,i,a)=>class extends e{constructor(e,t){const s=o(e),c={...S_,...t},l=n(s,c);super(e,!0,l,i(s)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=l,a(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(null===e)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}})(ow,Kb,sx,yx,G_,Y_,kw),_x=(e=>null!==e&&e.isSecureContext)(V_),wx=(e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get:()=>Math.round(t*n)},currentTime:{configurable:!0,get:()=>t}});try{return r()}finally{null!==e&&(delete e.currentFrame,delete e.currentTime)}})(V_),xx=new WeakMap,Cx=((e,t)=>n=>{let r=e.get(n);if(void 0!==r)return r;if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r})(xx,X_),Sx=_x?((e,t,n,r,o,i,a,s,c,l,u,d,f)=>{let h=0;return function(p,m){let g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{credentials:"omit"};const v=u.get(p);if(void 0!==v&&v.has(m))return Promise.resolve();const y=l.get(p);if(void 0!==y){const e=y.get(m);if(void 0!==e)return e}const b=i(p),_=void 0===b.audioWorklet?o(m).then((e=>{let[t,r]=e;const[o,i]=Fy(t,r),a="".concat(o,";((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{").concat(i,"\n})})(window,'_AWGS')");return n(a)})).then((()=>{const e=f._AWGS.pop();if(void 0===e)throw new SyntaxError;r(b.currentTime,b.sampleRate,(()=>e(class{},void 0,((e,n)=>{if(""===e.trim())throw t();const r=My.get(b);if(void 0!==r){if(r.has(e))throw t();zy(n),By(n.parameterDescriptors),r.set(e,n)}else zy(n),By(n.parameterDescriptors),My.set(b,new Map([[e,n]]))}),b.sampleRate,void 0,void 0)))})):Promise.all([o(m),Promise.resolve(e(d,d))]).then((e=>{let[[t,n],r]=e;const o=h+1;h=o;const[i,l]=Fy(t,n),u=r?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}",d=r?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));",f=r?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));",p="".concat(i,";((AudioWorkletProcessor,registerProcessor)=>{").concat(l,"\n})(").concat(u,",(n,p)=>registerProcessor(n,class extends p{").concat(d,"process(i,o,p){").concat(f,"return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac").concat(o,"',class extends AudioWorkletProcessor{process(){return !1}})"),m=new Blob([p],{type:"application/javascript; charset=utf-8"}),v=URL.createObjectURL(m);return b.audioWorklet.addModule(v,g).then((()=>{if(s(b))return b;const e=a(b);return e.audioWorklet.addModule(v,g).then((()=>e))})).then((e=>{if(null===c)throw new SyntaxError;try{new c(e,"__sac".concat(o))}catch{throw new SyntaxError}})).finally((()=>URL.revokeObjectURL(v)))}));return void 0===y?l.set(p,new Map([[m,_]])):y.set(m,_),_.then((()=>{const e=u.get(p);void 0===e?u.set(p,new Set([m])):e.add(m)})).finally((()=>{const e=l.get(p);void 0!==e&&e.delete(m)})),_}})(B_,v_,(e=>t=>new Promise(((n,r)=>{if(null===e)return void r(new SyntaxError);const o=e.document.head;if(null===o)r(new SyntaxError);else{const i=e.document.createElement("script"),a=new Blob([t],{type:"application/javascript"}),s=URL.createObjectURL(a),c=e.onerror,l=()=>{e.onerror=c,URL.revokeObjectURL(s)};e.onerror=(t,n,o,i,a)=>n===s||n===e.location.href&&1===o&&1===i?(l(),r(a),!1):null!==c?c(t,n,o,i,a):void 0,i.onerror=()=>{l(),r(new SyntaxError)},i.onload=()=>{l(),n()},i.src=s,i.type="module",o.appendChild(i)}})))(V_),wx,(e=>async t=>{try{const e=await fetch(t);if(e.ok)return[await e.text(),e.url]}catch{}throw e()})((()=>new DOMException("","AbortError"))),G_,Cx,Y_,rw,new WeakMap,new WeakMap,((e,t)=>async()=>{if(null===e)return!0;if(null===t)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),o=URL.createObjectURL(n);let i=!1,a=!1;try{await r.audioWorklet.addModule(o);const t=new e(r,"a",{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>i=!0,t.onprocessorerror=()=>a=!0,n.connect(t),n.start(0),await r.startRendering(),await new Promise((e=>setTimeout(e)))}catch{}finally{URL.revokeObjectURL(o)}return i&&!a})(rw,X_),V_):void 0,kx=((e,t)=>n=>e(n)||t(n))(ew,Y_),Ex=((e,t,n,r,o,i,a,s,c,l,u)=>(d,f)=>{const h=a(d)?d:i(d);if(o.has(f)){const e=n();return Promise.reject(e)}try{o.add(f)}catch{}return t(c,(()=>c(h)))?h.decodeAudioData(f).then((n=>(qb(f).catch((()=>{})),t(s,(()=>s(n)))||u(n),e.add(n),n))):new Promise(((t,n)=>{const o=async()=>{try{await qb(f)}catch{}},i=e=>{n(e),o()};try{h.decodeAudioData(f,(n=>{"function"!==typeof n.copyFromChannel&&(l(n),Jy(n)),e.add(n),o().then((()=>t(n)))}),(e=>{i(null===e?r():e)}))}catch(a){i(a)}}))})(sw,B_,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,G_,kx,Qy,Jb,dw,fw),Ox=((e,t,n,r,o,i,a,s,c,l,u,d,f,h,p,m,g,v,y,b)=>class extends p{constructor(t,n){super(t,n),this._nativeContext=t,this._audioWorklet=void 0===e?void 0:{addModule:(t,n)=>e(this,t,n)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new t(this)}createBiquadFilter(){return new o(this)}createBuffer(e,t,r){return new n({length:t,numberOfChannels:e,sampleRate:r})}createBufferSource(){return new r(this)}createChannelMerger(){return new i(this,{numberOfInputs:arguments.length>0&&void 0!==arguments[0]?arguments[0]:6})}createChannelSplitter(){return new a(this,{numberOfOutputs:arguments.length>0&&void 0!==arguments[0]?arguments[0]:6})}createConstantSource(){return new s(this)}createConvolver(){return new c(this)}createDelay(){return new u(this,{maxDelayTime:arguments.length>0&&void 0!==arguments[0]?arguments[0]:1})}createDynamicsCompressor(){return new d(this)}createGain(){return new f(this)}createIIRFilter(e,t){return new h(this,{feedback:t,feedforward:e})}createOscillator(){return new m(this)}createPanner(){return new g(this)}createPeriodicWave(e,t){return new v(this,{...arguments.length>2&&void 0!==arguments[2]?arguments[2]:{disableNormalization:!1},imag:t,real:e})}createStereoPanner(){return new y(this)}createWaveShaper(){return new b(this)}decodeAudioData(e,t,n){return l(this._nativeContext,e).then((e=>("function"===typeof t&&t(e),e)),(e=>{throw"function"===typeof n&&n(e),e}))}})(Sx,aw,hw,xw,Ew,Pw,Dw,jw,zw,Ex,Vw,Ww,Gw,Zw,tx,ox,dx,hx,vx,bx),Tx=((e,t,n,r)=>class extends e{constructor(e,o){const i=n(e),a=t(i,o);if(r(i))throw TypeError();super(e,!0,a,null),this._nativeMediaElementAudioSourceNode=a}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(ow,((e,t)=>e.createMediaElementSource(t.mediaElement)),G_,Y_),Ax=((e,t,n,r)=>class extends e{constructor(e,o){const i=n(e);if(r(i))throw new TypeError;const a={...Zb,...o},s=t(i,a);super(e,!1,s,null),this._nativeMediaStreamAudioDestinationNode=s}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(ow,((e,t)=>{const n=e.createMediaStreamDestination();return n_(n,t),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),G_,Y_),Rx=((e,t,n,r)=>class extends e{constructor(e,o){const i=n(e),a=t(i,o);if(r(i))throw new TypeError;super(e,!0,a,null),this._nativeMediaStreamAudioSourceNode=a}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(ow,((e,t)=>{let{mediaStream:n}=t;const r=n.getAudioTracks();r.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0));const o=r.slice(0,1),i=e.createMediaStreamSource(new MediaStream(o));return Object.defineProperty(i,"mediaStream",{value:n}),i}),G_,Y_),Px=((e,t)=>(n,r)=>{let{mediaStreamTrack:o}=r;if("function"===typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(o);const i=new MediaStream([o]),a=n.createMediaStreamSource(i);if("audio"!==o.kind)throw e();if(t(n))throw new TypeError;return a})(Kb,Y_),Nx=((e,t,n)=>class extends e{constructor(e,r){const o=n(e);super(e,!0,t(o,r),null)}})(ow,Px,G_),Dx=((e,t,n,r,o,i,a,s,c)=>class extends e{constructor(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null===c)throw new Error("Missing the native AudioContext constructor.");try{e=new c(t)}catch(a){if(12===a.code&&"sampleRate is not in range"===a.message)throw n();throw a}if(null===e)throw r();if(!lb(t.latencyHint))throw new TypeError("The provided value '".concat(t.latencyHint,"' is not a valid enum value of type AudioContextLatencyCategory."));if(void 0!==t.sampleRate&&e.sampleRate!==t.sampleRate)throw n();super(e,2);const{latencyHint:o}=t,{sampleRate:i}=e;if(this._baseLatency="number"===typeof e.baseLatency?e.baseLatency:"balanced"===o?512/i:"interactive"===o||void 0===o?256/i:"playback"===o?1024/i:128*Math.max(2,Math.min(128,Math.round(o*i/128)))/i,this._nativeAudioContext=e,"webkitAudioContext"===c.name?(this._nativeGainNode=e.createGain(),this._nativeOscillatorNode=e.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(e.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===e.state){this._state="suspended";const t=()=>{"suspended"===this._state&&(this._state=null),e.removeEventListener("statechange",t)};e.addEventListener("statechange",t)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw t()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),cb(this)})))}createMediaElementSource(e){return new o(this,{mediaElement:e})}createMediaStreamDestination(){return new i(this)}createMediaStreamSource(e){return new a(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new s(this,{mediaStreamTrack:e})}resume(){return"suspended"===this._state?new Promise(((e,t)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener("statechange",n)})):this._nativeAudioContext.resume().catch((e=>{if(void 0===e||15===e.code)throw t();throw e}))}suspend(){return this._nativeAudioContext.suspend().catch((e=>{if(void 0===e)throw t();throw e}))}})(Ox,Kb,v_,C_,Tx,Ax,Rx,Nx,J_),Mx=(e=>t=>{const n=e.get(t);if(void 0===n)throw new Error("The context has no set of AudioWorkletNodes.");return n})(ex),Ix=(e=>(t,n)=>{e(t).add(n)})(Mx),Lx=(e=>function(t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=t[arguments.length>2&&void 0!==arguments[2]?arguments[2]:0];if(void 0===o)throw e();return Ob(n)?o.connect(n,0,r):o.connect(n,0)})(Zy),jx=(e=>(t,n)=>{e(t).delete(n)})(Mx),Fx=(e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return void 0===n?t.forEach((e=>e.disconnect())):"number"===typeof n?Wb(e,t,n).disconnect():Ob(n)?void 0===r?t.forEach((e=>e.disconnect(n))):void 0===o?Wb(e,t,r).disconnect(n,0):Wb(e,t,r).disconnect(n,0,o):void 0===r?t.forEach((e=>e.disconnect(n))):Wb(e,t,r).disconnect(n,0)})(Zy),Bx=new WeakMap,zx=((e,t)=>n=>t(e,n))(Bx,Hy),Hx=((e,t,n,r,o,i,a,s,c,l,u,d,f)=>(h,p,m,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw c();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some((e=>e<1)))throw c();if(v.length!==g.numberOfOutputs)throw t();if("explicit"!==g.channelCountMode)throw c();const y=g.channelCount*g.numberOfInputs,b=v.reduce(((e,t)=>e+t),0),_=void 0===m.parameterDescriptors?0:m.parameterDescriptors.length;if(y+_>6||b>6)throw c();const w=new MessageChannel,x=[],C=[];for(let e=0;e<g.numberOfInputs;e+=1)x.push(a(h,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),C.push(o(h,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const S=[];if(void 0!==m.parameterDescriptors)for(const{defaultValue:e,maxValue:t,minValue:n,name:r}of m.parameterDescriptors){const o=i(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===e?0:e});Object.defineProperties(o.offset,{defaultValue:{get:()=>void 0===e?0:e},maxValue:{get:()=>void 0===t?nb:t},minValue:{get:()=>void 0===n?tb:n}}),S.push(o)}const k=r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,y+_)}),E=s_(p,h.sampleRate),O=s(h,E,y+_,Math.max(1,b)),T=o(h,{channelCount:Math.max(1,b),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,b)}),A=[];for(let e=0;e<g.numberOfOutputs;e+=1)A.push(r(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[e]}));for(let e=0;e<g.numberOfInputs;e+=1){x[e].connect(C[e]);for(let t=0;t<g.channelCount;t+=1)C[e].connect(k,t,e*g.channelCount+t)}const R=new Nb(void 0===m.parameterDescriptors?[]:m.parameterDescriptors.map(((e,t)=>{let{name:n}=e;const r=S[t];return r.connect(k,0,y+t),r.start(0),[n,r.offset]})));k.connect(O);let P=g.channelInterpretation,N=null;const D=0===g.numberOfOutputs?[O]:A,M={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return P},set channelInterpretation(e){for(const t of x)t.channelInterpretation=e;P=e},get context(){return O.context},get inputs(){return x},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return N},set onprocessorerror(e){"function"===typeof N&&M.removeEventListener("processorerror",N),N="function"===typeof e?e:null,"function"===typeof N&&M.addEventListener("processorerror",N)},get parameters(){return R},get port(){return w.port2},addEventListener(){return O.addEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])},connect:e.bind(null,D),disconnect:l.bind(null,D),dispatchEvent(){return O.dispatchEvent(arguments.length<=0?void 0:arguments[0])},removeEventListener(){return O.removeEventListener(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2])}},I=new Map;var L;w.port1.addEventListener=(e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if("message"===n[0]){const e="function"===typeof n[1]?n[1]:"object"===typeof n[1]&&null!==n[1]&&"function"===typeof n[1].handleEvent?n[1].handleEvent:null;if(null!==e){const t=I.get(n[1]);void 0!==t?n[1]=t:(n[1]=t=>{u(h.currentTime,h.sampleRate,(()=>e(t)))},I.set(e,n[1]))}}return e.call(w.port1,n[0],n[1],n[2])})(w.port1.addEventListener),w.port1.removeEventListener=(L=w.port1.removeEventListener,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if("message"===t[0]){const e=I.get(t[1]);void 0!==e&&(I.delete(t[1]),t[1]=e)}return L.call(w.port1,t[0],t[1],t[2])});let j=null;Object.defineProperty(w.port1,"onmessage",{get:()=>j,set:e=>{"function"===typeof j&&w.port1.removeEventListener("message",j),j="function"===typeof e?e:null,"function"===typeof j&&(w.port1.addEventListener("message",j),w.port1.start())}}),m.prototype.port=w.port1;let F=null;const B=((e,t,n,r)=>{let o=Iy.get(e);void 0===o&&(o=new WeakMap,Iy.set(e,o));const i=c_(n,r);return o.set(t,i),i})(h,M,m,g);B.then((e=>F=e));const z=Lb(g.numberOfInputs,g.channelCount),H=Lb(g.numberOfOutputs,v),V=void 0===m.parameterDescriptors?[]:m.parameterDescriptors.reduce(((e,t)=>{let{name:n}=t;return{...e,[n]:new Float32Array(128)}}),{});let q=!0;const U=()=>{g.numberOfOutputs>0&&O.disconnect(T);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=A[e];for(let r=0;r<v[e];r+=1)T.disconnect(n,t+r,r);t+=v[e]}},W=new Map;O.onaudioprocess=e=>{let{inputBuffer:t,outputBuffer:n}=e;if(null!==F){const e=d(M);for(let o=0;o<E;o+=128){for(let e=0;e<g.numberOfInputs;e+=1)for(let n=0;n<g.channelCount;n+=1)Mb(t,z[e],n,n,o);void 0!==m.parameterDescriptors&&m.parameterDescriptors.forEach(((e,n)=>{let{name:r}=e;Mb(t,V,r,y+n,o)}));for(let e=0;e<g.numberOfInputs;e+=1)for(let t=0;t<v[e];t+=1)0===H[e][t].byteLength&&(H[e][t]=new Float32Array(128));try{const t=z.map(((t,n)=>{if(e[n].size>0)return W.set(n,E/128),t;const r=W.get(n);return void 0===r?[]:(t.every((e=>e.every((e=>0===e))))&&(1===r?W.delete(n):W.set(n,r-1)),t)})),r=u(h.currentTime+o/h.sampleRate,h.sampleRate,(()=>F.process(t,H,V)));q=r;for(let e=0,i=0;e<g.numberOfOutputs;e+=1){for(let t=0;t<v[e];t+=1)Ib(n,H[e],t,i+t,o);i+=v[e]}}catch(r){q=!1,M.dispatchEvent(new ErrorEvent("processorerror",{colno:r.colno,filename:r.filename,lineno:r.lineno,message:r.message}))}if(!q){for(let e=0;e<g.numberOfInputs;e+=1){x[e].disconnect(C[e]);for(let t=0;t<g.channelCount;t+=1)C[o].disconnect(k,t,e*g.channelCount+t)}if(void 0!==m.parameterDescriptors){const e=m.parameterDescriptors.length;for(let t=0;t<e;t+=1){const e=S[t];e.disconnect(k,0,y+t),e.stop()}}k.disconnect(O),O.onaudioprocess=null,$?U():X();break}}}};let $=!1;const G=a(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),K=()=>O.connect(G).connect(h.destination),X=()=>{O.disconnect(G),G.disconnect()};return K(),f(M,(()=>{if(q){X(),g.numberOfOutputs>0&&O.connect(T);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=A[e];for(let r=0;r<v[e];r+=1)T.connect(n,t+r,r);t+=v[e]}}$=!0}),(()=>{q&&(K(),U()),$=!1}))})(Lx,Zy,Kb,Aw,u_,Iw,h_,g_,v_,Fx,wx,zx,Ow),Vx=((e,t,n,r,o)=>(i,a,s,c,l,u)=>{if(null!==s)try{const t=new s(i,c,u),r=new Map;let a=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>a,set:e=>{"function"===typeof a&&t.removeEventListener("processorerror",a),a="function"===typeof e?e:null,"function"===typeof a&&t.addEventListener("processorerror",a)}}}),t.addEventListener=(e=>function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if("processorerror"===o[0]){const e="function"===typeof o[1]?o[1]:"object"===typeof o[1]&&null!==o[1]&&"function"===typeof o[1].handleEvent?o[1].handleEvent:null;if(null!==e){const t=r.get(o[1]);void 0!==t?o[1]=t:(o[1]=t=>{"error"===t.type?(Object.defineProperties(t,{type:{value:"processorerror"}}),e(t)):e(new ErrorEvent(o[0],{...t}))},r.set(e,o[1]))}}return e.call(t,"error",o[1],o[2]),e.call(t,...o)})(t.addEventListener),t.removeEventListener=(d=t.removeEventListener,function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if("processorerror"===n[0]){const e=r.get(n[1]);void 0!==e&&(r.delete(n[1]),n[1]=e)}return d.call(t,"error",n[1],n[2]),d.call(t,n[0],n[1],n[2])}),0!==u.numberOfOutputs){const e=n(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(e).connect(i.destination);return o(t,(()=>e.disconnect()),(()=>e.connect(i.destination)))}return t}catch(f){if(11===f.code)throw r();throw f}var d;if(void 0===l)throw r();return(e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}})(u),t(i,a,l,u)})(Kb,Hx,h_,v_,Ow),qx=((e,t,n,r,o,i,a,s,c,l,u,d,f,h,p,m)=>(g,v,y)=>{const b=new WeakMap;let _=null;return{render(w,x){s(x,w);const C=b.get(x);return void 0!==C?Promise.resolve(C):(async(s,w)=>{let x=u(s),C=null;const S=Yy(x,w),k=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(null===d){const e=k.reduce(((e,t)=>e+t),0),n=o(w,{channelCount:Math.max(1,e),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,e)}),i=[];for(let t=0;t<s.numberOfOutputs;t+=1)i.push(r(w,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:k[t]}));const l=a(w,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1});l.connect=t.bind(null,i),l.disconnect=c.bind(null,i),C=[n,i,l]}else S||(x=new d(w,g));if(b.set(w,null===C?x:C[2]),null!==C){if(null===_){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===f)throw new Error("Missing the native OfflineAudioContext constructor.");const e=s.channelCount*s.numberOfInputs,t=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=e+t,c=async()=>{const c=new f(n,128*Math.ceil(s.context.length/128),w.sampleRate),l=[],u=[];for(let e=0;e<v.numberOfInputs;e+=1)l.push(a(c,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1})),u.push(o(c,{channelCount:v.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:v.channelCount}));const d=await Promise.all(Array.from(s.parameters.values()).map((async e=>{const t=i(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e.value});return await h(c,e,t.offset),t}))),g=r(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,e+t)});for(let e=0;e<v.numberOfInputs;e+=1){l[e].connect(u[e]);for(let t=0;t<v.channelCount;t+=1)u[e].connect(g,t,e*v.channelCount+t)}for(const[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(c.destination),await Promise.all(l.map((e=>p(s,c,e)))),m(c)};_=jb(s,0===n?null:await c(),w,v,k,y,l)}const e=await _,t=n(w,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[c,u,d]=C;null!==e&&(t.buffer=e,t.start(0)),t.connect(c);for(let n=0,r=0;n<s.numberOfOutputs;n+=1){const e=u[n];for(let t=0;t<k[n];t+=1)c.connect(e,r+t,t);r+=k[n]}return d}if(S)for(const[t,n]of s.parameters.entries())await e(w,n,x.parameters.get(t));else for(const[e,t]of s.parameters.entries())await h(w,t,x.parameters.get(e));return await p(s,w,x),x})(w,x)}}})(gw,Lx,vw,Aw,u_,Iw,h_,jx,Fx,wx,wb,rw,X_,yw,W_,Xw),Ux=(e=>t=>e.get(t))(xx),Wx=(e=>(t,n)=>{e.set(t,n)})(Bx),$x=_x?((e,t,n,r,o,i,a,s,c,l,u,d,f,h)=>class extends t{constructor(t,h,p){var m;const g=s(t),v=c(g),y=u({...Db,...p});f(y);const b=My.get(g),_=null===b||void 0===b?void 0:b.get(h),w=v||"closed"!==g.state?g:null!==(m=a(g))&&void 0!==m?m:g,x=o(w,v?null:t.baseLatency,l,h,_,y);super(t,!0,x,v?r(h,y,_):null);const C=[];x.parameters.forEach(((e,t)=>{const r=n(this,v,e);C.push([t,r])})),this._nativeAudioWorkletNode=x,this._onprocessorerror=null,this._parameters=new Nb(C),v&&e(g,this);const{activeInputs:S}=i(this);d(x,S)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(e){const t="function"===typeof e?h(this,e):null;this._nativeAudioWorkletNode.onprocessorerror=t;const n=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=null!==n&&n===t?e:n}get parameters(){return null===this._parameters?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}})(Ix,ow,_w,qx,Vx,ib,Ux,G_,Y_,rw,(e=>({...e,outputChannelCount:void 0!==e.outputChannelCount?e.outputChannelCount:1===e.numberOfInputs&&1===e.numberOfOutputs?[e.channelCount]:Array.from({length:e.numberOfOutputs},(()=>1))})),Wx,(e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}}),D_):void 0,Gx=(((e,t,n,r,o)=>{})(Kb,v_,C_,tx,J_),((e,t)=>(n,r,o)=>{if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new t(n,r,o)}catch(i){if("SyntaxError"===i.name)throw e();throw i}})(v_,X_)),Kx=((e,t,n,r,o,i,a,s)=>(c,l)=>n(c).render(c,l).then((()=>Promise.all(Array.from(r(l)).map((e=>n(e).render(e,l)))))).then((()=>o(l))).then((n=>("function"!==typeof n.copyFromChannel?(a(n),Jy(n)):t(i,(()=>i(n)))||s(n),e.add(n),n))))(sw,B_,U_,Mx,Xw,Qy,dw,fw),Xx=(((e,t,n,r,o)=>{})(B_,Kb,Gx,tx,Kx),((e,t,n,r,o)=>class extends e{constructor(e,n,o){let i;if("number"===typeof e&&void 0!==n&&void 0!==o)i={length:n,numberOfChannels:e,sampleRate:o};else{if("object"!==typeof e)throw new Error("The given parameters are not valid.");i=e}const{length:a,numberOfChannels:s,sampleRate:c}={...y_,...i},l=r(s,a,c);t(Jb,(()=>Jb(l)))||l.addEventListener("statechange",(()=>{let e=0;const t=n=>{"running"===this._state&&(e>0?(l.removeEventListener("statechange",t),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):e+=1)};return t})()),super(l,s),this._length=a,this._nativeOfflineAudioContext=l,this._state=null}get length(){return void 0===this._nativeOfflineAudioContext.length?this._length:this._nativeOfflineAudioContext.length}get state(){return null===this._state?this._nativeOfflineAudioContext.state:this._state}startRendering(){return"running"===this._state?Promise.reject(n()):(this._state="running",o(this.destination,this._nativeOfflineAudioContext).finally((()=>{this._state=null,cb(this)})))}_waitForThePromiseToSettle(e){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(e):setTimeout((()=>this._waitForThePromiseToSettle(e)))}})(Ox,B_,Kb,Gx,Kx)),Yx=((e,t)=>n=>{const r=e.get(n);return t(r)||t(n)})(Py,ew),Qx=((e,t)=>n=>e.has(n)||t(n))(Ty,tw),Zx=((e,t)=>n=>e.has(n)||t(n))(Ry,nw),Jx=((e,t)=>n=>{const r=e.get(n);return t(r)||t(n)})(Py,Y_);function eC(e,t){if(!e)throw new Error(t)}function tC(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;if(!(t<=e&&e<=n))throw new RangeError("Value must be within [".concat(t,", ").concat(n,"], got: ").concat(e))}function nC(e){e.isOffline||"running"===e.state||oC('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let rC=console;function oC(){rC.warn(...arguments)}function iC(e){return"undefined"===typeof e}function aC(e){return!iC(e)}function sC(e){return"number"===typeof e}function cC(e){return"[object Object]"===Object.prototype.toString.call(e)&&e.constructor===Object}function lC(e){return"boolean"===typeof e}function uC(e){return Array.isArray(e)}function dC(e){return"string"===typeof e}function fC(e){return dC(e)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(e)}const hC="object"===typeof self?self:null,pC=hC&&(hC.hasOwnProperty("AudioContext")||hC.hasOwnProperty("webkitAudioContext"));class mC{constructor(e,t,n){this._callback=e,this._type=t,this._updateInterval=n,this._createClock()}_createWorker(){const e=new Blob(["\n\t\t\t// the initial timeout time\n\t\t\tlet timeoutTime = ".concat((1e3*this._updateInterval).toFixed(1),";\n\t\t\t// onmessage callback\n\t\t\tself.onmessage = function(msg){\n\t\t\t\ttimeoutTime = parseInt(msg.data);\n\t\t\t};\n\t\t\t// the tick function which posts a message\n\t\t\t// and schedules a new tick\n\t\t\tfunction tick(){\n\t\t\t\tsetTimeout(tick, timeoutTime);\n\t\t\t\tself.postMessage('tick');\n\t\t\t}\n\t\t\t// call tick initially\n\t\t\ttick();\n\t\t\t")],{type:"text/javascript"}),t=URL.createObjectURL(e),n=new Worker(t);n.onmessage=this._callback.bind(this),this._worker=n}_createTimeout(){this._timeout=setTimeout((()=>{this._createTimeout(),this._callback()}),1e3*this._updateInterval)}_createClock(){if("worker"===this._type)try{this._createWorker()}catch(Sk){this._type="timeout",this._createClock()}else"timeout"===this._type&&this._createTimeout()}_disposeClock(){this._timeout&&(clearTimeout(this._timeout),this._timeout=0),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){this._updateInterval=Math.max(e,128/44100),"worker"===this._type&&this._worker.postMessage(Math.max(1e3*e,1))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function gC(e){return Zx(e)}function vC(e){return Qx(e)}function yC(e){return Jx(e)}function bC(e){return Yx(e)}function _C(e){return e instanceof AudioBuffer}function wC(e,t){return"value"===e||gC(t)||vC(t)||_C(t)}function xC(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;const o=n.shift();if(cC(e)&&cC(o))for(const i in o)wC(i,o[i])?e[i]=o[i]:cC(o[i])?(e[i]||Object.assign(e,{[i]:{}}),xC(e[i],o[i])):Object.assign(e,{[i]:o[i]});return xC(e,...n)}function CC(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0;const o={},i=Array.from(t);if(cC(i[0])&&r&&!Reflect.has(i[0],r)){Object.keys(i[0]).some((t=>Reflect.has(e,t)))||(xC(o,{[r]:i[0]}),n.splice(n.indexOf(r),1),i.shift())}if(1===i.length&&cC(i[0]))xC(o,i[0]);else for(let a=0;a<n.length;a++)aC(i[a])&&(o[n[a]]=i[a]);return xC(e,o)}function SC(e,t){return iC(e)?t:e}function kC(e,t){return t.forEach((t=>{Reflect.has(e,t)&&delete e[t]})),e}class EC{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(){if(this.debug||hC&&this.toString()===hC.TONE_DEBUG_CLASS){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];!function(){rC.log(...arguments)}(this,...t)}}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}EC.version=Sy;const OC=1e-6;function TC(e,t){return e>t+OC}function AC(e,t){return TC(e,t)||PC(e,t)}function RC(e,t){return e+OC<t}function PC(e,t){return Math.abs(e-t)<OC}function NC(e,t,n){return Math.max(Math.min(e,n),t)}class DC extends EC{constructor(){super(),this.name="Timeline",this._timeline=[];const e=CC(DC.getDefaults(),arguments,["memory"]);this.memory=e.memory,this.increasing=e.increasing}static getDefaults(){return{memory:1/0,increasing:!1}}get length(){return this._timeline.length}add(e){if(eC(Reflect.has(e,"time"),"Timeline: events must have a time attribute"),e.time=e.time.valueOf(),this.increasing&&this.length){const t=this._timeline[this.length-1];eC(AC(e.time,t.time),"The time must be greater than or equal to the last scheduled time"),this._timeline.push(e)}else{const t=this._search(e.time);this._timeline.splice(t+1,0,e)}if(this.length>this.memory){const e=this.length-this.memory;this._timeline.splice(0,e)}return this}remove(e){const t=this._timeline.indexOf(e);return-1!==t&&this._timeline.splice(t,1),this}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"time";const n=this._search(e,t);return-1!==n?this._timeline[n]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"time";const n=this._search(e,t);return n+1<this._timeline.length?this._timeline[n+1]:null}getBefore(e){const t=this._timeline.length;if(t>0&&this._timeline[t-1].time<e)return this._timeline[t-1];const n=this._search(e);return n-1>=0?this._timeline[n-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(PC(this._timeline[t].time,e)){for(let n=t;n>=0&&PC(this._timeline[n].time,e);n--)t=n;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else 1===this._timeline.length&&AC(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"time";if(0===this._timeline.length)return-1;let n=0;const r=this._timeline.length;let o=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;n<o;){let r=Math.floor(n+(o-n)/2);const i=this._timeline[r],a=this._timeline[r+1];if(PC(i[t],e)){for(let n=r;n<this._timeline.length;n++){if(!PC(this._timeline[n][t],e))break;r=n}return r}if(RC(i[t],e)&&TC(a[t],e))return r;TC(i[t],e)?o=r:n=r+1}return-1}_iterate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._timeline.length-1;this._timeline.slice(t,n+1).forEach(e)}forEach(e){return this._iterate(e),this}forEachBefore(e,t){const n=this._search(e);return-1!==n&&this._iterate(t,0,n),this}forEachAfter(e,t){const n=this._search(e);return this._iterate(t,n+1),this}forEachBetween(e,t,n){let r=this._search(e),o=this._search(t);return-1!==r&&-1!==o?(this._timeline[r].time!==e&&(r+=1),this._timeline[o].time===t&&(o-=1),this._iterate(n,r,o)):-1===r&&this._iterate(n,0,o),this}forEachFrom(e,t){let n=this._search(e);for(;n>=0&&this._timeline[n].time>=e;)n--;return this._iterate(t,n+1),this}forEachAtTime(e,t){const n=this._search(e);if(-1!==n&&PC(this._timeline[n].time,e)){let r=n;for(let t=n;t>=0&&PC(this._timeline[t].time,e);t--)r=t;this._iterate((e=>{t(e)}),r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const MC=[];function IC(e){MC.push(e)}const LC=[];function jC(e){LC.push(e)}class FC extends EC{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach((e=>{iC(this._events)&&(this._events={}),this._events.hasOwnProperty(e)||(this._events[e]=[]),this._events[e].push(t)})),this}once(e,t){var n=this;const r=function(){t(...arguments),n.off(e,r)};return this.on(e,r),this}off(e,t){return e.split(/\W+/).forEach((n=>{if(iC(this._events)&&(this._events={}),this._events.hasOwnProperty(e))if(iC(t))this._events[e]=[];else{const n=this._events[e];for(let e=n.length-1;e>=0;e--)n[e]===t&&n.splice(e,1)}})),this}emit(e){if(this._events&&this._events.hasOwnProperty(e)){const o=this._events[e].slice(0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(let e=0,t=o.length;e<t;e++)o[e].apply(this,n)}return this}static mixin(e){["on","once","off","emit"].forEach((t=>{const n=Object.getOwnPropertyDescriptor(FC.prototype,t);Object.defineProperty(e.prototype,t,n)}))}dispose(){return super.dispose(),this._events=void 0,this}}class BC extends FC{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class zC extends BC{constructor(){super(),this.name="Context",this._constants=new Map,this._timeouts=new DC,this._timeoutIds=0,this._initialized=!1,this.isOffline=!1,this._workletModules=new Map;const e=CC(zC.getDefaults(),arguments,["context"]);e.context?this._context=e.context:this._context=function(e){return new Dx(e)}({latencyHint:e.latencyHint}),this._ticker=new mC(this.emit.bind(this,"tick"),e.clockSource,e.updateInterval),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this._setLatencyHint(e.latencyHint),this.lookAhead=e.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){var e;return this._initialized||(e=this,MC.forEach((t=>t(e))),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,n){return this._context.createBuffer(e,t,n)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,n){return this._context.createPeriodicWave(e,t,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){eC(bC(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamSource(e)}createMediaElementSource(e){eC(bC(this._context),"Not available if OfflineAudioContext");return this._context.createMediaElementSource(e)}createMediaStreamDestination(){eC(bC(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){eC(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){eC(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){eC(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){eC(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return function(e,t,n){return eC(aC($x),"This node only works in a secure context (https or localhost)"),new $x(e,t,n)}(this.rawContext,e,t)}addAudioWorkletModule(e,t){return(0,i.kH)(this,void 0,void 0,(function*(){eC(aC(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletModules.has(t)||this._workletModules.set(t,this.rawContext.audioWorklet.addModule(e)),yield this._workletModules.get(t)}))}workletsAreReady(){return(0,i.kH)(this,void 0,void 0,(function*(){const e=[];this._workletModules.forEach((t=>e.push(t))),yield Promise.all(e)}))}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get latencyHint(){return this._latencyHint}_setLatencyHint(e){let t=0;if(this._latencyHint=e,dC(e))switch(e){case"interactive":t=.1;break;case"playback":t=.5;break;case"balanced":t=.25}this.lookAhead=t,this.updateInterval=t/2}get rawContext(){return this._context}now(){return this._context.currentTime+this.lookAhead}immediate(){return this._context.currentTime}resume(){return bC(this._context)?this._context.resume():Promise.resolve()}close(){return(0,i.kH)(this,void 0,void 0,(function*(){var e;bC(this._context)&&(yield this._context.close()),this._initialized&&(e=this,LC.forEach((t=>t(e))))}))}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),n=t.getChannelData(0);for(let o=0;o<n.length;o++)n[o]=e;const r=this._context.createBufferSource();return r.channelCount=1,r.channelCountMode="explicit",r.buffer=t,r.loop=!0,r.start(0),this._constants.set(e,r),r}}dispose(){return super.dispose(),this._ticker.dispose(),this._timeouts.dispose(),Object.keys(this._constants).map((e=>this._constants[e].disconnect())),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const n=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:n+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach((t=>{t.id===e&&this._timeouts.remove(t)})),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const n=++this._timeoutIds,r=()=>{const o=this.now();this._timeouts.add({callback:()=>{e(),r()},id:n,time:o+t})};return r(),n}}function HC(e,t){uC(t)?t.forEach((t=>HC(e,t))):Object.defineProperty(e,t,{enumerable:!0,writable:!1})}function VC(e,t){uC(t)?t.forEach((t=>VC(e,t))):Object.defineProperty(e,t,{writable:!0})}const qC=()=>{};class UC extends EC{constructor(){super(),this.name="ToneAudioBuffer",this.onload=qC;const e=CC(UC.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,e.url&&_C(e.url)||e.url instanceof UC?this.set(e.url):dC(e.url)&&this.load(e.url).catch(e.onerror)}static getDefaults(){return{onerror:qC,onload:qC,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:KC().sampleRate}set(e){return e instanceof UC?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return(0,i.kH)(this,void 0,void 0,(function*(){const t=UC.load(e).then((e=>{this.set(e),this.onload(this)}));UC.downloads.push(t);try{yield t}finally{const e=UC.downloads.indexOf(t);UC.downloads.splice(e,1)}return this}))}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=uC(e)&&e[0].length>0,n=t?e.length:1,r=t?e[0].length:e.length,o=KC(),i=o.createBuffer(n,r,o.sampleRate),a=t||1!==n?e:[e];for(let s=0;s<n;s++)i.copyToChannel(a[s],s);return this._buffer=i,this}toMono(e){if(sC(e))this.fromArray(this.toArray(e));else{let e=new Float32Array(this.length);const t=this.numberOfChannels;for(let n=0;n<t;n++){const t=this.toArray(n);for(let n=0;n<t.length;n++)e[n]+=t[n]}e=e.map((e=>e/t)),this.fromArray(e)}return this}toArray(e){if(sC(e))return this.getChannelData(e);if(1===this.numberOfChannels)return this.toArray(0);{const e=[];for(let t=0;t<this.numberOfChannels;t++)e[t]=this.getChannelData(t);return e}}getChannelData(e){return this._buffer?this._buffer.getChannelData(e):new Float32Array(0)}slice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.duration;const n=Math.floor(e*this.sampleRate),r=Math.floor(t*this.sampleRate);eC(n<r,"The start time must be less than the end time");const o=r-n,i=KC().createBuffer(this.numberOfChannels,o,this.sampleRate);for(let a=0;a<this.numberOfChannels;a++)i.copyToChannel(this.getChannelData(a).subarray(n,r),a);return new UC(i)}_reverse(){if(this.loaded)for(let e=0;e<this.numberOfChannels;e++)this.getChannelData(e).reverse();return this}get loaded(){return this.length>0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return(new UC).fromArray(e)}static fromUrl(e){return(0,i.kH)(this,void 0,void 0,(function*(){const t=new UC;return yield t.load(e)}))}static load(e){return(0,i.kH)(this,void 0,void 0,(function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const n=t[1].split("|");let r=n[0];for(const e of n)if(UC.supportsType(e)){r=e;break}e=e.replace(t[0],r)}const n=""===UC.baseUrl||UC.baseUrl.endsWith("/")?UC.baseUrl:UC.baseUrl+"/",r=yield fetch(n+e);if(!r.ok)throw new Error("could not load url: ".concat(e));const o=yield r.arrayBuffer();return yield KC().decodeAudioData(o)}))}static supportsType(e){const t=e.split("."),n=t[t.length-1];return""!==document.createElement("audio").canPlayType("audio/"+n)}static loaded(){return(0,i.kH)(this,void 0,void 0,(function*(){for(yield Promise.resolve();UC.downloads.length;)yield UC.downloads[0]}))}}UC.baseUrl="",UC.downloads=[];class WC extends zC{constructor(){var e,t,n;super({clockSource:"offline",context:yC(arguments[0])?arguments[0]:(e=arguments[0],t=arguments[1]*arguments[2],n=arguments[2],new Xx(e,t,n)),lookAhead:0,updateInterval:yC(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=yC(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return(0,i.kH)(this,void 0,void 0,(function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const n=Math.floor(this.sampleRate/128);e&&t%n===0&&(yield new Promise((e=>setTimeout(e,1))))}}))}render(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(0,i.kH)(this,void 0,void 0,(function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new UC(t)}))}close(){return Promise.resolve()}}const $C=new class extends BC{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,n){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e,t){return(0,i.kH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}};let GC=$C;function KC(){return GC===$C&&pC&&function(e){GC=bC(e)?new zC(e):yC(e)?new WC(e):e}(new zC),GC}if(hC&&!hC.TONE_SILENCE_LOGGING){let e="v";0;const t=" * Tone.js ".concat(e).concat(Sy," * ");console.log("%c".concat(t),"background: #000; color: #fff")}function XC(e){return Math.pow(10,e/20)}function YC(e){return Math.log(e)/Math.LN10*20}function QC(e){return Math.pow(2,e/12)}let ZC=440;function JC(e){return Math.round(eS(e))}function eS(e){return 69+12*Math.log2(e/ZC)}function tS(e){return ZC*Math.pow(2,(e-69)/12)}class nS extends EC{constructor(e,t,n){super(),this.defaultUnits="s",this._val=t,this._units=n,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const n=parseInt(e,10),r="."===t?1.5:1;return 1===n?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(3*Math.floor(t)))},regexp:/^(\d+)t$/i},tr:{method:(e,t,n)=>{let r=0;return e&&"0"!==e&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&"0"!==t&&(r+=this._beatsToUnits(parseFloat(t))),n&&"0"!==n&&(r+=this._beatsToUnits(parseFloat(n)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof nS&&this.fromType(this._val),iC(this._val))return this._noArg();if(dC(this._val)&&iC(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(cC(this._val)){let e=0;for(const t in this._val)if(aC(this._val[t])){const n=this._val[t];e+=new this.constructor(this.context,t).valueOf()*n}return e}if(aC(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}return dC(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi()}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return 1e3*this.toSeconds()}}class rS extends nS{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new rS(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new this.constructor(this.context,e).valueOf(),r=this.valueOf();return r+(Math.round(r/n)*n-r)*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let o=1;o<9;o++){const e=Math.pow(2,o);t.push(e+"n."),t.push(e+"n"),t.push(e+"t")}t.push("0");let n=t[0],r=new rS(this.context,t[0]).toSeconds();return t.forEach((t=>{const o=new rS(this.context,t).toSeconds();Math.abs(o-e)<Math.abs(r-e)&&(n=t,r=o)})),n}toBarsBeatsSixteenths(){const e=this._beatsToUnits(1);let t=this.valueOf()/e;t=parseFloat(t.toFixed(4));const n=Math.floor(t/this._getTimeSignature());let r=t%1*4;t=Math.floor(t)%this._getTimeSignature();const o=r.toString();o.length>3&&(r=parseFloat(parseFloat(o).toFixed(3)));return[n,t,r].join(":")}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.round(t*this._getPPQ())}toSeconds(){return this.valueOf()}toMidi(){return JC(this.toFrequency())}_now(){return this.context.now()}}class oS extends rS{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return ZC}static set A4(e){!function(e){ZC=e}(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return"midi"===this.defaultUnits?e:oS.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method(e,t){const n=iS[e.toLowerCase()]+12*(parseInt(t,10)+1);return"midi"===this.defaultUnits?n:oS.mtof(n)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,n){let r=1;return e&&"0"!==e&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&"0"!==t&&(r*=this._beatsToUnits(parseFloat(t))),n&&"0"!==n&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})}transpose(e){return new oS(this.context,this.valueOf()*QC(e))}harmonize(e){return e.map((e=>this.transpose(e)))}toMidi(){return JC(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/oS.A4);let n=Math.round(12*t)+57;const r=Math.floor(n/12);r<0&&(n+=-12*r);return aS[n%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(60*e/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return tS(e)}static ftom(e){return JC(e)}}const iS={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},aS=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class sS extends rS{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class cS extends EC{constructor(){super();const e=CC(cS.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:KC()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return new rS(this.context,e).toSeconds()}toFrequency(e){return new oS(this.context,e).toFrequency()}toTicks(e){return new sS(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach((n=>{iC(e[n])&&delete t[n]})),t}get(){const e=this.constructor.getDefaults();return Object.keys(e).forEach((t=>{if(Reflect.has(this,t)){const n=this[t];aC(n)&&aC(n.value)&&aC(n.setValueAtTime)?e[t]=n.value:n instanceof cS?e[t]=n._getPartialProperties(e[t]):uC(n)||sC(n)||dC(n)||lC(n)?e[t]=n:delete e[t]}})),e}set(e){return Object.keys(e).forEach((t=>{Reflect.has(this,t)&&aC(this[t])&&(this[t]&&aC(this[t].value)&&aC(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof cS?this[t].set(e[t]):this[t]=e[t])})),this}}class lS extends DC{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"stopped";super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return null!==t?t.state:this._initial}setStateAtTime(e,t,n){return tC(t,0),this.add(Object.assign({},n,{state:e,time:t})),this}getLastState(e,t){for(let n=this._search(t);n>=0;n--){const t=this._timeline[n];if(t.state===e)return t}}getNextState(e,t){const n=this._search(t);if(-1!==n)for(let r=n;r<this._timeline.length;r++){const t=this._timeline[r];if(t.state===e)return t}}}class uS extends cS{constructor(){super(CC(uS.getDefaults(),arguments,["param","units","convert"])),this.name="Param",this.overridden=!1,this._minOutput=1e-7;const e=CC(uS.getDefaults(),arguments,["param","units","convert"]);for(eC(aC(e.param)&&(gC(e.param)||e.param instanceof uS),"param must be an AudioParam");!gC(e.param);)e.param=e.param._param;this._swappable=!!aC(e.swappable)&&e.swappable,this._swappable?(this.input=this.context.createGain(),this._param=e.param,this.input.connect(this._param)):this._param=this.input=e.param,this._events=new DC(1e3),this._initialValue=this._param.defaultValue,this.units=e.units,this.convert=e.convert,this._minValue=e.minValue,this._maxValue=e.maxValue,aC(e.value)&&e.value!==this._toType(this._initialValue)&&this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(cS.getDefaults(),{convert:!0,units:"number"})}get value(){const e=this.now();return this.getValueAtTime(e)}set value(e){this.cancelScheduledValues(this.now()),this.setValueAtTime(e,this.now())}get minValue(){return aC(this._minValue)?this._minValue:"time"===this.units||"frequency"===this.units||"normalRange"===this.units||"positive"===this.units||"transportTime"===this.units||"ticks"===this.units||"bpm"===this.units||"hertz"===this.units||"samples"===this.units?0:"audioRange"===this.units?-1:"decibels"===this.units?-1/0:this._param.minValue}get maxValue(){return aC(this._maxValue)?this._maxValue:"normalRange"===this.units||"audioRange"===this.units?1:this._param.maxValue}_is(e,t){return this.units===t}_assertRange(e){return aC(this.maxValue)&&aC(this.minValue)&&tC(e,this._fromType(this.minValue),this._fromType(this.maxValue)),e}_fromType(e){return this.convert&&!this.overridden?this._is(e,"time")?this.toSeconds(e):this._is(e,"decibels")?XC(e):this._is(e,"frequency")?this.toFrequency(e):e:this.overridden?0:e}_toType(e){return this.convert&&"decibels"===this.units?YC(e):e}setValueAtTime(e,t){const n=this.toSeconds(t),r=this._fromType(e);return eC(isFinite(r)&&isFinite(n),"Invalid argument(s) to setValueAtTime: ".concat(JSON.stringify(e),", ").concat(JSON.stringify(t))),this._assertRange(r),this.log(this.units,"setValueAtTime",e,n),this._events.add({time:n,type:"setValueAtTime",value:r}),this._param.setValueAtTime(r,n),this}getValueAtTime(e){const t=Math.max(this.toSeconds(e),0),n=this._events.getAfter(t),r=this._events.get(t);let o=this._initialValue;if(null===r)o=this._initialValue;else if("setTargetAtTime"!==r.type||null!==n&&"setValueAtTime"!==n.type)if(null===n)o=r.value;else if("linearRampToValueAtTime"===n.type||"exponentialRampToValueAtTime"===n.type){let e=r.value;if("setTargetAtTime"===r.type){const t=this._events.getBefore(r.time);e=null===t?this._initialValue:t.value}o="linearRampToValueAtTime"===n.type?this._linearInterpolate(r.time,e,n.time,n.value,t):this._exponentialInterpolate(r.time,e,n.time,n.value,t)}else o=r.value;else{const e=this._events.getBefore(r.time);let n;n=null===e?this._initialValue:e.value,"setTargetAtTime"===r.type&&(o=this._exponentialApproach(r.time,n,r.value,r.constant,t))}return this._toType(o)}setRampPoint(e){e=this.toSeconds(e);let t=this.getValueAtTime(e);return this.cancelAndHoldAtTime(e),0===this._fromType(t)&&(t=this._toType(this._minOutput)),this.setValueAtTime(t,e),this}linearRampToValueAtTime(e,t){const n=this._fromType(e),r=this.toSeconds(t);return eC(isFinite(n)&&isFinite(r),"Invalid argument(s) to linearRampToValueAtTime: ".concat(JSON.stringify(e),", ").concat(JSON.stringify(t))),this._assertRange(n),this._events.add({time:r,type:"linearRampToValueAtTime",value:n}),this.log(this.units,"linearRampToValueAtTime",e,r),this._param.linearRampToValueAtTime(n,r),this}exponentialRampToValueAtTime(e,t){let n=this._fromType(e);n=PC(n,0)?this._minOutput:n,this._assertRange(n);const r=this.toSeconds(t);return eC(isFinite(n)&&isFinite(r),"Invalid argument(s) to exponentialRampToValueAtTime: ".concat(JSON.stringify(e),", ").concat(JSON.stringify(t))),this._events.add({time:r,type:"exponentialRampToValueAtTime",value:n}),this.log(this.units,"exponentialRampToValueAtTime",e,r),this._param.exponentialRampToValueAtTime(n,r),this}exponentialRampTo(e,t,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialRampToValueAtTime(e,n+this.toSeconds(t)),this}linearRampTo(e,t,n){return n=this.toSeconds(n),this.setRampPoint(n),this.linearRampToValueAtTime(e,n+this.toSeconds(t)),this}targetRampTo(e,t,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialApproachValueAtTime(e,n,t),this}exponentialApproachValueAtTime(e,t,n){t=this.toSeconds(t),n=this.toSeconds(n);const r=Math.log(n+1)/Math.log(200);return this.setTargetAtTime(e,t,r),this.cancelAndHoldAtTime(t+.9*n),this.linearRampToValueAtTime(e,t+n),this}setTargetAtTime(e,t,n){const r=this._fromType(e);eC(isFinite(n)&&n>0,"timeConstant must be a number greater than 0");const o=this.toSeconds(t);return this._assertRange(r),eC(isFinite(r)&&isFinite(o),"Invalid argument(s) to setTargetAtTime: ".concat(JSON.stringify(e),", ").concat(JSON.stringify(t))),this._events.add({constant:n,time:o,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",e,o,n),this._param.setTargetAtTime(r,o,n),this}setValueCurveAtTime(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;n=this.toSeconds(n),t=this.toSeconds(t);const o=this._fromType(e[0])*r;this.setValueAtTime(this._toType(o),t);const i=n/(e.length-1);for(let a=1;a<e.length;a++){const n=this._fromType(e[a])*r;this.linearRampToValueAtTime(this._toType(n),t+a*i)}return this}cancelScheduledValues(e){const t=this.toSeconds(e);return eC(isFinite(t),"Invalid argument to cancelScheduledValues: ".concat(JSON.stringify(e))),this._events.cancel(t),this._param.cancelScheduledValues(t),this.log(this.units,"cancelScheduledValues",t),this}cancelAndHoldAtTime(e){const t=this.toSeconds(e),n=this._fromType(this.getValueAtTime(t));eC(isFinite(t),"Invalid argument to cancelAndHoldAtTime: ".concat(JSON.stringify(e))),this.log(this.units,"cancelAndHoldAtTime",t,"value="+n);const r=this._events.get(t),o=this._events.getAfter(t);return r&&PC(r.time,t)?o?(this._param.cancelScheduledValues(o.time),this._events.cancel(o.time)):(this._param.cancelAndHoldAtTime(t),this._events.cancel(t+this.sampleTime)):o&&(this._param.cancelScheduledValues(o.time),this._events.cancel(o.time),"linearRampToValueAtTime"===o.type?this.linearRampToValueAtTime(this._toType(n),t):"exponentialRampToValueAtTime"===o.type&&this.exponentialRampToValueAtTime(this._toType(n),t)),this._events.add({time:t,type:"setValueAtTime",value:n}),this._param.setValueAtTime(n,t),this}rampTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,n=arguments.length>2?arguments[2]:void 0;return"frequency"===this.units||"bpm"===this.units||"decibels"===this.units?this.exponentialRampTo(e,t,n):this.linearRampTo(e,t,n),this}apply(e){const t=this.context.currentTime;e.setValueAtTime(this.getValueAtTime(t),t);const n=this._events.get(t);if(n&&"setTargetAtTime"===n.type){const r=this._events.getAfter(n.time),o=r?r.time:t+2,i=(o-t)/10;for(let n=t;n<o;n+=i)e.linearRampToValueAtTime(this.getValueAtTime(n),n)}return this._events.forEachAfter(this.context.currentTime,(t=>{"cancelScheduledValues"===t.type?e.cancelScheduledValues(t.time):"setTargetAtTime"===t.type?e.setTargetAtTime(t.value,t.time,t.constant):e[t.type](t.value,t.time)})),this}setParam(e){eC(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,n,r,o){return n+(t-n)*Math.exp(-(o-e)/r)}_linearInterpolate(e,t,n,r,o){return t+(o-e)/(n-e)*(r-t)}_exponentialInterpolate(e,t,n,r,o){return t*Math.pow(r/t,(o-e)/(n-e))}}class dS extends cS{constructor(){super(...arguments),this.name="ToneAudioNode",this._internalChannels=[]}get numberOfInputs(){return aC(this.input)?gC(this.input)||this.input instanceof uS?1:this.input.numberOfInputs:0}get numberOfOutputs(){return aC(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return aC(e)&&(e instanceof dS||vC(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach((t=>{t.channelCount=e.channelCount,t.channelCountMode=e.channelCountMode,t.channelInterpretation=e.channelInterpretation}))}_getChannelProperties(){const e=this._getInternalNodes();eC(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e){return hS(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return oC("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e){return pS(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}chain(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fS(this,...t),this}fan(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach((e=>this.connect(e))),this}dispose(){return super.dispose(),aC(this.input)&&(this.input instanceof dS?this.input.dispose():vC(this.input)&&this.input.disconnect()),aC(this.output)&&(this.output instanceof dS?this.output.dispose():vC(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function fS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.shift();t.reduce(((e,t)=>(e instanceof dS?e.connect(t):vC(e)&&hS(e,t),t)),r)}function hS(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;for(eC(aC(e),"Cannot connect from undefined node"),eC(aC(t),"Cannot connect to undefined node"),(t instanceof dS||vC(t))&&eC(t.numberOfInputs>0,"Cannot connect to node with no inputs"),eC(e.numberOfOutputs>0,"Cannot connect from node with no outputs");t instanceof dS||t instanceof uS;)aC(t.input)&&(t=t.input);for(;e instanceof dS;)aC(e.output)&&(e=e.output);gC(t)?e.connect(t,n):e.connect(t,n,r)}function pS(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(aC(t))for(;t instanceof dS;)t=t.input;for(;!vC(e);)aC(e.output)&&(e=e.output);gC(t)?e.disconnect(t,n):vC(t)?e.disconnect(t,n,r):e.disconnect()}class mS extends dS{constructor(){super(CC(mS.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=CC(mS.getDefaults(),arguments,["gain","units"]);this.gain=new uS({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),HC(this,"gain")}static getDefaults(){return Object.assign(dS.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class gS extends dS{constructor(e){super(e),this.onended=qC,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new mS({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(e){const t=this.toSeconds(e);return-1!==this._startTime&&t>=this._startTime&&(-1===this._stopTime||t<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(dS.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:qC})}_startGain(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;eC(-1===this._startTime,"Source cannot be started more than once");const n=this.toSeconds(this._fadeIn);return this._startTime=e+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,e),"linear"===this._curve?this._gainNode.gain.linearRampToValueAtTime(t,e+n):this._gainNode.gain.exponentialApproachValueAtTime(t,e,n)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){eC(-1!==this._startTime,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.context.currentTime),t>0?"linear"===this._curve?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout((()=>{const e="exponential"===this._curve?2*t:0;this._stopSource(this.now()+e),this._onended()}),this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==qC&&(this.onended(this),this.onended=qC,!this.context.isOffline)){const e=()=>this.dispose();"undefined"!==typeof window.requestIdleCallback?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),eC(-1!==this._startTime,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.disconnect(),this}}class vS extends gS{constructor(){super(CC(vS.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=CC(vS.getDefaults(),arguments,["offset"]);hS(this._source,this._gainNode),this.offset=new uS({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(gS.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class yS extends dS{constructor(){super(CC(yS.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=CC(yS.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new vS({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(dS.getDefaults(),{convert:!0,units:"number",value:0})}connect(e){return bS(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,n){return this._param.exponentialRampTo(e,t,n),this}linearRampTo(e,t,n){return this._param.linearRampTo(e,t,n),this}targetRampTo(e,t,n){return this._param.targetRampTo(e,t,n),this}exponentialApproachValueAtTime(e,t,n){return this._param.exponentialApproachValueAtTime(e,t,n),this}setTargetAtTime(e,t,n){return this._param.setTargetAtTime(e,t,n),this}setValueCurveAtTime(e,t,n,r){return this._param.setValueCurveAtTime(e,t,n,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,n){return this._param.rampTo(e,t,n),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function bS(e,t,n,r){(t instanceof uS||gC(t)||t instanceof yS&&t.override)&&(t.cancelScheduledValues(0),t.setValueAtTime(0,0),t instanceof yS&&(t.overridden=!0)),hS(e,t,n,r)}class _S extends uS{constructor(){super(CC(_S.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new DC(1/0),this._multiplier=1;const e=CC(_S.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(uS.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,n){t=this.toSeconds(t),this.setRampPoint(t);const r=this._fromType(e),o=this._events.get(t),i=Math.round(Math.max(1/n,1));for(let a=0;a<=i;a++){const e=n*a+t,i=this._exponentialApproach(o.time,o.value,r,n,e);this.linearRampToValueAtTime(this._toType(i),e)}return this}setValueAtTime(e,t){const n=this.toSeconds(t);super.setValueAtTime(e,t);const r=this._events.get(n),o=this._events.previousEvent(r),i=this._getTicksUntilEvent(o,n);return r.ticks=Math.max(i,0),this}linearRampToValueAtTime(e,t){const n=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const r=this._events.get(n),o=this._events.previousEvent(r),i=this._getTicksUntilEvent(o,n);return r.ticks=Math.max(i,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const n=this._fromType(e),r=this._events.get(t),o=Math.round(Math.max(10*(t-r.time),1)),i=(t-r.time)/o;for(let a=0;a<=o;a++){const e=i*a+r.time,o=this._exponentialInterpolate(r.time,r.value,t,n,e);this.linearRampToValueAtTime(this._toType(o),e)}return this}_getTicksUntilEvent(e,t){if(null===e)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(iC(e.ticks)){const t=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(t,e.time)}const n=this._fromType(this.getValueAtTime(e.time));let r=this._fromType(this.getValueAtTime(t));const o=this._events.get(t);return o&&o.time===t&&"setValueAtTime"===o.type&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(n+r)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),n=this._events.get(t);return Math.max(this._getTicksUntilEvent(n,t),0)}getDurationOfTicks(e,t){const n=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-n}getTimeOfTick(e){const t=this._events.get(e,"ticks"),n=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&n&&"linearRampToValueAtTime"===n.type&&t.value!==n.value){const r=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-t.time),i=Math.sqrt(Math.pow(r,2)-2*o*(t.ticks-e)),a=(-r+i)/o;return(a>0?a:(-r-i)/o)+t.time}return t?0===t.value?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const n=this.toSeconds(t),r=this.toSeconds(e),o=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-o}_fromType(e){return"bpm"===this.units&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return"bpm"===this.units&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class wS extends yS{constructor(){super(CC(wS.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=CC(wS.getDefaults(),arguments,["value"]);this.input=this._param=new _S({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(yS.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class xS extends cS{constructor(){super(CC(xS.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new lS,this._tickOffset=new DC;const e=CC(xS.getDefaults(),arguments,["frequency"]);this.frequency=new wS({context:this.context,units:e.units,value:e.frequency}),HC(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},cS.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const n=this.toSeconds(e);return"started"!==this._state.getValueAtTime(n)&&(this._state.setStateAtTime("started",n),aC(t)&&this.setTicksAtTime(t,n)),this}stop(e){const t=this.toSeconds(e);if("stopped"===this._state.getValueAtTime(t)){const e=this._state.get(t);e&&e.time>0&&(this._tickOffset.cancel(e.time),this._state.cancel(e.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this}pause(e){const t=this.toSeconds(e);return"started"===this._state.getValueAtTime(t)&&this._state.setStateAtTime("paused",t),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),n=this._state.getLastState("stopped",t),r={state:"paused",time:t};this._state.add(r);let o=n,i=0;return this._state.forEachBetween(n.time,t+this.sampleTime,(e=>{let t=o.time;const n=this._tickOffset.get(e.time);n&&n.time>=o.time&&(i=n.ticks,t=n.time),"started"===o.state&&"started"!==e.state&&(i+=this.frequency.getTicksAtTime(e.time)-this.frequency.getTicksAtTime(t)),o=e})),this._state.remove(r),i}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),n=this.frequency.timeToTicks(e,t);this.setTicksAtTime(n,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),n={state:"paused",time:e};this._state.add(n);let r=t,o=0;return this._state.forEachBetween(t.time,e+this.sampleTime,(e=>{let t=r.time;const n=this._tickOffset.get(e.time);n&&n.time>=r.time&&(o=n.seconds,t=n.time),"started"===r.state&&"started"!==e.state&&(o+=e.time-t),r=e})),this._state.remove(n),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.now();const n=this._tickOffset.get(t),r=this._state.get(t),o=Math.max(n.time,r.time),i=this.frequency.getTicksAtTime(o)+e-n.ticks;return this.frequency.getTimeOfTick(i)}forEachTickBetween(e,t,n){let r=this._state.get(e);this._state.forEachBetween(e,t,(t=>{r&&"started"===r.state&&"started"!==t.state&&this.forEachTickBetween(Math.max(r.time,e),t.time-this.sampleTime,n),r=t}));let o=null;if(r&&"started"===r.state){const i=Math.max(r.time,e),a=this.frequency.getTicksAtTime(i),s=a-this.frequency.getTicksAtTime(r.time);let c=Math.ceil(s)-s;c=PC(c,1)?0:c;let l=this.frequency.getTimeOfTick(a+c);for(;l<t;){try{n(l,Math.round(this.getTicksAtTime(l)))}catch(Sk){o=Sk;break}l+=this.frequency.getDurationOfTicks(1,l)}}if(o)throw o;return this}dispose(){return super.dispose(),this._state.dispose(),this._tickOffset.dispose(),this.frequency.dispose(),this}}class CS extends cS{constructor(){super(CC(CS.getDefaults(),arguments,["callback","frequency"])),this.name="Clock",this.callback=qC,this._lastUpdate=0,this._state=new lS("stopped"),this._boundLoop=this._loop.bind(this);const e=CC(CS.getDefaults(),arguments,["callback","frequency"]);this.callback=e.callback,this._tickSource=new xS({context:this.context,frequency:e.frequency,units:e.units}),this._lastUpdate=0,this.frequency=this._tickSource.frequency,HC(this,"frequency"),this._state.setStateAtTime("stopped",0),this.context.on("tick",this._boundLoop)}static getDefaults(){return Object.assign(cS.getDefaults(),{callback:qC,frequency:1,units:"hertz"})}get state(){return this._state.getValueAtTime(this.now())}start(e,t){nC(this.context);const n=this.toSeconds(e);return this.log("start",n),"started"!==this._state.getValueAtTime(n)&&(this._state.setStateAtTime("started",n),this._tickSource.start(n,t),n<this._lastUpdate&&this.emit("start",n,t)),this}stop(e){const t=this.toSeconds(e);return this.log("stop",t),this._state.cancel(t),this._state.setStateAtTime("stopped",t),this._tickSource.stop(t),t<this._lastUpdate&&this.emit("stop",t),this}pause(e){const t=this.toSeconds(e);return"started"===this._state.getValueAtTime(t)&&(this._state.setStateAtTime("paused",t),this._tickSource.pause(t),t<this._lastUpdate&&this.emit("pause",t)),this}get ticks(){return Math.ceil(this.getTicksAtTime(this.now()))}set ticks(e){this._tickSource.ticks=e}get seconds(){return this._tickSource.seconds}set seconds(e){this._tickSource.seconds=e}getSecondsAtTime(e){return this._tickSource.getSecondsAtTime(e)}setTicksAtTime(e,t){return this._tickSource.setTicksAtTime(e,t),this}getTimeOfTick(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.now();return this._tickSource.getTimeOfTick(e,t)}getTicksAtTime(e){return this._tickSource.getTicksAtTime(e)}nextTickTime(e,t){const n=this.toSeconds(t),r=this.getTicksAtTime(n);return this._tickSource.getTimeOfTick(r+e,n)}_loop(){const e=this._lastUpdate,t=this.now();this._lastUpdate=t,this.log("loop",e,t),e!==t&&(this._state.forEachBetween(e,t,(e=>{switch(e.state){case"started":const t=this._tickSource.getTicksAtTime(e.time);this.emit("start",e.time,t);break;case"stopped":0!==e.time&&this.emit("stop",e.time);break;case"paused":this.emit("pause",e.time)}})),this._tickSource.forEachTickBetween(e,t,((e,t)=>{this.callback(e,t)})))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}FC.mixin(CS);class SS extends EC{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=CC(SS.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach((t=>{this._loadingCount++;const n=e.urls[t];this.add(t,n,this._bufferLoaded.bind(this,e.onload),e.onerror)}))}static getDefaults(){return{baseUrl:"",onerror:qC,onload:qC,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return eC(this.has(e),"ToneAudioBuffers has no buffer named: ".concat(e)),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,0===this._loadingCount&&e&&e()}get loaded(){return Array.from(this._buffers).every((e=>{let[t,n]=e;return n.loaded}))}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qC,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qC;return dC(t)?this._buffers.set(e.toString(),new UC(this.baseUrl+t,n,r)):this._buffers.set(e.toString(),new UC(t,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach((e=>e.dispose())),this._buffers.clear(),this}}class kS extends sS{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class ES extends cS{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new DC,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),1===this._events.length&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}IC((e=>{e.draw=new ES({context:e})})),jC((e=>{e.draw.dispose()}));class OS extends EC{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){eC(aC(e.time),"Events must have a time property"),eC(aC(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new TS(e.time,e.time+e.duration,e);for(null===this._root?this._root=t:this._root.insert(t),this._length++;null!==t;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(null!==this._root){const t=[];this._root.search(e.time,t);for(const n of t)if(n.event===e){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,(e=>this.remove(e))),this}_setRoot(e){this._root=e,null!==this._root&&(this._root.parent=null)}_replaceNodeInParent(e,t){null!==e.parent?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(null===e.left&&null===e.right)this._replaceNodeInParent(e,null);else if(null===e.right)this._replaceNodeInParent(e,e.left);else if(null===e.left)this._replaceNodeInParent(e,e.right);else{let t,n=null;if(e.getBalance()>0)if(null===e.left.right)t=e.left,t.right=e.right,n=t;else{for(t=e.left.right;null!==t.right;)t=t.right;t.parent&&(t.parent.right=t.left,n=t.parent,t.left=e.left,t.right=e.right)}else if(null===e.right.left)t=e.right,t.left=e.left,n=t;else{for(t=e.right.left;null!==t.left;)t=t.left;t.parent&&(t.parent.left=t.right,n=t.parent,t.left=e.left,t.right=e.right)}null!==e.parent?e.isLeftChild()?e.parent.left=t:e.parent.right=t:this._setRoot(t),n&&this._rebalance(n)}e.dispose()}_rotateLeft(e){const t=e.parent,n=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),null!==t?n?t.left=r:t.right=r:this._setRoot(r)}_rotateRight(e){const t=e.parent,n=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),null!==t?n?t.left=r:t.right=r:this._setRoot(r)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(null!==this._root){const t=[];if(this._root.search(e,t),t.length>0){let e=t[0];for(let n=1;n<t.length;n++)t[n].low>e.low&&(e=t[n]);return e.event}}return null}forEach(e){if(null!==this._root){const t=[];this._root.traverse((e=>t.push(e))),t.forEach((t=>{t.event&&e(t.event)}))}return this}forEachAtTime(e,t){if(null!==this._root){const n=[];this._root.search(e,n),n.forEach((e=>{e.event&&t(e.event)}))}return this}forEachFrom(e,t){if(null!==this._root){const n=[];this._root.searchAfter(e,n),n.forEach((e=>{e.event&&t(e.event)}))}return this}dispose(){return super.dispose(),null!==this._root&&this._root.traverse((e=>e.dispose())),this._root=null,this}}class TS{constructor(e,t,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?null===this.left?this.left=e:this.left.insert(e):null===this.right?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(null!==this.left&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),this.low>e||null!==this.right&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),null!==this.left&&this.left.searchAfter(e,t)),null!==this.right&&this.right.searchAfter(e,t)}traverse(e){e(this),null!==this.left&&this.left.traverse(e),null!==this.right&&this.right.traverse(e)}updateHeight(){null!==this.left&&null!==this.right?this.height=Math.max(this.left.height,this.right.height)+1:null!==this.right?this.height=this.right.height+1:null!==this.left?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,null!==this.left&&(this.max=Math.max(this.max,this.left.max)),null!==this.right&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return null!==this.left&&null!==this.right?e=this.left.height-this.right.height:null!==this.left?e=this.left.height+1:null!==this.right&&(e=-(this.right.height+1)),e}isLeftChild(){return null!==this.parent&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,null!==e&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,null!==e&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class AS extends dS{constructor(){super(CC(AS.getDefaults(),arguments,["volume"])),this.name="Volume";const e=CC(AS.getDefaults(),arguments,["volume"]);this.input=this.output=new mS({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,HC(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(dS.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}class RS extends dS{constructor(){super(CC(RS.getDefaults(),arguments)),this.name="Destination",this.input=new AS({context:this.context}),this.output=new mS({context:this.context}),this.volume=this.input.volume;const e=CC(RS.getDefaults(),arguments);fS(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(dS.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(){this.input.disconnect();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift(this.input),t.push(this.output),fS(...t),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}}IC((e=>{e.destination=new RS({context:e})})),jC((e=>{e.destination.dispose()}));class PS extends EC{constructor(e){super(),this.name="TimelineValue",this._timeline=new DC({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class NS{constructor(e,t){this.id=NS._eventId++;const n=Object.assign(NS.getDefaults(),t);this.transport=e,this.callback=n.callback,this._once=n.once,this.time=n.time}static getDefaults(){return{callback:qC,once:!1,time:0}}invoke(e){this.callback&&(this.callback(e),this._once&&this.transport.clear(this.id))}dispose(){return this.callback=void 0,this}}NS._eventId=0;class DS extends NS{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const n=Object.assign(DS.getDefaults(),t);this.duration=new kS(e.context,n.duration).valueOf(),this._interval=new kS(e.context,n.interval).valueOf(),this._nextTick=n.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},NS.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvents(e){const t=this.transport.getTicksAtTime(e);t>=this.time&&t>=this._nextTick&&this._nextTick+this._interval<this.time+this.duration&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new kS(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.time;const t=this.transport.getTicksAtTime(e);t>this.time&&(this._nextTick=this.time+Math.ceil((t-this.time)/this._interval)*this._interval),this._currentId=this.transport.scheduleOnce(this.invoke.bind(this),new kS(this.context,this._nextTick).toSeconds()),this._nextTick+=this._interval,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new kS(this.context,this._nextTick).toSeconds())}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this}}class MS extends cS{constructor(){super(CC(MS.getDefaults(),arguments)),this.name="Transport",this._loop=new PS(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new DC,this._repeatedEvents=new OS,this._syncedSignals=[],this._swingAmount=0;const e=CC(MS.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new CS({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),HC(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(cS.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(2*this._swingTicks)!==0){const n=t%(2*this._swingTicks)/(2*this._swingTicks),r=Math.sin(n*Math.PI)*this._swingAmount;e+=new kS(this.context,2*this._swingTicks/3).toSeconds()*r}this._timeline.forEachAtTime(t,(t=>t.invoke(e)))}schedule(e,t){const n=new NS(this,{callback:e,time:new sS(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;const o=new DS(this,{callback:e,duration:new rS(this.context,r).toTicks(),interval:new rS(this.context,t).toTicks(),time:new sS(this.context,n).toTicks()});return this._addEvent(o,this._repeatedEvents)}scheduleOnce(e,t){const n=new NS(this,{callback:e,once:!0,time:new sS(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.toTicks(e);return this._timeline.forEachFrom(t,(e=>this.clear(e.id))),this._repeatedEvents.forEachFrom(t,(e=>this.clear(e.id))),this}_bindClockEvents(){this._clock.on("start",((e,t)=>{t=new kS(this.context,t).toSeconds(),this.emit("start",e,t)})),this._clock.on("stop",(e=>{this.emit("stop",e)})),this._clock.on("pause",(e=>{this.emit("pause",e)}))}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){let n;return aC(t)&&(n=this.toTicks(t)),this._clock.start(e,n),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),"started"!==this._clock.getStateAtTime(e)?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){uC(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new rS(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new rS(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new kS(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new kS(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),n=this._clock.frequency.timeToTicks(e,t);this.ticks=n}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if("started"===this.state){const n=this._clock.getTicksAtTime(t),r=t+this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,t);this.emit("stop",r),this._clock.setTicksAtTime(e,r),this.emit("start",r,this._clock.getSecondsAtTime(r))}else this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return Math.round(this._clock.getTicksAtTime(e))}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),"started"!==this.state)return 0;{const t=this.now(),n=e-this.getTicksAtTime(t)%e;return this._clock.nextTickTime(n,t)}}syncSignal(e,t){if(!t){const n=this.now();if(0!==e.getValueAtTime(n)){const r=1/(60/this.bpm.getValueAtTime(n)/this.PPQ);t=e.getValueAtTime(n)/r}else t=0}const n=new mS(t);return this.bpm.connect(n),n.connect(e._param),this._syncedSignals.push({initial:e.value,ratio:n,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const n=this._syncedSignals[t];n.signal===e&&(n.ratio.dispose(),n.signal.value=n.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),VC(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}FC.mixin(MS),IC((e=>{e.transport=new MS({context:e})})),jC((e=>{e.transport.dispose()}));class IS extends dS{constructor(e){super(e),this.input=void 0,this._state=new lS("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=qC,this._syncedStop=qC,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new AS({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,HC(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(dS.getDefaults(),{mute:!1,onstop:qC,volume:0})}get state(){return this._synced?"started"===this.context.transport.state?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,n){let r=iC(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),this._synced||"started"!==this._state.getValueAtTime(r))if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const e=this._state.get(r);e&&(e.offset=this.toSeconds(SC(t,0)),e.duration=n?this.toSeconds(n):void 0);const o=this.context.transport.schedule((e=>{this._start(e,t,n)}),r);this._scheduled.push(o),"started"===this.context.transport.state&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else nC(this.context),this._start(r,t,n);else eC(TC(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,t,n);return this}stop(e){let t=iC(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),"started"===this._state.getValueAtTime(t)||aC(this._state.getNextState("started",t))){if(this.log("stop",t),this._synced){const e=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(e)}else this._stop(t);this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,n){return e=this.toSeconds(e),"started"===this._state.getValueAtTime(e)&&(this._state.cancel(e),this._restart(e,t,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(t>0){const n=this._state.get(t);if(n&&"started"===n.state&&n.time!==t){const r=t-this.toSeconds(n.time);let o;n.duration&&(o=this.toSeconds(n.duration)-r),this._start(e,this.toSeconds(n.offset)+r,o)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));"started"===this._state.getValueAtTime(t)&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach((e=>this.context.transport.clear(e))),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=qC,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class LS extends gS{constructor(){super(CC(LS.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=CC(LS.getDefaults(),arguments,["url","onload"]);hS(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new uS({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new UC(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(gS.getDefaults(),{url:new UC,loop:!1,loopEnd:0,loopStart:0,onload:qC,onerror:qC,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;eC(this.buffer.loaded,"buffer is either not set or not loaded");const o=this.toSeconds(e);this._startGain(o,r),t=this.loop?SC(t,this.loopStart):SC(t,0);let i=Math.max(this.toSeconds(t),0);if(this.loop){const e=this.toSeconds(this.loopEnd)||this.buffer.duration,t=this.toSeconds(this.loopStart),n=e-t;AC(i,e)&&(i=(i-t)%n+t),PC(i,this.buffer.duration)&&(i=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,RC(i,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(o,i)),aC(n)){let e=this.toSeconds(n);e=Math.max(e,0),this.stop(o+e)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}function jS(e,t){return(0,i.kH)(this,void 0,void 0,(function*(){const n=t/e.context.sampleRate,r=new WC(1,n,e.context.sampleRate);new e.constructor(Object.assign(e.get(),{frequency:2/n,detune:0,context:r})).toDestination().start(0);return(yield r.render()).getChannelData(0)}))}class FS extends gS{constructor(){super(CC(FS.getDefaults(),arguments,["frequency","type"])),this.name="ToneOscillatorNode",this._oscillator=this.context.createOscillator(),this._internalChannels=[this._oscillator];const e=CC(FS.getDefaults(),arguments,["frequency","type"]);hS(this._oscillator,this._gainNode),this.type=e.type,this.frequency=new uS({context:this.context,param:this._oscillator.frequency,units:"frequency",value:e.frequency}),this.detune=new uS({context:this.context,param:this._oscillator.detune,units:"cents",value:e.detune}),HC(this,["frequency","detune"])}static getDefaults(){return Object.assign(gS.getDefaults(),{detune:0,frequency:440,type:"sine"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._oscillator.start(t),this}_stopSource(e){this._oscillator.stop(e)}setPeriodicWave(e){return this._oscillator.setPeriodicWave(e),this}get type(){return this._oscillator.type}set type(e){this._oscillator.type=e}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this}}class BS extends IS{constructor(){super(CC(BS.getDefaults(),arguments,["frequency","type"])),this.name="Oscillator",this._oscillator=null;const e=CC(BS.getDefaults(),arguments,["frequency","type"]);this.frequency=new yS({context:this.context,units:"frequency",value:e.frequency}),HC(this,"frequency"),this.detune=new yS({context:this.context,units:"cents",value:e.detune}),HC(this,"detune"),this._partials=e.partials,this._partialCount=e.partialCount,this._type=e.type,e.partialCount&&"custom"!==e.type&&(this._type=this.baseType+e.partialCount.toString()),this.phase=e.phase}static getDefaults(){return Object.assign(IS.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:"sine"})}_start(e){const t=this.toSeconds(e),n=new FS({context:this.context,onended:()=>this.onstop(this)});this._oscillator=n,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if("custom"===this._type){const e=BS._periodicWaveCache.find((e=>{return e.phase===this._phase&&(t=e.partials,n=this._partials,t.length===n.length&&t.every(((e,t)=>n[t]===e)));var t,n}));return e}{const e=BS._periodicWaveCache.find((e=>e.type===this._type&&e.phase===this._phase));return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=-1!==["sine","square","sawtooth","triangle"].indexOf(e);if(0===this._phase&&t)this._wave=void 0,this._partialCount=0,null!==this._oscillator&&(this._oscillator.type=e);else{const t=this._getCachedPeriodicWave();if(aC(t)){const{partials:e,wave:n}=t;this._wave=n,this._partials=e,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}else{const[t,n]=this._getRealImaginary(e,this._phase),r=this.context.createPeriodicWave(t,n);this._wave=r,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave),BS._periodicWaveCache.push({imag:n,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:t,type:this._type,wave:this._wave}),BS._periodicWaveCache.length>100&&BS._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&"custom"!==this._type&&"custom"!==e?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){tC(e,0);let t=this._type;const n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(t=n[1]),"custom"!==this._type)this.type=0===e?t:t+e.toString();else{const t=new Float32Array(e);this._partials.forEach(((e,n)=>t[n]=e)),this._partials=Array.from(t),this.type=this._type}}_getRealImaginary(e,t){let n=2048;const r=new Float32Array(n),o=new Float32Array(n);let i=1;if("custom"===e){if(i=this._partials.length+1,this._partialCount=this._partials.length,n=i,0===this._partials.length)return[r,o]}else{const t=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);t?(i=parseInt(t[2],10)+1,this._partialCount=parseInt(t[2],10),e=t[1],i=Math.max(i,2),n=i):this._partialCount=0,this._partials=[]}for(let a=1;a<n;++a){const n=2/(a*Math.PI);let s;switch(e){case"sine":s=a<=i?1:0,this._partials[a-1]=s;break;case"square":s=1&a?2*n:0,this._partials[a-1]=s;break;case"sawtooth":s=n*(1&a?1:-1),this._partials[a-1]=s;break;case"triangle":s=1&a?n*n*2*(a-1>>1&1?-1:1):0,this._partials[a-1]=s;break;case"custom":s=this._partials[a-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}0!==s?(r[a]=-s*Math.sin(t*a),o[a]=s*Math.cos(t*a)):(r[a]=0,o[a]=0)}return[r,o]}_inverseFFT(e,t,n){let r=0;const o=e.length;for(let i=0;i<o;i++)r+=e[i]*Math.cos(i*n)+t[i]*Math.sin(i*n);return r}getInitialValue(){const[e,t]=this._getRealImaginary(this._type,0);let n=0;const r=2*Math.PI;for(let o=0;o<32;o++)n=Math.max(this._inverseFFT(e,t,o/32*r),n);return NC(-this._inverseFFT(e,t,this._phase)/n,-1,1)}get partials(){return this._partials.slice(0,this.partialCount)}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this.type="custom")}get phase(){return this._phase*(180/Math.PI)}set phase(e){this._phase=e*Math.PI/180,this.type=this._type}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),null!==this._oscillator&&this._oscillator.dispose(),this._wave=void 0,this.frequency.dispose(),this.detune.dispose(),this}}BS._periodicWaveCache=[];class zS extends dS{constructor(){super(Object.assign(CC(zS.getDefaults(),arguments,["context"])))}connect(e){return bS(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}}class HS extends zS{constructor(){super(Object.assign(CC(HS.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=CC(HS.getDefaults(),arguments,["mapping","length"]);uC(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):"function"===typeof e.mapping&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(yS.getDefaults(),{length:1024})}setMap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=new Float32Array(t);for(let r=0,o=t;r<o;r++){const t=r/(o-1)*2-1;n[r]=e(t,r)}return this.curve=n,this}get curve(){return this._shaper.curve}set curve(e){this._shaper.curve=e}get oversample(){return this._shaper.oversample}set oversample(e){eC(["none","2x","4x"].some((t=>t.includes(e))),"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class VS extends zS{constructor(){super(...arguments),this.name="AudioToGain",this._norm=new HS({context:this.context,mapping:e=>(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class qS extends yS{constructor(){super(Object.assign(CC(qS.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=CC(qS.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new mS({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(yS.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class US extends IS{constructor(){super(CC(US.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new VS({context:this.context}),this._modulationNode=new mS({context:this.context});const e=CC(US.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new BS({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new BS({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new qS({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),HC(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(BS.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class WS extends IS{constructor(){super(CC(WS.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new mS({context:this.context,gain:0});const e=CC(WS.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new BS({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new yS({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new BS({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new qS({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new qS({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),HC(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(BS.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class $S extends IS{constructor(){super(CC($S.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new mS({context:this.context,gain:0}),this._thresh=new HS({context:this.context,mapping:e=>e<=0?-1:1});const e=CC($S.getDefaults(),arguments,["frequency","width"]);this.width=new yS({context:this.context,units:"audioRange",value:e.width}),this._triangle=new BS({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),HC(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(IS.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class GS extends IS{constructor(){super(CC(GS.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=CC(GS.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new yS({context:this.context,units:"frequency",value:e.frequency}),this.detune=new yS({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,HC(this,["frequency","detune"])}static getDefaults(){return Object.assign(BS.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach((t=>t.start(e)))}_stop(e){e=this.toSeconds(e),this._forEach((t=>t.stop(e)))}_restart(e){this._forEach((t=>t.restart(e)))}_forEach(e){for(let t=0;t<this._oscillators.length;t++)e(this._oscillators[t],t)}get type(){return this._type}set type(e){this._type=e,this._forEach((t=>t.type=e))}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,n=e/(this._oscillators.length-1);this._forEach(((e,r)=>e.detune.value=t+n*r))}}get count(){return this._oscillators.length}set count(e){if(tC(e,1),this._oscillators.length!==e){this._forEach((e=>e.dispose())),this._oscillators=[];for(let t=0;t<e;t++){const n=new BS({context:this.context,volume:-6-1.1*e,type:this._type,phase:this._phase+t/e*360,partialCount:this._partialCount,onstop:0===t?()=>this.onstop(this):qC});"custom"===this.type&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[t]=n}this.spread=this._spread,"started"===this.state&&this._forEach((e=>e.start()))}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach(((e,t)=>e.phase=this._phase+t/this.count*360))}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach((t=>t.baseType=e)),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach((t=>t.partials=e)))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach((t=>t.partialCount=e)),this._type=this._oscillators[0].type}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach((e=>e.dispose())),this}}class KS extends IS{constructor(){super(CC(KS.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new qS({context:this.context,value:2});const e=CC(KS.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new $S({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new BS({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),HC(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(IS.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const XS={am:US,fat:GS,fm:WS,oscillator:BS,pulse:$S,pwm:KS};class YS extends IS{constructor(){super(CC(YS.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=CC(YS.getDefaults(),arguments,["frequency","type"]);this.frequency=new yS({context:this.context,units:"frequency",value:e.frequency}),this.detune=new yS({context:this.context,units:"cents",value:e.detune}),HC(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(BS.getDefaults(),WS.getDefaults(),US.getDefaults(),GS.getDefaults(),$S.getDefaults(),KS.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some((e=>this._sourceType===e))&&(e=this._sourceType),e+this._oscillator.type}set type(e){"fm"===e.substr(0,2)?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):"am"===e.substr(0,2)?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):"fat"===e.substr(0,3)?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):"pwm"===e?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):"pulse"===e?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=XS[e],n=this.now();if(this._oscillator){const e=this._oscillator;e.stop(n),this.context.setTimeout((()=>e.dispose()),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),"started"===this.state&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";"pwm"!==this._oscillator.type&&"pulse"!==this._oscillator.type&&(t=this._oscillator.type),"fm"===e?this.type="fm"+t:"am"===e?this.type="am"+t:"fat"===e?this.type="fat"+t:"oscillator"===e?this.type=t:"pulse"===e?this.type="pulse":"pwm"===e&&(this.type="pwm")}_getOscType(e,t){return e instanceof XS[t]}get baseType(){return this._oscillator.baseType}set baseType(e){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||"pulse"===e||"pwm"===e||(this._oscillator.baseType=e)}get width(){return this._getOscType(this._oscillator,"pulse")?this._oscillator.width:void 0}get count(){return this._getOscType(this._oscillator,"fat")?this._oscillator.count:void 0}set count(e){this._getOscType(this._oscillator,"fat")&&sC(e)&&(this._oscillator.count=e)}get spread(){return this._getOscType(this._oscillator,"fat")?this._oscillator.spread:void 0}set spread(e){this._getOscType(this._oscillator,"fat")&&sC(e)&&(this._oscillator.spread=e)}get modulationType(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.modulationType:void 0}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&dC(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){return this._getOscType(this._oscillator,"fm")?this._oscillator.modulationIndex:void 0}get harmonicity(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.harmonicity:void 0}get modulationFrequency(){return this._getOscType(this._oscillator,"pwm")?this._oscillator.modulationFrequency:void 0}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){return jS(this,e)}))}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}function QS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=new WeakMap;return function(r,o){Reflect.defineProperty(r,o,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){tC(r,e,t),n.set(this,r)}})}}function ZS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=new WeakMap;return function(r,o){Reflect.defineProperty(r,o,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){tC(this.toSeconds(r),e,t),n.set(this,r)}})}}class JS extends IS{constructor(){super(CC(JS.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=CC(JS.getDefaults(),arguments,["url","onload"]);this._buffer=new UC({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(IS.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:qC,onerror:qC,playbackRate:1,reverse:!1})}load(e){return(0,i.kH)(this,void 0,void 0,(function*(){return yield this._buffer.load(e),this._onload(),this}))}_onload(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:qC)(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),0!==this._activeSources.size||this._synced||"started"!==this._state.getValueAtTime(this.now())||(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,n){return super.start(e,t,n),this}_start(e,t,n){t=this._loop?SC(t,this._loopStart):SC(t,0);const r=this.toSeconds(t),o=n;n=SC(n,Math.max(this._buffer.duration-r,0));let i=this.toSeconds(n);i/=this._playbackRate,e=this.toSeconds(e);const a=new LS({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);this._loop||this._synced||(this._state.cancel(e+i),this._state.setStateAtTime("stopped",e+i,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&iC(o)?a.start(e,r):a.start(e,r,i-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach((e=>e.stop(t)))}restart(e,t,n){return super.restart(e,t,n),this}_restart(e,t,n){this._stop(e),this._start(e,t,n)}seek(e,t){const n=this.toSeconds(t);if("started"===this._state.getValueAtTime(n)){const t=this.toSeconds(e);this._stop(n),this._start(n,t)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&tC(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach((t=>{t.loopStart=e}))}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&tC(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach((t=>{t.loopEnd=e}))}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach((t=>{t.loop=e})),e)){const e=this._state.getNextState("stopped",this.now());e&&this._state.cancel(e.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),n=this._state.getNextState("stopped",t);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach((e=>e.cancelStop()))),this._activeSources.forEach((n=>{n.playbackRate.setValueAtTime(e,t)}))}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach((e=>e.dispose())),this._activeSources.clear(),this._buffer.dispose(),this}}(0,i.UN)([ZS(0)],JS.prototype,"fadeIn",void 0),(0,i.UN)([ZS(0)],JS.prototype,"fadeOut",void 0);class ek extends dS{constructor(){super(CC(ek.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new yS({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=CC(ek.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(dS.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(dC(e))return e;{let n;for(n in tk)if(tk[n][t]===e)return n;return e}}_setCurve(e,t,n){if(dC(n)&&Reflect.has(tk,n)){const r=tk[n];cC(r)?"_decayCurve"!==e&&(this[e]=r[t]):this[e]=r}else{if(!uC(n)||"_decayCurve"===e)throw new Error("Envelope: invalid curve: "+n);this[e]=n}}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._decayCurve}set decayCurve(e){eC(["linear","exponential"].some((t=>t===e)),"Invalid envelope curve: ".concat(e)),this._decayCurve=e}triggerAttack(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.log("triggerAttack",e,t),e=this.toSeconds(e);let n=this.toSeconds(this.attack);const r=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){n=(1-o)/(1/n)}if(n<this.sampleTime)this._sig.cancelScheduledValues(e),this._sig.setValueAtTime(t,e);else if("linear"===this._attackCurve)this._sig.linearRampTo(t,n,e);else if("exponential"===this._attackCurve)this._sig.targetRampTo(t,n,e);else{this._sig.cancelAndHoldAtTime(e);let r=this._attackCurve;for(let e=1;e<r.length;e++)if(r[e-1]<=o&&o<=r[e]){r=this._attackCurve.slice(e),r[0]=o;break}this._sig.setValueCurveAtTime(r,e,n,t)}if(r&&this.sustain<1){const o=t*this.sustain,i=e+n;this.log("decay",i),"linear"===this._decayCurve?this._sig.linearRampToValueAtTime(o,r+i):this._sig.exponentialApproachValueAtTime(o,i,r)}return this}triggerRelease(e){this.log("triggerRelease",e),e=this.toSeconds(e);const t=this.getValueAtTime(e);if(t>0){const n=this.toSeconds(this.release);n<this.sampleTime?this._sig.setValueAtTime(0,e):"linear"===this._releaseCurve?this._sig.linearRampTo(0,n,e):"exponential"===this._releaseCurve?this._sig.targetRampTo(0,n,e):(eC(uC(this._releaseCurve),"releaseCurve must be either 'linear', 'exponential' or an array"),this._sig.cancelAndHoldAtTime(e),this._sig.setValueCurveAtTime(this._releaseCurve,e,n,t))}return this}getValueAtTime(e){return this._sig.getValueAtTime(e)}triggerAttackRelease(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t=this.toSeconds(t),this.triggerAttack(t,n),this.triggerRelease(t+this.toSeconds(e)),this}cancel(e){return this._sig.cancelScheduledValues(this.toSeconds(e)),this}connect(e){return bS(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}asArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024;return(0,i.kH)(this,void 0,void 0,(function*(){const t=e/this.context.sampleRate,n=new WC(1,t,this.context.sampleRate),r=this.toSeconds(this.attack)+this.toSeconds(this.decay),o=r+this.toSeconds(this.release),i=.1*o,a=o+i,s=new this.constructor(Object.assign(this.get(),{attack:t*this.toSeconds(this.attack)/a,decay:t*this.toSeconds(this.decay)/a,release:t*this.toSeconds(this.release)/a,context:n}));s._sig.toDestination(),s.triggerAttackRelease(t*(r+i)/a,0);return(yield n.render()).getChannelData(0)}))}dispose(){return super.dispose(),this._sig.dispose(),this}}(0,i.UN)([ZS(0)],ek.prototype,"attack",void 0),(0,i.UN)([ZS(0)],ek.prototype,"decay",void 0),(0,i.UN)([QS(0,1)],ek.prototype,"sustain",void 0),(0,i.UN)([ZS(0)],ek.prototype,"release",void 0);const tk=(()=>{const e=128;let t,n;const r=[];for(t=0;t<e;t++)r[t]=Math.sin(t/127*(Math.PI/2));const o=[];for(t=0;t<127;t++){n=t/127;const e=Math.sin(n*(2*Math.PI)*6.4-Math.PI/2)+1;o[t]=e/10+.83*n}o[127]=1;const i=[];for(t=0;t<e;t++)i[t]=Math.ceil(t/127*5)/5;const a=[];for(t=0;t<e;t++)n=t/127,a[t]=.5*(1-Math.cos(Math.PI*n));const s=[];for(t=0;t<e;t++){n=t/127;const e=4*Math.pow(n,3)+.2,r=Math.cos(e*Math.PI*2*n);s[t]=Math.abs(r*(1-n))}function c(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=1-e[n];return t}return{bounce:{In:c(s),Out:s},cosine:{In:r,Out:(l=r,l.slice(0).reverse())},exponential:"exponential",linear:"linear",ripple:{In:o,Out:c(o)},sine:{In:a,Out:c(a)},step:{In:i,Out:c(i)}};var l})();class nk extends dS{constructor(){super(CC(nk.getDefaults(),arguments)),this._scheduledEvents=[],this._synced=!1,this._original_triggerAttack=this.triggerAttack,this._original_triggerRelease=this.triggerRelease;const e=CC(nk.getDefaults(),arguments);this._volume=this.output=new AS({context:this.context,volume:e.volume}),this.volume=this._volume.volume,HC(this,"volume")}static getDefaults(){return Object.assign(dS.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){var n=this;const r=this["_original_"+e]=this[e];this[e]=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];const a=o[t],s=n.context.transport.schedule((e=>{o[t]=e,r.apply(n,o)}),a);n._scheduledEvents.push(s)}}unsync(){return this._scheduledEvents.forEach((e=>this.context.transport.clear(e))),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this}triggerAttackRelease(e,t,n,r){const o=this.toSeconds(n),i=this.toSeconds(t);return this.triggerAttack(e,o,r),this.triggerRelease(o+i),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class rk extends nk{constructor(){super(CC(rk.getDefaults(),arguments));const e=CC(rk.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(nk.getDefaults(),{detune:0,onsilence:qC,portamento:0})}triggerAttack(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.log("triggerAttack",e,t,n);const r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,n),this.setNote(e,r),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const n=this.toSeconds(t),r=e instanceof oS?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(n)>.05){const e=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,e,n)}else this.frequency.setValueAtTime(r,n);return this}}(0,i.UN)([ZS(0)],rk.prototype,"portamento",void 0);class ok extends ek{constructor(){super(CC(ok.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new mS({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class ik extends rk{constructor(){super(CC(ik.getDefaults(),arguments)),this.name="Synth";const e=CC(ik.getDefaults(),arguments);this.oscillator=new YS(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new ok(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),HC(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(rk.getDefaults(),{envelope:Object.assign(kC(ek.getDefaults(),Object.keys(dS.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(kC(YS.getDefaults(),[...Object.keys(IS.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),0===this.envelope.sustain){const t=this.toSeconds(this.envelope.attack),n=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+t+n)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class ak extends ik{constructor(){super(CC(ak.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=CC(ak.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,HC(this,["oscillator","envelope"])}static getDefaults(){return xC(rk.getDefaults(),ik.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const n=this.toSeconds(t),r=this.toFrequency(e instanceof oS?e.toFrequency():e),o=r*this.octaves;return this.oscillator.frequency.setValueAtTime(o,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}(0,i.UN)([QS(0)],ak.prototype,"octaves",void 0),(0,i.UN)([ZS(0)],ak.prototype,"pitchDecay",void 0);const sk=new Set;function ck(e){sk.add(e)}function lk(e,t){const n='registerProcessor("'.concat(e,'", ').concat(t,")");sk.add(n)}ck('\n\t/**\n\t * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. \n\t */\n\tclass ToneAudioWorkletProcessor extends AudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\t\n\t\t\tsuper(options);\n\t\t\t/**\n\t\t\t * If the processor was disposed or not. Keep alive until it\'s disposed.\n\t\t\t */\n\t\t\tthis.disposed = false;\n\t\t \t/** \n\t\t\t * The number of samples in the processing block\n\t\t\t */\n\t\t\tthis.blockSize = 128;\n\t\t\t/**\n\t\t\t * the sample rate\n\t\t\t */\n\t\t\tthis.sampleRate = sampleRate;\n\n\t\t\tthis.port.onmessage = (event) => {\n\t\t\t\t// when it receives a dispose \n\t\t\t\tif (event.data === "dispose") {\n\t\t\t\t\tthis.disposed = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n');ck("\n\t/**\n\t * Abstract class for a single input/output processor. \n\t * has a 'generate' function which processes one sample at a time\n\t */\n\tclass SingleIOProcessor extends ToneAudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(Object.assign(options, {\n\t\t\t\tnumberOfInputs: 1,\n\t\t\t\tnumberOfOutputs: 1\n\t\t\t}));\n\t\t\t/**\n\t\t\t * Holds the name of the parameter and a single value of that\n\t\t\t * parameter at the current sample\n\t\t\t * @type { [name: string]: number }\n\t\t\t */\n\t\t\tthis.params = {}\n\t\t}\n\n\t\t/**\n\t\t * Generate an output sample from the input sample and parameters\n\t\t * @abstract\n\t\t * @param input number\n\t\t * @param channel number\n\t\t * @param parameters { [name: string]: number }\n\t\t * @returns number\n\t\t */\n\t\tgenerate(){}\n\n\t\t/**\n\t\t * Update the private params object with the \n\t\t * values of the parameters at the given index\n\t\t * @param parameters { [name: string]: Float32Array },\n\t\t * @param index number\n\t\t */\n\t\tupdateParams(parameters, index) {\n\t\t\tfor (const paramName in parameters) {\n\t\t\t\tconst param = parameters[paramName];\n\t\t\t\tif (param.length > 1) {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][index];\n\t\t\t\t} else {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Process a single frame of the audio\n\t\t * @param inputs Float32Array[][]\n\t\t * @param outputs Float32Array[][]\n\t\t */\n\t\tprocess(inputs, outputs, parameters) {\n\t\t\tconst input = inputs[0];\n\t\t\tconst output = outputs[0];\n\t\t\t// get the parameter values\n\t\t\tconst channelCount = Math.max(input && input.length || 0, output.length);\n\t\t\tfor (let sample = 0; sample < this.blockSize; sample++) {\n\t\t\t\tthis.updateParams(parameters, sample);\n\t\t\t\tfor (let channel = 0; channel < channelCount; channel++) {\n\t\t\t\t\tconst inputSample = input && input.length ? input[channel][sample] : 0;\n\t\t\t\t\toutput[channel][sample] = this.generate(inputSample, channel, this.params);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn !this.disposed;\n\t\t}\n\t};\n");ck("\n\t/**\n\t * A multichannel buffer for use within an AudioWorkletProcessor as a delay line\n\t */\n\tclass DelayLine {\n\t\t\n\t\tconstructor(size, channels) {\n\t\t\tthis.buffer = [];\n\t\t\tthis.writeHead = []\n\t\t\tthis.size = size;\n\n\t\t\t// create the empty channels\n\t\t\tfor (let i = 0; i < channels; i++) {\n\t\t\t\tthis.buffer[i] = new Float32Array(this.size);\n\t\t\t\tthis.writeHead[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Push a value onto the end\n\t\t * @param channel number\n\t\t * @param value number\n\t\t */\n\t\tpush(channel, value) {\n\t\t\tthis.writeHead[channel] += 1;\n\t\t\tif (this.writeHead[channel] > this.size) {\n\t\t\t\tthis.writeHead[channel] = 0;\n\t\t\t}\n\t\t\tthis.buffer[channel][this.writeHead[channel]] = value;\n\t\t}\n\n\t\t/**\n\t\t * Get the recorded value of the channel given the delay\n\t\t * @param channel number\n\t\t * @param delay number delay samples\n\t\t */\n\t\tget(channel, delay) {\n\t\t\tlet readHead = this.writeHead[channel] - Math.floor(delay);\n\t\t\tif (readHead < 0) {\n\t\t\t\treadHead += this.size;\n\t\t\t}\n\t\t\treturn this.buffer[channel][readHead];\n\t\t}\n\t}\n");const uk="feedback-comb-filter";lk(uk,'\n\tclass FeedbackCombFilterWorklet extends SingleIOProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(options);\n\t\t\tthis.delayLine = new DelayLine(this.sampleRate, options.channelCount || 2);\n\t\t}\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: "delayTime",\n\t\t\t\tdefaultValue: 0.1,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 1,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}, {\n\t\t\t\tname: "feedback",\n\t\t\t\tdefaultValue: 0.5,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 0.9999,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, channel, parameters) {\n\t\t\tconst delayedSample = this.delayLine.get(channel, parameters.delayTime * this.sampleRate);\n\t\t\tthis.delayLine.push(channel, input + delayedSample * parameters.feedback);\n\t\t\treturn delayedSample;\n\t\t}\n\t}\n');class dk extends nk{constructor(){super(CC(dk.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=CC(dk.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach((n=>{const r=parseInt(n,10);if(eC(fC(n)||sC(r)&&isFinite(r),"url key is neither a note or midi pitch: ".concat(n)),fC(n)){const r=new oS(this.context,n).toMidi();t[r]=e.urls[n]}else sC(r)&&isFinite(r)&&(t[r]=e.urls[r])})),this._buffers=new SS({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(nk.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:qC,onerror:qC,release:.1,urls:{}})}_findClosest(e){let t=0;for(;t<96;){if(this._buffers.has(e+t))return-t;if(this._buffers.has(e-t))return t;t++}throw new Error("No available buffers for note: ".concat(e))}triggerAttack(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return this.log("triggerAttack",e,t,n),Array.isArray(e)||(e=[e]),e.forEach((e=>{const r=eS(new oS(this.context,e).toFrequency()),o=Math.round(r),i=r-o,a=this._findClosest(o),s=o-a,c=this._buffers.get(s),l=QC(a+i),u=new LS({url:c,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:l}).connect(this.output);u.start(t,0,c.duration/l,n),uC(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(u),u.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const e=this._activeSources.get(o),t=e.indexOf(u);-1!==t&&e.splice(t,1)}}})),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach((e=>{const n=new oS(this.context,e).toMidi();if(this._activeSources.has(n)&&this._activeSources.get(n).length){const e=this._activeSources.get(n);t=this.toSeconds(t),e.forEach((e=>{e.stop(t)})),this._activeSources.set(n,[])}})),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach((e=>{for(;e.length;){e.shift().stop(t)}})),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=this.toSeconds(n);return this.triggerAttack(e,o,r),uC(t)?(eC(uC(e),"notes must be an array when duration is array"),e.forEach(((e,n)=>{const r=t[Math.min(n,t.length-1)];this.triggerRelease(e,o+this.toSeconds(r))}))):this.triggerRelease(e,o+this.toSeconds(t)),this}add(e,t,n){if(eC(fC(e)||isFinite(e),"note must be a pitch or midi: ".concat(e)),fC(e)){const r=new oS(this.context,e).toMidi();this._buffers.add(r,t,n)}else this._buffers.add(e,t,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach((e=>{e.forEach((e=>e.dispose()))})),this._activeSources.clear(),this}}(0,i.UN)([ZS(0)],dk.prototype,"attack",void 0),(0,i.UN)([ZS(0)],dk.prototype,"release",void 0);class fk extends dS{constructor(){super(Object.assign(CC(fk.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=CC(fk.getDefaults(),arguments,["pan"]);this.pan=new uS({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",HC(this,"pan")}static getDefaults(){return Object.assign(dS.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const hk="bit-crusher";lk(hk,"\n\tclass BitCrusherWorklet extends SingleIOProcessor {\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: \"bits\",\n\t\t\t\tdefaultValue: 12,\n\t\t\t\tminValue: 1,\n\t\t\t\tmaxValue: 16,\n\t\t\t\tautomationRate: 'k-rate'\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, _channel, parameters) {\n\t\t\tconst step = Math.pow(0.5, parameters.bits - 1);\n\t\t\tconst val = step * Math.floor(input / step + 0.5);\n\t\t\treturn val;\n\t\t}\n\t}\n");class pk extends dS{constructor(){super(CC(pk.getDefaults(),arguments,["solo"])),this.name="Solo";const e=CC(pk.getDefaults(),arguments,["solo"]);this.input=this.output=new mS({context:this.context}),pk._allSolos.has(this.context)||pk._allSolos.set(this.context,new Set),pk._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(dS.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),pk._allSolos.get(this.context).forEach((e=>e._updateSolo()))}get muted(){return 0===this.input.gain.value}_addSolo(){pk._soloed.has(this.context)||pk._soloed.set(this.context,new Set),pk._soloed.get(this.context).add(this)}_removeSolo(){pk._soloed.has(this.context)&&pk._soloed.get(this.context).delete(this)}_isSoloed(){return pk._soloed.has(this.context)&&pk._soloed.get(this.context).has(this)}_noSolos(){return!pk._soloed.has(this.context)||pk._soloed.has(this.context)&&0===pk._soloed.get(this.context).size}_updateSolo(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),pk._allSolos.get(this.context).delete(this),this._removeSolo(),this}}pk._allSolos=new Map,pk._soloed=new Map;class mk extends dS{constructor(){super(CC(mk.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=CC(mk.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new fk({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new AS({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,HC(this,["pan","volume"])}static getDefaults(){return Object.assign(dS.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class gk extends dS{constructor(){super(CC(gk.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=CC(gk.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new pk({solo:e.solo,context:this.context}),this._panVol=this.output=new mk({context:this.context,pan:e.pan,volume:e.volume,mute:e.mute,channelCount:e.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),HC(this,["pan","volume"])}static getDefaults(){return Object.assign(dS.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(e){return gk.buses.has(e)||gk.buses.set(e,new mS({context:this.context})),gk.buses.get(e)}send(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this._getBus(e),r=new mS({context:this.context,units:"decibels",gain:t});return this.connect(r),r.connect(n),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}gk.buses=new Map;class vk extends dS{constructor(){super(...arguments),this.name="Listener",this.positionX=new uS({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new uS({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new uS({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new uS({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new uS({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new uS({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new uS({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new uS({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new uS({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(dS.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}IC((e=>{e.listener=new vk({context:e})})),jC((e=>{e.listener.dispose()}));KC().transport;KC().destination,KC().destination;KC().listener;KC().draw;KC();const yk=[{note:"C4",duration:0},{note:"B3",duration:.2}],bk=[{note:"C5",duration:0},{note:"E5",duration:.2}];function _k(e,t){const n=KC().now(),r=(new ik).toDestination();e.forEach((e=>{r.triggerAttack(e.note,n+e.duration)})),r.triggerRelease("+".concat(t))}const wk=function(e){return r.useEffect((()=>{e.status&&("failed"==e.status?_k(yk,.3):"passed"==e.status&&_k(bk,.3))}),[e.status]),(0,Up.jsx)(Up.Fragment,{})};var xk=n(9144);const Ck=function(){const[e,t]=r.useState(!1),[n,o]=r.useState(!1),[i,a]=r.useState(""),[s,l]=r.useState(0),[u,d]=r.useState(!0),f=e=>{const[t,n]=r.useState(0);return r.useEffect((()=>{function e(){n(window.innerWidth)}return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[n]),t>e},h=f(490),p=f(400);return(0,Up.jsxs)("div",{className:"App",style:{minWidth:"310px",margin:"auto"},children:[(0,Up.jsx)(Cy,{reload_timeout_s:3}),(0,Up.jsxs)(Da,{fixedToTop:!0,style:{background:Ma.LIGHT_GRAY4,margin:"auto"},children:[(0,Up.jsxs)(Da.Group,{align:c.LEFT,children:[(0,Up.jsxs)(Da.Heading,{id:"main-heading",children:[(0,Up.jsx)("div",{className:"logo-smol"}),p&&(0,Up.jsx)("div",{children:(0,Up.jsx)("b",{children:h?"HardPy Operator Panel":"HardPy"})})]}),p&&(0,Up.jsx)(Da.Divider,{}),(0,Up.jsx)(Da.Heading,{id:"last-exec-heading",children:(0,Up.jsx)("div",{children:"Last run:"})}),(0,Up.jsxs)("div",{id:"glob-test-status",children:[(0,Up.jsx)(ty,{status:i}),e&&(0,Up.jsx)(wk,{status:i},"sound")]}),(0,Up.jsx)(Da.Divider,{})]}),(0,Up.jsx)(Da.Group,{align:c.RIGHT,children:(0,Up.jsx)(wa,{content:(0,Up.jsxs)(Un,{children:[(0,Up.jsx)(Ea,{shouldDismissPopover:!1,text:e?"Turn off the sound":"Turn on the sound",icon:e?"volume-up":"volume-off",id:"use_end_test_sound",onClick:()=>t(!e)}),(0,Up.jsx)(Ea,{shouldDismissPopover:!1,text:n?"Turn off the debug mode":"Turn on the debug mode",icon:"bug",id:"use_debug_info",onClick:()=>o(!n)})]}),children:(0,Up.jsx)(Ba,{className:"bp3-minimal",icon:"cog"})})})]}),(0,Up.jsx)("div",{className:me,style:{marginBottom:"60px"},children:(()=>{const{rows:e,state:t,loading:o,error:c}=(0,xk.Ud)({include_docs:!0});if(r.useEffect((()=>{"error"===t?d(!1):!1===u&&d(!0)}),[t]),o&&0===e.length)return(0,Up.jsx)(cn,{style:{marginTop:"60px"},children:(0,Up.jsx)(dn,{children:"Establishing a connection... \ud83e\uddd0\ud83d\udd0e"})});if("error"===t)return(0,Up.jsxs)(cn,{style:{marginTop:"60px"},children:[(0,Up.jsx)(dn,{children:"Database connection error. \ud83d\ude45\ud83c\udffd\u200d\u2640\ufe0f\ud83d\udeab"}),c&&(0,Up.jsx)("p",{children:c.message})]});if(0===e.length)return(0,Up.jsx)(cn,{style:{marginTop:"60px"},children:(0,Up.jsx)(dn,{children:"No entries in the database \ud83d\ude45\ud83c\udffd\u200d\u2640\ufe0f\ud83d\udeab"})});const f=e[0].doc,p=f.status;p&&p!=i&&a(p);const m=f.progress;return m&&m!=s&&l(m),(0,Up.jsx)("div",{style:{marginTop:"40px"},children:e.map((e=>(0,Up.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(h||!n)&&(0,Up.jsx)(cn,{style:{flexDirection:"column",padding:"20px",flexGrow:1,flexShrink:1,marginTop:"20px",marginBottom:"20px"},children:(0,Up.jsx)(vy,{db_state:e.doc,defaultClose:!h})}),n&&(0,Up.jsx)(cn,{style:{flexDirection:"column",padding:"20px",marginTop:"20px",marginBottom:"20px"},children:(0,Up.jsx)("pre",{children:JSON.stringify(e.doc,null,2)})})]},e.id)))})})()}),(0,Up.jsxs)("div",{className:ge,style:{width:"100%",display:"flex",flexDirection:"row",position:"fixed",bottom:0,background:Ma.LIGHT_GRAY5,margin:"auto"},children:[(0,Up.jsx)("div",{style:{flexDirection:"column",flexGrow:1,flexShrink:1,marginTop:"auto",marginBottom:"auto",padding:"20px"},children:(0,Up.jsx)(_y,{percentage:s,status:i})}),(0,Up.jsx)("div",{style:{flexDirection:"column"},children:(0,Up.jsx)($p,{testing_status:i,is_authenticated:u})})]})]})}},5332:(e,t,n)=>{"use strict";n.a(e,(async(e,t)=>{try{var r=n(9060),o=n(1180),i=n(88),a=n(9144),s=(n(5952),n(1856)),c=n(9932),l=n(2496);const e=o.createRoot(document.getElementById("root")),u=await fetch("/api/couch").then((e=>e.json())).then((e=>"".concat(e.connection_str,"/statestore"))).catch((e=>{console.error(e)}));if(void 0!==u){const t=new i.c(u);e.render((0,l.jsx)(r.StrictMode,{children:(0,l.jsx)(a.C_,{pouchdb:t,children:(0,l.jsx)(s.c,{})})}))}else e.render((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h1",{children:"No PouchDB sync URL"}),(0,l.jsx)("p",{children:"Getting the URL from a backend was failed"})]}));console.log=function(){},console.debug=function(){},(0,c.c)(),t()}catch(u){t(u)}}),1)},9932:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});const r=e=>{e&&e instanceof Function&&n.e(808).then(n.bind(n,8808)).then((t=>{let{getCLS:n,getFID:r,getFCP:o,getLCP:i,getTTFB:a}=t;n(e),r(e),o(e),i(e),a(e)}))}},5384:(e,t,n)=>{"use strict";var r;n.d(t,{L:()=>r}),function(e){e[e.STANDARD=16]="STANDARD",e[e.LARGE=20]="LARGE"}(r||(r={}))},2768:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});const r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},9528:function(e,t,n){!function(e,t,n,r){"use strict";var o=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},i=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},a=function(e,t){return{startTime:t,type:"setValue",value:e}},s=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},c=function(e,t,n){var r=n.startTime,o=n.target,i=n.timeConstant;return o+(t-o)*Math.exp((r-e)/i)},l=function(e){return"exponentialRampToValue"===e.type},u=function(e){return"linearRampToValue"===e.type},d=function(e){return l(e)||u(e)},f=function(e){return"setValue"===e.type},h=function(e){return"setValueCurve"===e.type},p=function e(t,n,r,o){var i=t[n];return void 0===i?o:d(i)||f(i)?i.value:h(i)?i.values[i.values.length-1]:c(r,e(t,n-1,i.startTime,o),i)},m=function(e,t,n,r,o){return void 0===n?[r.insertTime,o]:d(n)?[n.endTime,n.value]:f(n)?[n.startTime,n.value]:h(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,p(e,t-1,n.startTime,o)]},g=function(e){return"cancelAndHold"===e.type},v=function(e){return"cancelScheduledValues"===e.type},y=function(e){return g(e)||v(e)?e.cancelTime:l(e)||u(e)?e.endTime:e.startTime},b=function(e,t,n,r){var o=r.endTime,i=r.value;return n===i?i:0<n&&0<i||n<0&&i<0?n*Math.pow(i/n,(e-t)/(o-t)):0},_=function(e,t,n,r){return n+(e-t)/(r.endTime-t)*(r.value-n)},w=function(e,t){var n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},x=function(e,t){var n=t.duration,r=t.startTime,o=t.values,i=(e-r)/n*(o.length-1);return w(o,i)},C=function(e){return"setTarget"===e.type},S=function(e){function w(e){n(this,w),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return r(w,[{key:e,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(e){var t=y(e);if(g(e)||v(e)){var n=this._automationEvents.findIndex((function(n){return v(e)&&h(n)?n.startTime+n.duration>=t:y(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),g(e)){var c=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&d(r)){if(void 0!==c&&C(c))throw new Error("The internal list is malformed.");var f=void 0===c?r.insertTime:h(c)?c.startTime+c.duration:y(c),p=void 0===c?this._defaultValue:h(c)?c.values[c.values.length-1]:c.value,m=l(r)?b(t,f,p,r):_(t,f,p,r),w=l(r)?o(m,t,this._currenTime):i(m,t,this._currenTime);this._automationEvents.push(w)}if(void 0!==c&&C(c)&&this._automationEvents.push(a(this.getValue(t),t)),void 0!==c&&h(c)&&c.startTime+c.duration>t){var x=t-c.startTime,S=(c.values.length-1)/c.duration,k=Math.max(2,1+Math.ceil(x*S)),E=x/(k-1)*S,O=c.values.slice(0,k);if(E<1)for(var T=1;T<k;T+=1){var A=E*T%1;O[T]=c.values[T-1]*(1-A)+c.values[T]*A}this._automationEvents[this._automationEvents.length-1]=s(O,c.startTime,x)}}}else{var R=this._automationEvents.findIndex((function(e){return y(e)>t})),P=-1===R?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[R-1];if(void 0!==P&&h(P)&&y(P)+P.duration>t)return!1;var N=l(e)?o(e.value,e.endTime,this._currenTime):u(e)?i(e.value,t,this._currenTime):e;if(-1===R)this._automationEvents.push(N);else{if(h(e)&&t+e.duration>y(this._automationEvents[R]))return!1;this._automationEvents.splice(R,0,N)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return y(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];C(r)&&n.unshift(a(p(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var n=this._automationEvents.findIndex((function(t){return y(t)>e})),r=this._automationEvents[n],o=(-1===n?this._automationEvents.length:n)-1,i=this._automationEvents[o];if(void 0!==i&&C(i)&&(void 0===r||!d(r)||r.insertTime>e))return c(e,p(this._automationEvents,o-1,i.startTime,this._defaultValue),i);if(void 0!==i&&f(i)&&(void 0===r||!d(r)))return i.value;if(void 0!==i&&h(i)&&(void 0===r||!d(r)||i.startTime+i.duration>e))return e<i.startTime+i.duration?x(e,i):i.values[i.values.length-1];if(void 0!==i&&d(i)&&(void 0===r||!d(r)))return i.value;if(void 0!==r&&l(r)){var a=m(this._automationEvents,o,i,r,this._defaultValue),s=t(a,2),g=s[0],v=s[1];return b(e,g,v,r)}if(void 0!==r&&u(r)){var w=m(this._automationEvents,o,i,r,this._defaultValue),S=t(w,2),k=S[0],E=S[1];return _(e,k,E,r)}return this._defaultValue}}]),w}(Symbol.iterator),k=function(e){return{cancelTime:e,type:"cancelAndHold"}},E=function(e){return{cancelTime:e,type:"cancelScheduledValues"}},O=function(e,t){return{endTime:t,type:"exponentialRampToValue",value:e}},T=function(e,t){return{endTime:t,type:"linearRampToValue",value:e}},A=function(e,t,n){return{startTime:t,target:e,timeConstant:n,type:"setTarget"}};e.AutomationEventList=S,e.createCancelAndHoldAutomationEvent=k,e.createCancelScheduledValuesAutomationEvent=E,e.createExponentialRampToValueAutomationEvent=O,e.createLinearRampToValueAutomationEvent=T,e.createSetTargetAutomationEvent=A,e.createSetValueAutomationEvent=a,e.createSetValueCurveAutomationEvent=s}(t,n(7936),n(4064),n(6024))},6536:(e,t,n)=>{e.exports=n(8500)},7280:(e,t,n)=>{"use strict";var r=n(8876),o=n(3584),i=n(7836),a=n(8220),s=n(2896),c=n(2524),l=n(4768),u=n(5172),d=n(5076),f=n(6072),h=n(1320);e.exports=function(e){return new Promise((function(t,n){var p,m=e.data,g=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(_+":"+w)}var x=s(e.baseURL,e.url);function C(){if(b){var r="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};o((function(e){t(e),y()}),(function(e){n(e),y()}),i),b=null}}if(b.open(e.method.toUpperCase(),a(x,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=C:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(C)},b.onabort=function(){b&&(n(new d("Request aborted",d.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||l(x))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in b&&r.forEach(g,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&"json"!==v&&(b.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){b&&(n(!e||e&&e.type?new f:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),m||(m=null);var k=h(x);k&&-1===["http","https","file"].indexOf(k)?n(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,e)):b.send(m)}))}},8500:(e,t,n)=>{"use strict";var r=n(8876),o=n(9264),i=n(9092),a=n(4443);var s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(2972));s.Axios=i,s.CanceledError=n(6072),s.CancelToken=n(5955),s.isCancel=n(568),s.VERSION=n(776).version,s.toFormData=n(1708),s.AxiosError=n(5076),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(184),s.isAxiosError=n(9248),e.exports=s,e.exports.default=s},5955:(e,t,n)=>{"use strict";var r=n(6072);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6072:(e,t,n)=>{"use strict";var r=n(5076);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(8876).inherits(o,r,{__CANCEL__:!0}),e.exports=o},568:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},9092:(e,t,n)=>{"use strict";var r=n(8876),o=n(8220),i=n(5316),a=n(4496),s=n(4443),c=n(2896),l=n(3248),u=l.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,c=[];if(this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(c),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var f=t;r.length;){var h=r.shift(),p=r.shift();try{f=h(f)}catch(m){p(m);break}}try{i=a(f)}catch(m){return Promise.reject(m)}for(;c.length;)i=i.then(c.shift(),c.shift());return i},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=c(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},5076:(e,t,n)=>{"use strict";var r=n(8876);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,a,s,c){var l=Object.create(i);return r.toFlatObject(e,l,(function(e){return e!==Error.prototype})),o.call(l,e.message,t,n,a,s),l.name=e.name,c&&Object.assign(l,c),l},e.exports=o},5316:(e,t,n)=>{"use strict";var r=n(8876);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},2896:(e,t,n)=>{"use strict";var r=n(6696),o=n(5544);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},4496:(e,t,n)=>{"use strict";var r=n(8876),o=n(3696),i=n(568),a=n(2972),s=n(6072);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},4443:(e,t,n)=>{"use strict";var r=n(8876);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},3584:(e,t,n)=>{"use strict";var r=n(5076);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},3696:(e,t,n)=>{"use strict";var r=n(8876),o=n(2972);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},2972:(e,t,n)=>{"use strict";var r=n(8876),o=n(732),i=n(5076),a=n(5172),s=n(1708),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={transitional:a,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(7280)),e}(),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),a=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===a){var c=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,c&&new c)}return i||"application/json"===a?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw i.from(s,i.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(8656)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(c)})),e.exports=u},5172:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},776:e=>{e.exports={version:"0.27.2"}},9264:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},8220:(e,t,n)=>{"use strict";var r=n(8876);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},5544:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},7836:(e,t,n)=>{"use strict";var r=n(8876);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},6696:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9248:(e,t,n)=>{"use strict";var r=n(8876);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},4768:(e,t,n)=>{"use strict";var r=n(8876);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},732:(e,t,n)=>{"use strict";var r=n(8876);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},8656:e=>{e.exports=null},2524:(e,t,n)=>{"use strict";var r=n(8876),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},1320:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},184:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},1708:(e,t,n)=>{"use strict";var r=n(8876);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,a){if(r.isPlainObject(i)||r.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+a);n.push(i),r.forEach(i,(function(n,i){if(!r.isUndefined(n)){var s,c=a?a+"."+i:i;if(n&&!a&&"object"===typeof n)if(r.endsWith(i,"{}"))n=JSON.stringify(n);else if(r.endsWith(i,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(c,o(e))}));e(n,c)}})),n.pop()}else t.append(a,o(i))}(e),t}},3248:(e,t,n)=>{"use strict";var r=n(776).version,o=n(5076),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],s=t[a];if(s){var c=e[a],l=void 0===c||s(c,a,e);if(!0!==l)throw new o("option "+a+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},8876:(e,t,n)=>{"use strict";var r,o=n(9264),i=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function c(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}var u=s("ArrayBuffer");function d(e){return null!==e&&"object"===typeof e}function f(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),p=s("File"),m=s("Blob"),g=s("FileList");function v(e){return"[object Function]"===i.call(e)}var y=s("URLSearchParams");function b(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var _,w=(_="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return _&&e instanceof _});e.exports={isArray:c,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||i.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:d,isPlainObject:f,isUndefined:l,isDate:h,isFile:p,isBlob:m,isFunction:v,isStream:function(e){return d(e)&&v(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:b,merge:function e(){var t={};function n(n,r){f(t[r])&&f(n)?t[r]=e(t[r],n):f(n)?t[r]=e({},n):c(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"===typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,i,a={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:w,isFileList:g}},8380:e=>{"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"===typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,a,l;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"===typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"===typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var l=c.length,u=p(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4084:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}},784:(e,t,n)=>{"use strict";var r=n(3904),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<a.length;++g){var v=a[g];if(!i[v]&&(!r||!r[v])&&(!m||!m[v])&&(!s||!s[v])){var y=f(n,v);try{l(t,v,y)}catch(b){}}}}return t}},4744:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case m:case c:return e;default:return t}}case o:return t}}}function x(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return x(e)||w(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===_||e.$$typeof===v)},t.typeOf=w},3904:(e,t,n)=>{"use strict";e.exports=n(4744)},2360:(e,t,n)=>{"use strict";var r,o,i,a=[n(6512),n(7580),n(6780),n(272),n(2092),n(4707)],s=-1,c=[],l=!1;function u(){r&&o&&(r=!1,o.length?c=o.concat(c):s=-1,c.length&&d())}function d(){if(!r){l=!1,r=!0;for(var e=c.length,t=setTimeout(u);e;){for(o=c,c=[];o&&++s<e;)o[s].run();s=-1,e=c.length}o=null,s=-1,r=!1,clearTimeout(t)}}for(var f=-1,h=a.length;++f<h;)if(a[f]&&a[f].test&&a[f].test()){i=a[f].install(d);break}function p(e,t){this.fun=e,this.array=t}p.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},e.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),l||r||(l=!0,i())}},272:(e,t,n)=>{"use strict";t.test=function(){return!n.g.setImmediate&&"undefined"!==typeof n.g.MessageChannel},t.install=function(e){var t=new n.g.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}},6780:(e,t,n)=>{"use strict";var r=n.g.MutationObserver||n.g.WebKitMutationObserver;t.test=function(){return r},t.install=function(e){var t=0,o=new r(e),i=n.g.document.createTextNode("");return o.observe(i,{characterData:!0}),function(){i.data=t=++t%2}}},7580:(e,t,n)=>{"use strict";t.test=function(){return"function"===typeof n.g.queueMicrotask},t.install=function(e){return function(){n.g.queueMicrotask(e)}}},2092:(e,t,n)=>{"use strict";t.test=function(){return"document"in n.g&&"onreadystatechange"in n.g.document.createElement("script")},t.install=function(e){return function(){var t=n.g.document.createElement("script");return t.onreadystatechange=function(){e(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},n.g.document.documentElement.appendChild(t),e}}},4707:(e,t)=>{"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},4104:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",c=16,l=32,u=64,d=128,f=256,h=1/0,p=9007199254740991,m=NaN,g=4294967295,v=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",l],["partialRight",u],["rearg",f]],y="[object Arguments]",b="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",C="[object Function]",S="[object GeneratorFunction]",k="[object Map]",E="[object Number]",O="[object Object]",T="[object Promise]",A="[object RegExp]",R="[object Set]",P="[object String]",N="[object Symbol]",D="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",V="[object Uint8ClampedArray]",q="[object Uint16Array]",U="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,Y=RegExp(K.source),Q=RegExp(X.source),Z=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),ae=/^\s+/,se=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="['\u2019]",Ne="["+Se+"]",De="["+Re+"]",Me="["+ke+"]",Ie="\\d+",Le="["+Ee+"]",je="["+Oe+"]",Fe="[^"+Se+Re+Ie+Ee+Oe+Te+"]",Be="\\ud83c[\\udffb-\\udfff]",ze="[^"+Se+"]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Te+"]",Ue="\\u200d",We="(?:"+je+"|"+Fe+")",$e="(?:"+qe+"|"+Fe+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ke="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Xe="(?:"+Me+"|"+Be+")"+"?",Ye="["+Ae+"]?",Qe=Ye+Xe+("(?:"+Ue+"(?:"+[ze,He,Ve].join("|")+")"+Ye+Xe+")*"),Ze="(?:"+[Le,He,Ve].join("|")+")"+Qe,Je="(?:"+[ze+Me+"?",Me,He,Ve,Ne].join("|")+")",et=RegExp(Pe,"g"),tt=RegExp(Me,"g"),nt=RegExp(Be+"(?="+Be+")|"+Je+Qe,"g"),rt=RegExp([qe+"?"+je+"+"+Ge+"(?="+[De,qe,"$"].join("|")+")",$e+"+"+Ke+"(?="+[De,qe+We,"$"].join("|")+")",qe+"?"+We+"+"+Ge,qe+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ze].join("|"),"g"),ot=RegExp("["+Ue+Se+ke+Ae+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ct={};ct[L]=ct[j]=ct[F]=ct[B]=ct[z]=ct[H]=ct[V]=ct[q]=ct[U]=!0,ct[y]=ct[b]=ct[M]=ct[_]=ct[I]=ct[w]=ct[x]=ct[C]=ct[k]=ct[E]=ct[O]=ct[A]=ct[R]=ct[P]=ct[D]=!1;var lt={};lt[y]=lt[b]=lt[M]=lt[I]=lt[_]=lt[w]=lt[L]=lt[j]=lt[F]=lt[B]=lt[z]=lt[k]=lt[E]=lt[O]=lt[A]=lt[R]=lt[P]=lt[N]=lt[H]=lt[V]=lt[q]=lt[U]=!0,lt[x]=lt[C]=lt[D]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||pt||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===gt,bt=yt&&ht.process,_t=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=_t&&_t.isArrayBuffer,xt=_t&&_t.isDate,Ct=_t&&_t.isMap,St=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function Ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Dt(e,t){return!!(null==e?0:e.length)&&qt(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Lt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function jt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Ft(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var zt=Gt("length");function Ht(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Vt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function qt(e,t,n){return t===t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Vt(e,Wt,n)}function Ut(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!==e}function $t(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:m}function Gt(e){return function(t){return null==t?o:t[e]}}function Kt(e){return function(t){return null==e?o:e[t]}}function Xt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Yt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Qt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Zt(e){return e?e.slice(0,gn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return It(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&qt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&qt(t,e[n],0)>-1;);return n}var on=Kt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ut[e]}function cn(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return cn(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):zt(e)}function mn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var vn=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,at))).Array,r=t.Date,se=t.Error,Se=t.Function,ke=t.Math,Ee=t.Object,Oe=t.RegExp,Te=t.String,Ae=t.TypeError,Re=n.prototype,Pe=Se.prototype,Ne=Ee.prototype,De=t["__core-js_shared__"],Me=Pe.toString,Ie=Ne.hasOwnProperty,Le=0,je=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Ne.toString,Be=Me.call(Ee),ze=mt._,He=Oe("^"+Me.call(Ie).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=yt?t.Buffer:o,qe=t.Symbol,Ue=t.Uint8Array,We=Ve?Ve.allocUnsafe:o,$e=un(Ee.getPrototypeOf,Ee),Ge=Ee.create,Ke=Ne.propertyIsEnumerable,Xe=Re.splice,Ye=qe?qe.isConcatSpreadable:o,Qe=qe?qe.iterator:o,Ze=qe?qe.toStringTag:o,Je=function(){try{var e=fi(Ee,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ot=r&&r.now!==mt.Date.now&&r.now,ut=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=ke.ceil,pt=ke.floor,gt=Ee.getOwnPropertySymbols,vt=Ve?Ve.isBuffer:o,bt=t.isFinite,_t=Re.join,zt=un(Ee.keys,Ee),Kt=ke.max,bn=ke.min,_n=r.now,wn=t.parseInt,xn=ke.random,Cn=Re.reverse,Sn=fi(t,"DataView"),kn=fi(t,"Map"),En=fi(t,"Promise"),On=fi(t,"Set"),Tn=fi(t,"WeakMap"),An=fi(Ee,"create"),Rn=Tn&&new Tn,Pn={},Nn=Fi(Sn),Dn=Fi(kn),Mn=Fi(En),In=Fi(On),Ln=Fi(Tn),jn=qe?qe.prototype:o,Fn=jn?jn.valueOf:o,Bn=jn?jn.toString:o;function zn(e){if(ts(e)&&!Ua(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Ie.call(e,"__wrapped__"))return Bi(e)}return new qn(e)}var Hn=function(){function e(){}return function(t){if(!es(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Vn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new $n(e);this.size=t.size}function Yn(e,t){var n=Ua(e),r=!n&&qa(e),o=!n&&!r&&Ka(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Qt(e.length,Te):[],c=s.length;for(var l in e)!t&&!Ie.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||bi(l,c))||s.push(l);return s}function Qn(e){var t=e.length;return t?e[Kr(0,t-1)]:o}function Zn(e,t){return Ii(Ro(e),sr(t,0,e.length))}function Jn(e){return Ii(Ro(e))}function er(e,t,n){(n!==o&&!za(e[t],n)||n===o&&!(t in e))&&ir(e,t,n)}function tr(e,t,n){var r=e[t];Ie.call(e,t)&&za(r,n)&&(n!==o||t in e)||ir(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function or(e,t){return e&&Po(t,Ps(t),e)}function ir(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,i=t.length,a=n(i),s=null==e;++r<i;)a[r]=s?o:Es(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function cr(e,t,n,r,i,a){var s,c=1&t,l=2&t,u=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!es(e))return e;var d=Ua(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Ro(e,s)}else{var f=mi(e),h=f==C||f==S;if(Ka(e))return So(e,c);if(f==O||f==y||h&&!i){if(s=l||h?{}:vi(e),!c)return l?function(e,t){return Po(e,pi(e),t)}(e,function(e,t){return e&&Po(t,Ns(t),e)}(s,e)):function(e,t){return Po(e,hi(e),t)}(e,or(s,e))}else{if(!lt[f])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return ko(e);case _:case w:return new r(+e);case I:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case j:case F:case B:case z:case H:case V:case q:case U:return Eo(e,n);case k:return new r;case E:case P:return new r(e);case A:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case N:return o=e,Fn?Ee(Fn.call(o)):{}}var o}(e,f,c)}}a||(a=new Xn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(cr(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,o){s.set(o,cr(r,t,n,o,e,a))}));var m=d?o:(u?l?ii:oi:l?Ns:Ps)(e);return At(m||e,(function(r,o){m&&(r=e[o=r]),tr(s,o,cr(r,t,n,o,e,a))})),s}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ae(i);return Pi((function(){e.apply(o,n)}),t)}function dr(e,t,n,r){var o=-1,i=Dt,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=It(t,Jt(n))),r?(i=Mt,a=!1):t.length>=200&&(i=tn,a=!1,t=new Kn(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d===d){for(var f=l;f--;)if(t[f]===d)continue e;c.push(u)}else i(t,d,r)||c.push(u)}return c}zn.templateSettings={escape:Z,evaluate:J,interpolate:ee,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,qn.prototype=Hn(Vn.prototype),qn.prototype.constructor=qn,Un.prototype=Hn(Vn.prototype),Un.prototype.constructor=Un,Wn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===a?o:n}return Ie.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==o:Ie.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===o?a:t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,!0)},$n.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?o:t[n][1]},$n.prototype.has=function(e){return nr(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(kn||$n),string:new Wn}},Gn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return ui(this,e).get(e)},Gn.prototype.has=function(e){return ui(this,e).has(e)},Gn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new $n,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var fr=Mo(_r),hr=Mo(wr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function mr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(c===o?s===s&&!cs(s):n(s,c)))var c=s,l=a}return l}function gr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function vr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=yi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?vr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var yr=Io(),br=Io(!0);function _r(e,t){return e&&yr(e,t,Ps)}function wr(e,t){return e&&br(e,t,Ps)}function xr(e,t){return Nt(t,(function(t){return Qa(e[t])}))}function Cr(e,t){for(var n=0,r=(t=_o(t,e)).length;null!=e&&n<r;)e=e[ji(t[n++])];return n&&n==r?e:o}function Sr(e,t,n){var r=t(e);return Ua(e)?r:Lt(r,n(e))}function kr(e){return null==e?e===o?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=Ie.call(e,Ze),n=e[Ze];try{e[Ze]=o;var r=!0}catch(a){}var i=Fe.call(e);r&&(t?e[Ze]=n:delete e[Ze]);return i}(e):function(e){return Fe.call(e)}(e)}function Er(e,t){return e>t}function Or(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(e)}function Ar(e,t,r){for(var i=r?Mt:Dt,a=e[0].length,s=e.length,c=s,l=n(s),u=1/0,d=[];c--;){var f=e[c];c&&t&&(f=It(f,Jt(t))),u=bn(f.length,u),l[c]=!r&&(t||a>=120&&f.length>=120)?new Kn(c&&f):o}f=e[0];var h=-1,p=l[0];e:for(;++h<a&&d.length<u;){var m=f[h],g=t?t(m):m;if(m=r||0!==m?m:0,!(p?tn(p,g):i(d,g,r))){for(c=s;--c;){var v=l[c];if(!(v?tn(v,g):i(e[c],g,r)))continue e}p&&p.push(g),d.push(m)}}return d}function Rr(e,t,n){var r=null==(e=Ti(e,t=_o(t,e)))?e:e[ji(Yi(t))];return null==r?o:Ot(r,e,n)}function Pr(e){return ts(e)&&kr(e)==y}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,i,a){var s=Ua(e),c=Ua(t),l=s?b:mi(e),u=c?b:mi(t),d=(l=l==y?O:l)==O,f=(u=u==y?O:u)==O,h=l==u;if(h&&Ka(e)){if(!Ka(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Xn),s||ls(e)?ni(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!i(new Ue(e),new Ue(t)));case _:case w:case E:return za(+e,+t);case x:return e.name==t.name&&e.message==t.message;case A:case P:return e==t+"";case k:var s=ln;case R:var c=1&r;if(s||(s=fn),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var u=ni(s(e),s(t),r,o,i,a);return a.delete(e),u;case N:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,l,n,r,i,a);if(!(1&n)){var p=d&&Ie.call(e,"__wrapped__"),m=f&&Ie.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,v=m?t.value():t;return a||(a=new Xn),i(g,v,n,r,a)}}if(!h)return!1;return a||(a=new Xn),function(e,t,n,r,i,a){var s=1&n,c=oi(e),l=c.length,u=oi(t),d=u.length;if(l!=d&&!s)return!1;var f=l;for(;f--;){var h=c[f];if(!(s?h in t:Ie.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var g=!0;a.set(e,t),a.set(t,e);var v=s;for(;++f<l;){var y=e[h=c[f]],b=t[h];if(r)var _=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(_===o?y===b||i(y,b,n,r,a):_)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return a.delete(e),a.delete(t),g}(e,t,n,r,i,a)}(e,t,n,r,Nr,i))}function Dr(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Ee(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var l=(c=n[i])[0],u=e[l],d=c[1];if(s&&c[2]){if(u===o&&!(l in e))return!1}else{var f=new Xn;if(r)var h=r(u,d,l,e,t,f);if(!(h===o?Nr(d,u,3,r,f):h))return!1}}return!0}function Mr(e){return!(!es(e)||(t=e,je&&je in t))&&(Qa(e)?He:ye).test(Fi(e));var t}function Ir(e){return"function"==typeof e?e:null==e?rc:"object"==typeof e?Ua(e)?Hr(e[0],e[1]):zr(e):fc(e)}function Lr(e){if(!Si(e))return zt(e);var t=[];for(var n in Ee(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=Si(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function Br(e,t){var r=-1,o=$a(e)?n(e.length):[];return fr(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function zr(e){var t=di(e);return 1==t.length&&t[0][2]?Ei(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Hr(e,t){return wi(e)&&ki(t)?Ei(ji(e),t):function(n){var r=Es(n,e);return r===o&&r===t?Os(n,e):Nr(t,r,3)}}function Vr(e,t,n,r,i){e!==t&&yr(t,(function(a,s){if(i||(i=new Xn),es(a))!function(e,t,n,r,i,a,s){var c=Ai(e,n),l=Ai(t,n),u=s.get(l);if(u)return void er(e,n,u);var d=a?a(c,l,n+"",e,t,s):o,f=d===o;if(f){var h=Ua(l),p=!h&&Ka(l),m=!h&&!p&&ls(l);d=l,h||p||m?Ua(c)?d=c:Ga(c)?d=Ro(c):p?(f=!1,d=So(l,!0)):m?(f=!1,d=Eo(l,!0)):d=[]:os(l)||qa(l)?(d=c,qa(c)?d=vs(c):es(c)&&!Qa(c)||(d=vi(l))):f=!1}f&&(s.set(l,d),i(d,l,r,a,s),s.delete(l));er(e,n,d)}(e,t,s,n,Vr,r,i);else{var c=r?r(Ai(e,s),a,s+"",e,t,i):o;c===o&&(c=a),er(e,s,c)}}),Ns)}function qr(e,t){var n=e.length;if(n)return bi(t+=t<0?n:0,n)?e[t]:o}function Ur(e,t,n){t=t.length?It(t,(function(e){return Ua(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[rc];var r=-1;t=It(t,Jt(li()));var o=Br(e,(function(e,n,o){var i=It(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r<a;){var c=Oo(o[r],i[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(i,_o(a,e),s)}return i}function $r(e,t,n,r){var o=r?Ut:qt,i=-1,a=t.length,s=e;for(e===t&&(t=Ro(t)),n&&(s=It(e,Jt(n)));++i<a;)for(var c=0,l=t[i],u=n?n(l):l;(c=o(s,u,c,r))>-1;)s!==e&&Xe.call(s,c,1),Xe.call(e,c,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;bi(o)?Xe.call(e,o,1):fo(e,o)}}return e}function Kr(e,t){return e+pt(xn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ni(Oi(e,t,rc),e+"")}function Qr(e){return Qn(zs(e))}function Zr(e,t){var n=zs(e);return Ii(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var i=-1,a=(t=_o(t,e)).length,s=a-1,c=e;null!=c&&++i<a;){var l=ji(t[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=s){var d=c[l];(u=r?r(d,l,c):o)===o&&(u=es(d)?d:bi(t[i+1])?[]:{})}tr(c,l,u),c=c[l]}return e}var eo=Rn?function(e,t){return Rn.set(e,t),e}:rc,to=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:rc;function no(e){return Ii(zs(e))}function ro(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o<i;)a[o]=e[o+t];return a}function oo(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function io(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t===t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ao(e,t,rc,n)}function ao(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,c=null===t,l=cs(t),u=t===o;i<a;){var d=pt((i+a)/2),f=n(e[d]),h=f!==o,p=null===f,m=f===f,g=cs(f);if(s)var v=r||m;else v=u?m&&(r||h):c?m&&h&&(r||!p):l?m&&h&&!p&&(r||!g):!p&&!g&&(r?f<=t:f<t);v?i=d+1:a=d}return bn(a,4294967294)}function so(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function co(e){return"number"==typeof e?e:cs(e)?m:+e}function lo(e){if("string"==typeof e)return e;if(Ua(e))return It(e,lo)+"";if(cs(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=Dt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=Mt;else if(i>=200){var l=t?null:Yo(e);if(l)return fn(l);a=!1,o=tn,c=new Kn}else c=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),s.push(u)}else o(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function fo(e,t){return null==(e=Ti(e,t=_o(t,e)))||delete e[ji(Yi(t))]}function ho(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function po(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ro(e,r?0:i,r?i+1:o):ro(e,r?i+1:0,r?o:i)}function mo(e,t){var n=e;return n instanceof Un&&(n=n.value()),jt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function go(e,t,r){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=n(o);++i<o;)for(var s=e[i],c=-1;++c<o;)c!=i&&(a[i]=dr(a[i]||s,e[c],t,r));return uo(vr(a,1),t,r)}function vo(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var c=r<a?t[r]:o;n(s,e[r],c)}return s}function yo(e){return Ga(e)?e:[]}function bo(e){return"function"==typeof e?e:rc}function _o(e,t){return Ua(e)?e:wi(e,t)?[e]:Li(ys(e))}var wo=Yr;function xo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:ro(e,t,n)}var Co=nt||function(e){return mt.clearTimeout(e)};function So(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Eo(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e===e,a=cs(e),s=t!==o,c=null===t,l=t===t,u=cs(t);if(!c&&!u&&!a&&e>t||a&&s&&l&&!c&&!u||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!l)return-1}return 0}function To(e,t,r,o){for(var i=-1,a=e.length,s=r.length,c=-1,l=t.length,u=Kt(a-s,0),d=n(l+u),f=!o;++c<l;)d[c]=t[c];for(;++i<s;)(f||i<a)&&(d[r[i]]=e[i]);for(;u--;)d[c++]=e[i++];return d}function Ao(e,t,r,o){for(var i=-1,a=e.length,s=-1,c=r.length,l=-1,u=t.length,d=Kt(a-c,0),f=n(d+u),h=!o;++i<d;)f[i]=e[i];for(var p=i;++l<u;)f[p+l]=t[l];for(;++s<c;)(h||i<a)&&(f[p+r[s]]=e[i++]);return f}function Ro(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Po(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=r?r(n[c],e[c],c,n,e):o;l===o&&(l=e[c]),i?ir(n,c,l):tr(n,c,l)}return n}function No(e,t){return function(n,r){var o=Ua(n)?Tt:rr,i=t?t():{};return o(n,e,li(r,2),i)}}function Do(e){return Yr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&_i(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ee(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))}function Mo(e,t){return function(n,r){if(null==n)return n;if(!$a(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function Lo(e){return function(t){var n=cn(t=ys(t))?mn(t):o,r=n?n[0]:t.charAt(0),i=n?xo(n,1).join(""):t.slice(1);return r[e]()+i}}function jo(e){return function(t){return jt(Qs(qs(t).replace(et,"")),e,"")}}function Fo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Bo(e){return function(t,n,r){var i=Ee(t);if(!$a(t)){var a=li(n,3);t=Ps(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function zo(e){return ri((function(t){var n=t.length,r=n,a=qn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ae(i);if(a&&!c&&"wrapper"==si(s))var c=new qn([],!0)}for(r=c?r:n;++r<n;){var l=si(s=t[r]),u="wrapper"==l?ai(s):o;c=u&&xi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[si(u[0])].apply(c,u[3]):1==s.length&&xi(s)?c[l]():c.thru(s)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ua(r))return c.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Ho(e,t,r,i,a,s,c,l,u,f){var h=t&d,p=1&t,m=2&t,g=24&t,v=512&t,y=m?o:Fo(e);return function d(){for(var b=arguments.length,_=n(b),w=b;w--;)_[w]=arguments[w];if(g)var x=ci(d),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(_,x);if(i&&(_=To(_,i,a,g)),s&&(_=Ao(_,s,c,g)),b-=C,g&&b<f){var S=dn(_,x);return Ko(e,t,Ho,d.placeholder,r,_,S,l,u,f-b)}var k=p?r:this,E=m?k[e]:e;return b=_.length,l?_=function(e,t){var n=e.length,r=bn(t.length,n),i=Ro(e);for(;r--;){var a=t[r];e[r]=bi(a,n)?i[a]:o}return e}(_,l):v&&b>1&&_.reverse(),h&&u<b&&(_.length=u),this&&this!==mt&&this instanceof d&&(E=y||Fo(E)),E.apply(k,_)}}function Vo(e,t){return function(n,r){return function(e,t,n,r){return _r(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function qo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=lo(n),r=lo(r)):(n=co(n),r=co(r)),i=e(n,r)}return i}}function Uo(e){return ri((function(t){return t=It(t,Jt(li())),Yr((function(n){var r=this;return e(t,(function(e){return Ot(e,r,n)}))}))}))}function Wo(e,t){var n=(t=t===o?" ":lo(t)).length;if(n<2)return n?Xr(t,e):t;var r=Xr(t,ht(e/pn(t)));return cn(t)?xo(mn(r),0,e).join(""):r.slice(0,e)}function $o(e){return function(t,r,i){return i&&"number"!=typeof i&&_i(t,r,i)&&(r=i=o),t=hs(t),r===o?(r=t,t=0):r=hs(r),function(e,t,r,o){for(var i=-1,a=Kt(ht((t-e)/(r||1)),0),s=n(a);a--;)s[o?a:++i]=e,e+=r;return s}(t,r,i=i===o?t<r?1:-1:hs(i),e)}}function Go(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Ko(e,t,n,r,i,a,s,c,d,f){var h=8&t;t|=h?l:u,4&(t&=~(h?u:l))||(t&=-4);var p=[e,t,i,h?a:o,h?s:o,h?o:a,h?o:s,c,d,f],m=n.apply(o,p);return xi(e)&&Ri(m,p),m.placeholder=r,Di(m,e,t)}function Xo(e){var t=ke[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yo=On&&1/fn(new On([,-0]))[1]==h?function(e){return new On(e)}:cc;function Qo(e){return function(t){var n=mi(t);return n==k?ln(t):n==R?hn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zo(e,t,r,a,h,p,m,g){var v=2&t;if(!v&&"function"!=typeof e)throw new Ae(i);var y=a?a.length:0;if(y||(t&=-97,a=h=o),m=m===o?m:Kt(ps(m),0),g=g===o?g:ps(g),y-=h?h.length:0,t&u){var b=a,_=h;a=h=o}var w=v?o:ai(e),x=[e,t,r,a,h,b,_,p,m,g];if(w&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?To(l,c,t[4]):c,e[4]=l?dn(e[3],s):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Ao(l,c,t[6]):c,e[6]=l?dn(e[5],s):t[6]);(c=t[7])&&(e[7]=c);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(x,w),e=x[0],t=x[1],r=x[2],a=x[3],h=x[4],!(g=x[9]=x[9]===o?v?0:e.length:Kt(x[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==c?function(e,t,r){var i=Fo(e);return function a(){for(var s=arguments.length,c=n(s),l=s,u=ci(a);l--;)c[l]=arguments[l];var d=s<3&&c[0]!==u&&c[s-1]!==u?[]:dn(c,u);return(s-=d.length)<r?Ko(e,t,Ho,a.placeholder,o,c,d,o,o,r-s):Ot(this&&this!==mt&&this instanceof a?i:e,this,c)}}(e,t,g):t!=l&&33!=t||h.length?Ho.apply(o,x):function(e,t,r,o){var i=1&t,a=Fo(e);return function t(){for(var s=-1,c=arguments.length,l=-1,u=o.length,d=n(u+c),f=this&&this!==mt&&this instanceof t?a:e;++l<u;)d[l]=o[l];for(;c--;)d[l++]=arguments[++s];return Ot(f,i?r:this,d)}}(e,t,r,a);else var C=function(e,t,n){var r=1&t,o=Fo(e);return function t(){return(this&&this!==mt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,r);return Di((w?eo:Ri)(C,x),e,t)}function Jo(e,t,n,r){return e===o||za(e,Ne[n])&&!Ie.call(r,n)?t:e}function ei(e,t,n,r,i,a){return es(e)&&es(t)&&(a.set(t,e),Vr(e,t,o,ei,a),a.delete(t)),e}function ti(e){return os(e)?o:e}function ni(e,t,n,r,i,a){var s=1&n,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=2&n?new Kn:o;for(a.set(e,t),a.set(t,e);++f<c;){var m=e[f],g=t[f];if(r)var v=s?r(g,m,f,t,e,a):r(m,g,f,e,t,a);if(v!==o){if(v)continue;h=!1;break}if(p){if(!Bt(t,(function(e,t){if(!tn(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(m!==g&&!i(m,g,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ri(e){return Ni(Oi(e,o,Wi),e+"")}function oi(e){return Sr(e,Ps,hi)}function ii(e){return Sr(e,Ns,pi)}var ai=Rn?function(e){return Rn.get(e)}:cc;function si(e){for(var t=e.name+"",n=Pn[t],r=Ie.call(Pn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ci(e){return(Ie.call(zn,"placeholder")?zn:e).placeholder}function li(){var e=zn.iteratee||oc;return e=e===oc?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function di(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ki(o)]}return t}function fi(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Mr(n)?n:o}var hi=gt?function(e){return null==e?[]:(e=Ee(e),Nt(gt(e),(function(t){return Ke.call(e,t)})))}:mc,pi=gt?function(e){for(var t=[];e;)Lt(t,hi(e)),e=$e(e);return t}:mc,mi=kr;function gi(e,t,n){for(var r=-1,o=(t=_o(t,e)).length,i=!1;++r<o;){var a=ji(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ja(o)&&bi(a,o)&&(Ua(e)||qa(e))}function vi(e){return"function"!=typeof e.constructor||Si(e)?{}:Hn($e(e))}function yi(e){return Ua(e)||qa(e)||!!(Ye&&e&&e[Ye])}function bi(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&_e.test(e))&&e>-1&&e%1==0&&e<t}function _i(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?$a(n)&&bi(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function wi(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ee(t))}function xi(e){var t=si(e),n=zn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ai(n);return!!r&&e===r[0]}(Sn&&mi(new Sn(new ArrayBuffer(1)))!=I||kn&&mi(new kn)!=k||En&&mi(En.resolve())!=T||On&&mi(new On)!=R||Tn&&mi(new Tn)!=D)&&(mi=function(e){var t=kr(e),n=t==O?e.constructor:o,r=n?Fi(n):"";if(r)switch(r){case Nn:return I;case Dn:return k;case Mn:return T;case In:return R;case Ln:return D}return t});var Ci=De?Qa:gc;function Si(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function ki(e){return e===e&&!es(e)}function Ei(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in Ee(n)))}}function Oi(e,t,r){return t=Kt(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Kt(o.length-t,0),s=n(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=n(t+1);++i<t;)c[i]=o[i];return c[t]=r(s),Ot(e,this,c)}}function Ti(e,t){return t.length<2?e:Cr(e,ro(t,0,-1))}function Ai(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ri=Mi(eo),Pi=ut||function(e,t){return mt.setTimeout(e,t)},Ni=Mi(to);function Di(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(v,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Mi(e){var t=0,n=0;return function(){var r=_n(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ii(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Kr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Li=function(e){var t=Ma(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(he,"$1"):n||e)})),t}));function ji(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fi(e){if(null!=e){try{return Me.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Bi(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ro(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zi=Yr((function(e,t){return Ga(e)?dr(e,vr(t,1,Ga,!0)):[]})),Hi=Yr((function(e,t){var n=Yi(t);return Ga(n)&&(n=o),Ga(e)?dr(e,vr(t,1,Ga,!0),li(n,2)):[]})),Vi=Yr((function(e,t){var n=Yi(t);return Ga(n)&&(n=o),Ga(e)?dr(e,vr(t,1,Ga,!0),o,n):[]}));function qi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ps(n);return o<0&&(o=Kt(r+o,0)),Vt(e,li(t,3),o)}function Ui(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ps(n),i=n<0?Kt(r+i,0):bn(i,r-1)),Vt(e,li(t,3),i,!0)}function Wi(e){return(null==e?0:e.length)?vr(e,1):[]}function $i(e){return e&&e.length?e[0]:o}var Gi=Yr((function(e){var t=It(e,yo);return t.length&&t[0]===e[0]?Ar(t):[]})),Ki=Yr((function(e){var t=Yi(e),n=It(e,yo);return t===Yi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Ar(n,li(t,2)):[]})),Xi=Yr((function(e){var t=Yi(e),n=It(e,yo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,o,t):[]}));function Yi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Qi=Yr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var Ji=ri((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,It(t,(function(e){return bi(e,n)?+e:e})).sort(Oo)),r}));function ea(e){return null==e?e:Cn.call(e)}var ta=Yr((function(e){return uo(vr(e,1,Ga,!0))})),na=Yr((function(e){var t=Yi(e);return Ga(t)&&(t=o),uo(vr(e,1,Ga,!0),li(t,2))})),ra=Yr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,uo(vr(e,1,Ga,!0),o,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=Nt(e,(function(e){if(Ga(e))return t=Kt(e.length,t),!0})),Qt(t,(function(t){return It(e,Gt(t))}))}function ia(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:It(n,(function(e){return Ot(t,o,e)}))}var aa=Yr((function(e,t){return Ga(e)?dr(e,t):[]})),sa=Yr((function(e){return go(Nt(e,Ga))})),ca=Yr((function(e){var t=Yi(e);return Ga(t)&&(t=o),go(Nt(e,Ga),li(t,2))})),la=Yr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,go(Nt(e,Ga),o,t)})),ua=Yr(oa);var da=Yr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ia(e,n)}));function fa(e){var t=zn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=ri((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&bi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var ma=No((function(e,t,n){Ie.call(e,n)?++e[n]:ir(e,n,1)}));var ga=Bo(qi),va=Bo(Ui);function ya(e,t){return(Ua(e)?At:fr)(e,li(t,3))}function ba(e,t){return(Ua(e)?Rt:hr)(e,li(t,3))}var _a=No((function(e,t,n){Ie.call(e,n)?e[n].push(t):ir(e,n,[t])}));var wa=Yr((function(e,t,r){var o=-1,i="function"==typeof t,a=$a(e)?n(e.length):[];return fr(e,(function(e){a[++o]=i?Ot(t,e,r):Rr(e,t,r)})),a})),xa=No((function(e,t,n){ir(e,n,t)}));function Ca(e,t){return(Ua(e)?It:Br)(e,li(t,3))}var Sa=No((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ka=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_i(e,t[0],t[1])?t=[]:n>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,vr(t,1),[])})),Ea=ot||function(){return mt.Date.now()};function Oa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Zo(e,d,o,o,o,o,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Ae(i);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Aa=Yr((function(e,t,n){var r=1;if(n.length){var o=dn(n,ci(Aa));r|=l}return Zo(e,r,t,n,o)})),Ra=Yr((function(e,t,n){var r=3;if(n.length){var o=dn(n,ci(Ra));r|=l}return Zo(t,r,e,n,o)}));function Pa(e,t,n){var r,a,s,c,l,u,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(i);function m(t){var n=r,i=a;return r=a=o,d=t,c=e.apply(i,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||h&&e-d>=s}function v(){var e=Ea();if(g(e))return y(e);l=Pi(v,function(e){var n=t-(e-u);return h?bn(n,s-(e-d)):n}(e))}function y(e){return l=o,p&&r?m(e):(r=a=o,c)}function b(){var e=Ea(),n=g(e);if(r=arguments,a=this,u=e,n){if(l===o)return function(e){return d=e,l=Pi(v,t),f?m(e):c}(u);if(h)return Co(l),l=Pi(v,t),m(u)}return l===o&&(l=Pi(v,t)),c}return t=gs(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?Kt(gs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&Co(l),d=0,r=u=a=l=o},b.flush=function(){return l===o?c:y(Ea())},b}var Na=Yr((function(e,t){return ur(e,1,t)})),Da=Yr((function(e,t,n){return ur(e,gs(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ma.Cache||Gn),n}function Ia(e){if("function"!=typeof e)throw new Ae(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var La=wo((function(e,t){var n=(t=1==t.length&&Ua(t[0])?It(t[0],Jt(li())):It(vr(t,1),Jt(li()))).length;return Yr((function(r){for(var o=-1,i=bn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Ot(e,this,r)}))})),ja=Yr((function(e,t){var n=dn(t,ci(ja));return Zo(e,l,o,t,n)})),Fa=Yr((function(e,t){var n=dn(t,ci(Fa));return Zo(e,u,o,t,n)})),Ba=ri((function(e,t){return Zo(e,f,o,o,o,t)}));function za(e,t){return e===t||e!==e&&t!==t}var Ha=Go(Er),Va=Go((function(e,t){return e>=t})),qa=Pr(function(){return arguments}())?Pr:function(e){return ts(e)&&Ie.call(e,"callee")&&!Ke.call(e,"callee")},Ua=n.isArray,Wa=wt?Jt(wt):function(e){return ts(e)&&kr(e)==M};function $a(e){return null!=e&&Ja(e.length)&&!Qa(e)}function Ga(e){return ts(e)&&$a(e)}var Ka=vt||gc,Xa=xt?Jt(xt):function(e){return ts(e)&&kr(e)==w};function Ya(e){if(!ts(e))return!1;var t=kr(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Qa(e){if(!es(e))return!1;var t=kr(e);return t==C||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Ct?Jt(Ct):function(e){return ts(e)&&mi(e)==k};function rs(e){return"number"==typeof e||ts(e)&&kr(e)==E}function os(e){if(!ts(e)||kr(e)!=O)return!1;var t=$e(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Be}var is=St?Jt(St):function(e){return ts(e)&&kr(e)==A};var as=kt?Jt(kt):function(e){return ts(e)&&mi(e)==R};function ss(e){return"string"==typeof e||!Ua(e)&&ts(e)&&kr(e)==P}function cs(e){return"symbol"==typeof e||ts(e)&&kr(e)==N}var ls=Et?Jt(Et):function(e){return ts(e)&&Ja(e.length)&&!!ct[kr(e)]};var us=Go(Fr),ds=Go((function(e,t){return e<=t}));function fs(e){if(!e)return[];if($a(e))return ss(e)?mn(e):Ro(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=mi(e);return(t==k?ln:t==R?fn:zs)(e)}function hs(e){return e?(e=gs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function ms(e){return e?sr(ps(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(cs(e))return m;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var n=ve.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):ge.test(e)?m:+e}function vs(e){return Po(e,Ns(e))}function ys(e){return null==e?"":lo(e)}var bs=Do((function(e,t){if(Si(t)||$a(t))Po(t,Ps(t),e);else for(var n in t)Ie.call(t,n)&&tr(e,n,t[n])})),_s=Do((function(e,t){Po(t,Ns(t),e)})),ws=Do((function(e,t,n,r){Po(t,Ns(t),e,r)})),xs=Do((function(e,t,n,r){Po(t,Ps(t),e,r)})),Cs=ri(ar);var Ss=Yr((function(e,t){e=Ee(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&_i(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Ns(a),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===o||za(d,Ne[u])&&!Ie.call(e,u))&&(e[u]=a[u])}return e})),ks=Yr((function(e){return e.push(o,ei),Ot(Ms,o,e)}));function Es(e,t,n){var r=null==e?o:Cr(e,t);return r===o?n:r}function Os(e,t){return null!=e&&gi(e,t,Tr)}var Ts=Vo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),ec(rc)),As=Vo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),li),Rs=Yr(Rr);function Ps(e){return $a(e)?Yn(e):Lr(e)}function Ns(e){return $a(e)?Yn(e,!0):jr(e)}var Ds=Do((function(e,t,n){Vr(e,t,n)})),Ms=Do((function(e,t,n,r){Vr(e,t,n,r)})),Is=ri((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=_o(t,e),r||(r=t.length>1),t})),Po(e,ii(e),n),r&&(n=cr(n,7,ti));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Ls=ri((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return Os(e,n)}))}(e,t)}));function js(e,t){if(null==e)return{};var n=It(ii(e),(function(e){return[e]}));return t=li(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Qo(Ps),Bs=Qo(Ns);function zs(e){return null==e?[]:en(e,Ps(e))}var Hs=jo((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Ys(ys(e).toLowerCase())}function qs(e){return(e=ys(e))&&e.replace(we,on).replace(tt,"")}var Us=jo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ws=jo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$s=Lo("toLowerCase");var Gs=jo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=jo((function(e,t,n){return e+(n?" ":"")+Ys(t)}));var Xs=jo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ys=Lo("toUpperCase");function Qs(e,t,n){return e=ys(e),(t=n?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Zs=Yr((function(e,t){try{return Ot(e,o,t)}catch(n){return Ya(n)?n:new se(n)}})),Js=ri((function(e,t){return At(t,(function(t){t=ji(t),ir(e,t,Aa(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=zo(),nc=zo(!0);function rc(e){return e}function oc(e){return Ir("function"==typeof e?e:cr(e,1))}var ic=Yr((function(e,t){return function(n){return Rr(n,e,t)}})),ac=Yr((function(e,t){return function(n){return Rr(e,n,t)}}));function sc(e,t,n){var r=Ps(t),o=xr(t,r);null!=n||es(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=xr(t,Ps(t)));var i=!(es(n)&&"chain"in n)||!!n.chain,a=Qa(e);return At(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Ro(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function cc(){}var lc=Uo(It),uc=Uo(Pt),dc=Uo(Bt);function fc(e){return wi(e)?Gt(ji(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hc=$o(),pc=$o(!0);function mc(){return[]}function gc(){return!1}var vc=qo((function(e,t){return e+t}),0),yc=Xo("ceil"),bc=qo((function(e,t){return e/t}),1),_c=Xo("floor");var wc=qo((function(e,t){return e*t}),1),xc=Xo("round"),Cc=qo((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ae(i);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Oa,zn.assign=bs,zn.assignIn=_s,zn.assignInWith=ws,zn.assignWith=xs,zn.at=Cs,zn.before=Ta,zn.bind=Aa,zn.bindAll=Js,zn.bindKey=Ra,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},zn.chain=fa,zn.chunk=function(e,t,r){t=(r?_i(e,t,r):t===o)?1:Kt(ps(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,c=n(ht(i/t));a<i;)c[s++]=ro(e,a,a+=t);return c},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Lt(Ua(r)?Ro(r):[r],vr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=li();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(i);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Ot(o[0],this,n))return Ot(o[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Ps(e);return function(n){return lr(n,e,t)}}(cr(e,1))},zn.constant=ec,zn.countBy=ma,zn.create=function(e,t){var n=Hn(e);return null==t?n:or(n,t)},zn.curry=function e(t,n,r){var i=Zo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.curryRight=function e(t,n,r){var i=Zo(t,c,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.debounce=Pa,zn.defaults=Ss,zn.defaultsDeep=ks,zn.defer=Na,zn.delay=Da,zn.difference=zi,zn.differenceBy=Hi,zn.differenceWith=Vi,zn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=n||t===o?1:ps(t))<0?0:t,r):[]},zn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,0,(t=r-(t=n||t===o?1:ps(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?po(e,li(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?po(e,li(t,3),!0):[]},zn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&_i(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ps(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ps(r))<0&&(r+=i),r=n>r?0:ms(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},zn.filter=function(e,t){return(Ua(e)?Nt:gr)(e,li(t,3))},zn.flatMap=function(e,t){return vr(Ca(e,t),1)},zn.flatMapDeep=function(e,t){return vr(Ca(e,t),h)},zn.flatMapDepth=function(e,t,n){return n=n===o?1:ps(n),vr(Ca(e,t),n)},zn.flatten=Wi,zn.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,h):[]},zn.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===o?1:ps(t)):[]},zn.flip=function(e){return Zo(e,512)},zn.flow=tc,zn.flowRight=nc,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Ps(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Ns(e))},zn.groupBy=_a,zn.initial=function(e){return(null==e?0:e.length)?ro(e,0,-1):[]},zn.intersection=Gi,zn.intersectionBy=Ki,zn.intersectionWith=Xi,zn.invert=Ts,zn.invertBy=As,zn.invokeMap=wa,zn.iteratee=oc,zn.keyBy=xa,zn.keys=Ps,zn.keysIn=Ns,zn.map=Ca,zn.mapKeys=function(e,t){var n={};return t=li(t,3),_r(e,(function(e,r,o){ir(n,t(e,r,o),e)})),n},zn.mapValues=function(e,t){var n={};return t=li(t,3),_r(e,(function(e,r,o){ir(n,r,t(e,r,o))})),n},zn.matches=function(e){return zr(cr(e,1))},zn.matchesProperty=function(e,t){return Hr(e,cr(t,1))},zn.memoize=Ma,zn.merge=Ds,zn.mergeWith=Ms,zn.method=ic,zn.methodOf=ac,zn.mixin=sc,zn.negate=Ia,zn.nthArg=function(e){return e=ps(e),Yr((function(t){return qr(t,e)}))},zn.omit=Is,zn.omitBy=function(e,t){return js(e,Ia(li(t)))},zn.once=function(e){return Ta(2,e)},zn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?o:n)||(n=null==n?[]:[n]),Ur(e,t,n))},zn.over=lc,zn.overArgs=La,zn.overEvery=uc,zn.overSome=dc,zn.partial=ja,zn.partialRight=Fa,zn.partition=Sa,zn.pick=Ls,zn.pickBy=js,zn.property=fc,zn.propertyOf=function(e){return function(t){return null==e?o:Cr(e,t)}},zn.pull=Qi,zn.pullAll=Zi,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,li(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,o,n):e},zn.pullAt=Ji,zn.range=hc,zn.rangeRight=pc,zn.rearg=Ba,zn.reject=function(e,t){return(Ua(e)?Nt:gr)(e,Ia(li(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=li(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Gr(e,o),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ae(i);return Yr(e,t=t===o?t:ps(t))},zn.reverse=ea,zn.sampleSize=function(e,t,n){return t=(n?_i(e,t,n):t===o)?1:ps(t),(Ua(e)?Zn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Jr(e,t,n,r)},zn.shuffle=function(e){return(Ua(e)?Jn:no)(e)},zn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&_i(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===o?r:ps(n)),ro(e,t,n)):[]},zn.sortBy=ka,zn.sortedUniq=function(e){return e&&e.length?so(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?so(e,li(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&_i(e,t,n)&&(t=n=o),(n=n===o?g:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=lo(t))&&cn(e)?xo(mn(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ae(i);return t=null==t?0:Kt(ps(t),0),Yr((function(n){var r=n[t],o=xo(n,0,t);return r&&Lt(o,r),Ot(e,this,o)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?ro(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?ro(e,0,(t=n||t===o?1:ps(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=r-(t=n||t===o?1:ps(t)))<0?0:t,r):[]},zn.takeRightWhile=function(e,t){return e&&e.length?po(e,li(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?po(e,li(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ae(i);return es(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Pa(e,t,{leading:r,maxWait:t,trailing:o})},zn.thru=ha,zn.toArray=fs,zn.toPairs=Fs,zn.toPairsIn=Bs,zn.toPath=function(e){return Ua(e)?It(e,ji):cs(e)?[e]:Ro(Li(ys(e)))},zn.toPlainObject=vs,zn.transform=function(e,t,n){var r=Ua(e),o=r||Ka(e)||ls(e);if(t=li(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:es(e)&&Qa(i)?Hn($e(e)):{}}return(o?At:_r)(e,(function(e,r,o){return t(n,e,r,o)})),n},zn.unary=function(e){return Oa(e,1)},zn.union=ta,zn.unionBy=na,zn.unionWith=ra,zn.uniq=function(e){return e&&e.length?uo(e):[]},zn.uniqBy=function(e,t){return e&&e.length?uo(e,li(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},zn.unset=function(e,t){return null==e||fo(e,t)},zn.unzip=oa,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:ho(e,t,bo(n))},zn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ho(e,t,bo(n),r)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:en(e,Ns(e))},zn.without=aa,zn.words=Qs,zn.wrap=function(e,t){return ja(bo(t),e)},zn.xor=sa,zn.xorBy=ca,zn.xorWith=la,zn.zip=ua,zn.zipObject=function(e,t){return vo(e||[],t||[],tr)},zn.zipObjectDeep=function(e,t){return vo(e||[],t||[],Jr)},zn.zipWith=da,zn.entries=Fs,zn.entriesIn=Bs,zn.extend=_s,zn.extendWith=ws,sc(zn,zn),zn.add=vc,zn.attempt=Zs,zn.camelCase=Hs,zn.capitalize=Vs,zn.ceil=yc,zn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gs(n))===n?n:0),t!==o&&(t=(t=gs(t))===t?t:0),sr(gs(e),t,n)},zn.clone=function(e){return cr(e,4)},zn.cloneDeep=function(e){return cr(e,5)},zn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:o)},zn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:o)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Ps(t))},zn.deburr=qs,zn.defaultTo=function(e,t){return null==e||e!==e?t:e},zn.divide=bc,zn.endsWith=function(e,t,n){e=ys(e),t=lo(t);var r=e.length,i=n=n===o?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},zn.eq=za,zn.escape=function(e){return(e=ys(e))&&Q.test(e)?e.replace(X,an):e},zn.escapeRegExp=function(e){return(e=ys(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},zn.every=function(e,t,n){var r=Ua(e)?Pt:pr;return n&&_i(e,t,n)&&(t=o),r(e,li(t,3))},zn.find=ga,zn.findIndex=qi,zn.findKey=function(e,t){return Ht(e,li(t,3),_r)},zn.findLast=va,zn.findLastIndex=Ui,zn.findLastKey=function(e,t){return Ht(e,li(t,3),wr)},zn.floor=_c,zn.forEach=ya,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:yr(e,li(t,3),Ns)},zn.forInRight=function(e,t){return null==e?e:br(e,li(t,3),Ns)},zn.forOwn=function(e,t){return e&&_r(e,li(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,li(t,3))},zn.get=Es,zn.gt=Ha,zn.gte=Va,zn.has=function(e,t){return null!=e&&gi(e,t,Or)},zn.hasIn=Os,zn.head=$i,zn.identity=rc,zn.includes=function(e,t,n,r){e=$a(e)?e:zs(e),n=n&&!r?ps(n):0;var o=e.length;return n<0&&(n=Kt(o+n,0)),ss(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&qt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ps(n);return o<0&&(o=Kt(r+o,0)),qt(e,t,o)},zn.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<Kt(t,n)}(e=gs(e),t,n)},zn.invoke=Rs,zn.isArguments=qa,zn.isArray=Ua,zn.isArrayBuffer=Wa,zn.isArrayLike=$a,zn.isArrayLikeObject=Ga,zn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&kr(e)==_},zn.isBuffer=Ka,zn.isDate=Xa,zn.isElement=function(e){return ts(e)&&1===e.nodeType&&!os(e)},zn.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||ls(e)||qa(e)))return!e.length;var t=mi(e);if(t==k||t==R)return!e.size;if(Si(e))return!Lr(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Nr(e,t)},zn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},zn.isError=Ya,zn.isFinite=function(e){return"number"==typeof e&&bt(e)},zn.isFunction=Qa,zn.isInteger=Za,zn.isLength=Ja,zn.isMap=ns,zn.isMatch=function(e,t){return e===t||Dr(e,t,di(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Dr(e,t,di(t),n)},zn.isNaN=function(e){return rs(e)&&e!=+e},zn.isNative=function(e){if(Ci(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=rs,zn.isObject=es,zn.isObjectLike=ts,zn.isPlainObject=os,zn.isRegExp=is,zn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=p},zn.isSet=as,zn.isString=ss,zn.isSymbol=cs,zn.isTypedArray=ls,zn.isUndefined=function(e){return e===o},zn.isWeakMap=function(e){return ts(e)&&mi(e)==D},zn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==kr(e)},zn.join=function(e,t){return null==e?"":_t.call(e,t)},zn.kebabCase=Us,zn.last=Yi,zn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ps(n))<0?Kt(r+i,0):bn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Vt(e,Wt,i,!0)},zn.lowerCase=Ws,zn.lowerFirst=$s,zn.lt=us,zn.lte=ds,zn.max=function(e){return e&&e.length?mr(e,rc,Er):o},zn.maxBy=function(e,t){return e&&e.length?mr(e,li(t,2),Er):o},zn.mean=function(e){return $t(e,rc)},zn.meanBy=function(e,t){return $t(e,li(t,2))},zn.min=function(e){return e&&e.length?mr(e,rc,Fr):o},zn.minBy=function(e,t){return e&&e.length?mr(e,li(t,2),Fr):o},zn.stubArray=mc,zn.stubFalse=gc,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=wc,zn.nth=function(e,t){return e&&e.length?qr(e,ps(t)):o},zn.noConflict=function(){return mt._===this&&(mt._=ze),this},zn.noop=cc,zn.now=Ea,zn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Wo(pt(o),n)+e+Wo(ht(o),n)},zn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Wo(t-r,n):e},zn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Wo(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(ys(e).replace(ae,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&_i(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hs(e),t===o?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=xn();return bn(e+i*(t-e+dt("1e-"+((i+"").length-1))),t)}return Kr(e,t)},zn.reduce=function(e,t,n){var r=Ua(e)?jt:Xt,o=arguments.length<3;return r(e,li(t,4),n,o,fr)},zn.reduceRight=function(e,t,n){var r=Ua(e)?Ft:Xt,o=arguments.length<3;return r(e,li(t,4),n,o,hr)},zn.repeat=function(e,t,n){return t=(n?_i(e,t,n):t===o)?1:ps(t),Xr(ys(e),t)},zn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var r=-1,i=(t=_o(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[ji(t[r])];a===o&&(r=i,a=n),e=Qa(a)?a.call(e):a}return e},zn.round=xc,zn.runInContext=e,zn.sample=function(e){return(Ua(e)?Qn:Qr)(e)},zn.size=function(e){if(null==e)return 0;if($a(e))return ss(e)?pn(e):e.length;var t=mi(e);return t==k||t==R?e.size:Lr(e).length},zn.snakeCase=Gs,zn.some=function(e,t,n){var r=Ua(e)?Bt:oo;return n&&_i(e,t,n)&&(t=o),r(e,li(t,3))},zn.sortedIndex=function(e,t){return io(e,t)},zn.sortedIndexBy=function(e,t,n){return ao(e,t,li(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=io(e,t);if(r<n&&za(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return io(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ao(e,t,li(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=io(e,t,!0)-1;if(za(e[n],t))return n}return-1},zn.startCase=Ks,zn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=lo(t),e.slice(n,n+t.length)==t},zn.subtract=Cc,zn.sum=function(e){return e&&e.length?Yt(e,rc):0},zn.sumBy=function(e,t){return e&&e.length?Yt(e,li(t,2)):0},zn.template=function(e,t,n){var r=zn.templateSettings;n&&_i(e,t,n)&&(t=o),e=ys(e),t=ws({},t,r,Jo);var i,a,s=ws({},t.imports,r.imports,Jo),c=Ps(s),l=en(s,c),u=0,d=t.interpolate||xe,f="__p += '",h=Oe((t.escape||xe).source+"|"+d.source+"|"+(d===ee?pe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),p="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,o,s,c){return r||(r=o),f+=e.slice(u,c).replace(Ce,sn),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),f+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(fe.test(m))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(W,""):f).replace($,"$1").replace(G,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Zs((function(){return Se(c,p+"return "+f).apply(o,l)}));if(g.source=f,Ya(g))throw g;return g},zn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=g,r=bn(e,g);t=li(t),e-=g;for(var o=Qt(r,t);++n<e;)t(n);return o},zn.toFinite=hs,zn.toInteger=ps,zn.toLength=ms,zn.toLower=function(e){return ys(e).toLowerCase()},zn.toNumber=gs,zn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},zn.toString=ys,zn.toUpper=function(e){return ys(e).toUpperCase()},zn.trim=function(e,t,n){if((e=ys(e))&&(n||t===o))return Zt(e);if(!e||!(t=lo(t)))return e;var r=mn(e),i=mn(t);return xo(r,nn(r,i),rn(r,i)+1).join("")},zn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===o))return e.slice(0,gn(e)+1);if(!e||!(t=lo(t)))return e;var r=mn(e);return xo(r,0,rn(r,mn(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===o))return e.replace(ae,"");if(!e||!(t=lo(t)))return e;var r=mn(e);return xo(r,nn(r,mn(t))).join("")},zn.truncate=function(e,t){var n=30,r="...";if(es(t)){var i="separator"in t?t.separator:i;n="length"in t?ps(t.length):n,r="omission"in t?lo(t.omission):r}var a=(e=ys(e)).length;if(cn(e)){var s=mn(e);a=s.length}if(n>=a)return e;var c=n-pn(r);if(c<1)return r;var l=s?xo(s,0,c).join(""):e.slice(0,c);if(i===o)return l+r;if(s&&(c+=l.length-c),is(i)){if(e.slice(c).search(i)){var u,d=l;for(i.global||(i=Oe(i.source,ys(me.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;l=l.slice(0,f===o?c:f)}}else if(e.indexOf(lo(i),c)!=c){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r},zn.unescape=function(e){return(e=ys(e))&&Y.test(e)?e.replace(K,vn):e},zn.uniqueId=function(e){var t=++Le;return ys(e)+t},zn.upperCase=Xs,zn.upperFirst=Ys,zn.each=ya,zn.eachRight=ba,zn.first=$i,sc(zn,function(){var e={};return _r(zn,(function(t,n){Ie.call(zn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),zn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),At(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===o?1:Kt(ps(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),At(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),At(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(rc)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Rr(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Ia(li(e)))},Un.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(g)},_r(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=zn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,c=t instanceof Un,l=s[0],u=c||Ua(t),d=function(e){var t=i.apply(zn,Lt([e],s));return r&&f?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,m=c&&!h;if(!a&&u){t=m?t:new Un(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[d],thisArg:o}),new qn(g,f)}return p&&m?e.apply(this,s):(g=this.thru(d),p?r?g.value()[0]:g.value():g)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),_r(Un.prototype,(function(e,t){var n=zn[t];if(n){var r=n.name+"";Ie.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Ho(o,2).name]=[{name:"wrapper",func:o}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ro(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ro(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ro(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=Kt(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,c=s-a,l=r?s:a-1,u=this.__iteratees__,d=u.length,f=0,h=bn(c,this.__takeCount__);if(!n||!r&&o==c&&h==c)return mo(e,this.__actions__);var p=[];e:for(;c--&&f<h;){for(var m=-1,g=e[l+=t];++m<d;){var v=u[m],y=v.iteratee,b=v.type,_=y(g);if(2==b)g=_;else if(!_){if(1==b)continue e;break e}}p[f++]=g}return p},zn.prototype.at=pa,zn.prototype.chain=function(){return fa(this)},zn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===o&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Bi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:o}),new qn(t,this.__chain__)}return this.thru(ea)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return mo(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Qe&&(zn.prototype[Qe]=function(){return this}),zn}();mt._=yn,(r=function(){return yn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},3816:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});function r(e){return e.toLowerCase()}var o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function a(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?o:n,c=t.stripRegexp,l=void 0===c?i:c,u=t.transform,d=void 0===u?r:u,f=t.delimiter,h=void 0===f?" ":f,p=s(s(e,a,"$1\0$2"),l,"\0"),m=0,g=p.length;"\0"===p.charAt(m);)m++;for(;"\0"===p.charAt(g-1);)g--;return p.slice(m,g).split("\0").map(d).join(h)}function s(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},9504:(e,t,n)=>{"use strict";n.d(t,{Yd:()=>a});var r=n(7328),o=n(3816);function i(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function a(e,t){return void 0===t&&(t={}),(0,o.u)(e,(0,r.C3)({delimiter:"",transform:i},t))}},88:(e,t,n)=>{"use strict";n.d(t,{c:()=>Ir});var r,o=n(2360),i=n.n(o),a=n(3324),s=n.n(a),c=new Uint8Array(16);function l(){if(!r&&!(r="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(c)}const u=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const d=function(e){return"string"===typeof e&&u.test(e)};for(var f=[],h=0;h<256;++h)f.push((h+256).toString(16).substr(1));const p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase();if(!d(n))throw TypeError("Stringified UUID is invalid");return n};const m=function(e,t,n){var r=(e=e||{}).random||(e.rng||l)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return p(r)};var g,v,y=n(4344),b=n(8380),_=n.n(b);function w(e){return"$"+e}function x(e){return e.substring(1)}function C(){this._store={}}function S(e){if(this._store=new C,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}function k(e){if(e instanceof ArrayBuffer)return function(e){if("function"===typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}(e);var t=e.size,n=e.type;return"function"===typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}C.prototype.get=function(e){var t=w(e);return this._store[t]},C.prototype.set=function(e,t){var n=w(e);return this._store[n]=t,!0},C.prototype.has=function(e){return w(e)in this._store},C.prototype.keys=function(){return Object.keys(this._store).map((e=>x(e)))},C.prototype.delete=function(e){var t=w(e),n=t in this._store;return delete this._store[t],n},C.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var o=t[n];e(this._store[o],o=x(o))}},Object.defineProperty(C.prototype,"size",{get:function(){return Object.keys(this._store).length}}),S.prototype.add=function(e){return this._store.set(e,!0)},S.prototype.has=function(e){return this._store.has(e)},S.prototype.forEach=function(e){this._store.forEach((function(t,n){e(n)}))},Object.defineProperty(S.prototype,"size",{get:function(){return this._store.size}}),!function(){if("undefined"===typeof Symbol||"undefined"===typeof Map||"undefined"===typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(g=S,v=C):(g=Set,v=Map);var E=Function.prototype.toString,O=E.call(Object);function T(e){var t,n,r;if(!e||"object"!==typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=T(e[n]);return t}if(e instanceof Date&&isFinite(e))return e.toISOString();if(function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!==typeof Blob&&e instanceof Blob}(e))return k(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==O}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=T(e[n]);"undefined"!==typeof o&&(t[n]=o)}return t}function A(e){var t=!1;return function(){if(t)throw new Error("once called more than once");t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}function R(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n=T(n);var o=this,i="function"===typeof n[n.length-1]&&n.pop(),a=new Promise((function(t,r){var i;try{var a=A((function(e,n){e?r(e):t(n)}));n.push(a),(i=e.apply(o,n))&&"function"===typeof i.then&&t(i)}catch(s){r(s)}}));return i&&a.then((function(e){i(null,e)}),i),a}}function P(e,t){return R((function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var i=this;return function(e,t,n){if(e.constructor.listeners("debug").length){for(var r=["api",e.name,t],o=0;o<n.length-1;o++)r.push(n[o]);e.constructor.emit("debug",r);var i=n[n.length-1];n[n.length-1]=function(n,r){var o=["api",e.name,t];o=o.concat(n?["error",n]:["success",r]),e.constructor.emit("debug",o),i(n,r)}}}(i,e,r),this.taskqueue.isReady?t.apply(this,r):new Promise((function(t,n){i.taskqueue.addTask((function(o){o?n(o):t(i[e].apply(i,r))}))}))}))}function N(e,t){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];i in e&&(n[i]=e[i])}return n}var D,M=6;function I(e){return e}function L(e){return[{ok:e}]}function j(e,t,n){var r=t.docs,o=new v;r.forEach((function(e){o.has(e.id)?o.get(e.id).push(e):o.set(e.id,[e])}));var i=o.size,a=0,s=new Array(i);function c(){++a===i&&function(){var e=[];s.forEach((function(t){t.docs.forEach((function(n){e.push({id:t.id,docs:[n]})}))})),n(null,{results:e})}()}var l=[];o.forEach((function(e,t){l.push(t)}));var u=0;function d(){if(!(u>=l.length)){var n=Math.min(u+M,l.length),r=l.slice(u,n);!function(n,r){n.forEach((function(n,i){var a=r+i,l=o.get(n),u=N(l[0],["atts_since","attachments"]);u.open_revs=l.map((function(e){return e.rev})),u.open_revs=u.open_revs.filter(I);var f=I;0===u.open_revs.length&&(delete u.open_revs,f=L),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(u[e]=t[e])})),e.get(n,u,(function(e,t){var r,o,i;r=e?[{error:e}]:f(t),o=n,i=r,s[a]={id:o,docs:i},c(),d()}))}))}(r,u),u+=r.length}}d()}try{localStorage.setItem("_pouch_check_localstorage",1),D=!!localStorage.getItem("_pouch_check_localstorage")}catch(Lr){D=!1}function F(){return D}class B extends(_()){constructor(){super(),this._listeners={},F()&&addEventListener("storage",(e=>{this.emit(e.key)}))}addListener(e,t,n,r){if(!this._listeners[t]){var o=!1,a=this;this._listeners[t]=s,this.on(e,s)}function s(){if(a._listeners[t])if(o)o="waiting";else{o=!0;var e=N(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(e).on("change",(function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))})).on("complete",(function(){"waiting"===o&&i()(s),o=!1})).on("error",(function(){o=!1}))}}}removeListener(e,t){t in this._listeners&&(super.removeListener(e,this._listeners[t]),delete this._listeners[t])}notifyLocalWindows(e){F()&&(localStorage[e]="a"===localStorage[e]?"b":"a")}notify(e){this.emit(e),this.notifyLocalWindows(e)}}function z(e){if("undefined"!==typeof console&&"function"===typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function H(e){var t=0;return e||(t=2e3),function(e,t){var n=6e5;return e=parseInt(e,10)||0,(t=parseInt(t,10))!==t||t<=e?t=(e||1)<<1:t+=1,t>n&&(e=3e5,t=n),~~((t-e)*Math.random()+e)}(e,t)}function V(e,t){z("info","The above "+e+" is totally normal. "+t)}var q="function"===typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};class U extends Error{constructor(e,t,n){super(),this.status=e,this.name=t,this.message=n,this.error=!0}toString(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})}}new U(401,"unauthorized","Name or password is incorrect.");var W=new U(400,"bad_request","Missing JSON list of 'docs'"),$=new U(404,"not_found","missing"),G=new U(409,"conflict","Document update conflict"),K=new U(400,"bad_request","_id field must contain a string"),X=new U(412,"missing_id","_id is required for puts"),Y=new U(400,"bad_request","Only reserved document ids may start with underscore."),Q=(new U(412,"precondition_failed","Database not open"),new U(500,"unknown_error","Database encountered an unknown error")),Z=new U(500,"badarg","Some query argument is invalid"),J=(new U(400,"invalid_request","Request was invalid"),new U(400,"query_parse_error","Some query parameter is invalid")),ee=new U(500,"doc_validation","Bad special document member"),te=new U(400,"bad_request","Something wrong with the request"),ne=new U(400,"bad_request","Document must be a JSON object"),re=(new U(404,"not_found","Database not found"),new U(500,"indexed_db_went_bad","unknown")),oe=(new U(500,"web_sql_went_bad","unknown"),new U(500,"levelDB_went_went_bad","unknown"),new U(403,"forbidden","Forbidden by design doc validate_doc_update function"),new U(400,"bad_request","Invalid rev format")),ie=(new U(412,"file_exists","The database could not be created, the file already exists."),new U(412,"missing_stub","A pre-existing attachment stub wasn't found"));new U(413,"invalid_url","Provided URL is invalid");function ae(e,t){function n(t){for(var n=Object.getOwnPropertyNames(e),r=0,o=n.length;r<o;r++)"function"!==typeof e[n[r]]&&(this[n[r]]=e[n[r]]);void 0===this.stack&&(this.stack=(new Error).stack),void 0!==t&&(this.reason=t)}return n.prototype=U.prototype,new n(t)}function se(e){if("object"!==typeof e){var t=e;(e=Q).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),"stack"in e||(e.stack=(new Error).stack),e}function ce(e){var t={},n=e.filter&&"function"===typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var o=n&&function(e,t,n){try{return!e(t,n)}catch(o){var r="Filter function threw: "+o.toString();return ae(te,r)}}(e.filter,r.doc,t);if("object"===typeof o)return o;if(o)return!1;if(e.include_docs){if(!e.attachments)for(var i in r.doc._attachments)Object.prototype.hasOwnProperty.call(r.doc._attachments,i)&&(r.doc._attachments[i].stub=!0)}else delete r.doc;return!0}}function le(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t}function ue(e){var t;if(e?"string"!==typeof e?t=ae(K):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=ae(Y)):t=ae(X),t)throw t}function de(e){return"boolean"===typeof e._remote?e._remote:"function"===typeof e.type&&(z("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function fe(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function he(e){var t=fe(e);return t?t.join("/"):null}var pe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],me="queryKey",ge=/(?:^|&)([^&=]*)=?([^&]*)/g,ve=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;function ye(e){for(var t=ve.exec(e),n={},r=14;r--;){var o=pe[r],i=t[r]||"",a=-1!==["user","password"].indexOf(o);n[o]=a?decodeURIComponent(i):i}return n[me]={},n[pe[12]].replace(ge,(function(e,t,r){t&&(n[me][t]=r)})),n}function be(e,t){var n=[],r=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n.push(o),r.push(t[o]));return n.push(e),Function.apply(null,n).apply(null,r)}function _e(e,t,n){return e.get(t).catch((function(e){if(404!==e.status)throw e;return{}})).then((function(r){var o=r._rev,i=n(r);return i?(i._id=t,i._rev=o,function(e,t,n){return e.put(t).then((function(e){return{updated:!0,rev:e.rev}}),(function(r){if(409!==r.status)throw r;return _e(e,t._id,n)}))}(e,i,n)):{updated:!1,rev:o}}))}var we=function(e){return atob(e)},xe=function(e){return btoa(e)};function Ce(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(Lr){if("TypeError"!==Lr.name)throw Lr;for(var n=new("undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof MSBlobBuilder?MSBlobBuilder:"undefined"!==typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}function Se(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function ke(e,t){return Ce([Se(e)],{type:t})}function Ee(e,t){return ke(we(e),t)}function Oe(e,t){var n=new FileReader,r="function"===typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(r)return t(n);t(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,o=0;o<r;o++)t+=String.fromCharCode(n[o]);return t}(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function Te(e,t){Oe(e,(function(e){t(e)}))}function Ae(e,t){Te(e,(function(e){t(xe(e))}))}var Re=self.setImmediate||self.setTimeout,Pe=32768;function Ne(e,t,n,r,o){(n>0||r<t.size)&&(t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,r)),function(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}(t,(function(t){e.append(t),o()}))}function De(e,t,n,r,o){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),o()}function Me(e,t){var n="string"===typeof e,r=n?e.length:e.size,o=Math.min(Pe,r),i=Math.ceil(r/o),a=0,c=n?new(s()):new(s().ArrayBuffer),l=n?De:Ne;function u(){Re(f)}function d(){var e=function(e){return xe(e)}(c.end(!0));t(e),c.destroy()}function f(){var t=a*o,n=t+o;a++,l(c,e,t,n,a<i?u:d)}f()}function Ie(e){return s().hash(e)}function Le(e,t){if(!t)return m().replace(/-/g,"").toLowerCase();var n=q({},e);return delete n._rev_tree,Ie(JSON.stringify(n))}var je=m;function Fe(e){for(var t,n,r,o,i=e.rev_tree.slice();o=i.pop();){var a=o.ids,s=a[2],c=o.pos;if(s.length)for(var l=0,u=s.length;l<u;l++)i.push({pos:c+1,ids:s[l]});else{var d=!!a[1].deleted,f=a[0];t&&!(r!==d?r:n!==c?n<c:t<f)||(t=f,n=c,r=d)}}return n+"-"+t}function Be(e,t){for(var n,r=e.slice();n=r.pop();)for(var o=n.pos,i=n.ids,a=i[2],s=t(0===a.length,o,i[0],n.ctx,i[1]),c=0,l=a.length;c<l;c++)r.push({pos:o+1,ids:a[c],ctx:s})}function ze(e,t){return e.pos-t.pos}function He(e){var t=[];Be(e,(function(e,n,r,o,i){e&&t.push({rev:n+"-"+r,pos:n,opts:i})})),t.sort(ze).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}function Ve(e){for(var t=Fe(e),n=He(e.rev_tree),r=[],o=0,i=n.length;o<i;o++){var a=n[o];a.rev===t||a.opts.deleted||r.push(a.rev)}return r}function qe(e){for(var t,n=[],r=e.slice();t=r.pop();){var o=t.pos,i=t.ids,a=i[0],s=i[1],c=i[2],l=0===c.length,u=t.history?t.history.slice():[];u.push({id:a,opts:s}),l&&n.push({pos:o+1-u.length,ids:u});for(var d=0,f=c.length;d<f;d++)r.push({pos:o+1,ids:c[d],history:u})}return n.reverse()}function Ue(e,t){return e.pos-t.pos}function We(e,t,n){var r=function(e,t,n){for(var r,o=0,i=e.length;o<i;)n(e[r=o+i>>>1],t)<0?o=r+1:i=r;return o}(e,t,n);e.splice(r,0,t)}function $e(e,t){for(var n,r,o=t,i=e.length;o<i;o++){var a=e[o],s=[a.id,a.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function Ge(e,t){return e[0]<t[0]?-1:1}function Ke(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var o=n.pop(),i=o.tree1,a=o.tree2;(i[1].status||a[1].status)&&(i[1].status="available"===i[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(i[2][0]){for(var c=!1,l=0;l<i[2].length;l++)i[2][l][0]===a[2][s][0]&&(n.push({tree1:i[2][l],tree2:a[2][s]}),c=!0);c||(r="new_branch",We(i[2],a[2][s],Ge))}else r="new_leaf",i[2][0]=a[2][s]}return{conflicts:r,tree:e}}function Xe(e,t,n){var r,o=[],i=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,c=e.length;s<c;s++){var l=e[s];if(l.pos===t.pos&&l.ids[0]===t.ids[0])r=Ke(l.ids,t.ids),o.push({pos:l.pos,ids:r.tree}),i=i||r.conflicts,a=!0;else if(!0!==n){var u=l.pos<t.pos?l:t,d=l.pos<t.pos?t:l,f=d.pos-u.pos,h=[],p=[];for(p.push({ids:u.ids,diff:f,parent:null,parentIdx:null});p.length>0;){var m=p.pop();if(0!==m.diff)for(var g=m.ids[2],v=0,y=g.length;v<y;v++)p.push({ids:g[v],diff:m.diff-1,parent:m.ids,parentIdx:v});else m.ids[0]===d.ids[0]&&h.push(m)}var b=h[0];b?(r=Ke(b.ids,d.ids),b.parent[2][b.parentIdx]=r.tree,o.push({pos:u.pos,ids:u.ids}),i=i||r.conflicts,a=!0):o.push(l)}else o.push(l)}return a||o.push(t),o.sort(Ue),{tree:o,conflicts:i||"internal_node"}}function Ye(e,t,n){var r=Xe(e,t),o=function(e,t){for(var n,r,o=qe(e),i=0,a=o.length;i<a;i++){var s,c=o[i],l=c.ids;if(l.length>t){n||(n={});var u=l.length-t;s={pos:c.pos+u,ids:$e(l,u)};for(var d=0;d<u;d++){var f=c.pos+d+"-"+l[d].id;n[f]=!0}}else s={pos:c.pos,ids:$e(l,0)};r=r?Xe(r,s,!0).tree:[s]}return n&&Be(r,(function(e,t,r){delete n[t+"-"+r]})),{tree:r,revs:n?Object.keys(n):[]}}(r.tree,n);return{tree:o.tree,stemmedRevs:o.revs,conflicts:r.conflicts}}function Qe(e){return e.ids}function Ze(e,t){t||(t=Fe(e));for(var n,r=t.substring(t.indexOf("-")+1),o=e.rev_tree.map(Qe);n=o.pop();){if(n[0]===r)return!!n[1].deleted;o=o.concat(n[2])}}function Je(e){return/^_local/.test(e)}function et(e,t,n){var r=[{rev:e._rev}];"all_docs"===n.style&&(r=He(t.rev_tree).map((function(e){return{rev:e.rev}})));var o={id:t.id,changes:r,doc:e};return Ze(t,e._rev)&&(o.deleted=!0),n.conflicts&&(o.doc._conflicts=Ve(t),o.doc._conflicts.length||delete o.doc._conflicts),o}class tt extends(_()){constructor(e,t,n){super(),this.db=e;var r=(t=t?T(t):{}).complete=A(((t,n)=>{var r,i;t?(i="error",("listenerCount"in(r=this)?r.listenerCount(i):_().listenerCount(r,i))>0&&this.emit("error",t)):this.emit("complete",n),this.removeAllListeners(),e.removeListener("destroyed",o)}));n&&(this.on("complete",(function(e){n(null,e)})),this.on("error",n));const o=()=>{this.cancel()};e.once("destroyed",o),t.onChange=(e,t,n)=>{this.isCancelled||function(e,t,n,r){try{e.emit("change",t,n,r)}catch(Lr){z("error",'Error in .on("change", function):',Lr)}}(this,e,t,n)};var i=new Promise((function(e,n){t.complete=function(t,r){t?n(t):e(r)}}));this.once("cancel",(function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})})),this.then=i.then.bind(i),this.catch=i.catch.bind(i),this.then((function(e){r(null,e)}),r),e.taskqueue.isReady?this.validateChanges(t):e.taskqueue.addTask((e=>{e?t.complete(e):this.isCancelled?this.emit("cancel"):this.validateChanges(t)}))}cancel(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")}validateChanges(e){var t=e.complete;dt._changesFilterPlugin?dt._changesFilterPlugin.validate(e,(n=>{if(n)return t(n);this.doChanges(e)})):this.doChanges(e)}doChanges(e){var t=this,n=e.complete;if("live"in(e=T(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=et,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since){if(dt._changesFilterPlugin){if(dt._changesFilterPlugin.normalize(e),dt._changesFilterPlugin.shouldFilter(this,e))return dt._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach((function(t){t in e&&z("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')}));"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=n;var r=this.db._changes(e);if(r&&"function"===typeof r.cancel){const e=this.cancel;this.cancel=function(){r.cancel();for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];e.apply(t,o)}}}else this.db.info().then((t=>{this.isCancelled?n(null,{status:"cancelled"}):(e.since=t.update_seq,this.doChanges(e))}),n)}}function nt(e,t){return e<t?-1:e>t?1:0}function rt(e,t){return function(n,r){n||r[0]&&r[0].error?((n=n||r[0]).docId=t,e(n)):e(null,r.length?r[0]:r)}}function ot(e,t){var n=nt(e._id,t._id);return 0!==n?n:nt(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function it(e){var t=e._compactionQueue[0],n=t.opts,r=t.callback;e.get("_local/compaction").catch((function(){return!1})).then((function(t){t&&t.last_seq&&(n.last_seq=t.last_seq),e._compact(n,(function(t,n){t?r(t):r(null,n),i()((function(){e._compactionQueue.shift(),e._compactionQueue.length&&it(e)}))}))}))}function at(e,t,n){return e.get("_local/purges").then((function(e){const r=e.purgeSeq+1;return e.purges.push({docId:t,rev:n,purgeSeq:r}),e.purges.length>self.purged_infos_limit&&e.purges.splice(0,e.purges.length-self.purged_infos_limit),e.purgeSeq=r,e})).catch((function(e){if(404!==e.status)throw e;return{_id:"_local/purges",purges:[{docId:t,rev:n,purgeSeq:0}],purgeSeq:0}})).then((function(t){return e.put(t)}))}class st extends(_()){_setup(){this.post=P("post",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"object"!==typeof e||Array.isArray(e))return n(ae(ne));this.bulkDocs({docs:[e]},t,rt(n,e._id))})).bind(this),this.put=P("put",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"object"!==typeof e||Array.isArray(e))return n(ae(ne));if(ue(e._id),Je(e._id)&&"function"===typeof this._putLocal)return e._deleted?this._removeLocal(e,n):this._putLocal(e,n);const r=n=>{"function"===typeof this._put&&!1!==t.new_edits?this._put(e,t,n):this.bulkDocs({docs:[e]},t,rt(n,e._id))};t.force&&e._rev?(!function(){var n=e._rev.split("-"),r=n[1],o=parseInt(n[0],10)+1,i=Le();e._revisions={start:o,ids:[i,r]},e._rev=o+"-"+i,t.new_edits=!1}(),r((function(t){var r=t?null:{ok:!0,id:e._id,rev:e._rev};n(t,r)}))):r(n)})).bind(this),this.putAttachment=P("putAttachment",(function(e,t,n,r,o){var i=this;function a(e){var n="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:o,data:r,revpos:++n},i.put(e)}return"function"===typeof o&&(o=r,r=n,n=null),"undefined"===typeof o&&(o=r,r=n,n=null),o||z("warn","Attachment",t,"on document",e,"is missing content_type"),i.get(e).then((function(e){if(e._rev!==n)throw ae(G);return a(e)}),(function(t){if(t.reason===$.message)return a({_id:e});throw t}))})).bind(this),this.removeAttachment=P("removeAttachment",(function(e,t,n,r){this.get(e,((e,o)=>{if(e)r(e);else if(o._rev===n){if(!o._attachments)return r();delete o._attachments[t],0===Object.keys(o._attachments).length&&delete o._attachments,this.put(o,r)}else r(ae(G))}))})).bind(this),this.remove=P("remove",(function(e,t,n,r){var o;"string"===typeof t?(o={_id:e,_rev:t},"function"===typeof n&&(r=n,n={})):(o=e,"function"===typeof t?(r=t,n={}):(r=n,n=t)),(n=n||{}).was_delete=!0;var i={_id:o._id,_rev:o._rev||n.rev,_deleted:!0};if(Je(i._id)&&"function"===typeof this._removeLocal)return this._removeLocal(o,r);this.bulkDocs({docs:[i]},n,rt(r,i._id))})).bind(this),this.revsDiff=P("revsDiff",(function(e,t,n){"function"===typeof t&&(n=t,t={});var r=Object.keys(e);if(!r.length)return n(null,{});var o=0,i=new v;function a(e,t){i.has(e)||i.set(e,{missing:[]}),i.get(e).missing.push(t)}r.map((function(t){this._getRevisionTree(t,(function(s,c){if(s&&404===s.status&&"missing"===s.message)i.set(t,{missing:e[t]});else{if(s)return n(s);!function(t,n){var r=e[t].slice(0);Be(n,(function(e,n,o,i,s){var c=n+"-"+o,l=r.indexOf(c);-1!==l&&(r.splice(l,1),"available"!==s.status&&a(t,c))})),r.forEach((function(e){a(t,e)}))}(t,c)}if(++o===r.length){var l={};return i.forEach((function(e,t){l[t]=e})),n(null,l)}}))}),this)})).bind(this),this.bulkGet=P("bulkGet",(function(e,t){j(this,e,t)})).bind(this),this.compactDocument=P("compactDocument",(function(e,t,n){this._getRevisionTree(e,((r,o)=>{if(r)return n(r);var i=function(e){var t={},n=[];return Be(e,(function(e,r,o,i){var a=r+"-"+o;return e&&(t[a]=0),void 0!==i&&n.push({from:i,to:a}),a})),n.reverse(),n.forEach((function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])})),t}(o),a=[],s=[];Object.keys(i).forEach((function(e){i[e]>t&&a.push(e)})),Be(o,(function(e,t,n,r,o){var i=t+"-"+n;"available"===o.status&&-1!==a.indexOf(i)&&s.push(i)})),this._doCompaction(e,s,n)}))})).bind(this),this.compact=P("compact",(function(e,t){"function"===typeof e&&(t=e,e={}),e=e||{},this._compactionQueue=this._compactionQueue||[],this._compactionQueue.push({opts:e,callback:t}),1===this._compactionQueue.length&&it(this)})).bind(this),this.get=P("get",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"string"!==typeof e)return n(ae(K));if(Je(e)&&"function"===typeof this._getLocal)return this._getLocal(e,n);var r=[];const o=()=>{var o=[],i=r.length;if(!i)return n(null,o);r.forEach((r=>{this.get(e,{rev:r,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},(function(e,t){if(e)o.push({missing:r});else{for(var a,s=0,c=o.length;s<c;s++)if(o[s].ok&&o[s].ok._rev===t._rev){a=!0;break}a||o.push({ok:t})}--i||n(null,o)}))}))};if(!t.open_revs)return this._get(e,t,((r,o)=>{if(r)return r.docId=e,n(r);var i=o.doc,a=o.metadata,s=o.ctx;if(t.conflicts){var c=Ve(a);c.length&&(i._conflicts=c)}if(Ze(a,i._rev)&&(i._deleted=!0),t.revs||t.revs_info){for(var l=i._rev.split("-"),u=parseInt(l[0],10),d=l[1],f=qe(a.rev_tree),h=null,p=0;p<f.length;p++){var m=f[p],g=m.ids.map((function(e){return e.id})).indexOf(d);(g===u-1||!h&&-1!==g)&&(h=m)}if(!h)return(r=new Error("invalid rev tree")).docId=e,n(r);var v=h.ids.map((function(e){return e.id})).indexOf(i._rev.split("-")[1])+1,y=h.ids.length-v;if(h.ids.splice(v,y),h.ids.reverse(),t.revs&&(i._revisions={start:h.pos+h.ids.length-1,ids:h.ids.map((function(e){return e.id}))}),t.revs_info){var b=h.pos+h.ids.length;i._revs_info=h.ids.map((function(e){return{rev:--b+"-"+e.id,status:e.opts.status}}))}}if(t.attachments&&i._attachments){var _=i._attachments,w=Object.keys(_).length;if(0===w)return n(null,i);Object.keys(_).forEach((e=>{this._getAttachment(i._id,e,_[e],{rev:i._rev,binary:t.binary,ctx:s},(function(t,r){var o=i._attachments[e];o.data=r,delete o.stub,delete o.length,--w||n(null,i)}))}))}else{if(i._attachments)for(var x in i._attachments)Object.prototype.hasOwnProperty.call(i._attachments,x)&&(i._attachments[x].stub=!0);n(null,i)}}));if("all"===t.open_revs)this._getRevisionTree(e,(function(e,t){if(e)return n(e);r=He(t).map((function(e){return e.rev})),o()}));else{if(!Array.isArray(t.open_revs))return n(ae(Q,"function_clause"));r=t.open_revs;for(var i=0;i<r.length;i++){var a=r[i];if("string"!==typeof a||!/^\d+-/.test(a))return n(ae(oe))}o()}})).bind(this),this.getAttachment=P("getAttachment",(function(e,t,n,r){n instanceof Function&&(r=n,n={}),this._get(e,n,((o,i)=>o?r(o):i.doc._attachments&&i.doc._attachments[t]?(n.ctx=i.ctx,n.binary=!0,void this._getAttachment(e,t,i.doc._attachments[t],n,r)):r(ae($))))})).bind(this),this.allDocs=P("allDocs",(function(e,t){if("function"===typeof e&&(t=e,e={}),e.skip="undefined"!==typeof e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var n=["startkey","endkey","key"].filter((function(t){return t in e}))[0];if(n)return void t(ae(J,"Query parameter `"+n+"` is not compatible with multi-get"));if(!de(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})).bind(this),this.close=P("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})).bind(this),this.info=P("info",(function(e){this._info(((t,n)=>{if(t)return e(t);n.db_name=n.db_name||this.name,n.auto_compaction=!(!this.auto_compaction||de(this)),n.adapter=this.adapter,e(null,n)}))})).bind(this),this.id=P("id",(function(e){return this._id(e)})).bind(this),this.bulkDocs=P("bulkDocs",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(ae(W));for(var r=0;r<e.docs.length;++r)if("object"!==typeof e.docs[r]||Array.isArray(e.docs[r]))return n(ae(ne));var o;if(e.docs.forEach((function(e){e._attachments&&Object.keys(e._attachments).forEach((function(t){o=o||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||z("warn","Attachment",t,"on document",e._id,"is missing content_type")}))})),o)return n(ae(te,o));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var i=this;t.new_edits||de(i)||e.docs.sort(ot),function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n._deleted)delete n._attachments;else if(n._attachments)for(var r=Object.keys(n._attachments),o=0;o<r.length;o++){var i=r[o];n._attachments[i]=N(n._attachments[i],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);var a=e.docs.map((function(e){return e._id}));this._bulkDocs(e,t,(function(e,r){if(e)return n(e);if(t.new_edits||(r=r.filter((function(e){return e.error}))),!de(i))for(var o=0,s=r.length;o<s;o++)r[o].id=r[o].id||a[o];n(null,r)}))})).bind(this),this.registerDependentDatabase=P("registerDependentDatabase",(function(e,t){var n=T(this.__opts);this.__opts.view_adapter&&(n.adapter=this.__opts.view_adapter);var r=new this.constructor(e,n);_e(this,"_local/_pouch_dependentDbs",(function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)})).then((function(){t(null,{db:r})})).catch(t)})).bind(this),this.destroy=P("destroy",(function(e,t){"function"===typeof e&&(t=e,e={});var n=!("use_prefix"in this)||this.use_prefix;const r=()=>{this._destroy(e,((e,n)=>{if(e)return t(e);this._destroyed=!0,this.emit("destroyed"),t(null,n||{ok:!0})}))};if(de(this))return r();this.get("_local/_pouch_dependentDbs",((e,o)=>{if(e)return 404!==e.status?t(e):r();var i=o.dependentDbs,a=this.constructor,s=Object.keys(i).map((e=>{var t=n?e.replace(new RegExp("^"+a.prefix),""):e;return new a(t,this.__opts).destroy()}));Promise.all(s).then(r,t)}))})).bind(this)}_compact(e,t){var n,r={return_docs:!1,last_seq:e.last_seq||0},o=[],i=0;const a=e=>{this.activeTasks.update(n,{completed_items:++i}),o.push(this.compactDocument(e.id,0))},s=e=>{this.activeTasks.remove(n,e),t(e)},c=e=>{var r=e.last_seq;Promise.all(o).then((()=>_e(this,"_local/compaction",(e=>(!e.last_seq||e.last_seq<r)&&(e.last_seq=r,e))))).then((()=>{this.activeTasks.remove(n),t(null,{ok:!0})})).catch(s)};this.info().then((e=>{n=this.activeTasks.add({name:"database_compaction",total_items:e.update_seq-r.last_seq}),this.changes(r).on("change",a).on("complete",c).on("error",s)}))}changes(e,t){return"function"===typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new tt(this,e,t)}type(){return"function"===typeof this._type?this._type():this.adapter}}st.prototype.purge=P("_purge",(function(e,t,n){if("undefined"===typeof this._purge)return n(ae(Q,"Purge is not implemented in the "+this.adapter+" adapter."));var r=this;r._getRevisionTree(e,((o,i)=>{if(o)return n(o);if(!i)return n(ae($));let a;try{a=function(e,t){let n=[];const r=e.slice();let o;for(;o=r.pop();){const{pos:e,ids:i}=o,a="".concat(e,"-").concat(i[0]),s=i[2];if(n.push(a),a===t){if(0!==s.length)throw new Error("The requested revision is not a leaf");return n.reverse()}(0===s.length||s.length>1)&&(n=[]);for(let t=0,n=s.length;t<n;t++)r.push({pos:e+1,ids:s[t]})}if(0===n.length)throw new Error("The requested revision does not exist");return n.reverse()}(i,t)}catch(o){return n(o.message||o)}r._purge(e,a,((o,i)=>{if(o)return n(o);at(r,e,t).then((function(){return n(null,i)}))}))}))}));class ct{constructor(){this.isReady=!1,this.failed=!1,this.queue=[]}execute(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()}fail(e){this.failed=e,this.execute()}ready(e){this.isReady=!0,this.db=e,this.execute()}addTask(e){this.queue.push(e),this.failed&&this.execute()}}function lt(e,t){let n=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!(this instanceof n))return new n(...r);t.apply(this,r)};var r,o;return o=e,(r=n).prototype=Object.create(o.prototype,{constructor:{value:r}}),n}class ut extends st{constructor(e,t){super(),this._setup(e,t)}_setup(e,t){if(super._setup(),t=t||{},e&&"object"===typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=T(t),this.auto_compaction=t.auto_compaction,this.purged_infos_limit=t.purged_infos_limit||1e3,this.prefix=dt.prefix,"string"!==typeof e)throw new Error("Missing/invalid DB name");var n=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var r=dt.adapters,o=dt.preferredAdapters,i=dt.prefix,a=t.adapter;if(!a)for(var s=0;s<o.length&&"idb"===(a=o[s])&&"websql"in r&&F()&&localStorage["_pouch__websqldb_"+i+e];++s)z("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var c=r[a];return{name:c&&"use_prefix"in c&&!c.use_prefix?e:i+e,adapter:a}}((t.prefix||"")+e,t);if(t.name=n.name,t.adapter=t.adapter||n.adapter,this.name=e,this._adapter=t.adapter,dt.emit("debug",["adapter","Picked adapter: ",t.adapter]),!dt.adapters[t.adapter]||!dt.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);if(t.view_adapter&&(!dt.adapters[t.view_adapter]||!dt.adapters[t.view_adapter].valid()))throw new Error("Invalid View Adapter: "+t.view_adapter);this.taskqueue=new ct,this.adapter=t.adapter,dt.adapters[t.adapter].call(this,t,(e=>{if(e)return this.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",n),t||e.constructor.emit("destroyed",e.name)}function n(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",n),e.constructor.emit("ref",e)}(this),this.emit("created",this),dt.emit("created",this.name),this.taskqueue.ready(this)}))}}const dt=lt(ut,(function(e,t){ut.prototype._setup.call(this,e,t)}));var ft="undefined"!==typeof AbortController?AbortController:function(){return{abort:function(){}}},ht=fetch,pt=Headers;dt.adapters={},dt.preferredAdapters=[],dt.prefix="_pouch_";var mt=new(_());!function(e){Object.keys(_().prototype).forEach((function(t){"function"===typeof _().prototype[t]&&(e[t]=mt[t].bind(mt))}));var t=e._destructionListeners=new v;e.on("ref",(function(e){t.has(e.name)||t.set(e.name,[]),t.get(e.name).push(e)})),e.on("unref",(function(e){if(t.has(e.name)){var n=t.get(e.name),r=n.indexOf(e);r<0||(n.splice(r,1),n.length>1?t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(dt),dt.adapter=function(e,t,n){t.valid()&&(dt.adapters[e]=t,n&&dt.preferredAdapters.push(e))},dt.plugin=function(e){if("function"===typeof e)e(dt);else{if("object"!==typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){dt.prototype[t]=e[t]}))}return this.__defaults&&(dt.__defaults=q({},this.__defaults)),dt},dt.defaults=function(e){let t=lt(dt,(function(e,n){n=n||{},e&&"object"===typeof e&&(e=(n=e).name,delete n.name),n=q({},t.__defaults,n),dt.call(this,e,n)}));return t.preferredAdapters=dt.preferredAdapters.slice(),Object.keys(dt).forEach((function(e){e in t||(t[e]=dt[e])})),t.__defaults=q({},this.__defaults,e),t},dt.fetch=function(e,t){return ht(e,t)},dt.prototype.activeTasks=dt.activeTasks=new class{constructor(){this.tasks={}}list(){return Object.values(this.tasks)}add(e){const t=m();return this.tasks[t]={id:t,name:e.name,total_items:e.total_items,created_at:(new Date).toJSON()},t}get(e){return this.tasks[e]}remove(e,t){return delete this.tasks[e],this.tasks}update(e,t){const n=this.tasks[e];if("undefined"!==typeof n){const r={id:n.id,name:n.name,created_at:n.created_at,total_items:t.total_items||n.total_items,completed_items:t.completed_items||n.completed_items,updated_at:(new Date).toJSON()};this.tasks[e]=r}return this.tasks}};function gt(e,t){for(var n=e,r=0,o=t.length;r<o;r++){if(!(n=n[t[r]]))break}return n}function vt(e){for(var t=[],n="",r=0,o=e.length;r<o;r++){var i=e[r];r>0&&"\\"===e[r-1]&&("$"===i||"."===i)?n=n.substring(0,n.length-1)+i:"."===i?(t.push(n),n=""):n+=i}return t.push(n),t}var yt=["$or","$nor","$not"];function bt(e){return yt.indexOf(e)>-1}function _t(e){return Object.keys(e)[0]}function wt(e){var t={},n={$or:!0,$nor:!0};return e.forEach((function(e){Object.keys(e).forEach((function(r){var o=e[r];if("object"!==typeof o&&(o={$eq:o}),bt(r))if(o instanceof Array){if(n[r])return n[r]=!1,void(t[r]=o);var i=[];t[r].forEach((function(e){Object.keys(o).forEach((function(t){var n=o[t],r=Math.max(Object.keys(e).length,Object.keys(n).length),a=wt([e,n]);Object.keys(a).length<=r||i.push(a)}))})),t[r]=i}else t[r]=wt([o]);else{var a=t[r]=t[r]||{};Object.keys(o).forEach((function(e){var t=o[e];return"$gt"===e||"$gte"===e?function(e,t,n){if("undefined"!==typeof n.$eq)return;"undefined"!==typeof n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):"undefined"!==typeof n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t}(e,t,a):"$lt"===e||"$lte"===e?function(e,t,n){if("undefined"!==typeof n.$eq)return;"undefined"!==typeof n.$lte?"$lte"===e?t<n.$lte&&(n.$lte=t):t<=n.$lte&&(delete n.$lte,n.$lt=t):"undefined"!==typeof n.$lt?"$lte"===e?t<n.$lt&&(delete n.$lt,n.$lte=t):t<n.$lt&&(n.$lt=t):n[e]=t}(e,t,a):"$ne"===e?function(e,t){"$ne"in t?t.$ne.push(e):t.$ne=[e]}(t,a):"$eq"===e?function(e,t){delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}(t,a):"$regex"===e?function(e,t){"$regex"in t?t.$regex.push(e):t.$regex=[e]}(t,a):void(a[e]=t)}))}}))})),t}function xt(e){for(var t in e){if(Array.isArray(e))for(var n in e)e[n].$and&&(e[n]=wt(e[n].$and));var r=e[t];"object"===typeof r&&xt(r)}return e}function Ct(e,t){for(var n in e){"$and"===n&&(t=!0);var r=e[n];"object"===typeof r&&(t=Ct(r,t))}return t}function St(e){var t=T(e);Ct(t,!1)&&"$and"in(t=xt(t))&&(t=wt(t.$and)),["$or","$nor"].forEach((function(e){e in t&&t[e].forEach((function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n],o=e[r];"object"===typeof o&&null!==o||(e[r]={$eq:o})}}))})),"$not"in t&&(t.$not=wt([t.$not]));for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o];"object"===typeof i&&null!==i||(i={$eq:i}),t[o]=i}return kt(t),t}function kt(e){Object.keys(e).forEach((function(t){var n=e[t];Array.isArray(n)?n.forEach((function(e){e&&"object"===typeof e&&kt(e)})):"$ne"===t?e.$ne=[n]:"$regex"===t?e.$regex=[n]:n&&"object"===typeof n&&kt(n)}))}var Et=-324,Ot=3,Tt="";function At(e,t){if(e===t)return 0;e=Rt(e),t=Rt(t);var n=It(e),r=It(t);if(n-r!==0)return n-r;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=At(e[r],t[r]);if(0!==o)return o}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),r=Object.keys(t),o=Math.min(n.length,r.length),i=0;i<o;i++){var a=At(n[i],r[i]);if(0!==a)return a;if(0!==(a=At(e[n[i]],t[r[i]])))return a}return n.length===r.length?0:n.length>r.length?1:-1}(e,t)}function Rt(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var r=0;r<n;r++)e[r]=Rt(t[r])}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var o in e={},t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=t[o];"undefined"!==typeof i&&(e[o]=Rt(i))}}}return e}function Pt(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":return function(e){if(0===e)return"1";var t=e.toExponential().split(/e\+?/),n=parseInt(t[1],10),r=e<0,o=r?"0":"2",i=(a=((r?-n:n)-Et).toString(),s="0",c=Ot,function(e,t,n){for(var r="",o=n-e.length;r.length<o;)r+=t;return r}(a,s,c)+a);var a,s,c;o+=Tt+i;var l=Math.abs(parseFloat(t[0]));r&&(l=10-l);var u=l.toFixed(20);return u=u.replace(/\.?0+$/,""),o+=Tt+u,o}(e);case"string":return e.replace(/\u0002/g,"\x02\x02").replace(/\u0001/g,"\x01\x02").replace(/\u0000/g,"\x01\x01");case"object":var t=Array.isArray(e),n=t?e:Object.keys(e),r=-1,o=n.length,i="";if(t)for(;++r<o;)i+=Nt(n[r]);else for(;++r<o;){var a=n[r];i+=Nt(a)+Nt(e[a])}return i}return""}function Nt(e){return It(e=Rt(e))+Tt+Pt(e)+"\0"}function Dt(e,t){var n,r=t;if("1"===e[t])n=0,t++;else{var o="0"===e[t];t++;var i="",a=e.substring(t,t+Ot),s=parseInt(a,10)+Et;for(o&&(s=-s),t+=Ot;;){var c=e[t];if("\0"===c)break;i+=c,t++}n=1===(i=i.split(".")).length?parseInt(i,10):parseFloat(i[0]+"."+i[1]),o&&(n-=10),0!==s&&(n=parseFloat(n+"e"+s))}return{num:n,length:t-r}}function Mt(e,t){var n=e.pop();if(t.length){var r=t[t.length-1];n===r.element&&(t.pop(),r=t[t.length-1]);var o=r.element,i=r.index;if(Array.isArray(o))o.push(n);else if(i===e.length-2){o[e.pop()]=n}else e.push(n)}}function It(e){var t=["boolean","number","string","object"].indexOf(typeof e);return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:Array.isArray(e)?5:void 0}function Lt(e,t,n){if(e=e.filter((function(e){return jt(e.doc,t.selector,n)})),t.sort){var r=function(e){function t(t){return e.map((function(e){var n=vt(_t(e));return gt(t,n)}))}return function(e,n){var r,o,i=At(t(e.doc),t(n.doc));return 0!==i?i:(r=e.doc._id)<(o=n.doc._id)?-1:r>o?1:0}}(t.sort);e=e.sort(r),"string"!==typeof t.sort[0]&&"desc"===(o=t.sort[0])[_t(o)]&&(e=e.reverse())}var o;if("limit"in t||"skip"in t){var i=t.skip||0,a=("limit"in t?t.limit:e.length)+i;e=e.slice(i,a)}return e}function jt(e,t,n){return n.every((function(n){var r=t[n],o=vt(n),i=gt(e,o);return bt(n)?function(e,t,n){if("$or"===e)return t.some((function(e){return jt(n,e,Object.keys(e))}));if("$not"===e)return!jt(n,t,Object.keys(t));return!t.find((function(e){return jt(n,e,Object.keys(e))}))}(n,r,e):Ft(r,e,o,i)}))}function Ft(e,t,n,r){return!e||("object"===typeof e?Object.keys(e).every((function(o){var i=e[o];if(0===o.indexOf("$"))return Bt(o,t,i,n,r);var a=vt(o);if(void 0===r&&"object"!==typeof i&&a.length>0)return!1;var s=gt(r,a);return"object"===typeof i?Ft(i,t,n,s):Bt("$eq",t,i,a,s)})):e===r)}function Bt(e,t,n,r,o){if(!qt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return qt[e](t,n,r,o)}function zt(e){return"undefined"!==typeof e&&null!==e}function Ht(e){return"undefined"!==typeof e}function Vt(e,t){return t.some((function(t){return e instanceof Array?e.some((function(e){return 0===At(t,e)})):0===At(t,e)}))}var qt={$elemMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"===typeof r[0]&&null!==r[0]?r.some((function(e){return jt(e,t,Object.keys(t))})):r.some((function(r){return Ft(t,e,n,r)}))))},$allMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"===typeof r[0]&&null!==r[0]?r.every((function(e){return jt(e,t,Object.keys(t))})):r.every((function(r){return Ft(t,e,n,r)}))))},$eq:function(e,t,n,r){return Ht(r)&&0===At(r,t)},$gte:function(e,t,n,r){return Ht(r)&&At(r,t)>=0},$gt:function(e,t,n,r){return Ht(r)&&At(r,t)>0},$lte:function(e,t,n,r){return Ht(r)&&At(r,t)<=0},$lt:function(e,t,n,r){return Ht(r)&&At(r,t)<0},$exists:function(e,t,n,r){return t?Ht(r):!Ht(r)},$mod:function(e,t,n,r){return zt(r)&&function(e,t){return"number"===typeof e&&parseInt(e,10)===e&&e%t[0]===t[1]}(r,t)},$ne:function(e,t,n,r){return t.every((function(e){return 0!==At(r,e)}))},$in:function(e,t,n,r){return zt(r)&&Vt(r,t)},$nin:function(e,t,n,r){return zt(r)&&!Vt(r,t)},$size:function(e,t,n,r){return zt(r)&&Array.isArray(r)&&function(e,t){return e.length===t}(r,t)},$all:function(e,t,n,r){return Array.isArray(r)&&function(e,t){return t.every((function(t){return e.some((function(e){return 0===At(t,e)}))}))}(r,t)},$regex:function(e,t,n,r){return zt(r)&&"string"==typeof r&&t.every((function(e){return function(e,t){return new RegExp(t).test(e)}(r,e)}))},$type:function(e,t,n,r){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"===typeof e;case"number":return"number"===typeof e;case"string":return"string"===typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}}(r,t)}};function Ut(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"===typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function Wt(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"===typeof e.filter&&("_view"===e.filter?e.view=he(e.view):e.filter=he(e.filter))}function $t(e,t){return t.filter&&"string"===typeof t.filter&&!t.doc_ids&&!de(e.db)}function Gt(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!==typeof t.view){var r=ae(te,"`view` filter parameter not found or invalid.");return n(r)}var o=fe(t.view);e.db.get("_design/"+o[0],(function(r,i){if(e.isCancelled)return n(null,{status:"cancelled"});if(r)return n(se(r));var a=i&&i.views&&i.views[o[1]]&&i.views[o[1]].map;if(!a)return n(ae($,i.views?"missing json key: "+o[1]:"missing json key: views"));t.filter=be(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+a+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!==typeof t)throw new Error("Selector error: expected a JSON object");var n=Lt([{doc:e}],{selector:t=St(t)},Object.keys(t));return n&&1===n.length}(e,t.selector)},e.doChanges(t);else{var i=fe(t.filter);e.db.get("_design/"+i[0],(function(r,o){if(e.isCancelled)return n(null,{status:"cancelled"});if(r)return n(se(r));var a=o&&o.filters&&o.filters[i[1]];if(!a)return n(ae($,o&&o.filters?"missing json key: "+i[1]:"missing json key: filters"));t.filter=be('"use strict";\nreturn '+a+";",{}),e.doChanges(t)}))}}function Kt(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}dt.plugin((function(e){e._changesFilterPlugin={validate:Ut,normalize:Wt,shouldFilter:$t,filter:Gt}})),dt.version="8.0.1";var Xt=Kt(["_id","_rev","_access","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),Yt=Kt(["_access","_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function Qt(e){if(!/^\d+-/.test(e))return ae(oe);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function Zt(e,t,n){var r,o,i;n||(n={deterministic_revs:!0});var a={status:"available"};if(e._deleted&&(a.deleted=!0),t)if(e._id||(e._id=je()),o=Le(e,n.deterministic_revs),e._rev){if((i=Qt(e._rev)).error)return i;e._rev_tree=[{pos:i.prefix,ids:[i.id,{status:"missing"},[[o,a,[]]]]}],r=i.prefix+1}else e._rev_tree=[{pos:1,ids:[o,a,[]]}],r=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,o=[r[0],t,[]],i=1,a=r.length;i<a;i++)o=[r[i],{status:"missing"},[o]];return[{pos:n,ids:o}]}(e._revisions,a),r=e._revisions.start,o=e._revisions.ids[0]),!e._rev_tree){if((i=Qt(e._rev)).error)return i;r=i.prefix,o=i.id,e._rev_tree=[{pos:r,ids:[o,a,[]]}]}ue(e._id),e._rev=r+"-"+o;var s={metadata:{},data:{}};for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c)){var l="_"===c[0];if(l&&!Xt[c]){var u=ae(ee,c);throw u.message=ee.message+": "+c,u}l&&!Yt[c]?s.metadata[c.slice(1)]=e[c]:s.data[c]=e[c]}return s}function Jt(e,t,n){var r=function(e){try{return we(e)}catch(Lr){return{error:ae(Z,"Attachment is not a valid base64 string")}}}(e.data);if(r.error)return n(r.error);e.length=r.length,e.data="blob"===t?ke(r,e.content_type):"base64"===t?xe(r):r,Me(r,(function(t){e.digest="md5-"+t,n()}))}function en(e,t,n){if(e.stub)return n();"string"===typeof e.data?Jt(e,t,n):function(e,t,n){Me(e.data,(function(r){e.digest="md5-"+r,e.length=e.data.size||e.data.length||0,"binary"===t?Te(e.data,(function(t){e.data=t,n()})):"base64"===t?Ae(e.data,(function(t){e.data=t,n()})):n()}))}(e,t,n)}function tn(e,t,n,r,o,i,a,s){if(function(e,t){for(var n,r=e.slice(),o=t.split("-"),i=parseInt(o[0],10),a=o[1];n=r.pop();){if(n.pos===i&&n.ids[0]===a)return!0;for(var s=n.ids[2],c=0,l=s.length;c<l;c++)r.push({pos:n.pos+1,ids:s[c]})}return!1}(t.rev_tree,n.metadata.rev)&&!s)return r[o]=n,i();var c=t.winningRev||Fe(t),l="deleted"in t?t.deleted:Ze(t,c),u="deleted"in n.metadata?n.metadata.deleted:Ze(n.metadata),d=/^1-/.test(n.metadata.rev);if(l&&!u&&s&&d){var f=n.data;f._rev=c,f._id=n.metadata.id,n=Zt(f,s)}var h=Ye(t.rev_tree,n.metadata.rev_tree[0],e);if(s&&(l&&u&&"new_leaf"!==h.conflicts||!l&&"new_leaf"!==h.conflicts||l&&!u&&"new_branch"===h.conflicts)){var p=ae(G);return r[o]=p,i()}var m=n.metadata.rev;n.metadata.rev_tree=h.tree,n.stemmedRevs=h.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var g=Fe(n.metadata),v=Ze(n.metadata,g),y=l===v?0:l<v?-1:1;a(n,g,v,m===g?v:Ze(n.metadata,m),!0,y,o,i)}function nn(e,t,n,r,o,i,a,s,c){e=e||1e3;var l=s.new_edits,u=new v,d=0,f=t.length;function h(){++d===f&&c&&c()}t.forEach((function(e,t){if(e._id&&Je(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";n[r](e,{ctx:o},(function(e,n){i[t]=e||n,h()}))}else{var a=e.metadata.id;u.has(a)?(f--,u.get(a).push([e,t])):u.set(a,[[e,t]])}})),u.forEach((function(t,n){var o=0;function c(){++o<t.length?u():h()}function u(){var u=t[o],d=u[0],f=u[1];if(r.has(n))tn(e,r.get(n),d,i,f,c,a,l);else{var h=Ye([],d.metadata.rev_tree[0],e);d.metadata.rev_tree=h.tree,d.stemmedRevs=h.stemmedRevs||[],function(e,t,n){var r=Fe(e.metadata),o=Ze(e.metadata,r);if("was_delete"in s&&o)return i[t]=ae($,"deleted"),n();if(l&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e)){var c=ae(G);return i[t]=c,n()}a(e,r,o,o,!1,o?0:1,t,n)}(d,f,c)}}u()}))}var rn=5,on="document-store",an="by-sequence",sn="attach-store",cn="attach-seq-store",ln="meta-store",un="local-store",dn="detect-blob-support";function fn(e){try{return JSON.stringify(e)}catch(Lr){return y.stringify(e)}}function hn(e){return function(t){var n="unknown_error";t.target&&t.target.error&&(n=t.target.error.name||t.target.error.message),e(ae(re,n,t.type))}}function pn(e,t,n){return{data:fn(e),winningRev:t,deletedOrLocal:n?"1":"0",seq:e.seq,id:e.id}}function mn(e){if(!e)return null;var t=function(e){try{return JSON.parse(e)}catch(Lr){return y.parse(e)}}(e.data);return t.winningRev=e.winningRev,t.deleted="1"===e.deletedOrLocal,t.seq=e.seq,t}function gn(e){if(!e)return e;var t=e._doc_id_rev.lastIndexOf(":");return e._id=e._doc_id_rev.substring(0,t-1),e._rev=e._doc_id_rev.substring(t+1),delete e._doc_id_rev,e}function vn(e,t,n,r){n?r(e?"string"!==typeof e?e:Ee(e,t):Ce([""],{type:t})):e?"string"!==typeof e?Oe(e,(function(e){r(xe(e))})):r(e):r("")}function yn(e,t,n,r){var o=Object.keys(e._attachments||{});if(!o.length)return r&&r();var i=0;function a(){++i===o.length&&r&&r()}o.forEach((function(r){t.attachments&&t.include_docs?function(e,t){var r=e._attachments[t],o=r.digest;n.objectStore(sn).get(o).onsuccess=function(e){r.body=e.target.result.body,a()}}(e,r):(e._attachments[r].stub=!0,a())}))}function bn(e,t){return Promise.all(e.map((function(e){if(e.doc&&e.doc._attachments){var n=Object.keys(e.doc._attachments);return Promise.all(n.map((function(n){var r=e.doc._attachments[n];if("body"in r){var o=r.body,i=r.content_type;return new Promise((function(a){vn(o,i,t,(function(t){e.doc._attachments[n]=q(N(r,["digest","content_type"]),{data:t}),a()}))}))}})))}})))}function _n(e,t,n){var r=[],o=n.objectStore(an),i=n.objectStore(sn),a=n.objectStore(cn),s=e.length;function c(){--s||function(){if(!r.length)return;r.forEach((function(e){a.index("digestSeq").count(IDBKeyRange.bound(e+"::",e+"::\uffff",!1,!1)).onsuccess=function(t){t.target.result||i.delete(e)}}))}()}e.forEach((function(e){var n=o.index("_doc_id_rev"),i=t+"::"+e;n.getKey(i).onsuccess=function(e){var t=e.target.result;if("number"!==typeof t)return c();o.delete(t),a.index("seq").openCursor(IDBKeyRange.only(t)).onsuccess=function(e){var t=e.target.result;if(t){var n=t.value.digestSeq.split("::")[0];r.push(n),a.delete(t.primaryKey),t.continue()}else c()}}}))}function wn(e,t,n){try{return{txn:e.transaction(t,n)}}catch(r){return{error:r}}}var xn=new B;function Cn(e,t,n,r,o,i){for(var a,s,c,l,u,d,f,h,p=t.docs,m=0,g=p.length;m<g;m++){var y=p[m];y._id&&Je(y._id)||(y=p[m]=Zt(y,n.new_edits,e)).error&&!f&&(f=y)}if(f)return i(f);var b=!1,_=0,w=new Array(p.length),x=new v,C=!1,S=r._meta.blobSupport?"blob":"base64";function k(){b=!0,E()}function E(){h&&b&&(h.docCount+=_,d.put(h))}function O(){C||(xn.notify(r._meta.name),i(null,w))}function T(e,t,n,r,o,i,a,s){e.metadata.winningRev=t,e.metadata.deleted=n;var c=e.data;if(c._id=e.metadata.id,c._rev=e.metadata.rev,r&&(c._deleted=!0),c._attachments&&Object.keys(c._attachments).length)return function(e,t,n,r,o,i){var a=e.data,s=0,c=Object.keys(a._attachments);function u(){s===c.length&&A(e,t,n,r,o,i)}function d(){s++,u()}c.forEach((function(n){var r=e.data._attachments[n];if(r.stub)s++,u();else{var o=r.data;delete r.data,r.revpos=parseInt(t,10),function(e,t,n){var r=l.count(e);r.onsuccess=function(r){if(r.target.result)return n();var o={digest:e,body:t};l.put(o).onsuccess=n}}(r.digest,o,d)}}))}(e,t,n,o,a,s);_+=i,E(),A(e,t,n,o,a,s)}function A(e,t,n,o,i,l){var d=e.data,f=e.metadata;function h(i){var c=e.stemmedRevs||[];o&&r.auto_compaction&&(c=c.concat(function(e){var t=[];return Be(e.rev_tree,(function(e,n,r,o,i){"available"!==i.status||e||(t.push(n+"-"+r),i.status="missing")})),t}(e.metadata))),c&&c.length&&_n(c,e.metadata.id,a),f.seq=i.target.result;var l=pn(f,t,n);s.put(l).onsuccess=p}function p(){w[i]={ok:!0,id:f.id,rev:f.rev},x.set(e.metadata.id,e.metadata),function(e,t,n){var r=0,o=Object.keys(e.data._attachments||{});if(!o.length)return n();function i(){++r===o.length&&n()}function a(n){var r=e.data._attachments[n].digest,o=u.put({seq:t,digestSeq:r+"::"+t});o.onsuccess=i,o.onerror=function(e){e.preventDefault(),e.stopPropagation(),i()}}for(var s=0;s<o.length;s++)a(o[s])}(e,f.seq,l)}d._doc_id_rev=f.id+"::"+f.rev,delete d._id,delete d._rev;var m=c.put(d);m.onsuccess=h,m.onerror=function(e){e.preventDefault(),e.stopPropagation(),c.index("_doc_id_rev").getKey(d._doc_id_rev).onsuccess=function(e){c.put(d,e.target.result).onsuccess=h}}}!function(e,t,n){if(!e.length)return n();var r,o=0;function i(){o++,e.length===o&&(r?n(r):n())}e.forEach((function(e){var n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],o=0;if(!n.length)return i();function a(e){r=e,++o===n.length&&i()}for(var s in e.data._attachments)Object.prototype.hasOwnProperty.call(e.data._attachments,s)&&en(e.data._attachments[s],t,a)}))}(p,S,(function(t){if(t)return i(t);!function(){var t=wn(o,[on,an,sn,un,cn,ln],"readwrite");if(t.error)return i(t.error);(a=t.txn).onabort=hn(i),a.ontimeout=hn(i),a.oncomplete=O,s=a.objectStore(on),c=a.objectStore(an),l=a.objectStore(sn),u=a.objectStore(cn),(d=a.objectStore(ln)).get(ln).onsuccess=function(e){h=e.target.result,E()},function(e){var t=[];if(p.forEach((function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach((function(n){var r=e.data._attachments[n];r.stub&&t.push(r.digest)}))})),!t.length)return e();var n,r=0;function o(){++r===t.length&&e(n)}t.forEach((function(e){!function(e,t){var n=l.get(e);n.onsuccess=function(n){if(n.target.result)t();else{var r=ae(ie,"unknown stub attachment with digest "+e);r.status=412,t(r)}}}(e,(function(e){e&&!n&&(n=e),o()}))}))}((function(t){if(t)return C=!0,i(t);!function(){if(!p.length)return;var t=0;function o(){++t===p.length&&nn(e.revs_limit,p,r,x,a,w,T,n,k)}function i(e){var t=mn(e.target.result);t&&x.set(t.id,t),o()}for(var c=0,l=p.length;c<l;c++){var u=p[c];if(u._id&&Je(u._id))o();else s.get(u.metadata.id).onsuccess=i}}()}))}()}))}function Sn(e,t,n,r,o){var i,a,s;function c(e){a=e.target.result,i&&o(i,a,s)}function l(e){i=e.target.result,a&&o(i,a,s)}function u(e){var t=e.target.result;if(!t)return o();o([t.key],[t.value],t)}-1===r&&(r=1e3),"function"===typeof e.getAll&&"function"===typeof e.getAllKeys&&r>1&&!n?(s={continue:function(){if(!i.length)return o();var n,s=i[i.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(s,t.upper,!0,t.upperOpen)}catch(Lr){if("DataError"===Lr.name&&0===Lr.code)return o()}else n=IDBKeyRange.lowerBound(s,!0);t=n,i=null,a=null,e.getAll(t,r).onsuccess=c,e.getAllKeys(t,r).onsuccess=l}},e.getAll(t,r).onsuccess=c,e.getAllKeys(t,r).onsuccess=l):n?e.openCursor(t,"prev").onsuccess=u:e.openCursor(t).onsuccess=u}function kn(e,t,n){var r,o,i="startkey"in e&&e.startkey,a="endkey"in e&&e.endkey,s="key"in e&&e.key,c="keys"in e&&e.keys,l=e.skip||0,u="number"===typeof e.limit?e.limit:-1,d=!1!==e.inclusive_end;if(!c&&(r=function(e,t,n,r,o){try{if(e&&t)return o?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return o?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return o?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(r)return IDBKeyRange.only(r)}catch(Lr){return{error:Lr}}return null}(i,a,d,s,e.descending),(o=r&&r.error)&&("DataError"!==o.name||0!==o.code)))return n(ae(re,o.name,o.message));var f=[on,an,ln];e.attachments&&f.push(sn);var h=wn(t,f,"readonly");if(h.error)return n(h.error);var p=h.txn;p.oncomplete=function(){e.attachments?bn(w,e.binary).then(k):k()},p.onabort=hn(n);var m,g,v=p.objectStore(on),y=p.objectStore(an),b=p.objectStore(ln),_=y.index("_doc_id_rev"),w=[];function x(t,n){var r={id:n.id,key:n.id,value:{rev:t}};n.deleted?c&&(w.push(r),r.value.deleted=!0,r.doc=null):l--<=0&&(w.push(r),e.include_docs&&function(t,n,r){var o=t.id+"::"+r;_.get(o).onsuccess=function(r){if(n.doc=gn(r.target.result)||{},e.conflicts){var o=Ve(t);o.length&&(n.doc._conflicts=o)}yn(n.doc,e,p)}}(n,r,t))}function C(e){for(var t=0,n=e.length;t<n&&w.length!==u;t++){var r=e[t];if(r.error&&c)w.push(r);else{var o=mn(r);x(o.winningRev,o)}}}function S(e,t,n){n&&(C(t),w.length<u&&n.continue())}function k(){var t={total_rows:m,offset:e.skip,rows:w};e.update_seq&&void 0!==g&&(t.update_seq=g),n(null,t)}return b.get(ln).onsuccess=function(e){m=e.target.result.docCount},e.update_seq&&function(e,t){function n(e){var n=e.target.result,r=void 0;return n&&n.key&&(r=n.key),t({target:{result:[r]}})}e.openCursor(null,"prev").onsuccess=n}(y,(function(e){e.target.result&&e.target.result.length>0&&(g=e.target.result[0])})),o||0===u?void 0:c?function(e,t,n){var r=new Array(e.length),o=0;e.forEach((function(i,a){t.get(i).onsuccess=function(t){t.target.result?r[a]=t.target.result:r[a]={key:i,error:"not_found"},++o===e.length&&n(e,r,{})}}))}(e.keys,v,S):-1===u?function(e,t,n){if("function"!==typeof e.getAll){var r=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(r.push(t.value),t.continue()):n({target:{result:r}})}}else e.getAll(t).onsuccess=n}(v,r,(function(t){var n=t.target.result;e.descending&&(n=n.reverse()),C(n)})):void Sn(v,r,e.descending,u+l,S)}var En=!1,On=[];function Tn(){!En&&On.length&&(En=!0,On.shift()())}function An(e,t,n,r){if((e=T(e)).continuous){var o=n+":"+je();return xn.addListener(n,o,t,e),xn.notify(n),{cancel:function(){xn.removeListener(n,o)}}}var i=e.doc_ids&&new g(e.doc_ids);e.since=e.since||0;var a=e.since,s="limit"in e?e.limit:-1;0===s&&(s=1);var c,l,u,d,f=[],h=0,p=ce(e),m=new v;function y(e,t,n,r){if(n.seq!==t)return r();if(n.winningRev===e._rev)return r(n,e);var o=e._id+"::"+n.winningRev;d.get(o).onsuccess=function(e){r(n,gn(e.target.result))}}function b(){e.complete(null,{results:f,last_seq:a})}var _=[on,an];e.attachments&&_.push(sn);var w=wn(r,_,"readonly");if(w.error)return e.complete(w.error);(c=w.txn).onabort=hn(e.complete),c.oncomplete=function(){!e.continuous&&e.attachments?bn(f).then(b):b()},l=c.objectStore(an),u=c.objectStore(on),d=l.index("_doc_id_rev"),Sn(l,e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null,e.descending,s,(function(t,n,r){if(r&&t.length){var o=new Array(t.length),l=new Array(t.length),d=0;n.forEach((function(n,a){!function(e,t,n){if(i&&!i.has(e._id))return n();var r=m.get(e._id);if(r)return y(e,t,r,n);u.get(e._id).onsuccess=function(o){r=mn(o.target.result),m.set(e._id,r),y(e,t,r,n)}}(gn(n),t[a],(function(n,i){l[a]=n,o[a]=i,++d===t.length&&function(){for(var t=[],n=0,i=o.length;n<i&&h!==s;n++){var a=o[n];if(a){var c=l[n];t.push(g(c,a))}}Promise.all(t).then((function(t){for(var n=0,r=t.length;n<r;n++)t[n]&&e.onChange(t[n])})).catch(e.complete),h!==s&&r.continue()}()}))}))}function g(t,n){var r=e.processChange(n,t,e);a=r.seq=t.seq;var o=p(r);return"object"===typeof o?Promise.reject(o):o?(h++,e.return_docs&&f.push(r),e.attachments&&e.include_docs?new Promise((function(t){yn(n,e,c,(function(){bn([r],e.binary).then((function(){t(r)}))}))})):Promise.resolve(r)):Promise.resolve()}}))}var Rn,Pn=new v,Nn=new v;function Dn(e,t){var n=this;!function(e,t,n){On.push((function(){e((function(e,r){!function(e,t,n,r){try{e(t,n)}catch(t){r.emit("error",t)}}(t,e,r,n),En=!1,i()((function(){Tn()}))}))})),Tn()}((function(t){!function(e,t,n){var r=t.name,o=null,a=null;function s(e){return function(t,n){t&&t instanceof Error&&!t.reason&&a&&(t.reason=a),e(t,n)}}function c(e){var t=e.createObjectStore(on,{keyPath:"id"});e.createObjectStore(an,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(sn,{keyPath:"digest"}),e.createObjectStore(ln,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(dn),t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),e.createObjectStore(un,{keyPath:"_id"});var n=e.createObjectStore(cn,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}function l(e,t){var n=e.objectStore(on);n.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),n.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var o=r.value,i=Ze(o);o.deletedOrLocal=i?"1":"0",n.put(o),r.continue()}else t()}}function u(e){e.createObjectStore(un,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}function d(e,t){var n=e.objectStore(un),r=e.objectStore(on),o=e.objectStore(an);r.openCursor().onsuccess=function(e){var i=e.target.result;if(i){var a=i.value,s=a.id,c=Je(s),l=Fe(a);if(c){var u=s+"::"+l,d=s+"::",f=s+"::~",h=o.index("_doc_id_rev"),p=IDBKeyRange.bound(d,f,!1,!1),m=h.openCursor(p);m.onsuccess=function(e){if(m=e.target.result){var t=m.value;t._doc_id_rev===u&&n.put(t),o.delete(m.primaryKey),m.continue()}else r.delete(i.primaryKey),i.continue()}}else i.continue()}else t&&t()}}function f(e){var t=e.createObjectStore(cn,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}function h(e,t){var n=e.objectStore(an),r=e.objectStore(sn),o=e.objectStore(cn);r.count().onsuccess=function(e){if(!e.target.result)return t();n.openCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t();for(var r=n.value,i=n.primaryKey,a=Object.keys(r._attachments||{}),s={},c=0;c<a.length;c++){s[r._attachments[a[c]].digest]=!0}var l=Object.keys(s);for(c=0;c<l.length;c++){var u=l[c];o.put({seq:i,digestSeq:u+"::"+i})}n.continue()}}}function p(e){function t(e){return e.data?mn(e):(e.deleted="1"===e.deletedOrLocal,e)}var n=e.objectStore(an),r=e.objectStore(on);r.openCursor().onsuccess=function(e){var o=e.target.result;if(o){var i=t(o.value);if(i.winningRev=i.winningRev||Fe(i),i.seq)return s();a()}function a(){var e=i.id+"::",t=i.id+"::\uffff",r=n.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,t)),o=0;r.onsuccess=function(e){var t=e.target.result;if(!t)return i.seq=o,s();var n=t.primaryKey;n>o&&(o=n),t.continue()}}function s(){var e=pn(i,i.winningRev,i.deleted);r.put(e).onsuccess=function(){o.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=R((function(t){t(null,e._meta.instanceId)})),e._bulkDocs=function(n,r,i){Cn(t,n,r,e,o,s(i))},e._get=function(e,t,n){var r,i,a,s=t.ctx;if(!s){var c=wn(o,[on,an,sn],"readonly");if(c.error)return n(c.error);s=c.txn}function l(){n(a,{doc:r,metadata:i,ctx:s})}s.objectStore(on).get(e).onsuccess=function(e){if(!(i=mn(e.target.result)))return a=ae($,"missing"),l();var n;if(t.rev)n=t.latest?function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var o=n.pos,i=n.ids,a=i[0],s=i[1],c=i[2],l=0===c.length,u=n.history?n.history.slice():[];if(u.push({id:a,pos:o,opts:s}),l)for(var d=0,f=u.length;d<f;d++){var h=u[d];if(h.pos+"-"+h.id===e)return o+"-"+a}for(var p=0,m=c.length;p<m;p++)r.push({pos:o+1,ids:c[p],history:u})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(t.rev,i):t.rev;else if(n=i.winningRev,Ze(i))return a=ae($,"deleted"),l();var o=s.objectStore(an),c=i.id+"::"+n;o.index("_doc_id_rev").get(c).onsuccess=function(e){if((r=e.target.result)&&(r=gn(r)),!r)return a=ae($,"missing"),l();l()}}},e._getAttachment=function(e,t,n,r,i){var a;if(r.ctx)a=r.ctx;else{var s=wn(o,[on,an,sn],"readonly");if(s.error)return i(s.error);a=s.txn}var c=n.digest,l=n.content_type;a.objectStore(sn).get(c).onsuccess=function(e){vn(e.target.result.body,l,r.binary,(function(e){i(null,e)}))}},e._info=function(t){var n,r,i=wn(o,[ln,an],"readonly");if(i.error)return t(i.error);var a=i.txn;a.objectStore(ln).get(ln).onsuccess=function(e){r=e.target.result.docCount},a.objectStore(an).openCursor(null,"prev").onsuccess=function(e){var t=e.target.result;n=t?t.key:0},a.oncomplete=function(){t(null,{doc_count:r,update_seq:n,idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){kn(e,o,s(t))},e._changes=function(t){return An(t,e,r,o)},e._close=function(e){o.close(),Pn.delete(r),e()},e._getRevisionTree=function(e,t){var n=wn(o,[on],"readonly");if(n.error)return t(n.error);n.txn.objectStore(on).get(e).onsuccess=function(e){var n=mn(e.target.result);n?t(null,n.rev_tree):t(ae($))}},e._doCompaction=function(e,t,n){var r=wn(o,[on,an,sn,cn],"readwrite");if(r.error)return n(r.error);var i=r.txn;i.objectStore(on).get(e).onsuccess=function(n){var r=mn(n.target.result);Be(r.rev_tree,(function(e,n,r,o,i){var a=n+"-"+r;-1!==t.indexOf(a)&&(i.status="missing")})),_n(t,e,i);var o=r.winningRev,a=r.deleted;i.objectStore(on).put(pn(r,o,a))},i.onabort=hn(n),i.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=wn(o,[un],"readonly");if(n.error)return t(n.error);var r=n.txn.objectStore(un).get(e);r.onerror=hn(t),r.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,t(null,n)):t(ae($))}},e._putLocal=function(e,t,n){"function"===typeof t&&(n=t,t={}),delete e._revisions;var r=e._rev,i=e._id;e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var a,s=t.ctx;if(!s){var c=wn(o,[un],"readwrite");if(c.error)return n(c.error);(s=c.txn).onerror=hn(n),s.oncomplete=function(){a&&n(null,a)}}var l,u=s.objectStore(un);r?(l=u.get(i)).onsuccess=function(o){var i=o.target.result;i&&i._rev===r?u.put(e).onsuccess=function(){a={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,a)}:n(ae(G))}:((l=u.add(e)).onerror=function(e){n(ae(G)),e.preventDefault(),e.stopPropagation()},l.onsuccess=function(){a={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,a)})},e._removeLocal=function(e,t,n){"function"===typeof t&&(n=t,t={});var r,i=t.ctx;if(!i){var a=wn(o,[un],"readwrite");if(a.error)return n(a.error);(i=a.txn).oncomplete=function(){r&&n(null,r)}}var s=e._id,c=i.objectStore(un),l=c.get(s);l.onerror=hn(n),l.onsuccess=function(o){var i=o.target.result;i&&i._rev===e._rev?(c.delete(s),r={ok:!0,id:s,rev:"0-0"},t.ctx&&n(null,r)):n(ae($))}},e._destroy=function(e,t){xn.removeAllListeners(r);var n=Nn.get(r);n&&n.result&&(n.result.close(),Pn.delete(r));var o=indexedDB.deleteDatabase(r);o.onsuccess=function(){Nn.delete(r),F()&&r in localStorage&&delete localStorage[r],t(null,{ok:!0})},o.onerror=hn(t)};var m=Pn.get(r);if(m)return o=m.idb,e._meta=m.global,i()((function(){n(null,e)}));var g=indexedDB.open(r,rn);Nn.set(r,g),g.onupgradeneeded=function(e){var t=e.target.result;if(e.oldVersion<1)return c(t);var n=e.currentTarget.transaction;e.oldVersion<3&&u(t),e.oldVersion<4&&f(t);var r=[l,d,h,p],o=e.oldVersion;function i(){var e=r[o-1];o++,e&&e(n,i)}i()},g.onsuccess=function(t){(o=t.target.result).onversionchange=function(){o.close(),Pn.delete(r)},o.onabort=function(e){z("error","Database has a global failure",e.target.error),a=e.target.error,o.close(),Pn.delete(r)};var i,s,c,l,u=o.transaction([ln,dn,on],"readwrite"),d=!1;function f(){"undefined"!==typeof c&&d&&(e._meta={name:r,instanceId:l,blobSupport:c},Pn.set(r,{idb:o,global:e._meta}),n(null,e))}function h(){if("undefined"!==typeof s&&"undefined"!==typeof i){var e=r+"_id";e in i?l=i[e]:i[e]=l=je(),i.docCount=s,u.objectStore(ln).put(i)}}u.objectStore(ln).get(ln).onsuccess=function(e){i=e.target.result||{id:ln},h()},function(e,t){e.objectStore(on).index("deletedOrLocal").count(IDBKeyRange.only("0")).onsuccess=function(e){t(e.target.result)}}(u,(function(e){s=e,h()})),Rn||(Rn=function(e){return new Promise((function(t){var n=Ce([""]),r=e.objectStore(dn).put(n,"key");r.onsuccess=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)},r.onerror=e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}})).catch((function(){return!1}))}(u)),Rn.then((function(e){c=e,f()})),u.oncomplete=function(){d=!0,f()},u.onabort=hn(n)},g.onerror=function(e){var t=e.target.error&&e.target.error.message;t?-1!==t.indexOf("stored database is a higher version")&&(t=new Error('This DB was created with the newer "indexeddb" adapter, but you are trying to open it with the older "idb" adapter')):t="Failed to open indexedDB, are you in private browsing mode?",z("error",t),n(ae(re,t))}}(n,e,t)}),t,n.constructor)}Dn.valid=function(){try{return"undefined"!==typeof indexedDB&&"undefined"!==typeof IDBKeyRange}catch(Lr){return!1}};const Mn=25,In=50,Ln=5e3,jn=1e4;let Fn={};function Bn(e){let t=e.doc||e.ok,n=t&&t._attachments;n&&Object.keys(n).forEach((function(e){let t=n[e];t.data=Ee(t.data,t.content_type)}))}function zn(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function Hn(e){return e._attachments&&Object.keys(e._attachments)?Promise.all(Object.keys(e._attachments).map((function(t){let n=e._attachments[t];if(n.data&&"string"!==typeof n.data)return new Promise((function(e){Ae(n.data,e)})).then((function(e){n.data=e}))}))):Promise.resolve()}function Vn(e,t){if(function(e){if(!e.prefix)return!1;let t=ye(e.prefix).protocol;return"http"===t||"https"===t}(t)){let n=t.name.substr(t.prefix.length);e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}let n=ye(e);(n.user||n.password)&&(n.auth={username:n.user,password:n.password});let r=n.path.replace(/(^\/|\/$)/g,"").split("/");return n.db=r.pop(),-1===n.db.indexOf("%")&&(n.db=encodeURIComponent(n.db)),n.path=r.join("/"),n}function qn(e,t){return Un(e,e.db+"/"+t)}function Un(e,t){let n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function Wn(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}function $n(e,t){let n=this,r=Vn(e.name,e),o=qn(r,"");e=T(e);const a=async function(t,n){if((n=n||{}).headers=n.headers||new pt,n.credentials="include",e.auth||r.auth){let t=e.auth||r.auth,o=t.username+":"+t.password,i=xe(unescape(encodeURIComponent(o)));n.headers.set("Authorization","Basic "+i)}let o=e.headers||{};Object.keys(o).forEach((function(e){n.headers.append(e,o[e])})),function(e){let t="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),r=-1!==t.indexOf("trident"),o=-1!==t.indexOf("edge"),i=!("method"in e)||"GET"===e.method;return(n||r||o)&&i}(n)&&(t+=(-1===t.indexOf("?")?"?":"&")+"_nonce="+Date.now());let i=e.fetch||ht;return await i(t,n)};function s(e,t){return P(e,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];u().then((function(){return t.apply(this,n)})).catch((function(e){n.pop()(e)}))})).bind(n)}async function c(e,t){let n={};(t=t||{}).headers=t.headers||new pt,t.headers.get("Content-Type")||t.headers.set("Content-Type","application/json"),t.headers.get("Accept")||t.headers.set("Accept","application/json");const r=await a(e,t);n.ok=r.ok,n.status=r.status;const o=await r.json();if(n.data=o,!n.ok){throw n.data.status=n.status,se(n.data)}return Array.isArray(n.data)&&(n.data=n.data.map((function(e){return e.error||e.missing?se(e):e}))),n}let l;async function u(){return e.skip_setup?Promise.resolve():l||(l=c(o).catch((function(e){return e&&e.status&&404===e.status?(V(404,"PouchDB is just detecting if the remote exists."),c(o,{method:"PUT"})):Promise.reject(e)})).catch((function(e){return!(!e||!e.status||412!==e.status)||Promise.reject(e)})),l.catch((function(){l=null})),l)}function d(e){return e.split("/").map(encodeURIComponent).join("/")}i()((function(){t(null,n)})),n._remote=!0,n.type=function(){return"http"},n.id=s("id",(async function(e){let t;try{const e=await a(Un(r,""));t=await e.json()}catch(n){t={}}e(null,t&&t.uuid?t.uuid+r.db:qn(r,""))})),n.compact=s("compact",(async function(e,t){"function"===typeof e&&(t=e,e={}),e=T(e),await c(qn(r,"_compact"),{method:"POST"}),function r(){n.info((function(n,o){o&&!o.compact_running?t(null,{ok:!0}):setTimeout(r,e.interval||200)}))}()})),n.bulkGet=P("bulkGet",(function(e,t){let n=this;async function o(t){let n={};e.revs&&(n.revs=!0),e.attachments&&(n.attachments=!0),e.latest&&(n.latest=!0);try{const o=await c(qn(r,"_bulk_get"+Wn(n)),{method:"POST",body:JSON.stringify({docs:e.docs})});e.attachments&&e.binary&&o.data.results.forEach((function(e){e.docs.forEach(Bn)})),t(null,o.data)}catch(o){t(o)}}function i(){let r=In,o=Math.ceil(e.docs.length/r),i=0,a=new Array(o);function s(e){return function(n,r){a[e]=r.results,++i===o&&t(null,{results:le(a)})}}for(let t=0;t<o;t++){let o=N(e,["revs","attachments","binary","latest"]);o.docs=e.docs.slice(t*r,Math.min(e.docs.length,(t+1)*r)),j(n,o,s(t))}}let a=Un(r,""),s=Fn[a];"boolean"!==typeof s?o((function(e,n){e?(Fn[a]=!1,V(e.status,"PouchDB is just detecting if the remote supports the _bulk_get API."),i()):(Fn[a]=!0,t(null,n))})):s?o(t):i()})),n._info=async function(e){try{await u();const t=await a(qn(r,"")),n=await t.json();n.host=qn(r,""),e(null,n)}catch(t){e(t)}},n.fetch=async function(e,t){await u();const n="/"===e.substring(0,1)?Un(r,e.substring(1)):qn(r,e);return a(n,t)},n.get=s("get",(async function(e,t,n){"function"===typeof t&&(n=t,t={});let o={};function i(e){let n=e._attachments,o=n&&Object.keys(n);if(n&&o.length)return function(e,t){return new Promise((function(n,r){var o,i=0,a=0,s=0,c=e.length;function l(){++s===c?o?r(o):n():f()}function u(){i--,l()}function d(e){i--,o=o||e,l()}function f(){for(;i<t&&a<c;)i++,e[a++]().then(u,d)}f()}))}(o.map((function(o){return function(){return async function(o){const i=n[o],s=zn(e._id)+"/"+d(o)+"?rev="+e._rev,c=await a(qn(r,s));let l,u;if(l="buffer"in c?await c.buffer():await c.blob(),t.binary){let e=Object.getOwnPropertyDescriptor(l.__proto__,"type");e&&!e.set||(l.type=i.content_type),u=l}else u=await new Promise((function(e){Ae(l,e)}));delete i.stub,delete i.length,i.data=u}(o)}})),5)}(t=T(t)).revs&&(o.revs=!0),t.revs_info&&(o.revs_info=!0),t.latest&&(o.latest=!0),t.open_revs&&("all"!==t.open_revs&&(t.open_revs=JSON.stringify(t.open_revs)),o.open_revs=t.open_revs),t.rev&&(o.rev=t.rev),t.conflicts&&(o.conflicts=t.conflicts),t.update_seq&&(o.update_seq=t.update_seq),e=zn(e);const s=qn(r,e+Wn(o));try{const e=await c(s);t.attachments&&await(l=e.data,Array.isArray(l)?Promise.all(l.map((function(e){if(e.ok)return i(e.ok)}))):i(l)),n(null,e.data)}catch(u){u.docId=e,n(u)}var l})),n.remove=s("remove",(async function(e,t,n,o){let i;"string"===typeof t?(i={_id:e,_rev:t},"function"===typeof n&&(o=n,n={})):(i=e,"function"===typeof t?(o=t,n={}):(o=n,n=t));const a=i._rev||n.rev,s=qn(r,zn(i._id))+"?rev="+a;try{o(null,(await c(s,{method:"DELETE"})).data)}catch(l){o(l)}})),n.getAttachment=s("getAttachment",(async function(e,t,n,o){"function"===typeof n&&(o=n,n={});const i=n.rev?"?rev="+n.rev:"",s=qn(r,zn(e))+"/"+d(t)+i;let c;try{const e=await a(s,{method:"GET"});if(!e.ok)throw e;let t;if(c=e.headers.get("content-type"),t="undefined"===typeof process||process.browser||"function"!==typeof e.buffer?await e.blob():await e.buffer(),"undefined"!==typeof process&&!process.browser){var l=Object.getOwnPropertyDescriptor(t.__proto__,"type");l&&!l.set||(t.type=c)}o(null,t)}catch(u){o(u)}})),n.removeAttachment=s("removeAttachment",(async function(e,t,n,o){const i=qn(r,zn(e)+"/"+d(t))+"?rev="+n;try{o(null,(await c(i,{method:"DELETE"})).data)}catch(a){o(a)}})),n.putAttachment=s("putAttachment",(async function(e,t,n,o,i,a){"function"===typeof i&&(a=i,i=o,o=n,n=null);const s=zn(e)+"/"+d(t);let l=qn(r,s);if(n&&(l+="?rev="+n),"string"===typeof o){let e;try{e=we(o)}catch(u){return a(ae(Z,"Attachment is not a valid base64 string"))}o=e?ke(e,i):""}try{a(null,(await c(l,{headers:new pt({"Content-Type":i}),method:"PUT",body:o})).data)}catch(f){a(f)}})),n._bulkDocs=async function(e,t,n){e.new_edits=t.new_edits;try{await u(),await Promise.all(e.docs.map(Hn));n(null,(await c(qn(r,"_bulk_docs"),{method:"POST",body:JSON.stringify(e)})).data)}catch(o){n(o)}},n._put=async function(e,t,n){try{await u(),await Hn(e);n(null,(await c(qn(r,zn(e._id)),{method:"PUT",body:JSON.stringify(e)})).data)}catch(o){o.docId=e&&e._id,n(o)}},n.allDocs=s("allDocs",(async function(e,t){"function"===typeof e&&(t=e,e={});let n,o={},i="GET";(e=T(e)).conflicts&&(o.conflicts=!0),e.update_seq&&(o.update_seq=!0),e.descending&&(o.descending=!0),e.include_docs&&(o.include_docs=!0),e.attachments&&(o.attachments=!0),e.key&&(o.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(o.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(o.endkey=JSON.stringify(e.endkey)),"undefined"!==typeof e.inclusive_end&&(o.inclusive_end=!!e.inclusive_end),"undefined"!==typeof e.limit&&(o.limit=e.limit),"undefined"!==typeof e.skip&&(o.skip=e.skip);let a=Wn(o);"undefined"!==typeof e.keys&&(i="POST",n={keys:e.keys});try{const o=await c(qn(r,"_all_docs"+a),{method:i,body:JSON.stringify(n)});e.include_docs&&e.attachments&&e.binary&&o.data.rows.forEach(Bn),t(null,o.data)}catch(s){t(s)}})),n._changes=function(e){let t="batch_size"in e?e.batch_size:Mn;(e=T(e)).continuous&&!("heartbeat"in e)&&(e.heartbeat=jn);let n="timeout"in e?e.timeout:3e4;"timeout"in e&&e.timeout&&n-e.timeout<Ln&&(n=e.timeout+Ln),"heartbeat"in e&&e.heartbeat&&n-e.heartbeat<Ln&&(n=e.heartbeat+Ln);let o={};"timeout"in e&&e.timeout&&(o.timeout=e.timeout);let a="undefined"!==typeof e.limit&&e.limit,s=a;if(e.style&&(o.style=e.style),(e.include_docs||e.filter&&"function"===typeof e.filter)&&(o.include_docs=!0),e.attachments&&(o.attachments=!0),e.continuous&&(o.feed="longpoll"),e.seq_interval&&(o.seq_interval=e.seq_interval),e.conflicts&&(o.conflicts=!0),e.descending&&(o.descending=!0),e.update_seq&&(o.update_seq=!0),"heartbeat"in e&&e.heartbeat&&(o.heartbeat=e.heartbeat),e.filter&&"string"===typeof e.filter&&(o.filter=e.filter),e.view&&"string"===typeof e.view&&(o.filter="_view",o.view=e.view),e.query_params&&"object"===typeof e.query_params)for(let r in e.query_params)Object.prototype.hasOwnProperty.call(e.query_params,r)&&(o[r]=e.query_params[r]);let l,d="GET";e.doc_ids?(o.filter="_doc_ids",d="POST",l={doc_ids:e.doc_ids}):e.selector&&(o.filter="_selector",d="POST",l={selector:e.selector});let f,h=new ft;const p=async function(n,i){if(e.aborted)return;o.since=n,"object"===typeof o.since&&(o.since=JSON.stringify(o.since)),e.descending?a&&(o.limit=s):o.limit=!a||s>t?t:s;let p=qn(r,"_changes"+Wn(o)),m={signal:h.signal,method:d,body:JSON.stringify(l)};if(f=n,!e.aborted)try{await u();i(null,(await c(p,m)).data)}catch(g){i(g)}};let m={results:[]};const g=function(n,r){if(e.aborted)return;let o=0;if(r&&r.results){o=r.results.length,m.last_seq=r.last_seq;let t=null,n=null;"number"===typeof r.pending&&(t=r.pending),"string"!==typeof m.last_seq&&"number"!==typeof m.last_seq||(n=m.last_seq),{}.query=e.query_params,r.results=r.results.filter((function(r){s--;let o=ce(e)(r);return o&&(e.include_docs&&e.attachments&&e.binary&&Bn(r),e.return_docs&&m.results.push(r),e.onChange(r,t,n)),o}))}else if(n)return e.aborted=!0,void e.complete(n);r&&r.last_seq&&(f=r.last_seq);let c=a&&s<=0||r&&o<t||e.descending;(!e.continuous||a&&s<=0)&&c?e.complete(null,m):i()((function(){p(f,g)}))};return p(e.since||0,g),{cancel:function(){e.aborted=!0,h.abort()}}},n.revsDiff=s("revsDiff",(async function(e,t,n){"function"===typeof t&&(n=t,t={});try{n(null,(await c(qn(r,"_revs_diff"),{method:"POST",body:JSON.stringify(e)})).data)}catch(o){n(o)}})),n._close=function(e){e()},n._destroy=async function(e,t){try{t(null,await c(qn(r,""),{method:"DELETE"}))}catch(n){404===n.status?t(null,{ok:!0}):t(n)}}}$n.valid=function(){return!0};class Gn extends Error{constructor(e){super(),this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Gn)}catch(Lr){}}}class Kn extends Error{constructor(e){super(),this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Kn)}catch(Lr){}}}class Xn extends Error{constructor(e){super(),this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Xn)}catch(Lr){}}}function Yn(e,t){return t&&e.then((function(e){i()((function(){t(null,e)}))}),(function(e){i()((function(){t(e)}))})),e}function Qn(e,t){return function(){var n=arguments,r=this;return e.add((function(){return t.apply(r,n)}))}}function Zn(e){var t=new g(e),n=new Array(t.size),r=-1;return t.forEach((function(e){n[++r]=e})),n}function Jn(e){var t=new Array(e.size),n=-1;return e.forEach((function(e,r){t[++n]=r})),t}function er(e){return new Xn("builtin "+e+" function requires map values to be numbers or number arrays")}function tr(e){for(var t=0,n=0,r=e.length;n<r;n++){var o=e[n];if("number"!==typeof o){if(!Array.isArray(o))throw er("_sum");t="number"===typeof t?[t]:t;for(var i=0,a=o.length;i<a;i++){var s=o[i];if("number"!==typeof s)throw er("_sum");"undefined"===typeof t[i]?t.push(s):t[i]+=s}}else"number"===typeof t?t+=o:t[0]+=o}return t}var nr=z.bind(null,"log"),rr=Array.isArray,or=JSON.parse;function ir(e,t){return be("return ("+e.replace(/;\s*$/,"")+");",{emit:t,sum:tr,log:nr,isArray:rr,toJSON:or})}class ar{constructor(){this.promise=new Promise((function(e){e()}))}add(e){return this.promise=this.promise.catch((function(){})).then((function(){return e()})),this.promise}finish(){return this.promise}}function sr(e){if(!e)return"undefined";switch(typeof e){case"function":case"string":return e.toString();default:return JSON.stringify(e)}}async function cr(e,t,n,r,o,i){const a=function(e,t){return sr(e)+sr(t)+"undefined"}(n,r);let s;if(!o&&(s=e._cachedViews=e._cachedViews||{},s[a]))return s[a];const c=e.info().then((async function(c){const l=c.db_name+"-mrview-"+(o?"temp":Ie(a));await _e(e,"_local/"+i,(function(e){e.views=e.views||{};let n=t;-1===n.indexOf("/")&&(n=t+"/"+t);const r=e.views[n]=e.views[n]||{};if(!r[l])return r[l]=!0,e}));const u=(await e.registerDependentDatabase(l)).db;u.auto_compaction=!0;const d={name:l,db:u,sourceDB:e,adapter:e.adapter,mapFun:n,reduceFun:r};let f;try{f=await d.db.get("_local/lastSeq")}catch(h){if(404!==h.status)throw h}return d.seq=f?f.seq:0,s&&d.db.once("destroyed",(function(){delete s[a]})),d}));return s&&(s[a]=c),c}var lr={},ur=new ar;function dr(e){return-1===e.indexOf("/")?[e,e]:e.split("/")}function fr(e,t,n){try{e.emit("error",t)}catch(r){z("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),z("error",t,n)}}var hr={_sum:function(e,t){return tr(t)},_count:function(e,t){return t.length},_stats:function(e,t){return{sum:tr(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:function(e){for(var t=0,n=0,r=e.length;n<r;n++){var o=e[n];t+=o*o}return t}(t)}}};var pr=function(e,t,n,r){function o(e,t,n){try{t(n)}catch(Lr){fr(e,Lr,{fun:t,doc:n})}}function a(e,t,n,r,o){try{return{output:t(n,r,o)}}catch(Lr){return fr(e,Lr,{fun:t,keys:n,values:r,rereduce:o}),{error:Lr}}}function s(e,t){const n=At(e.key,t.key);return 0!==n?n:At(e.value,t.value)}function c(e,t,n){return n=n||0,"number"===typeof t?e.slice(n,t+n):n>0?e.slice(n):e}function l(e){const t=e.value;return t&&"object"===typeof t&&t._id||e.id}function u(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){const t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){const n=t[e];t[e].data=Ee(n.data,n.content_type)}))}))}(t),t}}function d(e,t,n,r){let o=t[e];"undefined"!==typeof o&&(r&&(o=encodeURIComponent(JSON.stringify(o))),n.push(e+"="+o))}function f(e){if("undefined"!==typeof e){const t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function h(e,t){const n=e.descending?"endkey":"startkey",r=e.descending?"startkey":"endkey";if("undefined"!==typeof e[n]&&"undefined"!==typeof e[r]&&At(e[n],e[r])>0)throw new Gn("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new Gn("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new Gn("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){const n=function(e){if(e){if("number"!==typeof e)return new Gn('Invalid value for integer: "'.concat(e,'"'));if(e<0)return new Gn('Invalid value for positive integer: "'.concat(e,'"'))}}(e[t]);if(n)throw n}))}function p(e){return function(t){if(404===t.status)return e;throw t}}function m(e,t,n){var r="_local/lastSeq";return e.db.get(r).catch(p({_id:r,seq:0})).then((function(r){var o=Jn(t);return Promise.all(o.map((function(n){return async function(e,t,n){const r="_local/doc_"+e,o={_id:r,keys:[]},i=n.get(e),a=i[0],s=i[1],c=await(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(s)?Promise.resolve(o):t.db.get(r).catch(p(o))),l=await function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(c);return function(e,t){const n=[],r=new g;for(let i=0,s=t.rows.length;i<s;i++){const e=t.rows[i].doc;if(e&&(n.push(e),r.add(e._id),e._deleted=!a.has(e._id),!e._deleted)){const t=a.get(e._id);"value"in t&&(e.value=t.value)}}const o=Jn(a);return o.forEach((function(e){if(!r.has(e)){const t={_id:e},r=a.get(e);"value"in r&&(t.value=r.value),n.push(t)}})),e.keys=Zn(o.concat(e.keys)),n.push(e),n}(c,l)}(n,e,t)}))).then((function(t){var o=le(t);return r.seq=n,o.push(r),e.db.bulkDocs({docs:o})})).then((()=>function(e){return e.sourceDB.get("_local/purges").then((function(t){const n=t.purgeSeq;return e.db.get("_local/purgeSeq").then((function(e){return e._rev})).catch((function(e){if(404!==e.status)throw e})).then((function(t){return e.db.put({_id:"_local/purgeSeq",_rev:t,purgeSeq:n})}))})).catch((function(e){if(404!==e.status)throw e}))}(e)))}))}function y(e){const t="string"===typeof e?e:e.name;let n=lr[t];return n||(n=lr[t]=new ar),n}async function b(e,n){return Qn(y(e),(function(){return async function(e,n){let r,i,a;function c(e,t){const n={id:i._id,key:Rt(e)};"undefined"!==typeof t&&null!==t&&(n.value=Rt(t)),r.push(n)}const l=t(e.mapFun,c);let u=e.seq||0;function d(){return e.sourceDB.info().then((function(t){a=e.sourceDB.activeTasks.add({name:"view_indexing",total_items:t.update_seq-u})}))}function f(t,n){return function(){return m(e,t,n)}}let h=0;const p={view:e.name,indexed_docs:h};e.sourceDB.emit("indexing",p);const g=new ar;async function y(){return _(await e.sourceDB.changes({return_docs:!0,conflicts:!0,include_docs:!0,style:"all_docs",since:u,limit:n.changes_batch_size}),await b())}function b(){return e.db.get("_local/purgeSeq").then((function(e){return e.purgeSeq})).catch((function(e){if(e&&404!==e.status)throw e;return-1})).then((function(t){return e.sourceDB.get("_local/purges").then((function(n){const r=n.purges.filter((function(e,n){return n>t})).map((e=>e.docId)),o=r.filter((function(e,t){return r.indexOf(e)===t}));return Promise.all(o.map((function(t){return e.sourceDB.get(t).then((function(e){return{docId:t,doc:e}})).catch((function(e){if(404!==e.status)throw e;return{docId:t}}))})))})).catch((function(e){if(e&&404!==e.status)throw e;return[]}))}))}function _(t,r){var o=t.results;if(!o.length&&!r.length)return;for(let e of r){if(o.findIndex((function(t){return t.id===e.docId}))<0){const t={_id:e.docId,doc:{_id:e.docId,_deleted:1},changes:[]};e.doc&&(t.doc=e.doc,t.changes.push({rev:e.doc._rev})),o.push(t)}}var i=w(o);g.add(f(i,u)),h+=o.length;const s={view:e.name,last_seq:t.last_seq,results_count:o.length,indexed_docs:h};return e.sourceDB.emit("indexing",s),e.sourceDB.activeTasks.update(a,{completed_items:h}),o.length<n.changes_batch_size?void 0:y()}function w(t){const n=new v;for(let a=0,c=t.length;a<c;a++){const c=t[a];if("_"!==c.doc._id[0]){r=[],i=c.doc,i._deleted||o(e.sourceDB,l,i),r.sort(s);const t=x(r);n.set(c.doc._id,[t,c.changes])}u=c.seq}return n}function x(e){const t=new v;let n;for(let r=0,o=e.length;r<o;r++){const o=e[r],i=[o.key,o.id];r>0&&0===At(o.key,n)&&i.push(r),t.set(Nt(i),o),n=o.key}return t}try{await d(),await y(),await g.finish(),e.seq=u,e.sourceDB.activeTasks.remove(a)}catch(C){e.sourceDB.activeTasks.remove(a,C)}}(e,n)}))()}function _(e,t){return Qn(y(e),(function(){return async function(e,t){let r;const o=e.reduceFun&&!1!==t.reduce,i=t.skip||0;"undefined"===typeof t.keys||t.keys.length||(t.limit=0,delete t.keys);async function s(t){t.include_docs=!0;const n=await e.db.allDocs(t);return r=n.total_rows,n.rows.map((function(e){if("value"in e.doc&&"object"===typeof e.doc.value&&null!==e.doc.value){const t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(t<n||t>n))return e.doc.value}const t=function(e){for(var t=[],n=[],r=0;;){var o=e[r++];if("\0"!==o)switch(o){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var i=Dt(e,r);t.push(i.num),r+=i.length;break;case"4":for(var a="";;){var s=e[r];if("\0"===s)break;a+=s,r++}a=a.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"\x01").replace(/\u0002\u0002/g,"\x02"),t.push(a);break;case"5":var c={element:[],index:t.length};t.push(c.element),n.push(c);break;case"6":var l={element:{},index:t.length};t.push(l.element),n.push(l);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+o)}else{if(1===t.length)return t.pop();Mt(t,n)}}}(e.doc._id);return{key:t[0],id:t[1],value:"value"in e.doc?e.doc.value:null}}))}async function u(s){let u;if(u=o?function(e,t,r){0===r.group_level&&delete r.group_level;const o=r.group||r.group_level,i=n(e.reduceFun),s=[],l=isNaN(r.group_level)?Number.POSITIVE_INFINITY:r.group_level;t.forEach((function(e){const t=s[s.length-1];let n=o?e.key:null;if(o&&Array.isArray(n)&&(n=n.slice(0,l)),t&&0===At(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);s.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})})),t=[];for(let n=0,c=s.length;n<c;n++){const r=s[n],o=a(e.sourceDB,i,r.keys,r.values,!1);if(o.error&&o.error instanceof Xn)throw o.error;t.push({value:o.error?null:o.output,key:r.groupKey})}return{rows:c(t,r.limit,r.skip)}}(e,s,t):"undefined"===typeof t.keys?{total_rows:r,offset:i,rows:s}:{total_rows:r,offset:i,rows:c(s,t.limit,t.skip)},t.update_seq&&(u.update_seq=e.seq),t.include_docs){const n=Zn(s.map(l)),r=await e.sourceDB.allDocs({keys:n,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary});var d=new v;return r.rows.forEach((function(e){d.set(e.id,e.doc)})),s.forEach((function(e){var t=l(e),n=d.get(t);n&&(e.doc=n)})),u}return u}if("undefined"!==typeof t.keys){const e=t.keys.map((function(e){const n={startkey:Nt([e]),endkey:Nt([e,{}])};return t.update_seq&&(n.update_seq=!0),s(n)}));return u(le(await Promise.all(e)))}{const e={descending:t.descending};let n,r;if(t.update_seq&&(e.update_seq=!0),"start_key"in t&&(n=t.start_key),"startkey"in t&&(n=t.startkey),"end_key"in t&&(r=t.end_key),"endkey"in t&&(r=t.endkey),"undefined"!==typeof n&&(e.startkey=t.descending?Nt([n,{}]):Nt([n])),"undefined"!==typeof r){let n=!1!==t.inclusive_end;t.descending&&(n=!n),e.endkey=Nt(n?[r,{}]:[r])}if("undefined"!==typeof t.key){const n=Nt([t.key]),r=Nt([t.key,{}]);e.descending?(e.endkey=n,e.startkey=r):(e.startkey=n,e.endkey=r)}o||("number"===typeof t.limit&&(e.limit=t.limit),e.skip=i);return u(await s(e))}}(e,t)}))()}async function w(t,n,o){if("function"===typeof t._query)return function(e,t,n){return new Promise((function(r,o){e._query(t,n,(function(e,t){if(e)return o(e);r(t)}))}))}(t,n,o);if(de(t))return async function(e,t,n){let r,o,i=[],a="GET";if(d("reduce",n,i),d("include_docs",n,i),d("attachments",n,i),d("limit",n,i),d("descending",n,i),d("group",n,i),d("group_level",n,i),d("skip",n,i),d("stale",n,i),d("conflicts",n,i),d("startkey",n,i,!0),d("start_key",n,i,!0),d("endkey",n,i,!0),d("end_key",n,i,!0),d("inclusive_end",n,i),d("key",n,i,!0),d("update_seq",n,i),i=i.join("&"),i=""===i?"":"?"+i,"undefined"!==typeof n.keys){const e=2e3,o="keys=".concat(encodeURIComponent(JSON.stringify(n.keys)));o.length+i.length+1<=e?i+=("?"===i[0]?"&":"?")+o:(a="POST","string"===typeof t?r={keys:n.keys}:t.keys=n.keys)}if("string"===typeof t){const s=dr(t),c=await e.fetch("_design/"+s[0]+"/_view/"+s[1]+i,{headers:new pt({"Content-Type":"application/json"}),method:a,body:JSON.stringify(r)});o=c.ok;const l=await c.json();if(!o)throw l.status=c.status,se(l);return l.rows.forEach((function(e){if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)})),new Promise((function(e){e(l)})).then(u(n))}r=r||{},Object.keys(t).forEach((function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()}));const s=await e.fetch("_temp_view"+i,{headers:new pt({"Content-Type":"application/json"}),method:"POST",body:JSON.stringify(r)});o=s.ok;const c=await s.json();if(!o)throw c.status=s.status,se(c);return new Promise((function(e){e(c)})).then(u(n))}(t,n,o);const a={changes_batch_size:t.__opts.view_update_changes_batch_size||50};if("string"!==typeof n)return h(o,n),ur.add((async function(){const r=await cr(t,"temp_view/temp_view",n.map,n.reduce,!0,e);return i=b(r,a).then((function(){return _(r,o)})),s=function(){return r.db.destroy()},i.then((function(e){return s().then((function(){return e}))}),(function(e){return s().then((function(){throw e}))}));var i,s})),ur.finish();{const s=n,c=dr(s),l=c[0],u=c[1],d=await t.get("_design/"+l);if(!(n=d.views&&d.views[u]))throw new Kn("ddoc ".concat(d._id," has no view named ").concat(u));r(d,u),h(o,n);const f=await cr(t,s,n.map,n.reduce,!1,e);return"ok"===o.stale||"update_after"===o.stale?("update_after"===o.stale&&i()((function(){b(f,a)})),_(f,o)):(await b(f,a),_(f,o))}}const x=(C=function(){const t=this;return"function"===typeof t._viewCleanup?function(e){return new Promise((function(t,n){e._viewCleanup((function(e,r){if(e)return n(e);t(r)}))}))}(t):de(t)?async function(e){return(await e.fetch("_view_cleanup",{headers:new pt({"Content-Type":"application/json"}),method:"POST"})).json()}(t):async function(t){try{const n=await t.get("_local/"+e),r=new v;Object.keys(n.views).forEach((function(e){const t=dr(e),n="_design/"+t[0],o=t[1];let i=r.get(n);i||(i=new g,r.set(n,i)),i.add(o)}));const o={keys:Jn(r),include_docs:!0},i=await t.allDocs(o),a={};i.rows.forEach((function(e){const t=e.key.substring(8);r.get(e.key).forEach((function(r){let o=t+"/"+r;n.views[o]||(o=r);const i=Object.keys(n.views[o]),s=e.doc&&e.doc.views&&e.doc.views[r];i.forEach((function(e){a[e]=a[e]||s}))}))}));const s=Object.keys(a).filter((function(e){return!a[e]})).map((function(e){return Qn(y(e),(function(){return new t.constructor(e,t.__opts).destroy()}))()}));return Promise.all(s).then((function(){return{ok:!0}}))}catch(n){if(404===n.status)return{ok:!0};throw n}}(t)},function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.pop(),o=C.apply(this,t);return"function"===typeof r&&Yn(o,r),o});var C;return{query:function(e,t,n){const r=this;"function"===typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=f(e.group_level),e.limit=f(e.limit),e.skip=f(e.skip),e}(t):{},"function"===typeof e&&(e={map:e});const o=Promise.resolve().then((function(){return w(r,e,t)}));return Yn(o,n),o},viewCleanup:x}}("mrviews",(function(e,t){if("function"===typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return ir(e.toString(),t)}),(function(e){var t=e.toString(),n=function(e){if(/^_sum/.test(e))return hr._sum;if(/^_count/.test(e))return hr._count;if(/^_stats/.test(e))return hr._stats;if(/^_/.test(e))throw new Error(e+" is not a supported reduce function.")}(t);return n||ir(t)}),(function(e,t){var n=e.views&&e.views[t];if("string"!==typeof n.map)throw new Kn("ddoc "+e._id+" has no string view named "+t+", instead found object of type: "+typeof n.map)}));var mr={query:function(e,t,n){return pr.query.call(this,e,t,n)},viewCleanup:function(e){return pr.viewCleanup.call(this,e)}};function gr(e,t){var n=Object.keys(t._attachments);return Promise.all(n.map((function(n){return e.getAttachment(t._id,n,{rev:t._rev})})))}function vr(e,t,n,r){n=T(n);var o=[],i=!0;return Promise.resolve().then((function(){var a=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].missing.forEach((function(e){t.push({id:n,rev:e})}))})),{docs:t,revs:!0,latest:!0}}(n);if(a.docs.length)return e.bulkGet(a).then((function(n){if(r.cancelled)throw new Error("cancelled");return Promise.all(n.results.map((function(n){return Promise.all(n.docs.map((function(n){var r=n.ok;return n.error&&(i=!1),r&&r._attachments?function(e,t,n){var r=de(t)&&!de(e),o=Object.keys(n._attachments);return r?e.get(n._id).then((function(r){return Promise.all(o.map((function(o){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(r,n,o)?t.getAttachment(n._id,o):e.getAttachment(r._id,o)})))})).catch((function(e){if(404!==e.status)throw e;return gr(t,n)})):gr(t,n)}(t,e,r).then((function(e){var t=Object.keys(r._attachments);return e.forEach((function(e,n){var o=r._attachments[t[n]];delete o.stub,delete o.length,o.data=e})),r})):r})))}))).then((function(e){o=o.concat(le(e).filter(Boolean))}))}))})).then((function(){return{ok:i,docs:o}}))}var yr="pouchdb",br=0;function _r(e,t,n,r,o){return e.get(t).catch((function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||V(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:r,_id:t,history:[],replicator:yr,version:1};throw n})).then((function(i){if(!o.cancelled&&i.last_seq!==n)return i.history=(i.history||[]).filter((function(e){return e.session_id!==r})),i.history.unshift({last_seq:n,session_id:r}),i.history=i.history.slice(0,5),i.version=1,i.replicator=yr,i.session_id=r,i.last_seq=n,e.put(i).catch((function(i){if(409===i.status)return _r(e,t,n,r,o);throw i}))}))}class wr{constructor(e,t,n,r,o){this.src=e,this.target=t,this.id=n,this.returnValue=r,this.opts=o||{}}writeCheckpoint(e,t){var n=this;return this.updateTarget(e,t).then((function(){return n.updateSource(e,t)}))}updateTarget(e,t){return this.opts.writeTargetCheckpoint?_r(this.target,this.id,e,t,this.returnValue):Promise.resolve(!0)}updateSource(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return _r(this.src,this.id,e,t,this.returnValue).catch((function(e){if(kr(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e}))}return Promise.resolve(!0)}getCheckpoint(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then((function(e){return e.last_seq||br})).catch((function(e){if(404!==e.status)throw e;return br})):e.target.get(e.id).then((function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||br:e.src.get(e.id).then((function(e){return t.version!==e.version?br:(n=t.version?t.version.toString():"undefined")in xr?xr[n](t,e):br;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:br}).then((function(){return br}),(function(n){return kr(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):br}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return br}))}}var xr={undefined:function(e,t){return 0===At(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){if(e.session_id===t.session_id)return{last_seq:e.last_seq,history:e.history};return Cr(e.history,t.history)}(t,e).last_seq}};function Cr(e,t){var n=e[0],r=e.slice(1),o=t[0],i=t.slice(1);return n&&0!==t.length?Sr(n.session_id,t)?{last_seq:n.last_seq,history:e}:Sr(o.session_id,r)?{last_seq:o.last_seq,history:i}:Cr(r,i):{last_seq:br,history:[]}}function Sr(e,t){var n=t[0],r=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||Sr(e,r))}function kr(e){return"number"===typeof e.status&&4===Math.floor(e.status/100)}function Er(e,t,n,r,o){return this instanceof wr?Er:new wr(e,t,n,r,o)}var Or=0;function Tr(e,t,n){var r=n.doc_ids?n.doc_ids.sort(At):"",o=n.filter?n.filter.toString():"",i="",a="",s="";return n.selector&&(s=JSON.stringify(n.selector)),n.filter&&n.query_params&&(i=JSON.stringify(function(e){return Object.keys(e).sort(At).reduce((function(t,n){return t[n]=e[n],t}),{})}(n.query_params))),n.filter&&"_view"===n.filter&&(a=n.view.toString()),Promise.all([e.id(),t.id()]).then((function(e){var t=e[0]+e[1]+o+a+i+r+s;return new Promise((function(e){Me(t,e)}))})).then((function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))}))}function Ar(e,t,n,r,o){var a,s,c,l,u=[],d={seq:0,changes:[],docs:[]},f=!1,h=!1,p=!1,m=0,g=0,v=n.continuous||n.live||!1,y=n.batch_size||100,b=n.batches_limit||10,_=n.style||"all_docs",w=!1,x=n.doc_ids,C=n.selector,S=[],k=je();o=o||{ok:!0,start_time:(new Date).toISOString(),docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var E={};function O(){return c?Promise.resolve():Tr(e,t,n).then((function(o){s=o;var i={};i=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},c=new Er(e,t,s,r,i)}))}function A(){if(S=[],0!==a.docs.length){var e=a.docs,i={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},i).then((function(t){if(r.cancelled)throw I(),new Error("cancelled");var n=Object.create(null);t.forEach((function(e){e.error&&(n[e.id]=e)}));var i=Object.keys(n).length;o.doc_write_failures+=i,o.docs_written+=e.length-i,e.forEach((function(e){var t=n[e._id];if(t){o.errors.push(t);var i=(t.name||"").toLowerCase();if("unauthorized"!==i&&"forbidden"!==i)throw t;r.emit("denied",T(t))}else S.push(e)}))}),(function(t){throw o.doc_write_failures+=e.length,t}))}}function R(){if(a.error)throw new Error("There was a problem getting docs.");o.last_seq=g=a.seq;var t=T(o);return S.length&&(t.docs=S,"number"===typeof a.pending&&(t.pending=a.pending,delete a.pending),r.emit("change",t)),f=!0,e.info().then((function(t){var n=e.activeTasks.get(l);if(a&&n){var r=n.completed_items||0,o=parseInt(t.update_seq,10)-parseInt(m,10);e.activeTasks.update(l,{completed_items:r+a.changes.length,total_items:o})}})),c.writeCheckpoint(a.seq,k).then((function(){if(r.emit("checkpoint",{checkpoint:a.seq}),f=!1,r.cancelled)throw I(),new Error("cancelled");a=void 0,B()})).catch((function(e){throw q(e),e}))}function P(){return vr(e,t,a.diffs,r).then((function(e){a.error=!e.ok,e.docs.forEach((function(e){delete a.diffs[e._id],o.docs_read++,a.docs.push(e)}))}))}function N(){r.cancelled||a||(0!==u.length?(a=u.shift(),r.emit("checkpoint",{start_next_batch:a.seq}),function(){var e={};return a.changes.forEach((function(t){r.emit("checkpoint",{revs_diff:t}),"_user/"!==t.id&&(e[t.id]=t.changes.map((function(e){return e.rev})))})),t.revsDiff(e).then((function(e){if(r.cancelled)throw I(),new Error("cancelled");a.diffs=e}))}().then(P).then(A).then(R).then(N).catch((function(e){M("batch processing terminated with error",e)}))):D(!0))}function D(e){0!==d.changes.length?(e||h||d.changes.length>=y)&&(u.push(d),d={seq:0,changes:[],docs:[]},"pending"!==r.state&&"stopped"!==r.state||(r.state="active",r.emit("active")),N()):0!==u.length||a||((v&&E.live||h)&&(r.state="pending",r.emit("paused")),h&&I())}function M(e,t){p||(t.message||(t.message=e),o.ok=!1,o.status="aborting",u=[],d={seq:0,changes:[],docs:[]},I(t))}function I(i){if(!p&&(!r.cancelled||(o.status="cancelled",!f)))if(o.status=o.status||"complete",o.end_time=(new Date).toISOString(),o.last_seq=g,p=!0,e.activeTasks.remove(l,i),i){(i=ae(i)).result=o;var a=(i.name||"").toLowerCase();"unauthorized"===a||"forbidden"===a?(r.emit("error",i),r.removeAllListeners()):function(e,t,n,r){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!==typeof e.back_off_function&&(e.back_off_function=H),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var o=function(){e.current_back_off=Or};t.once("paused",(function(){t.removeListener("active",o)})),t.once("active",o)}e.current_back_off=e.current_back_off||Or,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(r,e.current_back_off)}(n,r,i,(function(){Ar(e,t,n,r)}))}else r.emit("complete",o),r.removeAllListeners()}function L(t,o,a){if(r.cancelled)return I();if("number"===typeof o&&(d.pending=o),ce(n)(t))d.seq=t.seq||a,d.changes.push(t),r.emit("checkpoint",{pending_batch:d.seq}),i()((function(){D(0===u.length&&E.live)}));else{var s=e.activeTasks.get(l);if(s){var c=s.completed_items||0;e.activeTasks.update(l,{completed_items:++c})}}}function j(e){if(w=!1,r.cancelled)return I();if(e.results.length>0)E.since=e.results[e.results.length-1].seq,B(),D(!0);else{var t=function(){v?(E.live=!0,B()):h=!0,D(!0)};a||0!==e.results.length?t():(f=!0,c.writeCheckpoint(e.last_seq,k).then((function(){if(f=!1,o.last_seq=g=e.last_seq,r.cancelled)throw I(),new Error("cancelled");t()})).catch(q))}}function F(e){if(w=!1,r.cancelled)return I();M("changes rejected",e)}function B(){if(!w&&!h&&u.length<b){w=!0,r._changes&&(r.removeListener("cancel",r._abortChanges),r._changes.cancel()),r.once("cancel",o);var t=e.changes(E).on("change",L);t.then(i,i),t.then(j).catch(F),n.retry&&(r._changes=t,r._abortChanges=o)}function o(){t.cancel()}function i(){r.removeListener("cancel",o)}}function z(t){return e.info().then((function(r){var o="undefined"===typeof n.since?parseInt(r.update_seq,10)-parseInt(t,10):parseInt(r.update_seq,10);return l=e.activeTasks.add({name:"".concat(v?"continuous ":"","replication from ").concat(r.db_name),total_items:o}),t}))}function V(){O().then((function(){if(!r.cancelled)return c.getCheckpoint().then(z).then((function(e){m=e,E={since:g=e,limit:y,batch_size:y,style:_,doc_ids:x,selector:C,return_docs:!0},n.filter&&("string"!==typeof n.filter?E.include_docs=!0:E.filter=n.filter),"heartbeat"in n&&(E.heartbeat=n.heartbeat),"timeout"in n&&(E.timeout=n.timeout),n.query_params&&(E.query_params=n.query_params),n.view&&(E.view=n.view),B()}));I()})).catch((function(e){M("getCheckpoint rejected with ",e)}))}function q(e){f=!1,M("writeCheckpoint completed with error",e)}r.ready(e,t),r.cancelled?I():(r._addedListeners||(r.once("cancel",I),"function"===typeof n.complete&&(r.once("error",n.complete),r.once("complete",(function(e){n.complete(null,e)}))),r._addedListeners=!0),"undefined"===typeof n.since?V():O().then((function(){return f=!0,c.writeCheckpoint(n.since,k)})).then((function(){f=!1,r.cancelled?I():(g=n.since,V())})).catch(q))}class Rr extends(_()){constructor(){super(),this.cancelled=!1,this.state="pending";const e=new Promise(((e,t)=>{this.once("complete",e),this.once("error",t)}));this.then=function(t,n){return e.then(t,n)},this.catch=function(t){return e.catch(t)},this.catch((function(){}))}cancel(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")}ready(e,t){if(this._readyCalled)return;this._readyCalled=!0;const n=()=>{this.cancel()};function r(){e.removeListener("destroyed",n),t.removeListener("destroyed",n)}e.once("destroyed",n),t.once("destroyed",n),this.once("complete",r),this.once("error",r)}}function Pr(e,t){var n=t.PouchConstructor;return"string"===typeof e?new n(e,t):e}function Nr(e,t,n,r){if("function"===typeof n&&(r=n,n={}),"undefined"===typeof n&&(n={}),n.doc_ids&&!Array.isArray(n.doc_ids))throw ae(te,"`doc_ids` filter parameter is not a list.");n.complete=r,(n=T(n)).continuous=n.continuous||n.live,n.retry="retry"in n&&n.retry,n.PouchConstructor=n.PouchConstructor||this;var o=new Rr(n);return Ar(Pr(e,n),Pr(t,n),n,o),o}function Dr(e,t,n,r){return"function"===typeof n&&(r=n,n={}),"undefined"===typeof n&&(n={}),(n=T(n)).PouchConstructor=n.PouchConstructor||this,e=Pr(e,n),t=Pr(t,n),new Mr(e,t,n,r)}class Mr extends(_()){constructor(e,t,n,r){super(),this.canceled=!1;const o=n.push?q({},n,n.push):n,i=n.pull?q({},n,n.pull):n;this.push=Nr(e,t,o),this.pull=Nr(t,e,i),this.pushPaused=!0,this.pullPaused=!0;const a=e=>{this.emit("change",{direction:"pull",change:e})},s=e=>{this.emit("change",{direction:"push",change:e})},c=e=>{this.emit("denied",{direction:"push",doc:e})},l=e=>{this.emit("denied",{direction:"pull",doc:e})},u=()=>{this.pushPaused=!0,this.pullPaused&&this.emit("paused")},d=()=>{this.pullPaused=!0,this.pushPaused&&this.emit("paused")},f=()=>{this.pushPaused=!1,this.pullPaused&&this.emit("active",{direction:"push"})},h=()=>{this.pullPaused=!1,this.pushPaused&&this.emit("active",{direction:"pull"})};let p={};const m=e=>(t,n)=>{("change"===t&&(n===a||n===s)||"denied"===t&&(n===l||n===c)||"paused"===t&&(n===d||n===u)||"active"===t&&(n===h||n===f))&&(t in p||(p[t]={}),p[t][e]=!0,2===Object.keys(p[t]).length&&this.removeAllListeners(t))};function g(e,t,n){-1==e.listeners(t).indexOf(n)&&e.on(t,n)}n.live&&(this.push.on("complete",this.pull.cancel.bind(this.pull)),this.pull.on("complete",this.push.cancel.bind(this.push))),this.on("newListener",(function(e){"change"===e?(g(this.pull,"change",a),g(this.push,"change",s)):"denied"===e?(g(this.pull,"denied",l),g(this.push,"denied",c)):"active"===e?(g(this.pull,"active",h),g(this.push,"active",f)):"paused"===e&&(g(this.pull,"paused",d),g(this.push,"paused",u))})),this.on("removeListener",(function(e){"change"===e?(this.pull.removeListener("change",a),this.push.removeListener("change",s)):"denied"===e?(this.pull.removeListener("denied",l),this.push.removeListener("denied",c)):"active"===e?(this.pull.removeListener("active",h),this.push.removeListener("active",f)):"paused"===e&&(this.pull.removeListener("paused",d),this.push.removeListener("paused",u))})),this.pull.on("removeListener",m("pull")),this.push.on("removeListener",m("push"));const v=Promise.all([this.push,this.pull]).then((e=>{const t={push:e[0],pull:e[1]};return this.emit("complete",t),r&&r(null,t),this.removeAllListeners(),t}),(e=>{if(this.cancel(),r?r(e):this.emit("error",e),this.removeAllListeners(),r)throw e}));this.then=function(e,t){return v.then(e,t)},this.catch=function(e){return v.catch(e)}}cancel(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())}}dt.plugin((function(e){e.adapter("idb",Dn,!0)})).plugin((function(e){e.adapter("http",$n,!1),e.adapter("https",$n,!1)})).plugin(mr).plugin((function(e){e.replicate=Nr,e.sync=Dr,Object.defineProperty(e.prototype,"replicate",{get:function(){var e=this;return"undefined"===typeof this.replicateMethods&&(this.replicateMethods={from:function(t,n,r){return e.constructor.replicate(t,e,n,r)},to:function(t,n,r){return e.constructor.replicate(e,t,n,r)}}),this.replicateMethods}}),e.prototype.sync=function(e,t,n){return this.constructor.sync(this,e,t,n)}}));const Ir=dt},2635:(e,t,n)=>{"use strict";var r,o,i,a,s,c,l,u,d,f,h,p,m,g,v,y,b,_,w,x,C,S,k,E,O,T,A,R,P,N,D,M,I,L,j,F,B,z,H,V,q,U,W,$,G,K,X,Y,Q,Z,J,ee,te,ne,re,oe,ie=n(1744).default;var ae=n(9060),se=n(8344);function ce(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var le,ue=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(ae),de=ce(ae),fe=ce(se);function he(e,t){return e[t]}function pe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return[...e.slice(0,n),t,...e.slice(n)]}function me(){let e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).slice(),r=he(e,t);return r?n.splice(n.findIndex((e=>he(e,t)===r)),1):n.splice(n.findIndex((t=>t===e)),1),n}function ge(e){return e.map(((e,t)=>{const n=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(n.id=t+1),n}))}function ve(e,t){return Math.ceil(e/t)}function ye(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc"}(le||(le={}));const be=()=>null;function _e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n={},r=[...arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(n=t.style||{},t.classNames&&(r=[...r,...t.classNames]),"function"==typeof t.style&&(n=t.style(e)||{}))})),{conditionalStyle:n,classNames:r.join(" ")}}function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";const r=he(e,n);return r?t.some((e=>he(e,n)===r)):t.some((t=>t===e))}function xe(e,t){return t?e.findIndex((e=>Ce(e.id,t))):-1}function Ce(e,t){return e==t}function Se(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:n,rows:r,rowCount:o,mergeSelections:i}=t,a=!e.allSelected,s=!e.toggleOnSelectedRowsChange;if(i){const t=a?[...e.selectedRows,...r.filter((t=>!we(t,e.selectedRows,n)))]:e.selectedRows.filter((e=>!we(e,r,n)));return Object.assign(Object.assign({},e),{allSelected:a,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:s})}return Object.assign(Object.assign({},e),{allSelected:a,selectedCount:a?o:0,selectedRows:a?r:[],toggleOnSelectedRowsChange:s})}case"SELECT_SINGLE_ROW":{const{keyField:r,row:o,isSelected:i,rowCount:a,singleSelect:s}=t;return s?i?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[o],toggleOnSelectedRowsChange:n}):i?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:me(e.selectedRows,o,r),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===a,selectedRows:pe(e.selectedRows,o),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:r,selectedRows:o,totalRows:i,mergeSelections:a}=t;if(a){const t=[...e.selectedRows,...o.filter((t=>!we(t,e.selectedRows,r)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:o.length,allSelected:o.length===i,selectedRows:o,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:n}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:n})}case"SORT_CHANGE":{const{sortDirection:r,selectedColumn:o,clearSelectedOnSort:i}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:o,sortDirection:r,currentPage:1}),i&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:r,paginationServer:o,visibleOnly:i,persistSelectedOnPageChange:a}=t,s=o&&a,c=o&&!a||i;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:r}),s&&{allSelected:!1}),c&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:n,page:r}=t;return Object.assign(Object.assign({},e),{currentPage:r,rowsPerPage:n})}}}const ke=se.css(r||(r=ie(["\n\tpointer-events: none;\n\topacity: 0.4;\n"]))),Ee=fe.default.div(o||(o=ie(["\n\tposition: relative;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\tmax-width: 100%;\n\t",";\n\t",";\n"])),(e=>{let{disabled:t}=e;return t&&ke}),(e=>{let{theme:t}=e;return t.table.style})),Oe=se.css(i||(i=ie(["\n\tposition: sticky;\n\tposition: -webkit-sticky; /* Safari */\n\ttop: 0;\n\tz-index: 1;\n"]))),Te=fe.default.div(a||(a=ie(["\n\tdisplay: flex;\n\twidth: 100%;\n\t",";\n\t",";\n"])),(e=>{let{$fixedHeader:t}=e;return t&&Oe}),(e=>{let{theme:t}=e;return t.head.style})),Ae=fe.default.div(s||(s=ie(["\n\tdisplay: flex;\n\talign-items: stretch;\n\twidth: 100%;\n\t",";\n\t",";\n"])),(e=>{let{theme:t}=e;return t.headRow.style}),(e=>{let{$dense:t,theme:n}=e;return t&&n.headRow.denseStyle})),Re=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return se.css(c||(c=ie(["\n\t\t@media screen and (max-width: ","px) {\n\t\t\t","\n\t\t}\n\t"])),599,se.css(e,...n))},Pe=fe.default.div(f||(f=ie(["\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tline-height: normal;\n\t",";\n\t",";\n"])),(e=>{let{theme:t,$headCell:n}=e;return t[n?"headCells":"cells"].style}),(e=>{let{$noPadding:t}=e;return t&&"padding: 0"})),Ne=fe.default(Pe)(h||(h=ie(["\n\tflex-grow: ",";\n\tflex-shrink: 0;\n\tflex-basis: 0;\n\tmax-width: ",";\n\tmin-width: ",";\n\t",";\n\t",";\n\t",";\n\t",";\n\n\t/* handle hiding cells */\n\t",";\n\t",";\n\t",";\n\t",";\n"])),(e=>{let{button:t,grow:n}=e;return 0===n||t?0:n||1}),(e=>{let{maxWidth:t}=e;return t||"100%"}),(e=>{let{minWidth:t}=e;return t||"100px"}),(e=>{let{width:t}=e;return t&&se.css(p||(p=ie(["\n\t\t\tmin-width: ",";\n\t\t\tmax-width: ",";\n\t\t"])),t,t)}),(e=>{let{right:t}=e;return t&&"justify-content: flex-end"}),(e=>{let{button:t,center:n}=e;return(n||t)&&"justify-content: center"}),(e=>{let{compact:t,button:n}=e;return(t||n)&&"padding: 0"}),(e=>{let{hide:t}=e;return t&&"sm"===t&&Re(m||(m=ie(["\n display: none;\n "])))}),(e=>{let{hide:t}=e;return t&&"md"===t&&function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return se.css(l||(l=ie(["\n\t\t@media screen and (max-width: ","px) {\n\t\t\t","\n\t\t}\n\t"])),959,se.css(e,...n))}(g||(g=ie(["\n display: none;\n "])))}),(e=>{let{hide:t}=e;return t&&"lg"===t&&function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return se.css(u||(u=ie(["\n\t\t@media screen and (max-width: ","px) {\n\t\t\t","\n\t\t}\n\t"])),1280,se.css(e,...n))}(v||(v=ie(["\n display: none;\n "])))}),(e=>{let{hide:t}=e;return t&&Number.isInteger(t)&&(e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return se.css(d||(d=ie(["\n\t\t\t@media screen and (max-width: ","px) {\n\t\t\t\t","\n\t\t\t}\n\t\t"])),e,se.css(t,...r))})(t)(y||(y=ie(["\n display: none;\n "])))})),De=se.css(b||(b=ie(["\n\tdiv:first-child {\n\t\twhite-space: ",";\n\t\toverflow: ",";\n\t\ttext-overflow: ellipsis;\n\t}\n"])),(e=>{let{$wrapCell:t}=e;return t?"normal":"nowrap"}),(e=>{let{$allowOverflow:t}=e;return t?"visible":"hidden"})),Me=fe.default(Ne).attrs((e=>({style:e.style})))(_||(_=ie(["\n\t",";\n\t",";\n\t",";\n"])),(e=>{let{$renderAsCell:t}=e;return!t&&De}),(e=>{let{theme:t,$isDragging:n}=e;return n&&t.cells.draggingStyle}),(e=>{let{$cellStyle:t}=e;return t}));var Ie=ue.memo((function(e){let{id:t,column:n,row:r,rowIndex:o,dataTag:i,isDragging:a,onDragStart:s,onDragOver:c,onDragEnd:l,onDragEnter:u,onDragLeave:d}=e;const{conditionalStyle:f,classNames:h}=_e(r,n.conditionalCellStyles,["rdt_TableCell"]);return ue.createElement(Me,{id:t,"data-column-id":n.id,role:"cell",className:h,"data-tag":i,$cellStyle:n.style,$renderAsCell:!!n.cell,$allowOverflow:n.allowOverflow,button:n.button,center:n.center,compact:n.compact,grow:n.grow,hide:n.hide,maxWidth:n.maxWidth,minWidth:n.minWidth,right:n.right,width:n.width,$wrapCell:n.wrap,style:f,$isDragging:a,onDragStart:s,onDragOver:c,onDragEnd:l,onDragEnter:u,onDragLeave:d},!n.cell&&ue.createElement("div",{"data-tag":i},function(e,t,n,r){return t?n&&"function"==typeof n?n(e,r):t(e,r):null}(r,n.selector,n.format,o)),n.cell&&n.cell(r,o,n,t))}));const Le="input";var je=ue.memo((function(e){let{name:t,component:n=Le,componentOptions:r={style:{}},indeterminate:o=!1,checked:i=!1,disabled:a=!1,onClick:s=be}=e;const c=n,l=c!==Le?r.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(a),u=ue.useMemo((()=>function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let o;return Object.keys(e).map((t=>e[t])).forEach(((t,r)=>{const i=e;"function"==typeof t&&(o=Object.assign(Object.assign({},i),{[Object.keys(e)[r]]:t(...n)}))})),o||e}(r,o)),[r,o]);return ue.createElement(c,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=o)},style:l,onClick:a?be:s,name:t,"aria-label":t,checked:i,disabled:a},u,{onChange:be}))}));const Fe=fe.default(Pe)(w||(w=ie(["\n\tflex: 0 0 48px;\n\tmin-width: 48px;\n\tjustify-content: center;\n\talign-items: center;\n\tuser-select: none;\n\twhite-space: nowrap;\n"])));function Be(e){let{name:t,keyField:n,row:r,rowCount:o,selected:i,selectableRowsComponent:a,selectableRowsComponentProps:s,selectableRowsSingle:c,selectableRowDisabled:l,onSelectedRow:u}=e;const d=!(!l||!l(r));return ue.createElement(Fe,{onClick:e=>e.stopPropagation(),className:"rdt_TableCell",$noPadding:!0},ue.createElement(je,{name:t,component:a,componentOptions:s,checked:i,"aria-checked":i,onClick:()=>{u({type:"SELECT_SINGLE_ROW",row:r,isSelected:i,keyField:n,rowCount:o,singleSelect:c})},disabled:d}))}const ze=fe.default.button(x||(x=ie(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tuser-select: none;\n\twhite-space: nowrap;\n\tborder: none;\n\tbackground-color: transparent;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.expanderButton.style}));function He(e){let{disabled:t=!1,expanded:n=!1,expandableIcon:r,id:o,row:i,onToggled:a}=e;const s=n?r.expanded:r.collapsed;return ue.createElement(ze,{"aria-disabled":t,onClick:()=>a&&a(i),"data-testid":"expander-button-".concat(o),disabled:t,"aria-label":n?"Collapse Row":"Expand Row",role:"button",type:"button"},s)}const Ve=fe.default(Pe)(C||(C=ie(["\n\twhite-space: nowrap;\n\tfont-weight: 400;\n\tmin-width: 48px;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.expanderCell.style}));function qe(e){let{row:t,expanded:n=!1,expandableIcon:r,id:o,onToggled:i,disabled:a=!1}=e;return ue.createElement(Ve,{onClick:e=>e.stopPropagation(),$noPadding:!0},ue.createElement(He,{id:o,row:t,expanded:n,expandableIcon:r,disabled:a,onToggled:i}))}const Ue=fe.default.div(S||(S=ie(["\n\twidth: 100%;\n\tbox-sizing: border-box;\n\t",";\n\t",";\n"])),(e=>{let{theme:t}=e;return t.expanderRow.style}),(e=>{let{$extendedRowStyle:t}=e;return t}));var We=ue.memo((function(e){let{data:t,ExpanderComponent:n,expanderComponentProps:r,extendedRowStyle:o,extendedClassNames:i}=e;const a=["rdt_ExpanderRow",...i.split(" ").filter((e=>"rdt_TableRow"!==e))].join(" ");return ue.createElement(Ue,{className:a,$extendedRowStyle:o},ue.createElement(n,Object.assign({data:t},r)))}));const $e="allowRowEvents";var Ge,Ke,Xe;t.wN=void 0,(Ge=t.wN||(t.wN={})).LTR="ltr",Ge.RTL="rtl",Ge.AUTO="auto",t.yu=void 0,(Ke=t.yu||(t.yu={})).LEFT="left",Ke.RIGHT="right",Ke.CENTER="center",t.oZ=void 0,(Xe=t.oZ||(t.oZ={})).SM="sm",Xe.MD="md",Xe.LG="lg";const Ye=se.css(k||(k=ie(["\n\t&:hover {\n\t\t",";\n\t}\n"])),(e=>{let{$highlightOnHover:t,theme:n}=e;return t&&n.rows.highlightOnHoverStyle})),Qe=se.css(E||(E=ie(["\n\t&:hover {\n\t\tcursor: pointer;\n\t}\n"]))),Ze=fe.default.div.attrs((e=>({style:e.style})))(O||(O=ie(["\n\tdisplay: flex;\n\talign-items: stretch;\n\talign-content: stretch;\n\twidth: 100%;\n\tbox-sizing: border-box;\n\t",";\n\t",";\n\t",";\n\t",";\n\t",";\n\t",";\n\t",";\n"])),(e=>{let{theme:t}=e;return t.rows.style}),(e=>{let{$dense:t,theme:n}=e;return t&&n.rows.denseStyle}),(e=>{let{$striped:t,theme:n}=e;return t&&n.rows.stripedStyle}),(e=>{let{$highlightOnHover:t}=e;return t&&Ye}),(e=>{let{$pointerOnHover:t}=e;return t&&Qe}),(e=>{let{$selected:t,theme:n}=e;return t&&n.rows.selectedHighlightStyle}),(e=>{let{$conditionalStyle:t}=e;return t}));function Je(e){let{columns:t=[],conditionalRowStyles:n=[],defaultExpanded:r=!1,defaultExpanderDisabled:o=!1,dense:i=!1,expandableIcon:a,expandableRows:s=!1,expandableRowsComponent:c,expandableRowsComponentProps:l,expandableRowsHideExpander:u,expandOnRowClicked:d=!1,expandOnRowDoubleClicked:f=!1,highlightOnHover:h=!1,id:p,expandableInheritConditionalStyles:m,keyField:g,onRowClicked:v=be,onRowDoubleClicked:y=be,onRowMouseEnter:b=be,onRowMouseLeave:_=be,onRowExpandToggled:w=be,onSelectedRow:x=be,pointerOnHover:C=!1,row:S,rowCount:k,rowIndex:E,selectableRowDisabled:O=null,selectableRows:T=!1,selectableRowsComponent:A,selectableRowsComponentProps:R,selectableRowsHighlight:P=!1,selectableRowsSingle:N=!1,selected:D,striped:M=!1,draggingColumnId:I,onDragStart:L,onDragOver:j,onDragEnd:F,onDragEnter:B,onDragLeave:z}=e;const[H,V]=ue.useState(r);ue.useEffect((()=>{V(r)}),[r]);const q=ue.useCallback((()=>{V(!H),w(!H,S)}),[H,w,S]),U=C||s&&(d||f),W=ue.useCallback((e=>{e.target.getAttribute("data-tag")===$e&&(v(S,e),!o&&s&&d&&q())}),[o,d,s,q,v,S]),$=ue.useCallback((e=>{e.target.getAttribute("data-tag")===$e&&(y(S,e),!o&&s&&f&&q())}),[o,f,s,q,y,S]),G=ue.useCallback((e=>{b(S,e)}),[b,S]),K=ue.useCallback((e=>{_(S,e)}),[_,S]),X=he(S,g),{conditionalStyle:Y,classNames:Q}=_e(S,n,["rdt_TableRow"]),Z=P&&D,J=m?Y:{},ee=M&&E%2==0;return ue.createElement(ue.Fragment,null,ue.createElement(Ze,{id:"row-".concat(p),role:"row",$striped:ee,$highlightOnHover:h,$pointerOnHover:!o&&U,$dense:i,onClick:W,onDoubleClick:$,onMouseEnter:G,onMouseLeave:K,className:Q,$selected:Z,$conditionalStyle:Y},T&&ue.createElement(Be,{name:"select-row-".concat(X),keyField:g,row:S,rowCount:k,selected:D,selectableRowsComponent:A,selectableRowsComponentProps:R,selectableRowDisabled:O,selectableRowsSingle:N,onSelectedRow:x}),s&&!u&&ue.createElement(qe,{id:X,expandableIcon:a,expanded:H,row:S,onToggled:q,disabled:o}),t.map((e=>e.omit?null:ue.createElement(Ie,{id:"cell-".concat(e.id,"-").concat(X),key:"cell-".concat(e.id,"-").concat(X),dataTag:e.ignoreRowClick||e.button?null:$e,column:e,row:S,rowIndex:E,isDragging:Ce(I,e.id),onDragStart:L,onDragOver:j,onDragEnd:F,onDragEnter:B,onDragLeave:z})))),s&&H&&ue.createElement(We,{key:"expander-".concat(X),data:S,extendedRowStyle:J,extendedClassNames:Q,ExpanderComponent:c,expanderComponentProps:l}))}const et=fe.default.span(T||(T=ie(["\n\tpadding: 2px;\n\tcolor: inherit;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n\t",";\n\t",";\n"])),(e=>{let{$sortActive:t}=e;return t?"opacity: 1":"opacity: 0"}),(e=>{let{$sortDirection:t}=e;return"desc"===t&&"transform: rotate(180deg)"})),tt=e=>{let{sortActive:t,sortDirection:n}=e;return de.default.createElement(et,{$sortActive:t,$sortDirection:n},"\u25b2")},nt=fe.default(Ne)(A||(A=ie(["\n\t",";\n\t",";\n"])),(e=>{let{button:t}=e;return t&&"text-align: center"}),(e=>{let{theme:t,$isDragging:n}=e;return n&&t.headCells.draggingStyle})),rt=se.css(R||(R=ie(["\n\tcursor: pointer;\n\tspan.__rdt_custom_sort_icon__ {\n\t\ti,\n\t\tsvg {\n\t\t\ttransform: 'translate3d(0, 0, 0)';\n\t\t\t",";\n\t\t\tcolor: inherit;\n\t\t\tfont-size: 18px;\n\t\t\theight: 18px;\n\t\t\twidth: 18px;\n\t\t\tbackface-visibility: hidden;\n\t\t\ttransform-style: preserve-3d;\n\t\t\ttransition-duration: 95ms;\n\t\t\ttransition-property: transform;\n\t\t}\n\n\t\t&.asc i,\n\t\t&.asc svg {\n\t\t\ttransform: rotate(180deg);\n\t\t}\n\t}\n\n\t",";\n"])),(e=>{let{$sortActive:t}=e;return t?"opacity: 1":"opacity: 0"}),(e=>{let{$sortActive:t}=e;return!t&&se.css(P||(P=ie(["\n\t\t\t&:hover,\n\t\t\t&:focus {\n\t\t\t\topacity: 0.7;\n\n\t\t\t\tspan,\n\t\t\t\tspan.__rdt_custom_sort_icon__ * {\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t}\n\t\t"])))})),ot=fe.default.div(N||(N=ie(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: inherit;\n\theight: 100%;\n\twidth: 100%;\n\toutline: none;\n\tuser-select: none;\n\toverflow: hidden;\n\t",";\n"])),(e=>{let{disabled:t}=e;return!t&&rt})),it=fe.default.div(D||(D=ie(["\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n"])));var at=ue.memo((function(e){let{column:t,disabled:n,draggingColumnId:r,selectedColumn:o={},sortDirection:i,sortIcon:a,sortServer:s,pagination:c,paginationServer:l,persistSelectedOnSort:u,selectableRowsVisibleOnly:d,onSort:f,onDragStart:h,onDragOver:p,onDragEnd:m,onDragEnter:g,onDragLeave:v}=e;ue.useEffect((()=>{"string"==typeof t.selector&&console.error("Warning: ".concat(t.selector," is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]..."))}),[]);const[y,b]=ue.useState(!1),_=ue.useRef(null);if(ue.useEffect((()=>{_.current&&b(_.current.scrollWidth>_.current.clientWidth)}),[y]),t.omit)return null;const w=()=>{if(!t.sortable&&!t.selector)return;let e=i;Ce(o.id,t.id)&&(e=i===le.ASC?le.DESC:le.ASC),f({type:"SORT_CHANGE",sortDirection:e,selectedColumn:t,clearSelectedOnSort:c&&l&&!u||s||d})},x=e=>ue.createElement(tt,{sortActive:e,sortDirection:i}),C=()=>ue.createElement("span",{className:[i,"__rdt_custom_sort_icon__"].join(" ")},a),S=!(!t.sortable||!Ce(o.id,t.id)),k=!t.sortable||n,E=t.sortable&&!a&&!t.right,O=t.sortable&&!a&&t.right,T=t.sortable&&a&&!t.right,A=t.sortable&&a&&t.right;return ue.createElement(nt,{"data-column-id":t.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:t.allowOverflow,button:t.button,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,center:t.center,width:t.width,draggable:t.reorder,$isDragging:Ce(t.id,r),onDragStart:h,onDragOver:p,onDragEnd:m,onDragEnter:g,onDragLeave:v},t.name&&ue.createElement(ot,{"data-column-id":t.id,"data-sort-id":t.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:k?void 0:w,onKeyPress:k?void 0:e=>{"Enter"===e.key&&w()},$sortActive:!k&&S,disabled:k},!k&&A&&C(),!k&&O&&x(S),"string"==typeof t.name?ue.createElement(it,{title:y?t.name:void 0,ref:_,"data-column-id":t.id},t.name):t.name,!k&&T&&C(),!k&&E&&x(S)))}));const st=fe.default(Pe)(M||(M=ie(["\n\tflex: 0 0 48px;\n\tjustify-content: center;\n\talign-items: center;\n\tuser-select: none;\n\twhite-space: nowrap;\n\tfont-size: unset;\n"])));function ct(e){let{headCell:t=!0,rowData:n,keyField:r,allSelected:o,mergeSelections:i,selectedRows:a,selectableRowsComponent:s,selectableRowsComponentProps:c,selectableRowDisabled:l,onSelectAllRows:u}=e;const d=a.length>0&&!o,f=l?n.filter((e=>!l(e))):n,h=0===f.length,p=Math.min(n.length,f.length);return ue.createElement(st,{className:"rdt_TableCol",$headCell:t,$noPadding:!0},ue.createElement(je,{name:"select-all-rows",component:s,componentOptions:c,onClick:()=>{u({type:"SELECT_ALL_ROWS",rows:f,rowCount:p,mergeSelections:i,keyField:r})},checked:o,indeterminate:d,disabled:h}))}function lt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.wN.AUTO;const n="object"==typeof window,[r,o]=ue.useState(!1);return ue.useEffect((()=>{if(n)if("auto"!==e)o("rtl"===e);else{const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],n=document.getElementsByTagName("HTML")[0],r="rtl"===t.dir||"rtl"===n.dir;o(e&&r)}}),[e,n]),r}const ut=fe.default.div(I||(I=ie(["\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 1 0 auto;\n\theight: 100%;\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: 400;\n"])),(e=>{let{theme:t}=e;return t.contextMenu.fontColor}),(e=>{let{theme:t}=e;return t.contextMenu.fontSize})),dt=fe.default.div(L||(L=ie(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\tflex-wrap: wrap;\n"]))),ft=fe.default.div(j||(j=ie(["\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: inherit;\n\tz-index: 1;\n\talign-items: center;\n\tjustify-content: space-between;\n\tdisplay: flex;\n\t",";\n\t",";\n\t",";\n"])),(e=>{let{$rtl:t}=e;return t&&"direction: rtl"}),(e=>{let{theme:t}=e;return t.contextMenu.style}),(e=>{let{theme:t,$visible:n}=e;return n&&t.contextMenu.activeStyle}));function ht(e){let{contextMessage:t,contextActions:n,contextComponent:r,selectedCount:o,direction:i}=e;const a=lt(i),s=o>0;return r?ue.createElement(ft,{$visible:s},ue.cloneElement(r,{selectedCount:o})):ue.createElement(ft,{$visible:s,$rtl:a},ue.createElement(ut,null,((e,t,n)=>{if(0===t)return null;const r=1===t?e.singular:e.plural;return n?"".concat(t," ").concat(e.message||""," ").concat(r):"".concat(t," ").concat(r," ").concat(e.message||"")})(t,o,a)),ue.createElement(dt,null,n))}const pt=fe.default.div(F||(F=ie(["\n\tposition: relative;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\talign-items: center;\n\tjustify-content: space-between;\n\twidth: 100%;\n\tflex-wrap: wrap;\n\t","\n"])),(e=>{let{theme:t}=e;return t.header.style})),mt=fe.default.div(B||(B=ie(["\n\tflex: 1 0 auto;\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: 400;\n"])),(e=>{let{theme:t}=e;return t.header.fontColor}),(e=>{let{theme:t}=e;return t.header.fontSize})),gt=fe.default.div(z||(z=ie(["\n\tflex: 1 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\n\t> * {\n\t\tmargin-left: 5px;\n\t}\n"]))),vt=e=>{let{title:t,actions:n=null,contextMessage:r,contextActions:o,contextComponent:i,selectedCount:a,direction:s,showMenu:c=!0}=e;return ue.createElement(pt,{className:"rdt_TableHeader",role:"heading","aria-level":1},ue.createElement(mt,null,t),n&&ue.createElement(gt,null,n),c&&ue.createElement(ht,{contextMessage:r,contextActions:o,contextComponent:i,direction:s,selectedCount:a}))};function yt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;const bt={left:"flex-start",right:"flex-end",center:"center"},_t=fe.default.header(H||(H=ie(["\n\tposition: relative;\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tbox-sizing: border-box;\n\talign-items: center;\n\tpadding: 4px 16px 4px 24px;\n\twidth: 100%;\n\tjustify-content: ",";\n\tflex-wrap: ",";\n\t","\n"])),(e=>{let{align:t}=e;return bt[t]}),(e=>{let{$wrapContent:t}=e;return t?"wrap":"nowrap"}),(e=>{let{theme:t}=e;return t.subHeader.style})),wt=e=>{var{align:t="right",wrapContent:n=!0}=e,r=yt(e,["align","wrapContent"]);return ue.createElement(_t,Object.assign({align:t,$wrapContent:n},r))},xt=fe.default.div(V||(V=ie(["\n\tdisplay: flex;\n\tflex-direction: column;\n"]))),Ct=fe.default.div(q||(q=ie(["\n\tposition: relative;\n\twidth: 100%;\n\tborder-radius: inherit;\n\t",";\n\n\t",";\n\n\t",";\n"])),(e=>{let{$responsive:t,$fixedHeader:n}=e;return t&&se.css(U||(U=ie(["\n\t\t\toverflow-x: auto;\n\n\t\t\t// hidden prevents vertical scrolling in firefox when fixedHeader is disabled\n\t\t\toverflow-y: ",";\n\t\t\tmin-height: 0;\n\t\t"])),n?"auto":"hidden")}),(e=>{let{$fixedHeader:t=!1,$fixedHeaderScrollHeight:n="100vh"}=e;return t&&se.css(W||(W=ie(["\n\t\t\tmax-height: ",";\n\t\t\t-webkit-overflow-scrolling: touch;\n\t\t"])),n)}),(e=>{let{theme:t}=e;return t.responsiveWrapper.style})),St=fe.default.div($||($=ie(["\n\tposition: relative;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\t",";\n"])),(e=>e.theme.progress.style)),kt=fe.default.div(G||(G=ie(["\n\tposition: relative;\n\twidth: 100%;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.tableWrapper.style})),Et=fe.default(Pe)(K||(K=ie(["\n\twhite-space: nowrap;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.expanderCell.style})),Ot=fe.default.div(X||(X=ie(["\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.noData.style})),Tt=()=>de.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},de.default.createElement("path",{d:"M7 10l5 5 5-5z"}),de.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),At=fe.default.select(Y||(Y=ie(["\n\tcursor: pointer;\n\theight: 24px;\n\tmax-width: 100%;\n\tuser-select: none;\n\tpadding-left: 8px;\n\tpadding-right: 24px;\n\tbox-sizing: content-box;\n\tfont-size: inherit;\n\tcolor: inherit;\n\tborder: none;\n\tbackground-color: transparent;\n\tappearance: none;\n\tdirection: ltr;\n\tflex-shrink: 0;\n\n\t&::-ms-expand {\n\t\tdisplay: none;\n\t}\n\n\t&:disabled::-ms-expand {\n\t\tbackground: #f60;\n\t}\n\n\toption {\n\t\tcolor: initial;\n\t}\n"]))),Rt=fe.default.div(Q||(Q=ie(["\n\tposition: relative;\n\tflex-shrink: 0;\n\tfont-size: inherit;\n\tcolor: inherit;\n\tmargin-top: 1px;\n\n\tsvg {\n\t\ttop: 0;\n\t\tright: 0;\n\t\tcolor: inherit;\n\t\tposition: absolute;\n\t\tfill: currentColor;\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tdisplay: inline-block;\n\t\tuser-select: none;\n\t\tpointer-events: none;\n\t}\n"]))),Pt=e=>{var{defaultValue:t,onChange:n}=e,r=yt(e,["defaultValue","onChange"]);return ue.createElement(Rt,null,ue.createElement(At,Object.assign({onChange:n,defaultValue:t},r)),ue.createElement(Tt,null))},Nt={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return de.default.createElement("div",null,"To add an expander pass in a component instance via ",de.default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:de.default.createElement((()=>de.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},de.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),de.default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:de.default.createElement((()=>de.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},de.default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),de.default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:de.default.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:de.default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:t.yu.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:de.default.createElement((()=>de.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},de.default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),de.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:de.default.createElement((()=>de.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},de.default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),de.default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:de.default.createElement((()=>de.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},de.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),de.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:de.default.createElement((()=>de.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},de.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),de.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:t.wN.AUTO,onChangePage:be,onChangeRowsPerPage:be,onRowClicked:be,onRowDoubleClicked:be,onRowMouseEnter:be,onRowMouseLeave:be,onRowExpandToggled:be,onSelectedRowsChange:be,onSort:be,onColumnOrderChange:be},Dt={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},Mt=fe.default.nav(Z||(Z=ie(["\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding-right: 8px;\n\tpadding-left: 8px;\n\twidth: 100%;\n\t",";\n"])),(e=>{let{theme:t}=e;return t.pagination.style})),It=fe.default.button(J||(J=ie(["\n\tposition: relative;\n\tdisplay: block;\n\tuser-select: none;\n\tborder: none;\n\t",";\n\t",";\n"])),(e=>{let{theme:t}=e;return t.pagination.pageButtonsStyle}),(e=>{let{$isRTL:t}=e;return t&&"transform: scale(-1, -1)"})),Lt=fe.default.div(ee||(ee=ie(["\n\tdisplay: flex;\n\talign-items: center;\n\tborder-radius: 4px;\n\twhite-space: nowrap;\n\t",";\n"])),Re(te||(te=ie(["\n width: 100%;\n justify-content: space-around;\n "])))),jt=fe.default.span(ne||(ne=ie(["\n\tflex-shrink: 1;\n\tuser-select: none;\n"]))),Ft=fe.default(jt)(re||(re=ie(["\n\tmargin: 0 24px;\n"]))),Bt=fe.default(jt)(oe||(oe=ie(["\n\tmargin: 0 4px;\n"])));var zt=ue.memo((function(e){let{rowsPerPage:t,rowCount:n,currentPage:r,direction:o=Nt.direction,paginationRowsPerPageOptions:i=Nt.paginationRowsPerPageOptions,paginationIconLastPage:a=Nt.paginationIconLastPage,paginationIconFirstPage:s=Nt.paginationIconFirstPage,paginationIconNext:c=Nt.paginationIconNext,paginationIconPrevious:l=Nt.paginationIconPrevious,paginationComponentOptions:u=Nt.paginationComponentOptions,onChangeRowsPerPage:d=Nt.onChangeRowsPerPage,onChangePage:f=Nt.onChangePage}=e;const h=(()=>{const e="object"==typeof window;function t(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}const[n,r]=ue.useState(t);return ue.useEffect((()=>{if(!e)return()=>null;function n(){r(t())}return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[]),n})(),p=lt(o),m=h.width&&h.width>599,g=ve(n,t),v=r*t,y=v-t+1,b=1===r,_=r===g,w=Object.assign(Object.assign({},Dt),u),x=r===g?"".concat(y,"-").concat(n," ").concat(w.rangeSeparatorText," ").concat(n):"".concat(y,"-").concat(v," ").concat(w.rangeSeparatorText," ").concat(n),C=ue.useCallback((()=>f(r-1)),[r,f]),S=ue.useCallback((()=>f(r+1)),[r,f]),k=ue.useCallback((()=>f(1)),[f]),E=ue.useCallback((()=>f(ve(n,t))),[f,n,t]),O=ue.useCallback((e=>d(Number(e.target.value),r)),[r,d]),T=i.map((e=>ue.createElement("option",{key:e,value:e},e)));w.selectAllRowsItem&&T.push(ue.createElement("option",{key:-1,value:n},w.selectAllRowsItemText));const A=ue.createElement(Pt,{onChange:O,defaultValue:t,"aria-label":w.rowsPerPageText},T);return ue.createElement(Mt,{className:"rdt_Pagination"},!w.noRowsPerPage&&m&&ue.createElement(ue.Fragment,null,ue.createElement(Bt,null,w.rowsPerPageText),A),m&&ue.createElement(Ft,null,x),ue.createElement(Lt,null,ue.createElement(It,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":b,onClick:k,disabled:b,$isRTL:p},s),ue.createElement(It,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":b,onClick:C,disabled:b,$isRTL:p},l),!w.noRowsPerPage&&!m&&A,ue.createElement(It,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":_,onClick:S,disabled:_,$isRTL:p},c),ue.createElement(It,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":_,onClick:E,disabled:_,$isRTL:p},a)))}));const Ht=(e,t)=>{const n=ue.useRef(!0);ue.useEffect((()=>{n.current?n.current=!1:e()}),t)};var Vt=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===qt}(e)}(e)},qt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ut(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Kt((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Wt(e,t,n){return e.concat(t).map((function(e){return Ut(e,n)}))}function $t(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Gt(e,t){try{return t in e}catch(e){return!1}}function Kt(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Wt,n.isMergeableObject=n.isMergeableObject||Vt,n.cloneUnlessOtherwiseSpecified=Ut;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&$t(e).forEach((function(t){r[t]=Ut(e[t],n)})),$t(t).forEach((function(o){(function(e,t){return Gt(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(Gt(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return Kt;var n=t.customMerge(e);return"function"==typeof n?n:Kt}(o,n)(e[o],t[o],n):r[o]=Ut(t[o],n))})),r}(e,t,n):Ut(t,n)}Kt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Kt(e,n,t)}),{})};var Xt=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Kt);const Yt={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},Qt={default:Yt,light:Yt,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Zt(e,t,n,r){const[o,i]=ue.useState((()=>ge(e))),[a,s]=ue.useState(""),c=ue.useRef("");Ht((()=>{i(ge(e))}),[e]);const l=ue.useCallback((e=>{var t,n,r;const{attributes:i}=e.target,a=null===(t=i.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;a&&(c.current=(null===(r=null===(n=o[xe(o,a)])||void 0===n?void 0:n.id)||void 0===r?void 0:r.toString())||"",s(c.current))}),[o]),u=ue.useCallback((e=>{var n;const{attributes:r}=e.target,a=null===(n=r.getNamedItem("data-column-id"))||void 0===n?void 0:n.value;if(a&&c.current&&a!==c.current){const e=xe(o,c.current),n=xe(o,a),r=[...o];r[e]=o[n],r[n]=o[e],i(r),t(r)}}),[t,o]),d=ue.useCallback((e=>{e.preventDefault()}),[]),f=ue.useCallback((e=>{e.preventDefault()}),[]),h=ue.useCallback((e=>{e.preventDefault(),c.current="",s("")}),[]),p=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?le.ASC:le.DESC}(r),m=ue.useMemo((()=>o[xe(o,null==n?void 0:n.toString())]||{}),[n,o]);return{tableColumns:o,draggingColumnId:a,handleDragStart:l,handleDragEnter:u,handleDragOver:d,handleDragLeave:f,handleDragEnd:h,defaultSortDirection:p,defaultSortColumn:m}}var Jt=ue.memo((function(e){const{data:t=Nt.data,columns:n=Nt.columns,title:r=Nt.title,actions:o=Nt.actions,keyField:i=Nt.keyField,striped:a=Nt.striped,highlightOnHover:s=Nt.highlightOnHover,pointerOnHover:c=Nt.pointerOnHover,dense:l=Nt.dense,selectableRows:u=Nt.selectableRows,selectableRowsSingle:d=Nt.selectableRowsSingle,selectableRowsHighlight:f=Nt.selectableRowsHighlight,selectableRowsNoSelectAll:h=Nt.selectableRowsNoSelectAll,selectableRowsVisibleOnly:p=Nt.selectableRowsVisibleOnly,selectableRowSelected:m=Nt.selectableRowSelected,selectableRowDisabled:g=Nt.selectableRowDisabled,selectableRowsComponent:v=Nt.selectableRowsComponent,selectableRowsComponentProps:y=Nt.selectableRowsComponentProps,onRowExpandToggled:b=Nt.onRowExpandToggled,onSelectedRowsChange:_=Nt.onSelectedRowsChange,expandableIcon:w=Nt.expandableIcon,onChangeRowsPerPage:x=Nt.onChangeRowsPerPage,onChangePage:C=Nt.onChangePage,paginationServer:S=Nt.paginationServer,paginationServerOptions:k=Nt.paginationServerOptions,paginationTotalRows:E=Nt.paginationTotalRows,paginationDefaultPage:O=Nt.paginationDefaultPage,paginationResetDefaultPage:T=Nt.paginationResetDefaultPage,paginationPerPage:A=Nt.paginationPerPage,paginationRowsPerPageOptions:R=Nt.paginationRowsPerPageOptions,paginationIconLastPage:P=Nt.paginationIconLastPage,paginationIconFirstPage:N=Nt.paginationIconFirstPage,paginationIconNext:D=Nt.paginationIconNext,paginationIconPrevious:M=Nt.paginationIconPrevious,paginationComponent:I=Nt.paginationComponent,paginationComponentOptions:L=Nt.paginationComponentOptions,responsive:j=Nt.responsive,progressPending:F=Nt.progressPending,progressComponent:B=Nt.progressComponent,persistTableHead:z=Nt.persistTableHead,noDataComponent:H=Nt.noDataComponent,disabled:V=Nt.disabled,noTableHead:q=Nt.noTableHead,noHeader:U=Nt.noHeader,fixedHeader:W=Nt.fixedHeader,fixedHeaderScrollHeight:$=Nt.fixedHeaderScrollHeight,pagination:G=Nt.pagination,subHeader:K=Nt.subHeader,subHeaderAlign:X=Nt.subHeaderAlign,subHeaderWrap:Y=Nt.subHeaderWrap,subHeaderComponent:Q=Nt.subHeaderComponent,noContextMenu:Z=Nt.noContextMenu,contextMessage:J=Nt.contextMessage,contextActions:ee=Nt.contextActions,contextComponent:te=Nt.contextComponent,expandableRows:ne=Nt.expandableRows,onRowClicked:re=Nt.onRowClicked,onRowDoubleClicked:oe=Nt.onRowDoubleClicked,onRowMouseEnter:ie=Nt.onRowMouseEnter,onRowMouseLeave:ae=Nt.onRowMouseLeave,sortIcon:ce=Nt.sortIcon,onSort:de=Nt.onSort,sortFunction:fe=Nt.sortFunction,sortServer:pe=Nt.sortServer,expandableRowsComponent:me=Nt.expandableRowsComponent,expandableRowsComponentProps:ge=Nt.expandableRowsComponentProps,expandableRowDisabled:be=Nt.expandableRowDisabled,expandableRowsHideExpander:_e=Nt.expandableRowsHideExpander,expandOnRowClicked:xe=Nt.expandOnRowClicked,expandOnRowDoubleClicked:Ce=Nt.expandOnRowDoubleClicked,expandableRowExpanded:ke=Nt.expandableRowExpanded,expandableInheritConditionalStyles:Oe=Nt.expandableInheritConditionalStyles,defaultSortFieldId:Re=Nt.defaultSortFieldId,defaultSortAsc:Ne=Nt.defaultSortAsc,clearSelectedRows:De=Nt.clearSelectedRows,conditionalRowStyles:Me=Nt.conditionalRowStyles,theme:Ie=Nt.theme,customStyles:Le=Nt.customStyles,direction:je=Nt.direction,onColumnOrderChange:Fe=Nt.onColumnOrderChange,className:Be}=e,{tableColumns:ze,draggingColumnId:He,handleDragStart:Ve,handleDragEnter:qe,handleDragOver:Ue,handleDragLeave:We,handleDragEnd:$e,defaultSortDirection:Ge,defaultSortColumn:Ke}=Zt(n,Fe,Re,Ne),[{rowsPerPage:Xe,currentPage:Ye,selectedRows:Qe,allSelected:Ze,selectedCount:et,selectedColumn:tt,sortDirection:nt,toggleOnSelectedRowsChange:rt},ot]=ue.useReducer(Se,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:Ke,toggleOnSelectedRowsChange:!1,sortDirection:Ge,currentPage:O,rowsPerPage:A,selectedRowsFlag:!1,contextMessage:Nt.contextMessage}),{persistSelectedOnSort:it=!1,persistSelectedOnPageChange:st=!1}=k,lt=!(!S||!st&&!it),ut=G&&!F&&t.length>0,dt=I||zt,ft=ue.useMemo((()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default";const r=Qt[t]?t:n;return Xt({table:{style:{color:(o=Qt[r]).text.primary,backgroundColor:o.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:o.text.primary,backgroundColor:o.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:o.background.default,minHeight:"52px"}},head:{style:{color:o.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:o.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:o.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:o.context.background,fontSize:"18px",fontWeight:400,color:o.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:o.text.primary,backgroundColor:o.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:o.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:o.selected.text,backgroundColor:o.selected.default,borderBottomColor:o.background.default}},highlightOnHoverStyle:{color:o.highlightOnHover.text,backgroundColor:o.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:o.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:o.background.default},stripedStyle:{color:o.striped.text,backgroundColor:o.striped.default}},expanderRow:{style:{color:o.text.primary,backgroundColor:o.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:o.button.default,fill:o.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:o.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:o.button.hover},"&:focus":{outline:"none",backgroundColor:o.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:o.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:o.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:o.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:o.button.default,fill:o.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:o.button.disabled,fill:o.button.disabled},"&:hover:not(:disabled)":{backgroundColor:o.button.hover},"&:focus":{outline:"none",backgroundColor:o.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:o.text.primary,backgroundColor:o.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:o.text.primary,backgroundColor:o.background.default}}},e);var o}(Le,Ie)),[Le,Ie]),ht=ue.useMemo((()=>Object.assign({},"auto"!==je&&{dir:je})),[je]),pt=ue.useMemo((()=>{if(pe)return t;if((null==tt?void 0:tt.sortFunction)&&"function"==typeof tt.sortFunction){const e=tt.sortFunction,n=nt===le.ASC?e:(t,n)=>-1*e(t,n);return[...t].sort(n)}return function(e,t,n,r){return t?r&&"function"==typeof r?r(e.slice(0),t,n):e.slice(0).sort(((e,r)=>{const o=t(e),i=t(r);if("asc"===n){if(o<i)return-1;if(o>i)return 1}if("desc"===n){if(o>i)return-1;if(o<i)return 1}return 0})):e}(t,null==tt?void 0:tt.selector,nt,fe)}),[pe,tt,nt,t,fe]),mt=ue.useMemo((()=>{if(G&&!S){const e=Ye*Xe,t=e-Xe;return pt.slice(t,e)}return pt}),[Ye,G,S,Xe,pt]),gt=ue.useCallback((e=>{ot(e)}),[]),yt=ue.useCallback((e=>{ot(e)}),[]),bt=ue.useCallback((e=>{ot(e)}),[]),_t=ue.useCallback(((e,t)=>re(e,t)),[re]),Tt=ue.useCallback(((e,t)=>oe(e,t)),[oe]),At=ue.useCallback(((e,t)=>ie(e,t)),[ie]),Rt=ue.useCallback(((e,t)=>ae(e,t)),[ae]),Pt=ue.useCallback((e=>ot({type:"CHANGE_PAGE",page:e,paginationServer:S,visibleOnly:p,persistSelectedOnPageChange:st})),[S,st,p]),Dt=ue.useCallback((e=>{const t=ve(E||mt.length,e),n=ye(Ye,t);S||Pt(n),ot({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e})}),[Ye,Pt,S,E,mt.length]);if(G&&!S&&pt.length>0&&0===mt.length){const e=ve(pt.length,Xe),t=ye(Ye,e);Pt(t)}Ht((()=>{_({allSelected:Ze,selectedCount:et,selectedRows:Qe.slice(0)})}),[rt]),Ht((()=>{de(tt,nt,pt.slice(0))}),[tt,nt]),Ht((()=>{C(Ye,E||pt.length)}),[Ye]),Ht((()=>{x(Xe,Ye)}),[Xe]),Ht((()=>{Pt(O)}),[O,T]),Ht((()=>{if(G&&S&&E>0){const e=ve(E,Xe),t=ye(Ye,e);Ye!==t&&Pt(t)}}),[E]),ue.useEffect((()=>{ot({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:De})}),[d,De]),ue.useEffect((()=>{if(!m)return;const e=pt.filter((e=>m(e))),t=d?e.slice(0,1):e;ot({type:"SELECT_MULTIPLE_ROWS",keyField:i,selectedRows:t,totalRows:pt.length,mergeSelections:lt})}),[t,m]);const Mt=p?mt:pt,It=st||d||h;return ue.createElement(se.ThemeProvider,{theme:ft},!U&&(!!r||!!o)&&ue.createElement(vt,{title:r,actions:o,showMenu:!Z,selectedCount:et,direction:je,contextActions:ee,contextComponent:te,contextMessage:J}),K&&ue.createElement(wt,{align:X,wrapContent:Y},Q),ue.createElement(Ct,Object.assign({$responsive:j,$fixedHeader:W,$fixedHeaderScrollHeight:$,className:Be},ht),ue.createElement(kt,null,F&&!z&&ue.createElement(St,null,B),ue.createElement(Ee,{disabled:V,className:"rdt_Table",role:"table"},!q&&(!!z||pt.length>0&&!F)&&ue.createElement(Te,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:W},ue.createElement(Ae,{className:"rdt_TableHeadRow",role:"row",$dense:l},u&&(It?ue.createElement(Pe,{style:{flex:"0 0 48px"}}):ue.createElement(ct,{allSelected:Ze,selectedRows:Qe,selectableRowsComponent:v,selectableRowsComponentProps:y,selectableRowDisabled:g,rowData:Mt,keyField:i,mergeSelections:lt,onSelectAllRows:yt})),ne&&!_e&&ue.createElement(Et,null),ze.map((e=>ue.createElement(at,{key:e.id,column:e,selectedColumn:tt,disabled:F||0===pt.length,pagination:G,paginationServer:S,persistSelectedOnSort:it,selectableRowsVisibleOnly:p,sortDirection:nt,sortIcon:ce,sortServer:pe,onSort:gt,onDragStart:Ve,onDragOver:Ue,onDragEnd:$e,onDragEnter:qe,onDragLeave:We,draggingColumnId:He}))))),!pt.length&&!F&&ue.createElement(Ot,null,H),F&&z&&ue.createElement(St,null,B),!F&&pt.length>0&&ue.createElement(xt,{className:"rdt_TableBody",role:"rowgroup"},mt.map(((e,t)=>{const n=he(e,i),r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"number"!=typeof e&&(!e||0===e.length)}(n)?t:n,o=we(e,Qe,i),h=!!(ne&&ke&&ke(e)),p=!!(ne&&be&&be(e));return ue.createElement(Je,{id:r,key:r,keyField:i,"data-row-id":r,columns:ze,row:e,rowCount:pt.length,rowIndex:t,selectableRows:u,expandableRows:ne,expandableIcon:w,highlightOnHover:s,pointerOnHover:c,dense:l,expandOnRowClicked:xe,expandOnRowDoubleClicked:Ce,expandableRowsComponent:me,expandableRowsComponentProps:ge,expandableRowsHideExpander:_e,defaultExpanderDisabled:p,defaultExpanded:h,expandableInheritConditionalStyles:Oe,conditionalRowStyles:Me,selected:o,selectableRowsHighlight:f,selectableRowsComponent:v,selectableRowsComponentProps:y,selectableRowDisabled:g,selectableRowsSingle:d,striped:a,onRowExpandToggled:b,onRowClicked:_t,onRowDoubleClicked:Tt,onRowMouseEnter:At,onRowMouseLeave:Rt,onSelectedRow:bt,draggingColumnId:He,onDragStart:Ve,onDragOver:Ue,onDragEnd:$e,onDragEnter:qe,onDragLeave:We})})))))),ut&&ue.createElement("div",null,ue.createElement(dt,{onChangePage:Pt,onChangeRowsPerPage:Dt,rowCount:E||pt.length,currentPage:Ye,rowsPerPage:Xe,direction:je,paginationRowsPerPageOptions:R,paginationIconLastPage:P,paginationIconFirstPage:N,paginationIconNext:D,paginationIconPrevious:M,paginationComponentOptions:L})))}));t.cp=Jt},6144:(e,t,n)=>{"use strict";var r=n(9060),o=n(7724);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(p,e)||!d.call(h,e)&&(f.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function I(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var L,j=Object.assign;function F(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var B=!1;function z(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var c="\n"+o[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function H(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case C:return"Fragment";case x:return"Portal";case k:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return j({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=U(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){Q(e,t);var n=U(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return j({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function ie(e,t){var n=U(t.value),r=U(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ve=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Ce=null,Se=null;function ke(e){if(e=_o(e)){if("function"!==typeof xe)throw Error(i(280));var t=e.stateNode;t&&(t=xo(t),xe(e.stateNode,e.type,t))}}function Ee(e){Ce?Se?Se.push(e):Se=[e]:Ce=e}function Oe(){if(Ce){var e=Ce,t=Se;if(Se=Ce=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Te(e,t){return e(t)}function Ae(){}var Re=!1;function Pe(e,t,n){if(Re)return e(t,n);Re=!0;try{return Te(e,t,n)}finally{Re=!1,(null!==Ce||null!==Se)&&(Ae(),Oe())}}function Ne(e,t){var n=e.stateNode;if(null===n)return null;var r=xo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var De=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){De=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){De=!1}function Ie(e,t,n,r,o,i,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var Le=!1,je=null,Fe=!1,Be=null,ze={onError:function(e){Le=!0,je=e}};function He(e,t,n,r,o,i,a,s,c){Le=!1,je=null,Ie.apply(ze,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(Ve(e)!==e)throw Error(i(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Ue(o),e;if(a===r)return Ue(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,c=o.child;c;){if(c===n){s=!0,n=o,r=a;break}if(c===r){s=!0,r=o,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=o;break}if(c===r){s=!0,r=a,n=o;break}c=c.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var Ge=o.unstable_scheduleCallback,Ke=o.unstable_cancelCallback,Xe=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Qe=o.unstable_now,Ze=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/ct|0)|0},st=Math.log,ct=Math.LN2;var lt=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=dt(s):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function _t(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,xt,Ct,St,kt,Et=!1,Ot=[],Tt=null,At=null,Rt=null,Pt=new Map,Nt=new Map,Dt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function Lt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=_o(t))&&xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function jt(e){var t=bo(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void kt(e.priority,(function(){Ct(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=_o(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_e=r,n.target.dispatchEvent(r),_e=null,t.shift()}return!0}function Bt(e,t,n){Ft(e)&&n.delete(t)}function zt(){Et=!1,null!==Tt&&Ft(Tt)&&(Tt=null),null!==At&&Ft(At)&&(At=null),null!==Rt&&Ft(Rt)&&(Rt=null),Pt.forEach(Bt),Nt.forEach(Bt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,zt)))}function Vt(e){function t(t){return Ht(t,e)}if(0<Ot.length){Ht(Ot[0],e);for(var n=1;n<Ot.length;n++){var r=Ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Ht(Tt,e),null!==At&&Ht(At,e),null!==Rt&&Ht(Rt,e),Pt.forEach(t),Nt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)jt(n),null===n.blockedOn&&Dt.shift()}var qt=_.ReactCurrentBatchConfig,Ut=!0;function Wt(e,t,n,r){var o=bt,i=qt.transition;qt.transition=null;try{bt=1,Gt(e,t,n,r)}finally{bt=o,qt.transition=i}}function $t(e,t,n,r){var o=bt,i=qt.transition;qt.transition=null;try{bt=4,Gt(e,t,n,r)}finally{bt=o,qt.transition=i}}function Gt(e,t,n,r){if(Ut){var o=Xt(e,t,n,r);if(null===o)Ur(e,t,r,Kt,n),It(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tt=Lt(Tt,e,t,n,r,o),!0;case"dragenter":return At=Lt(At,e,t,n,r,o),!0;case"mouseover":return Rt=Lt(Rt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Pt.set(i,Lt(Pt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Nt.set(i,Lt(Nt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=_o(o);if(null!==i&&wt(i),null===(i=Xt(e,t,n,r))&&Ur(e,t,r,Kt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ur(e,t,r,null,n)}}var Kt=null;function Xt(e,t,n,r){if(Kt=null,null!==(e=bo(e=we(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Zt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Zt,r=n.length,o="value"in Qt?Qt.value:Qt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,cn,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(ln),dn=j({},ln,{view:0,detail:0}),fn=on(dn),hn=j({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(an=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=an=0,cn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(hn),mn=on(j({},hn,{dataTransfer:0})),gn=on(j({},dn,{relatedTarget:0})),vn=on(j({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=j({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),_n=on(j({},ln,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function kn(){return Sn}var En=j({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=on(En),Tn=on(j({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=on(j({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Rn=on(j({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=j({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=on(Pn),Dn=[9,13,27,32],Mn=u&&"CompositionEvent"in window,In=null;u&&"documentMode"in document&&(In=document.documentMode);var Ln=u&&"TextEvent"in window&&!In,jn=u&&(!Mn||In&&8<In&&11>=In),Fn=String.fromCharCode(32),Bn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Un(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Wn(e,t,n,r){Ee(r),0<(t=$r(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Gn=null;function Kn(e){Fr(e,0)}function Xn(e){if(G(wo(e)))return e}function Yn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Zn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Zn=Jn}else Zn=!1;Qn=Zn&&(!document.documentMode||9<document.documentMode)}function tr(){$n&&($n.detachEvent("onpropertychange",nr),Gn=$n=null)}function nr(e){if("value"===e.propertyName&&Xn(Gn)){var t=[];Wn(t,Gn,e,we(e)),Pe(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,($n=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Gn)}function ir(e,t){if("click"===e)return Xn(t)}function ar(e,t){if("input"===e||"change"===e)return Xn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ur(n,i);var a=ur(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==K(r)||("selectionStart"in(r=gr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&cr(yr,r)||(yr=r,0<(r=$r(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Cr={},Sr={};function kr(e){if(Cr[e])return Cr[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return Cr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Er=kr("animationend"),Or=kr("animationiteration"),Tr=kr("animationstart"),Ar=kr("transitionend"),Rr=new Map,Pr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Rr.set(e,t),c(t,[e])}for(var Dr=0;Dr<Pr.length;Dr++){var Mr=Pr[Dr];Nr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Nr(Er,"onAnimationEnd"),Nr(Or,"onAnimationIteration"),Nr(Tr,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Ar,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function jr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,c,l){if(He.apply(this,arguments),Le){if(!Le)throw Error(i(198));var u=je;Le=!1,je=null,Fe||(Fe=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==i&&o.isPropagationStopped())break e;jr(o,s,l),i=c}else for(a=0;a<r.length;a++){if(c=(s=r[a]).instance,l=s.currentTarget,s=s.listener,c!==i&&o.isPropagationStopped())break e;jr(o,s,l),i=c}}}if(Fe)throw e=Be,Fe=!1,Be=null,e}function Br(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function zr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[Hr]){e[Hr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||zr(t,!1,e),zr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,zr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var o=Wt;break;case 4:o=$t;break;default:o=Gt}n=o.bind(null,t,n,e),o=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ur(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&((c=a.stateNode.containerInfo)===o||8===c.nodeType&&c.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=bo(s)))return;if(5===(c=a.tag)||6===c){r=i=a;continue e}s=s.parentNode}}r=r.return}Pe((function(){var r=i,o=we(n),a=[];e:{var s=Rr.get(e);if(void 0!==s){var c=un,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":c=On;break;case"focusin":l="focus",c=gn;break;case"focusout":l="blur",c=gn;break;case"beforeblur":case"afterblur":c=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=An;break;case Er:case Or:case Tr:c=vn;break;case Ar:c=Rn;break;case"scroll":c=fn;break;case"wheel":c=Nn;break;case"copy":case"cut":case"paste":c=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Tn}var u=0!==(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=Ne(p,f))&&u.push(Wr(p,m,h)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,o),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(l=n.relatedTarget||n.fromElement)||!bo(l)&&!l[mo])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(l=(l=n.relatedTarget||n.toElement)?bo(l):null)&&(l!==(d=Ve(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=r),c!==l)){if(u=pn,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tn,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==c?s:wo(c),h=null==l?s:wo(l),(s=new u(m,p+"leave",c,n,o)).target=d,s.relatedTarget=h,m=null,bo(o)===r&&((u=new u(f,p+"enter",l,n,o)).target=h,u.relatedTarget=d,m=u),d=m,c&&l)e:{for(f=l,p=0,h=u=c;h;h=Gr(h))p++;for(h=0,m=f;m;m=Gr(m))h++;for(;0<p-h;)u=Gr(u),p--;for(;0<h-p;)f=Gr(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=Gr(u),f=Gr(f)}u=null}else u=null;null!==c&&Kr(a,s,c,u,!1),null!==l&&null!==d&&Kr(a,d,l,u,!0)}if("select"===(c=(s=r?wo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var g=Yn;else if(Un(s))if(Qn)g=ar;else{g=or;var v=rr}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ir);switch(g&&(g=g(e,r))?Wn(a,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wo(r):window,e){case"focusin":(Un(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,_r(a,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":_r(a,n,o)}var y;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?zn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(y=en()):(Zt="value"in(Qt=o)?Qt.value:Qt.textContent,Vn=!0)),0<(v=$r(r,b)).length&&(b=new _n(b,e,null,n,o),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=Ln?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,Fn);case"textInput":return(e=t.data)===Fn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Mn&&zn(e,t)?(e=en(),Jt=Zt=Qt=null,Vn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=$r(r,"onBeforeInput")).length&&(o=new _n("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Fr(a,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $r(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ne(e,n))&&r.unshift(Wr(e,i,o)),null!=(i=Ne(e,t))&&r.push(Wr(e,i,o))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==l&&(s=l,o?null!=(c=Ne(n,i))&&a.unshift(Wr(n,c,s)):o||null!=(c=Ne(n,i))&&a.push(Wr(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Xr,"\n").replace(Yr,"")}function Zr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(i(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Vt(t)}function lo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),ho="__reactFiber$"+fo,po="__reactProps$"+fo,mo="__reactContainer$"+fo,go="__reactEvents$"+fo,vo="__reactListeners$"+fo,yo="__reactHandles$"+fo;function bo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[ho])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function _o(e){return!(e=e[ho]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function xo(e){return e[po]||null}var Co=[],So=-1;function ko(e){return{current:e}}function Eo(e){0>So||(e.current=Co[So],Co[So]=null,So--)}function Oo(e,t){So++,Co[So]=e.current,e.current=t}var To={},Ao=ko(To),Ro=ko(!1),Po=To;function No(e,t){var n=e.type.contextTypes;if(!n)return To;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Do(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Mo(){Eo(Ro),Eo(Ao)}function Io(e,t,n){if(Ao.current!==To)throw Error(i(168));Oo(Ao,t),Oo(Ro,n)}function Lo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,q(e)||"Unknown",o));return j({},n,r)}function jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||To,Po=Ao.current,Oo(Ao,e),Oo(Ro,Ro.current),!0}function Fo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Lo(e,t,Po),r.__reactInternalMemoizedMergedChildContext=e,Eo(Ro),Eo(Ao),Oo(Ao,e)):Eo(Ro),Oo(Ro,n)}var Bo=null,zo=!1,Ho=!1;function Vo(e){null===Bo?Bo=[e]:Bo.push(e)}function qo(){if(!Ho&&null!==Bo){Ho=!0;var e=0,t=bt;try{var n=Bo;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,zo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),Ge(Je,qo),o}finally{bt=t,Ho=!1}}return null}var Uo=[],Wo=0,$o=null,Go=0,Ko=[],Xo=0,Yo=null,Qo=1,Zo="";function Jo(e,t){Uo[Wo++]=Go,Uo[Wo++]=$o,$o=e,Go=t}function ei(e,t,n){Ko[Xo++]=Qo,Ko[Xo++]=Zo,Ko[Xo++]=Yo,Yo=e;var r=Qo;e=Zo;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Qo=1<<32-at(t)+o|n<<o|r,Zo=i+e}else Qo=1<<i|n<<o|r,Zo=e}function ti(e){null!==e.return&&(Jo(e,1),ei(e,1,0))}function ni(e){for(;e===$o;)$o=Uo[--Wo],Uo[Wo]=null,Go=Uo[--Wo],Uo[Wo]=null;for(;e===Yo;)Yo=Ko[--Xo],Ko[Xo]=null,Zo=Ko[--Xo],Ko[Xo]=null,Qo=Ko[--Xo],Ko[Xo]=null}var ri=null,oi=null,ii=!1,ai=null;function si(e,t){var n=Nl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ci(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=lo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Qo,overflow:Zo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Nl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function li(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ui(e){if(ii){var t=oi;if(t){var n=t;if(!ci(e,t)){if(li(e))throw Error(i(418));t=lo(n.nextSibling);var r=ri;t&&ci(e,t)?si(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(li(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function fi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(li(e))throw hi(),Error(i(418));for(;t;)si(e,t),t=lo(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=lo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?lo(e.stateNode.nextSibling):null;return!0}function hi(){for(var e=oi;e;)e=lo(e.nextSibling)}function pi(){oi=ri=null,ii=!1}function mi(e){null===ai?ai=[e]:ai.push(e)}var gi=_.ReactCurrentBatchConfig;function vi(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yi=ko(null),bi=null,_i=null,wi=null;function xi(){wi=_i=bi=null}function Ci(e){var t=yi.current;Eo(yi),e._currentValue=t}function Si(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ki(e,t){bi=e,wi=_i=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(_s=!0),e.firstContext=null)}function Ei(e){var t=e._currentValue;if(wi!==e)if(e={context:e,memoizedValue:t,next:null},null===_i){if(null===bi)throw Error(i(308));_i=e,bi.dependencies={lanes:0,firstContext:e}}else _i=_i.next=e;return t}var Oi=null;function Ti(e){null===Oi?Oi=[e]:Oi.push(e)}function Ai(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ti(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ri(e,r)}function Ri(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Pi=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Ac)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ri(e,n)}return null===(o=r.interleaved)?(t.next=t,Ti(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ri(e,n)}function Li(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function ji(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fi(e,t,n,r){var o=e.updateQueue;Pi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,l=c.next;c.next=null,null===a?i=l:a.next=l,a=c;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(null!==i){var d=o.baseState;for(a=0,u=l=c=null,s=i;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=m.payload)?p.call(h,d,f):p)||void 0===f)break e;d=j({},d,f);break e;case 2:Pi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(l=u=h,c=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(c=d),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);jc|=a,e.lanes=a,e.memoizedState=d}}function Bi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var zi=(new r.Component).refs;function Hi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:j({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Vi={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ii(e,i,o))&&(rl(t,e,o,r),Li(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ii(e,i,o))&&(rl(t,e,o,r),Li(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tl(),r=nl(e),o=Mi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Ii(e,o,r))&&(rl(t,e,r,n),Li(t,e,r))}};function qi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(o,i))}function Ui(e,t,n){var r=!1,o=To,i=t.contextType;return"object"===typeof i&&null!==i?i=Ei(i):(o=Do(t)?Po:Ao.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?No(e,o):To),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Vi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vi.enqueueReplaceState(t,t.state,null)}function $i(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zi,Ni(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=Ei(i):(i=Do(t)?Po:Ao.current,o.context=No(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(Hi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Vi.enqueueReplaceState(o,o.state,null),Fi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function Gi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===zi&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Ki(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xi(e){return(0,e._init)(e._payload)}function Yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ml(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Fl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===C?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===N&&Xi(i)===t.type)?((r=o(t,n.props)).ref=Gi(e,t,n),r.return=e,r):((r=Il(n.type,n.key,n.props,null,e.mode,r)).ref=Gi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Ll(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Fl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Il(t.type,t.key,t.props,null,e.mode,n)).ref=Gi(e,null,t),n.return=e,n;case x:return(t=Bl(t,e.mode,n)).return=e,t;case N:return f(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Ll(t,e.mode,n,null)).return=e,t;Ki(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?l(e,t,n,r):null;case x:return n.key===o?u(e,t,n,r):null;case N:return h(e,t,(o=n._init)(n._payload),r)}if(te(n)||I(n))return null!==o?null:d(e,t,n,r,null);Ki(e,n)}return null}function p(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case N:return p(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||I(r))return d(t,e=e.get(n)||null,r,o,null);Ki(t,r)}return null}function m(o,i,s,c){for(var l=null,u=null,d=i,m=i=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=h(o,d,s[m],c);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(o,d),i=a(v,i,m),null===u?l=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(o,d),ii&&Jo(o,m),l;if(null===d){for(;m<s.length;m++)null!==(d=f(o,s[m],c))&&(i=a(d,i,m),null===u?l=d:u.sibling=d,u=d);return ii&&Jo(o,m),l}for(d=r(o,d);m<s.length;m++)null!==(g=p(d,o,m,s[m],c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=a(g,i,m),null===u?l=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(o,e)})),ii&&Jo(o,m),l}function g(o,s,c,l){var u=I(c);if("function"!==typeof u)throw Error(i(150));if(null==(c=u.call(c)))throw Error(i(151));for(var d=u=null,m=s,g=s=0,v=null,y=c.next();null!==m&&!y.done;g++,y=c.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=h(o,m,y.value,l);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(o,m),ii&&Jo(o,g),u;if(null===m){for(;!y.done;g++,y=c.next())null!==(y=f(o,y.value,l))&&(s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return ii&&Jo(o,g),u}for(m=r(o,m);!y.done;g++,y=c.next())null!==(y=p(m,o,g,y.value,l))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),ii&&Jo(o,g),u}return function e(r,i,a,c){if("object"===typeof a&&null!==a&&a.type===C&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var l=a.key,u=i;null!==u;){if(u.key===l){if((l=a.type)===C){if(7===u.tag){n(r,u.sibling),(i=o(u,a.props.children)).return=r,r=i;break e}}else if(u.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===N&&Xi(l)===u.type){n(r,u.sibling),(i=o(u,a.props)).ref=Gi(r,u,a),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===C?((i=Ll(a.props.children,r.mode,c,a.key)).return=r,r=i):((c=Il(a.type,a.key,a.props,null,r.mode,c)).ref=Gi(r,i,a),c.return=r,r=c)}return s(r);case x:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Bl(a,r.mode,c)).return=r,r=i}return s(r);case N:return e(r,i,(u=a._init)(a._payload),c)}if(te(a))return m(r,i,a,c);if(I(a))return g(r,i,a,c);Ki(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Fl(a,r.mode,c)).return=r,r=i),s(r)):n(r,i)}}var Qi=Yi(!0),Zi=Yi(!1),Ji={},ea=ko(Ji),ta=ko(Ji),na=ko(Ji);function ra(e){if(e===Ji)throw Error(i(174));return e}function oa(e,t){switch(Oo(na,t),Oo(ta,e),Oo(ea,Ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(ea),Oo(ea,t)}function ia(){Eo(ea),Eo(ta),Eo(na)}function aa(e){ra(na.current);var t=ra(ea.current),n=ce(t,e.type);t!==n&&(Oo(ta,e),Oo(ea,n))}function sa(e){ta.current===e&&(Eo(ea),Eo(ta))}var ca=ko(0);function la(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ua=[];function da(){for(var e=0;e<ua.length;e++)ua[e]._workInProgressVersionPrimary=null;ua.length=0}var fa=_.ReactCurrentDispatcher,ha=_.ReactCurrentBatchConfig,pa=0,ma=null,ga=null,va=null,ya=!1,ba=!1,_a=0,wa=0;function xa(){throw Error(i(321))}function Ca(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function Sa(e,t,n,r,o,a){if(pa=a,ma=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fa.current=null===e||null===e.memoizedState?ss:cs,e=n(r,o),ba){a=0;do{if(ba=!1,_a=0,25<=a)throw Error(i(301));a+=1,va=ga=null,t.updateQueue=null,fa.current=ls,e=n(r,o)}while(ba)}if(fa.current=as,t=null!==ga&&null!==ga.next,pa=0,va=ga=ma=null,ya=!1,t)throw Error(i(300));return e}function ka(){var e=0!==_a;return _a=0,e}function Ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===va?ma.memoizedState=va=e:va=va.next=e,va}function Oa(){if(null===ga){var e=ma.alternate;e=null!==e?e.memoizedState:null}else e=ga.next;var t=null===va?ma.memoizedState:va.next;if(null!==t)va=t,ga=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ga=e).memoizedState,baseState:ga.baseState,baseQueue:ga.baseQueue,queue:ga.queue,next:null},null===va?ma.memoizedState=va=e:va=va.next=e}return va}function Ta(e,t){return"function"===typeof t?t(e):t}function Aa(e){var t=Oa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ga,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var c=s=null,l=null,u=a;do{var d=u.lane;if((pa&d)===d)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(c=l=f,s=r):l=l.next=f,ma.lanes|=d,jc|=d}u=u.next}while(null!==u&&u!==a);null===l?s=r:l.next=c,sr(r,t.memoizedState)||(_s=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ma.lanes|=a,jc|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ra(e){var t=Oa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(_s=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Pa(){}function Na(e,t){var n=ma,r=Oa(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,_s=!0),r=r.queue,Ua(Ia.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==va&&1&va.memoizedState.tag){if(n.flags|=2048,Ba(9,Ma.bind(null,n,r,o,t),void 0,null),null===Rc)throw Error(i(349));0!==(30&pa)||Da(n,t,o)}return o}function Da(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ma.updateQueue)?(t={lastEffect:null,stores:null},ma.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ma(e,t,n,r){t.value=n,t.getSnapshot=r,La(t)&&ja(e)}function Ia(e,t,n){return n((function(){La(t)&&ja(e)}))}function La(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function ja(e){var t=Ri(e,1);null!==t&&rl(t,e,1,-1)}function Fa(e){var t=Ea();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,ma,e),[t.memoizedState,e]}function Ba(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ma.updateQueue)?(t={lastEffect:null,stores:null},ma.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function za(){return Oa().memoizedState}function Ha(e,t,n,r){var o=Ea();ma.flags|=e,o.memoizedState=Ba(1|t,n,void 0,void 0===r?null:r)}function Va(e,t,n,r){var o=Oa();r=void 0===r?null:r;var i=void 0;if(null!==ga){var a=ga.memoizedState;if(i=a.destroy,null!==r&&Ca(r,a.deps))return void(o.memoizedState=Ba(t,n,i,r))}ma.flags|=e,o.memoizedState=Ba(1|t,n,i,r)}function qa(e,t){return Ha(8390656,8,e,t)}function Ua(e,t){return Va(2048,8,e,t)}function Wa(e,t){return Va(4,2,e,t)}function $a(e,t){return Va(4,4,e,t)}function Ga(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ka(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Va(4,4,Ga.bind(null,t,e),n)}function Xa(){}function Ya(e,t){var n=Oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ca(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=Oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ca(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Za(e,t,n){return 0===(21&pa)?(e.baseState&&(e.baseState=!1,_s=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),ma.lanes|=n,jc|=n,e.baseState=!0),t)}function Ja(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{bt=n,ha.transition=r}}function es(){return Oa().memoizedState}function ts(e,t,n){var r=nl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))os(t,n);else if(null!==(n=Ai(e,t,n,r))){rl(n,e,r,tl()),is(n,t,r)}}function ns(e,t,n){var r=nl(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))os(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a)){var c=t.interleaved;return null===c?(o.next=o,Ti(t)):(o.next=c.next,c.next=o),void(t.interleaved=o)}}catch(l){}null!==(n=Ai(e,t,o,r))&&(rl(n,e,r,o=tl()),is(n,t,r))}}function rs(e){var t=e.alternate;return e===ma||null!==t&&t===ma}function os(e,t){ba=ya=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function is(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var as={readContext:Ei,useCallback:xa,useContext:xa,useEffect:xa,useImperativeHandle:xa,useInsertionEffect:xa,useLayoutEffect:xa,useMemo:xa,useReducer:xa,useRef:xa,useState:xa,useDebugValue:xa,useDeferredValue:xa,useTransition:xa,useMutableSource:xa,useSyncExternalStore:xa,useId:xa,unstable_isNewReconciler:!1},ss={readContext:Ei,useCallback:function(e,t){return Ea().memoizedState=[e,void 0===t?null:t],e},useContext:Ei,useEffect:qa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ha(4194308,4,Ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ha(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ha(4,2,e,t)},useMemo:function(e,t){var n=Ea();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ea();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,ma,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ea().memoizedState=e},useState:Fa,useDebugValue:Xa,useDeferredValue:function(e){return Ea().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Ja.bind(null,e[1]),Ea().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ma,o=Ea();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Rc)throw Error(i(349));0!==(30&pa)||Da(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,qa(Ia.bind(null,r,a,e),[e]),r.flags|=2048,Ba(9,Ma.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ea(),t=Rc.identifierPrefix;if(ii){var n=Zo;t=":"+t+"R"+(n=(Qo&~(1<<32-at(Qo)-1)).toString(32)+n),0<(n=_a++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cs={readContext:Ei,useCallback:Ya,useContext:Ei,useEffect:Ua,useImperativeHandle:Ka,useInsertionEffect:Wa,useLayoutEffect:$a,useMemo:Qa,useReducer:Aa,useRef:za,useState:function(){return Aa(Ta)},useDebugValue:Xa,useDeferredValue:function(e){return Za(Oa(),ga.memoizedState,e)},useTransition:function(){return[Aa(Ta)[0],Oa().memoizedState]},useMutableSource:Pa,useSyncExternalStore:Na,useId:es,unstable_isNewReconciler:!1},ls={readContext:Ei,useCallback:Ya,useContext:Ei,useEffect:Ua,useImperativeHandle:Ka,useInsertionEffect:Wa,useLayoutEffect:$a,useMemo:Qa,useReducer:Ra,useRef:za,useState:function(){return Ra(Ta)},useDebugValue:Xa,useDeferredValue:function(e){var t=Oa();return null===ga?t.memoizedState=e:Za(t,ga.memoizedState,e)},useTransition:function(){return[Ra(Ta)[0],Oa().memoizedState]},useMutableSource:Pa,useSyncExternalStore:Na,useId:es,unstable_isNewReconciler:!1};function us(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hs="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wc||(Wc=!0,$c=r),fs(0,t)},n}function ms(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fs(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){fs(0,t),"function"!==typeof r&&(null===Gc?Gc=new Set([this]):Gc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=El.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Ii(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var bs=_.ReactCurrentOwner,_s=!1;function ws(e,t,n,r){t.child=null===e?Zi(t,null,n,r):Qi(t,e.child,n,r)}function xs(e,t,n,r,o){n=n.render;var i=t.ref;return ki(t,o),r=Sa(e,t,n,r,i,o),n=ka(),null===e||_s?(ii&&n&&ti(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Cs(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Dl(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Il(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ss(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(a,r)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Ml(i,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(cr(i,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);0!==(131072&e.flags)&&(_s=!0)}}return Os(e,t,n,r,o)}function ks(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oo(Mc,Dc),Dc|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oo(Mc,Dc),Dc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Oo(Mc,Dc),Dc|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Oo(Mc,Dc),Dc|=r;return ws(e,t,o,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Os(e,t,n,r,o){var i=Do(n)?Po:Ao.current;return i=No(t,i),ki(t,o),n=Sa(e,t,n,r,i,o),r=ka(),null===e||_s?(ii&&r&&ti(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Ts(e,t,n,r,o){if(Do(n)){var i=!0;jo(t)}else i=!1;if(ki(t,o),null===t.stateNode)Us(e,t),Ui(t,n,r),$i(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,l=n.contextType;"object"===typeof l&&null!==l?l=Ei(l):l=No(t,l=Do(n)?Po:Ao.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==l)&&Wi(t,a,r,l),Pi=!1;var f=t.memoizedState;a.state=f,Fi(t,r,a,o),c=t.memoizedState,s!==r||f!==c||Ro.current||Pi?("function"===typeof u&&(Hi(t,n,u,r),c=t.memoizedState),(s=Pi||qi(t,n,s,r,f,c,l))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=l,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Di(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vi(t.type,s),a.props=l,d=t.pendingProps,f=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=Ei(c):c=No(t,c=Do(n)?Po:Ao.current);var h=n.getDerivedStateFromProps;(u="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==c)&&Wi(t,a,r,c),Pi=!1,f=t.memoizedState,a.state=f,Fi(t,r,a,o);var p=t.memoizedState;s!==d||f!==p||Ro.current||Pi?("function"===typeof h&&(Hi(t,n,h,r),p=t.memoizedState),(l=Pi||qi(t,n,l,r,f,p,c)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return As(e,t,n,r,i,o)}function As(e,t,n,r,o,i){Es(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&Fo(t,n,!1),Ws(e,t,i);r=t.stateNode,bs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Qi(t,e.child,null,i),t.child=Qi(t,null,s,i)):ws(e,t,s,i),t.memoizedState=r.state,o&&Fo(t,n,!0),t.child}function Rs(e){var t=e.stateNode;t.pendingContext?Io(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Io(0,t.context,!1),oa(e,t.containerInfo)}function Ps(e,t,n,r,o){return pi(),mi(o),t.flags|=256,ws(e,t,n,r),t.child}var Ns,Ds,Ms,Is,Ls={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fs(e,t,n){var r,o=t.pendingProps,a=ca.current,s=!1,c=0!==(128&t.flags);if((r=c)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Oo(ca,1&a),null===e)return ui(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=o.children,e=o.fallback,s?(o=t.mode,s=t.child,c={mode:"hidden",children:c},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=c):s=jl(c,o,0,null),e=Ll(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=js(n),t.memoizedState=Ls,e):Bs(t,c));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,zs(e,t,s,r=ds(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=jl({mode:"visible",children:r.children},o,0,null),(a=Ll(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&Qi(t,e.child,null,s),t.child.memoizedState=js(s),t.memoizedState=Ls,a);if(0===(1&t.mode))return zs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var c=r.dgst;return r=c,zs(e,t,s,r=ds(a=Error(i(419)),r,void 0))}if(c=0!==(s&e.childLanes),_s||c){if(null!==(r=Rc)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Ri(e,o),rl(r,e,o,-1))}return gl(),zs(e,t,s,r=ds(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Tl.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=lo(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(Ko[Xo++]=Qo,Ko[Xo++]=Zo,Ko[Xo++]=Yo,Qo=e.id,Zo=e.overflow,Yo=t),t=Bs(t,r.children),t.flags|=4096,t)}(e,t,c,o,r,a,n);if(s){s=o.fallback,c=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 0===(1&c)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Ml(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Ml(r,s):(s=Ll(s,c,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,c=null===(c=e.child.memoizedState)?js(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},s.memoizedState=c,s.childLanes=e.childLanes&~n,t.memoizedState=Ls,o}return e=(s=e.child).sibling,o=Ml(s,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bs(e,t){return(t=jl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zs(e,t,n,r){return null!==r&&mi(r),Qi(t,e.child,null,n),(e=Bs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Si(e.return,t,n)}function Vs(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function qs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=ca.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Hs(e,n,t);else if(19===e.tag)Hs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oo(ca,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===la(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Vs(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===la(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Vs(t,!0,n,null,i);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Us(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Ml(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ml(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function $s(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Do(t.type)&&Mo(),Gs(t),null;case 3:return r=t.stateNode,ia(),Eo(Ro),Eo(Ao),da(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ai&&(sl(ai),ai=null))),Ds(e,t),Gs(t),null;case 5:sa(t);var o=ra(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Ms(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Gs(t),null}if(e=ra(ea.current),fi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ho]=t,r[po]=a,e=0!==(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Ir.length;o++)Br(Ir[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":Y(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":oe(r,a),Br("invalid",r)}for(var c in ye(n,a),o=null,a)if(a.hasOwnProperty(c)){var l=a[c];"children"===c?"string"===typeof l?r.textContent!==l&&(!0!==a.suppressHydrationWarning&&Zr(r.textContent,l,e),o=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==a.suppressHydrationWarning&&Zr(r.textContent,l,e),o=["children",""+l]):s.hasOwnProperty(c)&&null!=l&&"onScroll"===c&&Br("scroll",r)}switch(n){case"input":$(r),J(r,a,!0);break;case"textarea":$(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{c=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[ho]=t,e[po]=r,Ns(e,t,!1,!1),t.stateNode=e;e:{switch(c=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ir.length;o++)Br(Ir[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":Y(e,r),o=X(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=j({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(a in ye(n,o),l=o)if(l.hasOwnProperty(a)){var u=l[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&fe(e,u):"number"===typeof u&&fe(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Br("scroll",e):null!=u&&b(e,a,u,c))}switch(n){case"input":$(e),J(e,r,!1);break;case"textarea":$(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+U(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Gs(t),null;case 6:if(e&&null!=t.stateNode)Is(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=ra(na.current),ra(ea.current),fi(t)){if(r=t.stateNode,n=t.memoizedProps,r[ho]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Zr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ho]=t,t.stateNode=r}return Gs(t),null;case 13:if(Eo(ca),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))hi(),pi(),t.flags|=98560,a=!1;else if(a=fi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[ho]=t}else pi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),a=!1}else null!==ai&&(sl(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ca.current)?0===Ic&&(Ic=3):gl())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return ia(),Ds(e,t),null===e&&Vr(t.stateNode.containerInfo),Gs(t),null;case 10:return Ci(t.type._context),Gs(t),null;case 19:if(Eo(ca),null===(a=t.memoizedState))return Gs(t),null;if(r=0!==(128&t.flags),null===(c=a.rendering))if(r)$s(a,!1);else{if(0!==Ic||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=la(e))){for(t.flags|=128,$s(a,!1),null!==(r=c.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(c=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,e=c.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oo(ca,1&ca.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>qc&&(t.flags|=128,r=!0,$s(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=la(c))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),$s(a,!0),null===a.tail&&"hidden"===a.tailMode&&!c.alternate&&!ii)return Gs(t),null}else 2*Qe()-a.renderingStartTime>qc&&1073741824!==n&&(t.flags|=128,r=!0,$s(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=a.last)?n.sibling=c:t.child=c,a.last=c)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=ca.current,Oo(ca,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return fl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Dc)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Xs(e,t){switch(ni(t),t.tag){case 1:return Do(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ia(),Eo(Ro),Eo(Ao),da(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(Eo(ca),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));pi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(ca),null;case 4:return ia(),null;case 10:return Ci(t.type._context),null;case 22:case 23:return fl(),null;default:return null}}Ns=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},Ms=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ra(ea.current);var i,a=null;switch(n){case"input":o=X(e,o),r=X(e,r),a=[];break;case"select":o=j({},o,{value:void 0}),r=j({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var c=o[u];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(c=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==c&&(null!=l||null!=c))if("style"===u)if(c){for(i in c)!c.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&c[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Br("scroll",e),a||c===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Is=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Qs=!1,Zs="function"===typeof WeakSet?WeakSet:Set,Js=null;function ec(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){kl(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){kl(e,t,r)}}var nc=!1;function rc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tc(t,n,i)}o=o.next}while(o!==r)}}function oc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ic(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ac(e){var t=e.alternate;null!==t&&(e.alternate=null,ac(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[po],delete t[go],delete t[vo],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sc(e){return 5===e.tag||3===e.tag||4===e.tag}function cc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}function uc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(uc(e,t,n),e=e.sibling;null!==e;)uc(e,t,n),e=e.sibling}var dc=null,fc=!1;function hc(e,t,n){for(n=n.child;null!==n;)pc(e,t,n),n=n.sibling}function pc(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Qs||ec(n,t);case 6:var r=dc,o=fc;dc=null,hc(e,t,n),fc=o,null!==(dc=r)&&(fc?(e=dc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dc.removeChild(n.stateNode));break;case 18:null!==dc&&(fc?(e=dc,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Vt(e)):co(dc,n.stateNode));break;case 4:r=dc,o=fc,dc=n.stateNode.containerInfo,fc=!0,hc(e,t,n),dc=r,fc=o;break;case 0:case 11:case 14:case 15:if(!Qs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&tc(n,t,a),o=o.next}while(o!==r)}hc(e,t,n);break;case 1:if(!Qs&&(ec(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){kl(n,t,s)}hc(e,t,n);break;case 21:hc(e,t,n);break;case 22:1&n.mode?(Qs=(r=Qs)||null!==n.memoizedState,hc(e,t,n),Qs=r):hc(e,t,n);break;default:hc(e,t,n)}}function mc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zs),t.forEach((function(t){var r=Al.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,c=s;e:for(;null!==c;){switch(c.tag){case 5:dc=c.stateNode,fc=!1;break e;case 3:case 4:dc=c.stateNode.containerInfo,fc=!0;break e}c=c.return}if(null===dc)throw Error(i(160));pc(a,s,o),dc=null,fc=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){kl(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vc(t,e),t=t.sibling}function vc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gc(t,e),yc(e),4&r){try{rc(3,e,e.return),oc(3,e)}catch(g){kl(e,e.return,g)}try{rc(5,e,e.return)}catch(g){kl(e,e.return,g)}}break;case 1:gc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return);break;case 5:if(gc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return),32&e.flags){var o=e.stateNode;try{fe(o,"")}catch(g){kl(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,c=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===c&&"radio"===a.type&&null!=a.name&&Q(o,a),be(c,s);var u=be(c,a);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];"style"===d?ge(o,f):"dangerouslySetInnerHTML"===d?de(o,f):"children"===d?fe(o,f):b(o,d,f,u)}switch(c){case"input":Z(o,a);break;case"textarea":ie(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(o,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[po]=a}catch(g){kl(e,e.return,g)}}break;case 6:if(gc(t,e),yc(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(g){kl(e,e.return,g)}}break;case 3:if(gc(t,e),yc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){kl(e,e.return,g)}break;case 4:default:gc(t,e),yc(e);break;case 13:gc(t,e),yc(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Vc=Qe())),4&r&&mc(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Qs=(u=Qs)||d,gc(t,e),Qs=u):gc(t,e),yc(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Js=e,d=e.child;null!==d;){for(f=Js=d;null!==Js;){switch(p=(h=Js).child,h.tag){case 0:case 11:case 14:case 15:rc(4,h,h.return);break;case 1:ec(h,h.return);var m=h.stateNode;if("function"===typeof m.componentWillUnmount){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){kl(r,n,g)}}break;case 5:ec(h,h.return);break;case 22:if(null!==h.memoizedState){xc(f);continue}}null!==p?(p.return=h,Js=p):xc(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,u?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(c=f.stateNode,s=void 0!==(l=f.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,c.style.display=me("display",s))}catch(g){kl(e,e.return,g)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){kl(e,e.return,g)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:gc(t,e),yc(e),4&r&&mc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sc(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(fe(o,""),r.flags&=-33),uc(e,cc(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;lc(e,cc(e),a);break;default:throw Error(i(161))}}catch(s){kl(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bc(e,t,n){Js=e,_c(e,t,n)}function _c(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var o=Js,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Ys;if(!a){var s=o.alternate,c=null!==s&&null!==s.memoizedState||Qs;s=Ys;var l=Qs;if(Ys=a,(Qs=c)&&!l)for(Js=o;null!==Js;)c=(a=Js).child,22===a.tag&&null!==a.memoizedState?Cc(o):null!==c?(c.return=a,Js=c):Cc(o);for(;null!==i;)Js=i,_c(i,t,n),i=i.sibling;Js=o,Ys=s,Qs=l}wc(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Js=i):wc(e)}}function wc(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qs||oc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Qs)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:vi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Bi(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Bi(t,s,n)}break;case 5:var c=t.stateNode;if(null===n&&4&t.flags){n=c;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Vt(f)}}}break;default:throw Error(i(163))}Qs||512&t.flags&&ic(t)}catch(h){kl(t,t.return,h)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function xc(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function Cc(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oc(4,t)}catch(c){kl(t,n,c)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(c){kl(t,o,c)}}var i=t.return;try{ic(t)}catch(c){kl(t,i,c)}break;case 5:var a=t.return;try{ic(t)}catch(c){kl(t,a,c)}}}catch(c){kl(t,t.return,c)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Sc,kc=Math.ceil,Ec=_.ReactCurrentDispatcher,Oc=_.ReactCurrentOwner,Tc=_.ReactCurrentBatchConfig,Ac=0,Rc=null,Pc=null,Nc=0,Dc=0,Mc=ko(0),Ic=0,Lc=null,jc=0,Fc=0,Bc=0,zc=null,Hc=null,Vc=0,qc=1/0,Uc=null,Wc=!1,$c=null,Gc=null,Kc=!1,Xc=null,Yc=0,Qc=0,Zc=null,Jc=-1,el=0;function tl(){return 0!==(6&Ac)?Qe():-1!==Jc?Jc:Jc=Qe()}function nl(e){return 0===(1&e.mode)?1:0!==(2&Ac)&&0!==Nc?Nc&-Nc:null!==gi.transition?(0===el&&(el=mt()),el):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rl(e,t,n,r){if(50<Qc)throw Qc=0,Zc=null,Error(i(185));vt(e,n,r),0!==(2&Ac)&&e===Rc||(e===Rc&&(0===(2&Ac)&&(Fc|=n),4===Ic&&cl(e,Nc)),ol(e,r),1===n&&0===Ac&&0===(1&t.mode)&&(qc=Qe()+500,zo&&qo()))}function ol(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,c=o[a];-1===c?0!==(s&n)&&0===(s&r)||(o[a]=ht(s,t)):c<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=ft(e,e===Rc?Nc:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){zo=!0,Vo(e)}(ll.bind(null,e)):Vo(ll.bind(null,e)),ao((function(){0===(6&Ac)&&qo()})),n=null;else{switch(_t(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Rl(n,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function il(e,t){if(Jc=-1,el=0,0!==(6&Ac))throw Error(i(327));var n=e.callbackNode;if(Cl()&&e.callbackNode!==n)return null;var r=ft(e,e===Rc?Nc:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vl(e,r);else{t=r;var o=Ac;Ac|=2;var a=ml();for(Rc===e&&Nc===t||(Uc=null,qc=Qe()+500,hl(e,t));;)try{bl();break}catch(c){pl(e,c)}xi(),Ec.current=a,Ac=o,null!==Pc?t=0:(Rc=null,Nc=0,t=Ic)}if(0!==t){if(2===t&&(0!==(o=pt(e))&&(r=o,t=al(e,o))),1===t)throw n=Lc,hl(e,0),cl(e,r),ol(e,Qe()),n;if(6===t)cl(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vl(e,r))&&(0!==(a=pt(e))&&(r=a,t=al(e,a))),1===t))throw n=Lc,hl(e,0),cl(e,r),ol(e,Qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:xl(e,Hc,Uc);break;case 3:if(cl(e,r),(130023424&r)===r&&10<(t=Vc+500-Qe())){if(0!==ft(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(xl.bind(null,e,Hc,Uc),t);break}xl(e,Hc,Uc);break;case 4:if(cl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kc(r/1960))-r)){e.timeoutHandle=ro(xl.bind(null,e,Hc,Uc),r);break}xl(e,Hc,Uc);break;default:throw Error(i(329))}}}return ol(e,Qe()),e.callbackNode===n?il.bind(null,e):null}function al(e,t){var n=zc;return e.current.memoizedState.isDehydrated&&(hl(e,t).flags|=256),2!==(e=vl(e,t))&&(t=Hc,Hc=n,null!==t&&sl(t)),e}function sl(e){null===Hc?Hc=e:Hc.push.apply(Hc,e)}function cl(e,t){for(t&=~Bc,t&=~Fc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function ll(e){if(0!==(6&Ac))throw Error(i(327));Cl();var t=ft(e,0);if(0===(1&t))return ol(e,Qe()),null;var n=vl(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=al(e,r))}if(1===n)throw n=Lc,hl(e,0),cl(e,t),ol(e,Qe()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xl(e,Hc,Uc),ol(e,Qe()),null}function ul(e,t){var n=Ac;Ac|=1;try{return e(t)}finally{0===(Ac=n)&&(qc=Qe()+500,zo&&qo())}}function dl(e){null!==Xc&&0===Xc.tag&&0===(6&Ac)&&Cl();var t=Ac;Ac|=1;var n=Tc.transition,r=bt;try{if(Tc.transition=null,bt=1,e)return e()}finally{bt=r,Tc.transition=n,0===(6&(Ac=t))&&qo()}}function fl(){Dc=Mc.current,Eo(Mc)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Pc)for(n=Pc.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Mo();break;case 3:ia(),Eo(Ro),Eo(Ao),da();break;case 5:sa(r);break;case 4:ia();break;case 13:case 19:Eo(ca);break;case 10:Ci(r.type._context);break;case 22:case 23:fl()}n=n.return}if(Rc=e,Pc=e=Ml(e.current,null),Nc=Dc=t,Ic=0,Lc=null,Bc=Fc=jc=0,Hc=zc=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Oi=null}return e}function pl(e,t){for(;;){var n=Pc;try{if(xi(),fa.current=as,ya){for(var r=ma.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ya=!1}if(pa=0,va=ga=ma=null,ba=!1,_a=0,Oc.current=null,null===n||null===n.return){Ic=1,Lc=t,Pc=null;break}e:{var a=e,s=n.return,c=n,l=t;if(t=Nc,c.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l,d=c,f=d.tag;if(0===(1&d.mode)&&(0===f||11===f||15===f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vs(s);if(null!==p){p.flags&=-257,ys(p,s,c,0,t),1&p.mode&&gs(a,u,t),l=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}if(0===(1&t)){gs(a,u,t),gl();break e}l=Error(i(426))}else if(ii&&1&c.mode){var v=vs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),ys(v,s,c,0,t),mi(us(l,c));break e}}a=l=us(l,c),4!==Ic&&(Ic=2),null===zc?zc=[a]:zc.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,ji(a,ps(0,l,t));break e;case 1:c=l;var y=a.type,b=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Gc||!Gc.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,ji(a,ms(a,c,t));break e}}a=a.return}while(null!==a)}wl(n)}catch(_){t=_,Pc===n&&null!==n&&(Pc=n=n.return);continue}break}}function ml(){var e=Ec.current;return Ec.current=as,null===e?as:e}function gl(){0!==Ic&&3!==Ic&&2!==Ic||(Ic=4),null===Rc||0===(268435455&jc)&&0===(268435455&Fc)||cl(Rc,Nc)}function vl(e,t){var n=Ac;Ac|=2;var r=ml();for(Rc===e&&Nc===t||(Uc=null,hl(e,t));;)try{yl();break}catch(o){pl(e,o)}if(xi(),Ac=n,Ec.current=r,null!==Pc)throw Error(i(261));return Rc=null,Nc=0,Ic}function yl(){for(;null!==Pc;)_l(Pc)}function bl(){for(;null!==Pc&&!Xe();)_l(Pc)}function _l(e){var t=Sc(e.alternate,e,Dc);e.memoizedProps=e.pendingProps,null===t?wl(e):Pc=t,Oc.current=null}function wl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ks(n,t,Dc)))return void(Pc=n)}else{if(null!==(n=Xs(n,t)))return n.flags&=32767,void(Pc=n);if(null===e)return Ic=6,void(Pc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pc=t);Pc=t=e}while(null!==t);0===Ic&&(Ic=5)}function xl(e,t,n){var r=bt,o=Tc.transition;try{Tc.transition=null,bt=1,function(e,t,n,r){do{Cl()}while(null!==Xc);if(0!==(6&Ac))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Rc&&(Pc=Rc=null,Nc=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Kc||(Kc=!0,Rl(tt,(function(){return Cl(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Tc.transition,Tc.transition=null;var s=bt;bt=1;var c=Ac;Ac|=4,Oc.current=null,function(e,t){if(eo=Ut,hr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,c=-1,l=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==o&&3!==f.nodeType||(c=s+o),f!==a||0!==r&&3!==f.nodeType||(l=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===o&&(c=s),h===a&&++d===r&&(l=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===c||-1===l?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ut=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:vi(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(i(163))}}catch(w){kl(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=nc,nc=!1}(e,n),vc(n,e),pr(to),Ut=!!eo,to=eo=null,e.current=n,bc(n,e,o),Ye(),Ac=c,bt=s,Tc.transition=a}else e.current=n;if(Kc&&(Kc=!1,Xc=e,Yc=o),a=e.pendingLanes,0===a&&(Gc=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),ol(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Wc)throw Wc=!1,e=$c,$c=null,e;0!==(1&Yc)&&0!==e.tag&&Cl(),a=e.pendingLanes,0!==(1&a)?e===Zc?Qc++:(Qc=0,Zc=e):Qc=0,qo()}(e,t,n,r)}finally{Tc.transition=o,bt=r}return null}function Cl(){if(null!==Xc){var e=_t(Yc),t=Tc.transition,n=bt;try{if(Tc.transition=null,bt=16>e?16:e,null===Xc)var r=!1;else{if(e=Xc,Xc=null,Yc=0,0!==(6&Ac))throw Error(i(331));var o=Ac;for(Ac|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var c=a.deletions;if(null!==c){for(var l=0;l<c.length;l++){var u=c[l];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:rc(8,d,a)}var f=d.child;if(null!==f)f.return=d,Js=f;else for(;null!==Js;){var h=(d=Js).sibling,p=d.return;if(ac(d),d===u){Js=null;break}if(null!==h){h.return=p,Js=h;break}Js=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:rc(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var b=e.current;for(Js=b;null!==Js;){var _=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==_)_.return=s,Js=_;else e:for(s=b;null!==Js;){if(0!==(2048&(c=Js).flags))try{switch(c.tag){case 0:case 11:case 15:oc(9,c)}}catch(x){kl(c,c.return,x)}if(c===s){Js=null;break e}var w=c.sibling;if(null!==w){w.return=c.return,Js=w;break e}Js=c.return}}if(Ac=o,qo(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(x){}r=!0}return r}finally{bt=n,Tc.transition=t}}return!1}function Sl(e,t,n){e=Ii(e,t=ps(0,t=us(n,t),1),1),t=tl(),null!==e&&(vt(e,1,t),ol(e,t))}function kl(e,t,n){if(3===e.tag)Sl(e,e,n);else for(;null!==t;){if(3===t.tag){Sl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gc||!Gc.has(r))){t=Ii(t,e=ms(t,e=us(n,e),1),1),e=tl(),null!==t&&(vt(t,1,e),ol(t,e));break}}t=t.return}}function El(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tl(),e.pingedLanes|=e.suspendedLanes&n,Rc===e&&(Nc&n)===n&&(4===Ic||3===Ic&&(130023424&Nc)===Nc&&500>Qe()-Vc?hl(e,0):Bc|=n),ol(e,t)}function Ol(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tl();null!==(e=Ri(e,t))&&(vt(e,t,n),ol(e,n))}function Tl(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ol(e,n)}function Al(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ol(e,n)}function Rl(e,t){return Ge(e,t)}function Pl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nl(e,t,n,r){return new Pl(e,t,n,r)}function Dl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ml(e,t){var n=e.alternate;return null===n?((n=Nl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Il(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)Dl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case C:return Ll(n.children,o,a,t);case S:s=8,o|=8;break;case k:return(e=Nl(12,n,t,2|o)).elementType=k,e.lanes=a,e;case A:return(e=Nl(13,n,t,o)).elementType=A,e.lanes=a,e;case R:return(e=Nl(19,n,t,o)).elementType=R,e.lanes=a,e;case D:return jl(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case O:s=9;break e;case T:s=11;break e;case P:s=14;break e;case N:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Nl(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Ll(e,t,n,r){return(e=Nl(7,e,r,t)).lanes=n,e}function jl(e,t,n,r){return(e=Nl(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Fl(e,t,n){return(e=Nl(6,e,null,t)).lanes=n,e}function Bl(e,t,n){return(t=Nl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zl(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hl(e,t,n,r,o,i,a,s,c){return e=new zl(e,t,n,s,c),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Nl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ni(i),e}function Vl(e){if(!e)return To;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Do(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Do(n))return Lo(e,n,t)}return t}function ql(e,t,n,r,o,i,a,s,c){return(e=Hl(n,r,!0,e,0,i,0,s,c)).context=Vl(null),n=e.current,(i=Mi(r=tl(),o=nl(n))).callback=void 0!==t&&null!==t?t:null,Ii(n,i,o),e.current.lanes=o,vt(e,o,r),ol(e,r),e}function Ul(e,t,n,r){var o=t.current,i=tl(),a=nl(o);return n=Vl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ii(o,t,a))&&(rl(e,o,a,i),Li(e,o,a)),a}function Wl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $l(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gl(e,t){$l(e,t),(e=e.alternate)&&$l(e,t)}Sc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ro.current)_s=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return _s=!1,function(e,t,n){switch(t.tag){case 3:Rs(t),pi();break;case 5:aa(t);break;case 1:Do(t.type)&&jo(t);break;case 4:oa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Oo(yi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oo(ca,1&ca.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fs(e,t,n):(Oo(ca,1&ca.current),null!==(e=Ws(e,t,n))?e.sibling:null);Oo(ca,1&ca.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Oo(ca,ca.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Ws(e,t,n)}(e,t,n);_s=0!==(131072&e.flags)}else _s=!1,ii&&0!==(1048576&t.flags)&&ei(t,Go,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var o=No(t,Ao.current);ki(t,n),o=Sa(null,t,r,e,o,n);var a=ka();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Do(r)?(a=!0,jo(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ni(t),o.updater=Vi,t.stateNode=o,o._reactInternals=t,$i(t,r,e,n),t=As(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),ws(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Us(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Dl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===P)return 14}return 2}(r),e=vi(r,e),o){case 0:t=Os(null,t,r,e,n);break e;case 1:t=Ts(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=Cs(null,t,r,vi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Os(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ts(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 3:e:{if(Rs(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Di(e,t),Fi(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ps(e,t,r,n,o=us(Error(i(423)),t));break e}if(r!==o){t=Ps(e,t,r,n,o=us(Error(i(424)),t));break e}for(oi=lo(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=Zi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pi(),r===o){t=Ws(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return aa(t),null===e&&ui(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),Es(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ui(t),null;case 13:return Fs(e,t,n);case 4:return oa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Qi(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,xs(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Oo(yi,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!Ro.current){t=Ws(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var c=a.dependencies;if(null!==c){s=a.child;for(var l=c.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Mi(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Si(a.return,n,t),c.lanes|=n;break}l=l.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),Si(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ki(t,n),r=r(o=Ei(o)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return o=vi(r=t.type,t.pendingProps),Cs(e,t,r,o=vi(r.type,o),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vi(r,o),Us(e,t),t.tag=1,Do(r)?(e=!0,jo(t)):e=!1,ki(t,n),Ui(t,r,o),$i(t,r,o,n),As(null,t,r,!0,e,n);case 19:return qs(e,t,n);case 22:return ks(e,t,n)}throw Error(i(156,t.tag))};var Kl="function"===typeof reportError?reportError:function(e){console.error(e)};function Xl(e){this._internalRoot=e}function Yl(e){this._internalRoot=e}function Ql(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jl(){}function eu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var s=o;o=function(){var e=Wl(a);s.call(e)}}Ul(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Wl(a);i.call(e)}}var a=ql(t,r,e,0,null,!1,0,"",Jl);return e._reactRootContainer=a,e[mo]=a.current,Vr(8===e.nodeType?e.parentNode:e),dl(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var s=r;r=function(){var e=Wl(c);s.call(e)}}var c=Hl(e,0,!1,null,0,!1,0,"",Jl);return e._reactRootContainer=c,e[mo]=c.current,Vr(8===e.nodeType?e.parentNode:e),dl((function(){Ul(t,c,n,r)})),c}(n,t,e,o,r);return Wl(a)}Yl.prototype.render=Xl.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Ul(e,t,null,null)},Yl.prototype.unmount=Xl.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dl((function(){Ul(null,e,null,null)})),t[mo]=null}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&jt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ol(t,Qe()),0===(6&Ac)&&(qc=Qe()+500,qo()))}break;case 13:dl((function(){var t=Ri(e,1);if(null!==t){var n=tl();rl(t,e,1,n)}})),Gl(e,1)}},xt=function(e){if(13===e.tag){var t=Ri(e,134217728);if(null!==t)rl(t,e,134217728,tl());Gl(e,134217728)}},Ct=function(e){if(13===e.tag){var t=nl(e),n=Ri(e,t);if(null!==n)rl(n,e,t,tl());Gl(e,t)}},St=function(){return bt},kt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},xe=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xo(r);if(!o)throw Error(i(90));G(r),Z(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=ul,Ae=dl;var tu={usingClientEntryPoint:!1,Events:[_o,wo,xo,Ee,Oe,ul]},nu={findFiberByHostInstance:bo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{ot=ou.inject(ru),it=ou}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ql(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Ql(e))throw Error(i(299));var n=!1,r="",o=Kl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hl(e,1,!1,null,0,n,0,r,o),e[mo]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Xl(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return dl(e)},t.hydrate=function(e,t,n){if(!Zl(t))throw Error(i(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Ql(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Kl;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=ql(t,null,e,1,null!=n?n:null,o,0,a,s),e[mo]=t.current,Vr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yl(t)},t.render=function(e,t,n){if(!Zl(t))throw Error(i(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zl(e))throw Error(i(40));return!!e._reactRootContainer&&(dl((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[mo]=null}))})),!0)},t.unstable_batchedUpdates=ul,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zl(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},1180:(e,t,n)=>{"use strict";var r=n(1292);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},1292:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(6144)},5012:e=>{var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,o="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var s,c,l,u;if(Array.isArray(e)){if((s=e.length)!=a.length)return!1;for(c=s;0!==c--;)if(!i(e[c],a[c]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((s=e.length)!=a.length)return!1;for(c=s;0!==c--;)if(e[c]!==a[c])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"===typeof e.valueOf&&"function"===typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"===typeof e.toString&&"function"===typeof a.toString)return e.toString()===a.toString();if((s=(l=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(c=s;0!==c--;)if(!Object.prototype.hasOwnProperty.call(a,l[c]))return!1;if(t&&e instanceof Element)return!1;for(c=s;0!==c--;)if(("_owner"!==l[c]&&"__v"!==l[c]&&"__o"!==l[c]||!e.$$typeof)&&!i(e[l[c]],a[l[c]]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return i(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},4040:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof){case u:case l:case d:case m:case p:case c:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isFragment=function(e){return v(e)===i},t.isMemo=function(e){return v(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===s||e===a||e===f||e===h||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},3184:(e,t,n)=>{"use strict";e.exports=n(4040)},36:(e,t,n)=>{"use strict";var r=n(9060),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},4564:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var _=b.prototype=new y;_.constructor=b,m(_,v.prototype),_.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,C={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,o)&&!S.hasOwnProperty(o)&&(i[o]=t[o]);var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:C.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var O=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return a=a(c=e),e=""===i?"."+T(c,0):i,w(a)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),A(a,t,o,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e)),t.push(a)),1;if(c=0,i=""===i?".":i+":",w(e))for(var l=0;l<e.length;l++){var u=i+T(s=e[l],l);c+=A(s,t,o,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),l=0;!(s=e.next()).done;)c+=A(s=s.value,t,o,u=i+T(s,l++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function R(e,t,n){if(null==e)return e;var r=[],o=0;return A(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},D={transition:null},M={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:C};t.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return R(e,(function(){t++})),t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=b,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=C.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)x.call(t,l)&&!S.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return N.current.useTransition()},t.version="18.2.0"},9060:(e,t,n)=>{"use strict";e.exports=n(4564)},2496:(e,t,n)=>{"use strict";e.exports=n(36)},6692:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<o&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else{if(!(l<o&&0>i(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var l=[],u=[],d=1,f=null,h=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function w(e){if(g=!1,_(e),!m)if(null!==r(l))m=!0,D(x);else{var t=r(u);null!==t&&M(w,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,y(E),E=-1),p=!0;var i=h;try{for(_(n),f=r(l);null!==f&&(!(f.expirationTime>n)||e&&!A());){var a=f.callback;if("function"===typeof a){f.callback=null,h=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(l)&&o(l),_(n)}else o(l);f=r(l)}if(null!==f)var c=!0;else{var d=r(u);null!==d&&M(w,d.startTime-n),c=!1}return c}finally{f=null,h=i,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C,S=!1,k=null,E=-1,O=5,T=-1;function A(){return!(t.unstable_now()-T<O)}function R(){if(null!==k){var e=t.unstable_now();T=e;var n=!0;try{n=k(!0,e)}finally{n?C():(S=!1,k=null)}}else S=!1}if("function"===typeof b)C=function(){b(R)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,N=P.port2;P.port1.onmessage=R,C=function(){N.postMessage(null)}}else C=function(){v(R,0)};function D(e){k=e,S||(S=!0,C())}function M(e,n){E=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,D(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(l)&&e===r(u)&&(g?(y(E),E=-1):g=!0,M(w,i-a))):(e.sortIndex=s,n(l,e),m||p||(m=!0,D(x))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},7724:(e,t,n)=>{"use strict";e.exports=n(6692)},6020:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var l=i[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},3324:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&o)+t[1]-389564586|0)<<12|i>>>20)+n|0)&n|~i&r)+t[2]+606105819|0)<<17|o>>>15)+i|0)&i|~o&n)+t[3]-1044525330|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&o)+t[5]+1200080426|0)<<12|i>>>20)+n|0)&n|~i&r)+t[6]-1473231341|0)<<17|o>>>15)+i|0)&i|~o&n)+t[7]-45705983|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&o)+t[9]-1958414417|0)<<12|i>>>20)+n|0)&n|~i&r)+t[10]-42063|0)<<17|o>>>15)+i|0)&i|~o&n)+t[11]-1990404162|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&o)+t[13]-40341101|0)<<12|i>>>20)+n|0)&n|~i&r)+t[14]-1502002290|0)<<17|o>>>15)+i|0)&i|~o&n)+t[15]+1236535329|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[1]-165796510|0)<<5|n>>>27)+r|0)&o|r&~o)+t[6]-1069501632|0)<<9|i>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|o>>>18)+i|0)&n|i&~n)+t[0]-373897302|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[5]-701558691|0)<<5|n>>>27)+r|0)&o|r&~o)+t[10]+38016083|0)<<9|i>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|o>>>18)+i|0)&n|i&~n)+t[4]-405537848|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[9]+568446438|0)<<5|n>>>27)+r|0)&o|r&~o)+t[14]-1019803690|0)<<9|i>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|o>>>18)+i|0)&n|i&~n)+t[8]+1163531501|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&o|r&~o)+t[2]-51403784|0)<<9|i>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|o>>>18)+i|0)&n|i&~n)+t[12]-1926607734|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^o)+t[8]-2022574463|0)<<11|i>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|o>>>16)+i|0)^i^n)+t[14]-35309556|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^o)+t[4]+1272893353|0)<<11|i>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|o>>>16)+i|0)^i^n)+t[10]-1094730640|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^o)+t[0]-358537222|0)<<11|i>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|o>>>16)+i|0)^i^n)+t[6]+76029189|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^o)+t[12]-421815835|0)<<11|i>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|o>>>16)+i|0)^i^n)+t[2]-995338651|0)<<23|r>>>9)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~o))+t[7]+1126891415|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[14]-1416354905|0)<<15|o>>>17)+i|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~o))+t[3]-1894986606|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[10]-1051523|0)<<15|o>>>17)+i|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~o))+t[15]-30611744|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[6]-1560198380|0)<<15|o>>>17)+i|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~o))+t[11]-1120210379|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[2]+718787259|0)<<15|o>>>17)+i|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+o|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=o+e[2]|0,e[3]=i+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function o(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var t,o,i,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(o=(e=e.substring(t-64)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<o;t+=1)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(u,i),t=0;t<16;t+=1)i[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,n(u,i),u}function a(e){var t,r,i,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,o(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)i[t>>2]|=e[t]<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(u,i),t=0;t<16;t+=1)i[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,n(u,i),u}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n,r=e.length,o=new ArrayBuffer(r),i=new Uint8Array(o);for(n=0;n<r;n+=1)i[n]=e.charCodeAt(n);return t?i:o}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function h(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return c(i("hello")),"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var o,i,a,s,c=this.byteLength,l=t(n,c),u=c;return r!==e&&(u=t(r,c)),l>u?new ArrayBuffer(0):(o=u-l,i=new ArrayBuffer(o),a=new Uint8Array(i),s=new Uint8Array(this,l,o),a.set(s),i)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,o=this._buff.length;for(t=64;t<=o;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(i,o),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,o,i,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(r[2],16),i=parseInt(r[1],16)||0,e[14]=o,e[15]=i,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=c(i(e));return t?h(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),i=r.length;for(this._length+=e.byteLength,t=64;t<=i;t+=64)n(this._hash,o(r.subarray(t-64,t)));return this._buff=t-64<i?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r[t]<<(t%4<<3);return this._finish(i,o),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=d(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=c(a(new Uint8Array(e)));return t?h(n):n},p}()},8344:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServerStyleSheet:()=>ze,StyleSheetConsumer:()=>oe,StyleSheetContext:()=>re,StyleSheetManager:()=>ue,ThemeConsumer:()=>Ne,ThemeContext:()=>Pe,ThemeProvider:()=>De,__PRIVATE__:()=>qe,createGlobalStyle:()=>Fe,css:()=>_e,default:()=>Ue,isStyledComponent:()=>_,keyframes:()=>Be,useTheme:()=>Ve,version:()=>x,withTheme:()=>He});var r=n(3184),o=n(9060),i=n(6020),a=n.n(i);const s=function(e){function t(e,r,c,l,f){for(var h,p,m,g,_,x=0,C=0,S=0,k=0,E=0,N=0,M=m=h=0,L=0,j=0,F=0,B=0,z=c.length,H=z-1,V="",q="",U="",W="";L<z;){if(p=c.charCodeAt(L),L===H&&0!==C+k+S+x&&(0!==C&&(p=47===C?10:47),k=S=x=0,z++,H++),0===C+k+S+x){if(L===H&&(0<j&&(V=V.replace(d,"")),0<V.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:V+=c.charAt(L)}p=59}switch(p){case 123:for(h=(V=V.trim()).charCodeAt(0),m=1,B=++L;L<z;){switch(p=c.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(p=c.charCodeAt(L+1)){case 42:case 47:e:{for(M=L+1;M<H;++M)switch(c.charCodeAt(M)){case 47:if(42===p&&42===c.charCodeAt(M-1)&&L+2!==M){L=M+1;break e}break;case 10:if(47===p){L=M+1;break e}}L=M}}break;case 91:p++;case 40:p++;case 34:case 39:for(;L++<H&&c.charCodeAt(L)!==p;);}if(0===m)break;L++}if(m=c.substring(B,L),0===h&&(h=(V=V.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<j&&(V=V.replace(d,"")),p=V.charCodeAt(1)){case 100:case 109:case 115:case 45:j=r;break;default:j=P}if(B=(m=t(r,j,m,p,f+1)).length,0<D&&(_=s(3,m,j=n(P,V,F),r,T,O,B,p,f,l),V=j.join(""),void 0!==_&&0===(B=(m=_.trim()).length)&&(p=0,m="")),0<B)switch(p){case 115:V=V.replace(w,a);case 100:case 109:case 45:m=V+"{"+m+"}";break;case 107:m=(V=V.replace(v,"$1 $2"))+"{"+m+"}",m=1===R||2===R&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=V+m,112===l&&(q+=m,m="")}else m=""}else m=t(r,n(r,V,F),m,l,f+1);U+=m,m=F=j=M=h=0,V="",p=c.charCodeAt(++L);break;case 125:case 59:if(1<(B=(V=(0<j?V.replace(d,""):V).trim()).length))switch(0===M&&(h=V.charCodeAt(0),45===h||96<h&&123>h)&&(B=(V=V.replace(" ",":")).length),0<D&&void 0!==(_=s(1,V,r,e,T,O,q.length,l,f,l))&&0===(B=(V=_.trim()).length)&&(V="\0\0"),h=V.charCodeAt(0),p=V.charCodeAt(1),h){case 0:break;case 64:if(105===p||99===p){W+=V+c.charAt(L);break}default:58!==V.charCodeAt(B-1)&&(q+=o(V,h,p,V.charCodeAt(2)))}F=j=M=h=0,V="",p=c.charCodeAt(++L)}}switch(p){case 13:case 10:47===C?C=0:0===1+h&&107!==l&&0<V.length&&(j=1,V+="\0"),0<D*I&&s(0,V,r,e,T,O,q.length,l,f,l),O=1,T++;break;case 59:case 125:if(0===C+k+S+x){O++;break}default:switch(O++,g=c.charAt(L),p){case 9:case 32:if(0===k+x+C)switch(E){case 44:case 58:case 9:case 32:g="";break;default:32!==p&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===k+C+x&&(j=F=1,g="\f"+g);break;case 108:if(0===k+C+x+A&&0<M)switch(L-M){case 2:112===E&&58===c.charCodeAt(L-3)&&(A=E);case 8:111===N&&(A=N)}break;case 58:0===k+C+x&&(M=L);break;case 44:0===C+S+k+x&&(j=1,g+="\r");break;case 34:case 39:0===C&&(k=k===p?0:0===k?p:k);break;case 91:0===k+C+S&&x++;break;case 93:0===k+C+S&&x--;break;case 41:0===k+C+x&&S--;break;case 40:if(0===k+C+x){if(0===h)if(2*E+3*N===533);else h=1;S++}break;case 64:0===C+S+k+x+M+m&&(m=1);break;case 42:case 47:if(!(0<k+x+S))switch(C){case 0:switch(2*p+3*c.charCodeAt(L+1)){case 235:C=47;break;case 220:B=L,C=42}break;case 42:47===p&&42===E&&B+2!==L&&(33===c.charCodeAt(B+2)&&(q+=c.substring(B,L+1)),g="",C=0)}}0===C&&(V+=g)}N=E,E=p,L++}if(0<(B=q.length)){if(j=r,0<D&&(void 0!==(_=s(2,q,j,e,T,O,B,l,f,l))&&0===(q=_).length))return W+q+U;if(q=j.join(",")+"{"+q+"}",0!==R*A){switch(2!==R||i(q,2)||(A=0),A){case 111:q=q.replace(b,":-moz-$1")+q;break;case 112:q=q.replace(y,"::-webkit-input-$1")+q.replace(y,"::-moz-$1")+q.replace(y,":-ms-input-$1")+q}A=0}}return W+q+U}function n(e,t,n){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[c++]=r(e[l]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===R||2===R&&i(c,1)?"-webkit-"+c+c:c}if(0===R||2===R&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(E,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return h.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(_,"tb");break;case 232:c=a.replace(_,"tb-rl");break;case 220:c=a.replace(_,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(C,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(C,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,i,a,s,c,u){for(var d,f=0,h=t;f<D;++f)switch(d=N[f].call(l,e,h,n,r,o,i,a,s,c,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function c(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!==typeof e?R=1:(R=2,M=e):R=0),c}function l(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<D){var o=s(-1,n,r,r,T,O,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(P,r,n,0,0);return 0<D&&(void 0!==(o=s(-2,i,r,r,T,O,i.length,0,0,0))&&(i=o)),"",A=0,O=T=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,C=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,O=1,T=1,A=0,R=1,P=[],N=[],D=0,M=null,I=0;return l.use=function e(t){switch(t){case void 0:case null:D=N.length=0;break;default:if("function"===typeof t)N[D++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else I=0|!!t}return e},l.set=c,void 0!==e&&c(e),l};var c=n(2768);var l=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const u=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return l.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var d=n(784),f=n.n(d);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,r.typeOf)(e)},g=Object.freeze([]),v=Object.freeze({});function y(e){return"function"==typeof e}function b(e){return e.displayName||e.name||"Component"}function _(e){return e&&"string"==typeof e.styledComponentId}var w="undefined"!=typeof process&&({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_ATTR)||"data-styled",x="5.3.3",C="undefined"!=typeof window&&"HTMLElement"in window,S=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY)),k={};function E(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var O=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&E(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),T=new Map,A=new Map,R=1,P=function(e){if(T.has(e))return T.get(e);for(;A.has(R);)R++;var t=R++;return T.set(e,t),A.set(t,e),t},N=function(e){return A.get(e)},D=function(e,t){t>=R&&(R=t+1),T.set(e,t),A.set(t,e)},M="style["+w+'][data-styled-version="5.3.3"]',I=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},j=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var s=a.match(I);if(s){var c=0|parseInt(s[1],10),l=s[2];0!==c&&(D(l,c),L(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(a)}}},F=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},B=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.3.3");var a=F();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},z=function(){function e(e){var t=this.element=B(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}E(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),H=function(){function e(e){var t=this.element=B(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),V=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),q=C,U={isServer:!C,useCSSOMInjection:!S},W=function(){function e(e,t,n){void 0===e&&(e=v),void 0===t&&(t={}),this.options=h({},U,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&q&&(q=!1,function(e){for(var t=document.querySelectorAll(M),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(w)&&(j(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return P(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(h({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new V(o):r?new z(o):new H(o),new O(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(P(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(P(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(P(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=N(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var c=w+".g"+o+'[id="'+i+'"]',l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+=e+",")})),r+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),$=/(a)(d)/gi,G=function(e){return String.fromCharCode(e+(e>25?39:97))};function K(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=G(t%52)+n;return(G(t%52)+n).replace($,"$1-$2")}var X=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return X(5381,e)};function Q(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(y(n)&&!_(n))return!1}return!0}var Z=Y("5.3.3"),J=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Q(e),this.componentId=t,this.baseHash=X(Z,t),this.baseStyle=n,W.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=ye(this.rules,e,t,n).join(""),a=K(X(this.baseHash,i)>>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,l=X(this.baseHash,n.hash),u="",d=0;d<c;d++){var f=this.rules[d];if("string"==typeof f)u+=f;else if(f){var h=ye(f,e,t,n),p=Array.isArray(h)?h.join(""):h;l=X(l,p+d),u+=p}}if(u){var m=K(l>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,i=void 0===e?v:e,a=i.options,c=void 0===a?v:a,l=i.plugins,u=void 0===l?g:l,d=new s(c),f=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,c,l,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,r,i){return 0===r&&-1!==te.indexOf(i[n.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var c=e.replace(ee,""),l=i&&a?a+" "+i+" { "+c+" }":c;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(a||!i?"":i,l)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},h,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||E(15),X(e,t.name)}),5381).toString():"",m}var re=o.createContext(),oe=re.Consumer,ie=o.createContext(),ae=(ie.Consumer,new W),se=ne();function ce(){return(0,o.useContext)(re)||ae}function le(){return(0,o.useContext)(ie)||se}function ue(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=ce(),s=(0,o.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,o.useEffect)((function(){a()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.createElement(re.Provider,{value:s},o.createElement(ie.Provider,{value:c},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return E(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),fe=/([A-Z])/,he=/([A-Z])/g,pe=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ge(e){return fe.test(e)?e.replace(he,me).replace(pe,"-ms-"):e}var ve=function(e){return null==e||!1===e||""===e};function ye(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=ye(e[a],t,n,r))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return ve(e)?"":_(e)?"."+e.styledComponentId:y(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:ye(e(t),t,n,r):e instanceof de?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!ve(t[a])&&(Array.isArray(t[a])&&t[a].isCss||y(t[a])?i.push(ge(a)+":",t[a],";"):m(t[a])?i.push.apply(i,e(t[a],a)):i.push(ge(a)+": "+(r=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in c.c?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString();var l}var be=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function _e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return y(e)||m(e)?be(ye(p(g,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:be(ye(p(e,n)))}new Set;var we=function(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme},xe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ce=/(^-|-$)/g;function Se(e){return e.replace(xe,"-").replace(Ce,"")}var ke=function(e){return K(Y(e)>>>0)};function Ee(e){return"string"==typeof e&&!0}var Oe=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ae(e,t,n){var r=e[n];Oe(t)&&Oe(r)?Re(r,t):e[n]=t}function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(Oe(a))for(var s in a)Te(s)&&Ae(e,a[s],s)}return e}var Pe=o.createContext(),Ne=Pe.Consumer;function De(e){var t=(0,o.useContext)(Pe),n=(0,o.useMemo)((function(){return function(e,t){return e?y(e)?e(t):Array.isArray(e)||"object"!=typeof e?E(8):t?h({},t,{},e):e:E(14)}(e.theme,t)}),[e.theme,t]);return e.children?o.createElement(Pe.Provider,{value:n},e.children):null}var Me={};function Ie(e,t,n){var r=_(e),i=!Ee(e),a=t.attrs,s=void 0===a?g:a,c=t.componentId,l=void 0===c?function(e,t){var n="string"!=typeof e?"sc":Se(e);Me[n]=(Me[n]||0)+1;var r=n+"-"+ke("5.3.3"+n+Me[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):c,d=t.displayName,p=void 0===d?function(e){return Ee(e)?"styled."+e:"Styled("+b(e)+")"}(e):d,m=t.displayName&&t.componentId?Se(t.displayName)+"-"+t.componentId:t.componentId||l,w=r&&e.attrs?Array.prototype.concat(e.attrs,s).filter(Boolean):s,x=t.shouldForwardProp;r&&e.shouldForwardProp&&(x=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,S=new J(n,m,r?e.componentStyle:void 0),k=S.isStatic&&0===s.length,E=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,f=e.target,p=function(e,t,n){void 0===e&&(e=v);var r=h({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in y(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(we(t,(0,o.useContext)(Pe),s)||v,t,i),m=p[0],g=p[1],b=function(e,t,n,r){var o=ce(),i=le();return t?e.generateAndInjectStyles(v,o,i):e.generateAndInjectStyles(n,o,i)}(a,r,m),_=n,w=g.$as||t.$as||g.as||t.as||f,x=Ee(w),C=g!==t?h({},t,{},g):t,S={};for(var k in C)"$"!==k[0]&&"as"!==k&&("forwardedAs"===k?S.as=C[k]:(l?l(k,u,w):!x||u(k))&&(S[k]=C[k]));return t.style&&g.style!==t.style&&(S.style=h({},t.style,{},g.style)),S.className=Array.prototype.concat(c,d,b!==d?b:null,t.className,g.className).filter(Boolean).join(" "),S.ref=_,(0,o.createElement)(w,S)}(C,e,t,k)};return E.displayName=p,(C=o.forwardRef(E)).attrs=w,C.componentStyle=S,C.displayName=p,C.shouldForwardProp=x,C.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):g,C.styledComponentId=m,C.target=r?e.target:e,C.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Ee(e)?e:Se(b(e)));return Ie(e,h({},o,{attrs:w,componentId:i}),n)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Re({},e.defaultProps,t):t}}),C.toString=function(){return"."+C.styledComponentId},i&&f()(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var Le=function(e){return function e(t,n,o){if(void 0===o&&(o=v),!(0,r.isValidElementType)(n))return E(1,String(n));var i=function(){return t(n,o,_e.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,h({},o,{},r))},i.attrs=function(r){return e(t,n,h({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(Ie,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)}));var je=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Q(e),W.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(ye(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&W.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Fe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=_e.apply(void 0,[e].concat(n)),a="sc-global-"+ke(JSON.stringify(i)),s=new je(i,a);function c(e){var t=ce(),n=le(),r=(0,o.useContext)(Pe),i=(0,o.useRef)(t.allocateGSInstance(a)).current;return t.server&&l(i,e,t,r,n),(0,o.useLayoutEffect)((function(){if(!t.server)return l(i,e,t,r,n),function(){return s.removeStyles(i,t)}}),[i,e,t,r,n]),null}function l(e,t,n,r,o){if(s.isStatic)s.renderStyles(e,k,n,o);else{var i=h({},t,{theme:we(t,r,c.defaultProps)});s.renderStyles(e,i,n,o)}}return o.memo(c)}function Be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=_e.apply(void 0,[e].concat(n)).join(""),i=ke(o);return new de(i,o)}var ze=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=F();return"<style "+[n&&'nonce="'+n+'"',w+'="true"','data-styled-version="5.3.3"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?E(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return E(2);var n=((t={})[w]="",t["data-styled-version"]="5.3.3",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=F();return r&&(n.nonce=r),[o.createElement("style",h({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new W({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?E(2):o.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return E(3)},e}(),He=function(e){var t=o.forwardRef((function(t,n){var r=(0,o.useContext)(Pe),i=e.defaultProps,a=we(t,r,i);return o.createElement(e,h({},t,{theme:a,ref:n}))}));return f()(t,e),t.displayName="WithTheme("+b(e)+")",t},Ve=function(){return(0,o.useContext)(Pe)},qe={StyleSheet:W,masterSheet:ae};const Ue=Le},9144:(e,t,n)=>{"use strict";n.d(t,{C_:()=>k,Ud:()=>A});var r=n(9060);function o(e){return"$"+e}function i(e){return e.substring(1)}function a(){this._store={}}function s(e){if(this._store=new a,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}a.prototype.get=function(e){var t=o(e);return this._store[t]},a.prototype.set=function(e,t){var n=o(e);return this._store[n]=t,!0},a.prototype.has=function(e){return o(e)in this._store},a.prototype.keys=function(){return Object.keys(this._store).map((e=>i(e)))},a.prototype.delete=function(e){var t=o(e),n=t in this._store;return delete this._store[t],n},a.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var o=t[n];e(this._store[o],o=i(o))}},Object.defineProperty(a.prototype,"size",{get:function(){return Object.keys(this._store).length}}),s.prototype.add=function(e){return this._store.set(e,!0)},s.prototype.has=function(e){return this._store.has(e)},s.prototype.forEach=function(e){this._store.forEach((function(t,n){e(n)}))},Object.defineProperty(s.prototype,"size",{get:function(){return this._store.size}}),!function(){if("undefined"===typeof Symbol||"undefined"===typeof Map||"undefined"===typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?s:(Set,Map);n(2360);class c extends Error{constructor(e,t,n){super(),this.status=e,this.name=t,this.message=n,this.error=!0}toString(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})}}new c(401,"unauthorized","Name or password is incorrect."),new c(400,"bad_request","Missing JSON list of 'docs'"),new c(404,"not_found","missing"),new c(409,"conflict","Document update conflict"),new c(400,"bad_request","_id field must contain a string"),new c(412,"missing_id","_id is required for puts"),new c(400,"bad_request","Only reserved document ids may start with underscore."),new c(412,"precondition_failed","Database not open"),new c(500,"unknown_error","Database encountered an unknown error"),new c(500,"badarg","Some query argument is invalid"),new c(400,"invalid_request","Request was invalid"),new c(400,"query_parse_error","Some query parameter is invalid"),new c(500,"doc_validation","Bad special document member"),new c(400,"bad_request","Something wrong with the request"),new c(400,"bad_request","Document must be a JSON object"),new c(404,"not_found","Database not found"),new c(500,"indexed_db_went_bad","unknown"),new c(500,"web_sql_went_bad","unknown"),new c(500,"levelDB_went_went_bad","unknown"),new c(403,"forbidden","Forbidden by design doc validate_doc_update function"),new c(400,"bad_request","Invalid rev format"),new c(412,"file_exists","The database could not be created, the file already exists."),new c(412,"missing_stub","A pre-existing attachment stub wasn't found"),new c(413,"invalid_url","Provided URL is invalid");var l=n(8380),u=n.n(l);n(3324),self.setImmediate||self.setTimeout;function d(e){if(e instanceof ArrayBuffer)return function(e){if("function"===typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}(e);var t=e.size,n=e.type;return"function"===typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}var f=Function.prototype.toString,h=f.call(Object);function p(e){var t,n,r;if(!e||"object"!==typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=p(e[n]);return t}if(e instanceof Date&&isFinite(e))return e.toISOString();if(function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!==typeof Blob&&e instanceof Blob}(e))return d(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&f.call(n)==h}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=p(e[n]);"undefined"!==typeof o&&(t[n]=o)}return t}try{localStorage.setItem("_pouch_check_localstorage",1),!!localStorage.getItem("_pouch_check_localstorage")}catch(R){!1}u();"function"===typeof Object.assign&&Object.assign;var m,g,v,y,b,_=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},w=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class x{constructor(e){m.set(this,void 0),g.set(this,void 0),v.set(this,null),y.set(this,new Map),b.set(this,!1),_(this,m,e,"f"),_(this,g,(()=>{this.unsubscribeAll()}),"f"),e.once("destroyed",w(this,g,"f"))}subscribeToDocs(e,t){var n;if(w(this,b,"f"))return()=>{};null==w(this,v,"f")&&_(this,v,function(e){let t=null;const n=e.changes({since:"now",live:!0}).on("change",(n=>{var r;const o=(null!==(r=null===t||void 0===t?void 0:t.all.size)&&void 0!==r?r:0)>0,i=null===t||void 0===t?void 0:t.ids.get(n.id);n.deleted?(o&&t&&C(t.all,!0,n.id),i&&C(i,!0,n.id)):e.get(n.id).then((e=>{o&&t&&C(t.all,!1,n.id,e),i&&C(i,!1,n.id,e)})).catch(console.error)}));return t={changesFeed:n,all:new Set,ids:new Map},t}(w(this,m,"f")),"f");const r=Array.isArray(e)&&e.length>0;if(r)for(const i of null!==e&&void 0!==e?e:[])if(w(this,v,"f").ids.has(i))null===(n=w(this,v,"f").ids.get(i))||void 0===n||n.add(t);else{const e=new Set;e.add(t),w(this,v,"f").ids.set(i,e)}else w(this,v,"f").all.add(t);let o=!1;return()=>{var n,i,a,s;if(!o&&!w(this,b,"f")){if(o=!0,r)for(const r of null!==e&&void 0!==e?e:[]){const e=null===(n=w(this,v,"f"))||void 0===n?void 0:n.ids.get(r);null===e||void 0===e||e.delete(t),0===(null===e||void 0===e?void 0:e.size)&&(null===(i=w(this,v,"f"))||void 0===i||i.ids.delete(r))}else null===(a=w(this,v,"f"))||void 0===a||a.all.delete(t);0===(null===(s=w(this,v,"f"))||void 0===s?void 0:s.all.size)&&0===w(this,v,"f").ids.size&&(w(this,v,"f").changesFeed.cancel(),_(this,v,null,"f"))}}}subscribeToView(e,t){if(w(this,b,"f"))return()=>{};let n;w(this,y,"f").has(e)?n=w(this,y,"f").get(e):(n=function(e,t){let n=null;const r=e.changes({since:"now",live:!0,filter:"_view",view:t}).on("change",(e=>{var t;for(const o of null!==(t=null===n||void 0===n?void 0:n.callbacks)&&void 0!==t?t:[])try{o(e.id)}catch(r){console.error(r)}}));return n={feed:r,callbacks:new Set},n}(w(this,m,"f"),e),w(this,y,"f").set(e,n)),n.callbacks.add(t);let r=!1;return()=>{r||w(this,b,"f")||(r=!0,n.callbacks.delete(t),0===n.callbacks.size&&(n.feed.cancel(),w(this,y,"f").delete(e)))}}unsubscribeAll(){if(!w(this,b,"f")){_(this,b,!0,"f"),w(this,m,"f").removeListener("destroyed",w(this,g,"f")),w(this,v,"f")&&(w(this,v,"f").changesFeed.cancel(),w(this,v,"f").all.clear(),w(this,v,"f").ids.forEach((e=>{e.clear()})),w(this,v,"f").ids.clear());for(const e of w(this,y,"f").values())e.feed.cancel(),e.callbacks.clear();w(this,y,"f").clear()}}}function C(e,t,n,r){for(const i of e)try{i(t,n,r?p(r):void 0)}catch(o){console.error(o)}}m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap;const S=(0,r.createContext)({defaultKey:"",databases:{}});function k(e){const{pouchdb:t,name:n}=e,{databases:o,default:i}=e;let a,s;if(null!=o&&null!=i)a=o,s=i.toString();else{if(null==t)throw new TypeError("databases argument must be pared with the default argument");s=(null===n||void 0===n?void 0:n.toString())||t.name,a={[s]:t}}const c=function(e){const[t,n]=(0,r.useState)(e),[o,i]=(0,r.useState)(null);if(o&&e===t)return o;const a={},s=new Set(Object.keys(null!==o&&void 0!==o?o:{}));let c=!1;for(const[r,l]of Object.entries(e))o&&t[r]===l?(a[r]=o[r],s.delete(r)):(c=!0,a[r]={pouchdb:l,subscriptionManager:new x(l)});if(c||s.size>0)n(e),i(a);else if(o)return o;if(o)for(const r of s)o[r].subscriptionManager.unsubscribeAll();return a}(a),l=(0,r.useContext)(S).databases,u=(0,r.useMemo)((()=>({defaultKey:s,databases:Object.assign(Object.assign({},l),c)})),[c,s,l]);return r.createElement(S.Provider,{value:u},e.children)}function E(e,t){switch(t.type){case"loading_started":return Object.assign(Object.assign({},e),{state:"loading"});case"loading_finished":return Object.assign(Object.assign({},t.payload),{error:null,state:"done"});case"loading_error":return Object.assign(Object.assign(Object.assign({},e),t.payload.setResult&&t.payload.result||{}),{state:"error",error:t.payload.error});default:return e}}var O=n(4084),T=n.n(O);function A(e){const{pouchdb:t,subscriptionManager:n}=function(e){const{defaultKey:t,databases:n}=(0,r.useContext)(S);if(""===t&&null==n[t]&&0===Object.keys(n).length)throw new Error("could not find PouchDB context value; please ensure the component is wrapped in a <Provider>");const o="_default"===e?t:null!==e&&void 0!==e?e:t;if(!(o in n))throw new Error('could not find a PouchDB database with name of "'.concat(e,'"'));return n[o]}(null===e||void 0===e?void 0:e.db),{include_docs:o,conflicts:i,attachments:a,binary:s,limit:c,skip:l,descending:u,update_seq:d}=e||{},{startkey:f,endkey:h,inclusive_end:p}=e||{},{key:m}=e||{},g=function(e){const t=(0,r.useRef)(e);return(0,r.useMemo)((()=>T()(t.current,e)?t.current:(t.current=e,e)),[e])}(null===e||void 0===e?void 0:e.keys),[v,y,b]=function(e){const[t,n]=(0,r.useReducer)(E,e,(e=>("function"===typeof e&&(e=e()),e||(e={}),Object.assign(Object.assign({},e),{error:null,state:"loading"})))),o=(0,r.useMemo)((()=>Object.assign(Object.assign({},t),{loading:"loading"===t.state})),[t]),i=(0,r.useRef)(t);i.current=t;const a=(0,r.useCallback)((e=>{const t=e(i.current);n({type:"loading_finished",payload:t})}),[]);return[o,n,a]}((()=>({rows:[],total_rows:0,offset:0})));return(0,r.useEffect)((()=>{let e=!0,r=!1,v=!1;const _={include_docs:o,conflicts:i,attachments:a,binary:s,limit:c,skip:l,descending:u,update_seq:d,startkey:f,endkey:h,inclusive_end:p,key:m,keys:g},w=async()=>{if(r)v=!0;else{r=!0,v=!1,y({type:"loading_started"});try{const n=await t.allDocs(_);e&&y({type:"loading_finished",payload:n})}catch(n){e&&y({type:"loading_error",payload:{error:n,setResult:!1}})}finally{r=!1,v&&e&&w()}}};w();let x=null;null!=m?x=[m]:null!=g&&(x=g);const C=n.subscribeToDocs(x,((t,n)=>{e&&function(e,t,n,r,o){if(t&&(o&&e>t||!o&&e<t))return!1;if(null==n)return!0;return r?o?e>=n:e<=n:o?e>n:e<n}(n,f,h,p,u)&&(t?b((e=>{const t=e.rows.filter((e=>e.id!==n));return Object.assign(Object.assign({},e),{rows:t,total_rows:e.total_rows-(e.rows.length-t.length)})})):w())}));return()=>{e=!1,C()}}),[y,b,t,n,o,i,a,s,f,h,p,c,l,u,m,g,d]),v}},7620:(e,t,n)=>{"use strict";var r=n(9060);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,l(o)&&u({inst:o})}),[e,n,t]),a((function(){return l(o)&&u({inst:o}),e((function(){l(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},7844:(e,t,n)=>{"use strict";e.exports=n(7620)},4344:(e,t)=>{"use strict";function n(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var o=r.element,i=r.index;if(Array.isArray(o))o.push(e);else if(i===t.length-2){o[t.pop()]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,o,i,a,s,c,l,u,d,f="";n=t.pop();)if(r=n.obj,f+=n.prefix||"",o=n.val||"")f+=o;else if("object"!==typeof r)f+="undefined"===typeof r?null:JSON.stringify(r);else if(null===r)f+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),i=r.length-1;i>=0;i--)a=0===i?"":",",t.push({obj:r[i],prefix:a});t.push({val:"["})}else{for(c in s=[],r)r.hasOwnProperty(c)&&s.push(c);for(t.push({val:"}"}),i=s.length-1;i>=0;i--)u=r[l=s[i]],d=i>0?",":"",d+=JSON.stringify(l)+":",t.push({obj:u,prefix:d});t.push({val:"{"})}return f},t.parse=function(e){for(var t,r,o,i,a,s,c,l,u,d=[],f=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&"undefined"!==typeof t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,n(null,d,f);break;case"t":h+=3,n(!0,d,f);break;case"f":h+=4,n(!1,d,f);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(r="",h--;;){if(o=e[h++],!/[\d\.\-e\+]/.test(o)){h--;break}r+=o}n(parseFloat(r),d,f);break;case'"':for(i="",a=void 0,s=0;'"'!==(c=e[h++])||"\\"===a&&s%2===1;)i+=c,"\\"===(a=c)?s++:s=0;n(JSON.parse('"'+i+'"'),d,f);break;case"[":l={element:[],index:d.length},d.push(l.element),f.push(l);break;case"{":u={element:{},index:d.length},d.push(u.element),f.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===d.length)return d.pop();n(d.pop(),d,f)}}},1568:e=>{"use strict";var t=function(){};e.exports=t},5952:()=>{},6512:()=>{},4899:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},8388:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},4064:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},6024:(e,t,n)=>{var r=n(5216);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},64:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},9708:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},7936:(e,t,n)=>{var r=n(8388),o=n(64),i=n(3384),a=n(9708);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},1744:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},6776:(e,t,n)=>{var r=n(9848).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5216:(e,t,n)=>{var r=n(9848).default,o=n(6776);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},9848:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3384:(e,t,n)=>{var r=n(4899);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},264:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},7328:(e,t,n)=>{"use strict";n.d(t,{C3:()=>i,KE:()=>l,UN:()=>s,ct:()=>o,kH:()=>c,sX:()=>a});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(c){s=[6,c],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=e,(()=>{var e="function"===typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"===typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",r="function"===typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))};n.a=(n,i,a)=>{var s;a&&((s=[]).d=-1);var c,l,u,d=new Set,f=n.exports,h=new Promise(((e,t)=>{u=t,l=e}));h[t]=f,h[e]=e=>(s&&e(s),d.forEach(e),h.catch((e=>{}))),n.exports=h,i((n=>{var i;c=(n=>n.map((n=>{if(null!==n&&"object"===typeof n){if(n[e])return n;if(n.then){var i=[];i.d=0,n.then((e=>{a[t]=e,o(i)}),(e=>{a[r]=e,o(i)}));var a={};return a[e]=e=>e(i),a}}var s={};return s[e]=e=>{},s[t]=n,s})))(n);var a=()=>c.map((e=>{if(e[r])throw e[r];return e[t]})),l=new Promise((t=>{(i=()=>t(a)).r=0;var n=e=>e!==s&&!d.has(e)&&(d.add(e),e&&!e.d&&(i.r++,e.push(i)));c.map((t=>t[e](n)))}));return i.r?l:a()}),(e=>(e?u(h[r]=e):l(f),o(s)))),s&&s.d<0&&(s.d=0)}})(),n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+({400:"blueprint-icons-all-paths-loader",416:"blueprint-icons-16px-paths",504:"blueprint-icons-20px-paths",520:"blueprint-icons-split-paths-by-size-loader",556:"blueprint-icons-all-paths"}[e]||e)+"."+{400:"0aa89747",416:"d605910e",504:"7ee05cc8",520:"52a072d3",556:"f63155c9",808:"ce070002"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="hardpy:";n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var s,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var f=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),t)return t(n)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{var e={590:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,a=r[0],s=r[1],c=r[2],l=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)c(n)}for(t&&t(r);l<a.length;l++)i=a[l],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkhardpy=self.webpackChunkhardpy||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();n(5332)})();
|
|
3
|
-
//# sourceMappingURL=main.7c954faf.js.map
|