From c0fd6cfc09068ec0537eea43f6e99f0992d15569 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 25 Aug 2021 13:35:37 +0200 Subject: [PATCH] Merge pull request #4779 from mhils/mitmweb-tcp web: add support for viewing tcp flows --- mitmproxy/tools/web/app.py | 53 +-- mitmproxy/tools/web/static/app.css | 2 +- mitmproxy/tools/web/static/app.js | 86 ++--- .../web/static/images/resourceTcpIcon.png | Bin 0 -> 1253 bytes .../static/images/resourceWebSocketIcon.png | Bin 1428 -> 1399 bytes test/mitmproxy/tools/web/test_app.py | 53 +-- web/gulpfile.js | 2 +- web/src/css/flowtable.less | 6 +- web/src/css/sprites.less | 4 + web/src/images/resourceIcon.psd | Bin 0 -> 50131 bytes web/src/images/resourceTcpIcon.png | Bin 0 -> 1253 bytes web/src/images/resourceWebSocketIcon.png | Bin 1428 -> 1399 bytes .../components/FlowTable/FlowColumnsSpec.tsx | 11 +- .../__snapshots__/FlowColumnsSpec.tsx.snap | 47 +-- .../__snapshots__/FlowRowSpec.tsx.snap | 10 +- .../js/__tests__/components/FlowViewSpec.tsx | 12 +- .../__snapshots__/FlowMenuSpec.tsx.snap | 14 + .../__snapshots__/MainMenuSpec.tsx.snap | 2 +- .../__snapshots__/FlowViewSpec.tsx.snap | 99 +++++ .../__snapshots__/HeaderSpec.tsx.snap | 14 + web/src/js/__tests__/ducks/_tflow.ts | 354 ++++++++++-------- web/src/js/__tests__/ducks/tutils.ts | 23 +- .../js/__tests__/ducks/ui/keyboardSpec.tsx | 2 +- .../js/components/FlowTable/FlowColumns.tsx | 89 ++--- .../js/components/FlowTable/FlowTableHead.tsx | 4 +- web/src/js/components/FlowView.tsx | 19 +- web/src/js/components/FlowView/Messages.tsx | 50 +++ .../js/components/FlowView/TcpMessages.tsx | 14 + web/src/js/components/FlowView/Timing.tsx | 10 +- web/src/js/components/FlowView/WebSocket.tsx | 47 +-- web/src/js/components/Header/FlowMenu.tsx | 61 ++- web/src/js/ducks/ui/flow.ts | 3 + web/src/js/ducks/ui/keyboard.tsx | 4 +- web/src/js/flow.ts | 10 +- web/src/js/flow/export.ts | 8 +- web/src/js/flow/utils.ts | 65 ++-- 36 files changed, 721 insertions(+), 457 deletions(-) create mode 100644 mitmproxy/tools/web/static/images/resourceTcpIcon.png create mode 100644 web/src/images/resourceIcon.psd create mode 100644 web/src/images/resourceTcpIcon.png create mode 100644 web/src/js/components/FlowView/Messages.tsx create mode 100644 web/src/js/components/FlowView/TcpMessages.tsx diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index a9ec1c3c2..4034314ed 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -96,31 +96,30 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: if flow.error: f["error"] = flow.error.get_state() - if isinstance(flow, http.HTTPFlow): + if isinstance(flow, HTTPFlow): content_length: Optional[int] content_hash: Optional[str] - if flow.request: - if flow.request.raw_content is not None: - content_length = len(flow.request.raw_content) - content_hash = hashlib.sha256(flow.request.raw_content).hexdigest() - else: - content_length = None - content_hash = None - f["request"] = { - "method": flow.request.method, - "scheme": flow.request.scheme, - "host": flow.request.host, - "port": flow.request.port, - "path": flow.request.path, - "http_version": flow.request.http_version, - "headers": tuple(flow.request.headers.items(True)), - "contentLength": content_length, - "contentHash": content_hash, - "timestamp_start": flow.request.timestamp_start, - "timestamp_end": flow.request.timestamp_end, - "is_replay": flow.is_replay == "request", # TODO: remove, use flow.is_replay instead. - "pretty_host": flow.request.pretty_host, - } + + if flow.request.raw_content is not None: + content_length = len(flow.request.raw_content) + content_hash = hashlib.sha256(flow.request.raw_content).hexdigest() + else: + content_length = None + content_hash = None + f["request"] = { + "method": flow.request.method, + "scheme": flow.request.scheme, + "host": flow.request.host, + "port": flow.request.port, + "path": flow.request.path, + "http_version": flow.request.http_version, + "headers": tuple(flow.request.headers.items(True)), + "contentLength": content_length, + "contentHash": content_hash, + "timestamp_start": flow.request.timestamp_start, + "timestamp_end": flow.request.timestamp_end, + "pretty_host": flow.request.pretty_host, + } if flow.response: if flow.response.raw_content is not None: content_length = len(flow.response.raw_content) @@ -137,7 +136,6 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: "contentHash": content_hash, "timestamp_start": flow.response.timestamp_start, "timestamp_end": flow.response.timestamp_end, - "is_replay": flow.is_replay == "response", # TODO: remove, use flow.is_replay instead. } if flow.response.data.trailers: f["response"]["trailers"] = tuple(flow.response.data.trailers.items(True)) @@ -145,6 +143,7 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: if flow.websocket: f["websocket"] = { "messages_meta": { + "contentLength": sum(len(x.content) for x in flow.websocket.messages), "count": len(flow.websocket.messages), "timestamp_last": flow.websocket.messages[-1].timestamp if flow.websocket.messages else None, }, @@ -153,6 +152,12 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: "close_reason": flow.websocket.close_reason, "timestamp_end": flow.websocket.timestamp_end, } + elif isinstance(flow, TCPFlow): + f["messages_meta"] = { + "contentLength": sum(len(x.content) for x in flow.messages), + "count": len(flow.messages), + "timestamp_last": flow.messages[-1].timestamp if flow.messages else None, + } return f diff --git a/mitmproxy/tools/web/static/app.css b/mitmproxy/tools/web/static/app.css index c52f01294..e5822dd36 100644 --- a/mitmproxy/tools/web/static/app.css +++ b/mitmproxy/tools/web/static/app.css @@ -1,2 +1,2 @@ -html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(images/chrome-devtools/resourceCSSIcon.png)}.resource-icon-document{background-image:url(images/chrome-devtools/resourceDocumentIcon.png)}.resource-icon-js{background-image:url(images/chrome-devtools/resourceJSIcon.png)}.resource-icon-plain{background-image:url(images/chrome-devtools/resourcePlainIcon.png)}.resource-icon-executable{background-image:url(images/resourceExecutableIcon.png)}.resource-icon-flash{background-image:url(images/resourceFlashIcon.png)}.resource-icon-image{background-image:url(images/resourceImageIcon.png)}.resource-icon-java{background-image:url(images/resourceJavaIcon.png)}.resource-icon-not-modified{background-image:url(images/resourceNotModifiedIcon.png)}.resource-icon-redirect{background-image:url(images/resourceRedirectIcon.png)}.resource-icon-websocket{background-image:url(images/resourceWebSocketIcon.png)}#container,#mitmproxy,body,html{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:0}#container>.eventlog,#container>footer,#container>header{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div{display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media (max-width:767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:hsla(209,52%,84%,.5)!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:focus,a.connection-indicator:hover{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.fetching,.connection-indicator.init{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font:normal normal normal 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:rgba(250,250,250,.8)}.flow-table th.sort-asc:after{content:"\f0de"}.flow-table th.sort-desc:after{content:"\f0dd"}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(even){background-color:#f2f2f2}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(even){background-color:#ffe57f}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-method,.flow-table tr.intercepted:not(.has-response) .col-path{color:#ff7f00}.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-time{color:#ff7f00}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:rgba(0,185,0,.5)}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff7f00}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:auto}.flow-table td.col-size,.flow-table td.col-time{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table .col-quickactions.hover,.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a.open,.flow-table .col-quickactions>div>a:hover{background-color:rgba(0,0,0,.05)}.flow-table .col-quickactions .fa-ellipsis-h{transform:translate(0,3px)}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translate(0,2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px rgba(0,0,0,.0125),0 2px 4px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.025);background-color:rgba(255,255,255,.1)}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.1);background-color:rgba(255,255,255,.2)}.inline-input[contenteditable].has-warning{color:#ffb8b8}.flow-detail table{width:100%;table-layout:fixed;word-break:break-all}.flow-detail table td:nth-child(2){font-family:Menlo,Monaco,Consolas,"Courier New",monospace;width:70%}.flow-detail table tr:not(:first-child){border-top:1px solid #f7f7f7}.flow-detail table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dd,dl.cert-attributes dt{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:rgba(255,255,255,.7);border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:rgba(239,108,0,.7);color:rgba(0,0,0,.8);border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:grey;padding:3px 0;padding-left:10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px 2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.contentview .header{font-weight:700}.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:hsla(209,52%,84%,.5)!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto} +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(images/chrome-devtools/resourceCSSIcon.png)}.resource-icon-document{background-image:url(images/chrome-devtools/resourceDocumentIcon.png)}.resource-icon-js{background-image:url(images/chrome-devtools/resourceJSIcon.png)}.resource-icon-plain{background-image:url(images/chrome-devtools/resourcePlainIcon.png)}.resource-icon-executable{background-image:url(images/resourceExecutableIcon.png)}.resource-icon-flash{background-image:url(images/resourceFlashIcon.png)}.resource-icon-image{background-image:url(images/resourceImageIcon.png)}.resource-icon-java{background-image:url(images/resourceJavaIcon.png)}.resource-icon-not-modified{background-image:url(images/resourceNotModifiedIcon.png)}.resource-icon-redirect{background-image:url(images/resourceRedirectIcon.png)}.resource-icon-websocket{background-image:url(images/resourceWebSocketIcon.png)}.resource-icon-tcp{background-image:url(images/resourceTcpIcon.png)}#container,#mitmproxy,body,html{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:0}#container>.eventlog,#container>footer,#container>header{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div{display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media (max-width:767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:hsla(209,52%,84%,.5)!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:focus,a.connection-indicator:hover{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.fetching,.connection-indicator.init{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font:normal normal normal 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:rgba(250,250,250,.8)}.flow-table th.sort-asc:after{content:"\f0de"}.flow-table th.sort-desc:after{content:"\f0dd"}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(even){background-color:#f2f2f2}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(even){background-color:#ffe57f}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-method,.flow-table tr.intercepted:not(.has-response) .col-path{color:#ff7f00}.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-time{color:#ff7f00}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:rgba(0,185,0,.5)}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff7f00}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:auto}.flow-table td.col-size,.flow-table td.col-time{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table .col-quickactions.hover,.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a:hover{background-color:rgba(0,0,0,.05)}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translate(0,2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px rgba(0,0,0,.0125),0 2px 4px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.025);background-color:rgba(255,255,255,.1)}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.1);background-color:rgba(255,255,255,.2)}.inline-input[contenteditable].has-warning{color:#ffb8b8}.flow-detail table{width:100%;table-layout:fixed;word-break:break-all}.flow-detail table td:nth-child(2){font-family:Menlo,Monaco,Consolas,"Courier New",monospace;width:70%}.flow-detail table tr:not(:first-child){border-top:1px solid #f7f7f7}.flow-detail table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dd,dl.cert-attributes dt{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:rgba(255,255,255,.7);border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:rgba(239,108,0,.7);color:rgba(0,0,0,.8);border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:grey;padding:3px 0;padding-left:10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px 2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.contentview .header{font-weight:700}.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:hsla(209,52%,84%,.5)!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto} /*# sourceMappingURL=app.css.map */ diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js index 51c863f2a..fd773568c 100644 --- a/mitmproxy/tools/web/static/app.js +++ b/mitmproxy/tools/web/static/app.js @@ -1,66 +1,66 @@ -(()=>{var BM=Object.create;var wc=Object.defineProperty,UM=Object.defineProperties,zM=Object.getOwnPropertyDescriptor,$M=Object.getOwnPropertyDescriptors,jM=Object.getOwnPropertyNames,iv=Object.getOwnPropertySymbols,qM=Object.getPrototypeOf,A0=Object.prototype.hasOwnProperty,hC=Object.prototype.propertyIsEnumerable;var D0=(e,t,i)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Oe=(e,t)=>{for(var i in t||(t={}))A0.call(t,i)&&D0(e,i,t[i]);if(iv)for(var i of iv(t))hC.call(t,i)&&D0(e,i,t[i]);return e},Ht=(e,t)=>UM(e,$M(t)),mC=e=>wc(e,"__esModule",{value:!0}),o=(e,t)=>wc(e,"name",{value:t,configurable:!0});var Us=(e,t)=>{var i={};for(var l in e)A0.call(e,l)&&t.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&iv)for(var l of iv(e))t.indexOf(l)<0&&hC.call(e,l)&&(i[l]=e[l]);return i};var fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vC=(e,t)=>{mC(e);for(var i in t)wc(e,i,{get:t[i],enumerable:!0})},VM=(e,t,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of jM(t))!A0.call(e,l)&&l!=="default"&&wc(e,l,{get:()=>t[l],enumerable:!(i=zM(t,l))||i.enumerable});return e},pe=e=>VM(mC(wc(e!=null?BM(qM(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var es=(e,t,i)=>(D0(e,typeof t!="symbol"?t+"":t,i),i);var Ma=(e,t,i)=>new Promise((l,d)=>{var v=_=>{try{y(i.next(_))}catch(O){d(O)}},p=_=>{try{y(i.throw(_))}catch(O){d(O)}},y=_=>_.done?l(_.value):Promise.resolve(_.value).then(v,p);y((i=i.apply(e,t)).next())});var R0=fr((KI,yC)=>{"use strict";var gC=Object.getOwnPropertySymbols,KM=Object.prototype.hasOwnProperty,GM=Object.prototype.propertyIsEnumerable;function YM(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}o(YM,"toObject");function XM(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(t).map(function(v){return t[v]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(v){d[v]=v}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch(v){return!1}}o(XM,"shouldUseNative");yC.exports=XM()?Object.assign:function(e,t){for(var i,l=YM(e),d,v=1;v{"use strict";var F0=R0(),xc=60103,wC=60106;Et.Fragment=60107;Et.StrictMode=60108;Et.Profiler=60114;var xC=60109,SC=60110,CC=60112;Et.Suspense=60113;var _C=60115,EC=60116;typeof Symbol=="function"&&Symbol.for&&(xo=Symbol.for,xc=xo("react.element"),wC=xo("react.portal"),Et.Fragment=xo("react.fragment"),Et.StrictMode=xo("react.strict_mode"),Et.Profiler=xo("react.profiler"),xC=xo("react.provider"),SC=xo("react.context"),CC=xo("react.forward_ref"),Et.Suspense=xo("react.suspense"),_C=xo("react.memo"),EC=xo("react.lazy"));var xo,bC=typeof Symbol=="function"&&Symbol.iterator;function QM(e){return e===null||typeof e!="object"?null:(e=bC&&e[bC]||e["@@iterator"],typeof e=="function"?e:null)}o(QM,"y");function yd(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i{"use strict";RC.exports=DC()});var UC=fr(Dt=>{"use strict";var Cc,wd,lv,z0;typeof performance=="object"&&typeof performance.now=="function"?(FC=performance,Dt.unstable_now=function(){return FC.now()}):($0=Date,IC=$0.now(),Dt.unstable_now=function(){return $0.now()-IC});var FC,$0,IC;typeof window=="undefined"||typeof MessageChannel!="function"?(_c=null,j0=null,q0=o(function(){if(_c!==null)try{var e=Dt.unstable_now();_c(!0,e),_c=null}catch(t){throw setTimeout(q0,0),t}},"w"),Cc=o(function(e){_c!==null?setTimeout(Cc,0,e):(_c=e,setTimeout(q0,0))},"f"),wd=o(function(e,t){j0=setTimeout(e,t)},"g"),lv=o(function(){clearTimeout(j0)},"h"),Dt.unstable_shouldYield=function(){return!1},z0=Dt.unstable_forceFrameRate=function(){}):(HC=window.setTimeout,WC=window.clearTimeout,typeof console!="undefined"&&(BC=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof BC!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),xd=!1,Sd=null,av=-1,V0=5,K0=0,Dt.unstable_shouldYield=function(){return Dt.unstable_now()>=K0},z0=o(function(){},"k"),Dt.unstable_forceFrameRate=function(e){0>e||125>>1,d=e[l];if(d!==void 0&&0cv(p,i))_!==void 0&&0>cv(_,p)?(e[l]=_,e[y]=i,l=y):(e[l]=p,e[v]=i,l=v);else if(_!==void 0&&0>cv(_,i))e[l]=_,e[y]=i,l=y;else break e}}return t}return null}o(fv,"K");function cv(e,t){var i=e.sortIndex-t.sortIndex;return i!==0?i:e.id-t.id}o(cv,"I");var zs=[],Aa=[],rA=1,So=null,Kn=3,pv=!1,Vu=!1,Cd=!1;function X0(e){for(var t=ts(Aa);t!==null;){if(t.callback===null)fv(Aa);else if(t.startTime<=e)fv(Aa),t.sortIndex=t.expirationTime,Y0(zs,t);else break;t=ts(Aa)}}o(X0,"T");function Q0(e){if(Cd=!1,X0(e),!Vu)if(ts(zs)!==null)Vu=!0,Cc(Z0);else{var t=ts(Aa);t!==null&&wd(Q0,t.startTime-e)}}o(Q0,"U");function Z0(e,t){Vu=!1,Cd&&(Cd=!1,lv()),pv=!0;var i=Kn;try{for(X0(t),So=ts(zs);So!==null&&(!(So.expirationTime>t)||e&&!Dt.unstable_shouldYield());){var l=So.callback;if(typeof l=="function"){So.callback=null,Kn=So.priorityLevel;var d=l(So.expirationTime<=t);t=Dt.unstable_now(),typeof d=="function"?So.callback=d:So===ts(zs)&&fv(zs),X0(t)}else fv(zs);So=ts(zs)}if(So!==null)var v=!0;else{var p=ts(Aa);p!==null&&wd(Q0,p.startTime-t),v=!1}return v}finally{So=null,Kn=i,pv=!1}}o(Z0,"V");var nA=z0;Dt.unstable_IdlePriority=5;Dt.unstable_ImmediatePriority=1;Dt.unstable_LowPriority=4;Dt.unstable_NormalPriority=3;Dt.unstable_Profiling=null;Dt.unstable_UserBlockingPriority=2;Dt.unstable_cancelCallback=function(e){e.callback=null};Dt.unstable_continueExecution=function(){Vu||pv||(Vu=!0,Cc(Z0))};Dt.unstable_getCurrentPriorityLevel=function(){return Kn};Dt.unstable_getFirstCallbackNode=function(){return ts(zs)};Dt.unstable_next=function(e){switch(Kn){case 1:case 2:case 3:var t=3;break;default:t=Kn}var i=Kn;Kn=t;try{return e()}finally{Kn=i}};Dt.unstable_pauseExecution=function(){};Dt.unstable_requestPaint=nA;Dt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=Kn;Kn=e;try{return t()}finally{Kn=i}};Dt.unstable_scheduleCallback=function(e,t,i){var l=Dt.unstable_now();switch(typeof i=="object"&&i!==null?(i=i.delay,i=typeof i=="number"&&0l?(e.sortIndex=i,Y0(Aa,e),ts(zs)===null&&e===ts(Aa)&&(Cd?lv():Cd=!0,wd(Q0,i-l))):(e.sortIndex=d,Y0(zs,e),Vu||pv||(Vu=!0,Cc(Z0))),e};Dt.unstable_wrapCallback=function(e){var t=Kn;return function(){var i=Kn;Kn=t;try{return e.apply(this,arguments)}finally{Kn=i}}}});var $C=fr((QI,zC)=>{"use strict";zC.exports=UC()});var Lb=fr(ko=>{"use strict";var dv=Re(),cr=R0(),Sn=$C();function ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;it}return!1}o(lA,"na");function pi(e,t,i,l,d,v,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=v,this.removeEmptyString=p}o(pi,"B");var Mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mn[e]=new pi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mn[t]=new pi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mn[e]=new pi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mn[e]=new pi(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){Mn[e]=new pi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mn[e]=new pi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mn[e]=new pi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mn[e]=new pi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mn[e]=new pi(e,5,!1,e.toLowerCase(),null,!1,!1)});var J0=/[\-:]([a-z])/g;function ew(e){return e[1].toUpperCase()}o(ew,"pa");"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(J0,ew);Mn[t]=new pi(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(J0,ew);Mn[t]=new pi(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(J0,ew);Mn[t]=new pi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mn[e]=new pi(e,1,!1,e.toLowerCase(),null,!1,!1)});Mn.xlinkHref=new pi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mn[e]=new pi(e,1,!1,e.toLowerCase(),null,!0,!0)});function tw(e,t,i,l){var d=Mn.hasOwnProperty(t)?Mn[t]:null,v=d!==null?d.type===0:l?!1:!(!(2{var jM=Object.create;var vc=Object.defineProperty,$M=Object.defineProperties,qM=Object.getOwnPropertyDescriptor,VM=Object.getOwnPropertyDescriptors,KM=Object.getOwnPropertyNames,nv=Object.getOwnPropertySymbols,GM=Object.getPrototypeOf,D0=Object.prototype.hasOwnProperty,xC=Object.prototype.propertyIsEnumerable;var R0=(e,t,n)=>t in e?vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Le=(e,t)=>{for(var n in t||(t={}))D0.call(t,n)&&R0(e,n,t[n]);if(nv)for(var n of nv(t))xC.call(t,n)&&R0(e,n,t[n]);return e},Ft=(e,t)=>$M(e,VM(t)),SC=e=>vc(e,"__esModule",{value:!0}),o=(e,t)=>vc(e,"name",{value:t,configurable:!0});var Fs=(e,t)=>{var n={};for(var l in e)D0.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(e!=null&&nv)for(var l of nv(e))t.indexOf(l)<0&&xC.call(e,l)&&(n[l]=e[l]);return n};var lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),CC=(e,t)=>{SC(e);for(var n in t)vc(e,n,{get:t[n],enumerable:!0})},YM=(e,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of KM(t))!D0.call(e,l)&&l!=="default"&&vc(e,l,{get:()=>t[l],enumerable:!(n=qM(t,l))||n.enumerable});return e},pe=e=>YM(SC(vc(e!=null?jM(GM(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var gc=(e,t,n)=>(R0(e,typeof t!="symbol"?t+"":t,n),n);var Oa=(e,t,n)=>new Promise((l,d)=>{var v=_=>{try{w(n.next(_))}catch(O){d(O)}},p=_=>{try{w(n.throw(_))}catch(O){d(O)}},w=_=>_.done?l(_.value):Promise.resolve(_.value).then(v,p);w((n=n.apply(e,t)).next())});var F0=lr((VI,bC)=>{"use strict";var _C=Object.getOwnPropertySymbols,XM=Object.prototype.hasOwnProperty,QM=Object.prototype.propertyIsEnumerable;function ZM(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}o(ZM,"toObject");function JM(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var l=Object.getOwnPropertyNames(t).map(function(v){return t[v]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(v){d[v]=v}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch(v){return!1}}o(JM,"shouldUseNative");bC.exports=JM()?Object.assign:function(e,t){for(var n,l=ZM(e),d,v=1;v{"use strict";var I0=F0(),yc=60103,EC=60106;Ct.Fragment=60107;Ct.StrictMode=60108;Ct.Profiler=60114;var TC=60109,kC=60110,OC=60112;Ct.Suspense=60113;var LC=60115,NC=60116;typeof Symbol=="function"&&Symbol.for&&(yo=Symbol.for,yc=yo("react.element"),EC=yo("react.portal"),Ct.Fragment=yo("react.fragment"),Ct.StrictMode=yo("react.strict_mode"),Ct.Profiler=yo("react.profiler"),TC=yo("react.provider"),kC=yo("react.context"),OC=yo("react.forward_ref"),Ct.Suspense=yo("react.suspense"),LC=yo("react.memo"),NC=yo("react.lazy"));var yo,PC=typeof Symbol=="function"&&Symbol.iterator;function eA(e){return e===null||typeof e!="object"?null:(e=PC&&e[PC]||e["@@iterator"],typeof e=="function"?e:null)}o(eA,"y");function yd(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n{"use strict";UC.exports=BC()});var KC=lr(Mt=>{"use strict";var xc,wd,sv,j0;typeof performance=="object"&&typeof performance.now=="function"?(zC=performance,Mt.unstable_now=function(){return zC.now()}):($0=Date,jC=$0.now(),Mt.unstable_now=function(){return $0.now()-jC});var zC,$0,jC;typeof window=="undefined"||typeof MessageChannel!="function"?(Sc=null,q0=null,V0=o(function(){if(Sc!==null)try{var e=Mt.unstable_now();Sc(!0,e),Sc=null}catch(t){throw setTimeout(V0,0),t}},"w"),xc=o(function(e){Sc!==null?setTimeout(xc,0,e):(Sc=e,setTimeout(V0,0))},"f"),wd=o(function(e,t){q0=setTimeout(e,t)},"g"),sv=o(function(){clearTimeout(q0)},"h"),Mt.unstable_shouldYield=function(){return!1},j0=Mt.unstable_forceFrameRate=function(){}):($C=window.setTimeout,qC=window.clearTimeout,typeof console!="undefined"&&(VC=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof VC!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),xd=!1,Sd=null,lv=-1,K0=5,G0=0,Mt.unstable_shouldYield=function(){return Mt.unstable_now()>=G0},j0=o(function(){},"k"),Mt.unstable_forceFrameRate=function(e){0>e||125>>1,d=e[l];if(d!==void 0&&0fv(p,n))_!==void 0&&0>fv(_,p)?(e[l]=_,e[w]=n,l=w):(e[l]=p,e[v]=n,l=v);else if(_!==void 0&&0>fv(_,n))e[l]=_,e[w]=n,l=w;else break e}}return t}return null}o(uv,"K");function fv(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}o(fv,"I");var Is=[],La=[],oA=1,wo=null,$n=3,cv=!1,$u=!1,Cd=!1;function Q0(e){for(var t=Qo(La);t!==null;){if(t.callback===null)uv(La);else if(t.startTime<=e)uv(La),t.sortIndex=t.expirationTime,X0(Is,t);else break;t=Qo(La)}}o(Q0,"T");function Z0(e){if(Cd=!1,Q0(e),!$u)if(Qo(Is)!==null)$u=!0,xc(J0);else{var t=Qo(La);t!==null&&wd(Z0,t.startTime-e)}}o(Z0,"U");function J0(e,t){$u=!1,Cd&&(Cd=!1,sv()),cv=!0;var n=$n;try{for(Q0(t),wo=Qo(Is);wo!==null&&(!(wo.expirationTime>t)||e&&!Mt.unstable_shouldYield());){var l=wo.callback;if(typeof l=="function"){wo.callback=null,$n=wo.priorityLevel;var d=l(wo.expirationTime<=t);t=Mt.unstable_now(),typeof d=="function"?wo.callback=d:wo===Qo(Is)&&uv(Is),Q0(t)}else uv(Is);wo=Qo(Is)}if(wo!==null)var v=!0;else{var p=Qo(La);p!==null&&wd(Z0,p.startTime-t),v=!1}return v}finally{wo=null,$n=n,cv=!1}}o(J0,"V");var sA=j0;Mt.unstable_IdlePriority=5;Mt.unstable_ImmediatePriority=1;Mt.unstable_LowPriority=4;Mt.unstable_NormalPriority=3;Mt.unstable_Profiling=null;Mt.unstable_UserBlockingPriority=2;Mt.unstable_cancelCallback=function(e){e.callback=null};Mt.unstable_continueExecution=function(){$u||cv||($u=!0,xc(J0))};Mt.unstable_getCurrentPriorityLevel=function(){return $n};Mt.unstable_getFirstCallbackNode=function(){return Qo(Is)};Mt.unstable_next=function(e){switch($n){case 1:case 2:case 3:var t=3;break;default:t=$n}var n=$n;$n=t;try{return e()}finally{$n=n}};Mt.unstable_pauseExecution=function(){};Mt.unstable_requestPaint=sA;Mt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=$n;$n=e;try{return t()}finally{$n=n}};Mt.unstable_scheduleCallback=function(e,t,n){var l=Mt.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0l?(e.sortIndex=n,X0(La,e),Qo(Is)===null&&e===Qo(La)&&(Cd?sv():Cd=!0,wd(Z0,n-l))):(e.sortIndex=d,X0(Is,e),$u||cv||($u=!0,xc(J0))),e};Mt.unstable_wrapCallback=function(e){var t=$n;return function(){var n=$n;$n=t;try{return e.apply(this,arguments)}finally{$n=n}}}});var YC=lr((XI,GC)=>{"use strict";GC.exports=KC()});var RE=lr(Eo=>{"use strict";var pv=Re(),ar=F0(),yn=YC();function ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}o(fA,"na");function ai(e,t,n,l,d,v,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=v,this.removeEmptyString=p}o(ai,"B");var Ln={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ln[e]=new ai(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ln[t]=new ai(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ln[e]=new ai(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ln[e]=new ai(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){Ln[e]=new ai(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ln[e]=new ai(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ln[e]=new ai(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ln[e]=new ai(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ln[e]=new ai(e,5,!1,e.toLowerCase(),null,!1,!1)});var ew=/[\-:]([a-z])/g;function tw(e){return e[1].toUpperCase()}o(tw,"pa");"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(ew,tw);Ln[t]=new ai(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(ew,tw);Ln[t]=new ai(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(ew,tw);Ln[t]=new ai(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ln[e]=new ai(e,1,!1,e.toLowerCase(),null,!1,!1)});Ln.xlinkHref=new ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ln[e]=new ai(e,1,!1,e.toLowerCase(),null,!0,!0)});function rw(e,t,n,l){var d=Ln.hasOwnProperty(t)?Ln[t]:null,v=d!==null?d.type===0:l?!1:!(!(2y||d[p]!==v[y])return` -`+d[p].replace(" at new "," at ");while(1<=p&&0<=y);break}}}finally{cw=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?Od(e):""}o(gv,"Pa");function aA(e){switch(e.tag){case 5:return Od(e.type);case 16:return Od("Lazy");case 13:return Od("Suspense");case 19:return Od("SuspenseList");case 0:case 2:case 15:return e=gv(e.type,!1),e;case 11:return e=gv(e.type.render,!1),e;case 22:return e=gv(e.type._render,!1),e;case 1:return e=gv(e.type,!0),e;default:return""}}o(aA,"Qa");function bc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Da:return"Fragment";case Yu:return"Portal";case bd:return"Profiler";case rw:return"StrictMode";case Td:return"Suspense";case mv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iw:return(e.displayName||"Context")+".Consumer";case nw:return(e._context.displayName||"Context")+".Provider";case hv:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case vv:return bc(e.type);case sw:return bc(e._render);case ow:t=e._payload,e=e._init;try{return bc(e(t))}catch(i){}}return null}o(bc,"Ra");function Ra(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}o(Ra,"Sa");function XC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}o(XC,"Ta");function uA(e){var t=XC(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof i!="undefined"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,v=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(p){l=""+p,v.call(this,p)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}o(uA,"Ua");function yv(e){e._valueTracker||(e._valueTracker=uA(e))}o(yv,"Va");function QC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=XC(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}o(QC,"Wa");function wv(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}o(wv,"Xa");function pw(e,t){var i=t.checked;return cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}o(pw,"Ya");function ZC(e,t){var i=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;i=Ra(t.value!=null?t.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}o(ZC,"Za");function JC(e,t){t=t.checked,t!=null&&tw(e,"checked",t,!1)}o(JC,"$a");function dw(e,t){JC(e,t);var i=Ra(t.value),l=t.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hw(e,t.type,i):t.hasOwnProperty("defaultValue")&&hw(e,t.type,Ra(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}o(dw,"ab");function e_(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}o(e_,"cb");function hw(e,t,i){(t!=="number"||wv(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}o(hw,"bb");function fA(e){var t="";return dv.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}o(fA,"db");function mw(e,t){return e=cr({children:void 0},t),(t=fA(t.children))&&(e.children=t),e}o(mw,"eb");function Tc(e,t,i,l){if(e=e.options,t){t={};for(var d=0;d=i.length))throw Error(ye(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Ra(i)}}o(t_,"hb");function r_(e,t){var i=Ra(t.value),l=Ra(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),l!=null&&(e.defaultValue=""+l)}o(r_,"ib");function n_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}o(n_,"jb");var gw={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function i_(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"}}o(i_,"lb");function yw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?i_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}o(yw,"mb");var xv,o_=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,i,l,d){MSApp.execUnsafeLocalFunction(function(){return e(t,i,l,d)})}:e}(function(e,t){if(e.namespaceURI!==gw.svg||"innerHTML"in e)e.innerHTML=t;else{for(xv=xv||document.createElement("div"),xv.innerHTML=""+t.valueOf().toString()+"",t=xv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ld(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}o(Ld,"pb");var Nd={animationIterationCount:!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},cA=["Webkit","ms","Moz","O"];Object.keys(Nd).forEach(function(e){cA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nd[t]=Nd[e]})});function s_(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Nd.hasOwnProperty(e)&&Nd[e]?(""+t).trim():t+"px"}o(s_,"sb");function l_(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var l=i.indexOf("--")===0,d=s_(i,t[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,d):e[i]=d}}o(l_,"tb");var pA=cr({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 ww(e,t){if(t){if(pA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ye(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ye(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(ye(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ye(62))}}o(ww,"vb");function xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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}}o(xw,"wb");function Sw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}o(Sw,"xb");var Cw=null,kc=null,Oc=null;function a_(e){if(e=Gd(e)){if(typeof Cw!="function")throw Error(ye(280));var t=e.stateNode;t&&(t=Uv(t),Cw(e.stateNode,e.type,t))}}o(a_,"Bb");function u_(e){kc?Oc?Oc.push(e):Oc=[e]:kc=e}o(u_,"Eb");function f_(){if(kc){var e=kc,t=Oc;if(Oc=kc=null,a_(e),t)for(e=0;el?0:1<i;i++)t.push(e);return t}o(Rw,"Zc");function kv(e,t,i){e.pendingLanes|=t;var l=t-1;e.suspendedLanes&=l,e.pingedLanes&=l,e=e.eventTimes,t=31-Wa(t),e[t]=i}o(kv,"$c");var Wa=Math.clz32?Math.clz32:OA,TA=Math.log,kA=Math.LN2;function OA(e){return e===0?32:31-(TA(e)/kA|0)|0}o(OA,"ad");var LA=Sn.unstable_UserBlockingPriority,NA=Sn.unstable_runWithPriority,Ov=!0;function PA(e,t,i,l){Xu||Ew();var d=Fw,v=Xu;Xu=!0;try{c_(d,e,t,i,l)}finally{(Xu=v)||Tw()}}o(PA,"gd");function MA(e,t,i,l){NA(LA,Fw.bind(null,e,t,i,l))}o(MA,"id");function Fw(e,t,i,l){if(Ov){var d;if((d=(t&4)==0)&&0<$s.length&&-1=Ud),I_=String.fromCharCode(32),H_=!1;function W_(e,t){switch(e){case"keyup":return tD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}o(W_,"ge");function B_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}o(B_,"he");var Dc=!1;function nD(e,t){switch(e){case"compositionend":return B_(t);case"keypress":return t.which!==32?null:(H_=!0,I_);case"textInput":return e=t.data,e===I_&&H_?null:e;default:return null}}o(nD,"je");function iD(e,t){if(Dc)return e==="compositionend"||!jw&&W_(e,t)?(e=P_(),Lv=Hw=Ba=null,Dc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=V_(i)}}o(K_,"Le");function G_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?G_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}o(G_,"Me");function Y_(){for(var e=window,t=wv();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch(l){i=!1}if(i)e=t.contentWindow;else break;t=wv(e.document)}return t}o(Y_,"Ne");function Vw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}o(Vw,"Oe");var hD=Nl&&"documentMode"in document&&11>=document.documentMode,Rc=null,Kw=null,qd=null,Gw=!1;function X_(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Gw||Rc==null||Rc!==wv(l)||(l=Rc,"selectionStart"in l&&Vw(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qd&&jd(qd,l)||(qd=l,l=Iv(Kw,"onSelect"),0Bc||(e.current=t1[Bc],t1[Bc]=null,Bc--)}o(or,"H");function Cr(e,t){Bc++,t1[Bc]=e.current,e.current=t}o(Cr,"I");var $a={},Gn=za($a),Pi=za(!1),Ju=$a;function Uc(e,t){var i=e.type.contextTypes;if(!i)return $a;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var d={},v;for(v in i)d[v]=t[v];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=d),d}o(Uc,"Ef");function Mi(e){return e=e.childContextTypes,e!=null}o(Mi,"Ff");function zv(){or(Pi),or(Gn)}o(zv,"Gf");function cE(e,t,i){if(Gn.current!==$a)throw Error(ye(168));Cr(Gn,t),Cr(Pi,i)}o(cE,"Hf");function pE(e,t,i){var l=e.stateNode;if(e=t.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var d in l)if(!(d in e))throw Error(ye(108,bc(t)||"Unknown",d));return cr({},i,l)}o(pE,"If");function $v(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$a,Ju=Gn.current,Cr(Gn,e),Cr(Pi,Pi.current),!0}o($v,"Jf");function dE(e,t,i){var l=e.stateNode;if(!l)throw Error(ye(169));i?(e=pE(e,t,Ju),l.__reactInternalMemoizedMergedChildContext=e,or(Pi),or(Gn),Cr(Gn,e)):or(Pi),Cr(Pi,i)}o(dE,"Kf");var r1=null,ef=null,gD=Sn.unstable_runWithPriority,n1=Sn.unstable_scheduleCallback,i1=Sn.unstable_cancelCallback,yD=Sn.unstable_shouldYield,hE=Sn.unstable_requestPaint,o1=Sn.unstable_now,wD=Sn.unstable_getCurrentPriorityLevel,jv=Sn.unstable_ImmediatePriority,mE=Sn.unstable_UserBlockingPriority,vE=Sn.unstable_NormalPriority,gE=Sn.unstable_LowPriority,yE=Sn.unstable_IdlePriority,s1={},xD=hE!==void 0?hE:function(){},Pl=null,qv=null,l1=!1,wE=o1(),Yn=1e4>wE?o1:function(){return o1()-wE};function zc(){switch(wD()){case jv:return 99;case mE:return 98;case vE:return 97;case gE:return 96;case yE:return 95;default:throw Error(ye(332))}}o(zc,"eg");function xE(e){switch(e){case 99:return jv;case 98:return mE;case 97:return vE;case 96:return gE;case 95:return yE;default:throw Error(ye(332))}}o(xE,"fg");function tf(e,t){return e=xE(e),gD(e,t)}o(tf,"gg");function Yd(e,t,i){return e=xE(e),n1(e,t,i)}o(Yd,"hg");function js(){if(qv!==null){var e=qv;qv=null,i1(e)}SE()}o(js,"ig");function SE(){if(!l1&&Pl!==null){l1=!0;var e=0;try{var t=Pl;tf(99,function(){for(;ede?(ge=ie,ie=null):ge=ie.sibling;var we=B(R,ie,F[de],K);if(we===null){ie===null&&(ie=ge);break}e&&ie&&we.alternate===null&&t(R,ie),P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we,ie=ge}if(de===F.length)return i(R,ie),V;if(ie===null){for(;dede?(ge=ie,ie=null):ge=ie.sibling;var qe=B(R,ie,we.value,K);if(qe===null){ie===null&&(ie=ge);break}e&&ie&&qe.alternate===null&&t(R,ie),P=v(qe,P,de),ue===null?V=qe:ue.sibling=qe,ue=qe,ie=ge}if(we.done)return i(R,ie),V;if(ie===null){for(;!we.done;de++,we=F.next())we=Y(R,we.value,K),we!==null&&(P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we);return V}for(ie=l(R,ie);!we.done;de++,we=F.next())we=X(ie,R,de,we.value,K),we!==null&&(e&&we.alternate!==null&&ie.delete(we.key===null?de:we.key),P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we);return e&&ie.forEach(function(Je){return t(R,Je)}),V}return o(Q,"w"),function(R,P,F,K){var V=typeof F=="object"&&F!==null&&F.type===Da&&F.key===null;V&&(F=F.props.children);var ue=typeof F=="object"&&F!==null;if(ue)switch(F.$$typeof){case Ed:e:{for(ue=F.key,V=P;V!==null;){if(V.key===ue){switch(V.tag){case 7:if(F.type===Da){i(R,V.sibling),P=d(V,F.props.children),P.return=R,R=P;break e}break;default:if(V.elementType===F.type){i(R,V.sibling),P=d(V,F.props),P.ref=Qd(R,V,F),P.return=R,R=P;break e}}i(R,V);break}else t(R,V);V=V.sibling}F.type===Da?(P=Zc(F.props.children,R.mode,K,F.key),P.return=R,R=P):(K=vg(F.type,F.key,F.props,null,R.mode,K),K.ref=Qd(R,P,F),K.return=R,R=K)}return p(R);case Yu:e:{for(V=F.key;P!==null;){if(P.key===V)if(P.tag===4&&P.stateNode.containerInfo===F.containerInfo&&P.stateNode.implementation===F.implementation){i(R,P.sibling),P=d(P,F.children||[]),P.return=R,R=P;break e}else{i(R,P);break}else t(R,P);P=P.sibling}P=G1(F,R.mode,K),P.return=R,R=P}return p(R)}if(typeof F=="string"||typeof F=="number")return F=""+F,P!==null&&P.tag===6?(i(R,P.sibling),P=d(P,F),P.return=R,R=P):(i(R,P),P=K1(F,R.mode,K),P.return=R,R=P),p(R);if(Qv(F))return te(R,P,F,K);if(kd(F))return Q(R,P,F,K);if(ue&&Zv(R,F),typeof F=="undefined"&&!V)switch(R.tag){case 1:case 22:case 0:case 11:case 15:throw Error(ye(152,bc(R.type)||"Component"))}return i(R,P)}}o(NE,"Sg");var Jv=NE(!0),PE=NE(!1),Zd={},qs=za(Zd),Jd=za(Zd),eh=za(Zd);function rf(e){if(e===Zd)throw Error(ye(174));return e}o(rf,"dh");function p1(e,t){switch(Cr(eh,t),Cr(Jd,e),Cr(qs,Zd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yw(t,e)}or(qs),Cr(qs,t)}o(p1,"eh");function qc(){or(qs),or(Jd),or(eh)}o(qc,"fh");function ME(e){rf(eh.current);var t=rf(qs.current),i=yw(t,e.type);t!==i&&(Cr(Jd,e),Cr(qs,i))}o(ME,"gh");function d1(e){Jd.current===e&&(or(qs),or(Jd))}o(d1,"hh");var _r=za(0);function eg(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&64)!=0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}o(eg,"ih");var Ml=null,Ka=null,Vs=!1;function AE(e,t){var i=To(5,null,null,0);i.elementType="DELETED",i.type="DELETED",i.stateNode=t,i.return=e,i.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=i,e.lastEffect=i):e.firstEffect=e.lastEffect=i}o(AE,"mh");function DE(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}o(DE,"oh");function h1(e){if(Vs){var t=Ka;if(t){var i=t;if(!DE(e,t)){if(t=Ic(i.nextSibling),!t||!DE(e,t)){e.flags=e.flags&-1025|2,Vs=!1,Ml=e;return}AE(Ml,i)}Ml=e,Ka=Ic(t.firstChild)}else e.flags=e.flags&-1025|2,Vs=!1,Ml=e}}o(h1,"ph");function RE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ml=e}o(RE,"qh");function tg(e){if(e!==Ml)return!1;if(!Vs)return RE(e),Vs=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Zw(t,e.memoizedProps))for(t=Ka;t;)AE(e,t),t=Ic(t.nextSibling);if(RE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ye(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){Ka=Ic(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}Ka=null}}else Ka=Ml?Ic(e.stateNode.nextSibling):null;return!0}o(tg,"rh");function m1(){Ka=Ml=null,Vs=!1}o(m1,"sh");var Vc=[];function v1(){for(var e=0;ev))throw Error(ye(301));v+=1,An=Xn=null,t.updateQueue=null,th.current=bD,e=i(l,d)}while(nh)}if(th.current=sg,t=Xn!==null&&Xn.next!==null,rh=0,An=Xn=Dr=null,rg=!1,t)throw Error(ye(300));return e}o(y1,"Ch");function nf(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return An===null?Dr.memoizedState=An=e:An=An.next=e,An}o(nf,"Hh");function of(){if(Xn===null){var e=Dr.alternate;e=e!==null?e.memoizedState:null}else e=Xn.next;var t=An===null?Dr.memoizedState:An.next;if(t!==null)An=t,Xn=e;else{if(e===null)throw Error(ye(310));Xn=e,e={memoizedState:Xn.memoizedState,baseState:Xn.baseState,baseQueue:Xn.baseQueue,queue:Xn.queue,next:null},An===null?Dr.memoizedState=An=e:An=An.next=e}return An}o(of,"Ih");function Ks(e,t){return typeof t=="function"?t(e):t}o(Ks,"Jh");function ih(e){var t=of(),i=t.queue;if(i===null)throw Error(ye(311));i.lastRenderedReducer=e;var l=Xn,d=l.baseQueue,v=i.pending;if(v!==null){if(d!==null){var p=d.next;d.next=v.next,v.next=p}l.baseQueue=d=v,i.pending=null}if(d!==null){d=d.next,l=l.baseState;var y=p=v=null,_=d;do{var O=_.lane;if((rh&O)===O)y!==null&&(y=y.next={lane:0,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null}),l=_.eagerReducer===e?_.eagerState:e(l,_.action);else{var D={lane:O,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null};y===null?(p=y=D,v=l):y=y.next=D,Dr.lanes|=O,ah|=O}_=_.next}while(_!==null&&_!==d);y===null?v=l:y.next=p,Co(l,t.memoizedState)||(ns=!0),t.memoizedState=l,t.baseState=v,t.baseQueue=y,i.lastRenderedState=l}return[t.memoizedState,i.dispatch]}o(ih,"Kh");function oh(e){var t=of(),i=t.queue;if(i===null)throw Error(ye(311));i.lastRenderedReducer=e;var l=i.dispatch,d=i.pending,v=t.memoizedState;if(d!==null){i.pending=null;var p=d=d.next;do v=e(v,p.action),p=p.next;while(p!==d);Co(v,t.memoizedState)||(ns=!0),t.memoizedState=v,t.baseQueue===null&&(t.baseState=v),i.lastRenderedState=v}return[v,l]}o(oh,"Lh");function FE(e,t,i){var l=t._getVersion;l=l(t._source);var d=t._workInProgressVersionPrimary;if(d!==null?e=d===l:(e=e.mutableReadLanes,(e=(rh&e)===e)&&(t._workInProgressVersionPrimary=l,Vc.push(t))),e)return i(t._source);throw Vc.push(t),Error(ye(350))}o(FE,"Mh");function IE(e,t,i,l){var d=di;if(d===null)throw Error(ye(349));var v=t._getVersion,p=v(t._source),y=th.current,_=y.useState(function(){return FE(d,t,i)}),O=_[1],D=_[0];_=An;var Y=e.memoizedState,B=Y.refs,X=B.getSnapshot,te=Y.source;Y=Y.subscribe;var Q=Dr;return e.memoizedState={refs:B,source:t,subscribe:l},y.useEffect(function(){B.getSnapshot=i,B.setSnapshot=O;var R=v(t._source);if(!Co(p,R)){R=i(t._source),Co(D,R)||(O(R),R=Ya(Q),d.mutableReadLanes|=R&d.pendingLanes),R=d.mutableReadLanes,d.entangledLanes|=R;for(var P=d.entanglements,F=R;0i?98:i,function(){e(!0)}),tf(97<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=p.createElement(i,{is:l.is}):(e=p.createElement(i),i==="select"&&(p=e,l.multiple?p.multiple=!0:l.size&&(p.size=l.size))):e=p.createElementNS(e,i),e[Ua]=t,e[Bv]=l,ib(e,t,!1,!1),t.stateNode=e,p=xw(i,l),i){case"dialog":ir("cancel",e),ir("close",e),d=l;break;case"iframe":case"object":case"embed":ir("load",e),d=l;break;case"video":case"audio":for(d=0;dH1&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432)}else{if(!v)if(e=eg(p),e!==null){if(t.flags|=64,v=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),lh(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Vs)return t=t.lastEffect=l.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Yn()-l.renderingStartTime>H1&&i!==1073741824&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432);l.isBackwards?(p.sibling=t.child,t.child=p):(i=l.last,i!==null?i.sibling=p:t.child=p,l.last=p)}return l.tail!==null?(i=l.tail,l.rendering=i,l.tail=i.sibling,l.lastEffect=t.lastEffect,l.renderingStartTime=Yn(),i.sibling=null,t=_r.current,Cr(_r,v?t&1|2:t&1),i):null;case 23:case 24:return j1(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&l.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(ye(156,t.tag))}o(kD,"Gi");function OD(e){switch(e.tag){case 1:Mi(e.type)&&zv();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(qc(),or(Pi),or(Gn),v1(),t=e.flags,(t&64)!=0)throw Error(ye(285));return e.flags=t&-4097|64,e;case 5:return d1(e),null;case 13:return or(_r),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return or(_r),null;case 4:return qc(),null;case 10:return u1(e),null;case 23:case 24:return j1(),null;default:return null}}o(OD,"Li");function O1(e,t){try{var i="",l=t;do i+=aA(l),l=l.return;while(l);var d=i}catch(v){d=` +`),p=d.length-1,w=v.length-1;1<=p&&0<=w&&d[p]!==v[w];)w--;for(;1<=p&&0<=w;p--,w--)if(d[p]!==v[w]){if(p!==1||w!==1)do if(p--,w--,0>w||d[p]!==v[w])return` +`+d[p].replace(" at new "," at ");while(1<=p&&0<=w);break}}}finally{pw=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Od(e):""}o(vv,"Pa");function cA(e){switch(e.tag){case 5:return Od(e.type);case 16:return Od("Lazy");case 13:return Od("Suspense");case 19:return Od("SuspenseList");case 0:case 2:case 15:return e=vv(e.type,!1),e;case 11:return e=vv(e.type.render,!1),e;case 22:return e=vv(e.type._render,!1),e;case 1:return e=vv(e.type,!0),e;default:return""}}o(cA,"Qa");function _c(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Na:return"Fragment";case Ku:return"Portal";case Ed:return"Profiler";case nw:return"StrictMode";case Td:return"Suspense";case hv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ow:return(e.displayName||"Context")+".Consumer";case iw:return(e._context.displayName||"Context")+".Provider";case dv:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case mv:return _c(e.type);case lw:return _c(e._render);case sw:t=e._payload,e=e._init;try{return _c(e(t))}catch(n){}}return null}o(_c,"Ra");function Pa(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}o(Pa,"Sa");function r_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}o(r_,"Ta");function pA(e){var t=r_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var d=n.get,v=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(p){l=""+p,v.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}o(pA,"Ua");function gv(e){e._valueTracker||(e._valueTracker=pA(e))}o(gv,"Va");function n_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=r_(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}o(n_,"Wa");function yv(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}o(yv,"Xa");function dw(e,t){var n=t.checked;return ar({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}o(dw,"Ya");function i_(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=Pa(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}o(i_,"Za");function o_(e,t){t=t.checked,t!=null&&rw(e,"checked",t,!1)}o(o_,"$a");function hw(e,t){o_(e,t);var n=Pa(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mw(e,t.type,n):t.hasOwnProperty("defaultValue")&&mw(e,t.type,Pa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}o(hw,"ab");function s_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}o(s_,"cb");function mw(e,t,n){(t!=="number"||yv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}o(mw,"bb");function dA(e){var t="";return pv.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}o(dA,"db");function vw(e,t){return e=ar({children:void 0},t),(t=dA(t.children))&&(e.children=t),e}o(vw,"eb");function bc(e,t,n,l){if(e=e.options,t){t={};for(var d=0;d=n.length))throw Error(ye(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pa(n)}}o(l_,"hb");function a_(e,t){var n=Pa(t.value),l=Pa(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),l!=null&&(e.defaultValue=""+l)}o(a_,"ib");function u_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}o(u_,"jb");var yw={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function f_(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"}}o(f_,"lb");function ww(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?f_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}o(ww,"mb");var wv,c_=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,l,d){MSApp.execUnsafeLocalFunction(function(){return e(t,n,l,d)})}:e}(function(e,t){if(e.namespaceURI!==yw.svg||"innerHTML"in e)e.innerHTML=t;else{for(wv=wv||document.createElement("div"),wv.innerHTML=""+t.valueOf().toString()+"",t=wv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ld(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}o(Ld,"pb");var Nd={animationIterationCount:!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},hA=["Webkit","ms","Moz","O"];Object.keys(Nd).forEach(function(e){hA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nd[t]=Nd[e]})});function p_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nd.hasOwnProperty(e)&&Nd[e]?(""+t).trim():t+"px"}o(p_,"sb");function d_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,d=p_(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,d):e[n]=d}}o(d_,"tb");var mA=ar({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 xw(e,t){if(t){if(mA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ye(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ye(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(ye(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ye(62))}}o(xw,"vb");function Sw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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}}o(Sw,"wb");function Cw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}o(Cw,"xb");var _w=null,Ec=null,Tc=null;function h_(e){if(e=Gd(e)){if(typeof _w!="function")throw Error(ye(280));var t=e.stateNode;t&&(t=Bv(t),_w(e.stateNode,e.type,t))}}o(h_,"Bb");function m_(e){Ec?Tc?Tc.push(e):Tc=[e]:Ec=e}o(m_,"Eb");function v_(){if(Ec){var e=Ec,t=Tc;if(Tc=Ec=null,h_(e),t)for(e=0;el?0:1<n;n++)t.push(e);return t}o(Fw,"Zc");function Tv(e,t,n){e.pendingLanes|=t;var l=t-1;e.suspendedLanes&=l,e.pingedLanes&=l,e=e.eventTimes,t=31-Ra(t),e[t]=n}o(Tv,"$c");var Ra=Math.clz32?Math.clz32:PA,LA=Math.log,NA=Math.LN2;function PA(e){return e===0?32:31-(LA(e)/NA|0)|0}o(PA,"ad");var MA=yn.unstable_UserBlockingPriority,AA=yn.unstable_runWithPriority,kv=!0;function DA(e,t,n,l){Gu||Ew();var d=Iw,v=Gu;Gu=!0;try{g_(d,e,t,n,l)}finally{(Gu=v)||kw()}}o(DA,"gd");function RA(e,t,n,l){AA(MA,Iw.bind(null,e,t,n,l))}o(RA,"id");function Iw(e,t,n,l){if(kv){var d;if((d=(t&4)==0)&&0=Ud),j_=String.fromCharCode(32),$_=!1;function q_(e,t){switch(e){case"keyup":return iD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}o(q_,"ge");function V_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}o(V_,"he");var Mc=!1;function sD(e,t){switch(e){case"compositionend":return V_(t);case"keypress":return t.which!==32?null:($_=!0,j_);case"textInput":return e=t.data,e===j_&&$_?null:e;default:return null}}o(sD,"je");function lD(e,t){if(Mc)return e==="compositionend"||!qw&&q_(e,t)?(e=I_(),Ov=Ww=Fa=null,Mc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Z_(n)}}o(J_,"Le");function eb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}o(eb,"Me");function tb(){for(var e=window,t=yv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(l){n=!1}if(n)e=t.contentWindow;else break;t=yv(e.document)}return t}o(tb,"Ne");function Kw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}o(Kw,"Oe");var gD=kl&&"documentMode"in document&&11>=document.documentMode,Ac=null,Gw=null,qd=null,Yw=!1;function rb(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yw||Ac==null||Ac!==yv(l)||(l=Ac,"selectionStart"in l&&Kw(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qd&&$d(qd,l)||(qd=l,l=Fv(Gw,"onSelect"),0Hc||(e.current=r1[Hc],r1[Hc]=null,Hc--)}o(rr,"H");function xr(e,t){Hc++,r1[Hc]=e.current,e.current=t}o(xr,"I");var Wa={},qn=Ha(Wa),Li=Ha(!1),Qu=Wa;function Wc(e,t){var n=e.type.contextTypes;if(!n)return Wa;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var d={},v;for(v in n)d[v]=t[v];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=d),d}o(Wc,"Ef");function Ni(e){return e=e.childContextTypes,e!=null}o(Ni,"Ff");function Uv(){rr(Li),rr(qn)}o(Uv,"Gf");function gb(e,t,n){if(qn.current!==Wa)throw Error(ye(168));xr(qn,t),xr(Li,n)}o(gb,"Hf");function yb(e,t,n){var l=e.stateNode;if(e=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var d in l)if(!(d in e))throw Error(ye(108,_c(t)||"Unknown",d));return ar({},n,l)}o(yb,"If");function zv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wa,Qu=qn.current,xr(qn,e),xr(Li,Li.current),!0}o(zv,"Jf");function wb(e,t,n){var l=e.stateNode;if(!l)throw Error(ye(169));n?(e=yb(e,t,Qu),l.__reactInternalMemoizedMergedChildContext=e,rr(Li),rr(qn),xr(qn,e)):rr(Li),xr(Li,n)}o(wb,"Kf");var n1=null,Zu=null,xD=yn.unstable_runWithPriority,i1=yn.unstable_scheduleCallback,o1=yn.unstable_cancelCallback,SD=yn.unstable_shouldYield,xb=yn.unstable_requestPaint,s1=yn.unstable_now,CD=yn.unstable_getCurrentPriorityLevel,jv=yn.unstable_ImmediatePriority,Sb=yn.unstable_UserBlockingPriority,Cb=yn.unstable_NormalPriority,_b=yn.unstable_LowPriority,bb=yn.unstable_IdlePriority,l1={},_D=xb!==void 0?xb:function(){},Ol=null,$v=null,a1=!1,Eb=s1(),Vn=1e4>Eb?s1:function(){return s1()-Eb};function Bc(){switch(CD()){case jv:return 99;case Sb:return 98;case Cb:return 97;case _b:return 96;case bb:return 95;default:throw Error(ye(332))}}o(Bc,"eg");function Tb(e){switch(e){case 99:return jv;case 98:return Sb;case 97:return Cb;case 96:return _b;case 95:return bb;default:throw Error(ye(332))}}o(Tb,"fg");function Ju(e,t){return e=Tb(e),xD(e,t)}o(Ju,"gg");function Yd(e,t,n){return e=Tb(e),i1(e,t,n)}o(Yd,"hg");function Ws(){if($v!==null){var e=$v;$v=null,o1(e)}kb()}o(Ws,"ig");function kb(){if(!a1&&Ol!==null){a1=!0;var e=0;try{var t=Ol;Ju(99,function(){for(;ede?(ge=ie,ie=null):ge=ie.sibling;var we=W(R,ie,F[de],K);if(we===null){ie===null&&(ie=ge);break}e&&ie&&we.alternate===null&&t(R,ie),P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we,ie=ge}if(de===F.length)return n(R,ie),V;if(ie===null){for(;dede?(ge=ie,ie=null):ge=ie.sibling;var qe=W(R,ie,we.value,K);if(qe===null){ie===null&&(ie=ge);break}e&&ie&&qe.alternate===null&&t(R,ie),P=v(qe,P,de),ue===null?V=qe:ue.sibling=qe,ue=qe,ie=ge}if(we.done)return n(R,ie),V;if(ie===null){for(;!we.done;de++,we=F.next())we=Y(R,we.value,K),we!==null&&(P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we);return V}for(ie=l(R,ie);!we.done;de++,we=F.next())we=X(ie,R,de,we.value,K),we!==null&&(e&&we.alternate!==null&&ie.delete(we.key===null?de:we.key),P=v(we,P,de),ue===null?V=we:ue.sibling=we,ue=we);return e&&ie.forEach(function(Je){return t(R,Je)}),V}return o(Q,"w"),function(R,P,F,K){var V=typeof F=="object"&&F!==null&&F.type===Na&&F.key===null;V&&(F=F.props.children);var ue=typeof F=="object"&&F!==null;if(ue)switch(F.$$typeof){case bd:e:{for(ue=F.key,V=P;V!==null;){if(V.key===ue){switch(V.tag){case 7:if(F.type===Na){n(R,V.sibling),P=d(V,F.props.children),P.return=R,R=P;break e}break;default:if(V.elementType===F.type){n(R,V.sibling),P=d(V,F.props),P.ref=Qd(R,V,F),P.return=R,R=P;break e}}n(R,V);break}else t(R,V);V=V.sibling}F.type===Na?(P=Xc(F.props.children,R.mode,K,F.key),P.return=R,R=P):(K=mg(F.type,F.key,F.props,null,R.mode,K),K.ref=Qd(R,P,F),K.return=R,R=K)}return p(R);case Ku:e:{for(V=F.key;P!==null;){if(P.key===V)if(P.tag===4&&P.stateNode.containerInfo===F.containerInfo&&P.stateNode.implementation===F.implementation){n(R,P.sibling),P=d(P,F.children||[]),P.return=R,R=P;break e}else{n(R,P);break}else t(R,P);P=P.sibling}P=Y1(F,R.mode,K),P.return=R,R=P}return p(R)}if(typeof F=="string"||typeof F=="number")return F=""+F,P!==null&&P.tag===6?(n(R,P.sibling),P=d(P,F),P.return=R,R=P):(n(R,P),P=G1(F,R.mode,K),P.return=R,R=P),p(R);if(Xv(F))return te(R,P,F,K);if(kd(F))return Q(R,P,F,K);if(ue&&Qv(R,F),typeof F=="undefined"&&!V)switch(R.tag){case 1:case 22:case 0:case 11:case 15:throw Error(ye(152,_c(R.type)||"Component"))}return n(R,P)}}o(Fb,"Sg");var Zv=Fb(!0),Ib=Fb(!1),Zd={},Bs=Ha(Zd),Jd=Ha(Zd),eh=Ha(Zd);function ef(e){if(e===Zd)throw Error(ye(174));return e}o(ef,"dh");function d1(e,t){switch(xr(eh,t),xr(Jd,e),xr(Bs,Zd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ww(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ww(t,e)}rr(Bs),xr(Bs,t)}o(d1,"eh");function jc(){rr(Bs),rr(Jd),rr(eh)}o(jc,"fh");function Hb(e){ef(eh.current);var t=ef(Bs.current),n=ww(t,e.type);t!==n&&(xr(Jd,e),xr(Bs,n))}o(Hb,"gh");function h1(e){Jd.current===e&&(rr(Bs),rr(Jd))}o(h1,"hh");var Sr=Ha(0);function Jv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&64)!=0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}o(Jv,"ih");var Ll=null,ja=null,Us=!1;function Wb(e,t){var n=bo(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}o(Wb,"mh");function Bb(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}o(Bb,"oh");function m1(e){if(Us){var t=ja;if(t){var n=t;if(!Bb(e,t)){if(t=Rc(n.nextSibling),!t||!Bb(e,t)){e.flags=e.flags&-1025|2,Us=!1,Ll=e;return}Wb(Ll,n)}Ll=e,ja=Rc(t.firstChild)}else e.flags=e.flags&-1025|2,Us=!1,Ll=e}}o(m1,"ph");function Ub(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ll=e}o(Ub,"qh");function eg(e){if(e!==Ll)return!1;if(!Us)return Ub(e),Us=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Jw(t,e.memoizedProps))for(t=ja;t;)Wb(e,t),t=Rc(t.nextSibling);if(Ub(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ye(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ja=Rc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ja=null}}else ja=Ll?Rc(e.stateNode.nextSibling):null;return!0}o(eg,"rh");function v1(){ja=Ll=null,Us=!1}o(v1,"sh");var $c=[];function g1(){for(var e=0;e<$c.length;e++)$c[e]._workInProgressVersionPrimary=null;$c.length=0}o(g1,"uh");var th=Vu.ReactCurrentDispatcher,Co=Vu.ReactCurrentBatchConfig,rh=0,Mr=null,Kn=null,Nn=null,tg=!1,nh=!1;function Pi(){throw Error(ye(321))}o(Pi,"Ah");function y1(e,t){if(t===null)return!1;for(var n=0;nv))throw Error(ye(301));v+=1,Nn=Kn=null,t.updateQueue=null,th.current=OD,e=n(l,d)}while(nh)}if(th.current=og,t=Kn!==null&&Kn.next!==null,rh=0,Nn=Kn=Mr=null,tg=!1,t)throw Error(ye(300));return e}o(w1,"Ch");function tf(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nn===null?Mr.memoizedState=Nn=e:Nn=Nn.next=e,Nn}o(tf,"Hh");function rf(){if(Kn===null){var e=Mr.alternate;e=e!==null?e.memoizedState:null}else e=Kn.next;var t=Nn===null?Mr.memoizedState:Nn.next;if(t!==null)Nn=t,Kn=e;else{if(e===null)throw Error(ye(310));Kn=e,e={memoizedState:Kn.memoizedState,baseState:Kn.baseState,baseQueue:Kn.baseQueue,queue:Kn.queue,next:null},Nn===null?Mr.memoizedState=Nn=e:Nn=Nn.next=e}return Nn}o(rf,"Ih");function zs(e,t){return typeof t=="function"?t(e):t}o(zs,"Jh");function ih(e){var t=rf(),n=t.queue;if(n===null)throw Error(ye(311));n.lastRenderedReducer=e;var l=Kn,d=l.baseQueue,v=n.pending;if(v!==null){if(d!==null){var p=d.next;d.next=v.next,v.next=p}l.baseQueue=d=v,n.pending=null}if(d!==null){d=d.next,l=l.baseState;var w=p=v=null,_=d;do{var O=_.lane;if((rh&O)===O)w!==null&&(w=w.next={lane:0,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null}),l=_.eagerReducer===e?_.eagerState:e(l,_.action);else{var D={lane:O,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null};w===null?(p=w=D,v=l):w=w.next=D,Mr.lanes|=O,ah|=O}_=_.next}while(_!==null&&_!==d);w===null?v=l:w.next=p,xo(l,t.memoizedState)||(Jo=!0),t.memoizedState=l,t.baseState=v,t.baseQueue=w,n.lastRenderedState=l}return[t.memoizedState,n.dispatch]}o(ih,"Kh");function oh(e){var t=rf(),n=t.queue;if(n===null)throw Error(ye(311));n.lastRenderedReducer=e;var l=n.dispatch,d=n.pending,v=t.memoizedState;if(d!==null){n.pending=null;var p=d=d.next;do v=e(v,p.action),p=p.next;while(p!==d);xo(v,t.memoizedState)||(Jo=!0),t.memoizedState=v,t.baseQueue===null&&(t.baseState=v),n.lastRenderedState=v}return[v,l]}o(oh,"Lh");function zb(e,t,n){var l=t._getVersion;l=l(t._source);var d=t._workInProgressVersionPrimary;if(d!==null?e=d===l:(e=e.mutableReadLanes,(e=(rh&e)===e)&&(t._workInProgressVersionPrimary=l,$c.push(t))),e)return n(t._source);throw $c.push(t),Error(ye(350))}o(zb,"Mh");function jb(e,t,n,l){var d=ui;if(d===null)throw Error(ye(349));var v=t._getVersion,p=v(t._source),w=th.current,_=w.useState(function(){return zb(d,t,n)}),O=_[1],D=_[0];_=Nn;var Y=e.memoizedState,W=Y.refs,X=W.getSnapshot,te=Y.source;Y=Y.subscribe;var Q=Mr;return e.memoizedState={refs:W,source:t,subscribe:l},w.useEffect(function(){W.getSnapshot=n,W.setSnapshot=O;var R=v(t._source);if(!xo(p,R)){R=n(t._source),xo(D,R)||(O(R),R=qa(Q),d.mutableReadLanes|=R&d.pendingLanes),R=d.mutableReadLanes,d.entangledLanes|=R;for(var P=d.entanglements,F=R;0n?98:n,function(){e(!0)}),Ju(97<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=p.createElement(n,{is:l.is}):(e=p.createElement(n),n==="select"&&(p=e,l.multiple?p.multiple=!0:l.size&&(p.size=l.size))):e=p.createElementNS(e,n),e[Ia]=t,e[Wv]=l,fE(e,t,!1,!1),t.stateNode=e,p=Sw(n,l),n){case"dialog":tr("cancel",e),tr("close",e),d=l;break;case"iframe":case"object":case"embed":tr("load",e),d=l;break;case"video":case"audio":for(d=0;dW1&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432)}else{if(!v)if(e=Jv(p),e!==null){if(t.flags|=64,v=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lh(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Us)return t=t.lastEffect=l.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Vn()-l.renderingStartTime>W1&&n!==1073741824&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432);l.isBackwards?(p.sibling=t.child,t.child=p):(n=l.last,n!==null?n.sibling=p:t.child=p,l.last=p)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.lastEffect=t.lastEffect,l.renderingStartTime=Vn(),n.sibling=null,t=Sr.current,xr(Sr,v?t&1|2:t&1),n):null;case 23:case 24:return q1(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&l.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(ye(156,t.tag))}o(ND,"Gi");function PD(e){switch(e.tag){case 1:Ni(e.type)&&Uv();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(jc(),rr(Li),rr(qn),g1(),t=e.flags,(t&64)!=0)throw Error(ye(285));return e.flags=t&-4097|64,e;case 5:return h1(e),null;case 13:return rr(Sr),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return rr(Sr),null;case 4:return jc(),null;case 10:return f1(e),null;case 23:case 24:return q1(),null;default:return null}}o(PD,"Li");function L1(e,t){try{var n="",l=t;do n+=cA(l),l=l.return;while(l);var d=n}catch(v){d=` Error generating stack: `+v.message+` -`+v.stack}return{value:e,source:t,stack:d}}o(O1,"Mi");function L1(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}o(L1,"Ni");var LD=typeof WeakMap=="function"?WeakMap:Map;function lb(e,t,i){i=qa(-1,i),i.tag=3,i.payload={element:null};var l=t.value;return i.callback=function(){fg||(fg=!0,W1=l),L1(e,t)},i}o(lb,"Pi");function ab(e,t,i){i=qa(-1,i),i.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var d=t.value;i.payload=function(){return L1(e,t),l(d)}}var v=e.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(i.callback=function(){typeof l!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this),L1(e,t));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),i}o(ab,"Si");var ND=typeof WeakSet=="function"?WeakSet:Set;function ub(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){Za(e,i)}else t.current=null}o(ub,"Vi");function PD(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var i=e.memoizedProps,l=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?i:rs(t.type,i),l),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Jw(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(ye(163))}o(PD,"Xi");function MD(e,t,i){switch(i.tag){case 0:case 11:case 15:case 22:if(t=i.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)==3){var l=e.create;e.destroy=l()}e=e.next}while(e!==t)}if(t=i.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var d=e;l=d.next,d=d.tag,(d&4)!=0&&(d&1)!=0&&(Eb(i,e),BD(i,e)),e=l}while(e!==t)}return;case 1:e=i.stateNode,i.flags&4&&(t===null?e.componentDidMount():(l=i.elementType===i.type?t.memoizedProps:rs(i.type,t.memoizedProps),e.componentDidUpdate(l,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=i.updateQueue,t!==null&&bE(i,t,e);return;case 3:if(t=i.updateQueue,t!==null){if(e=null,i.child!==null)switch(i.child.tag){case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}bE(i,t,e)}return;case 5:e=i.stateNode,t===null&&i.flags&4&&sE(i.type,i.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:i.memoizedState===null&&(i=i.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&__(i))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(ye(163))}o(MD,"Yi");function fb(e,t){for(var i=e;;){if(i.tag===5){var l=i.stateNode;if(t)l=l.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{l=i.stateNode;var d=i.memoizedProps.style;d=d!=null&&d.hasOwnProperty("display")?d.display:null,l.style.display=s_("display",d)}}else if(i.tag===6)i.stateNode.nodeValue=t?"":i.memoizedProps;else if((i.tag!==23&&i.tag!==24||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}o(fb,"aj");function cb(e,t){if(ef&&typeof ef.onCommitFiberUnmount=="function")try{ef.onCommitFiberUnmount(r1,t)}catch(v){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var i=e=e.next;do{var l=i,d=l.destroy;if(l=l.tag,d!==void 0)if((l&4)!=0)Eb(t,i);else{l=t;try{d()}catch(v){Za(l,v)}}i=i.next}while(i!==e)}break;case 1:if(ub(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(v){Za(t,v)}break;case 5:ub(t);break;case 4:mb(e,t)}}o(cb,"bj");function pb(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}o(pb,"dj");function db(e){return e.tag===5||e.tag===3||e.tag===4}o(db,"ej");function hb(e){e:{for(var t=e.return;t!==null;){if(db(t))break e;t=t.return}throw Error(ye(160))}var i=t;switch(t=i.stateNode,i.tag){case 5:var l=!1;break;case 3:t=t.containerInfo,l=!0;break;case 4:t=t.containerInfo,l=!0;break;default:throw Error(ye(161))}i.flags&16&&(Ld(t,""),i.flags&=-17);e:t:for(i=e;;){for(;i.sibling===null;){if(i.return===null||db(i.return)){i=null;break e}i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.flags&2)){i=i.stateNode;break e}}l?N1(e,i,t):P1(e,i,t)}o(hb,"fj");function N1(e,t,i){var l=e.tag,d=l===5||l===6;if(d)e=d?e.stateNode:e.stateNode.instance,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Hv));else if(l!==4&&(e=e.child,e!==null))for(N1(e,t,i),e=e.sibling;e!==null;)N1(e,t,i),e=e.sibling}o(N1,"gj");function P1(e,t,i){var l=e.tag,d=l===5||l===6;if(d)e=d?e.stateNode:e.stateNode.instance,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(P1(e,t,i),e=e.sibling;e!==null;)P1(e,t,i),e=e.sibling}o(P1,"hj");function mb(e,t){for(var i=t,l=!1,d,v;;){if(!l){l=i.return;e:for(;;){if(l===null)throw Error(ye(160));switch(d=l.stateNode,l.tag){case 5:v=!1;break e;case 3:d=d.containerInfo,v=!0;break e;case 4:d=d.containerInfo,v=!0;break e}l=l.return}l=!0}if(i.tag===5||i.tag===6){e:for(var p=e,y=i,_=y;;)if(cb(p,_),_.child!==null&&_.tag!==4)_.child.return=_,_=_.child;else{if(_===y)break e;for(;_.sibling===null;){if(_.return===null||_.return===y)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}v?(p=d,y=i.stateNode,p.nodeType===8?p.parentNode.removeChild(y):p.removeChild(y)):d.removeChild(i.stateNode)}else if(i.tag===4){if(i.child!==null){d=i.stateNode.containerInfo,v=!0,i.child.return=i,i=i.child;continue}}else if(cb(e,i),i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return,i.tag===4&&(l=!1)}i.sibling.return=i.return,i=i.sibling}}o(mb,"cj");function M1(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do(l.tag&3)==3&&(e=l.destroy,l.destroy=void 0,e!==void 0&&e()),l=l.next;while(l!==i)}return;case 1:return;case 5:if(i=t.stateNode,i!=null){l=t.memoizedProps;var d=e!==null?e.memoizedProps:l;e=t.type;var v=t.updateQueue;if(t.updateQueue=null,v!==null){for(i[Bv]=l,e==="input"&&l.type==="radio"&&l.name!=null&&JC(i,l),xw(e,d),t=xw(e,l),d=0;dd&&(d=p),i&=~v}if(i=d,i=Yn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*DD(i/1960))-i,10d&&(d=p),n&=~v}if(n=d,n=Vn()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ID(n/1960))-n,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Dn!==5&&(Dn=2),_=O1(_,y),B=p;do{switch(B.tag){case 3:v=_,B.flags|=4096,t&=-t,B.lanes|=t;var ue=lb(B,v,t);EE(B,ue);break e;case 1:v=_;var ie=B.type,de=B.stateNode;if((B.flags&64)==0&&(typeof ie.getDerivedStateFromError=="function"||de!==null&&typeof de.componentDidCatch=="function"&&(Gs===null||!Gs.has(de)))){B.flags|=4096,t&=-t,B.lanes|=t;var ge=ab(B,v,t);EE(B,ge);break e}}B=B.return}while(B!==null)}_b(i)}catch(we){t=we,nn===i&&i!==null&&(nn=i=i.return);continue}break}while(1)}o(xb,"Sj");function Sb(){var e=ag.current;return ag.current=sg,e===null?sg:e}o(Sb,"Pj");function dh(e,t){var i=Xe;Xe|=16;var l=Sb();di===e&&Qn===t||Qc(e,t);do try{FD();break}catch(d){xb(e,d)}while(1);if(a1(),Xe=i,ag.current=l,nn!==null)throw Error(ye(261));return di=null,Qn=0,Dn}o(dh,"Tj");function FD(){for(;nn!==null;)Cb(nn)}o(FD,"ak");function ID(){for(;nn!==null&&!yD();)Cb(nn)}o(ID,"Rj");function Cb(e){var t=Tb(e.alternate,e,sf);e.memoizedProps=e.pendingProps,t===null?_b(e):nn=t,A1.current=null}o(Cb,"bk");function _b(e){var t=e;do{var i=t.alternate;if(e=t.return,(t.flags&2048)==0){if(i=kD(i,t,sf),i!==null){nn=i;return}if(i=t,i.tag!==24&&i.tag!==23||i.memoizedState===null||(sf&1073741824)!=0||(i.mode&4)==0){for(var l=0,d=i.child;d!==null;)l|=d.lanes|d.childLanes,d=d.sibling;i.childLanes=l}e!==null&&(e.flags&2048)==0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1p&&(y=p,p=ue,ue=y),y=K_(F,ue),v=K_(F,p),y&&v&&(V.rangeCount!==1||V.anchorNode!==y.node||V.anchorOffset!==y.offset||V.focusNode!==v.node||V.focusOffset!==v.offset)&&(K=K.createRange(),K.setStart(y.node,y.offset),V.removeAllRanges(),ue>p?(V.addRange(K),V.extend(v.node,v.offset)):(K.setEnd(v.node,v.offset),V.addRange(K)))))),K=[],V=F;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;FYn()-I1?Qc(e,0):R1|=i),bo(e,t)}o(zD,"Yj");function $D(e,t){var i=e.stateNode;i!==null&&i.delete(t),t=0,t===0&&(t=e.mode,(t&2)==0?t=1:(t&4)==0?t=zc()===99?1:2:(Rl===0&&(Rl=Kc),t=Mc(62914560&~Rl),t===0&&(t=4194304))),i=Yi(),e=hg(e,t),e!==null&&(kv(e,t,i),bo(e,i))}o($D,"lj");var Tb;Tb=o(function(e,t,i){var l=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Pi.current)ns=!0;else if((i&l)!=0)ns=(e.flags&16384)!=0;else{switch(ns=!1,t.tag){case 3:QE(t),m1();break;case 5:ME(t);break;case 1:Mi(t.type)&&$v(t);break;case 4:p1(t,t.stateNode.containerInfo);break;case 10:l=t.memoizedProps.value;var d=t.type._context;Cr(Vv,d._currentValue),d._currentValue=l;break;case 13:if(t.memoizedState!==null)return(i&t.child.childLanes)!=0?ZE(e,t,i):(Cr(_r,_r.current&1),t=Al(e,t,i),t!==null?t.sibling:null);Cr(_r,_r.current&1);break;case 19:if(l=(i&t.childLanes)!=0,(e.flags&64)!=0){if(l)return nb(e,t,i);t.flags|=64}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Cr(_r,_r.current),l)break;return null;case 23:case 24:return t.lanes=0,_1(e,t,i)}return Al(e,t,i)}else ns=!1;switch(t.lanes=0,t.tag){case 2:if(l=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,d=Uc(t,Gn.current),jc(t,i),d=y1(null,t,l,e,d,i),t.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mi(l)){var v=!0;$v(t)}else v=!1;t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,f1(t);var p=l.getDerivedStateFromProps;typeof p=="function"&&Yv(t,l,p,e),d.updater=Xv,t.stateNode=d,d._reactInternals=t,c1(t,l,e,i),t=b1(null,t,l,!0,v,i)}else t.tag=0,Di(null,t,d,i),t=t.child;return t;case 16:d=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,v=d._init,d=v(d._payload),t.type=d,v=t.tag=qD(d),e=rs(d,e),v){case 0:t=E1(null,t,d,e,i);break e;case 1:t=XE(null,t,d,e,i);break e;case 11:t=VE(null,t,d,e,i);break e;case 14:t=KE(null,t,d,rs(d.type,e),l,i);break e}throw Error(ye(306,d,""))}return t;case 0:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:rs(l,d),E1(e,t,l,d,i);case 1:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:rs(l,d),XE(e,t,l,d,i);case 3:if(QE(t),l=t.updateQueue,e===null||l===null)throw Error(ye(282));if(l=t.pendingProps,d=t.memoizedState,d=d!==null?d.element:null,_E(e,t),Xd(t,l,null,i),l=t.memoizedState.element,l===d)m1(),t=Al(e,t,i);else{if(d=t.stateNode,(v=d.hydrate)&&(Ka=Ic(t.stateNode.containerInfo.firstChild),Ml=t,v=Vs=!0),v){if(e=d.mutableSourceEagerHydrationData,e!=null)for(d=0;d{"use strict";function Nb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nb)}catch(e){console.error(e)}}o(Nb,"checkDCE");Nb(),Pb.exports=Lb()});var Ab=fr((e2,Mb)=>{"use strict";var ZD="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Mb.exports=ZD});var Ib=fr((t2,Fb)=>{"use strict";var JD=Ab();function Db(){}o(Db,"emptyFunction");function Rb(){}o(Rb,"emptyFunctionWithReset");Rb.resetWarningCache=Db;Fb.exports=function(){function e(l,d,v,p,y,_){if(_!==JD){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var i={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Rb,resetWarningCache:Db};return i.PropTypes=i,i}});var Wb=fr((i2,Hb)=>{Hb.exports=Ib()();var r2,n2});var Vb=fr(Wt=>{"use strict";var Cn=typeof Symbol=="function"&&Symbol.for,J1=Cn?Symbol.for("react.element"):60103,ex=Cn?Symbol.for("react.portal"):60106,xg=Cn?Symbol.for("react.fragment"):60107,Sg=Cn?Symbol.for("react.strict_mode"):60108,Cg=Cn?Symbol.for("react.profiler"):60114,_g=Cn?Symbol.for("react.provider"):60109,Eg=Cn?Symbol.for("react.context"):60110,tx=Cn?Symbol.for("react.async_mode"):60111,bg=Cn?Symbol.for("react.concurrent_mode"):60111,Tg=Cn?Symbol.for("react.forward_ref"):60112,kg=Cn?Symbol.for("react.suspense"):60113,nR=Cn?Symbol.for("react.suspense_list"):60120,Og=Cn?Symbol.for("react.memo"):60115,Lg=Cn?Symbol.for("react.lazy"):60116,iR=Cn?Symbol.for("react.block"):60121,oR=Cn?Symbol.for("react.fundamental"):60117,sR=Cn?Symbol.for("react.responder"):60118,lR=Cn?Symbol.for("react.scope"):60119;function Xi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case J1:switch(e=e.type,e){case tx:case bg:case xg:case Cg:case Sg:case kg:return e;default:switch(e=e&&e.$$typeof,e){case Eg:case Tg:case Lg:case Og:case _g:return e;default:return t}}case ex:return t}}}o(Xi,"z");function qb(e){return Xi(e)===bg}o(qb,"A");Wt.AsyncMode=tx;Wt.ConcurrentMode=bg;Wt.ContextConsumer=Eg;Wt.ContextProvider=_g;Wt.Element=J1;Wt.ForwardRef=Tg;Wt.Fragment=xg;Wt.Lazy=Lg;Wt.Memo=Og;Wt.Portal=ex;Wt.Profiler=Cg;Wt.StrictMode=Sg;Wt.Suspense=kg;Wt.isAsyncMode=function(e){return qb(e)||Xi(e)===tx};Wt.isConcurrentMode=qb;Wt.isContextConsumer=function(e){return Xi(e)===Eg};Wt.isContextProvider=function(e){return Xi(e)===_g};Wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===J1};Wt.isForwardRef=function(e){return Xi(e)===Tg};Wt.isFragment=function(e){return Xi(e)===xg};Wt.isLazy=function(e){return Xi(e)===Lg};Wt.isMemo=function(e){return Xi(e)===Og};Wt.isPortal=function(e){return Xi(e)===ex};Wt.isProfiler=function(e){return Xi(e)===Cg};Wt.isStrictMode=function(e){return Xi(e)===Sg};Wt.isSuspense=function(e){return Xi(e)===kg};Wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xg||e===bg||e===Cg||e===Sg||e===kg||e===nR||typeof e=="object"&&e!==null&&(e.$$typeof===Lg||e.$$typeof===Og||e.$$typeof===_g||e.$$typeof===Eg||e.$$typeof===Tg||e.$$typeof===oR||e.$$typeof===sR||e.$$typeof===lR||e.$$typeof===iR)};Wt.typeOf=Xi});var Gb=fr((w2,Kb)=>{"use strict";Kb.exports=Vb()});var tT=fr((x2,eT)=>{"use strict";var rx=Gb(),aR={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uR={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fR={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nx={};nx[rx.ForwardRef]=fR;nx[rx.Memo]=Yb;function Xb(e){return rx.isMemo(e)?Yb:nx[e.$$typeof]||aR}o(Xb,"getStatics");var cR=Object.defineProperty,pR=Object.getOwnPropertyNames,Qb=Object.getOwnPropertySymbols,dR=Object.getOwnPropertyDescriptor,hR=Object.getPrototypeOf,Zb=Object.prototype;function Jb(e,t,i){if(typeof t!="string"){if(Zb){var l=hR(t);l&&l!==Zb&&Jb(e,l,i)}var d=pR(t);Qb&&(d=d.concat(Qb(t)));for(var v=Xb(e),p=Xb(t),y=0;y{"use strict";var _n=typeof Symbol=="function"&&Symbol.for,ix=_n?Symbol.for("react.element"):60103,ox=_n?Symbol.for("react.portal"):60106,Ng=_n?Symbol.for("react.fragment"):60107,Pg=_n?Symbol.for("react.strict_mode"):60108,Mg=_n?Symbol.for("react.profiler"):60114,Ag=_n?Symbol.for("react.provider"):60109,Dg=_n?Symbol.for("react.context"):60110,sx=_n?Symbol.for("react.async_mode"):60111,Rg=_n?Symbol.for("react.concurrent_mode"):60111,Fg=_n?Symbol.for("react.forward_ref"):60112,Ig=_n?Symbol.for("react.suspense"):60113,mR=_n?Symbol.for("react.suspense_list"):60120,Hg=_n?Symbol.for("react.memo"):60115,Wg=_n?Symbol.for("react.lazy"):60116,vR=_n?Symbol.for("react.block"):60121,gR=_n?Symbol.for("react.fundamental"):60117,yR=_n?Symbol.for("react.responder"):60118,wR=_n?Symbol.for("react.scope"):60119;function Qi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ix:switch(e=e.type,e){case sx:case Rg:case Ng:case Mg:case Pg:case Ig:return e;default:switch(e=e&&e.$$typeof,e){case Dg:case Fg:case Wg:case Hg:case Ag:return e;default:return t}}case ox:return t}}}o(Qi,"z");function rT(e){return Qi(e)===Rg}o(rT,"A");Bt.AsyncMode=sx;Bt.ConcurrentMode=Rg;Bt.ContextConsumer=Dg;Bt.ContextProvider=Ag;Bt.Element=ix;Bt.ForwardRef=Fg;Bt.Fragment=Ng;Bt.Lazy=Wg;Bt.Memo=Hg;Bt.Portal=ox;Bt.Profiler=Mg;Bt.StrictMode=Pg;Bt.Suspense=Ig;Bt.isAsyncMode=function(e){return rT(e)||Qi(e)===sx};Bt.isConcurrentMode=rT;Bt.isContextConsumer=function(e){return Qi(e)===Dg};Bt.isContextProvider=function(e){return Qi(e)===Ag};Bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ix};Bt.isForwardRef=function(e){return Qi(e)===Fg};Bt.isFragment=function(e){return Qi(e)===Ng};Bt.isLazy=function(e){return Qi(e)===Wg};Bt.isMemo=function(e){return Qi(e)===Hg};Bt.isPortal=function(e){return Qi(e)===ox};Bt.isProfiler=function(e){return Qi(e)===Mg};Bt.isStrictMode=function(e){return Qi(e)===Pg};Bt.isSuspense=function(e){return Qi(e)===Ig};Bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ng||e===Rg||e===Mg||e===Pg||e===Ig||e===mR||typeof e=="object"&&e!==null&&(e.$$typeof===Wg||e.$$typeof===Hg||e.$$typeof===Ag||e.$$typeof===Dg||e.$$typeof===Fg||e.$$typeof===gR||e.$$typeof===yR||e.$$typeof===wR||e.$$typeof===vR)};Bt.typeOf=Qi});var oT=fr((C2,iT)=>{"use strict";iT.exports=nT()});var xh=fr((tp,wh)=>{(function(){var e,t="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",v="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",y=500,_="__lodash_placeholder__",O=1,D=2,Y=4,B=1,X=2,te=1,Q=2,R=4,P=8,F=16,K=32,V=64,ue=128,ie=256,de=512,ge=30,we="...",qe=800,Je=16,Ee=1,xt=2,Be=3,Ve=1/0,Ke=9007199254740991,Ge=17976931348623157e292,Zt=0/0,ut=4294967295,Fr=ut-1,Kt=ut>>>1,bt=[["ary",ue],["bind",te],["bindKey",Q],["curry",P],["curryRight",F],["flip",de],["partial",K],["partialRight",V],["rearg",ie]],St="[object Arguments]",st="[object Array]",br="[object AsyncFunction]",zt="[object Boolean]",$t="[object Date]",ne="[object DOMException]",et="[object Error]",Tr="[object Function]",jt="[object GeneratorFunction]",qt="[object Map]",xe="[object Number]",kr="[object Null]",an="[object Object]",In="[object Promise]",ii="[object Proxy]",un="[object RegExp]",Gt="[object Set]",dr="[object String]",ft="[object Symbol]",Io="[object Undefined]",yr="[object WeakMap]",Ii="[object WeakSet]",fn="[object ArrayBuffer]",Hn="[object DataView]",vi="[object Float32Array]",gi="[object Float64Array]",Wn="[object Int8Array]",kn="[object Int16Array]",Zs="[object Int32Array]",H="[object Uint8Array]",J="[object Uint8ClampedArray]",he="[object Uint16Array]",be="[object Uint32Array]",Jt=/\b__p \+= '';/g,zl=/\b(__p \+=) '' \+/g,Rt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ir=/&(?:amp|lt|gt|quot|#39);/g,er=/[&<>"']/g,oi=RegExp(Ir.source),fs=RegExp(er.source),no=/<%-([\s\S]+?)%>/g,yi=/<%([\s\S]+?)%>/g,Js=/<%=([\s\S]+?)%>/g,cs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cn=/^\w*$/,Ep=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,el=/[\\^$.*+?()[\]{}|]/g,bf=RegExp(el.source),tl=/^\s+/,bp=/\s/,Tf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,uu=/\{\n\/\* \[wrapped with (.+)\] \*/,Tp=/,? & /,$l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ps=/[()=,{}\[\]\/\s]/,kp=/\\(\\)?/g,kf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rl=/\w*$/,fu=/^[-+]0x[0-9a-f]+$/i,Ho=/^0b[01]+$/i,Op=/^\[object .+?Constructor\]$/,Wo=/^0o[0-7]+$/i,jl=/^(?:0|[1-9]\d*)$/,Of=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,Ne=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",cu="\\u0300-\\u036f",xi="\\ufe20-\\ufe2f",dt="\\u20d0-\\u20ff",Hi=cu+xi+dt,Bo="\\u2700-\\u27bf",nl="a-z\\xdf-\\xf6\\xf8-\\xff",ae="\\xac\\xb1\\xd7\\xf7",ze="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ql="\\u2000-\\u206f",Vl=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",ds="\\ufe0e\\ufe0f",Kl=ae+ze+ql+Vl,Ue="['\u2019]",Lp="["+wi+"]",il="["+Kl+"]",si="["+Hi+"]",Bn="\\d+",pu="["+Bo+"]",du="["+nl+"]",hs="[^"+wi+Kl+Bn+Bo+nl+Uo+"]",ol="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+si+"|"+ol+")",Gl="[^"+wi+"]",Yl="(?:\\ud83c[\\udde6-\\uddff]){2}",Xl="[\\ud800-\\udbff][\\udc00-\\udfff]",zo="["+Uo+"]",hu="\\u200d",Nf="(?:"+du+"|"+hs+")",Np="(?:"+zo+"|"+hs+")",mu="(?:"+Ue+"(?:d|ll|m|re|s|t|ve))?",Si="(?:"+Ue+"(?:D|LL|M|RE|S|T|VE))?",M=Lf+"?",We="["+ds+"]?",$o="(?:"+hu+"(?:"+[Gl,Yl,Xl].join("|")+")"+We+M+")*",pn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Se=We+M+$o,Ql="(?:"+[pu,Yl,Xl].join("|")+")"+Se,em="(?:"+[Gl+si+"?",si,Yl,Xl,Lp].join("|")+")",Pf=RegExp(Ue,"g"),Pp=RegExp(si,"g"),Mf=RegExp(ol+"(?="+ol+")|"+em+Se,"g"),gu=RegExp([zo+"?"+du+"+"+mu+"(?="+[il,zo,"$"].join("|")+")",Np+"+"+Si+"(?="+[il,zo+Nf,"$"].join("|")+")",zo+"?"+Nf+"+"+mu,zo+"+"+Si,vu,pn,Bn,Ql].join("|"),"g"),ms=RegExp("["+hu+wi+Hi+ds+"]"),Pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vs=["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"],Zl=-1,Ae={};Ae[vi]=Ae[gi]=Ae[Wn]=Ae[kn]=Ae[Zs]=Ae[H]=Ae[J]=Ae[he]=Ae[be]=!0,Ae[St]=Ae[st]=Ae[fn]=Ae[zt]=Ae[Hn]=Ae[$t]=Ae[et]=Ae[Tr]=Ae[qt]=Ae[xe]=Ae[an]=Ae[un]=Ae[Gt]=Ae[dr]=Ae[yr]=!1;var Ot={};Ot[St]=Ot[st]=Ot[fn]=Ot[Hn]=Ot[zt]=Ot[$t]=Ot[vi]=Ot[gi]=Ot[Wn]=Ot[kn]=Ot[Zs]=Ot[qt]=Ot[xe]=Ot[an]=Ot[un]=Ot[Gt]=Ot[dr]=Ot[ft]=Ot[H]=Ot[J]=Ot[he]=Ot[be]=!0,Ot[et]=Ot[Tr]=Ot[yr]=!1;var Un={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"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"},yu={"&":"&","<":"<",">":">",'"':""","'":"'"},sl={"&":"&","<":"<",">":">",""":'"',"'":"'"},On={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mp=parseFloat,Ap=parseInt,Jl=typeof global=="object"&&global&&global.Object===Object&&global,Hr=typeof self=="object"&&self&&self.Object===Object&&self,Nt=Jl||Hr||Function("return this")(),gs=typeof tp=="object"&&tp&&!tp.nodeType&&tp,Wr=gs&&typeof wh=="object"&&wh&&!wh.nodeType&&wh,ys=Wr&&Wr.exports===gs,ll=ys&&Jl.process,Or=function(){try{var q=Wr&&Wr.require&&Wr.require("util").types;return q||ll&&ll.binding&&ll.binding("util")}catch(re){}}(),Af=Or&&Or.isArrayBuffer,Df=Or&&Or.isDate,wu=Or&&Or.isMap,xu=Or&&Or.isRegExp,ea=Or&&Or.isSet,ta=Or&&Or.isTypedArray;function Ln(q,re,Z){switch(Z.length){case 0:return q.call(re);case 1:return q.call(re,Z[0]);case 2:return q.call(re,Z[0],Z[1]);case 3:return q.call(re,Z[0],Z[1],Z[2])}return q.apply(re,Z)}o(Ln,"apply");function Dp(q,re,Z,Le){for(var Ye=-1,_t=q==null?0:q.length;++Ye<_t;){var Lr=q[Ye];re(Le,Lr,Z(Lr),q)}return Le}o(Dp,"arrayAggregator");function zn(q,re){for(var Z=-1,Le=q==null?0:q.length;++Z-1}o(ws,"arrayIncludes");function xs(q,re,Z){for(var Le=-1,Ye=q==null?0:q.length;++Le-1;);return Z}o(Wi,"charsStartIndex");function lo(q,re){for(var Z=q.length;Z--&&jo(re,q[Z],0)>-1;);return Z}o(lo,"charsEndIndex");function Hp(q,re){for(var Z=q.length,Le=0;Z--;)q[Z]===re&&++Le;return Le}o(Hp,"countHolders");var ul=k(Un),Bi=k(yu);function tm(q){return"\\"+On[q]}o(tm,"escapeStringChar");function Wp(q,re){return q==null?e:q[re]}o(Wp,"getValue");function Ui(q){return ms.test(q)}o(Ui,"hasUnicode");function ao(q){return Pe.test(q)}o(ao,"hasUnicodeWord");function rm(q){for(var re,Z=[];!(re=q.next()).done;)Z.push(re.value);return Z}o(rm,"iteratorToArray");function If(q){var re=-1,Z=Array(q.size);return q.forEach(function(Le,Ye){Z[++re]=[Ye,Le]}),Z}o(If,"mapToArray");function nm(q,re){return function(Z){return q(re(Z))}}o(nm,"overArg");function Cs(q,re){for(var Z=-1,Le=q.length,Ye=0,_t=[];++Z-1}o(o0,"listCacheHas");function Vf(s,f){var h=this.__data__,w=gl(h,s);return w<0?(++this.size,h.push([s,f])):h[w][1]=f,this}o(Vf,"listCacheSet"),mo.prototype.clear=qp,mo.prototype.delete=hm,mo.prototype.get=Lu,mo.prototype.has=o0,mo.prototype.set=Vf;function vr(s){var f=-1,h=s==null?0:s.length;for(this.clear();++f=f?s:f)),s}o(yl,"baseClamp");function Pn(s,f,h,w,b,L){var I,W=f&O,G=f&D,se=f&Y;if(h&&(I=b?h(s,w,b,L):h(s)),I!==e)return I;if(!gr(s))return s;var le=nt(s);if(le){if(I=u(s),!W)return zr(s,I)}else{var fe=mn(s),ke=fe==Tr||fe==jt;if(Pa(s))return ad(s,W);if(fe==an||fe==St||ke&&!b){if(I=G||ke?{}:a(s),!W)return G?Hm(s,a0(I,s)):v0(s,Xp(I,s))}else{if(!Ot[fe])return b?s:{};I=c(s,fe,W)}}L||(L=new Ei);var Ie=L.get(s);if(Ie)return Ie;L.set(s,I),JS(s)?s.forEach(function(je){I.add(Pn(je,f,h,je,s,L))}):QS(s)&&s.forEach(function(je,pt){I.set(pt,Pn(je,f,h,pt,s,L))});var $e=se?G?dc:$u:G?Li:xn,lt=le?e:$e(s);return zn(lt||s,function(je,pt){lt&&(pt=je,je=s[pt]),Pu(I,pt,Pn(je,f,h,pt,s,L))}),I}o(Pn,"baseClone");function wm(s){var f=xn(s);return function(h){return xm(h,s,f)}}o(wm,"baseConforms");function xm(s,f,h){var w=h.length;if(s==null)return!w;for(s=ht(s);w--;){var b=h[w],L=f[b],I=s[b];if(I===e&&!(b in s)||!L(I))return!1}return!0}o(xm,"baseConformsTo");function Sm(s,f,h){if(typeof s!="function")throw new qn(d);return Mt(function(){s.apply(e,h)},f)}o(Sm,"baseDelay");function da(s,f,h,w){var b=-1,L=ws,I=!0,W=s.length,G=[],se=f.length;if(!W)return G;h&&(f=Ct(f,wr(h))),w?(L=xs,I=!1):f.length>=i&&(L=Yr,I=!1,f=new Jr(f));e:for(;++bb?0:b+h),w=w===e||w>b?b:ot(w),w<0&&(w+=b),w=h>w?0:tC(w);h0&&h(W)?f>1?en(W,f-1,h,w,b):oo(b,W):w||(b[b.length]=W)}return b}o(en,"baseFlatten");var Qf=Bm(),Br=Bm(!0);function ui(s,f){return s&&Qf(s,f,xn)}o(ui,"baseForOwn");function Zf(s,f){return s&&Br(s,f,xn)}o(Zf,"baseForOwnRight");function Au(s,f){return io(f,function(h){return Tl(s[h])})}o(Au,"baseFunctions");function Rs(s,f){f=ji(f,s);for(var h=0,w=f.length;s!=null&&hf}o(Jf,"baseGt");function Cm(s,f){return s!=null&&Ze.call(s,f)}o(Cm,"baseHas");function _m(s,f){return s!=null&&f in ht(s)}o(_m,"baseHasIn");function ha(s,f,h){return s>=Xr(f,h)&&s=120&&le.length>=120)?new Jr(I&&le):e}le=s[0];var fe=-1,ke=W[0];e:for(;++fe-1;)W!==s&&aa.call(W,G,1),aa.call(s,G,1);return s}o(td,"basePullAll");function rd(s,f){for(var h=s?f.length:0,w=h-1;h--;){var b=f[h];if(h==w||b!==L){var L=b;S(b)?aa.call(s,b,1):Hu(s,b)}}return s}o(rd,"basePullAt");function ic(s,f){return s+fa(Ls()*(f-s+1))}o(ic,"baseRandom");function Mm(s,f,h,w){for(var b=-1,L=tr(ua((f-s)/(h||1)),0),I=Z(L);L--;)I[w?L:++b]=s,s+=h;return I}o(Mm,"baseRange");function nd(s,f){var h="";if(!s||f<1||f>Ke)return h;do f%2&&(h+=s),f=fa(f/2),f&&(s+=s);while(f);return h}o(nd,"baseRepeat");function it(s,f){return vn(Fe(s,f,Ni),s+"")}o(it,"baseRest");function p0(s){return Kf(yc(s))}o(p0,"baseSample");function Hs(s,f){var h=yc(s);return $r(h,yl(f,0,h.length))}o(Hs,"baseSampleSize");function Ko(s,f,h,w){if(!gr(s))return s;f=ji(f,s);for(var b=-1,L=f.length,I=L-1,W=s;W!=null&&++bb?0:b+f),h=h>b?b:h,h<0&&(h+=b),b=f>h?0:h-f>>>0,f>>>=0;for(var L=Z(b);++w>>1,I=s[L];I!==null&&!qi(I)&&(h?I<=f:I=i){var se=f?null:zu(s);if(se)return Hf(se);I=!1,b=Yr,G=new Jr}else G=f?[]:W;e:for(;++w=w?s:bi(s,f,h)}o(Ws,"castSlice");var Ca=Gy||function(s){return Nt.clearTimeout(s)};function ad(s,f){if(f)return s.slice();var h=s.length,w=fm?fm(h):new s.constructor(h);return s.copy(w),w}o(ad,"cloneBuffer");function ac(s){var f=new s.constructor(s.byteLength);return new pl(f).set(new pl(s)),f}o(ac,"cloneArrayBuffer");function m0(s,f){var h=f?ac(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}o(m0,"cloneDataView");function ud(s){var f=new s.constructor(s.source,rl.exec(s));return f.lastIndex=s.lastIndex,f}o(ud,"cloneRegExp");function Dm(s){return rr?ht(rr.call(s)):{}}o(Dm,"cloneSymbol");function Rm(s,f){var h=f?ac(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}o(Rm,"cloneTypedArray");function fd(s,f){if(s!==f){var h=s!==e,w=s===null,b=s===s,L=qi(s),I=f!==e,W=f===null,G=f===f,se=qi(f);if(!W&&!se&&!L&&s>f||L&&I&&G&&!W&&!se||w&&I&&G||!h&&G||!b)return 1;if(!w&&!L&&!se&&s=W)return G;var se=h[w];return G*(se=="desc"?-1:1)}}return s.index-f.index}o(Fm,"compareMultiple");function Im(s,f,h,w){for(var b=-1,L=s.length,I=h.length,W=-1,G=f.length,se=tr(L-I,0),le=Z(G+se),fe=!w;++W1?h[b-1]:e,I=b>2?h[2]:e;for(L=s.length>3&&typeof L=="function"?(b--,L):e,I&&C(h[0],h[1],I)&&(L=b<3?e:L,b=1),f=ht(f);++w-1?b[L?f[I]:I]:e}}o(pd,"createFind");function $m(s){return Xo(function(f){var h=f.length,w=h,b=Nn.prototype.thru;for(s&&f.reverse();w--;){var L=f[w];if(typeof L!="function")throw new qn(d);if(b&&!I&&ju(L)=="wrapper")var I=new Nn([],!0)}for(w=I?w:h;++w1&&mt.reverse(),le&&GW))return!1;var se=L.get(s),le=L.get(f);if(se&&le)return se==f&&le==s;var fe=-1,ke=!0,Ie=h&X?new Jr:e;for(L.set(s,f),L.set(f,s);++fe1?"& ":"")+f[w],f=f.join(h>2?", ":" "),s.replace(Tf,`{ +Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}Pn!==5&&(Pn=2),_=L1(_,w),W=p;do{switch(W.tag){case 3:v=_,W.flags|=4096,t&=-t,W.lanes|=t;var ue=dE(W,v,t);Nb(W,ue);break e;case 1:v=_;var ie=W.type,de=W.stateNode;if((W.flags&64)==0&&(typeof ie.getDerivedStateFromError=="function"||de!==null&&typeof de.componentDidCatch=="function"&&(js===null||!js.has(de)))){W.flags|=4096,t&=-t,W.lanes|=t;var ge=hE(W,v,t);Nb(W,ge);break e}}W=W.return}while(W!==null)}LE(n)}catch(we){t=we,en===n&&n!==null&&(en=n=n.return);continue}break}while(1)}o(TE,"Sj");function kE(){var e=lg.current;return lg.current=og,e===null?og:e}o(kE,"Pj");function dh(e,t){var n=Xe;Xe|=16;var l=kE();ui===e&&Gn===t||Yc(e,t);do try{WD();break}catch(d){TE(e,d)}while(1);if(u1(),Xe=n,lg.current=l,en!==null)throw Error(ye(261));return ui=null,Gn=0,Pn}o(dh,"Tj");function WD(){for(;en!==null;)OE(en)}o(WD,"ak");function BD(){for(;en!==null&&!SD();)OE(en)}o(BD,"Rj");function OE(e){var t=ME(e.alternate,e,nf);e.memoizedProps=e.pendingProps,t===null?LE(e):en=t,D1.current=null}o(OE,"bk");function LE(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&2048)==0){if(n=ND(n,t,nf),n!==null){en=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||(nf&1073741824)!=0||(n.mode&4)==0){for(var l=0,d=n.child;d!==null;)l|=d.lanes|d.childLanes,d=d.sibling;n.childLanes=l}e!==null&&(e.flags&2048)==0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1p&&(w=p,p=ue,ue=w),w=J_(F,ue),v=J_(F,p),w&&v&&(V.rangeCount!==1||V.anchorNode!==w.node||V.anchorOffset!==w.offset||V.focusNode!==v.node||V.focusOffset!==v.offset)&&(K=K.createRange(),K.setStart(w.node,w.offset),V.removeAllRanges(),ue>p?(V.addRange(K),V.extend(v.node,v.offset)):(K.setEnd(v.node,v.offset),V.addRange(K)))))),K=[],V=F;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;FVn()-H1?Yc(e,0):F1|=n),_o(e,t)}o(qD,"Yj");function VD(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,(t&2)==0?t=1:(t&4)==0?t=Bc()===99?1:2:(Ml===0&&(Ml=qc),t=Nc(62914560&~Ml),t===0&&(t=4194304))),n=Ki(),e=dg(e,t),e!==null&&(Tv(e,t,n),_o(e,n))}o(VD,"lj");var ME;ME=o(function(e,t,n){var l=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Li.current)Jo=!0;else if((n&l)!=0)Jo=(e.flags&16384)!=0;else{switch(Jo=!1,t.tag){case 3:nE(t),v1();break;case 5:Hb(t);break;case 1:Ni(t.type)&&zv(t);break;case 4:d1(t,t.stateNode.containerInfo);break;case 10:l=t.memoizedProps.value;var d=t.type._context;xr(qv,d._currentValue),d._currentValue=l;break;case 13:if(t.memoizedState!==null)return(n&t.child.childLanes)!=0?iE(e,t,n):(xr(Sr,Sr.current&1),t=Nl(e,t,n),t!==null?t.sibling:null);xr(Sr,Sr.current&1);break;case 19:if(l=(n&t.childLanes)!=0,(e.flags&64)!=0){if(l)return uE(e,t,n);t.flags|=64}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),xr(Sr,Sr.current),l)break;return null;case 23:case 24:return t.lanes=0,b1(e,t,n)}return Nl(e,t,n)}else Jo=!1;switch(t.lanes=0,t.tag){case 2:if(l=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,d=Wc(t,qn.current),zc(t,n),d=w1(null,t,l,e,d,n),t.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ni(l)){var v=!0;zv(t)}else v=!1;t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,c1(t);var p=l.getDerivedStateFromProps;typeof p=="function"&&Gv(t,l,p,e),d.updater=Yv,t.stateNode=d,d._reactInternals=t,p1(t,l,e,n),t=T1(null,t,l,!0,v,n)}else t.tag=0,Mi(null,t,d,n),t=t.child;return t;case 16:d=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,v=d._init,d=v(d._payload),t.type=d,v=t.tag=GD(d),e=Zo(d,e),v){case 0:t=E1(null,t,d,e,n);break e;case 1:t=rE(null,t,d,e,n);break e;case 11:t=Zb(null,t,d,e,n);break e;case 14:t=Jb(null,t,d,Zo(d.type,e),l,n);break e}throw Error(ye(306,d,""))}return t;case 0:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:Zo(l,d),E1(e,t,l,d,n);case 1:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:Zo(l,d),rE(e,t,l,d,n);case 3:if(nE(t),l=t.updateQueue,e===null||l===null)throw Error(ye(282));if(l=t.pendingProps,d=t.memoizedState,d=d!==null?d.element:null,Lb(e,t),Xd(t,l,null,n),l=t.memoizedState.element,l===d)v1(),t=Nl(e,t,n);else{if(d=t.stateNode,(v=d.hydrate)&&(ja=Rc(t.stateNode.containerInfo.firstChild),Ll=t,v=Us=!0),v){if(e=d.mutableSourceEagerHydrationData,e!=null)for(d=0;d{"use strict";function FE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FE)}catch(e){console.error(e)}}o(FE,"checkDCE");FE(),IE.exports=RE()});var WE=lr((JI,HE)=>{"use strict";var tR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";HE.exports=tR});var jE=lr((e2,zE)=>{"use strict";var rR=WE();function BE(){}o(BE,"emptyFunction");function UE(){}o(UE,"emptyFunctionWithReset");UE.resetWarningCache=BE;zE.exports=function(){function e(l,d,v,p,w,_){if(_!==rR){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:UE,resetWarningCache:BE};return n.PropTypes=n,n}});var qE=lr((n2,$E)=>{$E.exports=jE()();var t2,r2});var ZE=lr(It=>{"use strict";var wn=typeof Symbol=="function"&&Symbol.for,ex=wn?Symbol.for("react.element"):60103,tx=wn?Symbol.for("react.portal"):60106,wg=wn?Symbol.for("react.fragment"):60107,xg=wn?Symbol.for("react.strict_mode"):60108,Sg=wn?Symbol.for("react.profiler"):60114,Cg=wn?Symbol.for("react.provider"):60109,_g=wn?Symbol.for("react.context"):60110,rx=wn?Symbol.for("react.async_mode"):60111,bg=wn?Symbol.for("react.concurrent_mode"):60111,Eg=wn?Symbol.for("react.forward_ref"):60112,Tg=wn?Symbol.for("react.suspense"):60113,sR=wn?Symbol.for("react.suspense_list"):60120,kg=wn?Symbol.for("react.memo"):60115,Og=wn?Symbol.for("react.lazy"):60116,lR=wn?Symbol.for("react.block"):60121,aR=wn?Symbol.for("react.fundamental"):60117,uR=wn?Symbol.for("react.responder"):60118,fR=wn?Symbol.for("react.scope"):60119;function Gi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ex:switch(e=e.type,e){case rx:case bg:case wg:case Sg:case xg:case Tg:return e;default:switch(e=e&&e.$$typeof,e){case _g:case Eg:case Og:case kg:case Cg:return e;default:return t}}case tx:return t}}}o(Gi,"z");function QE(e){return Gi(e)===bg}o(QE,"A");It.AsyncMode=rx;It.ConcurrentMode=bg;It.ContextConsumer=_g;It.ContextProvider=Cg;It.Element=ex;It.ForwardRef=Eg;It.Fragment=wg;It.Lazy=Og;It.Memo=kg;It.Portal=tx;It.Profiler=Sg;It.StrictMode=xg;It.Suspense=Tg;It.isAsyncMode=function(e){return QE(e)||Gi(e)===rx};It.isConcurrentMode=QE;It.isContextConsumer=function(e){return Gi(e)===_g};It.isContextProvider=function(e){return Gi(e)===Cg};It.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ex};It.isForwardRef=function(e){return Gi(e)===Eg};It.isFragment=function(e){return Gi(e)===wg};It.isLazy=function(e){return Gi(e)===Og};It.isMemo=function(e){return Gi(e)===kg};It.isPortal=function(e){return Gi(e)===tx};It.isProfiler=function(e){return Gi(e)===Sg};It.isStrictMode=function(e){return Gi(e)===xg};It.isSuspense=function(e){return Gi(e)===Tg};It.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wg||e===bg||e===Sg||e===xg||e===Tg||e===sR||typeof e=="object"&&e!==null&&(e.$$typeof===Og||e.$$typeof===kg||e.$$typeof===Cg||e.$$typeof===_g||e.$$typeof===Eg||e.$$typeof===aR||e.$$typeof===uR||e.$$typeof===fR||e.$$typeof===lR)};It.typeOf=Gi});var eT=lr((y2,JE)=>{"use strict";JE.exports=ZE()});var lT=lr((w2,sT)=>{"use strict";var nx=eT(),cR={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pR={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dR={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ix={};ix[nx.ForwardRef]=dR;ix[nx.Memo]=tT;function rT(e){return nx.isMemo(e)?tT:ix[e.$$typeof]||cR}o(rT,"getStatics");var hR=Object.defineProperty,mR=Object.getOwnPropertyNames,nT=Object.getOwnPropertySymbols,vR=Object.getOwnPropertyDescriptor,gR=Object.getPrototypeOf,iT=Object.prototype;function oT(e,t,n){if(typeof t!="string"){if(iT){var l=gR(t);l&&l!==iT&&oT(e,l,n)}var d=mR(t);nT&&(d=d.concat(nT(t)));for(var v=rT(e),p=rT(t),w=0;w{"use strict";var xn=typeof Symbol=="function"&&Symbol.for,ox=xn?Symbol.for("react.element"):60103,sx=xn?Symbol.for("react.portal"):60106,Lg=xn?Symbol.for("react.fragment"):60107,Ng=xn?Symbol.for("react.strict_mode"):60108,Pg=xn?Symbol.for("react.profiler"):60114,Mg=xn?Symbol.for("react.provider"):60109,Ag=xn?Symbol.for("react.context"):60110,lx=xn?Symbol.for("react.async_mode"):60111,Dg=xn?Symbol.for("react.concurrent_mode"):60111,Rg=xn?Symbol.for("react.forward_ref"):60112,Fg=xn?Symbol.for("react.suspense"):60113,yR=xn?Symbol.for("react.suspense_list"):60120,Ig=xn?Symbol.for("react.memo"):60115,Hg=xn?Symbol.for("react.lazy"):60116,wR=xn?Symbol.for("react.block"):60121,xR=xn?Symbol.for("react.fundamental"):60117,SR=xn?Symbol.for("react.responder"):60118,CR=xn?Symbol.for("react.scope"):60119;function Yi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ox:switch(e=e.type,e){case lx:case Dg:case Lg:case Pg:case Ng:case Fg:return e;default:switch(e=e&&e.$$typeof,e){case Ag:case Rg:case Hg:case Ig:case Mg:return e;default:return t}}case sx:return t}}}o(Yi,"z");function aT(e){return Yi(e)===Dg}o(aT,"A");Ht.AsyncMode=lx;Ht.ConcurrentMode=Dg;Ht.ContextConsumer=Ag;Ht.ContextProvider=Mg;Ht.Element=ox;Ht.ForwardRef=Rg;Ht.Fragment=Lg;Ht.Lazy=Hg;Ht.Memo=Ig;Ht.Portal=sx;Ht.Profiler=Pg;Ht.StrictMode=Ng;Ht.Suspense=Fg;Ht.isAsyncMode=function(e){return aT(e)||Yi(e)===lx};Ht.isConcurrentMode=aT;Ht.isContextConsumer=function(e){return Yi(e)===Ag};Ht.isContextProvider=function(e){return Yi(e)===Mg};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ox};Ht.isForwardRef=function(e){return Yi(e)===Rg};Ht.isFragment=function(e){return Yi(e)===Lg};Ht.isLazy=function(e){return Yi(e)===Hg};Ht.isMemo=function(e){return Yi(e)===Ig};Ht.isPortal=function(e){return Yi(e)===sx};Ht.isProfiler=function(e){return Yi(e)===Pg};Ht.isStrictMode=function(e){return Yi(e)===Ng};Ht.isSuspense=function(e){return Yi(e)===Fg};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Lg||e===Dg||e===Pg||e===Ng||e===Fg||e===yR||typeof e=="object"&&e!==null&&(e.$$typeof===Hg||e.$$typeof===Ig||e.$$typeof===Mg||e.$$typeof===Ag||e.$$typeof===Rg||e.$$typeof===xR||e.$$typeof===SR||e.$$typeof===CR||e.$$typeof===wR)};Ht.typeOf=Yi});var cT=lr((S2,fT)=>{"use strict";fT.exports=uT()});var xh=lr((Jc,wh)=>{(function(){var e,t="4.17.21",n=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",v="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",w=500,_="__lodash_placeholder__",O=1,D=2,Y=4,W=1,X=2,te=1,Q=2,R=4,P=8,F=16,K=32,V=64,ue=128,ie=256,de=512,ge=30,we="...",qe=800,Je=16,be=1,yt=2,Be=3,Ve=1/0,Ke=9007199254740991,Ge=17976931348623157e292,Yt=0/0,ut=4294967295,Dr=ut-1,qt=ut>>>1,_t=[["ary",ue],["bind",te],["bindKey",Q],["curry",P],["curryRight",F],["flip",de],["partial",K],["partialRight",V],["rearg",ie]],wt="[object Arguments]",st="[object Array]",_r="[object AsyncFunction]",Bt="[object Boolean]",Ut="[object Date]",ne="[object DOMException]",et="[object Error]",br="[object Function]",zt="[object GeneratorFunction]",jt="[object Map]",xe="[object Number]",Er="[object Null]",on="[object Object]",Dn="[object Promise]",ei="[object Proxy]",sn="[object RegExp]",Vt="[object Set]",cr="[object String]",ft="[object Symbol]",Do="[object Undefined]",vr="[object WeakMap]",Ri="[object WeakSet]",ln="[object ArrayBuffer]",Rn="[object DataView]",hi="[object Float32Array]",mi="[object Float64Array]",Fn="[object Int8Array]",bn="[object Int16Array]",Ys="[object Int32Array]",H="[object Uint8Array]",J="[object Uint8ClampedArray]",he="[object Uint16Array]",Ee="[object Uint32Array]",Xt=/\b__p \+= '';/g,Hl=/\b(__p \+=) '' \+/g,At=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rr=/&(?:amp|lt|gt|quot|#39);/g,Qt=/[&<>"']/g,ti=RegExp(Rr.source),os=RegExp(Qt.source),to=/<%-([\s\S]+?)%>/g,vi=/<%([\s\S]+?)%>/g,Xs=/<%=([\s\S]+?)%>/g,ss=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,an=/^\w*$/,bp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qs=/[\\^$.*+?()[\]{}|]/g,Cf=RegExp(Qs.source),Zs=/^\s+/,Ep=/\s/,_f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lu=/\{\n\/\* \[wrapped with (.+)\] \*/,Tp=/,? & /,Wl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ls=/[()=,{}\[\]\/\s]/,kp=/\\(\\)?/g,bf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Js=/\w*$/,au=/^[-+]0x[0-9a-f]+$/i,Ro=/^0b[01]+$/i,Op=/^\[object .+?Constructor\]$/,Fo=/^0o[0-7]+$/i,Bl=/^(?:0|[1-9]\d*)$/,Ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Dt=/($^)/,Ne=/['\n\r\u2028\u2029\\]/g,gi="\\ud800-\\udfff",uu="\\u0300-\\u036f",yi="\\ufe20-\\ufe2f",dt="\\u20d0-\\u20ff",Fi=uu+yi+dt,Io="\\u2700-\\u27bf",el="a-z\\xdf-\\xf6\\xf8-\\xff",ae="\\xac\\xb1\\xd7\\xf7",ze="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ul="\\u2000-\\u206f",zl=" \\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",Ho="A-Z\\xc0-\\xd6\\xd8-\\xde",as="\\ufe0e\\ufe0f",jl=ae+ze+Ul+zl,Ue="['\u2019]",Lp="["+gi+"]",tl="["+jl+"]",ri="["+Fi+"]",In="\\d+",fu="["+Io+"]",cu="["+el+"]",us="[^"+gi+jl+In+Io+el+Ho+"]",rl="\\ud83c[\\udffb-\\udfff]",Tf="(?:"+ri+"|"+rl+")",$l="[^"+gi+"]",ql="(?:\\ud83c[\\udde6-\\uddff]){2}",Vl="[\\ud800-\\udbff][\\udc00-\\udfff]",Wo="["+Ho+"]",pu="\\u200d",kf="(?:"+cu+"|"+us+")",Np="(?:"+Wo+"|"+us+")",du="(?:"+Ue+"(?:d|ll|m|re|s|t|ve))?",wi="(?:"+Ue+"(?:D|LL|M|RE|S|T|VE))?",M=Tf+"?",We="["+as+"]?",Bo="(?:"+pu+"(?:"+[$l,ql,Vl].join("|")+")"+We+M+")*",un="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Se=We+M+Bo,Kl="(?:"+[fu,ql,Vl].join("|")+")"+Se,Jh="(?:"+[$l+ri+"?",ri,ql,Vl,Lp].join("|")+")",Of=RegExp(Ue,"g"),Pp=RegExp(ri,"g"),Lf=RegExp(rl+"(?="+rl+")|"+Jh+Se,"g"),mu=RegExp([Wo+"?"+cu+"+"+du+"(?="+[tl,Wo,"$"].join("|")+")",Np+"+"+wi+"(?="+[tl,Wo+kf,"$"].join("|")+")",Wo+"?"+kf+"+"+du,Wo+"+"+wi,hu,un,In,Kl].join("|"),"g"),fs=RegExp("["+pu+gi+Fi+as+"]"),Pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cs=["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"],Gl=-1,Ae={};Ae[hi]=Ae[mi]=Ae[Fn]=Ae[bn]=Ae[Ys]=Ae[H]=Ae[J]=Ae[he]=Ae[Ee]=!0,Ae[wt]=Ae[st]=Ae[ln]=Ae[Bt]=Ae[Rn]=Ae[Ut]=Ae[et]=Ae[br]=Ae[jt]=Ae[xe]=Ae[on]=Ae[sn]=Ae[Vt]=Ae[cr]=Ae[vr]=!1;var Tt={};Tt[wt]=Tt[st]=Tt[ln]=Tt[Rn]=Tt[Bt]=Tt[Ut]=Tt[hi]=Tt[mi]=Tt[Fn]=Tt[bn]=Tt[Ys]=Tt[jt]=Tt[xe]=Tt[on]=Tt[sn]=Tt[Vt]=Tt[cr]=Tt[ft]=Tt[H]=Tt[J]=Tt[he]=Tt[Ee]=!0,Tt[et]=Tt[br]=Tt[vr]=!1;var Hn={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"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"},vu={"&":"&","<":"<",">":">",'"':""","'":"'"},nl={"&":"&","<":"<",">":">",""":'"',"'":"'"},En={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mp=parseFloat,Ap=parseInt,Yl=typeof global=="object"&&global&&global.Object===Object&&global,Fr=typeof self=="object"&&self&&self.Object===Object&&self,Ot=Yl||Fr||Function("return this")(),ps=typeof Jc=="object"&&Jc&&!Jc.nodeType&&Jc,Ir=ps&&typeof wh=="object"&&wh&&!wh.nodeType&&wh,ds=Ir&&Ir.exports===ps,il=ds&&Yl.process,Tr=function(){try{var q=Ir&&Ir.require&&Ir.require("util").types;return q||il&&il.binding&&il.binding("util")}catch(re){}}(),Nf=Tr&&Tr.isArrayBuffer,Pf=Tr&&Tr.isDate,gu=Tr&&Tr.isMap,yu=Tr&&Tr.isRegExp,Xl=Tr&&Tr.isSet,Ql=Tr&&Tr.isTypedArray;function Tn(q,re,Z){switch(Z.length){case 0:return q.call(re);case 1:return q.call(re,Z[0]);case 2:return q.call(re,Z[0],Z[1]);case 3:return q.call(re,Z[0],Z[1],Z[2])}return q.apply(re,Z)}o(Tn,"apply");function Dp(q,re,Z,Oe){for(var Ye=-1,St=q==null?0:q.length;++Ye-1}o(hs,"arrayIncludes");function ms(q,re,Z){for(var Oe=-1,Ye=q==null?0:q.length;++Oe-1;);return Z}o(Ii,"charsStartIndex");function oo(q,re){for(var Z=q.length;Z--&&Uo(re,q[Z],0)>-1;);return Z}o(oo,"charsEndIndex");function Hp(q,re){for(var Z=q.length,Oe=0;Z--;)q[Z]===re&&++Oe;return Oe}o(Hp,"countHolders");var sl=k(Hn),Hi=k(vu);function em(q){return"\\"+En[q]}o(em,"escapeStringChar");function Wp(q,re){return q==null?e:q[re]}o(Wp,"getValue");function Wi(q){return fs.test(q)}o(Wi,"hasUnicode");function so(q){return Pe.test(q)}o(so,"hasUnicodeWord");function tm(q){for(var re,Z=[];!(re=q.next()).done;)Z.push(re.value);return Z}o(tm,"iteratorToArray");function Df(q){var re=-1,Z=Array(q.size);return q.forEach(function(Oe,Ye){Z[++re]=[Ye,Oe]}),Z}o(Df,"mapToArray");function rm(q,re){return function(Z){return q(re(Z))}}o(rm,"overArg");function gs(q,re){for(var Z=-1,Oe=q.length,Ye=0,St=[];++Z-1}o(s0,"listCacheHas");function jf(s,f){var h=this.__data__,y=hl(h,s);return y<0?(++this.size,h.push([s,f])):h[y][1]=f,this}o(jf,"listCacheSet"),po.prototype.clear=qp,po.prototype.delete=dm,po.prototype.get=ku,po.prototype.has=s0,po.prototype.set=jf;function hr(s){var f=-1,h=s==null?0:s.length;for(this.clear();++f=f?s:f)),s}o(ml,"baseClamp");function On(s,f,h,y,E,L){var I,B=f&O,G=f&D,se=f&Y;if(h&&(I=E?h(s,y,E,L):h(s)),I!==e)return I;if(!mr(s))return s;var le=rt(s);if(le){if(I=u(s),!B)return Br(s,I)}else{var fe=pn(s),ke=fe==br||fe==zt;if(ka(s))return ad(s,B);if(fe==on||fe==wt||ke&&!E){if(I=G||ke?{}:a(s),!B)return G?Im(s,u0(I,s)):g0(s,Xp(I,s))}else{if(!Tt[fe])return E?s:{};I=c(s,fe,B)}}L||(L=new Ci);var Ie=L.get(s);if(Ie)return Ie;L.set(s,I),oC(s)?s.forEach(function($e){I.add(On($e,f,h,$e,s,L))}):nC(s)&&s.forEach(function($e,pt){I.set(pt,On($e,f,h,pt,s,L))});var je=se?G?fc:Uu:G?ki:gn,lt=le?e:je(s);return Wn(lt||s,function($e,pt){lt&&(pt=$e,$e=s[pt]),Lu(I,pt,On($e,f,h,pt,s,L))}),I}o(On,"baseClone");function ym(s){var f=gn(s);return function(h){return wm(h,s,f)}}o(ym,"baseConforms");function wm(s,f,h){var y=h.length;if(s==null)return!y;for(s=ht(s);y--;){var E=h[y],L=f[E],I=s[E];if(I===e&&!(E in s)||!L(I))return!1}return!0}o(wm,"baseConformsTo");function xm(s,f,h){if(typeof s!="function")throw new zn(d);return Nt(function(){s.apply(e,h)},f)}o(xm,"baseDelay");function ua(s,f,h,y){var E=-1,L=hs,I=!0,B=s.length,G=[],se=f.length;if(!B)return G;h&&(f=xt(f,gr(h))),y?(L=ms,I=!1):f.length>=n&&(L=Vr,I=!1,f=new Xr(f));e:for(;++EE?0:E+h),y=y===e||y>E?E:it(y),y<0&&(y+=E),y=h>y?0:lC(y);h0&&h(B)?f>1?Qr(B,f-1,h,y,E):no(E,B):y||(E[E.length]=B)}return E}o(Qr,"baseFlatten");var Gf=Wm(),Hr=Wm(!0);function oi(s,f){return s&&Gf(s,f,gn)}o(oi,"baseForOwn");function Yf(s,f){return s&&Hr(s,f,gn)}o(Yf,"baseForOwnRight");function Pu(s,f){return ro(f,function(h){return _l(s[h])})}o(Pu,"baseFunctions");function Ns(s,f){f=zi(f,s);for(var h=0,y=f.length;s!=null&&hf}o(Xf,"baseGt");function Sm(s,f){return s!=null&&Ze.call(s,f)}o(Sm,"baseHas");function Cm(s,f){return s!=null&&f in ht(s)}o(Cm,"baseHasIn");function fa(s,f,h){return s>=Kr(f,h)&&s=120&&le.length>=120)?new Xr(I&&le):e}le=s[0];var fe=-1,ke=B[0];e:for(;++fe-1;)B!==s&&ia.call(B,G,1),ia.call(s,G,1);return s}o(td,"basePullAll");function rd(s,f){for(var h=s?f.length:0,y=h-1;h--;){var E=f[h];if(h==y||E!==L){var L=E;S(E)?ia.call(s,E,1):Fu(s,E)}}return s}o(rd,"basePullAt");function tc(s,f){return s+sa(bs()*(f-s+1))}o(tc,"baseRandom");function Pm(s,f,h,y){for(var E=-1,L=Zt(oa((f-s)/(h||1)),0),I=Z(L);L--;)I[y?L:++E]=s,s+=h;return I}o(Pm,"baseRange");function nd(s,f){var h="";if(!s||f<1||f>Ke)return h;do f%2&&(h+=s),f=sa(f/2),f&&(s+=s);while(f);return h}o(nd,"baseRepeat");function nt(s,f){return dn(Fe(s,f,Oi),s+"")}o(nt,"baseRest");function d0(s){return $f(mc(s))}o(d0,"baseSample");function As(s,f){var h=mc(s);return Ur(h,ml(f,0,h.length))}o(As,"baseSampleSize");function $o(s,f,h,y){if(!mr(s))return s;f=zi(f,s);for(var E=-1,L=f.length,I=L-1,B=s;B!=null&&++EE?0:E+f),h=h>E?E:h,h<0&&(h+=E),E=f>h?0:h-f>>>0,f>>>=0;for(var L=Z(E);++y>>1,I=s[L];I!==null&&!ji(I)&&(h?I<=f:I=n){var se=f?null:Bu(s);if(se)return Rf(se);I=!1,E=Vr,G=new Xr}else G=f?[]:B;e:for(;++y=y?s:_i(s,f,h)}o(Ds,"castSlice");var ya=Yy||function(s){return Ot.clearTimeout(s)};function ad(s,f){if(f)return s.slice();var h=s.length,y=um?um(h):new s.constructor(h);return s.copy(y),y}o(ad,"cloneBuffer");function oc(s){var f=new s.constructor(s.byteLength);return new ul(f).set(new ul(s)),f}o(oc,"cloneArrayBuffer");function v0(s,f){var h=f?oc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}o(v0,"cloneDataView");function ud(s){var f=new s.constructor(s.source,Js.exec(s));return f.lastIndex=s.lastIndex,f}o(ud,"cloneRegExp");function Am(s){return Jt?ht(Jt.call(s)):{}}o(Am,"cloneSymbol");function Dm(s,f){var h=f?oc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}o(Dm,"cloneTypedArray");function fd(s,f){if(s!==f){var h=s!==e,y=s===null,E=s===s,L=ji(s),I=f!==e,B=f===null,G=f===f,se=ji(f);if(!B&&!se&&!L&&s>f||L&&I&&G&&!B&&!se||y&&I&&G||!h&&G||!E)return 1;if(!y&&!L&&!se&&s=B)return G;var se=h[y];return G*(se=="desc"?-1:1)}}return s.index-f.index}o(Rm,"compareMultiple");function Fm(s,f,h,y){for(var E=-1,L=s.length,I=h.length,B=-1,G=f.length,se=Zt(L-I,0),le=Z(G+se),fe=!y;++B1?h[E-1]:e,I=E>2?h[2]:e;for(L=s.length>3&&typeof L=="function"?(E--,L):e,I&&C(h[0],h[1],I)&&(L=E<3?e:L,E=1),f=ht(f);++y-1?E[L?f[I]:I]:e}}o(pd,"createFind");function zm(s){return Ko(function(f){var h=f.length,y=h,E=kn.prototype.thru;for(s&&f.reverse();y--;){var L=f[y];if(typeof L!="function")throw new zn(d);if(E&&!I&&zu(L)=="wrapper")var I=new kn([],!0)}for(y=I?y:h;++y1&&mt.reverse(),le&&GB))return!1;var se=L.get(s),le=L.get(f);if(se&&le)return se==f&&le==s;var fe=-1,ke=!0,Ie=h&X?new Xr:e;for(L.set(s,f),L.set(f,s);++fe1?"& ":"")+f[y],f=f.join(h>2?", ":" "),s.replace(_f,`{ /* [wrapped with `+f+`] */ -`)}o(m,"insertWrapDetails");function g(s){return nt(s)||qu(s)||!!(dl&&s&&s[dl])}o(g,"isFlattenable");function S(s,f){var h=typeof s;return f=f??Ke,!!f&&(h=="number"||h!="symbol"&&jl.test(s))&&s>-1&&s%1==0&&s0){if(++f>=qe)return arguments[0]}else f=0;return s.apply(e,arguments)}}o(ur,"shortOut");function $r(s,f){var h=-1,w=s.length,b=w-1;for(f=f===e?w:f;++h1?s[f-1]:e;return h=typeof h=="function"?(s.pop(),h):e,WS(s,h)});function BS(s){var f=T(s);return f.__chain__=!0,f}o(BS,"chain");function LL(s,f){return f(s),s}o(LL,"tap");function Xm(s,f){return f(s)}o(Xm,"thru");var NL=Xo(function(s){var f=s.length,h=f?s[0]:0,w=this.__wrapped__,b=o(function(L){return Qp(L,s)},"interceptor");return f>1||this.__actions__.length||!(w instanceof ct)||!S(h)?this.thru(b):(w=w.slice(h,+h+(f?1:0)),w.__actions__.push({func:Xm,args:[b],thisArg:e}),new Nn(w,this.__chain__).thru(function(L){return f&&!L.length&&L.push(e),L}))});function PL(){return BS(this)}o(PL,"wrapperChain");function ML(){return new Nn(this.value(),this.__chain__)}o(ML,"wrapperCommit");function AL(){this.__values__===e&&(this.__values__=eC(this.value()));var s=this.__index__>=this.__values__.length,f=s?e:this.__values__[this.__index__++];return{done:s,value:f}}o(AL,"wrapperNext");function DL(){return this}o(DL,"wrapperToIterator");function RL(s){for(var f,h=this;h instanceof qf;){var w=yn(h);w.__index__=0,w.__values__=e,f?b.__wrapped__=w:f=w;var b=w;h=h.__wrapped__}return b.__wrapped__=s,f}o(RL,"wrapperPlant");function FL(){var s=this.__wrapped__;if(s instanceof ct){var f=s;return this.__actions__.length&&(f=new ct(this)),f=f.reverse(),f.__actions__.push({func:Xm,args:[y0],thisArg:e}),new Nn(f,this.__chain__)}return this.thru(y0)}o(FL,"wrapperReverse");function IL(){return Am(this.__wrapped__,this.__actions__)}o(IL,"wrapperValue");var HL=fc(function(s,f,h){Ze.call(s,h)?++s[h]:vo(s,h,1)});function WL(s,f,h){var w=nt(s)?Su:Xf;return h&&C(s,f,h)&&(f=e),w(s,He(f,3))}o(WL,"every");function BL(s,f){var h=nt(s)?io:Jp;return h(s,He(f,3))}o(BL,"filter");var UL=pd(vc),zL=pd(RS);function $L(s,f){return en(Qm(s,f),1)}o($L,"flatMap");function jL(s,f){return en(Qm(s,f),Ve)}o(jL,"flatMapDeep");function qL(s,f,h){return h=h===e?1:ot(h),en(Qm(s,f),h)}o(qL,"flatMapDepth");function US(s,f){var h=nt(s)?zn:ai;return h(s,He(f,3))}o(US,"forEach");function zS(s,f){var h=nt(s)?Rp:Yf;return h(s,He(f,3))}o(zS,"forEachRight");var VL=fc(function(s,f,h){Ze.call(s,h)?s[h].push(f):vo(s,h,[f])});function KL(s,f,h,w){s=Oi(s)?s:yc(s),h=h&&!w?ot(h):0;var b=s.length;return h<0&&(h=tr(b+h,0)),rv(s)?h<=b&&s.indexOf(f,h)>-1:!!b&&jo(s,f,h)>-1}o(KL,"includes");var GL=it(function(s,f,h){var w=-1,b=typeof f=="function",L=Oi(s)?Z(s.length):[];return ai(s,function(I){L[++w]=b?Ln(f,I,h):ma(I,f,h)}),L}),YL=fc(function(s,f,h){vo(s,h,f)});function Qm(s,f){var h=nt(s)?Ct:xa;return h(s,He(f,3))}o(Qm,"map");function XL(s,f,h,w){return s==null?[]:(nt(f)||(f=f==null?[]:[f]),h=w?e:h,nt(h)||(h=h==null?[]:[h]),dn(s,f,h))}o(XL,"orderBy");var QL=fc(function(s,f,h){s[h?0:1].push(f)},function(){return[[],[]]});function ZL(s,f,h){var w=nt(s)?ra:U,b=arguments.length<3;return w(s,He(f,4),h,b,ai)}o(ZL,"reduce");function JL(s,f,h){var w=nt(s)?Fp:U,b=arguments.length<3;return w(s,He(f,4),h,b,Yf)}o(JL,"reduceRight");function eN(s,f){var h=nt(s)?io:Jp;return h(s,ev(He(f,3)))}o(eN,"reject");function tN(s){var f=nt(s)?Kf:p0;return f(s)}o(tN,"sample");function rN(s,f,h){(h?C(s,f,h):f===e)?f=1:f=ot(f);var w=nt(s)?Ds:Hs;return w(s,f)}o(rN,"sampleSize");function nN(s){var f=nt(s)?ym:Go;return f(s)}o(nN,"shuffle");function iN(s){if(s==null)return 0;if(Oi(s))return rv(s)?fl(s):s.length;var f=mn(s);return f==qt||f==Gt?s.size:rc(s).length}o(iN,"size");function oN(s,f,h){var w=nt(s)?so:d0;return h&&C(s,f,h)&&(f=e),w(s,He(f,3))}o(oN,"some");var sN=it(function(s,f){if(s==null)return[];var h=f.length;return h>1&&C(s,f[0],f[1])?f=[]:h>2&&C(f[0],f[1],f[2])&&(f=[f[0]]),dn(s,en(f,1),[])}),Zm=Yy||function(){return Nt.Date.now()};function lN(s,f){if(typeof f!="function")throw new qn(d);return s=ot(s),function(){if(--s<1)return f.apply(this,arguments)}}o(lN,"after");function $S(s,f,h){return f=h?e:f,f=s&&f==null?s.length:f,ki(s,ue,e,e,e,e,f)}o($S,"ary");function jS(s,f){var h;if(typeof f!="function")throw new qn(d);return s=ot(s),function(){return--s>0&&(h=f.apply(this,arguments)),s<=1&&(f=e),h}}o(jS,"before");var x0=it(function(s,f,h){var w=te;if(h.length){var b=Cs(h,ka(x0));w|=K}return ki(s,w,f,h,b)}),qS=it(function(s,f,h){var w=te|Q;if(h.length){var b=Cs(h,ka(qS));w|=K}return ki(f,w,s,h,b)});function VS(s,f,h){f=h?e:f;var w=ki(s,P,e,e,e,e,e,f);return w.placeholder=VS.placeholder,w}o(VS,"curry");function KS(s,f,h){f=h?e:f;var w=ki(s,F,e,e,e,e,e,f);return w.placeholder=KS.placeholder,w}o(KS,"curryRight");function GS(s,f,h){var w,b,L,I,W,G,se=0,le=!1,fe=!1,ke=!0;if(typeof s!="function")throw new qn(d);f=wo(f)||0,gr(h)&&(le=!!h.leading,fe="maxWait"in h,L=fe?tr(wo(h.maxWait)||0,f):L,ke="trailing"in h?!!h.trailing:ke);function Ie(Ar){var Jo=w,Ol=b;return w=b=e,se=Ar,I=s.apply(Ol,Jo),I}o(Ie,"invokeFunc");function $e(Ar){return se=Ar,W=Mt(pt,f),le?Ie(Ar):I}o($e,"leadingEdge");function lt(Ar){var Jo=Ar-G,Ol=Ar-se,dC=f-Jo;return fe?Xr(dC,L-Ol):dC}o(lt,"remainingWait");function je(Ar){var Jo=Ar-G,Ol=Ar-se;return G===e||Jo>=f||Jo<0||fe&&Ol>=L}o(je,"shouldInvoke");function pt(){var Ar=Zm();if(je(Ar))return mt(Ar);W=Mt(pt,lt(Ar))}o(pt,"timerExpired");function mt(Ar){return W=e,ke&&w?Ie(Ar):(w=b=e,I)}o(mt,"trailingEdge");function Vi(){W!==e&&Ca(W),se=0,w=G=b=W=e}o(Vi,"cancel");function ci(){return W===e?I:mt(Zm())}o(ci,"flush");function Ki(){var Ar=Zm(),Jo=je(Ar);if(w=arguments,b=this,G=Ar,Jo){if(W===e)return $e(G);if(fe)return Ca(W),W=Mt(pt,f),Ie(G)}return W===e&&(W=Mt(pt,f)),I}return o(Ki,"debounced"),Ki.cancel=Vi,Ki.flush=ci,Ki}o(GS,"debounce");var aN=it(function(s,f){return Sm(s,1,f)}),uN=it(function(s,f,h){return Sm(s,wo(f)||0,h)});function fN(s){return ki(s,de)}o(fN,"flip");function Jm(s,f){if(typeof s!="function"||f!=null&&typeof f!="function")throw new qn(d);var h=o(function(){var w=arguments,b=f?f.apply(this,w):w[0],L=h.cache;if(L.has(b))return L.get(b);var I=s.apply(this,w);return h.cache=L.set(b,I)||L,I},"memoized");return h.cache=new(Jm.Cache||vr),h}o(Jm,"memoize"),Jm.Cache=vr;function ev(s){if(typeof s!="function")throw new qn(d);return function(){var f=arguments;switch(f.length){case 0:return!s.call(this);case 1:return!s.call(this,f[0]);case 2:return!s.call(this,f[0],f[1]);case 3:return!s.call(this,f[0],f[1],f[2])}return!s.apply(this,f)}}o(ev,"negate");function cN(s){return jS(2,s)}o(cN,"once");var pN=h0(function(s,f){f=f.length==1&&nt(f[0])?Ct(f[0],wr(He())):Ct(en(f,1),wr(He()));var h=f.length;return it(function(w){for(var b=-1,L=Xr(w.length,h);++b=f}),qu=va(function(){return arguments}())?va:function(s){return Sr(s)&&Ze.call(s,"callee")&&!zf.call(s,"callee")},nt=Z.isArray,kN=Af?wr(Af):u0;function Oi(s){return s!=null&&tv(s.length)&&!Tl(s)}o(Oi,"isArrayLike");function Mr(s){return Sr(s)&&Oi(s)}o(Mr,"isArrayLikeObject");function ON(s){return s===!0||s===!1||Sr(s)&&Ur(s)==zt}o(ON,"isBoolean");var Pa=bu||M0,LN=Df?wr(Df):ga;function NN(s){return Sr(s)&&s.nodeType===1&&!gd(s)}o(NN,"isElement");function PN(s){if(s==null)return!0;if(Oi(s)&&(nt(s)||typeof s=="string"||typeof s.splice=="function"||Pa(s)||gc(s)||qu(s)))return!s.length;var f=mn(s);if(f==qt||f==Gt)return!s.size;if(ee(s))return!rc(s).length;for(var h in s)if(Ze.call(s,h))return!1;return!0}o(PN,"isEmpty");function MN(s,f){return ya(s,f)}o(MN,"isEqual");function AN(s,f,h){h=typeof h=="function"?h:e;var w=h?h(s,f):e;return w===e?ya(s,f,e,h):!!w}o(AN,"isEqualWith");function C0(s){if(!Sr(s))return!1;var f=Ur(s);return f==et||f==ne||typeof s.message=="string"&&typeof s.name=="string"&&!gd(s)}o(C0,"isError");function DN(s){return typeof s=="number"&&cm(s)}o(DN,"isFinite");function Tl(s){if(!gr(s))return!1;var f=Ur(s);return f==Tr||f==jt||f==br||f==ii}o(Tl,"isFunction");function XS(s){return typeof s=="number"&&s==ot(s)}o(XS,"isInteger");function tv(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Ke}o(tv,"isLength");function gr(s){var f=typeof s;return s!=null&&(f=="object"||f=="function")}o(gr,"isObject");function Sr(s){return s!=null&&typeof s=="object"}o(Sr,"isObjectLike");var QS=wu?wr(wu):bm;function RN(s,f){return s===f||xl(s,f,Oa(f))}o(RN,"isMatch");function FN(s,f,h){return h=typeof h=="function"?h:e,xl(s,f,Oa(f),h)}o(FN,"isMatchWith");function IN(s){return ZS(s)&&s!=+s}o(IN,"isNaN");function HN(s){if(z(s))throw new Ye(l);return wa(s)}o(HN,"isNative");function WN(s){return s===null}o(WN,"isNull");function BN(s){return s==null}o(BN,"isNil");function ZS(s){return typeof s=="number"||Sr(s)&&Ur(s)==xe}o(ZS,"isNumber");function gd(s){if(!Sr(s)||Ur(s)!=an)return!1;var f=la(s);if(f===null)return!0;var h=Ze.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&co.call(h)==Ky}o(gd,"isPlainObject");var _0=xu?wr(xu):Du;function UN(s){return XS(s)&&s>=-Ke&&s<=Ke}o(UN,"isSafeInteger");var JS=ea?wr(ea):Ru;function rv(s){return typeof s=="string"||!nt(s)&&Sr(s)&&Ur(s)==dr}o(rv,"isString");function qi(s){return typeof s=="symbol"||Sr(s)&&Ur(s)==ft}o(qi,"isSymbol");var gc=ta?wr(ta):Tm;function zN(s){return s===e}o(zN,"isUndefined");function $N(s){return Sr(s)&&mn(s)==yr}o($N,"isWeakMap");function jN(s){return Sr(s)&&Ur(s)==Ii}o(jN,"isWeakSet");var qN=Pt(Is),VN=Pt(function(s,f){return s<=f});function eC(s){if(!s)return[];if(Oi(s))return rv(s)?_i(s):zr(s);if(Ts&&s[Ts])return rm(s[Ts]());var f=mn(s),h=f==qt?If:f==Gt?Hf:yc;return h(s)}o(eC,"toArray");function kl(s){if(!s)return s===0?s:0;if(s=wo(s),s===Ve||s===-Ve){var f=s<0?-1:1;return f*Ge}return s===s?s:0}o(kl,"toFinite");function ot(s){var f=kl(s),h=f%1;return f===f?h?f-h:f:0}o(ot,"toInteger");function tC(s){return s?yl(ot(s),0,ut):0}o(tC,"toLength");function wo(s){if(typeof s=="number")return s;if(qi(s))return Zt;if(gr(s)){var f=typeof s.valueOf=="function"?s.valueOf():s;s=gr(f)?f+"":f}if(typeof s!="string")return s===0?s:+s;s=jn(s);var h=Ho.test(s);return h||Wo.test(s)?Ap(s.slice(2),h?2:8):fu.test(s)?Zt:+s}o(wo,"toNumber");function rC(s){return Vn(s,Li(s))}o(rC,"toPlainObject");function KN(s){return s?yl(ot(s),-Ke,Ke):s===0?s:0}o(KN,"toSafeInteger");function At(s){return s==null?"":hn(s)}o(At,"toString");var GN=_a(function(s,f){if(ee(f)||Oi(f)){Vn(f,xn(f),s);return}for(var h in f)Ze.call(f,h)&&Pu(s,h,f[h])}),nC=_a(function(s,f){Vn(f,Li(f),s)}),nv=_a(function(s,f,h,w){Vn(f,Li(f),s,w)}),YN=_a(function(s,f,h,w){Vn(f,xn(f),s,w)}),XN=Xo(Qp);function QN(s,f){var h=ho(s);return f==null?h:Xp(h,f)}o(QN,"create");var ZN=it(function(s,f){s=ht(s);var h=-1,w=f.length,b=w>2?f[2]:e;for(b&&C(f[0],f[1],b)&&(w=1);++h1),L}),Vn(s,dc(s),h),w&&(h=Pn(h,O|D|Y,Vm));for(var b=f.length;b--;)Hu(h,f[b]);return h});function vP(s,f){return oC(s,ev(He(f)))}o(vP,"omitBy");var gP=Xo(function(s,f){return s==null?{}:Nm(s,f)});function oC(s,f){if(s==null)return{};var h=Ct(dc(s),function(w){return[w]});return f=He(f),Pm(s,h,function(w,b){return f(w,b[0])})}o(oC,"pickBy");function yP(s,f,h){f=ji(f,s);var w=-1,b=f.length;for(b||(b=1,s=e);++wf){var w=s;s=f,f=w}if(h||s%1||f%1){var b=Ls();return Xr(s+b*(f-s+Mp("1e-"+((b+"").length-1))),f)}return ic(s,f)}o(OP,"random");var LP=Ea(function(s,f,h){return f=f.toLowerCase(),s+(h?aC(f):f)});function aC(s){return T0(At(s).toLowerCase())}o(aC,"capitalize");function uC(s){return s=At(s),s&&s.replace(Of,ul).replace(Pp,"")}o(uC,"deburr");function NP(s,f,h){s=At(s),f=hn(f);var w=s.length;h=h===e?w:yl(ot(h),0,w);var b=h;return h-=f.length,h>=0&&s.slice(h,b)==f}o(NP,"endsWith");function PP(s){return s=At(s),s&&fs.test(s)?s.replace(er,Bi):s}o(PP,"escape");function MP(s){return s=At(s),s&&bf.test(s)?s.replace(el,"\\$&"):s}o(MP,"escapeRegExp");var AP=Ea(function(s,f,h){return s+(h?"-":"")+f.toLowerCase()}),DP=Ea(function(s,f,h){return s+(h?" ":"")+f.toLowerCase()}),RP=zm("toLowerCase");function FP(s,f,h){s=At(s),f=ot(f);var w=f?fl(s):0;if(!f||w>=f)return s;var b=(f-w)/2;return cc(fa(b),h)+s+cc(ua(b),h)}o(FP,"pad");function IP(s,f,h){s=At(s),f=ot(f);var w=f?fl(s):0;return f&&w>>0,h?(s=At(s),s&&(typeof f=="string"||f!=null&&!_0(f))&&(f=hn(f),!f&&Ui(s))?Ws(_i(s),0,h):s.split(f,h)):[]}o($P,"split");var jP=Ea(function(s,f,h){return s+(h?" ":"")+T0(f)});function qP(s,f,h){return s=At(s),h=h==null?0:yl(ot(h),0,s.length),f=hn(f),s.slice(h,h+f.length)==f}o(qP,"startsWith");function VP(s,f,h){var w=T.templateSettings;h&&C(s,f,h)&&(f=e),s=At(s),f=nv({},f,w,pc);var b=nv({},f.imports,w.imports,pc),L=xn(b),I=Ci(b,L),W,G,se=0,le=f.interpolate||Ft,fe="__p += '",ke=_s((f.escape||Ft).source+"|"+le.source+"|"+(le===Js?kf:Ft).source+"|"+(f.evaluate||Ft).source+"|$","g"),Ie="//# sourceURL="+(Ze.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zl+"]")+` -`;s.replace(ke,function(je,pt,mt,Vi,ci,Ki){return mt||(mt=Vi),fe+=s.slice(se,Ki).replace(Ne,tm),pt&&(W=!0,fe+=`' + +`)}o(m,"insertWrapDetails");function g(s){return rt(s)||ju(s)||!!(fl&&s&&s[fl])}o(g,"isFlattenable");function S(s,f){var h=typeof s;return f=f??Ke,!!f&&(h=="number"||h!="symbol"&&Bl.test(s))&&s>-1&&s%1==0&&s0){if(++f>=qe)return arguments[0]}else f=0;return s.apply(e,arguments)}}o(sr,"shortOut");function Ur(s,f){var h=-1,y=s.length,E=y-1;for(f=f===e?y:f;++h1?s[f-1]:e;return h=typeof h=="function"?(s.pop(),h):e,qS(s,h)});function VS(s){var f=T(s);return f.__chain__=!0,f}o(VS,"chain");function ML(s,f){return f(s),s}o(ML,"tap");function Ym(s,f){return f(s)}o(Ym,"thru");var AL=Ko(function(s){var f=s.length,h=f?s[0]:0,y=this.__wrapped__,E=o(function(L){return Qp(L,s)},"interceptor");return f>1||this.__actions__.length||!(y instanceof ct)||!S(h)?this.thru(E):(y=y.slice(h,+h+(f?1:0)),y.__actions__.push({func:Ym,args:[E],thisArg:e}),new kn(y,this.__chain__).thru(function(L){return f&&!L.length&&L.push(e),L}))});function DL(){return VS(this)}o(DL,"wrapperChain");function RL(){return new kn(this.value(),this.__chain__)}o(RL,"wrapperCommit");function FL(){this.__values__===e&&(this.__values__=sC(this.value()));var s=this.__index__>=this.__values__.length,f=s?e:this.__values__[this.__index__++];return{done:s,value:f}}o(FL,"wrapperNext");function IL(){return this}o(IL,"wrapperToIterator");function HL(s){for(var f,h=this;h instanceof zf;){var y=mn(h);y.__index__=0,y.__values__=e,f?E.__wrapped__=y:f=y;var E=y;h=h.__wrapped__}return E.__wrapped__=s,f}o(HL,"wrapperPlant");function WL(){var s=this.__wrapped__;if(s instanceof ct){var f=s;return this.__actions__.length&&(f=new ct(this)),f=f.reverse(),f.__actions__.push({func:Ym,args:[w0],thisArg:e}),new kn(f,this.__chain__)}return this.thru(w0)}o(WL,"wrapperReverse");function BL(){return Mm(this.__wrapped__,this.__actions__)}o(BL,"wrapperValue");var UL=lc(function(s,f,h){Ze.call(s,h)?++s[h]:ho(s,h,1)});function zL(s,f,h){var y=rt(s)?wu:Kf;return h&&C(s,f,h)&&(f=e),y(s,He(f,3))}o(zL,"every");function jL(s,f){var h=rt(s)?ro:Jp;return h(s,He(f,3))}o(jL,"filter");var $L=pd(dc),qL=pd(US);function VL(s,f){return Qr(Xm(s,f),1)}o(VL,"flatMap");function KL(s,f){return Qr(Xm(s,f),Ve)}o(KL,"flatMapDeep");function GL(s,f,h){return h=h===e?1:it(h),Qr(Xm(s,f),h)}o(GL,"flatMapDepth");function KS(s,f){var h=rt(s)?Wn:ii;return h(s,He(f,3))}o(KS,"forEach");function GS(s,f){var h=rt(s)?Rp:Vf;return h(s,He(f,3))}o(GS,"forEachRight");var YL=lc(function(s,f,h){Ze.call(s,h)?s[h].push(f):ho(s,h,[f])});function XL(s,f,h,y){s=Ti(s)?s:mc(s),h=h&&!y?it(h):0;var E=s.length;return h<0&&(h=Zt(E+h,0)),tv(s)?h<=E&&s.indexOf(f,h)>-1:!!E&&Uo(s,f,h)>-1}o(XL,"includes");var QL=nt(function(s,f,h){var y=-1,E=typeof f=="function",L=Ti(s)?Z(s.length):[];return ii(s,function(I){L[++y]=E?Tn(f,I,h):ca(I,f,h)}),L}),ZL=lc(function(s,f,h){ho(s,h,f)});function Xm(s,f){var h=rt(s)?xt:va;return h(s,He(f,3))}o(Xm,"map");function JL(s,f,h,y){return s==null?[]:(rt(f)||(f=f==null?[]:[f]),h=y?e:h,rt(h)||(h=h==null?[]:[h]),fn(s,f,h))}o(JL,"orderBy");var eN=lc(function(s,f,h){s[h?0:1].push(f)},function(){return[[],[]]});function tN(s,f,h){var y=rt(s)?Zl:U,E=arguments.length<3;return y(s,He(f,4),h,E,ii)}o(tN,"reduce");function rN(s,f,h){var y=rt(s)?Fp:U,E=arguments.length<3;return y(s,He(f,4),h,E,Vf)}o(rN,"reduceRight");function nN(s,f){var h=rt(s)?ro:Jp;return h(s,Jm(He(f,3)))}o(nN,"reject");function iN(s){var f=rt(s)?$f:d0;return f(s)}o(iN,"sample");function oN(s,f,h){(h?C(s,f,h):f===e)?f=1:f=it(f);var y=rt(s)?Ls:As;return y(s,f)}o(oN,"sampleSize");function sN(s){var f=rt(s)?gm:qo;return f(s)}o(sN,"shuffle");function lN(s){if(s==null)return 0;if(Ti(s))return tv(s)?ll(s):s.length;var f=pn(s);return f==jt||f==Vt?s.size:Jf(s).length}o(lN,"size");function aN(s,f,h){var y=rt(s)?io:h0;return h&&C(s,f,h)&&(f=e),y(s,He(f,3))}o(aN,"some");var uN=nt(function(s,f){if(s==null)return[];var h=f.length;return h>1&&C(s,f[0],f[1])?f=[]:h>2&&C(f[0],f[1],f[2])&&(f=[f[0]]),fn(s,Qr(f,1),[])}),Qm=Xy||function(){return Ot.Date.now()};function fN(s,f){if(typeof f!="function")throw new zn(d);return s=it(s),function(){if(--s<1)return f.apply(this,arguments)}}o(fN,"after");function YS(s,f,h){return f=h?e:f,f=s&&f==null?s.length:f,Ei(s,ue,e,e,e,e,f)}o(YS,"ary");function XS(s,f){var h;if(typeof f!="function")throw new zn(d);return s=it(s),function(){return--s>0&&(h=f.apply(this,arguments)),s<=1&&(f=e),h}}o(XS,"before");var S0=nt(function(s,f,h){var y=te;if(h.length){var E=gs(h,_a(S0));y|=K}return Ei(s,y,f,h,E)}),QS=nt(function(s,f,h){var y=te|Q;if(h.length){var E=gs(h,_a(QS));y|=K}return Ei(f,y,s,h,E)});function ZS(s,f,h){f=h?e:f;var y=Ei(s,P,e,e,e,e,e,f);return y.placeholder=ZS.placeholder,y}o(ZS,"curry");function JS(s,f,h){f=h?e:f;var y=Ei(s,F,e,e,e,e,e,f);return y.placeholder=JS.placeholder,y}o(JS,"curryRight");function eC(s,f,h){var y,E,L,I,B,G,se=0,le=!1,fe=!1,ke=!0;if(typeof s!="function")throw new zn(d);f=go(f)||0,mr(h)&&(le=!!h.leading,fe="maxWait"in h,L=fe?Zt(go(h.maxWait)||0,f):L,ke="trailing"in h?!!h.trailing:ke);function Ie(Pr){var Xo=y,El=E;return y=E=e,se=Pr,I=s.apply(El,Xo),I}o(Ie,"invokeFunc");function je(Pr){return se=Pr,B=Nt(pt,f),le?Ie(Pr):I}o(je,"leadingEdge");function lt(Pr){var Xo=Pr-G,El=Pr-se,wC=f-Xo;return fe?Kr(wC,L-El):wC}o(lt,"remainingWait");function $e(Pr){var Xo=Pr-G,El=Pr-se;return G===e||Xo>=f||Xo<0||fe&&El>=L}o($e,"shouldInvoke");function pt(){var Pr=Qm();if($e(Pr))return mt(Pr);B=Nt(pt,lt(Pr))}o(pt,"timerExpired");function mt(Pr){return B=e,ke&&y?Ie(Pr):(y=E=e,I)}o(mt,"trailingEdge");function $i(){B!==e&&ya(B),se=0,y=G=E=B=e}o($i,"cancel");function li(){return B===e?I:mt(Qm())}o(li,"flush");function qi(){var Pr=Qm(),Xo=$e(Pr);if(y=arguments,E=this,G=Pr,Xo){if(B===e)return je(G);if(fe)return ya(B),B=Nt(pt,f),Ie(G)}return B===e&&(B=Nt(pt,f)),I}return o(qi,"debounced"),qi.cancel=$i,qi.flush=li,qi}o(eC,"debounce");var cN=nt(function(s,f){return xm(s,1,f)}),pN=nt(function(s,f,h){return xm(s,go(f)||0,h)});function dN(s){return Ei(s,de)}o(dN,"flip");function Zm(s,f){if(typeof s!="function"||f!=null&&typeof f!="function")throw new zn(d);var h=o(function(){var y=arguments,E=f?f.apply(this,y):y[0],L=h.cache;if(L.has(E))return L.get(E);var I=s.apply(this,y);return h.cache=L.set(E,I)||L,I},"memoized");return h.cache=new(Zm.Cache||hr),h}o(Zm,"memoize"),Zm.Cache=hr;function Jm(s){if(typeof s!="function")throw new zn(d);return function(){var f=arguments;switch(f.length){case 0:return!s.call(this);case 1:return!s.call(this,f[0]);case 2:return!s.call(this,f[0],f[1]);case 3:return!s.call(this,f[0],f[1],f[2])}return!s.apply(this,f)}}o(Jm,"negate");function hN(s){return XS(2,s)}o(hN,"once");var mN=m0(function(s,f){f=f.length==1&&rt(f[0])?xt(f[0],gr(He())):xt(Qr(f,1),gr(He()));var h=f.length;return nt(function(y){for(var E=-1,L=Kr(y.length,h);++E=f}),ju=pa(function(){return arguments}())?pa:function(s){return wr(s)&&Ze.call(s,"callee")&&!Wf.call(s,"callee")},rt=Z.isArray,NN=Nf?gr(Nf):f0;function Ti(s){return s!=null&&ev(s.length)&&!_l(s)}o(Ti,"isArrayLike");function Nr(s){return wr(s)&&Ti(s)}o(Nr,"isArrayLikeObject");function PN(s){return s===!0||s===!1||wr(s)&&Wr(s)==Bt}o(PN,"isBoolean");var ka=_u||A0,MN=Pf?gr(Pf):da;function AN(s){return wr(s)&&s.nodeType===1&&!gd(s)}o(AN,"isElement");function DN(s){if(s==null)return!0;if(Ti(s)&&(rt(s)||typeof s=="string"||typeof s.splice=="function"||ka(s)||hc(s)||ju(s)))return!s.length;var f=pn(s);if(f==jt||f==Vt)return!s.size;if(ee(s))return!Jf(s).length;for(var h in s)if(Ze.call(s,h))return!1;return!0}o(DN,"isEmpty");function RN(s,f){return ha(s,f)}o(RN,"isEqual");function FN(s,f,h){h=typeof h=="function"?h:e;var y=h?h(s,f):e;return y===e?ha(s,f,e,h):!!y}o(FN,"isEqualWith");function _0(s){if(!wr(s))return!1;var f=Wr(s);return f==et||f==ne||typeof s.message=="string"&&typeof s.name=="string"&&!gd(s)}o(_0,"isError");function IN(s){return typeof s=="number"&&fm(s)}o(IN,"isFinite");function _l(s){if(!mr(s))return!1;var f=Wr(s);return f==br||f==zt||f==_r||f==ei}o(_l,"isFunction");function rC(s){return typeof s=="number"&&s==it(s)}o(rC,"isInteger");function ev(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Ke}o(ev,"isLength");function mr(s){var f=typeof s;return s!=null&&(f=="object"||f=="function")}o(mr,"isObject");function wr(s){return s!=null&&typeof s=="object"}o(wr,"isObjectLike");var nC=gu?gr(gu):bm;function HN(s,f){return s===f||gl(s,f,ba(f))}o(HN,"isMatch");function WN(s,f,h){return h=typeof h=="function"?h:e,gl(s,f,ba(f),h)}o(WN,"isMatchWith");function BN(s){return iC(s)&&s!=+s}o(BN,"isNaN");function UN(s){if(z(s))throw new Ye(l);return ma(s)}o(UN,"isNative");function zN(s){return s===null}o(zN,"isNull");function jN(s){return s==null}o(jN,"isNil");function iC(s){return typeof s=="number"||wr(s)&&Wr(s)==xe}o(iC,"isNumber");function gd(s){if(!wr(s)||Wr(s)!=on)return!1;var f=na(s);if(f===null)return!0;var h=Ze.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&uo.call(h)==Gy}o(gd,"isPlainObject");var b0=yu?gr(yu):Mu;function $N(s){return rC(s)&&s>=-Ke&&s<=Ke}o($N,"isSafeInteger");var oC=Xl?gr(Xl):Au;function tv(s){return typeof s=="string"||!rt(s)&&wr(s)&&Wr(s)==cr}o(tv,"isString");function ji(s){return typeof s=="symbol"||wr(s)&&Wr(s)==ft}o(ji,"isSymbol");var hc=Ql?gr(Ql):Em;function qN(s){return s===e}o(qN,"isUndefined");function VN(s){return wr(s)&&pn(s)==vr}o(VN,"isWeakMap");function KN(s){return wr(s)&&Wr(s)==Ri}o(KN,"isWeakSet");var GN=Lt(Ms),YN=Lt(function(s,f){return s<=f});function sC(s){if(!s)return[];if(Ti(s))return tv(s)?Si(s):Br(s);if(Ss&&s[Ss])return tm(s[Ss]());var f=pn(s),h=f==jt?Df:f==Vt?Rf:mc;return h(s)}o(sC,"toArray");function bl(s){if(!s)return s===0?s:0;if(s=go(s),s===Ve||s===-Ve){var f=s<0?-1:1;return f*Ge}return s===s?s:0}o(bl,"toFinite");function it(s){var f=bl(s),h=f%1;return f===f?h?f-h:f:0}o(it,"toInteger");function lC(s){return s?ml(it(s),0,ut):0}o(lC,"toLength");function go(s){if(typeof s=="number")return s;if(ji(s))return Yt;if(mr(s)){var f=typeof s.valueOf=="function"?s.valueOf():s;s=mr(f)?f+"":f}if(typeof s!="string")return s===0?s:+s;s=Un(s);var h=Ro.test(s);return h||Fo.test(s)?Ap(s.slice(2),h?2:8):au.test(s)?Yt:+s}o(go,"toNumber");function aC(s){return jn(s,ki(s))}o(aC,"toPlainObject");function XN(s){return s?ml(it(s),-Ke,Ke):s===0?s:0}o(XN,"toSafeInteger");function Pt(s){return s==null?"":cn(s)}o(Pt,"toString");var QN=wa(function(s,f){if(ee(f)||Ti(f)){jn(f,gn(f),s);return}for(var h in f)Ze.call(f,h)&&Lu(s,h,f[h])}),uC=wa(function(s,f){jn(f,ki(f),s)}),rv=wa(function(s,f,h,y){jn(f,ki(f),s,y)}),ZN=wa(function(s,f,h,y){jn(f,gn(f),s,y)}),JN=Ko(Qp);function eP(s,f){var h=co(s);return f==null?h:Xp(h,f)}o(eP,"create");var tP=nt(function(s,f){s=ht(s);var h=-1,y=f.length,E=y>2?f[2]:e;for(E&&C(f[0],f[1],E)&&(y=1);++h1),L}),jn(s,fc(s),h),y&&(h=On(h,O|D|Y,qm));for(var E=f.length;E--;)Fu(h,f[E]);return h});function wP(s,f){return cC(s,Jm(He(f)))}o(wP,"omitBy");var xP=Ko(function(s,f){return s==null?{}:Lm(s,f)});function cC(s,f){if(s==null)return{};var h=xt(fc(s),function(y){return[y]});return f=He(f),Nm(s,h,function(y,E){return f(y,E[0])})}o(cC,"pickBy");function SP(s,f,h){f=zi(f,s);var y=-1,E=f.length;for(E||(E=1,s=e);++yf){var y=s;s=f,f=y}if(h||s%1||f%1){var E=bs();return Kr(s+E*(f-s+Mp("1e-"+((E+"").length-1))),f)}return tc(s,f)}o(PP,"random");var MP=xa(function(s,f,h){return f=f.toLowerCase(),s+(h?hC(f):f)});function hC(s){return k0(Pt(s).toLowerCase())}o(hC,"capitalize");function mC(s){return s=Pt(s),s&&s.replace(Ef,sl).replace(Pp,"")}o(mC,"deburr");function AP(s,f,h){s=Pt(s),f=cn(f);var y=s.length;h=h===e?y:ml(it(h),0,y);var E=h;return h-=f.length,h>=0&&s.slice(h,E)==f}o(AP,"endsWith");function DP(s){return s=Pt(s),s&&os.test(s)?s.replace(Qt,Hi):s}o(DP,"escape");function RP(s){return s=Pt(s),s&&Cf.test(s)?s.replace(Qs,"\\$&"):s}o(RP,"escapeRegExp");var FP=xa(function(s,f,h){return s+(h?"-":"")+f.toLowerCase()}),IP=xa(function(s,f,h){return s+(h?" ":"")+f.toLowerCase()}),HP=Um("toLowerCase");function WP(s,f,h){s=Pt(s),f=it(f);var y=f?ll(s):0;if(!f||y>=f)return s;var E=(f-y)/2;return ac(sa(E),h)+s+ac(oa(E),h)}o(WP,"pad");function BP(s,f,h){s=Pt(s),f=it(f);var y=f?ll(s):0;return f&&y>>0,h?(s=Pt(s),s&&(typeof f=="string"||f!=null&&!b0(f))&&(f=cn(f),!f&&Wi(s))?Ds(Si(s),0,h):s.split(f,h)):[]}o(VP,"split");var KP=xa(function(s,f,h){return s+(h?" ":"")+k0(f)});function GP(s,f,h){return s=Pt(s),h=h==null?0:ml(it(h),0,s.length),f=cn(f),s.slice(h,h+f.length)==f}o(GP,"startsWith");function YP(s,f,h){var y=T.templateSettings;h&&C(s,f,h)&&(f=e),s=Pt(s),f=rv({},f,y,uc);var E=rv({},f.imports,y.imports,uc),L=gn(E),I=xi(E,L),B,G,se=0,le=f.interpolate||Dt,fe="__p += '",ke=ys((f.escape||Dt).source+"|"+le.source+"|"+(le===Xs?bf:Dt).source+"|"+(f.evaluate||Dt).source+"|$","g"),Ie="//# sourceURL="+(Ze.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gl+"]")+` +`;s.replace(ke,function($e,pt,mt,$i,li,qi){return mt||(mt=$i),fe+=s.slice(se,qi).replace(Ne,em),pt&&(B=!0,fe+=`' + __e(`+pt+`) + -'`),ci&&(G=!0,fe+=`'; -`+ci+`; +'`),li&&(G=!0,fe+=`'; +`+li+`; __p += '`),mt&&(fe+=`' + ((__t = (`+mt+`)) == null ? '' : __t) + -'`),se=Ki+je.length,je}),fe+=`'; -`;var $e=Ze.call(f,"variable")&&f.variable;if(!$e)fe=`with (obj) { +'`),se=qi+$e.length,$e}),fe+=`'; +`;var je=Ze.call(f,"variable")&&f.variable;if(!je)fe=`with (obj) { `+fe+` } -`;else if(ps.test($e))throw new Ye(v);fe=(G?fe.replace(Jt,""):fe).replace(zl,"$1").replace(Rt,"$1;"),fe="function("+($e||"obj")+`) { -`+($e?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(W?", __e = _.escape":"")+(G?`, __j = Array.prototype.join; +`;else if(ls.test(je))throw new Ye(v);fe=(G?fe.replace(Xt,""):fe).replace(Hl,"$1").replace(At,"$1;"),fe="function("+(je||"obj")+`) { +`+(je?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(G?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+fe+`return __p -}`;var lt=cC(function(){return _t(L,Ie+"return "+fe).apply(e,I)});if(lt.source=fe,C0(lt))throw lt;return lt}o(VP,"template");function KP(s){return At(s).toLowerCase()}o(KP,"toLower");function GP(s){return At(s).toUpperCase()}o(GP,"toUpper");function YP(s,f,h){if(s=At(s),s&&(h||f===e))return jn(s);if(!s||!(f=hn(f)))return s;var w=_i(s),b=_i(f),L=Wi(w,b),I=lo(w,b)+1;return Ws(w,L,I).join("")}o(YP,"trim");function XP(s,f,h){if(s=At(s),s&&(h||f===e))return s.slice(0,Wf(s)+1);if(!s||!(f=hn(f)))return s;var w=_i(s),b=lo(w,_i(f))+1;return Ws(w,0,b).join("")}o(XP,"trimEnd");function QP(s,f,h){if(s=At(s),s&&(h||f===e))return s.replace(tl,"");if(!s||!(f=hn(f)))return s;var w=_i(s),b=Wi(w,_i(f));return Ws(w,b).join("")}o(QP,"trimStart");function ZP(s,f){var h=ge,w=we;if(gr(f)){var b="separator"in f?f.separator:b;h="length"in f?ot(f.length):h,w="omission"in f?hn(f.omission):w}s=At(s);var L=s.length;if(Ui(s)){var I=_i(s);L=I.length}if(h>=L)return s;var W=h-fl(w);if(W<1)return w;var G=I?Ws(I,0,W).join(""):s.slice(0,W);if(b===e)return G+w;if(I&&(W+=G.length-W),_0(b)){if(s.slice(W).search(b)){var se,le=G;for(b.global||(b=_s(b.source,At(rl.exec(b))+"g")),b.lastIndex=0;se=b.exec(le);)var fe=se.index;G=G.slice(0,fe===e?W:fe)}}else if(s.indexOf(hn(b),W)!=W){var ke=G.lastIndexOf(b);ke>-1&&(G=G.slice(0,ke))}return G+w}o(ZP,"truncate");function JP(s){return s=At(s),s&&oi.test(s)?s.replace(Ir,Bf):s}o(JP,"unescape");var eM=Ea(function(s,f,h){return s+(h?" ":"")+f.toUpperCase()}),T0=zm("toUpperCase");function fC(s,f,h){return s=At(s),f=h?e:f,f===e?ao(s)?zi(s):Ff(s):s.match(f)||[]}o(fC,"words");var cC=it(function(s,f){try{return Ln(s,e,f)}catch(h){return C0(h)?h:new Ye(h)}}),tM=Xo(function(s,f){return zn(f,function(h){h=Lt(h),vo(s,h,x0(s[h],s))}),s});function rM(s){var f=s==null?0:s.length,h=He();return s=f?Ct(s,function(w){if(typeof w[1]!="function")throw new qn(d);return[h(w[0]),w[1]]}):[],it(function(w){for(var b=-1;++bKe)return[];var h=ut,w=Xr(s,ut);f=He(f),s-=ut;for(var b=hr(w,f);++h0||f<0)?new ct(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),f!==e&&(f=ot(f),h=f<0?h.dropRight(-f):h.take(f-s)),h)},ct.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},ct.prototype.toArray=function(){return this.take(ut)},ui(ct.prototype,function(s,f){var h=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),b=T[w?"take"+(f=="last"?"Right":""):f],L=w||/^find/.test(f);!b||(T.prototype[f]=function(){var I=this.__wrapped__,W=w?[1]:arguments,G=I instanceof ct,se=W[0],le=G||nt(I),fe=o(function(pt){var mt=b.apply(T,oo([pt],W));return w&&ke?mt[0]:mt},"interceptor");le&&h&&typeof se=="function"&&se.length!=1&&(G=le=!1);var ke=this.__chain__,Ie=!!this.__actions__.length,$e=L&&!ke,lt=G&&!Ie;if(!L&&le){I=lt?I:new ct(this);var je=s.apply(I,W);return je.__actions__.push({func:Xm,args:[fe],thisArg:e}),new Nn(je,ke)}return $e&<?s.apply(this,W):(je=this.thru(fe),$e?w?je.value()[0]:je.value():je)})}),zn(["pop","push","shift","sort","splice","unshift"],function(s){var f=sa[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",w=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var b=arguments;if(w&&!this.__chain__){var L=this.value();return f.apply(nt(L)?L:[],b)}return this[h](function(I){return f.apply(nt(I)?I:[],b)})}}),ui(ct.prototype,function(s,f){var h=T[f];if(h){var w=h.name+"";Ze.call(pa,w)||(pa[w]=[]),pa[w].push({name:f,func:h})}}),pa[Wu(e,Q).name]=[{name:"wrapper",func:e}],ct.prototype.clone=r0,ct.prototype.reverse=n0,ct.prototype.value=Up,T.prototype.at=NL,T.prototype.chain=PL,T.prototype.commit=ML,T.prototype.next=AL,T.prototype.plant=RL,T.prototype.reverse=FL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=IL,T.prototype.first=T.prototype.head,Ts&&(T.prototype[Ts]=DL),T},"runInContext"),uo=lm();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Nt._=uo,define(function(){return uo})):Wr?((Wr.exports=uo)._=uo,gs._=uo):Nt._=uo}).call(tp)});var ST=fr((hx,mx)=>{(function(e,t){typeof hx=="object"&&typeof mx!="undefined"?mx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})(hx,function(){"use strict";var e=o(function(l,d){return t(l.slice(),d)},"stable");e.inplace=function(l,d){var v=t(l,d);return v!==l&&i(v,null,l.length,l),l};function t(l,d){typeof d!="function"&&(d=o(function(O,D){return String(O).localeCompare(D)},"comp"));var v=l.length;if(v<=1)return l;for(var p=new Array(v),y=1;yy&&(Y=y),B>y&&(B=y),X=D,te=Y;;)if(X{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var i=[],l=0;l{var WF=typeof Element!="undefined",BF=typeof Map=="function",UF=typeof Set=="function",zF=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ly(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i,l,d;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(l=i;l--!=0;)if(!ly(e[l],t[l]))return!1;return!0}var v;if(BF&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;for(v=e.entries();!(l=v.next()).done;)if(!ly(l.value[1],t.get(l.value[0])))return!1;return!0}if(UF&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;return!0}if(zF&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(l=i;l--!=0;)if(e[l]!==t[l])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(d=Object.keys(e),i=d.length,i!==Object.keys(t).length)return!1;for(l=i;l--!=0;)if(!Object.prototype.hasOwnProperty.call(t,d[l]))return!1;if(WF&&e instanceof Element)return!1;for(l=i;l--!=0;)if(!((d[l]==="_owner"||d[l]==="__v"||d[l]==="__o")&&e.$$typeof)&&!ly(e[d[l]],t[d[l]]))return!1;return!0}return e!==e&&t!==t}o(ly,"equal");nk.exports=o(function(t,i){try{return ly(t,i)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},"isEqual")});var jk=fr((oS,sS)=>{(function(e,t){typeof oS=="object"&&typeof sS!="undefined"?sS.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(oS,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(e),l=/MSIE \d/.test(e),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),v=/Edge\/(\d+)/.exec(e),p=l||d||v,y=p&&(l?document.documentMode||6:+(v||d)[1]),_=!v&&/WebKit\//.test(e),O=_&&/Qt\/\d+\.\d+/.test(e),D=!v&&/Chrome\//.test(e),Y=/Opera\//.test(e),B=/Apple Computer/.test(navigator.vendor),X=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),te=/PhantomJS/.test(e),Q=B&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),R=/Android/.test(e),P=Q||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),F=Q||/Mac/.test(t),K=/\bCrOS\b/.test(e),V=/win/i.test(t),ue=Y&&e.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Y=!1,_=!0);var ie=F&&(O||Y&&(ue==null||ue<12.11)),de=i||p&&y>=9;function ge(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}o(ge,"classTest");var we=o(function(r,n){var u=r.className,a=ge(n).exec(u);if(a){var c=u.slice(a.index+a[0].length);r.className=u.slice(0,a.index)+(c?a[1]+c:"")}},"rmClass");function qe(r){for(var n=r.childNodes.length;n>0;--n)r.removeChild(r.firstChild);return r}o(qe,"removeChildren");function Je(r,n){return qe(r).appendChild(n)}o(Je,"removeChildrenAndAdd");function Ee(r,n,u,a){var c=document.createElement(r);if(u&&(c.className=u),a&&(c.style.cssText=a),typeof n=="string")c.appendChild(document.createTextNode(n));else if(n)for(var m=0;m=n)return g+(n-m);g+=S-m,g+=u-g%u,m=S+1}}o(bt,"countColumn");var St=o(function(){this.id=null,this.f=null,this.time=0,this.handler=Fr(this.onTimeout,this)},"Delayed");St.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},St.prototype.set=function(r,n){this.f=n;var u=+new Date+r;(!this.id||u=n)return a+Math.min(g,n-c);if(c+=m-a,c+=u-c%u,a=m+1,c>=n)return a}}o(Tr,"findColumn");var jt=[""];function qt(r){for(;jt.length<=r;)jt.push(xe(jt)+" ");return jt[r]}o(qt,"spaceStr");function xe(r){return r[r.length-1]}o(xe,"lst");function kr(r,n){for(var u=[],a=0;a"\x80"&&(r.toUpperCase()!=r.toLowerCase()||un.test(r))}o(Gt,"isWordCharBasic");function dr(r,n){return n?n.source.indexOf("\\w")>-1&&Gt(r)?!0:n.test(r):Gt(r)}o(dr,"isWordChar");function ft(r){for(var n in r)if(r.hasOwnProperty(n)&&r[n])return!1;return!0}o(ft,"isEmpty");var Io=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function yr(r){return r.charCodeAt(0)>=768&&Io.test(r)}o(yr,"isExtendingChar");function Ii(r,n,u){for(;(u<0?n>0:nu?-1:1;;){if(n==u)return n;var c=(n+u)/2,m=a<0?Math.ceil(c):Math.floor(c);if(m==n)return r(m)?n:u;r(m)?u=m:n=m+a}}o(fn,"findFirst");function Hn(r,n,u,a){if(!r)return a(n,u,"ltr",0);for(var c=!1,m=0;mn||n==u&&g.to==n)&&(a(Math.max(g.from,n),Math.min(g.to,u),g.level==1?"rtl":"ltr",m),c=!0)}c||a(n,u,"ltr")}o(Hn,"iterateBidiSections");var vi=null;function gi(r,n,u){var a;vi=null;for(var c=0;cn)return c;m.to==n&&(m.from!=m.to&&u=="before"?a=c:vi=c),m.from==n&&(m.from!=m.to&&u!="before"?a=c:vi=c)}return a??vi}o(gi,"getBidiPartAt");var Wn=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?n.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}o(u,"charType");var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,c=/[stwN]/,m=/[LRr]/,g=/[Lb1n]/,S=/[1n]/;function C(E,N,A){this.level=E,this.from=N,this.to=A}return o(C,"BidiSpan"),function(E,N){var A=N=="ltr"?"L":"R";if(E.length==0||N=="ltr"&&!a.test(E))return!1;for(var j=E.length,z=[],ee=0;ee-1&&(a[n]=c.slice(0,m).concat(c.slice(m+1)))}}}o(he,"off");function be(r,n){var u=J(r,n);if(!!u.length)for(var a=Array.prototype.slice.call(arguments,2),c=0;c0}o(Rt,"hasHandler");function Ir(r){r.prototype.on=function(n,u){H(this,n,u)},r.prototype.off=function(n,u){he(this,n,u)}}o(Ir,"eventMixin");function er(r){r.preventDefault?r.preventDefault():r.returnValue=!1}o(er,"e_preventDefault");function oi(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}o(oi,"e_stopPropagation");function fs(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}o(fs,"e_defaultPrevented");function no(r){er(r),oi(r)}o(no,"e_stop");function yi(r){return r.target||r.srcElement}o(yi,"e_target");function Js(r){var n=r.which;return n==null&&(r.button&1?n=1:r.button&2?n=3:r.button&4&&(n=2)),F&&r.ctrlKey&&n==1&&(n=3),n}o(Js,"e_button");var cs=function(){if(p&&y<9)return!1;var r=Ee("div");return"draggable"in r||"dragDrop"in r}(),cn;function Ep(r){if(cn==null){var n=Ee("span","\u200B");Je(r,Ee("span",[n,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(cn=n.offsetWidth<=1&&n.offsetHeight>2&&!(p&&y<8))}var u=cn?Ee("span","\u200B"):Ee("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}o(Ep,"zeroWidthElement");var el;function bf(r){if(el!=null)return el;var n=Je(r,document.createTextNode("A\u062EA")),u=Be(n,0,1).getBoundingClientRect(),a=Be(n,1,2).getBoundingClientRect();return qe(r),!u||u.left==u.right?!1:el=a.right-u.right<3}o(bf,"hasBadBidiRects");var tl=` +}`;var lt=gC(function(){return St(L,Ie+"return "+fe).apply(e,I)});if(lt.source=fe,_0(lt))throw lt;return lt}o(YP,"template");function XP(s){return Pt(s).toLowerCase()}o(XP,"toLower");function QP(s){return Pt(s).toUpperCase()}o(QP,"toUpper");function ZP(s,f,h){if(s=Pt(s),s&&(h||f===e))return Un(s);if(!s||!(f=cn(f)))return s;var y=Si(s),E=Si(f),L=Ii(y,E),I=oo(y,E)+1;return Ds(y,L,I).join("")}o(ZP,"trim");function JP(s,f,h){if(s=Pt(s),s&&(h||f===e))return s.slice(0,Ff(s)+1);if(!s||!(f=cn(f)))return s;var y=Si(s),E=oo(y,Si(f))+1;return Ds(y,0,E).join("")}o(JP,"trimEnd");function eM(s,f,h){if(s=Pt(s),s&&(h||f===e))return s.replace(Zs,"");if(!s||!(f=cn(f)))return s;var y=Si(s),E=Ii(y,Si(f));return Ds(y,E).join("")}o(eM,"trimStart");function tM(s,f){var h=ge,y=we;if(mr(f)){var E="separator"in f?f.separator:E;h="length"in f?it(f.length):h,y="omission"in f?cn(f.omission):y}s=Pt(s);var L=s.length;if(Wi(s)){var I=Si(s);L=I.length}if(h>=L)return s;var B=h-ll(y);if(B<1)return y;var G=I?Ds(I,0,B).join(""):s.slice(0,B);if(E===e)return G+y;if(I&&(B+=G.length-B),b0(E)){if(s.slice(B).search(E)){var se,le=G;for(E.global||(E=ys(E.source,Pt(Js.exec(E))+"g")),E.lastIndex=0;se=E.exec(le);)var fe=se.index;G=G.slice(0,fe===e?B:fe)}}else if(s.indexOf(cn(E),B)!=B){var ke=G.lastIndexOf(E);ke>-1&&(G=G.slice(0,ke))}return G+y}o(tM,"truncate");function rM(s){return s=Pt(s),s&&ti.test(s)?s.replace(Rr,If):s}o(rM,"unescape");var nM=xa(function(s,f,h){return s+(h?" ":"")+f.toUpperCase()}),k0=Um("toUpperCase");function vC(s,f,h){return s=Pt(s),f=h?e:f,f===e?so(s)?Bi(s):Af(s):s.match(f)||[]}o(vC,"words");var gC=nt(function(s,f){try{return Tn(s,e,f)}catch(h){return _0(h)?h:new Ye(h)}}),iM=Ko(function(s,f){return Wn(f,function(h){h=kt(h),ho(s,h,S0(s[h],s))}),s});function oM(s){var f=s==null?0:s.length,h=He();return s=f?xt(s,function(y){if(typeof y[1]!="function")throw new zn(d);return[h(y[0]),y[1]]}):[],nt(function(y){for(var E=-1;++EKe)return[];var h=ut,y=Kr(s,ut);f=He(f),s-=ut;for(var E=pr(y,f);++h0||f<0)?new ct(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),f!==e&&(f=it(f),h=f<0?h.dropRight(-f):h.take(f-s)),h)},ct.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},ct.prototype.toArray=function(){return this.take(ut)},oi(ct.prototype,function(s,f){var h=/^(?:filter|find|map|reject)|While$/.test(f),y=/^(?:head|last)$/.test(f),E=T[y?"take"+(f=="last"?"Right":""):f],L=y||/^find/.test(f);!E||(T.prototype[f]=function(){var I=this.__wrapped__,B=y?[1]:arguments,G=I instanceof ct,se=B[0],le=G||rt(I),fe=o(function(pt){var mt=E.apply(T,no([pt],B));return y&&ke?mt[0]:mt},"interceptor");le&&h&&typeof se=="function"&&se.length!=1&&(G=le=!1);var ke=this.__chain__,Ie=!!this.__actions__.length,je=L&&!ke,lt=G&&!Ie;if(!L&&le){I=lt?I:new ct(this);var $e=s.apply(I,B);return $e.__actions__.push({func:Ym,args:[fe],thisArg:e}),new kn($e,ke)}return je&<?s.apply(this,B):($e=this.thru(fe),je?y?$e.value()[0]:$e.value():$e)})}),Wn(["pop","push","shift","sort","splice","unshift"],function(s){var f=ra[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var E=arguments;if(y&&!this.__chain__){var L=this.value();return f.apply(rt(L)?L:[],E)}return this[h](function(I){return f.apply(rt(I)?I:[],E)})}}),oi(ct.prototype,function(s,f){var h=T[f];if(h){var y=h.name+"";Ze.call(aa,y)||(aa[y]=[]),aa[y].push({name:f,func:h})}}),aa[Iu(e,Q).name]=[{name:"wrapper",func:e}],ct.prototype.clone=n0,ct.prototype.reverse=i0,ct.prototype.value=Up,T.prototype.at=AL,T.prototype.chain=DL,T.prototype.commit=RL,T.prototype.next=FL,T.prototype.plant=HL,T.prototype.reverse=WL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=BL,T.prototype.first=T.prototype.head,Ss&&(T.prototype[Ss]=IL),T},"runInContext"),lo=sm();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ot._=lo,define(function(){return lo})):Ir?((Ir.exports=lo)._=lo,ps._=lo):Ot._=lo}).call(Jc)});var TT=lr((vx,gx)=>{(function(e,t){typeof vx=="object"&&typeof gx!="undefined"?gx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})(vx,function(){"use strict";var e=o(function(l,d){return t(l.slice(),d)},"stable");e.inplace=function(l,d){var v=t(l,d);return v!==l&&n(v,null,l.length,l),l};function t(l,d){typeof d!="function"&&(d=o(function(O,D){return String(O).localeCompare(D)},"comp"));var v=l.length;if(v<=1)return l;for(var p=new Array(v),w=1;ww&&(Y=w),W>w&&(W=w),X=D,te=Y;;)if(X{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var n=[],l=0;l{(function(e,t){typeof Gx=="object"&&typeof Yx!="undefined"?Yx.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(Gx,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),l=/MSIE \d/.test(e),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),v=/Edge\/(\d+)/.exec(e),p=l||d||v,w=p&&(l?document.documentMode||6:+(v||d)[1]),_=!v&&/WebKit\//.test(e),O=_&&/Qt\/\d+\.\d+/.test(e),D=!v&&/Chrome\//.test(e),Y=/Opera\//.test(e),W=/Apple Computer/.test(navigator.vendor),X=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),te=/PhantomJS/.test(e),Q=W&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),R=/Android/.test(e),P=Q||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),F=Q||/Mac/.test(t),K=/\bCrOS\b/.test(e),V=/win/i.test(t),ue=Y&&e.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Y=!1,_=!0);var ie=F&&(O||Y&&(ue==null||ue<12.11)),de=n||p&&w>=9;function ge(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}o(ge,"classTest");var we=o(function(r,i){var u=r.className,a=ge(i).exec(u);if(a){var c=u.slice(a.index+a[0].length);r.className=u.slice(0,a.index)+(c?a[1]+c:"")}},"rmClass");function qe(r){for(var i=r.childNodes.length;i>0;--i)r.removeChild(r.firstChild);return r}o(qe,"removeChildren");function Je(r,i){return qe(r).appendChild(i)}o(Je,"removeChildrenAndAdd");function be(r,i,u,a){var c=document.createElement(r);if(u&&(c.className=u),a&&(c.style.cssText=a),typeof i=="string")c.appendChild(document.createTextNode(i));else if(i)for(var m=0;m=i)return g+(i-m);g+=S-m,g+=u-g%u,m=S+1}}o(_t,"countColumn");var wt=o(function(){this.id=null,this.f=null,this.time=0,this.handler=Dr(this.onTimeout,this)},"Delayed");wt.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},wt.prototype.set=function(r,i){this.f=i;var u=+new Date+r;(!this.id||u=i)return a+Math.min(g,i-c);if(c+=m-a,c+=u-c%u,a=m+1,c>=i)return a}}o(br,"findColumn");var zt=[""];function jt(r){for(;zt.length<=r;)zt.push(xe(zt)+" ");return zt[r]}o(jt,"spaceStr");function xe(r){return r[r.length-1]}o(xe,"lst");function Er(r,i){for(var u=[],a=0;a"\x80"&&(r.toUpperCase()!=r.toLowerCase()||sn.test(r))}o(Vt,"isWordCharBasic");function cr(r,i){return i?i.source.indexOf("\\w")>-1&&Vt(r)?!0:i.test(r):Vt(r)}o(cr,"isWordChar");function ft(r){for(var i in r)if(r.hasOwnProperty(i)&&r[i])return!1;return!0}o(ft,"isEmpty");var Do=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function vr(r){return r.charCodeAt(0)>=768&&Do.test(r)}o(vr,"isExtendingChar");function Ri(r,i,u){for(;(u<0?i>0:iu?-1:1;;){if(i==u)return i;var c=(i+u)/2,m=a<0?Math.ceil(c):Math.floor(c);if(m==i)return r(m)?i:u;r(m)?u=m:i=m+a}}o(ln,"findFirst");function Rn(r,i,u,a){if(!r)return a(i,u,"ltr",0);for(var c=!1,m=0;mi||i==u&&g.to==i)&&(a(Math.max(g.from,i),Math.min(g.to,u),g.level==1?"rtl":"ltr",m),c=!0)}c||a(i,u,"ltr")}o(Rn,"iterateBidiSections");var hi=null;function mi(r,i,u){var a;hi=null;for(var c=0;ci)return c;m.to==i&&(m.from!=m.to&&u=="before"?a=c:hi=c),m.from==i&&(m.from!=m.to&&u!="before"?a=c:hi=c)}return a??hi}o(mi,"getBidiPartAt");var Fn=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(b){return b<=247?r.charAt(b):1424<=b&&b<=1524?"R":1536<=b&&b<=1785?i.charAt(b-1536):1774<=b&&b<=2220?"r":8192<=b&&b<=8203?"w":b==8204?"b":"L"}o(u,"charType");var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,c=/[stwN]/,m=/[LRr]/,g=/[Lb1n]/,S=/[1n]/;function C(b,N,A){this.level=b,this.from=N,this.to=A}return o(C,"BidiSpan"),function(b,N){var A=N=="ltr"?"L":"R";if(b.length==0||N=="ltr"&&!a.test(b))return!1;for(var $=b.length,z=[],ee=0;ee<$;++ee)z.push(u(b.charCodeAt(ee)));for(var oe=0,ce=A;oe<$;++oe){var me=z[oe];me=="m"?z[oe]=ce:ce=me}for(var Ce=0,ve=A;Ce<$;++Ce){var Te=z[Ce];Te=="1"&&ve=="r"?z[Ce]="n":m.test(Te)&&(ve=Te,Te=="r"&&(z[Ce]="R"))}for(var Fe=1,De=z[0];Fe<$-1;++Fe){var tt=z[Fe];tt=="+"&&De=="1"&&z[Fe+1]=="1"?z[Fe]="1":tt==","&&De==z[Fe+1]&&(De=="1"||De=="n")&&(z[Fe]=De),De=tt}for(var bt=0;bt<$;++bt){var yr=z[bt];if(yr==",")z[bt]="N";else if(yr=="%"){var Nt=void 0;for(Nt=bt+1;Nt<$&&z[Nt]=="%";++Nt);for(var dn=bt&&z[bt-1]=="!"||Nt<$&&z[Nt]=="1"?"1":"N",hn=bt;hn-1&&(a[i]=c.slice(0,m).concat(c.slice(m+1)))}}}o(he,"off");function Ee(r,i){var u=J(r,i);if(!!u.length)for(var a=Array.prototype.slice.call(arguments,2),c=0;c0}o(At,"hasHandler");function Rr(r){r.prototype.on=function(i,u){H(this,i,u)},r.prototype.off=function(i,u){he(this,i,u)}}o(Rr,"eventMixin");function Qt(r){r.preventDefault?r.preventDefault():r.returnValue=!1}o(Qt,"e_preventDefault");function ti(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}o(ti,"e_stopPropagation");function os(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}o(os,"e_defaultPrevented");function to(r){Qt(r),ti(r)}o(to,"e_stop");function vi(r){return r.target||r.srcElement}o(vi,"e_target");function Xs(r){var i=r.which;return i==null&&(r.button&1?i=1:r.button&2?i=3:r.button&4&&(i=2)),F&&r.ctrlKey&&i==1&&(i=3),i}o(Xs,"e_button");var ss=function(){if(p&&w<9)return!1;var r=be("div");return"draggable"in r||"dragDrop"in r}(),an;function bp(r){if(an==null){var i=be("span","\u200B");Je(r,be("span",[i,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(an=i.offsetWidth<=1&&i.offsetHeight>2&&!(p&&w<8))}var u=an?be("span","\u200B"):be("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}o(bp,"zeroWidthElement");var Qs;function Cf(r){if(Qs!=null)return Qs;var i=Je(r,document.createTextNode("A\u062EA")),u=Be(i,0,1).getBoundingClientRect(),a=Be(i,1,2).getBoundingClientRect();return qe(r),!u||u.left==u.right?!1:Qs=a.right-u.right<3}o(Cf,"hasBadBidiRects");var Zs=` -b`.split(/\n/).length!=3?function(r){for(var n=0,u=[],a=r.length;n<=a;){var c=r.indexOf(` -`,n);c==-1&&(c=r.length);var m=r.slice(n,r.charAt(c-1)=="\r"?c-1:c),g=m.indexOf("\r");g!=-1?(u.push(m.slice(0,g)),n+=g+1):(u.push(m),n=c+1)}return u}:function(r){return r.split(/\r\n?|\n/)},bp=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch(n){return!1}}:function(r){var n;try{n=r.ownerDocument.selection.createRange()}catch(u){}return!n||n.parentElement()!=r?!1:n.compareEndPoints("StartToEnd",n)!=0},Tf=function(){var r=Ee("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),uu=null;function Tp(r){if(uu!=null)return uu;var n=Je(r,Ee("span","x")),u=n.getBoundingClientRect(),a=Be(n,0,1).getBoundingClientRect();return uu=Math.abs(u.left-a.left)>1}o(Tp,"hasBadZoomedRects");var $l={},ps={};function kp(r,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),$l[r]=n}o(kp,"defineMode");function kf(r,n){ps[r]=n}o(kf,"defineMIME");function rl(r){if(typeof r=="string"&&ps.hasOwnProperty(r))r=ps[r];else if(r&&typeof r.name=="string"&&ps.hasOwnProperty(r.name)){var n=ps[r.name];typeof n=="string"&&(n={name:n}),r=ii(n,r),r.name=n.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return rl("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return rl("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}o(rl,"resolveMode");function fu(r,n){n=rl(n);var u=$l[n.name];if(!u)return fu(r,"text/plain");var a=u(r,n);if(Ho.hasOwnProperty(n.name)){var c=Ho[n.name];for(var m in c)!c.hasOwnProperty(m)||(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=c[m])}if(a.name=n.name,n.helperType&&(a.helperType=n.helperType),n.modeProps)for(var g in n.modeProps)a[g]=n.modeProps[g];return a}o(fu,"getMode");var Ho={};function Op(r,n){var u=Ho.hasOwnProperty(r)?Ho[r]:Ho[r]={};Kt(n,u)}o(Op,"extendMode");function Wo(r,n){if(n===!0)return n;if(r.copyState)return r.copyState(n);var u={};for(var a in n){var c=n[a];c instanceof Array&&(c=c.concat([])),u[a]=c}return u}o(Wo,"copyState");function jl(r,n){for(var u;r.innerMode&&(u=r.innerMode(n),!(!u||u.mode==r));)n=u.state,r=u.mode;return u||{mode:r,state:n}}o(jl,"innerMode");function Of(r,n,u){return r.startState?r.startState(n,u):!0}o(Of,"startState");var Ft=o(function(r,n,u){this.pos=this.start=0,this.string=r,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u},"StringStream");Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.posn},Ft.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(r){var n=this.string.indexOf(r,this.pos);if(n>-1)return this.pos=n,!0},Ft.prototype.backUp=function(r){this.pos-=r},Ft.prototype.column=function(){return this.lastColumnPos0?null:(m&&n!==!1&&(this.pos+=m[0].length),m)}},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(r,n){this.lineStart+=r;try{return n()}finally{this.lineStart-=r}},Ft.prototype.lookAhead=function(r){var n=this.lineOracle;return n&&n.lookAhead(r)},Ft.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Ne(r,n){if(n-=r.first,n<0||n>=r.size)throw new Error("There is no line "+(n+r.first)+" in the document.");for(var u=r;!u.lines;)for(var a=0;;++a){var c=u.children[a],m=c.chunkSize();if(n=r.first&&nu?ae(u,Ne(r,u).text.length):Lp(n,Ne(r,n.line).text.length)}o(Ue,"clipPos");function Lp(r,n){var u=r.ch;return u==null||u>n?ae(r.line,n):u<0?ae(r.line,0):r}o(Lp,"clipToLen");function il(r,n){for(var u=[],a=0;athis.maxLookAhead&&(this.maxLookAhead=r),n},Bn.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},Bn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Bn.fromSaved=function(r,n,u){return n instanceof si?new Bn(r,Wo(r.mode,n.state),u,n.lookAhead):new Bn(r,Wo(r.mode,n),u)},Bn.prototype.save=function(r){var n=r!==!1?Wo(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new si(n,this.maxLookAhead):n};function pu(r,n,u,a){var c=[r.state.modeGen],m={};hu(r,n.text,r.doc.mode,u,function(E,N){return c.push(E,N)},m,a);for(var g=u.state,S=o(function(E){u.baseTokens=c;var N=r.state.overlays[E],A=1,j=0;u.state=!0,hu(r,n.text,N.mode,u,function(z,ee){for(var oe=A;jz&&c.splice(A,1,z,c[A+1],ce),A+=2,j=Math.min(z,ce)}if(!!ee)if(N.opaque)c.splice(oe,A-oe,z,"overlay "+ee),A=oe+2;else for(;oer.options.maxHighlightLength&&Wo(r.doc.mode,a.state),m=pu(r,n,a);c&&(a.state=c),n.stateAfter=a.save(!c),n.styles=m.styles,m.classes?n.styleClasses=m.classes:n.styleClasses&&(n.styleClasses=null),u===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return n.styles}o(du,"getLineStyles");function hs(r,n,u){var a=r.doc,c=r.display;if(!a.mode.startState)return new Bn(a,!0,n);var m=Nf(r,n,u),g=m>a.first&&Ne(a,m-1).stateAfter,S=g?Bn.fromSaved(a,g,m):new Bn(a,Of(a.mode),m);return a.iter(m,n,function(C){ol(r,C.text,S);var E=S.line;C.stateAfter=E==n-1||E%5==0||E>=c.viewFrom&&En.start)return m}throw new Error("Mode "+r.name+" failed to advance stream.")}o(Gl,"readToken");var Yl=o(function(r,n,u){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=n||null,this.state=u},"Token");function Xl(r,n,u,a){var c=r.doc,m=c.mode,g;n=Ue(c,n);var S=Ne(c,n.line),C=hs(r,n.line,u),E=new Ft(S.text,r.options.tabSize,C),N;for(a&&(N=[]);(a||E.posr.options.maxHighlightLength?(S=!1,g&&ol(r,n,a,N.pos),N.pos=n.length,A=null):A=zo(Gl(u,N,a.state,j),m),j){var z=j[0].name;z&&(A="m-"+(A?z+" "+A:z))}if(!S||E!=A){for(;Cg;--S){if(S<=m.first)return m.first;var C=Ne(m,S-1),E=C.stateAfter;if(E&&(!u||S+(E instanceof si?E.lookAhead:0)<=m.modeFrontier))return S;var N=bt(C.text,null,r.options.tabSize);(c==null||a>N)&&(c=S-1,a=N)}return c}o(Nf,"findStartLine");function Np(r,n){if(r.modeFrontier=Math.min(r.modeFrontier,n),!(r.highlightFrontieru;a--){var c=Ne(r,a).stateAfter;if(c&&(!(c instanceof si)||a+c.lookAhead=n:m.to>n);(a||(a=[])).push(new $o(g,m.from,C?null:m.to))}}return a}o(Ql,"markedSpansBefore");function em(r,n,u){var a;if(r)for(var c=0;c=n:m.to>n);if(S||m.from==n&&g.type=="bookmark"&&(!u||m.marker.insertLeft)){var C=m.from==null||(g.inclusiveLeft?m.from<=n:m.from0&&S)for(var Te=0;Te0)){var N=[C,1],A=ze(E.from,S.from),j=ze(E.to,S.to);(A<0||!g.inclusiveLeft&&!A)&&N.push({from:E.from,to:S.from}),(j>0||!g.inclusiveRight&&!j)&&N.push({from:S.to,to:E.to}),c.splice.apply(c,N),C+=N.length-3}}return c}o(Mf,"removeReadOnlyRanges");function gu(r){var n=r.markedSpans;if(!!n){for(var u=0;un)&&(!a||Zl(a,m.marker)<0)&&(a=m.marker)}return a}o(yu,"collapsedSpanAround");function sl(r,n,u,a,c){var m=Ne(r,n),g=Si&&m.markedSpans;if(g)for(var S=0;S=0&&A<=0||N<=0&&A>=0)&&(N<=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?ze(E.to,u)>=0:ze(E.to,u)>0)||N>=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?ze(E.from,a)<=0:ze(E.from,a)<0)))return!0}}}o(sl,"conflictingCollapsedRange");function On(r){for(var n;n=Ot(r);)r=n.find(-1,!0).line;return r}o(On,"visualLine");function Mp(r){for(var n;n=Un(r);)r=n.find(1,!0).line;return r}o(Mp,"visualLineEnd");function Ap(r){for(var n,u;n=Un(r);)r=n.find(1,!0).line,(u||(u=[])).push(r);return u}o(Ap,"visualLineContinued");function Jl(r,n){var u=Ne(r,n),a=On(u);return u==a?n:dt(a)}o(Jl,"visualLineNo");function Hr(r,n){if(n>r.lastLine())return n;var u=Ne(r,n),a;if(!Nt(r,u))return n;for(;a=Un(u);)u=a.find(1,!0).line;return dt(u)+1}o(Hr,"visualLineEndNo");function Nt(r,n){var u=Si&&n.markedSpans;if(u){for(var a=void 0,c=0;cn.maxLineLength&&(n.maxLineLength=c,n.maxLine=a)})}o(ll,"findMaxLine");var Or=o(function(r,n,u){this.text=r,ms(this,n),this.height=u?u(this):1},"Line");Or.prototype.lineNo=function(){return dt(this)},Ir(Or);function Af(r,n,u,a){r.text=n,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),gu(r),ms(r,u);var c=a?a(r):1;c!=r.height&&xi(r,c)}o(Af,"updateLine");function Df(r){r.parent=null,gu(r)}o(Df,"cleanUpLine");var wu={},xu={};function ea(r,n){if(!r||/^\s*$/.test(r))return null;var u=n.addModeClass?xu:wu;return u[r]||(u[r]=r.replace(/\S+/g,"cm-$&"))}o(ea,"interpretTokenStyle");function ta(r,n){var u=xt("span",null,null,_?"padding-right: .1px":null),a={pre:xt("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};n.measure={};for(var c=0;c<=(n.rest?n.rest.length:0);c++){var m=c?n.rest[c-1]:n.line,g=void 0;a.pos=0,a.addToken=Dp,bf(r.display.measure)&&(g=kn(m,r.doc.direction))&&(a.addToken=Rp(a.addToken,g)),a.map=[];var S=n!=r.display.externalMeasured&&dt(m);io(m,a,du(r,m,S)),m.styleClasses&&(m.styleClasses.bgClass&&(a.bgClass=Zt(m.styleClasses.bgClass,a.bgClass||"")),m.styleClasses.textClass&&(a.textClass=Zt(m.styleClasses.textClass,a.textClass||""))),a.map.length==0&&a.map.push(0,0,a.content.appendChild(Ep(r.display.measure))),c==0?(n.measure.map=a.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(a.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(_){var C=a.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(a.content.className="cm-tab-wrap-hack")}return be(r,"renderLine",r,n.line,a.pre),a.pre.className&&(a.textClass=Zt(a.pre.className,a.textClass||"")),a}o(ta,"buildLineContent");function Ln(r){var n=Ee("span","\u2022","cm-invalidchar");return n.title="\\u"+r.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}o(Ln,"defaultSpecialCharPlaceholder");function Dp(r,n,u,a,c,m,g){if(!!n){var S=r.splitSpaces?zn(n,r.trailingSpace):n,C=r.cm.state.specialChars,E=!1,N;if(!C.test(n))r.col+=n.length,N=document.createTextNode(S),r.map.push(r.pos,r.pos+n.length,N),p&&y<9&&(E=!0),r.pos+=n.length;else{N=document.createDocumentFragment();for(var A=0;;){C.lastIndex=A;var j=C.exec(n),z=j?j.index-A:n.length-A;if(z){var ee=document.createTextNode(S.slice(A,A+z));p&&y<9?N.appendChild(Ee("span",[ee])):N.appendChild(ee),r.map.push(r.pos,r.pos+z,ee),r.col+=z,r.pos+=z}if(!j)break;A+=z+1;var oe=void 0;if(j[0]==" "){var ce=r.cm.options.tabSize,me=ce-r.col%ce;oe=N.appendChild(Ee("span",qt(me),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),r.col+=me}else j[0]=="\r"||j[0]==` -`?(oe=N.appendChild(Ee("span",j[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oe.setAttribute("cm-text",j[0]),r.col+=1):(oe=r.cm.options.specialCharPlaceholder(j[0]),oe.setAttribute("cm-text",j[0]),p&&y<9?N.appendChild(Ee("span",[oe])):N.appendChild(oe),r.col+=1);r.map.push(r.pos,r.pos+1,oe),r.pos++}}if(r.trailingSpace=S.charCodeAt(n.length-1)==32,u||a||c||E||m||g){var Ce=u||"";a&&(Ce+=a),c&&(Ce+=c);var ve=Ee("span",[N],Ce,m);if(g)for(var Te in g)g.hasOwnProperty(Te)&&Te!="style"&&Te!="class"&&ve.setAttribute(Te,g[Te]);return r.content.appendChild(ve)}r.content.appendChild(N)}}o(Dp,"buildToken");function zn(r,n){if(r.length>1&&!/ /.test(r))return r;for(var u=n,a="",c=0;cE&&A.from<=E));j++);if(A.to>=N)return r(u,a,c,m,g,S,C);r(u,a.slice(0,A.to-E),c,m,null,S,C),m=null,a=a.slice(A.to-E),E=A.to}}}o(Rp,"buildTokenBadBidi");function Su(r,n,u,a){var c=!a&&u.widgetNode;c&&r.map.push(r.pos,r.pos+n,c),!a&&r.cm.display.input.needsContentAttribute&&(c||(c=r.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",u.id)),c&&(r.cm.display.input.setUneditable(c),r.content.appendChild(c)),r.pos+=n,r.trailingSpace=!1}o(Su,"buildCollapsedSpan");function io(r,n,u){var a=r.markedSpans,c=r.text,m=0;if(!a){for(var g=1;gC||tt.collapsed&&De.to==C&&De.from==C)){if(De.to!=null&&De.to!=C&&z>De.to&&(z=De.to,oe=""),tt.className&&(ee+=" "+tt.className),tt.css&&(j=(j?j+";":"")+tt.css),tt.startStyle&&De.from==C&&(ce+=" "+tt.startStyle),tt.endStyle&&De.to==z&&(Te||(Te=[])).push(tt.endStyle,De.to),tt.title&&((Ce||(Ce={})).title=tt.title),tt.attributes)for(var Tt in tt.attributes)(Ce||(Ce={}))[Tt]=tt.attributes[Tt];tt.collapsed&&(!me||Zl(me.marker,tt)<0)&&(me=De)}else De.from>C&&z>De.from&&(z=De.from)}if(Te)for(var xr=0;xr=S)break;for(var vn=Math.min(S,z);;){if(N){var gn=C+N.length;if(!me){var ur=gn>vn?N.slice(0,vn-C):N;n.addToken(n,ur,A?A+ee:ee,ce,C+ur.length==z?oe:"",j,Ce)}if(gn>=vn){N=N.slice(vn-C),C=vn;break}C=gn,ce=""}N=c.slice(m,m=u[E++]),A=ea(u[E++],n.cm.options)}}}o(io,"insertLineContent");function ws(r,n,u){this.line=n,this.rest=Ap(n),this.size=this.rest?dt(xe(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Nt(r,n)}o(ws,"LineView");function xs(r,n,u){for(var a=[],c,m=n;m2&&m.push((C.bottom+E.top)/2-u.top)}}m.push(u.bottom-u.top)}}o(Hp,"ensureLineHeights");function ul(r,n,u){if(r.line==n)return{map:r.measure.map,cache:r.measure.cache};for(var a=0;au)return{map:r.measure.maps[c],cache:r.measure.caches[c],before:!0}}o(ul,"mapFromLineView");function Bi(r,n){n=On(n);var u=dt(n),a=r.display.externalMeasured=new ws(r.doc,n,u);a.lineN=u;var c=a.built=ta(r,a);return a.text=c.pre,Je(r.display.lineMeasure,c.pre),a}o(Bi,"updateExternalMeasurement");function tm(r,n,u,a){return ao(r,Ui(r,n),u,a)}o(tm,"measureChar");function Wp(r,n){if(n>=r.display.viewFrom&&n=u.lineN&&nn)&&(m=C-S,c=m-1,n>=C&&(g="right")),c!=null){if(a=r[E+2],S==C&&u==(a.insertLeft?"left":"right")&&(g=u),u=="left"&&c==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)a=r[(E-=3)+2],g="left";if(u=="right"&&c==C-S)for(;E=0&&(u=r[c]).left==u.right;c--);return u}o(nm,"getUsefulRect");function Cs(r,n,u,a){var c=If(n.map,u,a),m=c.node,g=c.start,S=c.end,C=c.collapse,E;if(m.nodeType==3){for(var N=0;N<4;N++){for(;g&&yr(n.line.text.charAt(c.coverStart+g));)--g;for(;c.coverStart+S0&&(C=a="right");var A;r.options.lineWrapping&&(A=m.getClientRects()).length>1?E=A[a=="right"?A.length-1:0]:E=m.getBoundingClientRect()}if(p&&y<9&&!g&&(!E||!E.left&&!E.right)){var j=m.parentNode.getClientRects()[0];j?E={left:j.left,right:j.left+oa(r.display),top:j.top,bottom:j.bottom}:E=rm}for(var z=E.top-n.rect.top,ee=E.bottom-n.rect.top,oe=(z+ee)/2,ce=n.view.measure.heights,me=0;me=a.text.length?(C=a.text.length,E="before"):C<=0&&(C=0,E="after"),!S)return g(E=="before"?C-1:C,E=="before");function N(ee,oe,ce){var me=S[oe],Ce=me.level==1;return g(ce?ee-1:ee,Ce!=ce)}o(N,"getBidi");var A=gi(S,C,E),j=vi,z=N(C,A,E=="before");return j!=null&&(z.other=N(C,j,E!="before")),z}o(zi,"cursorCoords");function lm(r,n){var u=0;n=Ue(r.doc,n),r.options.lineWrapping||(u=oa(r.display)*n.ch);var a=Ne(r.doc,n.line),c=Wr(a)+jn(r.display);return{left:u,right:u,top:c,bottom:c+a.height}}o(lm,"estimateCoords");function uo(r,n,u,a,c){var m=ae(r,n,u);return m.xRel=c,a&&(m.outside=a),m}o(uo,"PosWithInfo");function q(r,n,u){var a=r.doc;if(u+=r.display.viewOffset,u<0)return uo(a.first,0,null,-1,-1);var c=Hi(a,u),m=a.first+a.size-1;if(c>m)return uo(a.first+a.size-1,Ne(a,m).text.length,null,1,1);n<0&&(n=0);for(var g=Ne(a,c);;){var S=Ye(r,g,c,n,u),C=yu(g,S.ch+(S.xRel>0||S.outside>0?1:0));if(!C)return S;var E=C.find(1);if(E.line==c)return E;g=Ne(a,c=E.line)}}o(q,"coordsChar");function re(r,n,u,a){a-=Wf(n);var c=n.text.length,m=fn(function(g){return ao(r,u,g-1).bottom<=a},c,0);return c=fn(function(g){return ao(r,u,g).top>a},m,c),{begin:m,end:c}}o(re,"wrappedLineExtent");function Z(r,n,u,a){u||(u=Ui(r,n));var c=Bf(r,n,ao(r,u,a),"line").top;return re(r,n,u,c)}o(Z,"wrappedLineExtentChar");function Le(r,n,u,a){return r.bottom<=u?!1:r.top>u?!0:(a?r.left:r.right)>n}o(Le,"boxIsAfter");function Ye(r,n,u,a,c){c-=Wr(n);var m=Ui(r,n),g=Wf(n),S=0,C=n.text.length,E=!0,N=kn(n,r.doc.direction);if(N){var A=(r.options.lineWrapping?Lr:_t)(r,n,u,m,N,a,c);E=A.level!=1,S=E?A.from:A.to-1,C=E?A.to:A.from-1}var j=null,z=null,ee=fn(function(Fe){var De=ao(r,m,Fe);return De.top+=g,De.bottom+=g,Le(De,a,c,!1)?(De.top<=c&&De.left<=a&&(j=Fe,z=De),!0):!1},S,C),oe,ce,me=!1;if(z){var Ce=a-z.left=Te.bottom?1:0}return ee=Ii(n.text,ee,1),uo(u,ee,ce,me,a-oe)}o(Ye,"coordsCharInner");function _t(r,n,u,a,c,m,g){var S=fn(function(A){var j=c[A],z=j.level!=1;return Le(zi(r,ae(u,z?j.to:j.from,z?"before":"after"),"line",n,a),m,g,!0)},0,c.length-1),C=c[S];if(S>0){var E=C.level!=1,N=zi(r,ae(u,E?C.from:C.to,E?"after":"before"),"line",n,a);Le(N,m,g,!0)&&N.top>g&&(C=c[S-1])}return C}o(_t,"coordsBidiPart");function Lr(r,n,u,a,c,m,g){var S=re(r,n,a,g),C=S.begin,E=S.end;/\s/.test(n.text.charAt(E-1))&&E--;for(var N=null,A=null,j=0;j=E||z.to<=C)){var ee=z.level!=1,oe=ao(r,a,ee?Math.min(E,z.to)-1:Math.max(C,z.from)).right,ce=oece)&&(N=z,A=ce)}}return N||(N=c[c.length-1]),N.fromE&&(N={from:N.from,to:E,level:N.level}),N}o(Lr,"coordsBidiPartWrapped");var ht;function _s(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(ht==null){ht=Ee("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ht.appendChild(document.createTextNode("x")),ht.appendChild(Ee("br"));ht.appendChild(document.createTextNode("x"))}Je(r.measure,ht);var u=ht.offsetHeight/50;return u>3&&(r.cachedTextHeight=u),qe(r.measure),u||1}o(_s,"textHeight");function oa(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var n=Ee("span","xxxxxxxxxx"),u=Ee("pre",[n],"CodeMirror-line-like");Je(r.measure,u);var a=n.getBoundingClientRect(),c=(a.right-a.left)/10;return c>2&&(r.cachedCharWidth=c),c||10}o(oa,"charWidth");function qn(r){for(var n=r.display,u={},a={},c=n.gutters.clientLeft,m=n.gutters.firstChild,g=0;m;m=m.nextSibling,++g){var S=r.display.gutterSpecs[g].className;u[S]=m.offsetLeft+m.clientLeft+c,a[S]=m.clientWidth}return{fixedPos:sa(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:u,gutterWidth:a,wrapperWidth:n.wrapper.clientWidth}}o(qn,"getDimensions");function sa(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}o(sa,"compensateForHScroll");function am(r){var n=_s(r.display),u=r.options.lineWrapping,a=u&&Math.max(5,r.display.scroller.clientWidth/oa(r.display)-3);return function(c){if(Nt(r.doc,c))return 0;var m=0;if(c.widgets)for(var g=0;g0&&(E=Ne(r.doc,C.line).text).length==C.ch){var N=bt(E,E.length,r.options.tabSize)-E.length;C=ae(C.line,Math.max(0,Math.round((m-Ci(r.display).left)/oa(r.display))-N))}return C}o(fo,"posFromMouse");function co(r,n){if(n>=r.display.viewTo||(n-=r.display.viewFrom,n<0))return null;for(var u=r.display.view,a=0;an)&&(c.updateLineNumbers=n),r.curOp.viewChanged=!0,n>=c.viewTo)Si&&Jl(r.doc,n)c.viewFrom?qo(r):(c.viewFrom+=a,c.viewTo+=a);else if(n<=c.viewFrom&&u>=c.viewTo)qo(r);else if(n<=c.viewFrom){var m=cl(r,u,u+a,1);m?(c.view=c.view.slice(m.index),c.viewFrom=m.lineN,c.viewTo+=a):qo(r)}else if(u>=c.viewTo){var g=cl(r,n,n,-1);g?(c.view=c.view.slice(0,g.index),c.viewTo=g.lineN):qo(r)}else{var S=cl(r,n,n,-1),C=cl(r,u,u+a,1);S&&C?(c.view=c.view.slice(0,S.index).concat(xs(r,S.lineN,C.lineN)).concat(c.view.slice(C.index)),c.viewTo+=a):qo(r)}var E=c.externalMeasured;E&&(u=c.lineN&&n=a.viewTo)){var m=a.view[co(r,n)];if(m.node!=null){var g=m.changes||(m.changes=[]);st(g,u)==-1&&g.push(u)}}}o(bs,"regLineChange");function qo(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}o(qo,"resetView");function cl(r,n,u,a){var c=co(r,n),m,g=r.display.view;if(!Si||u==r.doc.first+r.doc.size)return{index:c,lineN:u};for(var S=r.display.viewFrom,C=0;C0){if(c==g.length-1)return null;m=S+g[c].size-n,c++}else m=S-n;n+=m,u+=m}for(;Jl(r.doc,u)!=u;){if(c==(a<0?0:g.length-1))return null;u+=a*g[c-(a<0?1:0)].size,c+=a}return{index:c,lineN:u}}o(cl,"viewCuttingPoint");function Ky(r,n,u){var a=r.display,c=a.view;c.length==0||n>=a.viewTo||u<=a.viewFrom?(a.view=xs(r,n,u),a.viewFrom=n):(a.viewFrom>n?a.view=xs(r,n,a.viewFrom).concat(a.view):a.viewFromu&&(a.view=a.view.slice(0,co(r,u)))),a.viewTo=u}o(Ky,"adjustView");function um(r){for(var n=r.display.view,u=0,a=0;a=r.display.viewTo||S.to().line1}o(Tp,"hasBadZoomedRects");var Wl={},ls={};function kp(r,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),Wl[r]=i}o(kp,"defineMode");function bf(r,i){ls[r]=i}o(bf,"defineMIME");function Js(r){if(typeof r=="string"&&ls.hasOwnProperty(r))r=ls[r];else if(r&&typeof r.name=="string"&&ls.hasOwnProperty(r.name)){var i=ls[r.name];typeof i=="string"&&(i={name:i}),r=ei(i,r),r.name=i.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return Js("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return Js("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}o(Js,"resolveMode");function au(r,i){i=Js(i);var u=Wl[i.name];if(!u)return au(r,"text/plain");var a=u(r,i);if(Ro.hasOwnProperty(i.name)){var c=Ro[i.name];for(var m in c)!c.hasOwnProperty(m)||(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=c[m])}if(a.name=i.name,i.helperType&&(a.helperType=i.helperType),i.modeProps)for(var g in i.modeProps)a[g]=i.modeProps[g];return a}o(au,"getMode");var Ro={};function Op(r,i){var u=Ro.hasOwnProperty(r)?Ro[r]:Ro[r]={};qt(i,u)}o(Op,"extendMode");function Fo(r,i){if(i===!0)return i;if(r.copyState)return r.copyState(i);var u={};for(var a in i){var c=i[a];c instanceof Array&&(c=c.concat([])),u[a]=c}return u}o(Fo,"copyState");function Bl(r,i){for(var u;r.innerMode&&(u=r.innerMode(i),!(!u||u.mode==r));)i=u.state,r=u.mode;return u||{mode:r,state:i}}o(Bl,"innerMode");function Ef(r,i,u){return r.startState?r.startState(i,u):!0}o(Ef,"startState");var Dt=o(function(r,i,u){this.pos=this.start=0,this.string=r,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u},"StringStream");Dt.prototype.eol=function(){return this.pos>=this.string.length},Dt.prototype.sol=function(){return this.pos==this.lineStart},Dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dt.prototype.next=function(){if(this.posi},Dt.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},Dt.prototype.skipToEnd=function(){this.pos=this.string.length},Dt.prototype.skipTo=function(r){var i=this.string.indexOf(r,this.pos);if(i>-1)return this.pos=i,!0},Dt.prototype.backUp=function(r){this.pos-=r},Dt.prototype.column=function(){return this.lastColumnPos0?null:(m&&i!==!1&&(this.pos+=m[0].length),m)}},Dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dt.prototype.hideFirstChars=function(r,i){this.lineStart+=r;try{return i()}finally{this.lineStart-=r}},Dt.prototype.lookAhead=function(r){var i=this.lineOracle;return i&&i.lookAhead(r)},Dt.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Ne(r,i){if(i-=r.first,i<0||i>=r.size)throw new Error("There is no line "+(i+r.first)+" in the document.");for(var u=r;!u.lines;)for(var a=0;;++a){var c=u.children[a],m=c.chunkSize();if(i=r.first&&iu?ae(u,Ne(r,u).text.length):Lp(i,Ne(r,i.line).text.length)}o(Ue,"clipPos");function Lp(r,i){var u=r.ch;return u==null||u>i?ae(r.line,i):u<0?ae(r.line,0):r}o(Lp,"clipToLen");function tl(r,i){for(var u=[],a=0;athis.maxLookAhead&&(this.maxLookAhead=r),i},In.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},In.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},In.fromSaved=function(r,i,u){return i instanceof ri?new In(r,Fo(r.mode,i.state),u,i.lookAhead):new In(r,Fo(r.mode,i),u)},In.prototype.save=function(r){var i=r!==!1?Fo(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ri(i,this.maxLookAhead):i};function fu(r,i,u,a){var c=[r.state.modeGen],m={};pu(r,i.text,r.doc.mode,u,function(b,N){return c.push(b,N)},m,a);for(var g=u.state,S=o(function(b){u.baseTokens=c;var N=r.state.overlays[b],A=1,$=0;u.state=!0,pu(r,i.text,N.mode,u,function(z,ee){for(var oe=A;$z&&c.splice(A,1,z,c[A+1],ce),A+=2,$=Math.min(z,ce)}if(!!ee)if(N.opaque)c.splice(oe,A-oe,z,"overlay "+ee),A=oe+2;else for(;oer.options.maxHighlightLength&&Fo(r.doc.mode,a.state),m=fu(r,i,a);c&&(a.state=c),i.stateAfter=a.save(!c),i.styles=m.styles,m.classes?i.styleClasses=m.classes:i.styleClasses&&(i.styleClasses=null),u===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return i.styles}o(cu,"getLineStyles");function us(r,i,u){var a=r.doc,c=r.display;if(!a.mode.startState)return new In(a,!0,i);var m=kf(r,i,u),g=m>a.first&&Ne(a,m-1).stateAfter,S=g?In.fromSaved(a,g,m):new In(a,Ef(a.mode),m);return a.iter(m,i,function(C){rl(r,C.text,S);var b=S.line;C.stateAfter=b==i-1||b%5==0||b>=c.viewFrom&&bi.start)return m}throw new Error("Mode "+r.name+" failed to advance stream.")}o($l,"readToken");var ql=o(function(r,i,u){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=i||null,this.state=u},"Token");function Vl(r,i,u,a){var c=r.doc,m=c.mode,g;i=Ue(c,i);var S=Ne(c,i.line),C=us(r,i.line,u),b=new Dt(S.text,r.options.tabSize,C),N;for(a&&(N=[]);(a||b.posr.options.maxHighlightLength?(S=!1,g&&rl(r,i,a,N.pos),N.pos=i.length,A=null):A=Wo($l(u,N,a.state,$),m),$){var z=$[0].name;z&&(A="m-"+(A?z+" "+A:z))}if(!S||b!=A){for(;Cg;--S){if(S<=m.first)return m.first;var C=Ne(m,S-1),b=C.stateAfter;if(b&&(!u||S+(b instanceof ri?b.lookAhead:0)<=m.modeFrontier))return S;var N=_t(C.text,null,r.options.tabSize);(c==null||a>N)&&(c=S-1,a=N)}return c}o(kf,"findStartLine");function Np(r,i){if(r.modeFrontier=Math.min(r.modeFrontier,i),!(r.highlightFrontieru;a--){var c=Ne(r,a).stateAfter;if(c&&(!(c instanceof ri)||a+c.lookAhead=i:m.to>i);(a||(a=[])).push(new Bo(g,m.from,C?null:m.to))}}return a}o(Kl,"markedSpansBefore");function Jh(r,i,u){var a;if(r)for(var c=0;c=i:m.to>i);if(S||m.from==i&&g.type=="bookmark"&&(!u||m.marker.insertLeft)){var C=m.from==null||(g.inclusiveLeft?m.from<=i:m.from0&&S)for(var Te=0;Te0)){var N=[C,1],A=ze(b.from,S.from),$=ze(b.to,S.to);(A<0||!g.inclusiveLeft&&!A)&&N.push({from:b.from,to:S.from}),($>0||!g.inclusiveRight&&!$)&&N.push({from:S.to,to:b.to}),c.splice.apply(c,N),C+=N.length-3}}return c}o(Lf,"removeReadOnlyRanges");function mu(r){var i=r.markedSpans;if(!!i){for(var u=0;ui)&&(!a||Gl(a,m.marker)<0)&&(a=m.marker)}return a}o(vu,"collapsedSpanAround");function nl(r,i,u,a,c){var m=Ne(r,i),g=wi&&m.markedSpans;if(g)for(var S=0;S=0&&A<=0||N<=0&&A>=0)&&(N<=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?ze(b.to,u)>=0:ze(b.to,u)>0)||N>=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?ze(b.from,a)<=0:ze(b.from,a)<0)))return!0}}}o(nl,"conflictingCollapsedRange");function En(r){for(var i;i=Tt(r);)r=i.find(-1,!0).line;return r}o(En,"visualLine");function Mp(r){for(var i;i=Hn(r);)r=i.find(1,!0).line;return r}o(Mp,"visualLineEnd");function Ap(r){for(var i,u;i=Hn(r);)r=i.find(1,!0).line,(u||(u=[])).push(r);return u}o(Ap,"visualLineContinued");function Yl(r,i){var u=Ne(r,i),a=En(u);return u==a?i:dt(a)}o(Yl,"visualLineNo");function Fr(r,i){if(i>r.lastLine())return i;var u=Ne(r,i),a;if(!Ot(r,u))return i;for(;a=Hn(u);)u=a.find(1,!0).line;return dt(u)+1}o(Fr,"visualLineEndNo");function Ot(r,i){var u=wi&&i.markedSpans;if(u){for(var a=void 0,c=0;ci.maxLineLength&&(i.maxLineLength=c,i.maxLine=a)})}o(il,"findMaxLine");var Tr=o(function(r,i,u){this.text=r,fs(this,i),this.height=u?u(this):1},"Line");Tr.prototype.lineNo=function(){return dt(this)},Rr(Tr);function Nf(r,i,u,a){r.text=i,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),mu(r),fs(r,u);var c=a?a(r):1;c!=r.height&&yi(r,c)}o(Nf,"updateLine");function Pf(r){r.parent=null,mu(r)}o(Pf,"cleanUpLine");var gu={},yu={};function Xl(r,i){if(!r||/^\s*$/.test(r))return null;var u=i.addModeClass?yu:gu;return u[r]||(u[r]=r.replace(/\S+/g,"cm-$&"))}o(Xl,"interpretTokenStyle");function Ql(r,i){var u=yt("span",null,null,_?"padding-right: .1px":null),a={pre:yt("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};i.measure={};for(var c=0;c<=(i.rest?i.rest.length:0);c++){var m=c?i.rest[c-1]:i.line,g=void 0;a.pos=0,a.addToken=Dp,Cf(r.display.measure)&&(g=bn(m,r.doc.direction))&&(a.addToken=Rp(a.addToken,g)),a.map=[];var S=i!=r.display.externalMeasured&&dt(m);ro(m,a,cu(r,m,S)),m.styleClasses&&(m.styleClasses.bgClass&&(a.bgClass=Yt(m.styleClasses.bgClass,a.bgClass||"")),m.styleClasses.textClass&&(a.textClass=Yt(m.styleClasses.textClass,a.textClass||""))),a.map.length==0&&a.map.push(0,0,a.content.appendChild(bp(r.display.measure))),c==0?(i.measure.map=a.map,i.measure.cache={}):((i.measure.maps||(i.measure.maps=[])).push(a.map),(i.measure.caches||(i.measure.caches=[])).push({}))}if(_){var C=a.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(a.content.className="cm-tab-wrap-hack")}return Ee(r,"renderLine",r,i.line,a.pre),a.pre.className&&(a.textClass=Yt(a.pre.className,a.textClass||"")),a}o(Ql,"buildLineContent");function Tn(r){var i=be("span","\u2022","cm-invalidchar");return i.title="\\u"+r.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}o(Tn,"defaultSpecialCharPlaceholder");function Dp(r,i,u,a,c,m,g){if(!!i){var S=r.splitSpaces?Wn(i,r.trailingSpace):i,C=r.cm.state.specialChars,b=!1,N;if(!C.test(i))r.col+=i.length,N=document.createTextNode(S),r.map.push(r.pos,r.pos+i.length,N),p&&w<9&&(b=!0),r.pos+=i.length;else{N=document.createDocumentFragment();for(var A=0;;){C.lastIndex=A;var $=C.exec(i),z=$?$.index-A:i.length-A;if(z){var ee=document.createTextNode(S.slice(A,A+z));p&&w<9?N.appendChild(be("span",[ee])):N.appendChild(ee),r.map.push(r.pos,r.pos+z,ee),r.col+=z,r.pos+=z}if(!$)break;A+=z+1;var oe=void 0;if($[0]==" "){var ce=r.cm.options.tabSize,me=ce-r.col%ce;oe=N.appendChild(be("span",jt(me),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),r.col+=me}else $[0]=="\r"||$[0]==` +`?(oe=N.appendChild(be("span",$[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oe.setAttribute("cm-text",$[0]),r.col+=1):(oe=r.cm.options.specialCharPlaceholder($[0]),oe.setAttribute("cm-text",$[0]),p&&w<9?N.appendChild(be("span",[oe])):N.appendChild(oe),r.col+=1);r.map.push(r.pos,r.pos+1,oe),r.pos++}}if(r.trailingSpace=S.charCodeAt(i.length-1)==32,u||a||c||b||m||g){var Ce=u||"";a&&(Ce+=a),c&&(Ce+=c);var ve=be("span",[N],Ce,m);if(g)for(var Te in g)g.hasOwnProperty(Te)&&Te!="style"&&Te!="class"&&ve.setAttribute(Te,g[Te]);return r.content.appendChild(ve)}r.content.appendChild(N)}}o(Dp,"buildToken");function Wn(r,i){if(r.length>1&&!/ /.test(r))return r;for(var u=i,a="",c=0;cb&&A.from<=b));$++);if(A.to>=N)return r(u,a,c,m,g,S,C);r(u,a.slice(0,A.to-b),c,m,null,S,C),m=null,a=a.slice(A.to-b),b=A.to}}}o(Rp,"buildTokenBadBidi");function wu(r,i,u,a){var c=!a&&u.widgetNode;c&&r.map.push(r.pos,r.pos+i,c),!a&&r.cm.display.input.needsContentAttribute&&(c||(c=r.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",u.id)),c&&(r.cm.display.input.setUneditable(c),r.content.appendChild(c)),r.pos+=i,r.trailingSpace=!1}o(wu,"buildCollapsedSpan");function ro(r,i,u){var a=r.markedSpans,c=r.text,m=0;if(!a){for(var g=1;gC||tt.collapsed&&De.to==C&&De.from==C)){if(De.to!=null&&De.to!=C&&z>De.to&&(z=De.to,oe=""),tt.className&&(ee+=" "+tt.className),tt.css&&($=($?$+";":"")+tt.css),tt.startStyle&&De.from==C&&(ce+=" "+tt.startStyle),tt.endStyle&&De.to==z&&(Te||(Te=[])).push(tt.endStyle,De.to),tt.title&&((Ce||(Ce={})).title=tt.title),tt.attributes)for(var bt in tt.attributes)(Ce||(Ce={}))[bt]=tt.attributes[bt];tt.collapsed&&(!me||Gl(me.marker,tt)<0)&&(me=De)}else De.from>C&&z>De.from&&(z=De.from)}if(Te)for(var yr=0;yr=S)break;for(var dn=Math.min(S,z);;){if(N){var hn=C+N.length;if(!me){var sr=hn>dn?N.slice(0,dn-C):N;i.addToken(i,sr,A?A+ee:ee,ce,C+sr.length==z?oe:"",$,Ce)}if(hn>=dn){N=N.slice(dn-C),C=dn;break}C=hn,ce=""}N=c.slice(m,m=u[b++]),A=Xl(u[b++],i.cm.options)}}}o(ro,"insertLineContent");function hs(r,i,u){this.line=i,this.rest=Ap(i),this.size=this.rest?dt(xe(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Ot(r,i)}o(hs,"LineView");function ms(r,i,u){for(var a=[],c,m=i;m2&&m.push((C.bottom+b.top)/2-u.top)}}m.push(u.bottom-u.top)}}o(Hp,"ensureLineHeights");function sl(r,i,u){if(r.line==i)return{map:r.measure.map,cache:r.measure.cache};for(var a=0;au)return{map:r.measure.maps[c],cache:r.measure.caches[c],before:!0}}o(sl,"mapFromLineView");function Hi(r,i){i=En(i);var u=dt(i),a=r.display.externalMeasured=new hs(r.doc,i,u);a.lineN=u;var c=a.built=Ql(r,a);return a.text=c.pre,Je(r.display.lineMeasure,c.pre),a}o(Hi,"updateExternalMeasurement");function em(r,i,u,a){return so(r,Wi(r,i),u,a)}o(em,"measureChar");function Wp(r,i){if(i>=r.display.viewFrom&&i=u.lineN&&ii)&&(m=C-S,c=m-1,i>=C&&(g="right")),c!=null){if(a=r[b+2],S==C&&u==(a.insertLeft?"left":"right")&&(g=u),u=="left"&&c==0)for(;b&&r[b-2]==r[b-3]&&r[b-1].insertLeft;)a=r[(b-=3)+2],g="left";if(u=="right"&&c==C-S)for(;b=0&&(u=r[c]).left==u.right;c--);return u}o(rm,"getUsefulRect");function gs(r,i,u,a){var c=Df(i.map,u,a),m=c.node,g=c.start,S=c.end,C=c.collapse,b;if(m.nodeType==3){for(var N=0;N<4;N++){for(;g&&vr(i.line.text.charAt(c.coverStart+g));)--g;for(;c.coverStart+S0&&(C=a="right");var A;r.options.lineWrapping&&(A=m.getClientRects()).length>1?b=A[a=="right"?A.length-1:0]:b=m.getBoundingClientRect()}if(p&&w<9&&!g&&(!b||!b.left&&!b.right)){var $=m.parentNode.getClientRects()[0];$?b={left:$.left,right:$.left+ta(r.display),top:$.top,bottom:$.bottom}:b=tm}for(var z=b.top-i.rect.top,ee=b.bottom-i.rect.top,oe=(z+ee)/2,ce=i.view.measure.heights,me=0;me=a.text.length?(C=a.text.length,b="before"):C<=0&&(C=0,b="after"),!S)return g(b=="before"?C-1:C,b=="before");function N(ee,oe,ce){var me=S[oe],Ce=me.level==1;return g(ce?ee-1:ee,Ce!=ce)}o(N,"getBidi");var A=mi(S,C,b),$=hi,z=N(C,A,b=="before");return $!=null&&(z.other=N(C,$,b!="before")),z}o(Bi,"cursorCoords");function sm(r,i){var u=0;i=Ue(r.doc,i),r.options.lineWrapping||(u=ta(r.display)*i.ch);var a=Ne(r.doc,i.line),c=Ir(a)+Un(r.display);return{left:u,right:u,top:c,bottom:c+a.height}}o(sm,"estimateCoords");function lo(r,i,u,a,c){var m=ae(r,i,u);return m.xRel=c,a&&(m.outside=a),m}o(lo,"PosWithInfo");function q(r,i,u){var a=r.doc;if(u+=r.display.viewOffset,u<0)return lo(a.first,0,null,-1,-1);var c=Fi(a,u),m=a.first+a.size-1;if(c>m)return lo(a.first+a.size-1,Ne(a,m).text.length,null,1,1);i<0&&(i=0);for(var g=Ne(a,c);;){var S=Ye(r,g,c,i,u),C=vu(g,S.ch+(S.xRel>0||S.outside>0?1:0));if(!C)return S;var b=C.find(1);if(b.line==c)return b;g=Ne(a,c=b.line)}}o(q,"coordsChar");function re(r,i,u,a){a-=Ff(i);var c=i.text.length,m=ln(function(g){return so(r,u,g-1).bottom<=a},c,0);return c=ln(function(g){return so(r,u,g).top>a},m,c),{begin:m,end:c}}o(re,"wrappedLineExtent");function Z(r,i,u,a){u||(u=Wi(r,i));var c=If(r,i,so(r,u,a),"line").top;return re(r,i,u,c)}o(Z,"wrappedLineExtentChar");function Oe(r,i,u,a){return r.bottom<=u?!1:r.top>u?!0:(a?r.left:r.right)>i}o(Oe,"boxIsAfter");function Ye(r,i,u,a,c){c-=Ir(i);var m=Wi(r,i),g=Ff(i),S=0,C=i.text.length,b=!0,N=bn(i,r.doc.direction);if(N){var A=(r.options.lineWrapping?kr:St)(r,i,u,m,N,a,c);b=A.level!=1,S=b?A.from:A.to-1,C=b?A.to:A.from-1}var $=null,z=null,ee=ln(function(Fe){var De=so(r,m,Fe);return De.top+=g,De.bottom+=g,Oe(De,a,c,!1)?(De.top<=c&&De.left<=a&&($=Fe,z=De),!0):!1},S,C),oe,ce,me=!1;if(z){var Ce=a-z.left=Te.bottom?1:0}return ee=Ri(i.text,ee,1),lo(u,ee,ce,me,a-oe)}o(Ye,"coordsCharInner");function St(r,i,u,a,c,m,g){var S=ln(function(A){var $=c[A],z=$.level!=1;return Oe(Bi(r,ae(u,z?$.to:$.from,z?"before":"after"),"line",i,a),m,g,!0)},0,c.length-1),C=c[S];if(S>0){var b=C.level!=1,N=Bi(r,ae(u,b?C.from:C.to,b?"after":"before"),"line",i,a);Oe(N,m,g,!0)&&N.top>g&&(C=c[S-1])}return C}o(St,"coordsBidiPart");function kr(r,i,u,a,c,m,g){var S=re(r,i,a,g),C=S.begin,b=S.end;/\s/.test(i.text.charAt(b-1))&&b--;for(var N=null,A=null,$=0;$=b||z.to<=C)){var ee=z.level!=1,oe=so(r,a,ee?Math.min(b,z.to)-1:Math.max(C,z.from)).right,ce=oece)&&(N=z,A=ce)}}return N||(N=c[c.length-1]),N.fromb&&(N={from:N.from,to:b,level:N.level}),N}o(kr,"coordsBidiPartWrapped");var ht;function ys(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(ht==null){ht=be("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)ht.appendChild(document.createTextNode("x")),ht.appendChild(be("br"));ht.appendChild(document.createTextNode("x"))}Je(r.measure,ht);var u=ht.offsetHeight/50;return u>3&&(r.cachedTextHeight=u),qe(r.measure),u||1}o(ys,"textHeight");function ta(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var i=be("span","xxxxxxxxxx"),u=be("pre",[i],"CodeMirror-line-like");Je(r.measure,u);var a=i.getBoundingClientRect(),c=(a.right-a.left)/10;return c>2&&(r.cachedCharWidth=c),c||10}o(ta,"charWidth");function zn(r){for(var i=r.display,u={},a={},c=i.gutters.clientLeft,m=i.gutters.firstChild,g=0;m;m=m.nextSibling,++g){var S=r.display.gutterSpecs[g].className;u[S]=m.offsetLeft+m.clientLeft+c,a[S]=m.clientWidth}return{fixedPos:ra(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:u,gutterWidth:a,wrapperWidth:i.wrapper.clientWidth}}o(zn,"getDimensions");function ra(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}o(ra,"compensateForHScroll");function lm(r){var i=ys(r.display),u=r.options.lineWrapping,a=u&&Math.max(5,r.display.scroller.clientWidth/ta(r.display)-3);return function(c){if(Ot(r.doc,c))return 0;var m=0;if(c.widgets)for(var g=0;g0&&(b=Ne(r.doc,C.line).text).length==C.ch){var N=_t(b,b.length,r.options.tabSize)-b.length;C=ae(C.line,Math.max(0,Math.round((m-xi(r.display).left)/ta(r.display))-N))}return C}o(ao,"posFromMouse");function uo(r,i){if(i>=r.display.viewTo||(i-=r.display.viewFrom,i<0))return null;for(var u=r.display.view,a=0;ai)&&(c.updateLineNumbers=i),r.curOp.viewChanged=!0,i>=c.viewTo)wi&&Yl(r.doc,i)c.viewFrom?zo(r):(c.viewFrom+=a,c.viewTo+=a);else if(i<=c.viewFrom&&u>=c.viewTo)zo(r);else if(i<=c.viewFrom){var m=al(r,u,u+a,1);m?(c.view=c.view.slice(m.index),c.viewFrom=m.lineN,c.viewTo+=a):zo(r)}else if(u>=c.viewTo){var g=al(r,i,i,-1);g?(c.view=c.view.slice(0,g.index),c.viewTo=g.lineN):zo(r)}else{var S=al(r,i,i,-1),C=al(r,u,u+a,1);S&&C?(c.view=c.view.slice(0,S.index).concat(ms(r,S.lineN,C.lineN)).concat(c.view.slice(C.index)),c.viewTo+=a):zo(r)}var b=c.externalMeasured;b&&(u=c.lineN&&i=a.viewTo)){var m=a.view[uo(r,i)];if(m.node!=null){var g=m.changes||(m.changes=[]);st(g,u)==-1&&g.push(u)}}}o(xs,"regLineChange");function zo(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}o(zo,"resetView");function al(r,i,u,a){var c=uo(r,i),m,g=r.display.view;if(!wi||u==r.doc.first+r.doc.size)return{index:c,lineN:u};for(var S=r.display.viewFrom,C=0;C0){if(c==g.length-1)return null;m=S+g[c].size-i,c++}else m=S-i;i+=m,u+=m}for(;Yl(r.doc,u)!=u;){if(c==(a<0?0:g.length-1))return null;u+=a*g[c-(a<0?1:0)].size,c+=a}return{index:c,lineN:u}}o(al,"viewCuttingPoint");function Gy(r,i,u){var a=r.display,c=a.view;c.length==0||i>=a.viewTo||u<=a.viewFrom?(a.view=ms(r,i,u),a.viewFrom=i):(a.viewFrom>i?a.view=ms(r,i,a.viewFrom).concat(a.view):a.viewFromu&&(a.view=a.view.slice(0,uo(r,u)))),a.viewTo=u}o(Gy,"adjustView");function am(r){for(var i=r.display.view,u=0,a=0;a=r.display.viewTo||S.to().line0?n.blinker=setInterval(function(){r.hasFocus()||dl(r),n.cursorDiv.style.visibility=(u=!u)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}o(la,"restartBlink");function Bp(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||aa(r))}o(Bp,"ensureFocus");function zf(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&dl(r))},100)}o(zf,"delayBlurEvent");function aa(r,n){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(be(r,"focus",r,n),r.state.focused=!0,Ge(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),_&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),la(r))}o(aa,"onFocus");function dl(r,n){r.state.delayingBlurEvent||(r.state.focused&&(be(r,"blur",r,n),r.state.focused=!1,we(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}o(dl,"onBlur");function Ts(r){for(var n=r.display,u=n.lineDiv.offsetTop,a=0;a.005||N<-.005)&&(xi(c.line,g),ks(c.line),c.rest))for(var A=0;Ar.display.sizerWidth){var j=Math.ceil(S/oa(r.display));j>r.display.maxLineLength&&(r.display.maxLineLength=j,r.display.maxLine=c.line,r.display.maxLineChanged=!0)}}}}o(Ts,"updateHeightsInViewport");function ks(r){if(r.widgets)for(var n=0;n=g&&(m=Hi(n,Wr(Ne(n,C))-r.wrapper.clientHeight),g=C)}return{from:m,to:Math.max(g,m+1)}}o(hl,"visibleLines");function Gy(r,n){if(!Jt(r,"scrollCursorIntoView")){var u=r.display,a=u.sizer.getBoundingClientRect(),c=null;if(n.top+a.top<0?c=!0:n.bottom+a.top>(window.innerHeight||document.documentElement.clientHeight)&&(c=!1),c!=null&&!te){var m=Ee("div","\u200B",null,`position: absolute; - top: `+(n.top-u.viewOffset-jn(r.display))+`px; - height: `+(n.bottom-n.top+Yr(r)+u.barHeight)+`px; - left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");r.display.lineSpace.appendChild(m),m.scrollIntoView(c),r.display.lineSpace.removeChild(m)}}}o(Gy,"maybeScrollWindow");function Yy(r,n,u,a){a==null&&(a=0);var c;!r.options.lineWrapping&&n==u&&(u=n.sticky=="before"?ae(n.line,n.ch+1,"before"):n,n=n.ch?ae(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var m=0;m<5;m++){var g=!1,S=zi(r,n),C=!u||u==n?S:zi(r,u);c={left:Math.min(S.left,C.left),top:Math.min(S.top,C.top)-a,right:Math.max(S.left,C.left),bottom:Math.max(S.bottom,C.bottom)+a};var E=ua(r,c),N=r.doc.scrollTop,A=r.doc.scrollLeft;if(E.scrollTop!=null&&(tr(r,E.scrollTop),Math.abs(r.doc.scrollTop-N)>1&&(g=!0)),E.scrollLeft!=null&&(ml(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-A)>1&&(g=!0)),!g)break}return c}o(Yy,"scrollPosIntoView");function Xy(r,n){var u=ua(r,n);u.scrollTop!=null&&tr(r,u.scrollTop),u.scrollLeft!=null&&ml(r,u.scrollLeft)}o(Xy,"scrollIntoView");function ua(r,n){var u=r.display,a=_s(r.display);n.top<0&&(n.top=0);var c=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:u.scroller.scrollTop,m=lo(r),g={};n.bottom-n.top>m&&(n.bottom=n.top+m);var S=r.doc.height+wr(u),C=n.topS-a;if(n.topc+m){var N=Math.min(n.top,(E?S:n.bottom)-m);N!=c&&(g.scrollTop=N)}var A=r.options.fixedGutter?0:u.gutters.offsetWidth,j=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:u.scroller.scrollLeft-A,z=Wi(r)-u.gutters.offsetWidth,ee=n.right-n.left>z;return ee&&(n.right=n.left+z),n.left<10?g.scrollLeft=0:n.leftz+j-3&&(g.scrollLeft=n.right+(ee?0:10)-z),g}o(ua,"calculateScrollPos");function fa(r,n){n!=null&&($f(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+n)}o(fa,"addToScrollTop");function Os(r){$f(r);var n=r.getCursor();r.curOp.scrollToPos={from:n,to:n,margin:r.options.cursorScrollMargin}}o(Os,"ensureCursorVisible");function bu(r,n,u){(n!=null||u!=null)&&$f(r),n!=null&&(r.curOp.scrollLeft=n),u!=null&&(r.curOp.scrollTop=u)}o(bu,"scrollToCoords");function cm(r,n){$f(r),r.curOp.scrollToPos=n}o(cm,"scrollToRange");function $f(r){var n=r.curOp.scrollToPos;if(n){r.curOp.scrollToPos=null;var u=lm(r,n.from),a=lm(r,n.to);pm(r,u,a,n.margin)}}o($f,"resolveScrollToPos");function pm(r,n,u,a){var c=ua(r,{left:Math.min(n.left,u.left),top:Math.min(n.top,u.top)-a,right:Math.max(n.right,u.right),bottom:Math.max(n.bottom,u.bottom)+a});bu(r,c.scrollLeft,c.scrollTop)}o(pm,"scrollToCoordsRange");function tr(r,n){Math.abs(r.doc.scrollTop-n)<2||(i||zp(r,{top:n}),Xr(r,n,!0),i&&zp(r),ho(r,100))}o(tr,"updateScrollTop");function Xr(r,n,u){n=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,n)),!(r.display.scroller.scrollTop==n&&!u)&&(r.doc.scrollTop=n,r.display.scrollbars.setScrollTop(n),r.display.scroller.scrollTop!=n&&(r.display.scroller.scrollTop=n))}o(Xr,"setScrollTop");function ml(r,n,u,a){n=Math.max(0,Math.min(n,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((u?n==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-n)<2)&&!a)&&(r.doc.scrollLeft=n,dm(r),r.display.scroller.scrollLeft!=n&&(r.display.scroller.scrollLeft=n),r.display.scrollbars.setScrollLeft(n))}o(ml,"setScrollLeft");function Tu(r){var n=r.display,u=n.gutters.offsetWidth,a=Math.round(r.doc.height+wr(r.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:r.options.fixedGutter?u:0,docHeight:a,scrollHeight:a+Yr(r)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:u}}o(Tu,"measureForScrollbars");var Ls=o(function(r,n,u){this.cm=u;var a=this.vert=Ee("div",[Ee("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=Ee("div",[Ee("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=c.tabIndex=-1,r(a),r(c),H(a,"scroll",function(){a.clientHeight&&n(a.scrollTop,"vertical")}),H(c,"scroll",function(){c.clientWidth&&n(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Ls.prototype.update=function(r){var n=r.scrollWidth>r.clientWidth+1,u=r.scrollHeight>r.clientHeight+1,a=r.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=n?a+"px":"0";var c=r.viewHeight-(n?a:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+c)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=u?a+"px":"0",this.horiz.style.left=r.barLeft+"px";var m=r.viewWidth-r.barLeft-(u?a:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+m)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(a==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?a:0,bottom:n?a:0}},Ls.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ls.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ls.prototype.zeroWidthHack=function(){var r=F&&!X?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new St,this.disableVert=new St},Ls.prototype.enableZeroWidthBar=function(r,n,u){r.style.pointerEvents="auto";function a(){var c=r.getBoundingClientRect(),m=u=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1);m!=r?r.style.pointerEvents="none":n.set(1e3,a)}o(a,"maybeDisable"),n.set(1e3,a)},Ls.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var ku=o(function(){},"NullScrollbars");ku.prototype.update=function(){return{bottom:0,right:0}},ku.prototype.setScrollLeft=function(){},ku.prototype.setScrollTop=function(){},ku.prototype.clear=function(){};function Ns(r,n){n||(n=Tu(r));var u=r.display.barWidth,a=r.display.barHeight;ca(r,n);for(var c=0;c<4&&u!=r.display.barWidth||a!=r.display.barHeight;c++)u!=r.display.barWidth&&r.options.lineWrapping&&Ts(r),ca(r,Tu(r)),u=r.display.barWidth,a=r.display.barHeight}o(Ns,"updateScrollbars");function ca(r,n){var u=r.display,a=u.scrollbars.update(n);u.sizer.style.paddingRight=(u.barWidth=a.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=a.bottom)+"px",u.heightForcer.style.borderBottom=a.bottom+"px solid transparent",a.right&&a.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=a.bottom+"px",u.scrollbarFiller.style.width=a.right+"px"):u.scrollbarFiller.style.display="",a.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=a.bottom+"px",u.gutterFiller.style.width=n.gutterWidth+"px"):u.gutterFiller.style.display=""}o(ca,"updateScrollbarsInner");var jf={native:Ls,null:ku};function vl(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&we(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new jf[r.options.scrollbarStyle](function(n){r.display.wrapper.insertBefore(n,r.display.scrollbarFiller),H(n,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,u){u=="horizontal"?ml(r,n):tr(r,n)},r),r.display.scrollbars.addClass&&Ge(r.display.wrapper,r.display.scrollbars.addClass)}o(vl,"initScrollbars");var Ou=0;function $i(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ou,markArrays:null},oo(r.curOp)}o($i,"startOperation");function po(r){var n=r.curOp;n&&Fp(n,function(u){for(var a=0;a=u.viewTo)||u.maxLineChanged&&n.options.lineWrapping,r.update=r.mustUpdate&&new Nn(n,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}o(Qy,"endOperation_R1");function Zy(r){r.updatedDisplay=r.mustUpdate&&Up(r.cm,r.update)}o(Zy,"endOperation_W1");function Jy(r){var n=r.cm,u=n.display;r.updatedDisplay&&Ts(n),r.barMeasure=Tu(n),u.maxLineChanged&&!n.options.lineWrapping&&(r.adjustWidthTo=tm(n,u.maxLine,u.maxLine.text.length).left+3,n.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+r.adjustWidthTo+Yr(n)+n.display.barWidth),r.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+r.adjustWidthTo-Wi(n))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=u.input.prepareSelection())}o(Jy,"endOperation_R2");function e0(r){var n=r.cm;r.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var u=+new Date+r.options.workTime,a=hs(r,n.highlightFrontier),c=[];n.iter(a.line,Math.min(n.first+n.size,r.display.viewTo+500),function(m){if(a.line>=r.display.viewFrom){var g=m.styles,S=m.text.length>r.options.maxHighlightLength?Wo(n.mode,a.state):null,C=pu(r,m,a,!0);S&&(a.state=S),m.styles=C.styles;var E=m.styleClasses,N=C.classes;N?m.styleClasses=N:E&&(m.styleClasses=null);for(var A=!g||g.length!=m.styles.length||E!=N&&(!E||!N||E.bgClass!=N.bgClass||E.textClass!=N.textClass),j=0;!A&&ju)return ho(r,r.options.workDelay),!0}),n.highlightFrontier=a.line,n.modeFrontier=Math.max(n.modeFrontier,a.line),c.length&&Qr(r,function(){for(var m=0;m=u.viewFrom&&n.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&um(r)==0)return!1;mo(r)&&(qo(r),n.dims=qn(r));var c=a.first+a.size,m=Math.max(n.visible.from-r.options.viewportMargin,a.first),g=Math.min(c,n.visible.to+r.options.viewportMargin);u.viewFromg&&u.viewTo-g<20&&(g=Math.min(c,u.viewTo)),Si&&(m=Jl(r.doc,m),g=Hr(r.doc,g));var S=m!=u.viewFrom||g!=u.viewTo||u.lastWrapHeight!=n.wrapperHeight||u.lastWrapWidth!=n.wrapperWidth;Ky(r,m,g),u.viewOffset=Wr(Ne(r.doc,u.viewFrom)),r.display.mover.style.top=u.viewOffset+"px";var C=um(r);if(!S&&C==0&&!n.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var E=r0(r);return C>4&&(u.lineDiv.style.display="none"),i0(r,u.updateLineNumbers,n.dims),C>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,n0(E),qe(u.cursorDiv),qe(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,S&&(u.lastWrapHeight=n.wrapperHeight,u.lastWrapWidth=n.wrapperWidth,ho(r,400)),u.updateLineNumbers=null,!0}o(Up,"updateDisplayIfNeeded");function Ps(r,n){for(var u=n.viewport,a=!0;;a=!1){if(!a||!r.options.lineWrapping||n.oldDisplayWidth==Wi(r)){if(u&&u.top!=null&&(u={top:Math.min(r.doc.height+wr(r.display)-lo(r),u.top)}),n.visible=hl(r.display,r.doc,u),n.visible.from>=r.display.viewFrom&&n.visible.to<=r.display.viewTo)break}else a&&(n.visible=hl(r.display,r.doc,u));if(!Up(r,n))break;Ts(r);var c=Tu(r);_u(r),Ns(r,c),jp(r,c),n.force=!1}n.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(n.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}o(Ps,"postUpdateDisplay");function zp(r,n){var u=new Nn(r,n);if(Up(r,u)){Ts(r),Ps(r,u);var a=Tu(r);_u(r),Ns(r,a),jp(r,a),u.finish()}}o(zp,"updateDisplaySimple");function i0(r,n,u){var a=r.display,c=r.options.lineNumbers,m=a.lineDiv,g=m.firstChild;function S(ee){var oe=ee.nextSibling;return _&&F&&r.display.currentWheelTarget==ee?ee.style.display="none":ee.parentNode.removeChild(ee),oe}o(S,"rm");for(var C=a.view,E=a.viewFrom,N=0;N-1&&(z=!1),Ff(r,A,E,u)),z&&(qe(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(nl(r.options,E)))),g=A.node.nextSibling}E+=A.size}for(;g;)g=S(g)}o(i0,"patchDisplay");function $p(r){var n=r.gutters.offsetWidth;r.sizer.style.marginLeft=n+"px",lr(r,"gutterChanged",r)}o($p,"updateGutterSpace");function jp(r,n){r.display.sizer.style.minHeight=n.docHeight+"px",r.display.heightForcer.style.top=n.docHeight+"px",r.display.gutters.style.height=n.docHeight+r.display.barHeight+Yr(r)+"px"}o(jp,"setDocumentHeight");function dm(r){var n=r.display,u=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!r.options.fixedGutter))){for(var a=sa(n)-n.scroller.scrollLeft+r.doc.scrollLeft,c=n.gutters.offsetWidth,m=a+"px",g=0;gg.clientWidth,C=g.scrollHeight>g.clientHeight;if(!!(a&&S||c&&C)){if(c&&F&&_){e:for(var E=n.target,N=m.view;E!=g;E=E.parentNode)for(var A=0;A=0&&ze(r,a.to())<=0)return u}return-1};var vt=o(function(r,n){this.anchor=r,this.head=n},"Range");vt.prototype.from=function(){return ds(this.anchor,this.head)},vt.prototype.to=function(){return Uo(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Jr(r,n,u){var a=r&&r.options.selectionsMayTouch,c=n[u];n.sort(function(j,z){return ze(j.from(),z.from())}),u=st(n,c);for(var m=1;m0:C>=0){var E=ds(S.from(),g.from()),N=Uo(S.to(),g.to()),A=S.empty()?g.from()==g.head:S.from()==S.head;m<=u&&--u,n.splice(--m,2,new vt(A?N:E,A?E:N))}}return new li(n,u)}o(Jr,"normalizeSelection");function Ms(r,n){return new li([new vt(r,n||r)],0)}o(Ms,"simpleSelection");function As(r){return r.text?ae(r.from.line+r.text.length-1,xe(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}o(As,"changeEnd");function Ei(r,n){if(ze(r,n.from)<0)return r;if(ze(r,n.to)<=0)return As(n);var u=r.line+n.text.length-(n.to.line-n.from.line)-1,a=r.ch;return r.line==n.to.line&&(a+=As(n).ch-n.to.ch),ae(u,a)}o(Ei,"adjustForChange");function Vp(r,n){for(var u=[],a=0;a1&&r.remove(S.line+1,ee-1),r.insert(S.line+1,me)}lr(r,"change",r,n)}o(Kf,"updateDoc");function Ds(r,n,u){function a(c,m,g){if(c.linked)for(var S=0;S1&&!r.done[r.done.length-2].ranges)return r.done.pop(),xe(r.done)}o(a0,"lastChangeEvent");function vo(r,n,u,a){var c=r.history;c.undone.length=0;var m=+new Date,g,S;if((c.lastOp==a||c.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&c.lastModTime>m-(r.cm?r.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(g=a0(c,c.lastOp==a)))S=xe(g.changes),ze(n.from,n.to)==0&&ze(n.from,S.to)==0?S.to=As(n):g.changes.push(Yp(r,n));else{var C=xe(c.done);for((!C||!C.ranges)&&Pn(r.sel,c.done),g={changes:[Yp(r,n)],generation:c.generation},c.done.push(g);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift()}c.done.push(u),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=m,c.lastOp=c.lastSelOp=a,c.lastOrigin=c.lastSelOrigin=n.origin,S||be(r,"historyAdded")}o(vo,"addChangeToHistory");function Qp(r,n,u,a){var c=n.charAt(0);return c=="*"||c=="+"&&u.ranges.length==a.ranges.length&&u.somethingSelected()==a.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}o(Qp,"selectionEventCanBeMerged");function yl(r,n,u,a){var c=r.history,m=a&&a.origin;u==c.lastSelOp||m&&c.lastSelOrigin==m&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==m||Qp(r,m,xe(c.done),n))?c.done[c.done.length-1]=n:Pn(n,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=m,c.lastSelOp=u,a&&a.clearRedo!==!1&&Xp(c.undone)}o(yl,"addSelectionToHistory");function Pn(r,n){var u=xe(n);u&&u.ranges&&u.equals(r)||n.push(r)}o(Pn,"pushSelectionToHistory");function wm(r,n,u,a){var c=n["spans_"+r.id],m=0;r.iter(Math.max(r.first,u),Math.min(r.first+r.size,a),function(g){g.markedSpans&&((c||(c=n["spans_"+r.id]={}))[m]=g.markedSpans),++m})}o(wm,"attachLocalSpans");function xm(r){if(!r)return null;for(var n,u=0;u-1&&(xe(S)[A]=E[A],delete E[A])}}return a}o(ai,"copyHistoryArray");function Yf(r,n,u,a){if(a){var c=r.anchor;if(u){var m=ze(n,c)<0;m!=ze(u,c)<0?(c=n,n=u):m!=ze(n,u)<0&&(n=u)}return new vt(c,n)}else return new vt(u||n,n)}o(Yf,"extendRange");function Xf(r,n,u,a,c){c==null&&(c=r.cm&&(r.cm.display.shift||r.extend)),Br(r,new li([Yf(r.sel.primary(),n,u,c)],0),a)}o(Xf,"extendSelection");function Mu(r,n,u){for(var a=[],c=r.cm&&(r.cm.display.shift||r.extend),m=0;m=n.ch:S.to>n.ch))){if(c&&(be(C,"beforeCursorEnter"),C.explicitlyCleared))if(m.markedSpans){--g;continue}else break;if(!C.atomic)continue;if(u){var A=C.find(a<0?1:-1),j=void 0;if((a<0?N:E)&&(A=Jf(r,A,-a,A&&A.line==n.line?m:null)),A&&A.line==n.line&&(j=ze(A,u))&&(a<0?j<0:j>0))return wl(r,A,n,a,c)}var z=C.find(a<0?-1:1);return(a<0?E:N)&&(z=Jf(r,z,a,z.line==n.line?m:null)),z?wl(r,z,n,a,c):null}}return n}o(wl,"skipAtomicInner");function Ur(r,n,u,a,c){var m=a||1,g=wl(r,n,u,m,c)||!c&&wl(r,n,u,m,!0)||wl(r,n,u,-m,c)||!c&&wl(r,n,u,-m,!0);return g||(r.cantEdit=!0,ae(r.first,0))}o(Ur,"skipAtomic");function Jf(r,n,u,a){return u<0&&n.ch==0?n.line>r.first?Ue(r,ae(n.line-1)):null:u>0&&n.ch==(a||Ne(r,n.line)).text.length?n.line=0;--c)ec(r,{from:a[c].from,to:a[c].to,text:c?[""]:n.text,origin:n.origin});else ec(r,n)}}o(ha,"makeChange");function ec(r,n){if(!(n.text.length==1&&n.text[0]==""&&ze(n.from,n.to)==0)){var u=Vp(r,n);vo(r,n,u,r.cm?r.cm.curOp.id:NaN),va(r,n,u,Pf(r,n));var a=[];Ds(r,function(c,m){!m&&st(a,c.history)==-1&&(bm(c.history,n),a.push(c.history)),va(c,n,null,Pf(c,n))})}}o(ec,"makeChangeInner");function tc(r,n,u){var a=r.cm&&r.cm.state.suppressEdits;if(!(a&&!u)){for(var c=r.history,m,g=r.sel,S=n=="undo"?c.done:c.undone,C=n=="undo"?c.undone:c.done,E=0;E=0;--z){var ee=j(z);if(ee)return ee.v}}}}o(tc,"makeChangeFromHistory");function ma(r,n){if(n!=0&&(r.first+=n,r.sel=new li(kr(r.sel.ranges,function(c){return new vt(ae(c.anchor.line+n,c.anchor.ch),ae(c.head.line+n,c.head.ch))}),r.sel.primIndex),r.cm)){Ze(r.cm,r.first,r.first-n,n);for(var u=r.cm.display,a=u.viewFrom;ar.lastLine())){if(n.from.linem&&(n={from:n.from,to:ae(m,Ne(r,m).text.length),text:[n.text[0]],origin:n.origin}),n.removed=wi(r,n.from,n.to),u||(u=Vp(r,n)),r.cm?u0(r.cm,n,a):Kf(r,n,a),ui(r,u,$t),r.cantEdit&&Ur(r,ae(r.firstLine(),0))&&(r.cantEdit=!1)}}o(va,"makeChangeSingleDoc");function u0(r,n,u){var a=r.doc,c=r.display,m=n.from,g=n.to,S=!1,C=m.line;r.options.lineWrapping||(C=dt(On(Ne(a,m.line))),a.iter(C,g.line+1,function(z){if(z==c.maxLine)return S=!0,!0})),a.sel.contains(n.from,n.to)>-1&&zl(r),Kf(a,n,u,am(r)),r.options.lineWrapping||(a.iter(C,m.line+n.text.length,function(z){var ee=ys(z);ee>c.maxLineLength&&(c.maxLine=z,c.maxLineLength=ee,c.maxLineChanged=!0,S=!1)}),S&&(r.curOp.updateMaxLine=!0)),Np(a,m.line),ho(r,400);var E=n.text.length-(g.line-m.line)-1;n.full?Ze(r):m.line==g.line&&n.text.length==1&&!Gp(r.doc,n)?bs(r,m.line,"text"):Ze(r,m.line,g.line+1,E);var N=Rt(r,"changes"),A=Rt(r,"change");if(A||N){var j={from:m,to:g,text:n.text,removed:n.removed,origin:n.origin};A&&lr(r,"change",r,j),N&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(j)}r.display.selForContextMenu=null}o(u0,"makeChangeSingleDocInEditor");function ga(r,n,u,a,c){var m;a||(a=u),ze(a,u)<0&&(m=[a,u],u=m[0],a=m[1]),typeof n=="string"&&(n=r.splitLines(n)),ha(r,{from:u,to:a,text:n,origin:c})}o(ga,"replaceRange");function ya(r,n,u,a){u1||!(this.children[0]instanceof wa))){var S=[];this.collapse(S),this.children=[new wa(S)],this.children[0].parent=this}},collapse:function(r){for(var n=0;n50){for(var g=c.lines.length%25+25,S=g;S10);r.parent.maybeSpill()}},iterN:function(r,n,u){for(var a=0;ar.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=N,r.display.maxLineChanged=!0)}a!=null&&r&&this.collapsed&&Ze(r,a,c+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Au(r.doc)),r&&lr(r,"markerCleared",r,this,a,c),n&&po(r),this.parent&&this.parent.clear()}},Fs.prototype.find=function(r,n){r==null&&this.type=="bookmark"&&(r=1);for(var u,a,c=0;c0||g==0&&m.clearWhenEmpty!==!1)return m;if(m.replacedWith&&(m.collapsed=!0,m.widgetNode=xt("span",[m.replacedWith],"CodeMirror-widget"),a.handleMouseEvents||m.widgetNode.setAttribute("cm-ignore-events","true"),a.insertLeft&&(m.widgetNode.insertLeft=!0)),m.collapsed){if(sl(r,n.line,n,u,m)||n.line!=u.line&&sl(r,u.line,n,u,m))throw new Error("Inserting collapsed marker partially overlapping an existing one");We()}m.addToHistory&&vo(r,{from:n,to:u,origin:"markText"},r.sel,NaN);var S=n.line,C=r.cm,E;if(r.iter(S,u.line+1,function(A){C&&m.collapsed&&!C.options.lineWrapping&&On(A)==C.display.maxLine&&(E=!0),m.collapsed&&S!=n.line&&xi(A,0),Se(A,new $o(m,S==n.line?n.ch:null,S==u.line?u.ch:null),r.cm&&r.cm.curOp),++S}),m.collapsed&&r.iter(n.line,u.line+1,function(A){Nt(r,A)&&xi(A,0)}),m.clearOnEnter&&H(m,"beforeCursorEnter",function(){return m.clear()}),m.readOnly&&(M(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),m.collapsed&&(m.id=++rc,m.atomic=!0),C){if(E&&(C.curOp.updateMaxLine=!0),m.collapsed)Ze(C,n.line,u.line+1);else if(m.className||m.startStyle||m.endStyle||m.css||m.attributes||m.title)for(var N=n.line;N<=u.line;N++)bs(C,N,"text");m.atomic&&Au(C.doc),lr(C,"markerAdded",C,m)}return m}o(Is,"markText");var xa=o(function(r,n){this.markers=r,this.primary=n;for(var u=0;u=0;C--)ha(this,a[C]);S?Qf(this,S):this.cm&&Os(this.cm)}),undo:T(function(){tc(this,"undo")}),redo:T(function(){tc(this,"redo")}),undoSelection:T(function(){tc(this,"undo",!0)}),redoSelection:T(function(){tc(this,"redo",!0)}),setExtending:function(r){this.extend=r},getExtending:function(){return this.extend},historySize:function(){for(var r=this.history,n=0,u=0,a=0;a=r.ch)&&n.push(c.marker.parent||c.marker)}return n},findMarks:function(r,n,u){r=Ue(this,r),n=Ue(this,n);var a=[],c=r.line;return this.iter(r.line,n.line+1,function(m){var g=m.markedSpans;if(g)for(var S=0;S=C.to||C.from==null&&c!=r.line||C.from!=null&&c==n.line&&C.from>=n.ch)&&(!u||u(C.marker))&&a.push(C.marker.parent||C.marker)}++c}),a},getAllMarks:function(){var r=[];return this.iter(function(n){var u=n.markedSpans;if(u)for(var a=0;ar)return n=r,!0;r-=m,++u}),Ue(this,ae(u,n))},indexFromPos:function(r){r=Ue(this,r);var n=r.ch;if(r.linen&&(n=r.from),r.to!=null&&r.to-1){n.state.draggingText(r),setTimeout(function(){return n.display.input.focus()},20);return}try{var N=r.dataTransfer.getData("Text");if(N){var A;if(n.state.draggingText&&!n.state.draggingText.copy&&(A=n.listSelections()),ui(n.doc,Ms(u,u)),A)for(var j=0;j=0;S--)ga(r.doc,"",a[S].from,a[S].to,"+delete");Os(r)})}o(fi,"deleteNearSelection");function Hu(r,n,u){var a=Ii(r.text,n+u,u);return a<0||a>r.text.length?null:a}o(Hu,"moveCharLogically");function sc(r,n,u){var a=Hu(r,n.ch,u);return a==null?null:new ae(n.line,a,u<0?"after":"before")}o(sc,"moveLogically");function Sa(r,n,u,a,c){if(r){n.doc.direction=="rtl"&&(c=-c);var m=kn(u,n.doc.direction);if(m){var g=c<0?xe(m):m[0],S=c<0==(g.level==1),C=S?"after":"before",E;if(g.level>0||n.doc.direction=="rtl"){var N=Ui(n,u);E=c<0?u.text.length-1:0;var A=ao(n,N,E).top;E=fn(function(j){return ao(n,N,j).top==A},c<0==(g.level==1)?g.from:g.to-1,E),C=="before"&&(E=Hu(u,E,1))}else E=c<0?g.to:g.from;return new ae(a,E,C)}}return new ae(a,c<0?u.text.length:0,c<0?"before":"after")}o(Sa,"endOfLine");function Am(r,n,u,a){var c=kn(n,r.doc.direction);if(!c)return sc(n,u,a);u.ch>=n.text.length?(u.ch=n.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var m=gi(c,u.ch,u.sticky),g=c[m];if(r.doc.direction=="ltr"&&g.level%2==0&&(a>0?g.to>u.ch:g.from=g.from&&j>=N.begin)){var z=A?"before":"after";return new ae(u.line,j,z)}}var ee=o(function(me,Ce,ve){for(var Te=o(function(Tt,xr){return xr?new ae(u.line,S(Tt,1),"before"):new ae(u.line,Tt,"after")},"getRes");me>=0&&me0==(Fe.level!=1),tt=De?ve.begin:S(ve.end,-1);if(Fe.from<=tt&&tt0?N.end:S(N.begin,-1);return ce!=null&&!(a>0&&ce==n.text.length)&&(oe=ee(a>0?0:c.length-1,a,E(ce)),oe)?oe:null}o(Am,"moveVisually");var Sl={selectAll:Cm,singleSelection:function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),$t)},killLine:function(r){return fi(r,function(n){if(n.empty()){var u=Ne(r.doc,n.head.line).text.length;return n.head.ch==u&&n.head.line0)c=new ae(c.line,c.ch+1),r.replaceRange(m.charAt(c.ch-1)+m.charAt(c.ch-2),ae(c.line,c.ch-2),c,"+transpose");else if(c.line>r.doc.first){var g=Ne(r.doc,c.line-1).text;g&&(c=new ae(c.line,1),r.replaceRange(m.charAt(0)+r.doc.lineSeparator()+g.charAt(g.length-1),ae(c.line-1,g.length-1),c,"+transpose"))}}u.push(new vt(c,c))}r.setSelections(u)})},newlineAndIndent:function(r){return Qr(r,function(){for(var n=r.listSelections(),u=n.length-1;u>=0;u--)r.replaceRange(r.doc.lineSeparator(),n[u].anchor,n[u].head,"+input");n=r.listSelections();for(var a=0;ar&&ze(n,this.pos)==0&&u==this.button};var zr,Vn;function v0(r,n){var u=+new Date;return Vn&&Vn.compare(u,r,n)?(zr=Vn=null,"triple"):zr&&zr.compare(u,r,n)?(Vn=new uc(u,r,n),zr=null,"double"):(zr=new uc(u,r,n),Vn=null,"single")}o(v0,"clickRepeat");function Hm(r){var n=this,u=n.display;if(!(Jt(n,r)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=r.shiftKey,mr(u,r)){_||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!cd(n,r)){var a=fo(n,r),c=Js(r),m=a?v0(a,c):"single";window.focus(),c==1&&n.state.selectingText&&n.state.selectingText(r),!(a&&fc(n,c,a,m,r))&&(c==1?a?Wm(n,a,m,r):yi(r)==u.scroller&&er(r):c==2?(a&&Xf(n.doc,a),setTimeout(function(){return u.input.focus()},20)):c==3&&(de?n.display.input.onContextMenu(r):zf(n)))}}}o(Hm,"onMouseDown");function fc(r,n,u,a,c){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(n==1?"Left":n==2?"Middle":"Right")+m,Ca(r,id(m,c),c,function(g){if(typeof g=="string"&&(g=Sl[g]),!g)return!1;var S=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),S=g(r,u)!=zt}finally{r.state.suppressEdits=!1}return S})}o(fc,"handleMappedButton");function _a(r,n,u){var a=r.getOption("configureMouse"),c=a?a(r,n,u):{};if(c.unit==null){var m=K?u.shiftKey&&u.metaKey:u.altKey;c.unit=m?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(c.extend==null||r.doc.extend)&&(c.extend=r.doc.extend||u.shiftKey),c.addNew==null&&(c.addNew=F?u.metaKey:u.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(F?u.altKey:u.ctrlKey)),c}o(_a,"configureMouse");function Wm(r,n,u,a){p?setTimeout(Fr(Bp,r),0):r.curOp.focus=Ke();var c=_a(r,u,a),m=r.doc.sel,g;r.options.dragDrop&&cs&&!r.isReadOnly()&&u=="single"&&(g=m.contains(n))>-1&&(ze((g=m.ranges[g]).from(),n)<0||n.xRel>0)&&(ze(g.to(),n)>0||n.xRel<0)?Bm(r,a,n,c):zm(r,a,n,c)}o(Wm,"leftButtonDown");function Bm(r,n,u,a){var c=r.display,m=!1,g=rr(r,function(E){_&&(c.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:zf(r)),he(c.wrapper.ownerDocument,"mouseup",g),he(c.wrapper.ownerDocument,"mousemove",S),he(c.scroller,"dragstart",C),he(c.scroller,"drop",g),m||(er(E),a.addNew||Xf(r.doc,u,null,null,a.extend),_&&!B||p&&y==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),S=o(function(E){m=m||Math.abs(n.clientX-E.clientX)+Math.abs(n.clientY-E.clientY)>=10},"mouseMove"),C=o(function(){return m=!0},"dragStart");_&&(c.scroller.draggable=!0),r.state.draggingText=g,g.copy=!a.moveOnDrag,H(c.wrapper.ownerDocument,"mouseup",g),H(c.wrapper.ownerDocument,"mousemove",S),H(c.scroller,"dragstart",C),H(c.scroller,"drop",g),r.state.delayingBlurEvent=!0,setTimeout(function(){return c.input.focus()},20),c.scroller.dragDrop&&c.scroller.dragDrop()}o(Bm,"leftButtonStartDrag");function Um(r,n,u){if(u=="char")return new vt(n,n);if(u=="word")return r.findWordAt(n);if(u=="line")return new vt(ae(n.line,0),Ue(r.doc,ae(n.line+1,0)));var a=u(r,n);return new vt(a.from,a.to)}o(Um,"rangeForUnit");function zm(r,n,u,a){p&&zf(r);var c=r.display,m=r.doc;er(n);var g,S,C=m.sel,E=C.ranges;if(a.addNew&&!a.extend?(S=m.sel.contains(u),S>-1?g=E[S]:g=new vt(u,u)):(g=m.sel.primary(),S=m.sel.primIndex),a.unit=="rectangle")a.addNew||(g=new vt(u,u)),u=fo(r,n,!0,!0),S=-1;else{var N=Um(r,u,a.unit);a.extend?g=Yf(g,N.anchor,N.head,a.extend):g=N}a.addNew?S==-1?(S=E.length,Br(m,Jr(r,E.concat([g]),S),{scroll:!1,origin:"*mouse"})):E.length>1&&E[S].empty()&&a.unit=="char"&&!a.extend?(Br(m,Jr(r,E.slice(0,S).concat(E.slice(S+1)),0),{scroll:!1,origin:"*mouse"}),C=m.sel):Zp(m,S,g,ne):(S=0,Br(m,new li([g],0),ne),C=m.sel);var A=u;function j(ve){if(ze(A,ve)!=0)if(A=ve,a.unit=="rectangle"){for(var Te=[],Fe=r.options.tabSize,De=bt(Ne(m,u.line).text,u.ch,Fe),tt=bt(Ne(m,ve.line).text,ve.ch,Fe),Tt=Math.min(De,tt),xr=Math.max(De,tt),Mt=Math.min(u.line,ve.line),vn=Math.min(r.lastLine(),Math.max(u.line,ve.line));Mt<=vn;Mt++){var gn=Ne(m,Mt).text,ur=Tr(gn,Tt,Fe);Tt==xr?Te.push(new vt(ae(Mt,ur),ae(Mt,ur))):gn.length>ur&&Te.push(new vt(ae(Mt,ur),ae(Mt,Tr(gn,xr,Fe))))}Te.length||Te.push(new vt(u,u)),Br(m,Jr(r,C.ranges.slice(0,S).concat(Te),S),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ve)}else{var $r=g,Nr=Um(r,ve,a.unit),Lt=$r.anchor,It;ze(Nr.anchor,Lt)>0?(It=Nr.head,Lt=ds($r.from(),Nr.anchor)):(It=Nr.anchor,Lt=Uo($r.to(),Nr.head));var nr=C.ranges.slice(0);nr[S]=Ea(r,new vt(Ue(m,Lt),It)),Br(m,Jr(r,nr,S),ne)}}o(j,"extendTo");var z=c.wrapper.getBoundingClientRect(),ee=0;function oe(ve){var Te=++ee,Fe=fo(r,ve,!0,a.unit=="rectangle");if(!!Fe)if(ze(Fe,A)!=0){r.curOp.focus=Ke(),j(Fe);var De=hl(c,m);(Fe.line>=De.to||Fe.linez.bottom?20:0;tt&&setTimeout(rr(r,function(){ee==Te&&(c.scroller.scrollTop+=tt,oe(ve))}),50)}}o(oe,"extend");function ce(ve){r.state.selectingText=!1,ee=1/0,ve&&(er(ve),c.input.focus()),he(c.wrapper.ownerDocument,"mousemove",me),he(c.wrapper.ownerDocument,"mouseup",Ce),m.history.lastSelOrigin=null}o(ce,"done");var me=rr(r,function(ve){ve.buttons===0||!Js(ve)?ce(ve):oe(ve)}),Ce=rr(r,ce);r.state.selectingText=Ce,H(c.wrapper.ownerDocument,"mousemove",me),H(c.wrapper.ownerDocument,"mouseup",Ce)}o(zm,"leftButtonSelect");function Ea(r,n){var u=n.anchor,a=n.head,c=Ne(r.doc,u.line);if(ze(u,a)==0&&u.sticky==a.sticky)return n;var m=kn(c);if(!m)return n;var g=gi(m,u.ch,u.sticky),S=m[g];if(S.from!=u.ch&&S.to!=u.ch)return n;var C=g+(S.from==u.ch==(S.level!=1)?0:1);if(C==0||C==m.length)return n;var E;if(a.line!=u.line)E=(a.line-u.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var N=gi(m,a.ch,a.sticky),A=N-g||(a.ch-u.ch)*(S.level==1?-1:1);N==C-1||N==C?E=A<0:E=A>0}var j=m[C+(E?-1:0)],z=E==(j.level==1),ee=z?j.from:j.to,oe=z?"after":"before";return u.ch==ee&&u.sticky==oe?n:new vt(new ae(u.line,ee,oe),a)}o(Ea,"bidiSimplify");function ba(r,n,u,a){var c,m;if(n.touches)c=n.touches[0].clientX,m=n.touches[0].clientY;else try{c=n.clientX,m=n.clientY}catch(j){return!1}if(c>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;a&&er(n);var g=r.display,S=g.lineDiv.getBoundingClientRect();if(m>S.bottom||!Rt(r,u))return fs(n);m-=S.top-g.viewOffset;for(var C=0;C=c){var N=Hi(r.doc,m),A=r.display.gutterSpecs[C];return be(r,u,r,N,A.className,n),fs(n)}}}o(ba,"gutterEvent");function cd(r,n){return ba(r,n,"gutterClick",!0)}o(cd,"clickInGutter");function pd(r,n){mr(r.display,n)||$m(r,n)||Jt(r,n,"contextmenu")||de||r.display.input.onContextMenu(n)}o(pd,"onContextMenu");function $m(r,n){return Rt(r,"gutterContextMenu")?ba(r,n,"gutterContextMenu",!1):!1}o($m,"contextMenuInGutter");function Wu(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Cu(r)}o(Wu,"themeChanged");var Cl={toString:function(){return"CodeMirror.Init"}},Bu={},Ta={};function cc(r){var n=r.optionHandlers;function u(a,c,m,g){r.defaults[a]=c,m&&(n[a]=g?function(S,C,E){E!=Cl&&m(S,C,E)}:m)}o(u,"option"),r.defineOption=u,r.Init=Cl,u("value","",function(a,c){return a.setValue(c)},!0),u("mode",null,function(a,c){a.doc.modeOption=c,Kp(a)},!0),u("indentUnit",2,Kp,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(a){Nu(a),Cu(a),Ze(a)},!0),u("lineSeparator",null,function(a,c){if(a.doc.lineSep=c,!!c){var m=[],g=a.doc.first;a.doc.iter(function(C){for(var E=0;;){var N=C.text.indexOf(c,E);if(N==-1)break;E=N+c.length,m.push(ae(g,N))}g++});for(var S=m.length-1;S>=0;S--)ga(a.doc,c,m[S],ae(m[S].line,m[S].ch+c.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(a,c,m){a.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),m!=Cl&&a.refresh()}),u("specialCharPlaceholder",Ln,function(a){return a.refresh()},!0),u("electricChars",!0),u("inputStyle",P?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(a,c){return a.getInputField().spellcheck=c},!0),u("autocorrect",!1,function(a,c){return a.getInputField().autocorrect=c},!0),u("autocapitalize",!1,function(a,c){return a.getInputField().autocapitalize=c},!0),u("rtlMoveVisually",!V),u("wholeLineUpdateBefore",!0),u("theme","default",function(a){Wu(a),Lu(a)},!0),u("keyMap","default",function(a,c,m){var g=hn(c),S=m!=Cl&&hn(m);S&&S.detach&&S.detach(a,g),g.attach&&g.attach(a,S||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,jm,!0),u("gutters",[],function(a,c){a.display.gutterSpecs=qp(c,a.options.lineNumbers),Lu(a)},!0),u("fixedGutter",!0,function(a,c){a.display.gutters.style.left=c?sa(a.display)+"px":"0",a.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(a){return Ns(a)},!0),u("scrollbarStyle","native",function(a){vl(a),Ns(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),u("lineNumbers",!1,function(a,c){a.display.gutterSpecs=qp(a.options.gutters,c),Lu(a)},!0),u("firstLineNumber",1,Lu,!0),u("lineNumberFormatter",function(a){return a},Lu,!0),u("showCursorWhenSelecting",!1,_u,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(a,c){c=="nocursor"&&(dl(a),a.display.input.blur()),a.display.input.readOnlyChanged(c)}),u("screenReaderLabel",null,function(a,c){c=c===""?null:c,a.display.input.screenReaderLabelChanged(c)}),u("disableInput",!1,function(a,c){c||a.display.input.reset()},!0),u("dragDrop",!0,g0),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,_u,!0),u("singleCursorHeightPerLine",!0,_u,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Nu,!0),u("addModeClass",!1,Nu,!0),u("pollInterval",100),u("undoDepth",200,function(a,c){return a.doc.history.undoDepth=c}),u("historyEventDelay",1250),u("viewportMargin",10,function(a){return a.refresh()},!0),u("maxHighlightLength",1e4,Nu,!0),u("moveInputWithCursor",!0,function(a,c){c||a.display.input.resetPosition()}),u("tabindex",null,function(a,c){return a.display.input.getField().tabIndex=c||""}),u("autofocus",null),u("direction","ltr",function(a,c){return a.doc.setDirection(c)},!0),u("phrases",null)}o(cc,"defineOptions");function g0(r,n,u){var a=u&&u!=Cl;if(!n!=!a){var c=r.display.dragFunctions,m=n?H:he;m(r.display.scroller,"dragstart",c.start),m(r.display.scroller,"dragenter",c.enter),m(r.display.scroller,"dragover",c.over),m(r.display.scroller,"dragleave",c.leave),m(r.display.scroller,"drop",c.drop)}}o(g0,"dragDropChanged");function jm(r){r.options.lineWrapping?(Ge(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(we(r.display.wrapper,"CodeMirror-wrap"),ll(r)),Es(r),Ze(r),Cu(r),setTimeout(function(){return Ns(r)},100)}o(jm,"wrappingChanged");function Pt(r,n){var u=this;if(!(this instanceof Pt))return new Pt(r,n);this.options=n=n?Kt(n):{},Kt(Bu,n,!1);var a=n.value;typeof a=="string"?a=new dn(a,n.mode,null,n.lineSeparator,n.direction):n.mode&&(a.modeOption=n.mode),this.doc=a;var c=new Pt.inputStyles[n.inputStyle](this),m=this.display=new o0(r,a,c,n);m.wrapper.CodeMirror=this,Wu(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new St,keySeq:null,specialChars:null},n.autofocus&&!P&&m.input.focus(),p&&y<11&&setTimeout(function(){return u.display.input.reset(!0)},20),qm(this),nd(),$i(this),this.curOp.forceUpdate=!0,ym(this,a),n.autofocus&&!P||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&aa(u)},20):dl(this);for(var g in Ta)Ta.hasOwnProperty(g)&&Ta[g](this,n[g],Cl);mo(this),n.finishInit&&n.finishInit(this);for(var S=0;S20*20}o(g,"farAway"),H(n.scroller,"touchstart",function(C){if(!Jt(r,C)&&!m(C)&&!cd(r,C)){n.input.ensurePolled(),clearTimeout(u);var E=+new Date;n.activeTouch={start:E,moved:!1,prev:E-a.end<=300?a:null},C.touches.length==1&&(n.activeTouch.left=C.touches[0].pageX,n.activeTouch.top=C.touches[0].pageY)}}),H(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),H(n.scroller,"touchend",function(C){var E=n.activeTouch;if(E&&!mr(n,C)&&E.left!=null&&!E.moved&&new Date-E.start<300){var N=r.coordsChar(n.activeTouch,"page"),A;!E.prev||g(E,E.prev)?A=new vt(N,N):!E.prev.prev||g(E,E.prev.prev)?A=r.findWordAt(N):A=new vt(ae(N.line,0),Ue(r.doc,ae(N.line+1,0))),r.setSelection(A.anchor,A.head),r.focus(),er(C)}c()}),H(n.scroller,"touchcancel",c),H(n.scroller,"scroll",function(){n.scroller.clientHeight&&(tr(r,n.scroller.scrollTop),ml(r,n.scroller.scrollLeft,!0),be(r,"scroll",r))}),H(n.scroller,"mousewheel",function(C){return vm(r,C)}),H(n.scroller,"DOMMouseScroll",function(C){return vm(r,C)}),H(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(C){Jt(r,C)||no(C)},over:function(C){Jt(r,C)||(td(r,C),no(C))},start:function(C){return c0(r,C)},drop:rr(r,Pm),leave:function(C){Jt(r,C)||rd(r)}};var S=n.input.getField();H(S,"keyup",function(C){return fd.call(r,C)}),H(S,"keydown",rr(r,Dm)),H(S,"keypress",rr(r,Fm)),H(S,"focus",function(C){return aa(r,C)}),H(S,"blur",function(C){return dl(r,C)})}o(qm,"registerEventHandlers");var Uu=[];Pt.defineInitHook=function(r){return Uu.push(r)};function zu(r,n,u,a){var c=r.doc,m;u==null&&(u="add"),u=="smart"&&(c.mode.indent?m=hs(r,n).state:u="prev");var g=r.options.tabSize,S=Ne(c,n),C=bt(S.text,null,g);S.stateAfter&&(S.stateAfter=null);var E=S.text.match(/^\s*/)[0],N;if(!a&&!/\S/.test(S.text))N=0,u="not";else if(u=="smart"&&(N=c.mode.indent(m,S.text.slice(E.length),S.text),N==zt||N>150)){if(!a)return;u="prev"}u=="prev"?n>c.first?N=bt(Ne(c,n-1).text,null,g):N=0:u=="add"?N=C+r.options.indentUnit:u=="subtract"?N=C-r.options.indentUnit:typeof u=="number"&&(N=C+u),N=Math.max(0,N);var A="",j=0;if(r.options.indentWithTabs)for(var z=Math.floor(N/g);z;--z)j+=g,A+=" ";if(jg,C=tl(n),E=null;if(S&&a.ranges.length>1)if(Ti&&Ti.text.join(` -`)==n){if(a.ranges.length%Ti.text.length==0){E=[];for(var N=0;N=0;j--){var z=a.ranges[j],ee=z.from(),oe=z.to();z.empty()&&(u&&u>0?ee=ae(ee.line,ee.ch-u):r.state.overwrite&&!S?oe=ae(oe.line,Math.min(Ne(m,oe.line).text.length,oe.ch+xe(C).length)):S&&Ti&&Ti.lineWise&&Ti.text.join(` + height: `+(De-Te)+"px"))}o(N,"add");function A(ve,Te,Fe){var De=Ne(c,ve),tt=De.text.length,bt,yr;function Nt(sr,Ur){return Hf(r,ae(ve,sr),"div",De,Ur)}o(Nt,"coords");function dn(sr,Ur,Or){var kt=Z(r,De,null,sr),Rt=Ur=="ltr"==(Or=="after")?"left":"right",er=Or=="after"?kt.begin:kt.end-(/\s/.test(De.text.charAt(kt.end-1))?2:1);return Nt(er,Rt)[Rt]}o(dn,"wrapX");var hn=bn(De,c.direction);return Rn(hn,Te||0,Fe??tt,function(sr,Ur,Or,kt){var Rt=Or=="ltr",er=Nt(sr,Rt?"left":"right"),mn=Nt(Ur-1,Rt?"right":"left"),Ea=Te==null&&sr==0,Rs=Fe==null&&Ur==tt,Zr=kt==0,mo=!hn||kt==hn.length-1;if(mn.top-er.top<=3){var Lr=(b?Ea:Rs)&&Zr,vd=(b?Rs:Ea)&&mo,Go=Lr?S:(Rt?er:mn).left,Sl=vd?C:(Rt?mn:er).right;N(Go,er.top,Sl-Go,er.bottom)}else{var Cl,vn,Ta,dc;Rt?(Cl=b&&Ea&&Zr?S:er.left,vn=b?C:dn(sr,Or,"before"),Ta=b?S:dn(Ur,Or,"after"),dc=b&&Rs&&mo?C:mn.right):(Cl=b?dn(sr,Or,"before"):S,vn=!b&&Ea&&Zr?C:er.right,Ta=!b&&Rs&&mo?S:mn.left,dc=b?dn(Ur,Or,"after"):C),N(Cl,er.top,vn-Cl,er.bottom),er.bottom0?i.blinker=setInterval(function(){r.hasFocus()||fl(r),i.cursorDiv.style.visibility=(u=!u)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(i.cursorDiv.style.visibility="hidden")}}o(na,"restartBlink");function Bp(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||ia(r))}o(Bp,"ensureFocus");function Wf(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&fl(r))},100)}o(Wf,"delayBlurEvent");function ia(r,i){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(Ee(r,"focus",r,i),r.state.focused=!0,Ge(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),_&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),na(r))}o(ia,"onFocus");function fl(r,i){r.state.delayingBlurEvent||(r.state.focused&&(Ee(r,"blur",r,i),r.state.focused=!1,we(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}o(fl,"onBlur");function Ss(r){for(var i=r.display,u=i.lineDiv.offsetTop,a=0;a.005||N<-.005)&&(yi(c.line,g),Cs(c.line),c.rest))for(var A=0;Ar.display.sizerWidth){var $=Math.ceil(S/ta(r.display));$>r.display.maxLineLength&&(r.display.maxLineLength=$,r.display.maxLine=c.line,r.display.maxLineChanged=!0)}}}}o(Ss,"updateHeightsInViewport");function Cs(r){if(r.widgets)for(var i=0;i=g&&(m=Fi(i,Ir(Ne(i,C))-r.wrapper.clientHeight),g=C)}return{from:m,to:Math.max(g,m+1)}}o(cl,"visibleLines");function Yy(r,i){if(!Xt(r,"scrollCursorIntoView")){var u=r.display,a=u.sizer.getBoundingClientRect(),c=null;if(i.top+a.top<0?c=!0:i.bottom+a.top>(window.innerHeight||document.documentElement.clientHeight)&&(c=!1),c!=null&&!te){var m=be("div","\u200B",null,`position: absolute; + top: `+(i.top-u.viewOffset-Un(r.display))+`px; + height: `+(i.bottom-i.top+Vr(r)+u.barHeight)+`px; + left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");r.display.lineSpace.appendChild(m),m.scrollIntoView(c),r.display.lineSpace.removeChild(m)}}}o(Yy,"maybeScrollWindow");function Xy(r,i,u,a){a==null&&(a=0);var c;!r.options.lineWrapping&&i==u&&(u=i.sticky=="before"?ae(i.line,i.ch+1,"before"):i,i=i.ch?ae(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i);for(var m=0;m<5;m++){var g=!1,S=Bi(r,i),C=!u||u==i?S:Bi(r,u);c={left:Math.min(S.left,C.left),top:Math.min(S.top,C.top)-a,right:Math.max(S.left,C.left),bottom:Math.max(S.bottom,C.bottom)+a};var b=oa(r,c),N=r.doc.scrollTop,A=r.doc.scrollLeft;if(b.scrollTop!=null&&(Zt(r,b.scrollTop),Math.abs(r.doc.scrollTop-N)>1&&(g=!0)),b.scrollLeft!=null&&(pl(r,b.scrollLeft),Math.abs(r.doc.scrollLeft-A)>1&&(g=!0)),!g)break}return c}o(Xy,"scrollPosIntoView");function Qy(r,i){var u=oa(r,i);u.scrollTop!=null&&Zt(r,u.scrollTop),u.scrollLeft!=null&&pl(r,u.scrollLeft)}o(Qy,"scrollIntoView");function oa(r,i){var u=r.display,a=ys(r.display);i.top<0&&(i.top=0);var c=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:u.scroller.scrollTop,m=oo(r),g={};i.bottom-i.top>m&&(i.bottom=i.top+m);var S=r.doc.height+gr(u),C=i.topS-a;if(i.topc+m){var N=Math.min(i.top,(b?S:i.bottom)-m);N!=c&&(g.scrollTop=N)}var A=r.options.fixedGutter?0:u.gutters.offsetWidth,$=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:u.scroller.scrollLeft-A,z=Ii(r)-u.gutters.offsetWidth,ee=i.right-i.left>z;return ee&&(i.right=i.left+z),i.left<10?g.scrollLeft=0:i.left<$?g.scrollLeft=Math.max(0,i.left+A-(ee?0:10)):i.right>z+$-3&&(g.scrollLeft=i.right+(ee?0:10)-z),g}o(oa,"calculateScrollPos");function sa(r,i){i!=null&&(Bf(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+i)}o(sa,"addToScrollTop");function _s(r){Bf(r);var i=r.getCursor();r.curOp.scrollToPos={from:i,to:i,margin:r.options.cursorScrollMargin}}o(_s,"ensureCursorVisible");function _u(r,i,u){(i!=null||u!=null)&&Bf(r),i!=null&&(r.curOp.scrollLeft=i),u!=null&&(r.curOp.scrollTop=u)}o(_u,"scrollToCoords");function fm(r,i){Bf(r),r.curOp.scrollToPos=i}o(fm,"scrollToRange");function Bf(r){var i=r.curOp.scrollToPos;if(i){r.curOp.scrollToPos=null;var u=sm(r,i.from),a=sm(r,i.to);cm(r,u,a,i.margin)}}o(Bf,"resolveScrollToPos");function cm(r,i,u,a){var c=oa(r,{left:Math.min(i.left,u.left),top:Math.min(i.top,u.top)-a,right:Math.max(i.right,u.right),bottom:Math.max(i.bottom,u.bottom)+a});_u(r,c.scrollLeft,c.scrollTop)}o(cm,"scrollToCoordsRange");function Zt(r,i){Math.abs(r.doc.scrollTop-i)<2||(n||zp(r,{top:i}),Kr(r,i,!0),n&&zp(r),co(r,100))}o(Zt,"updateScrollTop");function Kr(r,i,u){i=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,i)),!(r.display.scroller.scrollTop==i&&!u)&&(r.doc.scrollTop=i,r.display.scrollbars.setScrollTop(i),r.display.scroller.scrollTop!=i&&(r.display.scroller.scrollTop=i))}o(Kr,"setScrollTop");function pl(r,i,u,a){i=Math.max(0,Math.min(i,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((u?i==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-i)<2)&&!a)&&(r.doc.scrollLeft=i,pm(r),r.display.scroller.scrollLeft!=i&&(r.display.scroller.scrollLeft=i),r.display.scrollbars.setScrollLeft(i))}o(pl,"setScrollLeft");function bu(r){var i=r.display,u=i.gutters.offsetWidth,a=Math.round(r.doc.height+gr(r.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:r.options.fixedGutter?u:0,docHeight:a,scrollHeight:a+Vr(r)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:u}}o(bu,"measureForScrollbars");var bs=o(function(r,i,u){this.cm=u;var a=this.vert=be("div",[be("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=be("div",[be("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=c.tabIndex=-1,r(a),r(c),H(a,"scroll",function(){a.clientHeight&&i(a.scrollTop,"vertical")}),H(c,"scroll",function(){c.clientWidth&&i(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&w<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");bs.prototype.update=function(r){var i=r.scrollWidth>r.clientWidth+1,u=r.scrollHeight>r.clientHeight+1,a=r.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=i?a+"px":"0";var c=r.viewHeight-(i?a:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+c)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=u?a+"px":"0",this.horiz.style.left=r.barLeft+"px";var m=r.viewWidth-r.barLeft-(u?a:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+m)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(a==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?a:0,bottom:i?a:0}},bs.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},bs.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},bs.prototype.zeroWidthHack=function(){var r=F&&!X?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new wt,this.disableVert=new wt},bs.prototype.enableZeroWidthBar=function(r,i,u){r.style.pointerEvents="auto";function a(){var c=r.getBoundingClientRect(),m=u=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1);m!=r?r.style.pointerEvents="none":i.set(1e3,a)}o(a,"maybeDisable"),i.set(1e3,a)},bs.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var Eu=o(function(){},"NullScrollbars");Eu.prototype.update=function(){return{bottom:0,right:0}},Eu.prototype.setScrollLeft=function(){},Eu.prototype.setScrollTop=function(){},Eu.prototype.clear=function(){};function Es(r,i){i||(i=bu(r));var u=r.display.barWidth,a=r.display.barHeight;la(r,i);for(var c=0;c<4&&u!=r.display.barWidth||a!=r.display.barHeight;c++)u!=r.display.barWidth&&r.options.lineWrapping&&Ss(r),la(r,bu(r)),u=r.display.barWidth,a=r.display.barHeight}o(Es,"updateScrollbars");function la(r,i){var u=r.display,a=u.scrollbars.update(i);u.sizer.style.paddingRight=(u.barWidth=a.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=a.bottom)+"px",u.heightForcer.style.borderBottom=a.bottom+"px solid transparent",a.right&&a.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=a.bottom+"px",u.scrollbarFiller.style.width=a.right+"px"):u.scrollbarFiller.style.display="",a.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=a.bottom+"px",u.gutterFiller.style.width=i.gutterWidth+"px"):u.gutterFiller.style.display=""}o(la,"updateScrollbarsInner");var Uf={native:bs,null:Eu};function dl(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&we(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Uf[r.options.scrollbarStyle](function(i){r.display.wrapper.insertBefore(i,r.display.scrollbarFiller),H(i,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,u){u=="horizontal"?pl(r,i):Zt(r,i)},r),r.display.scrollbars.addClass&&Ge(r.display.wrapper,r.display.scrollbars.addClass)}o(dl,"initScrollbars");var Tu=0;function Ui(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Tu,markArrays:null},no(r.curOp)}o(Ui,"startOperation");function fo(r){var i=r.curOp;i&&Fp(i,function(u){for(var a=0;a=u.viewTo)||u.maxLineChanged&&i.options.lineWrapping,r.update=r.mustUpdate&&new kn(i,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}o(Zy,"endOperation_R1");function Jy(r){r.updatedDisplay=r.mustUpdate&&Up(r.cm,r.update)}o(Jy,"endOperation_W1");function e0(r){var i=r.cm,u=i.display;r.updatedDisplay&&Ss(i),r.barMeasure=bu(i),u.maxLineChanged&&!i.options.lineWrapping&&(r.adjustWidthTo=em(i,u.maxLine,u.maxLine.text.length).left+3,i.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+r.adjustWidthTo+Vr(i)+i.display.barWidth),r.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+r.adjustWidthTo-Ii(i))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=u.input.prepareSelection())}o(e0,"endOperation_R2");function t0(r){var i=r.cm;r.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var u=+new Date+r.options.workTime,a=us(r,i.highlightFrontier),c=[];i.iter(a.line,Math.min(i.first+i.size,r.display.viewTo+500),function(m){if(a.line>=r.display.viewFrom){var g=m.styles,S=m.text.length>r.options.maxHighlightLength?Fo(i.mode,a.state):null,C=fu(r,m,a,!0);S&&(a.state=S),m.styles=C.styles;var b=m.styleClasses,N=C.classes;N?m.styleClasses=N:b&&(m.styleClasses=null);for(var A=!g||g.length!=m.styles.length||b!=N&&(!b||!N||b.bgClass!=N.bgClass||b.textClass!=N.textClass),$=0;!A&&$u)return co(r,r.options.workDelay),!0}),i.highlightFrontier=a.line,i.modeFrontier=Math.max(i.modeFrontier,a.line),c.length&&Gr(r,function(){for(var m=0;m=u.viewFrom&&i.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&am(r)==0)return!1;po(r)&&(zo(r),i.dims=zn(r));var c=a.first+a.size,m=Math.max(i.visible.from-r.options.viewportMargin,a.first),g=Math.min(c,i.visible.to+r.options.viewportMargin);u.viewFromg&&u.viewTo-g<20&&(g=Math.min(c,u.viewTo)),wi&&(m=Yl(r.doc,m),g=Fr(r.doc,g));var S=m!=u.viewFrom||g!=u.viewTo||u.lastWrapHeight!=i.wrapperHeight||u.lastWrapWidth!=i.wrapperWidth;Gy(r,m,g),u.viewOffset=Ir(Ne(r.doc,u.viewFrom)),r.display.mover.style.top=u.viewOffset+"px";var C=am(r);if(!S&&C==0&&!i.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var b=n0(r);return C>4&&(u.lineDiv.style.display="none"),o0(r,u.updateLineNumbers,i.dims),C>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,i0(b),qe(u.cursorDiv),qe(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,S&&(u.lastWrapHeight=i.wrapperHeight,u.lastWrapWidth=i.wrapperWidth,co(r,400)),u.updateLineNumbers=null,!0}o(Up,"updateDisplayIfNeeded");function Ts(r,i){for(var u=i.viewport,a=!0;;a=!1){if(!a||!r.options.lineWrapping||i.oldDisplayWidth==Ii(r)){if(u&&u.top!=null&&(u={top:Math.min(r.doc.height+gr(r.display)-oo(r),u.top)}),i.visible=cl(r.display,r.doc,u),i.visible.from>=r.display.viewFrom&&i.visible.to<=r.display.viewTo)break}else a&&(i.visible=cl(r.display,r.doc,u));if(!Up(r,i))break;Ss(r);var c=bu(r);Su(r),Es(r,c),$p(r,c),i.force=!1}i.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(i.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}o(Ts,"postUpdateDisplay");function zp(r,i){var u=new kn(r,i);if(Up(r,u)){Ss(r),Ts(r,u);var a=bu(r);Su(r),Es(r,a),$p(r,a),u.finish()}}o(zp,"updateDisplaySimple");function o0(r,i,u){var a=r.display,c=r.options.lineNumbers,m=a.lineDiv,g=m.firstChild;function S(ee){var oe=ee.nextSibling;return _&&F&&r.display.currentWheelTarget==ee?ee.style.display="none":ee.parentNode.removeChild(ee),oe}o(S,"rm");for(var C=a.view,b=a.viewFrom,N=0;N-1&&(z=!1),Af(r,A,b,u)),z&&(qe(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(el(r.options,b)))),g=A.node.nextSibling}b+=A.size}for(;g;)g=S(g)}o(o0,"patchDisplay");function jp(r){var i=r.gutters.offsetWidth;r.sizer.style.marginLeft=i+"px",ir(r,"gutterChanged",r)}o(jp,"updateGutterSpace");function $p(r,i){r.display.sizer.style.minHeight=i.docHeight+"px",r.display.heightForcer.style.top=i.docHeight+"px",r.display.gutters.style.height=i.docHeight+r.display.barHeight+Vr(r)+"px"}o($p,"setDocumentHeight");function pm(r){var i=r.display,u=i.view;if(!(!i.alignWidgets&&(!i.gutters.firstChild||!r.options.fixedGutter))){for(var a=ra(i)-i.scroller.scrollLeft+r.doc.scrollLeft,c=i.gutters.offsetWidth,m=a+"px",g=0;gg.clientWidth,C=g.scrollHeight>g.clientHeight;if(!!(a&&S||c&&C)){if(c&&F&&_){e:for(var b=i.target,N=m.view;b!=g;b=b.parentNode)for(var A=0;A=0&&ze(r,a.to())<=0)return u}return-1};var vt=o(function(r,i){this.anchor=r,this.head=i},"Range");vt.prototype.from=function(){return as(this.anchor,this.head)},vt.prototype.to=function(){return Ho(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Xr(r,i,u){var a=r&&r.options.selectionsMayTouch,c=i[u];i.sort(function($,z){return ze($.from(),z.from())}),u=st(i,c);for(var m=1;m0:C>=0){var b=as(S.from(),g.from()),N=Ho(S.to(),g.to()),A=S.empty()?g.from()==g.head:S.from()==S.head;m<=u&&--u,i.splice(--m,2,new vt(A?N:b,A?b:N))}}return new ni(i,u)}o(Xr,"normalizeSelection");function ks(r,i){return new ni([new vt(r,i||r)],0)}o(ks,"simpleSelection");function Os(r){return r.text?ae(r.from.line+r.text.length-1,xe(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}o(Os,"changeEnd");function Ci(r,i){if(ze(r,i.from)<0)return r;if(ze(r,i.to)<=0)return Os(i);var u=r.line+i.text.length-(i.to.line-i.from.line)-1,a=r.ch;return r.line==i.to.line&&(a+=Os(i).ch-i.to.ch),ae(u,a)}o(Ci,"adjustForChange");function Vp(r,i){for(var u=[],a=0;a1&&r.remove(S.line+1,ee-1),r.insert(S.line+1,me)}ir(r,"change",r,i)}o($f,"updateDoc");function Ls(r,i,u){function a(c,m,g){if(c.linked)for(var S=0;S1&&!r.done[r.done.length-2].ranges)return r.done.pop(),xe(r.done)}o(u0,"lastChangeEvent");function ho(r,i,u,a){var c=r.history;c.undone.length=0;var m=+new Date,g,S;if((c.lastOp==a||c.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&c.lastModTime>m-(r.cm?r.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(g=u0(c,c.lastOp==a)))S=xe(g.changes),ze(i.from,i.to)==0&&ze(i.from,S.to)==0?S.to=Os(i):g.changes.push(Yp(r,i));else{var C=xe(c.done);for((!C||!C.ranges)&&On(r.sel,c.done),g={changes:[Yp(r,i)],generation:c.generation},c.done.push(g);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift()}c.done.push(u),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=m,c.lastOp=c.lastSelOp=a,c.lastOrigin=c.lastSelOrigin=i.origin,S||Ee(r,"historyAdded")}o(ho,"addChangeToHistory");function Qp(r,i,u,a){var c=i.charAt(0);return c=="*"||c=="+"&&u.ranges.length==a.ranges.length&&u.somethingSelected()==a.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}o(Qp,"selectionEventCanBeMerged");function ml(r,i,u,a){var c=r.history,m=a&&a.origin;u==c.lastSelOp||m&&c.lastSelOrigin==m&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==m||Qp(r,m,xe(c.done),i))?c.done[c.done.length-1]=i:On(i,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=m,c.lastSelOp=u,a&&a.clearRedo!==!1&&Xp(c.undone)}o(ml,"addSelectionToHistory");function On(r,i){var u=xe(i);u&&u.ranges&&u.equals(r)||i.push(r)}o(On,"pushSelectionToHistory");function ym(r,i,u,a){var c=i["spans_"+r.id],m=0;r.iter(Math.max(r.first,u),Math.min(r.first+r.size,a),function(g){g.markedSpans&&((c||(c=i["spans_"+r.id]={}))[m]=g.markedSpans),++m})}o(ym,"attachLocalSpans");function wm(r){if(!r)return null;for(var i,u=0;u-1&&(xe(S)[A]=b[A],delete b[A])}}return a}o(ii,"copyHistoryArray");function Vf(r,i,u,a){if(a){var c=r.anchor;if(u){var m=ze(i,c)<0;m!=ze(u,c)<0?(c=i,i=u):m!=ze(i,u)<0&&(i=u)}return new vt(c,i)}else return new vt(u||i,i)}o(Vf,"extendRange");function Kf(r,i,u,a,c){c==null&&(c=r.cm&&(r.cm.display.shift||r.extend)),Hr(r,new ni([Vf(r.sel.primary(),i,u,c)],0),a)}o(Kf,"extendSelection");function Nu(r,i,u){for(var a=[],c=r.cm&&(r.cm.display.shift||r.extend),m=0;m=i.ch:S.to>i.ch))){if(c&&(Ee(C,"beforeCursorEnter"),C.explicitlyCleared))if(m.markedSpans){--g;continue}else break;if(!C.atomic)continue;if(u){var A=C.find(a<0?1:-1),$=void 0;if((a<0?N:b)&&(A=Xf(r,A,-a,A&&A.line==i.line?m:null)),A&&A.line==i.line&&($=ze(A,u))&&(a<0?$<0:$>0))return vl(r,A,i,a,c)}var z=C.find(a<0?-1:1);return(a<0?b:N)&&(z=Xf(r,z,a,z.line==i.line?m:null)),z?vl(r,z,i,a,c):null}}return i}o(vl,"skipAtomicInner");function Wr(r,i,u,a,c){var m=a||1,g=vl(r,i,u,m,c)||!c&&vl(r,i,u,m,!0)||vl(r,i,u,-m,c)||!c&&vl(r,i,u,-m,!0);return g||(r.cantEdit=!0,ae(r.first,0))}o(Wr,"skipAtomic");function Xf(r,i,u,a){return u<0&&i.ch==0?i.line>r.first?Ue(r,ae(i.line-1)):null:u>0&&i.ch==(a||Ne(r,i.line)).text.length?i.line=0;--c)Qf(r,{from:a[c].from,to:a[c].to,text:c?[""]:i.text,origin:i.origin});else Qf(r,i)}}o(fa,"makeChange");function Qf(r,i){if(!(i.text.length==1&&i.text[0]==""&&ze(i.from,i.to)==0)){var u=Vp(r,i);ho(r,i,u,r.cm?r.cm.curOp.id:NaN),pa(r,i,u,Of(r,i));var a=[];Ls(r,function(c,m){!m&&st(a,c.history)==-1&&(bm(c.history,i),a.push(c.history)),pa(c,i,null,Of(c,i))})}}o(Qf,"makeChangeInner");function Zf(r,i,u){var a=r.cm&&r.cm.state.suppressEdits;if(!(a&&!u)){for(var c=r.history,m,g=r.sel,S=i=="undo"?c.done:c.undone,C=i=="undo"?c.undone:c.done,b=0;b=0;--z){var ee=$(z);if(ee)return ee.v}}}}o(Zf,"makeChangeFromHistory");function ca(r,i){if(i!=0&&(r.first+=i,r.sel=new ni(Er(r.sel.ranges,function(c){return new vt(ae(c.anchor.line+i,c.anchor.ch),ae(c.head.line+i,c.head.ch))}),r.sel.primIndex),r.cm)){Ze(r.cm,r.first,r.first-i,i);for(var u=r.cm.display,a=u.viewFrom;ar.lastLine())){if(i.from.linem&&(i={from:i.from,to:ae(m,Ne(r,m).text.length),text:[i.text[0]],origin:i.origin}),i.removed=gi(r,i.from,i.to),u||(u=Vp(r,i)),r.cm?f0(r.cm,i,a):$f(r,i,a),oi(r,u,Ut),r.cantEdit&&Wr(r,ae(r.firstLine(),0))&&(r.cantEdit=!1)}}o(pa,"makeChangeSingleDoc");function f0(r,i,u){var a=r.doc,c=r.display,m=i.from,g=i.to,S=!1,C=m.line;r.options.lineWrapping||(C=dt(En(Ne(a,m.line))),a.iter(C,g.line+1,function(z){if(z==c.maxLine)return S=!0,!0})),a.sel.contains(i.from,i.to)>-1&&Hl(r),$f(a,i,u,lm(r)),r.options.lineWrapping||(a.iter(C,m.line+i.text.length,function(z){var ee=ds(z);ee>c.maxLineLength&&(c.maxLine=z,c.maxLineLength=ee,c.maxLineChanged=!0,S=!1)}),S&&(r.curOp.updateMaxLine=!0)),Np(a,m.line),co(r,400);var b=i.text.length-(g.line-m.line)-1;i.full?Ze(r):m.line==g.line&&i.text.length==1&&!Gp(r.doc,i)?xs(r,m.line,"text"):Ze(r,m.line,g.line+1,b);var N=At(r,"changes"),A=At(r,"change");if(A||N){var $={from:m,to:g,text:i.text,removed:i.removed,origin:i.origin};A&&ir(r,"change",r,$),N&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push($)}r.display.selForContextMenu=null}o(f0,"makeChangeSingleDocInEditor");function da(r,i,u,a,c){var m;a||(a=u),ze(a,u)<0&&(m=[a,u],u=m[0],a=m[1]),typeof i=="string"&&(i=r.splitLines(i)),fa(r,{from:u,to:a,text:i,origin:c})}o(da,"replaceRange");function ha(r,i,u,a){u1||!(this.children[0]instanceof ma))){var S=[];this.collapse(S),this.children=[new ma(S)],this.children[0].parent=this}},collapse:function(r){for(var i=0;i50){for(var g=c.lines.length%25+25,S=g;S10);r.parent.maybeSpill()}},iterN:function(r,i,u){for(var a=0;ar.display.maxLineLength&&(r.display.maxLine=b,r.display.maxLineLength=N,r.display.maxLineChanged=!0)}a!=null&&r&&this.collapsed&&Ze(r,a,c+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Pu(r.doc)),r&&ir(r,"markerCleared",r,this,a,c),i&&fo(r),this.parent&&this.parent.clear()}},Ps.prototype.find=function(r,i){r==null&&this.type=="bookmark"&&(r=1);for(var u,a,c=0;c0||g==0&&m.clearWhenEmpty!==!1)return m;if(m.replacedWith&&(m.collapsed=!0,m.widgetNode=yt("span",[m.replacedWith],"CodeMirror-widget"),a.handleMouseEvents||m.widgetNode.setAttribute("cm-ignore-events","true"),a.insertLeft&&(m.widgetNode.insertLeft=!0)),m.collapsed){if(nl(r,i.line,i,u,m)||i.line!=u.line&&nl(r,u.line,i,u,m))throw new Error("Inserting collapsed marker partially overlapping an existing one");We()}m.addToHistory&&ho(r,{from:i,to:u,origin:"markText"},r.sel,NaN);var S=i.line,C=r.cm,b;if(r.iter(S,u.line+1,function(A){C&&m.collapsed&&!C.options.lineWrapping&&En(A)==C.display.maxLine&&(b=!0),m.collapsed&&S!=i.line&&yi(A,0),Se(A,new Bo(m,S==i.line?i.ch:null,S==u.line?u.ch:null),r.cm&&r.cm.curOp),++S}),m.collapsed&&r.iter(i.line,u.line+1,function(A){Ot(r,A)&&yi(A,0)}),m.clearOnEnter&&H(m,"beforeCursorEnter",function(){return m.clear()}),m.readOnly&&(M(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),m.collapsed&&(m.id=++Jf,m.atomic=!0),C){if(b&&(C.curOp.updateMaxLine=!0),m.collapsed)Ze(C,i.line,u.line+1);else if(m.className||m.startStyle||m.endStyle||m.css||m.attributes||m.title)for(var N=i.line;N<=u.line;N++)xs(C,N,"text");m.atomic&&Pu(C.doc),ir(C,"markerAdded",C,m)}return m}o(Ms,"markText");var va=o(function(r,i){this.markers=r,this.primary=i;for(var u=0;u=0;C--)fa(this,a[C]);S?Gf(this,S):this.cm&&_s(this.cm)}),undo:T(function(){Zf(this,"undo")}),redo:T(function(){Zf(this,"redo")}),undoSelection:T(function(){Zf(this,"undo",!0)}),redoSelection:T(function(){Zf(this,"redo",!0)}),setExtending:function(r){this.extend=r},getExtending:function(){return this.extend},historySize:function(){for(var r=this.history,i=0,u=0,a=0;a=r.ch)&&i.push(c.marker.parent||c.marker)}return i},findMarks:function(r,i,u){r=Ue(this,r),i=Ue(this,i);var a=[],c=r.line;return this.iter(r.line,i.line+1,function(m){var g=m.markedSpans;if(g)for(var S=0;S=C.to||C.from==null&&c!=r.line||C.from!=null&&c==i.line&&C.from>=i.ch)&&(!u||u(C.marker))&&a.push(C.marker.parent||C.marker)}++c}),a},getAllMarks:function(){var r=[];return this.iter(function(i){var u=i.markedSpans;if(u)for(var a=0;ar)return i=r,!0;r-=m,++u}),Ue(this,ae(u,i))},indexFromPos:function(r){r=Ue(this,r);var i=r.ch;if(r.linei&&(i=r.from),r.to!=null&&r.to-1){i.state.draggingText(r),setTimeout(function(){return i.display.input.focus()},20);return}try{var N=r.dataTransfer.getData("Text");if(N){var A;if(i.state.draggingText&&!i.state.draggingText.copy&&(A=i.listSelections()),oi(i.doc,ks(u,u)),A)for(var $=0;$=0;S--)da(r.doc,"",a[S].from,a[S].to,"+delete");_s(r)})}o(si,"deleteNearSelection");function Fu(r,i,u){var a=Ri(r.text,i+u,u);return a<0||a>r.text.length?null:a}o(Fu,"moveCharLogically");function nc(r,i,u){var a=Fu(r,i.ch,u);return a==null?null:new ae(i.line,a,u<0?"after":"before")}o(nc,"moveLogically");function ga(r,i,u,a,c){if(r){i.doc.direction=="rtl"&&(c=-c);var m=bn(u,i.doc.direction);if(m){var g=c<0?xe(m):m[0],S=c<0==(g.level==1),C=S?"after":"before",b;if(g.level>0||i.doc.direction=="rtl"){var N=Wi(i,u);b=c<0?u.text.length-1:0;var A=so(i,N,b).top;b=ln(function($){return so(i,N,$).top==A},c<0==(g.level==1)?g.from:g.to-1,b),C=="before"&&(b=Fu(u,b,1))}else b=c<0?g.to:g.from;return new ae(a,b,C)}}return new ae(a,c<0?u.text.length:0,c<0?"before":"after")}o(ga,"endOfLine");function Mm(r,i,u,a){var c=bn(i,r.doc.direction);if(!c)return nc(i,u,a);u.ch>=i.text.length?(u.ch=i.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var m=mi(c,u.ch,u.sticky),g=c[m];if(r.doc.direction=="ltr"&&g.level%2==0&&(a>0?g.to>u.ch:g.from=g.from&&$>=N.begin)){var z=A?"before":"after";return new ae(u.line,$,z)}}var ee=o(function(me,Ce,ve){for(var Te=o(function(bt,yr){return yr?new ae(u.line,S(bt,1),"before"):new ae(u.line,bt,"after")},"getRes");me>=0&&me0==(Fe.level!=1),tt=De?ve.begin:S(ve.end,-1);if(Fe.from<=tt&&tt0?N.end:S(N.begin,-1);return ce!=null&&!(a>0&&ce==i.text.length)&&(oe=ee(a>0?0:c.length-1,a,b(ce)),oe)?oe:null}o(Mm,"moveVisually");var yl={selectAll:Sm,singleSelection:function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),Ut)},killLine:function(r){return si(r,function(i){if(i.empty()){var u=Ne(r.doc,i.head.line).text.length;return i.head.ch==u&&i.head.line0)c=new ae(c.line,c.ch+1),r.replaceRange(m.charAt(c.ch-1)+m.charAt(c.ch-2),ae(c.line,c.ch-2),c,"+transpose");else if(c.line>r.doc.first){var g=Ne(r.doc,c.line-1).text;g&&(c=new ae(c.line,1),r.replaceRange(m.charAt(0)+r.doc.lineSeparator()+g.charAt(g.length-1),ae(c.line-1,g.length-1),c,"+transpose"))}}u.push(new vt(c,c))}r.setSelections(u)})},newlineAndIndent:function(r){return Gr(r,function(){for(var i=r.listSelections(),u=i.length-1;u>=0;u--)r.replaceRange(r.doc.lineSeparator(),i[u].anchor,i[u].head,"+input");i=r.listSelections();for(var a=0;ar&&ze(i,this.pos)==0&&u==this.button};var Br,jn;function g0(r,i){var u=+new Date;return jn&&jn.compare(u,r,i)?(Br=jn=null,"triple"):Br&&Br.compare(u,r,i)?(jn=new sc(u,r,i),Br=null,"double"):(Br=new sc(u,r,i),jn=null,"single")}o(g0,"clickRepeat");function Im(r){var i=this,u=i.display;if(!(Xt(i,r)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=r.shiftKey,dr(u,r)){_||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!cd(i,r)){var a=ao(i,r),c=Xs(r),m=a?g0(a,c):"single";window.focus(),c==1&&i.state.selectingText&&i.state.selectingText(r),!(a&&lc(i,c,a,m,r))&&(c==1?a?Hm(i,a,m,r):vi(r)==u.scroller&&Qt(r):c==2?(a&&Kf(i.doc,a),setTimeout(function(){return u.input.focus()},20)):c==3&&(de?i.display.input.onContextMenu(r):Wf(i)))}}}o(Im,"onMouseDown");function lc(r,i,u,a,c){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(i==1?"Left":i==2?"Middle":"Right")+m,ya(r,id(m,c),c,function(g){if(typeof g=="string"&&(g=yl[g]),!g)return!1;var S=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),S=g(r,u)!=Bt}finally{r.state.suppressEdits=!1}return S})}o(lc,"handleMappedButton");function wa(r,i,u){var a=r.getOption("configureMouse"),c=a?a(r,i,u):{};if(c.unit==null){var m=K?u.shiftKey&&u.metaKey:u.altKey;c.unit=m?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(c.extend==null||r.doc.extend)&&(c.extend=r.doc.extend||u.shiftKey),c.addNew==null&&(c.addNew=F?u.metaKey:u.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(F?u.altKey:u.ctrlKey)),c}o(wa,"configureMouse");function Hm(r,i,u,a){p?setTimeout(Dr(Bp,r),0):r.curOp.focus=Ke();var c=wa(r,u,a),m=r.doc.sel,g;r.options.dragDrop&&ss&&!r.isReadOnly()&&u=="single"&&(g=m.contains(i))>-1&&(ze((g=m.ranges[g]).from(),i)<0||i.xRel>0)&&(ze(g.to(),i)>0||i.xRel<0)?Wm(r,a,i,c):Um(r,a,i,c)}o(Hm,"leftButtonDown");function Wm(r,i,u,a){var c=r.display,m=!1,g=Jt(r,function(b){_&&(c.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Wf(r)),he(c.wrapper.ownerDocument,"mouseup",g),he(c.wrapper.ownerDocument,"mousemove",S),he(c.scroller,"dragstart",C),he(c.scroller,"drop",g),m||(Qt(b),a.addNew||Kf(r.doc,u,null,null,a.extend),_&&!W||p&&w==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),S=o(function(b){m=m||Math.abs(i.clientX-b.clientX)+Math.abs(i.clientY-b.clientY)>=10},"mouseMove"),C=o(function(){return m=!0},"dragStart");_&&(c.scroller.draggable=!0),r.state.draggingText=g,g.copy=!a.moveOnDrag,H(c.wrapper.ownerDocument,"mouseup",g),H(c.wrapper.ownerDocument,"mousemove",S),H(c.scroller,"dragstart",C),H(c.scroller,"drop",g),r.state.delayingBlurEvent=!0,setTimeout(function(){return c.input.focus()},20),c.scroller.dragDrop&&c.scroller.dragDrop()}o(Wm,"leftButtonStartDrag");function Bm(r,i,u){if(u=="char")return new vt(i,i);if(u=="word")return r.findWordAt(i);if(u=="line")return new vt(ae(i.line,0),Ue(r.doc,ae(i.line+1,0)));var a=u(r,i);return new vt(a.from,a.to)}o(Bm,"rangeForUnit");function Um(r,i,u,a){p&&Wf(r);var c=r.display,m=r.doc;Qt(i);var g,S,C=m.sel,b=C.ranges;if(a.addNew&&!a.extend?(S=m.sel.contains(u),S>-1?g=b[S]:g=new vt(u,u)):(g=m.sel.primary(),S=m.sel.primIndex),a.unit=="rectangle")a.addNew||(g=new vt(u,u)),u=ao(r,i,!0,!0),S=-1;else{var N=Bm(r,u,a.unit);a.extend?g=Vf(g,N.anchor,N.head,a.extend):g=N}a.addNew?S==-1?(S=b.length,Hr(m,Xr(r,b.concat([g]),S),{scroll:!1,origin:"*mouse"})):b.length>1&&b[S].empty()&&a.unit=="char"&&!a.extend?(Hr(m,Xr(r,b.slice(0,S).concat(b.slice(S+1)),0),{scroll:!1,origin:"*mouse"}),C=m.sel):Zp(m,S,g,ne):(S=0,Hr(m,new ni([g],0),ne),C=m.sel);var A=u;function $(ve){if(ze(A,ve)!=0)if(A=ve,a.unit=="rectangle"){for(var Te=[],Fe=r.options.tabSize,De=_t(Ne(m,u.line).text,u.ch,Fe),tt=_t(Ne(m,ve.line).text,ve.ch,Fe),bt=Math.min(De,tt),yr=Math.max(De,tt),Nt=Math.min(u.line,ve.line),dn=Math.min(r.lastLine(),Math.max(u.line,ve.line));Nt<=dn;Nt++){var hn=Ne(m,Nt).text,sr=br(hn,bt,Fe);bt==yr?Te.push(new vt(ae(Nt,sr),ae(Nt,sr))):hn.length>sr&&Te.push(new vt(ae(Nt,sr),ae(Nt,br(hn,yr,Fe))))}Te.length||Te.push(new vt(u,u)),Hr(m,Xr(r,C.ranges.slice(0,S).concat(Te),S),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ve)}else{var Ur=g,Or=Bm(r,ve,a.unit),kt=Ur.anchor,Rt;ze(Or.anchor,kt)>0?(Rt=Or.head,kt=as(Ur.from(),Or.anchor)):(Rt=Or.anchor,kt=Ho(Ur.to(),Or.head));var er=C.ranges.slice(0);er[S]=xa(r,new vt(Ue(m,kt),Rt)),Hr(m,Xr(r,er,S),ne)}}o($,"extendTo");var z=c.wrapper.getBoundingClientRect(),ee=0;function oe(ve){var Te=++ee,Fe=ao(r,ve,!0,a.unit=="rectangle");if(!!Fe)if(ze(Fe,A)!=0){r.curOp.focus=Ke(),$(Fe);var De=cl(c,m);(Fe.line>=De.to||Fe.linez.bottom?20:0;tt&&setTimeout(Jt(r,function(){ee==Te&&(c.scroller.scrollTop+=tt,oe(ve))}),50)}}o(oe,"extend");function ce(ve){r.state.selectingText=!1,ee=1/0,ve&&(Qt(ve),c.input.focus()),he(c.wrapper.ownerDocument,"mousemove",me),he(c.wrapper.ownerDocument,"mouseup",Ce),m.history.lastSelOrigin=null}o(ce,"done");var me=Jt(r,function(ve){ve.buttons===0||!Xs(ve)?ce(ve):oe(ve)}),Ce=Jt(r,ce);r.state.selectingText=Ce,H(c.wrapper.ownerDocument,"mousemove",me),H(c.wrapper.ownerDocument,"mouseup",Ce)}o(Um,"leftButtonSelect");function xa(r,i){var u=i.anchor,a=i.head,c=Ne(r.doc,u.line);if(ze(u,a)==0&&u.sticky==a.sticky)return i;var m=bn(c);if(!m)return i;var g=mi(m,u.ch,u.sticky),S=m[g];if(S.from!=u.ch&&S.to!=u.ch)return i;var C=g+(S.from==u.ch==(S.level!=1)?0:1);if(C==0||C==m.length)return i;var b;if(a.line!=u.line)b=(a.line-u.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var N=mi(m,a.ch,a.sticky),A=N-g||(a.ch-u.ch)*(S.level==1?-1:1);N==C-1||N==C?b=A<0:b=A>0}var $=m[C+(b?-1:0)],z=b==($.level==1),ee=z?$.from:$.to,oe=z?"after":"before";return u.ch==ee&&u.sticky==oe?i:new vt(new ae(u.line,ee,oe),a)}o(xa,"bidiSimplify");function Sa(r,i,u,a){var c,m;if(i.touches)c=i.touches[0].clientX,m=i.touches[0].clientY;else try{c=i.clientX,m=i.clientY}catch($){return!1}if(c>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;a&&Qt(i);var g=r.display,S=g.lineDiv.getBoundingClientRect();if(m>S.bottom||!At(r,u))return os(i);m-=S.top-g.viewOffset;for(var C=0;C=c){var N=Fi(r.doc,m),A=r.display.gutterSpecs[C];return Ee(r,u,r,N,A.className,i),os(i)}}}o(Sa,"gutterEvent");function cd(r,i){return Sa(r,i,"gutterClick",!0)}o(cd,"clickInGutter");function pd(r,i){dr(r.display,i)||zm(r,i)||Xt(r,i,"contextmenu")||de||r.display.input.onContextMenu(i)}o(pd,"onContextMenu");function zm(r,i){return At(r,"gutterContextMenu")?Sa(r,i,"gutterContextMenu",!1):!1}o(zm,"contextMenuInGutter");function Iu(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xu(r)}o(Iu,"themeChanged");var wl={toString:function(){return"CodeMirror.Init"}},Hu={},Ca={};function ac(r){var i=r.optionHandlers;function u(a,c,m,g){r.defaults[a]=c,m&&(i[a]=g?function(S,C,b){b!=wl&&m(S,C,b)}:m)}o(u,"option"),r.defineOption=u,r.Init=wl,u("value","",function(a,c){return a.setValue(c)},!0),u("mode",null,function(a,c){a.doc.modeOption=c,Kp(a)},!0),u("indentUnit",2,Kp,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(a){Ou(a),xu(a),Ze(a)},!0),u("lineSeparator",null,function(a,c){if(a.doc.lineSep=c,!!c){var m=[],g=a.doc.first;a.doc.iter(function(C){for(var b=0;;){var N=C.text.indexOf(c,b);if(N==-1)break;b=N+c.length,m.push(ae(g,N))}g++});for(var S=m.length-1;S>=0;S--)da(a.doc,c,m[S],ae(m[S].line,m[S].ch+c.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(a,c,m){a.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),m!=wl&&a.refresh()}),u("specialCharPlaceholder",Tn,function(a){return a.refresh()},!0),u("electricChars",!0),u("inputStyle",P?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(a,c){return a.getInputField().spellcheck=c},!0),u("autocorrect",!1,function(a,c){return a.getInputField().autocorrect=c},!0),u("autocapitalize",!1,function(a,c){return a.getInputField().autocapitalize=c},!0),u("rtlMoveVisually",!V),u("wholeLineUpdateBefore",!0),u("theme","default",function(a){Iu(a),ku(a)},!0),u("keyMap","default",function(a,c,m){var g=cn(c),S=m!=wl&&cn(m);S&&S.detach&&S.detach(a,g),g.attach&&g.attach(a,S||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,jm,!0),u("gutters",[],function(a,c){a.display.gutterSpecs=qp(c,a.options.lineNumbers),ku(a)},!0),u("fixedGutter",!0,function(a,c){a.display.gutters.style.left=c?ra(a.display)+"px":"0",a.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(a){return Es(a)},!0),u("scrollbarStyle","native",function(a){dl(a),Es(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),u("lineNumbers",!1,function(a,c){a.display.gutterSpecs=qp(a.options.gutters,c),ku(a)},!0),u("firstLineNumber",1,ku,!0),u("lineNumberFormatter",function(a){return a},ku,!0),u("showCursorWhenSelecting",!1,Su,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(a,c){c=="nocursor"&&(fl(a),a.display.input.blur()),a.display.input.readOnlyChanged(c)}),u("screenReaderLabel",null,function(a,c){c=c===""?null:c,a.display.input.screenReaderLabelChanged(c)}),u("disableInput",!1,function(a,c){c||a.display.input.reset()},!0),u("dragDrop",!0,y0),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Su,!0),u("singleCursorHeightPerLine",!0,Su,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Ou,!0),u("addModeClass",!1,Ou,!0),u("pollInterval",100),u("undoDepth",200,function(a,c){return a.doc.history.undoDepth=c}),u("historyEventDelay",1250),u("viewportMargin",10,function(a){return a.refresh()},!0),u("maxHighlightLength",1e4,Ou,!0),u("moveInputWithCursor",!0,function(a,c){c||a.display.input.resetPosition()}),u("tabindex",null,function(a,c){return a.display.input.getField().tabIndex=c||""}),u("autofocus",null),u("direction","ltr",function(a,c){return a.doc.setDirection(c)},!0),u("phrases",null)}o(ac,"defineOptions");function y0(r,i,u){var a=u&&u!=wl;if(!i!=!a){var c=r.display.dragFunctions,m=i?H:he;m(r.display.scroller,"dragstart",c.start),m(r.display.scroller,"dragenter",c.enter),m(r.display.scroller,"dragover",c.over),m(r.display.scroller,"dragleave",c.leave),m(r.display.scroller,"drop",c.drop)}}o(y0,"dragDropChanged");function jm(r){r.options.lineWrapping?(Ge(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(we(r.display.wrapper,"CodeMirror-wrap"),il(r)),ws(r),Ze(r),xu(r),setTimeout(function(){return Es(r)},100)}o(jm,"wrappingChanged");function Lt(r,i){var u=this;if(!(this instanceof Lt))return new Lt(r,i);this.options=i=i?qt(i):{},qt(Hu,i,!1);var a=i.value;typeof a=="string"?a=new fn(a,i.mode,null,i.lineSeparator,i.direction):i.mode&&(a.modeOption=i.mode),this.doc=a;var c=new Lt.inputStyles[i.inputStyle](this),m=this.display=new s0(r,a,c,i);m.wrapper.CodeMirror=this,Iu(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),dl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new wt,keySeq:null,specialChars:null},i.autofocus&&!P&&m.input.focus(),p&&w<11&&setTimeout(function(){return u.display.input.reset(!0)},20),$m(this),nd(),Ui(this),this.curOp.forceUpdate=!0,gm(this,a),i.autofocus&&!P||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&ia(u)},20):fl(this);for(var g in Ca)Ca.hasOwnProperty(g)&&Ca[g](this,i[g],wl);po(this),i.finishInit&&i.finishInit(this);for(var S=0;S20*20}o(g,"farAway"),H(i.scroller,"touchstart",function(C){if(!Xt(r,C)&&!m(C)&&!cd(r,C)){i.input.ensurePolled(),clearTimeout(u);var b=+new Date;i.activeTouch={start:b,moved:!1,prev:b-a.end<=300?a:null},C.touches.length==1&&(i.activeTouch.left=C.touches[0].pageX,i.activeTouch.top=C.touches[0].pageY)}}),H(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),H(i.scroller,"touchend",function(C){var b=i.activeTouch;if(b&&!dr(i,C)&&b.left!=null&&!b.moved&&new Date-b.start<300){var N=r.coordsChar(i.activeTouch,"page"),A;!b.prev||g(b,b.prev)?A=new vt(N,N):!b.prev.prev||g(b,b.prev.prev)?A=r.findWordAt(N):A=new vt(ae(N.line,0),Ue(r.doc,ae(N.line+1,0))),r.setSelection(A.anchor,A.head),r.focus(),Qt(C)}c()}),H(i.scroller,"touchcancel",c),H(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zt(r,i.scroller.scrollTop),pl(r,i.scroller.scrollLeft,!0),Ee(r,"scroll",r))}),H(i.scroller,"mousewheel",function(C){return mm(r,C)}),H(i.scroller,"DOMMouseScroll",function(C){return mm(r,C)}),H(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(C){Xt(r,C)||to(C)},over:function(C){Xt(r,C)||(td(r,C),to(C))},start:function(C){return p0(r,C)},drop:Jt(r,Nm),leave:function(C){Xt(r,C)||rd(r)}};var S=i.input.getField();H(S,"keyup",function(C){return fd.call(r,C)}),H(S,"keydown",Jt(r,Am)),H(S,"keypress",Jt(r,Rm)),H(S,"focus",function(C){return ia(r,C)}),H(S,"blur",function(C){return fl(r,C)})}o($m,"registerEventHandlers");var Wu=[];Lt.defineInitHook=function(r){return Wu.push(r)};function Bu(r,i,u,a){var c=r.doc,m;u==null&&(u="add"),u=="smart"&&(c.mode.indent?m=us(r,i).state:u="prev");var g=r.options.tabSize,S=Ne(c,i),C=_t(S.text,null,g);S.stateAfter&&(S.stateAfter=null);var b=S.text.match(/^\s*/)[0],N;if(!a&&!/\S/.test(S.text))N=0,u="not";else if(u=="smart"&&(N=c.mode.indent(m,S.text.slice(b.length),S.text),N==Bt||N>150)){if(!a)return;u="prev"}u=="prev"?i>c.first?N=_t(Ne(c,i-1).text,null,g):N=0:u=="add"?N=C+r.options.indentUnit:u=="subtract"?N=C-r.options.indentUnit:typeof u=="number"&&(N=C+u),N=Math.max(0,N);var A="",$=0;if(r.options.indentWithTabs)for(var z=Math.floor(N/g);z;--z)$+=g,A+=" ";if($g,C=Zs(i),b=null;if(S&&a.ranges.length>1)if(bi&&bi.text.join(` +`)==i){if(a.ranges.length%bi.text.length==0){b=[];for(var N=0;N=0;$--){var z=a.ranges[$],ee=z.from(),oe=z.to();z.empty()&&(u&&u>0?ee=ae(ee.line,ee.ch-u):r.state.overwrite&&!S?oe=ae(oe.line,Math.min(Ne(m,oe.line).text.length,oe.ch+xe(C).length)):S&&bi&&bi.lineWise&&bi.text.join(` `)==C.join(` -`)&&(ee=oe=ae(ee.line,0)));var ce={from:ee,to:oe,text:E?E[j%E.length]:C,origin:c||(S?"paste":r.state.cutIncoming>g?"cut":"+input")};ha(r.doc,ce),lr(r,"inputRead",r,ce)}n&&!S&&Vm(r,n),Os(r),r.curOp.updateInput<2&&(r.curOp.updateInput=A),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}o(pc,"applyTextInput");function dd(r,n){var u=r.clipboardData&&r.clipboardData.getData("Text");if(u)return r.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&Qr(n,function(){return pc(n,u,0,null,"paste")}),!0}o(dd,"handlePaste");function Vm(r,n){if(!(!r.options.electricChars||!r.options.smartIndent))for(var u=r.doc.sel,a=u.ranges.length-1;a>=0;a--){var c=u.ranges[a];if(!(c.head.ch>100||a&&u.ranges[a-1].head.line==c.head.line)){var m=r.getModeAt(c.head),g=!1;if(m.electricChars){for(var S=0;S-1){g=zu(r,c.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(Ne(r.doc,c.head.line).text.slice(0,c.head.ch))&&(g=zu(r,c.head.line,"smart"));g&&lr(r,"electricInput",r,c.head.line)}}}o(Vm,"triggerElectric");function hd(r){for(var n=[],u=[],a=0;am&&(zu(this,S.head.line,a,!0),m=S.head.line,g==this.doc.sel.primIndex&&Os(this));else{var C=S.from(),E=S.to(),N=Math.max(m,C.line);m=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var A=N;A0&&Zp(this.doc,g,new vt(C,j[g].to()),$t)}}}),getTokenAt:function(a,c){return Xl(this,a,c)},getLineTokens:function(a,c){return Xl(this,ae(a),c,!0)},getTokenTypeAt:function(a){a=Ue(this.doc,a);var c=du(this,Ne(this.doc,a.line)),m=0,g=(c.length-1)/2,S=a.ch,C;if(S==0)C=c[2];else for(;;){var E=m+g>>1;if((E?c[E*2-1]:0)>=S)g=E;else if(c[E*2+1]C&&(a=C,g=!0),S=Ne(this.doc,a)}else S=a;return Bf(this,S,{top:0,left:0},c||"page",m||g).top+(g?this.doc.height-Wr(S):0)},defaultTextHeight:function(){return _s(this.display)},defaultCharWidth:function(){return oa(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,c,m,g,S){var C=this.display;a=zi(this,Ue(this.doc,a));var E=a.bottom,N=a.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),C.sizer.appendChild(c),g=="over")E=a.top;else if(g=="above"||g=="near"){var A=Math.max(C.wrapper.clientHeight,this.doc.height),j=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(g=="above"||a.bottom+c.offsetHeight>A)&&a.top>c.offsetHeight?E=a.top-c.offsetHeight:a.bottom+c.offsetHeight<=A&&(E=a.bottom),N+c.offsetWidth>j&&(N=j-c.offsetWidth)}c.style.top=E+"px",c.style.left=c.style.right="",S=="right"?(N=C.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(S=="left"?N=0:S=="middle"&&(N=(C.sizer.clientWidth-c.offsetWidth)/2),c.style.left=N+"px"),m&&Xy(this,{left:N,top:E,right:N+c.offsetWidth,bottom:E+c.offsetHeight})},triggerOnKeyDown:Zr(Dm),triggerOnKeyPress:Zr(Fm),triggerOnKeyUp:fd,triggerOnMouseDown:Zr(Hm),execCommand:function(a){if(Sl.hasOwnProperty(a))return Sl[a].call(null,this)},triggerElectric:Zr(function(a){Vm(this,a)}),findPosH:function(a,c,m,g){var S=1;c<0&&(S=-1,c=-c);for(var C=Ue(this.doc,a),E=0;E0&&N(m.charAt(g-1));)--g;for(;S.5||this.options.lineWrapping)&&Es(this),be(this,"refresh",this)}),swapDoc:Zr(function(a){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),ym(this,a),Cu(this),this.display.input.reset(),bu(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,lr(this,"swapDoc",this,c),c}),phrase:function(a){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,a)?c[a]:a},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ir(r),r.registerHelper=function(a,c,m){u.hasOwnProperty(a)||(u[a]=r[a]={_global:[]}),u[a][c]=m},r.registerGlobalHelper=function(a,c,m,g){r.registerHelper(a,c,g),u[a]._global.push({pred:m,val:g})}}o(Xo,"addEditorMethods");function $u(r,n,u,a,c){var m=n,g=u,S=Ne(r,n.line),C=c&&r.direction=="rtl"?-u:u;function E(){var Ce=n.line+C;return Ce=r.first+r.size?!1:(n=new ae(Ce,n.ch,n.sticky),S=Ne(r,Ce))}o(E,"findNextLine");function N(Ce){var ve;if(a=="codepoint"){var Te=S.text.charCodeAt(n.ch+(u>0?0:-1));if(isNaN(Te))ve=null;else{var Fe=u>0?Te>=55296&&Te<56320:Te>=56320&&Te<57343;ve=new ae(n.line,Math.max(0,Math.min(S.text.length,n.ch+u*(Fe?2:1))),-u)}}else c?ve=Am(r.cm,S,n,u):ve=sc(S,n,u);if(ve==null)if(!Ce&&E())n=Sa(c,r.cm,S,n.line,C);else return!1;else n=ve;return!0}if(o(N,"moveOnce"),a=="char"||a=="codepoint")N();else if(a=="column")N(!0);else if(a=="word"||a=="group")for(var A=null,j=a=="group",z=r.cm&&r.cm.getHelper(n,"wordChars"),ee=!0;!(u<0&&!N(!ee));ee=!1){var oe=S.text.charAt(n.ch)||` -`,ce=dr(oe,z)?"w":j&&oe==` -`?"n":!j||/\s/.test(oe)?null:"p";if(j&&!ee&&!ce&&(ce="s"),A&&A!=ce){u<0&&(u=1,N(),n.sticky="after");break}if(ce&&(A=ce),u>0&&!N(!ee))break}var me=Ur(r,n,m,g,!0);return ql(m,me)&&(me.hitSide=!0),me}o($u,"findPosH");function dc(r,n,u,a){var c=r.doc,m=n.left,g;if(a=="page"){var S=Math.min(r.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),C=Math.max(S-.5*_s(r.display),3);g=(u>0?n.bottom:n.top)+u*C}else a=="line"&&(g=u>0?n.bottom+3:n.top-3);for(var E;E=q(r,m,g),!!E.outside;){if(u<0?g<=0:g>=c.height){E.hitSide=!0;break}g+=u*5}return E}o(dc,"findPosV");var gt=o(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new St,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");gt.prototype.init=function(r){var n=this,u=this,a=u.cm,c=u.div=r.lineDiv;c.contentEditable=!0,Km(c,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(S){for(var C=S.target;C;C=C.parentNode){if(C==c)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}o(m,"belongsToInput"),H(c,"paste",function(S){!m(S)||Jt(a,S)||dd(S,a)||y<=11&&setTimeout(rr(a,function(){return n.updateFromDOM()}),20)}),H(c,"compositionstart",function(S){n.composing={data:S.data,done:!1}}),H(c,"compositionupdate",function(S){n.composing||(n.composing={data:S.data,done:!1})}),H(c,"compositionend",function(S){n.composing&&(S.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),H(c,"touchstart",function(){return u.forceCompositionEnd()}),H(c,"input",function(){n.composing||n.readFromDOMSoon()});function g(S){if(!(!m(S)||Jt(a,S))){if(a.somethingSelected())ki({lineWise:!1,text:a.getSelections()}),S.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=hd(a);ki({lineWise:!0,text:C.text}),S.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,$t),a.replaceSelection("",null,"cut")})}else return;if(S.clipboardData){S.clipboardData.clearData();var E=Ti.text.join(` -`);if(S.clipboardData.setData("Text",E),S.clipboardData.getData("Text")==E){S.preventDefault();return}}var N=Gm(),A=N.firstChild;a.display.lineSpace.insertBefore(N,a.display.lineSpace.firstChild),A.value=Ti.text.join(` -`);var j=Ke();ut(A),setTimeout(function(){a.display.lineSpace.removeChild(N),j.focus(),j==c&&u.showPrimarySelection()},50)}}o(g,"onCopyCut"),H(c,"copy",g),H(c,"cut",g)},gt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var r=Eu(this.cm,!1);return r.focus=Ke()==this.div,r},gt.prototype.showSelection=function(r,n){!r||!this.cm.display.view.length||((r.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(r))},gt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},gt.prototype.showPrimarySelection=function(){var r=this.getSelection(),n=this.cm,u=n.doc.sel.primary(),a=u.from(),c=u.to();if(n.display.viewTo==n.display.viewFrom||a.line>=n.display.viewTo||c.line=n.display.viewFrom&&ju(n,a)||{node:S[0].measure.map[2],offset:0},E=c.liner.firstLine()&&(a=ae(a.line-1,Ne(r.doc,a.line-1).length)),c.ch==Ne(r.doc,c.line).text.length&&c.linen.viewTo-1)return!1;var m,g,S;a.line==n.viewFrom||(m=co(r,a.line))==0?(g=dt(n.view[0].line),S=n.view[0].node):(g=dt(n.view[m].line),S=n.view[m-1].node.nextSibling);var C=co(r,c.line),E,N;if(C==n.view.length-1?(E=n.viewTo-1,N=n.lineDiv.lastChild):(E=dt(n.view[C+1].line)-1,N=n.view[C+1].node.previousSibling),!S)return!1;for(var A=r.doc.splitLines(hc(r,S,N,g,E)),j=wi(r.doc,ae(g,0),ae(E,Ne(r.doc,E).text.length));A.length>1&&j.length>1;)if(xe(A)==xe(j))A.pop(),j.pop(),E--;else if(A[0]==j[0])A.shift(),j.shift(),g++;else break;for(var z=0,ee=0,oe=A[0],ce=j[0],me=Math.min(oe.length,ce.length);za.ch&&Ce.charCodeAt(Ce.length-ee-1)==ve.charCodeAt(ve.length-ee-1);)z--,ee++;A[A.length-1]=Ce.slice(0,Ce.length-ee).replace(/^\u200b+/,""),A[0]=A[0].slice(z).replace(/\u200b+$/,"");var Fe=ae(g,z),De=ae(E,j.length?xe(j).length-ee:0);if(A.length>1||A[0]||ze(Fe,De))return ga(r.doc,A,Fe,De,"+input"),!0},gt.prototype.ensurePolled=function(){this.forceCompositionEnd()},gt.prototype.reset=function(){this.forceCompositionEnd()},gt.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},gt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},gt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&Qr(this.cm,function(){return Ze(r.cm)})},gt.prototype.setUneditable=function(r){r.contentEditable="false"},gt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||rr(this.cm,pc)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},gt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},gt.prototype.onContextMenu=function(){},gt.prototype.resetPosition=function(){},gt.prototype.needsContentAttribute=!0;function ju(r,n){var u=Wp(r,n.line);if(!u||u.hidden)return null;var a=Ne(r.doc,n.line),c=ul(u,a,n.line),m=kn(a,r.doc.direction),g="left";if(m){var S=gi(m,n.ch);g=S%2?"right":"left"}var C=If(c.map,n.ch,g);return C.offset=C.collapse=="right"?C.end:C.start,C}o(ju,"posToDOM");function ka(r){for(var n=r;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}o(ka,"isInGutter");function He(r,n){return n&&(r.bad=!0),r}o(He,"badPos");function hc(r,n,u,a,c){var m="",g=!1,S=r.doc.lineSeparator(),C=!1;function E(z){return function(ee){return ee.id==z}}o(E,"recognizeMarker");function N(){g&&(m+=S,C&&(m+=S),g=C=!1)}o(N,"close");function A(z){z&&(N(),m+=z)}o(A,"addText");function j(z){if(z.nodeType==1){var ee=z.getAttribute("cm-text");if(ee){A(ee);return}var oe=z.getAttribute("cm-marker"),ce;if(oe){var me=r.findMarks(ae(a,0),ae(c+1,0),E(+oe));me.length&&(ce=me[0].find(0))&&A(wi(r.doc,ce.from,ce.to).join(S));return}if(z.getAttribute("contenteditable")=="false")return;var Ce=/^(pre|div|p|li|table|br)$/i.test(z.nodeName);if(!/^br$/i.test(z.nodeName)&&z.textContent.length==0)return;Ce&&N();for(var ve=0;ve=9&&n.hasSelection&&(n.hasSelection=null),u.poll()}),H(c,"paste",function(g){Jt(a,g)||dd(g,a)||(a.state.pasteIncoming=+new Date,u.fastPoll())});function m(g){if(!Jt(a,g)){if(a.somethingSelected())ki({lineWise:!1,text:a.getSelections()});else if(a.options.lineWiseCopyCut){var S=hd(a);ki({lineWise:!0,text:S.text}),g.type=="cut"?a.setSelections(S.ranges,null,$t):(u.prevInput="",c.value=S.text.join(` -`),ut(c))}else return;g.type=="cut"&&(a.state.cutIncoming=+new Date)}}o(m,"prepareCopyCut"),H(c,"cut",m),H(c,"copy",m),H(r.scroller,"paste",function(g){if(!(mr(r,g)||Jt(a,g))){if(!c.dispatchEvent){a.state.pasteIncoming=+new Date,u.focus();return}var S=new Event("paste");S.clipboardData=g.clipboardData,c.dispatchEvent(S)}}),H(r.lineSpace,"selectstart",function(g){mr(r,g)||er(g)}),H(c,"compositionstart",function(){var g=a.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:g,range:a.markText(g,a.getCursor("to"),{className:"CodeMirror-composing"})}}),H(c,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},ar.prototype.createField=function(r){this.wrapper=Gm(),this.textarea=this.wrapper.firstChild},ar.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},ar.prototype.prepareSelection=function(){var r=this.cm,n=r.display,u=r.doc,a=Eu(r);if(r.options.moveInputWithCursor){var c=zi(r,u.sel.primary().head,"div"),m=n.wrapper.getBoundingClientRect(),g=n.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,c.top+g.top-m.top)),a.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,c.left+g.left-m.left))}return a},ar.prototype.showSelection=function(r){var n=this.cm,u=n.display;Je(u.cursorDiv,r.cursors),Je(u.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},ar.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing)){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var u=n.getSelection();this.textarea.value=u,n.state.focused&&ut(this.textarea),p&&y>=9&&(this.hasSelection=u)}else r||(this.prevInput=this.textarea.value="",p&&y>=9&&(this.hasSelection=null))}},ar.prototype.getField=function(){return this.textarea},ar.prototype.supportsTouch=function(){return!1},ar.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!P||Ke()!=this.textarea))try{this.textarea.focus()}catch(r){}},ar.prototype.blur=function(){this.textarea.blur()},ar.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ar.prototype.receivedFocus=function(){this.slowPoll()},ar.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},ar.prototype.fastPoll=function(){var r=!1,n=this;n.pollingFast=!0;function u(){var a=n.poll();!a&&!r?(r=!0,n.polling.set(60,u)):(n.pollingFast=!1,n.slowPoll())}o(u,"p"),n.polling.set(20,u)},ar.prototype.poll=function(){var r=this,n=this.cm,u=this.textarea,a=this.prevInput;if(this.contextMenuPending||!n.state.focused||bp(u)&&!a&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var c=u.value;if(c==a&&!n.somethingSelected())return!1;if(p&&y>=9&&this.hasSelection===c||F&&/[\uf700-\uf7ff]/.test(c))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var m=c.charCodeAt(0);if(m==8203&&!a&&(a="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var g=0,S=Math.min(a.length,c.length);g1e3||c.indexOf(` -`)>-1?u.value=r.prevInput="":r.prevInput=c,r.composing&&(r.composing.range.clear(),r.composing.range=n.markText(r.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ar.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ar.prototype.onKeyPress=function(){p&&y>=9&&(this.hasSelection=null),this.fastPoll()},ar.prototype.onContextMenu=function(r){var n=this,u=n.cm,a=u.display,c=n.textarea;n.contextMenuPending&&n.contextMenuPending();var m=fo(u,r),g=a.scroller.scrollTop;if(!m||Y)return;var S=u.options.resetSelectionOnContextMenu;S&&u.doc.sel.contains(m)==-1&&rr(u,Br)(u.doc,Ms(m),$t);var C=c.style.cssText,E=n.wrapper.style.cssText,N=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px; +`)&&(ee=oe=ae(ee.line,0)));var ce={from:ee,to:oe,text:b?b[$%b.length]:C,origin:c||(S?"paste":r.state.cutIncoming>g?"cut":"+input")};fa(r.doc,ce),ir(r,"inputRead",r,ce)}i&&!S&&qm(r,i),_s(r),r.curOp.updateInput<2&&(r.curOp.updateInput=A),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}o(uc,"applyTextInput");function dd(r,i){var u=r.clipboardData&&r.clipboardData.getData("Text");if(u)return r.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&Gr(i,function(){return uc(i,u,0,null,"paste")}),!0}o(dd,"handlePaste");function qm(r,i){if(!(!r.options.electricChars||!r.options.smartIndent))for(var u=r.doc.sel,a=u.ranges.length-1;a>=0;a--){var c=u.ranges[a];if(!(c.head.ch>100||a&&u.ranges[a-1].head.line==c.head.line)){var m=r.getModeAt(c.head),g=!1;if(m.electricChars){for(var S=0;S-1){g=Bu(r,c.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(Ne(r.doc,c.head.line).text.slice(0,c.head.ch))&&(g=Bu(r,c.head.line,"smart"));g&&ir(r,"electricInput",r,c.head.line)}}}o(qm,"triggerElectric");function hd(r){for(var i=[],u=[],a=0;am&&(Bu(this,S.head.line,a,!0),m=S.head.line,g==this.doc.sel.primIndex&&_s(this));else{var C=S.from(),b=S.to(),N=Math.max(m,C.line);m=Math.min(this.lastLine(),b.line-(b.ch?0:1))+1;for(var A=N;A0&&Zp(this.doc,g,new vt(C,$[g].to()),Ut)}}}),getTokenAt:function(a,c){return Vl(this,a,c)},getLineTokens:function(a,c){return Vl(this,ae(a),c,!0)},getTokenTypeAt:function(a){a=Ue(this.doc,a);var c=cu(this,Ne(this.doc,a.line)),m=0,g=(c.length-1)/2,S=a.ch,C;if(S==0)C=c[2];else for(;;){var b=m+g>>1;if((b?c[b*2-1]:0)>=S)g=b;else if(c[b*2+1]C&&(a=C,g=!0),S=Ne(this.doc,a)}else S=a;return If(this,S,{top:0,left:0},c||"page",m||g).top+(g?this.doc.height-Ir(S):0)},defaultTextHeight:function(){return ys(this.display)},defaultCharWidth:function(){return ta(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,c,m,g,S){var C=this.display;a=Bi(this,Ue(this.doc,a));var b=a.bottom,N=a.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),C.sizer.appendChild(c),g=="over")b=a.top;else if(g=="above"||g=="near"){var A=Math.max(C.wrapper.clientHeight,this.doc.height),$=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(g=="above"||a.bottom+c.offsetHeight>A)&&a.top>c.offsetHeight?b=a.top-c.offsetHeight:a.bottom+c.offsetHeight<=A&&(b=a.bottom),N+c.offsetWidth>$&&(N=$-c.offsetWidth)}c.style.top=b+"px",c.style.left=c.style.right="",S=="right"?(N=C.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(S=="left"?N=0:S=="middle"&&(N=(C.sizer.clientWidth-c.offsetWidth)/2),c.style.left=N+"px"),m&&Qy(this,{left:N,top:b,right:N+c.offsetWidth,bottom:b+c.offsetHeight})},triggerOnKeyDown:Yr(Am),triggerOnKeyPress:Yr(Rm),triggerOnKeyUp:fd,triggerOnMouseDown:Yr(Im),execCommand:function(a){if(yl.hasOwnProperty(a))return yl[a].call(null,this)},triggerElectric:Yr(function(a){qm(this,a)}),findPosH:function(a,c,m,g){var S=1;c<0&&(S=-1,c=-c);for(var C=Ue(this.doc,a),b=0;b0&&N(m.charAt(g-1));)--g;for(;S.5||this.options.lineWrapping)&&ws(this),Ee(this,"refresh",this)}),swapDoc:Yr(function(a){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),gm(this,a),xu(this),this.display.input.reset(),_u(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,ir(this,"swapDoc",this,c),c}),phrase:function(a){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,a)?c[a]:a},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Rr(r),r.registerHelper=function(a,c,m){u.hasOwnProperty(a)||(u[a]=r[a]={_global:[]}),u[a][c]=m},r.registerGlobalHelper=function(a,c,m,g){r.registerHelper(a,c,g),u[a]._global.push({pred:m,val:g})}}o(Ko,"addEditorMethods");function Uu(r,i,u,a,c){var m=i,g=u,S=Ne(r,i.line),C=c&&r.direction=="rtl"?-u:u;function b(){var Ce=i.line+C;return Ce=r.first+r.size?!1:(i=new ae(Ce,i.ch,i.sticky),S=Ne(r,Ce))}o(b,"findNextLine");function N(Ce){var ve;if(a=="codepoint"){var Te=S.text.charCodeAt(i.ch+(u>0?0:-1));if(isNaN(Te))ve=null;else{var Fe=u>0?Te>=55296&&Te<56320:Te>=56320&&Te<57343;ve=new ae(i.line,Math.max(0,Math.min(S.text.length,i.ch+u*(Fe?2:1))),-u)}}else c?ve=Mm(r.cm,S,i,u):ve=nc(S,i,u);if(ve==null)if(!Ce&&b())i=ga(c,r.cm,S,i.line,C);else return!1;else i=ve;return!0}if(o(N,"moveOnce"),a=="char"||a=="codepoint")N();else if(a=="column")N(!0);else if(a=="word"||a=="group")for(var A=null,$=a=="group",z=r.cm&&r.cm.getHelper(i,"wordChars"),ee=!0;!(u<0&&!N(!ee));ee=!1){var oe=S.text.charAt(i.ch)||` +`,ce=cr(oe,z)?"w":$&&oe==` +`?"n":!$||/\s/.test(oe)?null:"p";if($&&!ee&&!ce&&(ce="s"),A&&A!=ce){u<0&&(u=1,N(),i.sticky="after");break}if(ce&&(A=ce),u>0&&!N(!ee))break}var me=Wr(r,i,m,g,!0);return Ul(m,me)&&(me.hitSide=!0),me}o(Uu,"findPosH");function fc(r,i,u,a){var c=r.doc,m=i.left,g;if(a=="page"){var S=Math.min(r.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),C=Math.max(S-.5*ys(r.display),3);g=(u>0?i.bottom:i.top)+u*C}else a=="line"&&(g=u>0?i.bottom+3:i.top-3);for(var b;b=q(r,m,g),!!b.outside;){if(u<0?g<=0:g>=c.height){b.hitSide=!0;break}g+=u*5}return b}o(fc,"findPosV");var gt=o(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new wt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");gt.prototype.init=function(r){var i=this,u=this,a=u.cm,c=u.div=r.lineDiv;c.contentEditable=!0,Vm(c,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(S){for(var C=S.target;C;C=C.parentNode){if(C==c)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}o(m,"belongsToInput"),H(c,"paste",function(S){!m(S)||Xt(a,S)||dd(S,a)||w<=11&&setTimeout(Jt(a,function(){return i.updateFromDOM()}),20)}),H(c,"compositionstart",function(S){i.composing={data:S.data,done:!1}}),H(c,"compositionupdate",function(S){i.composing||(i.composing={data:S.data,done:!1})}),H(c,"compositionend",function(S){i.composing&&(S.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),H(c,"touchstart",function(){return u.forceCompositionEnd()}),H(c,"input",function(){i.composing||i.readFromDOMSoon()});function g(S){if(!(!m(S)||Xt(a,S))){if(a.somethingSelected())Ei({lineWise:!1,text:a.getSelections()}),S.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=hd(a);Ei({lineWise:!0,text:C.text}),S.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,Ut),a.replaceSelection("",null,"cut")})}else return;if(S.clipboardData){S.clipboardData.clearData();var b=bi.text.join(` +`);if(S.clipboardData.setData("Text",b),S.clipboardData.getData("Text")==b){S.preventDefault();return}}var N=Km(),A=N.firstChild;a.display.lineSpace.insertBefore(N,a.display.lineSpace.firstChild),A.value=bi.text.join(` +`);var $=Ke();ut(A),setTimeout(function(){a.display.lineSpace.removeChild(N),$.focus(),$==c&&u.showPrimarySelection()},50)}}o(g,"onCopyCut"),H(c,"copy",g),H(c,"cut",g)},gt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var r=Cu(this.cm,!1);return r.focus=Ke()==this.div,r},gt.prototype.showSelection=function(r,i){!r||!this.cm.display.view.length||((r.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(r))},gt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},gt.prototype.showPrimarySelection=function(){var r=this.getSelection(),i=this.cm,u=i.doc.sel.primary(),a=u.from(),c=u.to();if(i.display.viewTo==i.display.viewFrom||a.line>=i.display.viewTo||c.line=i.display.viewFrom&&zu(i,a)||{node:S[0].measure.map[2],offset:0},b=c.liner.firstLine()&&(a=ae(a.line-1,Ne(r.doc,a.line-1).length)),c.ch==Ne(r.doc,c.line).text.length&&c.linei.viewTo-1)return!1;var m,g,S;a.line==i.viewFrom||(m=uo(r,a.line))==0?(g=dt(i.view[0].line),S=i.view[0].node):(g=dt(i.view[m].line),S=i.view[m-1].node.nextSibling);var C=uo(r,c.line),b,N;if(C==i.view.length-1?(b=i.viewTo-1,N=i.lineDiv.lastChild):(b=dt(i.view[C+1].line)-1,N=i.view[C+1].node.previousSibling),!S)return!1;for(var A=r.doc.splitLines(cc(r,S,N,g,b)),$=gi(r.doc,ae(g,0),ae(b,Ne(r.doc,b).text.length));A.length>1&&$.length>1;)if(xe(A)==xe($))A.pop(),$.pop(),b--;else if(A[0]==$[0])A.shift(),$.shift(),g++;else break;for(var z=0,ee=0,oe=A[0],ce=$[0],me=Math.min(oe.length,ce.length);za.ch&&Ce.charCodeAt(Ce.length-ee-1)==ve.charCodeAt(ve.length-ee-1);)z--,ee++;A[A.length-1]=Ce.slice(0,Ce.length-ee).replace(/^\u200b+/,""),A[0]=A[0].slice(z).replace(/\u200b+$/,"");var Fe=ae(g,z),De=ae(b,$.length?xe($).length-ee:0);if(A.length>1||A[0]||ze(Fe,De))return da(r.doc,A,Fe,De,"+input"),!0},gt.prototype.ensurePolled=function(){this.forceCompositionEnd()},gt.prototype.reset=function(){this.forceCompositionEnd()},gt.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},gt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},gt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&Gr(this.cm,function(){return Ze(r.cm)})},gt.prototype.setUneditable=function(r){r.contentEditable="false"},gt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||Jt(this.cm,uc)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},gt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},gt.prototype.onContextMenu=function(){},gt.prototype.resetPosition=function(){},gt.prototype.needsContentAttribute=!0;function zu(r,i){var u=Wp(r,i.line);if(!u||u.hidden)return null;var a=Ne(r.doc,i.line),c=sl(u,a,i.line),m=bn(a,r.doc.direction),g="left";if(m){var S=mi(m,i.ch);g=S%2?"right":"left"}var C=Df(c.map,i.ch,g);return C.offset=C.collapse=="right"?C.end:C.start,C}o(zu,"posToDOM");function _a(r){for(var i=r;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}o(_a,"isInGutter");function He(r,i){return i&&(r.bad=!0),r}o(He,"badPos");function cc(r,i,u,a,c){var m="",g=!1,S=r.doc.lineSeparator(),C=!1;function b(z){return function(ee){return ee.id==z}}o(b,"recognizeMarker");function N(){g&&(m+=S,C&&(m+=S),g=C=!1)}o(N,"close");function A(z){z&&(N(),m+=z)}o(A,"addText");function $(z){if(z.nodeType==1){var ee=z.getAttribute("cm-text");if(ee){A(ee);return}var oe=z.getAttribute("cm-marker"),ce;if(oe){var me=r.findMarks(ae(a,0),ae(c+1,0),b(+oe));me.length&&(ce=me[0].find(0))&&A(gi(r.doc,ce.from,ce.to).join(S));return}if(z.getAttribute("contenteditable")=="false")return;var Ce=/^(pre|div|p|li|table|br)$/i.test(z.nodeName);if(!/^br$/i.test(z.nodeName)&&z.textContent.length==0)return;Ce&&N();for(var ve=0;ve=9&&i.hasSelection&&(i.hasSelection=null),u.poll()}),H(c,"paste",function(g){Xt(a,g)||dd(g,a)||(a.state.pasteIncoming=+new Date,u.fastPoll())});function m(g){if(!Xt(a,g)){if(a.somethingSelected())Ei({lineWise:!1,text:a.getSelections()});else if(a.options.lineWiseCopyCut){var S=hd(a);Ei({lineWise:!0,text:S.text}),g.type=="cut"?a.setSelections(S.ranges,null,Ut):(u.prevInput="",c.value=S.text.join(` +`),ut(c))}else return;g.type=="cut"&&(a.state.cutIncoming=+new Date)}}o(m,"prepareCopyCut"),H(c,"cut",m),H(c,"copy",m),H(r.scroller,"paste",function(g){if(!(dr(r,g)||Xt(a,g))){if(!c.dispatchEvent){a.state.pasteIncoming=+new Date,u.focus();return}var S=new Event("paste");S.clipboardData=g.clipboardData,c.dispatchEvent(S)}}),H(r.lineSpace,"selectstart",function(g){dr(r,g)||Qt(g)}),H(c,"compositionstart",function(){var g=a.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:g,range:a.markText(g,a.getCursor("to"),{className:"CodeMirror-composing"})}}),H(c,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},or.prototype.createField=function(r){this.wrapper=Km(),this.textarea=this.wrapper.firstChild},or.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},or.prototype.prepareSelection=function(){var r=this.cm,i=r.display,u=r.doc,a=Cu(r);if(r.options.moveInputWithCursor){var c=Bi(r,u.sel.primary().head,"div"),m=i.wrapper.getBoundingClientRect(),g=i.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,c.top+g.top-m.top)),a.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,c.left+g.left-m.left))}return a},or.prototype.showSelection=function(r){var i=this.cm,u=i.display;Je(u.cursorDiv,r.cursors),Je(u.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},or.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing)){var i=this.cm;if(i.somethingSelected()){this.prevInput="";var u=i.getSelection();this.textarea.value=u,i.state.focused&&ut(this.textarea),p&&w>=9&&(this.hasSelection=u)}else r||(this.prevInput=this.textarea.value="",p&&w>=9&&(this.hasSelection=null))}},or.prototype.getField=function(){return this.textarea},or.prototype.supportsTouch=function(){return!1},or.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!P||Ke()!=this.textarea))try{this.textarea.focus()}catch(r){}},or.prototype.blur=function(){this.textarea.blur()},or.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},or.prototype.receivedFocus=function(){this.slowPoll()},or.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},or.prototype.fastPoll=function(){var r=!1,i=this;i.pollingFast=!0;function u(){var a=i.poll();!a&&!r?(r=!0,i.polling.set(60,u)):(i.pollingFast=!1,i.slowPoll())}o(u,"p"),i.polling.set(20,u)},or.prototype.poll=function(){var r=this,i=this.cm,u=this.textarea,a=this.prevInput;if(this.contextMenuPending||!i.state.focused||Ep(u)&&!a&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var c=u.value;if(c==a&&!i.somethingSelected())return!1;if(p&&w>=9&&this.hasSelection===c||F&&/[\uf700-\uf7ff]/.test(c))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var m=c.charCodeAt(0);if(m==8203&&!a&&(a="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var g=0,S=Math.min(a.length,c.length);g1e3||c.indexOf(` +`)>-1?u.value=r.prevInput="":r.prevInput=c,r.composing&&(r.composing.range.clear(),r.composing.range=i.markText(r.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},or.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},or.prototype.onKeyPress=function(){p&&w>=9&&(this.hasSelection=null),this.fastPoll()},or.prototype.onContextMenu=function(r){var i=this,u=i.cm,a=u.display,c=i.textarea;i.contextMenuPending&&i.contextMenuPending();var m=ao(u,r),g=a.scroller.scrollTop;if(!m||Y)return;var S=u.options.resetSelectionOnContextMenu;S&&u.doc.sel.contains(m)==-1&&Jt(u,Hr)(u.doc,ks(m),Ut);var C=c.style.cssText,b=i.wrapper.style.cssText,N=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(r.clientY-N.top-5)+"px; left: "+(r.clientX-N.left-5)+`px; z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var A;_&&(A=window.scrollY),a.input.focus(),_&&window.scrollTo(null,A),a.input.reset(),u.somethingSelected()||(c.value=n.prevInput=" "),n.contextMenuPending=z,a.selForContextMenu=u.doc.sel,clearTimeout(a.detectingSelectAll);function j(){if(c.selectionStart!=null){var oe=u.somethingSelected(),ce="\u200B"+(oe?c.value:"");c.value="\u21DA",c.value=ce,n.prevInput=oe?"":"\u200B",c.selectionStart=1,c.selectionEnd=ce.length,a.selForContextMenu=u.doc.sel}}o(j,"prepareSelectAllHack");function z(){if(n.contextMenuPending==z&&(n.contextMenuPending=!1,n.wrapper.style.cssText=E,c.style.cssText=C,p&&y<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=g),c.selectionStart!=null)){(!p||p&&y<9)&&j();var oe=0,ce=o(function(){a.selForContextMenu==u.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&n.prevInput=="\u200B"?rr(u,Cm)(u):oe++<10?a.detectingSelectAll=setTimeout(ce,500):(a.selForContextMenu=null,a.input.reset())},"poll");a.detectingSelectAll=setTimeout(ce,200)}}if(o(z,"rehide"),p&&y>=9&&j(),de){no(r);var ee=o(function(){he(window,"mouseup",ee),setTimeout(z,20)},"mouseup");H(window,"mouseup",ee)}else setTimeout(z,50)},ar.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},ar.prototype.setUneditable=function(){},ar.prototype.needsContentAttribute=!1;function md(r,n){if(n=n?Kt(n):{},n.value=r.value,!n.tabindex&&r.tabIndex&&(n.tabindex=r.tabIndex),!n.placeholder&&r.placeholder&&(n.placeholder=r.placeholder),n.autofocus==null){var u=Ke();n.autofocus=u==r||r.getAttribute("autofocus")!=null&&u==document.body}function a(){r.value=S.getValue()}o(a,"save");var c;if(r.form&&(H(r.form,"submit",a),!n.leaveSubmitMethodAlone)){var m=r.form;c=m.submit;try{var g=m.submit=function(){a(),m.submit=c,m.submit(),m.submit=g}}catch(C){}}n.finishInit=function(C){C.save=a,C.getTextArea=function(){return r},C.toTextArea=function(){C.toTextArea=isNaN,a(),r.parentNode.removeChild(C.getWrapperElement()),r.style.display="",r.form&&(he(r.form,"submit",a),!n.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=c))}},r.style.display="none";var S=Pt(function(C){return r.parentNode.insertBefore(C,r.nextSibling)},n);return S}o(md,"fromTextArea");function Ym(r){r.off=he,r.on=H,r.wheelEventPixels=s0,r.Doc=dn,r.splitLines=tl,r.countColumn=bt,r.findColumn=Tr,r.isWordChar=Gt,r.Pass=zt,r.signal=be,r.Line=Or,r.changeEnd=As,r.scrollbarModel=jf,r.Pos=ae,r.cmpPos=ze,r.modes=$l,r.mimeModes=ps,r.resolveMode=rl,r.getMode=fu,r.modeExtensions=Ho,r.extendMode=Op,r.copyState=Wo,r.startState=Of,r.innerMode=jl,r.commands=Sl,r.keyMap=Go,r.keyName=od,r.isModifierKey=oc,r.lookupKey=Yo,r.normalizeKeyMap=d0,r.StringStream=Ft,r.SharedTextMarker=xa,r.TextMarker=Fs,r.LineWidget=Ru,r.e_preventDefault=er,r.e_stopPropagation=oi,r.e_stop=no,r.addClass=Ge,r.contains=Ve,r.rmClass=we,r.keyNames=Hs}o(Ym,"addLegacyProps"),cc(Pt),Xo(Pt);var mn="iter insert remove copy getEditor constructor".split(" ");for(var mc in dn.prototype)dn.prototype.hasOwnProperty(mc)&&st(mn,mc)<0&&(Pt.prototype[mc]=function(r){return function(){return r.apply(this.doc,arguments)}}(dn.prototype[mc]));return Ir(dn),Pt.inputStyles={textarea:ar,contenteditable:gt},Pt.defineMode=function(r){!Pt.defaults.mode&&r!="null"&&(Pt.defaults.mode=r),kp.apply(this,arguments)},Pt.defineMIME=kf,Pt.defineMode("null",function(){return{token:function(r){return r.skipToEnd()}}}),Pt.defineMIME("text/plain","null"),Pt.defineExtension=function(r,n){Pt.prototype[r]=n},Pt.defineDocExtension=function(r,n){dn.prototype[r]=n},Pt.fromTextArea=md,Ym(Pt),Pt.version="5.62.3",Pt})});var iO=fr((rz,nO)=>{"use strict";var SI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";nO.exports=SI});var aO=fr((nz,lO)=>{"use strict";var CI=iO();function oO(){}o(oO,"emptyFunction");function sO(){}o(sO,"emptyFunctionWithReset");sO.resetWarningCache=oO;lO.exports=function(){function e(l,d,v,p,y,_){if(_!==CI){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var i={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:sO,resetWarningCache:oO};return i.PropTypes=i,i}});var qh=fr((sz,uO)=>{uO.exports=aO()();var iz,oz});var pS=fr((lz,fO)=>{fO.exports=o(function(t,i,l,d){var v=l?l.call(d,t,i):void 0;if(v!==void 0)return!!v;if(t===i)return!0;if(typeof t!="object"||!t||typeof i!="object"||!i)return!1;var p=Object.keys(t),y=Object.keys(i);if(p.length!==y.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(i),O=0;O=0)&&(i[d]=e[d]);return i}o(tu,"_objectWithoutPropertiesLoose");var lx=pe(tT()),sr=pe(Re()),sT=pe(oT());var xR=[],SR=[null,null];function CR(e,t){var i=e[1];return[t.payload,i+1]}o(CR,"storeStateUpdatesReducer");function lT(e,t,i){af(function(){return e.apply(void 0,t)},i)}o(lT,"useIsomorphicLayoutEffectWithArgs");function _R(e,t,i,l,d,v,p){e.current=l,t.current=d,i.current=!1,v.current&&(v.current=null,p())}o(_R,"captureWrapperProps");function ER(e,t,i,l,d,v,p,y,_,O){if(!!e){var D=!1,Y=null,B=o(function(){if(!D){var Q=t.getState(),R,P;try{R=l(Q,d.current)}catch(F){P=F,Y=F}P||(Y=null),R===v.current?p.current||_():(v.current=R,y.current=R,p.current=!0,O({type:"STORE_UPDATED",payload:{error:P}}))}},"checkForUpdates");i.onStateChange=B,i.trySubscribe(),B();var X=o(function(){if(D=!0,i.tryUnsubscribe(),i.onStateChange=null,Y)throw Y},"unsubscribeWrapper");return X}}o(ER,"subscribeUpdates");var bR=o(function(){return[null,0]},"initStateUpdates");function Bg(e,t){t===void 0&&(t={});var i=t,l=i.getDisplayName,d=l===void 0?function(ie){return"ConnectAdvanced("+ie+")"}:l,v=i.methodName,p=v===void 0?"connectAdvanced":v,y=i.renderCountProp,_=y===void 0?void 0:y,O=i.shouldHandleStateChanges,D=O===void 0?!0:O,Y=i.storeKey,B=Y===void 0?"store":Y,X=i.withRef,te=X===void 0?!1:X,Q=i.forwardRef,R=Q===void 0?!1:Q,P=i.context,F=P===void 0?Zn:P,K=tu(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);if(!1)var V;var ue=F;return o(function(de){var ge=de.displayName||de.name||"Component",we=d(ge),qe=Oo({},K,{getDisplayName:d,methodName:p,renderCountProp:_,shouldHandleStateChanges:D,storeKey:B,displayName:we,wrappedComponentName:ge,WrappedComponent:de}),Je=K.pure;function Ee(Ge){return e(Ge.dispatch,qe)}o(Ee,"createChildSelector");var xt=Je?sr.useMemo:function(Ge){return Ge()};function Be(Ge){var Zt=(0,sr.useMemo)(function(){var yr=Ge.reactReduxForwardedRef,Ii=tu(Ge,["reactReduxForwardedRef"]);return[Ge.context,yr,Ii]},[Ge]),ut=Zt[0],Fr=Zt[1],Kt=Zt[2],bt=(0,sr.useMemo)(function(){return ut&&ut.Consumer&&(0,sT.isContextConsumer)(sr.default.createElement(ut.Consumer,null))?ut:ue},[ut,ue]),St=(0,sr.useContext)(bt),st=Boolean(Ge.store)&&Boolean(Ge.store.getState)&&Boolean(Ge.store.dispatch),br=Boolean(St)&&Boolean(St.store),zt=st?Ge.store:St.store,$t=(0,sr.useMemo)(function(){return Ee(zt)},[zt]),ne=(0,sr.useMemo)(function(){if(!D)return SR;var yr=new Jc(zt,st?null:St.subscription),Ii=yr.notifyNestedSubs.bind(yr);return[yr,Ii]},[zt,st,St]),et=ne[0],Tr=ne[1],jt=(0,sr.useMemo)(function(){return st?St:Oo({},St,{subscription:et})},[st,St,et]),qt=(0,sr.useReducer)(CR,xR,bR),xe=qt[0],kr=xe[0],an=qt[1];if(kr&&kr.error)throw kr.error;var In=(0,sr.useRef)(),ii=(0,sr.useRef)(Kt),un=(0,sr.useRef)(),Gt=(0,sr.useRef)(!1),dr=xt(function(){return un.current&&Kt===ii.current?un.current:$t(zt.getState(),Kt)},[zt,kr,Kt]);lT(_R,[ii,In,Gt,Kt,dr,un,Tr]),lT(ER,[D,zt,et,$t,ii,In,Gt,un,Tr,an],[zt,et,$t]);var ft=(0,sr.useMemo)(function(){return sr.default.createElement(de,Oo({},dr,{ref:Fr}))},[Fr,de,dr]),Io=(0,sr.useMemo)(function(){return D?sr.default.createElement(bt.Provider,{value:jt},ft):ft},[bt,ft,jt]);return Io}o(Be,"ConnectFunction");var Ve=Je?sr.default.memo(Be):Be;if(Ve.WrappedComponent=de,Ve.displayName=Be.displayName=we,R){var Ke=sr.default.forwardRef(o(function(Zt,ut){return sr.default.createElement(Ve,Oo({},Zt,{reactReduxForwardedRef:ut}))},"forwardConnectRef"));return Ke.displayName=we,Ke.WrappedComponent=de,(0,lx.default)(Ke,de)}return(0,lx.default)(Ve,de)},"wrapWithConnect")}o(Bg,"connectAdvanced");function aT(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}o(aT,"is");function ep(e,t){if(aT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(var d=0;d=0;l--){var d=t[l](e);if(d)return d}return function(v,p){throw new Error("Invalid value of type "+typeof e+" for "+i+" argument when connecting component "+p.wrappedComponentName+".")}}o(fx,"match");function HR(e,t){return e===t}o(HR,"strictEqual");function WR(e){var t=e===void 0?{}:e,i=t.connectHOC,l=i===void 0?Bg:i,d=t.mapStateToPropsFactories,v=d===void 0?cT:d,p=t.mapDispatchToPropsFactories,y=p===void 0?fT:p,_=t.mergePropsFactories,O=_===void 0?pT:_,D=t.selectorFactory,Y=D===void 0?ux:D;return o(function(X,te,Q,R){R===void 0&&(R={});var P=R,F=P.pure,K=F===void 0?!0:F,V=P.areStatesEqual,ue=V===void 0?HR:V,ie=P.areOwnPropsEqual,de=ie===void 0?ep:ie,ge=P.areStatePropsEqual,we=ge===void 0?ep:ge,qe=P.areMergedPropsEqual,Je=qe===void 0?ep:qe,Ee=tu(P,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),xt=fx(X,v,"mapStateToProps"),Be=fx(te,y,"mapDispatchToProps"),Ve=fx(Q,O,"mergeProps");return l(Y,Oo({methodName:"connect",getDisplayName:o(function(Ge){return"Connect("+Ge+")"},"getDisplayName"),shouldHandleStateChanges:Boolean(X),initMapStateToProps:xt,initMapDispatchToProps:Be,initMergeProps:Ve,pure:K,areStatesEqual:ue,areOwnPropsEqual:de,areStatePropsEqual:we,areMergedPropsEqual:Je},Ee))},"connect")}o(WR,"createConnect");var Ri=WR();var hT=pe(Re());var dT=pe(Re());function zg(){var e=(0,dT.useContext)(Zn);return e}o(zg,"useReduxContext");function $g(e){e===void 0&&(e=Zn);var t=e===Zn?zg:function(){return(0,hT.useContext)(e)};return o(function(){var l=t(),d=l.store;return d},"useStore")}o($g,"createStoreHook");var cx=$g();function mT(e){e===void 0&&(e=Zn);var t=e===Zn?cx:$g(e);return o(function(){var l=t();return l.dispatch},"useDispatch")}o(mT,"createDispatchHook");var Ys=mT();var Zi=pe(Re());var BR=o(function(t,i){return t===i},"refEquality");function UR(e,t,i,l){var d=(0,Zi.useReducer)(function(te){return te+1},0),v=d[1],p=(0,Zi.useMemo)(function(){return new Jc(i,l)},[i,l]),y=(0,Zi.useRef)(),_=(0,Zi.useRef)(),O=(0,Zi.useRef)(),D=(0,Zi.useRef)(),Y=i.getState(),B;try{if(e!==_.current||Y!==O.current||y.current){var X=e(Y);D.current===void 0||!t(X,D.current)?B=X:B=D.current}else B=D.current}catch(te){throw y.current&&(te.message+=` + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var A;_&&(A=window.scrollY),a.input.focus(),_&&window.scrollTo(null,A),a.input.reset(),u.somethingSelected()||(c.value=i.prevInput=" "),i.contextMenuPending=z,a.selForContextMenu=u.doc.sel,clearTimeout(a.detectingSelectAll);function $(){if(c.selectionStart!=null){var oe=u.somethingSelected(),ce="\u200B"+(oe?c.value:"");c.value="\u21DA",c.value=ce,i.prevInput=oe?"":"\u200B",c.selectionStart=1,c.selectionEnd=ce.length,a.selForContextMenu=u.doc.sel}}o($,"prepareSelectAllHack");function z(){if(i.contextMenuPending==z&&(i.contextMenuPending=!1,i.wrapper.style.cssText=b,c.style.cssText=C,p&&w<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=g),c.selectionStart!=null)){(!p||p&&w<9)&&$();var oe=0,ce=o(function(){a.selForContextMenu==u.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&i.prevInput=="\u200B"?Jt(u,Sm)(u):oe++<10?a.detectingSelectAll=setTimeout(ce,500):(a.selForContextMenu=null,a.input.reset())},"poll");a.detectingSelectAll=setTimeout(ce,200)}}if(o(z,"rehide"),p&&w>=9&&$(),de){to(r);var ee=o(function(){he(window,"mouseup",ee),setTimeout(z,20)},"mouseup");H(window,"mouseup",ee)}else setTimeout(z,50)},or.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},or.prototype.setUneditable=function(){},or.prototype.needsContentAttribute=!1;function md(r,i){if(i=i?qt(i):{},i.value=r.value,!i.tabindex&&r.tabIndex&&(i.tabindex=r.tabIndex),!i.placeholder&&r.placeholder&&(i.placeholder=r.placeholder),i.autofocus==null){var u=Ke();i.autofocus=u==r||r.getAttribute("autofocus")!=null&&u==document.body}function a(){r.value=S.getValue()}o(a,"save");var c;if(r.form&&(H(r.form,"submit",a),!i.leaveSubmitMethodAlone)){var m=r.form;c=m.submit;try{var g=m.submit=function(){a(),m.submit=c,m.submit(),m.submit=g}}catch(C){}}i.finishInit=function(C){C.save=a,C.getTextArea=function(){return r},C.toTextArea=function(){C.toTextArea=isNaN,a(),r.parentNode.removeChild(C.getWrapperElement()),r.style.display="",r.form&&(he(r.form,"submit",a),!i.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=c))}},r.style.display="none";var S=Lt(function(C){return r.parentNode.insertBefore(C,r.nextSibling)},i);return S}o(md,"fromTextArea");function Gm(r){r.off=he,r.on=H,r.wheelEventPixels=l0,r.Doc=fn,r.splitLines=Zs,r.countColumn=_t,r.findColumn=br,r.isWordChar=Vt,r.Pass=Bt,r.signal=Ee,r.Line=Tr,r.changeEnd=Os,r.scrollbarModel=Uf,r.Pos=ae,r.cmpPos=ze,r.modes=Wl,r.mimeModes=ls,r.resolveMode=Js,r.getMode=au,r.modeExtensions=Ro,r.extendMode=Op,r.copyState=Fo,r.startState=Ef,r.innerMode=Bl,r.commands=yl,r.keyMap=qo,r.keyName=od,r.isModifierKey=rc,r.lookupKey=Vo,r.normalizeKeyMap=h0,r.StringStream=Dt,r.SharedTextMarker=va,r.TextMarker=Ps,r.LineWidget=Au,r.e_preventDefault=Qt,r.e_stopPropagation=ti,r.e_stop=to,r.addClass=Ge,r.contains=Ve,r.rmClass=we,r.keyNames=As}o(Gm,"addLegacyProps"),ac(Lt),Ko(Lt);var pn="iter insert remove copy getEditor constructor".split(" ");for(var pc in fn.prototype)fn.prototype.hasOwnProperty(pc)&&st(pn,pc)<0&&(Lt.prototype[pc]=function(r){return function(){return r.apply(this.doc,arguments)}}(fn.prototype[pc]));return Rr(fn),Lt.inputStyles={textarea:or,contenteditable:gt},Lt.defineMode=function(r){!Lt.defaults.mode&&r!="null"&&(Lt.defaults.mode=r),kp.apply(this,arguments)},Lt.defineMIME=bf,Lt.defineMode("null",function(){return{token:function(r){return r.skipToEnd()}}}),Lt.defineMIME("text/plain","null"),Lt.defineExtension=function(r,i){Lt.prototype[r]=i},Lt.defineDocExtension=function(r,i){fn.prototype[r]=i},Lt.fromTextArea=md,Gm(Lt),Lt.version="5.62.3",Lt})});var Yk=lr((U4,Gk)=>{var iI=typeof Element!="undefined",oI=typeof Map=="function",sI=typeof Set=="function",lI=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function My(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,l,d;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(l=n;l--!=0;)if(!My(e[l],t[l]))return!1;return!0}var v;if(oI&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;for(v=e.entries();!(l=v.next()).done;)if(!My(l.value[1],t.get(l.value[0])))return!1;return!0}if(sI&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;return!0}if(lI&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(l=n;l--!=0;)if(e[l]!==t[l])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(d=Object.keys(e),n=d.length,n!==Object.keys(t).length)return!1;for(l=n;l--!=0;)if(!Object.prototype.hasOwnProperty.call(t,d[l]))return!1;if(iI&&e instanceof Element)return!1;for(l=n;l--!=0;)if(!((d[l]==="_owner"||d[l]==="__v"||d[l]==="__o")&&e.$$typeof)&&!My(e[d[l]],t[d[l]]))return!1;return!0}return e!==e&&t!==t}o(My,"equal");Gk.exports=o(function(t,n){try{return My(t,n)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},"isEqual")});var lO=lr((ez,sO)=>{"use strict";var gI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";sO.exports=gI});var cO=lr((tz,fO)=>{"use strict";var yI=lO();function aO(){}o(aO,"emptyFunction");function uO(){}o(uO,"emptyFunctionWithReset");uO.resetWarningCache=aO;fO.exports=function(){function e(l,d,v,p,w,_){if(_!==yI){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:uO,resetWarningCache:aO};return n.PropTypes=n,n}});var $h=lr((iz,pO)=>{pO.exports=cO()();var rz,nz});var yS=lr((oz,dO)=>{dO.exports=o(function(t,n,l,d){var v=l?l.call(d,t,n):void 0;if(v!==void 0)return!!v;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var p=Object.keys(t),w=Object.keys(n);if(p.length!==w.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(n),O=0;O=0)&&(n[d]=e[d]);return n}o(Qa,"_objectWithoutPropertiesLoose");var ax=pe(lT()),nr=pe(Re()),pT=pe(cT());var _R=[],bR=[null,null];function ER(e,t){var n=e[1];return[t.payload,n+1]}o(ER,"storeStateUpdatesReducer");function dT(e,t,n){sf(function(){return e.apply(void 0,t)},n)}o(dT,"useIsomorphicLayoutEffectWithArgs");function TR(e,t,n,l,d,v,p){e.current=l,t.current=d,n.current=!1,v.current&&(v.current=null,p())}o(TR,"captureWrapperProps");function kR(e,t,n,l,d,v,p,w,_,O){if(!!e){var D=!1,Y=null,W=o(function(){if(!D){var Q=t.getState(),R,P;try{R=l(Q,d.current)}catch(F){P=F,Y=F}P||(Y=null),R===v.current?p.current||_():(v.current=R,w.current=R,p.current=!0,O({type:"STORE_UPDATED",payload:{error:P}}))}},"checkForUpdates");n.onStateChange=W,n.trySubscribe(),W();var X=o(function(){if(D=!0,n.tryUnsubscribe(),n.onStateChange=null,Y)throw Y},"unsubscribeWrapper");return X}}o(kR,"subscribeUpdates");var OR=o(function(){return[null,0]},"initStateUpdates");function Wg(e,t){t===void 0&&(t={});var n=t,l=n.getDisplayName,d=l===void 0?function(ie){return"ConnectAdvanced("+ie+")"}:l,v=n.methodName,p=v===void 0?"connectAdvanced":v,w=n.renderCountProp,_=w===void 0?void 0:w,O=n.shouldHandleStateChanges,D=O===void 0?!0:O,Y=n.storeKey,W=Y===void 0?"store":Y,X=n.withRef,te=X===void 0?!1:X,Q=n.forwardRef,R=Q===void 0?!1:Q,P=n.context,F=P===void 0?Yn:P,K=Qa(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);if(!1)var V;var ue=F;return o(function(de){var ge=de.displayName||de.name||"Component",we=d(ge),qe=To({},K,{getDisplayName:d,methodName:p,renderCountProp:_,shouldHandleStateChanges:D,storeKey:W,displayName:we,wrappedComponentName:ge,WrappedComponent:de}),Je=K.pure;function be(Ge){return e(Ge.dispatch,qe)}o(be,"createChildSelector");var yt=Je?nr.useMemo:function(Ge){return Ge()};function Be(Ge){var Yt=(0,nr.useMemo)(function(){var vr=Ge.reactReduxForwardedRef,Ri=Qa(Ge,["reactReduxForwardedRef"]);return[Ge.context,vr,Ri]},[Ge]),ut=Yt[0],Dr=Yt[1],qt=Yt[2],_t=(0,nr.useMemo)(function(){return ut&&ut.Consumer&&(0,pT.isContextConsumer)(nr.default.createElement(ut.Consumer,null))?ut:ue},[ut,ue]),wt=(0,nr.useContext)(_t),st=Boolean(Ge.store)&&Boolean(Ge.store.getState)&&Boolean(Ge.store.dispatch),_r=Boolean(wt)&&Boolean(wt.store),Bt=st?Ge.store:wt.store,Ut=(0,nr.useMemo)(function(){return be(Bt)},[Bt]),ne=(0,nr.useMemo)(function(){if(!D)return bR;var vr=new Qc(Bt,st?null:wt.subscription),Ri=vr.notifyNestedSubs.bind(vr);return[vr,Ri]},[Bt,st,wt]),et=ne[0],br=ne[1],zt=(0,nr.useMemo)(function(){return st?wt:To({},wt,{subscription:et})},[st,wt,et]),jt=(0,nr.useReducer)(ER,_R,OR),xe=jt[0],Er=xe[0],on=jt[1];if(Er&&Er.error)throw Er.error;var Dn=(0,nr.useRef)(),ei=(0,nr.useRef)(qt),sn=(0,nr.useRef)(),Vt=(0,nr.useRef)(!1),cr=yt(function(){return sn.current&&qt===ei.current?sn.current:Ut(Bt.getState(),qt)},[Bt,Er,qt]);dT(TR,[ei,Dn,Vt,qt,cr,sn,br]),dT(kR,[D,Bt,et,Ut,ei,Dn,Vt,sn,br,on],[Bt,et,Ut]);var ft=(0,nr.useMemo)(function(){return nr.default.createElement(de,To({},cr,{ref:Dr}))},[Dr,de,cr]),Do=(0,nr.useMemo)(function(){return D?nr.default.createElement(_t.Provider,{value:zt},ft):ft},[_t,ft,zt]);return Do}o(Be,"ConnectFunction");var Ve=Je?nr.default.memo(Be):Be;if(Ve.WrappedComponent=de,Ve.displayName=Be.displayName=we,R){var Ke=nr.default.forwardRef(o(function(Yt,ut){return nr.default.createElement(Ve,To({},Yt,{reactReduxForwardedRef:ut}))},"forwardConnectRef"));return Ke.displayName=we,Ke.WrappedComponent=de,(0,ax.default)(Ke,de)}return(0,ax.default)(Ve,de)},"wrapWithConnect")}o(Wg,"connectAdvanced");function hT(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}o(hT,"is");function Zc(e,t){if(hT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(var d=0;d=0;l--){var d=t[l](e);if(d)return d}return function(v,p){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+p.wrappedComponentName+".")}}o(cx,"match");function UR(e,t){return e===t}o(UR,"strictEqual");function zR(e){var t=e===void 0?{}:e,n=t.connectHOC,l=n===void 0?Wg:n,d=t.mapStateToPropsFactories,v=d===void 0?gT:d,p=t.mapDispatchToPropsFactories,w=p===void 0?vT:p,_=t.mergePropsFactories,O=_===void 0?yT:_,D=t.selectorFactory,Y=D===void 0?fx:D;return o(function(X,te,Q,R){R===void 0&&(R={});var P=R,F=P.pure,K=F===void 0?!0:F,V=P.areStatesEqual,ue=V===void 0?UR:V,ie=P.areOwnPropsEqual,de=ie===void 0?Zc:ie,ge=P.areStatePropsEqual,we=ge===void 0?Zc:ge,qe=P.areMergedPropsEqual,Je=qe===void 0?Zc:qe,be=Qa(P,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),yt=cx(X,v,"mapStateToProps"),Be=cx(te,w,"mapDispatchToProps"),Ve=cx(Q,O,"mergeProps");return l(Y,To({methodName:"connect",getDisplayName:o(function(Ge){return"Connect("+Ge+")"},"getDisplayName"),shouldHandleStateChanges:Boolean(X),initMapStateToProps:yt,initMapDispatchToProps:Be,initMergeProps:Ve,pure:K,areStatesEqual:ue,areOwnPropsEqual:de,areStatePropsEqual:we,areMergedPropsEqual:Je},be))},"connect")}o(zR,"createConnect");var Ai=zR();var xT=pe(Re());var wT=pe(Re());function Ug(){var e=(0,wT.useContext)(Yn);return e}o(Ug,"useReduxContext");function zg(e){e===void 0&&(e=Yn);var t=e===Yn?Ug:function(){return(0,xT.useContext)(e)};return o(function(){var l=t(),d=l.store;return d},"useStore")}o(zg,"createStoreHook");var px=zg();function ST(e){e===void 0&&(e=Yn);var t=e===Yn?px:zg(e);return o(function(){var l=t();return l.dispatch},"useDispatch")}o(ST,"createDispatchHook");var $s=ST();var Xi=pe(Re());var jR=o(function(t,n){return t===n},"refEquality");function $R(e,t,n,l){var d=(0,Xi.useReducer)(function(te){return te+1},0),v=d[1],p=(0,Xi.useMemo)(function(){return new Qc(n,l)},[n,l]),w=(0,Xi.useRef)(),_=(0,Xi.useRef)(),O=(0,Xi.useRef)(),D=(0,Xi.useRef)(),Y=n.getState(),W;try{if(e!==_.current||Y!==O.current||w.current){var X=e(Y);D.current===void 0||!t(X,D.current)?W=X:W=D.current}else W=D.current}catch(te){throw w.current&&(te.message+=` The error may be correlated with this previous error: -`+y.current.stack+` +`+w.current.stack+` -`),te}return af(function(){_.current=e,O.current=Y,D.current=B,y.current=void 0}),af(function(){function te(){try{var Q=i.getState(),R=_.current(Q);if(t(R,D.current))return;D.current=R,O.current=Q}catch(P){y.current=P}v()}return o(te,"checkForUpdates"),p.onStateChange=te,p.trySubscribe(),te(),function(){return p.tryUnsubscribe()}},[i,p]),B}o(UR,"useSelectorWithStoreAndSubscription");function vT(e){e===void 0&&(e=Zn);var t=e===Zn?zg:function(){return(0,Zi.useContext)(e)};return o(function(l,d){d===void 0&&(d=BR);var v=t(),p=v.store,y=v.subscription,_=UR(l,d,p,y);return(0,Zi.useDebugValue)(_),_},"useSelector")}o(vT,"createSelectorHook");var px=vT();var dx=pe(eu());zb(dx.unstable_batchedUpdates);var Fn=pe(Re());var gT=pe(xh()),zR=pe(Re());window._=gT.default;window.React=zR;var yt={UP:38,DOWN:40,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,LEFT:37,RIGHT:39,ENTER:13,ESC:27,TAB:9,SPACE:32,BACKSPACE:8,SHIFT:16};for(Sh=65;Sh<=90;Sh++)yt[String.fromCharCode(Sh)]=Sh;var Sh,jg=o(function(e){if(e===0)return"0";for(var t=["b","kb","mb","gb","tb"],i=0;ie);i++);var l;return e%Math.pow(1024,i)==0?l=0:l=1,(e/Math.pow(1024,i)).toFixed(l)+t[i]},"formatSize"),qg=o(function(e){for(var t=e,i=["ms","s","min","h"],l=[1e3,60,60],d=0;Math.abs(t)>=l[d]&&dkt(e,Oe({method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},i));kt.post=(e,t,i={})=>kt(e,Oe({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},i));function Ch(e,...t){return Ma(this,null,function*(){return yield(yield kt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()})}o(Ch,"runCommand");var yT="UI_FLOWVIEW_SET_TAB",wT="SET_CONTENT_VIEW_FOR",qR={tab:"request",contentViewFor:{}},VR=o((e=qR,t)=>{switch(t.type){case wT:return Ht(Oe({},e),{contentViewFor:Ht(Oe({},e.contentViewFor),{[t.messageId]:t.contentView})});case yT:return Ht(Oe({},e),{tab:t.tab?t.tab:"request"});default:return e}},"reducer"),xT=VR;function uf(e){return{type:yT,tab:e}}o(uf,"selectTab");function Vg(e,t){return{type:wT,messageId:e,contentView:t}}o(Vg,"setContentViewFor");var Eh={};vC(Eh,{ADD:()=>wx,RECEIVE:()=>Cx,REMOVE:()=>Sx,SET_FILTER:()=>gx,SET_SORT:()=>yx,UPDATE:()=>xx,add:()=>KR,defaultState:()=>Kg,receive:()=>XR,reduce:()=>rp,remove:()=>YR,setFilter:()=>_x,setSort:()=>CT,update:()=>GR});var vx=pe(ST()),gx="LIST_SET_FILTER",yx="LIST_SET_SORT",wx="LIST_ADD",xx="LIST_UPDATE",Sx="LIST_REMOVE",Cx="LIST_RECEIVE",Kg={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function rp(e=Kg,t){let{byId:i,list:l,listIndex:d,view:v,viewIndex:p}=e;switch(t.type){case gx:v=(0,vx.default)(l.filter(t.filter),t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case yx:v=(0,vx.default)([...v],t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case wx:if(t.item.id in i)break;i=Ht(Oe({},i),{[t.item.id]:t.item}),d=Ht(Oe({},d),{[t.item.id]:l.length}),l=[...l,t.item],t.filter(t.item)&&({view:v,viewIndex:p}=_T(e,t.item,t.sort));break;case xx:i=Ht(Oe({},i),{[t.item.id]:t.item}),l=[...l],l[d[t.item.id]]=t.item;let y=t.item.id in p,_=t.filter(t.item);_&&!y?{view:v,viewIndex:p}=_T(e,t.item,t.sort):!_&&y?{data:v,dataIndex:p}=Ex(v,p,t.item.id):_&&y&&({view:v,viewIndex:p}=QR(e,t.item,t.sort));break;case Sx:if(!(t.id in i))break;i=Oe({},i),delete i[t.id],{data:l,dataIndex:d}=Ex(l,d,t.id),t.id in p&&({data:v,dataIndex:p}=Ex(v,p,t.id));break;case Cx:l=t.list,d={},i={},l.forEach((O,D)=>{i[O.id]=O,d[O.id]=D}),v=l.filter(t.filter).sort(t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break}return{byId:i,list:l,listIndex:d,view:v,viewIndex:p}}o(rp,"reduce");function _x(e=Gg,t=_h){return{type:gx,filter:e,sort:t}}o(_x,"setFilter");function CT(e=_h){return{type:yx,sort:e}}o(CT,"setSort");function KR(e,t=Gg,i=_h){return{type:wx,item:e,filter:t,sort:i}}o(KR,"add");function GR(e,t=Gg,i=_h){return{type:xx,item:e,filter:t,sort:i}}o(GR,"update");function YR(e){return{type:Sx,id:e}}o(YR,"remove");function XR(e,t=Gg,i=_h){return{type:Cx,list:e,filter:t,sort:i}}o(XR,"receive");function _T(e,t,i){let l=ZR(e.view,t,i),d=[...e.view],v=Oe({},e.viewIndex);d.splice(l,0,t);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{view:d,viewIndex:v}}o(_T,"sortedInsert");function Ex(e,t,i){let l=t[i],d=[...e],v=Oe({},t);delete v[i],d.splice(l,1);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{data:d,dataIndex:v}}o(Ex,"removeData");function QR(e,t,i){let l=[...e.view],d=Oe({},e.viewIndex),v=d[t.id];for(l[v]=t;v+10;)l[v]=l[v+1],l[v+1]=t,d[t.id]=v+1,d[l[v].id]=v,++v;for(;v>0&&i(l[v],l[v-1])<0;)l[v]=l[v-1],l[v-1]=t,d[t.id]=v-1,d[l[v].id]=v,--v;return{view:l,viewIndex:d}}o(QR,"sortedUpdate");function ZR(e,t,i){let l=0,d=e.length;for(;l>>1;i(t,e[v])>=0?l=v+1:d=v}return l}o(ZR,"sortedIndex");function Gg(){return!0}o(Gg,"defaultFilter");function _h(e,t){return 0}o(_h,"defaultSort");var ET={http:80,https:443},jr=class{static getContentType(t){var i=jr.get_first_header(t,/^Content-Type$/i);if(i)return i.split(";")[0].trim()}static get_first_header(t,i){let l=t;l._headerLookups||Object.defineProperty(l,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let d=i.toString();if(!(d in l._headerLookups)){let v;for(let p=0;p{if(e.type!=="http")return 0;let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),t},"getTotalSize");var ff=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function i(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},y={start:Zl},_=Zl,O={type:"other",description:"filter expression"},D=o(function(x){return x},"peg$c1"),Y={type:"other",description:"whitespace"},B=/^[ \t\n\r]/,X={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},te={type:"other",description:"control character"},Q=/^[|&!()~"]/,R={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},P={type:"other",description:"optional whitespace"},F="|",K={type:"literal",value:"|",description:'"|"'},V=o(function(x,k){return ll(x,k)},"peg$c11"),ue="&",ie={type:"literal",value:"&",description:'"&"'},de=o(function(x,k){return Or(x,k)},"peg$c14"),ge="!",we={type:"literal",value:"!",description:'"!"'},qe=o(function(x){return Af(x)},"peg$c17"),Je="(",Ee={type:"literal",value:"(",description:'"("'},xt=")",Be={type:"literal",value:")",description:'")"'},Ve=o(function(x){return Df(x)},"peg$c22"),Ke="true",Ge={type:"literal",value:"true",description:'"true"'},Zt=o(function(){return wu},"peg$c25"),ut="false",Fr={type:"literal",value:"false",description:'"false"'},Kt=o(function(){return xu},"peg$c28"),bt="~a",St={type:"literal",value:"~a",description:'"~a"'},st=o(function(){return ta},"peg$c31"),br="~b",zt={type:"literal",value:"~b",description:'"~b"'},$t=o(function(x){return Dp(x)},"peg$c34"),ne="~bq",et={type:"literal",value:"~bq",description:'"~bq"'},Tr=o(function(x){return zn(x)},"peg$c37"),jt="~bs",qt={type:"literal",value:"~bs",description:'"~bs"'},xe=o(function(x){return Rp(x)},"peg$c40"),kr="~c",an={type:"literal",value:"~c",description:'"~c"'},In=o(function(x){return Ln(x)},"peg$c43"),ii="~d",un={type:"literal",value:"~d",description:'"~d"'},Gt=o(function(x){return Su(x)},"peg$c46"),dr="~dst",ft={type:"literal",value:"~dst",description:'"~dst"'},Io=o(function(x){return io(x)},"peg$c49"),yr="~e",Ii={type:"literal",value:"~e",description:'"~e"'},fn=o(function(){return ws},"peg$c52"),Hn="~h",vi={type:"literal",value:"~h",description:'"~h"'},gi=o(function(x){return xs(x)},"peg$c55"),Wn="~hq",kn={type:"literal",value:"~hq",description:'"~hq"'},Zs=o(function(x){return Ct(x)},"peg$c58"),H="~hs",J={type:"literal",value:"~hs",description:'"~hs"'},he=o(function(x){return oo(x)},"peg$c61"),be="~http",Jt={type:"literal",value:"~http",description:'"~http"'},zl=o(function(){return ra},"peg$c64"),Rt="~m",Ir={type:"literal",value:"~m",description:'"~m"'},er=o(function(x){return Fp(x)},"peg$c67"),oi="~marked",fs={type:"literal",value:"~marked",description:'"~marked"'},no=o(function(){return so},"peg$c70"),yi="~q",Js={type:"literal",value:"~q",description:'"~q"'},cs=o(function(){return lr},"peg$c73"),cn="~src",Ep={type:"literal",value:"~src",description:'"~src"'},el=o(function(x){return Ff(x)},"peg$c76"),bf="~s",tl={type:"literal",value:"~s",description:'"~s"'},bp=o(function(){return Rf},"peg$c79"),Tf="~t",uu={type:"literal",value:"~t",description:'"~t"'},Tp=o(function(x){return Ss(x)},"peg$c82"),$l="~tcp",ps={type:"literal",value:"~tcp",description:'"~tcp"'},kp=o(function(){return al},"peg$c85"),kf="~tq",rl={type:"literal",value:"~tq",description:'"~tq"'},fu=o(function(x){return jo(x)},"peg$c88"),Ho="~ts",Op={type:"literal",value:"~ts",description:'"~ts"'},Wo=o(function(x){return Ip(x)},"peg$c91"),jl="~u",Of={type:"literal",value:"~u",description:'"~u"'},Ft=o(function(x){return na(x)},"peg$c94"),Ne="~websocket",wi={type:"literal",value:"~websocket",description:'"~websocket"'},cu=o(function(){return ia},"peg$c97"),xi={type:"other",description:"integer"},dt=/^['"]/,Hi={type:"class",value:`['"]`,description:`['"]`},Bo=/^[0-9]/,nl={type:"class",value:"[0-9]",description:"[0-9]"},ae=o(function(x){return parseInt(x.join(""),10)},"peg$c103"),ze={type:"other",description:"string"},ql='"',Vl={type:"literal",value:'"',description:'"\\""'},Uo=o(function(x){return x.join("")},"peg$c107"),ds="'",Kl={type:"literal",value:"'",description:`"'"`},Ue=/^["\\]/,Lp={type:"class",value:'["\\\\]',description:'["\\\\]'},il={type:"any",description:"any character"},si=o(function(x){return x},"peg$c113"),Bn="\\",pu={type:"literal",value:"\\",description:'"\\\\"'},du=/^['\\]/,hs={type:"class",value:"['\\\\]",description:"['\\\\]"},ol=/^['"\\]/,Lf={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Gl="n",Yl={type:"literal",value:"n",description:'"n"'},Xl=o(function(){return` -`},"peg$c122"),zo="r",hu={type:"literal",value:"r",description:'"r"'},Nf=o(function(){return"\r"},"peg$c125"),Np="t",mu={type:"literal",value:"t",description:'"t"'},Si=o(function(){return" "},"peg$c128"),M=0,We=0,$o=[{line:1,column:1,seenCR:!1}],pn=0,vu=[],Se=0,Ql;if("startRule"in d){if(!(d.startRule in y))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=y[d.startRule]}function em(){return l.substring(We,M)}o(em,"text");function Pf(){return ms(We,M)}o(Pf,"location");function Pp(x){throw vs(null,[{type:"other",description:x}],l.substring(We,M),ms(We,M))}o(Pp,"expected");function Mf(x){throw vs(x,null,l.substring(We,M),ms(We,M))}o(Mf,"error");function gu(x){var k=$o[x],U,$;if(k)return k;for(U=x-1;!$o[U];)U--;for(k=$o[U],k={line:k.line,column:k.column,seenCR:k.seenCR};Upn&&(pn=M,vu=[]),vu.push(x))}o(Pe,"peg$fail");function vs(x,k,U,$){function $n(mr){var jn=1;for(mr.sort(function(wr,Ci){return wr.descriptionCi.description?1:0});jn1?Ci.slice(0,-1).join(", ")+" or "+Ci[mr.length-1]:Ci[0],Wi=jn?'"'+wr(jn)+'"':"end of input","Expected "+Yr+" but "+Wi+" found."}return o(hr,"buildMessage"),k!==null&&$n(k),new t(x!==null?x:hr(k,U),k,U,$)}o(vs,"peg$buildException");function Zl(){var x,k,U,$;return Se++,x=M,k=Un(),k!==p?(U=yu(),U!==p?($=Un(),$!==p?(We=x,k=D(U),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),Se--,x===p&&(k=p,Se===0&&Pe(O)),x}o(Zl,"peg$parsestart");function Ae(){var x,k;return Se++,B.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(X)),Se--,x===p&&(k=p,Se===0&&Pe(Y)),x}o(Ae,"peg$parsews");function Ot(){var x,k;return Se++,Q.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(R)),Se--,x===p&&(k=p,Se===0&&Pe(te)),x}o(Ot,"peg$parsecc");function Un(){var x,k;for(Se++,x=[],k=Ae();k!==p;)x.push(k),k=Ae();return Se--,x===p&&(k=p,Se===0&&Pe(P)),x}o(Un,"peg$parse__");function yu(){var x,k,U,$,$n,hr;return x=M,k=sl(),k!==p?(U=Un(),U!==p?(l.charCodeAt(M)===124?($=F,M++):($=p,Se===0&&Pe(K)),$!==p?($n=Un(),$n!==p?(hr=yu(),hr!==p?(We=x,k=V(k,hr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=sl()),x}o(yu,"peg$parseOrExpr");function sl(){var x,k,U,$,$n,hr;if(x=M,k=On(),k!==p?(U=Un(),U!==p?(l.charCodeAt(M)===38?($=ue,M++):($=p,Se===0&&Pe(ie)),$!==p?($n=Un(),$n!==p?(hr=sl(),hr!==p?(We=x,k=de(k,hr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p){if(x=M,k=On(),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=sl(),$!==p?(We=x,k=de(k,$),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=On())}return x}o(sl,"peg$parseAndExpr");function On(){var x,k,U,$;return x=M,l.charCodeAt(M)===33?(k=ge,M++):(k=p,Se===0&&Pe(we)),k!==p?(U=Un(),U!==p?($=On(),$!==p?(We=x,k=qe($),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Mp()),x}o(On,"peg$parseNotExpr");function Mp(){var x,k,U,$,$n,hr;return x=M,l.charCodeAt(M)===40?(k=Je,M++):(k=p,Se===0&&Pe(Ee)),k!==p?(U=Un(),U!==p?($=yu(),$!==p?($n=Un(),$n!==p?(l.charCodeAt(M)===41?(hr=xt,M++):(hr=p,Se===0&&Pe(Be)),hr!==p?(We=x,k=Ve($),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Ap()),x}o(Mp,"peg$parseBindingExpr");function Ap(){var x,k,U,$;if(x=M,l.substr(M,4)===Ke?(k=Ke,M+=4):(k=p,Se===0&&Pe(Ge)),k!==p&&(We=x,k=Zt()),x=k,x===p&&(x=M,l.substr(M,5)===ut?(k=ut,M+=5):(k=p,Se===0&&Pe(Fr)),k!==p&&(We=x,k=Kt()),x=k,x===p&&(x=M,l.substr(M,2)===bt?(k=bt,M+=2):(k=p,Se===0&&Pe(St)),k!==p&&(We=x,k=st()),x=k,x===p))){if(x=M,l.substr(M,2)===br?(k=br,M+=2):(k=p,Se===0&&Pe(zt)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=$t($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===ne?(k=ne,M+=3):(k=p,Se===0&&Pe(et)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Tr($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===jt?(k=jt,M+=3):(k=p,Se===0&&Pe(qt)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=xe($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===kr?(k=kr,M+=2):(k=p,Se===0&&Pe(an)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Jl(),$!==p?(We=x,k=In($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===ii?(k=ii,M+=2):(k=p,Se===0&&Pe(un)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Gt($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,4)===dr?(k=dr,M+=4):(k=p,Se===0&&Pe(ft)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Io($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===yr?(k=yr,M+=2):(k=p,Se===0&&Pe(Ii)),k!==p&&(We=x,k=fn()),x=k,x===p)){if(x=M,l.substr(M,2)===Hn?(k=Hn,M+=2):(k=p,Se===0&&Pe(vi)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=gi($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Wn?(k=Wn,M+=3):(k=p,Se===0&&Pe(kn)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Zs($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===H?(k=H,M+=3):(k=p,Se===0&&Pe(J)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=he($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,5)===be?(k=be,M+=5):(k=p,Se===0&&Pe(Jt)),k!==p&&(We=x,k=zl()),x=k,x===p)){if(x=M,l.substr(M,2)===Rt?(k=Rt,M+=2):(k=p,Se===0&&Pe(Ir)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=er($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,7)===oi?(k=oi,M+=7):(k=p,Se===0&&Pe(fs)),k!==p&&(We=x,k=no()),x=k,x===p&&(x=M,l.substr(M,2)===yi?(k=yi,M+=2):(k=p,Se===0&&Pe(Js)),k!==p&&(We=x,k=cs()),x=k,x===p))){if(x=M,l.substr(M,4)===cn?(k=cn,M+=4):(k=p,Se===0&&Pe(Ep)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=el($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===bf?(k=bf,M+=2):(k=p,Se===0&&Pe(tl)),k!==p&&(We=x,k=bp()),x=k,x===p)){if(x=M,l.substr(M,2)===Tf?(k=Tf,M+=2):(k=p,Se===0&&Pe(uu)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Tp($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,4)===$l?(k=$l,M+=4):(k=p,Se===0&&Pe(ps)),k!==p&&(We=x,k=kp()),x=k,x===p)){if(x=M,l.substr(M,3)===kf?(k=kf,M+=3):(k=p,Se===0&&Pe(rl)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=fu($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Ho?(k=Ho,M+=3):(k=p,Se===0&&Pe(Op)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Wo($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===jl?(k=jl,M+=2):(k=p,Se===0&&Pe(Of)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Ft($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=M,l.substr(M,10)===Ne?(k=Ne,M+=10):(k=p,Se===0&&Pe(wi)),k!==p&&(We=x,k=cu()),x=k,x===p&&(x=M,k=Hr(),k!==p&&(We=x,k=Ft(k)),x=k))}}}}}}}}}}}}}}}return x}o(Ap,"peg$parseExpr");function Jl(){var x,k,U,$;if(Se++,x=M,dt.test(l.charAt(M))?(k=l.charAt(M),M++):(k=p,Se===0&&Pe(Hi)),k===p&&(k=null),k!==p){if(U=[],Bo.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(nl)),$!==p)for(;$!==p;)U.push($),Bo.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(nl));else U=p;U!==p?(dt.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(Hi)),$===p&&($=null),$!==p?(We=x,k=ae(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;return Se--,x===p&&(k=p,Se===0&&Pe(xi)),x}o(Jl,"peg$parseIntegerLiteral");function Hr(){var x,k,U,$;if(Se++,x=M,l.charCodeAt(M)===34?(k=ql,M++):(k=p,Se===0&&Pe(Vl)),k!==p){for(U=[],$=Nt();$!==p;)U.push($),$=Nt();U!==p?(l.charCodeAt(M)===34?($=ql,M++):($=p,Se===0&&Pe(Vl)),$!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.charCodeAt(M)===39?(k=ds,M++):(k=p,Se===0&&Pe(Kl)),k!==p){for(U=[],$=gs();$!==p;)U.push($),$=gs();U!==p?(l.charCodeAt(M)===39?($=ds,M++):($=p,Se===0&&Pe(Kl)),$!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p)if(x=M,k=M,Se++,U=Ot(),Se--,U===p?k=void 0:(M=k,k=p),k!==p){if(U=[],$=Wr(),$!==p)for(;$!==p;)U.push($),$=Wr();else U=p;U!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)}else M=x,x=p}return Se--,x===p&&(k=p,Se===0&&Pe(ze)),x}o(Hr,"peg$parseStringLiteral");function Nt(){var x,k,U;return x=M,k=M,Se++,Ue.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(Lp)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=Bn,M++):(k=p,Se===0&&Pe(pu)),k!==p?(U=ys(),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(Nt,"peg$parseDoubleStringChar");function gs(){var x,k,U;return x=M,k=M,Se++,du.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(hs)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=Bn,M++):(k=p,Se===0&&Pe(pu)),k!==p?(U=ys(),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(gs,"peg$parseSingleStringChar");function Wr(){var x,k,U;return x=M,k=M,Se++,U=Ae(),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x}o(Wr,"peg$parseUnquotedStringChar");function ys(){var x,k;return ol.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(Lf)),x===p&&(x=M,l.charCodeAt(M)===110?(k=Gl,M++):(k=p,Se===0&&Pe(Yl)),k!==p&&(We=x,k=Xl()),x=k,x===p&&(x=M,l.charCodeAt(M)===114?(k=zo,M++):(k=p,Se===0&&Pe(hu)),k!==p&&(We=x,k=Nf()),x=k,x===p&&(x=M,l.charCodeAt(M)===116?(k=Np,M++):(k=p,Se===0&&Pe(mu)),k!==p&&(We=x,k=Si()),x=k))),x}o(ys,"peg$parseEscapeSequence");function ll(x,k){function U(){return x.apply(this,arguments)||k.apply(this,arguments)}return o(U,"orFilter"),U.desc=x.desc+" or "+k.desc,U}o(ll,"or");function Or(x,k){function U(){return x.apply(this,arguments)&&k.apply(this,arguments)}return o(U,"andFilter"),U.desc=x.desc+" and "+k.desc,U}o(Or,"and");function Af(x){function k(){return!x.apply(this,arguments)}return o(k,"notFilter"),k.desc="not "+x.desc,k}o(Af,"not");function Df(x){function k(){return x.apply(this,arguments)}return o(k,"bindingFilter"),k.desc="("+x.desc+")",k}o(Df,"binding");function wu(x){return!0}o(wu,"trueFilter"),wu.desc="true";function xu(x){return!1}o(xu,"falseFilter"),xu.desc="false";var ea=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("application/x-shockwave-flash")];function ta(x){if(x.response){for(var k=is.getContentType(x.response),U=ea.length;U--;)if(ea[U].test(k))return!0}return!1}o(ta,"assetFilter"),ta.desc="is asset";function Ln(x){function k(U){return U.response&&U.response.status_code===x}return o(k,"responseCodeFilter"),k.desc="resp. code is "+x,k}o(Ln,"responseCode");function Dp(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"bodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Dp,"body");function zn(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"requestBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(zn,"requestBody");function Rp(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"responseBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Rp,"responseBody");function Su(x){x=new RegExp(x,"i");function k(U){return U.request&&(x.test(U.request.host)||x.test(U.request.pretty_host))}return o(k,"domainFilter"),k.desc="domain matches "+x,k}o(Su,"domain");function io(x){x=new RegExp(x,"i");function k(U){return!!U.server_conn.address&&x.test(U.server_conn.address[0]+":"+U.server_conn.address[1])}return o(k,"destinationFilter"),k.desc="destination address matches "+x,k}o(io,"destination");function ws(x){return!!x.error}o(ws,"errorFilter"),ws.desc="has error";function xs(x){x=new RegExp(x,"i");function k(U){return U.request&&Ji.match_header(U.request,x)||U.response&&is.match_header(U.response,x)}return o(k,"headerFilter"),k.desc="header matches "+x,k}o(xs,"header");function Ct(x){x=new RegExp(x,"i");function k(U){return U.request&&Ji.match_header(U.request,x)}return o(k,"requestHeaderFilter"),k.desc="req. header matches "+x,k}o(Ct,"requestHeader");function oo(x){x=new RegExp(x,"i");function k(U){return U.response&&is.match_header(U.response,x)}return o(k,"responseHeaderFilter"),k.desc="resp. header matches "+x,k}o(oo,"responseHeader");function ra(x){return x.type==="http"}o(ra,"httpFilter"),ra.desc="is an HTTP Flow";function Fp(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(U.request.method)}return o(k,"methodFilter"),k.desc="method matches "+x,k}o(Fp,"method");function so(x){return x.marked}o(so,"markedFilter"),so.desc="is marked";function lr(x){return x.request&&!x.response}o(lr,"noResponseFilter"),lr.desc="has no response";function Rf(x){return!!x.response}o(Rf,"responseFilter"),Rf.desc="has response";function Ff(x){x=new RegExp(x,"i");function k(U){return!!U.client_conn.peername&&x.test(U.client_conn.peername[0]+":"+U.client_conn.peername[1])}return o(k,"sourceFilter"),k.desc="source address matches "+x,k}o(Ff,"source");function Ss(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.getContentType(U.request))||U.response&&x.test(is.getContentType(U.response))}return o(k,"contentTypeFilter"),k.desc="content type matches "+x,k}o(Ss,"contentType");function al(x){return x.type==="tcp"}o(al,"tcpFilter"),al.desc="is a TCP Flow";function jo(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.getContentType(U.request))}return o(k,"requestContentTypeFilter"),k.desc="req. content type matches "+x,k}o(jo,"requestContentType");function Ip(x){x=new RegExp(x,"i");function k(U){return U.response&&x.test(is.getContentType(U.response))}return o(k,"responseContentTypeFilter"),k.desc="resp. content type matches "+x,k}o(Ip,"responseContentType");function na(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.pretty_url(U.request))}return o(k,"urlFilter"),k.desc="url matches "+x,k}o(na,"url");function ia(x){return x.type==="websocket"}if(o(ia,"websocketFilter"),ia.desc="is a Websocket Flow",Ql=_(),Ql!==p&&M===l.length)return Ql;throw Ql!==p&&MXx,icon:()=>cy,method:()=>dy,path:()=>py,quickactions:()=>sp,size:()=>my,status:()=>hy,time:()=>vy,timestamp:()=>gy,tls:()=>fy});var rt=pe(Re());var uy=pe(Jn());var Xg="UI_HIDE_MODAL",bT="UI_SET_ACTIVE_MODAL",tF={activeModal:void 0};function Lx(e=tF,t){switch(t.type){case bT:return Ht(Oe({},e),{activeModal:t.activeModal});case Xg:return Ht(Oe({},e),{activeModal:void 0});default:return e}}o(Lx,"reducer");function TT(e){return{type:bT,activeModal:e}}o(TT,"setActiveModal");function Qg(){return{type:Xg}}o(Qg,"hideModal");var kT="UI_OPTION_UPDATE_START",OT="UI_OPTION_UPDATE_SUCCESS",LT="UI_OPTION_UPDATE_ERROR",rF={};function Nx(e=rF,t){switch(t.type){case kT:return Ht(Oe({},e),{[t.option]:{isUpdating:!0,value:t.value,error:!1}});case OT:return Ht(Oe({},e),{[t.option]:void 0});case LT:let i=e[t.option].value;return typeof i=="boolean"&&(i=!i),Ht(Oe({},e),{[t.option]:{value:i,isUpdating:!1,error:t.error}});case Xg:return{};default:return e}}o(Nx,"reducer");function NT(e,t){return{type:kT,option:e,value:t}}o(NT,"startUpdate");function PT(e){return{type:OT,option:e}}o(PT,"updateSuccess");function MT(e,t){return{type:LT,option:e,error:t}}o(MT,"updateError");var AT={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],command_history:!0,confdir:"~/.mitmproxy",connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,export_preserve_original_ip:!1,http2:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:8080,map_local:[],map_remote:[],mode:"regular",modify_body:[],modify_headers:[],onboarding:!0,onboarding_host:"mitm.it",onboarding_port:80,proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_use_headers:[],showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,tcp_hosts:[],termlog_verbosity:"info",tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",upstream_auth:void 0,upstream_cert:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var Px="OPTIONS_RECEIVE",Mx="OPTIONS_UPDATE";var nF=o((e=AT,t)=>{switch(t.type){case Px:let i={};for(let[d,{value:v}]of Object.entries(t.data))i[d]=v;return i;case Mx:let l=Oe({},e);for(let[d,{value:v}]of Object.entries(t.data))l[d]=v;return l;default:return e}},"reducer"),DT=nF;function iF(e,t,i){return Ma(this,null,function*(){try{let l=yield kt.put("/options",{[e]:t});if(l.status===200)i(PT(e));else throw yield l.text()}catch(l){i(MT(e,l))}})}o(iF,"pureSendUpdate");var oF=iF;function cf(e,t){return i=>{i(NT(e,t)),oF(e,t,i)}}o(cf,"update");function RT(){return e=>kt("/options/save",{method:"POST"})}o(RT,"save");function FT(e){return(t,i)=>{let l=i().options.intercept;l&&l.includes(e)||(l?l=`${l} | ${e}`:l=e,t(cf("intercept",l)))}}o(FT,"addInterceptFilter");var Er=pe(Re());var Zg=pe(Re());var Ax=o(function(t){return t.reduce(function(i,l){var d=l[0],v=l[1];return i[d]=v,i},{})},"fromEntries"),Dx=typeof window!="undefined"&&window.document&&window.document.createElement?Zg.useLayoutEffect:Zg.useEffect;var su=pe(Re());var qr="top",En="bottom",on="right",sn="left",Jg="auto",ru=[qr,En,on,sn],Fl="start",ey="end",IT="clippingParents",ty="viewport",np="popper",HT="reference",Rx=ru.reduce(function(e,t){return e.concat([t+"-"+Fl,t+"-"+ey])},[]),ry=[].concat(ru,[Jg]).reduce(function(e,t){return e.concat([t,t+"-"+Fl,t+"-"+ey])},[]),sF="beforeRead",lF="read",aF="afterRead",uF="beforeMain",fF="main",cF="afterMain",pF="beforeWrite",dF="write",hF="afterWrite",WT=[sF,lF,aF,uF,fF,cF,pF,dF,hF];function bn(e){return e?(e.nodeName||"").toLowerCase():null}o(bn,"getNodeName");function Rr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}o(Rr,"getWindow");function Il(e){var t=Rr(e).Element;return e instanceof t||e instanceof Element}o(Il,"isElement");function Vr(e){var t=Rr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}o(Vr,"isHTMLElement");function ny(e){if(typeof ShadowRoot=="undefined")return!1;var t=Rr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}o(ny,"isShadowRoot");function mF(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var l=t.styles[i]||{},d=t.attributes[i]||{},v=t.elements[i];!Vr(v)||!bn(v)||(Object.assign(v.style,l),Object.keys(d).forEach(function(p){var y=d[p];y===!1?v.removeAttribute(p):v.setAttribute(p,y===!0?"":y)}))})}o(mF,"applyStyles");function vF(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(l){var d=t.elements[l],v=t.attributes[l]||{},p=Object.keys(t.styles.hasOwnProperty(l)?t.styles[l]:i[l]),y=p.reduce(function(_,O){return _[O]="",_},{});!Vr(d)||!bn(d)||(Object.assign(d.style,y),Object.keys(v).forEach(function(_){d.removeAttribute(_)}))})}}o(vF,"effect");var BT={name:"applyStyles",enabled:!0,phase:"write",fn:mF,effect:vF,requires:["computeStyles"]};function Tn(e){return e.split("-")[0]}o(Tn,"getBasePlacement");var nu=Math.round;function No(e,t){t===void 0&&(t=!1);var i=e.getBoundingClientRect(),l=1,d=1;return Vr(e)&&t&&(l=i.width/e.offsetWidth||1,d=i.height/e.offsetHeight||1),{width:nu(i.width/l),height:nu(i.height/d),top:nu(i.top/d),right:nu(i.right/l),bottom:nu(i.bottom/d),left:nu(i.left/l),x:nu(i.left/l),y:nu(i.top/d)}}o(No,"getBoundingClientRect");function pf(e){var t=No(e),i=e.offsetWidth,l=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-l)<=1&&(l=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:l}}o(pf,"getLayoutRect");function Th(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&ny(i)){var l=t;do{if(l&&e.isSameNode(l))return!0;l=l.parentNode||l.host}while(l)}return!1}o(Th,"contains");function hi(e){return Rr(e).getComputedStyle(e)}o(hi,"getComputedStyle");function Fx(e){return["table","td","th"].indexOf(bn(e))>=0}o(Fx,"isTableElement");function Rn(e){return((Il(e)?e.ownerDocument:e.document)||window.document).documentElement}o(Rn,"getDocumentElement");function Hl(e){return bn(e)==="html"?e:e.assignedSlot||e.parentNode||(ny(e)?e.host:null)||Rn(e)}o(Hl,"getParentNode");function UT(e){return!Vr(e)||hi(e).position==="fixed"?null:e.offsetParent}o(UT,"getTrueOffsetParent");function gF(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,i=navigator.userAgent.indexOf("Trident")!==-1;if(i&&Vr(e)){var l=hi(e);if(l.position==="fixed")return null}for(var d=Hl(e);Vr(d)&&["html","body"].indexOf(bn(d))<0;){var v=hi(d);if(v.transform!=="none"||v.perspective!=="none"||v.contain==="paint"||["transform","perspective"].indexOf(v.willChange)!==-1||t&&v.willChange==="filter"||t&&v.filter&&v.filter!=="none")return d;d=d.parentNode}return null}o(gF,"getContainingBlock");function os(e){for(var t=Rr(e),i=UT(e);i&&Fx(i)&&hi(i).position==="static";)i=UT(i);return i&&(bn(i)==="html"||bn(i)==="body"&&hi(i).position==="static")?t:i||gF(e)||t}o(os,"getOffsetParent");function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}o(df,"getMainAxisFromPlacement");var Po=Math.max,iu=Math.min,kh=Math.round;function hf(e,t,i){return Po(e,iu(t,i))}o(hf,"within");function Oh(){return{top:0,right:0,bottom:0,left:0}}o(Oh,"getFreshSideObject");function Lh(e){return Object.assign({},Oh(),e)}o(Lh,"mergePaddingObject");function Nh(e,t){return t.reduce(function(i,l){return i[l]=e,i},{})}o(Nh,"expandToHashMap");var yF=o(function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,Lh(typeof t!="number"?t:Nh(t,ru))},"toPaddingObject");function wF(e){var t,i=e.state,l=e.name,d=e.options,v=i.elements.arrow,p=i.modifiersData.popperOffsets,y=Tn(i.placement),_=df(y),O=[sn,on].indexOf(y)>=0,D=O?"height":"width";if(!(!v||!p)){var Y=yF(d.padding,i),B=pf(v),X=_==="y"?qr:sn,te=_==="y"?En:on,Q=i.rects.reference[D]+i.rects.reference[_]-p[_]-i.rects.popper[D],R=p[_]-i.rects.reference[_],P=os(v),F=P?_==="y"?P.clientHeight||0:P.clientWidth||0:0,K=Q/2-R/2,V=Y[X],ue=F-B[D]-Y[te],ie=F/2-B[D]/2+K,de=hf(V,ie,ue),ge=_;i.modifiersData[l]=(t={},t[ge]=de,t.centerOffset=de-ie,t)}}o(wF,"arrow");function xF(e){var t=e.state,i=e.options,l=i.element,d=l===void 0?"[data-popper-arrow]":l;d!=null&&(typeof d=="string"&&(d=t.elements.popper.querySelector(d),!d)||!Th(t.elements.popper,d)||(t.elements.arrow=d))}o(xF,"effect");var zT={name:"arrow",enabled:!0,phase:"main",fn:wF,effect:xF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var SF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CF(e){var t=e.x,i=e.y,l=window,d=l.devicePixelRatio||1;return{x:kh(kh(t*d)/d)||0,y:kh(kh(i*d)/d)||0}}o(CF,"roundOffsetsByDPR");function $T(e){var t,i=e.popper,l=e.popperRect,d=e.placement,v=e.offsets,p=e.position,y=e.gpuAcceleration,_=e.adaptive,O=e.roundOffsets,D=O===!0?CF(v):typeof O=="function"?O(v):v,Y=D.x,B=Y===void 0?0:Y,X=D.y,te=X===void 0?0:X,Q=v.hasOwnProperty("x"),R=v.hasOwnProperty("y"),P=sn,F=qr,K=window;if(_){var V=os(i),ue="clientHeight",ie="clientWidth";V===Rr(i)&&(V=Rn(i),hi(V).position!=="static"&&(ue="scrollHeight",ie="scrollWidth")),V=V,d===qr&&(F=En,te-=V[ue]-l.height,te*=y?1:-1),d===sn&&(P=on,B-=V[ie]-l.width,B*=y?1:-1)}var de=Object.assign({position:p},_&&SF);if(y){var ge;return Object.assign({},de,(ge={},ge[F]=R?"0":"",ge[P]=Q?"0":"",ge.transform=(K.devicePixelRatio||1)<2?"translate("+B+"px, "+te+"px)":"translate3d("+B+"px, "+te+"px, 0)",ge))}return Object.assign({},de,(t={},t[F]=R?te+"px":"",t[P]=Q?B+"px":"",t.transform="",t))}o($T,"mapToStyles");function _F(e){var t=e.state,i=e.options,l=i.gpuAcceleration,d=l===void 0?!0:l,v=i.adaptive,p=v===void 0?!0:v,y=i.roundOffsets,_=y===void 0?!0:y;if(!1)var O;var D={placement:Tn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:d};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$T(Object.assign({},D,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:p,roundOffsets:_})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$T(Object.assign({},D,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:_})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}o(_F,"computeStyles");var jT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_F,data:{}};var iy={passive:!0};function EF(e){var t=e.state,i=e.instance,l=e.options,d=l.scroll,v=d===void 0?!0:d,p=l.resize,y=p===void 0?!0:p,_=Rr(t.elements.popper),O=[].concat(t.scrollParents.reference,t.scrollParents.popper);return v&&O.forEach(function(D){D.addEventListener("scroll",i.update,iy)}),y&&_.addEventListener("resize",i.update,iy),function(){v&&O.forEach(function(D){D.removeEventListener("scroll",i.update,iy)}),y&&_.removeEventListener("resize",i.update,iy)}}o(EF,"effect");var qT={name:"eventListeners",enabled:!0,phase:"write",fn:o(function(){},"fn"),effect:EF,data:{}};var bF={left:"right",right:"left",bottom:"top",top:"bottom"};function ip(e){return e.replace(/left|right|bottom|top/g,function(t){return bF[t]})}o(ip,"getOppositePlacement");var TF={start:"end",end:"start"};function oy(e){return e.replace(/start|end/g,function(t){return TF[t]})}o(oy,"getOppositeVariationPlacement");function mf(e){var t=Rr(e),i=t.pageXOffset,l=t.pageYOffset;return{scrollLeft:i,scrollTop:l}}o(mf,"getWindowScroll");function vf(e){return No(Rn(e)).left+mf(e).scrollLeft}o(vf,"getWindowScrollBarX");function Ix(e){var t=Rr(e),i=Rn(e),l=t.visualViewport,d=i.clientWidth,v=i.clientHeight,p=0,y=0;return l&&(d=l.width,v=l.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=l.offsetLeft,y=l.offsetTop)),{width:d,height:v,x:p+vf(e),y}}o(Ix,"getViewportRect");function Hx(e){var t,i=Rn(e),l=mf(e),d=(t=e.ownerDocument)==null?void 0:t.body,v=Po(i.scrollWidth,i.clientWidth,d?d.scrollWidth:0,d?d.clientWidth:0),p=Po(i.scrollHeight,i.clientHeight,d?d.scrollHeight:0,d?d.clientHeight:0),y=-l.scrollLeft+vf(e),_=-l.scrollTop;return hi(d||i).direction==="rtl"&&(y+=Po(i.clientWidth,d?d.clientWidth:0)-v),{width:v,height:p,x:y,y:_}}o(Hx,"getDocumentRect");function gf(e){var t=hi(e),i=t.overflow,l=t.overflowX,d=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+d+l)}o(gf,"isScrollParent");function sy(e){return["html","body","#document"].indexOf(bn(e))>=0?e.ownerDocument.body:Vr(e)&&gf(e)?e:sy(Hl(e))}o(sy,"getScrollParent");function ou(e,t){var i;t===void 0&&(t=[]);var l=sy(e),d=l===((i=e.ownerDocument)==null?void 0:i.body),v=Rr(l),p=d?[v].concat(v.visualViewport||[],gf(l)?l:[]):l,y=t.concat(p);return d?y:y.concat(ou(Hl(p)))}o(ou,"listScrollParents");function op(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}o(op,"rectToClientRect");function kF(e){var t=No(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}o(kF,"getInnerBoundingClientRect");function VT(e,t){return t===ty?op(Ix(e)):Vr(t)?kF(t):op(Hx(Rn(e)))}o(VT,"getClientRectFromMixedType");function OF(e){var t=ou(Hl(e)),i=["absolute","fixed"].indexOf(hi(e).position)>=0,l=i&&Vr(e)?os(e):e;return Il(l)?t.filter(function(d){return Il(d)&&Th(d,l)&&bn(d)!=="body"}):[]}o(OF,"getClippingParents");function Wx(e,t,i){var l=t==="clippingParents"?OF(e):[].concat(t),d=[].concat(l,[i]),v=d[0],p=d.reduce(function(y,_){var O=VT(e,_);return y.top=Po(O.top,y.top),y.right=iu(O.right,y.right),y.bottom=iu(O.bottom,y.bottom),y.left=Po(O.left,y.left),y},VT(e,v));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}o(Wx,"getClippingRect");function Xs(e){return e.split("-")[1]}o(Xs,"getVariation");function Ph(e){var t=e.reference,i=e.element,l=e.placement,d=l?Tn(l):null,v=l?Xs(l):null,p=t.x+t.width/2-i.width/2,y=t.y+t.height/2-i.height/2,_;switch(d){case qr:_={x:p,y:t.y-i.height};break;case En:_={x:p,y:t.y+t.height};break;case on:_={x:t.x+t.width,y};break;case sn:_={x:t.x-i.width,y};break;default:_={x:t.x,y:t.y}}var O=d?df(d):null;if(O!=null){var D=O==="y"?"height":"width";switch(v){case Fl:_[O]=_[O]-(t[D]/2-i[D]/2);break;case ey:_[O]=_[O]+(t[D]/2-i[D]/2);break;default:}}return _}o(Ph,"computeOffsets");function ss(e,t){t===void 0&&(t={});var i=t,l=i.placement,d=l===void 0?e.placement:l,v=i.boundary,p=v===void 0?IT:v,y=i.rootBoundary,_=y===void 0?ty:y,O=i.elementContext,D=O===void 0?np:O,Y=i.altBoundary,B=Y===void 0?!1:Y,X=i.padding,te=X===void 0?0:X,Q=Lh(typeof te!="number"?te:Nh(te,ru)),R=D===np?HT:np,P=e.elements.reference,F=e.rects.popper,K=e.elements[B?R:D],V=Wx(Il(K)?K:K.contextElement||Rn(e.elements.popper),p,_),ue=No(P),ie=Ph({reference:ue,element:F,strategy:"absolute",placement:d}),de=op(Object.assign({},F,ie)),ge=D===np?de:ue,we={top:V.top-ge.top+Q.top,bottom:ge.bottom-V.bottom+Q.bottom,left:V.left-ge.left+Q.left,right:ge.right-V.right+Q.right},qe=e.modifiersData.offset;if(D===np&&qe){var Je=qe[d];Object.keys(we).forEach(function(Ee){var xt=[on,En].indexOf(Ee)>=0?1:-1,Be=[qr,En].indexOf(Ee)>=0?"y":"x";we[Ee]+=Je[Be]*xt})}return we}o(ss,"detectOverflow");function Bx(e,t){t===void 0&&(t={});var i=t,l=i.placement,d=i.boundary,v=i.rootBoundary,p=i.padding,y=i.flipVariations,_=i.allowedAutoPlacements,O=_===void 0?ry:_,D=Xs(l),Y=D?y?Rx:Rx.filter(function(te){return Xs(te)===D}):ru,B=Y.filter(function(te){return O.indexOf(te)>=0});B.length===0&&(B=Y);var X=B.reduce(function(te,Q){return te[Q]=ss(e,{placement:Q,boundary:d,rootBoundary:v,padding:p})[Tn(Q)],te},{});return Object.keys(X).sort(function(te,Q){return X[te]-X[Q]})}o(Bx,"computeAutoPlacement");function LF(e){if(Tn(e)===Jg)return[];var t=ip(e);return[oy(e),t,oy(t)]}o(LF,"getExpandedFallbackPlacements");function NF(e){var t=e.state,i=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var d=i.mainAxis,v=d===void 0?!0:d,p=i.altAxis,y=p===void 0?!0:p,_=i.fallbackPlacements,O=i.padding,D=i.boundary,Y=i.rootBoundary,B=i.altBoundary,X=i.flipVariations,te=X===void 0?!0:X,Q=i.allowedAutoPlacements,R=t.options.placement,P=Tn(R),F=P===R,K=_||(F||!te?[ip(R)]:LF(R)),V=[R].concat(K).reduce(function(st,br){return st.concat(Tn(br)===Jg?Bx(t,{placement:br,boundary:D,rootBoundary:Y,padding:O,flipVariations:te,allowedAutoPlacements:Q}):br)},[]),ue=t.rects.reference,ie=t.rects.popper,de=new Map,ge=!0,we=V[0],qe=0;qe=0,Ve=Be?"width":"height",Ke=ss(t,{placement:Je,boundary:D,rootBoundary:Y,altBoundary:B,padding:O}),Ge=Be?xt?on:sn:xt?En:qr;ue[Ve]>ie[Ve]&&(Ge=ip(Ge));var Zt=ip(Ge),ut=[];if(v&&ut.push(Ke[Ee]<=0),y&&ut.push(Ke[Ge]<=0,Ke[Zt]<=0),ut.every(function(st){return st})){we=Je,ge=!1;break}de.set(Je,ut)}if(ge)for(var Fr=te?3:1,Kt=o(function(br){var zt=V.find(function($t){var ne=de.get($t);if(ne)return ne.slice(0,br).every(function(et){return et})});if(zt)return we=zt,"break"},"_loop"),bt=Fr;bt>0;bt--){var St=Kt(bt);if(St==="break")break}t.placement!==we&&(t.modifiersData[l]._skip=!0,t.placement=we,t.reset=!0)}}o(NF,"flip");var KT={name:"flip",enabled:!0,phase:"main",fn:NF,requiresIfExists:["offset"],data:{_skip:!1}};function GT(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}o(GT,"getSideOffsets");function YT(e){return[qr,on,En,sn].some(function(t){return e[t]>=0})}o(YT,"isAnySideFullyClipped");function PF(e){var t=e.state,i=e.name,l=t.rects.reference,d=t.rects.popper,v=t.modifiersData.preventOverflow,p=ss(t,{elementContext:"reference"}),y=ss(t,{altBoundary:!0}),_=GT(p,l),O=GT(y,d,v),D=YT(_),Y=YT(O);t.modifiersData[i]={referenceClippingOffsets:_,popperEscapeOffsets:O,isReferenceHidden:D,hasPopperEscaped:Y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":D,"data-popper-escaped":Y})}o(PF,"hide");var XT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PF};function MF(e,t,i){var l=Tn(e),d=[sn,qr].indexOf(l)>=0?-1:1,v=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,p=v[0],y=v[1];return p=p||0,y=(y||0)*d,[sn,on].indexOf(l)>=0?{x:y,y:p}:{x:p,y}}o(MF,"distanceAndSkiddingToXY");function AF(e){var t=e.state,i=e.options,l=e.name,d=i.offset,v=d===void 0?[0,0]:d,p=ry.reduce(function(D,Y){return D[Y]=MF(Y,t.rects,v),D},{}),y=p[t.placement],_=y.x,O=y.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=_,t.modifiersData.popperOffsets.y+=O),t.modifiersData[l]=p}o(AF,"offset");var QT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AF};function DF(e){var t=e.state,i=e.name;t.modifiersData[i]=Ph({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}o(DF,"popperOffsets");var ZT={name:"popperOffsets",enabled:!0,phase:"read",fn:DF,data:{}};function Ux(e){return e==="x"?"y":"x"}o(Ux,"getAltAxis");function RF(e){var t=e.state,i=e.options,l=e.name,d=i.mainAxis,v=d===void 0?!0:d,p=i.altAxis,y=p===void 0?!1:p,_=i.boundary,O=i.rootBoundary,D=i.altBoundary,Y=i.padding,B=i.tether,X=B===void 0?!0:B,te=i.tetherOffset,Q=te===void 0?0:te,R=ss(t,{boundary:_,rootBoundary:O,padding:Y,altBoundary:D}),P=Tn(t.placement),F=Xs(t.placement),K=!F,V=df(P),ue=Ux(V),ie=t.modifiersData.popperOffsets,de=t.rects.reference,ge=t.rects.popper,we=typeof Q=="function"?Q(Object.assign({},t.rects,{placement:t.placement})):Q,qe={x:0,y:0};if(!!ie){if(v||y){var Je=V==="y"?qr:sn,Ee=V==="y"?En:on,xt=V==="y"?"height":"width",Be=ie[V],Ve=ie[V]+R[Je],Ke=ie[V]-R[Ee],Ge=X?-ge[xt]/2:0,Zt=F===Fl?de[xt]:ge[xt],ut=F===Fl?-ge[xt]:-de[xt],Fr=t.elements.arrow,Kt=X&&Fr?pf(Fr):{width:0,height:0},bt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Oh(),St=bt[Je],st=bt[Ee],br=hf(0,de[xt],Kt[xt]),zt=K?de[xt]/2-Ge-br-St-we:Zt-br-St-we,$t=K?-de[xt]/2+Ge+br+st+we:ut+br+st+we,ne=t.elements.arrow&&os(t.elements.arrow),et=ne?V==="y"?ne.clientTop||0:ne.clientLeft||0:0,Tr=t.modifiersData.offset?t.modifiersData.offset[t.placement][V]:0,jt=ie[V]+zt-Tr-et,qt=ie[V]+$t-Tr;if(v){var xe=hf(X?iu(Ve,jt):Ve,Be,X?Po(Ke,qt):Ke);ie[V]=xe,qe[V]=xe-Be}if(y){var kr=V==="x"?qr:sn,an=V==="x"?En:on,In=ie[ue],ii=In+R[kr],un=In-R[an],Gt=hf(X?iu(ii,jt):ii,In,X?Po(un,qt):un);ie[ue]=Gt,qe[ue]=Gt-In}}t.modifiersData[l]=qe}}o(RF,"preventOverflow");var JT={name:"preventOverflow",enabled:!0,phase:"main",fn:RF,requiresIfExists:["offset"]};function zx(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}o(zx,"getHTMLElementScroll");function $x(e){return e===Rr(e)||!Vr(e)?mf(e):zx(e)}o($x,"getNodeScroll");function FF(e){var t=e.getBoundingClientRect(),i=t.width/e.offsetWidth||1,l=t.height/e.offsetHeight||1;return i!==1||l!==1}o(FF,"isElementScaled");function jx(e,t,i){i===void 0&&(i=!1);var l=Vr(t),d=Vr(t)&&FF(t),v=Rn(t),p=No(e,d),y={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(l||!l&&!i)&&((bn(t)!=="body"||gf(v))&&(y=$x(t)),Vr(t)?(_=No(t,!0),_.x+=t.clientLeft,_.y+=t.clientTop):v&&(_.x=vf(v))),{x:p.left+y.scrollLeft-_.x,y:p.top+y.scrollTop-_.y,width:p.width,height:p.height}}o(jx,"getCompositeRect");function IF(e){var t=new Map,i=new Set,l=[];e.forEach(function(v){t.set(v.name,v)});function d(v){i.add(v.name);var p=[].concat(v.requires||[],v.requiresIfExists||[]);p.forEach(function(y){if(!i.has(y)){var _=t.get(y);_&&d(_)}}),l.push(v)}return o(d,"sort"),e.forEach(function(v){i.has(v.name)||d(v)}),l}o(IF,"order");function qx(e){var t=IF(e);return WT.reduce(function(i,l){return i.concat(t.filter(function(d){return d.phase===l}))},[])}o(qx,"orderModifiers");function Vx(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}o(Vx,"debounce");function Kx(e){var t=e.reduce(function(i,l){var d=i[l.name];return i[l.name]=d?Object.assign({},d,l,{options:Object.assign({},d.options,l.options),data:Object.assign({},d.data,l.data)}):l,i},{});return Object.keys(t).map(function(i){return t[i]})}o(Kx,"mergeByName");var ek={placement:"bottom",modifiers:[],strategy:"absolute"};function tk(){for(var e=arguments.length,t=new Array(e),i=0;iEr.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function Vt(l){var d=l,{onClick:e,children:t}=d,i=Us(d,["onClick","children"]);return Er.default.createElement("li",null,Er.default.createElement("a",Oe({href:"#",onClick:o(p=>{p.preventDefault(),e()},"click")},i),t))}o(Vt,"MenuItem");function Mh({title:e,children:t,className:i}){let[l,d]=(0,Er.useState)(!1),[v,p]=(0,Er.useState)(null),[y,_]=(0,Er.useState)(null),{styles:O,attributes:D}=ay(v,y,{placement:"right-start"}),Y=null;return l&&(Y=Er.default.createElement("ul",Oe({className:(0,Yx.default)("dropdown-menu show",i),ref:_,style:O.popper},D.popper),t)),Er.default.createElement("li",{ref:p,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)},Er.default.createElement("a",null,Er.default.createElement("i",{className:"fa fa-caret-right pull-right","aria-hidden":"true"})," ",e),Y)}o(Mh,"SubMenu");var Wl=Er.default.memo(o(function(y){var _=y,{text:t,children:i,options:l,className:d,onOpen:v}=_,p=Us(_,["text","children","options","className","onOpen"]);let[O,D]=(0,Er.useState)(null),[Y,B]=(0,Er.useState)(!1),[X,te]=(0,Er.useState)(null),{styles:Q,attributes:R}=ay(O,X,Oe({},l)),P=o(K=>{B(K),v&&v(K)},"setOpen");(0,Er.useEffect)(()=>{!X||document.addEventListener("click",K=>{X.contains(K.target)?document.addEventListener("click",()=>P(!1),{once:!0}):(K.preventDefault(),K.stopPropagation(),P(!1))},{once:!0,capture:!0})},[X]);let F;return Y?F=Er.default.createElement("ul",Oe({className:"dropdown-menu show",ref:te,style:Q.popper},R.popper),i):F=null,Er.default.createElement(Er.default.Fragment,null,Er.default.createElement("a",Oe({href:"#",ref:D,className:(0,Yx.default)(d,{open:Y}),onClick:K=>{K.preventDefault(),P(!0)}},p),t),F)},"Dropdown"));var Mo=o((e,t)=>Ma(void 0,null,function*(){let i=yield Ch("export",t,`@${e.id}`);yield navigator.clipboard.writeText(i)}),"copy");var fy=o(({flow:e})=>rt.default.createElement("td",{className:(0,uy.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");fy.headerName="";fy.sortKey=e=>e.type==="http"&&e.request.scheme;var cy=o(({flow:e})=>rt.default.createElement("td",{className:"col-icon"},rt.default.createElement("div",{className:(0,uy.default)("resource-icon",jF(e))})),"icon");cy.headerName="";cy.sortKey=e=>0;var jF=o(e=>{if(e.type!=="http"||!e.response)return"resource-icon-plain";if(e.websocket)return"resource-icon-websocket";var t=is.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),py=o(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=rt.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=rt.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),rt.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&rt.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&rt.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,rt.default.createElement("span",{className:"marker pull-right"},e.marked),e.type==="http"?Ji.pretty_url(e.request):null)},"path");py.headerName="Path";py.sortKey=e=>e.type==="http"&&Ji.pretty_url(e.request);var dy=o(({flow:e})=>rt.default.createElement("td",{className:"col-method"},e.type==="http"?e.request.method:e.type.toLowerCase()),"method");dy.headerName="Method";dy.sortKey=e=>e.type==="http"&&e.request.method;var hy=o(({flow:e})=>{let t="darkred";return e.type!=="http"||!e.response?rt.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="lightred"),rt.default.createElement("td",{className:"col-status",style:{color:t}},e.response.status_code))},"status");hy.headerName="Status";hy.sortKey=e=>e.type==="http"&&e.response&&e.response.status_code;var my=o(({flow:e})=>rt.default.createElement("td",{className:"col-size"},jg(Ox(e))),"size");my.headerName="Size";my.sortKey=e=>Ox(e);var vy=o(({flow:e})=>{let t=bh(e),i=kx(e);return rt.default.createElement("td",{className:"col-time"},t&&i?qg(1e3*(i-t)):"...")},"time");vy.headerName="Time";vy.sortKey=e=>{let t=bh(e),i=kx(e);return t&&i&&i-t};var gy=o(({flow:e})=>{let t=bh(e);return rt.default.createElement("td",{className:"col-start"},t?Lo(t):"...")},"timestamp");gy.headerName="Start time";gy.sortKey=e=>bh(e);var qF={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"},sp=o(({flow:e})=>{let t=Ys(),[i,l]=(0,rt.useState)(!1),d=null;if(e.intercepted?d=rt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(lp(e))},rt.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):d=rt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(ap(e))},rt.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"})),e.type!=="http")return rt.default.createElement("td",{className:"col-quickactions"});let v=o(y=>t(FT(y)),"filt"),p=e.response&&is.getContentType(e.response);return rt.default.createElement("td",{className:(0,uy.default)("col-quickactions",{hover:i}),onClick:()=>0},rt.default.createElement("div",null,d,rt.default.createElement(Wl,{text:rt.default.createElement("i",{className:"fa fa-fw fa-ellipsis-h text-muted"}),className:"quickaction",onOpen:l,options:{placement:"bottom-end"}},rt.default.createElement(Mh,{title:"Copy..."},rt.default.createElement(Vt,{onClick:()=>Mo(e,"raw_request")},"Copy raw request"),rt.default.createElement(Vt,{onClick:()=>Mo(e,"raw_response")},"Copy raw response"),rt.default.createElement(Vt,{onClick:()=>Mo(e,"raw")},"Copy raw request and response"),rt.default.createElement(Vt,{onClick:()=>Mo(e,"curl")},"Copy as cURL"),rt.default.createElement(Vt,{onClick:()=>Mo(e,"httpie")},"Copy as HTTPie")),rt.default.createElement(Mh,{title:"Mark...",className:"markers-menu"},rt.default.createElement(Vt,{onClick:()=>t(Fi(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(qF).map(([y,_])=>rt.default.createElement(Vt,{key:y,onClick:()=>t(Fi(e,{marked:y}))},_," ",y.replace(/[:_]/g," ")))),rt.default.createElement(Mh,{title:"Intercept requests like this"},rt.default.createElement(Vt,{onClick:()=>v(`~q ${e.request.host}`)},"Requests to ",e.request.host),e.request.path!=="/"&&rt.default.createElement(Vt,{onClick:()=>v(`~q ${e.request.host}${e.request.path}`)},"Requests to ",e.request.host+e.request.path),e.request.method!=="GET"&&rt.default.createElement(Vt,{onClick:()=>v(`~q ~m ${e.request.method} ${e.request.host}`)},e.request.method," requests to ",e.request.host)),rt.default.createElement(Mh,{title:"Intercept responses like this"},rt.default.createElement(Vt,{onClick:()=>v(`~s ${e.request.host}`)},"Responses from ",e.request.host),e.request.path!=="/"&&rt.default.createElement(Vt,{onClick:()=>v(`~s ${e.request.host}${e.request.path}`)},"Responses from ",e.request.host+e.request.path),!!p&&rt.default.createElement(Vt,{onClick:()=>v(`~ts ${p}`)},"Responses with a ",p," content type.")))))},"quickactions");sp.headerName="";sp.sortKey=e=>0;var Xx={icon:cy,method:dy,path:py,quickactions:sp,size:my,status:hy,time:vy,timestamp:gy,tls:fy};var VF="FLOWS_ADD",KF="FLOWS_UPDATE",lk="FLOWS_REMOVE",GF="FLOWS_RECEIVE",ak="FLOWS_SELECT",uk="FLOWS_SET_FILTER",fk="FLOWS_SET_SORT",ck="FLOWS_SET_HIGHLIGHT",YF="FLOWS_REQUEST_ACTION",XF=Oe({highlight:void 0,filter:void 0,sort:{column:void 0,desc:!1},selected:[]},Kg);function Qx(e=XF,t){switch(t.type){case VF:case KF:case lk:case GF:let i=Eh[t.cmd](t.data,pk(e.filter),Zx(e.sort)),l=e.selected;if(t.type===lk&&e.selected.includes(t.data)){if(e.selected.length>1)l=l.filter(d=>d!==t.data);else if(l=[],t.data in e.viewIndex&&e.view.length>1){let d=e.viewIndex[t.data],v;d===e.view.length-1?v=e.view[d-1]:v=e.view[d+1],l.push(v.id)}}return Oe(Ht(Oe({},e),{selected:l}),rp(e,i));case uk:return Oe(Ht(Oe({},e),{filter:t.filter}),rp(e,_x(pk(t.filter),Zx(e.sort))));case ck:return Ht(Oe({},e),{highlight:t.highlight});case fk:return Oe(Ht(Oe({},e),{sort:t.sort}),rp(e,CT(Zx(t.sort))));case ak:return Ht(Oe({},e),{selected:t.flowIds});default:return e}}o(Qx,"reduce");function pk(e){if(!!e)return ff.parse(e)}o(pk,"makeFilter");function Zx({column:e,desc:t}){if(!e)return(l,d)=>0;let i=Xx[e].sortKey;return(l,d)=>{let v=i(l),p=i(d);return v>p?t?-1:1:vkt(`/flows/${e.id}/resume`,{method:"POST"})}o(lp,"resume");function xy(){return e=>kt("/flows/resume",{method:"POST"})}o(xy,"resumeAll");function Sy(e){return t=>kt(`/flows/${e.id}/kill`,{method:"POST"})}o(Sy,"kill");function hk(){return e=>kt("/flows/kill",{method:"POST"})}o(hk,"killAll");function Cy(e){return t=>kt(`/flows/${e.id}`,{method:"DELETE"})}o(Cy,"remove");function _y(e){return t=>kt(`/flows/${e.id}/duplicate`,{method:"POST"})}o(_y,"duplicate");function ap(e){return t=>kt(`/flows/${e.id}/replay`,{method:"POST"})}o(ap,"replay");function Ey(e){return t=>kt(`/flows/${e.id}/revert`,{method:"POST"})}o(Ey,"revert");function Fi(e,t){return i=>kt.put(`/flows/${e.id}`,t)}o(Fi,"update");function mk(e,t,i){let l=new FormData;return t=new window.Blob([t],{type:"plain/text"}),l.append("file",t),d=>kt(`/flows/${e.id}/${i}/content.data`,{method:"POST",body:l})}o(mk,"uploadContent");function by(){return e=>kt("/clear",{method:"POST"})}o(by,"clear");function vk(){return window.location.href="/flows/dump",{type:YF}}o(vk,"download");function gk(e){let t=new FormData;return t.append("file",e),i=>kt("/flows/dump",{method:"POST",body:t})}o(gk,"upload");function wf(e){return{type:ak,flowIds:e?[e]:[]}}o(wf,"select");var zh=pe(Re());var Ut=pe(Re());var fp=pe(Re());var Dh=pe(Re()),yk=pe(Jn());var wk=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),up=!1,Qs=class extends Dh.Component{constructor(){super(...arguments);this.input=Dh.default.createRef();this.isEditing=o(()=>{var t;return((t=this.input.current)==null?void 0:t.contentEditable)===wk},"isEditing");this.startEditing=o(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=wk,window.requestAnimationFrame(()=>{var l,d;if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let t=document.createRange();t.selectNodeContents(this.input.current);let i=window.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(t),(d=(l=this.props).onEditStart)==null||d.call(l)}))},"startEditing");this.resetValue=o(()=>{var t,i;if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,(i=(t=this.props).onInput)==null||i.call(t,this.props.content)},"resetValue");this.finishEditing=o(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=o(t=>{t.preventDefault();let i=t.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,i)},"onPaste");this.suppress_events=!1;this.onMouseDown=o(t=>{up&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=o(t=>{var d;let i=t.target===this.input.current,l=!((d=window.getSelection())==null?void 0:d.toString());up&&console.warn("mouseUp",this.suppress_events,i,l),i&&l&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=o(t=>{up&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=o(t=>{if(up&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=o(t=>{var i,l,d;(d=(l=this.props).onInput)==null||d.call(l,((i=this.input.current)==null?void 0:i.textContent)||"")},"onInput");this.onBlur=o(t=>{up&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=o(t=>{var i,l;switch(up&&console.debug("keydown",t),t.stopPropagation(),t.keyCode){case yt.ESC:t.preventDefault(),this.resetValue(),this.finishEditing();break;case yt.ENTER:t.shiftKey||(t.preventDefault(),this.finishEditing());break;default:break}(l=(i=this.props).onKeyDown)==null||l.call(i,t)},"onKeyDown")}render(){let t=(0,yk.default)("inline-input",this.props.className);return Dh.default.createElement("span",{ref:this.input,tabIndex:0,className:t,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(t){var i,l;t.content!==this.props.content&&((l=(i=this.props).onInput)==null||l.call(i,this.props.content))}};o(Qs,"ValueEditor");var xk=pe(Jn());function xf(e){let[t,i]=(0,fp.useState)(e.isValid(e.content)),l=(0,fp.useRef)(null),d=o(p=>{var y;e.isValid(p)?e.onEditDone(p):(y=l.current)==null||y.resetValue()},"onEditDone"),v=(0,xk.default)(e.className,t?"has-success":"has-warning");return fp.default.createElement(Qs,Ht(Oe({},e),{className:v,onInput:p=>i(e.isValid(p)),onEditDone:d,ref:l}))}o(xf,"ValidateEditor");function Jx(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}o(Jx,"_defineProperty");function Sk(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,l)}return i}o(Sk,"ownKeys");function Ty(e){for(var t=1;ti[l.level])));case Ek:case JF:return Oe(Oe({},e),rp(e,Eh[t.cmd](t.data,l=>e.filters[l.level])));default:return e}}o(nS,"reduce");function kk(e){return{type:Tk,filter:e}}o(kk,"toggleFilter");function cp(){return{type:bk}}o(cp,"toggleVisibility");function Ok(e,t="web"){let i={id:Math.random().toString(),message:e,level:t};return{type:Ek,cmd:"add",data:i}}o(Ok,"add");var Lk=Oy({flow:xT,modal:Lx,optionsEditor:Nx});var ti;(function(v){v.INIT="CONNECTION_INIT",v.FETCHING="CONNECTION_FETCHING",v.ESTABLISHED="CONNECTION_ESTABLISHED",v.ERROR="CONNECTION_ERROR",v.OFFLINE="CONNECTION_OFFLINE"})(ti||(ti={}));var tI={state:ti.INIT,message:void 0},rI=o((e=tI,t)=>{switch(t.type){case ti.ESTABLISHED:case ti.FETCHING:case ti.ERROR:case ti.OFFLINE:return{state:t.type,message:t.message};default:return e}},"reducer"),Nk=rI;function Pk(){return{type:ti.FETCHING}}o(Pk,"startFetching");function Mk(){return{type:ti.ESTABLISHED}}o(Mk,"connectionEstablished");function Ak(e){return{type:ti.ERROR,message:e}}o(Ak,"connectionError");var Dk="COMMANDBAR_TOGGLE_VISIBILITY",nI={visible:!1},iI=o((e=nI,t)=>{switch(t.type){case Dk:return Ht(Oe({},e),{visible:!e.visible});default:return e}},"reducer"),Rk=iI;function Ly(){return{type:Dk}}o(Ly,"toggleVisibility");function Fk(e){return function(t){var i=t.dispatch,l=t.getState;return function(d){return function(v){return typeof v=="function"?v(i,l,e):d(v)}}}}o(Fk,"createThunkMiddleware");var Ik=Fk();Ik.withExtraArgument=Fk;var Hk=Ik;var oI=window.MITMWEB_CONF||{static:!1,version:"1.2.3",contentViews:["Auto","Raw"]},sI=o((e=oI,t)=>e,"reducer"),Wk=sI;var lI={},aI=o((e=lI,t)=>{switch(t.type){case Px:return t.data;case Mx:return Oe(Oe({},e),t.data);default:return e}},"reducer"),Bk=aI;var uI=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||rS,fI=Oy({commandBar:Rk,eventLog:nS,flows:Qx,connection:Nk,ui:Lk,options:DT,options_meta:Bk,conf:Wk}),cI=o(e=>tS(fI,e,uI(_k(Hk))),"createAppStore"),pp=cI(void 0),Xt=o(()=>Ys(),"useAppDispatch"),at=px;var eo=pe(Re());var Uk=pe(xh()),zk=pe(Jn()),iS=class extends eo.Component{constructor(){super(...arguments);this.container=eo.default.createRef();this.nameInput=eo.default.createRef();this.valueInput=eo.default.createRef();this.render=o(()=>{let[t,i]=this.props.item;return eo.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},eo.default.createElement(Qs,{ref:this.nameInput,className:"kv-key",content:t,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,i])}),":\xA0",eo.default.createElement(Qs,{ref:this.valueInput,className:"kv-value",content:i,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([t,l]),placeholder:"empty"}))},"render");this.onClick=o(t=>{t.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=o(t=>{var i;t.target===((i=this.valueInput.current)==null?void 0:i.input.current)&&t.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}};o(iS,"Row");var dp=class extends eo.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=o(()=>{this.rowRefs={};let t=this.state.currentList.map((i,l)=>eo.default.createElement(iS,{key:l,item:i,onEditStart:()=>this.currentlyEditing=l,onEditDone:d=>this.onEditDone(l,d),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:d=>this.rowRefs[l]=d}));return eo.default.createElement("div",{className:(0,zk.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},t,eo.default.createElement("div",{onClick:i=>{i.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=o((t,i)=>{let l=[...this.state.currentList];i[0]?l[t]=i:l.splice(t,1),this.currentlyEditing=void 0,(0,Uk.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=o(t=>{if(this.justFinishedEditing)return;let i=[...this.state.currentList];i.splice(t+1,0,["",""]),this.setState({currentList:i},()=>{var l,d;return(d=(l=this.rowRefs[t+1])==null?void 0:l.nameInput.current)==null?void 0:d.startEditing()})},"onClickEmptyArea");this.onTabNext=o(t=>{t==this.state.currentList.length-1&&this.onClickEmptyArea(t)},"onTabNext");this.onMouseDown=o(t=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static getDerivedStateFromProps(t,i){return t.data!==i.initialList?{currentList:t.data||[],initialList:t.data}:null}};o(dp,"KeyValueListEditor");var Qt=pe(Re());var Rh=pe(Re());var Ny=80;function Py(e,t){let[i,l]=(0,Rh.useState)(),[d,v]=(0,Rh.useState)();return(0,Rh.useEffect)(()=>{d&&d.abort();let p=new AbortController;return kt(e,{signal:p.signal}).then(y=>{if(!y.ok)throw`${y.status} ${y.statusText}`.trim();return y.text()}).then(y=>{l(y)}).catch(y=>{p.signal.aborted||l(`Error getting content: ${y}.`)}),v(p),()=>{p.signal.aborted||p.abort()}},[e,t]),i}o(Py,"useContent");var Fh=pe(Re()),My=Fh.default.memo(o(function({icon:t,text:i,className:l,title:d,onOpenFile:v,onClick:p}){let y;return Fh.default.createElement("a",{href:"#",onClick:_=>{y.click(),p&&p(_)},className:l,title:d},Fh.default.createElement("i",{className:"fa fa-fw "+t}),i,Fh.default.createElement("input",{ref:_=>y=_,className:"hidden",type:"file",onChange:_=>{_.preventDefault(),_.target.files&&_.target.files.length>0&&v(_.target.files[0]),y.value=""}}))},"FileChooser"));var hp=pe(Re()),$k=pe(Jn());function Kr({onClick:e,children:t,icon:i,disabled:l,className:d,title:v}){return hp.createElement("button",{className:(0,$k.default)(d,"btn btn-default"),onClick:l?void 0:e,disabled:l,title:v},i&&hp.createElement(hp.Fragment,null,hp.createElement("i",{className:"fa "+i}),"\xA0"),t)}o(Kr,"Button");var Hh=pe(Re()),Yk=pe(Re());var Ih=pe(Re()),qk=pe(Jn()),Vk=pe(jk()),Kk=pe(xh());function Gk(e){return e&&e.replace(/\r\n|\r/g,` -`)}o(Gk,"normalizeLineEndings");var mp=class extends Ih.Component{constructor(t){super(t);this.state={isFocused:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||Vk.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&Gk(this.codeMirror.getValue())!==Gk(t.value))if(this.props.preserveScrollPosition){var i=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(i.left,i.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let l in t.options)t.options.hasOwnProperty(l)&&this.setOptionIfChanged(l,t.options[l])}setOptionIfChanged(t,i){let l=this.codeMirror.getOption(t);Kk.default.isEqual(l,i)||this.codeMirror.setOption(t,i)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,i){this.props.onChange&&i.origin!=="setValue"&&this.props.onChange(t.getValue(),i)}render(){let t=(0,qk.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return Ih.createElement("div",{className:t},Ih.createElement("textarea",{ref:i=>this.textareaNode=i,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};o(mp,"CodeMirror"),mp.defaultProps={preserveScrollPosition:!1};var Wh=class extends Yk.Component{constructor(){super(...arguments);this.editor=Hh.createRef();this.getContent=o(()=>{var t;return(t=this.editor.current)==null?void 0:t.codeMirror.getValue()},"getContent");this.render=o(()=>{let t={lineNumbers:!0};return Hh.createElement("div",{className:"codeeditor",onKeyDown:i=>i.stopPropagation()},Hh.createElement(mp,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:t}))},"render")}};o(Wh,"CodeEditor");var Sf=pe(Re()),pI=Sf.default.memo(o(function({lines:t,maxLines:i,showMore:l}){return t.length===0?null:Sf.default.createElement("pre",null,t.map((d,v)=>v===i?Sf.default.createElement("button",{key:"showmore",onClick:l,className:"btn btn-xs btn-info"},Sf.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," Show more"):Sf.default.createElement("div",{key:v},d.map(([p,y],_)=>Sf.default.createElement("span",{key:_,className:p},y)))))},"LineRenderer")),Ay=pI;var Cf=pe(Re());function Bh({value:e,onChange:t}){let i=at(d=>d.conf.contentViews||[]),l=Cf.default.createElement("span",null,Cf.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",Cf.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",Cf.default.createElement("span",{className:"caret"}));return Cf.default.createElement(Wl,{text:l,className:"btn btn-default btn-xs",options:{placement:"top-start"}},i.map(d=>Cf.default.createElement(Vt,{key:d,onClick:()=>t(d)},d.toLowerCase().replace("_"," "))))}o(Bh,"ViewSelector");function lS({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response",d=at(te=>te.ui.flow.contentViewFor[e.id+l]||"Auto"),v=(0,Qt.useRef)(null),[p,y]=(0,Qt.useState)(Ny),_=(0,Qt.useCallback)(()=>y(Math.max(1024,p*2)),[p]),[O,D]=(0,Qt.useState)(!1),Y;O?Y=jr.getContentURL(e,t):Y=jr.getContentURL(e,t,d,p+1);let B=Py(Y,t.contentHash),X=(0,Qt.useMemo)(()=>{if(B&&!O)try{return JSON.parse(B)}catch(te){return{description:"Network Error",lines:[[["error",`${B}`]]]}}else return},[B]);if(O)return Qt.default.createElement("div",{className:"contentview",key:"edit"},Qt.default.createElement("div",{className:"controls"},Qt.default.createElement("h5",null,"[Editing]"),Qt.default.createElement(Kr,{onClick:o(()=>Ma(this,null,function*(){var R;let Q=(R=v.current)==null?void 0:R.getContent();yield i(Fi(e,{[l]:{content:Q}})),D(!1)}),"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",Qt.default.createElement(Kr,{onClick:()=>D(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),Qt.default.createElement(Wh,{ref:v,initialContent:B||""}));{let te=X?X.description:"Loading...";return Qt.default.createElement("div",{className:"contentview",key:"view"},Qt.default.createElement("div",{className:"controls"},Qt.default.createElement("h5",null,te),Qt.default.createElement(Kr,{onClick:()=>D(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",Qt.default.createElement(My,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Q=>i(mk(e,Q,l)),className:"btn btn-default btn-xs"}),"\xA0",Qt.default.createElement(Bh,{value:d,onChange:Q=>i(Vg(e.id+l,Q))})),aS.matches(t)&&Qt.default.createElement(aS,{flow:e,message:t}),Qt.default.createElement(Ay,{lines:(X==null?void 0:X.lines)||[],maxLines:p,showMore:_}))}}o(lS,"HttpMessage");var dI=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon)$/i;aS.matches=e=>dI.test(jr.getContentType(e)||"");function aS({flow:e,message:t}){return Qt.default.createElement("div",{className:"flowview-image"},Qt.default.createElement("img",{src:jr.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}o(aS,"ViewImage");function hI({flow:e}){let t=Xt();return Ut.createElement("div",{className:"first-line request-line"},Ut.createElement("div",null,Ut.createElement(xf,{content:e.request.method,onEditDone:i=>t(Fi(e,{request:{method:i}})),isValid:i=>i.length>0}),"\xA0",Ut.createElement(xf,{content:Ji.pretty_url(e.request),onEditDone:i=>t(Fi(e,{request:Oe({path:""},bx(i))})),isValid:i=>{var l;return!!((l=bx(i))==null?void 0:l.host)}}),"\xA0",Ut.createElement(xf,{content:e.request.http_version,onEditDone:i=>t(Fi(e,{request:{http_version:i}})),isValid:Tx})))}o(hI,"RequestLine");function mI({flow:e}){let t=Xt();return Ut.createElement("div",{className:"first-line response-line"},Ut.createElement(xf,{content:e.response.http_version,onEditDone:i=>t(Fi(e,{response:{http_version:i}})),isValid:Tx}),"\xA0",Ut.createElement(xf,{content:e.response.status_code+"",onEditDone:i=>t(Fi(e,{response:{code:parseInt(i)}})),isValid:i=>/^\d+$/.test(i)}),e.response.http_version!=="HTTP/2.0"&&Ut.createElement(Ut.Fragment,null,"\xA0",Ut.createElement(Qs,{content:e.response.reason,onEditDone:i=>t(Fi(e,{response:{msg:i}}))})))}o(mI,"ResponseLine");function vI({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response";return Ut.createElement(dp,{className:"headers",data:t.headers,onChange:d=>i(Fi(e,{[l]:{headers:d}}))})}o(vI,"Headers");function gI({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response";return!jr.get_first_header(t,/^trailer$/i)?null:Ut.createElement(Ut.Fragment,null,Ut.createElement("hr",null),Ut.createElement("h5",null,"HTTP Trailers"),Ut.createElement(dp,{className:"trailers",data:t.trailers,onChange:v=>i(Fi(e,{[l]:{trailers:v}}))}))}o(gI,"Trailers");var Xk=Ut.memo(o(function({flow:t,message:i}){let l=t.request===i?"request":"response",d=t.request===i?hI:mI;return Ut.createElement("section",{className:l},Ut.createElement(d,{flow:t}),Ut.createElement(vI,{flow:t,message:i}),Ut.createElement("hr",null),Ut.createElement(lS,{key:t.id+l,flow:t,message:i}),Ut.createElement(gI,{flow:t,message:i}))},"Message"));function uS(){let e=at(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(Xk,{flow:e,message:e.request})}o(uS,"Request");uS.displayName="Request";function fS(){let e=at(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(Xk,{flow:e,message:e.response})}o(fS,"Response");fS.displayName="Response";var _e=pe(Re());function Qk({conn:e}){var i,l,d;let t=null;return"address"in e?t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(i=e.address)==null?void 0:i.join(":"))),e.peername&&_e.createElement("tr",null,_e.createElement("td",null,"Resolved address:"),_e.createElement("td",null,e.peername.join(":"))),e.sockname&&_e.createElement("tr",null,_e.createElement("td",null,"Source address:"),_e.createElement("td",null,e.sockname.join(":")))):((l=e.peername)==null?void 0:l[0])&&(t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(d=e.peername)==null?void 0:d.join(":"))))),_e.createElement("table",{className:"connection-table"},_e.createElement("tbody",null,t,e.sni?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),_e.createElement("td",null,e.sni)):null,e.alpn?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),_e.createElement("td",null,e.alpn)):null,e.tls_version?_e.createElement("tr",null,_e.createElement("td",null,"TLS Version:"),_e.createElement("td",null,e.tls_version)):null,e.cipher?_e.createElement("tr",null,_e.createElement("td",null,"TLS Cipher:"),_e.createElement("td",null,e.cipher)):null))}o(Qk,"ConnectionInfo");function Zk(e){return _e.createElement("dl",{className:"cert-attributes"},e.map(([t,i])=>_e.createElement(_e.Fragment,{key:t},_e.createElement("dt",null,t),_e.createElement("dd",null,i))))}o(Zk,"attrList");function yI({flow:e}){var i;let t=(i=e.server_conn)==null?void 0:i.cert;return t?_e.createElement(_e.Fragment,null,_e.createElement("h4",{key:"name"},"Server Certificate"),_e.createElement("table",{className:"certificate-table"},_e.createElement("tbody",null,_e.createElement("tr",null,_e.createElement("td",null,"Type"),_e.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),_e.createElement("tr",null,_e.createElement("td",null,"SHA256 digest"),_e.createElement("td",null,t.sha256)),_e.createElement("tr",null,_e.createElement("td",null,"Valid from"),_e.createElement("td",null,Lo(t.notbefore,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Valid to"),_e.createElement("td",null,Lo(t.notafter,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Subject Alternative Names"),_e.createElement("td",null,t.altnames.join(", "))),_e.createElement("tr",null,_e.createElement("td",null,"Subject"),_e.createElement("td",null,Zk(t.subject))),_e.createElement("tr",null,_e.createElement("td",null,"Issuer"),_e.createElement("td",null,Zk(t.issuer))),_e.createElement("tr",null,_e.createElement("td",null,"Serial"),_e.createElement("td",null,t.serial))))):_e.createElement(_e.Fragment,null)}o(yI,"CertificateInfo");function Dy({flow:e}){var t;return _e.createElement("section",{className:"detail"},_e.createElement("h4",null,"Client Connection"),_e.createElement(Qk,{conn:e.client_conn}),((t=e.server_conn)==null?void 0:t.address)&&_e.createElement(_e.Fragment,null,_e.createElement("h4",null,"Server Connection"),_e.createElement(Qk,{conn:e.server_conn})),_e.createElement(yI,{flow:e}))}o(Dy,"Connection");Dy.displayName="Connection";var Uh=pe(Re());function Ry({flow:e}){return Uh.createElement("section",{className:"error"},Uh.createElement("div",{className:"alert alert-warning"},e.error.msg,Uh.createElement("div",null,Uh.createElement("small",null,Lo(e.error.timestamp)))))}o(Ry,"Error");Ry.displayName="Error";var ls=pe(Re());function wI({t:e,deltaTo:t,title:i}){return e?ls.createElement("tr",null,ls.createElement("td",null,i,":"),ls.createElement("td",null,Lo(e),t&&ls.createElement("span",{className:"text-muted"},"(",qg(1e3*(e-t)),")"))):ls.createElement("tr",null)}o(wI,"TimeStamp");function Fy({flow:e}){var l,d,v,p,y;let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let i=[{title:"Server conn. initiated",t:(l=e.server_conn)==null?void 0:l.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:(d=e.server_conn)==null?void 0:d.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:(v=e.server_conn)==null?void 0:v.timestamp_tls_setup,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t}];return e.type==="http"&&i.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:(p=e.response)==null?void 0:p.timestamp_start,deltaTo:t},{title:"Response complete",t:(y=e.response)==null?void 0:y.timestamp_end,deltaTo:t}),ls.createElement("section",{className:"timing"},ls.createElement("h4",null,"Timing"),ls.createElement("table",{className:"timing-table"},ls.createElement("tbody",null,i.filter(_=>!!_.t).sort((_,O)=>_.t-O.t).map(_=>ls.createElement(wI,Oe({key:_.title},_))))))}o(Fy,"Timing");Fy.displayName="Timing";var ri=pe(Re()),vp=pe(Re());function Iy({flow:e}){let t=Xt(),i=at(_=>_.ui.flow.contentViewFor[e.id+"ws"]||"Auto"),[l,d]=(0,vp.useState)(Ny),v=(0,vp.useCallback)(()=>d(Math.max(1024,l*2)),[l]),p=Py(jr.getContentURL(e,"messages",i,l+1),e.id+e.websocket.messages_meta.count),y=(0,vp.useMemo)(()=>p&&JSON.parse(p),[p])||[];return ri.createElement("section",{className:"websocket"},ri.createElement("h4",null,"WebSocket"),ri.createElement("div",{className:"contentview"},ri.createElement("div",{className:"controls"},ri.createElement("h5",null,e.websocket.messages_meta.count," Messages"),ri.createElement(Bh,{value:i,onChange:_=>t(Vg(e.id+"ws",_))})),y.map((_,O)=>{let D=`fa fa-fw fa-arrow-${_.from_client?"right text-primary":"left text-danger"}`,Y=ri.createElement("div",{key:O},ri.createElement("small",null,ri.createElement("i",{className:D}),ri.createElement("span",{className:"pull-right"},_.timestamp&&Lo(_.timestamp))),ri.createElement(Ay,{lines:_.lines,maxLines:l,showMore:v}));return l-=_.lines.length,Y})),ri.createElement(xI,{websocket:e.websocket}))}o(Iy,"WebSocket");Iy.displayName="WebSocket";function xI({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return ri.createElement("div",null,ri.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," with code ",e.close_code," ",t,".",ri.createElement("small",{className:"pull-right"},Lo(e.timestamp_end)))}o(xI,"CloseSummary");var Jk=pe(Jn()),eO={request:uS,response:fS,error:Ry,connection:Dy,timing:Fy,websocket:Iy};function Hy(e){let t=["request","response","websocket","error"].filter(i=>e[i]);return t.push("connection"),t.push("timing"),t}o(Hy,"tabsForFlow");function cS(){let e=Xt(),t=at(v=>v.flows.byId[v.flows.selected[0]]),i=Hy(t),l=at(v=>v.ui.flow.tab);i.indexOf(l)<0&&(l==="response"&&t.error?l="error":l==="error"&&"response"in t?l="response":l=i[0]);let d=eO[l];return zh.createElement("div",{className:"flow-detail"},zh.createElement("nav",{className:"nav-tabs nav-tabs-sm"},i.map(v=>zh.createElement("a",{key:v,href:"#",className:(0,Jk.default)({active:l===v}),onClick:p=>{p.preventDefault(),e(uf(v))}},eO[v].displayName))),zh.createElement(d,{flow:t}))}o(cS,"FlowView");function tO(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.keyCode,i=e.shiftKey;return e.preventDefault(),(l,d)=>{let v=d().flows,p=v.byId[d().flows.selected[0]];switch(t){case yt.K:case yt.UP:l(yf(v,-1));break;case yt.J:case yt.DOWN:l(yf(v,1));break;case yt.SPACE:case yt.PAGE_DOWN:l(yf(v,10));break;case yt.PAGE_UP:l(yf(v,-10));break;case yt.END:l(yf(v,1e10));break;case yt.HOME:l(yf(v,-1e10));break;case yt.ESC:d().ui.modal.activeModal?l(Qg()):l(wf(null));break;case yt.LEFT:{if(!p)break;let y=Hy(p),_=d().ui.flow.tab,O=y[(y.indexOf(_)-1+y.length)%y.length];l(uf(O));break}case yt.TAB:case yt.RIGHT:{if(!p)break;let y=Hy(p),_=d().ui.flow.tab,O=y[(y.indexOf(_)+1)%y.length];l(uf(O));break}case yt.D:{if(!p)return;l(i?_y(p):Cy(p));break}case yt.A:{i?l(xy()):p&&p.intercepted&&l(lp(p));break}case yt.R:{!i&&p&&l(ap(p));break}case yt.V:{!i&&p&&p.modified&&l(Ey(p));break}case yt.X:{i?l(hk()):p&&p.intercepted&&l(Sy(p));break}case yt.Z:{i||l(by());break}default:return}}}o(tO,"onKeyDown");var Yh=pe(Re());var $h=pe(Re()),jh=pe(eu()),rO=pe(Jn()),gp=class extends $h.Component{constructor(t,i){super(t,i);this.state={applied:!1,startX:0,startY:0},this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onDragEnd=this.onDragEnd.bind(this)}onMouseDown(t){this.setState({startX:t.pageX,startY:t.pageY}),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("dragend",this.onDragEnd)}onDragEnd(){jh.default.findDOMNode(this).style.transform="",window.removeEventListener("dragend",this.onDragEnd),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}onMouseUp(t){this.onDragEnd();let i=jh.default.findDOMNode(this),l=i.previousElementSibling,d=l.offsetHeight+t.pageY-this.state.startY;this.props.axis==="x"&&(d=l.offsetWidth+t.pageX-this.state.startX),l.style.flex=`0 0 ${Math.max(0,d)}px`,i.nextElementSibling.style.flex="1 1 auto",this.setState({applied:!0}),this.onResize()}onMouseMove(t){let i=0,l=0;this.props.axis==="x"?i=t.pageX-this.state.startX:l=t.pageY-this.state.startY,jh.default.findDOMNode(this).style.transform=`translate(${i}px, ${l}px)`}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(t){if(!this.state.applied)return;let i=jh.default.findDOMNode(this);i.previousElementSibling.style.flex="",i.nextElementSibling.style.flex="",t||this.setState({applied:!1}),this.onResize()}componentWillUnmount(){this.reset(!0)}render(){return $h.default.createElement("div",{className:(0,rO.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},$h.default.createElement("div",{onMouseDown:this.onMouseDown,draggable:"true"}))}};o(gp,"Splitter"),gp.defaultProps={axis:"x"};var as=pe(Re()),Kh=pe(qh()),By=pe(eu());var gO=pe(pS());var az=pe(Re()),dS=pe(eu()),cO=Symbol("shouldStick"),pO=o(e=>e.scrollTop+e.clientHeight===e.scrollHeight,"isAtBottom"),Wy=o(e=>{var t;return Object.assign((o(t=class extends e{UNSAFE_componentWillUpdate(){let l=dS.default.findDOMNode(this);this[cO]=l.scrollTop&&pO(l),super.UNSAFE_componentWillUpdate&&super.UNSAFE_componentWillUpdate(),super.componentWillUpdate&&super.componentWillUpdate()}componentDidUpdate(){let l=dS.default.findDOMNode(this);this[cO]&&!pO(l)&&(l.scrollTop=l.scrollHeight),super.componentDidUpdate&&super.componentDidUpdate()}},"AutoScrollWrapper"),es(t,"displayName",e.name),t),e)},"default");function yp(e){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:i,viewportTop:l,viewportHeight:d,itemHeights:v}=e,p=l+d,y=0,_=0,O=0,D=0;if(v)for(let Y=0,B=0;Yy.flows.sort.desc),l=at(y=>y.flows.sort.column),d=at(y=>y.options.web_columns),v=i?"sort-desc":"sort-asc",p=d.map(y=>Ah[y]).filter(y=>y).concat(sp);return Vh.createElement("tr",null,p.map(y=>Vh.createElement("th",{className:(0,dO.default)(`col-${y.name}`,l===y.name&&v),key:y.name,onClick:()=>t(dk(y.name,y.name!==l?!1:!i))},y.headerName)))},"FlowTableHead"));var wp=pe(Re()),mO=pe(Jn());var vO=wp.default.memo(o(function({flow:t,selected:i,highlighted:l}){let d=Xt(),v=at(O=>O.options.web_columns),p=(0,mO.default)({selected:i,highlighted:l,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),y=(0,wp.useCallback)(O=>{let D=O.target;for(;D.parentNode;){if(D.classList.contains("col-quickactions"))return;D=D.parentNode}d(wf(t.id))},[t]),_=v.map(O=>Ah[O]).filter(O=>O).concat(sp);return wp.default.createElement("tr",{className:p,onClick:y},_.map(O=>wp.default.createElement(O,{key:O.name,flow:t})))},"FlowRow"));var Gh=class extends as.Component{constructor(t,i){super(t,i);this.state={vScroll:yp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}UNSAFE_componentWillMount(){window.addEventListener("resize",this.onViewportUpdate)}UNSAFE_componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){if(this.onViewportUpdate(),!this.shouldScrollIntoView)return;this.shouldScrollIntoView=!1;let{rowHeight:t,flows:i,selected:l}=this.props,d=By.default.findDOMNode(this),v=By.default.findDOMNode(this.refs.head),p=v?v.offsetHeight:0,y=i.indexOf(l)*t+p,_=y+t,O=d.scrollTop,D=d.offsetHeight;y-pO+D&&(d.scrollTop=_-D)}UNSAFE_componentWillReceiveProps(t){t.selected&&t.selected!==this.props.selected&&(this.shouldScrollIntoView=!0)}onViewportUpdate(){let t=By.default.findDOMNode(this),i=t.scrollTop||0,l=yp({viewportTop:i,viewportHeight:t.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});(this.state.viewportTop!==i||!(0,gO.default)(this.state.vScroll,l))&&this.setState({vScroll:l,viewportTop:i})}render(){let{vScroll:t,viewportTop:i}=this.state,{flows:l,selected:d,highlight:v}=this.props,p=v?ff.parse(v):()=>!1;return as.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate},as.createElement("table",null,as.createElement("thead",{ref:"head",style:{transform:`translateY(${i}px)`}},as.createElement(hO,null)),as.createElement("tbody",null,as.createElement("tr",{style:{height:t.paddingTop}}),l.slice(t.start,t.end).map(y=>as.createElement(vO,{key:y.id,flow:y,selected:y===d,highlighted:p(y)})),as.createElement("tr",{style:{height:t.paddingBottom}}))))}};o(Gh,"FlowTable"),es(Gh,"propTypes",{flows:Kh.default.array.isRequired,rowHeight:Kh.default.number,highlight:Kh.default.string,selected:Kh.default.object}),es(Gh,"defaultProps",{rowHeight:32});var _I=Wy(Gh),yO=Ri(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(_I);function hS(){let e=at(t=>!!t.flows.byId[t.flows.selected[0]]);return Yh.createElement("div",{className:"main-view"},Yh.createElement(yO,null),e&&Yh.createElement(gp,{key:"splitter"}),e&&Yh.createElement(cS,{key:"flowDetails"}))}o(hS,"MainView");var Do=pe(Re()),EO=pe(Jn());var ni=pe(Re());var us=pe(Re()),Uy=pe(eu()),wO=pe(Jn());var to=pe(Re());var ro=class extends to.Component{constructor(t,i){super(t,i);this.state={doc:ro.doc}}componentDidMount(){ro.xhr||(ro.xhr=kt("/filter-help").then(t=>t.json()),ro.xhr.catch(()=>{ro.xhr=null})),this.state.doc||ro.xhr.then(t=>{ro.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?to.default.createElement("table",{className:"table table-condensed"},to.default.createElement("tbody",null,t.commands.map(i=>to.default.createElement("tr",{key:i[1],onClick:l=>this.props.selectHandler(i[0].split(" ")[0]+" ")},to.default.createElement("td",null,i[0].replace(" ","\xA0")),to.default.createElement("td",null,i[1]))),to.default.createElement("tr",{key:"docs-link"},to.default.createElement("td",{colSpan:2},to.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank"},to.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):to.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};o(ro,"FilterDocs");var _f=class extends us.Component{constructor(t,i){super(t,i);this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}UNSAFE_componentWillReceiveProps(t){this.setState({value:t.value})}isValid(t){try{return t&&ff.parse(t),!0}catch(i){return!1}}getDesc(){if(!this.state.value)return us.default.createElement(ro,{selectHandler:this.selectFilter});try{return ff.parse(this.state.value).desc}catch(t){return""+t}}onChange(t){let i=t.target.value;this.setState({value:i}),this.isValid(i)&&this.props.onChange(i)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(t){(t.keyCode===yt.ESC||t.keyCode===yt.ENTER)&&(this.blur(),this.setState({mousefocus:!1})),t.stopPropagation()}selectFilter(t){this.setState({value:t}),Uy.default.findDOMNode(this.refs.input).focus()}blur(){Uy.default.findDOMNode(this.refs.input).blur()}select(){Uy.default.findDOMNode(this.refs.input).select()}render(){let{type:t,color:i,placeholder:l}=this.props,{value:d,focus:v,mousefocus:p}=this.state;return us.default.createElement("div",{className:(0,wO.default)("filter-input input-group",{"has-error":!this.isValid(d)})},us.default.createElement("span",{className:"input-group-addon"},us.default.createElement("i",{className:"fa fa-fw fa-"+t,style:{color:i}})),us.default.createElement("input",{type:"text",ref:"input",placeholder:l,className:"form-control",value:d,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(v||p)&&us.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},us.default.createElement("div",{className:"arrow"}),us.default.createElement("div",{className:"popover-content"},this.getDesc())))}};o(_f,"FilterInput");xp.title="Start";function xp(){return ni.createElement("div",{className:"main-menu"},ni.createElement("div",{className:"menu-group"},ni.createElement("div",{className:"menu-content"},ni.createElement(bI,null),ni.createElement(TI,null)),ni.createElement("div",{className:"menu-legend"},"Find")),ni.createElement("div",{className:"menu-group"},ni.createElement("div",{className:"menu-content"},ni.createElement(EI,null),ni.createElement(kI,null)),ni.createElement("div",{className:"menu-legend"},"Intercept")))}o(xp,"StartMenu");function EI(){let e=Xt(),t=at(i=>i.options.intercept);return ni.createElement(_f,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:i=>e(cf("intercept",i))})}o(EI,"InterceptInput");function bI(){let e=Xt(),t=at(i=>i.flows.filter);return ni.createElement(_f,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:i=>e(yy(i))})}o(bI,"FlowFilterInput");function TI(){let e=Xt(),t=at(i=>i.flows.highlight);return ni.createElement(_f,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:i=>e(wy(i))})}o(TI,"HighlightInput");function kI(){let e=Xt();return ni.createElement(Kr,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(xy())},"Resume All")}o(kI,"ResumeAll");var Gr=pe(Re());var Ef=pe(Re());function mS({value:e,onChange:t,children:i}){return Ef.createElement("div",{className:"menu-entry"},Ef.createElement("label",null,Ef.createElement("input",{type:"checkbox",checked:e,onChange:t}),i))}o(mS,"MenuToggle");function zy({name:e,children:t}){let i=Xt(),l=at(d=>d.options[e]);return Ef.createElement(mS,{value:!!l,onChange:()=>i(cf(e,!l))},t)}o(zy,"OptionsToggle");function xO(){let e=Ys(),t=at(i=>i.eventLog.visible);return Ef.createElement(mS,{value:t,onChange:()=>e(cp())},"Display Event Log")}o(xO,"EventlogToggle");function SO(){let e=Ys(),t=at(i=>i.commandBar.visible);return Ef.createElement(mS,{value:t,onChange:()=>e(Ly())},"Display Command Bar")}o(SO,"CommandBarToggle");var vS=pe(Re());function gS({children:e,resource:t}){let i=`https://docs.mitmproxy.org/stable/${t}`;return vS.createElement("a",{target:"_blank",href:i},e||vS.createElement("i",{className:"fa fa-question-circle"}))}o(gS,"DocsLink");var $y=pe(Re());function Ao({children:e}){return window.MITMWEB_CONF&&window.MITMWEB_CONF.static?null:$y.createElement($y.Fragment,null,e)}o(Ao,"HideInStatic");jy.title="Options";function jy(){let e=Xt(),t=o(()=>TT("OptionModal"),"openOptions");return Gr.createElement("div",null,Gr.createElement(Ao,null,Gr.createElement("div",{className:"menu-group"},Gr.createElement("div",{className:"menu-content"},Gr.createElement(Kr,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",Gr.createElement("sup",null,"alpha"))),Gr.createElement("div",{className:"menu-legend"},"Options Editor")),Gr.createElement("div",{className:"menu-group"},Gr.createElement("div",{className:"menu-content"},Gr.createElement(zy,{name:"anticache"},"Strip cache headers ",Gr.createElement(gS,{resource:"overview-features/#anticache"})),Gr.createElement(zy,{name:"showhost"},"Use host header for display"),Gr.createElement(zy,{name:"ssl_insecure"},"Don't verify server certificates")),Gr.createElement("div",{className:"menu-legend"},"Quick Options"))),Gr.createElement("div",{className:"menu-group"},Gr.createElement("div",{className:"menu-content"},Gr.createElement(xO,null),Gr.createElement(SO,null)),Gr.createElement("div",{className:"menu-legend"},"View Options")))}o(jy,"OptionMenu");var mi=pe(Re());var CO=mi.memo(o(function(){let t=Ys();return mi.createElement(Wl,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},mi.createElement("li",null,mi.createElement(My,{icon:"fa-folder-open",text:"\xA0Open...",onClick:i=>i.stopPropagation(),onOpenFile:i=>{t(gk(i)),document.body.click()}})),mi.createElement(Vt,{onClick:()=>t(vk())},mi.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save..."),mi.createElement(Vt,{onClick:()=>confirm("Delete all flows?")&&t(by())},mi.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),mi.createElement(Ao,null,mi.createElement(sk,null),mi.createElement("li",null,mi.createElement("a",{href:"http://mitm.it/",target:"_blank"},mi.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var wt=pe(Re());Sp.title="Flow";function Sp(){let e=Xt(),t=at(i=>i.flows.byId[i.flows.selected[0]]);return t?wt.createElement("div",{className:"flow-menu"},wt.createElement(Ao,null,wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(Kr,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(ap(t)),disabled:!(t.type==="http"&&!t.websocket)},"Replay"),wt.createElement(Kr,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(_y(t))},"Duplicate"),wt.createElement(Kr,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(Ey(t))},"Revert"),wt.createElement(Kr,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(Cy(t))},"Delete")),wt.createElement("div",{className:"menu-legend"},"Flow Modification"))),wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(OI,{flow:t}),wt.createElement(Wl,{className:"",text:wt.createElement(Kr,{title:"Export flow.",icon:"fa-clone",onClick:()=>1},"Export\u25BE"),options:{placement:"bottom-start"}},wt.createElement(Vt,{onClick:()=>Mo(t,"raw_request")},"Copy raw request"),wt.createElement(Vt,{onClick:()=>Mo(t,"raw_response")},"Copy raw response"),wt.createElement(Vt,{onClick:()=>Mo(t,"raw")},"Copy raw request and response"),wt.createElement(Vt,{onClick:()=>Mo(t,"curl")},"Copy as cURL"),wt.createElement(Vt,{onClick:()=>Mo(t,"httpie")},"Copy as HTTPie"))),wt.createElement("div",{className:"menu-legend"},"Export")),wt.createElement(Ao,null,wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(Kr,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(lp(t))},"Resume"),wt.createElement(Kr,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(Sy(t))},"Abort")),wt.createElement("div",{className:"menu-legend"},"Interception")))):wt.createElement("div",null)}o(Sp,"FlowMenu");function OI({flow:e}){var t;if(e.type!=="http")return null;if(e.request.contentLength&&!((t=e.response)==null?void 0:t.contentLength))return wt.createElement(Kr,{icon:"fa-download",onClick:()=>window.location.href=jr.getContentURL(e,e.request)},"Download");if(e.response){let i=e.response;if(!e.request.contentLength&&e.response.contentLength)return wt.createElement(Kr,{icon:"fa-download",onClick:()=>window.location.href=jr.getContentURL(e,i)},"Download");if(e.request.contentLength&&e.response.contentLength)return wt.createElement(Wl,{text:wt.createElement(Kr,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},wt.createElement(Vt,{onClick:()=>window.location.href=jr.getContentURL(e,e.request)},"Download request"),wt.createElement(Vt,{onClick:()=>window.location.href=jr.getContentURL(e,i)},"Download response"))}return null}o(OI,"DownloadButton");var lu=pe(Re());var _O=lu.memo(o(function(){let t=at(l=>l.connection.state),i=at(l=>l.connection.message);switch(t){case ti.INIT:return lu.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case ti.FETCHING:return lu.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case ti.ESTABLISHED:return lu.createElement("span",{className:"connection-indicator established"},"connected");case ti.ERROR:return lu.createElement("span",{className:"connection-indicator error",title:i},"connection lost");case ti.OFFLINE:return lu.createElement("span",{className:"connection-indicator offline"},"offline");default:let l=t;throw"unknown connection state"}},"ConnectionIndicator"));function yS(){let e=at(y=>y.flows.selected.filter(_=>_ in y.flows.byId)),[t,i]=(0,Do.useState)(()=>xp),[l,d]=(0,Do.useState)(!1),v=[xp,jy];e.length>0?(l||(i(()=>Sp),d(!0)),v.push(Sp)):(l&&d(!1),t===Sp&&i(()=>xp));function p(y,_){_.preventDefault(),i(()=>y)}return o(p,"handleClick"),Do.default.createElement("header",null,Do.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},Do.default.createElement(CO,null),v.map(y=>Do.default.createElement("a",{key:y.title,href:"#",className:(0,EO.default)({active:y===t}),onClick:_=>p(y,_)},y.title)),Do.default.createElement(Ao,null,Do.default.createElement(_O,null))),Do.default.createElement("div",null,Do.default.createElement(t,null)))}o(yS,"Header");var Qe=pe(Re()),bO=pe(Jn());var qy=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function i(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},y={Expr:yr},_=yr,O=o(function(H,J){return[H,...J]},"peg$c0"),D=o(function(H){return[H]},"peg$c1"),Y=o(function(){return""},"peg$c2"),B={type:"other",description:"string"},X='"',te={type:"literal",value:'"',description:'"\\""'},Q=o(function(H){return H.join("")},"peg$c6"),R="'",P={type:"literal",value:"'",description:`"'"`},F=/^["\\]/,K={type:"class",value:'["\\\\]',description:'["\\\\]'},V={type:"any",description:"any character"},ue=o(function(H){return H},"peg$c12"),ie="\\",de={type:"literal",value:"\\",description:'"\\\\"'},ge=/^['\\]/,we={type:"class",value:"['\\\\]",description:"['\\\\]"},qe=/^['"\\]/,Je={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Ee="n",xt={type:"literal",value:"n",description:'"n"'},Be=o(function(){return` -`},"peg$c21"),Ve="r",Ke={type:"literal",value:"r",description:'"r"'},Ge=o(function(){return"\r"},"peg$c24"),Zt="t",ut={type:"literal",value:"t",description:'"t"'},Fr=o(function(){return" "},"peg$c27"),Kt={type:"other",description:"whitespace"},bt=/^[ \t\n\r]/,St={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},st={type:"other",description:"control character"},br=/^[|&!()~"]/,zt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},$t={type:"other",description:"optional whitespace"},ne=0,et=0,Tr=[{line:1,column:1,seenCR:!1}],jt=0,qt=[],xe=0,kr;if("startRule"in d){if(!(d.startRule in y))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=y[d.startRule]}function an(){return l.substring(et,ne)}o(an,"text");function In(){return dr(et,ne)}o(In,"location");function ii(H){throw Io(null,[{type:"other",description:H}],l.substring(et,ne),dr(et,ne))}o(ii,"expected");function un(H){throw Io(H,null,l.substring(et,ne),dr(et,ne))}o(un,"error");function Gt(H){var J=Tr[H],he,be;if(J)return J;for(he=H-1;!Tr[he];)he--;for(J=Tr[he],J={line:J.line,column:J.column,seenCR:J.seenCR};hejt&&(jt=ne,qt=[]),qt.push(H))}o(ft,"peg$fail");function Io(H,J,he,be){function Jt(Rt){var Ir=1;for(Rt.sort(function(er,oi){return er.descriptionoi.description?1:0});Ir1?oi.slice(0,-1).join(", ")+" or "+oi[Rt.length-1]:oi[0],no=Ir?'"'+er(Ir)+'"':"end of input","Expected "+fs+" but "+no+" found."}return o(zl,"buildMessage"),J!==null&&Jt(J),new t(H!==null?H:zl(J,he),J,he,be)}o(Io,"peg$buildException");function yr(){var H,J,he,be;if(H=ne,J=Ii(),J!==p){if(he=[],be=Wn(),be!==p)for(;be!==p;)he.push(be),be=Wn();else he=p;he!==p?(be=yr(),be!==p?(et=H,J=O(J,be),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p&&(H=ne,J=Ii(),J!==p&&(et=H,J=D(J)),H=J,H===p)){for(H=ne,J=[],he=Wn();he!==p;)J.push(he),he=Wn();J!==p&&(et=H,J=Y()),H=J}return H}o(yr,"peg$parseExpr");function Ii(){var H,J,he,be;if(xe++,H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,xe===0&&ft(te)),J!==p){for(he=[],be=fn();be!==p;)he.push(be),be=fn();he!==p?(l.charCodeAt(ne)===34?(be=X,ne++):(be=p,xe===0&&ft(te)),be!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===39?(J=R,ne++):(J=p,xe===0&&ft(P)),J!==p){for(he=[],be=Hn();be!==p;)he.push(be),be=Hn();he!==p?(l.charCodeAt(ne)===39?(be=R,ne++):(be=p,xe===0&&ft(P)),be!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,J=ne,xe++,he=kn(),xe--,he===p?J=void 0:(ne=J,J=p),J!==p){if(he=[],be=vi(),be!==p)for(;be!==p;)he.push(be),be=vi();else he=p;he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,xe===0&&ft(te)),J!==p){for(he=[],be=fn();be!==p;)he.push(be),be=fn();he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p)if(H=ne,l.charCodeAt(ne)===39?(J=R,ne++):(J=p,xe===0&&ft(P)),J!==p){for(he=[],be=Hn();be!==p;)he.push(be),be=Hn();he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p}}}return xe--,H===p&&(J=p,xe===0&&ft(B)),H}o(Ii,"peg$parseStringLiteral");function fn(){var H,J,he;return H=ne,J=ne,xe++,F.test(l.charAt(ne))?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(K)),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,xe===0&&ft(de)),J!==p?(he=gi(),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(fn,"peg$parseDoubleStringChar");function Hn(){var H,J,he;return H=ne,J=ne,xe++,ge.test(l.charAt(ne))?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(we)),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,xe===0&&ft(de)),J!==p?(he=gi(),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(Hn,"peg$parseSingleStringChar");function vi(){var H,J,he;return H=ne,J=ne,xe++,he=Wn(),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H}o(vi,"peg$parseUnquotedStringChar");function gi(){var H,J;return qe.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(Je)),H===p&&(H=ne,l.charCodeAt(ne)===110?(J=Ee,ne++):(J=p,xe===0&&ft(xt)),J!==p&&(et=H,J=Be()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===114?(J=Ve,ne++):(J=p,xe===0&&ft(Ke)),J!==p&&(et=H,J=Ge()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===116?(J=Zt,ne++):(J=p,xe===0&&ft(ut)),J!==p&&(et=H,J=Fr()),H=J))),H}o(gi,"peg$parseEscapeSequence");function Wn(){var H,J;return xe++,bt.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(St)),xe--,H===p&&(J=p,xe===0&&ft(Kt)),H}o(Wn,"peg$parsews");function kn(){var H,J;return xe++,br.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(zt)),xe--,H===p&&(J=p,xe===0&&ft(st)),H}o(kn,"peg$parsecc");function Zs(){var H,J;for(xe++,H=[],J=Wn();J!==p;)H.push(J),J=Wn();return xe--,H===p&&(J=p,xe===0&&ft($t)),H}if(o(Zs,"peg$parse__"),kr=_(),kr!==p&&ne===l.length)return kr;throw kr!==p&&ne{t&&t.current.addEventListener("DOMNodeInserted",i=>{let l=i.currentTarget;l.scroll({top:l.scrollHeight,behavior:"auto"})})},[]),Qe.default.createElement("div",{className:"command-result",ref:t},e.map((i,l)=>Qe.default.createElement("div",{key:l},Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"$ ",i.command)),i.result)))}o(LI,"Results");function NI({nextArgs:e,currentArg:t,help:i,description:l,availableCommands:d}){let v=[];for(let p=0;p0&&Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Argument suggestion:")," ",v),(i==null?void 0:i.includes("->"))&&Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Signature help: "),i),l&&Qe.default.createElement("div",null,"# ",l),Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Available Commands: "),Qe.default.createElement("p",{className:"available-commands"},JSON.stringify(d)))))}o(NI,"CommandHelp");function xS(){let[e,t]=(0,Qe.useState)(""),[i,l]=(0,Qe.useState)(""),[d,v]=(0,Qe.useState)(0),[p,y]=(0,Qe.useState)([]),[_,O]=(0,Qe.useState)([]),[D,Y]=(0,Qe.useState)({}),[B,X]=(0,Qe.useState)([]),[te,Q]=(0,Qe.useState)(0),[R,P]=(0,Qe.useState)(""),[F,K]=(0,Qe.useState)(""),[V,ue]=(0,Qe.useState)([]),[ie,de]=(0,Qe.useState)([]),[ge,we]=(0,Qe.useState)(void 0);(0,Qe.useEffect)(()=>{kt("/commands",{method:"GET"}).then(Be=>Be.json()).then(Be=>{Y(Be),y(wS(Be)),O(Object.keys(Be))}).catch(Be=>console.error(Be))},[]),(0,Qe.useEffect)(()=>{Ch("commands.history.get").then(Be=>{de(Be.value)}).catch(Be=>console.error(Be))},[]);let qe=o((Be,Ve)=>{var ut,Fr,Kt;let Ke=qy.parse(Ve),Ge=qy.parse(Be);P((ut=D[Ke[0]])==null?void 0:ut.signature_help),K(((Fr=D[Ke[0]])==null?void 0:Fr.help)||""),y(wS(D,Ge[0])),O(wS(D,Ke[0]));let Zt=(Kt=D[Ke[0]])==null?void 0:Kt.parameters.map(bt=>bt.name);Zt&&(X([Ke[0],...Zt]),Q(Ke.length-1))},"parseCommand"),Je=o(Be=>{t(Be.target.value),l(Be.target.value),v(0)},"onChange"),Ee=o(Be=>{if(Be.keyCode===yt.ENTER){let[Ve,...Ke]=qy.parse(e);de([...ie,e]),Ch("commands.history.add",e).catch(()=>0),kt.post(`/commands/${Ve}`,{arguments:Ke}).then(Ge=>Ge.json()).then(Ge=>{we(void 0),X([]),ue([...V,{command:e,result:JSON.stringify(Ge.value||Ge.error)}])}).catch(Ge=>{we(void 0),X([]),ue([...V,{command:e,result:Ge.toString()}])}),P(""),K(""),t(""),l(""),v(0),y(_)}if(Be.keyCode===yt.UP){let Ve;ge===void 0?Ve=ie.length-1:Ve=Math.max(0,ge-1),t(ie[Ve]),l(ie[Ve]),we(Ve)}if(Be.keyCode===yt.DOWN){if(ge===void 0)return;if(ge==ie.length-1)t(""),l(""),we(void 0);else{let Ve=ge+1;t(ie[Ve]),l(ie[Ve]),we(Ve)}}Be.keyCode===yt.TAB&&(t(p[d]),v((d+1)%p.length),Be.preventDefault()),Be.stopPropagation()},"onKeyDown"),xt=o(Be=>{if(!e){O(Object.keys(D));return}qe(i,e),Be.stopPropagation()},"onKeyUp");return Qe.default.createElement("div",{className:"command"},Qe.default.createElement("div",{className:"command-title"},"Command Result"),Qe.default.createElement(LI,{results:V}),Qe.default.createElement(NI,{nextArgs:B,currentArg:te,help:R,description:F,availableCommands:_}),Qe.default.createElement("div",{className:(0,bO.default)("command-input input-group")},Qe.default.createElement("span",{className:"input-group-addon"},Qe.default.createElement("i",{className:"fa fa-fw fa-terminal"})),Qe.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Je,onKeyDown:Ee,onKeyUp:xt})))}o(xS,"CommandBar");var Ul=pe(Re()),Cp=pe(qh());var SS=pe(Re());function CS({checked:e,onToggle:t,text:i}){return SS.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},SS.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",i)}o(CS,"ToggleButton");var Bl=pe(Re()),_S=pe(qh()),TO=pe(eu()),kO=pe(pS());var Xh=class extends Bl.Component{constructor(t){super(t);this.heights={},this.state={vScroll:yp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){this.onViewportUpdate()}onViewportUpdate(){let t=TO.default.findDOMNode(this),i=yp({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:t.scrollTop,viewportHeight:t.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});(0,kO.default)(this.state.vScroll,i)||this.setState({vScroll:i})}setHeight(t,i){if(i&&!this.heights[t]){let l=i.offsetHeight;this.heights[t]!==l&&(this.heights[t]=l,this.onViewportUpdate())}}render(){let{vScroll:t}=this.state,{events:i}=this.props;return Bl.default.createElement("pre",{onScroll:this.onViewportUpdate},Bl.default.createElement("div",{style:{height:t.paddingTop}}),i.slice(t.start,t.end).map(l=>Bl.default.createElement("div",{key:l.id,ref:d=>this.setHeight(l.id,d)},Bl.default.createElement(PI,{event:l}),l.message)),Bl.default.createElement("div",{style:{height:t.paddingBottom}}))}};o(Xh,"EventLogList"),es(Xh,"propTypes",{events:_S.default.array.isRequired,rowHeight:_S.default.number}),es(Xh,"defaultProps",{rowHeight:18});function PI({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return Bl.default.createElement("i",{className:`fa fa-fw fa-${t}`})}o(PI,"LogIcon");var OO=Wy(Xh);var Qh=class extends Ul.Component{constructor(t,i){super(t,i);this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:i,events:l,toggleFilter:d,close:v}=this.props;return Ul.default.createElement("div",{className:"eventlog",style:{height:t}},Ul.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",Ul.default.createElement("div",{className:"pull-right"},["debug","info","web","warn","error"].map(p=>Ul.default.createElement(CS,{key:p,text:p,checked:i[p],onToggle:()=>d(p)})),Ul.default.createElement("i",{onClick:v,className:"fa fa-close"}))),Ul.default.createElement(OO,{events:l}))}};o(Qh,"PureEventLog"),es(Qh,"propTypes",{filters:Cp.default.object.isRequired,events:Cp.default.array.isRequired,toggleFilter:Cp.default.func.isRequired,close:Cp.default.func.isRequired,defaultHeight:Cp.default.number}),es(Qh,"defaultProps",{defaultHeight:200});var LO=Ri(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:cp,toggleFilter:kk})(Qh);var ln=pe(Re());function ES(){let e=at(P=>P.conf.version),{mode:t,intercept:i,showhost:l,upstream_cert:d,rawtcp:v,http2:p,websocket:y,anticache:_,anticomp:O,stickyauth:D,stickycookie:Y,stream_large_bodies:B,listen_host:X,listen_port:te,server:Q,ssl_insecure:R}=at(P=>P.options);return ln.createElement("footer",null,t&&t!=="regular"&&ln.createElement("span",{className:"label label-success"},t," mode"),i&&ln.createElement("span",{className:"label label-success"},"Intercept: ",i),R&&ln.createElement("span",{className:"label label-danger"},"ssl_insecure"),l&&ln.createElement("span",{className:"label label-success"},"showhost"),!d&&ln.createElement("span",{className:"label label-success"},"no-upstream-cert"),!v&&ln.createElement("span",{className:"label label-success"},"no-raw-tcp"),!p&&ln.createElement("span",{className:"label label-success"},"no-http2"),!y&&ln.createElement("span",{className:"label label-success"},"no-websocket"),_&&ln.createElement("span",{className:"label label-success"},"anticache"),O&&ln.createElement("span",{className:"label label-success"},"anticomp"),D&&ln.createElement("span",{className:"label label-success"},"stickyauth: ",D),Y&&ln.createElement("span",{className:"label label-success"},"stickycookie: ",Y),B&&ln.createElement("span",{className:"label label-success"},"stream: ",jg(B)),ln.createElement("div",{className:"pull-right"},ln.createElement(Ao,null,Q&&ln.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},X||"*",":",te)),ln.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}o(ES,"Footer");var NS=pe(Re());var LS=pe(Re());var _p=pe(Re());function bS({children:e}){return _p.createElement("div",null,_p.createElement("div",{className:"modal-backdrop fade in"}),_p.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:"-1",role:"dialog","aria-labelledby":"options"},_p.createElement("div",{className:"modal-dialog modal-lg",role:"document"},_p.createElement("div",{className:"modal-content"},e))))}o(bS,"ModalLayout");var pr=pe(Re());var Ro=pe(Re()),Fo=pe(qh());var NO=pe(Jn()),MI=o(e=>{e.keyCode!==yt.ESC&&e.stopPropagation()},"stopPropagation");TS.propTypes={value:Fo.default.bool.isRequired,onChange:Fo.default.func.isRequired};function TS(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Ro.default.createElement("div",{className:"checkbox"},Ro.default.createElement("label",null,Ro.default.createElement("input",Oe({type:"checkbox",checked:e,onChange:v=>t(v.target.checked)},i)),"Enable"))}o(TS,"BooleanOption");kS.propTypes={value:Fo.default.string,onChange:Fo.default.func.isRequired};function kS(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Ro.default.createElement("input",Oe({type:"text",value:e||"",onChange:v=>t(v.target.value)},i))}o(kS,"StringOption");function AI(e){return function(l){var d=l,{onChange:t}=d,i=Us(d,["onChange"]);return Ro.default.createElement(e,Oe({onChange:v=>t(v||null)},i))}}o(AI,"Optional");PO.propTypes={value:Fo.default.number.isRequired,onChange:Fo.default.func.isRequired};function PO(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Ro.default.createElement("input",Oe({type:"number",value:e,onChange:v=>t(parseInt(v.target.value))},i))}o(PO,"NumberOption");MO.propTypes={value:Fo.default.string.isRequired,onChange:Fo.default.func.isRequired};function MO(d){var v=d,{value:e,onChange:t,choices:i}=v,l=Us(v,["value","onChange","choices"]);return Ro.default.createElement("select",Oe({onChange:p=>t(p.target.value),value:e},l),i.map(p=>Ro.default.createElement("option",{key:p,value:p},p)))}o(MO,"ChoicesOption");AO.propTypes={value:Fo.default.arrayOf(Fo.default.string).isRequired,onChange:Fo.default.func.isRequired};function AO(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);let v=Math.max(e.length,1);return Ro.default.createElement("textarea",Oe({rows:v,value:e.join(` +`),te}return sf(function(){_.current=e,O.current=Y,D.current=W,w.current=void 0}),sf(function(){function te(){try{var Q=n.getState(),R=_.current(Q);if(t(R,D.current))return;D.current=R,O.current=Q}catch(P){w.current=P}v()}return o(te,"checkForUpdates"),p.onStateChange=te,p.trySubscribe(),te(),function(){return p.tryUnsubscribe()}},[n,p]),W}o($R,"useSelectorWithStoreAndSubscription");function CT(e){e===void 0&&(e=Yn);var t=e===Yn?Ug:function(){return(0,Xi.useContext)(e)};return o(function(l,d){d===void 0&&(d=jR);var v=t(),p=v.store,w=v.subscription,_=$R(l,d,p,w);return(0,Xi.useDebugValue)(_),_},"useSelector")}o(CT,"createSelectorHook");var dx=CT();var hx=pe(Xa());GE(hx.unstable_batchedUpdates);var An=pe(Re());var _T="UI_FLOWVIEW_SET_TAB",bT="SET_CONTENT_VIEW_FOR",qR={tab:"request",contentViewFor:{}};function mx(e=qR,t){switch(t.type){case bT:return Ft(Le({},e),{contentViewFor:Ft(Le({},e.contentViewFor),{[t.messageId]:t.contentView})});case _T:return Ft(Le({},e),{tab:t.tab?t.tab:"request"});default:return e}}o(mx,"reducer");function lf(e){return{type:_T,tab:e}}o(lf,"selectTab");function jg(e,t){return{type:bT,messageId:e,contentView:t}}o(jg,"setContentViewFor");var ET=pe(xh()),VR=pe(Re());window._=ET.default;window.React=VR;var $g=o(function(e){if(e===0)return"0";for(var t=["b","kb","mb","gb","tb"],n=0;ne);n++);var l;return e%Math.pow(1024,n)==0?l=0:l=1,(e/Math.pow(1024,n)).toFixed(l)+t[n]},"formatSize"),qg=o(function(e){for(var t=e,n=["ms","s","min","h"],l=[1e3,60,60],d=0;Math.abs(t)>=l[d]&&dEt(e,Le({method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},n));Et.post=(e,t,n={})=>Et(e,Le({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},n));function Sh(e,...t){return Oa(this,null,function*(){return yield(yield Et(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()})}o(Sh,"runCommand");var _h={};CC(_h,{ADD:()=>Sx,RECEIVE:()=>bx,REMOVE:()=>_x,SET_FILTER:()=>wx,SET_SORT:()=>xx,UPDATE:()=>Cx,add:()=>YR,defaultState:()=>Vg,receive:()=>ZR,reduce:()=>ep,remove:()=>QR,setFilter:()=>Ex,setSort:()=>kT,update:()=>XR});var yx=pe(TT()),wx="LIST_SET_FILTER",xx="LIST_SET_SORT",Sx="LIST_ADD",Cx="LIST_UPDATE",_x="LIST_REMOVE",bx="LIST_RECEIVE",Vg={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function ep(e=Vg,t){let{byId:n,list:l,listIndex:d,view:v,viewIndex:p}=e;switch(t.type){case wx:v=(0,yx.default)(l.filter(t.filter),t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case xx:v=(0,yx.default)([...v],t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case Sx:if(t.item.id in n)break;n=Ft(Le({},n),{[t.item.id]:t.item}),d=Ft(Le({},d),{[t.item.id]:l.length}),l=[...l,t.item],t.filter(t.item)&&({view:v,viewIndex:p}=OT(e,t.item,t.sort));break;case Cx:n=Ft(Le({},n),{[t.item.id]:t.item}),l=[...l],l[d[t.item.id]]=t.item;let w=t.item.id in p,_=t.filter(t.item);_&&!w?{view:v,viewIndex:p}=OT(e,t.item,t.sort):!_&&w?{data:v,dataIndex:p}=Tx(v,p,t.item.id):_&&w&&({view:v,viewIndex:p}=JR(e,t.item,t.sort));break;case _x:if(!(t.id in n))break;n=Le({},n),delete n[t.id],{data:l,dataIndex:d}=Tx(l,d,t.id),t.id in p&&({data:v,dataIndex:p}=Tx(v,p,t.id));break;case bx:l=t.list,d={},n={},l.forEach((O,D)=>{n[O.id]=O,d[O.id]=D}),v=l.filter(t.filter).sort(t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break}return{byId:n,list:l,listIndex:d,view:v,viewIndex:p}}o(ep,"reduce");function Ex(e=Kg,t=Ch){return{type:wx,filter:e,sort:t}}o(Ex,"setFilter");function kT(e=Ch){return{type:xx,sort:e}}o(kT,"setSort");function YR(e,t=Kg,n=Ch){return{type:Sx,item:e,filter:t,sort:n}}o(YR,"add");function XR(e,t=Kg,n=Ch){return{type:Cx,item:e,filter:t,sort:n}}o(XR,"update");function QR(e){return{type:_x,id:e}}o(QR,"remove");function ZR(e,t=Kg,n=Ch){return{type:bx,list:e,filter:t,sort:n}}o(ZR,"receive");function OT(e,t,n){let l=eF(e.view,t,n),d=[...e.view],v=Le({},e.viewIndex);d.splice(l,0,t);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{view:d,viewIndex:v}}o(OT,"sortedInsert");function Tx(e,t,n){let l=t[n],d=[...e],v=Le({},t);delete v[n],d.splice(l,1);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{data:d,dataIndex:v}}o(Tx,"removeData");function JR(e,t,n){let l=[...e.view],d=Le({},e.viewIndex),v=d[t.id];for(l[v]=t;v+10;)l[v]=l[v+1],l[v+1]=t,d[t.id]=v+1,d[l[v].id]=v,++v;for(;v>0&&n(l[v],l[v-1])<0;)l[v]=l[v-1],l[v-1]=t,d[t.id]=v-1,d[l[v].id]=v,--v;return{view:l,viewIndex:d}}o(JR,"sortedUpdate");function eF(e,t,n){let l=0,d=e.length;for(;l>>1;n(t,e[v])>=0?l=v+1:d=v}return l}o(eF,"sortedIndex");function Kg(){return!0}o(Kg,"defaultFilter");function Ch(e,t){return 0}o(Ch,"defaultSort");var LT={http:80,https:443},zr=class{static getContentType(t){var n=zr.get_first_header(t,/^Content-Type$/i);if(n)return n.split(";")[0].trim()}static get_first_header(t,n){let l=t;l._headerLookups||Object.defineProperty(l,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let d=n.toString();if(!(d in l._headerLookups)){let v;for(let p=0;p{switch(e.type){case"http":let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),e.websocket&&(t+=e.websocket.messages_meta.contentLength||0),t;case"tcp":return e.messages_meta.contentLength||0}},"getTotalSize"),Gg=o(e=>e.type==="http"&&!e.websocket,"canReplay");var af=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function n(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},w={start:Gl},_=Gl,O={type:"other",description:"filter expression"},D=o(function(x){return x},"peg$c1"),Y={type:"other",description:"whitespace"},W=/^[ \t\n\r]/,X={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},te={type:"other",description:"control character"},Q=/^[|&!()~"]/,R={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},P={type:"other",description:"optional whitespace"},F="|",K={type:"literal",value:"|",description:'"|"'},V=o(function(x,k){return il(x,k)},"peg$c11"),ue="&",ie={type:"literal",value:"&",description:'"&"'},de=o(function(x,k){return Tr(x,k)},"peg$c14"),ge="!",we={type:"literal",value:"!",description:'"!"'},qe=o(function(x){return Nf(x)},"peg$c17"),Je="(",be={type:"literal",value:"(",description:'"("'},yt=")",Be={type:"literal",value:")",description:'")"'},Ve=o(function(x){return Pf(x)},"peg$c22"),Ke="true",Ge={type:"literal",value:"true",description:'"true"'},Yt=o(function(){return gu},"peg$c25"),ut="false",Dr={type:"literal",value:"false",description:'"false"'},qt=o(function(){return yu},"peg$c28"),_t="~a",wt={type:"literal",value:"~a",description:'"~a"'},st=o(function(){return Ql},"peg$c31"),_r="~b",Bt={type:"literal",value:"~b",description:'"~b"'},Ut=o(function(x){return Dp(x)},"peg$c34"),ne="~bq",et={type:"literal",value:"~bq",description:'"~bq"'},br=o(function(x){return Wn(x)},"peg$c37"),zt="~bs",jt={type:"literal",value:"~bs",description:'"~bs"'},xe=o(function(x){return Rp(x)},"peg$c40"),Er="~c",on={type:"literal",value:"~c",description:'"~c"'},Dn=o(function(x){return Tn(x)},"peg$c43"),ei="~d",sn={type:"literal",value:"~d",description:'"~d"'},Vt=o(function(x){return wu(x)},"peg$c46"),cr="~dst",ft={type:"literal",value:"~dst",description:'"~dst"'},Do=o(function(x){return ro(x)},"peg$c49"),vr="~e",Ri={type:"literal",value:"~e",description:'"~e"'},ln=o(function(){return hs},"peg$c52"),Rn="~h",hi={type:"literal",value:"~h",description:'"~h"'},mi=o(function(x){return ms(x)},"peg$c55"),Fn="~hq",bn={type:"literal",value:"~hq",description:'"~hq"'},Ys=o(function(x){return xt(x)},"peg$c58"),H="~hs",J={type:"literal",value:"~hs",description:'"~hs"'},he=o(function(x){return no(x)},"peg$c61"),Ee="~http",Xt={type:"literal",value:"~http",description:'"~http"'},Hl=o(function(){return Zl},"peg$c64"),At="~m",Rr={type:"literal",value:"~m",description:'"~m"'},Qt=o(function(x){return Fp(x)},"peg$c67"),ti="~marked",os={type:"literal",value:"~marked",description:'"~marked"'},to=o(function(){return io},"peg$c70"),vi="~q",Xs={type:"literal",value:"~q",description:'"~q"'},ss=o(function(){return ir},"peg$c73"),an="~src",bp={type:"literal",value:"~src",description:'"~src"'},Qs=o(function(x){return Af(x)},"peg$c76"),Cf="~s",Zs={type:"literal",value:"~s",description:'"~s"'},Ep=o(function(){return Mf},"peg$c79"),_f="~t",lu={type:"literal",value:"~t",description:'"~t"'},Tp=o(function(x){return vs(x)},"peg$c82"),Wl="~tcp",ls={type:"literal",value:"~tcp",description:'"~tcp"'},kp=o(function(){return ol},"peg$c85"),bf="~tq",Js={type:"literal",value:"~tq",description:'"~tq"'},au=o(function(x){return Uo(x)},"peg$c88"),Ro="~ts",Op={type:"literal",value:"~ts",description:'"~ts"'},Fo=o(function(x){return Ip(x)},"peg$c91"),Bl="~u",Ef={type:"literal",value:"~u",description:'"~u"'},Dt=o(function(x){return Jl(x)},"peg$c94"),Ne="~websocket",gi={type:"literal",value:"~websocket",description:'"~websocket"'},uu=o(function(){return ea},"peg$c97"),yi={type:"other",description:"integer"},dt=/^['"]/,Fi={type:"class",value:`['"]`,description:`['"]`},Io=/^[0-9]/,el={type:"class",value:"[0-9]",description:"[0-9]"},ae=o(function(x){return parseInt(x.join(""),10)},"peg$c103"),ze={type:"other",description:"string"},Ul='"',zl={type:"literal",value:'"',description:'"\\""'},Ho=o(function(x){return x.join("")},"peg$c107"),as="'",jl={type:"literal",value:"'",description:`"'"`},Ue=/^["\\]/,Lp={type:"class",value:'["\\\\]',description:'["\\\\]'},tl={type:"any",description:"any character"},ri=o(function(x){return x},"peg$c113"),In="\\",fu={type:"literal",value:"\\",description:'"\\\\"'},cu=/^['\\]/,us={type:"class",value:"['\\\\]",description:"['\\\\]"},rl=/^['"\\]/,Tf={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},$l="n",ql={type:"literal",value:"n",description:'"n"'},Vl=o(function(){return` +`},"peg$c122"),Wo="r",pu={type:"literal",value:"r",description:'"r"'},kf=o(function(){return"\r"},"peg$c125"),Np="t",du={type:"literal",value:"t",description:'"t"'},wi=o(function(){return" "},"peg$c128"),M=0,We=0,Bo=[{line:1,column:1,seenCR:!1}],un=0,hu=[],Se=0,Kl;if("startRule"in d){if(!(d.startRule in w))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=w[d.startRule]}function Jh(){return l.substring(We,M)}o(Jh,"text");function Of(){return fs(We,M)}o(Of,"location");function Pp(x){throw cs(null,[{type:"other",description:x}],l.substring(We,M),fs(We,M))}o(Pp,"expected");function Lf(x){throw cs(x,null,l.substring(We,M),fs(We,M))}o(Lf,"error");function mu(x){var k=Bo[x],U,j;if(k)return k;for(U=x-1;!Bo[U];)U--;for(k=Bo[U],k={line:k.line,column:k.column,seenCR:k.seenCR};Uun&&(un=M,hu=[]),hu.push(x))}o(Pe,"peg$fail");function cs(x,k,U,j){function Bn(dr){var Un=1;for(dr.sort(function(gr,xi){return gr.descriptionxi.description?1:0});Un1?xi.slice(0,-1).join(", ")+" or "+xi[dr.length-1]:xi[0],Ii=Un?'"'+gr(Un)+'"':"end of input","Expected "+Vr+" but "+Ii+" found."}return o(pr,"buildMessage"),k!==null&&Bn(k),new t(x!==null?x:pr(k,U),k,U,j)}o(cs,"peg$buildException");function Gl(){var x,k,U,j;return Se++,x=M,k=Hn(),k!==p?(U=vu(),U!==p?(j=Hn(),j!==p?(We=x,k=D(U),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),Se--,x===p&&(k=p,Se===0&&Pe(O)),x}o(Gl,"peg$parsestart");function Ae(){var x,k;return Se++,W.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(X)),Se--,x===p&&(k=p,Se===0&&Pe(Y)),x}o(Ae,"peg$parsews");function Tt(){var x,k;return Se++,Q.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(R)),Se--,x===p&&(k=p,Se===0&&Pe(te)),x}o(Tt,"peg$parsecc");function Hn(){var x,k;for(Se++,x=[],k=Ae();k!==p;)x.push(k),k=Ae();return Se--,x===p&&(k=p,Se===0&&Pe(P)),x}o(Hn,"peg$parse__");function vu(){var x,k,U,j,Bn,pr;return x=M,k=nl(),k!==p?(U=Hn(),U!==p?(l.charCodeAt(M)===124?(j=F,M++):(j=p,Se===0&&Pe(K)),j!==p?(Bn=Hn(),Bn!==p?(pr=vu(),pr!==p?(We=x,k=V(k,pr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=nl()),x}o(vu,"peg$parseOrExpr");function nl(){var x,k,U,j,Bn,pr;if(x=M,k=En(),k!==p?(U=Hn(),U!==p?(l.charCodeAt(M)===38?(j=ue,M++):(j=p,Se===0&&Pe(ie)),j!==p?(Bn=Hn(),Bn!==p?(pr=nl(),pr!==p?(We=x,k=de(k,pr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p){if(x=M,k=En(),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=nl(),j!==p?(We=x,k=de(k,j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=En())}return x}o(nl,"peg$parseAndExpr");function En(){var x,k,U,j;return x=M,l.charCodeAt(M)===33?(k=ge,M++):(k=p,Se===0&&Pe(we)),k!==p?(U=Hn(),U!==p?(j=En(),j!==p?(We=x,k=qe(j),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Mp()),x}o(En,"peg$parseNotExpr");function Mp(){var x,k,U,j,Bn,pr;return x=M,l.charCodeAt(M)===40?(k=Je,M++):(k=p,Se===0&&Pe(be)),k!==p?(U=Hn(),U!==p?(j=vu(),j!==p?(Bn=Hn(),Bn!==p?(l.charCodeAt(M)===41?(pr=yt,M++):(pr=p,Se===0&&Pe(Be)),pr!==p?(We=x,k=Ve(j),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Ap()),x}o(Mp,"peg$parseBindingExpr");function Ap(){var x,k,U,j;if(x=M,l.substr(M,4)===Ke?(k=Ke,M+=4):(k=p,Se===0&&Pe(Ge)),k!==p&&(We=x,k=Yt()),x=k,x===p&&(x=M,l.substr(M,5)===ut?(k=ut,M+=5):(k=p,Se===0&&Pe(Dr)),k!==p&&(We=x,k=qt()),x=k,x===p&&(x=M,l.substr(M,2)===_t?(k=_t,M+=2):(k=p,Se===0&&Pe(wt)),k!==p&&(We=x,k=st()),x=k,x===p))){if(x=M,l.substr(M,2)===_r?(k=_r,M+=2):(k=p,Se===0&&Pe(Bt)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Ut(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===ne?(k=ne,M+=3):(k=p,Se===0&&Pe(et)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=br(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===zt?(k=zt,M+=3):(k=p,Se===0&&Pe(jt)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=xe(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===Er?(k=Er,M+=2):(k=p,Se===0&&Pe(on)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Yl(),j!==p?(We=x,k=Dn(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===ei?(k=ei,M+=2):(k=p,Se===0&&Pe(sn)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Vt(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,4)===cr?(k=cr,M+=4):(k=p,Se===0&&Pe(ft)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Do(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===vr?(k=vr,M+=2):(k=p,Se===0&&Pe(Ri)),k!==p&&(We=x,k=ln()),x=k,x===p)){if(x=M,l.substr(M,2)===Rn?(k=Rn,M+=2):(k=p,Se===0&&Pe(hi)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=mi(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Fn?(k=Fn,M+=3):(k=p,Se===0&&Pe(bn)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Ys(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===H?(k=H,M+=3):(k=p,Se===0&&Pe(J)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=he(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,5)===Ee?(k=Ee,M+=5):(k=p,Se===0&&Pe(Xt)),k!==p&&(We=x,k=Hl()),x=k,x===p)){if(x=M,l.substr(M,2)===At?(k=At,M+=2):(k=p,Se===0&&Pe(Rr)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Qt(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,7)===ti?(k=ti,M+=7):(k=p,Se===0&&Pe(os)),k!==p&&(We=x,k=to()),x=k,x===p&&(x=M,l.substr(M,2)===vi?(k=vi,M+=2):(k=p,Se===0&&Pe(Xs)),k!==p&&(We=x,k=ss()),x=k,x===p))){if(x=M,l.substr(M,4)===an?(k=an,M+=4):(k=p,Se===0&&Pe(bp)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Qs(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===Cf?(k=Cf,M+=2):(k=p,Se===0&&Pe(Zs)),k!==p&&(We=x,k=Ep()),x=k,x===p)){if(x=M,l.substr(M,2)===_f?(k=_f,M+=2):(k=p,Se===0&&Pe(lu)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Tp(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,4)===Wl?(k=Wl,M+=4):(k=p,Se===0&&Pe(ls)),k!==p&&(We=x,k=kp()),x=k,x===p)){if(x=M,l.substr(M,3)===bf?(k=bf,M+=3):(k=p,Se===0&&Pe(Js)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=au(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Ro?(k=Ro,M+=3):(k=p,Se===0&&Pe(Op)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Fo(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===Bl?(k=Bl,M+=2):(k=p,Se===0&&Pe(Ef)),k!==p){if(U=[],j=Ae(),j!==p)for(;j!==p;)U.push(j),j=Ae();else U=p;U!==p?(j=Fr(),j!==p?(We=x,k=Dt(j),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=M,l.substr(M,10)===Ne?(k=Ne,M+=10):(k=p,Se===0&&Pe(gi)),k!==p&&(We=x,k=uu()),x=k,x===p&&(x=M,k=Fr(),k!==p&&(We=x,k=Dt(k)),x=k))}}}}}}}}}}}}}}}return x}o(Ap,"peg$parseExpr");function Yl(){var x,k,U,j;if(Se++,x=M,dt.test(l.charAt(M))?(k=l.charAt(M),M++):(k=p,Se===0&&Pe(Fi)),k===p&&(k=null),k!==p){if(U=[],Io.test(l.charAt(M))?(j=l.charAt(M),M++):(j=p,Se===0&&Pe(el)),j!==p)for(;j!==p;)U.push(j),Io.test(l.charAt(M))?(j=l.charAt(M),M++):(j=p,Se===0&&Pe(el));else U=p;U!==p?(dt.test(l.charAt(M))?(j=l.charAt(M),M++):(j=p,Se===0&&Pe(Fi)),j===p&&(j=null),j!==p?(We=x,k=ae(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;return Se--,x===p&&(k=p,Se===0&&Pe(yi)),x}o(Yl,"peg$parseIntegerLiteral");function Fr(){var x,k,U,j;if(Se++,x=M,l.charCodeAt(M)===34?(k=Ul,M++):(k=p,Se===0&&Pe(zl)),k!==p){for(U=[],j=Ot();j!==p;)U.push(j),j=Ot();U!==p?(l.charCodeAt(M)===34?(j=Ul,M++):(j=p,Se===0&&Pe(zl)),j!==p?(We=x,k=Ho(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.charCodeAt(M)===39?(k=as,M++):(k=p,Se===0&&Pe(jl)),k!==p){for(U=[],j=ps();j!==p;)U.push(j),j=ps();U!==p?(l.charCodeAt(M)===39?(j=as,M++):(j=p,Se===0&&Pe(jl)),j!==p?(We=x,k=Ho(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p)if(x=M,k=M,Se++,U=Tt(),Se--,U===p?k=void 0:(M=k,k=p),k!==p){if(U=[],j=Ir(),j!==p)for(;j!==p;)U.push(j),j=Ir();else U=p;U!==p?(We=x,k=Ho(U),x=k):(M=x,x=p)}else M=x,x=p}return Se--,x===p&&(k=p,Se===0&&Pe(ze)),x}o(Fr,"peg$parseStringLiteral");function Ot(){var x,k,U;return x=M,k=M,Se++,Ue.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(Lp)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(tl)),U!==p?(We=x,k=ri(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=In,M++):(k=p,Se===0&&Pe(fu)),k!==p?(U=ds(),U!==p?(We=x,k=ri(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(Ot,"peg$parseDoubleStringChar");function ps(){var x,k,U;return x=M,k=M,Se++,cu.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(us)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(tl)),U!==p?(We=x,k=ri(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=In,M++):(k=p,Se===0&&Pe(fu)),k!==p?(U=ds(),U!==p?(We=x,k=ri(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(ps,"peg$parseSingleStringChar");function Ir(){var x,k,U;return x=M,k=M,Se++,U=Ae(),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(tl)),U!==p?(We=x,k=ri(U),x=k):(M=x,x=p)):(M=x,x=p),x}o(Ir,"peg$parseUnquotedStringChar");function ds(){var x,k;return rl.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(Tf)),x===p&&(x=M,l.charCodeAt(M)===110?(k=$l,M++):(k=p,Se===0&&Pe(ql)),k!==p&&(We=x,k=Vl()),x=k,x===p&&(x=M,l.charCodeAt(M)===114?(k=Wo,M++):(k=p,Se===0&&Pe(pu)),k!==p&&(We=x,k=kf()),x=k,x===p&&(x=M,l.charCodeAt(M)===116?(k=Np,M++):(k=p,Se===0&&Pe(du)),k!==p&&(We=x,k=wi()),x=k))),x}o(ds,"peg$parseEscapeSequence");function il(x,k){function U(){return x.apply(this,arguments)||k.apply(this,arguments)}return o(U,"orFilter"),U.desc=x.desc+" or "+k.desc,U}o(il,"or");function Tr(x,k){function U(){return x.apply(this,arguments)&&k.apply(this,arguments)}return o(U,"andFilter"),U.desc=x.desc+" and "+k.desc,U}o(Tr,"and");function Nf(x){function k(){return!x.apply(this,arguments)}return o(k,"notFilter"),k.desc="not "+x.desc,k}o(Nf,"not");function Pf(x){function k(){return x.apply(this,arguments)}return o(k,"bindingFilter"),k.desc="("+x.desc+")",k}o(Pf,"binding");function gu(x){return!0}o(gu,"trueFilter"),gu.desc="true";function yu(x){return!1}o(yu,"falseFilter"),yu.desc="false";var Xl=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("application/x-shockwave-flash")];function Ql(x){if(x.response){for(var k=qs.getContentType(x.response),U=Xl.length;U--;)if(Xl[U].test(k))return!0}return!1}o(Ql,"assetFilter"),Ql.desc="is asset";function Tn(x){function k(U){return U.response&&U.response.status_code===x}return o(k,"responseCodeFilter"),k.desc="resp. code is "+x,k}o(Tn,"responseCode");function Dp(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"bodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Dp,"body");function Wn(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"requestBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Wn,"requestBody");function Rp(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"responseBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Rp,"responseBody");function wu(x){x=new RegExp(x,"i");function k(U){return U.request&&(x.test(U.request.host)||x.test(U.request.pretty_host))}return o(k,"domainFilter"),k.desc="domain matches "+x,k}o(wu,"domain");function ro(x){x=new RegExp(x,"i");function k(U){return!!U.server_conn.address&&x.test(U.server_conn.address[0]+":"+U.server_conn.address[1])}return o(k,"destinationFilter"),k.desc="destination address matches "+x,k}o(ro,"destination");function hs(x){return!!x.error}o(hs,"errorFilter"),hs.desc="has error";function ms(x){x=new RegExp(x,"i");function k(U){return U.request&&ko.match_header(U.request,x)||U.response&&qs.match_header(U.response,x)}return o(k,"headerFilter"),k.desc="header matches "+x,k}o(ms,"header");function xt(x){x=new RegExp(x,"i");function k(U){return U.request&&ko.match_header(U.request,x)}return o(k,"requestHeaderFilter"),k.desc="req. header matches "+x,k}o(xt,"requestHeader");function no(x){x=new RegExp(x,"i");function k(U){return U.response&&qs.match_header(U.response,x)}return o(k,"responseHeaderFilter"),k.desc="resp. header matches "+x,k}o(no,"responseHeader");function Zl(x){return x.type==="http"}o(Zl,"httpFilter"),Zl.desc="is an HTTP Flow";function Fp(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(U.request.method)}return o(k,"methodFilter"),k.desc="method matches "+x,k}o(Fp,"method");function io(x){return x.marked}o(io,"markedFilter"),io.desc="is marked";function ir(x){return x.request&&!x.response}o(ir,"noResponseFilter"),ir.desc="has no response";function Mf(x){return!!x.response}o(Mf,"responseFilter"),Mf.desc="has response";function Af(x){x=new RegExp(x,"i");function k(U){return!!U.client_conn.peername&&x.test(U.client_conn.peername[0]+":"+U.client_conn.peername[1])}return o(k,"sourceFilter"),k.desc="source address matches "+x,k}o(Af,"source");function vs(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(ko.getContentType(U.request))||U.response&&x.test(qs.getContentType(U.response))}return o(k,"contentTypeFilter"),k.desc="content type matches "+x,k}o(vs,"contentType");function ol(x){return x.type==="tcp"}o(ol,"tcpFilter"),ol.desc="is a TCP Flow";function Uo(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(ko.getContentType(U.request))}return o(k,"requestContentTypeFilter"),k.desc="req. content type matches "+x,k}o(Uo,"requestContentType");function Ip(x){x=new RegExp(x,"i");function k(U){return U.response&&x.test(qs.getContentType(U.response))}return o(k,"responseContentTypeFilter"),k.desc="resp. content type matches "+x,k}o(Ip,"responseContentType");function Jl(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(ko.pretty_url(U.request))}return o(k,"urlFilter"),k.desc="url matches "+x,k}o(Jl,"url");function ea(x){return x.type==="websocket"}if(o(ea,"websocketFilter"),ea.desc="is a Websocket Flow",Kl=_(),Kl!==p&&M===l.length)return Kl;throw Kl!==p&&MPx,icon:()=>Zg,method:()=>ey,path:()=>Jg,quickactions:()=>tp,size:()=>ry,status:()=>ty,time:()=>ny,timestamp:()=>iy,tls:()=>Qg});var ur=pe(Re());var Xg=pe(Xn());var Qg=o(({flow:e})=>ur.default.createElement("td",{className:(0,Xg.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");Qg.headerName="";Qg.sortKey=e=>e.type==="http"&&e.request.scheme;var Zg=o(({flow:e})=>ur.default.createElement("td",{className:"col-icon"},ur.default.createElement("div",{className:(0,Xg.default)("resource-icon",NT(e))})),"icon");Zg.headerName="";Zg.sortKey=e=>NT(e);var NT=o(e=>{if(e.type==="tcp")return"resource-icon-tcp";if(e.websocket)return"resource-icon-websocket";if(!e.response)return"resource-icon-plain";var t=qs.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),PT=o(e=>{var t,n;switch(e.type){case"http":return ko.pretty_url(e.request);case"tcp":return`${e.client_conn.peername.join(":")} \u2194 ${(n=(t=e.server_conn)==null?void 0:t.address)==null?void 0:n.join(":")}`}},"mainPath"),Jg=o(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=ur.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=ur.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),ur.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&ur.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&ur.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,ur.default.createElement("span",{className:"marker pull-right"},e.marked),PT(e))},"path");Jg.headerName="Path";Jg.sortKey=e=>PT(e);var ey=o(({flow:e})=>ur.default.createElement("td",{className:"col-method"},e.type==="http"?e.request.method:e.type.toUpperCase()),"method");ey.headerName="Method";ey.sortKey=e=>e.type==="http"?e.request.method:e.type.toUpperCase();var ty=o(({flow:e})=>{let t="darkred";return e.type!=="http"||!e.response?ur.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="lightred"),ur.default.createElement("td",{className:"col-status",style:{color:t}},e.response.status_code))},"status");ty.headerName="Status";ty.sortKey=e=>e.type==="http"&&e.response&&e.response.status_code;var ry=o(({flow:e})=>ur.default.createElement("td",{className:"col-size"},$g(Nx(e))),"size");ry.headerName="Size";ry.sortKey=e=>Nx(e);var ny=o(({flow:e})=>{let t=bh(e),n=Lx(e);return ur.default.createElement("td",{className:"col-time"},t&&n?qg(1e3*(n-t)):"...")},"time");ny.headerName="Time";ny.sortKey=e=>{let t=bh(e),n=Lx(e);return t&&n&&n-t};var iy=o(({flow:e})=>{let t=bh(e);return ur.default.createElement("td",{className:"col-start"},t?Qi(t):"...")},"timestamp");iy.headerName="Start time";iy.sortKey=e=>bh(e);var tp=o(({flow:e})=>{let t=$s(),[n,l]=(0,ur.useState)(!1),d=null;return e.intercepted?d=ur.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(rp(e))},ur.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):Gg(e)&&(d=ur.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(np(e))},ur.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"}))),ur.default.createElement("td",{className:(0,Xg.default)("col-quickactions",{hover:n}),onClick:()=>0},ur.default.createElement("div",null,d))},"quickactions");tp.headerName="";tp.sortKey=e=>0;var Px={icon:Zg,method:ey,path:Jg,quickactions:tp,size:ry,status:ty,time:ny,timestamp:iy,tls:Qg};var nF="FLOWS_ADD",iF="FLOWS_UPDATE",MT="FLOWS_REMOVE",oF="FLOWS_RECEIVE",AT="FLOWS_SELECT",DT="FLOWS_SET_FILTER",RT="FLOWS_SET_SORT",FT="FLOWS_SET_HIGHLIGHT",sF="FLOWS_REQUEST_ACTION",lF=Le({highlight:void 0,filter:void 0,sort:{column:void 0,desc:!1},selected:[]},Vg);function Mx(e=lF,t){switch(t.type){case nF:case iF:case MT:case oF:let n=_h[t.cmd](t.data,IT(e.filter),Ax(e.sort)),l=e.selected;if(t.type===MT&&e.selected.includes(t.data)){if(e.selected.length>1)l=l.filter(d=>d!==t.data);else if(l=[],t.data in e.viewIndex&&e.view.length>1){let d=e.viewIndex[t.data],v;d===e.view.length-1?v=e.view[d-1]:v=e.view[d+1],l.push(v.id)}}return Le(Ft(Le({},e),{selected:l}),ep(e,n));case DT:return Le(Ft(Le({},e),{filter:t.filter}),ep(e,Ex(IT(t.filter),Ax(e.sort))));case FT:return Ft(Le({},e),{highlight:t.highlight});case RT:return Le(Ft(Le({},e),{sort:t.sort}),ep(e,kT(Ax(t.sort))));case AT:return Ft(Le({},e),{selected:t.flowIds});default:return e}}o(Mx,"reducer");function IT(e){if(!!e)return af.parse(e)}o(IT,"makeFilter");function Ax({column:e,desc:t}){if(!e)return(l,d)=>0;let n=Px[e].sortKey;return(l,d)=>{let v=n(l),p=n(d);return v>p?t?-1:1:vEt(`/flows/${e.id}/resume`,{method:"POST"})}o(rp,"resume");function ly(){return e=>Et("/flows/resume",{method:"POST"})}o(ly,"resumeAll");function ay(e){return t=>Et(`/flows/${e.id}/kill`,{method:"POST"})}o(ay,"kill");function WT(){return e=>Et("/flows/kill",{method:"POST"})}o(WT,"killAll");function uy(e){return t=>Et(`/flows/${e.id}`,{method:"DELETE"})}o(uy,"remove");function fy(e){return t=>Et(`/flows/${e.id}/duplicate`,{method:"POST"})}o(fy,"duplicate");function np(e){return t=>Et(`/flows/${e.id}/replay`,{method:"POST"})}o(np,"replay");function cy(e){return t=>Et(`/flows/${e.id}/revert`,{method:"POST"})}o(cy,"revert");function Di(e,t){return n=>Et.put(`/flows/${e.id}`,t)}o(Di,"update");function BT(e,t,n){let l=new FormData;return t=new window.Blob([t],{type:"plain/text"}),l.append("file",t),d=>Et(`/flows/${e.id}/${n}/content.data`,{method:"POST",body:l})}o(BT,"uploadContent");function py(){return e=>Et("/clear",{method:"POST"})}o(py,"clear");function UT(){return window.location.href="/flows/dump",{type:sF}}o(UT,"download");function zT(e){let t=new FormData;return t.append("file",e),n=>Et("/flows/dump",{method:"POST",body:t})}o(zT,"upload");function ff(e){return{type:AT,flowIds:e?[e]:[]}}o(ff,"select");var dy="UI_HIDE_MODAL",jT="UI_SET_ACTIVE_MODAL",aF={activeModal:void 0};function Dx(e=aF,t){switch(t.type){case jT:return Ft(Le({},e),{activeModal:t.activeModal});case dy:return Ft(Le({},e),{activeModal:void 0});default:return e}}o(Dx,"reducer");function $T(e){return{type:jT,activeModal:e}}o($T,"setActiveModal");function hy(){return{type:dy}}o(hy,"hideModal");var Uh=pe(Re());var Wt=pe(Re());var op=pe(Re());var Th=pe(Re()),qT=pe(Xn()),VT=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),ip=!1,Vs=class extends Th.Component{constructor(){super(...arguments);this.input=Th.default.createRef();this.isEditing=o(()=>{var t;return((t=this.input.current)==null?void 0:t.contentEditable)===VT},"isEditing");this.startEditing=o(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=VT,window.requestAnimationFrame(()=>{var l,d;if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let t=document.createRange();t.selectNodeContents(this.input.current);let n=window.getSelection();n==null||n.removeAllRanges(),n==null||n.addRange(t),(d=(l=this.props).onEditStart)==null||d.call(l)}))},"startEditing");this.resetValue=o(()=>{var t,n;if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,(n=(t=this.props).onInput)==null||n.call(t,this.props.content)},"resetValue");this.finishEditing=o(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=o(t=>{t.preventDefault();let n=t.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,n)},"onPaste");this.suppress_events=!1;this.onMouseDown=o(t=>{ip&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=o(t=>{var d;let n=t.target===this.input.current,l=!((d=window.getSelection())==null?void 0:d.toString());ip&&console.warn("mouseUp",this.suppress_events,n,l),n&&l&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=o(t=>{ip&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=o(t=>{if(ip&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=o(t=>{var n,l,d;(d=(l=this.props).onInput)==null||d.call(l,((n=this.input.current)==null?void 0:n.textContent)||"")},"onInput");this.onBlur=o(t=>{ip&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=o(t=>{var n,l;switch(ip&&console.debug("keydown",t),t.stopPropagation(),t.key){case"Escape":t.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":t.shiftKey||(t.preventDefault(),this.finishEditing());break;default:break}(l=(n=this.props).onKeyDown)==null||l.call(n,t)},"onKeyDown")}render(){let t=(0,qT.default)("inline-input",this.props.className);return Th.default.createElement("span",{ref:this.input,tabIndex:0,className:t,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(t){var n,l;t.content!==this.props.content&&((l=(n=this.props).onInput)==null||l.call(n,this.props.content))}};o(Vs,"ValueEditor");var KT=pe(Xn());function cf(e){let[t,n]=(0,op.useState)(e.isValid(e.content)),l=(0,op.useRef)(null),d=o(p=>{var w;e.isValid(p)?e.onEditDone(p):(w=l.current)==null||w.resetValue()},"onEditDone"),v=(0,KT.default)(e.className,t?"has-success":"has-warning");return op.default.createElement(Vs,Ft(Le({},e),{className:v,onInput:p=>n(e.isValid(p)),onEditDone:d,ref:l}))}o(cf,"ValidateEditor");function Rx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o(Rx,"_defineProperty");function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),n.push.apply(n,l)}return n}o(GT,"ownKeys");function my(e){for(var t=1;tn[l.level])));case QT:case cF:return Le(Le({},e),ep(e,_h[t.cmd](t.data,l=>e.filters[l.level])));default:return e}}o(Wx,"reduce");function ek(e){return{type:JT,filter:e}}o(ek,"toggleFilter");function sp(){return{type:ZT}}o(sp,"toggleVisibility");function tk(e,t="web"){let n={id:Math.random().toString(),message:e,level:t};return{type:QT,cmd:"add",data:n}}o(tk,"add");var rk="UI_OPTION_UPDATE_START",nk="UI_OPTION_UPDATE_SUCCESS",ik="UI_OPTION_UPDATE_ERROR",dF={};function Bx(e=dF,t){switch(t.type){case rk:return Ft(Le({},e),{[t.option]:{isUpdating:!0,value:t.value,error:!1}});case nk:return Ft(Le({},e),{[t.option]:void 0});case ik:let n=e[t.option].value;return typeof n=="boolean"&&(n=!n),Ft(Le({},e),{[t.option]:{value:n,isUpdating:!1,error:t.error}});case dy:return{};default:return e}}o(Bx,"reducer");function ok(e,t){return{type:rk,option:e,value:t}}o(ok,"startUpdate");function sk(e){return{type:nk,option:e}}o(sk,"updateSuccess");function lk(e,t){return{type:ik,option:e,error:t}}o(lk,"updateError");var ak=gy({flow:mx,modal:Dx,optionsEditor:Bx});var Zn;(function(v){v.INIT="CONNECTION_INIT",v.FETCHING="CONNECTION_FETCHING",v.ESTABLISHED="CONNECTION_ESTABLISHED",v.ERROR="CONNECTION_ERROR",v.OFFLINE="CONNECTION_OFFLINE"})(Zn||(Zn={}));var hF={state:Zn.INIT,message:void 0};function Ux(e=hF,t){switch(t.type){case Zn.ESTABLISHED:case Zn.FETCHING:case Zn.ERROR:case Zn.OFFLINE:return{state:t.type,message:t.message};default:return e}}o(Ux,"reducer");function uk(){return{type:Zn.FETCHING}}o(uk,"startFetching");function fk(){return{type:Zn.ESTABLISHED}}o(fk,"connectionEstablished");function ck(e){return{type:Zn.ERROR,message:e}}o(ck,"connectionError");var pk={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],command_history:!0,confdir:"~/.mitmproxy",connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,export_preserve_original_ip:!1,http2:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:8080,map_local:[],map_remote:[],mode:"regular",modify_body:[],modify_headers:[],onboarding:!0,onboarding_host:"mitm.it",onboarding_port:80,proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_use_headers:[],showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,tcp_hosts:[],termlog_verbosity:"info",tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",upstream_auth:void 0,upstream_cert:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var zx="OPTIONS_RECEIVE",jx="OPTIONS_UPDATE";function $x(e=pk,t){switch(t.type){case zx:let n={};for(let[d,{value:v}]of Object.entries(t.data))n[d]=v;return n;case jx:let l=Le({},e);for(let[d,{value:v}]of Object.entries(t.data))l[d]=v;return l;default:return e}}o($x,"reducer");function mF(e,t,n){return Oa(this,null,function*(){try{let l=yield Et.put("/options",{[e]:t});if(l.status===200)n(sk(e));else throw yield l.text()}catch(l){n(lk(e,l))}})}o(mF,"pureSendUpdate");var vF=mF;function lp(e,t){return n=>{n(ok(e,t)),vF(e,t,n)}}o(lp,"update");function dk(){return e=>Et("/options/save",{method:"POST"})}o(dk,"save");var hk="COMMANDBAR_TOGGLE_VISIBILITY",gF={visible:!1};function qx(e=gF,t){switch(t.type){case hk:return Ft(Le({},e),{visible:!e.visible});default:return e}}o(qx,"reducer");function yy(){return{type:hk}}o(yy,"toggleVisibility");function mk(e){return function(t){var n=t.dispatch,l=t.getState;return function(d){return function(v){return typeof v=="function"?v(n,l,e):d(v)}}}}o(mk,"createThunkMiddleware");var vk=mk();vk.withExtraArgument=mk;var gk=vk;var yF=window.MITMWEB_CONF||{static:!1,version:"1.2.3",contentViews:["Auto","Raw"]};function Vx(e=yF,t){return e}o(Vx,"reducer");var wF={},xF=o((e=wF,t)=>{switch(t.type){case zx:return t.data;case jx:return Le(Le({},e),t.data);default:return e}},"reducer"),yk=xF;var SF=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Hx,CF=gy({commandBar:qx,eventLog:Wx,flows:Mx,connection:Ux,ui:ak,options:$x,options_meta:yk,conf:Vx}),_F=o(e=>Ix(CF,e,SF(XT(gk))),"createAppStore"),ap=_F(void 0),$t=o(()=>$s(),"useAppDispatch"),at=dx;var Zi=pe(Re());var wk=pe(xh()),xk=pe(Xn()),Kx=class extends Zi.Component{constructor(){super(...arguments);this.container=Zi.default.createRef();this.nameInput=Zi.default.createRef();this.valueInput=Zi.default.createRef();this.render=o(()=>{let[t,n]=this.props.item;return Zi.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},Zi.default.createElement(Vs,{ref:this.nameInput,className:"kv-key",content:t,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,n])}),":\xA0",Zi.default.createElement(Vs,{ref:this.valueInput,className:"kv-value",content:n,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([t,l]),placeholder:"empty"}))},"render");this.onClick=o(t=>{t.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=o(t=>{var n;t.target===((n=this.valueInput.current)==null?void 0:n.input.current)&&t.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}};o(Kx,"Row");var up=class extends Zi.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=o(()=>{this.rowRefs={};let t=this.state.currentList.map((n,l)=>Zi.default.createElement(Kx,{key:l,item:n,onEditStart:()=>this.currentlyEditing=l,onEditDone:d=>this.onEditDone(l,d),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:d=>this.rowRefs[l]=d}));return Zi.default.createElement("div",{className:(0,xk.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},t,Zi.default.createElement("div",{onClick:n=>{n.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=o((t,n)=>{let l=[...this.state.currentList];n[0]?l[t]=n:l.splice(t,1),this.currentlyEditing=void 0,(0,wk.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=o(t=>{if(this.justFinishedEditing)return;let n=[...this.state.currentList];n.splice(t+1,0,["",""]),this.setState({currentList:n},()=>{var l,d;return(d=(l=this.rowRefs[t+1])==null?void 0:l.nameInput.current)==null?void 0:d.startEditing()})},"onClickEmptyArea");this.onTabNext=o(t=>{t==this.state.currentList.length-1&&this.onClickEmptyArea(t)},"onTabNext");this.onMouseDown=o(t=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static getDerivedStateFromProps(t,n){return t.data!==n.initialList?{currentList:t.data||[],initialList:t.data}:null}};o(up,"KeyValueListEditor");var Gt=pe(Re());var kh=pe(Re());var wy=80;function xy(e,t){let[n,l]=(0,kh.useState)(),[d,v]=(0,kh.useState)();return(0,kh.useEffect)(()=>{d&&d.abort();let p=new AbortController;return Et(e,{signal:p.signal}).then(w=>{if(!w.ok)throw`${w.status} ${w.statusText}`.trim();return w.text()}).then(w=>{l(w)}).catch(w=>{p.signal.aborted||l(`Error getting content: ${w}.`)}),v(p),()=>{p.signal.aborted||p.abort()}},[e,t]),n}o(xy,"useContent");var Oh=pe(Re()),Sy=Oh.default.memo(o(function({icon:t,text:n,className:l,title:d,onOpenFile:v,onClick:p}){let w;return Oh.default.createElement("a",{href:"#",onClick:_=>{w.click(),p&&p(_)},className:l,title:d},Oh.default.createElement("i",{className:"fa fa-fw "+t}),n,Oh.default.createElement("input",{ref:_=>w=_,className:"hidden",type:"file",onChange:_=>{_.preventDefault(),_.target.files&&_.target.files.length>0&&v(_.target.files[0]),w.value=""}}))},"FileChooser"));var fp=pe(Re()),Sk=pe(Xn());function Cr({onClick:e,children:t,icon:n,disabled:l,className:d,title:v}){return fp.createElement("button",{className:(0,Sk.default)(d,"btn btn-default"),onClick:l?void 0:e,disabled:l,title:v},n&&fp.createElement(fp.Fragment,null,fp.createElement("i",{className:"fa "+n}),"\xA0"),t)}o(Cr,"Button");var Nh=pe(Re()),kk=pe(Re());var Lh=pe(Re()),_k=pe(Xn()),bk=pe(Ck()),Ek=pe(xh());function Tk(e){return e&&e.replace(/\r\n|\r/g,` +`)}o(Tk,"normalizeLineEndings");var cp=class extends Lh.Component{constructor(t){super(t);this.state={isFocused:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||bk.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&Tk(this.codeMirror.getValue())!==Tk(t.value))if(this.props.preserveScrollPosition){var n=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(n.left,n.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let l in t.options)t.options.hasOwnProperty(l)&&this.setOptionIfChanged(l,t.options[l])}setOptionIfChanged(t,n){let l=this.codeMirror.getOption(t);Ek.default.isEqual(l,n)||this.codeMirror.setOption(t,n)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,n){this.props.onChange&&n.origin!=="setValue"&&this.props.onChange(t.getValue(),n)}render(){let t=(0,_k.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return Lh.createElement("div",{className:t},Lh.createElement("textarea",{ref:n=>this.textareaNode=n,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};o(cp,"CodeMirror"),cp.defaultProps={preserveScrollPosition:!1};var Ph=class extends kk.Component{constructor(){super(...arguments);this.editor=Nh.createRef();this.getContent=o(()=>{var t;return(t=this.editor.current)==null?void 0:t.codeMirror.getValue()},"getContent");this.render=o(()=>{let t={lineNumbers:!0};return Nh.createElement("div",{className:"codeeditor",onKeyDown:n=>n.stopPropagation()},Nh.createElement(cp,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:t}))},"render")}};o(Ph,"CodeEditor");var pf=pe(Re()),bF=pf.default.memo(o(function({lines:t,maxLines:n,showMore:l}){return t.length===0?null:pf.default.createElement("pre",null,t.map((d,v)=>v===n?pf.default.createElement("button",{key:"showmore",onClick:l,className:"btn btn-xs btn-info"},pf.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," Show more"):pf.default.createElement("div",{key:v},d.map(([p,w],_)=>pf.default.createElement("span",{key:_,className:p},w)))))},"LineRenderer")),Cy=bF;var wf=pe(Re());var ci=pe(Re());var _y=pe(Re());var Xx=o(function(t){return t.reduce(function(n,l){var d=l[0],v=l[1];return n[d]=v,n},{})},"fromEntries"),Qx=typeof window!="undefined"&&window.document&&window.document.createElement?_y.useLayoutEffect:_y.useEffect;var ru=pe(Re());var jr="top",Sn="bottom",tn="right",rn="left",by="auto",Za=[jr,Sn,tn,rn],Al="start",Ey="end",Ok="clippingParents",Ty="viewport",pp="popper",Lk="reference",Zx=Za.reduce(function(e,t){return e.concat([t+"-"+Al,t+"-"+Ey])},[]),ky=[].concat(Za,[by]).reduce(function(e,t){return e.concat([t,t+"-"+Al,t+"-"+Ey])},[]),EF="beforeRead",TF="read",kF="afterRead",OF="beforeMain",LF="main",NF="afterMain",PF="beforeWrite",MF="write",AF="afterWrite",Nk=[EF,TF,kF,OF,LF,NF,PF,MF,AF];function Cn(e){return e?(e.nodeName||"").toLowerCase():null}o(Cn,"getNodeName");function Ar(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}o(Ar,"getWindow");function Dl(e){var t=Ar(e).Element;return e instanceof t||e instanceof Element}o(Dl,"isElement");function $r(e){var t=Ar(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}o($r,"isHTMLElement");function Oy(e){if(typeof ShadowRoot=="undefined")return!1;var t=Ar(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}o(Oy,"isShadowRoot");function DF(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var l=t.styles[n]||{},d=t.attributes[n]||{},v=t.elements[n];!$r(v)||!Cn(v)||(Object.assign(v.style,l),Object.keys(d).forEach(function(p){var w=d[p];w===!1?v.removeAttribute(p):v.setAttribute(p,w===!0?"":w)}))})}o(DF,"applyStyles");function RF(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(l){var d=t.elements[l],v=t.attributes[l]||{},p=Object.keys(t.styles.hasOwnProperty(l)?t.styles[l]:n[l]),w=p.reduce(function(_,O){return _[O]="",_},{});!$r(d)||!Cn(d)||(Object.assign(d.style,w),Object.keys(v).forEach(function(_){d.removeAttribute(_)}))})}}o(RF,"effect");var Pk={name:"applyStyles",enabled:!0,phase:"write",fn:DF,effect:RF,requires:["computeStyles"]};function _n(e){return e.split("-")[0]}o(_n,"getBasePlacement");var Ja=Math.round;function Oo(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),l=1,d=1;return $r(e)&&t&&(l=n.width/e.offsetWidth||1,d=n.height/e.offsetHeight||1),{width:Ja(n.width/l),height:Ja(n.height/d),top:Ja(n.top/d),right:Ja(n.right/l),bottom:Ja(n.bottom/d),left:Ja(n.left/l),x:Ja(n.left/l),y:Ja(n.top/d)}}o(Oo,"getBoundingClientRect");function df(e){var t=Oo(e),n=e.offsetWidth,l=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-l)<=1&&(l=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:l}}o(df,"getLayoutRect");function Mh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Oy(n)){var l=t;do{if(l&&e.isSameNode(l))return!0;l=l.parentNode||l.host}while(l)}return!1}o(Mh,"contains");function fi(e){return Ar(e).getComputedStyle(e)}o(fi,"getComputedStyle");function Jx(e){return["table","td","th"].indexOf(Cn(e))>=0}o(Jx,"isTableElement");function Mn(e){return((Dl(e)?e.ownerDocument:e.document)||window.document).documentElement}o(Mn,"getDocumentElement");function Rl(e){return Cn(e)==="html"?e:e.assignedSlot||e.parentNode||(Oy(e)?e.host:null)||Mn(e)}o(Rl,"getParentNode");function Mk(e){return!$r(e)||fi(e).position==="fixed"?null:e.offsetParent}o(Mk,"getTrueOffsetParent");function FF(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&$r(e)){var l=fi(e);if(l.position==="fixed")return null}for(var d=Rl(e);$r(d)&&["html","body"].indexOf(Cn(d))<0;){var v=fi(d);if(v.transform!=="none"||v.perspective!=="none"||v.contain==="paint"||["transform","perspective"].indexOf(v.willChange)!==-1||t&&v.willChange==="filter"||t&&v.filter&&v.filter!=="none")return d;d=d.parentNode}return null}o(FF,"getContainingBlock");function es(e){for(var t=Ar(e),n=Mk(e);n&&Jx(n)&&fi(n).position==="static";)n=Mk(n);return n&&(Cn(n)==="html"||Cn(n)==="body"&&fi(n).position==="static")?t:n||FF(e)||t}o(es,"getOffsetParent");function hf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}o(hf,"getMainAxisFromPlacement");var Lo=Math.max,eu=Math.min,Ah=Math.round;function mf(e,t,n){return Lo(e,eu(t,n))}o(mf,"within");function Dh(){return{top:0,right:0,bottom:0,left:0}}o(Dh,"getFreshSideObject");function Rh(e){return Object.assign({},Dh(),e)}o(Rh,"mergePaddingObject");function Fh(e,t){return t.reduce(function(n,l){return n[l]=e,n},{})}o(Fh,"expandToHashMap");var IF=o(function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Rh(typeof t!="number"?t:Fh(t,Za))},"toPaddingObject");function HF(e){var t,n=e.state,l=e.name,d=e.options,v=n.elements.arrow,p=n.modifiersData.popperOffsets,w=_n(n.placement),_=hf(w),O=[rn,tn].indexOf(w)>=0,D=O?"height":"width";if(!(!v||!p)){var Y=IF(d.padding,n),W=df(v),X=_==="y"?jr:rn,te=_==="y"?Sn:tn,Q=n.rects.reference[D]+n.rects.reference[_]-p[_]-n.rects.popper[D],R=p[_]-n.rects.reference[_],P=es(v),F=P?_==="y"?P.clientHeight||0:P.clientWidth||0:0,K=Q/2-R/2,V=Y[X],ue=F-W[D]-Y[te],ie=F/2-W[D]/2+K,de=mf(V,ie,ue),ge=_;n.modifiersData[l]=(t={},t[ge]=de,t.centerOffset=de-ie,t)}}o(HF,"arrow");function WF(e){var t=e.state,n=e.options,l=n.element,d=l===void 0?"[data-popper-arrow]":l;d!=null&&(typeof d=="string"&&(d=t.elements.popper.querySelector(d),!d)||!Mh(t.elements.popper,d)||(t.elements.arrow=d))}o(WF,"effect");var Ak={name:"arrow",enabled:!0,phase:"main",fn:HF,effect:WF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var BF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UF(e){var t=e.x,n=e.y,l=window,d=l.devicePixelRatio||1;return{x:Ah(Ah(t*d)/d)||0,y:Ah(Ah(n*d)/d)||0}}o(UF,"roundOffsetsByDPR");function Dk(e){var t,n=e.popper,l=e.popperRect,d=e.placement,v=e.offsets,p=e.position,w=e.gpuAcceleration,_=e.adaptive,O=e.roundOffsets,D=O===!0?UF(v):typeof O=="function"?O(v):v,Y=D.x,W=Y===void 0?0:Y,X=D.y,te=X===void 0?0:X,Q=v.hasOwnProperty("x"),R=v.hasOwnProperty("y"),P=rn,F=jr,K=window;if(_){var V=es(n),ue="clientHeight",ie="clientWidth";V===Ar(n)&&(V=Mn(n),fi(V).position!=="static"&&(ue="scrollHeight",ie="scrollWidth")),V=V,d===jr&&(F=Sn,te-=V[ue]-l.height,te*=w?1:-1),d===rn&&(P=tn,W-=V[ie]-l.width,W*=w?1:-1)}var de=Object.assign({position:p},_&&BF);if(w){var ge;return Object.assign({},de,(ge={},ge[F]=R?"0":"",ge[P]=Q?"0":"",ge.transform=(K.devicePixelRatio||1)<2?"translate("+W+"px, "+te+"px)":"translate3d("+W+"px, "+te+"px, 0)",ge))}return Object.assign({},de,(t={},t[F]=R?te+"px":"",t[P]=Q?W+"px":"",t.transform="",t))}o(Dk,"mapToStyles");function zF(e){var t=e.state,n=e.options,l=n.gpuAcceleration,d=l===void 0?!0:l,v=n.adaptive,p=v===void 0?!0:v,w=n.roundOffsets,_=w===void 0?!0:w;if(!1)var O;var D={placement:_n(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:d};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dk(Object.assign({},D,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:p,roundOffsets:_})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dk(Object.assign({},D,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:_})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}o(zF,"computeStyles");var Rk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zF,data:{}};var Ly={passive:!0};function jF(e){var t=e.state,n=e.instance,l=e.options,d=l.scroll,v=d===void 0?!0:d,p=l.resize,w=p===void 0?!0:p,_=Ar(t.elements.popper),O=[].concat(t.scrollParents.reference,t.scrollParents.popper);return v&&O.forEach(function(D){D.addEventListener("scroll",n.update,Ly)}),w&&_.addEventListener("resize",n.update,Ly),function(){v&&O.forEach(function(D){D.removeEventListener("scroll",n.update,Ly)}),w&&_.removeEventListener("resize",n.update,Ly)}}o(jF,"effect");var Fk={name:"eventListeners",enabled:!0,phase:"write",fn:o(function(){},"fn"),effect:jF,data:{}};var $F={left:"right",right:"left",bottom:"top",top:"bottom"};function dp(e){return e.replace(/left|right|bottom|top/g,function(t){return $F[t]})}o(dp,"getOppositePlacement");var qF={start:"end",end:"start"};function Ny(e){return e.replace(/start|end/g,function(t){return qF[t]})}o(Ny,"getOppositeVariationPlacement");function vf(e){var t=Ar(e),n=t.pageXOffset,l=t.pageYOffset;return{scrollLeft:n,scrollTop:l}}o(vf,"getWindowScroll");function gf(e){return Oo(Mn(e)).left+vf(e).scrollLeft}o(gf,"getWindowScrollBarX");function eS(e){var t=Ar(e),n=Mn(e),l=t.visualViewport,d=n.clientWidth,v=n.clientHeight,p=0,w=0;return l&&(d=l.width,v=l.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=l.offsetLeft,w=l.offsetTop)),{width:d,height:v,x:p+gf(e),y:w}}o(eS,"getViewportRect");function tS(e){var t,n=Mn(e),l=vf(e),d=(t=e.ownerDocument)==null?void 0:t.body,v=Lo(n.scrollWidth,n.clientWidth,d?d.scrollWidth:0,d?d.clientWidth:0),p=Lo(n.scrollHeight,n.clientHeight,d?d.scrollHeight:0,d?d.clientHeight:0),w=-l.scrollLeft+gf(e),_=-l.scrollTop;return fi(d||n).direction==="rtl"&&(w+=Lo(n.clientWidth,d?d.clientWidth:0)-v),{width:v,height:p,x:w,y:_}}o(tS,"getDocumentRect");function yf(e){var t=fi(e),n=t.overflow,l=t.overflowX,d=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+d+l)}o(yf,"isScrollParent");function Py(e){return["html","body","#document"].indexOf(Cn(e))>=0?e.ownerDocument.body:$r(e)&&yf(e)?e:Py(Rl(e))}o(Py,"getScrollParent");function tu(e,t){var n;t===void 0&&(t=[]);var l=Py(e),d=l===((n=e.ownerDocument)==null?void 0:n.body),v=Ar(l),p=d?[v].concat(v.visualViewport||[],yf(l)?l:[]):l,w=t.concat(p);return d?w:w.concat(tu(Rl(p)))}o(tu,"listScrollParents");function hp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}o(hp,"rectToClientRect");function VF(e){var t=Oo(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}o(VF,"getInnerBoundingClientRect");function Ik(e,t){return t===Ty?hp(eS(e)):$r(t)?VF(t):hp(tS(Mn(e)))}o(Ik,"getClientRectFromMixedType");function KF(e){var t=tu(Rl(e)),n=["absolute","fixed"].indexOf(fi(e).position)>=0,l=n&&$r(e)?es(e):e;return Dl(l)?t.filter(function(d){return Dl(d)&&Mh(d,l)&&Cn(d)!=="body"}):[]}o(KF,"getClippingParents");function rS(e,t,n){var l=t==="clippingParents"?KF(e):[].concat(t),d=[].concat(l,[n]),v=d[0],p=d.reduce(function(w,_){var O=Ik(e,_);return w.top=Lo(O.top,w.top),w.right=eu(O.right,w.right),w.bottom=eu(O.bottom,w.bottom),w.left=Lo(O.left,w.left),w},Ik(e,v));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}o(rS,"getClippingRect");function Ks(e){return e.split("-")[1]}o(Ks,"getVariation");function Ih(e){var t=e.reference,n=e.element,l=e.placement,d=l?_n(l):null,v=l?Ks(l):null,p=t.x+t.width/2-n.width/2,w=t.y+t.height/2-n.height/2,_;switch(d){case jr:_={x:p,y:t.y-n.height};break;case Sn:_={x:p,y:t.y+t.height};break;case tn:_={x:t.x+t.width,y:w};break;case rn:_={x:t.x-n.width,y:w};break;default:_={x:t.x,y:t.y}}var O=d?hf(d):null;if(O!=null){var D=O==="y"?"height":"width";switch(v){case Al:_[O]=_[O]-(t[D]/2-n[D]/2);break;case Ey:_[O]=_[O]+(t[D]/2-n[D]/2);break;default:}}return _}o(Ih,"computeOffsets");function ts(e,t){t===void 0&&(t={});var n=t,l=n.placement,d=l===void 0?e.placement:l,v=n.boundary,p=v===void 0?Ok:v,w=n.rootBoundary,_=w===void 0?Ty:w,O=n.elementContext,D=O===void 0?pp:O,Y=n.altBoundary,W=Y===void 0?!1:Y,X=n.padding,te=X===void 0?0:X,Q=Rh(typeof te!="number"?te:Fh(te,Za)),R=D===pp?Lk:pp,P=e.elements.reference,F=e.rects.popper,K=e.elements[W?R:D],V=rS(Dl(K)?K:K.contextElement||Mn(e.elements.popper),p,_),ue=Oo(P),ie=Ih({reference:ue,element:F,strategy:"absolute",placement:d}),de=hp(Object.assign({},F,ie)),ge=D===pp?de:ue,we={top:V.top-ge.top+Q.top,bottom:ge.bottom-V.bottom+Q.bottom,left:V.left-ge.left+Q.left,right:ge.right-V.right+Q.right},qe=e.modifiersData.offset;if(D===pp&&qe){var Je=qe[d];Object.keys(we).forEach(function(be){var yt=[tn,Sn].indexOf(be)>=0?1:-1,Be=[jr,Sn].indexOf(be)>=0?"y":"x";we[be]+=Je[Be]*yt})}return we}o(ts,"detectOverflow");function nS(e,t){t===void 0&&(t={});var n=t,l=n.placement,d=n.boundary,v=n.rootBoundary,p=n.padding,w=n.flipVariations,_=n.allowedAutoPlacements,O=_===void 0?ky:_,D=Ks(l),Y=D?w?Zx:Zx.filter(function(te){return Ks(te)===D}):Za,W=Y.filter(function(te){return O.indexOf(te)>=0});W.length===0&&(W=Y);var X=W.reduce(function(te,Q){return te[Q]=ts(e,{placement:Q,boundary:d,rootBoundary:v,padding:p})[_n(Q)],te},{});return Object.keys(X).sort(function(te,Q){return X[te]-X[Q]})}o(nS,"computeAutoPlacement");function GF(e){if(_n(e)===by)return[];var t=dp(e);return[Ny(e),t,Ny(t)]}o(GF,"getExpandedFallbackPlacements");function YF(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var d=n.mainAxis,v=d===void 0?!0:d,p=n.altAxis,w=p===void 0?!0:p,_=n.fallbackPlacements,O=n.padding,D=n.boundary,Y=n.rootBoundary,W=n.altBoundary,X=n.flipVariations,te=X===void 0?!0:X,Q=n.allowedAutoPlacements,R=t.options.placement,P=_n(R),F=P===R,K=_||(F||!te?[dp(R)]:GF(R)),V=[R].concat(K).reduce(function(st,_r){return st.concat(_n(_r)===by?nS(t,{placement:_r,boundary:D,rootBoundary:Y,padding:O,flipVariations:te,allowedAutoPlacements:Q}):_r)},[]),ue=t.rects.reference,ie=t.rects.popper,de=new Map,ge=!0,we=V[0],qe=0;qe=0,Ve=Be?"width":"height",Ke=ts(t,{placement:Je,boundary:D,rootBoundary:Y,altBoundary:W,padding:O}),Ge=Be?yt?tn:rn:yt?Sn:jr;ue[Ve]>ie[Ve]&&(Ge=dp(Ge));var Yt=dp(Ge),ut=[];if(v&&ut.push(Ke[be]<=0),w&&ut.push(Ke[Ge]<=0,Ke[Yt]<=0),ut.every(function(st){return st})){we=Je,ge=!1;break}de.set(Je,ut)}if(ge)for(var Dr=te?3:1,qt=o(function(_r){var Bt=V.find(function(Ut){var ne=de.get(Ut);if(ne)return ne.slice(0,_r).every(function(et){return et})});if(Bt)return we=Bt,"break"},"_loop"),_t=Dr;_t>0;_t--){var wt=qt(_t);if(wt==="break")break}t.placement!==we&&(t.modifiersData[l]._skip=!0,t.placement=we,t.reset=!0)}}o(YF,"flip");var Hk={name:"flip",enabled:!0,phase:"main",fn:YF,requiresIfExists:["offset"],data:{_skip:!1}};function Wk(e,t,n){return n===void 0&&(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}}o(Wk,"getSideOffsets");function Bk(e){return[jr,tn,Sn,rn].some(function(t){return e[t]>=0})}o(Bk,"isAnySideFullyClipped");function XF(e){var t=e.state,n=e.name,l=t.rects.reference,d=t.rects.popper,v=t.modifiersData.preventOverflow,p=ts(t,{elementContext:"reference"}),w=ts(t,{altBoundary:!0}),_=Wk(p,l),O=Wk(w,d,v),D=Bk(_),Y=Bk(O);t.modifiersData[n]={referenceClippingOffsets:_,popperEscapeOffsets:O,isReferenceHidden:D,hasPopperEscaped:Y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":D,"data-popper-escaped":Y})}o(XF,"hide");var Uk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XF};function QF(e,t,n){var l=_n(e),d=[rn,jr].indexOf(l)>=0?-1:1,v=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,p=v[0],w=v[1];return p=p||0,w=(w||0)*d,[rn,tn].indexOf(l)>=0?{x:w,y:p}:{x:p,y:w}}o(QF,"distanceAndSkiddingToXY");function ZF(e){var t=e.state,n=e.options,l=e.name,d=n.offset,v=d===void 0?[0,0]:d,p=ky.reduce(function(D,Y){return D[Y]=QF(Y,t.rects,v),D},{}),w=p[t.placement],_=w.x,O=w.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=_,t.modifiersData.popperOffsets.y+=O),t.modifiersData[l]=p}o(ZF,"offset");var zk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ZF};function JF(e){var t=e.state,n=e.name;t.modifiersData[n]=Ih({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}o(JF,"popperOffsets");var jk={name:"popperOffsets",enabled:!0,phase:"read",fn:JF,data:{}};function iS(e){return e==="x"?"y":"x"}o(iS,"getAltAxis");function eI(e){var t=e.state,n=e.options,l=e.name,d=n.mainAxis,v=d===void 0?!0:d,p=n.altAxis,w=p===void 0?!1:p,_=n.boundary,O=n.rootBoundary,D=n.altBoundary,Y=n.padding,W=n.tether,X=W===void 0?!0:W,te=n.tetherOffset,Q=te===void 0?0:te,R=ts(t,{boundary:_,rootBoundary:O,padding:Y,altBoundary:D}),P=_n(t.placement),F=Ks(t.placement),K=!F,V=hf(P),ue=iS(V),ie=t.modifiersData.popperOffsets,de=t.rects.reference,ge=t.rects.popper,we=typeof Q=="function"?Q(Object.assign({},t.rects,{placement:t.placement})):Q,qe={x:0,y:0};if(!!ie){if(v||w){var Je=V==="y"?jr:rn,be=V==="y"?Sn:tn,yt=V==="y"?"height":"width",Be=ie[V],Ve=ie[V]+R[Je],Ke=ie[V]-R[be],Ge=X?-ge[yt]/2:0,Yt=F===Al?de[yt]:ge[yt],ut=F===Al?-ge[yt]:-de[yt],Dr=t.elements.arrow,qt=X&&Dr?df(Dr):{width:0,height:0},_t=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dh(),wt=_t[Je],st=_t[be],_r=mf(0,de[yt],qt[yt]),Bt=K?de[yt]/2-Ge-_r-wt-we:Yt-_r-wt-we,Ut=K?-de[yt]/2+Ge+_r+st+we:ut+_r+st+we,ne=t.elements.arrow&&es(t.elements.arrow),et=ne?V==="y"?ne.clientTop||0:ne.clientLeft||0:0,br=t.modifiersData.offset?t.modifiersData.offset[t.placement][V]:0,zt=ie[V]+Bt-br-et,jt=ie[V]+Ut-br;if(v){var xe=mf(X?eu(Ve,zt):Ve,Be,X?Lo(Ke,jt):Ke);ie[V]=xe,qe[V]=xe-Be}if(w){var Er=V==="x"?jr:rn,on=V==="x"?Sn:tn,Dn=ie[ue],ei=Dn+R[Er],sn=Dn-R[on],Vt=mf(X?eu(ei,zt):ei,Dn,X?Lo(sn,jt):sn);ie[ue]=Vt,qe[ue]=Vt-Dn}}t.modifiersData[l]=qe}}o(eI,"preventOverflow");var $k={name:"preventOverflow",enabled:!0,phase:"main",fn:eI,requiresIfExists:["offset"]};function oS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}o(oS,"getHTMLElementScroll");function sS(e){return e===Ar(e)||!$r(e)?vf(e):oS(e)}o(sS,"getNodeScroll");function tI(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,l=t.height/e.offsetHeight||1;return n!==1||l!==1}o(tI,"isElementScaled");function lS(e,t,n){n===void 0&&(n=!1);var l=$r(t),d=$r(t)&&tI(t),v=Mn(t),p=Oo(e,d),w={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(l||!l&&!n)&&((Cn(t)!=="body"||yf(v))&&(w=sS(t)),$r(t)?(_=Oo(t,!0),_.x+=t.clientLeft,_.y+=t.clientTop):v&&(_.x=gf(v))),{x:p.left+w.scrollLeft-_.x,y:p.top+w.scrollTop-_.y,width:p.width,height:p.height}}o(lS,"getCompositeRect");function rI(e){var t=new Map,n=new Set,l=[];e.forEach(function(v){t.set(v.name,v)});function d(v){n.add(v.name);var p=[].concat(v.requires||[],v.requiresIfExists||[]);p.forEach(function(w){if(!n.has(w)){var _=t.get(w);_&&d(_)}}),l.push(v)}return o(d,"sort"),e.forEach(function(v){n.has(v.name)||d(v)}),l}o(rI,"order");function aS(e){var t=rI(e);return Nk.reduce(function(n,l){return n.concat(t.filter(function(d){return d.phase===l}))},[])}o(aS,"orderModifiers");function uS(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}o(uS,"debounce");function fS(e){var t=e.reduce(function(n,l){var d=n[l.name];return n[l.name]=d?Object.assign({},d,l,{options:Object.assign({},d.options,l.options),data:Object.assign({},d.data,l.data)}):l,n},{});return Object.keys(t).map(function(n){return t[n]})}o(fS,"mergeByName");var qk={placement:"bottom",modifiers:[],strategy:"absolute"};function Vk(){for(var e=arguments.length,t=new Array(e),n=0;nci.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function pi(l){var d=l,{onClick:e,children:t}=d,n=Fs(d,["onClick","children"]);return ci.default.createElement("li",null,ci.default.createElement("a",Le({href:"#",onClick:o(p=>{p.preventDefault(),e()},"click")},n),t))}o(pi,"MenuItem");var nu=ci.default.memo(o(function(w){var _=w,{text:t,children:n,options:l,className:d,onOpen:v}=_,p=Fs(_,["text","children","options","className","onOpen"]);let[O,D]=(0,ci.useState)(null),[Y,W]=(0,ci.useState)(!1),[X,te]=(0,ci.useState)(null),{styles:Q,attributes:R}=pS(O,X,Le({},l)),P=o(K=>{W(K),v&&v(K)},"setOpen");(0,ci.useEffect)(()=>{!X||document.addEventListener("click",K=>{X.contains(K.target)?document.addEventListener("click",()=>P(!1),{once:!0}):(K.preventDefault(),K.stopPropagation(),P(!1))},{once:!0,capture:!0})},[X]);let F;return Y?F=ci.default.createElement("ul",Le({className:"dropdown-menu show",ref:te,style:Q.popper},R.popper),n):F=null,ci.default.createElement(ci.default.Fragment,null,ci.default.createElement("a",Le({href:"#",ref:D,className:(0,Qk.default)(d,{open:Y}),onClick:K=>{K.preventDefault(),P(!0)}},p),t),F)},"Dropdown"));function Hh({value:e,onChange:t}){let n=at(d=>d.conf.contentViews||[]),l=wf.default.createElement("span",null,wf.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",wf.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",wf.default.createElement("span",{className:"caret"}));return wf.default.createElement(nu,{text:l,className:"btn btn-default btn-xs",options:{placement:"top-start"}},n.map(d=>wf.default.createElement(pi,{key:d,onClick:()=>t(d)},d.toLowerCase().replace("_"," "))))}o(Hh,"ViewSelector");function dS({flow:e,message:t}){let n=$t(),l=e.request===t?"request":"response",d=at(te=>te.ui.flow.contentViewFor[e.id+l]||"Auto"),v=(0,Gt.useRef)(null),[p,w]=(0,Gt.useState)(wy),_=(0,Gt.useCallback)(()=>w(Math.max(1024,p*2)),[p]),[O,D]=(0,Gt.useState)(!1),Y;O?Y=zr.getContentURL(e,t):Y=zr.getContentURL(e,t,d,p+1);let W=xy(Y,t.contentHash),X=(0,Gt.useMemo)(()=>{if(W&&!O)try{return JSON.parse(W)}catch(te){return{description:"Network Error",lines:[[["error",`${W}`]]]}}else return},[W]);if(O)return Gt.default.createElement("div",{className:"contentview",key:"edit"},Gt.default.createElement("div",{className:"controls"},Gt.default.createElement("h5",null,"[Editing]"),Gt.default.createElement(Cr,{onClick:o(()=>Oa(this,null,function*(){var R;let Q=(R=v.current)==null?void 0:R.getContent();yield n(Di(e,{[l]:{content:Q}})),D(!1)}),"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",Gt.default.createElement(Cr,{onClick:()=>D(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),Gt.default.createElement(Ph,{ref:v,initialContent:W||""}));{let te=X?X.description:"Loading...";return Gt.default.createElement("div",{className:"contentview",key:"view"},Gt.default.createElement("div",{className:"controls"},Gt.default.createElement("h5",null,te),Gt.default.createElement(Cr,{onClick:()=>D(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",Gt.default.createElement(Sy,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Q=>n(BT(e,Q,l)),className:"btn btn-default btn-xs"}),"\xA0",Gt.default.createElement(Hh,{value:d,onChange:Q=>n(jg(e.id+l,Q))})),hS.matches(t)&&Gt.default.createElement(hS,{flow:e,message:t}),Gt.default.createElement(Cy,{lines:(X==null?void 0:X.lines)||[],maxLines:p,showMore:_}))}}o(dS,"HttpMessage");var uI=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon)$/i;hS.matches=e=>uI.test(zr.getContentType(e)||"");function hS({flow:e,message:t}){return Gt.default.createElement("div",{className:"flowview-image"},Gt.default.createElement("img",{src:zr.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}o(hS,"ViewImage");function fI({flow:e}){let t=$t();return Wt.createElement("div",{className:"first-line request-line"},Wt.createElement("div",null,Wt.createElement(cf,{content:e.request.method,onEditDone:n=>t(Di(e,{request:{method:n}})),isValid:n=>n.length>0}),"\xA0",Wt.createElement(cf,{content:ko.pretty_url(e.request),onEditDone:n=>t(Di(e,{request:Le({path:""},kx(n))})),isValid:n=>{var l;return!!((l=kx(n))==null?void 0:l.host)}}),"\xA0",Wt.createElement(cf,{content:e.request.http_version,onEditDone:n=>t(Di(e,{request:{http_version:n}})),isValid:Ox})))}o(fI,"RequestLine");function cI({flow:e}){let t=$t();return Wt.createElement("div",{className:"first-line response-line"},Wt.createElement(cf,{content:e.response.http_version,onEditDone:n=>t(Di(e,{response:{http_version:n}})),isValid:Ox}),"\xA0",Wt.createElement(cf,{content:e.response.status_code+"",onEditDone:n=>t(Di(e,{response:{code:parseInt(n)}})),isValid:n=>/^\d+$/.test(n)}),e.response.http_version!=="HTTP/2.0"&&Wt.createElement(Wt.Fragment,null,"\xA0",Wt.createElement(Vs,{content:e.response.reason,onEditDone:n=>t(Di(e,{response:{msg:n}}))})))}o(cI,"ResponseLine");function pI({flow:e,message:t}){let n=$t(),l=e.request===t?"request":"response";return Wt.createElement(up,{className:"headers",data:t.headers,onChange:d=>n(Di(e,{[l]:{headers:d}}))})}o(pI,"Headers");function dI({flow:e,message:t}){let n=$t(),l=e.request===t?"request":"response";return!zr.get_first_header(t,/^trailer$/i)?null:Wt.createElement(Wt.Fragment,null,Wt.createElement("hr",null),Wt.createElement("h5",null,"HTTP Trailers"),Wt.createElement(up,{className:"trailers",data:t.trailers,onChange:v=>n(Di(e,{[l]:{trailers:v}}))}))}o(dI,"Trailers");var Jk=Wt.memo(o(function({flow:t,message:n}){let l=t.request===n?"request":"response",d=t.request===n?fI:cI;return Wt.createElement("section",{className:l},Wt.createElement(d,{flow:t}),Wt.createElement(pI,{flow:t,message:n}),Wt.createElement("hr",null),Wt.createElement(dS,{key:t.id+l,flow:t,message:n}),Wt.createElement(dI,{flow:t,message:n}))},"Message"));function mS(){let e=at(t=>t.flows.byId[t.flows.selected[0]]);return Wt.createElement(Jk,{flow:e,message:e.request})}o(mS,"Request");mS.displayName="Request";function vS(){let e=at(t=>t.flows.byId[t.flows.selected[0]]);return Wt.createElement(Jk,{flow:e,message:e.response})}o(vS,"Response");vS.displayName="Response";var _e=pe(Re());function eO({conn:e}){var n,l,d;let t=null;return"address"in e?t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(n=e.address)==null?void 0:n.join(":"))),e.peername&&_e.createElement("tr",null,_e.createElement("td",null,"Resolved address:"),_e.createElement("td",null,e.peername.join(":"))),e.sockname&&_e.createElement("tr",null,_e.createElement("td",null,"Source address:"),_e.createElement("td",null,e.sockname.join(":")))):((l=e.peername)==null?void 0:l[0])&&(t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(d=e.peername)==null?void 0:d.join(":"))))),_e.createElement("table",{className:"connection-table"},_e.createElement("tbody",null,t,e.sni?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),_e.createElement("td",null,e.sni)):null,e.alpn?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),_e.createElement("td",null,e.alpn)):null,e.tls_version?_e.createElement("tr",null,_e.createElement("td",null,"TLS Version:"),_e.createElement("td",null,e.tls_version)):null,e.cipher?_e.createElement("tr",null,_e.createElement("td",null,"TLS Cipher:"),_e.createElement("td",null,e.cipher)):null))}o(eO,"ConnectionInfo");function tO(e){return _e.createElement("dl",{className:"cert-attributes"},e.map(([t,n])=>_e.createElement(_e.Fragment,{key:t},_e.createElement("dt",null,t),_e.createElement("dd",null,n))))}o(tO,"attrList");function hI({flow:e}){var n;let t=(n=e.server_conn)==null?void 0:n.cert;return t?_e.createElement(_e.Fragment,null,_e.createElement("h4",{key:"name"},"Server Certificate"),_e.createElement("table",{className:"certificate-table"},_e.createElement("tbody",null,_e.createElement("tr",null,_e.createElement("td",null,"Type"),_e.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),_e.createElement("tr",null,_e.createElement("td",null,"SHA256 digest"),_e.createElement("td",null,t.sha256)),_e.createElement("tr",null,_e.createElement("td",null,"Valid from"),_e.createElement("td",null,Qi(t.notbefore,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Valid to"),_e.createElement("td",null,Qi(t.notafter,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Subject Alternative Names"),_e.createElement("td",null,t.altnames.join(", "))),_e.createElement("tr",null,_e.createElement("td",null,"Subject"),_e.createElement("td",null,tO(t.subject))),_e.createElement("tr",null,_e.createElement("td",null,"Issuer"),_e.createElement("td",null,tO(t.issuer))),_e.createElement("tr",null,_e.createElement("td",null,"Serial"),_e.createElement("td",null,t.serial))))):_e.createElement(_e.Fragment,null)}o(hI,"CertificateInfo");function Ay({flow:e}){var t;return _e.createElement("section",{className:"detail"},_e.createElement("h4",null,"Client Connection"),_e.createElement(eO,{conn:e.client_conn}),((t=e.server_conn)==null?void 0:t.address)&&_e.createElement(_e.Fragment,null,_e.createElement("h4",null,"Server Connection"),_e.createElement(eO,{conn:e.server_conn})),_e.createElement(hI,{flow:e}))}o(Ay,"Connection");Ay.displayName="Connection";var Wh=pe(Re());function Dy({flow:e}){return Wh.createElement("section",{className:"error"},Wh.createElement("div",{className:"alert alert-warning"},e.error.msg,Wh.createElement("div",null,Wh.createElement("small",null,Qi(e.error.timestamp)))))}o(Dy,"Error");Dy.displayName="Error";var rs=pe(Re());function mI({t:e,deltaTo:t,title:n}){return e?rs.createElement("tr",null,rs.createElement("td",null,n,":"),rs.createElement("td",null,Qi(e),t&&rs.createElement("span",{className:"text-muted"},"(",qg(1e3*(e-t)),")"))):rs.createElement("tr",null)}o(mI,"TimeStamp");function Ry({flow:e}){var l,d,v,p,w,_;let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let n=[{title:"Server conn. initiated",t:(l=e.server_conn)==null?void 0:l.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:(d=e.server_conn)==null?void 0:d.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:(v=e.server_conn)==null?void 0:v.timestamp_tls_setup,deltaTo:t},{title:"Server conn. closed",t:(p=e.server_conn)==null?void 0:p.timestamp_end,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t},{title:"Client conn. closed",t:e.client_conn.timestamp_end,deltaTo:t}];return e.type==="http"&&n.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:(w=e.response)==null?void 0:w.timestamp_start,deltaTo:t},{title:"Response complete",t:(_=e.response)==null?void 0:_.timestamp_end,deltaTo:t}),rs.createElement("section",{className:"timing"},rs.createElement("h4",null,"Timing"),rs.createElement("table",{className:"timing-table"},rs.createElement("tbody",null,n.filter(O=>!!O.t).sort((O,D)=>O.t-D.t).map(O=>rs.createElement(mI,Le({key:O.title},O))))))}o(Ry,"Timing");Ry.displayName="Timing";var iu=pe(Re());var Gs=pe(Re()),mp=pe(Re());function Bh({flow:e,messages_meta:t}){let n=$t(),l=at(O=>O.ui.flow.contentViewFor[e.id+"messages"]||"Auto"),[d,v]=(0,mp.useState)(wy),p=(0,mp.useCallback)(()=>v(Math.max(1024,d*2)),[d]),w=xy(zr.getContentURL(e,"messages",l,d+1),e.id+t.count),_=(0,mp.useMemo)(()=>w&&JSON.parse(w),[w])||[];return Gs.createElement("div",{className:"contentview"},Gs.createElement("div",{className:"controls"},Gs.createElement("h5",null,t.count," Messages"),Gs.createElement(Hh,{value:l,onChange:O=>n(jg(e.id+"messages",O))})),_.map((O,D)=>{let Y=`fa fa-fw fa-arrow-${O.from_client?"right text-primary":"left text-danger"}`,W=Gs.createElement("div",{key:D},Gs.createElement("small",null,Gs.createElement("i",{className:Y}),Gs.createElement("span",{className:"pull-right"},O.timestamp&&Qi(O.timestamp))),Gs.createElement(Cy,{lines:O.lines,maxLines:d,showMore:p}));return d-=O.lines.length,W}))}o(Bh,"Messages");function Fy({flow:e}){return iu.createElement("section",{className:"websocket"},iu.createElement("h4",null,"WebSocket"),iu.createElement(Bh,{flow:e,messages_meta:e.websocket.messages_meta}),iu.createElement(vI,{websocket:e.websocket}))}o(Fy,"WebSocket");Fy.displayName="WebSocket";function vI({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return iu.createElement("div",null,iu.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," with code ",e.close_code," ",t,".",iu.createElement("small",{className:"pull-right"},Qi(e.timestamp_end)))}o(vI,"CloseSummary");var rO=pe(Xn());var Iy=pe(Re());function Hy({flow:e}){return Iy.createElement("section",{className:"tcp"},Iy.createElement("h4",null,"TCP Data"),Iy.createElement(Bh,{flow:e,messages_meta:e.messages_meta}))}o(Hy,"TcpMessages");Hy.displayName="TCP Messages";var nO={request:mS,response:vS,error:Dy,connection:Ay,timing:Ry,websocket:Fy,messages:Hy};function Wy(e){let t;switch(e.type){case"http":t=["request","response","websocket"].filter(n=>e[n]);break;case"tcp":t=["messages"];break}return e.error&&t.push("error"),t.push("connection"),t.push("timing"),t}o(Wy,"tabsForFlow");function gS(){let e=$t(),t=at(v=>v.flows.byId[v.flows.selected[0]]),n=Wy(t),l=at(v=>v.ui.flow.tab);n.indexOf(l)<0&&(l==="response"&&t.error?l="error":l==="error"&&"response"in t?l="response":l=n[0]);let d=nO[l];return Uh.createElement("div",{className:"flow-detail"},Uh.createElement("nav",{className:"nav-tabs nav-tabs-sm"},n.map(v=>Uh.createElement("a",{key:v,href:"#",className:(0,rO.default)({active:l===v}),onClick:p=>{p.preventDefault(),e(lf(v))}},nO[v].displayName))),Uh.createElement(d,{flow:t}))}o(gS,"FlowView");function iO(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.key;return e.preventDefault(),(n,l)=>{let d=l().flows,v=d.byId[l().flows.selected[0]];switch(t){case"k":case"ArrowUp":n(uf(d,-1));break;case"j":case"ArrowDown":n(uf(d,1));break;case" ":case"PageDown":n(uf(d,10));break;case"PageUp":n(uf(d,-10));break;case"End":n(uf(d,1e10));break;case"Home":n(uf(d,-1e10));break;case"Escape":l().ui.modal.activeModal?n(hy()):n(ff(void 0));break;case"ArrowLeft":{if(!v)break;let p=Wy(v),w=l().ui.flow.tab,_=p[(Math.max(0,p.indexOf(w))-1+p.length)%p.length];n(lf(_));break}case"Tab":case"ArrowRight":{if(!v)break;let p=Wy(v),w=l().ui.flow.tab,_=p[(Math.max(0,p.indexOf(w))+1)%p.length];n(lf(_));break}case"d":{if(!v)return;n(uy(v));break}case"D":{if(!v)return;n(fy(v));break}case"a":{v&&v.intercepted&&n(rp(v));break}case"A":{n(ly());break}case"r":{v&&n(np(v));break}case"v":{v&&v.modified&&n(cy(v));break}case"x":{v&&v.intercepted&&n(ay(v));break}case"X":{n(WT());break}case"z":{n(py());break}default:return}}}o(iO,"onKeyDown");var Gh=pe(Re());var zh=pe(Re()),jh=pe(Xa()),oO=pe(Xn()),vp=class extends zh.Component{constructor(t,n){super(t,n);this.state={applied:!1,startX:0,startY:0},this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onDragEnd=this.onDragEnd.bind(this)}onMouseDown(t){this.setState({startX:t.pageX,startY:t.pageY}),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("dragend",this.onDragEnd)}onDragEnd(){jh.default.findDOMNode(this).style.transform="",window.removeEventListener("dragend",this.onDragEnd),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}onMouseUp(t){this.onDragEnd();let n=jh.default.findDOMNode(this),l=n.previousElementSibling,d=l.offsetHeight+t.pageY-this.state.startY;this.props.axis==="x"&&(d=l.offsetWidth+t.pageX-this.state.startX),l.style.flex=`0 0 ${Math.max(0,d)}px`,n.nextElementSibling.style.flex="1 1 auto",this.setState({applied:!0}),this.onResize()}onMouseMove(t){let n=0,l=0;this.props.axis==="x"?n=t.pageX-this.state.startX:l=t.pageY-this.state.startY,jh.default.findDOMNode(this).style.transform=`translate(${n}px, ${l}px)`}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(t){if(!this.state.applied)return;let n=jh.default.findDOMNode(this);n.previousElementSibling.style.flex="",n.nextElementSibling.style.flex="",t||this.setState({applied:!1}),this.onResize()}componentWillUnmount(){this.reset(!0)}render(){return zh.default.createElement("div",{className:(0,oO.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},zh.default.createElement("div",{onMouseDown:this.onMouseDown,draggable:"true"}))}};o(vp,"Splitter"),vp.defaultProps={axis:"x"};var ns=pe(Re()),Vh=pe($h()),Uy=pe(Xa());var xO=pe(yS());var wS=pe(Xa()),hO=Symbol("shouldStick"),mO=o(e=>e.scrollTop+e.clientHeight===e.scrollHeight,"isAtBottom"),By=o(e=>{var t;return Object.assign((o(t=class extends e{UNSAFE_componentWillUpdate(){let l=wS.default.findDOMNode(this);this[hO]=l.scrollTop&&mO(l),super.UNSAFE_componentWillUpdate&&super.UNSAFE_componentWillUpdate(),super.componentWillUpdate&&super.componentWillUpdate()}componentDidUpdate(){let l=wS.default.findDOMNode(this);this[hO]&&!mO(l)&&(l.scrollTop=l.scrollHeight),super.componentDidUpdate&&super.componentDidUpdate()}},"AutoScrollWrapper"),t.displayName=e.name,t),e)},"default");function gp(e=void 0){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:n,viewportTop:l,viewportHeight:d,itemHeights:v}=e,p=l+d,w=0,_=0,O=0,D=0;if(v)for(let Y=0,W=0;Yw.flows.sort.desc),l=at(w=>w.flows.sort.column),d=at(w=>w.options.web_columns),v=n?"sort-desc":"sort-asc",p=d.map(w=>Eh[w]).filter(w=>w).concat(tp);return qh.createElement("tr",null,p.map(w=>qh.createElement("th",{className:(0,vO.default)(`col-${w.name}`,l===w.name&&v),key:w.name,onClick:()=>t(HT(w.name===l&&n?void 0:w.name,w.name!==l?!1:!n))},w.headerName)))},"FlowTableHead"));var yp=pe(Re()),yO=pe(Xn());var wO=yp.default.memo(o(function({flow:t,selected:n,highlighted:l}){let d=$t(),v=at(O=>O.options.web_columns),p=(0,yO.default)({selected:n,highlighted:l,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),w=(0,yp.useCallback)(O=>{let D=O.target;for(;D.parentNode;){if(D.classList.contains("col-quickactions"))return;D=D.parentNode}d(ff(t.id))},[t]),_=v.map(O=>Eh[O]).filter(O=>O).concat(tp);return yp.default.createElement("tr",{className:p,onClick:w},_.map(O=>yp.default.createElement(O,{key:O.name,flow:t})))},"FlowRow"));var Kh=class extends ns.Component{constructor(t,n){super(t,n);this.state={vScroll:gp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}UNSAFE_componentWillMount(){window.addEventListener("resize",this.onViewportUpdate)}UNSAFE_componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){if(this.onViewportUpdate(),!this.shouldScrollIntoView)return;this.shouldScrollIntoView=!1;let{rowHeight:t,flows:n,selected:l}=this.props,d=Uy.default.findDOMNode(this),v=Uy.default.findDOMNode(this.refs.head),p=v?v.offsetHeight:0,w=n.indexOf(l)*t+p,_=w+t,O=d.scrollTop,D=d.offsetHeight;w-pO+D&&(d.scrollTop=_-D)}UNSAFE_componentWillReceiveProps(t){t.selected&&t.selected!==this.props.selected&&(this.shouldScrollIntoView=!0)}onViewportUpdate(){let t=Uy.default.findDOMNode(this),n=t.scrollTop||0,l=gp({viewportTop:n,viewportHeight:t.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});(this.state.viewportTop!==n||!(0,xO.default)(this.state.vScroll,l))&&this.setState({vScroll:l,viewportTop:n})}render(){let{vScroll:t,viewportTop:n}=this.state,{flows:l,selected:d,highlight:v}=this.props,p=v?af.parse(v):()=>!1;return ns.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate},ns.createElement("table",null,ns.createElement("thead",{ref:"head",style:{transform:`translateY(${n}px)`}},ns.createElement(gO,null)),ns.createElement("tbody",null,ns.createElement("tr",{style:{height:t.paddingTop}}),l.slice(t.start,t.end).map(w=>ns.createElement(wO,{key:w.id,flow:w,selected:w===d,highlighted:p(w)})),ns.createElement("tr",{style:{height:t.paddingBottom}}))))}};o(Kh,"FlowTable"),gc(Kh,"propTypes",{flows:Vh.default.array.isRequired,rowHeight:Vh.default.number,highlight:Vh.default.string,selected:Vh.default.object}),gc(Kh,"defaultProps",{rowHeight:32});var wI=By(Kh),SO=Ai(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(wI);function xS(){let e=at(t=>!!t.flows.byId[t.flows.selected[0]]);return Gh.createElement("div",{className:"main-view"},Gh.createElement(SO,null),e&&Gh.createElement(vp,{key:"splitter"}),e&&Gh.createElement(gS,{key:"flowDetails"}))}o(xS,"MainView");var Po=pe(Re()),kO=pe(Xn());var Jn=pe(Re());var is=pe(Re()),zy=pe(Xa()),CO=pe(Xn());var Ji=pe(Re());var eo=class extends Ji.Component{constructor(t,n){super(t,n);this.state={doc:eo.doc}}componentDidMount(){eo.xhr||(eo.xhr=Et("/filter-help").then(t=>t.json()),eo.xhr.catch(()=>{eo.xhr=null})),this.state.doc||eo.xhr.then(t=>{eo.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?Ji.default.createElement("table",{className:"table table-condensed"},Ji.default.createElement("tbody",null,t.commands.map(n=>Ji.default.createElement("tr",{key:n[1],onClick:l=>this.props.selectHandler(n[0].split(" ")[0]+" ")},Ji.default.createElement("td",null,n[0].replace(" ","\xA0")),Ji.default.createElement("td",null,n[1]))),Ji.default.createElement("tr",{key:"docs-link"},Ji.default.createElement("td",{colSpan:2},Ji.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank"},Ji.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):Ji.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};o(eo,"FilterDocs");var xf=class extends is.Component{constructor(t,n){super(t,n);this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}UNSAFE_componentWillReceiveProps(t){this.setState({value:t.value})}isValid(t){try{return t&&af.parse(t),!0}catch(n){return!1}}getDesc(){if(!this.state.value)return is.default.createElement(eo,{selectHandler:this.selectFilter});try{return af.parse(this.state.value).desc}catch(t){return""+t}}onChange(t){let n=t.target.value;this.setState({value:n}),this.isValid(n)&&this.props.onChange(n)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(t){(t.key==="Escape"||t.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),t.stopPropagation()}selectFilter(t){this.setState({value:t}),zy.default.findDOMNode(this.refs.input).focus()}blur(){zy.default.findDOMNode(this.refs.input).blur()}select(){zy.default.findDOMNode(this.refs.input).select()}render(){let{type:t,color:n,placeholder:l}=this.props,{value:d,focus:v,mousefocus:p}=this.state;return is.default.createElement("div",{className:(0,CO.default)("filter-input input-group",{"has-error":!this.isValid(d)})},is.default.createElement("span",{className:"input-group-addon"},is.default.createElement("i",{className:"fa fa-fw fa-"+t,style:{color:n}})),is.default.createElement("input",{type:"text",ref:"input",placeholder:l,className:"form-control",value:d,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(v||p)&&is.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},is.default.createElement("div",{className:"arrow"}),is.default.createElement("div",{className:"popover-content"},this.getDesc())))}};o(xf,"FilterInput");wp.title="Start";function wp(){return Jn.createElement("div",{className:"main-menu"},Jn.createElement("div",{className:"menu-group"},Jn.createElement("div",{className:"menu-content"},Jn.createElement(SI,null),Jn.createElement(CI,null)),Jn.createElement("div",{className:"menu-legend"},"Find")),Jn.createElement("div",{className:"menu-group"},Jn.createElement("div",{className:"menu-content"},Jn.createElement(xI,null),Jn.createElement(_I,null)),Jn.createElement("div",{className:"menu-legend"},"Intercept")))}o(wp,"StartMenu");function xI(){let e=$t(),t=at(n=>n.options.intercept);return Jn.createElement(xf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:n=>e(lp("intercept",n))})}o(xI,"InterceptInput");function SI(){let e=$t(),t=at(n=>n.flows.filter);return Jn.createElement(xf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:n=>e(oy(n))})}o(SI,"FlowFilterInput");function CI(){let e=$t(),t=at(n=>n.flows.highlight);return Jn.createElement(xf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:n=>e(sy(n))})}o(CI,"HighlightInput");function _I(){let e=$t();return Jn.createElement(Cr,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(ly())},"Resume All")}o(_I,"ResumeAll");var qr=pe(Re());var Sf=pe(Re());function SS({value:e,onChange:t,children:n}){return Sf.createElement("div",{className:"menu-entry"},Sf.createElement("label",null,Sf.createElement("input",{type:"checkbox",checked:e,onChange:t}),n))}o(SS,"MenuToggle");function jy({name:e,children:t}){let n=$t(),l=at(d=>d.options[e]);return Sf.createElement(SS,{value:!!l,onChange:()=>n(lp(e,!l))},t)}o(jy,"OptionsToggle");function _O(){let e=$s(),t=at(n=>n.eventLog.visible);return Sf.createElement(SS,{value:t,onChange:()=>e(sp())},"Display Event Log")}o(_O,"EventlogToggle");function bO(){let e=$s(),t=at(n=>n.commandBar.visible);return Sf.createElement(SS,{value:t,onChange:()=>e(yy())},"Display Command Bar")}o(bO,"CommandBarToggle");var CS=pe(Re());function _S({children:e,resource:t}){let n=`https://docs.mitmproxy.org/stable/${t}`;return CS.createElement("a",{target:"_blank",href:n},e||CS.createElement("i",{className:"fa fa-question-circle"}))}o(_S,"DocsLink");var $y=pe(Re());function No({children:e}){return window.MITMWEB_CONF&&window.MITMWEB_CONF.static?null:$y.createElement($y.Fragment,null,e)}o(No,"HideInStatic");qy.title="Options";function qy(){let e=$t(),t=o(()=>$T("OptionModal"),"openOptions");return qr.createElement("div",null,qr.createElement(No,null,qr.createElement("div",{className:"menu-group"},qr.createElement("div",{className:"menu-content"},qr.createElement(Cr,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",qr.createElement("sup",null,"alpha"))),qr.createElement("div",{className:"menu-legend"},"Options Editor")),qr.createElement("div",{className:"menu-group"},qr.createElement("div",{className:"menu-content"},qr.createElement(jy,{name:"anticache"},"Strip cache headers ",qr.createElement(_S,{resource:"overview-features/#anticache"})),qr.createElement(jy,{name:"showhost"},"Use host header for display"),qr.createElement(jy,{name:"ssl_insecure"},"Don't verify server certificates")),qr.createElement("div",{className:"menu-legend"},"Quick Options"))),qr.createElement("div",{className:"menu-group"},qr.createElement("div",{className:"menu-content"},qr.createElement(_O,null),qr.createElement(bO,null)),qr.createElement("div",{className:"menu-legend"},"View Options")))}o(qy,"OptionMenu");var di=pe(Re());var EO=di.memo(o(function(){let t=$s();return di.createElement(nu,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},di.createElement("li",null,di.createElement(Sy,{icon:"fa-folder-open",text:"\xA0Open...",onClick:n=>n.stopPropagation(),onOpenFile:n=>{t(zT(n)),document.body.click()}})),di.createElement(pi,{onClick:()=>t(UT())},di.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save..."),di.createElement(pi,{onClick:()=>confirm("Delete all flows?")&&t(py())},di.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),di.createElement(No,null,di.createElement(Zk,null),di.createElement("li",null,di.createElement("a",{href:"http://mitm.it/",target:"_blank"},di.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var ot=pe(Re());var xp=o((e,t)=>Oa(void 0,null,function*(){let n=yield Sh("export",t,`@${e.id}`);n.value?yield navigator.clipboard.writeText(n.value):n.error?alert(n.error):console.error(n)}),"copy");Sp.title="Flow";function Sp(){let e=$t(),t=at(n=>n.flows.byId[n.flows.selected[0]]);return t?ot.createElement("div",{className:"flow-menu"},ot.createElement(No,null,ot.createElement("div",{className:"menu-group"},ot.createElement("div",{className:"menu-content"},ot.createElement(Cr,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(np(t)),disabled:!Gg(t)},"Replay"),ot.createElement(Cr,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(fy(t))},"Duplicate"),ot.createElement(Cr,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(cy(t))},"Revert"),ot.createElement(Cr,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(uy(t))},"Delete"),ot.createElement(kI,{flow:t})),ot.createElement("div",{className:"menu-legend"},"Flow Modification"))),ot.createElement("div",{className:"menu-group"},ot.createElement("div",{className:"menu-content"},ot.createElement(bI,{flow:t}),ot.createElement(EI,{flow:t})),ot.createElement("div",{className:"menu-legend"},"Export")),ot.createElement(No,null,ot.createElement("div",{className:"menu-group"},ot.createElement("div",{className:"menu-content"},ot.createElement(Cr,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(rp(t))},"Resume"),ot.createElement(Cr,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(ay(t))},"Abort")),ot.createElement("div",{className:"menu-legend"},"Interception")))):ot.createElement("div",null)}o(Sp,"FlowMenu");function bI({flow:e}){var t;if(e.type!=="http")return ot.createElement(Cr,{icon:"fa-download",onClick:()=>0,disabled:!0},"Download");if(e.request.contentLength&&!((t=e.response)==null?void 0:t.contentLength))return ot.createElement(Cr,{icon:"fa-download",onClick:()=>window.location.href=zr.getContentURL(e,e.request)},"Download");if(e.response){let n=e.response;if(!e.request.contentLength&&e.response.contentLength)return ot.createElement(Cr,{icon:"fa-download",onClick:()=>window.location.href=zr.getContentURL(e,n)},"Download");if(e.request.contentLength&&e.response.contentLength)return ot.createElement(nu,{text:ot.createElement(Cr,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},ot.createElement(pi,{onClick:()=>window.location.href=zr.getContentURL(e,e.request)},"Download request"),ot.createElement(pi,{onClick:()=>window.location.href=zr.getContentURL(e,n)},"Download response"))}return null}o(bI,"DownloadButton");function EI({flow:e}){return ot.createElement(nu,{className:"",text:ot.createElement(Cr,{title:"Export flow.",icon:"fa-clone",onClick:()=>1,disabled:e.type==="tcp"},"Export\u25BE"),options:{placement:"bottom-start"}},ot.createElement(pi,{onClick:()=>xp(e,"raw_request")},"Copy raw request"),ot.createElement(pi,{onClick:()=>xp(e,"raw_response")},"Copy raw response"),ot.createElement(pi,{onClick:()=>xp(e,"raw")},"Copy raw request and response"),ot.createElement(pi,{onClick:()=>xp(e,"curl")},"Copy as cURL"),ot.createElement(pi,{onClick:()=>xp(e,"httpie")},"Copy as HTTPie"))}o(EI,"ExportButton");var TI={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"};function kI({flow:e}){let t=$t();return ot.createElement(nu,{className:"",text:ot.createElement(Cr,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:()=>1},"Mark\u25BE"),options:{placement:"bottom-start"}},ot.createElement(pi,{onClick:()=>t(Di(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(TI).map(([n,l])=>ot.createElement(pi,{key:n,onClick:()=>t(Di(e,{marked:n}))},l," ",n.replace(/[:_]/g," "))))}o(kI,"MarkButton");var ou=pe(Re());var TO=ou.memo(o(function(){let t=at(l=>l.connection.state),n=at(l=>l.connection.message);switch(t){case Zn.INIT:return ou.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case Zn.FETCHING:return ou.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case Zn.ESTABLISHED:return ou.createElement("span",{className:"connection-indicator established"},"connected");case Zn.ERROR:return ou.createElement("span",{className:"connection-indicator error",title:n},"connection lost");case Zn.OFFLINE:return ou.createElement("span",{className:"connection-indicator offline"},"offline");default:let l=t;throw"unknown connection state"}},"ConnectionIndicator"));function bS(){let e=at(w=>w.flows.selected.filter(_=>_ in w.flows.byId)),[t,n]=(0,Po.useState)(()=>wp),[l,d]=(0,Po.useState)(!1),v=[wp,qy];e.length>0?(l||(n(()=>Sp),d(!0)),v.push(Sp)):(l&&d(!1),t===Sp&&n(()=>wp));function p(w,_){_.preventDefault(),n(()=>w)}return o(p,"handleClick"),Po.default.createElement("header",null,Po.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},Po.default.createElement(EO,null),v.map(w=>Po.default.createElement("a",{key:w.title,href:"#",className:(0,kO.default)({active:w===t}),onClick:_=>p(w,_)},w.title)),Po.default.createElement(No,null,Po.default.createElement(TO,null))),Po.default.createElement("div",null,Po.default.createElement(t,null)))}o(bS,"Header");var Qe=pe(Re()),OO=pe(Xn());var Vy=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function n(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},w={Expr:vr},_=vr,O=o(function(H,J){return[H,...J]},"peg$c0"),D=o(function(H){return[H]},"peg$c1"),Y=o(function(){return""},"peg$c2"),W={type:"other",description:"string"},X='"',te={type:"literal",value:'"',description:'"\\""'},Q=o(function(H){return H.join("")},"peg$c6"),R="'",P={type:"literal",value:"'",description:`"'"`},F=/^["\\]/,K={type:"class",value:'["\\\\]',description:'["\\\\]'},V={type:"any",description:"any character"},ue=o(function(H){return H},"peg$c12"),ie="\\",de={type:"literal",value:"\\",description:'"\\\\"'},ge=/^['\\]/,we={type:"class",value:"['\\\\]",description:"['\\\\]"},qe=/^['"\\]/,Je={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},be="n",yt={type:"literal",value:"n",description:'"n"'},Be=o(function(){return` +`},"peg$c21"),Ve="r",Ke={type:"literal",value:"r",description:'"r"'},Ge=o(function(){return"\r"},"peg$c24"),Yt="t",ut={type:"literal",value:"t",description:'"t"'},Dr=o(function(){return" "},"peg$c27"),qt={type:"other",description:"whitespace"},_t=/^[ \t\n\r]/,wt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},st={type:"other",description:"control character"},_r=/^[|&!()~"]/,Bt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},Ut={type:"other",description:"optional whitespace"},ne=0,et=0,br=[{line:1,column:1,seenCR:!1}],zt=0,jt=[],xe=0,Er;if("startRule"in d){if(!(d.startRule in w))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=w[d.startRule]}function on(){return l.substring(et,ne)}o(on,"text");function Dn(){return cr(et,ne)}o(Dn,"location");function ei(H){throw Do(null,[{type:"other",description:H}],l.substring(et,ne),cr(et,ne))}o(ei,"expected");function sn(H){throw Do(H,null,l.substring(et,ne),cr(et,ne))}o(sn,"error");function Vt(H){var J=br[H],he,Ee;if(J)return J;for(he=H-1;!br[he];)he--;for(J=br[he],J={line:J.line,column:J.column,seenCR:J.seenCR};hezt&&(zt=ne,jt=[]),jt.push(H))}o(ft,"peg$fail");function Do(H,J,he,Ee){function Xt(At){var Rr=1;for(At.sort(function(Qt,ti){return Qt.descriptionti.description?1:0});Rr1?ti.slice(0,-1).join(", ")+" or "+ti[At.length-1]:ti[0],to=Rr?'"'+Qt(Rr)+'"':"end of input","Expected "+os+" but "+to+" found."}return o(Hl,"buildMessage"),J!==null&&Xt(J),new t(H!==null?H:Hl(J,he),J,he,Ee)}o(Do,"peg$buildException");function vr(){var H,J,he,Ee;if(H=ne,J=Ri(),J!==p){if(he=[],Ee=Fn(),Ee!==p)for(;Ee!==p;)he.push(Ee),Ee=Fn();else he=p;he!==p?(Ee=vr(),Ee!==p?(et=H,J=O(J,Ee),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p&&(H=ne,J=Ri(),J!==p&&(et=H,J=D(J)),H=J,H===p)){for(H=ne,J=[],he=Fn();he!==p;)J.push(he),he=Fn();J!==p&&(et=H,J=Y()),H=J}return H}o(vr,"peg$parseExpr");function Ri(){var H,J,he,Ee;if(xe++,H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,xe===0&&ft(te)),J!==p){for(he=[],Ee=ln();Ee!==p;)he.push(Ee),Ee=ln();he!==p?(l.charCodeAt(ne)===34?(Ee=X,ne++):(Ee=p,xe===0&&ft(te)),Ee!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===39?(J=R,ne++):(J=p,xe===0&&ft(P)),J!==p){for(he=[],Ee=Rn();Ee!==p;)he.push(Ee),Ee=Rn();he!==p?(l.charCodeAt(ne)===39?(Ee=R,ne++):(Ee=p,xe===0&&ft(P)),Ee!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,J=ne,xe++,he=bn(),xe--,he===p?J=void 0:(ne=J,J=p),J!==p){if(he=[],Ee=hi(),Ee!==p)for(;Ee!==p;)he.push(Ee),Ee=hi();else he=p;he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,xe===0&&ft(te)),J!==p){for(he=[],Ee=ln();Ee!==p;)he.push(Ee),Ee=ln();he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p)if(H=ne,l.charCodeAt(ne)===39?(J=R,ne++):(J=p,xe===0&&ft(P)),J!==p){for(he=[],Ee=Rn();Ee!==p;)he.push(Ee),Ee=Rn();he!==p?(et=H,J=Q(he),H=J):(ne=H,H=p)}else ne=H,H=p}}}return xe--,H===p&&(J=p,xe===0&&ft(W)),H}o(Ri,"peg$parseStringLiteral");function ln(){var H,J,he;return H=ne,J=ne,xe++,F.test(l.charAt(ne))?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(K)),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,xe===0&&ft(de)),J!==p?(he=mi(),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(ln,"peg$parseDoubleStringChar");function Rn(){var H,J,he;return H=ne,J=ne,xe++,ge.test(l.charAt(ne))?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(we)),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,xe===0&&ft(de)),J!==p?(he=mi(),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(Rn,"peg$parseSingleStringChar");function hi(){var H,J,he;return H=ne,J=ne,xe++,he=Fn(),xe--,he===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(he=l.charAt(ne),ne++):(he=p,xe===0&&ft(V)),he!==p?(et=H,J=ue(he),H=J):(ne=H,H=p)):(ne=H,H=p),H}o(hi,"peg$parseUnquotedStringChar");function mi(){var H,J;return qe.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(Je)),H===p&&(H=ne,l.charCodeAt(ne)===110?(J=be,ne++):(J=p,xe===0&&ft(yt)),J!==p&&(et=H,J=Be()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===114?(J=Ve,ne++):(J=p,xe===0&&ft(Ke)),J!==p&&(et=H,J=Ge()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===116?(J=Yt,ne++):(J=p,xe===0&&ft(ut)),J!==p&&(et=H,J=Dr()),H=J))),H}o(mi,"peg$parseEscapeSequence");function Fn(){var H,J;return xe++,_t.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(wt)),xe--,H===p&&(J=p,xe===0&&ft(qt)),H}o(Fn,"peg$parsews");function bn(){var H,J;return xe++,_r.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,xe===0&&ft(Bt)),xe--,H===p&&(J=p,xe===0&&ft(st)),H}o(bn,"peg$parsecc");function Ys(){var H,J;for(xe++,H=[],J=Fn();J!==p;)H.push(J),J=Fn();return xe--,H===p&&(J=p,xe===0&&ft(Ut)),H}if(o(Ys,"peg$parse__"),Er=_(),Er!==p&&ne===l.length)return Er;throw Er!==p&&ne{t&&t.current.addEventListener("DOMNodeInserted",n=>{let l=n.currentTarget;l.scroll({top:l.scrollHeight,behavior:"auto"})})},[]),Qe.default.createElement("div",{className:"command-result",ref:t},e.map((n,l)=>Qe.default.createElement("div",{key:l},Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"$ ",n.command)),n.result)))}o(OI,"Results");function LI({nextArgs:e,currentArg:t,help:n,description:l,availableCommands:d}){let v=[];for(let p=0;p0&&Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Argument suggestion:")," ",v),(n==null?void 0:n.includes("->"))&&Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Signature help: "),n),l&&Qe.default.createElement("div",null,"# ",l),Qe.default.createElement("div",null,Qe.default.createElement("strong",null,"Available Commands: "),Qe.default.createElement("p",{className:"available-commands"},JSON.stringify(d)))))}o(LI,"CommandHelp");function TS(){let[e,t]=(0,Qe.useState)(""),[n,l]=(0,Qe.useState)(""),[d,v]=(0,Qe.useState)(0),[p,w]=(0,Qe.useState)([]),[_,O]=(0,Qe.useState)([]),[D,Y]=(0,Qe.useState)({}),[W,X]=(0,Qe.useState)([]),[te,Q]=(0,Qe.useState)(0),[R,P]=(0,Qe.useState)(""),[F,K]=(0,Qe.useState)(""),[V,ue]=(0,Qe.useState)([]),[ie,de]=(0,Qe.useState)([]),[ge,we]=(0,Qe.useState)(void 0);(0,Qe.useEffect)(()=>{Et("/commands",{method:"GET"}).then(Be=>Be.json()).then(Be=>{Y(Be),w(ES(Be)),O(Object.keys(Be))}).catch(Be=>console.error(Be))},[]),(0,Qe.useEffect)(()=>{Sh("commands.history.get").then(Be=>{de(Be.value)}).catch(Be=>console.error(Be))},[]);let qe=o((Be,Ve)=>{var ut,Dr,qt;let Ke=Vy.parse(Ve),Ge=Vy.parse(Be);P((ut=D[Ke[0]])==null?void 0:ut.signature_help),K(((Dr=D[Ke[0]])==null?void 0:Dr.help)||""),w(ES(D,Ge[0])),O(ES(D,Ke[0]));let Yt=(qt=D[Ke[0]])==null?void 0:qt.parameters.map(_t=>_t.name);Yt&&(X([Ke[0],...Yt]),Q(Ke.length-1))},"parseCommand"),Je=o(Be=>{t(Be.target.value),l(Be.target.value),v(0)},"onChange"),be=o(Be=>{if(Be.key==="Enter"){let[Ve,...Ke]=Vy.parse(e);de([...ie,e]),Sh("commands.history.add",e).catch(()=>0),Et.post(`/commands/${Ve}`,{arguments:Ke}).then(Ge=>Ge.json()).then(Ge=>{we(void 0),X([]),ue([...V,{command:e,result:JSON.stringify(Ge.value||Ge.error)}])}).catch(Ge=>{we(void 0),X([]),ue([...V,{command:e,result:Ge.toString()}])}),P(""),K(""),t(""),l(""),v(0),w(_)}if(Be.key==="ArrowUp"){let Ve;ge===void 0?Ve=ie.length-1:Ve=Math.max(0,ge-1),t(ie[Ve]),l(ie[Ve]),we(Ve)}if(Be.key==="ArrowDown"){if(ge===void 0)return;if(ge==ie.length-1)t(""),l(""),we(void 0);else{let Ve=ge+1;t(ie[Ve]),l(ie[Ve]),we(Ve)}}Be.key==="Tab"&&(t(p[d]),v((d+1)%p.length),Be.preventDefault()),Be.stopPropagation()},"onKeyDown"),yt=o(Be=>{if(!e){O(Object.keys(D));return}qe(n,e),Be.stopPropagation()},"onKeyUp");return Qe.default.createElement("div",{className:"command"},Qe.default.createElement("div",{className:"command-title"},"Command Result"),Qe.default.createElement(OI,{results:V}),Qe.default.createElement(LI,{nextArgs:W,currentArg:te,help:R,description:F,availableCommands:_}),Qe.default.createElement("div",{className:(0,OO.default)("command-input input-group")},Qe.default.createElement("span",{className:"input-group-addon"},Qe.default.createElement("i",{className:"fa fa-fw fa-terminal"})),Qe.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Je,onKeyDown:be,onKeyUp:yt})))}o(TS,"CommandBar");var Il=pe(Re()),Cp=pe($h());var kS=pe(Re());function OS({checked:e,onToggle:t,text:n}){return kS.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},kS.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",n)}o(OS,"ToggleButton");var Fl=pe(Re()),LS=pe($h()),LO=pe(Xa()),NO=pe(yS());var Yh=class extends Fl.Component{constructor(t){super(t);this.heights={},this.state={vScroll:gp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){this.onViewportUpdate()}onViewportUpdate(){let t=LO.default.findDOMNode(this),n=gp({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:t.scrollTop,viewportHeight:t.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});(0,NO.default)(this.state.vScroll,n)||this.setState({vScroll:n})}setHeight(t,n){if(n&&!this.heights[t]){let l=n.offsetHeight;this.heights[t]!==l&&(this.heights[t]=l,this.onViewportUpdate())}}render(){let{vScroll:t}=this.state,{events:n}=this.props;return Fl.default.createElement("pre",{onScroll:this.onViewportUpdate},Fl.default.createElement("div",{style:{height:t.paddingTop}}),n.slice(t.start,t.end).map(l=>Fl.default.createElement("div",{key:l.id,ref:d=>this.setHeight(l.id,d)},Fl.default.createElement(NI,{event:l}),l.message)),Fl.default.createElement("div",{style:{height:t.paddingBottom}}))}};o(Yh,"EventLogList"),Yh.propTypes={events:LS.default.array.isRequired,rowHeight:LS.default.number},Yh.defaultProps={rowHeight:18};function NI({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return Fl.default.createElement("i",{className:`fa fa-fw fa-${t}`})}o(NI,"LogIcon");var PO=By(Yh);var Xh=class extends Il.Component{constructor(t,n){super(t,n);this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:n,events:l,toggleFilter:d,close:v}=this.props;return Il.default.createElement("div",{className:"eventlog",style:{height:t}},Il.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",Il.default.createElement("div",{className:"pull-right"},["debug","info","web","warn","error"].map(p=>Il.default.createElement(OS,{key:p,text:p,checked:n[p],onToggle:()=>d(p)})),Il.default.createElement("i",{onClick:v,className:"fa fa-close"}))),Il.default.createElement(PO,{events:l}))}};o(Xh,"PureEventLog"),gc(Xh,"propTypes",{filters:Cp.default.object.isRequired,events:Cp.default.array.isRequired,toggleFilter:Cp.default.func.isRequired,close:Cp.default.func.isRequired,defaultHeight:Cp.default.number}),gc(Xh,"defaultProps",{defaultHeight:200});var MO=Ai(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:sp,toggleFilter:ek})(Xh);var nn=pe(Re());function NS(){let e=at(P=>P.conf.version),{mode:t,intercept:n,showhost:l,upstream_cert:d,rawtcp:v,http2:p,websocket:w,anticache:_,anticomp:O,stickyauth:D,stickycookie:Y,stream_large_bodies:W,listen_host:X,listen_port:te,server:Q,ssl_insecure:R}=at(P=>P.options);return nn.createElement("footer",null,t&&t!=="regular"&&nn.createElement("span",{className:"label label-success"},t," mode"),n&&nn.createElement("span",{className:"label label-success"},"Intercept: ",n),R&&nn.createElement("span",{className:"label label-danger"},"ssl_insecure"),l&&nn.createElement("span",{className:"label label-success"},"showhost"),!d&&nn.createElement("span",{className:"label label-success"},"no-upstream-cert"),!v&&nn.createElement("span",{className:"label label-success"},"no-raw-tcp"),!p&&nn.createElement("span",{className:"label label-success"},"no-http2"),!w&&nn.createElement("span",{className:"label label-success"},"no-websocket"),_&&nn.createElement("span",{className:"label label-success"},"anticache"),O&&nn.createElement("span",{className:"label label-success"},"anticomp"),D&&nn.createElement("span",{className:"label label-success"},"stickyauth: ",D),Y&&nn.createElement("span",{className:"label label-success"},"stickycookie: ",Y),W&&nn.createElement("span",{className:"label label-success"},"stream: ",$g(W)),nn.createElement("div",{className:"pull-right"},nn.createElement(No,null,Q&&nn.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},X||"*",":",te)),nn.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}o(NS,"Footer");var FS=pe(Re());var RS=pe(Re());var _p=pe(Re());function PS({children:e}){return _p.createElement("div",null,_p.createElement("div",{className:"modal-backdrop fade in"}),_p.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:"-1",role:"dialog","aria-labelledby":"options"},_p.createElement("div",{className:"modal-dialog modal-lg",role:"document"},_p.createElement("div",{className:"modal-content"},e))))}o(PS,"ModalLayout");var fr=pe(Re());var Mo=pe(Re()),Ao=pe($h());var AO=pe(Xn()),PI=o(e=>{e.key!=="Escape"&&e.stopPropagation()},"stopPropagation");MS.propTypes={value:Ao.default.bool.isRequired,onChange:Ao.default.func.isRequired};function MS(l){var d=l,{value:e,onChange:t}=d,n=Fs(d,["value","onChange"]);return Mo.default.createElement("div",{className:"checkbox"},Mo.default.createElement("label",null,Mo.default.createElement("input",Le({type:"checkbox",checked:e,onChange:v=>t(v.target.checked)},n)),"Enable"))}o(MS,"BooleanOption");AS.propTypes={value:Ao.default.string,onChange:Ao.default.func.isRequired};function AS(l){var d=l,{value:e,onChange:t}=d,n=Fs(d,["value","onChange"]);return Mo.default.createElement("input",Le({type:"text",value:e||"",onChange:v=>t(v.target.value)},n))}o(AS,"StringOption");function MI(e){return function(l){var d=l,{onChange:t}=d,n=Fs(d,["onChange"]);return Mo.default.createElement(e,Le({onChange:v=>t(v||null)},n))}}o(MI,"Optional");DO.propTypes={value:Ao.default.number.isRequired,onChange:Ao.default.func.isRequired};function DO(l){var d=l,{value:e,onChange:t}=d,n=Fs(d,["value","onChange"]);return Mo.default.createElement("input",Le({type:"number",value:e,onChange:v=>t(parseInt(v.target.value))},n))}o(DO,"NumberOption");RO.propTypes={value:Ao.default.string.isRequired,onChange:Ao.default.func.isRequired};function RO(d){var v=d,{value:e,onChange:t,choices:n}=v,l=Fs(v,["value","onChange","choices"]);return Mo.default.createElement("select",Le({onChange:p=>t(p.target.value),value:e},l),n.map(p=>Mo.default.createElement("option",{key:p,value:p},p)))}o(RO,"ChoicesOption");FO.propTypes={value:Ao.default.arrayOf(Ao.default.string).isRequired,onChange:Ao.default.func.isRequired};function FO(l){var d=l,{value:e,onChange:t}=d,n=Fs(d,["value","onChange"]);let v=Math.max(e.length,1);return Mo.default.createElement("textarea",Le({rows:v,value:e.join(` `),onChange:p=>t(p.target.value.split(` -`))},i))}o(AO,"StringSequenceOption");var DI={bool:TS,str:kS,int:PO,"optional str":AI(kS),"sequence of str":AO};function RI({choices:e,type:t,value:i,onChange:l,name:d,error:v}){let p,y={};if(e)p=MO,y.choices=e;else if(p=DI[t],!p)throw`unknown option type ${t}`;return p!==TS&&(y.className="form-control"),Ro.default.createElement("div",{className:(0,NO.default)({"has-error":v})},Ro.default.createElement(p,Oe({name:d,value:i,onChange:l,onKeyDown:MI},y)))}o(RI,"PureOption");var DO=Ri((e,{name:t})=>Oe(Oe({},e.options_meta[t]),e.ui.optionsEditor[t]),(e,{name:t})=>({onChange:i=>e(cf(t,i))}))(RI);var Vy=pe(xh());function FI({help:e}){return pr.default.createElement("div",{className:"help-block small"},e)}o(FI,"PureOptionHelp");var II=Ri((e,{name:t})=>({help:e.options_meta[t].help}))(FI);function HI({error:e}){return e?pr.default.createElement("div",{className:"small text-danger"},e):null}o(HI,"PureOptionError");var WI=Ri((e,{name:t})=>({error:e.ui.optionsEditor[t]&&e.ui.optionsEditor[t].error}))(HI);function BI({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if(Vy.default.isEmpty(Vy.default.compact(e))&&Vy.default.isEmpty(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return pr.default.createElement("div",{className:"small"},"Default: ",pr.default.createElement("strong",null," ",t," ")," ")}o(BI,"PureOptionDefault");var UI=Ri((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t].default}))(BI),OS=class extends pr.Component{constructor(t,i){super(t,i);this.state={title:"Options"}}componentWillUnmount(){}render(){let{hideModal:t,options:i}=this.props,{title:l}=this.state;return pr.default.createElement("div",null,pr.default.createElement("div",{className:"modal-header"},pr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>{t()}},pr.default.createElement("i",{className:"fa fa-fw fa-times"})),pr.default.createElement("div",{className:"modal-title"},pr.default.createElement("h4",null,l))),pr.default.createElement("div",{className:"modal-body"},pr.default.createElement("div",{className:"form-horizontal"},i.map(d=>pr.default.createElement("div",{key:d,className:"form-group"},pr.default.createElement("div",{className:"col-xs-6"},pr.default.createElement("label",{htmlFor:d},d),pr.default.createElement(II,{name:d})),pr.default.createElement("div",{className:"col-xs-6"},pr.default.createElement(DO,{name:d}),pr.default.createElement(WI,{name:d}),pr.default.createElement(UI,{name:d})))))),pr.default.createElement("div",{className:"modal-footer"}))}};o(OS,"PureOptionModal");var RO=Ri(e=>({options:Object.keys(e.options_meta).sort()}),{hideModal:Qg,save:RT})(OS);function zI(){return LS.createElement(bS,null,LS.createElement(RO,null))}o(zI,"OptionModal");var FO=[zI];function PS(){let e=at(i=>i.ui.modal.activeModal),t=FO.find(i=>i.name===e);return e?NS.createElement(t,null):NS.createElement("div",null)}o(PS,"PureModal");var MS=class extends Fn.Component{constructor(){super(...arguments);this.state={};this.render=o(()=>{var l;let{showEventLog:t,showCommandBar:i}=this.props;return this.state.error?(console.log("ERR",this.state),Fn.default.createElement("div",{className:"container"},Fn.default.createElement("h1",null,"mitmproxy has crashed."),Fn.default.createElement("pre",null,this.state.error.stack,Fn.default.createElement("br",null),Fn.default.createElement("br",null),"Component Stack:",(l=this.state.errorInfo)==null?void 0:l.componentStack),Fn.default.createElement("p",null,"Please lodge a bug report at ",Fn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Fn.default.createElement("div",{id:"container",tabIndex:0},Fn.default.createElement(yS,null),Fn.default.createElement(hS,null),i&&Fn.default.createElement(xS,{key:"commandbar"}),t&&Fn.default.createElement(LO,{key:"eventlog"}),Fn.default.createElement(ES,null),Fn.default.createElement(PS,null))},"render")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(t,i){this.setState({error:t,errorInfo:i})}};o(MS,"ProxyAppMain");var IO=Ri(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:tO})(MS);var au={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function $I(e){let[t,i]=window.location.hash.substr(1).split("?",2),l=t.substr(1).split("/");if(l[0]==="flows"&&l.length==3){let[d,v]=l.slice(1);e.dispatch(wf(d)),e.dispatch(uf(v))}i&&i.split("&").forEach(d=>{let[v,p]=d.split("=",2);switch(v){case au.SEARCH:e.dispatch(yy(p));break;case au.HIGHLIGHT:e.dispatch(wy(p));break;case au.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(cp());break;case au.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(Ly());break;default:console.error(`unimplemented query arg: ${d}`)}})}o($I,"updateStoreFromUrl");function jI(e){let t=e.getState(),i={[au.SEARCH]:t.flows.filter,[au.HIGHLIGHT]:t.flows.highlight,[au.SHOW_EVENTLOG]:t.eventLog.visible,[au.SHOW_COMMANDBAR]:t.commandBar.visible},l=Object.keys(i).filter(p=>i[p]).map(p=>`${p}=${i[p]}`).join("&"),d;t.flows.selected.length>0?d=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:d="/flows",l&&(d+="?"+l);let v=window.location.pathname;v==="blank"&&(v="/"),window.location.hash.substr(1)!==d&&history.replaceState(void 0,"",`${v}#${d}`)}o(jI,"updateUrlFromStore");function AS(e){$I(e),e.subscribe(()=>jI(e))}o(AS,"initialize");var qI="reset",Zh=class{constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(Pk())}fetchData(t){let i=[];this.activeFetches[t]=i,kt(`./${t}`).then(l=>l.json()).then(l=>{this.activeFetches[t]===i&&this.receive(t,l)})}onMessage(t){if(t.cmd===qI)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let i=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch(Oe({type:i},t))}}receive(t,i){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:i});let d=this.activeFetches[t];delete this.activeFetches[t],d.forEach(v=>this.onMessage(v)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(Mk())}onClose(t){this.store.dispatch(Ak(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(){console.error("websocket connection errored",arguments)}};o(Zh,"WebsocketBackend");var Jh=class{constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){kt(`./${t}`).then(i=>i.json()).then(i=>{this.receive(t,i)})}receive(t,i){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:i})}};o(Jh,"StaticBackend");AS(pp);window.MITMWEB_STATIC?window.backend=new Jh(pp):window.backend=new Zh(pp);window.addEventListener("error",e=>{pp.dispatch(Ok(`${e.message} -${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{(0,HO.render)(DS.createElement(Z1,{store:pp},DS.createElement(IO,null)),document.getElementById("mitmproxy"))});})(); +`))},n))}o(FO,"StringSequenceOption");var AI={bool:MS,str:AS,int:DO,"optional str":MI(AS),"sequence of str":FO};function DI({choices:e,type:t,value:n,onChange:l,name:d,error:v}){let p,w={};if(e)p=RO,w.choices=e;else if(p=AI[t],!p)throw`unknown option type ${t}`;return p!==MS&&(w.className="form-control"),Mo.default.createElement("div",{className:(0,AO.default)({"has-error":v})},Mo.default.createElement(p,Le({name:d,value:n,onChange:l,onKeyDown:PI},w)))}o(DI,"PureOption");var IO=Ai((e,{name:t})=>Le(Le({},e.options_meta[t]),e.ui.optionsEditor[t]),(e,{name:t})=>({onChange:n=>e(lp(t,n))}))(DI);var Ky=pe(xh());function RI({help:e}){return fr.default.createElement("div",{className:"help-block small"},e)}o(RI,"PureOptionHelp");var FI=Ai((e,{name:t})=>({help:e.options_meta[t].help}))(RI);function II({error:e}){return e?fr.default.createElement("div",{className:"small text-danger"},e):null}o(II,"PureOptionError");var HI=Ai((e,{name:t})=>({error:e.ui.optionsEditor[t]&&e.ui.optionsEditor[t].error}))(II);function WI({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if(Ky.default.isEmpty(Ky.default.compact(e))&&Ky.default.isEmpty(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return fr.default.createElement("div",{className:"small"},"Default: ",fr.default.createElement("strong",null," ",t," ")," ")}o(WI,"PureOptionDefault");var BI=Ai((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t].default}))(WI),DS=class extends fr.Component{constructor(t,n){super(t,n);this.state={title:"Options"}}componentWillUnmount(){}render(){let{hideModal:t,options:n}=this.props,{title:l}=this.state;return fr.default.createElement("div",null,fr.default.createElement("div",{className:"modal-header"},fr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>{t()}},fr.default.createElement("i",{className:"fa fa-fw fa-times"})),fr.default.createElement("div",{className:"modal-title"},fr.default.createElement("h4",null,l))),fr.default.createElement("div",{className:"modal-body"},fr.default.createElement("div",{className:"form-horizontal"},n.map(d=>fr.default.createElement("div",{key:d,className:"form-group"},fr.default.createElement("div",{className:"col-xs-6"},fr.default.createElement("label",{htmlFor:d},d),fr.default.createElement(FI,{name:d})),fr.default.createElement("div",{className:"col-xs-6"},fr.default.createElement(IO,{name:d}),fr.default.createElement(HI,{name:d}),fr.default.createElement(BI,{name:d})))))),fr.default.createElement("div",{className:"modal-footer"}))}};o(DS,"PureOptionModal");var HO=Ai(e=>({options:Object.keys(e.options_meta).sort()}),{hideModal:hy,save:dk})(DS);function UI(){return RS.createElement(PS,null,RS.createElement(HO,null))}o(UI,"OptionModal");var WO=[UI];function IS(){let e=at(n=>n.ui.modal.activeModal),t=WO.find(n=>n.name===e);return e?FS.createElement(t,null):FS.createElement("div",null)}o(IS,"PureModal");var HS=class extends An.Component{constructor(){super(...arguments);this.state={};this.render=o(()=>{var l;let{showEventLog:t,showCommandBar:n}=this.props;return this.state.error?(console.log("ERR",this.state),An.default.createElement("div",{className:"container"},An.default.createElement("h1",null,"mitmproxy has crashed."),An.default.createElement("pre",null,this.state.error.stack,An.default.createElement("br",null),An.default.createElement("br",null),"Component Stack:",(l=this.state.errorInfo)==null?void 0:l.componentStack),An.default.createElement("p",null,"Please lodge a bug report at ",An.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):An.default.createElement("div",{id:"container",tabIndex:0},An.default.createElement(bS,null),An.default.createElement(xS,null),n&&An.default.createElement(TS,{key:"commandbar"}),t&&An.default.createElement(MO,{key:"eventlog"}),An.default.createElement(NS,null),An.default.createElement(IS,null))},"render")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(t,n){this.setState({error:t,errorInfo:n})}};o(HS,"ProxyAppMain");var BO=Ai(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:iO})(HS);var su={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function zI(e){let[t,n]=window.location.hash.substr(1).split("?",2),l=t.substr(1).split("/");if(l[0]==="flows"&&l.length==3){let[d,v]=l.slice(1);e.dispatch(ff(d)),e.dispatch(lf(v))}n&&n.split("&").forEach(d=>{let[v,p]=d.split("=",2);switch(v){case su.SEARCH:e.dispatch(oy(p));break;case su.HIGHLIGHT:e.dispatch(sy(p));break;case su.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(sp());break;case su.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(yy());break;default:console.error(`unimplemented query arg: ${d}`)}})}o(zI,"updateStoreFromUrl");function jI(e){let t=e.getState(),n={[su.SEARCH]:t.flows.filter,[su.HIGHLIGHT]:t.flows.highlight,[su.SHOW_EVENTLOG]:t.eventLog.visible,[su.SHOW_COMMANDBAR]:t.commandBar.visible},l=Object.keys(n).filter(p=>n[p]).map(p=>`${p}=${n[p]}`).join("&"),d;t.flows.selected.length>0?d=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:d="/flows",l&&(d+="?"+l);let v=window.location.pathname;v==="blank"&&(v="/"),window.location.hash.substr(1)!==d&&history.replaceState(void 0,"",`${v}#${d}`)}o(jI,"updateUrlFromStore");function WS(e){zI(e),e.subscribe(()=>jI(e))}o(WS,"initialize");var $I="reset",Qh=class{constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(uk())}fetchData(t){let n=[];this.activeFetches[t]=n,Et(`./${t}`).then(l=>l.json()).then(l=>{this.activeFetches[t]===n&&this.receive(t,l)})}onMessage(t){if(t.cmd===$I)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let n=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch(Le({type:n},t))}}receive(t,n){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:n});let d=this.activeFetches[t];delete this.activeFetches[t],d.forEach(v=>this.onMessage(v)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(fk())}onClose(t){this.store.dispatch(ck(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(t){console.error("websocket connection errored",arguments)}};o(Qh,"WebsocketBackend");var Zh=class{constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){Et(`./${t}`).then(n=>n.json()).then(n=>{this.receive(t,n)})}receive(t,n){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:n})}};o(Zh,"StaticBackend");WS(ap);window.MITMWEB_STATIC?window.backend=new Zh(ap):window.backend=new Qh(ap);window.addEventListener("error",e=>{ap.dispatch(tk(`${e.message} +${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{(0,UO.render)(BS.createElement(J1,{store:ap},BS.createElement(BO,null)),document.getElementById("mitmproxy"))});})(); /* object-assign (c) Sindre Sorhus diff --git a/mitmproxy/tools/web/static/images/resourceTcpIcon.png b/mitmproxy/tools/web/static/images/resourceTcpIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..db112fe57a6df158c37fa4ef05fbd429437583d9 GIT binary patch literal 1253 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jPK-BC>eK@{oCO|{#S9GG z!XV7ZFl&wkP{HE>pAc7|BoGJ*2|1twJ3Bj|0Fbmt0uUu|K{T$kv^3BtK|#U)|NsB{ z_wVoDzkmMx`ThI%uV24@{`~p<`}c3(z5x~d`0?Y*moGrZ|M&0z-Mjbo>(|epKZCgT z_WyxoLc%|J`QNv1|Fg6EtEcy~s_N6HPai*i1SvRw{{Q~{|Mm6%)z$s&?fui!^Vin) z`}Xa>qocn~oA%+uhxhN_gOu^}|G$6#UtHXmCr^H6X8zr~_it_OZyTG>n>W9E_wMc6 zw?H+2V`Kl=*!;G({TM>zkUrAeD&(p%a<>IS6Bb+>iV{Q`_HVbj}ITdc=6)- z^XFfmKK-Mk^YP%pXV0EJefsp%p+k=!KL%=f^5n^*M~@ypeE8tOgWlfWt5>gHym+y@ zyZhd~d-w0(Z)WkK%1)d(QCeEs*w}de`t@tqu3frx>B^NW>(;G1eE9I8Lx&C?Jh*!G>dTiecXoE3 zI(6#Uv11(_9TzTK0J;GJ1OxmW(`II}dI6&i0+Rm!&jPXXp?n}!h+zKzUyQ^lfv`)Fguu))bOAj4 zoLCn7>6n1eqQR7;v zsE7?M`1P5K>?Y z&5VrJRSsU^n_v*tcCYsWgA{*A&`FJ+UVooijJEO{Z>`WTD8FFzNmKT~Z~iog^J~kd z86DZ?`q-yVrEK-tbAI(+3>$MztC|h7wr`%le18B#=T#}&zE0Vr@#z{3H@>kno- zt^-f!c*|(Ezd5b#Sg#RP;to(s}&h(`)J3(b2bSCUCc=UoX>e zE|I*x{{D*H+2#F*KWe#4CY?U>@Ev20d!fpv`3yH+80GPIUMv=IS7I-GaQ@-Nk0+;E q+x?Pe_xnG0u6XRu&&CJe-eJvkJyEItfcGgV<$AjMxvXSM}L3%%J%j3_4D)d00030zxn?F=Kl}p{k`}6tn~bx^ZyX$ z`g`v3^78TV@c;k-|KI%ofAaj?`TV^0`@8i19_aVi^!KOm_=xTB@bK^N?*IS*{~zi8 zzWDx*^ZVTT{ax++9gws~>HE9&{vYW1x%2qA^7xqU^5XIPJn8eZ?eNg; z{4MAH4(9CK>*(m{=jR{i_U85V<@EKn?(yO9`#b3JlIiB==H=z(?#}A(uj!NZ0jmhi z7;2sX006<0r~)qy|8M{Q|NsC0|NsC0ag*EvBms1j2?H#XI|Dcf&rDJ}00062lY0X| ze^=B5N^7ZW>!2vm)zg*H*ON8SGc+>R(=$=mHZ?OxQDC8GDWj)nWvyqUZ)<1oU~1;* zsTSyPgNw0(28(Ts*zJy?uQ3l>GGk1GKT2;O!k46dV#7rW_ujrx)qy z6crtVsvtHl-WMpJ05m-@NiR7%B{dC2e}P=OUPfkCm~A%5^c=n1)VzFT1wh{y=oJ*t{F;_lBom-v3wC={N?SWndrNCa zCqjV|By2&_K*xclyE?j&6hK495hR@lG94)0(~G14VtQ>~KS+AQ#7Q9O$&-*2e}GMI znKE@6$n@z`XUqgj&zg;-0AzaWl&NqqXYQ=oGv^^G0J(j})cIhy15IBrbYa}ZW6T`_mr@|8#-nFn&*q&ZVptzNTs?YgN; zCoEguzj8g236PMPxnU#F?K3xRSDpZpUNHg51Zc=i2DyD9$aJ9emMvQm3R)o{Gix?j z8mJv8y=BWbn1by)cJA7Z0e0=&15>bf-~I#A7~sHu2I>F+rib!z5q1hy00000NkvXX Hu0mjf7=YDM delta 864 zcmV-m1E2i&3X}_wMgdikM}L3y_4V`f^8f$<^78WW@$mov0Pw%y=%3Nyf5GLP&g;9| z@!09zd%o3NuHK2l@8j$6@bK^N?*IS*&M=$90EFzX*vcQ1?Y!Oe+w8>A2a| zTdvG4nDFH6`|tPNZ@JuVxcBSx-F&^!J)q1jm*S<)&M%tkuGh^jndpD3)Wr^q=(pJJ z?(XgF?EnA(;D5mO-R{aBlJnZ@+HAGld%WI=!pR+x%q^MRh{5aM=j`n4>+9+ikbnY_{W?%+Nib;iS#bN~OyznCRT(>gww0>FN0F^wUkK=c?1@snXw;$mFxs z$}5)Ik;CZd=;!C>#Sbxx$sUo|ceu_wp6T7?=iB4Q9g*Lz&*tXl<>lqlOsCE~p4Vuy z)Ml{FI-SH0iq&(qlj8xa2qX{zoB#j-$CH)*m}r#+Iz`++ba3^s;F!E z`JBXAS^rrMS*8zl)XZ9Ol+K{dVE4+QgV1oY8r}y!1Rnv zrL2GKoKT?iEpzko3kr*n70AjJ+m@6nm$}-y>y}r9g{M?jRo5U{0rGuNEztLMe!77HntrYI31lSw|LFk^++LE2y)zvMYA_-+_ZV~mf5SPtyw#D{Z=FsAR#k<+jd-_ z+vo4tISnMeZW@va(2$u4a{F?S=|JgSyLKZKv_V2mvs0000 {\n" - f" return {tflow_json}\n" - "}" + "import {HTTPFlow, TCPFlow} from '../../flow';\n" + "export function THTTPFlow(): Required {\n" + " return %s\n" + "}\n" + "export function TTCPFlow(): Required {\n" + " return %s\n" + "}" % ( + textwrap.indent(json.dumps(app.flow_to_json(tf_http), indent=4, sort_keys=True), " "), + textwrap.indent(json.dumps(app.flow_to_json(tf_tcp), indent=4, sort_keys=True), " "), + ) ) + content = content.replace(": null", ": undefined") + (Path(__file__).parent / "../../../../web/src/js/__tests__/ducks/_tflow.ts").write_bytes( content.encode() ) @@ -145,7 +148,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): return self.fetch( url, method="PUT", - body=_json.dumps(data), + body=json.dumps(data), headers={"Content-Type": "application/json"}, ) @@ -413,7 +416,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): self.master.options.anticomp = True r1 = yield ws_client.read_message() - response = _json.loads(r1) + response = json.loads(r1) assert response == { "resource": "options", "cmd": "update", diff --git a/web/gulpfile.js b/web/gulpfile.js index 9022513fe..b7dafce77 100644 --- a/web/gulpfile.js +++ b/web/gulpfile.js @@ -64,7 +64,7 @@ function scripts_prod() { return esbuild(false); } -const copy_src = ["src/images/**", "src/fonts/fontawesome-webfont.*"]; +const copy_src = ["src/images/**", "src/fonts/fontawesome-webfont.*", "!**/*.psd"]; function copy() { return gulp.src(copy_src, {base: "src/"}) diff --git a/web/src/css/flowtable.less b/web/src/css/flowtable.less index 5a5113cb7..e258814a4 100644 --- a/web/src/css/flowtable.less +++ b/web/src/css/flowtable.less @@ -184,16 +184,12 @@ border-radius: 16px; text-align: center; - &:hover, &.open { + &:hover { background-color: rgba(0, 0, 0, 5%); } } } - .col-quickactions .fa-ellipsis-h { - transform: translate(0, 3px); - } - .col-quickactions .fa-play { transform: translate(1px, 2px); } diff --git a/web/src/css/sprites.less b/web/src/css/sprites.less index 147f59080..ccd400ca7 100644 --- a/web/src/css/sprites.less +++ b/web/src/css/sprites.less @@ -48,3 +48,7 @@ .resource-icon-websocket { background-image: url(images/resourceWebSocketIcon.png); } + +.resource-icon-tcp { + background-image: url(images/resourceTcpIcon.png); +} diff --git a/web/src/images/resourceIcon.psd b/web/src/images/resourceIcon.psd new file mode 100644 index 0000000000000000000000000000000000000000..a2b3cebbb861f85e332a1a26572237c7c9f69a8d GIT binary patch literal 50131 zcmeHQeRLevb$^olC4XQUOammqU;LXzf_aLQ@YHc3O^q?~*-A!(XINQzQUdwTLmF=-M=AOS+OGX9eAC$goT{_cJA zW@bmT@~$M?oG@DL&dh!9-FM%8_uY5jow@UxTiZKCg^+))q%sg9I3Yo47(DWbAPeudz)rJP21tNHq3zP*v`o3lNUjd!QF zY`?P$S9a;GU71>35k;aikKG9TYGxF>2uPtXqTD3G1iu* z(%inQ=uG?tzAnY{)+G9pZP9cFP@-a14Ce)(>>MS1GixuOmI*3bOb1h~rS{n2iu5r60Lb-Ih%&HU!;t{C->lo^~5Y{%|Y5~swm zfAK_Ry6NM{1kFcs@l_r$$LZ%k#nJlFHr-MrP@ z(VmFLr;cOc_Lv#(-jd8j6LFuUd&Y^_)U9b|JljV!x5na|=(su6$Bo#M?8@8_&#e3N z_EcBPEtJB43wA_fu`S6+S2WWfkc>RkMjC}Qn%^N<`YJBPxv2aGNgsZZqw*WnYf}0+ zjiiJAN|wGQDKnkOrn=1bSR@+X(3ObWk|re)c*GLc9%+#fS)6r2BHKj_vKfU&*?{W= zj(+K!MRdi^w{+6DI2+PQisIZ#C(joi2`A||pVCPKc`m-BAug5DDgF!RLM&t5_!P_U zgRXQE!SCzk9A!vnRp**^mLw^S3sJrbGus+SpkLzVlq+#9nxv-X-SSA~JNr98WAjo` zv1&v@{l5y{V%VjZ**WTPByO;5VD{VHMw)mIrFQPlX!aaBOHmK-!i>2)b6qOh-3`5I z>yH8$mED|(n{?cgif5FLp>u+f2BhQacxJUqTOF5atK%J{kE%OS$A);fx!bE6uZ{Oa z^Y_%9WI} zJ(7y_q$0`Qt=YJnf33MAl8t2mqsjoc5qa`=^qMB>bCardyHrP}KW1{WW^e|SN+ptJ zDibx+5+KR4X>bnu>h3$U=}ey)&&Yf#o4$H?G_BpL)oKR5+iava-vW?E+t?W)zFNN?)JAtiyCO8vXmygVYJFWamCm%Gr>Fzt8O4Qay(1Gz zaj$xT*T%ai}hsoGts;3>}jo8q4*%=TdQ|4avd}+#(St! zmNlcFYM0g5tIn#{+hAwF+HmuDx(;%9T@1}|Q&HOOY1z&;GeQFnXdOn|pw9lJhfnJx zG)j63xzUZcAQ8#R$eQUPmkUmH!CUEJqR zPu#Au%E74BN=8Ycw51a5m?;5gktZo{Gvhs(UR&0+2FY)IL;89cP!X6xOo$xnJT6Nd z=I$8gb~ppkg)7D2j4sv462_s6rF85VRtXH7+Il5{bjf1vf@nBwG*fZv{!A+Cj0FXA zdTU)IySp_J>n`k9f^Nt}uzo3o6IvyGUbG74pk1FxMehMwkyuAp#O6I|Nc~1qegOHv zovBFIP9oO9(2Av741(9u8{Oei9Msk|k!0G3@@Qw7mE~1u%w;A1s!rbX{no{-I-pcaV8Kpu@Kil zb5uc}-{K07Vy(Ua0I!e6yQ7=4ecR1cy0AYtM$)~}?ubk0 z+GwOJ6~(x~+@qwUKwruWHF<|hgGK>_KU5mbhfry#85cqkDh;KYL!}W~8p=crEe&N9 z1zIqn(kN6KMHW@G60MuKup-Nsm5olmpbhaI2>_(AA|dH5an}OUJ9-m$Q$`PnF69b_ zm(^TKttsl*ux5~BSt?7&WB$6fFF8US?}$`_UWC-wQ%A&BJeiv7%_wg7bS8*&GAvyi zPqG3ottc`_(pm$!q2G`;*O93R_ednhOMEsZoyCT}6@Gd%Wp=x)!%`_t-W0Y$!L>+I zI*nB0Zz7X1-s3kt^)~!~o)>;J)E|k*=Xyfo8 z3B-jcmH@P&c_00+P zu~9*z!l<+sS{E3nt;?*pTUS~Y#+Y`ocByu`Rc%~seZbmgR2vJ7MaE)di7{^EjjtO2 zWXv{J8*7Yfjq8jJMwfA)@d@K^jQfqR8;=;@Fdj9&X*_MbY781f#$n^Qal-hr@fER3 zyi?qEmDnaeBHjxp`uoKD-&ys}YVoi&TQd|*aPbjE+9ldMta-*#>;2ZP#yn%bvCz1{ zs1dilN8BntWDQ!g#3Pm_9yKnss$|KHrkUh|7i;g55arym+lLC@O9{;6av9eF2JR3U zMdT!mI}_6sib>lkGnLmQk|2Fk;?C&CY+uwTARFLVPeH9rA}Ebw6WVwu#APD{r4Ppr z+y%>sT0hUGfvau?an;Wtt_BAeGqJPR+zd?s7gV8lUUw3lI{~ii-sdp)b%4Y8&0um0 z?2X{|q9(SA>qIM6Ui5~5?{I~N7u=lTR-s0Upy z>OTkdh2C?hYoG5Nvp^Bgx$gCw>u2zqPwF$D%wx{2QkI1BmjfF+&^>dFuGER^Q_=%H z<$8dhT%XKKu21lh>wz9}XLhJ&DRqUjY*}-QD$lf%EA|^JadMo-(s8K=c!C)=!4F)( zQ^yOem}tg2C%S%Z(J1sJp9x7(hwqfIOl@&F)24`_w-$5rotQ*!#9ZBhBc6ei(?|#0#7X;Z2+Ov+0Ma}9 zkfBiwVQhTxRDCo_p@^%ZJ@uc2U z?G3804Ls?=!Y2di&43dzTz8$b+GnzNZ@|dN(x}64P)m!CmZ|c$l>XerBPR-)`euZy zrPN8Q5L%7QBzOJwPCjY+~!%cv74v!H$N(P=s zu@kokm$AVCC9rUc!NRgDX|lZ;YZG0#=^f7~uLfL5YzruJxtI|fx-=|!VnUZj=+eL= zi4zAyF}F?V(gbZMMjcbtEjALK}x?$TQNv)w!JrPO);9SY~4g6Z=8{JS((uH-m4Hy&=* z-4TvLrntdsI_DcXcF>v&KIL@;Xk;){V(|Bo${uG{wRO;FD7Lh7r zKa)E^1INPSNc7CZmt^n~J3{qIoC|nNDMoV{N2vaYO1kmWjdoOL>G9LEZtBn|^ph!Y zqf}>!o8XPtL>qge2cXNq|gzED6AZXX-(! zdJYIl?lTtL22X@4KcKX1g<(e&AekRp;cQ`qDzU-lEWbq|j8FwP!m#$YdRTj?H2&nm z+R53&@2M$#gGU%@Mo$Qbp=KlFx1TRbd8K}DIt_Cd@d_| zE=$cbu8X;pAjR;xtnj(4^D}nB=dvhz*&m)3hMI+M&#_-QB*RWOC&IVqVC^uCH}QmT z&vD;HFQ57d-=0(Kjq~B#bMTO(=S@xF+jE?ktFseFJw_6~JqJ43|5!@s(g@$46TUqM z|boK6x zr?UMY-gDn4Kl8Z<9{l1zL@Q=rf4~yk<>5|wNXWx3c}NFcWh5|La3}=cCDTej*vJa8 z*jF)$Y+Kc=RbTqS@MD!f_|k@|%F9|d4qsonv4u9oe4AK|Fw6_Ft?|YDeH*q6z0CKy zh_B`EWk{bZsw>2WV=a{{TUL&*n%~m0a@8vSd3%Lea@3laA0In?YV_m@pkH##s^+UV zPM$bM*C(t6NIo@+>*L3c666hQktzVlk=F?}YF*%z0%&Botc<6v8c!W4efSWSAGaT%rJ(85SSFhh z?HkGszDg-}qnRK^lpFlxtAC&rW(L|x6fq*eUwN5QB%-0u|BB$xe)jhSf9dy>a_lG& z0YfdB4Abj}h&H2BGr@j3TB|GO7o_$_4y4-S4j{$nNu7=9SP@5SH# z=6On?DnEYLvrGyw{7?3yzx~Z~za}(9%FFiw%}0On{BytlC1nN;L%HAI7ys_l|M|0@ zeLMcqXP^7^uYUP|ltP&Q`05Lv{yAuP;lDriEWv;AETu4J5KW}~h7bY1cdxieEE$xI z`5lqMh@KtaOEOt=0Na08ilsG&mQ)}_I26)QNJAkFH7P5fP?Jtelg`Cde-Xa&Q-l5E zmx#HeqM}9{6=GoAS~yViHOqQQ8?dZr?iEXn7He;dvByekNikrxJY?O0S4&s}LX7Mk z7qbT}Ts$Npn)Q%`)L0KlNQqENibp0HV?Wl|@YIVG;B}?zymVRFi99>ny>Snw(6IiqpGhCzHE&C6oDGmC2;2 zqKkY|;5$bEjDOI%YZrad7I`8eNRtqpC`ghaz~L=5zN;cht>wbVQ9%W<^*CLlTCUOs zjDrr!VAIFs&qDSKLG(g4)nJt}`Ia>*M$iE#@I7sz0*iVBe3~s!@U9J<JUqkCPD zdkm#Kg)10?L^evu+*6Q5b%LZhEH;bzm$=D7bX*7{FBZ30Ekss})qcmYW!)6OYF72rU?KB2KGGm(4NNz1oizLcu~j$ z&pfaP*N^2zmG-h#Gf(WX2JUDdcp36lxyNc*jM`pmX+hqar&_dUMrsIP)zny43na-J zxkJDb)mrkB^aVgT2UN_*aUR}CGDpk>=~f=BsuJMTC>VmbqcLCUcU%aDja$6Brexw7 z0rO%UXT&Bda0K6@_@XikNyX&!brJOOaPIWd&W4GrQ;fI$F; z0LL#<7Kq%SJRQ#Eh~(3`d4oAI2q@myfvhNoe=(fTRScn5aWOcU&w-;TH9QL$b3=LL z2S*2ULyNg4!Z(aM26MyJ1Q-VDq2X~tfHn>dp^fxM9+A%78N6tvc9o{DXx6T|M$-+g zNn5#+j&xOP!)~>Y1Y5B}qm8s;^oScjQf=ooctfb5eF8MS4!g7gtNfSMoEg<*TLTbE zqkNR5KB7r2Z=7NsXS%CU_$Ku!^5#sHsF#;d5xxJVVw1nGd`4R2uQKS}Y3c^W6k9d* z$1Klch12Y*^6orLu^pxKjo0aY7OU}l_h+c8$p!qpR5}Smx3P+@3sBCigs-v{<2F)b zN_Dfglm+XH6)fv@-nZR1>#~L`r zNeEy|j|5GWTxm2gi{&ZjmZ#h>dCIiN)8*93^0d)CW$Q)`gNCBRfcDIb3)9mv*wPVK zwPfPpSZ5#W?PEi*EmBPSgSW_ZB_EZ@eJkxfE3u6w?O^$^wp7CgnVLa+SkeZX*btL8 z$(+xdWL_M&IVLv2l4=v!FFJ2j8a=-7BGr962J@EF7&kB zvLfyBHD)QAfku?j1dp6b@shvPYihgG0utYfefcKrtLf9Obe>5m)LqQT5gEBN~wRC8bhi0f2eT7V^#ol?8R7;y)>$S83 z(rfGamo$)G3k>*e|1&T!6Zoim55I)|>h1}Am7bJpmbH92R^&Y4q3 zJxE0p9sKnU{(1+0y@S7gIm`#W9)wf#>YMnATV9W*gF_C*4fF~Yy@8wFpzN4stm^fK z22NvK4UJgG>J4B5ei>843hioU>~ce$(2INY?!mzUDzmT!%j^ll}Zy!7RbN=h8QFIQc=++lm8!>C4XTq858 zv0lnjV}sT}3~p4C)(Gnm!=katJ~E>kndME~flakq14I#6s9Y0djgL;pH93OO6ha{Gy zD=;ilM<2i zLWd|2Hw5|vsGvK*0q72i6v_iN)jKN5Q6Q7d+O4p|)3kFR9=mVHIqhlK!@o(<3xgo+ z5o~s^pPe4Tcv61662_A9QF_OcS_Y%rNuRNj=O4l+9heP((kPK5!x_9dkrO!mP7943 z=~B%ZAi_l}P1~K2s}w&WX<}FRC@n6qBj{#c5t>LL*`vKA)7XEp1K)n^Bx#CHl0(QJ zECO5Ol!o^P>|9BESEhiKB-<3Lfe*5btI29nL!`7?+OSBvdkVFvWoT)&Ol%9eK50Ai zxXr)GTBMeyrPVdDMdj4RMo583P1g6V==&J=a%R##;iW6EPC7Vb^SJxu=_D&+$6Qgq zeJ^ip6Gwt*L8C$Zc-1T5?r<7MDT|zxMqf&`lVTL6Xt!PEBrPvY5>>@g4B@2sN%$8h z1%4yu5q@aWq|r>X0H!tA2r#f|b4k+U@*2|}UpHyXFo7s5g=RI`a1`Y>Ywth>yw=w) z#~CkXwM%f;K|Wrb7A`#iOP^RkxGnG7qTcrC&G0$aY^BCwmvrVR5; z`DK&i^4p_?pd8w!AO$c<%kR@E$N@}Rn+K(j0~o;NmvQ8v zjCve7aLb%YMZpH2K$}~}RRvzP28(?XUI!0snDur&rOO+w3Ch(5v}llJf_P9w=PEfc z96fEIw4?f9<4T;yLZvPZOmuGgr2QMLg0O5UyKOXE`P)X^oJ?(FIV8)JGoh&dEkg&< zQmbs*RR5MkTR{Jwkq4@OgX$62sEJ6d^z@2t2d=!HsXcIU*|bqk zzg-b5Z*YSZr%ekUvkhg*0okHzO-u&NO}wIUT)u3CskJ>{IF^-bSaxEU`F1uU6((hU zdF@ePN4r%HW}w$2Qs@eCeFxG#K#l>b-d#R{FT5g{%rWDT$Q7fXmH!6b6O^xI&y(Xb zbex%`J8>sEZ`mzkyKR*<>bh%f=O{aO%5+gKYk&Zem&P&rr|qMh=!R6@#ToPRq0i($ zvD?+XL2?mx4?E`E?hU(#Z>5BzhZn-^5s=Cbs~S0gFgw&qudFl3WP;Ma?t>!8;2U(j zg&D2%W?XqvvQ&{nO~4DQN|sh}Ap; z1JL6x2lK-_+jN7(F$Tjs+di{IP8aSC*|*@GZFRGhRGAt_`nkHZ4ab3;p?R(AT|$+5 zQ`x>#9Ntr=fvz4(v2U1BFog_mx&i@9OU0iddRBfYAo~j6=WTo~f3FaiBW~sb=UoG; zJe9fJ{+!$L6s1(&$EKg&caXO(8TprX!8eb=o{9o{J1qXmbYe~qB!mQ9r&WLG3&II zKY8*E3OfIs3(w~PAGgD_J^9DStF@%jD8@GlL)%qDbg<{b2R{r#<@%$-5cG7ws;n$pc$*CtO4jpujzF}E!965b- zWGsIWk=TqCsT7M&H66FCS0)4US1ysljpSDm6GZ zU8M%cr*rDuQ&0F})K#J2ICYg89IMU^1xjDMy5df7%(~)EaNN2o8yvg-Ao1>^Q%?lO zuRlzQRi~d$-8}rk%9~R^;>+=&ryn1FqT=zV$D9|6%(#&MyimwN;Zx!%Yq7}xRD9o z-Z+{&l{++X0K7JQ^5DTEBe~IixdTW11K{An*AE>YKDhtniG#V^A>RNP**`LZv;!Cb zuMg!&p>aoGN~0NI1n7?J-*=Eu?#~_Y4S?gheMgVva))1k?a-m29KDHz_0(cH102ic zj^lfHWFOl4TJZs}A8FwXaJ~nCctzwz@z)C>q*%yT_iT4h?{rTS?kS?hRo=9F8Vt?2 s8M1+=!5Qvy^G^TNQ*m%@9%#(1cpII1USq_U@>NC^8(YS}&sW6%1Gp0~Q~&?~ literal 0 HcmV?d00001 diff --git a/web/src/images/resourceTcpIcon.png b/web/src/images/resourceTcpIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..db112fe57a6df158c37fa4ef05fbd429437583d9 GIT binary patch literal 1253 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jPK-BC>eK@{oCO|{#S9GG z!XV7ZFl&wkP{HE>pAc7|BoGJ*2|1twJ3Bj|0Fbmt0uUu|K{T$kv^3BtK|#U)|NsB{ z_wVoDzkmMx`ThI%uV24@{`~p<`}c3(z5x~d`0?Y*moGrZ|M&0z-Mjbo>(|epKZCgT z_WyxoLc%|J`QNv1|Fg6EtEcy~s_N6HPai*i1SvRw{{Q~{|Mm6%)z$s&?fui!^Vin) z`}Xa>qocn~oA%+uhxhN_gOu^}|G$6#UtHXmCr^H6X8zr~_it_OZyTG>n>W9E_wMc6 zw?H+2V`Kl=*!;G({TM>zkUrAeD&(p%a<>IS6Bb+>iV{Q`_HVbj}ITdc=6)- z^XFfmKK-Mk^YP%pXV0EJefsp%p+k=!KL%=f^5n^*M~@ypeE8tOgWlfWt5>gHym+y@ zyZhd~d-w0(Z)WkK%1)d(QCeEs*w}de`t@tqu3frx>B^NW>(;G1eE9I8Lx&C?Jh*!G>dTiecXoE3 zI(6#Uv11(_9TzTK0J;GJ1OxmW(`II}dI6&i0+Rm!&jPXXp?n}!h+zKzUyQ^lfv`)Fguu))bOAj4 zoLCn7>6n1eqQR7;v zsE7?M`1P5K>?Y z&5VrJRSsU^n_v*tcCYsWgA{*A&`FJ+UVooijJEO{Z>`WTD8FFzNmKT~Z~iog^J~kd z86DZ?`q-yVrEK-tbAI(+3>$MztC|h7wr`%le18B#=T#}&zE0Vr@#z{3H@>kno- zt^-f!c*|(Ezd5b#Sg#RP;to(s}&h(`)J3(b2bSCUCc=UoX>e zE|I*x{{D*H+2#F*KWe#4CY?U>@Ev20d!fpv`3yH+80GPIUMv=IS7I-GaQ@-Nk0+;E q+x?Pe_xnG0u6XRu&&CJe-eJvkJyEItfcGgV<$AjMxvXSM}L3%%J%j3_4D)d00030zxn?F=Kl}p{k`}6tn~bx^ZyX$ z`g`v3^78TV@c;k-|KI%ofAaj?`TV^0`@8i19_aVi^!KOm_=xTB@bK^N?*IS*{~zi8 zzWDx*^ZVTT{ax++9gws~>HE9&{vYW1x%2qA^7xqU^5XIPJn8eZ?eNg; z{4MAH4(9CK>*(m{=jR{i_U85V<@EKn?(yO9`#b3JlIiB==H=z(?#}A(uj!NZ0jmhi z7;2sX006<0r~)qy|8M{Q|NsC0|NsC0ag*EvBms1j2?H#XI|Dcf&rDJ}00062lY0X| ze^=B5N^7ZW>!2vm)zg*H*ON8SGc+>R(=$=mHZ?OxQDC8GDWj)nWvyqUZ)<1oU~1;* zsTSyPgNw0(28(Ts*zJy?uQ3l>GGk1GKT2;O!k46dV#7rW_ujrx)qy z6crtVsvtHl-WMpJ05m-@NiR7%B{dC2e}P=OUPfkCm~A%5^c=n1)VzFT1wh{y=oJ*t{F;_lBom-v3wC={N?SWndrNCa zCqjV|By2&_K*xclyE?j&6hK495hR@lG94)0(~G14VtQ>~KS+AQ#7Q9O$&-*2e}GMI znKE@6$n@z`XUqgj&zg;-0AzaWl&NqqXYQ=oGv^^G0J(j})cIhy15IBrbYa}ZW6T`_mr@|8#-nFn&*q&ZVptzNTs?YgN; zCoEguzj8g236PMPxnU#F?K3xRSDpZpUNHg51Zc=i2DyD9$aJ9emMvQm3R)o{Gix?j z8mJv8y=BWbn1by)cJA7Z0e0=&15>bf-~I#A7~sHu2I>F+rib!z5q1hy00000NkvXX Hu0mjf7=YDM delta 864 zcmV-m1E2i&3X}_wMgdikM}L3y_4V`f^8f$<^78WW@$mov0Pw%y=%3Nyf5GLP&g;9| z@!09zd%o3NuHK2l@8j$6@bK^N?*IS*&M=$90EFzX*vcQ1?Y!Oe+w8>A2a| zTdvG4nDFH6`|tPNZ@JuVxcBSx-F&^!J)q1jm*S<)&M%tkuGh^jndpD3)Wr^q=(pJJ z?(XgF?EnA(;D5mO-R{aBlJnZ@+HAGld%WI=!pR+x%q^MRh{5aM=j`n4>+9+ikbnY_{W?%+Nib;iS#bN~OyznCRT(>gww0>FN0F^wUkK=c?1@snXw;$mFxs z$}5)Ik;CZd=;!C>#Sbxx$sUo|ceu_wp6T7?=iB4Q9g*Lz&*tXl<>lqlOsCE~p4Vuy z)Ml{FI-SH0iq&(qlj8xa2qX{zoB#j-$CH)*m}r#+Iz`++ba3^s;F!E z`JBXAS^rrMS*8zl)XZ9Ol+K{dVE4+QgV1oY8r}y!1Rnv zrL2GKoKT?iEpzko3kr*n70AjJ+m@6nm$}-y>y}r9g{M?jRo5U{0rGuNEztLMe!77HntrYI31lSw|LFk^++LE2y)zvMYA_-+_ZV~mf5SPtyw#D{Z=FsAR#k<+jd-_ z+vo4tISnMeZW@va(2$u4a{F?S=|JgSyLKZKv_V2mvs0000 { @@ -19,9 +19,14 @@ test("should render columns", async () => { describe('Flowcolumns Components', () => { it('should render IconColumn', () => { - let tflow = {...TFlow(), websocket: undefined}, - iconColumn = renderer.create(), + let tcpflow = TTCPFlow(), + iconColumn = renderer.create(), tree = iconColumn.toJSON() + expect(tree).toMatchSnapshot() + + let tflow = {...TFlow(), websocket: undefined}; + iconColumn = renderer.create() + tree = iconColumn.toJSON() // plain expect(tree).toMatchSnapshot() // not modified diff --git a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.tsx.snap b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.tsx.snap index 794fd175d..aee2cf2d7 100644 --- a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.tsx.snap +++ b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.tsx.snap @@ -5,7 +5,7 @@ exports[`Flowcolumns Components should render IconColumn 1`] = ` className="col-icon" >
`; @@ -15,7 +15,7 @@ exports[`Flowcolumns Components should render IconColumn 2`] = ` className="col-icon" >
`; @@ -25,7 +25,7 @@ exports[`Flowcolumns Components should render IconColumn 3`] = ` className="col-icon" >
`; @@ -35,7 +35,7 @@ exports[`Flowcolumns Components should render IconColumn 4`] = ` className="col-icon" >
`; @@ -45,7 +45,7 @@ exports[`Flowcolumns Components should render IconColumn 5`] = ` className="col-icon" >
`; @@ -55,7 +55,7 @@ exports[`Flowcolumns Components should render IconColumn 6`] = ` className="col-icon" >
`; @@ -65,7 +65,7 @@ exports[`Flowcolumns Components should render IconColumn 7`] = ` className="col-icon" >
`; @@ -75,7 +75,7 @@ exports[`Flowcolumns Components should render IconColumn 8`] = ` className="col-icon" >
`; @@ -90,6 +90,16 @@ exports[`Flowcolumns Components should render IconColumn 9`] = ` `; +exports[`Flowcolumns Components should render IconColumn 10`] = ` + +
+ +`; + exports[`Flowcolumns Components should render TimeColumn 1`] = ` - +
@@ -238,7 +231,7 @@ exports[`should render columns: size 1`] = ` - 14b + 43b diff --git a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowRowSpec.tsx.snap b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowRowSpec.tsx.snap index 662cd6c22..e42d25fa1 100644 --- a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowRowSpec.tsx.snap +++ b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowRowSpec.tsx.snap @@ -45,7 +45,7 @@ exports[`FlowRow 1`] = ` - 14b + 43b - - -
diff --git a/web/src/js/__tests__/components/FlowViewSpec.tsx b/web/src/js/__tests__/components/FlowViewSpec.tsx index 929e6900b..9c661222d 100644 --- a/web/src/js/__tests__/components/FlowViewSpec.tsx +++ b/web/src/js/__tests__/components/FlowViewSpec.tsx @@ -1,6 +1,7 @@ import * as React from "react" -import {render, screen, waitFor} from "../test-utils"; +import {render, screen} from "../test-utils"; import FlowView from "../../components/FlowView"; +import * as flowActions from "../../ducks/flows" import fetchMock, {enableFetchMocks} from "jest-fetch-mock"; import {fireEvent} from "@testing-library/react"; @@ -9,7 +10,7 @@ enableFetchMocks(); test("FlowView", async () => { fetchMock.mockReject(new Error("backend missing")); - const {asFragment} = render(); + const {asFragment, store} = render(); expect(asFragment()).toMatchSnapshot(); fireEvent.click(screen.getByText("Response")); @@ -26,4 +27,11 @@ test("FlowView", async () => { fireEvent.click(screen.getByText("Error")); expect(asFragment()).toMatchSnapshot(); + + store.dispatch(flowActions.select(store.getState().flows.list[2].id)); + + fireEvent.click(screen.getByText("TCP Messages")); + expect(asFragment()).toMatchSnapshot(); + + fireEvent.click(screen.getByText("Error")); }); diff --git a/web/src/js/__tests__/components/Header/__snapshots__/FlowMenuSpec.tsx.snap b/web/src/js/__tests__/components/Header/__snapshots__/FlowMenuSpec.tsx.snap index 3608eeb5d..ac5ef3ee3 100644 --- a/web/src/js/__tests__/components/Header/__snapshots__/FlowMenuSpec.tsx.snap +++ b/web/src/js/__tests__/components/Header/__snapshots__/FlowMenuSpec.tsx.snap @@ -49,6 +49,20 @@ exports[`FlowMenu 1`] = ` />  Delete + + +
+ + + Server conn. closed: + + + 1999-12-31 23:00:05.000 + + (5s) + + + + + + Client conn. closed: + + + 1999-12-31 23:00:06.000 + + (6s) + + + @@ -967,3 +993,76 @@ exports[`FlowView 6`] = `
`; + +exports[`FlowView 7`] = ` + + + +`; diff --git a/web/src/js/__tests__/components/__snapshots__/HeaderSpec.tsx.snap b/web/src/js/__tests__/components/__snapshots__/HeaderSpec.tsx.snap index 67d89d7ca..fbcde2c79 100644 --- a/web/src/js/__tests__/components/__snapshots__/HeaderSpec.tsx.snap +++ b/web/src/js/__tests__/components/__snapshots__/HeaderSpec.tsx.snap @@ -84,6 +84,20 @@ exports[`Header 1`] = ` />  Delete + + +
@@ -54,17 +56,7 @@ export default function FlowMenu(): JSX.Element {
- 1}>Export▾ - } options={{"placement": "bottom-start"}}> - copy(flow, "raw_request")}>Copy raw request - copy(flow, "raw_response")}>Copy raw response - copy(flow, "raw")}>Copy raw request and response - copy(flow, "curl")}>Copy as cURL - copy(flow, "httpie")}>Copy as HTTPie - - - +
Export
@@ -91,7 +83,7 @@ export default function FlowMenu(): JSX.Element { function DownloadButton({flow}: { flow: Flow }) { if (flow.type !== "http") - return null; + return ; if (flow.request.contentLength && !flow.response?.contentLength) { return + } options={{"placement": "bottom-start"}}> + copy(flow, "raw_request")}>Copy raw request + copy(flow, "raw_response")}>Copy raw response + copy(flow, "raw")}>Copy raw request and response + copy(flow, "curl")}>Copy as cURL + copy(flow, "httpie")}>Copy as HTTPie + +} + + +const markers = { + ":red_circle:": "🔴", + ":orange_circle:": "🟠", + ":yellow_circle:": "🟡", + ":green_circle:": "🟢", + ":large_blue_circle:": "🔵", + ":purple_circle:": "🟣", + ":brown_circle:": "🟤", +} + +function MarkButton({flow}: { flow: Flow }) { + const dispatch = useAppDispatch(); + return 1}>Mark▾ + } options={{"placement": "bottom-start"}}> + dispatch(flowActions.update(flow, {marked: ""}))}>⚪ (no + marker) + {Object.entries(markers).map(([name, sym]) => + dispatch(flowActions.update(flow, {marked: name}))}> + {sym} {name.replace(/[:_]/g, " ")} + + )} + +} diff --git a/web/src/js/ducks/ui/flow.ts b/web/src/js/ducks/ui/flow.ts index 55b8359c5..8f0c88369 100644 --- a/web/src/js/ducks/ui/flow.ts +++ b/web/src/js/ducks/ui/flow.ts @@ -1,3 +1,6 @@ +import * as flowActions from "../flows"; +import {tabsForFlow} from "../../components/FlowView"; + export const SET_TAB = "UI_FLOWVIEW_SET_TAB", SET_CONTENT_VIEW_FOR = "SET_CONTENT_VIEW_FOR" diff --git a/web/src/js/ducks/ui/keyboard.tsx b/web/src/js/ducks/ui/keyboard.tsx index 4297aace3..76981814d 100644 --- a/web/src/js/ducks/ui/keyboard.tsx +++ b/web/src/js/ducks/ui/keyboard.tsx @@ -57,7 +57,7 @@ export function onKeyDown(e: KeyboardEvent) { if (!flow) break let tabs = tabsForFlow(flow), currentTab = getState().ui.flow.tab, - nextTab = tabs[(tabs.indexOf(currentTab) - 1 + tabs.length) % tabs.length] + nextTab = tabs[(Math.max(0, tabs.indexOf(currentTab)) - 1 + tabs.length) % tabs.length] dispatch(selectTab(nextTab)) break } @@ -67,7 +67,7 @@ export function onKeyDown(e: KeyboardEvent) { if (!flow) break let tabs = tabsForFlow(flow), currentTab = getState().ui.flow.tab, - nextTab = tabs[(tabs.indexOf(currentTab) + 1) % tabs.length] + nextTab = tabs[(Math.max(0, tabs.indexOf(currentTab)) + 1) % tabs.length] dispatch(selectTab(nextTab)) break } diff --git a/web/src/js/flow.ts b/web/src/js/flow.ts index a3094cb72..5f79425d0 100644 --- a/web/src/js/flow.ts +++ b/web/src/js/flow.ts @@ -24,6 +24,7 @@ export interface HTTPFlow extends _Flow { export interface TCPFlow extends _Flow { type: "tcp" + messages_meta: MessagesMeta, } export interface Error { @@ -100,11 +101,14 @@ export interface HTTPResponse extends HTTPMessage { reason: string } -export interface WebSocketData { - messages_meta: { +export interface MessagesMeta { + contentLength: number, count: number, timestamp_last?: number - }, +} + +export interface WebSocketData { + messages_meta: MessagesMeta, closed_by_client?: boolean close_code?: number close_reason?: string diff --git a/web/src/js/flow/export.ts b/web/src/js/flow/export.ts index 3b4fc5ba4..1330bf7c7 100644 --- a/web/src/js/flow/export.ts +++ b/web/src/js/flow/export.ts @@ -3,5 +3,11 @@ import {Flow} from "../flow"; export const copy = async (flow: Flow, format: string): Promise => { let ret = await runCommand("export", format, `@${flow.id}`); - await navigator.clipboard.writeText(ret); + if(ret.value) { + await navigator.clipboard.writeText(ret.value); + } else if(ret.error) { + alert(ret.error) + } else { + console.error(ret); + } } diff --git a/web/src/js/flow/utils.ts b/web/src/js/flow/utils.ts index cef5c4c8e..671a320d0 100644 --- a/web/src/js/flow/utils.ts +++ b/web/src/js/flow/utils.ts @@ -1,4 +1,4 @@ -import {Flow, HTTPFlow, HTTPMessage, HTTPRequest} from "../flow"; +import {Flow, HTTPMessage, HTTPRequest} from "../flow"; const defaultPorts = { "http": 80, @@ -53,14 +53,14 @@ export class MessageUtils { } static getContentURL( - flow: HTTPFlow, + flow: Flow, part: HTTPMessage | "request" | "response" | "messages", view?: string, lines?: number ): string { - if (part === flow.request) { + if (flow.type === "http" && part === flow.request) { part = "request"; - } else if (part === flow.response) { + } else if (flow.type === "http" && part === flow.response) { part = "response"; } const lineStr = lines ? `?lines=${lines}` : ""; @@ -129,33 +129,50 @@ export var isValidHttpVersion = function (httpVersion: string): boolean { export function startTime(flow: Flow): number | undefined { - if (flow.type === "http") { - return flow.request.timestamp_start + switch (flow.type) { + case "http": + return flow.request.timestamp_start + case "tcp": + return flow.client_conn.timestamp_start } - return undefined } export function endTime(flow: Flow): number | undefined { - if (flow.type === "http") { - if (flow.websocket) { - if (flow.websocket.timestamp_end) - return flow.websocket.timestamp_end - if (flow.websocket.messages_meta.timestamp_last) - return flow.websocket.messages_meta.timestamp_last - } - if (flow.response) { - return flow.response.timestamp_end - } + switch (flow.type) { + case "http": + if (flow.websocket) { + if (flow.websocket.timestamp_end) + return flow.websocket.timestamp_end + if (flow.websocket.messages_meta.timestamp_last) + return flow.websocket.messages_meta.timestamp_last + } + if (flow.response) { + return flow.response.timestamp_end + } + return undefined + case "tcp": + return flow.server_conn?.timestamp_end } - return undefined + } export const getTotalSize = (flow: Flow): number => { - if (flow.type !== "http") - return 0 - let total = flow.request.contentLength || 0 - if (flow.response) { - total += flow.response.contentLength || 0 + switch (flow.type) { + case "http": + let total = flow.request.contentLength || 0 + if (flow.response) { + total += flow.response.contentLength || 0 + } + if (flow.websocket) { + total += flow.websocket.messages_meta.contentLength || 0 + } + return total + case "tcp": + return flow.messages_meta.contentLength || 0 } - return total +} + + +export const canReplay = (flow: Flow): boolean => { + return (flow.type === "http" && !flow.websocket) }