From f917bba5649489e5019e68f0dba18febfe822d4f Mon Sep 17 00:00:00 2001 From: autosubmit Date: Fri, 24 Feb 2023 17:45:03 +0800 Subject: [PATCH] Auto Submit --- color.less | 28 +++---- index.html | 2 +- ...it__index.p__Ac.564fb86d.def21a59.async.js | 6 +- ...s => p__MyProblem__index.008162c3.async.js | 80 +++++++++---------- umi.697211d5.js => umi.c253ce2c.js | 2 +- 5 files changed, 59 insertions(+), 59 deletions(-) rename p__MyProblem__index.7a64347a.async.js => p__MyProblem__index.008162c3.async.js (90%) rename umi.697211d5.js => umi.c253ce2c.js (99%) diff --git a/color.less b/color.less index a7319a542b..3584dcc55f 100644 --- a/color.less +++ b/color.less @@ -727,42 +727,42 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {color: @success-color;} .ant-form-item-has-warning .ant-form-item-explain, .ant-form-item-has-warning .ant-form-item-split {color: @warning-color;} .ant-form-item-has-warning .ant-input, .ant-form-item-has-warning .ant-input-affix-wrapper, .ant-form-item-has-warning .ant-input:hover, .ant-form-item-has-warning .ant-input-affix-wrapper:hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(171, 56, 247, 0.2);} +.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(16, 134, 248, 0.2);} .ant-form-item-has-warning .ant-input:not(.ant-form-item-has-warning .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper:not(.ant-form-item-has-warning .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(171, 56, 247, 0.2);} +.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(16, 134, 248, 0.2);} .ant-form-item-has-warning .ant-input-prefix {color: @warning-color;} .ant-form-item-has-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} .ant-form-item-has-warning .has-feedback {color: @warning-color;} .ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {color: @warning-color;} .ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @warning-color !important;} -.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(171, 56, 247, 0.2);} +.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(16, 134, 248, 0.2);} .ant-form-item-has-warning .ant-input-number, .ant-form-item-has-warning .ant-picker {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(171, 56, 247, 0.2);} +.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(16, 134, 248, 0.2);} .ant-form-item-has-warning .ant-input-number:not([disabled]):hover, .ant-form-item-has-warning .ant-picker:not([disabled]):hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(171, 56, 247, 0.2);} +.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(16, 134, 248, 0.2);} .ant-form-item-has-error .ant-form-item-explain, .ant-form-item-has-error .ant-form-item-split {color: @error-color;} .ant-form-item-has-error .ant-input, .ant-form-item-has-error .ant-input-affix-wrapper, .ant-form-item-has-error .ant-input:hover, .ant-form-item-has-error .ant-input-affix-wrapper:hover {border-color: @error-color;} -.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} +.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} .ant-form-item-has-error .ant-input:not(.ant-form-item-has-error .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper:not(.ant-form-item-has-error .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} +.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} .ant-form-item-has-error .ant-input-prefix {color: @error-color;} .ant-form-item-has-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-form-item-has-error .has-feedback {color: @error-color;} .ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {color: @error-color;} .ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @error-color !important;} -.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} +.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} .ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {border: 0;} .ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {border-color: @error-color;} .ant-form-item-has-error .ant-input-number, .ant-form-item-has-error .ant-picker {border-color: @error-color;} -.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} +.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} .ant-form-item-has-error .ant-input-number:not([disabled]):hover, .ant-form-item-has-error .ant-picker:not([disabled]):hover {border-color: @error-color;} .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {border-color: @error-color;} -.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} -.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(155, 4, 65, 0.2);} +.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} +.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(178, 96, 154, 0.2);} .ant-form-item-has-error .ant-transfer-list {border-color: @error-color;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {border-color: @border-color-base;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px !important;} @@ -1477,14 +1477,14 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-green {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} -.ant-tag-blue {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;} +.ant-tag-blue {color: #1890ff;background: color(~`colorPalette("@{warning-color}", 1)`);border-color: #91d5ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-geekblue {color: #2f54eb;background: #f0f5ff;border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-purple {color: #722ed1;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;} -.ant-tag-processing {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;} +.ant-tag-processing {color: #1890ff;background: color(~`colorPalette("@{warning-color}", 1)`);border-color: #91d5ff;} .ant-tag-error {color: #f5222d;background: #fff1f0;border-color: #ffa39e;} .ant-tag-warning {color: #fa8c16;background: #fff7e6;border-color: #ffd591;} .ant-timeline {color: @text-color;} @@ -1685,7 +1685,7 @@ a.ant-typography[disabled], .ant-typography a[disabled] {color: @disabled-color; .ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: @error-color;} .ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;} .ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;} -.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: color(~`colorPalette("@{error-color}", 1)`);} +.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{warning-color}", 1)`)'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{warning-color}", 1)`)'] {fill: color(~`colorPalette("@{error-color}", 1)`);} .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: @error-color;} .ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);} .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);} diff --git a/index.html b/index.html index fb55f3bc8f..b91b2c770a 100644 --- a/index.html +++ b/index.html @@ -132,6 +132,6 @@ - + diff --git a/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.564fb86d.def21a59.async.js b/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.564fb86d.def21a59.async.js index e5ec8d79fa..a504dc3707 100644 --- a/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.564fb86d.def21a59.async.js +++ b/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.564fb86d.def21a59.async.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"2Qr1":function(Be,L,o){"use strict";o.d(L,"d",function(){return P}),o.d(L,"c",function(){return y}),o.d(L,"e",function(){return _}),o.d(L,"b",function(){return se}),o.d(L,"f",function(){return z}),o.d(L,"g",function(){return Z}),o.d(L,"a",function(){return Se});var j=o("rePB"),h=o("KQm4"),ue=o("T5bk"),M=o("U8pU"),$=o("VTBJ"),t=o("Kwbf"),g=o("WKfj");function J(C,r){var E=C.key,V;return"value"in C&&(V=C.value),E!=null?E:V!==void 0?V:"rc-index-key-".concat(r)}function P(C){var r=[];function E(V,G){V.forEach(function(I){G||!("options"in I)?r.push({key:J(I,r.length),groupOption:G,data:I}):(r.push({key:J(I,r.length),group:!0,data:I}),E(I.options,!0))})}return E(C,!1),r}function s(C){var r=Object($.a)({},C);return"props"in r||Object.defineProperty(r,"props",{get:function(){return Object(t.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),r}}),r}function y(C,r){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},V=E.prevValueOptions,G=V===void 0?[]:V,I=new Map;return r.forEach(function(A){if(!A.group){var m=A.data;I.set(m.value,m)}}),C.map(function(A){var m=I.get(A);return m||(m=Object($.a)({},G.find(function(U){return U._INTERNAL_OPTION_VALUE_===A}))),s(m)})}var _=function(r,E){var V=E.options,G=E.prevValue,I=E.labelInValue,A=E.optionLabelProp,m=y([r],V)[0],U={value:r},B,xe=Object(g.d)(G);return I&&(B=xe.find(function(je){return Object(M.a)(je)==="object"&&"value"in je?je.value===r:je.key===r})),B&&Object(M.a)(B)==="object"&&"label"in B?(U.label=B.label,m&&typeof B.label=="string"&&typeof m[A]=="string"&&B.label.trim()!==m[A].trim()&&Object(t.a)(!1,"`label` of `value` is not same as `label` in Select options.")):m&&A in m?U.label=m[A]:U.label=r,U.key=U.value,U};function O(C){return Object(g.d)(C).join("")}function H(C){return function(r,E){var V=r.toLowerCase();if("options"in E)return O(E.label).toLowerCase().includes(V);var G=E[C],I=O(G).toLowerCase();return I.includes(V)}}function se(C,r,E){var V=E.optionFilterProp,G=E.filterOption,I=[],A;return G===!1?r:(typeof G=="function"?A=G:A=H(V),r.forEach(function(m){if("options"in m){var U=A(C,m);if(U)I.push(m);else{var B=m.options.filter(function(xe){return A(C,xe)});B.length&&I.push(Object($.a)(Object($.a)({},m),{},{options:B}))}return}A(C,s(m))&&I.push(m)}),I)}function z(C,r){if(!r||!r.length)return null;var E=!1;function V(I,A){var m=Object(ue.a)(A),U=m[0],B=m.slice(1);if(!U)return[I];var xe=I.split(U);return E=E||xe.length>1,xe.reduce(function(je,pt){return[].concat(Object(h.a)(je),Object(h.a)(V(pt,B)))},[]).filter(function(je){return je})}var G=V(C,r);return E?G:null}function Z(C,r){var E=y([C],r)[0];return E.disabled}function Se(C,r,E,V){var G=Object(g.d)(r).slice().sort(),I=Object(h.a)(C),A=new Set;return C.forEach(function(m){m.options?m.options.forEach(function(U){A.add(U.value)}):A.add(m.value)}),G.forEach(function(m){var U=V?m.value:m;if(!A.has(U)){var B;I.push(V?(B={},Object(j.a)(B,E,m.label),Object(j.a)(B,"value",U),B):{value:U})}}),I}},"6cGi":function(Be,L,o){"use strict";o.d(L,"a",function(){return M});var j=o("ODXe"),h=o("cDcd"),ue=o.n(h);function M($,t){var g=t||{},J=g.defaultValue,P=g.value,s=g.onChange,y=g.postState,_=h.useState(function(){return P!==void 0?P:J!==void 0?typeof J=="function"?J():J:typeof $=="function"?$():$}),O=Object(j.a)(_,2),H=O[0],se=O[1],z=P!==void 0?P:H;y&&(z=y(z));var Z=h.useRef(s);Z.current=s;var Se=h.useCallback(function(r){se(r),z!==r&&Z.current&&Z.current(r,z)},[z,Z]),C=h.useRef(!0);return h.useEffect(function(){if(C.current){C.current=!1;return}P===void 0&&se(P)},[P]),[z,Se]}},"8OUc":function(Be,L,o){"use strict";var j=o("cDcd"),h=o.n(j),ue=o("TSYQ"),M=o.n(ue),$=function(g){var J=g.className,P=g.customizeIcon,s=g.customizeIconProps,y=g.onMouseDown,_=g.onClick,O=g.children,H;return typeof P=="function"?H=P(s):H=P,j.createElement("span",{className:J,onMouseDown:function(z){z.preventDefault(),y&&y(z)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:_,"aria-hidden":!0},H!==void 0?H:j.createElement("span",{className:M()(J.split(/\s+/).map(function(se){return"".concat(se,"-icon")}))},O))};L.a=$},WKfj:function(Be,L,o){"use strict";o.d(L,"d",function(){return h}),o.d(L,"e",function(){return ue}),o.d(L,"f",function(){return M}),o.d(L,"c",function(){return $}),o.d(L,"b",function(){return g}),o.d(L,"a",function(){return P});var j=o("KQm4");function h(s){return Array.isArray(s)?s:s!==void 0?[s]:[]}function ue(s,y){var _=y.labelInValue,O=y.combobox;if(s===void 0||s===""&&O)return[];var H=Array.isArray(s)?s:[s];return _?H.map(function(se){var z=se.key,Z=se.value;return Z!==void 0?Z:z}):H}function M(s,y){var _=y.optionLabelProp,O=y.labelInValue,H=y.prevValue,se=y.options,z=y.getLabeledValue,Z=s;return O&&(Z=Z.map(function(Se){return z(Se,{options:se,prevValue:H,labelInValue:O,optionLabelProp:_})})),Z}function $(s,y){var _=Object(j.a)(y),O;for(O=s.length-1;O>=0&&s[O].disabled;O-=1);var H=null;return O!==-1&&(H=_[O],_.splice(O,1)),{values:_,removedValue:H}}var t=typeof window!="undefined"&&window.document&&window.document.documentElement,g=t,J=0;function P(){var s;return g?(s=J,J+=1):s="TEST_OR_SSR",s}},bX4T:function(Be,L,o){"use strict";o.d(L,"a",function(){return J});var j=o("VTBJ"),h=`accept acceptCharset accessKey action allowFullScreen allowTransparency +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"2Qr1":function(Be,L,o){"use strict";o.d(L,"d",function(){return x}),o.d(L,"c",function(){return y}),o.d(L,"e",function(){return _}),o.d(L,"b",function(){return se}),o.d(L,"f",function(){return z}),o.d(L,"g",function(){return Z}),o.d(L,"a",function(){return Se});var j=o("rePB"),h=o("KQm4"),ue=o("T5bk"),M=o("U8pU"),$=o("VTBJ"),t=o("Kwbf"),g=o("WKfj");function J(C,r){var E=C.key,V;return"value"in C&&(V=C.value),E!=null?E:V!==void 0?V:"rc-index-key-".concat(r)}function x(C){var r=[];function E(V,G){V.forEach(function(I){G||!("options"in I)?r.push({key:J(I,r.length),groupOption:G,data:I}):(r.push({key:J(I,r.length),group:!0,data:I}),E(I.options,!0))})}return E(C,!1),r}function s(C){var r=Object($.a)({},C);return"props"in r||Object.defineProperty(r,"props",{get:function(){return Object(t.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),r}}),r}function y(C,r){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},V=E.prevValueOptions,G=V===void 0?[]:V,I=new Map;return r.forEach(function(A){if(!A.group){var m=A.data;I.set(m.value,m)}}),C.map(function(A){var m=I.get(A);return m||(m=Object($.a)({},G.find(function(U){return U._INTERNAL_OPTION_VALUE_===A}))),s(m)})}var _=function(r,E){var V=E.options,G=E.prevValue,I=E.labelInValue,A=E.optionLabelProp,m=y([r],V)[0],U={value:r},B,Pe=Object(g.d)(G);return I&&(B=Pe.find(function(je){return Object(M.a)(je)==="object"&&"value"in je?je.value===r:je.key===r})),B&&Object(M.a)(B)==="object"&&"label"in B?(U.label=B.label,m&&typeof B.label=="string"&&typeof m[A]=="string"&&B.label.trim()!==m[A].trim()&&Object(t.a)(!1,"`label` of `value` is not same as `label` in Select options.")):m&&A in m?U.label=m[A]:U.label=r,U.key=U.value,U};function O(C){return Object(g.d)(C).join("")}function H(C){return function(r,E){var V=r.toLowerCase();if("options"in E)return O(E.label).toLowerCase().includes(V);var G=E[C],I=O(G).toLowerCase();return I.includes(V)}}function se(C,r,E){var V=E.optionFilterProp,G=E.filterOption,I=[],A;return G===!1?r:(typeof G=="function"?A=G:A=H(V),r.forEach(function(m){if("options"in m){var U=A(C,m);if(U)I.push(m);else{var B=m.options.filter(function(Pe){return A(C,Pe)});B.length&&I.push(Object($.a)(Object($.a)({},m),{},{options:B}))}return}A(C,s(m))&&I.push(m)}),I)}function z(C,r){if(!r||!r.length)return null;var E=!1;function V(I,A){var m=Object(ue.a)(A),U=m[0],B=m.slice(1);if(!U)return[I];var Pe=I.split(U);return E=E||Pe.length>1,Pe.reduce(function(je,pt){return[].concat(Object(h.a)(je),Object(h.a)(V(pt,B)))},[]).filter(function(je){return je})}var G=V(C,r);return E?G:null}function Z(C,r){var E=y([C],r)[0];return E.disabled}function Se(C,r,E,V){var G=Object(g.d)(r).slice().sort(),I=Object(h.a)(C),A=new Set;return C.forEach(function(m){m.options?m.options.forEach(function(U){A.add(U.value)}):A.add(m.value)}),G.forEach(function(m){var U=V?m.value:m;if(!A.has(U)){var B;I.push(V?(B={},Object(j.a)(B,E,m.label),Object(j.a)(B,"value",U),B):{value:U})}}),I}},"6cGi":function(Be,L,o){"use strict";o.d(L,"a",function(){return M});var j=o("ODXe"),h=o("cDcd"),ue=o.n(h);function M($,t){var g=t||{},J=g.defaultValue,x=g.value,s=g.onChange,y=g.postState,_=h.useState(function(){return x!==void 0?x:J!==void 0?typeof J=="function"?J():J:typeof $=="function"?$():$}),O=Object(j.a)(_,2),H=O[0],se=O[1],z=x!==void 0?x:H;y&&(z=y(z));var Z=h.useRef(s);Z.current=s;var Se=h.useCallback(function(r){se(r),z!==r&&Z.current&&Z.current(r,z)},[z,Z]),C=h.useRef(!0);return h.useEffect(function(){if(C.current){C.current=!1;return}x===void 0&&se(x)},[x]),[z,Se]}},"8OUc":function(Be,L,o){"use strict";var j=o("cDcd"),h=o.n(j),ue=o("TSYQ"),M=o.n(ue),$=function(g){var J=g.className,x=g.customizeIcon,s=g.customizeIconProps,y=g.onMouseDown,_=g.onClick,O=g.children,H;return typeof x=="function"?H=x(s):H=x,j.createElement("span",{className:J,onMouseDown:function(z){z.preventDefault(),y&&y(z)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:_,"aria-hidden":!0},H!==void 0?H:j.createElement("span",{className:M()(J.split(/\s+/).map(function(se){return"".concat(se,"-icon")}))},O))};L.a=$},WKfj:function(Be,L,o){"use strict";o.d(L,"d",function(){return h}),o.d(L,"e",function(){return ue}),o.d(L,"f",function(){return M}),o.d(L,"c",function(){return $}),o.d(L,"b",function(){return g}),o.d(L,"a",function(){return x});var j=o("KQm4");function h(s){return Array.isArray(s)?s:s!==void 0?[s]:[]}function ue(s,y){var _=y.labelInValue,O=y.combobox;if(s===void 0||s===""&&O)return[];var H=Array.isArray(s)?s:[s];return _?H.map(function(se){var z=se.key,Z=se.value;return Z!==void 0?Z:z}):H}function M(s,y){var _=y.optionLabelProp,O=y.labelInValue,H=y.prevValue,se=y.options,z=y.getLabeledValue,Z=s;return O&&(Z=Z.map(function(Se){return z(Se,{options:se,prevValue:H,labelInValue:O,optionLabelProp:_})})),Z}function $(s,y){var _=Object(j.a)(y),O;for(O=s.length-1;O>=0&&s[O].disabled;O-=1);var H=null;return O!==-1&&(H=_[O],_.splice(O,1)),{values:_,removedValue:H}}var t=typeof window!="undefined"&&window.document&&window.document.documentElement,g=t,J=0;function x(){var s;return g?(s=J,J+=1):s="TEST_OR_SSR",s}},bX4T:function(Be,L,o){"use strict";o.d(L,"a",function(){return J});var j=o("VTBJ"),h=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable @@ -15,6 +15,6 @@ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata - onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,M="".concat(h," ").concat(ue).split(/[\s\n]+/),$="aria-",t="data-";function g(P,s){return P.indexOf(s)===0}function J(P){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y;s===!1?y={aria:!0,data:!0,attr:!0}:s===!0?y={aria:!0}:y=Object(j.a)({},s);var _={};return Object.keys(P).forEach(function(O){(y.aria&&(O==="role"||g(O,$))||y.data&&g(O,t)||y.attr&&M.includes(O))&&(_[O]=P[O])}),_}},qNPg:function(Be,L,o){"use strict";o.d(L,"a",function(){return bn});var j=o("rePB"),h=o("VTBJ"),ue=o("KQm4"),M=o("ODXe"),$=o("Ff2n"),t=o("cDcd"),g=o("4IlW"),J=o("TSYQ"),P=o.n(J),s=o("6cGi"),y=o("bX4T"),_=o("8XRh"),O=o("8OUc"),H=o("c+Xe"),se=function(e,S){var i=e.prefixCls,c=e.id,p=e.inputElement,D=e.disabled,T=e.tabIndex,q=e.autoFocus,he=e.autoComplete,W=e.editable,re=e.accessibilityIndex,we=e.value,ce=e.onKeyDown,n=e.onMouseDown,ge=e.onChange,R=e.onPaste,ee=e.onCompositionStart,w=e.onCompositionEnd,ve=e.open,Oe=e.attrs,te=p||t.createElement("input",null),Q=te,ne=Q.ref,Y=Q.props,u=Y.onKeyDown,Ce=Y.onChange,de=Y.onMouseDown,k=Y.onCompositionStart,be=Y.onCompositionEnd,oe=Y.style;return te=t.cloneElement(te,Object(h.a)(Object(h.a)({id:c,ref:Object(H.a)(S,ne),disabled:D,tabIndex:T,autoComplete:he||"off",autoFocus:q,className:"".concat(i,"-selection-search-input"),style:Object(h.a)(Object(h.a)({},oe),{},{opacity:W?null:0}),role:"combobox","aria-expanded":ve,"aria-haspopup":"listbox","aria-owns":"".concat(c,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(c,"_list"),"aria-activedescendant":"".concat(c,"_list_").concat(re)},Oe),{},{value:W?we:"",readOnly:!W,unselectable:W?null:"on",onKeyDown:function(d){ce(d),u&&u(d)},onMouseDown:function(d){n(d),de&&de(d)},onChange:function(d){ge(d),Ce&&Ce(d)},onCompositionStart:function(d){ee(d),k&&k(d)},onCompositionEnd:function(d){w(d),be&&be(d)},onPaste:R})),te},z=t.forwardRef(se);z.displayName="Input";var Z=z,Se=o("WKfj");function C(v,e){Se.b?t.useLayoutEffect(v,e):t.useEffect(v,e)}var r="__RC_SELECT_MAX_REST_COUNT__",E=function(e){var S=e.id,i=e.prefixCls,c=e.values,p=e.open,D=e.searchValue,T=e.inputRef,q=e.placeholder,he=e.disabled,W=e.mode,re=e.showSearch,we=e.autoFocus,ce=e.autoComplete,n=e.accessibilityIndex,ge=e.tabIndex,R=e.removeIcon,ee=e.choiceTransitionName,w=e.maxTagCount,ve=e.maxTagTextLength,Oe=e.maxTagPlaceholder,te=Oe===void 0?function(ae){return"+ ".concat(ae.length," ...")}:Oe,Q=e.tagRender,ne=e.onSelect,Y=e.onInputChange,u=e.onInputPaste,Ce=e.onInputKeyDown,de=e.onInputMouseDown,k=e.onInputCompositionStart,be=e.onInputCompositionEnd,oe=t.useState(!1),N=Object(M.a)(oe,2),d=N[0],F=N[1],Ee=t.useRef(null),ke=t.useState(0),qe=Object(M.a)(ke,2),et=qe[0],tt=qe[1];t.useEffect(function(){F(!0)},[]);var Xe=p||W==="tags"?D:"",nt=W==="tags"||p&&re;C(function(){tt(Ee.current.scrollWidth)},[Xe]);var Le=c,ot;typeof w=="number"&&(ot=c.length-w,Le=c.slice(0,w)),typeof ve=="number"&&(Le=Le.map(function(ae){var Te=ae.label,Ne=Object($.a)(ae,["label"]),Me=Te;if(typeof Te=="string"||typeof Te=="number"){var Pe=String(Me);Pe.length>ve&&(Me="".concat(Pe.slice(0,ve),"..."))}return Object(h.a)(Object(h.a)({},Ne),{},{label:Me})})),ot>0&&Le.push({key:r,label:typeof te=="function"?te(c.slice(w)):te});var ye=t.createElement(_.CSSMotionList,{component:!1,keys:Le,motionName:ee,motionAppear:d},function(ae){var Te=ae.key,Ne=ae.label,Me=ae.value,Pe=ae.disabled,at=ae.className,ze=ae.style,rt=Te||Me,Ge=Te!==r&&!Pe,it=function(Ve){Ve.preventDefault(),Ve.stopPropagation()},Qe=function(Ve){Ve&&Ve.stopPropagation(),ne(Me,{selected:!1})};return typeof Q=="function"?t.createElement("span",{key:rt,onMouseDown:it,className:at,style:ze},Q({label:Ne,value:Me,disabled:Pe,closable:Ge,onClose:Qe})):t.createElement("span",{key:rt,className:P()(at,"".concat(i,"-selection-item"),Object(j.a)({},"".concat(i,"-selection-item-disabled"),Pe)),style:ze},t.createElement("span",{className:"".concat(i,"-selection-item-content")},Ne),Ge&&t.createElement(O.a,{className:"".concat(i,"-selection-item-remove"),onMouseDown:it,onClick:Qe,customizeIcon:R},"\xD7"))});return t.createElement(t.Fragment,null,ye,t.createElement("span",{className:"".concat(i,"-selection-search"),style:{width:et}},t.createElement(Z,{ref:T,open:p,prefixCls:i,id:S,inputElement:null,disabled:he,autoFocus:we,autoComplete:ce,editable:nt,accessibilityIndex:n,value:Xe,onKeyDown:Ce,onMouseDown:de,onChange:Y,onPaste:u,onCompositionStart:k,onCompositionEnd:be,tabIndex:ge,attrs:Object(y.a)(e,!0)}),t.createElement("span",{ref:Ee,className:"".concat(i,"-selection-search-mirror"),"aria-hidden":!0},Xe,"\xA0")),!c.length&&!Xe&&t.createElement("span",{className:"".concat(i,"-selection-placeholder")},q))},V=E,G=function(e){var S=e.inputElement,i=e.prefixCls,c=e.id,p=e.inputRef,D=e.disabled,T=e.autoFocus,q=e.autoComplete,he=e.accessibilityIndex,W=e.mode,re=e.open,we=e.values,ce=e.placeholder,n=e.tabIndex,ge=e.showSearch,R=e.searchValue,ee=e.activeValue,w=e.onInputKeyDown,ve=e.onInputMouseDown,Oe=e.onInputChange,te=e.onInputPaste,Q=e.onInputCompositionStart,ne=e.onInputCompositionEnd,Y=t.useState(!1),u=Object(M.a)(Y,2),Ce=u[0],de=u[1],k=W==="combobox",be=k||ge&&re,oe=we[0],N=R||"";k&&ee&&!Ce&&(N=ee),t.useEffect(function(){k&&de(!1)},[k,ee]);var d=W!=="combobox"&&!re?!1:!!N,F=oe&&(typeof oe.label=="string"||typeof oe.label=="number")?oe.label.toString():void 0;return t.createElement(t.Fragment,null,t.createElement("span",{className:"".concat(i,"-selection-search")},t.createElement(Z,{ref:p,prefixCls:i,id:c,open:re,inputElement:S,disabled:D,autoFocus:T,autoComplete:q,editable:be,accessibilityIndex:he,value:N,onKeyDown:w,onMouseDown:ve,onChange:function(ke){de(!0),Oe(ke)},onPaste:te,onCompositionStart:Q,onCompositionEnd:ne,tabIndex:n,attrs:Object(y.a)(e,!0)})),!k&&oe&&!d&&t.createElement("span",{className:"".concat(i,"-selection-item"),title:F},oe.label),!oe&&!d&&t.createElement("span",{className:"".concat(i,"-selection-placeholder")},ce))},I=G;function A(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=t.useRef(null),S=t.useRef(null);t.useEffect(function(){return function(){window.clearTimeout(S.current)}},[]);function i(c){(c||e.current===null)&&(e.current=c),window.clearTimeout(S.current),S.current=window.setTimeout(function(){e.current=null},v)}return[function(){return e.current},i]}var m=function(e,S){var i=Object(t.useRef)(null),c=Object(t.useRef)(!1),p=e.prefixCls,D=e.multiple,T=e.open,q=e.mode,he=e.showSearch,W=e.tokenWithEnter,re=e.onSearch,we=e.onSearchSubmit,ce=e.onToggleOpen,n=e.onInputKeyDown,ge=e.domRef;t.useImperativeHandle(S,function(){return{focus:function(){i.current.focus()},blur:function(){i.current.blur()}}});var R=A(0),ee=Object(M.a)(R,2),w=ee[0],ve=ee[1],Oe=function(d){var F=d.which;(F===g.a.UP||F===g.a.DOWN)&&d.preventDefault(),n&&n(d),F===g.a.ENTER&&q==="tags"&&!c.current&&!T&&we(d.target.value),[g.a.SHIFT,g.a.TAB,g.a.BACKSPACE,g.a.ESC].includes(F)||ce(!0)},te=function(){ve(!0)},Q=Object(t.useRef)(null),ne=function(d){re(d,!0,c.current)!==!1&&ce(!0)},Y=function(){c.current=!0},u=function(){c.current=!1},Ce=function(d){var F=d.target.value;if(W&&Q.current&&/[\r\n]/.test(Q.current)){var Ee=Q.current.replace(/\r\n/g," ").replace(/[\r\n]/g," ");F=F.replace(Ee,Q.current)}Q.current=null,ne(F)},de=function(d){var F=d.clipboardData,Ee=F.getData("text");Q.current=Ee},k=function(d){var F=w();if(d.target!==i.current){F||d.preventDefault();var Ee=document.body.style.msTouchAction!==void 0;Ee?setTimeout(function(){i.current.focus()}):i.current.focus()}(q!=="combobox"&&(!he||!F)||!T)&&(T&&re("",!0,!1),ce())},be={inputRef:i,onInputKeyDown:Oe,onInputMouseDown:te,onInputChange:Ce,onInputPaste:de,onInputCompositionStart:Y,onInputCompositionEnd:u},oe=D?t.createElement(V,Object.assign({},e,be)):t.createElement(I,Object.assign({},e,be));return t.createElement("div",{ref:ge,className:"".concat(p,"-selector"),onMouseDown:k},oe)},U=t.forwardRef(m);U.displayName="Selector";var B=U,xe=o("uciX"),je=function(e){var S=typeof e!="number"?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:S,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:S,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:S,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:S,adjustY:1}}}},pt=function(e,S){var i=e.prefixCls,c=e.disabled,p=e.visible,D=e.children,T=e.popupElement,q=e.containerWidth,he=e.animation,W=e.transitionName,re=e.dropdownStyle,we=e.dropdownClassName,ce=e.direction,n=ce===void 0?"ltr":ce,ge=e.dropdownMatchSelectWidth,R=ge===void 0?!0:ge,ee=e.dropdownRender,w=e.dropdownAlign,ve=e.getPopupContainer,Oe=e.empty,te=e.getTriggerDOMNode,Q=Object($.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode"]),ne="".concat(i,"-dropdown"),Y=T;ee&&(Y=ee(T));var u=t.useMemo(function(){return je(R)},[R]),Ce=he?"".concat(ne,"-").concat(he):W,de=t.useRef(null);t.useImperativeHandle(S,function(){return{getPopupElement:function(){return de.current}}});var k=Object(h.a)({minWidth:q},re);return typeof R=="number"?k.width=R:R&&(k.width=q),t.createElement(xe.a,Object.assign({},Q,{showAction:[],hideAction:[],popupPlacement:n==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:u,prefixCls:ne,popupTransitionName:Ce,popup:t.createElement("div",{ref:de},Y),popupAlign:w,popupVisible:p,getPopupContainer:ve,popupClassName:P()(we,Object(j.a)({},"".concat(ne,"-empty"),Oe)),popupStyle:k,getTriggerDOMNode:te}),D)},wt=t.forwardRef(pt);wt.displayName="SelectTrigger";var sn=wt,cn=o("wPlo");function dn(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=t.useState(!1),S=Object(M.a)(e,2),i=S[0],c=S[1],p=t.useRef(null),D=function(){window.clearTimeout(p.current)};t.useEffect(function(){return D},[]);var T=function(he,W){D(),p.current=window.setTimeout(function(){c(he),W&&W()},v)};return[i,T,D]}var fn=o("2Qr1");function mn(v,e,S){var i=t.useRef(null);i.current={elements:v.filter(function(c){return c}),open:e,triggerOpen:S},t.useEffect(function(){function c(p){var D=p.target;i.current.open&&i.current.elements.every(function(T){return!T.contains(D)&&T!==D})&&i.current.triggerOpen(!1)}return window.addEventListener("mousedown",c),function(){return window.removeEventListener("mousedown",c)}},[])}function pn(v){var e=t.useRef(v),S=t.useMemo(function(){var i=new Map;e.current.forEach(function(p){var D=p.value,T=p.label;D!==T&&i.set(D,T)});var c=v.map(function(p){var D=i.get(p.value);return p.value===p.label&&D?Object(h.a)(Object(h.a)({},p),{},{label:D}):p});return e.current=c,c},[v]);return S}function hn(v,e){var S=t.useRef(null),i=t.useMemo(function(){var p=new Map;return e.forEach(function(D){var T=D.data.value;p.set(T,D)}),p},[v,e]);S.current=i;var c=function(D){return D.map(function(T){return S.current.get(T)}).filter(Boolean)};return c}var vn=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown"];function bn(v){var e=v.prefixCls,S=v.components.optionList,i=v.convertChildrenToData,c=v.flattenOptions,p=v.getLabeledValue,D=v.filterOptions,T=v.isValueDisabled,q=v.findValueOption,he=v.warningProps,W=v.fillOptionsWithMissingValue,re=v.omitDOMProps;function we(n,ge){var R,ee=n.prefixCls,w=ee===void 0?e:ee,ve=n.className,Oe=n.id,te=n.open,Q=n.defaultOpen,ne=n.options,Y=n.children,u=n.mode,Ce=n.value,de=n.defaultValue,k=n.labelInValue,be=n.showSearch,oe=n.inputValue,N=n.searchValue,d=n.filterOption,F=n.optionFilterProp,Ee=F===void 0?"value":F,ke=n.autoClearSearchValue,qe=ke===void 0?!0:ke,et=n.onSearch,tt=n.allowClear,Xe=n.clearIcon,nt=n.showArrow,Le=n.inputIcon,ot=n.menuItemSelectedIcon,ye=n.disabled,ae=n.loading,Te=n.defaultActiveFirstOption,Ne=n.notFoundContent,Me=Ne===void 0?"Not Found":Ne,Pe=n.optionLabelProp,at=n.backfill,ze=n.getInputElement,rt=n.getPopupContainer,Ge=n.listHeight,it=Ge===void 0?200:Ge,Qe=n.listItemHeight,ht=Qe===void 0?20:Qe,Ve=n.animation,gn=n.transitionName,On=n.virtual,Cn=n.dropdownStyle,En=n.dropdownClassName,Dt=n.dropdownMatchSelectWidth,yn=n.dropdownRender,Sn=n.dropdownAlign,jt=n.showAction,wn=jt===void 0?[]:jt,Dn=n.direction,vt=n.tokenSeparators,jn=n.tagRender,Mn=n.onPopupScroll,Mt=n.onDropdownVisibleChange,It=n.onFocus,Tt=n.onBlur,Rt=n.onKeyUp,xt=n.onKeyDown,Pt=n.onMouseDown,At=n.onChange,Lt=n.onSelect,Nt=n.onDeselect,Vt=n.onClear,Ut=n.internalProps,Re=Ut===void 0?{}:Ut,Kt=Object($.a)(n,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","getInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),bt=Re.mark===cn.a,Wt=re?re(Kt):Kt;vn.forEach(function(l){delete Wt[l]});var gt=Object(t.useRef)(null),Ye=Object(t.useRef)(null),lt=Object(t.useRef)(null),Ae=Object(t.useRef)(null),In=Object(t.useMemo)(function(){return(vt||[]).some(function(l){return[` + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,M="".concat(h," ").concat(ue).split(/[\s\n]+/),$="aria-",t="data-";function g(x,s){return x.indexOf(s)===0}function J(x){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y;s===!1?y={aria:!0,data:!0,attr:!0}:s===!0?y={aria:!0}:y=Object(j.a)({},s);var _={};return Object.keys(x).forEach(function(O){(y.aria&&(O==="role"||g(O,$))||y.data&&g(O,t)||y.attr&&M.includes(O))&&(_[O]=x[O])}),_}},qNPg:function(Be,L,o){"use strict";o.d(L,"a",function(){return bn});var j=o("rePB"),h=o("VTBJ"),ue=o("KQm4"),M=o("ODXe"),$=o("Ff2n"),t=o("cDcd"),g=o("4IlW"),J=o("TSYQ"),x=o.n(J),s=o("6cGi"),y=o("bX4T"),_=o("8XRh"),O=o("8OUc"),H=o("c+Xe"),se=function(e,S){var i=e.prefixCls,c=e.id,p=e.inputElement,D=e.disabled,T=e.tabIndex,q=e.autoFocus,he=e.autoComplete,W=e.editable,re=e.accessibilityIndex,we=e.value,ce=e.onKeyDown,n=e.onMouseDown,ge=e.onChange,R=e.onPaste,ee=e.onCompositionStart,w=e.onCompositionEnd,ve=e.open,Oe=e.attrs,te=p||t.createElement("input",null),Q=te,ne=Q.ref,Y=Q.props,u=Y.onKeyDown,Ce=Y.onChange,de=Y.onMouseDown,k=Y.onCompositionStart,be=Y.onCompositionEnd,oe=Y.style;return te=t.cloneElement(te,Object(h.a)(Object(h.a)({id:c,ref:Object(H.a)(S,ne),disabled:D,tabIndex:T,autoComplete:he||"off",autoFocus:q,className:"".concat(i,"-selection-search-input"),style:Object(h.a)(Object(h.a)({},oe),{},{opacity:W?null:0}),role:"combobox","aria-expanded":ve,"aria-haspopup":"listbox","aria-owns":"".concat(c,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(c,"_list"),"aria-activedescendant":"".concat(c,"_list_").concat(re)},Oe),{},{value:W?we:"",readOnly:!W,unselectable:W?null:"on",onKeyDown:function(d){ce(d),u&&u(d)},onMouseDown:function(d){n(d),de&&de(d)},onChange:function(d){ge(d),Ce&&Ce(d)},onCompositionStart:function(d){ee(d),k&&k(d)},onCompositionEnd:function(d){w(d),be&&be(d)},onPaste:R})),te},z=t.forwardRef(se);z.displayName="Input";var Z=z,Se=o("WKfj");function C(v,e){Se.b?t.useLayoutEffect(v,e):t.useEffect(v,e)}var r="__RC_SELECT_MAX_REST_COUNT__",E=function(e){var S=e.id,i=e.prefixCls,c=e.values,p=e.open,D=e.searchValue,T=e.inputRef,q=e.placeholder,he=e.disabled,W=e.mode,re=e.showSearch,we=e.autoFocus,ce=e.autoComplete,n=e.accessibilityIndex,ge=e.tabIndex,R=e.removeIcon,ee=e.choiceTransitionName,w=e.maxTagCount,ve=e.maxTagTextLength,Oe=e.maxTagPlaceholder,te=Oe===void 0?function(ae){return"+ ".concat(ae.length," ...")}:Oe,Q=e.tagRender,ne=e.onSelect,Y=e.onInputChange,u=e.onInputPaste,Ce=e.onInputKeyDown,de=e.onInputMouseDown,k=e.onInputCompositionStart,be=e.onInputCompositionEnd,oe=t.useState(!1),N=Object(M.a)(oe,2),d=N[0],F=N[1],Ee=t.useRef(null),ke=t.useState(0),qe=Object(M.a)(ke,2),et=qe[0],tt=qe[1];t.useEffect(function(){F(!0)},[]);var Xe=p||W==="tags"?D:"",nt=W==="tags"||p&&re;C(function(){tt(Ee.current.scrollWidth)},[Xe]);var Le=c,ot;typeof w=="number"&&(ot=c.length-w,Le=c.slice(0,w)),typeof ve=="number"&&(Le=Le.map(function(ae){var Te=ae.label,Ne=Object($.a)(ae,["label"]),Me=Te;if(typeof Te=="string"||typeof Te=="number"){var xe=String(Me);xe.length>ve&&(Me="".concat(xe.slice(0,ve),"..."))}return Object(h.a)(Object(h.a)({},Ne),{},{label:Me})})),ot>0&&Le.push({key:r,label:typeof te=="function"?te(c.slice(w)):te});var ye=t.createElement(_.CSSMotionList,{component:!1,keys:Le,motionName:ee,motionAppear:d},function(ae){var Te=ae.key,Ne=ae.label,Me=ae.value,xe=ae.disabled,at=ae.className,ze=ae.style,rt=Te||Me,Ge=Te!==r&&!xe,it=function(Ve){Ve.preventDefault(),Ve.stopPropagation()},Qe=function(Ve){Ve&&Ve.stopPropagation(),ne(Me,{selected:!1})};return typeof Q=="function"?t.createElement("span",{key:rt,onMouseDown:it,className:at,style:ze},Q({label:Ne,value:Me,disabled:xe,closable:Ge,onClose:Qe})):t.createElement("span",{key:rt,className:x()(at,"".concat(i,"-selection-item"),Object(j.a)({},"".concat(i,"-selection-item-disabled"),xe)),style:ze},t.createElement("span",{className:"".concat(i,"-selection-item-content")},Ne),Ge&&t.createElement(O.a,{className:"".concat(i,"-selection-item-remove"),onMouseDown:it,onClick:Qe,customizeIcon:R},"\xD7"))});return t.createElement(t.Fragment,null,ye,t.createElement("span",{className:"".concat(i,"-selection-search"),style:{width:et}},t.createElement(Z,{ref:T,open:p,prefixCls:i,id:S,inputElement:null,disabled:he,autoFocus:we,autoComplete:ce,editable:nt,accessibilityIndex:n,value:Xe,onKeyDown:Ce,onMouseDown:de,onChange:Y,onPaste:u,onCompositionStart:k,onCompositionEnd:be,tabIndex:ge,attrs:Object(y.a)(e,!0)}),t.createElement("span",{ref:Ee,className:"".concat(i,"-selection-search-mirror"),"aria-hidden":!0},Xe,"\xA0")),!c.length&&!Xe&&t.createElement("span",{className:"".concat(i,"-selection-placeholder")},q))},V=E,G=function(e){var S=e.inputElement,i=e.prefixCls,c=e.id,p=e.inputRef,D=e.disabled,T=e.autoFocus,q=e.autoComplete,he=e.accessibilityIndex,W=e.mode,re=e.open,we=e.values,ce=e.placeholder,n=e.tabIndex,ge=e.showSearch,R=e.searchValue,ee=e.activeValue,w=e.onInputKeyDown,ve=e.onInputMouseDown,Oe=e.onInputChange,te=e.onInputPaste,Q=e.onInputCompositionStart,ne=e.onInputCompositionEnd,Y=t.useState(!1),u=Object(M.a)(Y,2),Ce=u[0],de=u[1],k=W==="combobox",be=k||ge&&re,oe=we[0],N=R||"";k&&ee&&!Ce&&(N=ee),t.useEffect(function(){k&&de(!1)},[k,ee]);var d=W!=="combobox"&&!re?!1:!!N,F=oe&&(typeof oe.label=="string"||typeof oe.label=="number")?oe.label.toString():void 0;return t.createElement(t.Fragment,null,t.createElement("span",{className:"".concat(i,"-selection-search")},t.createElement(Z,{ref:p,prefixCls:i,id:c,open:re,inputElement:S,disabled:D,autoFocus:T,autoComplete:q,editable:be,accessibilityIndex:he,value:N,onKeyDown:w,onMouseDown:ve,onChange:function(ke){de(!0),Oe(ke)},onPaste:te,onCompositionStart:Q,onCompositionEnd:ne,tabIndex:n,attrs:Object(y.a)(e,!0)})),!k&&oe&&!d&&t.createElement("span",{className:"".concat(i,"-selection-item"),title:F},oe.label),!oe&&!d&&t.createElement("span",{className:"".concat(i,"-selection-placeholder")},ce))},I=G;function A(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=t.useRef(null),S=t.useRef(null);t.useEffect(function(){return function(){window.clearTimeout(S.current)}},[]);function i(c){(c||e.current===null)&&(e.current=c),window.clearTimeout(S.current),S.current=window.setTimeout(function(){e.current=null},v)}return[function(){return e.current},i]}var m=function(e,S){var i=Object(t.useRef)(null),c=Object(t.useRef)(!1),p=e.prefixCls,D=e.multiple,T=e.open,q=e.mode,he=e.showSearch,W=e.tokenWithEnter,re=e.onSearch,we=e.onSearchSubmit,ce=e.onToggleOpen,n=e.onInputKeyDown,ge=e.domRef;t.useImperativeHandle(S,function(){return{focus:function(){i.current.focus()},blur:function(){i.current.blur()}}});var R=A(0),ee=Object(M.a)(R,2),w=ee[0],ve=ee[1],Oe=function(d){var F=d.which;(F===g.a.UP||F===g.a.DOWN)&&d.preventDefault(),n&&n(d),F===g.a.ENTER&&q==="tags"&&!c.current&&!T&&we(d.target.value),[g.a.SHIFT,g.a.TAB,g.a.BACKSPACE,g.a.ESC].includes(F)||ce(!0)},te=function(){ve(!0)},Q=Object(t.useRef)(null),ne=function(d){re(d,!0,c.current)!==!1&&ce(!0)},Y=function(){c.current=!0},u=function(){c.current=!1},Ce=function(d){var F=d.target.value;if(W&&Q.current&&/[\r\n]/.test(Q.current)){var Ee=Q.current.replace(/\r\n/g," ").replace(/[\r\n]/g," ");F=F.replace(Ee,Q.current)}Q.current=null,ne(F)},de=function(d){var F=d.clipboardData,Ee=F.getData("text");Q.current=Ee},k=function(d){var F=w();if(d.target!==i.current){F||d.preventDefault();var Ee=document.body.style.msTouchAction!==void 0;Ee?setTimeout(function(){i.current.focus()}):i.current.focus()}(q!=="combobox"&&(!he||!F)||!T)&&(T&&re("",!0,!1),ce())},be={inputRef:i,onInputKeyDown:Oe,onInputMouseDown:te,onInputChange:Ce,onInputPaste:de,onInputCompositionStart:Y,onInputCompositionEnd:u},oe=D?t.createElement(V,Object.assign({},e,be)):t.createElement(I,Object.assign({},e,be));return t.createElement("div",{ref:ge,className:"".concat(p,"-selector"),onMouseDown:k},oe)},U=t.forwardRef(m);U.displayName="Selector";var B=U,Pe=o("uciX"),je=function(e){var S=typeof e!="number"?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:S,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:S,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:S,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:S,adjustY:1}}}},pt=function(e,S){var i=e.prefixCls,c=e.disabled,p=e.visible,D=e.children,T=e.popupElement,q=e.containerWidth,he=e.animation,W=e.transitionName,re=e.dropdownStyle,we=e.dropdownClassName,ce=e.direction,n=ce===void 0?"ltr":ce,ge=e.dropdownMatchSelectWidth,R=ge===void 0?!0:ge,ee=e.dropdownRender,w=e.dropdownAlign,ve=e.getPopupContainer,Oe=e.empty,te=e.getTriggerDOMNode,Q=Object($.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode"]),ne="".concat(i,"-dropdown"),Y=T;ee&&(Y=ee(T));var u=t.useMemo(function(){return je(R)},[R]),Ce=he?"".concat(ne,"-").concat(he):W,de=t.useRef(null);t.useImperativeHandle(S,function(){return{getPopupElement:function(){return de.current}}});var k=Object(h.a)({minWidth:q},re);return typeof R=="number"?k.width=R:R&&(k.width=q),t.createElement(Pe.a,Object.assign({},Q,{showAction:[],hideAction:[],popupPlacement:n==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:u,prefixCls:ne,popupTransitionName:Ce,popup:t.createElement("div",{ref:de},Y),popupAlign:w,popupVisible:p,getPopupContainer:ve,popupClassName:x()(we,Object(j.a)({},"".concat(ne,"-empty"),Oe)),popupStyle:k,getTriggerDOMNode:te}),D)},wt=t.forwardRef(pt);wt.displayName="SelectTrigger";var sn=wt,cn=o("wPlo");function dn(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=t.useState(!1),S=Object(M.a)(e,2),i=S[0],c=S[1],p=t.useRef(null),D=function(){window.clearTimeout(p.current)};t.useEffect(function(){return D},[]);var T=function(he,W){D(),p.current=window.setTimeout(function(){c(he),W&&W()},v)};return[i,T,D]}var fn=o("2Qr1");function mn(v,e,S){var i=t.useRef(null);i.current={elements:v.filter(function(c){return c}),open:e,triggerOpen:S},t.useEffect(function(){function c(p){var D=p.target;i.current.open&&i.current.elements.every(function(T){return!T.contains(D)&&T!==D})&&i.current.triggerOpen(!1)}return window.addEventListener("mousedown",c),function(){return window.removeEventListener("mousedown",c)}},[])}function pn(v){var e=t.useRef(v),S=t.useMemo(function(){var i=new Map;e.current.forEach(function(p){var D=p.value,T=p.label;D!==T&&i.set(D,T)});var c=v.map(function(p){var D=i.get(p.value);return p.value===p.label&&D?Object(h.a)(Object(h.a)({},p),{},{label:D}):p});return e.current=c,c},[v]);return S}function hn(v,e){var S=t.useRef(null),i=t.useMemo(function(){var p=new Map;return e.forEach(function(D){var T=D.data.value;p.set(T,D)}),p},[v,e]);S.current=i;var c=function(D){return D.map(function(T){return S.current.get(T)}).filter(Boolean)};return c}var vn=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown"];function bn(v){var e=v.prefixCls,S=v.components.optionList,i=v.convertChildrenToData,c=v.flattenOptions,p=v.getLabeledValue,D=v.filterOptions,T=v.isValueDisabled,q=v.findValueOption,he=v.warningProps,W=v.fillOptionsWithMissingValue,re=v.omitDOMProps;function we(n,ge){var R,ee=n.prefixCls,w=ee===void 0?e:ee,ve=n.className,Oe=n.id,te=n.open,Q=n.defaultOpen,ne=n.options,Y=n.children,u=n.mode,Ce=n.value,de=n.defaultValue,k=n.labelInValue,be=n.showSearch,oe=n.inputValue,N=n.searchValue,d=n.filterOption,F=n.optionFilterProp,Ee=F===void 0?"value":F,ke=n.autoClearSearchValue,qe=ke===void 0?!0:ke,et=n.onSearch,tt=n.allowClear,Xe=n.clearIcon,nt=n.showArrow,Le=n.inputIcon,ot=n.menuItemSelectedIcon,ye=n.disabled,ae=n.loading,Te=n.defaultActiveFirstOption,Ne=n.notFoundContent,Me=Ne===void 0?"Not Found":Ne,xe=n.optionLabelProp,at=n.backfill,ze=n.getInputElement,rt=n.getPopupContainer,Ge=n.listHeight,it=Ge===void 0?200:Ge,Qe=n.listItemHeight,ht=Qe===void 0?20:Qe,Ve=n.animation,gn=n.transitionName,On=n.virtual,Cn=n.dropdownStyle,En=n.dropdownClassName,Dt=n.dropdownMatchSelectWidth,yn=n.dropdownRender,Sn=n.dropdownAlign,jt=n.showAction,wn=jt===void 0?[]:jt,Dn=n.direction,vt=n.tokenSeparators,jn=n.tagRender,Mn=n.onPopupScroll,Mt=n.onDropdownVisibleChange,It=n.onFocus,Tt=n.onBlur,Rt=n.onKeyUp,Pt=n.onKeyDown,xt=n.onMouseDown,At=n.onChange,Lt=n.onSelect,Nt=n.onDeselect,Vt=n.onClear,Ut=n.internalProps,Re=Ut===void 0?{}:Ut,Kt=Object($.a)(n,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","getInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),bt=Re.mark===cn.a,Wt=re?re(Kt):Kt;vn.forEach(function(l){delete Wt[l]});var gt=Object(t.useRef)(null),Ye=Object(t.useRef)(null),lt=Object(t.useRef)(null),Ae=Object(t.useRef)(null),In=Object(t.useMemo)(function(){return(vt||[]).some(function(l){return[` `,`\r -`].includes(l)})},[vt]),Tn=dn(),Ot=Object(M.a)(Tn,3),Ct=Ot[0],Ft=Ot[1],Rn=Ot[2],xn=Object(t.useState)(),Bt=Object(M.a)(xn,2),Pn=Bt[0],An=Bt[1];Object(t.useEffect)(function(){An("rc_select_".concat(Object(Se.a)()))},[]);var kt=Oe||Pn,Ue=Pe;Ue===void 0&&(Ue=ne?"label":"children");var $e=u==="combobox"?!1:k,ie=u==="tags"||u==="multiple",Je=be!==void 0?be:ie||u==="combobox",Xt=Object(t.useRef)(null);t.useImperativeHandle(ge,function(){return{focus:lt.current.focus,blur:lt.current.blur}});var Ln=Object(s.a)(de,{value:Ce}),$t=Object(M.a)(Ln,2),Ie=$t[0],Nn=$t[1],fe=Object(t.useMemo)(function(){return Object(Se.e)(Ie,{labelInValue:$e,combobox:u==="combobox"})},[Ie,$e]),Vn=Object(t.useMemo)(function(){return new Set(fe)},[fe]),Un=Object(t.useState)(null),_t=Object(M.a)(Un,2),Kn=_t[0],ut=_t[1],Wn=Object(t.useState)(""),Ht=Object(M.a)(Wn,2),Fn=Ht[0],Ze=Ht[1],X=Fn;u==="combobox"&&Ie!==void 0?X=Ie:N!==void 0?X=N:oe&&(X=oe);var Ke=Object(t.useMemo)(function(){var l=ne;return l===void 0&&(l=i(Y)),u==="tags"&&W&&(l=W(l,Ie,Ue,k)),l||[]},[ne,Y,u,Ie]),zt=Object(t.useMemo)(function(){return c(Ke,n)},[Ke]),Et=hn(fe,zt),st=Object(t.useMemo)(function(){if(!X||!Je)return Object(ue.a)(Ke);var l=D(X,Ke,{optionFilterProp:Ee,filterOption:u==="combobox"&&d===void 0?function(){return!0}:d});return u==="tags"&&l.every(function(a){return a[Ee]!==X})&&l.unshift({value:X,label:X,key:"__RC_SELECT_TAG_PLACEHOLDER__"}),l},[Ke,X,u,Je]),Bn=Object(t.useMemo)(function(){return c(st,n)},[st]);Object(t.useEffect)(function(){Ae.current&&Ae.current.scrollTo&&Ae.current.scrollTo(0)},[X]);var ct=Object(t.useMemo)(function(){var l=fe.map(function(a){var f=Et([a]),x=p(a,{options:f,prevValue:Ie,labelInValue:$e,optionLabelProp:Ue});return Object(h.a)(Object(h.a)({},x),{},{disabled:T(a,f)})});return!u&&l.length===1&&l[0].value===null&&l[0].label===null?[]:l},[Ie,Ke,u]);ct=pn(ct);var dt=function(a,f,x){var K=Et([a]),b=q([a],K)[0];if(!Re.skipTriggerSelect){var le=$e?p(a,{options:K,prevValue:Ie,labelInValue:$e,optionLabelProp:Ue}):a;f&&Lt?Lt(le,b):!f&&Nt&&Nt(le,b)}bt&&(f&&Re.onRawSelect?Re.onRawSelect(a,b,x):!f&&Re.onRawDeselect&&Re.onRawDeselect(a,b,x))},kn=Object(t.useState)([]),Gt=Object(M.a)(kn,2),Xn=Gt[0],$n=Gt[1],We=function(a){if(bt&&Re.skipTriggerChange)return;var f=Et(a),x=Object(Se.f)(Array.from(a),{labelInValue:$e,options:f,getLabeledValue:p,prevValue:Ie,optionLabelProp:Ue}),K=ie?x:x[0];if(At&&(fe.length!==0||x.length!==0)){var b=q(a,f,{prevValueOptions:Xn});$n(b.map(function(le,pe){var De=Object(h.a)({},le);return Object.defineProperty(De,"_INTERNAL_OPTION_VALUE_",{get:function(){return a[pe]}}),De})),At(K,ie?b:b[0])}Nn(K)},Qt=function(a,f){var x=f.selected,K=f.source;if(ye)return;var b;ie?(b=new Set(fe),x?b.add(a):b.delete(a)):(b=new Set,b.add(a)),(ie||!ie&&Array.from(fe)[0]!==a)&&We(Array.from(b)),dt(a,!ie||x,K),u==="combobox"?(Ze(String(a)),ut("")):(!ie||qe)&&(Ze(""),ut(""))},_n=function(a,f){Qt(a,Object(h.a)(Object(h.a)({},f),{},{source:"option"}))},Hn=function(a,f){Qt(a,Object(h.a)(Object(h.a)({},f),{},{source:"selection"}))},Yt=u==="combobox"&&ze&&ze()||null,zn=Object(s.a)(void 0,{defaultValue:Q,value:te}),Jt=Object(M.a)(zn,2),yt=Jt[0],Zt=Jt[1],me=yt,qt=!Me&&!st.length;(ye||qt&&me&&u==="combobox")&&(me=!1);var ft=qt?!1:me,Fe=function(a){var f=a!==void 0?a:!me;yt!==f&&!ye&&(Zt(f),Mt&&Mt(f))};mn([gt.current,Ye.current&&Ye.current.getPopupElement()],ft,Fe);var mt=function(a,f,x){var K=!0,b=a;ut(null);var le=x?null:Object(fn.f)(a,vt),pe=le;if(u==="combobox")f&&We([b]);else if(le){b="",u!=="tags"&&(pe=le.map(function(He){var un=zt.find(function(go){var Oo=go.data;return Oo[Ue]===He});return un?un.data.value:null}).filter(function(He){return He!==null}));var De=Array.from(new Set([].concat(Object(ue.a)(fe),Object(ue.a)(pe))));We(De),De.forEach(function(He){dt(He,!0,"input")}),Fe(!1),K=!1}return Ze(b),et&&X!==b&&et(b),K},Gn=function(a){var f=Array.from(new Set([].concat(Object(ue.a)(fe),[a])));We(f),f.forEach(function(x){dt(x,!0,"input")}),Ze("")};Object(t.useEffect)(function(){yt&&!!ye&&Zt(!1)},[ye]),Object(t.useEffect)(function(){!me&&!ie&&u!=="combobox"&&mt("",!1,!1)},[me]);var Qn=A(),en=Object(M.a)(Qn,2),Yn=en[0],Jn=en[1],Zn=function(a){var f=Yn(),x=a.which;if(!me&&x===g.a.ENTER&&Fe(!0),Jn(!!X),x===g.a.BACKSPACE&&!f&&ie&&!X&&fe.length){var K=Object(Se.c)(ct,fe);K.removedValue!==null&&(We(K.values),dt(K.removedValue,!1,"input"))}for(var b=arguments.length,le=new Array(b>1?b-1:0),pe=1;pe1?f-1:0),K=1;K1?b-1:0),pe=1;pe1?b-1:0),pe=1;pe1?f-1:0),K=1;K1?b-1:0),pe=1;pe0?d.cmdState[d.cmdState.length-1]:null}function R(d){var s=d.cmdState.pop();s&&s.closeBracket()}function j(d){for(var s=d.cmdState,l=s.length-1;l>=0;l--){var i=s[l];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function k(d,s,l){return function(){this.name=d,this.bracketNo=0,this.style=s,this.styles=l,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var A={};A.importmodule=k("importmodule","tag",["string","builtin"]),A.documentclass=k("documentclass","tag",["","atom"]),A.usepackage=k("usepackage","tag",["atom"]),A.begin=k("begin","tag",["atom"]),A.end=k("end","tag",["atom"]),A.label=k("label","tag",["atom"]),A.ref=k("ref","tag",["atom"]),A.eqref=k("eqref","tag",["atom"]),A.cite=k("cite","tag",["atom"]),A.bibitem=k("bibitem","tag",["atom"]),A.Bibitem=k("Bibitem","tag",["atom"]),A.RBibitem=k("RBibitem","tag",["atom"]),A.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(d,s){d.f=s}function g(d,s){var l;if(d.match(/^\\[a-zA-Z@]+/)){var i=d.current().slice(1);return l=A.hasOwnProperty(i)?A[i]:A.DEFAULT,l=new l,H(s,l),D(s,u),l.style}if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/\\]/))return"tag";if(d.match("\\["))return D(s,function(n,f){return h(n,f,"\\]")}),"keyword";if(d.match("\\("))return D(s,function(n,f){return h(n,f,"\\)")}),"keyword";if(d.match("$$"))return D(s,function(n,f){return h(n,f,"$$")}),"keyword";if(d.match("$"))return D(s,function(n,f){return h(n,f,"$")}),"keyword";var o=d.next();if(o=="%")return d.skipToEnd(),"comment";if(o=="}"||o=="]"){if(l=N(s),l)l.closeBracket(o),D(s,u);else return"error";return"bracket"}else return o=="{"||o=="["?(l=A.DEFAULT,l=new l,H(s,l),"bracket"):/\d/.test(o)?(d.eatWhile(/[\w.%]/),"atom"):(d.eatWhile(/[\w\-_]/),l=j(s),l.name=="begin"&&(l.argument=d.current()),l.styleIdentifier())}function h(d,s,l){if(d.eatSpace())return null;if(l&&d.match(l))return D(s,g),"keyword";if(d.match(/^\\[a-zA-Z@]+/))return"tag";if(d.match(/^[a-zA-Z]+/))return"variable-2";if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/]/))return"tag";if(d.match(/^[\^_&]/))return"tag";if(d.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(d.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=d.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(d.skipToEnd(),"comment"):"error"}function u(d,s){var l=d.peek(),i;return l=="{"||l=="["?(i=N(s),i.openBracket(l),d.eat(l),D(s,g),"bracket"):/[ \t\r]/.test(l)?(d.eat(l),null):(D(s,g),R(s),g(d,s))}return{startState:function(){var d=L.inMathMode?function(s,l){return h(s,l)}:g;return{cmdState:[],f:d}},copyState:function(d){return{cmdState:d.cmdState.slice(),f:d.f}},token:function(d,s){return s.f(d,s)},blankLine:function(d){d.f=g,d.cmdState.length=0},lineComment:"%"}}),Y.defineMIME("text/x-stex","stex"),Y.defineMIME("text/x-latex","stex")})},"+aKw":function(Le,ye,F){"use strict";var Y=F("tJVT"),K=F("cDcd"),L=F.n(K),H=function(j){return String(j).length===1?"0".concat(j):j},N=function(j){var k=j.className,A=k===void 0?"":k,D=j.onChange,g=j.defaultValue,h=g===void 0?0:g,u=Object(K.useState)(h),d=Object(Y.a)(u,2),s=d[0],l=d[1];Object(K.useEffect)(function(){var f=setTimeout(function(){l(s+1e3)},1e3);return D(s+1e3),function(){clearInterval(f)}},[s]);var i=parseInt(s/(60*6e4))||"00",o=parseInt(s%(60*6e4)/6e4)||"00",n=parseInt(s%6e4/1e3)||"00";return L.a.createElement("div",{className:A},H(i),":",H(o),":",H(n))};ye.a=N},"+k/U":function(Le,ye,F){Le.exports={pagination:"pagination___2XcQw",info:"info___12Y4R"}},"+ua5":function(Le,ye,F){},"07cG":function(Le,ye,F){Le.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"19Vz":function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){Y.defineOption("placeholder","",function(k,A,D){var g=D&&D!=Y.Init;if(A&&!g)k.on("blur",N),k.on("change",R),k.on("swapDoc",R),Y.on(k.getInputField(),"compositionupdate",k.state.placeholderCompose=function(){H(k)}),R(k);else if(!A&&g){k.off("blur",N),k.off("change",R),k.off("swapDoc",R),Y.off(k.getInputField(),"compositionupdate",k.state.placeholderCompose),K(k);var h=k.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}A&&!k.hasFocus()&&N(k)});function K(k){k.state.placeholder&&(k.state.placeholder.parentNode.removeChild(k.state.placeholder),k.state.placeholder=null)}function L(k){K(k);var A=k.state.placeholder=document.createElement("pre");A.style.cssText="height: 0; overflow: visible",A.style.direction=k.getOption("direction"),A.className="CodeMirror-placeholder CodeMirror-line-like";var D=k.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),A.appendChild(D),k.display.lineSpace.insertBefore(A,k.display.lineSpace.firstChild)}function H(k){setTimeout(function(){var A=!1,D=k.getInputField();D.nodeName=="TEXTAREA"?A=!D.value:k.lineCount()==1&&(A=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),A?L(k):K(k)},20)}function N(k){j(k)&&L(k)}function R(k){var A=k.getWrapperElement(),D=j(k);A.className=A.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?L(k):K(k)}function j(k){return k.lineCount()===1&&k.getLine(0)===""}})},"1eCo":function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){"use strict";var K={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},L={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Y.defineMode("xml",function(H,N){var R=H.indentUnit,j={},k=N.htmlMode?K:L;for(var A in k)j[A]=k[A];for(var A in N)j[A]=N[A];var D,g;function h(c,E){function _(P){return E.tokenize=P,P(c,E)}var b=c.next();if(b=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?_(s("atom","]]>")):null:c.match("--")?_(s("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),_(l(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),E.tokenize=s("meta","?>"),"meta"):(D=c.eat("/")?"closeTag":"openTag",E.tokenize=u,"tag bracket");if(b=="&"){var I;return c.eat("#")?c.eat("x")?I=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):I=c.eatWhile(/[\d]/)&&c.eat(";"):I=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),I?"atom":"error"}else return c.eatWhile(/[^&<]/),null}h.isInText=!0;function u(c,E){var _=c.next();if(_==">"||_=="/"&&c.eat(">"))return E.tokenize=h,D=_==">"?"endTag":"selfcloseTag","tag bracket";if(_=="=")return D="equals",null;if(_=="<"){E.tokenize=h,E.state=f,E.tagName=E.tagStart=null;var b=E.tokenize(c,E);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(_)?(E.tokenize=d(_),E.stringStartCol=c.column(),E.tokenize(c,E)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(c){var E=function(_,b){for(;!_.eol();)if(_.next()==c){b.tokenize=u;break}return"string"};return E.isInAttribute=!0,E}function s(c,E){return function(_,b){for(;!_.eol();){if(_.match(E)){b.tokenize=h;break}_.next()}return c}}function l(c){return function(E,_){for(var b;(b=E.next())!=null;){if(b=="<")return _.tokenize=l(c+1),_.tokenize(E,_);if(b==">")if(c==1){_.tokenize=h;break}else return _.tokenize=l(c-1),_.tokenize(E,_)}return"meta"}}function i(c,E,_){this.prev=c.context,this.tagName=E,this.indent=c.indented,this.startOfLine=_,(j.doNotIndent.hasOwnProperty(E)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function o(c){c.context&&(c.context=c.context.prev)}function n(c,E){for(var _;;){if(!c.context)return;if(_=c.context.tagName,!j.contextGrabbers.hasOwnProperty(_)||!j.contextGrabbers[_].hasOwnProperty(E))return;o(c)}}function f(c,E,_){return c=="openTag"?(_.tagStart=E.column(),O):c=="closeTag"?S:f}function O(c,E,_){return c=="word"?(_.tagName=E.current(),g="tag",T):j.allowMissingTagName&&c=="endTag"?(g="tag bracket",T(c,E,_)):(g="error",O)}function S(c,E,_){if(c=="word"){var b=E.current();return _.context&&_.context.tagName!=b&&j.implicitlyClosed.hasOwnProperty(_.context.tagName)&&o(_),_.context&&_.context.tagName==b||j.matchClosing===!1?(g="tag",x):(g="tag error",w)}else return j.allowMissingTagName&&c=="endTag"?(g="tag bracket",x(c,E,_)):(g="error",w)}function x(c,E,_){return c!="endTag"?(g="error",x):(o(_),f)}function w(c,E,_){return g="error",x(c,E,_)}function T(c,E,_){if(c=="word")return g="attribute",y;if(c=="endTag"||c=="selfcloseTag"){var b=_.tagName,I=_.tagStart;return _.tagName=_.tagStart=null,c=="selfcloseTag"||j.autoSelfClosers.hasOwnProperty(b)?n(_,b):(n(_,b),_.context=new i(_,b,I==_.indented)),f}return g="error",T}function y(c,E,_){return c=="equals"?v:(j.allowMissing||(g="error"),T(c,E,_))}function v(c,E,_){return c=="string"?p:c=="word"&&j.allowUnquoted?(g="string",T):(g="error",T(c,E,_))}function p(c,E,_){return c=="string"?p:T(c,E,_)}return{startState:function(c){var E={tokenize:h,state:f,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(E.baseIndent=c),E},token:function(c,E){if(!E.tagName&&c.sol()&&(E.indented=c.indentation()),c.eatSpace())return null;D=null;var _=E.tokenize(c,E);return(_||D)&&_!="comment"&&(g=null,E.state=E.state(D||_,c,E),g&&(_=g=="error"?_+" error":g)),_},indent:function(c,E,_){var b=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+R;if(b&&b.noIndent)return Y.Pass;if(c.tokenize!=u&&c.tokenize!=h)return _?_.match(/^(\s*)/)[0].length:0;if(c.tagName)return j.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+R*(j.multilineTagIndentFactor||1);if(j.alignCDATA&&/$/,blockCommentStart:"",configuration:j.htmlMode?"html":"xml",helperType:j.htmlMode?"html":"xml",skipAttribute:function(c){c.state==v&&(c.state=T)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var E=[],_=c.context;_;_=_.prev)_.tagName&&E.push(_.tagName);return E.reverse()}}}),Y.defineMIME("text/xml","xml"),Y.defineMIME("application/xml","xml"),Y.mimeModes.hasOwnProperty("text/html")||Y.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Le,ye,F){"use strict";F.d(ye,"d",function(){return ot}),F.d(ye,"b",function(){return ce}),F.d(ye,"c",function(){return je}),F.d(ye,"a",function(){return ut});var Y=F("VTBJ"),K=F("1OyB"),L=F("vuIU"),H=F("JX7q"),N=F("Ji7U"),R=F("LK+K"),j=F("cDcd"),k=F("I8Z2"),A=F("BGR+"),D=F("wx14"),g=F("rePB"),h=F("4IlW"),u=F("2GS6"),d=F("Gytx"),s=F.n(d),l=F("TSYQ"),i=F.n(l),o=F("U8pU"),n=F("ODXe"),f=/iPhone/i,O=/iPod/i,S=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,w=/Android/i,T=/\bAndroid(?:.+)SD4930UR\b/i,y=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,v=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,E=/BB10/i,_=/Opera Mini/i,b=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function P(rt,Me){return rt.test(Me)}function B(rt){var Me=rt||(typeof navigator!="undefined"?navigator.userAgent:""),Ue=Me.split("[FBAN");if(typeof Ue[1]!="undefined"){var we=Ue,ee=Object(n.a)(we,1);Me=ee[0]}if(Ue=Me.split("Twitter"),typeof Ue[1]!="undefined"){var he=Ue,Fe=Object(n.a)(he,1);Me=Fe[0]}var Re={apple:{phone:P(f,Me)&&!P(v,Me),ipod:P(O,Me),tablet:!P(f,Me)&&P(S,Me)&&!P(v,Me),device:(P(f,Me)||P(O,Me)||P(S,Me))&&!P(v,Me)},amazon:{phone:P(T,Me),tablet:!P(T,Me)&&P(y,Me),device:P(T,Me)||P(y,Me)},android:{phone:!P(v,Me)&&P(T,Me)||!P(v,Me)&&P(x,Me),tablet:!P(v,Me)&&!P(T,Me)&&!P(x,Me)&&(P(y,Me)||P(w,Me)),device:!P(v,Me)&&(P(T,Me)||P(y,Me)||P(x,Me)||P(w,Me))||P(/\bokhttp\b/i,Me)},windows:{phone:P(v,Me),tablet:P(p,Me),device:P(v,Me)||P(p,Me)},other:{blackberry:P(c,Me),blackberry10:P(E,Me),opera:P(_,Me),firefox:P(I,Me),chrome:P(b,Me),device:P(c,Me)||P(E,Me)||P(_,Me)||P(I,Me)||P(b,Me)},any:null,phone:null,tablet:null};return Re.any=Re.apple.device||Re.android.device||Re.windows.device||Re.other.device,Re.phone=Re.apple.phone||Re.android.phone||Re.windows.phone,Re.tablet=Re.apple.tablet||Re.android.tablet||Re.windows.tablet,Re}var z=Object(Y.a)(Object(Y.a)({},B()),{},{isMobile:B}),U=z;function C(){}function W(rt,Me,Ue){var we=Me||"";return rt.key||"".concat(we,"item_").concat(Ue)}function V(rt){return"".concat(rt,"-menu-")}function J(rt,Me){var Ue=-1;j.Children.forEach(rt,function(we){Ue+=1,we&&we.type&&we.type.isMenuItemGroup?j.Children.forEach(we.props.children,function(ee){Ue+=1,Me(ee,Ue)}):Me(we,Ue)})}function ne(rt,Me,Ue){if(!rt||Ue.find)return;j.Children.forEach(rt,function(we){if(we){var ee=we.type;if(!ee||!(ee.isSubMenu||ee.isMenuItem||ee.isMenuItemGroup))return;Me.indexOf(we.key)!==-1?Ue.find=!0:we.props.children&&ne(we.props.children,Me,Ue)}})}var fe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ue=function(Me){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=Me&&typeof Me.getBoundingClientRect=="function"&&Me.getBoundingClientRect().width;if(we){if(Ue){var ee=getComputedStyle(Me),he=ee.marginLeft,Fe=ee.marginRight;we+=+he.replace("px","")+ +Fe.replace("px","")}we=+we.toFixed(6)}return we||0},le=function(Me,Ue,we){Me&&Object(o.a)(Me.style)==="object"&&(Me.style[Ue]=we)},me=function(){return U.any},ge=F("KQm4"),re=F("Ff2n"),oe=F("faye"),xe=F("bdgK"),Be=F("uciX"),Ve=F("8XRh"),Ye={adjustX:1,adjustY:1},$e={topLeft:{points:["bl","tl"],overflow:Ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ye,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ye,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ye,offset:[4,0]}},Ke={topLeft:{points:["bl","tl"],overflow:Ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ye,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ye,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ye,offset:[4,0]}},We=$e,ze=0,at={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Je=function(Me,Ue,we){var ee=V(Ue),he=Me.getState();Me.setState({defaultActiveFirst:Object(Y.a)(Object(Y.a)({},he.defaultActiveFirst),{},Object(g.a)({},ee,we))})},Xe=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;Object(K.a)(this,Ue),ee=Me.call(this,we),ee.onDestroy=function(Te){ee.props.onDestroy(Te)},ee.onKeyDown=function(Te){var Ae=Te.keyCode,Qe=ee.menuInstance,Et=ee.props,vt=Et.isOpen,cn=Et.store;if(Ae===h.a.ENTER)return ee.onTitleClick(Te),Je(cn,ee.props.eventKey,!0),!0;if(Ae===h.a.RIGHT)return vt?Qe.onKeyDown(Te):(ee.triggerOpenChange(!0),Je(cn,ee.props.eventKey,!0)),!0;if(Ae===h.a.LEFT){var yn;if(vt)yn=Qe.onKeyDown(Te);else return;return yn||(ee.triggerOpenChange(!1),yn=!0),yn}return vt&&(Ae===h.a.UP||Ae===h.a.DOWN)?Qe.onKeyDown(Te):void 0},ee.onOpenChange=function(Te){ee.props.onOpenChange(Te)},ee.onPopupVisibleChange=function(Te){ee.triggerOpenChange(Te,Te?"mouseenter":"mouseleave")},ee.onMouseEnter=function(Te){var Ae=ee.props,Qe=Ae.eventKey,Et=Ae.onMouseEnter,vt=Ae.store;Je(vt,ee.props.eventKey,!1),Et({key:Qe,domEvent:Te})},ee.onMouseLeave=function(Te){var Ae=ee.props,Qe=Ae.parentMenu,Et=Ae.eventKey,vt=Ae.onMouseLeave;Qe.subMenuInstance=Object(H.a)(ee),vt({key:Et,domEvent:Te})},ee.onTitleMouseEnter=function(Te){var Ae=ee.props,Qe=Ae.eventKey,Et=Ae.onItemHover,vt=Ae.onTitleMouseEnter;Et({key:Qe,hover:!0}),vt({key:Qe,domEvent:Te})},ee.onTitleMouseLeave=function(Te){var Ae=ee.props,Qe=Ae.parentMenu,Et=Ae.eventKey,vt=Ae.onItemHover,cn=Ae.onTitleMouseLeave;Qe.subMenuInstance=Object(H.a)(ee),vt({key:Et,hover:!1}),cn({key:Et,domEvent:Te})},ee.onTitleClick=function(Te){var Ae=Object(H.a)(ee),Qe=Ae.props;if(Qe.onTitleClick({key:Qe.eventKey,domEvent:Te}),Qe.triggerSubMenuAction==="hover")return;ee.triggerOpenChange(!Qe.isOpen,"click"),Je(Qe.store,ee.props.eventKey,!1)},ee.onSubMenuClick=function(Te){typeof ee.props.onClick=="function"&&ee.props.onClick(ee.addKeyPath(Te))},ee.onSelect=function(Te){ee.props.onSelect(Te)},ee.onDeselect=function(Te){ee.props.onDeselect(Te)},ee.getPrefixCls=function(){return"".concat(ee.props.rootPrefixCls,"-submenu")},ee.getActiveClassName=function(){return"".concat(ee.getPrefixCls(),"-active")},ee.getDisabledClassName=function(){return"".concat(ee.getPrefixCls(),"-disabled")},ee.getSelectedClassName=function(){return"".concat(ee.getPrefixCls(),"-selected")},ee.getOpenClassName=function(){return"".concat(ee.props.rootPrefixCls,"-submenu-open")},ee.saveMenuInstance=function(Te){ee.menuInstance=Te},ee.addKeyPath=function(Te){return Object(Y.a)(Object(Y.a)({},Te),{},{keyPath:(Te.keyPath||[]).concat(ee.props.eventKey)})},ee.triggerOpenChange=function(Te,Ae){var Qe=ee.props.eventKey,Et=function(){ee.onOpenChange({key:Qe,item:Object(H.a)(ee),trigger:Ae,open:Te})};Ae==="mouseenter"?ee.mouseenterTimeout=setTimeout(function(){Et()},0):Et()},ee.isChildrenSelected=function(){var Te={find:!1};return ne(ee.props.children,ee.props.selectedKeys,Te),Te.find},ee.isOpen=function(){return ee.props.openKeys.indexOf(ee.props.eventKey)!==-1},ee.adjustWidth=function(){if(!ee.subMenuTitle||!ee.menuInstance)return;var Te=oe.findDOMNode(ee.menuInstance);if(Te.offsetWidth>=ee.subMenuTitle.offsetWidth)return;Te.style.minWidth="".concat(ee.subMenuTitle.offsetWidth,"px")},ee.saveSubMenuTitle=function(Te){ee.subMenuTitle=Te},ee.getBaseProps=function(){var Te=Object(H.a)(ee),Ae=Te.props;return{mode:Ae.mode==="horizontal"?"vertical":Ae.mode,visible:ee.props.isOpen,level:Ae.level+1,inlineIndent:Ae.inlineIndent,focusable:!1,onClick:ee.onSubMenuClick,onSelect:ee.onSelect,onDeselect:ee.onDeselect,onDestroy:ee.onDestroy,selectedKeys:Ae.selectedKeys,eventKey:"".concat(Ae.eventKey,"-menu-"),openKeys:Ae.openKeys,motion:Ae.motion,onOpenChange:ee.onOpenChange,subMenuOpenDelay:Ae.subMenuOpenDelay,parentMenu:Object(H.a)(ee),subMenuCloseDelay:Ae.subMenuCloseDelay,forceSubMenuRender:Ae.forceSubMenuRender,triggerSubMenuAction:Ae.triggerSubMenuAction,builtinPlacements:Ae.builtinPlacements,defaultActiveFirst:Ae.store.getState().defaultActiveFirst[V(Ae.eventKey)],multiple:Ae.multiple,prefixCls:Ae.rootPrefixCls,id:ee.internalMenuId,manualRef:ee.saveMenuInstance,itemIcon:Ae.itemIcon,expandIcon:Ae.expandIcon,direction:Ae.direction}},ee.getMotion=function(Te,Ae){var Qe=Object(H.a)(ee),Et=Qe.haveRendered,vt=ee.props,cn=vt.motion,yn=vt.rootPrefixCls,ln=Object(Y.a)(Object(Y.a)({},cn),{},{leavedClassName:"".concat(yn,"-hidden"),removeOnLeave:!1,motionAppear:Et||!Ae||Te!=="inline"});return ln};var he=we.store,Fe=we.eventKey,Re=he.getState(),et=Re.defaultActiveFirst;ee.isRootMenu=!1;var tt=!1;return et&&(tt=et[Fe]),Je(he,Fe,tt),ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ee=this,he=this.props,Fe=he.mode,Re=he.parentMenu,et=he.manualRef;if(et&&et(this),Fe!=="horizontal"||!Re.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ee=this.props,he=ee.onDestroy,Fe=ee.eventKey;he&&he(Fe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(ee){var he=this,Fe=this.getBaseProps(),Re=this.getMotion(Fe.mode,Fe.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Fe.visible||Fe.forceSubMenuRender,!this.haveOpened)return j.createElement("div",null);var et=Fe.direction;return j.createElement(Ve.default,Object.assign({visible:Fe.visible},Re),function(tt){var Te=tt.className,Ae=tt.style,Qe=i()("".concat(Fe.prefixCls,"-sub"),Te,Object(g.a)({},"".concat(Fe.prefixCls,"-rtl"),et==="rtl"));return j.createElement(pe,Object.assign({},Fe,{id:he.internalMenuId,className:Qe,style:Ae}),ee)})}},{key:"render",value:function(){var ee,he=Object(Y.a)({},this.props),Fe=he.isOpen,Re=this.getPrefixCls(),et=he.mode==="inline",tt=i()(Re,"".concat(Re,"-").concat(he.mode),(ee={},Object(g.a)(ee,he.className,!!he.className),Object(g.a)(ee,this.getOpenClassName(),Fe),Object(g.a)(ee,this.getActiveClassName(),he.active||Fe&&!et),Object(g.a)(ee,this.getDisabledClassName(),he.disabled),Object(g.a)(ee,this.getSelectedClassName(),this.isChildrenSelected()),ee));this.internalMenuId||(he.eventKey?this.internalMenuId="".concat(he.eventKey,"$Menu"):(ze+=1,this.internalMenuId="$__$".concat(ze,"$Menu")));var Te={},Ae={},Qe={};he.disabled||(Te={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ae={onClick:this.onTitleClick},Qe={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Et={},vt=he.direction;et&&(vt==="rtl"?Et.paddingRight=he.inlineIndent*he.level:Et.paddingLeft=he.inlineIndent*he.level);var cn={};this.props.isOpen&&(cn={"aria-owns":this.internalMenuId});var yn=null;he.mode!=="horizontal"&&(yn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(yn=j.createElement(this.props.expandIcon,Object(Y.a)({},this.props))));var ln=j.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Et,className:"".concat(Re,"-title"),role:"button"},Qe,Ae,{"aria-expanded":Fe},cn,{"aria-haspopup":"true",title:typeof he.title=="string"?he.title:void 0}),he.title,yn||j.createElement("i",{className:"".concat(Re,"-arrow")})),bt=this.renderChildren(he.children),Rn=he.parentMenu.isRootMenu?he.parentMenu.props.getPopupContainer:function(mr){return mr.parentNode},zn=at[he.mode],Tn=he.popupOffset?{offset:he.popupOffset}:{},zt=he.mode==="inline"?"":he.popupClassName;zt+=vt==="rtl"?" ".concat(Re,"-rtl"):"";var Sn=he.disabled,Bn=he.triggerSubMenuAction,pr=he.subMenuOpenDelay,nt=he.forceSubMenuRender,ct=he.subMenuCloseDelay,qn=he.builtinPlacements;fe.forEach(function(mr){return delete he[mr]}),delete he.onClick;var xr=vt==="rtl"?Object.assign({},Ke,qn):Object.assign({},$e,qn);return delete he.direction,j.createElement("li",Object.assign({},he,Te,{className:tt,role:"menuitem"}),et&&ln,et&&bt,!et&&j.createElement(Be.a,{prefixCls:Re,popupClassName:i()("".concat(Re,"-popup"),zt),getPopupContainer:Rn,builtinPlacements:xr,popupPlacement:zn,popupVisible:Fe,popupAlign:Tn,popup:bt,action:Sn?[]:[Bn],mouseEnterDelay:pr,mouseLeaveDelay:ct,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:nt},ln))}}]),Ue}(j.Component);Xe.defaultProps={onMouseEnter:C,onMouseLeave:C,onTitleMouseEnter:C,onTitleMouseLeave:C,onTitleClick:C,manualRef:C,mode:"vertical",title:""};var He=Object(k.b)(function(rt,Me){var Ue=rt.openKeys,we=rt.activeKey,ee=rt.selectedKeys,he=Me.eventKey,Fe=Me.subMenuKey;return{isOpen:Ue.indexOf(he)>-1,active:we[Fe]===he,selectedKeys:ee}})(Xe);He.isSubMenu=!0;var ot=He,ft="menuitem-overflowed",dt=.5,lt=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.resizeObserver=null,we.mutationObserver=null,we.originalTotalWidth=0,we.overflowedItems=[],we.menuItemSizes=[],we.cancelFrameId=null,we.state={lastVisibleIndex:void 0},we.getMenuItemNodes=function(){var ee=we.props.prefixCls,he=oe.findDOMNode(Object(H.a)(we));return he?[].slice.call(he.children).filter(function(Fe){return Fe.className.split(" ").indexOf("".concat(ee,"-overflowed-submenu"))<0}):[]},we.getOverflowedSubMenuItem=function(ee,he,Fe){var Re=we.props,et=Re.overflowedIndicator,tt=Re.level,Te=Re.mode,Ae=Re.prefixCls,Qe=Re.theme;if(tt!==1||Te!=="horizontal")return null;var Et=we.props.children[0],vt=Et.props,cn=vt.children,yn=vt.title,ln=vt.style,bt=Object(re.a)(vt,["children","title","style"]),Rn=Object(Y.a)({},ln),zn="".concat(ee,"-overflowed-indicator"),Tn="".concat(ee,"-overflowed-indicator");he.length===0&&Fe!==!0?Rn=Object(Y.a)(Object(Y.a)({},Rn),{},{display:"none"}):Fe&&(Rn=Object(Y.a)(Object(Y.a)({},Rn),{},{visibility:"hidden",position:"absolute"}),zn="".concat(zn,"-placeholder"),Tn="".concat(Tn,"-placeholder"));var zt=Qe?"".concat(Ae,"-").concat(Qe):"",Sn={};return fe.forEach(function(Bn){bt[Bn]!==void 0&&(Sn[Bn]=bt[Bn])}),j.createElement(ot,Object.assign({title:et,className:"".concat(Ae,"-overflowed-submenu"),popupClassName:zt},Sn,{key:zn,eventKey:Tn,disabled:!1,style:Rn}),he)},we.setChildrenWidthAndResize=function(){if(we.props.mode!=="horizontal")return;var ee=oe.findDOMNode(Object(H.a)(we));if(!ee)return;var he=ee.children;if(!he||he.length===0)return;var Fe=ee.children[he.length-1];le(Fe,"display","inline-block");var Re=we.getMenuItemNodes(),et=Re.filter(function(tt){return tt.className.split(" ").indexOf(ft)>=0});et.forEach(function(tt){le(tt,"display","inline-block")}),we.menuItemSizes=Re.map(function(tt){return ue(tt,!0)}),et.forEach(function(tt){le(tt,"display","none")}),we.overflowedIndicatorWidth=ue(ee.children[ee.children.length-1],!0),we.originalTotalWidth=we.menuItemSizes.reduce(function(tt,Te){return tt+Te},0),we.handleResize(),le(Fe,"display","none")},we.handleResize=function(){if(we.props.mode!=="horizontal")return;var ee=oe.findDOMNode(Object(H.a)(we));if(!ee)return;var he=ue(ee);we.overflowedItems=[];var Fe=0,Re;we.originalTotalWidth>he+dt&&(Re=-1,we.menuItemSizes.forEach(function(et){Fe+=et,Fe+we.overflowedIndicatorWidth<=he&&(Re+=1)})),we.setState({lastVisibleIndex:Re})},we}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){var ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var he=oe.findDOMNode(this);if(!he)return;this.resizeObserver=new xe.default(function(Fe){Fe.forEach(function(){var Re=ee.cancelFrameId;cancelAnimationFrame(Re),ee.cancelFrameId=requestAnimationFrame(ee.setChildrenWidthAndResize)})}),[].slice.call(he.children).concat(he).forEach(function(Fe){ee.resizeObserver.observe(Fe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ee.resizeObserver.disconnect(),[].slice.call(he.children).concat(he).forEach(function(Fe){ee.resizeObserver.observe(Fe)}),ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(he,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(ee){var he=this,Fe=this.state.lastVisibleIndex;return(ee||[]).reduce(function(Re,et,tt){var Te=et;if(he.props.mode==="horizontal"){var Ae=he.getOverflowedSubMenuItem(et.props.eventKey,[]);Fe!==void 0&&he.props.className.indexOf("".concat(he.props.prefixCls,"-root"))!==-1&&(tt>Fe&&(Te=j.cloneElement(et,{style:{display:"none"},eventKey:"".concat(et.props.eventKey,"-hidden"),className:"".concat(ft)})),tt===Fe+1&&(he.overflowedItems=ee.slice(Fe+1).map(function(Et){return j.cloneElement(Et,{key:Et.props.eventKey,mode:"vertical-left"})}),Ae=he.getOverflowedSubMenuItem(et.props.eventKey,he.overflowedItems)));var Qe=[].concat(Object(ge.a)(Re),[Ae,Te]);return tt===ee.length-1&&Qe.push(he.getOverflowedSubMenuItem(et.props.eventKey,[],!0)),Qe}return[].concat(Object(ge.a)(Re),[Te])},[])}},{key:"render",value:function(){var ee=this.props,he=ee.visible,Fe=ee.prefixCls,Re=ee.overflowedIndicator,et=ee.mode,tt=ee.level,Te=ee.tag,Ae=ee.children,Qe=ee.theme,Et=Object(re.a)(ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),vt=Te;return j.createElement(vt,Object.assign({},Et),this.renderChildren(Ae))}}]),Ue}(j.Component);lt.defaultProps={tag:"div",className:""};var _t=lt;function ht(rt){return rt.length?rt.every(function(Me){return!!Me.props.disabled}):!0}function be(rt,Me,Ue){var we=rt.getState();rt.setState({activeKey:Object(Y.a)(Object(Y.a)({},we.activeKey),{},Object(g.a)({},Me,Ue))})}function _e(rt){return rt.eventKey||"0-menu-"}function Ne(rt,Me){var Ue=Me,we=rt.children,ee=rt.eventKey;if(Ue){var he;if(J(we,function(Fe,Re){Fe&&Fe.props&&!Fe.props.disabled&&Ue===W(Fe,ee,Re)&&(he=!0)}),he)return Ue}return Ue=null,rt.defaultActiveFirst&&J(we,function(Fe,Re){!Ue&&Fe&&!Fe.props.disabled&&(Ue=W(Fe,ee,Re))}),Ue}function ke(rt){if(rt){var Me=this.instanceArray.indexOf(rt);Me!==-1?this.instanceArray[Me]=rt:this.instanceArray.push(rt)}}var Ee=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;return Object(K.a)(this,Ue),ee=Me.call(this,we),ee.onKeyDown=function(he,Fe){var Re=he.keyCode,et;if(ee.getFlatInstanceArray().forEach(function(Te){Te&&Te.props.active&&Te.onKeyDown&&(et=Te.onKeyDown(he))}),et)return 1;var tt=null;return(Re===h.a.UP||Re===h.a.DOWN)&&(tt=ee.step(Re===h.a.UP?-1:1)),tt?(he.preventDefault(),be(ee.props.store,_e(ee.props),tt.props.eventKey),typeof Fe=="function"&&Fe(tt),1):void 0},ee.onItemHover=function(he){var Fe=he.key,Re=he.hover;be(ee.props.store,_e(ee.props),Re?Fe:null)},ee.onDeselect=function(he){ee.props.onDeselect(he)},ee.onSelect=function(he){ee.props.onSelect(he)},ee.onClick=function(he){ee.props.onClick(he)},ee.onOpenChange=function(he){ee.props.onOpenChange(he)},ee.onDestroy=function(he){ee.props.onDestroy(he)},ee.getFlatInstanceArray=function(){return ee.instanceArray},ee.step=function(he){var Fe=ee.getFlatInstanceArray(),Re=ee.props.store.getState().activeKey[_e(ee.props)],et=Fe.length;if(!et)return null;he<0&&(Fe=Fe.concat().reverse());var tt=-1;if(Fe.every(function(Et,vt){return Et&&Et.props.eventKey===Re?(tt=vt,!1):!0}),!ee.props.defaultActiveFirst&&tt!==-1&&ht(Fe.slice(tt,et-1)))return;var Te=(tt+1)%et,Ae=Te;do{var Qe=Fe[Ae];if(!Qe||Qe.props.disabled)Ae=(Ae+1)%et;else return Qe}while(Ae!==Te);return null},ee.renderCommonMenuItem=function(he,Fe,Re){var et=ee.props.store.getState(),tt=Object(H.a)(ee),Te=tt.props,Ae=W(he,Te.eventKey,Fe),Qe=he.props;if(!Qe||typeof he.type=="string")return he;var Et=Ae===et.activeKey,vt=Object(Y.a)(Object(Y.a)({mode:Qe.mode||Te.mode,level:Te.level,inlineIndent:Te.inlineIndent,renderMenuItem:ee.renderMenuItem,rootPrefixCls:Te.prefixCls,index:Fe,parentMenu:Te.parentMenu,manualRef:Qe.disabled?void 0:Object(u.a)(he.ref,ke.bind(Object(H.a)(ee))),eventKey:Ae,active:!Qe.disabled&&Et,multiple:Te.multiple,onClick:function(yn){(Qe.onClick||C)(yn),ee.onClick(yn)},onItemHover:ee.onItemHover,motion:Te.motion,subMenuOpenDelay:Te.subMenuOpenDelay,subMenuCloseDelay:Te.subMenuCloseDelay,forceSubMenuRender:Te.forceSubMenuRender,onOpenChange:ee.onOpenChange,onDeselect:ee.onDeselect,onSelect:ee.onSelect,builtinPlacements:Te.builtinPlacements,itemIcon:Qe.itemIcon||ee.props.itemIcon,expandIcon:Qe.expandIcon||ee.props.expandIcon},Re),{},{direction:Te.direction});return(Te.mode==="inline"||me())&&(vt.triggerSubMenuAction="click"),j.cloneElement(he,vt)},ee.renderMenuItem=function(he,Fe,Re){if(!he)return null;var et=ee.props.store.getState(),tt={openKeys:et.openKeys,selectedKeys:et.selectedKeys,triggerSubMenuAction:ee.props.triggerSubMenuAction,subMenuKey:Re};return ee.renderCommonMenuItem(he,Fe,tt)},we.store.setState({activeKey:Object(Y.a)(Object(Y.a)({},we.store.getState().activeKey),{},Object(g.a)({},we.eventKey,Ne(we,we.activeKey)))}),ee.instanceArray=[],ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ee){return this.props.visible||ee.visible||this.props.className!==ee.className||!s()(this.props.style,ee.style)}},{key:"componentDidUpdate",value:function(ee){var he=this.props,Fe="activeKey"in he?he.activeKey:he.store.getState().activeKey[_e(he)],Re=Ne(he,Fe);if(Re!==Fe)be(he.store,_e(he),Re);else if("activeKey"in ee){var et=Ne(ee,ee.activeKey);Re!==et&&be(he.store,_e(he),Re)}}},{key:"render",value:function(){var ee=this,he=Object(D.a)({},this.props);this.instanceArray=[];var Fe=i()(he.prefixCls,he.className,"".concat(he.prefixCls,"-").concat(he.mode)),Re={className:Fe,role:he.role||"menu"};he.id&&(Re.id=he.id),he.focusable&&(Re.tabIndex=0,Re.onKeyDown=this.onKeyDown);var et=he.prefixCls,tt=he.eventKey,Te=he.visible,Ae=he.level,Qe=he.mode,Et=he.overflowedIndicator,vt=he.theme;return fe.forEach(function(cn){return delete he[cn]}),delete he.onClick,j.createElement(_t,Object.assign({},he,{prefixCls:et,mode:Qe,tag:"ul",level:Ae,theme:vt,visible:Te,overflowedIndicator:Et},Re),j.Children.map(he.children,function(cn,yn){return ee.renderMenuItem(cn,yn,tt||"0-menu-")}))}}]),Ue}(j.Component);Ee.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:C};var Ie=Object(k.b)()(Ee),pe=Ie,ae=F("Kwbf");function ie(rt,Me,Ue){var we=rt.prefixCls,ee=rt.motion,he=rt.defaultMotions,Fe=he===void 0?{}:he,Re=rt.openAnimation,et=rt.openTransitionName,tt=Me.switchingModeFromInline;if(ee)return ee;if(Object(o.a)(Re)==="object"&&Re)Object(ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Re=="string")return{motionName:"".concat(we,"-open-").concat(Re)};if(et)return{motionName:et};var Te=Fe[Ue];return Te||(tt?null:Fe.other)}var Q=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;Object(K.a)(this,Ue),ee=Me.call(this,we),ee.inlineOpenKeys=[],ee.onSelect=function(Re){var et=Object(H.a)(ee),tt=et.props;if(tt.selectable){var Te=ee.store.getState(),Ae=Te.selectedKeys,Qe=Re.key;tt.multiple?Ae=Ae.concat([Qe]):Ae=[Qe],"selectedKeys"in tt||ee.store.setState({selectedKeys:Ae}),tt.onSelect(Object(Y.a)(Object(Y.a)({},Re),{},{selectedKeys:Ae}))}},ee.onClick=function(Re){var et=ee.getRealMenuMode(),tt=Object(H.a)(ee),Te=tt.store,Ae=tt.props.onOpenChange;et!=="inline"&&!("openKeys"in ee.props)&&(Te.setState({openKeys:[]}),Ae([])),ee.props.onClick(Re)},ee.onKeyDown=function(Re,et){ee.innerMenu.getWrappedInstance().onKeyDown(Re,et)},ee.onOpenChange=function(Re){var et=Object(H.a)(ee),tt=et.props,Te=ee.store.getState().openKeys.concat(),Ae=!1,Qe=function(vt){var cn=!1;if(vt.open)cn=Te.indexOf(vt.key)===-1,cn&&Te.push(vt.key);else{var yn=Te.indexOf(vt.key);cn=yn!==-1,cn&&Te.splice(yn,1)}Ae=Ae||cn};Array.isArray(Re)?Re.forEach(Qe):Qe(Re),Ae&&("openKeys"in ee.props||ee.store.setState({openKeys:Te}),tt.onOpenChange(Te))},ee.onDeselect=function(Re){var et=Object(H.a)(ee),tt=et.props;if(tt.selectable){var Te=ee.store.getState().selectedKeys.concat(),Ae=Re.key,Qe=Te.indexOf(Ae);Qe!==-1&&Te.splice(Qe,1),"selectedKeys"in tt||ee.store.setState({selectedKeys:Te}),tt.onDeselect(Object(Y.a)(Object(Y.a)({},Re),{},{selectedKeys:Te}))}},ee.onMouseEnter=function(Re){ee.restoreModeVerticalFromInline();var et=ee.props.onMouseEnter;et&&et(Re)},ee.onTransitionEnd=function(Re){var et=Re.propertyName==="width"&&Re.target===Re.currentTarget,tt=Re.target.className,Te=Object.prototype.toString.call(tt)==="[object SVGAnimatedString]"?tt.animVal:tt,Ae=Re.propertyName==="font-size"&&Te.indexOf("anticon")>=0;(et||Ae)&&ee.restoreModeVerticalFromInline()},ee.setInnerMenu=function(Re){ee.innerMenu=Re},ee.isRootMenu=!0;var he=we.defaultSelectedKeys,Fe=we.defaultOpenKeys;return"selectedKeys"in we&&(he=we.selectedKeys||[]),"openKeys"in we&&(Fe=we.openKeys||[]),ee.store=Object(k.c)({selectedKeys:he,openKeys:Fe,activeKey:{"0-menu-":Ne(we,we.activeKey)}}),ee.state={switchingModeFromInline:!1},ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ee){this.updateOpentKeysWhenSwitchMode(ee),this.updateMiniStore();var he=this.props,Fe=he.siderCollapsed,Re=he.inlineCollapsed,et=he.onOpenChange;(!ee.inlineCollapsed&&Re||!ee.siderCollapsed&&Fe)&&et([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(ee){var he=this.props,Fe=this.store,Re=this.inlineOpenKeys,et=Fe.getState(),tt={};ee.mode==="inline"&&he.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in he||((he.inlineCollapsed&&!ee.inlineCollapsed||he.siderCollapsed&&!ee.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=et.openKeys.concat(),tt.openKeys=[]),(!he.inlineCollapsed&&ee.inlineCollapsed||!he.siderCollapsed&&ee.siderCollapsed)&&(tt.openKeys=Re,this.inlineOpenKeys=[])),Object.keys(tt).length&&Fe.setState(tt)}},{key:"updateMenuDisplay",value:function(){var ee=this.props.collapsedWidth,he=this.store,Fe=this.prevOpenKeys,Re=this.getInlineCollapsed()&&(ee===0||ee==="0"||ee==="0px");Re?(this.prevOpenKeys=he.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Fe&&(this.store.setState({openKeys:Fe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ee=this.props.mode,he=this.state.switchingModeFromInline,Fe=this.getInlineCollapsed();return he&&Fe?"inline":Fe?"vertical":ee}},{key:"getInlineCollapsed",value:function(){var ee=this.props,he=ee.inlineCollapsed,Fe=ee.siderCollapsed;return Fe!==void 0?Fe:he}},{key:"restoreModeVerticalFromInline",value:function(){var ee=this.state.switchingModeFromInline;ee&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var ee=Object(Y.a)({},Object(A.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),he=this.getRealMenuMode();return ee.className+=" ".concat(ee.prefixCls,"-root"),ee.direction==="rtl"&&(ee.className+=" ".concat(ee.prefixCls,"-rtl")),ee=Object(Y.a)(Object(Y.a)({},ee),{},{mode:he,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ie(this.props,this.state,he)}),delete ee.openAnimation,delete ee.openTransitionName,j.createElement(k.a,{store:this.store},j.createElement(pe,Object.assign({},ee,{ref:this.setInnerMenu}),this.props.children))}}]),Ue}(j.Component);Q.defaultProps={selectable:!0,onClick:C,onSelect:C,onOpenChange:C,onDeselect:C,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:j.createElement("span",null,"\xB7\xB7\xB7")};var q=Q,te=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.onKeyDown=function(ee){var he=ee.keyCode;return he===h.a.ENTER?(we.onClick(ee),!0):void 0},we.onMouseLeave=function(ee){var he=we.props,Fe=he.eventKey,Re=he.onItemHover,et=he.onMouseLeave;Re({key:Fe,hover:!1}),et({key:Fe,domEvent:ee})},we.onMouseEnter=function(ee){var he=we.props,Fe=he.eventKey,Re=he.onItemHover,et=he.onMouseEnter;Re({key:Fe,hover:!0}),et({key:Fe,domEvent:ee})},we.onClick=function(ee){var he=we.props,Fe=he.eventKey,Re=he.multiple,et=he.onClick,tt=he.onSelect,Te=he.onDeselect,Ae=he.isSelected,Qe={key:Fe,keyPath:[Fe],item:Object(H.a)(we),domEvent:ee};et(Qe),Re?Ae?Te(Qe):tt(Qe):Ae||tt(Qe)},we.saveNode=function(ee){we.node=ee},we}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ee=this.props;ee.onDestroy&&ee.onDestroy(ee.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var ee,he=Object(Y.a)({},this.props),Fe=i()(this.getPrefixCls(),he.className,(ee={},Object(g.a)(ee,this.getActiveClassName(),!he.disabled&&he.active),Object(g.a)(ee,this.getSelectedClassName(),he.isSelected),Object(g.a)(ee,this.getDisabledClassName(),he.disabled),ee)),Re=Object(Y.a)(Object(Y.a)({},he.attribute),{},{title:typeof he.title=="string"?he.title:void 0,className:Fe,role:he.role||"menuitem","aria-disabled":he.disabled});he.role==="option"?Re=Object(Y.a)(Object(Y.a)({},Re),{},{role:"option","aria-selected":he.isSelected}):(he.role===null||he.role==="none")&&(Re.role="none");var et={onClick:he.disabled?null:this.onClick,onMouseLeave:he.disabled?null:this.onMouseLeave,onMouseEnter:he.disabled?null:this.onMouseEnter},tt=Object(Y.a)({},he.style);he.mode==="inline"&&(he.direction==="rtl"?tt.paddingRight=he.inlineIndent*he.level:tt.paddingLeft=he.inlineIndent*he.level),fe.forEach(function(Ae){return delete he[Ae]}),delete he.direction;var Te=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Te=j.createElement(this.props.itemIcon,this.props)),j.createElement("li",Object.assign({},Object(A.default)(he,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Re,et,{style:tt,ref:this.saveNode}),he.children,Te)}}]),Ue}(j.Component);te.isMenuItem=!0,te.defaultProps={onSelect:C,onMouseEnter:C,onMouseLeave:C,manualRef:C};var se=Object(k.b)(function(rt,Me){var Ue=rt.activeKey,we=rt.selectedKeys,ee=Me.eventKey,he=Me.subMenuKey;return{active:Ue[he]===ee,isSelected:we.indexOf(ee)!==-1}})(te),ce=se,Se=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.renderInnerMenuItem=function(ee){var he=we.props,Fe=he.renderMenuItem,Re=he.index;return Fe(ee,Re,we.props.subMenuKey)},we}return Object(L.a)(Ue,[{key:"render",value:function(){var ee=Object(D.a)({},this.props),he=ee.className,Fe=he===void 0?"":he,Re=ee.rootPrefixCls,et="".concat(Re,"-item-group-title"),tt="".concat(Re,"-item-group-list"),Te=ee.title,Ae=ee.children;return fe.forEach(function(Qe){return delete ee[Qe]}),delete ee.onClick,delete ee.direction,j.createElement("li",Object.assign({},ee,{className:"".concat(Fe," ").concat(Re,"-item-group")}),j.createElement("div",{className:et,title:typeof Te=="string"?Te:void 0},Te),j.createElement("ul",{className:tt},j.Children.map(Ae,this.renderInnerMenuItem)))}}]),Ue}(j.Component);Se.isMenuItemGroup=!0,Se.defaultProps={disabled:!0};var je=Se,Ze=function(Me){var Ue=Me.className,we=Me.rootPrefixCls,ee=Me.style;return j.createElement("li",{className:"".concat(Ue," ").concat(we,"-item-divider"),style:ee})};Ze.defaultProps={disabled:!0,className:"",style:{}};var ut=Ze,it=ye.e=q},"55Ip":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return n});var Y=F("Ty5D"),K=F("dI71"),L=F("cDcd"),H=F.n(L),N=F("YS25"),R=F("17x9"),j=F.n(R),k=F("wx14"),A=F("zLVn"),D=F("9R94"),g=function(v){Object(K.a)(p,v);function p(){for(var E,_=arguments.length,b=new Array(_),I=0;I<_;I++)b[I]=arguments[I];return E=v.call.apply(v,[this].concat(b))||this,E.history=Object(N.a)(E.props),E}var c=p.prototype;return c.render=function(){return H.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(H.a.Component),h=function(v){Object(K.a)(p,v);function p(){for(var E,_=arguments.length,b=new Array(_),I=0;I<_;I++)b[I]=arguments[I];return E=v.call.apply(v,[this].concat(b))||this,E.history=Object(N.b)(E.props),E}var c=p.prototype;return c.render=function(){return H.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(H.a.Component),u=function(p,c){return typeof p=="function"?p(c):p},d=function(p,c){return typeof p=="string"?Object(N.c)(p,null,null,c):p},s=function(p){return p},l=H.a.forwardRef;typeof l=="undefined"&&(l=s);function i(v){return!!(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey)}var o=l(function(v,p){var c=v.innerRef,E=v.navigate,_=v.onClick,b=Object(A.a)(v,["innerRef","navigate","onClick"]),I=b.target,P=Object(k.a)({},b,{onClick:function(z){try{_&&_(z)}catch(U){throw z.preventDefault(),U}!z.defaultPrevented&&z.button===0&&(!I||I==="_self")&&!i(z)&&(z.preventDefault(),E())}});return s!==l?P.ref=p||c:P.ref=c,H.a.createElement("a",P)}),n=l(function(v,p){var c=v.component,E=c===void 0?o:c,_=v.replace,b=v.to,I=v.innerRef,P=Object(A.a)(v,["component","replace","to","innerRef"]);return H.a.createElement(Y.e.Consumer,null,function(B){B||Object(D.a)(!1);var z=B.history,U=d(u(b,B.location),B.location),C=U?z.createHref(U):"",W=Object(k.a)({},P,{href:C,navigate:function(){var J=u(b,B.location),ne=_?z.replace:z.push;ne(J)}});return s!==l?W.ref=p||I:W.innerRef=I,H.a.createElement(E,W)})});if(!1)var f,O;var S=function(p){return p},x=H.a.forwardRef;typeof x=="undefined"&&(x=S);function w(){for(var v=arguments.length,p=new Array(v),c=0;c=0||_.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;v.setState({goInputText:""}),P(v.getValidValue())},v.go=function(_){var b=v.state.goInputText;if(b==="")return;(_.keyCode===d.ENTER||_.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(N.a)(y,[{key:"getValidValue",value:function(){var p=this.state,c=p.goInputText,E=p.current;return!c||isNaN(c)?E:Number(c)}},{key:"getPageSizeOptions",value:function(){var p=this.props,c=p.pageSize,E=p.pageSizeOptions;return E.some(function(_){return _.toString()===c.toString()})?E:E.concat([c.toString()]).sort(function(_,b){var I=isNaN(Number(_))?0:Number(_),P=isNaN(Number(b))?0:Number(b);return I-P})}},{key:"render",value:function(){var p=this,c=this.props,E=c.pageSize,_=c.locale,b=c.rootPrefixCls,I=c.changeSize,P=c.quickGo,B=c.goButton,z=c.selectComponentClass,U=c.buildOptionText,C=c.selectPrefixCls,W=c.disabled,V=this.state.goInputText,J="".concat(b,"-options"),ne=z,fe=null,ue=null,le=null;if(!I&&!P)return null;var me=this.getPageSizeOptions();if(I&&ne){var ge=me.map(function(re,oe){return A.a.createElement(ne.Option,{key:oe,value:re.toString()},(U||p.buildOptionText)(re))});fe=A.a.createElement(ne,{disabled:W,prefixCls:C,showSearch:!1,className:"".concat(J,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(E||me[0]).toString(),onChange:this.changeSize,getPopupContainer:function(oe){return oe.parentNode}},ge)}return P&&(B&&(le=typeof B=="boolean"?A.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(J,"-quick-jumper-button")},_.jump_to_confirm):A.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),ue=A.a.createElement("div",{className:"".concat(J,"-quick-jumper")},_.jump_to,A.a.createElement("input",{disabled:W,type:"text",value:V,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),_.page,le)),A.a.createElement("li",{className:"".concat(J)},fe,ue)}}]),y}(A.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var l=s,i=F("N2Kk");function o(){}function n(w){return typeof w=="number"&&isFinite(w)&&Math.floor(w)===w}function f(w,T,y){return y}function O(w,T,y){var v=typeof w=="undefined"?T.pageSize:w;return Math.floor((y.total-1)/v)+1}var S=function(w){Object(R.a)(y,w);var T=Object(j.a)(y);function y(v){var p;Object(H.a)(this,y),p=T.call(this,v),p.getJumpPrevPage=function(){return Math.max(1,p.state.current-(p.props.showLessItems?3:5))},p.getJumpNextPage=function(){return Math.min(O(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(I,P){var B=p.props.prefixCls,z=I||A.a.createElement("button",{type:"button","aria-label":P,className:"".concat(B,"-item-link")});return typeof I=="function"&&(z=A.a.createElement(I,Object(L.a)({},p.props))),z},p.savePaginationNode=function(I){p.paginationNode=I},p.isValid=function(I){return n(I)&&I!==p.state.current},p.shouldDisplayQuickJumper=function(){var I=p.props,P=I.showQuickJumper,B=I.pageSize,z=I.total;return z<=B?!1:P},p.handleKeyDown=function(I){(I.keyCode===d.ARROW_UP||I.keyCode===d.ARROW_DOWN)&&I.preventDefault()},p.handleKeyUp=function(I){var P=p.getValidValue(I),B=p.state.currentInputValue;P!==B&&p.setState({currentInputValue:P}),I.keyCode===d.ENTER?p.handleChange(P):I.keyCode===d.ARROW_UP?p.handleChange(P-1):I.keyCode===d.ARROW_DOWN&&p.handleChange(P+1)},p.changePageSize=function(I){var P=p.state.current,B=O(I,p.state,p.props);P=P>B?B:P,B===0&&(P=p.state.current),typeof I=="number"&&("pageSize"in p.props||p.setState({pageSize:I}),"current"in p.props||p.setState({current:P,currentInputValue:P})),p.props.onShowSizeChange(P,I),"onChange"in p.props&&p.props.onChange&&p.props.onChange(P,I)},p.handleChange=function(I){var P=p.props.disabled,B=I;if(p.isValid(B)&&!P){var z=O(void 0,p.state,p.props);B>z?B=z:B<1&&(B=1),"current"in p.props||p.setState({current:B,currentInputValue:B});var U=p.state.pageSize;return p.props.onChange(B,U),B}return p.state.current},p.prev=function(){p.hasPrev()&&p.handleChange(p.state.current-1)},p.next=function(){p.hasNext()&&p.handleChange(p.state.current+1)},p.jumpPrev=function(){p.handleChange(p.getJumpPrevPage())},p.jumpNext=function(){p.handleChange(p.getJumpNextPage())},p.hasPrev=function(){return p.state.current>1},p.hasNext=function(){return p.state.current2?B-2:0),U=2;U=E?b=E:b=Number(c),b}},{key:"getShowSizeChanger",value:function(){var p=this.props,c=p.showSizeChanger,E=p.total,_=p.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:E>_}},{key:"renderPrev",value:function(p){var c=this.props,E=c.prevIcon,_=c.itemRender,b=_(p,"prev",this.getItemIcon(E,"prev page")),I=!this.hasPrev();return Object(k.isValidElement)(b)?Object(k.cloneElement)(b,{disabled:I}):b}},{key:"renderNext",value:function(p){var c=this.props,E=c.nextIcon,_=c.itemRender,b=_(p,"next",this.getItemIcon(E,"next page")),I=!this.hasNext();return Object(k.isValidElement)(b)?Object(k.cloneElement)(b,{disabled:I}):b}},{key:"render",value:function(){var p=this,c=this.props,E=c.prefixCls,_=c.className,b=c.style,I=c.disabled,P=c.hideOnSinglePage,B=c.total,z=c.locale,U=c.showQuickJumper,C=c.showLessItems,W=c.showTitle,V=c.showTotal,J=c.simple,ne=c.itemRender,fe=c.showPrevNextJumpers,ue=c.jumpPrevIcon,le=c.jumpNextIcon,me=c.selectComponentClass,ge=c.selectPrefixCls,re=c.pageSizeOptions,oe=this.state,xe=oe.current,Be=oe.pageSize,Ve=oe.currentInputValue;if(P===!0&&B<=Be)return null;var Ye=O(void 0,this.state,this.props),$e=[],Ke=null,We=null,ze=null,at=null,Je=null,Xe=U&&U.goButton,He=C?1:2,ot=xe-1>0?xe-1:0,ft=xe+1=He*2&&xe!==1+2&&($e[0]=Object(k.cloneElement)($e[0],{className:"".concat(E,"-item-after-jump-prev")}),$e.unshift(Ke)),Ye-xe>=He*2&&xe!==Ye-2&&($e[$e.length-1]=Object(k.cloneElement)($e[$e.length-1],{className:"".concat(E,"-item-before-jump-next")}),$e.push(We)),Ne!==1&&$e.unshift(ze),ke!==Ye&&$e.push(at)}var pe=null;V&&(pe=A.a.createElement("li",{className:"".concat(E,"-total-text")},V(B,[B===0?0:(xe-1)*Be+1,xe*Be>B?B:xe*Be])));var ae=!this.hasPrev()||!Ye,ie=!this.hasNext()||!Ye;return A.a.createElement("ul",Object(Y.a)({className:g()(E,_,Object(K.a)({},"".concat(E,"-disabled"),I)),style:b,unselectable:"unselectable",ref:this.savePaginationNode},dt),pe,A.a.createElement("li",{title:W?z.prev_page:null,onClick:this.prev,tabIndex:ae?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(E,"-prev"),Object(K.a)({},"".concat(E,"-disabled"),ae)),"aria-disabled":ae},this.renderPrev(ot)),$e,A.a.createElement("li",{title:W?z.next_page:null,onClick:this.next,tabIndex:ie?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(E,"-next"),Object(K.a)({},"".concat(E,"-disabled"),ie)),"aria-disabled":ie},this.renderNext(ft)),A.a.createElement(l,{disabled:I,locale:z,rootPrefixCls:E,selectComponentClass:me,selectPrefixCls:ge,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:xe,pageSize:Be,pageSizeOptions:re,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Xe}))}}],[{key:"getDerivedStateFromProps",value:function(p,c){var E={};if("current"in p&&(E.current=p.current,p.current!==c.current&&(E.currentInputValue=E.current)),"pageSize"in p&&p.pageSize!==c.pageSize){var _=c.current,b=O(p.pageSize,c,p);_=_>b?b:_,"current"in p||(E.current=_,E.currentInputValue=_),E.pageSize=p.pageSize}return E}}]),y}(A.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:o,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:o,locale:i.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var x=S},"6RRn":function(Le,ye,F){"use strict";var Y=F("wCXF"),K=F("n6Qo");F.d(ye,"b",function(){return K.a});var L=F("IBYe"),H=F("6eGT"),N=F("hW8S");F.d(ye,"a",function(){return N.a}),ye.c=Y.b},"6UM0":function(Le,ye,F){var Y,K;(function(){var L;(function(){"use strict";var N=[function(A,D,g){var h=g(1).Beautifier,u=g(5).Options;function d(s,l){var i=new h(s,l);return i.beautify()}A.exports=d,A.exports.defaultOptions=function(){return new u}},function(A,D,g){var h=g(2).Output,u=g(3).Token,d=g(4),s=g(5).Options,l=g(7).Tokenizer,i=g(7).line_starters,o=g(7).positionable_operators,n=g(7).TOKEN;function f(C,W){return W.indexOf(C)!==-1}function O(C){return C.replace(/^\s+/g,"")}function S(C){for(var W={},V=0;V0?d.cmdState[d.cmdState.length-1]:null}function R(d){var s=d.cmdState.pop();s&&s.closeBracket()}function j(d){for(var s=d.cmdState,l=s.length-1;l>=0;l--){var i=s[l];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function k(d,s,l){return function(){this.name=d,this.bracketNo=0,this.style=s,this.styles=l,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var A={};A.importmodule=k("importmodule","tag",["string","builtin"]),A.documentclass=k("documentclass","tag",["","atom"]),A.usepackage=k("usepackage","tag",["atom"]),A.begin=k("begin","tag",["atom"]),A.end=k("end","tag",["atom"]),A.label=k("label","tag",["atom"]),A.ref=k("ref","tag",["atom"]),A.eqref=k("eqref","tag",["atom"]),A.cite=k("cite","tag",["atom"]),A.bibitem=k("bibitem","tag",["atom"]),A.Bibitem=k("Bibitem","tag",["atom"]),A.RBibitem=k("RBibitem","tag",["atom"]),A.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(d,s){d.f=s}function g(d,s){var l;if(d.match(/^\\[a-zA-Z@]+/)){var i=d.current().slice(1);return l=A.hasOwnProperty(i)?A[i]:A.DEFAULT,l=new l,H(s,l),D(s,u),l.style}if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/\\]/))return"tag";if(d.match("\\["))return D(s,function(n,f){return h(n,f,"\\]")}),"keyword";if(d.match("\\("))return D(s,function(n,f){return h(n,f,"\\)")}),"keyword";if(d.match("$$"))return D(s,function(n,f){return h(n,f,"$$")}),"keyword";if(d.match("$"))return D(s,function(n,f){return h(n,f,"$")}),"keyword";var o=d.next();if(o=="%")return d.skipToEnd(),"comment";if(o=="}"||o=="]"){if(l=N(s),l)l.closeBracket(o),D(s,u);else return"error";return"bracket"}else return o=="{"||o=="["?(l=A.DEFAULT,l=new l,H(s,l),"bracket"):/\d/.test(o)?(d.eatWhile(/[\w.%]/),"atom"):(d.eatWhile(/[\w\-_]/),l=j(s),l.name=="begin"&&(l.argument=d.current()),l.styleIdentifier())}function h(d,s,l){if(d.eatSpace())return null;if(l&&d.match(l))return D(s,g),"keyword";if(d.match(/^\\[a-zA-Z@]+/))return"tag";if(d.match(/^[a-zA-Z]+/))return"variable-2";if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/]/))return"tag";if(d.match(/^[\^_&]/))return"tag";if(d.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(d.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=d.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(d.skipToEnd(),"comment"):"error"}function u(d,s){var l=d.peek(),i;return l=="{"||l=="["?(i=N(s),i.openBracket(l),d.eat(l),D(s,g),"bracket"):/[ \t\r]/.test(l)?(d.eat(l),null):(D(s,g),R(s),g(d,s))}return{startState:function(){var d=L.inMathMode?function(s,l){return h(s,l)}:g;return{cmdState:[],f:d}},copyState:function(d){return{cmdState:d.cmdState.slice(),f:d.f}},token:function(d,s){return s.f(d,s)},blankLine:function(d){d.f=g,d.cmdState.length=0},lineComment:"%"}}),Y.defineMIME("text/x-stex","stex"),Y.defineMIME("text/x-latex","stex")})},"+aKw":function(Le,ye,F){"use strict";var Y=F("tJVT"),K=F("cDcd"),L=F.n(K),H=function(j){return String(j).length===1?"0".concat(j):j},N=function(j){var k=j.className,A=k===void 0?"":k,D=j.onChange,g=j.defaultValue,h=g===void 0?0:g,u=Object(K.useState)(h),d=Object(Y.a)(u,2),s=d[0],l=d[1];Object(K.useEffect)(function(){var f=setTimeout(function(){l(s+1e3)},1e3);return D(s+1e3),function(){clearInterval(f)}},[s]);var i=parseInt(s/(60*6e4))||"00",o=parseInt(s%(60*6e4)/6e4)||"00",n=parseInt(s%6e4/1e3)||"00";return L.a.createElement("div",{className:A},H(i),":",H(o),":",H(n))};ye.a=N},"+k/U":function(Le,ye,F){Le.exports={pagination:"pagination___2XcQw",info:"info___12Y4R"}},"+ua5":function(Le,ye,F){},"07cG":function(Le,ye,F){Le.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"19Vz":function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){Y.defineOption("placeholder","",function(k,A,D){var g=D&&D!=Y.Init;if(A&&!g)k.on("blur",N),k.on("change",R),k.on("swapDoc",R),Y.on(k.getInputField(),"compositionupdate",k.state.placeholderCompose=function(){H(k)}),R(k);else if(!A&&g){k.off("blur",N),k.off("change",R),k.off("swapDoc",R),Y.off(k.getInputField(),"compositionupdate",k.state.placeholderCompose),K(k);var h=k.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}A&&!k.hasFocus()&&N(k)});function K(k){k.state.placeholder&&(k.state.placeholder.parentNode.removeChild(k.state.placeholder),k.state.placeholder=null)}function L(k){K(k);var A=k.state.placeholder=document.createElement("pre");A.style.cssText="height: 0; overflow: visible",A.style.direction=k.getOption("direction"),A.className="CodeMirror-placeholder CodeMirror-line-like";var D=k.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),A.appendChild(D),k.display.lineSpace.insertBefore(A,k.display.lineSpace.firstChild)}function H(k){setTimeout(function(){var A=!1,D=k.getInputField();D.nodeName=="TEXTAREA"?A=!D.value:k.lineCount()==1&&(A=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),A?L(k):K(k)},20)}function N(k){j(k)&&L(k)}function R(k){var A=k.getWrapperElement(),D=j(k);A.className=A.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?L(k):K(k)}function j(k){return k.lineCount()===1&&k.getLine(0)===""}})},"1eCo":function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){"use strict";var K={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},L={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Y.defineMode("xml",function(H,N){var R=H.indentUnit,j={},k=N.htmlMode?K:L;for(var A in k)j[A]=k[A];for(var A in N)j[A]=N[A];var D,g;function h(c,E){function _(P){return E.tokenize=P,P(c,E)}var b=c.next();if(b=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?_(s("atom","]]>")):null:c.match("--")?_(s("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),_(l(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),E.tokenize=s("meta","?>"),"meta"):(D=c.eat("/")?"closeTag":"openTag",E.tokenize=u,"tag bracket");if(b=="&"){var I;return c.eat("#")?c.eat("x")?I=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):I=c.eatWhile(/[\d]/)&&c.eat(";"):I=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),I?"atom":"error"}else return c.eatWhile(/[^&<]/),null}h.isInText=!0;function u(c,E){var _=c.next();if(_==">"||_=="/"&&c.eat(">"))return E.tokenize=h,D=_==">"?"endTag":"selfcloseTag","tag bracket";if(_=="=")return D="equals",null;if(_=="<"){E.tokenize=h,E.state=f,E.tagName=E.tagStart=null;var b=E.tokenize(c,E);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(_)?(E.tokenize=d(_),E.stringStartCol=c.column(),E.tokenize(c,E)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(c){var E=function(_,b){for(;!_.eol();)if(_.next()==c){b.tokenize=u;break}return"string"};return E.isInAttribute=!0,E}function s(c,E){return function(_,b){for(;!_.eol();){if(_.match(E)){b.tokenize=h;break}_.next()}return c}}function l(c){return function(E,_){for(var b;(b=E.next())!=null;){if(b=="<")return _.tokenize=l(c+1),_.tokenize(E,_);if(b==">")if(c==1){_.tokenize=h;break}else return _.tokenize=l(c-1),_.tokenize(E,_)}return"meta"}}function i(c,E,_){this.prev=c.context,this.tagName=E,this.indent=c.indented,this.startOfLine=_,(j.doNotIndent.hasOwnProperty(E)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function o(c){c.context&&(c.context=c.context.prev)}function n(c,E){for(var _;;){if(!c.context)return;if(_=c.context.tagName,!j.contextGrabbers.hasOwnProperty(_)||!j.contextGrabbers[_].hasOwnProperty(E))return;o(c)}}function f(c,E,_){return c=="openTag"?(_.tagStart=E.column(),O):c=="closeTag"?S:f}function O(c,E,_){return c=="word"?(_.tagName=E.current(),g="tag",T):j.allowMissingTagName&&c=="endTag"?(g="tag bracket",T(c,E,_)):(g="error",O)}function S(c,E,_){if(c=="word"){var b=E.current();return _.context&&_.context.tagName!=b&&j.implicitlyClosed.hasOwnProperty(_.context.tagName)&&o(_),_.context&&_.context.tagName==b||j.matchClosing===!1?(g="tag",x):(g="tag error",w)}else return j.allowMissingTagName&&c=="endTag"?(g="tag bracket",x(c,E,_)):(g="error",w)}function x(c,E,_){return c!="endTag"?(g="error",x):(o(_),f)}function w(c,E,_){return g="error",x(c,E,_)}function T(c,E,_){if(c=="word")return g="attribute",y;if(c=="endTag"||c=="selfcloseTag"){var b=_.tagName,I=_.tagStart;return _.tagName=_.tagStart=null,c=="selfcloseTag"||j.autoSelfClosers.hasOwnProperty(b)?n(_,b):(n(_,b),_.context=new i(_,b,I==_.indented)),f}return g="error",T}function y(c,E,_){return c=="equals"?v:(j.allowMissing||(g="error"),T(c,E,_))}function v(c,E,_){return c=="string"?p:c=="word"&&j.allowUnquoted?(g="string",T):(g="error",T(c,E,_))}function p(c,E,_){return c=="string"?p:T(c,E,_)}return{startState:function(c){var E={tokenize:h,state:f,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(E.baseIndent=c),E},token:function(c,E){if(!E.tagName&&c.sol()&&(E.indented=c.indentation()),c.eatSpace())return null;D=null;var _=E.tokenize(c,E);return(_||D)&&_!="comment"&&(g=null,E.state=E.state(D||_,c,E),g&&(_=g=="error"?_+" error":g)),_},indent:function(c,E,_){var b=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+R;if(b&&b.noIndent)return Y.Pass;if(c.tokenize!=u&&c.tokenize!=h)return _?_.match(/^(\s*)/)[0].length:0;if(c.tagName)return j.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+R*(j.multilineTagIndentFactor||1);if(j.alignCDATA&&/$/,blockCommentStart:"",configuration:j.htmlMode?"html":"xml",helperType:j.htmlMode?"html":"xml",skipAttribute:function(c){c.state==v&&(c.state=T)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var E=[],_=c.context;_;_=_.prev)_.tagName&&E.push(_.tagName);return E.reverse()}}}),Y.defineMIME("text/xml","xml"),Y.defineMIME("application/xml","xml"),Y.mimeModes.hasOwnProperty("text/html")||Y.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Le,ye,F){"use strict";F.d(ye,"d",function(){return ot}),F.d(ye,"b",function(){return ce}),F.d(ye,"c",function(){return je}),F.d(ye,"a",function(){return ut});var Y=F("VTBJ"),K=F("1OyB"),L=F("vuIU"),H=F("JX7q"),N=F("Ji7U"),R=F("LK+K"),j=F("cDcd"),k=F("I8Z2"),A=F("BGR+"),D=F("wx14"),g=F("rePB"),h=F("4IlW"),u=F("2GS6"),d=F("Gytx"),s=F.n(d),l=F("TSYQ"),i=F.n(l),o=F("U8pU"),n=F("ODXe"),f=/iPhone/i,O=/iPod/i,S=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,w=/Android/i,T=/\bAndroid(?:.+)SD4930UR\b/i,y=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,v=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,E=/BB10/i,_=/Opera Mini/i,b=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function P(rt,Me){return rt.test(Me)}function B(rt){var Me=rt||(typeof navigator!="undefined"?navigator.userAgent:""),Ue=Me.split("[FBAN");if(typeof Ue[1]!="undefined"){var we=Ue,ee=Object(n.a)(we,1);Me=ee[0]}if(Ue=Me.split("Twitter"),typeof Ue[1]!="undefined"){var he=Ue,Fe=Object(n.a)(he,1);Me=Fe[0]}var Re={apple:{phone:P(f,Me)&&!P(v,Me),ipod:P(O,Me),tablet:!P(f,Me)&&P(S,Me)&&!P(v,Me),device:(P(f,Me)||P(O,Me)||P(S,Me))&&!P(v,Me)},amazon:{phone:P(T,Me),tablet:!P(T,Me)&&P(y,Me),device:P(T,Me)||P(y,Me)},android:{phone:!P(v,Me)&&P(T,Me)||!P(v,Me)&&P(x,Me),tablet:!P(v,Me)&&!P(T,Me)&&!P(x,Me)&&(P(y,Me)||P(w,Me)),device:!P(v,Me)&&(P(T,Me)||P(y,Me)||P(x,Me)||P(w,Me))||P(/\bokhttp\b/i,Me)},windows:{phone:P(v,Me),tablet:P(p,Me),device:P(v,Me)||P(p,Me)},other:{blackberry:P(c,Me),blackberry10:P(E,Me),opera:P(_,Me),firefox:P(I,Me),chrome:P(b,Me),device:P(c,Me)||P(E,Me)||P(_,Me)||P(I,Me)||P(b,Me)},any:null,phone:null,tablet:null};return Re.any=Re.apple.device||Re.android.device||Re.windows.device||Re.other.device,Re.phone=Re.apple.phone||Re.android.phone||Re.windows.phone,Re.tablet=Re.apple.tablet||Re.android.tablet||Re.windows.tablet,Re}var z=Object(Y.a)(Object(Y.a)({},B()),{},{isMobile:B}),U=z;function C(){}function W(rt,Me,Ue){var we=Me||"";return rt.key||"".concat(we,"item_").concat(Ue)}function V(rt){return"".concat(rt,"-menu-")}function J(rt,Me){var Ue=-1;j.Children.forEach(rt,function(we){Ue+=1,we&&we.type&&we.type.isMenuItemGroup?j.Children.forEach(we.props.children,function(ee){Ue+=1,Me(ee,Ue)}):Me(we,Ue)})}function ne(rt,Me,Ue){if(!rt||Ue.find)return;j.Children.forEach(rt,function(we){if(we){var ee=we.type;if(!ee||!(ee.isSubMenu||ee.isMenuItem||ee.isMenuItemGroup))return;Me.indexOf(we.key)!==-1?Ue.find=!0:we.props.children&&ne(we.props.children,Me,Ue)}})}var fe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ue=function(Me){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=Me&&typeof Me.getBoundingClientRect=="function"&&Me.getBoundingClientRect().width;if(we){if(Ue){var ee=getComputedStyle(Me),he=ee.marginLeft,Fe=ee.marginRight;we+=+he.replace("px","")+ +Fe.replace("px","")}we=+we.toFixed(6)}return we||0},le=function(Me,Ue,we){Me&&Object(o.a)(Me.style)==="object"&&(Me.style[Ue]=we)},me=function(){return U.any},ge=F("KQm4"),re=F("Ff2n"),oe=F("faye"),xe=F("bdgK"),Be=F("uciX"),Ve=F("8XRh"),Ye={adjustX:1,adjustY:1},$e={topLeft:{points:["bl","tl"],overflow:Ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ye,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ye,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ye,offset:[4,0]}},Ke={topLeft:{points:["bl","tl"],overflow:Ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ye,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ye,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ye,offset:[4,0]}},We=$e,ze=0,at={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Je=function(Me,Ue,we){var ee=V(Ue),he=Me.getState();Me.setState({defaultActiveFirst:Object(Y.a)(Object(Y.a)({},he.defaultActiveFirst),{},Object(g.a)({},ee,we))})},Xe=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;Object(K.a)(this,Ue),ee=Me.call(this,we),ee.onDestroy=function(Te){ee.props.onDestroy(Te)},ee.onKeyDown=function(Te){var Ae=Te.keyCode,Qe=ee.menuInstance,Et=ee.props,vt=Et.isOpen,cn=Et.store;if(Ae===h.a.ENTER)return ee.onTitleClick(Te),Je(cn,ee.props.eventKey,!0),!0;if(Ae===h.a.RIGHT)return vt?Qe.onKeyDown(Te):(ee.triggerOpenChange(!0),Je(cn,ee.props.eventKey,!0)),!0;if(Ae===h.a.LEFT){var yn;if(vt)yn=Qe.onKeyDown(Te);else return;return yn||(ee.triggerOpenChange(!1),yn=!0),yn}return vt&&(Ae===h.a.UP||Ae===h.a.DOWN)?Qe.onKeyDown(Te):void 0},ee.onOpenChange=function(Te){ee.props.onOpenChange(Te)},ee.onPopupVisibleChange=function(Te){ee.triggerOpenChange(Te,Te?"mouseenter":"mouseleave")},ee.onMouseEnter=function(Te){var Ae=ee.props,Qe=Ae.eventKey,Et=Ae.onMouseEnter,vt=Ae.store;Je(vt,ee.props.eventKey,!1),Et({key:Qe,domEvent:Te})},ee.onMouseLeave=function(Te){var Ae=ee.props,Qe=Ae.parentMenu,Et=Ae.eventKey,vt=Ae.onMouseLeave;Qe.subMenuInstance=Object(H.a)(ee),vt({key:Et,domEvent:Te})},ee.onTitleMouseEnter=function(Te){var Ae=ee.props,Qe=Ae.eventKey,Et=Ae.onItemHover,vt=Ae.onTitleMouseEnter;Et({key:Qe,hover:!0}),vt({key:Qe,domEvent:Te})},ee.onTitleMouseLeave=function(Te){var Ae=ee.props,Qe=Ae.parentMenu,Et=Ae.eventKey,vt=Ae.onItemHover,cn=Ae.onTitleMouseLeave;Qe.subMenuInstance=Object(H.a)(ee),vt({key:Et,hover:!1}),cn({key:Et,domEvent:Te})},ee.onTitleClick=function(Te){var Ae=Object(H.a)(ee),Qe=Ae.props;if(Qe.onTitleClick({key:Qe.eventKey,domEvent:Te}),Qe.triggerSubMenuAction==="hover")return;ee.triggerOpenChange(!Qe.isOpen,"click"),Je(Qe.store,ee.props.eventKey,!1)},ee.onSubMenuClick=function(Te){typeof ee.props.onClick=="function"&&ee.props.onClick(ee.addKeyPath(Te))},ee.onSelect=function(Te){ee.props.onSelect(Te)},ee.onDeselect=function(Te){ee.props.onDeselect(Te)},ee.getPrefixCls=function(){return"".concat(ee.props.rootPrefixCls,"-submenu")},ee.getActiveClassName=function(){return"".concat(ee.getPrefixCls(),"-active")},ee.getDisabledClassName=function(){return"".concat(ee.getPrefixCls(),"-disabled")},ee.getSelectedClassName=function(){return"".concat(ee.getPrefixCls(),"-selected")},ee.getOpenClassName=function(){return"".concat(ee.props.rootPrefixCls,"-submenu-open")},ee.saveMenuInstance=function(Te){ee.menuInstance=Te},ee.addKeyPath=function(Te){return Object(Y.a)(Object(Y.a)({},Te),{},{keyPath:(Te.keyPath||[]).concat(ee.props.eventKey)})},ee.triggerOpenChange=function(Te,Ae){var Qe=ee.props.eventKey,Et=function(){ee.onOpenChange({key:Qe,item:Object(H.a)(ee),trigger:Ae,open:Te})};Ae==="mouseenter"?ee.mouseenterTimeout=setTimeout(function(){Et()},0):Et()},ee.isChildrenSelected=function(){var Te={find:!1};return ne(ee.props.children,ee.props.selectedKeys,Te),Te.find},ee.isOpen=function(){return ee.props.openKeys.indexOf(ee.props.eventKey)!==-1},ee.adjustWidth=function(){if(!ee.subMenuTitle||!ee.menuInstance)return;var Te=oe.findDOMNode(ee.menuInstance);if(Te.offsetWidth>=ee.subMenuTitle.offsetWidth)return;Te.style.minWidth="".concat(ee.subMenuTitle.offsetWidth,"px")},ee.saveSubMenuTitle=function(Te){ee.subMenuTitle=Te},ee.getBaseProps=function(){var Te=Object(H.a)(ee),Ae=Te.props;return{mode:Ae.mode==="horizontal"?"vertical":Ae.mode,visible:ee.props.isOpen,level:Ae.level+1,inlineIndent:Ae.inlineIndent,focusable:!1,onClick:ee.onSubMenuClick,onSelect:ee.onSelect,onDeselect:ee.onDeselect,onDestroy:ee.onDestroy,selectedKeys:Ae.selectedKeys,eventKey:"".concat(Ae.eventKey,"-menu-"),openKeys:Ae.openKeys,motion:Ae.motion,onOpenChange:ee.onOpenChange,subMenuOpenDelay:Ae.subMenuOpenDelay,parentMenu:Object(H.a)(ee),subMenuCloseDelay:Ae.subMenuCloseDelay,forceSubMenuRender:Ae.forceSubMenuRender,triggerSubMenuAction:Ae.triggerSubMenuAction,builtinPlacements:Ae.builtinPlacements,defaultActiveFirst:Ae.store.getState().defaultActiveFirst[V(Ae.eventKey)],multiple:Ae.multiple,prefixCls:Ae.rootPrefixCls,id:ee.internalMenuId,manualRef:ee.saveMenuInstance,itemIcon:Ae.itemIcon,expandIcon:Ae.expandIcon,direction:Ae.direction}},ee.getMotion=function(Te,Ae){var Qe=Object(H.a)(ee),Et=Qe.haveRendered,vt=ee.props,cn=vt.motion,yn=vt.rootPrefixCls,ln=Object(Y.a)(Object(Y.a)({},cn),{},{leavedClassName:"".concat(yn,"-hidden"),removeOnLeave:!1,motionAppear:Et||!Ae||Te!=="inline"});return ln};var he=we.store,Fe=we.eventKey,Re=he.getState(),et=Re.defaultActiveFirst;ee.isRootMenu=!1;var tt=!1;return et&&(tt=et[Fe]),Je(he,Fe,tt),ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ee=this,he=this.props,Fe=he.mode,Re=he.parentMenu,et=he.manualRef;if(et&&et(this),Fe!=="horizontal"||!Re.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ee=this.props,he=ee.onDestroy,Fe=ee.eventKey;he&&he(Fe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(ee){var he=this,Fe=this.getBaseProps(),Re=this.getMotion(Fe.mode,Fe.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Fe.visible||Fe.forceSubMenuRender,!this.haveOpened)return j.createElement("div",null);var et=Fe.direction;return j.createElement(Ve.default,Object.assign({visible:Fe.visible},Re),function(tt){var Te=tt.className,Ae=tt.style,Qe=i()("".concat(Fe.prefixCls,"-sub"),Te,Object(g.a)({},"".concat(Fe.prefixCls,"-rtl"),et==="rtl"));return j.createElement(pe,Object.assign({},Fe,{id:he.internalMenuId,className:Qe,style:Ae}),ee)})}},{key:"render",value:function(){var ee,he=Object(Y.a)({},this.props),Fe=he.isOpen,Re=this.getPrefixCls(),et=he.mode==="inline",tt=i()(Re,"".concat(Re,"-").concat(he.mode),(ee={},Object(g.a)(ee,he.className,!!he.className),Object(g.a)(ee,this.getOpenClassName(),Fe),Object(g.a)(ee,this.getActiveClassName(),he.active||Fe&&!et),Object(g.a)(ee,this.getDisabledClassName(),he.disabled),Object(g.a)(ee,this.getSelectedClassName(),this.isChildrenSelected()),ee));this.internalMenuId||(he.eventKey?this.internalMenuId="".concat(he.eventKey,"$Menu"):(ze+=1,this.internalMenuId="$__$".concat(ze,"$Menu")));var Te={},Ae={},Qe={};he.disabled||(Te={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ae={onClick:this.onTitleClick},Qe={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Et={},vt=he.direction;et&&(vt==="rtl"?Et.paddingRight=he.inlineIndent*he.level:Et.paddingLeft=he.inlineIndent*he.level);var cn={};this.props.isOpen&&(cn={"aria-owns":this.internalMenuId});var yn=null;he.mode!=="horizontal"&&(yn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(yn=j.createElement(this.props.expandIcon,Object(Y.a)({},this.props))));var ln=j.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Et,className:"".concat(Re,"-title"),role:"button"},Qe,Ae,{"aria-expanded":Fe},cn,{"aria-haspopup":"true",title:typeof he.title=="string"?he.title:void 0}),he.title,yn||j.createElement("i",{className:"".concat(Re,"-arrow")})),bt=this.renderChildren(he.children),An=he.parentMenu.isRootMenu?he.parentMenu.props.getPopupContainer:function(vr){return vr.parentNode},zn=at[he.mode],Tn=he.popupOffset?{offset:he.popupOffset}:{},Gt=he.mode==="inline"?"":he.popupClassName;Gt+=vt==="rtl"?" ".concat(Re,"-rtl"):"";var Sn=he.disabled,Wn=he.triggerSubMenuAction,gr=he.subMenuOpenDelay,nt=he.forceSubMenuRender,ct=he.subMenuCloseDelay,qn=he.builtinPlacements;fe.forEach(function(vr){return delete he[vr]}),delete he.onClick;var Tr=vt==="rtl"?Object.assign({},Ke,qn):Object.assign({},$e,qn);return delete he.direction,j.createElement("li",Object.assign({},he,Te,{className:tt,role:"menuitem"}),et&&ln,et&&bt,!et&&j.createElement(Be.a,{prefixCls:Re,popupClassName:i()("".concat(Re,"-popup"),Gt),getPopupContainer:An,builtinPlacements:Tr,popupPlacement:zn,popupVisible:Fe,popupAlign:Tn,popup:bt,action:Sn?[]:[Wn],mouseEnterDelay:gr,mouseLeaveDelay:ct,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:nt},ln))}}]),Ue}(j.Component);Xe.defaultProps={onMouseEnter:C,onMouseLeave:C,onTitleMouseEnter:C,onTitleMouseLeave:C,onTitleClick:C,manualRef:C,mode:"vertical",title:""};var He=Object(k.b)(function(rt,Me){var Ue=rt.openKeys,we=rt.activeKey,ee=rt.selectedKeys,he=Me.eventKey,Fe=Me.subMenuKey;return{isOpen:Ue.indexOf(he)>-1,active:we[Fe]===he,selectedKeys:ee}})(Xe);He.isSubMenu=!0;var ot=He,ft="menuitem-overflowed",dt=.5,lt=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.resizeObserver=null,we.mutationObserver=null,we.originalTotalWidth=0,we.overflowedItems=[],we.menuItemSizes=[],we.cancelFrameId=null,we.state={lastVisibleIndex:void 0},we.getMenuItemNodes=function(){var ee=we.props.prefixCls,he=oe.findDOMNode(Object(H.a)(we));return he?[].slice.call(he.children).filter(function(Fe){return Fe.className.split(" ").indexOf("".concat(ee,"-overflowed-submenu"))<0}):[]},we.getOverflowedSubMenuItem=function(ee,he,Fe){var Re=we.props,et=Re.overflowedIndicator,tt=Re.level,Te=Re.mode,Ae=Re.prefixCls,Qe=Re.theme;if(tt!==1||Te!=="horizontal")return null;var Et=we.props.children[0],vt=Et.props,cn=vt.children,yn=vt.title,ln=vt.style,bt=Object(re.a)(vt,["children","title","style"]),An=Object(Y.a)({},ln),zn="".concat(ee,"-overflowed-indicator"),Tn="".concat(ee,"-overflowed-indicator");he.length===0&&Fe!==!0?An=Object(Y.a)(Object(Y.a)({},An),{},{display:"none"}):Fe&&(An=Object(Y.a)(Object(Y.a)({},An),{},{visibility:"hidden",position:"absolute"}),zn="".concat(zn,"-placeholder"),Tn="".concat(Tn,"-placeholder"));var Gt=Qe?"".concat(Ae,"-").concat(Qe):"",Sn={};return fe.forEach(function(Wn){bt[Wn]!==void 0&&(Sn[Wn]=bt[Wn])}),j.createElement(ot,Object.assign({title:et,className:"".concat(Ae,"-overflowed-submenu"),popupClassName:Gt},Sn,{key:zn,eventKey:Tn,disabled:!1,style:An}),he)},we.setChildrenWidthAndResize=function(){if(we.props.mode!=="horizontal")return;var ee=oe.findDOMNode(Object(H.a)(we));if(!ee)return;var he=ee.children;if(!he||he.length===0)return;var Fe=ee.children[he.length-1];le(Fe,"display","inline-block");var Re=we.getMenuItemNodes(),et=Re.filter(function(tt){return tt.className.split(" ").indexOf(ft)>=0});et.forEach(function(tt){le(tt,"display","inline-block")}),we.menuItemSizes=Re.map(function(tt){return ue(tt,!0)}),et.forEach(function(tt){le(tt,"display","none")}),we.overflowedIndicatorWidth=ue(ee.children[ee.children.length-1],!0),we.originalTotalWidth=we.menuItemSizes.reduce(function(tt,Te){return tt+Te},0),we.handleResize(),le(Fe,"display","none")},we.handleResize=function(){if(we.props.mode!=="horizontal")return;var ee=oe.findDOMNode(Object(H.a)(we));if(!ee)return;var he=ue(ee);we.overflowedItems=[];var Fe=0,Re;we.originalTotalWidth>he+dt&&(Re=-1,we.menuItemSizes.forEach(function(et){Fe+=et,Fe+we.overflowedIndicatorWidth<=he&&(Re+=1)})),we.setState({lastVisibleIndex:Re})},we}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){var ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var he=oe.findDOMNode(this);if(!he)return;this.resizeObserver=new xe.default(function(Fe){Fe.forEach(function(){var Re=ee.cancelFrameId;cancelAnimationFrame(Re),ee.cancelFrameId=requestAnimationFrame(ee.setChildrenWidthAndResize)})}),[].slice.call(he.children).concat(he).forEach(function(Fe){ee.resizeObserver.observe(Fe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ee.resizeObserver.disconnect(),[].slice.call(he.children).concat(he).forEach(function(Fe){ee.resizeObserver.observe(Fe)}),ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(he,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(ee){var he=this,Fe=this.state.lastVisibleIndex;return(ee||[]).reduce(function(Re,et,tt){var Te=et;if(he.props.mode==="horizontal"){var Ae=he.getOverflowedSubMenuItem(et.props.eventKey,[]);Fe!==void 0&&he.props.className.indexOf("".concat(he.props.prefixCls,"-root"))!==-1&&(tt>Fe&&(Te=j.cloneElement(et,{style:{display:"none"},eventKey:"".concat(et.props.eventKey,"-hidden"),className:"".concat(ft)})),tt===Fe+1&&(he.overflowedItems=ee.slice(Fe+1).map(function(Et){return j.cloneElement(Et,{key:Et.props.eventKey,mode:"vertical-left"})}),Ae=he.getOverflowedSubMenuItem(et.props.eventKey,he.overflowedItems)));var Qe=[].concat(Object(ge.a)(Re),[Ae,Te]);return tt===ee.length-1&&Qe.push(he.getOverflowedSubMenuItem(et.props.eventKey,[],!0)),Qe}return[].concat(Object(ge.a)(Re),[Te])},[])}},{key:"render",value:function(){var ee=this.props,he=ee.visible,Fe=ee.prefixCls,Re=ee.overflowedIndicator,et=ee.mode,tt=ee.level,Te=ee.tag,Ae=ee.children,Qe=ee.theme,Et=Object(re.a)(ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),vt=Te;return j.createElement(vt,Object.assign({},Et),this.renderChildren(Ae))}}]),Ue}(j.Component);lt.defaultProps={tag:"div",className:""};var yt=lt;function pt(rt){return rt.length?rt.every(function(Me){return!!Me.props.disabled}):!0}function be(rt,Me,Ue){var we=rt.getState();rt.setState({activeKey:Object(Y.a)(Object(Y.a)({},we.activeKey),{},Object(g.a)({},Me,Ue))})}function _e(rt){return rt.eventKey||"0-menu-"}function Ne(rt,Me){var Ue=Me,we=rt.children,ee=rt.eventKey;if(Ue){var he;if(J(we,function(Fe,Re){Fe&&Fe.props&&!Fe.props.disabled&&Ue===W(Fe,ee,Re)&&(he=!0)}),he)return Ue}return Ue=null,rt.defaultActiveFirst&&J(we,function(Fe,Re){!Ue&&Fe&&!Fe.props.disabled&&(Ue=W(Fe,ee,Re))}),Ue}function ke(rt){if(rt){var Me=this.instanceArray.indexOf(rt);Me!==-1?this.instanceArray[Me]=rt:this.instanceArray.push(rt)}}var Ee=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;return Object(K.a)(this,Ue),ee=Me.call(this,we),ee.onKeyDown=function(he,Fe){var Re=he.keyCode,et;if(ee.getFlatInstanceArray().forEach(function(Te){Te&&Te.props.active&&Te.onKeyDown&&(et=Te.onKeyDown(he))}),et)return 1;var tt=null;return(Re===h.a.UP||Re===h.a.DOWN)&&(tt=ee.step(Re===h.a.UP?-1:1)),tt?(he.preventDefault(),be(ee.props.store,_e(ee.props),tt.props.eventKey),typeof Fe=="function"&&Fe(tt),1):void 0},ee.onItemHover=function(he){var Fe=he.key,Re=he.hover;be(ee.props.store,_e(ee.props),Re?Fe:null)},ee.onDeselect=function(he){ee.props.onDeselect(he)},ee.onSelect=function(he){ee.props.onSelect(he)},ee.onClick=function(he){ee.props.onClick(he)},ee.onOpenChange=function(he){ee.props.onOpenChange(he)},ee.onDestroy=function(he){ee.props.onDestroy(he)},ee.getFlatInstanceArray=function(){return ee.instanceArray},ee.step=function(he){var Fe=ee.getFlatInstanceArray(),Re=ee.props.store.getState().activeKey[_e(ee.props)],et=Fe.length;if(!et)return null;he<0&&(Fe=Fe.concat().reverse());var tt=-1;if(Fe.every(function(Et,vt){return Et&&Et.props.eventKey===Re?(tt=vt,!1):!0}),!ee.props.defaultActiveFirst&&tt!==-1&&pt(Fe.slice(tt,et-1)))return;var Te=(tt+1)%et,Ae=Te;do{var Qe=Fe[Ae];if(!Qe||Qe.props.disabled)Ae=(Ae+1)%et;else return Qe}while(Ae!==Te);return null},ee.renderCommonMenuItem=function(he,Fe,Re){var et=ee.props.store.getState(),tt=Object(H.a)(ee),Te=tt.props,Ae=W(he,Te.eventKey,Fe),Qe=he.props;if(!Qe||typeof he.type=="string")return he;var Et=Ae===et.activeKey,vt=Object(Y.a)(Object(Y.a)({mode:Qe.mode||Te.mode,level:Te.level,inlineIndent:Te.inlineIndent,renderMenuItem:ee.renderMenuItem,rootPrefixCls:Te.prefixCls,index:Fe,parentMenu:Te.parentMenu,manualRef:Qe.disabled?void 0:Object(u.a)(he.ref,ke.bind(Object(H.a)(ee))),eventKey:Ae,active:!Qe.disabled&&Et,multiple:Te.multiple,onClick:function(yn){(Qe.onClick||C)(yn),ee.onClick(yn)},onItemHover:ee.onItemHover,motion:Te.motion,subMenuOpenDelay:Te.subMenuOpenDelay,subMenuCloseDelay:Te.subMenuCloseDelay,forceSubMenuRender:Te.forceSubMenuRender,onOpenChange:ee.onOpenChange,onDeselect:ee.onDeselect,onSelect:ee.onSelect,builtinPlacements:Te.builtinPlacements,itemIcon:Qe.itemIcon||ee.props.itemIcon,expandIcon:Qe.expandIcon||ee.props.expandIcon},Re),{},{direction:Te.direction});return(Te.mode==="inline"||me())&&(vt.triggerSubMenuAction="click"),j.cloneElement(he,vt)},ee.renderMenuItem=function(he,Fe,Re){if(!he)return null;var et=ee.props.store.getState(),tt={openKeys:et.openKeys,selectedKeys:et.selectedKeys,triggerSubMenuAction:ee.props.triggerSubMenuAction,subMenuKey:Re};return ee.renderCommonMenuItem(he,Fe,tt)},we.store.setState({activeKey:Object(Y.a)(Object(Y.a)({},we.store.getState().activeKey),{},Object(g.a)({},we.eventKey,Ne(we,we.activeKey)))}),ee.instanceArray=[],ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ee){return this.props.visible||ee.visible||this.props.className!==ee.className||!s()(this.props.style,ee.style)}},{key:"componentDidUpdate",value:function(ee){var he=this.props,Fe="activeKey"in he?he.activeKey:he.store.getState().activeKey[_e(he)],Re=Ne(he,Fe);if(Re!==Fe)be(he.store,_e(he),Re);else if("activeKey"in ee){var et=Ne(ee,ee.activeKey);Re!==et&&be(he.store,_e(he),Re)}}},{key:"render",value:function(){var ee=this,he=Object(D.a)({},this.props);this.instanceArray=[];var Fe=i()(he.prefixCls,he.className,"".concat(he.prefixCls,"-").concat(he.mode)),Re={className:Fe,role:he.role||"menu"};he.id&&(Re.id=he.id),he.focusable&&(Re.tabIndex=0,Re.onKeyDown=this.onKeyDown);var et=he.prefixCls,tt=he.eventKey,Te=he.visible,Ae=he.level,Qe=he.mode,Et=he.overflowedIndicator,vt=he.theme;return fe.forEach(function(cn){return delete he[cn]}),delete he.onClick,j.createElement(yt,Object.assign({},he,{prefixCls:et,mode:Qe,tag:"ul",level:Ae,theme:vt,visible:Te,overflowedIndicator:Et},Re),j.Children.map(he.children,function(cn,yn){return ee.renderMenuItem(cn,yn,tt||"0-menu-")}))}}]),Ue}(j.Component);Ee.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:C};var Ie=Object(k.b)()(Ee),pe=Ie,ae=F("Kwbf");function ie(rt,Me,Ue){var we=rt.prefixCls,ee=rt.motion,he=rt.defaultMotions,Fe=he===void 0?{}:he,Re=rt.openAnimation,et=rt.openTransitionName,tt=Me.switchingModeFromInline;if(ee)return ee;if(Object(o.a)(Re)==="object"&&Re)Object(ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Re=="string")return{motionName:"".concat(we,"-open-").concat(Re)};if(et)return{motionName:et};var Te=Fe[Ue];return Te||(tt?null:Fe.other)}var Q=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(we){var ee;Object(K.a)(this,Ue),ee=Me.call(this,we),ee.inlineOpenKeys=[],ee.onSelect=function(Re){var et=Object(H.a)(ee),tt=et.props;if(tt.selectable){var Te=ee.store.getState(),Ae=Te.selectedKeys,Qe=Re.key;tt.multiple?Ae=Ae.concat([Qe]):Ae=[Qe],"selectedKeys"in tt||ee.store.setState({selectedKeys:Ae}),tt.onSelect(Object(Y.a)(Object(Y.a)({},Re),{},{selectedKeys:Ae}))}},ee.onClick=function(Re){var et=ee.getRealMenuMode(),tt=Object(H.a)(ee),Te=tt.store,Ae=tt.props.onOpenChange;et!=="inline"&&!("openKeys"in ee.props)&&(Te.setState({openKeys:[]}),Ae([])),ee.props.onClick(Re)},ee.onKeyDown=function(Re,et){ee.innerMenu.getWrappedInstance().onKeyDown(Re,et)},ee.onOpenChange=function(Re){var et=Object(H.a)(ee),tt=et.props,Te=ee.store.getState().openKeys.concat(),Ae=!1,Qe=function(vt){var cn=!1;if(vt.open)cn=Te.indexOf(vt.key)===-1,cn&&Te.push(vt.key);else{var yn=Te.indexOf(vt.key);cn=yn!==-1,cn&&Te.splice(yn,1)}Ae=Ae||cn};Array.isArray(Re)?Re.forEach(Qe):Qe(Re),Ae&&("openKeys"in ee.props||ee.store.setState({openKeys:Te}),tt.onOpenChange(Te))},ee.onDeselect=function(Re){var et=Object(H.a)(ee),tt=et.props;if(tt.selectable){var Te=ee.store.getState().selectedKeys.concat(),Ae=Re.key,Qe=Te.indexOf(Ae);Qe!==-1&&Te.splice(Qe,1),"selectedKeys"in tt||ee.store.setState({selectedKeys:Te}),tt.onDeselect(Object(Y.a)(Object(Y.a)({},Re),{},{selectedKeys:Te}))}},ee.onMouseEnter=function(Re){ee.restoreModeVerticalFromInline();var et=ee.props.onMouseEnter;et&&et(Re)},ee.onTransitionEnd=function(Re){var et=Re.propertyName==="width"&&Re.target===Re.currentTarget,tt=Re.target.className,Te=Object.prototype.toString.call(tt)==="[object SVGAnimatedString]"?tt.animVal:tt,Ae=Re.propertyName==="font-size"&&Te.indexOf("anticon")>=0;(et||Ae)&&ee.restoreModeVerticalFromInline()},ee.setInnerMenu=function(Re){ee.innerMenu=Re},ee.isRootMenu=!0;var he=we.defaultSelectedKeys,Fe=we.defaultOpenKeys;return"selectedKeys"in we&&(he=we.selectedKeys||[]),"openKeys"in we&&(Fe=we.openKeys||[]),ee.store=Object(k.c)({selectedKeys:he,openKeys:Fe,activeKey:{"0-menu-":Ne(we,we.activeKey)}}),ee.state={switchingModeFromInline:!1},ee}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ee){this.updateOpentKeysWhenSwitchMode(ee),this.updateMiniStore();var he=this.props,Fe=he.siderCollapsed,Re=he.inlineCollapsed,et=he.onOpenChange;(!ee.inlineCollapsed&&Re||!ee.siderCollapsed&&Fe)&&et([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(ee){var he=this.props,Fe=this.store,Re=this.inlineOpenKeys,et=Fe.getState(),tt={};ee.mode==="inline"&&he.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in he||((he.inlineCollapsed&&!ee.inlineCollapsed||he.siderCollapsed&&!ee.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=et.openKeys.concat(),tt.openKeys=[]),(!he.inlineCollapsed&&ee.inlineCollapsed||!he.siderCollapsed&&ee.siderCollapsed)&&(tt.openKeys=Re,this.inlineOpenKeys=[])),Object.keys(tt).length&&Fe.setState(tt)}},{key:"updateMenuDisplay",value:function(){var ee=this.props.collapsedWidth,he=this.store,Fe=this.prevOpenKeys,Re=this.getInlineCollapsed()&&(ee===0||ee==="0"||ee==="0px");Re?(this.prevOpenKeys=he.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Fe&&(this.store.setState({openKeys:Fe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ee=this.props.mode,he=this.state.switchingModeFromInline,Fe=this.getInlineCollapsed();return he&&Fe?"inline":Fe?"vertical":ee}},{key:"getInlineCollapsed",value:function(){var ee=this.props,he=ee.inlineCollapsed,Fe=ee.siderCollapsed;return Fe!==void 0?Fe:he}},{key:"restoreModeVerticalFromInline",value:function(){var ee=this.state.switchingModeFromInline;ee&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var ee=Object(Y.a)({},Object(A.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),he=this.getRealMenuMode();return ee.className+=" ".concat(ee.prefixCls,"-root"),ee.direction==="rtl"&&(ee.className+=" ".concat(ee.prefixCls,"-rtl")),ee=Object(Y.a)(Object(Y.a)({},ee),{},{mode:he,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ie(this.props,this.state,he)}),delete ee.openAnimation,delete ee.openTransitionName,j.createElement(k.a,{store:this.store},j.createElement(pe,Object.assign({},ee,{ref:this.setInnerMenu}),this.props.children))}}]),Ue}(j.Component);Q.defaultProps={selectable:!0,onClick:C,onSelect:C,onOpenChange:C,onDeselect:C,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:j.createElement("span",null,"\xB7\xB7\xB7")};var q=Q,te=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.onKeyDown=function(ee){var he=ee.keyCode;return he===h.a.ENTER?(we.onClick(ee),!0):void 0},we.onMouseLeave=function(ee){var he=we.props,Fe=he.eventKey,Re=he.onItemHover,et=he.onMouseLeave;Re({key:Fe,hover:!1}),et({key:Fe,domEvent:ee})},we.onMouseEnter=function(ee){var he=we.props,Fe=he.eventKey,Re=he.onItemHover,et=he.onMouseEnter;Re({key:Fe,hover:!0}),et({key:Fe,domEvent:ee})},we.onClick=function(ee){var he=we.props,Fe=he.eventKey,Re=he.multiple,et=he.onClick,tt=he.onSelect,Te=he.onDeselect,Ae=he.isSelected,Qe={key:Fe,keyPath:[Fe],item:Object(H.a)(we),domEvent:ee};et(Qe),Re?Ae?Te(Qe):tt(Qe):Ae||tt(Qe)},we.saveNode=function(ee){we.node=ee},we}return Object(L.a)(Ue,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ee=this.props;ee.onDestroy&&ee.onDestroy(ee.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var ee,he=Object(Y.a)({},this.props),Fe=i()(this.getPrefixCls(),he.className,(ee={},Object(g.a)(ee,this.getActiveClassName(),!he.disabled&&he.active),Object(g.a)(ee,this.getSelectedClassName(),he.isSelected),Object(g.a)(ee,this.getDisabledClassName(),he.disabled),ee)),Re=Object(Y.a)(Object(Y.a)({},he.attribute),{},{title:typeof he.title=="string"?he.title:void 0,className:Fe,role:he.role||"menuitem","aria-disabled":he.disabled});he.role==="option"?Re=Object(Y.a)(Object(Y.a)({},Re),{},{role:"option","aria-selected":he.isSelected}):(he.role===null||he.role==="none")&&(Re.role="none");var et={onClick:he.disabled?null:this.onClick,onMouseLeave:he.disabled?null:this.onMouseLeave,onMouseEnter:he.disabled?null:this.onMouseEnter},tt=Object(Y.a)({},he.style);he.mode==="inline"&&(he.direction==="rtl"?tt.paddingRight=he.inlineIndent*he.level:tt.paddingLeft=he.inlineIndent*he.level),fe.forEach(function(Ae){return delete he[Ae]}),delete he.direction;var Te=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Te=j.createElement(this.props.itemIcon,this.props)),j.createElement("li",Object.assign({},Object(A.default)(he,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Re,et,{style:tt,ref:this.saveNode}),he.children,Te)}}]),Ue}(j.Component);te.isMenuItem=!0,te.defaultProps={onSelect:C,onMouseEnter:C,onMouseLeave:C,manualRef:C};var se=Object(k.b)(function(rt,Me){var Ue=rt.activeKey,we=rt.selectedKeys,ee=Me.eventKey,he=Me.subMenuKey;return{active:Ue[he]===ee,isSelected:we.indexOf(ee)!==-1}})(te),ce=se,Se=function(rt){Object(N.a)(Ue,rt);var Me=Object(R.a)(Ue);function Ue(){var we;return Object(K.a)(this,Ue),we=Me.apply(this,arguments),we.renderInnerMenuItem=function(ee){var he=we.props,Fe=he.renderMenuItem,Re=he.index;return Fe(ee,Re,we.props.subMenuKey)},we}return Object(L.a)(Ue,[{key:"render",value:function(){var ee=Object(D.a)({},this.props),he=ee.className,Fe=he===void 0?"":he,Re=ee.rootPrefixCls,et="".concat(Re,"-item-group-title"),tt="".concat(Re,"-item-group-list"),Te=ee.title,Ae=ee.children;return fe.forEach(function(Qe){return delete ee[Qe]}),delete ee.onClick,delete ee.direction,j.createElement("li",Object.assign({},ee,{className:"".concat(Fe," ").concat(Re,"-item-group")}),j.createElement("div",{className:et,title:typeof Te=="string"?Te:void 0},Te),j.createElement("ul",{className:tt},j.Children.map(Ae,this.renderInnerMenuItem)))}}]),Ue}(j.Component);Se.isMenuItemGroup=!0,Se.defaultProps={disabled:!0};var je=Se,Ze=function(Me){var Ue=Me.className,we=Me.rootPrefixCls,ee=Me.style;return j.createElement("li",{className:"".concat(Ue," ").concat(we,"-item-divider"),style:ee})};Ze.defaultProps={disabled:!0,className:"",style:{}};var ut=Ze,it=ye.e=q},"55Ip":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return n});var Y=F("Ty5D"),K=F("dI71"),L=F("cDcd"),H=F.n(L),N=F("YS25"),R=F("17x9"),j=F.n(R),k=F("wx14"),A=F("zLVn"),D=F("9R94"),g=function(v){Object(K.a)(p,v);function p(){for(var E,_=arguments.length,b=new Array(_),I=0;I<_;I++)b[I]=arguments[I];return E=v.call.apply(v,[this].concat(b))||this,E.history=Object(N.a)(E.props),E}var c=p.prototype;return c.render=function(){return H.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(H.a.Component),h=function(v){Object(K.a)(p,v);function p(){for(var E,_=arguments.length,b=new Array(_),I=0;I<_;I++)b[I]=arguments[I];return E=v.call.apply(v,[this].concat(b))||this,E.history=Object(N.b)(E.props),E}var c=p.prototype;return c.render=function(){return H.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(H.a.Component),u=function(p,c){return typeof p=="function"?p(c):p},d=function(p,c){return typeof p=="string"?Object(N.c)(p,null,null,c):p},s=function(p){return p},l=H.a.forwardRef;typeof l=="undefined"&&(l=s);function i(v){return!!(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey)}var o=l(function(v,p){var c=v.innerRef,E=v.navigate,_=v.onClick,b=Object(A.a)(v,["innerRef","navigate","onClick"]),I=b.target,P=Object(k.a)({},b,{onClick:function(z){try{_&&_(z)}catch(U){throw z.preventDefault(),U}!z.defaultPrevented&&z.button===0&&(!I||I==="_self")&&!i(z)&&(z.preventDefault(),E())}});return s!==l?P.ref=p||c:P.ref=c,H.a.createElement("a",P)}),n=l(function(v,p){var c=v.component,E=c===void 0?o:c,_=v.replace,b=v.to,I=v.innerRef,P=Object(A.a)(v,["component","replace","to","innerRef"]);return H.a.createElement(Y.e.Consumer,null,function(B){B||Object(D.a)(!1);var z=B.history,U=d(u(b,B.location),B.location),C=U?z.createHref(U):"",W=Object(k.a)({},P,{href:C,navigate:function(){var J=u(b,B.location),ne=_?z.replace:z.push;ne(J)}});return s!==l?W.ref=p||I:W.innerRef=I,H.a.createElement(E,W)})});if(!1)var f,O;var S=function(p){return p},x=H.a.forwardRef;typeof x=="undefined"&&(x=S);function w(){for(var v=arguments.length,p=new Array(v),c=0;c=0||_.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;v.setState({goInputText:""}),P(v.getValidValue())},v.go=function(_){var b=v.state.goInputText;if(b==="")return;(_.keyCode===d.ENTER||_.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(N.a)(y,[{key:"getValidValue",value:function(){var p=this.state,c=p.goInputText,E=p.current;return!c||isNaN(c)?E:Number(c)}},{key:"getPageSizeOptions",value:function(){var p=this.props,c=p.pageSize,E=p.pageSizeOptions;return E.some(function(_){return _.toString()===c.toString()})?E:E.concat([c.toString()]).sort(function(_,b){var I=isNaN(Number(_))?0:Number(_),P=isNaN(Number(b))?0:Number(b);return I-P})}},{key:"render",value:function(){var p=this,c=this.props,E=c.pageSize,_=c.locale,b=c.rootPrefixCls,I=c.changeSize,P=c.quickGo,B=c.goButton,z=c.selectComponentClass,U=c.buildOptionText,C=c.selectPrefixCls,W=c.disabled,V=this.state.goInputText,J="".concat(b,"-options"),ne=z,fe=null,ue=null,le=null;if(!I&&!P)return null;var me=this.getPageSizeOptions();if(I&&ne){var ge=me.map(function(re,oe){return A.a.createElement(ne.Option,{key:oe,value:re.toString()},(U||p.buildOptionText)(re))});fe=A.a.createElement(ne,{disabled:W,prefixCls:C,showSearch:!1,className:"".concat(J,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(E||me[0]).toString(),onChange:this.changeSize,getPopupContainer:function(oe){return oe.parentNode}},ge)}return P&&(B&&(le=typeof B=="boolean"?A.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(J,"-quick-jumper-button")},_.jump_to_confirm):A.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),ue=A.a.createElement("div",{className:"".concat(J,"-quick-jumper")},_.jump_to,A.a.createElement("input",{disabled:W,type:"text",value:V,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),_.page,le)),A.a.createElement("li",{className:"".concat(J)},fe,ue)}}]),y}(A.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var l=s,i=F("N2Kk");function o(){}function n(w){return typeof w=="number"&&isFinite(w)&&Math.floor(w)===w}function f(w,T,y){return y}function O(w,T,y){var v=typeof w=="undefined"?T.pageSize:w;return Math.floor((y.total-1)/v)+1}var S=function(w){Object(R.a)(y,w);var T=Object(j.a)(y);function y(v){var p;Object(H.a)(this,y),p=T.call(this,v),p.getJumpPrevPage=function(){return Math.max(1,p.state.current-(p.props.showLessItems?3:5))},p.getJumpNextPage=function(){return Math.min(O(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(I,P){var B=p.props.prefixCls,z=I||A.a.createElement("button",{type:"button","aria-label":P,className:"".concat(B,"-item-link")});return typeof I=="function"&&(z=A.a.createElement(I,Object(L.a)({},p.props))),z},p.savePaginationNode=function(I){p.paginationNode=I},p.isValid=function(I){return n(I)&&I!==p.state.current},p.shouldDisplayQuickJumper=function(){var I=p.props,P=I.showQuickJumper,B=I.pageSize,z=I.total;return z<=B?!1:P},p.handleKeyDown=function(I){(I.keyCode===d.ARROW_UP||I.keyCode===d.ARROW_DOWN)&&I.preventDefault()},p.handleKeyUp=function(I){var P=p.getValidValue(I),B=p.state.currentInputValue;P!==B&&p.setState({currentInputValue:P}),I.keyCode===d.ENTER?p.handleChange(P):I.keyCode===d.ARROW_UP?p.handleChange(P-1):I.keyCode===d.ARROW_DOWN&&p.handleChange(P+1)},p.changePageSize=function(I){var P=p.state.current,B=O(I,p.state,p.props);P=P>B?B:P,B===0&&(P=p.state.current),typeof I=="number"&&("pageSize"in p.props||p.setState({pageSize:I}),"current"in p.props||p.setState({current:P,currentInputValue:P})),p.props.onShowSizeChange(P,I),"onChange"in p.props&&p.props.onChange&&p.props.onChange(P,I)},p.handleChange=function(I){var P=p.props.disabled,B=I;if(p.isValid(B)&&!P){var z=O(void 0,p.state,p.props);B>z?B=z:B<1&&(B=1),"current"in p.props||p.setState({current:B,currentInputValue:B});var U=p.state.pageSize;return p.props.onChange(B,U),B}return p.state.current},p.prev=function(){p.hasPrev()&&p.handleChange(p.state.current-1)},p.next=function(){p.hasNext()&&p.handleChange(p.state.current+1)},p.jumpPrev=function(){p.handleChange(p.getJumpPrevPage())},p.jumpNext=function(){p.handleChange(p.getJumpNextPage())},p.hasPrev=function(){return p.state.current>1},p.hasNext=function(){return p.state.current2?B-2:0),U=2;U=E?b=E:b=Number(c),b}},{key:"getShowSizeChanger",value:function(){var p=this.props,c=p.showSizeChanger,E=p.total,_=p.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:E>_}},{key:"renderPrev",value:function(p){var c=this.props,E=c.prevIcon,_=c.itemRender,b=_(p,"prev",this.getItemIcon(E,"prev page")),I=!this.hasPrev();return Object(k.isValidElement)(b)?Object(k.cloneElement)(b,{disabled:I}):b}},{key:"renderNext",value:function(p){var c=this.props,E=c.nextIcon,_=c.itemRender,b=_(p,"next",this.getItemIcon(E,"next page")),I=!this.hasNext();return Object(k.isValidElement)(b)?Object(k.cloneElement)(b,{disabled:I}):b}},{key:"render",value:function(){var p=this,c=this.props,E=c.prefixCls,_=c.className,b=c.style,I=c.disabled,P=c.hideOnSinglePage,B=c.total,z=c.locale,U=c.showQuickJumper,C=c.showLessItems,W=c.showTitle,V=c.showTotal,J=c.simple,ne=c.itemRender,fe=c.showPrevNextJumpers,ue=c.jumpPrevIcon,le=c.jumpNextIcon,me=c.selectComponentClass,ge=c.selectPrefixCls,re=c.pageSizeOptions,oe=this.state,xe=oe.current,Be=oe.pageSize,Ve=oe.currentInputValue;if(P===!0&&B<=Be)return null;var Ye=O(void 0,this.state,this.props),$e=[],Ke=null,We=null,ze=null,at=null,Je=null,Xe=U&&U.goButton,He=C?1:2,ot=xe-1>0?xe-1:0,ft=xe+1=He*2&&xe!==1+2&&($e[0]=Object(k.cloneElement)($e[0],{className:"".concat(E,"-item-after-jump-prev")}),$e.unshift(Ke)),Ye-xe>=He*2&&xe!==Ye-2&&($e[$e.length-1]=Object(k.cloneElement)($e[$e.length-1],{className:"".concat(E,"-item-before-jump-next")}),$e.push(We)),Ne!==1&&$e.unshift(ze),ke!==Ye&&$e.push(at)}var pe=null;V&&(pe=A.a.createElement("li",{className:"".concat(E,"-total-text")},V(B,[B===0?0:(xe-1)*Be+1,xe*Be>B?B:xe*Be])));var ae=!this.hasPrev()||!Ye,ie=!this.hasNext()||!Ye;return A.a.createElement("ul",Object(Y.a)({className:g()(E,_,Object(K.a)({},"".concat(E,"-disabled"),I)),style:b,unselectable:"unselectable",ref:this.savePaginationNode},dt),pe,A.a.createElement("li",{title:W?z.prev_page:null,onClick:this.prev,tabIndex:ae?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(E,"-prev"),Object(K.a)({},"".concat(E,"-disabled"),ae)),"aria-disabled":ae},this.renderPrev(ot)),$e,A.a.createElement("li",{title:W?z.next_page:null,onClick:this.next,tabIndex:ie?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(E,"-next"),Object(K.a)({},"".concat(E,"-disabled"),ie)),"aria-disabled":ie},this.renderNext(ft)),A.a.createElement(l,{disabled:I,locale:z,rootPrefixCls:E,selectComponentClass:me,selectPrefixCls:ge,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:xe,pageSize:Be,pageSizeOptions:re,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Xe}))}}],[{key:"getDerivedStateFromProps",value:function(p,c){var E={};if("current"in p&&(E.current=p.current,p.current!==c.current&&(E.currentInputValue=E.current)),"pageSize"in p&&p.pageSize!==c.pageSize){var _=c.current,b=O(p.pageSize,c,p);_=_>b?b:_,"current"in p||(E.current=_,E.currentInputValue=_),E.pageSize=p.pageSize}return E}}]),y}(A.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:o,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:o,locale:i.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var x=S},"6RRn":function(Le,ye,F){"use strict";var Y=F("wCXF"),K=F("n6Qo");F.d(ye,"b",function(){return K.a});var L=F("IBYe"),H=F("6eGT"),N=F("hW8S");F.d(ye,"a",function(){return N.a}),ye.c=Y.b},"6UM0":function(Le,ye,F){var Y,K;(function(){var L;(function(){"use strict";var N=[function(A,D,g){var h=g(1).Beautifier,u=g(5).Options;function d(s,l){var i=new h(s,l);return i.beautify()}A.exports=d,A.exports.defaultOptions=function(){return new u}},function(A,D,g){var h=g(2).Output,u=g(3).Token,d=g(4),s=g(5).Options,l=g(7).Tokenizer,i=g(7).line_starters,o=g(7).positionable_operators,n=g(7).TOKEN;function f(C,W){return W.indexOf(C)!==-1}function O(C){return C.replace(/^\s+/g,"")}function S(C){for(var W={},V=0;VV&&(V=C.line_indent_level));var J={mode:W,parent:C,last_token:C?C.last_token:new u(n.START_BLOCK,""),last_word:C?C.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:V,alignment:0,line_indent_level:C?C.line_indent_level:V,start_line_index:this._output.get_line_number(),ternary_depth:0};return J},z.prototype._reset=function(C){var W=C.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new h(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var V=new l(C,this._options);return this._tokens=V.tokenize(),C},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C,W=this._reset(this._source_text),V=this._options.eol;this._options.eol==="auto"&&(V=` @@ -23,8 +23,8 @@ You passed in: '`+this.raw_options[u]+"'");return l},D.prototype._is_valid_selec `&&this._input.next(),V+=this._input.next()):z&&(z==="${"&&V==="$"&&this._input.peek()==="{"&&(V+=this._input.next()),z===V&&(P==="`"?V+=this._read_string_recursive("}",B,"`"):V+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(V+=this._input.next())));V+=C.read(),W+=V}return W},A.exports.Tokenizer=b,A.exports.TOKEN=f,A.exports.positionable_operators=T.slice(),A.exports.line_starters=p.slice()},function(A){var D=RegExp.prototype.hasOwnProperty("sticky");function g(h){this.__input=h||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position=0&&h=0&&u=h.length&&this.__input.substring(u-h.length,u).toLowerCase()===h},A.exports.InputScanner=g},function(A,D,g){var h=g(8).InputScanner,u=g(3).Token,d=g(10).TokenStream,s=g(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(o,n){this._input=new h(o),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var o,n=new u(l.START,""),f=null,O=[],S=new d;n.type!==l.EOF;){for(o=this._get_next_token(n,f);this._is_comment(o);)S.add(o),o=this._get_next_token(n,f);S.isEmpty()||(o.comments_before=S,S=new d),o.parent=f,this._is_opening(o)?(O.push(f),f=o):f&&this._is_closing(o,f)&&(o.opened=f,f.closed=o,f=O.pop(),o.parent=f),o.previous=n,n.next=o,this.__tokens.add(o),n=o}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(o,n){this._readWhitespace();var f=this._input.read(/.+/g);return f?this._create_token(l.RAW,f):this._create_token(l.EOF,"")},i.prototype._is_comment=function(o){return!1},i.prototype._is_opening=function(o){return!1},i.prototype._is_closing=function(o,n){return!1},i.prototype._create_token=function(o,n){var f=new u(o,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return f},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},A.exports.Tokenizer=i,A.exports.TOKEN=l},function(A){function D(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position=0&&g/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new h,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(s){var l=this._create();return l._disabled[s]=!0,l._update(),l},d.prototype.read_options=function(s){var l=this._create();for(var i in u)l._disabled[i]=s.templating.indexOf(i)===-1;return l._update(),l},d.prototype.exclude=function(s){var l=this._create();return l._excluded[s]=!0,l._update(),l},d.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),s+=l,l=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},d.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},d.prototype._read_template=function(){var s="",l=this._input.peek();if(l==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(s=s||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},A.exports.TemplatablePattern=d}],R={};function j(A){var D=R[A];if(D!==void 0)return D.exports;var g=R[A]={exports:{}};return N[A](g,g.exports,j),g.exports}var k=j(0);L=k})();var H=L;!(Y=[],K=function(){return{js_beautify:H}}.apply(ye,Y),K!==void 0&&(Le.exports=K))})()},"6eGT":function(Le,ye,F){"use strict";function Y(K){return null}ye.a=Y},"7Cbv":function(Le,ye,F){"use strict";var Y=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),K=new Uint8Array(16);function L(){if(!Y)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Y(K)}var H=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function N(u){return typeof u=="string"&&H.test(u)}for(var R=N,j=[],k=0;k<256;++k)j.push((k+256).toString(16).substr(1));function A(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(j[u[d+0]]+j[u[d+1]]+j[u[d+2]]+j[u[d+3]]+"-"+j[u[d+4]]+j[u[d+5]]+"-"+j[u[d+6]]+j[u[d+7]]+"-"+j[u[d+8]]+j[u[d+9]]+"-"+j[u[d+10]]+j[u[d+11]]+j[u[d+12]]+j[u[d+13]]+j[u[d+14]]+j[u[d+15]]).toLowerCase();if(!R(s))throw TypeError("Stringified UUID is invalid");return s}var D=A;function g(u,d,s){u=u||{};var l=u.random||(u.rng||L)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,d){s=s||0;for(var i=0;i<16;++i)d[s+i]=l[i];return d}return D(l)}var h=ye.a=g},"7ahc":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return O});var Y=F("k1fw"),K=F("0Owb"),L=F("+L6B"),H=F("2/Rp"),N=F("y8nQ"),R=F("Vl3Y"),j=F("tJVT"),k=F("OaEy"),A=F("2fM7"),D=F("cDcd"),g=F.n(D),h=F("VrN/"),u=F.n(h),d=F("p77/"),s=F.n(d),l=F("c5Ni"),i=F.n(l),o=A.a.Option,n={labelCol:{span:4},wrapperCol:{span:20}},f={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};ye.b=function(S){var x=S.callback,w=S.onCancel,T=Object(D.useState)("python"),y=Object(j.a)(T,2),v=y[0],p=y[1];function c(_){p(f[_][1])}function E(_){x(_)}return g.a.createElement(R.a,Object(K.a)({},n,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),g.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},g.a.createElement(A.a,{onChange:c},Object.keys(f).map(function(_){return g.a.createElement(o,{key:_,value:_},f[_][0])}))),g.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},g.a.createElement(O,{mode:v})),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(H.a,{type:"ghost",onClick:w},"\u53D6\u6D88")))};function O(S){var x=S.value,w=S.onChange,T=S.mode,y=S.options,v=y===void 0?{}:y,p=Object(D.useRef)(),c=Object(D.useState)(),E=Object(j.a)(c,2),_=E[0],b=E[1];return Object(D.useEffect)(function(){if(_){function I(P){var B=P.getValue();w&&w(B)}return _.on("change",I),function(){_.off("change",I)}}},[_,w]),Object(D.useEffect)(function(){_&&_.setOption("mode",T)},[_,T]),Object(D.useEffect)(function(){_&&((x!==_.getValue()||x==="")&&setTimeout(function(){_.setValue(x||" ")},300))},[_,x]),Object(D.useEffect)(function(){if(p.current&&!_){var I=u.a.fromTextArea(p.current,Object(Y.a)({mode:T,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));b(I)}},[p.current,_]),g.a.createElement("div",{className:"my-codemirror-container"},g.a.createElement("textarea",{ref:p}))}},"7ixt":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return L});var Y={adjustX:1,adjustY:1},K=[0,0],L={left:{points:["cr","cl"],overflow:Y,offset:[-4,0],targetOffset:K},right:{points:["cl","cr"],overflow:Y,offset:[4,0],targetOffset:K},top:{points:["bc","tc"],overflow:Y,offset:[0,-4],targetOffset:K},bottom:{points:["tc","bc"],overflow:Y,offset:[0,4],targetOffset:K},topLeft:{points:["bl","tl"],overflow:Y,offset:[0,-4],targetOffset:K},leftTop:{points:["tr","tl"],overflow:Y,offset:[-4,0],targetOffset:K},topRight:{points:["br","tr"],overflow:Y,offset:[0,-4],targetOffset:K},rightTop:{points:["tl","tr"],overflow:Y,offset:[4,0],targetOffset:K},bottomRight:{points:["tr","br"],overflow:Y,offset:[0,4],targetOffset:K},rightBottom:{points:["bl","br"],overflow:Y,offset:[4,0],targetOffset:K},bottomLeft:{points:["tl","bl"],overflow:Y,offset:[0,4],targetOffset:K},leftBottom:{points:["br","bl"],overflow:Y,offset:[-4,0],targetOffset:K}},H=L},"815F":function(Le,ye,F){"use strict";F.d(ye,"e",function(){return j}),F.d(ye,"c",function(){return A}),F.d(ye,"d",function(){return D}),F.d(ye,"a",function(){return h}),F.d(ye,"f",function(){return u}),F.d(ye,"b",function(){return d});var Y=F("KQm4"),K=F("VTBJ"),L=F("Ff2n"),H=F("Zm9Q"),N=F("Kwbf"),R=F("OZM5");function j(s,l){return s!=null?s:l}function k(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=new Map;function i(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(o||[]).forEach(function(f){var O=f.key,S=f.children;Object(N.a)(O!=null,"Tree node must have a certain key: [".concat(n).concat(O,"]"));var x=String(O);Object(N.a)(!l.has(x)||O===null||O===void 0,"Same 'key' exist in the Tree: ".concat(x)),l.set(x,!0),i(S,"".concat(n).concat(x," > "))})}i(s)}function A(s){function l(i){var o=Object(H.a)(i);return o.map(function(n){if(!Object(R.i)(n))return Object(N.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var f=n.key,O=n.props,S=O.children,x=Object(L.a)(O,["children"]),w=Object(K.a)({key:f},x),T=l(S);return T.length&&(w.children=T),w}).filter(function(n){return n})}return l(s)}function D(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(l===!0?[]:l),o=[];function n(f){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return f.map(function(S,x){var w=Object(R.h)(O?O.pos:"0",x),T=j(S.key,w),y=Object(K.a)(Object(K.a)({},S),{},{parent:O,pos:w,children:null,data:S,isStart:[].concat(Object(Y.a)(O?O.isStart:[]),[x===0]),isEnd:[].concat(Object(Y.a)(O?O.isEnd:[]),[x===f.length-1])});return o.push(y),l===!0||i.has(T)?y.children=n(S.children||[],y):y.children=[],y})}return n(s),o}function g(s,l,i){var o;i?typeof i=="string"?o=function(O){return O[i]}:typeof i=="function"&&(o=function(O){return i(O)}):o=function(O,S){return j(O.key,S)};function n(f,O,S){var x=f?f.children:s,w=f?Object(R.h)(S.pos,O):"0";if(f){var T=o(f,w),y={node:f,index:O,pos:w,key:T,parentPos:S.node?S.pos:null,level:S.level+1};l(y)}x&&x.forEach(function(v,p){n(v,p,{node:f,pos:w,level:S?S.level+1:-1})})}n(null)}function h(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=l.initWrapper,o=l.processEntity,n=l.onProcessFinished,f=arguments.length>2?arguments[2]:void 0,O={},S={},x={posEntities:O,keyEntities:S};return i&&(x=i(x)||x),g(s,function(w){var T=w.node,y=w.index,v=w.pos,p=w.key,c=w.parentPos,E=w.level,_={node:T,index:y,key:p,pos:v,level:E},b=j(p,v);O[v]=_,S[b]=_,_.parent=O[c],_.parent&&(_.parent.children=_.parent.children||[],_.parent.children.push(_)),o&&o(_,x)},f),n&&n(x),x}function u(s,l){var i=l.expandedKeys,o=l.selectedKeys,n=l.loadedKeys,f=l.loadingKeys,O=l.checkedKeys,S=l.halfCheckedKeys,x=l.dragOverNodeKey,w=l.dropPosition,T=l.keyEntities,y=T[s],v={eventKey:s,expanded:i.indexOf(s)!==-1,selected:o.indexOf(s)!==-1,loaded:n.indexOf(s)!==-1,loading:f.indexOf(s)!==-1,checked:O.indexOf(s)!==-1,halfChecked:S.indexOf(s)!==-1,pos:String(y?y.pos:""),dragOver:x===s&&w===0,dragOverGapTop:x===s&&w===-1,dragOverGapBottom:x===s&&w===1};return v}function d(s){var l=s.data,i=s.expanded,o=s.selected,n=s.checked,f=s.loaded,O=s.loading,S=s.halfChecked,x=s.dragOver,w=s.dragOverGapTop,T=s.dragOverGapBottom,y=s.pos,v=s.active,p=Object(K.a)(Object(K.a)({},l),{},{expanded:i,selected:o,checked:n,loaded:f,loading:O,halfChecked:S,dragOver:x,dragOverGapTop:w,dragOverGapBottom:T,pos:y,active:v});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(N.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),p}},"8EBN":function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){"use strict";Y.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var K=0;K-1&&H.substring(j+1,H.length);if(k)return Y.findModeByExtension(k)},Y.findModeByName=function(H){H=H.toLowerCase();for(var N=0;N=re.length?oe.slice(re.length):oe}).join(` `)}var d=[],s=["
    "],l=new g.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function o(){d.length=0,s=["
      "]}var n={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(le,me,ge,re){if(me>=le.length||le[me].level<=ge)return me;var oe=le[me];re.push("
    • "+oe.text+""),me++;var xe=[];return me=f(le,me,oe.level,xe),xe.length>0&&(re.push("
        "),xe.forEach(function(Be){re.push(Be)}),re.push("
      ")),re.push("
    • "),me=f(le,me,ge,re),me}function O(){return f(d,0,0,s),s.push("
    "),s.join("")}var S={heading:function(me){var ge=i.exec(me);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},fences:function(me){var ge=this.rules.block.fences.exec(me);if(ge){var re=ge[0],oe=u(re,ge[3]||""),xe=ge[2]?ge[2].trim():ge[2];if(["latex","katex","math"].indexOf(xe)>=0){var Be=T(),Ve=oe;oe=Be,y[Be]={type:"block",expression:Ve}}return{type:"code",raw:re,lang:xe,text:oe}}}},x=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,T=function(){return"__special_katext_id_".concat(w++,"__")},y={};function v(){return y}function p(){w=0,y={}}function c(le){return le=le.replace(x,function(me,ge){var re=T();return y[re]={type:"inline",expression:ge},re}),le}var E=l.listitem;l.listitem=function(le){return E(c(le))};var _=l.paragraph;l.paragraph=function(le){return _(c(le))};var b=l.tablecell;l.tablecell=function(le,me){return b(c(le),me)},l.code=function(le,me,ge){var re=(me||"").match(/\S*/)[0];return re?["latex","katex","math"].indexOf(re)>=0?"

    ".concat(le,"

    "):'
    ').concat(ge?le:Object(h.escape)(le,!0),`
    -`):'
    '+(ge?le:Object(h.escape)(le,!0))+"
    "},l.heading=function(le,me,ge){var re=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:re,level:me,text:le}),"'+le+""},g.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),g.a.use({tokenizer:S,renderer:l});var I=g.a,P=F("SJMd"),B=F("ulZh"),z=F.n(B),U=F("m3rI"),C=F("Oy/b"),W=F("p5ED"),V=F("8hTe"),J=F.n(V),ne=/]*>/g;function fe(le){var me=document.createElement("div");return me.innerHTML=le,me.childNodes.length===0?"":me.childNodes[0].nodeValue}var ue=ye.a=function(le){var me=le.value,ge=me===void 0?"":me,re=le.edit,oe=re===void 0?!1:re,xe=le.className,Be=le.showTextOnly,Ve=le.showLines,Ye=le.replaces,$e=le.zoomImg,Ke=le.hasMask,We=le.style,ze=We===void 0?{}:We,at=le.stylesPrev,Je=at===void 0?{}:at,Xe=String(ge),He=Object(j.useRef)(),ot=Object(j.useRef)(),ft=Object(j.useState)(""),dt=Object(R.a)(ft,2),lt=dt[0],_t=dt[1],ht=Object(j.useState)("office"),be=Object(R.a)(ht,2),_e=be[0],Ne=be[1],ke=Object(j.useMemo)(function(){try{var ie=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Q=/\"\/api\/attachments\/|\"\/attachments\/download\//g,q=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Xe=Xe.replace(ie,"("+U.a.API_SERVER+"/api/attachments/").replace(Q,'"'+U.a.API_SERVER+"/api/attachments/").replace(q,'"'+U.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` -`)}catch(Se){}var te=I(Xe),se=v();if(Xe.match(/\[TOC\]/)&&(te=te.replace("

    [TOC]

    ",O()),o()),te=te.replace(/(__special_katext_id_\d+__)/g,function(Se,je){var Ze=se[je],ut=Ze.type,it=Ze.expression;return Object(C.renderToString)(fe(it)||"",{displayMode:ut==="block",throwOnError:!1,output:"html"})}),te=te.replace(/▁/g,"\u2581\u2581\u2581"),p(),Be){var ce=document.createElement("div");return ce.innerHTML=te,ce.innerText}return setTimeout(function(){return pe()},500),te},[Xe]),Ee=Object(j.useRef)();n.WebkitLineClamp=Ve,Ve&&(ze=Object(N.a)(Object(N.a)({},ze),n));function Ie(ie){var Q=ie.target;if(Q.tagName.toUpperCase()==="IMG"){if($e){var q=Q.getAttribute("src");_t(q),Ne("image")}}else if(Q.tagName.toUpperCase()==="A"){var te=Q.getAttribute("href");if(te.indexOf("office")>-1)ie.preventDefault(),_t(te),Ne("office");else if(te.indexOf("application/pdf")>-1)ie.preventDefault(),_t(te),Ne("pdf");else if(te.indexOf("text/html")>-1)ie.preventDefault(),_t(te),Ne("html");else if(te.startsWith("#")){ie.preventDefault();var se=document.getElementById(te.replace("#",""));se&&se.scrollIntoView(!0)}}}var pe=function(){var Q,q=(Q=Ee.current)===null||Q===void 0?void 0:Q.querySelectorAll("video");q==null||q.forEach(function(te){if(te.oncontextmenu=function(){return!1},te.src.indexOf(".m3u8")>-1&&!te.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var se=new z.a;se.loadSource(te.src),se.attachMedia(te)}}})};Object(j.useEffect)(function(){if(Ee.current&&ke&&(ke.match(ne)&&window.PR.prettyPrint()),Ee.current)return Ee.current.addEventListener("click",Ie),function(){Ee.current.removeEventListener("click",Ie),p(),o()}},[ke,Ee.current,Ie]);var ae=function(Q){if(!oe)return;Q.target.nodeName==="IMG"?(He.current.style.display="flex",He.current.style.width=Q.target.clientWidth+"px",He.current.style.height=Q.target.clientHeight+"px",He.current.style.top=Q.target.offsetTop+"px",He.current.style.left=Q.target.offsetLeft+"px",ot.current.src=Q.target.getAttribute("src")):He.current.style.display="none"};return k.a.createElement("div",{style:{position:"relative"}},k.a.createElement("div",{ref:Ee,style:Object(N.a)({},ze),className:"".concat(xe||""," markdown-body ").concat(J.a.mdBody),onMouseOver:ae,dangerouslySetInnerHTML:{__html:ke}}),k.a.createElement("div",{ref:He,className:J.a.button},k.a.createElement(K.a,null,k.a.createElement(H.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),k.a.createElement(H.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),k.a.createElement("img",{ref:ot,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),k.a.createElement(W.a,{close:!0,data:lt,type:lt!=null&<.length?_e:"",style:Object(N.a)({},Je),onClose:function(){return _t("")}}))}},"9VGf":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return L});var Y=F("cDcd"),K=F.n(Y);function L(H,N){var R=Object(Y.useRef)();Object(Y.useEffect)(function(){R.current=H}),Object(Y.useEffect)(function(){function j(){R.current()}if(N!==null){var k=setInterval(j,N);return function(){return clearInterval(k)}}},[N])}},AMnG:function(Le,ye,F){"use strict";var Y=F("miYZ"),K=F("tsqr"),L=F("tJVT"),H=F("cDcd"),N=F.n(H),R=F("nWbc"),j=F.n(R),k=F("Ot1p");ye.a=function(A){var D=A.id,g=A.activeDiscussIndex,h=A.onReplyDiscuss,u=Object(H.useState)(""),d=Object(L.a)(u,2),s=d[0],l=d[1];function i(n){l(n)}function o(){if(!s){K.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}h(D,s),l("")}return N.a.createElement("div",{key:D,className:"discuss-item-editor",style:{display:g===D?"block":"none",width:"100%"}},N.a.createElement(k.a,{miniToolbar:!0,startInit:g===D,defaultValue:s,id:D,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),N.a.createElement("a",{onClick:o,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return R});var Y=F("MNnm"),K="rc-util-key";function L(j){if(j.attachTo)return j.attachTo;var k=document.querySelector("head");return k||document.body}function H(j){var k,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Y.a)())return null;var D=document.createElement("style");if((k=A.csp)===null||k===void 0?void 0:k.nonce){var g;D.nonce=(g=A.csp)===null||g===void 0?void 0:g.nonce}D.innerHTML=j;var h=L(A),u=h.firstChild;return A.prepend&&h.prepend?h.prepend(D):A.prepend&&u?h.insertBefore(D,u):h.appendChild(D),D}var N=new Map;function R(j,k){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=L(A);if(!N.has(D)){var g=H("",A),h=g.parentNode;N.set(D,h),h.removeChild(g)}var u=Array.from(N.get(D).children).find(function(o){return o.tagName==="STYLE"&&o[K]===k});if(u){var d,s;if(((d=A.csp)===null||d===void 0?void 0:d.nonce)&&u.nonce!==((s=A.csp)===null||s===void 0?void 0:s.nonce)){var l;u.nonce=(l=A.csp)===null||l===void 0?void 0:l.nonce}return u.innerHTML!==j&&(u.innerHTML=j),u}var i=H(j,A);return i[K]=k,i}},Bd2K:function(Le,ye,F){(function(Y){Y(F("VrN/"),F("osHv"))})(function(Y){Y.defineOption("autoCloseTags",!1,function(A,D,g){if(g!=Y.Init&&g&&A.removeKeyMap("autoCloseTags"),!D)return;var h={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(h["'/'"]=function(u){return R(u)}),(typeof D!="object"||D.whenOpening!==!1)&&(h["'>'"]=function(u){return H(u)}),A.addKeyMap(h)});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],L=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function H(A){if(A.getOption("disableInput"))return Y.Pass;for(var D=A.listSelections(),g=[],h=A.getOption("autoCloseTags"),u=0;ud.ch&&(n=n.slice(0,n.length-s.end+d.ch));var x=n.toLowerCase();if(!n||s.type=="string"&&(s.end!=d.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&o.close||s.string.indexOf("/")==d.ch-s.start-1||O&&j(O,x)>-1||k(A,l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(i)||[],n,d,!0))return Y.Pass;var w=typeof h=="object"&&h.emptyTags;if(w&&j(w,n)>-1){g[u]={text:"/>",newPos:Y.Pos(d.line,d.ch+2)};continue}var T=S&&j(S,x)>-1;g[u]={indent:T,text:">"+(T?` +`):'
    '+(ge?le:Object(h.escape)(le,!0))+"
    "},l.heading=function(le,me,ge){var re=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:re,level:me,text:le}),"'+le+""},g.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),g.a.use({tokenizer:S,renderer:l});var I=g.a,P=F("SJMd"),B=F("ulZh"),z=F.n(B),U=F("m3rI"),C=F("Oy/b"),W=F("p5ED"),V=F("8hTe"),J=F.n(V),ne=/]*>/g;function fe(le){var me=document.createElement("div");return me.innerHTML=le,me.childNodes.length===0?"":me.childNodes[0].nodeValue}var ue=ye.a=function(le){var me=le.value,ge=me===void 0?"":me,re=le.edit,oe=re===void 0?!1:re,xe=le.className,Be=le.showTextOnly,Ve=le.showLines,Ye=le.replaces,$e=le.zoomImg,Ke=le.hasMask,We=le.style,ze=We===void 0?{}:We,at=le.stylesPrev,Je=at===void 0?{}:at,Xe=String(ge),He=Object(j.useRef)(),ot=Object(j.useRef)(),ft=Object(j.useState)(""),dt=Object(R.a)(ft,2),lt=dt[0],yt=dt[1],pt=Object(j.useState)("office"),be=Object(R.a)(pt,2),_e=be[0],Ne=be[1],ke=Object(j.useMemo)(function(){try{var ie=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Q=/\"\/api\/attachments\/|\"\/attachments\/download\//g,q=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Xe=Xe.replace(ie,"("+U.a.API_SERVER+"/api/attachments/").replace(Q,'"'+U.a.API_SERVER+"/api/attachments/").replace(q,'"'+U.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` +`)}catch(Se){}var te=I(Xe),se=v();if(Xe.match(/\[TOC\]/)&&(te=te.replace("

    [TOC]

    ",O()),o()),te=te.replace(/(__special_katext_id_\d+__)/g,function(Se,je){var Ze=se[je],ut=Ze.type,it=Ze.expression;return Object(C.renderToString)(fe(it)||"",{displayMode:ut==="block",throwOnError:!1,output:"html"})}),te=te.replace(/▁/g,"\u2581\u2581\u2581"),p(),Be){var ce=document.createElement("div");return ce.innerHTML=te,ce.innerText}return setTimeout(function(){return pe()},500),te},[Xe]),Ee=Object(j.useRef)();n.WebkitLineClamp=Ve,Ve&&(ze=Object(N.a)(Object(N.a)({},ze),n));function Ie(ie){var Q=ie.target;if(Q.tagName.toUpperCase()==="IMG"){if($e){var q=Q.getAttribute("src");yt(q),Ne("image")}}else if(Q.tagName.toUpperCase()==="A"){var te=Q.getAttribute("href");if(te.indexOf("office")>-1)ie.preventDefault(),yt(te),Ne("office");else if(te.indexOf("application/pdf")>-1)ie.preventDefault(),yt(te),Ne("pdf");else if(te.indexOf("text/html")>-1)ie.preventDefault(),yt(te),Ne("html");else if(te.startsWith("#")){ie.preventDefault();var se=document.getElementById(te.replace("#",""));se&&se.scrollIntoView(!0)}}}var pe=function(){var Q,q=(Q=Ee.current)===null||Q===void 0?void 0:Q.querySelectorAll("video");q==null||q.forEach(function(te){if(te.oncontextmenu=function(){return!1},te.src.indexOf(".m3u8")>-1&&!te.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var se=new z.a;se.loadSource(te.src),se.attachMedia(te)}}})};Object(j.useEffect)(function(){if(Ee.current&&ke&&(ke.match(ne)&&window.PR.prettyPrint()),Ee.current)return Ee.current.addEventListener("click",Ie),function(){Ee.current.removeEventListener("click",Ie),p(),o()}},[ke,Ee.current,Ie]);var ae=function(Q){if(!oe)return;Q.target.nodeName==="IMG"?(He.current.style.display="flex",He.current.style.width=Q.target.clientWidth+"px",He.current.style.height=Q.target.clientHeight+"px",He.current.style.top=Q.target.offsetTop+"px",He.current.style.left=Q.target.offsetLeft+"px",ot.current.src=Q.target.getAttribute("src")):He.current.style.display="none"};return k.a.createElement("div",{style:{position:"relative"}},k.a.createElement("div",{ref:Ee,style:Object(N.a)({},ze),className:"".concat(xe||""," markdown-body ").concat(J.a.mdBody),onMouseOver:ae,dangerouslySetInnerHTML:{__html:ke}}),k.a.createElement("div",{ref:He,className:J.a.button},k.a.createElement(K.a,null,k.a.createElement(H.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),k.a.createElement(H.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),k.a.createElement("img",{ref:ot,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),k.a.createElement(W.a,{close:!0,data:lt,type:lt!=null&<.length?_e:"",style:Object(N.a)({},Je),onClose:function(){return yt("")}}))}},"9VGf":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return L});var Y=F("cDcd"),K=F.n(Y);function L(H,N){var R=Object(Y.useRef)();Object(Y.useEffect)(function(){R.current=H}),Object(Y.useEffect)(function(){function j(){R.current()}if(N!==null){var k=setInterval(j,N);return function(){return clearInterval(k)}}},[N])}},AMnG:function(Le,ye,F){"use strict";var Y=F("miYZ"),K=F("tsqr"),L=F("tJVT"),H=F("cDcd"),N=F.n(H),R=F("nWbc"),j=F.n(R),k=F("Ot1p");ye.a=function(A){var D=A.id,g=A.activeDiscussIndex,h=A.onReplyDiscuss,u=Object(H.useState)(""),d=Object(L.a)(u,2),s=d[0],l=d[1];function i(n){l(n)}function o(){if(!s){K.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}h(D,s),l("")}return N.a.createElement("div",{key:D,className:"discuss-item-editor",style:{display:g===D?"block":"none",width:"100%"}},N.a.createElement(k.a,{miniToolbar:!0,startInit:g===D,defaultValue:s,id:D,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),N.a.createElement("a",{onClick:o,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return R});var Y=F("MNnm"),K="rc-util-key";function L(j){if(j.attachTo)return j.attachTo;var k=document.querySelector("head");return k||document.body}function H(j){var k,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Y.a)())return null;var D=document.createElement("style");if((k=A.csp)===null||k===void 0?void 0:k.nonce){var g;D.nonce=(g=A.csp)===null||g===void 0?void 0:g.nonce}D.innerHTML=j;var h=L(A),u=h.firstChild;return A.prepend&&h.prepend?h.prepend(D):A.prepend&&u?h.insertBefore(D,u):h.appendChild(D),D}var N=new Map;function R(j,k){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=L(A);if(!N.has(D)){var g=H("",A),h=g.parentNode;N.set(D,h),h.removeChild(g)}var u=Array.from(N.get(D).children).find(function(o){return o.tagName==="STYLE"&&o[K]===k});if(u){var d,s;if(((d=A.csp)===null||d===void 0?void 0:d.nonce)&&u.nonce!==((s=A.csp)===null||s===void 0?void 0:s.nonce)){var l;u.nonce=(l=A.csp)===null||l===void 0?void 0:l.nonce}return u.innerHTML!==j&&(u.innerHTML=j),u}var i=H(j,A);return i[K]=k,i}},Bd2K:function(Le,ye,F){(function(Y){Y(F("VrN/"),F("osHv"))})(function(Y){Y.defineOption("autoCloseTags",!1,function(A,D,g){if(g!=Y.Init&&g&&A.removeKeyMap("autoCloseTags"),!D)return;var h={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(h["'/'"]=function(u){return R(u)}),(typeof D!="object"||D.whenOpening!==!1)&&(h["'>'"]=function(u){return H(u)}),A.addKeyMap(h)});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],L=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function H(A){if(A.getOption("disableInput"))return Y.Pass;for(var D=A.listSelections(),g=[],h=A.getOption("autoCloseTags"),u=0;ud.ch&&(n=n.slice(0,n.length-s.end+d.ch));var x=n.toLowerCase();if(!n||s.type=="string"&&(s.end!=d.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&o.close||s.string.indexOf("/")==d.ch-s.start-1||O&&j(O,x)>-1||k(A,l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(i)||[],n,d,!0))return Y.Pass;var w=typeof h=="object"&&h.emptyTags;if(w&&j(w,n)>-1){g[u]={text:"/>",newPos:Y.Pos(d.line,d.ch+2)};continue}var T=S&&j(S,x)>-1;g[u]={indent:T,text:">"+(T?` `:"")+"",newPos:T?Y.Pos(d.line+1,0):Y.Pos(d.line,d.ch+1)}}for(var y=typeof h=="object"&&h.dontIndentOnAutoClose,u=D.length-1;u>=0;u--){var v=g[u];A.replaceRange(v.text,D[u].head,D[u].anchor,"+insert");var p=A.listSelections().slice(0);p[u]={head:v.newPos,anchor:v.newPos},A.setSelections(p),!y&&v.indent&&(A.indentLine(v.newPos.line,null,!0),A.indentLine(v.newPos.line+1,null,!0))}}function N(A,D){for(var g=A.listSelections(),h=[],u=D?"/":""&&(O+=">"),h[l]=O}if(A.replaceSelections(h),g=A.listSelections(),!s)for(var l=0;l=0&&D[i]==g;i--)++l;h=s.to;for(var i=1;i0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],g=0;g=0;D--){var g=L().key(D);A(H(g),g)}}function j(A){return L().removeItem(A)}function k(){return L().clear()}},DlQD:function(Le,ye,F){(function(Y,K){Le.exports=K()})(this,function(){"use strict";function Y(pe,ae){for(var ie=0;iepe.length)&&(ae=pe.length);for(var ie=0,Q=new Array(ae);ie=pe.length?{done:!0}:{done:!1,value:pe[Q++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ie=pe[Symbol.iterator](),ie.next.bind(ie)}function R(pe,ae){return ae={exports:{}},pe(ae,ae.exports),ae.exports}var j=R(function(pe){function ae(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ie(Q){pe.exports.defaults=Q}pe.exports={defaults:ae(),getDefaults:ae,changeDefaults:ie}}),k=j.defaults,A=j.getDefaults,D=j.changeDefaults,g=/[&<>"']/,h=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(ae){return s[ae]};function i(pe,ae){if(ae){if(g.test(pe))return pe.replace(h,l)}else if(u.test(pe))return pe.replace(d,l);return pe}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(pe){return pe.replace(o,function(ae,ie){return ie=ie.toLowerCase(),ie==="colon"?":":ie.charAt(0)==="#"?ie.charAt(1)==="x"?String.fromCharCode(parseInt(ie.substring(2),16)):String.fromCharCode(+ie.substring(1)):""})}var f=/(^|[^\[])\^/g;function O(pe,ae){pe=pe.source||pe,ae=ae||"";var ie={replace:function(q,te){return te=te.source||te,te=te.replace(f,"$1"),pe=pe.replace(q,te),ie},getRegex:function(){return new RegExp(pe,ae)}};return ie}var S=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(pe,ae,ie){if(pe){var Q;try{Q=decodeURIComponent(n(ie)).replace(S,"").toLowerCase()}catch(q){return null}if(Q.indexOf("javascript:")===0||Q.indexOf("vbscript:")===0||Q.indexOf("data:")===0)return null}ae&&!x.test(ie)&&(ie=c(ae,ie));try{ie=encodeURI(ie).replace(/%25/g,"%")}catch(q){return null}return ie}var T={},y=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(pe,ae){T[" "+pe]||(y.test(pe)?T[" "+pe]=pe+"/":T[" "+pe]=I(pe,"/",!0)),pe=T[" "+pe];var ie=pe.indexOf(":")===-1;return ae.substring(0,2)==="//"?ie?ae:pe.replace(v,"$1")+ae:ae.charAt(0)==="/"?ie?ae:pe.replace(p,"$1")+ae:pe+ae}var E={exec:function(){}};function _(pe){for(var ae=1,ie,Q;ae=0&&ce[je]==="\\";)Se=!Se;return Se?"|":" |"}),Q=ie.split(/ \|/),q=0;if(Q.length>ae)Q.splice(ae);else for(;Q.length `},ae.tablecell=function(Q,q){var te=q.header?"th":"td",se=q.align?"<"+te+' align="'+q.align+'">':"<"+te+">";return se+Q+" `},ae.strong=function(Q){return""+Q+""},ae.em=function(Q){return""+Q+""},ae.codespan=function(Q){return""+Q+""},ae.br=function(){return this.options.xhtml?"
    ":"
    "},ae.del=function(Q){return""+Q+""},ae.link=function(Q,q,te){if(Q=at(this.options.sanitize,this.options.baseUrl,Q),Q===null)return te;var se='",se},ae.image=function(Q,q,te){if(Q=at(this.options.sanitize,this.options.baseUrl,Q),Q===null)return te;var se=''+te+'":">",se},ae.text=function(Q){return Q},pe}(),He=function(){function pe(){}var ae=pe.prototype;return ae.strong=function(Q){return Q},ae.em=function(Q){return Q},ae.codespan=function(Q){return Q},ae.del=function(Q){return Q},ae.html=function(Q){return Q},ae.text=function(Q){return Q},ae.link=function(Q,q,te){return""+te},ae.image=function(Q,q,te){return""+te},ae.br=function(){return""},pe}(),ot=function(){function pe(){this.seen={}}var ae=pe.prototype;return ae.slug=function(Q){var q=Q.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(q)){var te=q;do this.seen[te]++,q=te+"-"+this.seen[te];while(this.seen.hasOwnProperty(q))}return this.seen[q]=0,q},pe}(),ft=j.defaults,dt=z.unescape,lt=function(){function pe(ie){this.options=ie||ft,this.options.renderer=this.options.renderer||new Xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He,this.slugger=new ot}pe.parse=function(Q,q){var te=new pe(q);return te.parse(Q)};var ae=pe.prototype;return ae.parse=function(Q,q){q===void 0&&(q=!0);var te="",se,ce,Se,je,Ze,ut,it,rt,Me,Ue,we,ee,he,Fe,Re,et,tt,Te,Ae=Q.length;for(se=0;se0&&Re.tokens[0].type==="text"?(Re.tokens[0].text=Te+" "+Re.tokens[0].text,Re.tokens[0].tokens&&Re.tokens[0].tokens.length>0&&Re.tokens[0].tokens[0].type==="text"&&(Re.tokens[0].tokens[0].text=Te+" "+Re.tokens[0].tokens[0].text)):Re.tokens.unshift({type:"text",text:Te}):Fe+=Te),Fe+=this.parse(Re.tokens,he),Me+=this.renderer.listitem(Fe,tt,et);te+=this.renderer.list(Me,we,ee);continue}case"html":{te+=this.renderer.html(Ue.text);continue}case"paragraph":{te+=this.renderer.paragraph(this.parseInline(Ue.tokens));continue}case"text":{for(Me=Ue.tokens?this.parseInline(Ue.tokens):Ue.text;se+1An error occurred:

    "+be(Se.message+"",!0)+"
    ";throw Se}}Ee.options=Ee.setOptions=function(pe){return _t(Ee.defaults,pe),Ne(Ee.defaults),Ee},Ee.getDefaults=_e,Ee.defaults=ke,Ee.use=function(pe){var ae=_t({},pe);if(pe.renderer&&function(){var Q=Ee.defaults.renderer||new Xe,q=function(ce){var Se=Q[ce];Q[ce]=function(){for(var je=arguments.length,Ze=new Array(je),ut=0;ut=0;u--){if(!L(h[u]))continue;var d=h[u].split("="),s=unescape(d[0]),l=unescape(d[1]);g(l,s)}}function j(g,h){if(!g)return;H.cookie=escape(g)+"="+escape(h)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function k(g){if(!g||!D(g))return;H.cookie=escape(g)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function A(){R(function(g,h){k(h)})}function D(g){return new RegExp("(?:^|;\\s*)"+escape(g).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(H.cookie)}},EHPI:function(Le,ye,F){"use strict";var Y=F("bbsP"),K=F("/wGt"),L=F("tJVT"),H=F("k1fw"),N=F("cDcd"),R=F.n(N),j=F("ZW9T"),k=F("ZD9Y"),A=F("M8RZ"),D=F("bCnd"),g=F("fcyK"),h=F.n(g),u={theme:Object(D.a)("cmCodeMode","vs-dark"),fontSize:Object(D.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(D.a)("cmTabToSpace",!0)},d;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(d||(d={}));function s(i,o){switch(o.type){case d.set_show_editor_setting:return Object(H.a)(Object(H.a)({},i),{},{showEditorSetting:o.payload});case d.set_theme:return Object(H.a)(Object(H.a)({},i),{},{theme:o.payload});case d.set_font_size:return Object(H.a)(Object(H.a)({},i),{},{fontSize:o.payload});case d.on_tab_to_space:return Object(H.a)(Object(H.a)({},i),{},{tabToSpace:o.payload});default:throw new Error}}ye.a=function(i){var o=i.isLoading,n=i.value,f=i.onChange,O=i.language,S=i.ActionBarRender,x=S===void 0?function(z){return R.a.createElement(l,{onShowCodeSetting:z})}:S,w=Object(N.useReducer)(s,u),T=Object(L.a)(w,2),y=T[0],v=T[1],p=y.theme,c=y.fontSize,E=y.showEditorSetting,_=y.tabToSpace,b={onFontSizeChange:function(U){v({type:d.set_font_size,payload:U}),Object(D.b)("cmFontSize",U)},tabToSpace:_,cmFontSize:c,className:"oj",cmCodeMode:p,onTabToSpace:function(U){v({type:d.on_tab_to_space,payload:U}),Object(D.b)("cmTabToSpace",U)},onCodeModeChange:function(U){v({type:d.set_theme,payload:U}),Object(D.b)("cmCodeMode",U)}};function I(){v({type:d.set_show_editor_setting,payload:!1})}function P(){v({type:d.set_show_editor_setting,payload:!0})}var B={value:n,language:O,onChange:f,theme:p,height:"calc(100% - 56px)",options:{fontSize:c,insertSpaces:_}};return R.a.createElement(N.Fragment,null,R.a.createElement("div",{className:"code-panel-container"},x(P),!o&&R.a.createElement(j.b,B)),R.a.createElement(A.a,null,R.a.createElement(K.a,{className:"oj",title:null,placement:"right",closable:!1,visible:E,onClose:I},R.a.createElement(k.a,b))))};function l(i){var o=i.onShowCodeSetting;return R.a.createElement("div",{className:"action-bar"},R.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),R.a.createElement("a",{onClick:o},R.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){var K={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},L=Y.Pos;Y.defineOption("autoCloseBrackets",!1,function(s,l,i){i&&i!=Y.Init&&(s.removeKeyMap(N),s.state.closeBrackets=null),l&&(R(H(l,"pairs")),s.state.closeBrackets=l,s.addKeyMap(N))});function H(s,l){return l=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[l]!=null?s[l]:K[l]}var N={Backspace:A,Enter:D};function R(s){for(var l=0;l=0;n--){var O=o[n].head;s.replaceRange("",L(O.line,O.ch-1),L(O.line,O.ch+1),"+delete")}}function D(s){var l=k(s),i=l&&H(l,"explode");if(!i||s.getOption("disableInput"))return Y.Pass;for(var o=s.listSelections(),n=0;n0;return{anchor:new L(s.anchor.line,s.anchor.ch+(l?-1:1)),head:new L(s.head.line,s.head.ch+(l?1:-1))}}function h(s,l){var i=k(s);if(!i||s.getOption("disableInput"))return Y.Pass;var o=H(i,"pairs"),n=o.indexOf(l);if(n==-1)return Y.Pass;for(var f=H(i,"closeBefore"),O=H(i,"triples"),S=o.charAt(n+1)==l,x=s.listSelections(),w=n%2==0,T,y=0;y=0&&s.getRange(p,L(p.line,p.ch+3))==l+l+l?c="skipThree":c="skip";else if(S&&p.ch>1&&O.indexOf(l)>=0&&s.getRange(L(p.line,p.ch-2),p)==l+l){if(p.ch>2&&/\bstring/.test(s.getTokenTypeAt(L(p.line,p.ch-2))))return Y.Pass;c="addFour"}else if(S){var _=p.ch==0?" ":s.getRange(L(p.line,p.ch-1),p);if(!Y.isWordChar(E)&&_!=l&&!Y.isWordChar(_))c="both";else return Y.Pass}else if(w&&(E.length===0||/\s/.test(E)||f.indexOf(E)>-1))c="both";else return Y.Pass;if(!T)T=c;else if(T!=c)return Y.Pass}var b=n%2?o.charAt(n-1):l,I=n%2?l:o.charAt(n+1);s.operation(function(){if(T=="skip")s.execCommand("goCharRight");else if(T=="skipThree")for(var P=0;P<3;P++)s.execCommand("goCharRight");else if(T=="surround"){for(var B=s.getSelections(),P=0;P>>6)+A(128|I&63):A(224|I>>>12&15)+A(128|I>>>6&63)+A(128|I&63)}else{var I=65536+(b.charCodeAt(0)-55296)*1024+(b.charCodeAt(1)-56320);return A(240|I>>>18&7)+A(128|I>>>12&63)+A(128|I>>>6&63)+A(128|I&63)}},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(b){return b.replace(g,D)},u=function(b){var I=[0,2,1][b.length%3],P=b.charCodeAt(0)<<16|(b.length>1?b.charCodeAt(1):0)<<8|(b.length>2?b.charCodeAt(2):0),B=[j.charAt(P>>>18),j.charAt(P>>>12&63),I>=2?"=":j.charAt(P>>>6&63),I>=1?"=":j.charAt(P&63)];return B.join("")},d=H.btoa&&typeof H.btoa=="function"?function(b){return H.btoa(b)}:function(b){if(b.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return b.replace(/[\s\S]{1,3}/g,u)},s=function(b){return d(h(String(b)))},l=function(b){return b.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(b,I){return I?l(s(b)):s(b)},o=function(b){return i(b,!0)},n;H.Uint8Array&&(n=function(b,I){for(var P="",B=0,z=b.length;B>>18)+j.charAt(V>>>12&63)+(typeof C!="undefined"?j.charAt(V>>>6&63):"=")+(typeof W!="undefined"?j.charAt(V&63):"=")}return I?l(P):P});var f=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,O=function(b){switch(b.length){case 4:var I=(7&b.charCodeAt(0))<<18|(63&b.charCodeAt(1))<<12|(63&b.charCodeAt(2))<<6|63&b.charCodeAt(3),P=I-65536;return A((P>>>10)+55296)+A((P&1023)+56320);case 3:return A((15&b.charCodeAt(0))<<12|(63&b.charCodeAt(1))<<6|63&b.charCodeAt(2));default:return A((31&b.charCodeAt(0))<<6|63&b.charCodeAt(1))}},S=function(b){return b.replace(f,O)},x=function(b){var I=b.length,P=I%4,B=(I>0?k[b.charAt(0)]<<18:0)|(I>1?k[b.charAt(1)]<<12:0)|(I>2?k[b.charAt(2)]<<6:0)|(I>3?k[b.charAt(3)]:0),z=[A(B>>>16),A(B>>>8&255),A(B&255)];return z.length-=[0,0,2,1][P],z.join("")},w=H.atob&&typeof H.atob=="function"?function(b){return H.atob(b)}:function(b){return b.replace(/\S{1,4}/g,x)},T=function(b){return w(String(b).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(b){return S(w(b))},v=function(b){return String(b).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},p=function(b){return y(v(b))},c;H.Uint8Array&&(c=function(b){return Uint8Array.from(T(v(b)),function(I){return I.charCodeAt(0)})});var E=function(){var b=H.Base64;return H.Base64=N,b};if(H.Base64={VERSION:R,atob:T,btoa:d,fromBase64:p,toBase64:i,utob:h,encode:i,encodeURI:o,btou:S,decode:p,noConflict:E,fromUint8Array:n,toUint8Array:c},typeof Object.defineProperty=="function"){var _=function(b){return{value:b,enumerable:!1,writable:!0,configurable:!0}};H.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_(function(){return p(this)})),Object.defineProperty(String.prototype,"toBase64",_(function(b){return i(this,b)})),Object.defineProperty(String.prototype,"toBase64URI",_(function(){return i(this,!0)}))}}return H.Meteor&&(Base64=H.Base64),Le.exports?Le.exports.Base64=H.Base64:!(K=[],L=function(){return H.Base64}.apply(ye,K),L!==void 0&&(Le.exports=L)),{Base64:H.Base64}})}).call(this,F("IyRk"))},JB8y:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return Y});var Y;(function(K){K[K.NOMATCH=-1]="NOMATCH",K[K.OK=0]="OK",K[K.TIMEOUT=2]="TIMEOUT",K[K.PODFAILURE=3]="PODFAILURE",K[K.COMPILEFAILURE=4]="COMPILEFAILURE",K[K.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(Y||(Y={}))},JPnl:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return v}),F.d(ye,"c",function(){return E});var Y=F("+L6B"),K=F("2/Rp"),L=F("tJVT"),H=F("9og8"),N=F("k1fw"),R=F("jrin"),j=F("5NDa"),k=F("5rEg"),A=F("WmNS"),D=F.n(A),g=F("cDcd"),h=F.n(g),u=F("8Skl"),d=F("y3Kf"),s=F("JB8y"),l=F("J66h"),i=F.n(l),o=F("a4uL"),n=F.n(o),f=F("IxHN"),O=F("9Bee"),S=F("1vsH"),x=F("ErOA"),w,T=k.a.TextArea,y={visible:!1,tabIndex:"0"},v=(w={},Object(R.a)(w,s.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(R.a)(w,s.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(R.a)(w,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(R.a)(w,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(R.a)(w,4,"\u7F16\u8BD1\u5931\u8D25"),Object(R.a)(w,5,"\u6267\u884C\u5931\u8D25"),w),p;(function(b){b[b.SET_VISIBLE=0]="SET_VISIBLE",b[b.SET_TABINDEX=1]="SET_TABINDEX"})(p||(p={}));function c(b,I){switch(I.type){case p.SET_VISIBLE:return Object(N.a)(Object(N.a)({},b),{},{visible:I.payload});case p.SET_TABINDEX:return Object(N.a)(Object(N.a)({},b),{},{tabIndex:I.payload});default:throw new Error}}function E(b){var I=b.status,P=b.error_msg,B=b.output,z=b.input,U=b.expected_output,C=b.is_file,W=b.input_file_url,V=b.output_file_url,J=b.expected_output_file_url,ne=b.setMonacoValue,fe=b.setData,ue=null,le={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(I){case s.a.NOMATCH:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,fetch(W,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return ge=oe.sent,oe.t0=ne,oe.next=6,ge.text();case 6:oe.t1=oe.sent,(0,oe.t0)(oe.t1),setTimeout(function(){fe(W)},200);case 9:case"end":return oe.stop()}},me)}))},z)),h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!C&&h.a.createElement(O.a,{value:B&&l.Base64.decode(B)||"",style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,Object(x.a)(V,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:ge=oe.sent,ne(ge),setTimeout(function(){fe(V)},200);case 5:case"end":return oe.stop()}},me)}))},B)),h.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!C&&h.a.createElement(O.a,{value:U&&l.Base64.decode(U)||"",style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,fetch(J,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return ge=oe.sent,oe.t0=ne,oe.next=6,ge.text();case 6:oe.t1=oe.sent,(0,oe.t0)(oe.t1),setTimeout(function(){fe(J)},200);case 9:case"end":return oe.stop()}},me)}))},U)));break;case s.a.EXECUTEFAILURE:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{onClick:function(){return Object(S.y)(W,z)}},z)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.COMPILEFAILURE:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{onClick:function(){return Object(S.y)(W,z)}},z)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.PODFAILURE:ue=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:ue=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",ue," ")}function _(b){var I=b.status,P=b.error_msg,B=b.execute_time,z=b.output,U=b.input,C=b.expected_output,W=b.is_file,V=b.input_file_url,J=b.output_file_url,ne=b.expected_output_file_url,fe=null;switch(I){case s.a.OK:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",B),h.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),h.a.createElement("pre",null,l.Base64.decode(z)));break;case s.a.NOMATCH:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u8F93\u51FA\uFF1A",z&&l.Base64.decode(z)),h.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",C&&l.Base64.decode(C)));break;case s.a.EXECUTEFAILURE:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.COMPILEFAILURE:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.PODFAILURE:fe=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:fe=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",fe," ")}ye.b=function(b){var I=b.input,P=b.debuging,B=b.submitting,z=b.executingMessage,U=b.debugResult,C=b.onChangeInput,W=b.onDebugCode,V=b.onSubmitCode,J=b.hack,ne=b.user,fe=Object(g.useReducer)(c,y),ue=Object(L.a)(fe,2),le=ue[0],me=ue[1],ge=le.visible,re=le.tabIndex;function oe($e){var Ke=$e.target.id;me({type:p.SET_TABINDEX,payload:Ke})}function xe(){me({type:p.SET_VISIBLE,payload:!ge})}var Be=Object(g.useMemo)(function(){if(U){var $e=U.status;return h.a.createElement(h.a.Fragment,null,_(U))}return null},[U]);function Ve(){me({type:p.SET_VISIBLE,payload:!0}),me({type:p.SET_TABINDEX,payload:"1"}),W()}var Ye=function(){var $e=Object(H.a)(D.a.mark(function Ke(We){var ze;return D.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,Object(x.a)("/api/problems/".concat(We,"/start.json"),{method:"get",params:{hack_user_id:ne==null?void 0:ne.user_id}});case 2:ze=Je.sent,ze&&(window.location.href="/myproblems/".concat(ze==null?void 0:ze.identifier,"?type=1"));case 4:case"end":return Je.stop()}},Ke)}));return function(We){return $e.apply(this,arguments)}}();return h.a.createElement("div",{className:"test-case-panel"},h.a.createElement("div",{className:"test-case-panel-body ".concat(ge?"active":"")},h.a.createElement("ul",{className:"s-navs"},h.a.createElement("li",null,h.a.createElement("a",{className:re==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),h.a.createElement("li",null,h.a.createElement("a",{className:re==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="0"?"":"hide")},h.a.createElement(T,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:I,onChange:C})),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="1"?"":"hide")},P?h.a.createElement(f.a,{message:z}):U?h.a.createElement("section",{style:{height:200}}," ",Be," "):h.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),h.a.createElement("a",{className:"btn-collapse ".concat(ge?"up":""),onClick:xe},ge?h.a.createElement(u.a,null):h.a.createElement(d.a,null)),h.a.createElement("footer",{className:"footer"},h.a.createElement("span",null,"\u63A7\u5236\u53F0"),h.a.createElement("div",{className:"flex-container"},(J==null?void 0:J.is_program)&&(J==null?void 0:J.above_question)&&h.a.createElement(K.a,{onClick:function(){return Ye(J==null?void 0:J.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),(J==null?void 0:J.is_program)&&(J==null?void 0:J.under_question)&&h.a.createElement(K.a,{onClick:function(){return Ye(J==null?void 0:J.under_question)},id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),h.a.createElement(K.a,{className:"btn-green",type:"ghost",loading:P,onClick:Ve},"\u8C03\u8BD5\u4EE3\u7801"),h.a.createElement(K.a,{type:"primary",loading:B,disabled:B,onClick:function(){me({type:p.SET_VISIBLE,payload:!1}),V()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},LdHM:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return f}),F.d(ye,"a",function(){return S});var Y=F("1OyB"),K=F("vuIU"),L=F("Ji7U"),H=F("LK+K"),N=F("cDcd"),R=F("rePB"),j=F("Ff2n"),k=F("ODXe"),A=F("4IlW"),D=F("bX4T"),g=F("YrtM"),h=F("TSYQ"),u=F.n(h),d=F("+nKL"),s=F("8OUc"),l=function(W,V){var J=W.prefixCls,ne=W.id,fe=W.flattenOptions,ue=W.childrenAsData,le=W.values,me=W.searchValue,ge=W.multiple,re=W.defaultActiveFirstOption,oe=W.height,xe=W.itemHeight,Be=W.notFoundContent,Ve=W.open,Ye=W.menuItemSelectedIcon,$e=W.virtual,Ke=W.onSelect,We=W.onToggleOpen,ze=W.onActiveValue,at=W.onScroll,Je=W.onMouseEnter,Xe="".concat(J,"-item"),He=Object(g.a)(function(){return fe},[Ve,fe],function(Ie,pe){return pe[0]&&Ie[1]!==pe[1]}),ot=N.useRef(null),ft=function(pe){pe.preventDefault()},dt=function(pe){ot.current&&ot.current.scrollTo({index:pe})},lt=function(pe){for(var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ie=He.length,Q=0;Q1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(C).map(function(V,J){if(!N.isValidElement(V)||!V.type)return null;var ne=V.type.isSelectOptGroup,fe=V.key,ue=V.props,le=ue.children,me=Object(j.a)(ue,["children"]);return W||!ne?T(V):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(fe===null?J:fe,"__"),label:fe},me),{},{options:y(le)})}).filter(function(V){return V})}var v=F("2Qr1"),p=F("qNPg"),c=F("U8pU"),E=F("Kwbf"),_=F("WKfj");function b(C){var W=C.mode,V=C.options,J=C.children,ne=C.backfill,fe=C.allowClear,ue=C.placeholder,le=C.getInputElement,me=C.showSearch,ge=C.onSearch,re=C.defaultOpen,oe=C.autoFocus,xe=C.labelInValue,Be=C.value,Ve=C.inputValue,Ye=C.optionLabelProp,$e=W==="multiple"||W==="tags",Ke=me!==void 0?me:$e||W==="combobox",We=V||y(J);if(Object(E.a)(W!=="tags"||We.every(function(Xe){return!Xe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var ze=We.some(function(Xe){return Xe.options?Xe.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in Xe?Xe.value:Xe.key)=="number"});Object(E.a)(!ze,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(W!=="combobox"||!Ye,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(W==="combobox"||!ne,"`backfill` only works with `combobox` mode."),Object(E.a)(W==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(E.b)(W!=="combobox"||!le||!fe||!ue,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!Ke&&W!=="combobox"&&W!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!re||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Be!=null){var at=Object(_.d)(Be);Object(E.a)(!xe||at.every(function(Xe){return Object(c.a)(Xe)==="object"&&("key"in Xe||"value"in Xe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!$e||Array.isArray(Be),"`value` should be array when `mode` is `multiple` or `tags`")}if(J){var Je=null;Object(w.a)(J).some(function(Xe){if(!N.isValidElement(Xe)||!Xe.type)return!1;var He=Xe.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var ot=Object(w.a)(Xe.props.children).every(function(ft){return!N.isValidElement(ft)||!Xe.type||ft.type.isSelectOption?!0:(Je=ft.type,!1)});return!ot}return Je=He,!0}),Je&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Je.displayName||Je.name||Je,"`.")),Object(E.a)(Ve===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=b,P=Object(p.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:y,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:I,fillOptionsWithMissingValue:v.a}),B=function(C){Object(L.a)(V,C);var W=Object(H.a)(V);function V(){var J;return Object(Y.a)(this,V),J=W.apply(this,arguments),J.selectRef=N.createRef(),J.focus=function(){J.selectRef.current.focus()},J.blur=function(){J.selectRef.current.blur()},J}return Object(K.a)(V,[{key:"render",value:function(){return N.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),V}(N.Component);B.Option=f,B.OptGroup=S;var z=B,U=ye.c=z},M8RZ:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return A});var Y=F("fWQN"),K=F("mtLc"),L=F("yKVA"),H=F("879j"),N=F("cDcd"),R=F.n(N),j=F("faye"),k=F.n(j),A=function(D){Object(L.a)(h,D);var g=Object(H.a)(h);function h(u){var d;Object(Y.a)(this,h),d=g.call(this,u);var s=window.document;return d.node=s.createElement("div"),s.body.appendChild(d.node),d}return Object(K.a)(h,[{key:"render",value:function(){var d=this.props.children;return Object(j.createPortal)(d,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(R.a.Component)},MFOe:function(Le,ye,F){(function(Y){var K=R(),L=j(),H=k(),N=typeof window!="undefined"?window:Y;Le.exports={assign:K,create:L,trim:H,bind:A,slice:D,each:g,map:h,pluck:u,isList:d,isFunction:s,isObject:l,Global:N};function R(){return Object.assign?Object.assign:function(o,n,f,O){for(var S=1;S=0;l-=1){var i=k.get(l)||new Set;i.forEach(function(o){var n=o.parent,f=o.node;if(D(f)||!o.parent||s.has(o.parent.key))return;if(D(o.parent.node)){s.add(n.key);return}var O=!0,S=!1;(n.children||[]).filter(function(x){return!D(x.node)}).forEach(function(x){var w=x.key,T=g.has(w);O&&!T&&(O=!1),!S&&(T||h.has(w))&&(S=!0)}),O&&g.add(n.key),S&&h.add(n.key),s.add(n.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(K(h,g))}}function N(j,k,A,D,g){for(var h=new Set(j),u=new Set(k),d=0;d<=D;d+=1){var s=A.get(d)||new Set;s.forEach(function(n){var f=n.key,O=n.node,S=n.children,x=S===void 0?[]:S;!h.has(f)&&!u.has(f)&&!g(O)&&x.filter(function(w){return!g(w.node)}).forEach(function(w){h.delete(w.key)})})}u=new Set;for(var l=new Set,i=D;i>=0;i-=1){var o=A.get(i)||new Set;o.forEach(function(n){var f=n.parent,O=n.node;if(g(O)||!n.parent||l.has(n.parent.key))return;if(g(n.parent.node)){l.add(f.key);return}var S=!0,x=!1;(f.children||[]).filter(function(w){return!g(w.node)}).forEach(function(w){var T=w.key,y=h.has(T);S&&!y&&(S=!1),!x&&(y||u.has(T))&&(x=!0)}),S||h.delete(f.key),x&&u.add(f.key),l.add(f.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(K(u,h))}}function R(j,k,A,D){var g=[],h;D?h=D:h=L;var u=new Set(j.filter(function(i){var o=!!A[i];return o||g.push(i),o})),d=new Map,s=0;Object.keys(A).forEach(function(i){var o=A[i],n=o.level,f=d.get(n);f||(f=new Set,d.set(n,f)),f.add(o),s=Math.max(s,n)}),Object(Y.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var l;return k===!0?l=H(u,d,s,h):l=N(u,k.halfCheckedKeys,d,s,h),l}},OJz4:function(Le,ye,F){"use strict";F.d(ye,"d",function(){return K}),F.d(ye,"h",function(){return L}),F.d(ye,"b",function(){return H}),F.d(ye,"f",function(){return N}),F.d(ye,"e",function(){return R}),F.d(ye,"c",function(){return j}),F.d(ye,"a",function(){return k}),F.d(ye,"g",function(){return A}),F.d(ye,"i",function(){return D}),F.d(ye,"k",function(){return g}),F.d(ye,"j",function(){return h});var Y=F("ErOA");function K(u){return Object(Y.c)("myproblems/".concat(u,".json"),{hidePopLogin:!0})}function L(u,d){return Object(Y.f)("myproblems/".concat(u,"/code_submit.json"),d)}function H(u,d){return Object(Y.c)("myproblems/".concat(u,"/code_debug.json"),d)}function N(u,d){return Object(Y.c)("myproblems/".concat(u,"/submit_records.json"),d)}function R(u){return Object(Y.c)("myproblems/record_detail.json",{id:u})}function j(u,d){return Object(Y.c)("myproblems/".concat(u,"/result.json"),{mode:d})}function k(u,d){return Object(Y.f)("myproblems/".concat(u,"/add_notes.json"),d)}function A(u){return Object(Y.f)("myproblems/".concat(u,"/restore_initial_code.json"))}function D(u){return Object(Y.f)("myproblems/".concat(u,"/sync_code.json"))}function g(u,d){return Object(Y.f)("myproblems/".concat(u,"/update_code.json"),d)}function h(u,d){return Object(Y.f)("discusses/".concat(u,"/plus.json"),d)}},OLES:function(Le,ye,F){"use strict";var Y=F("U8pU"),K=F("VTBJ"),L=F("Ff2n"),H=F("cDcd"),N=F("uciX"),R=F("7ixt"),j=function(u){var d=u.overlay,s=u.prefixCls,l=u.id,i=u.overlayInnerStyle;return H.createElement("div",{className:"".concat(s,"-inner"),id:l,role:"tooltip",style:i},typeof d=="function"?d():d)},k=j,A=function(u,d){var s=u.overlayClassName,l=u.trigger,i=l===void 0?["hover"]:l,o=u.mouseEnterDelay,n=o===void 0?0:o,f=u.mouseLeaveDelay,O=f===void 0?.1:f,S=u.overlayStyle,x=u.prefixCls,w=x===void 0?"rc-tooltip":x,T=u.children,y=u.onVisibleChange,v=u.afterVisibleChange,p=u.transitionName,c=u.animation,E=u.placement,_=E===void 0?"right":E,b=u.align,I=b===void 0?{}:b,P=u.destroyTooltipOnHide,B=P===void 0?!1:P,z=u.defaultVisible,U=u.getTooltipContainer,C=u.overlayInnerStyle,W=Object(L.a)(u,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),V=Object(H.useRef)(null);Object(H.useImperativeHandle)(d,function(){return V.current});var J=Object(K.a)({},W);"visible"in u&&(J.popupVisible=u.visible);var ne=function(){var ge=u.arrowContent,re=ge===void 0?null:ge,oe=u.overlay,xe=u.id;return[H.createElement("div",{className:"".concat(w,"-arrow"),key:"arrow"},re),H.createElement(k,{key:"content",prefixCls:w,id:xe,overlay:oe,overlayInnerStyle:C})]},fe=!1,ue=!1;if(typeof B=="boolean")fe=B;else if(B&&Object(Y.a)(B)==="object"){var le=B.keepParent;fe=le===!0,ue=le===!1}return H.createElement(N.a,Object.assign({popupClassName:s,prefixCls:w,popup:ne,action:i,builtinPlacements:R.a,popupPlacement:_,ref:V,popupAlign:I,getPopupContainer:U,onPopupVisibleChange:y,afterPopupVisibleChange:v,popupTransitionName:p,popupAnimation:c,defaultPopupVisible:z,destroyPopupOnHide:fe,autoDestroy:ue,mouseLeaveDelay:O,popupStyle:S,mouseEnterDelay:n},J),T)},D=Object(H.forwardRef)(A),g=ye.a=D},OZM5:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return D}),F.d(ye,"a",function(){return g}),F.d(ye,"k",function(){return h}),F.d(ye,"h",function(){return u}),F.d(ye,"i",function(){return d}),F.d(ye,"g",function(){return s}),F.d(ye,"c",function(){return l}),F.d(ye,"d",function(){return i}),F.d(ye,"j",function(){return f}),F.d(ye,"e",function(){return O}),F.d(ye,"f",function(){return S});var Y=F("KQm4"),K=F("U8pU"),L=F("Ff2n"),H=F("cDcd"),N=F.n(H),R=F("Kwbf"),j=F("WaYH"),k=.25,A=2;function D(x,w){var T=x.slice(),y=T.indexOf(w);return y>=0&&T.splice(y,1),T}function g(x,w){var T=x.slice();return T.indexOf(w)===-1&&T.push(w),T}function h(x){return x.split("-")}function u(x,w){return"".concat(x,"-").concat(w)}function d(x){return x&&x.type&&x.type.isTreeNode}function s(x,w){var T=[x],y=w[x];function v(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(c){var E=c.key,_=c.children;T.push(E),v(_)})}return v(y.children),T}function l(x,w){var T=x.clientY,y=w.selectHandle.getBoundingClientRect(),v=y.top,p=y.bottom,c=y.height,E=Math.max(c*k,A);return T<=v+E?-1:T>=p-E?1:0}function i(x,w){if(!x)return;var T=w.multiple;return T?x.slice():x.length?[x[0]]:x}var o=function(w){return w};function n(x,w){if(!x)return[];var T=w||{},y=T.processProps,v=y===void 0?o:y,p=Array.isArray(x)?x:[x];return p.map(function(c){var E=c.children,_=Object(L.a)(c,["children"]),b=n(E,w);return N.a.createElement(j.a,Object.assign({},v(_)),b)})}function f(x){if(!x)return null;var w;if(Array.isArray(x))w={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(K.a)(x)==="object")w={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return w}function O(x,w){var T=new Set;function y(v){if(T.has(v))return;var p=w[v];if(!p)return;T.add(v);var c=p.parent,E=p.node;if(E.disabled)return;c&&y(c.key)}return(x||[]).forEach(function(v){y(v)}),Object(Y.a)(T)}function S(x){var w={};return Object.keys(x).forEach(function(T){(T.startsWith("data-")||T.startsWith("aria-"))&&(w[T]=x[T])}),w}},Ot1p:function(Le,ye,F){"use strict";var Y=F("2qtc"),K=F("kLXV"),L=F("rAM+"),H=F("miYZ"),N=F("tsqr"),R=F("9og8"),j=F("tJVT"),k=F("jrin"),A=F("WmNS"),D=F.n(A),g=F("cDcd"),h=F.n(g),u=F("VrN/"),d=F.n(u),s=F("bdgK"),l=F("p77/"),i=F("Bd2K"),o=F("ELLl"),n=F("19Vz"),f=F("lZu9"),O=F("+NIl"),S=F("kSUc"),x=F("9Bee"),w=function(ce){var Se=ce.value,je=Se===void 0?"":Se,Ze=ce.className,ut=ce.showTextOnly,it=ce.showLines,rt=ce.style,Me=rt===void 0?{}:rt,Ue=Object(g.useMemo)(function(){return""},[je]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ue}}))},T=F("0Owb"),y=F("dejd"),v=F("C+DQ"),p=F("1vsH"),c=F("m3rI"),E=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function _(ce){var Se=ce.onActionCallback,je=ce.title,Ze=ce.icon,ut=ce.actionName,it=ce.className,rt=it===void 0?"":it,Me=ce.children;function Ue(){Se(ut)}return h.a.createElement("a",{title:je,className:rt,onClick:Ue},h.a.createElement("i",{className:"md-iconfont ".concat(Ze)}),Me)}var b=function(ce){var Se=ce.watch,je=ce.showNullButton,Ze=ce.onActionCallback,ut=ce.fullScreen,it=ce.insertTemp,rt=ce.hidetoolBar,Me=ce.uuid,Ue=ce.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(p.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(p.G)("_educoder_session"),"&key=").concat(Me,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var we=[].concat(E,[{title:"".concat(Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!rt&&we.map(function(ee,he){return h.a.createElement("li",{key:he},ee.actionName?h.a.createElement(_,Object(T.a)({},ee,{onActionCallback:Ze})):h.a.createElement("span",{className:"v-line"}))}),je?h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ze},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,it&&h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(it),onActionCallback:Ze},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(_,{icon:"".concat(ut?"icon-shrink":"icon-enlarge"),title:ut?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ze})))},I=F("M8RZ"),P=F("+L6B"),B=F("2/Rp"),z=F("y8nQ"),U=F("Vl3Y"),C=F("5NDa"),W=F("5rEg"),V={labelCol:{span:4},wrapperCol:{span:20}},J=function(ce){var Se=ce.callback,je=ce.onCancel;function Ze(ut){Se(ut)}return h.a.createElement(U.a,Object(T.a)({},V,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ze}),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(W.a,null)),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(W.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))},ne=F("7ahc"),fe=F("HmJG"),ue=F("BjJ7"),le=U.a.useForm,me={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}},re=function(ce){var Se=ce.callback,je=ce.onCancel,Ze=le(),ut=Object(j.a)(Ze,1),it=ut[0];function rt(we){Se(we)}function Me(we,ee){if(we.status===-1){N.b.error(we.message);return}it.setFieldsValue({src:"/api/attachments/".concat(we.id),type:ee.type})}function Ue(we){var ee=we.target.files[0];xe(ee,Me)}return h.a.createElement(U.a,Object(T.a)({form:it},ge,{className:"upload-image-panel",onFinish:rt}),h.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},h.a.createElement(W.a,{style:me})),h.a.createElement(oe,{onFileChange:Ue}))),h.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},h.a.createElement(W.a,{style:{width:264}})),h.a.createElement(U.a.Item,{style:{textAlign:"right"}},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function oe(ce){var Se=ce.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:Se}))}function xe(ce,Se){if(!ce)throw new String("\u6CA1\u6709\u6587\u4EF6");var je=new FormData;je.append("editormd-image-file",ce),je.append("file_param_name","editormd-image-file"),je.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(ut){Se(JSON.parse(ut.target.responseText),ce)},!1),Ze.addEventListener("error",function(ut){console.error(ut)},!1),Ze.open("POST","".concat(ue.a,"/api/attachments.json")),Ze.send(je)}var Be=F("giR+"),Ve=F("fyUT"),Ye=F("7Kak"),$e=F("9yH6"),Ke=$e.a.Group,We={margin:"0 8px"},ze=function(ce){var Se=ce.callback,je=ce.onCancel;function Ze(ut){Se(ut)}return h.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ze},h.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},h.a.createElement("span",{style:We},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:We},"\u884C\u6570"),h.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(Ve.a,null)),h.a.createElement("span",{style:We},"\u5217\u6570"),h.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(Ve.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},h.a.createElement("span",{style:We},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(U.a.Item,{name:"align"},h.a.createElement(Ke,null,h.a.createElement($e.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement($e.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement($e.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement($e.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))},at=F("ErOA"),Je=F("7Cbv"),Xe="link",He="upload-image",ot="code-block",ft="add-table",dt="------------",lt={default:dt,left:":".concat(dt),center:":".concat(dt,":"),right:"".concat(dt,":")},_t=F("9VGf"),ht,be;function _e(){}var Ne=0,ke=1e4,Ee="\u2581",Ie=` +`+(Ue.tokens?this.parseInline(Ue.tokens):Ue.text);te+=q?this.renderer.paragraph(Me):Me;continue}default:{var Qe='Token with "'+Ue.type+'" type was not found.';if(this.options.silent){console.error(Qe);return}else throw new Error(Qe)}}}return te},ae.parseInline=function(Q,q){q=q||this.renderer;var te="",se,ce,Se=Q.length;for(se=0;seAn error occurred:

    "+be(Se.message+"",!0)+"
    ";throw Se}}Ee.options=Ee.setOptions=function(pe){return yt(Ee.defaults,pe),Ne(Ee.defaults),Ee},Ee.getDefaults=_e,Ee.defaults=ke,Ee.use=function(pe){var ae=yt({},pe);if(pe.renderer&&function(){var Q=Ee.defaults.renderer||new Xe,q=function(ce){var Se=Q[ce];Q[ce]=function(){for(var je=arguments.length,Ze=new Array(je),ut=0;ut=0;u--){if(!L(h[u]))continue;var d=h[u].split("="),s=unescape(d[0]),l=unescape(d[1]);g(l,s)}}function j(g,h){if(!g)return;H.cookie=escape(g)+"="+escape(h)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function k(g){if(!g||!D(g))return;H.cookie=escape(g)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function A(){R(function(g,h){k(h)})}function D(g){return new RegExp("(?:^|;\\s*)"+escape(g).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(H.cookie)}},EHPI:function(Le,ye,F){"use strict";var Y=F("bbsP"),K=F("/wGt"),L=F("tJVT"),H=F("k1fw"),N=F("cDcd"),R=F.n(N),j=F("ZW9T"),k=F("ZD9Y"),A=F("M8RZ"),D=F("bCnd"),g=F("fcyK"),h=F.n(g),u={theme:Object(D.a)("cmCodeMode","vs-dark"),fontSize:Object(D.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(D.a)("cmTabToSpace",!0)},d;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(d||(d={}));function s(i,o){switch(o.type){case d.set_show_editor_setting:return Object(H.a)(Object(H.a)({},i),{},{showEditorSetting:o.payload});case d.set_theme:return Object(H.a)(Object(H.a)({},i),{},{theme:o.payload});case d.set_font_size:return Object(H.a)(Object(H.a)({},i),{},{fontSize:o.payload});case d.on_tab_to_space:return Object(H.a)(Object(H.a)({},i),{},{tabToSpace:o.payload});default:throw new Error}}ye.a=function(i){var o=i.isLoading,n=i.value,f=i.onChange,O=i.language,S=i.ActionBarRender,x=S===void 0?function(z){return R.a.createElement(l,{onShowCodeSetting:z})}:S,w=Object(N.useReducer)(s,u),T=Object(L.a)(w,2),y=T[0],v=T[1],p=y.theme,c=y.fontSize,E=y.showEditorSetting,_=y.tabToSpace,b={onFontSizeChange:function(U){v({type:d.set_font_size,payload:U}),Object(D.b)("cmFontSize",U)},tabToSpace:_,cmFontSize:c,className:"oj",cmCodeMode:p,onTabToSpace:function(U){v({type:d.on_tab_to_space,payload:U}),Object(D.b)("cmTabToSpace",U)},onCodeModeChange:function(U){v({type:d.set_theme,payload:U}),Object(D.b)("cmCodeMode",U)}};function I(){v({type:d.set_show_editor_setting,payload:!1})}function P(){v({type:d.set_show_editor_setting,payload:!0})}var B={value:n,language:O,onChange:f,theme:p,height:"calc(100% - 56px)",options:{fontSize:c,insertSpaces:_}};return R.a.createElement(N.Fragment,null,R.a.createElement("div",{className:"code-panel-container"},x(P),!o&&R.a.createElement(j.b,B)),R.a.createElement(A.a,null,R.a.createElement(K.a,{className:"oj",title:null,placement:"right",closable:!1,visible:E,onClose:I},R.a.createElement(k.a,b))))};function l(i){var o=i.onShowCodeSetting;return R.a.createElement("div",{className:"action-bar"},R.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),R.a.createElement("a",{onClick:o},R.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(Le,ye,F){(function(Y){Y(F("VrN/"))})(function(Y){var K={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},L=Y.Pos;Y.defineOption("autoCloseBrackets",!1,function(s,l,i){i&&i!=Y.Init&&(s.removeKeyMap(N),s.state.closeBrackets=null),l&&(R(H(l,"pairs")),s.state.closeBrackets=l,s.addKeyMap(N))});function H(s,l){return l=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[l]!=null?s[l]:K[l]}var N={Backspace:A,Enter:D};function R(s){for(var l=0;l=0;n--){var O=o[n].head;s.replaceRange("",L(O.line,O.ch-1),L(O.line,O.ch+1),"+delete")}}function D(s){var l=k(s),i=l&&H(l,"explode");if(!i||s.getOption("disableInput"))return Y.Pass;for(var o=s.listSelections(),n=0;n0;return{anchor:new L(s.anchor.line,s.anchor.ch+(l?-1:1)),head:new L(s.head.line,s.head.ch+(l?1:-1))}}function h(s,l){var i=k(s);if(!i||s.getOption("disableInput"))return Y.Pass;var o=H(i,"pairs"),n=o.indexOf(l);if(n==-1)return Y.Pass;for(var f=H(i,"closeBefore"),O=H(i,"triples"),S=o.charAt(n+1)==l,x=s.listSelections(),w=n%2==0,T,y=0;y=0&&s.getRange(p,L(p.line,p.ch+3))==l+l+l?c="skipThree":c="skip";else if(S&&p.ch>1&&O.indexOf(l)>=0&&s.getRange(L(p.line,p.ch-2),p)==l+l){if(p.ch>2&&/\bstring/.test(s.getTokenTypeAt(L(p.line,p.ch-2))))return Y.Pass;c="addFour"}else if(S){var _=p.ch==0?" ":s.getRange(L(p.line,p.ch-1),p);if(!Y.isWordChar(E)&&_!=l&&!Y.isWordChar(_))c="both";else return Y.Pass}else if(w&&(E.length===0||/\s/.test(E)||f.indexOf(E)>-1))c="both";else return Y.Pass;if(!T)T=c;else if(T!=c)return Y.Pass}var b=n%2?o.charAt(n-1):l,I=n%2?l:o.charAt(n+1);s.operation(function(){if(T=="skip")s.execCommand("goCharRight");else if(T=="skipThree")for(var P=0;P<3;P++)s.execCommand("goCharRight");else if(T=="surround"){for(var B=s.getSelections(),P=0;P>>6)+A(128|I&63):A(224|I>>>12&15)+A(128|I>>>6&63)+A(128|I&63)}else{var I=65536+(b.charCodeAt(0)-55296)*1024+(b.charCodeAt(1)-56320);return A(240|I>>>18&7)+A(128|I>>>12&63)+A(128|I>>>6&63)+A(128|I&63)}},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(b){return b.replace(g,D)},u=function(b){var I=[0,2,1][b.length%3],P=b.charCodeAt(0)<<16|(b.length>1?b.charCodeAt(1):0)<<8|(b.length>2?b.charCodeAt(2):0),B=[j.charAt(P>>>18),j.charAt(P>>>12&63),I>=2?"=":j.charAt(P>>>6&63),I>=1?"=":j.charAt(P&63)];return B.join("")},d=H.btoa&&typeof H.btoa=="function"?function(b){return H.btoa(b)}:function(b){if(b.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return b.replace(/[\s\S]{1,3}/g,u)},s=function(b){return d(h(String(b)))},l=function(b){return b.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(b,I){return I?l(s(b)):s(b)},o=function(b){return i(b,!0)},n;H.Uint8Array&&(n=function(b,I){for(var P="",B=0,z=b.length;B>>18)+j.charAt(V>>>12&63)+(typeof C!="undefined"?j.charAt(V>>>6&63):"=")+(typeof W!="undefined"?j.charAt(V&63):"=")}return I?l(P):P});var f=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,O=function(b){switch(b.length){case 4:var I=(7&b.charCodeAt(0))<<18|(63&b.charCodeAt(1))<<12|(63&b.charCodeAt(2))<<6|63&b.charCodeAt(3),P=I-65536;return A((P>>>10)+55296)+A((P&1023)+56320);case 3:return A((15&b.charCodeAt(0))<<12|(63&b.charCodeAt(1))<<6|63&b.charCodeAt(2));default:return A((31&b.charCodeAt(0))<<6|63&b.charCodeAt(1))}},S=function(b){return b.replace(f,O)},x=function(b){var I=b.length,P=I%4,B=(I>0?k[b.charAt(0)]<<18:0)|(I>1?k[b.charAt(1)]<<12:0)|(I>2?k[b.charAt(2)]<<6:0)|(I>3?k[b.charAt(3)]:0),z=[A(B>>>16),A(B>>>8&255),A(B&255)];return z.length-=[0,0,2,1][P],z.join("")},w=H.atob&&typeof H.atob=="function"?function(b){return H.atob(b)}:function(b){return b.replace(/\S{1,4}/g,x)},T=function(b){return w(String(b).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(b){return S(w(b))},v=function(b){return String(b).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},p=function(b){return y(v(b))},c;H.Uint8Array&&(c=function(b){return Uint8Array.from(T(v(b)),function(I){return I.charCodeAt(0)})});var E=function(){var b=H.Base64;return H.Base64=N,b};if(H.Base64={VERSION:R,atob:T,btoa:d,fromBase64:p,toBase64:i,utob:h,encode:i,encodeURI:o,btou:S,decode:p,noConflict:E,fromUint8Array:n,toUint8Array:c},typeof Object.defineProperty=="function"){var _=function(b){return{value:b,enumerable:!1,writable:!0,configurable:!0}};H.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_(function(){return p(this)})),Object.defineProperty(String.prototype,"toBase64",_(function(b){return i(this,b)})),Object.defineProperty(String.prototype,"toBase64URI",_(function(){return i(this,!0)}))}}return H.Meteor&&(Base64=H.Base64),Le.exports?Le.exports.Base64=H.Base64:!(K=[],L=function(){return H.Base64}.apply(ye,K),L!==void 0&&(Le.exports=L)),{Base64:H.Base64}})}).call(this,F("IyRk"))},JB8y:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return Y});var Y;(function(K){K[K.NOMATCH=-1]="NOMATCH",K[K.OK=0]="OK",K[K.TIMEOUT=2]="TIMEOUT",K[K.PODFAILURE=3]="PODFAILURE",K[K.COMPILEFAILURE=4]="COMPILEFAILURE",K[K.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(Y||(Y={}))},JPnl:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return v}),F.d(ye,"c",function(){return E});var Y=F("+L6B"),K=F("2/Rp"),L=F("tJVT"),H=F("9og8"),N=F("k1fw"),R=F("jrin"),j=F("5NDa"),k=F("5rEg"),A=F("WmNS"),D=F.n(A),g=F("cDcd"),h=F.n(g),u=F("8Skl"),d=F("y3Kf"),s=F("JB8y"),l=F("J66h"),i=F.n(l),o=F("a4uL"),n=F.n(o),f=F("IxHN"),O=F("9Bee"),S=F("1vsH"),x=F("ErOA"),w,T=k.a.TextArea,y={visible:!1,tabIndex:"0"},v=(w={},Object(R.a)(w,s.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(R.a)(w,s.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(R.a)(w,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(R.a)(w,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(R.a)(w,4,"\u7F16\u8BD1\u5931\u8D25"),Object(R.a)(w,5,"\u6267\u884C\u5931\u8D25"),w),p;(function(b){b[b.SET_VISIBLE=0]="SET_VISIBLE",b[b.SET_TABINDEX=1]="SET_TABINDEX"})(p||(p={}));function c(b,I){switch(I.type){case p.SET_VISIBLE:return Object(N.a)(Object(N.a)({},b),{},{visible:I.payload});case p.SET_TABINDEX:return Object(N.a)(Object(N.a)({},b),{},{tabIndex:I.payload});default:throw new Error}}function E(b){var I=b.status,P=b.error_msg,B=b.output,z=b.input,U=b.expected_output,C=b.is_file,W=b.input_file_url,V=b.output_file_url,J=b.expected_output_file_url,ne=b.setMonacoValue,fe=b.setData,ue=null,le={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(I){case s.a.NOMATCH:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,fetch(W,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return ge=oe.sent,oe.t0=ne,oe.next=6,ge.text();case 6:oe.t1=oe.sent,(0,oe.t0)(oe.t1),setTimeout(function(){fe(W)},200);case 9:case"end":return oe.stop()}},me)}))},z)),h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!C&&h.a.createElement(O.a,{value:B&&l.Base64.decode(B)||"",style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,Object(x.a)(V,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:ge=oe.sent,ne(ge),setTimeout(function(){fe(V)},200);case 5:case"end":return oe.stop()}},me)}))},B)),h.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!C&&h.a.createElement(O.a,{value:U&&l.Base64.decode(U)||"",style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(H.a)(D.a.mark(function me(){var ge;return D.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,fetch(J,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return ge=oe.sent,oe.t0=ne,oe.next=6,ge.text();case 6:oe.t1=oe.sent,(0,oe.t0)(oe.t1),setTimeout(function(){fe(J)},200);case 9:case"end":return oe.stop()}},me)}))},U)));break;case s.a.EXECUTEFAILURE:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{onClick:function(){return Object(S.y)(W,z)}},z)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.COMPILEFAILURE:ue=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!C&&h.a.createElement(O.a,{value:z,style:le}),C&&h.a.createElement("div",{style:le},h.a.createElement("a",{onClick:function(){return Object(S.y)(W,z)}},z)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.PODFAILURE:ue=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:ue=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",ue," ")}function _(b){var I=b.status,P=b.error_msg,B=b.execute_time,z=b.output,U=b.input,C=b.expected_output,W=b.is_file,V=b.input_file_url,J=b.output_file_url,ne=b.expected_output_file_url,fe=null;switch(I){case s.a.OK:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",B),h.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),h.a.createElement("pre",null,l.Base64.decode(z)));break;case s.a.NOMATCH:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u8F93\u51FA\uFF1A",z&&l.Base64.decode(z)),h.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",C&&l.Base64.decode(C)));break;case s.a.EXECUTEFAILURE:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.COMPILEFAILURE:fe=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,U)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},l.Base64.decode(P)));break;case s.a.PODFAILURE:fe=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:fe=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",fe," ")}ye.b=function(b){var I=b.input,P=b.debuging,B=b.submitting,z=b.executingMessage,U=b.debugResult,C=b.onChangeInput,W=b.onDebugCode,V=b.onSubmitCode,J=b.hack,ne=b.user,fe=Object(g.useReducer)(c,y),ue=Object(L.a)(fe,2),le=ue[0],me=ue[1],ge=le.visible,re=le.tabIndex;function oe($e){var Ke=$e.target.id;me({type:p.SET_TABINDEX,payload:Ke})}function xe(){me({type:p.SET_VISIBLE,payload:!ge})}var Be=Object(g.useMemo)(function(){if(U){var $e=U.status;return h.a.createElement(h.a.Fragment,null,_(U))}return null},[U]);function Ve(){me({type:p.SET_VISIBLE,payload:!0}),me({type:p.SET_TABINDEX,payload:"1"}),W()}var Ye=function(){var $e=Object(H.a)(D.a.mark(function Ke(We){var ze;return D.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,Object(x.a)("/api/problems/".concat(We,"/start.json"),{method:"get",params:{hack_user_id:ne==null?void 0:ne.user_id}});case 2:ze=Je.sent,ze&&(window.location.href="/myproblems/".concat(ze==null?void 0:ze.identifier,"?type=1"));case 4:case"end":return Je.stop()}},Ke)}));return function(We){return $e.apply(this,arguments)}}();return h.a.createElement("div",{className:"test-case-panel"},h.a.createElement("div",{className:"test-case-panel-body ".concat(ge?"active":"")},h.a.createElement("ul",{className:"s-navs"},h.a.createElement("li",null,h.a.createElement("a",{className:re==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),h.a.createElement("li",null,h.a.createElement("a",{className:re==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="0"?"":"hide")},h.a.createElement(T,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:I,onChange:C})),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="1"?"":"hide")},P?h.a.createElement(f.a,{message:z}):U?h.a.createElement("section",{style:{height:200}}," ",Be," "):h.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),h.a.createElement("a",{className:"btn-collapse ".concat(ge?"up":""),onClick:xe},ge?h.a.createElement(u.a,null):h.a.createElement(d.a,null)),h.a.createElement("footer",{className:"footer"},h.a.createElement("span",null,"\u63A7\u5236\u53F0"),h.a.createElement("div",{className:"flex-container"},(J==null?void 0:J.is_program)&&(J==null?void 0:J.above_question)&&h.a.createElement(K.a,{onClick:function(){return Ye(J==null?void 0:J.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),(J==null?void 0:J.is_program)&&(J==null?void 0:J.under_question)&&h.a.createElement(K.a,{onClick:function(){return Ye(J==null?void 0:J.under_question)},id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),h.a.createElement(K.a,{className:"btn-green",type:"ghost",loading:P,onClick:Ve},"\u8C03\u8BD5\u4EE3\u7801"),h.a.createElement(K.a,{type:"primary",loading:B,disabled:B,onClick:function(){me({type:p.SET_VISIBLE,payload:!1}),V()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},LdHM:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return f}),F.d(ye,"a",function(){return S});var Y=F("1OyB"),K=F("vuIU"),L=F("Ji7U"),H=F("LK+K"),N=F("cDcd"),R=F("rePB"),j=F("Ff2n"),k=F("ODXe"),A=F("4IlW"),D=F("bX4T"),g=F("YrtM"),h=F("TSYQ"),u=F.n(h),d=F("+nKL"),s=F("8OUc"),l=function(W,V){var J=W.prefixCls,ne=W.id,fe=W.flattenOptions,ue=W.childrenAsData,le=W.values,me=W.searchValue,ge=W.multiple,re=W.defaultActiveFirstOption,oe=W.height,xe=W.itemHeight,Be=W.notFoundContent,Ve=W.open,Ye=W.menuItemSelectedIcon,$e=W.virtual,Ke=W.onSelect,We=W.onToggleOpen,ze=W.onActiveValue,at=W.onScroll,Je=W.onMouseEnter,Xe="".concat(J,"-item"),He=Object(g.a)(function(){return fe},[Ve,fe],function(Ie,pe){return pe[0]&&Ie[1]!==pe[1]}),ot=N.useRef(null),ft=function(pe){pe.preventDefault()},dt=function(pe){ot.current&&ot.current.scrollTo({index:pe})},lt=function(pe){for(var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ie=He.length,Q=0;Q1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(C).map(function(V,J){if(!N.isValidElement(V)||!V.type)return null;var ne=V.type.isSelectOptGroup,fe=V.key,ue=V.props,le=ue.children,me=Object(j.a)(ue,["children"]);return W||!ne?T(V):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(fe===null?J:fe,"__"),label:fe},me),{},{options:y(le)})}).filter(function(V){return V})}var v=F("2Qr1"),p=F("qNPg"),c=F("U8pU"),E=F("Kwbf"),_=F("WKfj");function b(C){var W=C.mode,V=C.options,J=C.children,ne=C.backfill,fe=C.allowClear,ue=C.placeholder,le=C.getInputElement,me=C.showSearch,ge=C.onSearch,re=C.defaultOpen,oe=C.autoFocus,xe=C.labelInValue,Be=C.value,Ve=C.inputValue,Ye=C.optionLabelProp,$e=W==="multiple"||W==="tags",Ke=me!==void 0?me:$e||W==="combobox",We=V||y(J);if(Object(E.a)(W!=="tags"||We.every(function(Xe){return!Xe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var ze=We.some(function(Xe){return Xe.options?Xe.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in Xe?Xe.value:Xe.key)=="number"});Object(E.a)(!ze,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(W!=="combobox"||!Ye,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(W==="combobox"||!ne,"`backfill` only works with `combobox` mode."),Object(E.a)(W==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(E.b)(W!=="combobox"||!le||!fe||!ue,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!Ke&&W!=="combobox"&&W!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!re||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Be!=null){var at=Object(_.d)(Be);Object(E.a)(!xe||at.every(function(Xe){return Object(c.a)(Xe)==="object"&&("key"in Xe||"value"in Xe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!$e||Array.isArray(Be),"`value` should be array when `mode` is `multiple` or `tags`")}if(J){var Je=null;Object(w.a)(J).some(function(Xe){if(!N.isValidElement(Xe)||!Xe.type)return!1;var He=Xe.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var ot=Object(w.a)(Xe.props.children).every(function(ft){return!N.isValidElement(ft)||!Xe.type||ft.type.isSelectOption?!0:(Je=ft.type,!1)});return!ot}return Je=He,!0}),Je&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Je.displayName||Je.name||Je,"`.")),Object(E.a)(Ve===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=b,P=Object(p.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:y,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:I,fillOptionsWithMissingValue:v.a}),B=function(C){Object(L.a)(V,C);var W=Object(H.a)(V);function V(){var J;return Object(Y.a)(this,V),J=W.apply(this,arguments),J.selectRef=N.createRef(),J.focus=function(){J.selectRef.current.focus()},J.blur=function(){J.selectRef.current.blur()},J}return Object(K.a)(V,[{key:"render",value:function(){return N.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),V}(N.Component);B.Option=f,B.OptGroup=S;var z=B,U=ye.c=z},M8RZ:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return A});var Y=F("fWQN"),K=F("mtLc"),L=F("yKVA"),H=F("879j"),N=F("cDcd"),R=F.n(N),j=F("faye"),k=F.n(j),A=function(D){Object(L.a)(h,D);var g=Object(H.a)(h);function h(u){var d;Object(Y.a)(this,h),d=g.call(this,u);var s=window.document;return d.node=s.createElement("div"),s.body.appendChild(d.node),d}return Object(K.a)(h,[{key:"render",value:function(){var d=this.props.children;return Object(j.createPortal)(d,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(R.a.Component)},MFOe:function(Le,ye,F){(function(Y){var K=R(),L=j(),H=k(),N=typeof window!="undefined"?window:Y;Le.exports={assign:K,create:L,trim:H,bind:A,slice:D,each:g,map:h,pluck:u,isList:d,isFunction:s,isObject:l,Global:N};function R(){return Object.assign?Object.assign:function(o,n,f,O){for(var S=1;S=0;l-=1){var i=k.get(l)||new Set;i.forEach(function(o){var n=o.parent,f=o.node;if(D(f)||!o.parent||s.has(o.parent.key))return;if(D(o.parent.node)){s.add(n.key);return}var O=!0,S=!1;(n.children||[]).filter(function(x){return!D(x.node)}).forEach(function(x){var w=x.key,T=g.has(w);O&&!T&&(O=!1),!S&&(T||h.has(w))&&(S=!0)}),O&&g.add(n.key),S&&h.add(n.key),s.add(n.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(K(h,g))}}function N(j,k,A,D,g){for(var h=new Set(j),u=new Set(k),d=0;d<=D;d+=1){var s=A.get(d)||new Set;s.forEach(function(n){var f=n.key,O=n.node,S=n.children,x=S===void 0?[]:S;!h.has(f)&&!u.has(f)&&!g(O)&&x.filter(function(w){return!g(w.node)}).forEach(function(w){h.delete(w.key)})})}u=new Set;for(var l=new Set,i=D;i>=0;i-=1){var o=A.get(i)||new Set;o.forEach(function(n){var f=n.parent,O=n.node;if(g(O)||!n.parent||l.has(n.parent.key))return;if(g(n.parent.node)){l.add(f.key);return}var S=!0,x=!1;(f.children||[]).filter(function(w){return!g(w.node)}).forEach(function(w){var T=w.key,y=h.has(T);S&&!y&&(S=!1),!x&&(y||u.has(T))&&(x=!0)}),S||h.delete(f.key),x&&u.add(f.key),l.add(f.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(K(u,h))}}function R(j,k,A,D){var g=[],h;D?h=D:h=L;var u=new Set(j.filter(function(i){var o=!!A[i];return o||g.push(i),o})),d=new Map,s=0;Object.keys(A).forEach(function(i){var o=A[i],n=o.level,f=d.get(n);f||(f=new Set,d.set(n,f)),f.add(o),s=Math.max(s,n)}),Object(Y.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var l;return k===!0?l=H(u,d,s,h):l=N(u,k.halfCheckedKeys,d,s,h),l}},OJz4:function(Le,ye,F){"use strict";F.d(ye,"d",function(){return K}),F.d(ye,"h",function(){return L}),F.d(ye,"b",function(){return H}),F.d(ye,"f",function(){return N}),F.d(ye,"e",function(){return R}),F.d(ye,"c",function(){return j}),F.d(ye,"a",function(){return k}),F.d(ye,"g",function(){return A}),F.d(ye,"i",function(){return D}),F.d(ye,"k",function(){return g}),F.d(ye,"j",function(){return h});var Y=F("ErOA");function K(u){return Object(Y.c)("myproblems/".concat(u,".json"),{hidePopLogin:!0})}function L(u,d){return Object(Y.f)("myproblems/".concat(u,"/code_submit.json"),d)}function H(u,d){return Object(Y.c)("myproblems/".concat(u,"/code_debug.json"),d)}function N(u,d){return Object(Y.c)("myproblems/".concat(u,"/submit_records.json"),d)}function R(u){return Object(Y.c)("myproblems/record_detail.json",{id:u})}function j(u,d){return Object(Y.c)("myproblems/".concat(u,"/result.json"),{mode:d})}function k(u,d){return Object(Y.f)("myproblems/".concat(u,"/add_notes.json"),d)}function A(u){return Object(Y.f)("myproblems/".concat(u,"/restore_initial_code.json"))}function D(u){return Object(Y.f)("myproblems/".concat(u,"/sync_code.json"))}function g(u,d){return Object(Y.f)("myproblems/".concat(u,"/update_code.json"),d)}function h(u,d){return Object(Y.f)("discusses/".concat(u,"/plus.json"),d)}},OLES:function(Le,ye,F){"use strict";var Y=F("U8pU"),K=F("VTBJ"),L=F("Ff2n"),H=F("cDcd"),N=F("uciX"),R=F("7ixt"),j=function(u){var d=u.overlay,s=u.prefixCls,l=u.id,i=u.overlayInnerStyle;return H.createElement("div",{className:"".concat(s,"-inner"),id:l,role:"tooltip",style:i},typeof d=="function"?d():d)},k=j,A=function(u,d){var s=u.overlayClassName,l=u.trigger,i=l===void 0?["hover"]:l,o=u.mouseEnterDelay,n=o===void 0?0:o,f=u.mouseLeaveDelay,O=f===void 0?.1:f,S=u.overlayStyle,x=u.prefixCls,w=x===void 0?"rc-tooltip":x,T=u.children,y=u.onVisibleChange,v=u.afterVisibleChange,p=u.transitionName,c=u.animation,E=u.placement,_=E===void 0?"right":E,b=u.align,I=b===void 0?{}:b,P=u.destroyTooltipOnHide,B=P===void 0?!1:P,z=u.defaultVisible,U=u.getTooltipContainer,C=u.overlayInnerStyle,W=Object(L.a)(u,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),V=Object(H.useRef)(null);Object(H.useImperativeHandle)(d,function(){return V.current});var J=Object(K.a)({},W);"visible"in u&&(J.popupVisible=u.visible);var ne=function(){var ge=u.arrowContent,re=ge===void 0?null:ge,oe=u.overlay,xe=u.id;return[H.createElement("div",{className:"".concat(w,"-arrow"),key:"arrow"},re),H.createElement(k,{key:"content",prefixCls:w,id:xe,overlay:oe,overlayInnerStyle:C})]},fe=!1,ue=!1;if(typeof B=="boolean")fe=B;else if(B&&Object(Y.a)(B)==="object"){var le=B.keepParent;fe=le===!0,ue=le===!1}return H.createElement(N.a,Object.assign({popupClassName:s,prefixCls:w,popup:ne,action:i,builtinPlacements:R.a,popupPlacement:_,ref:V,popupAlign:I,getPopupContainer:U,onPopupVisibleChange:y,afterPopupVisibleChange:v,popupTransitionName:p,popupAnimation:c,defaultPopupVisible:z,destroyPopupOnHide:fe,autoDestroy:ue,mouseLeaveDelay:O,popupStyle:S,mouseEnterDelay:n},J),T)},D=Object(H.forwardRef)(A),g=ye.a=D},OZM5:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return D}),F.d(ye,"a",function(){return g}),F.d(ye,"k",function(){return h}),F.d(ye,"h",function(){return u}),F.d(ye,"i",function(){return d}),F.d(ye,"g",function(){return s}),F.d(ye,"c",function(){return l}),F.d(ye,"d",function(){return i}),F.d(ye,"j",function(){return f}),F.d(ye,"e",function(){return O}),F.d(ye,"f",function(){return S});var Y=F("KQm4"),K=F("U8pU"),L=F("Ff2n"),H=F("cDcd"),N=F.n(H),R=F("Kwbf"),j=F("WaYH"),k=.25,A=2;function D(x,w){var T=x.slice(),y=T.indexOf(w);return y>=0&&T.splice(y,1),T}function g(x,w){var T=x.slice();return T.indexOf(w)===-1&&T.push(w),T}function h(x){return x.split("-")}function u(x,w){return"".concat(x,"-").concat(w)}function d(x){return x&&x.type&&x.type.isTreeNode}function s(x,w){var T=[x],y=w[x];function v(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(c){var E=c.key,_=c.children;T.push(E),v(_)})}return v(y.children),T}function l(x,w){var T=x.clientY,y=w.selectHandle.getBoundingClientRect(),v=y.top,p=y.bottom,c=y.height,E=Math.max(c*k,A);return T<=v+E?-1:T>=p-E?1:0}function i(x,w){if(!x)return;var T=w.multiple;return T?x.slice():x.length?[x[0]]:x}var o=function(w){return w};function n(x,w){if(!x)return[];var T=w||{},y=T.processProps,v=y===void 0?o:y,p=Array.isArray(x)?x:[x];return p.map(function(c){var E=c.children,_=Object(L.a)(c,["children"]),b=n(E,w);return N.a.createElement(j.a,Object.assign({},v(_)),b)})}function f(x){if(!x)return null;var w;if(Array.isArray(x))w={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(K.a)(x)==="object")w={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return w}function O(x,w){var T=new Set;function y(v){if(T.has(v))return;var p=w[v];if(!p)return;T.add(v);var c=p.parent,E=p.node;if(E.disabled)return;c&&y(c.key)}return(x||[]).forEach(function(v){y(v)}),Object(Y.a)(T)}function S(x){var w={};return Object.keys(x).forEach(function(T){(T.startsWith("data-")||T.startsWith("aria-"))&&(w[T]=x[T])}),w}},Ot1p:function(Le,ye,F){"use strict";var Y=F("2qtc"),K=F("kLXV"),L=F("rAM+"),H=F("miYZ"),N=F("tsqr"),R=F("9og8"),j=F("tJVT"),k=F("jrin"),A=F("WmNS"),D=F.n(A),g=F("cDcd"),h=F.n(g),u=F("VrN/"),d=F.n(u),s=F("bdgK"),l=F("p77/"),i=F("Bd2K"),o=F("ELLl"),n=F("19Vz"),f=F("lZu9"),O=F("+NIl"),S=F("kSUc"),x=F("9Bee"),w=function(ce){var Se=ce.value,je=Se===void 0?"":Se,Ze=ce.className,ut=ce.showTextOnly,it=ce.showLines,rt=ce.style,Me=rt===void 0?{}:rt,Ue=Object(g.useMemo)(function(){return""},[je]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ue}}))},T=F("0Owb"),y=F("dejd"),v=F("C+DQ"),p=F("1vsH"),c=F("m3rI"),E=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function _(ce){var Se=ce.onActionCallback,je=ce.title,Ze=ce.icon,ut=ce.actionName,it=ce.className,rt=it===void 0?"":it,Me=ce.children;function Ue(){Se(ut)}return h.a.createElement("a",{title:je,className:rt,onClick:Ue},h.a.createElement("i",{className:"md-iconfont ".concat(Ze)}),Me)}var b=function(ce){var Se=ce.watch,je=ce.showNullButton,Ze=ce.onActionCallback,ut=ce.fullScreen,it=ce.insertTemp,rt=ce.hidetoolBar,Me=ce.uuid,Ue=ce.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(p.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(p.G)("_educoder_session"),"&key=").concat(Me,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var we=[].concat(E,[{title:"".concat(Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!rt&&we.map(function(ee,he){return h.a.createElement("li",{key:he},ee.actionName?h.a.createElement(_,Object(T.a)({},ee,{onActionCallback:Ze})):h.a.createElement("span",{className:"v-line"}))}),je?h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ze},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,it&&h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(it),onActionCallback:Ze},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(_,{icon:"".concat(ut?"icon-shrink":"icon-enlarge"),title:ut?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ze})))},I=F("M8RZ"),P=F("+L6B"),B=F("2/Rp"),z=F("y8nQ"),U=F("Vl3Y"),C=F("5NDa"),W=F("5rEg"),V={labelCol:{span:4},wrapperCol:{span:20}},J=function(ce){var Se=ce.callback,je=ce.onCancel;function Ze(ut){Se(ut)}return h.a.createElement(U.a,Object(T.a)({},V,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ze}),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(W.a,null)),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(W.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))},ne=F("7ahc"),fe=F("HmJG"),ue=F("BjJ7"),le=U.a.useForm,me={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}},re=function(ce){var Se=ce.callback,je=ce.onCancel,Ze=le(),ut=Object(j.a)(Ze,1),it=ut[0];function rt(we){Se(we)}function Me(we,ee){if(we.status===-1){N.b.error(we.message);return}it.setFieldsValue({src:"/api/attachments/".concat(we.id),type:ee.type})}function Ue(we){var ee=we.target.files[0];xe(ee,Me)}return h.a.createElement(U.a,Object(T.a)({form:it},ge,{className:"upload-image-panel",onFinish:rt}),h.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},h.a.createElement(W.a,{style:me})),h.a.createElement(oe,{onFileChange:Ue}))),h.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},h.a.createElement(W.a,{style:{width:264}})),h.a.createElement(U.a.Item,{style:{textAlign:"right"}},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function oe(ce){var Se=ce.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:Se}))}function xe(ce,Se){if(!ce)throw new String("\u6CA1\u6709\u6587\u4EF6");var je=new FormData;je.append("editormd-image-file",ce),je.append("file_param_name","editormd-image-file"),je.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(ut){Se(JSON.parse(ut.target.responseText),ce)},!1),Ze.addEventListener("error",function(ut){console.error(ut)},!1),Ze.open("POST","".concat(ue.a,"/api/attachments.json")),Ze.send(je)}var Be=F("giR+"),Ve=F("fyUT"),Ye=F("7Kak"),$e=F("9yH6"),Ke=$e.a.Group,We={margin:"0 8px"},ze=function(ce){var Se=ce.callback,je=ce.onCancel;function Ze(ut){Se(ut)}return h.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ze},h.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},h.a.createElement("span",{style:We},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:We},"\u884C\u6570"),h.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(Ve.a,null)),h.a.createElement("span",{style:We},"\u5217\u6570"),h.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(Ve.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},h.a.createElement("span",{style:We},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(U.a.Item,{name:"align"},h.a.createElement(Ke,null,h.a.createElement($e.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement($e.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement($e.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement($e.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))},at=F("ErOA"),Je=F("7Cbv"),Xe="link",He="upload-image",ot="code-block",ft="add-table",dt="------------",lt={default:dt,left:":".concat(dt),center:":".concat(dt,":"),right:"".concat(dt,":")},yt=F("9VGf"),pt,be;function _e(){}var Ne=0,ke=1e4,Ee="\u2581",Ie=` **\u6A21\u677F\u6807\u9898** -\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function pe(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,ie=ae?"Cmd":"Ctrl",Q=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],q=(ht={},Object(k.a)(ht,ie+"-B","bold"),Object(k.a)(ht,ie+"-I","italic"),ht),te=(be={},Object(k.a)(be,Xe,"\u6DFB\u52A0\u94FE\u63A5"),Object(k.a)(be,ot,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(k.a)(be,He,"\u6DFB\u52A0\u6587\u4EF6"),Object(k.a)(be,ft,"\u6DFB\u52A0\u8868\u683C"),be),se=ye.a=function(ce){var Se=ce.defaultValue,je=Se===void 0?"":Se,Ze=ce.onChange,ut=ce.width,it=ut===void 0?"100%":ut,rt=ce.height,Me=rt===void 0?400:rt,Ue=ce.miniToolbar,we=Ue===void 0?!1:Ue,ee=ce.isFocus,he=ee===void 0?!1:ee,Fe=ce.watch,Re=ce.insertTemp,et=ce.mode,tt=et===void 0?"markdown":et,Te=ce.id,Ae=Te===void 0?"markdown-editor-id":Te,Qe=ce.showResizeBar,Et=Qe===void 0?!1:Qe,vt=ce.noStorage,cn=vt===void 0?!1:vt,yn=ce.showNullButton,ln=yn===void 0?!1:yn,bt=ce.hidetoolBar,Rn=bt===void 0?!1:bt,zn=ce.fullScreen,Tn=zn===void 0?!1:zn,zt=ce.onBlur,Sn=ce.onCMBeforeChange,Bn=ce.onFullScreen,pr=ce.className,nt=pr===void 0?"":pr,ct=ce.disablePaste,qn=ct===void 0?!1:ct,xr=ce.placeholder,mr=xr===void 0?"":xr,Ur=ce.values,Un=Ur===void 0?"":Ur,Lt=Object(g.useState)(null),Pe=Object(j.a)(Lt,2),Ce=Pe[0],It=Pe[1],Kt=Object(g.useState)(je),vn=Object(j.a)(Kt,2),fn=vn[0],rn=vn[1],Gt=Object(g.useState)(Fe),Dt=Object(j.a)(Gt,2),Pt=Dt[0],Ft=Dt[1],Mt=Object(g.useState)(Tn),qt=Object(j.a)(Mt,2),gt=qt[0],un=qt[1],Qt=Object(g.useState)(""),Ln=Object(j.a)(Qt,2),kt=Ln[0],In=Ln[1],Nn=Object(g.useState)(0),wn=Object(j.a)(Nn,2),bn=wn[0],An=wn[1],nr=Object(g.useState)(Me),lr=Object(j.a)(nr,2),Xn=lr[0],xn=lr[1],ur=Object(g.useState)(!1),dn=Object(j.a)(ur,2),hn=dn[0],pn=dn[1],Xt=Object(g.useRef)(Object(Je.a)()),St=Object(g.useRef)(!1),jt=Object(g.useRef)(),xt=Object(g.useRef)(),en=Object(g.useRef)(),Ut=Object(g.useRef)(),rr=Object(g.useRef)(),Mn=function(){var wt=Object(R.a)(D.a.mark(function Wt(){var At,Vt;return D.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(at.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Xt.current}});case 2:Vt=_n.sent,Vt!=null&&(At=Vt.attachments)!==null&&At!==void 0&&At.length&&(console.log("cm:",Ce,xt),Vt.attachments.map(function(tn){tn.content_type.indexOf("image")>-1?Ce.replaceSelection("![,](/api/attachments/".concat(tn.id,"?type=").concat(tn.content_type,")")):tn.content_type.indexOf("video")>-1?Ce.replaceSelection('')):tn.content_type.indexOf("pdf")>-1?Ce.replaceSelection('
    ').concat(tn.name,"")):Ce.replaceSelection("[".concat(tn.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(tn.id,"?type=").concat(tn.content_type,")"))}));case 4:case"end":return _n.stop()}},Wt)}));return function(){return wt.apply(this,arguments)}}();Object(g.useEffect)(function(){rn(Un),Ce==null||Ce.setValue(Un)},[Un]),Object(g.useEffect)(function(){Bn==null||Bn(gt)},[gt]),Object(g.useEffect)(function(){if(xt.current){var wt=d.a.fromTextArea(xt.current,{mode:tt,lineNumbers:!we,lineWrapping:!0,value:je,autoCloseTags:!0,autoCloseBrackets:!0});he&&wt.focus();function Wt(At,Vt){if(qn){Vt.preventDefault();return}var $t=Vt.clipboardData;if($t){var _n=$t.types.toString(),tn=$t.items;if(_n==="Files"||$t.types.indexOf("Files")>-1){if(Vt.preventDefault(),tt=="stex")return;try{var Pn,er=tn[1];((Pn=tn[0])===null||Pn===void 0?void 0:Pn.kind)==="file"&&(er=tn[0]);var Yt=er.getAsFile(),vr=Yt.name.split(".").pop();xe(Yt,function(mn){if(mn.id){var Vn,Yn,cr;(Yt==null||((Vn=Yt.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(Yt==null||((Yn=Yt.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?wt.replaceSelection('')):(Yt==null||((cr=Yt.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?wt.replaceSelection('').concat(Yt.name,"")):Q.includes(vr)?wt.replaceSelection('').concat(Yt.name,"")):wt.replaceSelection("[".concat(Yt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})}catch(mn){N.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return wt.on("paste",Wt),wt.on("dragleave",function(At,Vt){en.current.classList.remove("mouse-hover-md")}),wt.on("dragover",function(At,Vt){en.current.classList.add("mouse-hover-md")}),wt.on("drop",function(At,Vt){en.current.classList.add("mouse-hover-md");var $t;if($t=Vt.dataTransfer.files,$t.length>0){Vt.preventDefault(),Vt.stopPropagation();for(var _n=function(er){var Yt=$t[er],vr=Yt.name.split(".").pop();xe(Yt,function(mn){if(mn.id){var Vn,Yn,cr;(Yt==null||((Vn=Yt.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(Yt==null||((Yn=Yt.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?wt.replaceSelection('')):(Yt==null||((cr=Yt.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?wt.replaceSelection('').concat(Yt.name,"")):Q.includes(vr)?wt.replaceSelection('').concat(Yt.name,"")):wt.replaceSelection("[".concat(Yt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})},tn=0;tn<$t.length;tn++)_n(tn)}}),It(wt),function(){wt.off("paste",Wt)}}},[]);var dr=Object(g.useCallback)(function(){if(en.current)try{}catch(wt){console.log(wt,"---- to set md editor body height")}},[Xn,en,gt]);Object(g.useEffect)(function(){function wt(){var At=new s.default(function(Vt){var $t=Object(L.a)(Vt),_n;try{for($t.s();!(_n=$t.n()).done;){var tn=_n.value;(tn.target.offsetHeight>0||tn.target.offsetWidth>0)&&(dr(),Ce.setSize("100%","100%"),Ce.refresh())}}catch(Pn){$t.e(Pn)}finally{$t.f()}});return At.observe(xt.current.parentElement),At}if(Ce){var Wt=wt();return function(){Wt.unobserve(xt.current.parentElement)}}},[Ce,dr]),Object(g.useEffect)(function(){if(Ce){for(var wt=[],Wt=function(){var tn=Vt[At];$t=Object(j.a)(tn,2);var Pn=$t[0],er=$t[1],Yt=Object(k.a)({},Pn,function(){Qr(er)});wt.push(Yt),Ce.addKeyMap(Yt)},At=0,Vt=Object.entries(q);At0){var wt=new Date().getTime(),Wt=window.sessionStorage.getItem(Ae);wt>=bn+ke&&(!Wt||Wt!==fn)&&(window.sessionStorage.setItem(Ae,fn),pn(!0))}},ke),Object(g.useEffect)(function(){Ft(Fe)},[Ce,Fe]),Object(g.useEffect)(function(){Ce&&(he&&Ce.focus())},[Ce,he]),Object(g.useEffect)(function(){if(Pt&&Ce){var wt=Ce.getScrollerElement();function Wt(At){var Vt=At.target;if(rr.current){var $t=Vt.scrollTop/Vt.scrollHeight;rr.current.scrollTop=rr.current.scrollHeight*$t}}return wt.addEventListener("scroll",Wt),function(){wt.removeEventListener("scroll",Wt)}}},[Ce,Pt]),Object(g.useEffect)(function(){if(Ce&&Sn){function wt(Wt,At){Sn(Wt,At)}return Ce.on("beforeChange",wt),function(){Ce.off("beforeChange",wt)}}},[Ce,Sn]),Object(g.useEffect)(function(){if(Ce&&zt){function wt(){zt(Ce.getValue())}return Ce.on("blur",wt),function(){Ce.off("blur",wt)}}},[Ce,zt]),Object(g.useEffect)(function(){if(Ce){function wt(Wt){var At=Wt.getValue();rn(At),An(new Date().getTime()),Wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ze&&Ze(At)}return Ce.on("change",wt),function(){Ce.off("change",wt)}}},[Ce,Ze]),Object(g.useEffect)(function(){Ce&&(je==null?(Ce.setValue(""),rn("")):je!==Ce.getValue()&&(Ce.setValue(je),rn(je),Ce.setCursor(Ce.lineCount(),0)))},[Ce,je]);var Qr=Object(g.useCallback)(function(wt){var Wt=Ce.getCursor(),At=Ce.getSelection(),Vt=At.split(` -`);switch(wt){case"bold":return Ce.replaceSelection("**"+At+"**"),At===""&&Ce.setCursor(Wt.line,Wt.ch+2),Ce.focus();case"italic":return Ce.replaceSelection("*"+At+"*"),At===""&&Ce.setCursor(Wt.line,Wt.ch+1),Ce.focus();case"code":return Ce.replaceSelection("`"+At+"`"),At===""&&Ce.setCursor(Wt.line,Wt.ch+1),Ce.focus();case"inline-latex":return Ce.replaceSelection("`$$"+At+"$$`"),At===""&&Ce.setCursor(Wt.line,Wt.ch+3),Ce.focus();case"latex":return Ce.replaceSelection("```latex\n"+At+"\n```"),Ce.setCursor(Wt.line+1,At.length+1),Ce.focus();case"line-break":return Ce.replaceSelection(`
    -`),Ce.focus();case"list-ul":return At===""?Ce.replaceSelection("- "+At):Ce.replaceSelection(Vt.map(function($t){return $t===""?"":"- ".concat($t)}).join(` -`)),Ce.focus();case"list-ol":return At===""?Ce.replaceSelection("1. "+At):Ce.replaceSelection(Vt.map(function($t,_n){return $t===""?"":"".concat(_n+1,". ").concat($t)}).join(` -`)),Ce.focus();case"add-null-ch":return At===""&&Ce.setCursor(Wt.line,Wt.ch+1),Ce.replaceSelection(Ee),Ce.focus();case"inster-template-1":return At===""&&Ce.setCursor(Wt.line,Wt.ch),Ce.replaceSelection(Ie),Ce.focus();case"eraser":return Ce.setValue(""),Ce.focus();case"trigger-watch":return Ft(!Pt),Ce.focus();case"trigger-full-screen":return un(!gt),Ce.focus();case Xe:In(Xe);return;case ot:In(ot);return;case He:In(He);return;case ft:In(ft);return;default:throw new Error}},[Ce,Pt,gt]),Ir=Object(g.useCallback)(function(wt){In("");switch(kt){case Xe:var Wt=wt.title,At=wt.link;return Ce.replaceSelection("[".concat(Wt,"](").concat(At,")")),Ce.focus();case ot:var Vt=wt.language,$t=wt.content;return Ce.replaceSelection(["```"+Vt,$t,"```"].join(` -`)),Ce.focus();case He:var _n=wt.src,tn=wt.alt;return tn?Ce.replaceSelection("![ ".concat(tn," ]( ").concat(_n,' "').concat(tn,'" )')):Ce.replaceSelection("![,](".concat(_n,")")),Ce.focus();case ft:for(var Pn=wt.row,er=wt.col,Yt=wt.align,vr=` -`,mn=0;mn300&&(Pn=300);var er=Me+Pn+"px";xn(er)}}return wt.addEventListener("mousedown",Vt),document.addEventListener("mousemove",_n),document.addEventListener("mouseup",$t),function(){wt.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",_n),document.removeEventListener("mouseup",$t)}}},[Ce,Ut]),Object(g.useEffect)(function(){xn(Me)},[Me]);var Or=pe(it),Br=pe(Xn),Fn={width:Or,height:Br},Rt=Object(g.useMemo)(function(){if(bn){var wt=new Date(bn),Wt=wt.getHours(),At=wt.getMinutes(),Vt=wt.getSeconds();return Wt=Wt<10?"0"+Wt:Wt,At=At<10?"0"+At:At,Vt=Vt<10?"0"+Vt:Vt,"".concat(Wt,":").concat(At,":").concat(Vt)}return 0},[bn]);function zr(){window.sessionStorage.removeItem(Ae),pn(!1),An(0)}function gr(){pn(!1),An(0),Ce.setValue(window.sessionStorage.getItem(Ae))}function ni(wt,Wt){var At=Ce.getValue();At=At.replace(wt,Wt),rn(At),Ce==null||Ce.setValue(At)}return h.a.createElement(g.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:en},h.a.createElement("div",{className:"markdown-editor-container ".concat(nt," ").concat(Pt?"on-preview":""," ").concat(we?"mini":""," ").concat(gt?"full-screen":""),style:Fn},h.a.createElement(b,{insertTemp:Re,watch:Pt,fullScreen:gt,showNullButton:ln,onActionCallback:Qr,hidetoolBar:Rn,uuid:Xt.current,setOpenPhones:function(){St.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:xt,placeholder:mr})),Pt?h.a.createElement("div",{ref:rr,className:"preview-container"},tt==="stex"&&h.a.createElement(w,{value:fn}),tt!=="stex"&&h.a.createElement(x.a,{edit:!0,value:fn,replaces:ni})):null))),Et?h.a.createElement("a",{ref:Ut,className:"editor-resize"}):null,h.a.createElement(I.a,null,te[kt]?h.a.createElement(K.a,{centered:!0,title:te[kt],visible:!0,onCancel:Mr,footer:null,className:"markdown-popup-form"},Gr):null))}},PD8m:function(Le,ye){Le.exports={name:"memoryStorage",read:Y,write:K,each:L,remove:H,clearAll:N};var F={};function Y(R){return F[R]}function K(R,j){F[R]=j}function L(R){for(var j in F)F.hasOwnProperty(j)&&R(F[j],j)}function H(R){delete F[R]}function N(R){F={}}},QUZ3:function(Le,ye,F){"use strict";F.r(ye);var Y=F("0Owb"),K=F("PpiC"),L=F("OaEy"),H=F("2fM7"),N=F("T2oS"),R=F("W9HT"),j=F("+L6B"),k=F("2/Rp"),A=F("9og8"),D=F("2qtc"),g=F("kLXV"),h=F("tJVT"),u=F("k1fw"),d=F("aHsQ"),s=F("sGsY"),l=F("WmNS"),i=F.n(l),o=F("cDcd"),n=F.n(o),f=F("Icgb"),O=F("Fvcw"),S=F("GIiI"),x=F("Ty5D"),w=F("55Ip"),T=F("OJz4"),y=F("V0Rq"),v=F("bntm"),p=F("cDPC"),c=F("m3rI"),E=F("RCxd"),_=F("EHPI"),b=F("S+dL"),I=F.n(b),P=F("J66h"),B=F("uMZB"),z=F.n(B),U=F("p/48"),C=F("JPnl"),W=F("y8nQ"),V=F("Vl3Y"),J=F("5NDa"),ne=F("5rEg"),fe=ne.a.TextArea,ue=5e3,le=function(Pe){var Ce=Pe.callback,It=Pe.onCancel,Kt=Pe.notes;function vn(fn){Ce(fn)}return n.a.createElement(V.a,{className:"note-form-panel",onFinish:vn,initialValues:{notes:Kt}},n.a.createElement(V.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:ue,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(ue)}]},n.a.createElement(fe,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),n.a.createElement(V.a.Item,{style:{textAlign:"right"}},n.a.createElement(k.a,{type:"ghost",onClick:It,style:{marginRight:10}}," \u53D6\u6D88 "),n.a.createElement(k.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},me=F("bbsP"),ge=F("/wGt"),re=F("DjyN"),oe=F("NUBc"),xe=F("H2Ag"),Be=F.n(xe),Ve=F("miYZ"),Ye=F("tsqr"),$e=F("g9YV"),Ke=F("wCAj"),We=F("+k/U"),ze=F.n(We),at=F("ye1Q"),Je=F("lfch"),Xe=F("JB8y"),He=F("p5ED"),ot=F("ErOA"),ft=F("wd/R"),dt=F.n(ft),lt=Ke.a.Column,_t=function(Pe){var Ce,It=Pe.submitResult,Kt=Pe.submitting,vn=Pe.submitRecords,fn=Pe.page,rn=Pe.onPageChange,Gt=Pe.topicId,Dt=It||{},Pt=Dt.status,Ft=Dt.id,Mt=Dt.input,qt=Dt.output,gt=Dt.expected_output,un=Dt.is_file,Qt=Dt.input_file_url,Ln=Dt.output_file_url,kt=Dt.expected_output_file_url,In=Dt.error_msg,Nn=vn||{},wn=Nn.records,bn=Nn.records_count,An=Object(o.useState)(""),nr=Object(h.a)(An,2),lr=nr[0],Xn=nr[1],xn=Object(o.useState)(""),ur=Object(h.a)(xn,2),dn=ur[0],hn=ur[1],pn=Object(x.h)(),Xt=(pn==null||((Ce=pn.query)===null||Ce===void 0)?void 0:Ce.type)==="1";function St(){un?navigator.clipboard.writeText(P.Base64.decode(In)).then(function(){Ye.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(P.Base64.decode(qt)).then(function(){Ye.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return n.a.createElement(R.a,{spinning:Kt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:n.a.createElement(at.a,{style:{fontSize:24},spin:!0})},Ft?n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:ze.a.info},n.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",n.a.createElement("span",{className:Pt===Xe.a.OK?"c-green":"c-red"},C.a[Pt])),n.a.createElement("li",{className:ze.a.error},n.a.createElement("a",{onClick:St},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",n.a.createElement(Je.a,null)," ")),n.a.createElement("li",null,n.a.createElement(w.a,{to:"/myproblems/".concat(Gt,"/record-detail/").concat(Ft)},"\u663E\u793A\u8BE6\u60C5 >"," "))),Pt!==Xe.a.OK?n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),n.a.createElement("pre",null,!un&&Mt,un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,fetch(Qt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return xt=Ut.sent,Ut.t0=hn,Ut.next=6,xt.text();case 6:Ut.t1=Ut.sent,(0,Ut.t0)(Ut.t1),setTimeout(function(){Xn(Qt)},200);case 9:case"end":return Ut.stop()}},jt)}))},Mt)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,(Pt===4||Pt===5)&&P.Base64.decode(In),Pt!=4&&Pt!=5&&(un?n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,Object(ot.a)(Ln,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:xt=Ut.sent;try{hn(xt)}catch(rr){hn("")}setTimeout(function(){Xn(Ln)},200);case 5:case"end":return Ut.stop()}},jt)}))},qt):P.Base64.decode(qt))),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,!un&&P.Base64.decode(gt),un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,fetch(kt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return xt=Ut.sent,Ut.t0=hn,Ut.next=6,xt.text();case 6:Ut.t1=Ut.sent,(0,Ut.t0)(Ut.t1),setTimeout(function(){Xn(kt)},200);case 9:case"end":return Ut.stop()}},jt)}))},gt))):null):null,(wn==null?void 0:wn.length)>0?n.a.createElement(Ke.a,{dataSource:wn,rowKey:"id",pagination:!1},n.a.createElement(lt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(xt,en){return n.a.createElement("span",null," ",dt()(xt).format("YYYY-MM-DD HH:mm:ss"))}}),n.a.createElement(lt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(xt,en){var Ut;return n.a.createElement(w.a,{className:xt===0?"c-green":"c-red",to:"/myproblems/".concat(Gt,"/record-detail/").concat(en.id)},(Ut=C.a[xt])===null||Ut===void 0?void 0:Ut.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),n.a.createElement(lt,{title:"\u6267\u884C\u7528\u65F6 (".concat(Xt?"MS":"S",")"),dataIndex:"execute_time",key:"execute_time",render:function(xt){return xt?Xt?xt:xt/1e3:""}}),n.a.createElement(lt,{title:"\u5185\u5B58\u6D88\u8017\uFF08".concat(Xt?"KB":"MB","\uFF09"),dataIndex:"execute_memory",key:"execute_memory",render:function(xt){return xt?Xt?xt:parseFloat((xt/1024).toFixed(2)):""}}),n.a.createElement(lt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),n.a.createElement(lt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:function(xt,en){return n.a.createElement(w.a,{className:"c-light-primary",to:"/myproblems/".concat(Gt,"/record-detail/").concat(en.id)},"\u67E5\u770B")}})):n.a.createElement("div",{style:{height:300,width:"100%"}}),bn>15?n.a.createElement(oe.a,{className:ze.a.pagination,current:fn,pageSize:15,total:bn,onChange:rn}):null,n.a.createElement(He.a,{close:!0,data:lr,type:lr.length?"txt":"",onClose:function(){return Xn("")},monacoEditor:{value:dn,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))},ht=F("BdwD"),be=F("DYRE"),_e=F("zeV3"),Ne=F("+BJd"),ke=F("mr32"),Ee=F("pPuO"),Ie=F.n(Ee),pe=F("9Bee"),ae={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},ie=function(Pe){var Ce=Pe.hack,It=Pe.onTriggerPraise,Kt=Pe.toDiscuss,vn=Ce.language,fn=Ce.difficult,rn=Ce.time_limit,Gt=Ce.username,Dt=Ce.user_path,Pt=Ce.user_praise,Ft=Ce.comments_count,Mt=Ce.praises_count,qt=Ce.description,gt=Ce.pass_count,un=Ce.submit_count,Qt=Object(x.h)(),Ln=ae[fn];return n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:Ie.a.info},n.a.createElement("li",null,"\u7F16\u7A0B\u8BED\uFF1A",n.a.createElement("b",null,vn)),n.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",n.a.createElement(ke.a,{color:Ln.color},Ln.name)),n.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",n.a.createElement("b",null,rn,"\u79D2"))),n.a.createElement(pe.a,{value:qt,className:Ie.a.desc}),n.a.createElement("ul",{className:Ie.a["commit-info"]},n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",n.a.createElement("b",null,gt))),n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",n.a.createElement("b",null,un))," "),n.a.createElement("li",{style:{flex:"1 0 0"}}),Qt.query.type!=="exercises"&&n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Kt})," ",n.a.createElement("b",null,Ft))," ")))},Q=F("dhSg"),q=F("oBTY"),te=F("M8RZ"),se=F("qJ4+");function ce(Pe,Ce){return Object(ot.c)("/problems/".concat(Pe,"/comments.json?page=").concat(Ce,"&limit=10"))}function Se(Pe){return Object(ot.f)("/discusses/".concat(Pe,"/plus.json"),{container_type:"Discuss",type:1})}function je(Pe,Ce,It){return Object(ot.f)("/problems/".concat(Pe,"/comments/reply.json"),{comments:{content:It,parent_id:Ce}})}function Ze(Pe,Ce){return Object(ot.f)("/problems/".concat(Pe,"/comments.json"),{comments:{content:Ce}})}function ut(Pe,Ce,It){return Object(ot.f)("/problems/".concat(Pe,"/comments/").concat(Ce,"/hidden.json"),It)}function it(Pe,Ce){return Object(ot.b)("/problems/".concat(Pe,"/comments/").concat(Ce))}var rt=F("U7T7"),Me=F("AMnG");function Ue(Pe){var Ce=Pe.author;return n.a.createElement("a",{href:"/users/".concat(Ce.login),target:"_blank"},n.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(c.a.IMG_SERVER,"/images/").concat(Ce.image_url),width:"50"}))}function we(Pe){var Ce=Pe.data,It=Pe.index,Kt=Pe.parentDiscussIndex,vn=Pe.user,fn=Pe.onSetActionType,rn=Ce.author,Gt=Ce.can_delete,Dt=Ce.content,Pt=Ce.id,Ft=Ce.time;function Mt(){fn({id:Pt,index:It,type:"delete-discuss",parentDiscussIndex:Kt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var qt=vn.admin||Gt||rn.user_id===vn.user_id;return n.a.createElement("div",{className:"discuss-item-container second-discuss "},n.a.createElement(Ue,{author:rn}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(rn.login),target:"_blank"},rn.name),n.a.createElement("span",{className:"grey"},Ft),n.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},qt?n.a.createElement("a",{onClick:Mt,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),n.a.createElement(pe.a,{className:"discuss-content",value:Dt})))}var ee=function(Pe){var Ce=Pe.user,It=Pe.data,Kt=Pe.index,vn=Pe.onPlusDiscuss,fn=Pe.onSetActionType,rn=Pe.activeDiscussIndex,Gt=Pe.onReplyDiscuss,Dt=Pe.onSetActiveDiscussIndex,Pt=It.content,Ft=It.children,Mt=It.hidden,qt=It.id,gt=It.praise_count,un=It.time,Qt=It.user_praise,Ln=It.can_delete,kt=It.author;function In(){Dt(qt)}function Nn(){vn(qt,!Qt,Kt)}function wn(){fn({id:qt,index:Kt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function bn(){fn({id:qt,index:Kt,params:{hidden:Mt?"0":"1"},type:"hidden-discuss",message:Mt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var An=Ce.admin||Ce.user_id===kt.user_id;return n.a.createElement("div",{className:"discuss-item-container",key:qt},n.a.createElement(Ue,{author:kt}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(kt.login),target:"_blank"}," ",kt.name," "),n.a.createElement("span",{className:"grey"},un)),n.a.createElement(pe.a,{className:"discuss-content",value:Pt}),Ft&&Ft.length>0?n.a.createElement("div",{className:"reply-discuss-container"},Ft.map(function(nr,lr){return n.a.createElement(we,{key:nr.id,data:nr,index:lr,user:Ce,onSetActionType:fn,parentDiscussIndex:Kt})})):null,n.a.createElement("div",{className:"btn-group"},An?n.a.createElement("a",{onClick:bn,title:Mt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},n.a.createElement("i",{className:Mt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Ln&&(!Ft||Ft.length==0)?n.a.createElement("a",{onClick:wn,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null,n.a.createElement("a",{onClick:In,title:"\u56DE\u590D"}," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," "),n.a.createElement("a",{onClick:Nn,className:Qt?"c-orange":""},n.a.createElement("i",{className:Qt?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),n.a.createElement("span",null,gt||""))),n.a.createElement(Me.a,{id:qt,activeDiscussIndex:rn,onReplyDiscuss:Gt})))},he=F("kaH+"),Fe=F("uD2n"),Re=F.n(Fe),et=F("Ot1p"),tt=function(Pe){var Ce=Pe.user_praise,It=Pe.praise_count,Kt=Pe.praisePlus,vn=Pe.onCreateDiscuss,fn=Pe.discuss_count,rn=Object(o.useState)(!1),Gt=Object(h.a)(rn,2),Dt=Gt[0],Pt=Gt[1],Ft=Object(o.useState)(""),Mt=Object(h.a)(Ft,2),qt=Mt[0],gt=Mt[1];function un(Nn){gt(Nn)}function Qt(){Pt(!0)}function Ln(){Pt(!1)}function kt(){return In.apply(this,arguments)}function In(){return In=Object(A.a)(i.a.mark(function Nn(){return i.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:vn(qt),gt(""),Pt(!1);case 3:case"end":return bn.stop()}},Nn)})),In.apply(this,arguments)}return n.a.createElement("div",{className:"".concat(Re.a["dis-input-editor-container"]," ").concat(Dt?Re.a.active:""," ")},n.a.createElement("div",{className:Dt?"hide ".concat(Re.a["text-area"]):Re.a["text-area"]},n.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Qt}),n.a.createElement("a",null," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",fn," "),n.a.createElement("a",{className:"c-light-black",onClick:Kt,title:Ce?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},n.a.createElement("i",{className:"mr3 ".concat(Ce?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),It?n.a.createElement("span",null,It):"")),Dt?n.a.createElement("div",{className:Re.a["input-mask"],onClick:Ln}):null,n.a.createElement("div",{className:Dt?Re.a["md-container"]:"".concat(Re.a["md-container"]," hide")},n.a.createElement(et.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:qt,height:240,onChange:un}),n.a.createElement("div",{className:Re.a["tip-container"],onClick:Ln},n.a.createElement("a",{className:Re.a["btn-send"],onClick:kt}," \u53D1\u9001 "))))},Te={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ae;(function(Pe){Pe[Pe.GET_DISCUSSES=0]="GET_DISCUSSES",Pe[Pe.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Pe[Pe.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Pe[Pe.PLUS_DISCUSS=3]="PLUS_DISCUSS",Pe[Pe.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Pe[Pe.SET_PAGE=5]="SET_PAGE",Pe[Pe.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ae||(Ae={}));function Qe(Pe,Ce){switch(Ce.type){case Ae.SHOW_DISCUSSES_LOADING:return Object(u.a)(Object(u.a)({},Pe),{},{loading:!0});case Ae.GET_DISCUSSES:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.TOP_OR_DOWN_DISCUSS:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.SET_ACTION_TYPE:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.PLUS_DISCUSS:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.SET_PAGE:return Object(u.a)(Object(u.a)({},Pe),{},{page:Ce.payload});case Ae.ACTIVE_DISCUSS_INDEX:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);default:throw new Error}}var Et=function(Pe){var Ce=Pe.user,It=Pe.identifier,Kt=Pe.hack,vn=Pe.onTriggerPraise,fn=Object(o.useReducer)(Qe,Te),rn=Object(h.a)(fn,2),Gt=rn[0],Dt=rn[1],Pt=Gt.loading,Ft=Gt.page,Mt=Gt.data,qt=Gt.count,gt=Gt.actionType,un=Gt.activeDiscussIndex,Qt=Object(o.useCallback)(Object(A.a)(i.a.mark(function dn(){var hn,pn,Xt;return i.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return Dt({type:Ae.SHOW_DISCUSSES_LOADING}),jt.next=3,ce(It,Ft);case 3:hn=jt.sent,pn=hn.comments,Xt=hn.disscuss_count,Dt({type:Ae.GET_DISCUSSES,payload:{data:pn,count:Xt,loading:!1}});case 6:case"end":return jt.stop()}},dn)})),[Ft,It]);Object(o.useEffect)(function(){Qt()},[It,Ft]);function Ln(dn){Dt({type:Ae.SET_PAGE,page:dn})}function kt(dn){Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:dn}})}function In(dn){un===dn?Dt({type:Ae.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):Dt({type:Ae.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:dn}})}function Nn(dn,hn,pn){return wn.apply(this,arguments)}function wn(){return wn=Object(A.a)(i.a.mark(function dn(hn,pn,Xt){var St;return i.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.prev=0,xt.next=3,Se(hn);case 3:St=xt.sent,Mt[Xt].user_praise=pn,Mt[Xt].praise_count=St.praise_count,Dt({type:Ae.PLUS_DISCUSS,payload:{data:Object(q.a)(Mt)}}),xt.next=12;break;case 9:xt.prev=9,xt.t0=xt.catch(0),console.log(xt.t0);case 12:case"end":return xt.stop()}},dn,null,[[0,9]])})),wn.apply(this,arguments)}function bn(){return An.apply(this,arguments)}function An(){return An=Object(A.a)(i.a.mark(function dn(){var hn,pn,Xt,St,jt,xt,en,Ut;return i.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:if(hn=gt.id,pn=gt.params,Xt=gt.type,St=gt.index,jt=gt.parentDiscussIndex,!(Xt==="hidden-discuss")){Mn.next=6;break}return Mn.next=4,ut(It,hn,pn);case 4:jt?Mt[jt].children[St].hidden=pn.hidden==1:Mt[St].hidden=pn.hidden==1,Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null,data:Object(q.a)(Mt)}});case 6:if(!(Xt==="delete-discuss")){Mn.next=31;break}return Mn.next=9,it(It,hn);case 9:if(!(jt||jt===0)){Mn.next=22;break}xt=Mt[jt].children,en=xt.length-1;case 12:if(!(en>=0)){Mn.next=19;break}if(!(xt[en].id===hn)){Mn.next=16;break}return xt.splice(en,1),Mn.abrupt("break",19);case 16:en--,Mn.next=12;break;case 19:Mt[jt].children=xt,Mn.next=30;break;case 22:Ut=Mt.length-1;case 23:if(!(Ut>=0)){Mn.next=30;break}if(!(Mt[Ut].id===hn)){Mn.next=27;break}return Mt.splice(Ut,1),Mn.abrupt("break",30);case 27:Ut--,Mn.next=23;break;case 30:Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null,data:Object(q.a)(Mt)}});case 31:case"end":return Mn.stop()}},dn)})),An.apply(this,arguments)}function nr(){Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null}})}function lr(dn,hn){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(A.a)(i.a.mark(function dn(hn,pn){return i.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.prev=0,St.next=3,je(It,hn,pn);case 3:Qt(),St.next=9;break;case 6:St.prev=6,St.t0=St.catch(0),console.log(St.t0);case 9:case"end":return St.stop()}},dn,null,[[0,6]])})),Xn.apply(this,arguments)}function xn(dn){return ur.apply(this,arguments)}function ur(){return ur=Object(A.a)(i.a.mark(function dn(hn){return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Dt({type:Ae.SHOW_DISCUSSES_LOADING}),Xt.next=3,Ze(It,hn);case 3:Qt();case 4:case"end":return Xt.stop()}},dn)})),ur.apply(this,arguments)}return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"discuss-panel"},Mt.length===0?n.a.createElement(ht.a,null):Mt.map(function(dn,hn){return n.a.createElement(ee,{onReplyDiscuss:lr,onPlusDiscuss:Nn,onSetActiveDiscussIndex:In,onSetActionType:kt,data:dn,index:hn,user:Ce,activeDiscussIndex:un})}),qt>10?n.a.createElement("div",{className:"pagination-container"},n.a.createElement(oe.a,{showQuickJumper:!0,onChange:Ln,current:Ft,total:qt})):null),n.a.createElement(tt,{user_praise:Kt.user_praise,praise_count:Kt.praises_count,praisePlus:vn,discuss_count:Kt.comments_count,onCreateDiscuss:xn}),n.a.createElement(te.a,null,n.a.createElement(g.a,{centered:!0,title:"\u63D0\u793A",visible:!!gt,onOk:bn,onCancel:nr},n.a.createElement("p",null,gt?gt.message:"")),n.a.createElement(he.a,null)))},vt=F("9kvl"),cn={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},yn={1:"#2fa34f",2:"#0152d9",3:"#fa6400"},ln=function(Pe){var Ce,It=Pe.hack,Kt=Pe.onTriggerPraise,vn=Pe.topicId,fn=Pe.page,rn=Pe.onPageChange,Gt=Pe.user,Dt=Pe.submitRecords,Pt=Pe.submitting,Ft=Pe.submitResult,Mt=Object(o.useState)("0"),qt=Object(h.a)(Mt,2),gt=qt[0],un=qt[1],Qt=Object(x.h)(),Ln=Object(o.useState)(!1),kt=Object(h.a)(Ln,2),In=kt[0],Nn=kt[1],wn=Object(o.useState)([]),bn=Object(h.a)(wn,2),An=bn[0],nr=bn[1],lr=Object(o.useState)(Object(u.a)(Object(u.a)({},Object(x.i)()),{},{page:1,per_page:20,name:""})),Xn=Object(h.a)(lr,2),xn=Xn[0],ur=Xn[1];function dn(St){var jt=St.target.id;un(jt)}Object(o.useEffect)(function(){var St=Q.a.subscribe("to-commit-info",function(){un("1")});return St},[]);function hn(){un("2")}function pn(){return Xt.apply(this,arguments)}function Xt(){return Xt=Object(A.a)(i.a.mark(function St(){var jt;return i.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return en.next=2,Object(ot.a)("/api/problems/my_hack_list.json",{method:"get",params:Object(u.a)({identifier:xn==null?void 0:xn.id},xn)});case 2:jt=en.sent,nr(jt);case 4:case"end":return en.stop()}},St)})),Xt.apply(this,arguments)}return console.log(Dt,"submitRecords"),n.a.createElement("div",{className:Be.a["left-panel"]},n.a.createElement("ul",{className:"".concat(Be.a["s-navs"]," ").concat(Be.a["bg-white"]," ").concat(Be.a.b1)},n.a.createElement("li",null,n.a.createElement("a",{className:gt==="0"?Be.a.active:"",id:"0",onClick:dn},"\u4EFB\u52A1\u63CF\u8FF0")),n.a.createElement("li",null,n.a.createElement("a",{className:gt==="1"?Be.a.active:"",id:"1",onClick:dn},"\u63D0\u4EA4\u8BB0\u5F55")),Qt.query.type!=="exercises"&&n.a.createElement("li",null,n.a.createElement("a",{className:gt==="2"?Be.a.active:"",id:"2",onClick:dn},"\u8BC4\u8BBA"))),n.a.createElement("div",{className:"".concat(Be.a["tab-panel-body"]," ").concat(gt==="0"?"":"hide")},n.a.createElement(ie,{hack:It,onTriggerPraise:Kt,toDiscuss:hn})),n.a.createElement("div",{style:{padding:"0 12px"},className:"".concat(Be.a["tab-panel-body"]," ").concat(gt==="1"?"":"hide")},!!(Dt!=null&&Dt.records_count)||Pt?n.a.createElement(_t,{page:fn,onPageChange:rn,topicId:vn,submitting:Pt,submitRecords:Dt,submitResult:Ft}):n.a.createElement(ht.a,null)),n.a.createElement("div",{className:"".concat(Be.a["tab-panel-body"]," ").concat(gt==="2"?"":"hide"),style:{padding:0}},n.a.createElement(Et,{user:Gt,identifier:It.identifier,hack:It,onTriggerPraise:Kt})),n.a.createElement(ge.a,{className:Be.a.drawer,headerStyle:{background:"#000",border:0},closable:!1,title:n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("span",{style:{color:"#fff"}},"\u9898\u76EE\u5217\u8868"),n.a.createElement(ne.a.Search,{onSearch:function(jt){xn.name=jt,xn.page=1,ur(Object(u.a)({},xn)),pn()},style:{width:180,margin:"0px 20px",marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22"}),n.a.createElement(H.a,{style:{width:100},placeholder:"\u8BF7\u9009\u62E9\u96BE\u5EA6",onChange:function(jt){xn.page=1,xn.difficult=jt||null,ur(Object(u.a)({},xn)),pn()}},n.a.createElement(H.a.Option,{value:0},"\u5168\u90E8"),n.a.createElement(H.a.Option,{value:1},"\u7B80\u5355"),n.a.createElement(H.a.Option,{value:2},"\u9002\u4E2D"),n.a.createElement(H.a.Option,{value:3},"\u56F0\u96BE"))),bodyStyle:{background:"#0f1e31",padding:"20px 0px"},footerStyle:{background:"#0f1e31",border:0,textAlign:"center"},footer:n.a.createElement("div",null,n.a.createElement(oe.a,{current:xn.page,className:"mt10 mb10",hideOnSinglePage:!0,total:An==null?void 0:An.count,pageSize:xn.per_page,onChange:function(jt,xt){xn.page=jt,xn.per_page=xt,pn()}})),width:530,placement:"left",onClose:function(){return Nn(!1)},visible:In},An==null||((Ce=An.data)===null||Ce===void 0)?void 0:Ce.map(function(St,jt){return n.a.createElement("div",{onClick:Object(A.a)(i.a.mark(function xt(){var en;return i.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,Object(ot.a)("/api/problems/".concat(St==null?void 0:St.identifier,"/start.json"),{method:"get",params:{hack_user_id:Gt==null?void 0:Gt.user_id}});case 2:en=rr.sent,en&&(vt.d.replace("/myproblems/".concat(en==null?void 0:en.identifier,"?type=1")),window.location.reload());case 4:case"end":return rr.stop()}},xt)})),className:"".concat(Be.a.list," ").concat(St!=null&&St.checked?Be.a.active:"")},n.a.createElement("div",null,(St==null?void 0:St.opened)&&(St==null?void 0:St.passed)&&n.a.createElement("i",{className:"iconfont icon-wancheng1 c-green-29b"}),(St==null?void 0:St.opened)&&!(St!=null&&St.passed)&&n.a.createElement("i",{className:"iconfont icon-cuowu c-red"}),n.a.createElement("span",{style:{color:"rgb(186, 196, 205)",fontWeight:400,fontSize:14,marginLeft:10}},St.name)),n.a.createElement("span",{style:{color:yn[St.difficult]}},cn[St.difficult]))})),(It==null?void 0:It.is_program)&&n.a.createElement("div",{onClick:function(){pn(),Nn(!0)},className:Be.a.btns},n.a.createElement("i",{className:"iconfont icon-timuliebiao"}),n.a.createElement("span",null,"\u9898\u76EE\u5217\u8868")))},bt=F("oFv4"),Rn=F.n(bt),zn=F("+aKw"),Tn=F("S/kP"),zt=F.n(Tn),Sn=F("t/PP"),Bn=F.n(Sn),pr=s.a.Countdown,nt={Java:"java",C:"c",Python:"py","C++":"c"},ct;(function(Pe){Pe[Pe.SET_LOADING=0]="SET_LOADING",Pe[Pe.GET_DATA=1]="GET_DATA",Pe[Pe.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Pe[Pe.SET_DATA=3]="SET_DATA",Pe[Pe.SET_DEBUGING=4]="SET_DEBUGING",Pe[Pe.SET_SUBMITING=5]="SET_SUBMITING",Pe[Pe.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Pe[Pe.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Pe[Pe.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Pe[Pe.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Pe[Pe.SET_PAGE=10]="SET_PAGE"})(ct||(ct={}));function qn(){return new Date().getTime()}var xr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function mr(Pe,Ce){switch(Ce.type){case ct.GET_DATA:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case ct.SET_DATA:return Object(u.a)(Object(u.a)({},Pe),{},{data:Ce.payload});case ct.SET_LOADING:return Object(u.a)(Object(u.a)({},Pe),{},{loading:Ce.payload});case ct.SET_SHOW_NOTE:return Object(u.a)(Object(u.a)({},Pe),{},{showNote:Ce.payload});case ct.SET_DEBUGING:return Object(u.a)(Object(u.a)({},Pe),{},{debuging:Ce.payload});case ct.SET_SUBMITING:return Object(u.a)(Object(u.a)({},Pe),{},{submitting:Ce.payload});case ct.GET_SUBMIT_RECORDS:return Object(u.a)(Object(u.a)({},Pe),{},{submitRecords:Ce.payload});case ct.SET_PAGE:return Object(u.a)(Object(u.a)({},Pe),{},{submitRecordPage:Ce.payload});case ct.SET_EXECUTE_MESSAGE:return Object(u.a)(Object(u.a)({},Pe),{},{executingMessage:Ce.payload});case ct.SET_EXECUTE_RESULT:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case ct.SET_SUBMIT_RESULT:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);default:throw new Error}}var Ur=ye.default=function(Pe){var Ce,It,Kt,vn,fn=Pe.children,rn=Object(o.useReducer)(mr,xr),Gt=Object(h.a)(rn,2),Dt=Gt[0],Pt=Gt[1],Ft=Object(x.i)(),Mt=Ft.id,qt=Object(x.g)(),gt=Object(x.h)(),un=Dt.loading,Qt=Dt.data,Ln=Dt.debugResult,kt=Dt.submitResult,In=Dt.submitRecords,Nn=Dt.submitRecordPage,wn=Dt.showNote,bn=Dt.debuging,An=Dt.submitting,nr=Dt.executingMessage,lr=Object(o.useState)("#FFF"),Xn=Object(h.a)(lr,2),xn=Xn[0],ur=Xn[1],dn=Object(o.useState)(null),hn=Object(h.a)(dn,2),pn=hn[0],Xt=hn[1],St=Object(o.useState)({}),jt=Object(h.a)(St,2),xt=jt[0],en=jt[1],Ut=Object(o.useState)(!0),rr=Object(h.a)(Ut,2),Mn=rr[0],dr=rr[1],Qr=Object(o.useState)(!1),Ir=Object(h.a)(Qr,2),Gr=Ir[0],Mr=Ir[1],Or=Object(o.useRef)(null),Br=Object(o.useRef)(0),Fn=Qt==null?void 0:Qt.user,Rt=Qt==null?void 0:Qt.hack,zr=Object(o.useRef)(),gr=Object(o.useRef)();Object(o.useEffect)(function(){var Zt;if(clearTimeout(zr.current),clearTimeout(gr.current),xt!=null&&(Zt=xt.exercise)!==null&&Zt!==void 0&&Zt.left_time){var Ct,Jt;if((xt==null||((Ct=xt.exercise)===null||Ct===void 0)?void 0:Ct.left_time)>1800){var yt;gr.current=setTimeout(function(){g.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:n.a.createElement(f.a,null),okText:"\u77E5\u9053\u4E86"})},((xt==null||((yt=xt.exercise)===null||yt===void 0)?void 0:yt.left_time)-1800)*1e3)}if((xt==null||((Jt=xt.exercise)===null||Jt===void 0)?void 0:Jt.left_time)>900){var on;zr.current=setTimeout(function(){g.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:n.a.createElement(f.a,null),okText:"\u77E5\u9053\u4E86"})},((xt==null||((on=xt.exercise)===null||on===void 0)?void 0:on.left_time)-900)*1e3)}}},[xt]),Object(o.useEffect)(function(){function Zt(){return Ct.apply(this,arguments)}function Ct(){return Ct=Object(A.a)(i.a.mark(function Jt(){var yt,on,Cn,Hn,_r,yr,Bt,Wr,Xr,wr,Kn,$n;return i.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return dr(!0),Jn.next=3,Object(T.d)(Mt);case 3:if(yt=Jn.sent,setTimeout(function(){dr(!1)},800),yt.status===401)document.location.href="/user/login";else{try{yt.hack.code=P.Base64.decode(yt.hack.code)}catch(Kr){console.log(Kr)}yt.hack=Object(u.a)(Object(u.a)({},yt.hack),{},{is_program:(gt==null||((on=gt.query)===null||on===void 0)?void 0:on.type)==="1"}),Pt({type:ct.GET_DATA,payload:{loading:!1,data:yt}})}if(!(gt.query.type==="exercises")){Jn.next=18;break}if(!(gt.query.coursesId=="coursesId")){Jn.next=13;break}return Jn.next=10,Object(y.Y)({categoryId:gt.query.exercisesId,login:gt.query.login});case 10:yr=Jn.sent,Jn.next=16;break;case 13:return Jn.next=15,Object(y.z)({categoryId:gt.query.exercisesId,login:gt.query.login});case 15:yr=Jn.sent;case 16:en(Object(u.a)({},yr)),(Cn=yr)!==null&&Cn!==void 0&&Cn.left_banner_id&&(Hn=yr)!==null&&Hn!==void 0&&(_r=Hn.exercise)!==null&&_r!==void 0&&_r.left_time&&(Xt(Date.now()+((Bt=yr)===null||Bt===void 0||((Wr=Bt.exercise)===null||Wr===void 0)?void 0:Wr.left_time)*1e3),setTimeout(function(){ur("red")},(((Xr=yr)===null||Xr===void 0||((wr=Xr.exercise)===null||wr===void 0)?void 0:wr.left_time)-300>0?((Kn=yr)===null||Kn===void 0||(($n=Kn.exercise)===null||$n===void 0)?void 0:$n.left_time)-300:0)*1e3));case 18:case"end":return Jn.stop()}},Jt)})),Ct.apply(this,arguments)}Mt&&Zt()},[Mt]),Object(o.useEffect)(function(){return gt.query.type==="exercises"&&(window.addEventListener(Object(v.c)(),wt),window.focus(),window.onblur=function(){Object(v.a)()&&Object(v.b)()}),function(){document.removeEventListener(Object(v.c)(),wt)}},[Mt]),Object(o.useEffect)(function(){Mt&&Rt!==null&&Rt!==void 0&&Rt.language&&Wt()},[Mt,Nn,Rt==null?void 0:Rt.language]),Object(o.useEffect)(function(){return Rt!=null&&Rt.is_program&&(Br.current=0,Or.current=setInterval(function(){ni()},15e3)),function(){clearInterval(Or.current)}},[Rt==null?void 0:Rt.is_program]);var ni=function(){var Zt=Object(A.a)(i.a.mark(function Ct(){var Jt;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.next=2,Object(ot.a)("/api/myproblems/".concat(Mt,"/save_long_time.json"),{method:"get",params:{answer_long_time:Br.current}});case 2:Jt=on.sent;case 3:case"end":return on.stop()}},Ct)}));return function(){return Zt.apply(this,arguments)}}(),wt=function(){window.parent.postMessage("backExercise","*")};function Wt(){return At.apply(this,arguments)}function At(){return At=Object(A.a)(i.a.mark(function Zt(){var Ct;return i.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.prev=0,yt.next=3,Object(T.f)(Mt,{limit:15,page:Nn,language:Rt==null?void 0:Rt.language});case 3:Ct=yt.sent,Pt({type:ct.GET_SUBMIT_RECORDS,payload:Ct}),yt.next=10;break;case 7:yt.prev=7,yt.t0=yt.catch(0),console.log(yt.t0);case 10:case"end":return yt.stop()}},Zt,null,[[0,7]])})),At.apply(this,arguments)}function Vt(Zt){Pt({type:ct.SET_PAGE,payload:Zt})}function $t(){return _n.apply(this,arguments)}function _n(){return _n=Object(A.a)(i.a.mark(function Zt(){var Ct;return i.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(T.k)(Mt,{code:P.Base64.encode(Rt.code),language:Rt==null?void 0:Rt.language});case 2:return Ct=yt.sent,yt.abrupt("return",Ct);case 4:case"end":return yt.stop()}},Zt)})),_n.apply(this,arguments)}function tn(){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(A.a)(i.a.mark(function Zt(){var Ct,Jt,yt,on,Cn,Hn,_r;return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!An){Bt.next=2;break}return Bt.abrupt("return");case 2:return Pt({type:ct.SET_SUBMITING,payload:!0}),Bt.prev=3,Q.a.publish("to-commit-info"),Bt.next=7,$t();case 7:if(Ct=Bt.sent,console.log(Ct,1),!(Ct.status===0)){Bt.next=23;break}return _r=function(){return _r=Object(A.a)(i.a.mark(function Xr(){var wr,Kn,$n,Hr,Jn,Kr,Hi;return i.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Object(T.c)(Mt,"submit");case 2:if(wr=Pr.sent,Kn=wr.status,$n=wr.data,Hr=qn(),Jn=Hr-Cn>(on+3)*1e3,Kn!==0&&!Jn&&setTimeout(Hn,1e3),!Jn){Pr.next=12;break}return g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_SUBMITING,payload:!1}),Pr.abrupt("return");case 12:if(!(Kn===0)){Pr.next=19;break}return $n.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),($n==null?void 0:$n.status)===0&&(gt==null||((Kr=gt.query)===null||Kr===void 0)?void 0:Kr.type)==="1"&&Mr(!0),Pr.next=17,Object(T.f)(Mt,{limit:15,page:Nn,language:Rt==null?void 0:Rt.language});case 17:Hi=Pr.sent,Pt({type:ct.SET_SUBMIT_RESULT,payload:Object(u.a)(Object(u.a)({},Dt),{},{submitResult:$n,submitting:!1,submitRecords:Hi})});case 19:case"end":return Pr.stop()}},Xr)})),_r.apply(this,arguments)},Hn=function(){return _r.apply(this,arguments)},Jt={},gt.query.type==="exercises"&&(Jt.extras={exercise_id:gt.query.exercisesId,question_id:gt.query.questionId}),Bt.next=16,Object(T.h)(Mt,Jt);case 16:if(yt=Bt.sent,!(yt.status===-1)){Bt.next=20;break}return window.parent.location.href="/classrooms/".concat(gt.query.coursesId,"/exercise/").concat(gt.query.exercisesId,"/detail"),Bt.abrupt("return");case 20:on=Rt.time_limit,Cn=qn(),Hn();case 23:Bt.next=29;break;case 25:Bt.prev=25,Bt.t0=Bt.catch(3),console.log(Bt.t0),Pt({type:ct.SET_SUBMITING,payload:!1});case 29:case"end":return Bt.stop()}},Zt,null,[[3,25]])})),Pn.apply(this,arguments)}function er(){return Yt.apply(this,arguments)}function Yt(){return Yt=Object(A.a)(i.a.mark(function Zt(){var Ct,Jt,yt,on,Cn,Hn,_r;return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return Dt.debuging=!0,Pt({type:ct.SET_DEBUGING,payload:!0}),Bt.prev=2,Bt.next=5,$t();case 5:if(Ct=Bt.sent,!(Ct.status===0)){Bt.next=22;break}return _r=function(){return _r=Object(A.a)(i.a.mark(function Xr(){var wr,Kn,$n,Hr,Jn,Kr;return i.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:return Vr.next=2,Object(T.c)(Mt,"debug");case 2:if(wr=Vr.sent,Kn=wr.status,$n=wr.message,Hr=wr.data,Jn=qn(),Kr=Jn-Cn>(Jt+3)*1e3,Kn!==0&&!Kr&&(Pt({type:ct.SET_EXECUTE_MESSAGE,payload:$n}),setTimeout(Hn,1e3)),!Kr){Vr.next=13;break}return g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_DEBUGING,payload:!1}),Vr.abrupt("return");case 13:Kn===0&&(Pt({type:ct.SET_DEBUGING,payload:!1}),Hr.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Hr.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_EXECUTE_RESULT,payload:Object(u.a)(Object(u.a)({},Dt),{},{debugResult:Hr,debuging:!1})}));case 14:case"end":return Vr.stop()}},Xr)})),_r.apply(this,arguments)},Hn=function(){return _r.apply(this,arguments)},Jt=Rt.time_limit,yt={input:encodeURIComponent(Qt.test_case.input)},gt.query.type==="exercises"&&(yt.exercise_id=gt.query.exercisesId),Bt.next=14,Object(T.b)(Mt,yt);case 14:if(on=Bt.sent,!(on.status===-1&>.query.coursesId)){Bt.next=18;break}return window.parent.location.href="/classrooms/".concat(gt.query.coursesId,"/exercise/").concat(gt.query.exercisesId,"/detail"),Bt.abrupt("return");case 18:Cn=qn(),Hn(),Bt.next=23;break;case 22:Pt({type:ct.SET_DEBUGING,payload:!1});case 23:Bt.next=28;break;case 25:Bt.prev=25,Bt.t0=Bt.catch(2),console.log(Bt.t0);case 28:return Bt.prev=28,Bt.finish(28);case 30:case"end":return Bt.stop()}},Zt,null,[[2,25,28,30]])})),Yt.apply(this,arguments)}function vr(Zt){Pt({type:ct.SET_DATA,payload:Object(u.a)(Object(u.a)({},Qt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{code:Zt})})})}var mn=function(){var Zt=Object(A.a)(i.a.mark(function Ct(Jt){var yt,on;return i.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(ot.a)("/api/problems/".concat(Rt==null?void 0:Rt.identifier,"/start.json"),{method:"get",params:{language:Jt==="C++"||Jt==="c++"?encodeURIComponent(Jt):Jt,hack_user_id:Fn==null?void 0:Fn.user_id}});case 2:yt=Hn.sent,yt.status!==-1&&qt.replace("/myproblems/".concat(yt==null?void 0:yt.identifier,"?type=").concat(gt==null||((on=gt.query)===null||on===void 0)?void 0:on.type));case 4:case"end":return Hn.stop()}},Ct)}));return function(Jt){return Zt.apply(this,arguments)}}();function Vn(Zt){var Ct=Zt.target.value;Pt({type:ct.SET_DATA,payload:Object(u.a)(Object(u.a)({},Qt),{},{test_case:{input:Ct}})})}function Yn(){return cr.apply(this,arguments)}function cr(){return cr=Object(A.a)(i.a.mark(function Zt(){var Ct;return i.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.prev=0,yt.next=3,Object(T.g)(Mt);case 3:Ct=yt.sent,Ct.status===401?qt.replace("/login",{from:gt.pathname}):vr(P.Base64.decode(Ct.code)),yt.next=10;break;case 7:yt.prev=7,yt.t0=yt.catch(0),console.log(yt.t0);case 10:case"end":return yt.stop()}},Zt,null,[[0,7]])})),cr.apply(this,arguments)}function Wi(){g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",n.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(A.a)(i.a.mark(function Ct(){var Jt;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.next=2,Object(T.i)(Mt);case 2:Jt=on.sent,Jt.status===401?qt.replace("/login",{from:gt.pathname}):vr(P.Base64.decode(Jt.code));case 4:case"end":return on.stop()}},Ct)}))()}})}function gn(){Pt({type:ct.SET_SHOW_NOTE,payload:!0})}function an(){Pt({type:ct.SET_SHOW_NOTE,payload:!1})}function sn(Zt){return fr.apply(this,arguments)}function fr(){return fr=Object(A.a)(i.a.mark(function Zt(Ct){return i.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(T.a)(Mt,Ct);case 2:Pt({type:ct.GET_DATA,payload:{showNote:!1,data:Object(u.a)(Object(u.a)({},Qt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{notes:Ct.notes})})}});case 3:case"end":return yt.stop()}},Zt)})),fr.apply(this,arguments)}var Zr={hack:Rt,isLoading:Mn,input:Qt==null||((Ce=Qt.test_case)===null||Ce===void 0)?void 0:Ce.input,language:Rt==null?void 0:Rt.language,code:Rt==null?void 0:Rt.code,title:"main."+nt[Rt==null?void 0:Rt.language],modify_code:Rt==null?void 0:Rt.modify_code,notes:Rt==null?void 0:Rt.notes,debugResult:Ln,debuging:bn,submitting:An,executingMessage:nr,onCancelNote:an,onAddNote:sn,showNote:wn,user:Fn,onShowNote:gn,onSubmitCode:tn,onChangeCode:vr,onChangeInput:Vn,onDebugCode:er,onResetCode:Yn,onSyncCode:Wi,onUpdateCode:$t,onChangeLanguage:mn};function qr(){return ri.apply(this,arguments)}function ri(){return ri=Object(A.a)(i.a.mark(function Zt(){var Ct,Jt,yt;return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(T.j)(Rt.id,{container_type:"Hack",type:1});case 2:Ct=Cn.sent,Jt=Ct.praise_count,yt=Object(u.a)(Object(u.a)({},Qt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{praises_count:Jt,user_praise:!Rt.user_praise})}),Pt({type:ct.SET_DATA,payload:yt});case 6:case"end":return Cn.stop()}},Zt)})),ri.apply(this,arguments)}var Ti={topicId:Mt,submitResult:kt,submitRecords:In,submitting:An,page:Nn,onPageChange:Vt,hack:Rt,user:Qt==null?void 0:Qt.user,onTriggerPraise:qr};return n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a,{spinning:un,delay:500},Qt?n.a.createElement(n.a.Fragment,null,n.a.createElement("header",{className:z.a.header},gt.query.type!=="exercises"&&n.a.createElement("div",null,n.a.createElement("img",{src:"".concat(c.a.IMG_SERVER,"/images/").concat(Fn.image_url),alt:"user",width:30}),n.a.createElement("span",null,Fn.name)),n.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},n.a.createElement("div",null,Rt.name),(Rt==null?void 0:Rt.is_program)&&n.a.createElement(zn.a,{defaultValue:Rt==null?void 0:Rt.answer_long_time,onChange:function(Ct){console.log(Ct),Br.current=Ct},className:"font12 c-grey-999"})),Fn.hack_manager?n.a.createElement(w.a,{className:z.a.btn_back,to:(gt==null||((It=gt.query)===null||It===void 0)?void 0:It.type)==="1"?"/problems/".concat(Rt.identifier,"/edit?type=1"):"/problems/".concat(Rt.identifier,"/edit"),style:{marginRight:10}}," ",n.a.createElement(O.a,null)," \u7F16\u8F91"):null,(xt==null||((Kt=xt.exercise)===null||Kt===void 0)?void 0:Kt.left_time)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("span",{style:{color:xn},className:"iconfont icon-kaoshishichang mr5"}),n.a.createElement("span",{className:"c-white mr20"},n.a.createElement(pr,{valueStyle:{color:xn,fontSize:16,fontWeight:"normal"},title:n.a.createElement("span",{style:{color:xn,fontSize:16}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:pn,onFinish:Object(A.a)(i.a.mark(function Zt(){var Ct,Jt;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.next=2,Object(y.Z)({categoryId:gt.query.exercisesId,commit_method:2});case 2:Ct=on.sent,(Ct==null?void 0:Ct.status)===0&&($t(),g.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:n.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",n.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Cn=Object(A.a)(i.a.mark(function _r(){return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:window.parent.location.href="/classrooms/".concat(gt.query.coursesId,"/exercise/").concat(gt.query.exercisesId,"/detail");case 1:case"end":return Bt.stop()}},_r)}));function Hn(){return Cn.apply(this,arguments)}return Hn}()})),(Ct==null?void 0:Ct.status)===-3&&(Jt=parseInt(Ct==null?void 0:Ct.message),Xt(Date.now()+Jt*1e3));case 5:case"end":return on.stop()}},Zt)}))}))),(gt==null||((vn=gt.query)===null||vn===void 0)?void 0:vn.type)==="exercises"?n.a.createElement(k.a,{type:"primary",onClick:function(){$t(),g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){wt()}})}},n.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," \u8FD4\u56DE\u8BD5\u5377"):n.a.createElement("span",{className:z.a.btn_back,onClick:function(){var Ct;if((gt==null||((Ct=gt.query)===null||Ct===void 0)?void 0:Ct.type)==="1"){var Jt,yt=(Jt=localStorage.getItem("program_homework"))===null||Jt===void 0?void 0:Jt.split(",");qt.push("/classrooms/".concat(yt==null?void 0:yt[0],"/program_homework/").concat(yt==null?void 0:yt[1],"/detail"))}else qt.push("/problemset")}}," ",n.a.createElement(S.a,null),"\u9000\u51FA")),n.a.createElement(R.a,{size:"large",spinning:Mn},n.a.createElement(p.a,{className:"my-problems",leftChild:n.a.createElement(ln,Ti),rightChild:n.a.createElement(Lt,Zr)}))):null,n.a.createElement(g.a,{centered:!0,closable:!1,width:680,footer:null,visible:Gr,className:"oj-modal"},n.a.createElement("section",{className:"oj-modal-content"},n.a.createElement("div",{className:"oj-modal-head"},n.a.createElement("img",{src:Rn.a,alt:""}),n.a.createElement("i",{onClick:function(){return Mr(!1)},className:"iconfont icon-guanbi1"})),n.a.createElement("aside",null,n.a.createElement("img",{className:"mr30",src:Bn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",n.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},kt==null?void 0:kt.execute_time,"ms"),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(kt==null?void 0:kt.time_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("aside",{className:"mb50"},n.a.createElement("img",{src:zt.a,className:"mr30"}),n.a.createElement("span",{className:"oj-modal-tt"},n.a.createElement("span",null,n.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),n.a.createElement("span",{className:"c-light-primary"},kt==null?void 0:kt.execute_memory,"kb")),n.a.createElement("span",null,n.a.createElement("span",null))),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(kt==null?void 0:kt.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("div",{id:"oj-modal-next",onClick:Object(A.a)(i.a.mark(function Zt(){var Ct,Jt,yt;return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!(kt!=null&&kt.next_identifier)){Cn.next=7;break}return Cn.next=3,Object(ot.a)("/api/problems/".concat(kt==null?void 0:kt.next_identifier,"/start.json"),{method:"get",params:{hack_user_id:Fn==null?void 0:Fn.user_id}});case 3:Ct=Cn.sent,Ct&&(qt.replace("/myproblems/".concat(Ct==null?void 0:Ct.identifier,"?type=1")),window.location.reload()),Cn.next=9;break;case 7:yt=(Jt=localStorage.getItem("program_homework"))===null||Jt===void 0?void 0:Jt.split(","),qt.push("/classrooms/".concat(yt==null?void 0:yt[0],"/program_homework/").concat(yt==null?void 0:yt[1],"/detail"));case 9:case"end":return Cn.stop()}},Zt)})),className:"oj-modal-btn"},kt!=null&&kt.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875")))))};function Un(Pe){var Ce,It=Pe.title,Kt=Pe.modify_code,vn=Pe.onSyncCode,fn=Pe.onShowCodeSetting,rn=Pe.onResetCode,Gt=Pe.hack,Dt=Pe.onChangeLanguage,Pt=function(){g.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:n.a.createElement(E.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:rn})};return console.log(Gt,"hack"),n.a.createElement("div",{className:"action-bar",style:{paddingLeft:0}},(Gt==null?void 0:Gt.is_program)&&n.a.createElement(H.a,{className:"oj-select",value:Gt==null?void 0:Gt.language,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Gt==null||((Ce=Gt.all_language)===null||Ce===void 0)?void 0:Ce.map(function(Ft){return n.a.createElement(H.a.Option,{key:Ft,value:Ft},Ft)})),n.a.createElement("span",null),Kt?n.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:vn},n.a.createElement("img",{src:I.a,alt:"notice"})):null,n.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Pt},n.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),n.a.createElement("a",{onClick:fn},n.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Lt(Pe){var Ce=Pe.input,It=Pe.showNote,Kt=Pe.onShowNote,vn=Pe.notes,fn=Pe.onCancelNote,rn=Pe.onAddNote,Gt=Pe.debugResult,Dt=Pe.language,Pt=Pe.debuging,Ft=Pe.submitting,Mt=Pe.executingMessage,qt=Pe.code,gt=Pe.onSubmitCode,un=Pe.onDebugCode,Qt=Pe.onChangeCode,Ln=Pe.onChangeInput,kt=Pe.onUpdateCode,In=Pe.user,Nn=Pe.isLoading,wn=Object(K.a)(Pe,["input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading"]);function bn(nr){return n.a.createElement(Un,Object(Y.a)({},wn,{onShowCodeSetting:nr}))}var An=Object(u.a)({input:Ce,debugResult:Gt,debuging:Pt,submitting:Ft,executingMessage:Mt,onDebugCode:un,onChangeCode:Qt,onSubmitCode:gt,onChangeInput:Ln,user:In},wn);return n.a.createElement("div",{className:"right-panel"},n.a.createElement(_.a,{isLoading:Nn,language:Dt,value:qt,onChange:Qt,ActionBarRender:bn}),n.a.createElement("div",{className:"note-form-area ".concat(It?"active":"")},n.a.createElement(le,{onCancel:fn,notes:vn,callback:rn})),n.a.createElement(C.b,An))}},RELg:function(Le,ye,F){var Y=F("MFOe"),K=Y.Global;Le.exports={name:"oldIE-userDataStorage",write:j,read:k,each:A,remove:D,clearAll:g};var L="storejs",H=K.document,N=d(),R=(K.navigator?K.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function j(s,l){if(R)return;var i=u(s);N(function(o){o.setAttribute(i,l),o.save(L)})}function k(s){if(R)return;var l=u(s),i=null;return N(function(o){i=o.getAttribute(l)}),i}function A(s){N(function(l){for(var i=l.XMLDocument.documentElement.attributes,o=i.length-1;o>=0;o--){var n=i[o];s(l.getAttribute(n.name),n.name)}})}function D(s){var l=u(s);N(function(i){i.removeAttribute(l),i.save(L)})}function g(){N(function(s){var l=s.XMLDocument.documentElement.attributes;s.load(L);for(var i=l.length-1;i>=0;i--)s.removeAttribute(l[i].name);s.save(L)})}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function u(s){return s.replace(/^\d/,"___$&").replace(h,"___")}function d(){if(!H||!H.documentElement||!H.documentElement.addBehavior)return null;var s="script",l,i,o;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window'),i.close(),l=i.w.frames[0].document,o=l.createElement("div")}catch(n){o=H.createElement("div"),l=H.body}return function(n){var f=[].slice.call(arguments,0);f.unshift(o),l.appendChild(o),o.addBehavior("#default#userData"),o.load(L),n.apply(this,f),l.removeChild(o);return}}},"S+dL":function(Le,ye){Le.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"S/kP":function(Le,ye,F){Le.exports=F.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Le,ye,F){var Y=F("wTVA"),K=F("EbDI"),L=F("ZhPi"),H=F("wkBT");function N(R){return Y(R)||K(R)||L(R)||H()}Le.exports=N,Le.exports.__esModule=!0,Le.exports.default=Le.exports},SJMd:function(Le,ye){/** +\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function pe(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,ie=ae?"Cmd":"Ctrl",Q=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],q=(pt={},Object(k.a)(pt,ie+"-B","bold"),Object(k.a)(pt,ie+"-I","italic"),pt),te=(be={},Object(k.a)(be,Xe,"\u6DFB\u52A0\u94FE\u63A5"),Object(k.a)(be,ot,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(k.a)(be,He,"\u6DFB\u52A0\u6587\u4EF6"),Object(k.a)(be,ft,"\u6DFB\u52A0\u8868\u683C"),be),se=ye.a=function(ce){var Se=ce.defaultValue,je=Se===void 0?"":Se,Ze=ce.onChange,ut=ce.width,it=ut===void 0?"100%":ut,rt=ce.height,Me=rt===void 0?400:rt,Ue=ce.miniToolbar,we=Ue===void 0?!1:Ue,ee=ce.isFocus,he=ee===void 0?!1:ee,Fe=ce.watch,Re=ce.insertTemp,et=ce.mode,tt=et===void 0?"markdown":et,Te=ce.id,Ae=Te===void 0?"markdown-editor-id":Te,Qe=ce.showResizeBar,Et=Qe===void 0?!1:Qe,vt=ce.noStorage,cn=vt===void 0?!1:vt,yn=ce.showNullButton,ln=yn===void 0?!1:yn,bt=ce.hidetoolBar,An=bt===void 0?!1:bt,zn=ce.fullScreen,Tn=zn===void 0?!1:zn,Gt=ce.onBlur,Sn=ce.onCMBeforeChange,Wn=ce.onFullScreen,gr=ce.className,nt=gr===void 0?"":gr,ct=ce.disablePaste,qn=ct===void 0?!1:ct,Tr=ce.placeholder,vr=Tr===void 0?"":Tr,Fr=ce.values,Fn=Fr===void 0?"":Fr,Lt=Object(g.useState)(null),Pe=Object(j.a)(Lt,2),Ce=Pe[0],It=Pe[1],Ht=Object(g.useState)(je),vn=Object(j.a)(Ht,2),fn=vn[0],nn=vn[1],Kt=Object(g.useState)(Fe),Dt=Object(j.a)(Kt,2),Pt=Dt[0],Ft=Dt[1],Mt=Object(g.useState)(Tn),Zt=Object(j.a)(Mt,2),ht=Zt[0],un=Zt[1],Jt=Object(g.useState)(""),In=Object(j.a)(Jt,2),kt=In[0],Mn=In[1],kn=Object(g.useState)(0),wn=Object(j.a)(kn,2),bn=wn[0],Dn=wn[1],rr=Object(g.useState)(Me),ur=Object(j.a)(rr,2),Xn=ur[0],xn=ur[1],dr=Object(g.useState)(!1),dn=Object(j.a)(dr,2),hn=dn[0],pn=dn[1],zt=Object(g.useRef)(Object(Je.a)()),St=Object(g.useRef)(!1),jt=Object(g.useRef)(),xt=Object(g.useRef)(),qt=Object(g.useRef)(),Ut=Object(g.useRef)(),ir=Object(g.useRef)(),Pn=function(){var wt=Object(R.a)(D.a.mark(function Bt(){var At,Xt;return D.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(at.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zt.current}});case 2:Xt=_n.sent,Xt!=null&&(At=Xt.attachments)!==null&&At!==void 0&&At.length&&(console.log("cm:",Ce,xt),Xt.attachments.map(function(en){en.content_type.indexOf("image")>-1?Ce.replaceSelection("![,](/api/attachments/".concat(en.id,"?type=").concat(en.content_type,")")):en.content_type.indexOf("video")>-1?Ce.replaceSelection('')):en.content_type.indexOf("pdf")>-1?Ce.replaceSelection('').concat(en.name,"")):Ce.replaceSelection("[".concat(en.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(en.id,"?type=").concat(en.content_type,")"))}));case 4:case"end":return _n.stop()}},Bt)}));return function(){return wt.apply(this,arguments)}}();Object(g.useEffect)(function(){nn(Fn),Ce==null||Ce.setValue(Fn)},[Fn]),Object(g.useEffect)(function(){Wn==null||Wn(ht)},[ht]),Object(g.useEffect)(function(){if(xt.current){var wt=d.a.fromTextArea(xt.current,{mode:tt,lineNumbers:!we,lineWrapping:!0,value:je,autoCloseTags:!0,autoCloseBrackets:!0});he&&wt.focus();function Bt(At,Xt){if(qn){Xt.preventDefault();return}var Yt=Xt.clipboardData;if(Yt){var _n=Yt.types.toString(),en=Yt.items;if(_n==="Files"||Yt.types.indexOf("Files")>-1){if(Xt.preventDefault(),tt=="stex")return;try{var Nn,er=en[1];((Nn=en[0])===null||Nn===void 0?void 0:Nn.kind)==="file"&&(er=en[0]);var Vt=er.getAsFile(),yr=Vt.name.split(".").pop();xe(Vt,function(mn){if(mn.id){var Vn,Yn,fr;(Vt==null||((Vn=Vt.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(Vt==null||((Yn=Vt.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?wt.replaceSelection('')):(Vt==null||((fr=Vt.type)===null||fr===void 0)?void 0:fr.indexOf("pdf"))>-1?wt.replaceSelection('').concat(Vt.name,"")):Q.includes(yr)?wt.replaceSelection('').concat(Vt.name,"")):wt.replaceSelection("[".concat(Vt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})}catch(mn){N.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return wt.on("paste",Bt),wt.on("dragleave",function(At,Xt){qt.current.classList.remove("mouse-hover-md")}),wt.on("dragover",function(At,Xt){qt.current.classList.add("mouse-hover-md")}),wt.on("drop",function(At,Xt){qt.current.classList.add("mouse-hover-md");var Yt;if(Yt=Xt.dataTransfer.files,Yt.length>0){Xt.preventDefault(),Xt.stopPropagation();for(var _n=function(er){var Vt=Yt[er],yr=Vt.name.split(".").pop();xe(Vt,function(mn){if(mn.id){var Vn,Yn,fr;(Vt==null||((Vn=Vt.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(Vt==null||((Yn=Vt.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?wt.replaceSelection('')):(Vt==null||((fr=Vt.type)===null||fr===void 0)?void 0:fr.indexOf("pdf"))>-1?wt.replaceSelection('').concat(Vt.name,"")):Q.includes(yr)?wt.replaceSelection('').concat(Vt.name,"")):wt.replaceSelection("[".concat(Vt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})},en=0;en0||en.target.offsetWidth>0)&&(cr(),Ce.setSize("100%","100%"),Ce.refresh())}}catch(Nn){Yt.e(Nn)}finally{Yt.f()}});return At.observe(xt.current.parentElement),At}if(Ce){var Bt=wt();return function(){Bt.unobserve(xt.current.parentElement)}}},[Ce,cr]),Object(g.useEffect)(function(){if(Ce){for(var wt=[],Bt=function(){var en=Xt[At];Yt=Object(j.a)(en,2);var Nn=Yt[0],er=Yt[1],Vt=Object(k.a)({},Nn,function(){Qr(er)});wt.push(Vt),Ce.addKeyMap(Vt)},At=0,Xt=Object.entries(q);At0){var wt=new Date().getTime(),Bt=window.sessionStorage.getItem(Ae);wt>=bn+ke&&(!Bt||Bt!==fn)&&(window.sessionStorage.setItem(Ae,fn),pn(!0))}},ke),Object(g.useEffect)(function(){Ft(Fe)},[Ce,Fe]),Object(g.useEffect)(function(){Ce&&(he&&Ce.focus())},[Ce,he]),Object(g.useEffect)(function(){if(Pt&&Ce){var wt=Ce.getScrollerElement();function Bt(At){var Xt=At.target;if(ir.current){var Yt=Xt.scrollTop/Xt.scrollHeight;ir.current.scrollTop=ir.current.scrollHeight*Yt}}return wt.addEventListener("scroll",Bt),function(){wt.removeEventListener("scroll",Bt)}}},[Ce,Pt]),Object(g.useEffect)(function(){if(Ce&&Sn){function wt(Bt,At){Sn(Bt,At)}return Ce.on("beforeChange",wt),function(){Ce.off("beforeChange",wt)}}},[Ce,Sn]),Object(g.useEffect)(function(){if(Ce&&Gt){function wt(){Gt(Ce.getValue())}return Ce.on("blur",wt),function(){Ce.off("blur",wt)}}},[Ce,Gt]),Object(g.useEffect)(function(){if(Ce){function wt(Bt){var At=Bt.getValue();nn(At),Dn(new Date().getTime()),Bt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ze&&Ze(At)}return Ce.on("change",wt),function(){Ce.off("change",wt)}}},[Ce,Ze]),Object(g.useEffect)(function(){Ce&&(je==null?(Ce.setValue(""),nn("")):je!==Ce.getValue()&&(Ce.setValue(je),nn(je),Ce.setCursor(Ce.lineCount(),0)))},[Ce,je]);var Qr=Object(g.useCallback)(function(wt){var Bt=Ce.getCursor(),At=Ce.getSelection(),Xt=At.split(` +`);switch(wt){case"bold":return Ce.replaceSelection("**"+At+"**"),At===""&&Ce.setCursor(Bt.line,Bt.ch+2),Ce.focus();case"italic":return Ce.replaceSelection("*"+At+"*"),At===""&&Ce.setCursor(Bt.line,Bt.ch+1),Ce.focus();case"code":return Ce.replaceSelection("`"+At+"`"),At===""&&Ce.setCursor(Bt.line,Bt.ch+1),Ce.focus();case"inline-latex":return Ce.replaceSelection("`$$"+At+"$$`"),At===""&&Ce.setCursor(Bt.line,Bt.ch+3),Ce.focus();case"latex":return Ce.replaceSelection("```latex\n"+At+"\n```"),Ce.setCursor(Bt.line+1,At.length+1),Ce.focus();case"line-break":return Ce.replaceSelection(`
    +`),Ce.focus();case"list-ul":return At===""?Ce.replaceSelection("- "+At):Ce.replaceSelection(Xt.map(function(Yt){return Yt===""?"":"- ".concat(Yt)}).join(` +`)),Ce.focus();case"list-ol":return At===""?Ce.replaceSelection("1. "+At):Ce.replaceSelection(Xt.map(function(Yt,_n){return Yt===""?"":"".concat(_n+1,". ").concat(Yt)}).join(` +`)),Ce.focus();case"add-null-ch":return At===""&&Ce.setCursor(Bt.line,Bt.ch+1),Ce.replaceSelection(Ee),Ce.focus();case"inster-template-1":return At===""&&Ce.setCursor(Bt.line,Bt.ch),Ce.replaceSelection(Ie),Ce.focus();case"eraser":return Ce.setValue(""),Ce.focus();case"trigger-watch":return Ft(!Pt),Ce.focus();case"trigger-full-screen":return un(!ht),Ce.focus();case Xe:Mn(Xe);return;case ot:Mn(ot);return;case He:Mn(He);return;case ft:Mn(ft);return;default:throw new Error}},[Ce,Pt,ht]),Pr=Object(g.useCallback)(function(wt){Mn("");switch(kt){case Xe:var Bt=wt.title,At=wt.link;return Ce.replaceSelection("[".concat(Bt,"](").concat(At,")")),Ce.focus();case ot:var Xt=wt.language,Yt=wt.content;return Ce.replaceSelection(["```"+Xt,Yt,"```"].join(` +`)),Ce.focus();case He:var _n=wt.src,en=wt.alt;return en?Ce.replaceSelection("![ ".concat(en," ]( ").concat(_n,' "').concat(en,'" )')):Ce.replaceSelection("![,](".concat(_n,")")),Ce.focus();case ft:for(var Nn=wt.row,er=wt.col,Vt=wt.align,yr=` +`,mn=0;mn300&&(Nn=300);var er=Me+Nn+"px";xn(er)}}return wt.addEventListener("mousedown",Xt),document.addEventListener("mousemove",_n),document.addEventListener("mouseup",Yt),function(){wt.removeEventListener("mousedown",Xt),document.removeEventListener("mousemove",_n),document.removeEventListener("mouseup",Yt)}}},[Ce,Ut]),Object(g.useEffect)(function(){xn(Me)},[Me]);var Rr=pe(it),Kr=pe(Xn),jn={width:Rr,height:Kr},Rt=Object(g.useMemo)(function(){if(bn){var wt=new Date(bn),Bt=wt.getHours(),At=wt.getMinutes(),Xt=wt.getSeconds();return Bt=Bt<10?"0"+Bt:Bt,At=At<10?"0"+At:At,Xt=Xt<10?"0"+Xt:Xt,"".concat(Bt,":").concat(At,":").concat(Xt)}return 0},[bn]);function Xr(){window.sessionStorage.removeItem(Ae),pn(!1),Dn(0)}function _r(){pn(!1),Dn(0),Ce.setValue(window.sessionStorage.getItem(Ae))}function ni(wt,Bt){var At=Ce.getValue();At=At.replace(wt,Bt),nn(At),Ce==null||Ce.setValue(At)}return h.a.createElement(g.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:qt},h.a.createElement("div",{className:"markdown-editor-container ".concat(nt," ").concat(Pt?"on-preview":""," ").concat(we?"mini":""," ").concat(ht?"full-screen":""),style:jn},h.a.createElement(b,{insertTemp:Re,watch:Pt,fullScreen:ht,showNullButton:ln,onActionCallback:Qr,hidetoolBar:An,uuid:zt.current,setOpenPhones:function(){St.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:xt,placeholder:vr})),Pt?h.a.createElement("div",{ref:ir,className:"preview-container"},tt==="stex"&&h.a.createElement(w,{value:fn}),tt!=="stex"&&h.a.createElement(x.a,{edit:!0,value:fn,replaces:ni})):null))),Et?h.a.createElement("a",{ref:Ut,className:"editor-resize"}):null,h.a.createElement(I.a,null,te[kt]?h.a.createElement(K.a,{centered:!0,title:te[kt],visible:!0,onCancel:Nr,footer:null,className:"markdown-popup-form"},zr):null))}},PD8m:function(Le,ye){Le.exports={name:"memoryStorage",read:Y,write:K,each:L,remove:H,clearAll:N};var F={};function Y(R){return F[R]}function K(R,j){F[R]=j}function L(R){for(var j in F)F.hasOwnProperty(j)&&R(F[j],j)}function H(R){delete F[R]}function N(R){F={}}},QUZ3:function(Le,ye,F){"use strict";F.r(ye);var Y=F("0Owb"),K=F("PpiC"),L=F("OaEy"),H=F("2fM7"),N=F("T2oS"),R=F("W9HT"),j=F("+L6B"),k=F("2/Rp"),A=F("9og8"),D=F("2qtc"),g=F("kLXV"),h=F("tJVT"),u=F("k1fw"),d=F("aHsQ"),s=F("sGsY"),l=F("WmNS"),i=F.n(l),o=F("cDcd"),n=F.n(o),f=F("Icgb"),O=F("Fvcw"),S=F("GIiI"),x=F("Ty5D"),w=F("55Ip"),T=F("OJz4"),y=F("V0Rq"),v=F("bntm"),p=F("cDPC"),c=F("m3rI"),E=F("RCxd"),_=F("EHPI"),b=F("S+dL"),I=F.n(b),P=F("J66h"),B=F("uMZB"),z=F.n(B),U=F("p/48"),C=F("JPnl"),W=F("y8nQ"),V=F("Vl3Y"),J=F("5NDa"),ne=F("5rEg"),fe=ne.a.TextArea,ue=5e3,le=function(Pe){var Ce=Pe.callback,It=Pe.onCancel,Ht=Pe.notes;function vn(fn){Ce(fn)}return n.a.createElement(V.a,{className:"note-form-panel",onFinish:vn,initialValues:{notes:Ht}},n.a.createElement(V.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:ue,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(ue)}]},n.a.createElement(fe,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),n.a.createElement(V.a.Item,{style:{textAlign:"right"}},n.a.createElement(k.a,{type:"ghost",onClick:It,style:{marginRight:10}}," \u53D6\u6D88 "),n.a.createElement(k.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},me=F("bbsP"),ge=F("/wGt"),re=F("DjyN"),oe=F("NUBc"),xe=F("H2Ag"),Be=F.n(xe),Ve=F("miYZ"),Ye=F("tsqr"),$e=F("g9YV"),Ke=F("wCAj"),We=F("+k/U"),ze=F.n(We),at=F("ye1Q"),Je=F("lfch"),Xe=F("JB8y"),He=F("p5ED"),ot=F("ErOA"),ft=F("wd/R"),dt=F.n(ft),lt=Ke.a.Column,yt=function(Pe){var Ce,It=Pe.submitResult,Ht=Pe.submitting,vn=Pe.submitRecords,fn=Pe.page,nn=Pe.onPageChange,Kt=Pe.topicId,Dt=It||{},Pt=Dt.status,Ft=Dt.id,Mt=Dt.input,Zt=Dt.output,ht=Dt.expected_output,un=Dt.is_file,Jt=Dt.input_file_url,In=Dt.output_file_url,kt=Dt.expected_output_file_url,Mn=Dt.error_msg,kn=vn||{},wn=kn.records,bn=kn.records_count,Dn=Object(o.useState)(""),rr=Object(h.a)(Dn,2),ur=rr[0],Xn=rr[1],xn=Object(o.useState)(""),dr=Object(h.a)(xn,2),dn=dr[0],hn=dr[1],pn=Object(x.h)(),zt=(pn==null||((Ce=pn.query)===null||Ce===void 0)?void 0:Ce.type)==="1";function St(){un?navigator.clipboard.writeText(P.Base64.decode(Mn)).then(function(){Ye.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(P.Base64.decode(Zt)).then(function(){Ye.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return n.a.createElement(R.a,{spinning:Ht,tip:"\u8BC4\u6D4B\u4E2D...",indicator:n.a.createElement(at.a,{style:{fontSize:24},spin:!0})},Ft?n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:ze.a.info},n.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",n.a.createElement("span",{className:Pt===Xe.a.OK?"c-green":"c-red"},C.a[Pt])),n.a.createElement("li",{className:ze.a.error},n.a.createElement("a",{onClick:St},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",n.a.createElement(Je.a,null)," ")),n.a.createElement("li",null,n.a.createElement(w.a,{to:"/myproblems/".concat(Kt,"/record-detail/").concat(Ft)},"\u663E\u793A\u8BE6\u60C5 >"," "))),Pt!==Xe.a.OK?n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),n.a.createElement("pre",null,!un&&Mt,un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,fetch(Jt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return xt=Ut.sent,Ut.t0=hn,Ut.next=6,xt.text();case 6:Ut.t1=Ut.sent,(0,Ut.t0)(Ut.t1),setTimeout(function(){Xn(Jt)},200);case 9:case"end":return Ut.stop()}},jt)}))},Mt)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,(Pt===4||Pt===5)&&P.Base64.decode(Mn),Pt!=4&&Pt!=5&&(un?n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,Object(ot.a)(In,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:xt=Ut.sent;try{hn(xt)}catch(ir){hn("")}setTimeout(function(){Xn(In)},200);case 5:case"end":return Ut.stop()}},jt)}))},Zt):P.Base64.decode(Zt))),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,!un&&P.Base64.decode(ht),un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:Object(A.a)(i.a.mark(function jt(){var xt;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,fetch(kt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return xt=Ut.sent,Ut.t0=hn,Ut.next=6,xt.text();case 6:Ut.t1=Ut.sent,(0,Ut.t0)(Ut.t1),setTimeout(function(){Xn(kt)},200);case 9:case"end":return Ut.stop()}},jt)}))},ht))):null):null,(wn==null?void 0:wn.length)>0?n.a.createElement(Ke.a,{dataSource:wn,rowKey:"id",pagination:!1},n.a.createElement(lt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(xt,qt){return n.a.createElement("span",null," ",dt()(xt).format("YYYY-MM-DD HH:mm:ss"))}}),n.a.createElement(lt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(xt,qt){var Ut;return n.a.createElement(w.a,{className:xt===0?"c-green":"c-red",to:"/myproblems/".concat(Kt,"/record-detail/").concat(qt.id)},(Ut=C.a[xt])===null||Ut===void 0?void 0:Ut.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),n.a.createElement(lt,{title:"\u6267\u884C\u7528\u65F6 (".concat(zt?"MS":"S",")"),dataIndex:"execute_time",key:"execute_time",render:function(xt){return xt?zt?xt:xt/1e3:""}}),n.a.createElement(lt,{title:"\u5185\u5B58\u6D88\u8017\uFF08".concat(zt?"KB":"MB","\uFF09"),dataIndex:"execute_memory",key:"execute_memory",render:function(xt){return xt?zt?xt:parseFloat((xt/1024).toFixed(2)):""}}),n.a.createElement(lt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),n.a.createElement(lt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:function(xt,qt){return n.a.createElement(w.a,{className:"c-light-primary",to:"/myproblems/".concat(Kt,"/record-detail/").concat(qt.id)},"\u67E5\u770B")}})):n.a.createElement("div",{style:{height:300,width:"100%"}}),bn>15?n.a.createElement(oe.a,{className:ze.a.pagination,current:fn,pageSize:15,total:bn,onChange:nn}):null,n.a.createElement(He.a,{close:!0,data:ur,type:ur.length?"txt":"",onClose:function(){return Xn("")},monacoEditor:{value:dn,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))},pt=F("BdwD"),be=F("DYRE"),_e=F("zeV3"),Ne=F("+BJd"),ke=F("mr32"),Ee=F("pPuO"),Ie=F.n(Ee),pe=F("9Bee"),ae={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},ie=function(Pe){var Ce=Pe.hack,It=Pe.onTriggerPraise,Ht=Pe.toDiscuss,vn=Ce.language,fn=Ce.difficult,nn=Ce.time_limit,Kt=Ce.username,Dt=Ce.user_path,Pt=Ce.user_praise,Ft=Ce.comments_count,Mt=Ce.praises_count,Zt=Ce.description,ht=Ce.pass_count,un=Ce.submit_count,Jt=Object(x.h)(),In=ae[fn];return n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:Ie.a.info},n.a.createElement("li",null,"\u7F16\u7A0B\u8BED\uFF1A",n.a.createElement("b",null,vn)),n.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",n.a.createElement(ke.a,{color:In.color},In.name)),n.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",n.a.createElement("b",null,nn,"\u79D2"))),n.a.createElement(pe.a,{value:Zt,className:Ie.a.desc}),n.a.createElement("ul",{className:Ie.a["commit-info"]},n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",n.a.createElement("b",null,ht))),n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",n.a.createElement("b",null,un))," "),n.a.createElement("li",{style:{flex:"1 0 0"}}),Jt.query.type!=="exercises"&&n.a.createElement("li",null,n.a.createElement(_e.a,{size:4},n.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Ht})," ",n.a.createElement("b",null,Ft))," ")))},Q=F("dhSg"),q=F("oBTY"),te=F("M8RZ"),se=F("qJ4+");function ce(Pe,Ce){return Object(ot.c)("/problems/".concat(Pe,"/comments.json?page=").concat(Ce,"&limit=10"))}function Se(Pe){return Object(ot.f)("/discusses/".concat(Pe,"/plus.json"),{container_type:"Discuss",type:1})}function je(Pe,Ce,It){return Object(ot.f)("/problems/".concat(Pe,"/comments/reply.json"),{comments:{content:It,parent_id:Ce}})}function Ze(Pe,Ce){return Object(ot.f)("/problems/".concat(Pe,"/comments.json"),{comments:{content:Ce}})}function ut(Pe,Ce,It){return Object(ot.f)("/problems/".concat(Pe,"/comments/").concat(Ce,"/hidden.json"),It)}function it(Pe,Ce){return Object(ot.b)("/problems/".concat(Pe,"/comments/").concat(Ce))}var rt=F("U7T7"),Me=F("AMnG");function Ue(Pe){var Ce=Pe.author;return n.a.createElement("a",{href:"/users/".concat(Ce.login),target:"_blank"},n.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(c.a.IMG_SERVER,"/images/").concat(Ce.image_url),width:"50"}))}function we(Pe){var Ce=Pe.data,It=Pe.index,Ht=Pe.parentDiscussIndex,vn=Pe.user,fn=Pe.onSetActionType,nn=Ce.author,Kt=Ce.can_delete,Dt=Ce.content,Pt=Ce.id,Ft=Ce.time;function Mt(){fn({id:Pt,index:It,type:"delete-discuss",parentDiscussIndex:Ht,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var Zt=vn.admin||Kt||nn.user_id===vn.user_id;return n.a.createElement("div",{className:"discuss-item-container second-discuss "},n.a.createElement(Ue,{author:nn}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(nn.login),target:"_blank"},nn.name),n.a.createElement("span",{className:"grey"},Ft),n.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zt?n.a.createElement("a",{onClick:Mt,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),n.a.createElement(pe.a,{className:"discuss-content",value:Dt})))}var ee=function(Pe){var Ce=Pe.user,It=Pe.data,Ht=Pe.index,vn=Pe.onPlusDiscuss,fn=Pe.onSetActionType,nn=Pe.activeDiscussIndex,Kt=Pe.onReplyDiscuss,Dt=Pe.onSetActiveDiscussIndex,Pt=It.content,Ft=It.children,Mt=It.hidden,Zt=It.id,ht=It.praise_count,un=It.time,Jt=It.user_praise,In=It.can_delete,kt=It.author;function Mn(){Dt(Zt)}function kn(){vn(Zt,!Jt,Ht)}function wn(){fn({id:Zt,index:Ht,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function bn(){fn({id:Zt,index:Ht,params:{hidden:Mt?"0":"1"},type:"hidden-discuss",message:Mt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var Dn=Ce.admin||Ce.user_id===kt.user_id;return n.a.createElement("div",{className:"discuss-item-container",key:Zt},n.a.createElement(Ue,{author:kt}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(kt.login),target:"_blank"}," ",kt.name," "),n.a.createElement("span",{className:"grey"},un)),n.a.createElement(pe.a,{className:"discuss-content",value:Pt}),Ft&&Ft.length>0?n.a.createElement("div",{className:"reply-discuss-container"},Ft.map(function(rr,ur){return n.a.createElement(we,{key:rr.id,data:rr,index:ur,user:Ce,onSetActionType:fn,parentDiscussIndex:Ht})})):null,n.a.createElement("div",{className:"btn-group"},Dn?n.a.createElement("a",{onClick:bn,title:Mt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},n.a.createElement("i",{className:Mt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,In&&(!Ft||Ft.length==0)?n.a.createElement("a",{onClick:wn,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null,n.a.createElement("a",{onClick:Mn,title:"\u56DE\u590D"}," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," "),n.a.createElement("a",{onClick:kn,className:Jt?"c-orange":""},n.a.createElement("i",{className:Jt?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),n.a.createElement("span",null,ht||""))),n.a.createElement(Me.a,{id:Zt,activeDiscussIndex:nn,onReplyDiscuss:Kt})))},he=F("kaH+"),Fe=F("uD2n"),Re=F.n(Fe),et=F("Ot1p"),tt=function(Pe){var Ce=Pe.user_praise,It=Pe.praise_count,Ht=Pe.praisePlus,vn=Pe.onCreateDiscuss,fn=Pe.discuss_count,nn=Object(o.useState)(!1),Kt=Object(h.a)(nn,2),Dt=Kt[0],Pt=Kt[1],Ft=Object(o.useState)(""),Mt=Object(h.a)(Ft,2),Zt=Mt[0],ht=Mt[1];function un(kn){ht(kn)}function Jt(){Pt(!0)}function In(){Pt(!1)}function kt(){return Mn.apply(this,arguments)}function Mn(){return Mn=Object(A.a)(i.a.mark(function kn(){return i.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:vn(Zt),ht(""),Pt(!1);case 3:case"end":return bn.stop()}},kn)})),Mn.apply(this,arguments)}return n.a.createElement("div",{className:"".concat(Re.a["dis-input-editor-container"]," ").concat(Dt?Re.a.active:""," ")},n.a.createElement("div",{className:Dt?"hide ".concat(Re.a["text-area"]):Re.a["text-area"]},n.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Jt}),n.a.createElement("a",null," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",fn," "),n.a.createElement("a",{className:"c-light-black",onClick:Ht,title:Ce?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},n.a.createElement("i",{className:"mr3 ".concat(Ce?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),It?n.a.createElement("span",null,It):"")),Dt?n.a.createElement("div",{className:Re.a["input-mask"],onClick:In}):null,n.a.createElement("div",{className:Dt?Re.a["md-container"]:"".concat(Re.a["md-container"]," hide")},n.a.createElement(et.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Zt,height:240,onChange:un}),n.a.createElement("div",{className:Re.a["tip-container"],onClick:In},n.a.createElement("a",{className:Re.a["btn-send"],onClick:kt}," \u53D1\u9001 "))))},Te={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ae;(function(Pe){Pe[Pe.GET_DISCUSSES=0]="GET_DISCUSSES",Pe[Pe.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Pe[Pe.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Pe[Pe.PLUS_DISCUSS=3]="PLUS_DISCUSS",Pe[Pe.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Pe[Pe.SET_PAGE=5]="SET_PAGE",Pe[Pe.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ae||(Ae={}));function Qe(Pe,Ce){switch(Ce.type){case Ae.SHOW_DISCUSSES_LOADING:return Object(u.a)(Object(u.a)({},Pe),{},{loading:!0});case Ae.GET_DISCUSSES:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.TOP_OR_DOWN_DISCUSS:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.SET_ACTION_TYPE:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.PLUS_DISCUSS:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case Ae.SET_PAGE:return Object(u.a)(Object(u.a)({},Pe),{},{page:Ce.payload});case Ae.ACTIVE_DISCUSS_INDEX:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);default:throw new Error}}var Et=function(Pe){var Ce=Pe.user,It=Pe.identifier,Ht=Pe.hack,vn=Pe.onTriggerPraise,fn=Object(o.useReducer)(Qe,Te),nn=Object(h.a)(fn,2),Kt=nn[0],Dt=nn[1],Pt=Kt.loading,Ft=Kt.page,Mt=Kt.data,Zt=Kt.count,ht=Kt.actionType,un=Kt.activeDiscussIndex,Jt=Object(o.useCallback)(Object(A.a)(i.a.mark(function dn(){var hn,pn,zt;return i.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return Dt({type:Ae.SHOW_DISCUSSES_LOADING}),jt.next=3,ce(It,Ft);case 3:hn=jt.sent,pn=hn.comments,zt=hn.disscuss_count,Dt({type:Ae.GET_DISCUSSES,payload:{data:pn,count:zt,loading:!1}});case 6:case"end":return jt.stop()}},dn)})),[Ft,It]);Object(o.useEffect)(function(){Jt()},[It,Ft]);function In(dn){Dt({type:Ae.SET_PAGE,page:dn})}function kt(dn){Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:dn}})}function Mn(dn){un===dn?Dt({type:Ae.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):Dt({type:Ae.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:dn}})}function kn(dn,hn,pn){return wn.apply(this,arguments)}function wn(){return wn=Object(A.a)(i.a.mark(function dn(hn,pn,zt){var St;return i.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.prev=0,xt.next=3,Se(hn);case 3:St=xt.sent,Mt[zt].user_praise=pn,Mt[zt].praise_count=St.praise_count,Dt({type:Ae.PLUS_DISCUSS,payload:{data:Object(q.a)(Mt)}}),xt.next=12;break;case 9:xt.prev=9,xt.t0=xt.catch(0),console.log(xt.t0);case 12:case"end":return xt.stop()}},dn,null,[[0,9]])})),wn.apply(this,arguments)}function bn(){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(A.a)(i.a.mark(function dn(){var hn,pn,zt,St,jt,xt,qt,Ut;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:if(hn=ht.id,pn=ht.params,zt=ht.type,St=ht.index,jt=ht.parentDiscussIndex,!(zt==="hidden-discuss")){Pn.next=6;break}return Pn.next=4,ut(It,hn,pn);case 4:jt?Mt[jt].children[St].hidden=pn.hidden==1:Mt[St].hidden=pn.hidden==1,Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null,data:Object(q.a)(Mt)}});case 6:if(!(zt==="delete-discuss")){Pn.next=31;break}return Pn.next=9,it(It,hn);case 9:if(!(jt||jt===0)){Pn.next=22;break}xt=Mt[jt].children,qt=xt.length-1;case 12:if(!(qt>=0)){Pn.next=19;break}if(!(xt[qt].id===hn)){Pn.next=16;break}return xt.splice(qt,1),Pn.abrupt("break",19);case 16:qt--,Pn.next=12;break;case 19:Mt[jt].children=xt,Pn.next=30;break;case 22:Ut=Mt.length-1;case 23:if(!(Ut>=0)){Pn.next=30;break}if(!(Mt[Ut].id===hn)){Pn.next=27;break}return Mt.splice(Ut,1),Pn.abrupt("break",30);case 27:Ut--,Pn.next=23;break;case 30:Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null,data:Object(q.a)(Mt)}});case 31:case"end":return Pn.stop()}},dn)})),Dn.apply(this,arguments)}function rr(){Dt({type:Ae.SET_ACTION_TYPE,payload:{actionType:null}})}function ur(dn,hn){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(A.a)(i.a.mark(function dn(hn,pn){return i.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.prev=0,St.next=3,je(It,hn,pn);case 3:Jt(),St.next=9;break;case 6:St.prev=6,St.t0=St.catch(0),console.log(St.t0);case 9:case"end":return St.stop()}},dn,null,[[0,6]])})),Xn.apply(this,arguments)}function xn(dn){return dr.apply(this,arguments)}function dr(){return dr=Object(A.a)(i.a.mark(function dn(hn){return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return Dt({type:Ae.SHOW_DISCUSSES_LOADING}),zt.next=3,Ze(It,hn);case 3:Jt();case 4:case"end":return zt.stop()}},dn)})),dr.apply(this,arguments)}return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"discuss-panel"},Mt.length===0?n.a.createElement(pt.a,null):Mt.map(function(dn,hn){return n.a.createElement(ee,{onReplyDiscuss:ur,onPlusDiscuss:kn,onSetActiveDiscussIndex:Mn,onSetActionType:kt,data:dn,index:hn,user:Ce,activeDiscussIndex:un})}),Zt>10?n.a.createElement("div",{className:"pagination-container"},n.a.createElement(oe.a,{showQuickJumper:!0,onChange:In,current:Ft,total:Zt})):null),n.a.createElement(tt,{user_praise:Ht.user_praise,praise_count:Ht.praises_count,praisePlus:vn,discuss_count:Ht.comments_count,onCreateDiscuss:xn}),n.a.createElement(te.a,null,n.a.createElement(g.a,{centered:!0,title:"\u63D0\u793A",visible:!!ht,onOk:bn,onCancel:rr},n.a.createElement("p",null,ht?ht.message:"")),n.a.createElement(he.a,null)))},vt=F("9kvl"),cn={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},yn={1:"#2fa34f",2:"#0152d9",3:"#fa6400"},ln=function(Pe){var Ce,It=Pe.hack,Ht=Pe.onTriggerPraise,vn=Pe.topicId,fn=Pe.page,nn=Pe.onPageChange,Kt=Pe.user,Dt=Pe.submitRecords,Pt=Pe.submitting,Ft=Pe.submitResult,Mt=Object(o.useState)("0"),Zt=Object(h.a)(Mt,2),ht=Zt[0],un=Zt[1],Jt=Object(x.h)(),In=Object(o.useState)(!1),kt=Object(h.a)(In,2),Mn=kt[0],kn=kt[1],wn=Object(o.useState)([]),bn=Object(h.a)(wn,2),Dn=bn[0],rr=bn[1],ur=Object(o.useState)(Object(u.a)(Object(u.a)({},Object(x.i)()),{},{page:1,per_page:20,name:""})),Xn=Object(h.a)(ur,2),xn=Xn[0],dr=Xn[1];function dn(St){var jt=St.target.id;un(jt)}Object(o.useEffect)(function(){var St=Q.a.subscribe("to-commit-info",function(){un("1")});return St},[]);function hn(){un("2")}function pn(){return zt.apply(this,arguments)}function zt(){return zt=Object(A.a)(i.a.mark(function St(){var jt;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(ot.a)("/api/problems/my_hack_list.json",{method:"get",params:Object(u.a)({identifier:xn==null?void 0:xn.id},xn)});case 2:jt=qt.sent,rr(jt);case 4:case"end":return qt.stop()}},St)})),zt.apply(this,arguments)}return console.log(Dt,"submitRecords"),n.a.createElement("div",{className:Be.a["left-panel"]},n.a.createElement("ul",{className:"".concat(Be.a["s-navs"]," ").concat(Be.a["bg-white"]," ").concat(Be.a.b1)},n.a.createElement("li",null,n.a.createElement("a",{className:ht==="0"?Be.a.active:"",id:"0",onClick:dn},"\u4EFB\u52A1\u63CF\u8FF0")),n.a.createElement("li",null,n.a.createElement("a",{className:ht==="1"?Be.a.active:"",id:"1",onClick:dn},"\u63D0\u4EA4\u8BB0\u5F55")),Jt.query.type!=="exercises"&&n.a.createElement("li",null,n.a.createElement("a",{className:ht==="2"?Be.a.active:"",id:"2",onClick:dn},"\u8BC4\u8BBA"))),n.a.createElement("div",{className:"".concat(Be.a["tab-panel-body"]," ").concat(ht==="0"?"":"hide")},n.a.createElement(ie,{hack:It,onTriggerPraise:Ht,toDiscuss:hn})),n.a.createElement("div",{style:{padding:"0 12px"},className:"".concat(Be.a["tab-panel-body"]," ").concat(ht==="1"?"":"hide")},!!(Dt!=null&&Dt.records_count)||Pt?n.a.createElement(yt,{page:fn,onPageChange:nn,topicId:vn,submitting:Pt,submitRecords:Dt,submitResult:Ft}):n.a.createElement(pt.a,null)),n.a.createElement("div",{className:"".concat(Be.a["tab-panel-body"]," ").concat(ht==="2"?"":"hide"),style:{padding:0}},n.a.createElement(Et,{user:Kt,identifier:It.identifier,hack:It,onTriggerPraise:Ht})),n.a.createElement(ge.a,{className:Be.a.drawer,headerStyle:{background:"#000",border:0},closable:!1,title:n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("span",{style:{color:"#fff"}},"\u9898\u76EE\u5217\u8868"),n.a.createElement(ne.a.Search,{onSearch:function(jt){xn.name=jt,xn.page=1,dr(Object(u.a)({},xn)),pn()},style:{width:180,margin:"0px 20px",marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22"}),n.a.createElement(H.a,{style:{width:100},placeholder:"\u8BF7\u9009\u62E9\u96BE\u5EA6",onChange:function(jt){xn.page=1,xn.difficult=jt||null,dr(Object(u.a)({},xn)),pn()}},n.a.createElement(H.a.Option,{value:0},"\u5168\u90E8"),n.a.createElement(H.a.Option,{value:1},"\u7B80\u5355"),n.a.createElement(H.a.Option,{value:2},"\u9002\u4E2D"),n.a.createElement(H.a.Option,{value:3},"\u56F0\u96BE"))),bodyStyle:{background:"#0f1e31",padding:"20px 0px"},footerStyle:{background:"#0f1e31",border:0,textAlign:"center"},footer:n.a.createElement("div",null,n.a.createElement(oe.a,{current:xn.page,className:"mt10 mb10",hideOnSinglePage:!0,total:Dn==null?void 0:Dn.count,pageSize:xn.per_page,onChange:function(jt,xt){xn.page=jt,xn.per_page=xt,pn()}})),width:530,placement:"left",onClose:function(){return kn(!1)},visible:Mn},Dn==null||((Ce=Dn.data)===null||Ce===void 0)?void 0:Ce.map(function(St,jt){return n.a.createElement("div",{onClick:Object(A.a)(i.a.mark(function xt(){var qt;return i.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(ot.a)("/api/problems/".concat(St==null?void 0:St.identifier,"/start.json"),{method:"get",params:{hack_user_id:Kt==null?void 0:Kt.user_id}});case 2:qt=ir.sent,qt&&(vt.d.replace("/myproblems/".concat(qt==null?void 0:qt.identifier,"?type=1")),window.location.reload());case 4:case"end":return ir.stop()}},xt)})),className:"".concat(Be.a.list," ").concat(St!=null&&St.checked?Be.a.active:"")},n.a.createElement("div",null,(St==null?void 0:St.opened)&&(St==null?void 0:St.passed)&&n.a.createElement("i",{className:"iconfont icon-wancheng1 c-green-29b"}),(St==null?void 0:St.opened)&&!(St!=null&&St.passed)&&n.a.createElement("i",{className:"iconfont icon-cuowu c-red"}),n.a.createElement("span",{style:{color:"rgb(186, 196, 205)",fontWeight:400,fontSize:14,marginLeft:10}},St.name)),n.a.createElement("span",{style:{color:yn[St.difficult]}},cn[St.difficult]))})),(It==null?void 0:It.is_program)&&n.a.createElement("div",{onClick:function(){pn(),kn(!0)},className:Be.a.btns},n.a.createElement("i",{className:"iconfont icon-timuliebiao"}),n.a.createElement("span",null,"\u9898\u76EE\u5217\u8868")))},bt=F("oFv4"),An=F.n(bt),zn=F("+aKw"),Tn=F("S/kP"),Gt=F.n(Tn),Sn=F("t/PP"),Wn=F.n(Sn),gr=s.a.Countdown,nt={Java:"java",C:"c",Python:"py","C++":"c"},ct;(function(Pe){Pe[Pe.SET_LOADING=0]="SET_LOADING",Pe[Pe.GET_DATA=1]="GET_DATA",Pe[Pe.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Pe[Pe.SET_DATA=3]="SET_DATA",Pe[Pe.SET_DEBUGING=4]="SET_DEBUGING",Pe[Pe.SET_SUBMITING=5]="SET_SUBMITING",Pe[Pe.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Pe[Pe.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Pe[Pe.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Pe[Pe.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Pe[Pe.SET_PAGE=10]="SET_PAGE"})(ct||(ct={}));function qn(){return new Date().getTime()}var Tr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function vr(Pe,Ce){switch(Ce.type){case ct.GET_DATA:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case ct.SET_DATA:return Object(u.a)(Object(u.a)({},Pe),{},{data:Ce.payload});case ct.SET_LOADING:return Object(u.a)(Object(u.a)({},Pe),{},{loading:Ce.payload});case ct.SET_SHOW_NOTE:return Object(u.a)(Object(u.a)({},Pe),{},{showNote:Ce.payload});case ct.SET_DEBUGING:return Object(u.a)(Object(u.a)({},Pe),{},{debuging:Ce.payload});case ct.SET_SUBMITING:return Object(u.a)(Object(u.a)({},Pe),{},{submitting:Ce.payload});case ct.GET_SUBMIT_RECORDS:return Object(u.a)(Object(u.a)({},Pe),{},{submitRecords:Ce.payload});case ct.SET_PAGE:return Object(u.a)(Object(u.a)({},Pe),{},{submitRecordPage:Ce.payload});case ct.SET_EXECUTE_MESSAGE:return Object(u.a)(Object(u.a)({},Pe),{},{executingMessage:Ce.payload});case ct.SET_EXECUTE_RESULT:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);case ct.SET_SUBMIT_RESULT:return Object(u.a)(Object(u.a)({},Pe),Ce.payload);default:throw new Error}}var Fr=ye.default=function(Pe){var Ce,It,Ht,vn,fn=Pe.children,nn=Object(o.useReducer)(vr,Tr),Kt=Object(h.a)(nn,2),Dt=Kt[0],Pt=Kt[1],Ft=Object(x.i)(),Mt=Ft.id,Zt=Object(x.g)(),ht=Object(x.h)(),un=Dt.loading,Jt=Dt.data,In=Dt.debugResult,kt=Dt.submitResult,Mn=Dt.submitRecords,kn=Dt.submitRecordPage,wn=Dt.showNote,bn=Dt.debuging,Dn=Dt.submitting,rr=Dt.executingMessage,ur=Object(o.useState)("#FFF"),Xn=Object(h.a)(ur,2),xn=Xn[0],dr=Xn[1],dn=Object(o.useState)(null),hn=Object(h.a)(dn,2),pn=hn[0],zt=hn[1],St=Object(o.useState)({}),jt=Object(h.a)(St,2),xt=jt[0],qt=jt[1],Ut=Object(o.useState)(!0),ir=Object(h.a)(Ut,2),Pn=ir[0],cr=ir[1],Qr=Object(o.useState)(!1),Pr=Object(h.a)(Qr,2),zr=Pr[0],Nr=Pr[1],Rr=Object(o.useRef)(null),Kr=Object(o.useRef)(0),jn=Jt==null?void 0:Jt.user,Rt=Jt==null?void 0:Jt.hack,Xr=Object(o.useRef)(),_r=Object(o.useRef)();Object(o.useEffect)(function(){var Qt;if(clearTimeout(Xr.current),clearTimeout(_r.current),xt!=null&&(Qt=xt.exercise)!==null&&Qt!==void 0&&Qt.left_time){var Ct,$t;if((xt==null||((Ct=xt.exercise)===null||Ct===void 0)?void 0:Ct.left_time)>1800){var _t;_r.current=setTimeout(function(){g.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:n.a.createElement(f.a,null),okText:"\u77E5\u9053\u4E86"})},((xt==null||((_t=xt.exercise)===null||_t===void 0)?void 0:_t.left_time)-1800)*1e3)}if((xt==null||(($t=xt.exercise)===null||$t===void 0)?void 0:$t.left_time)>900){var an;Xr.current=setTimeout(function(){g.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:n.a.createElement(f.a,null),okText:"\u77E5\u9053\u4E86"})},((xt==null||((an=xt.exercise)===null||an===void 0)?void 0:an.left_time)-900)*1e3)}}},[xt]),Object(o.useEffect)(function(){function Qt(){return Ct.apply(this,arguments)}function Ct(){return Ct=Object(A.a)(i.a.mark(function $t(){var _t,an,Cn,$n,Sr,Jn,sn,Rn,Vr,jr,Kn,pr;return i.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return cr(!0),tr.next=3,Object(T.d)(Mt);case 3:if(_t=tr.sent,setTimeout(function(){cr(!1)},800),_t.status===401)document.location.href="/user/login";else{try{_t.hack.code=P.Base64.decode(_t.hack.code)}catch(Gr){console.log(Gr)}_t.hack=Object(u.a)(Object(u.a)({},_t.hack),{},{is_program:(ht==null||((an=ht.query)===null||an===void 0)?void 0:an.type)==="1"}),Pt({type:ct.GET_DATA,payload:{loading:!1,data:_t}})}if(!(ht.query.type==="exercises")){tr.next=18;break}if(!(ht.query.coursesId=="coursesId")){tr.next=13;break}return tr.next=10,Object(y.Y)({categoryId:ht.query.exercisesId,login:ht.query.login});case 10:Jn=tr.sent,tr.next=16;break;case 13:return tr.next=15,Object(y.z)({categoryId:ht.query.exercisesId,login:ht.query.login});case 15:Jn=tr.sent;case 16:qt(Object(u.a)({},Jn)),(Cn=Jn)!==null&&Cn!==void 0&&Cn.left_banner_id&&($n=Jn)!==null&&$n!==void 0&&(Sr=$n.exercise)!==null&&Sr!==void 0&&Sr.left_time&&(zt(Date.now()+((sn=Jn)===null||sn===void 0||((Rn=sn.exercise)===null||Rn===void 0)?void 0:Rn.left_time)*1e3),setTimeout(function(){dr("red")},(((Vr=Jn)===null||Vr===void 0||((jr=Vr.exercise)===null||jr===void 0)?void 0:jr.left_time)-300>0?((Kn=Jn)===null||Kn===void 0||((pr=Kn.exercise)===null||pr===void 0)?void 0:pr.left_time)-300:0)*1e3));case 18:case"end":return tr.stop()}},$t)})),Ct.apply(this,arguments)}Mt&&Qt()},[Mt]),Object(o.useEffect)(function(){return ht.query.type==="exercises"&&(window.addEventListener(Object(v.c)(),wt),window.focus(),window.onblur=function(){Object(v.a)()&&Object(v.b)()}),function(){document.removeEventListener(Object(v.c)(),wt)}},[Mt]),Object(o.useEffect)(function(){Mt&&Rt!==null&&Rt!==void 0&&Rt.language&&Bt()},[Mt,kn,Rt==null?void 0:Rt.language]),Object(o.useEffect)(function(){return Rt!=null&&Rt.is_program&&(Kr.current=0,Rr.current=setInterval(function(){ni()},15e3)),function(){clearInterval(Rr.current)}},[Rt==null?void 0:Rt.is_program]);var ni=function(){var Qt=Object(A.a)(i.a.mark(function Ct(){var $t;return i.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(ot.a)("/api/myproblems/".concat(Mt,"/save_long_time.json"),{method:"get",params:{answer_long_time:Kr.current}});case 2:$t=an.sent;case 3:case"end":return an.stop()}},Ct)}));return function(){return Qt.apply(this,arguments)}}(),wt=function(){window.parent.postMessage("backExercise","*")};function Bt(){return At.apply(this,arguments)}function At(){return At=Object(A.a)(i.a.mark(function Qt(){var Ct;return i.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.prev=0,_t.next=3,Object(T.f)(Mt,{limit:15,page:kn,language:Rt==null?void 0:Rt.language});case 3:Ct=_t.sent,Pt({type:ct.GET_SUBMIT_RECORDS,payload:Ct}),_t.next=10;break;case 7:_t.prev=7,_t.t0=_t.catch(0),console.log(_t.t0);case 10:case"end":return _t.stop()}},Qt,null,[[0,7]])})),At.apply(this,arguments)}function Xt(Qt){Pt({type:ct.SET_PAGE,payload:Qt})}function Yt(){return _n.apply(this,arguments)}function _n(){return _n=Object(A.a)(i.a.mark(function Qt(){var Ct;return i.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(T.k)(Mt,{code:P.Base64.encode(Rt.code),language:Rt==null?void 0:Rt.language});case 2:return Ct=_t.sent,_t.abrupt("return",Ct);case 4:case"end":return _t.stop()}},Qt)})),_n.apply(this,arguments)}function en(){return Nn.apply(this,arguments)}function Nn(){return Nn=Object(A.a)(i.a.mark(function Qt(){var Ct,$t,_t,an,Cn,$n,Sr,Jn;return i.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:if(!Dn){Rn.next=2;break}return Rn.abrupt("return");case 2:return Pt({type:ct.SET_SUBMITING,payload:!0}),Rn.prev=3,Q.a.publish("to-commit-info"),Rn.next=7,Yt();case 7:if(Ct=Rn.sent,console.log(Ct,1),!(Ct.status===0)){Rn.next=23;break}return Jn=function(){return Jn=Object(A.a)(i.a.mark(function jr(){var Kn,pr,Or,tr,Gr,Si,Br;return i.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(T.c)(Mt,"submit");case 2:if(Kn=br.sent,pr=Kn.status,Or=Kn.data,tr=qn(),Gr=tr-$n>(Cn+3)*1e3,pr!==0&&!Gr&&setTimeout(Sr,1e3),!Gr){br.next=12;break}return g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_SUBMITING,payload:!1}),br.abrupt("return");case 12:if(!(pr===0)){br.next=19;break}return Or.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),(Or==null?void 0:Or.status)===0&&(ht==null||((Si=ht.query)===null||Si===void 0)?void 0:Si.type)==="1"&&Nr(!0),br.next=17,Object(T.f)(Mt,{limit:15,page:kn,language:Rt==null?void 0:Rt.language});case 17:Br=br.sent,Pt({type:ct.SET_SUBMIT_RESULT,payload:Object(u.a)(Object(u.a)({},Dt),{},{submitResult:Or,submitting:!1,submitRecords:Br})});case 19:case"end":return br.stop()}},jr)})),Jn.apply(this,arguments)},Sr=function(){return Jn.apply(this,arguments)},_t={},ht.query.type==="exercises"&&(_t.extras={exercise_id:ht.query.exercisesId,question_id:ht.query.questionId}),Rn.next=16,Object(T.h)(Mt,_t);case 16:if(an=Rn.sent,!(an.status===-1&&ht!==null&&ht!==void 0&&($t=ht.query)!==null&&$t!==void 0&&$t.coursesId)){Rn.next=20;break}return window.parent.location.href="/classrooms/".concat(ht.query.coursesId,"/exercise/").concat(ht.query.exercisesId,"/detail"),Rn.abrupt("return");case 20:Cn=Rt.time_limit,$n=qn(),Sr();case 23:Rn.next=29;break;case 25:Rn.prev=25,Rn.t0=Rn.catch(3),console.log(Rn.t0),Pt({type:ct.SET_SUBMITING,payload:!1});case 29:case"end":return Rn.stop()}},Qt,null,[[3,25]])})),Nn.apply(this,arguments)}function er(){return Vt.apply(this,arguments)}function Vt(){return Vt=Object(A.a)(i.a.mark(function Qt(){var Ct,$t,_t,an,Cn,$n,Sr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Dt.debuging=!0,Pt({type:ct.SET_DEBUGING,payload:!0}),sn.prev=2,sn.next=5,Yt();case 5:if(Ct=sn.sent,!(Ct.status===0)){sn.next=22;break}return Sr=function(){return Sr=Object(A.a)(i.a.mark(function Vr(){var jr,Kn,pr,Or,tr,Gr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(T.c)(Mt,"debug");case 2:if(jr=Br.sent,Kn=jr.status,pr=jr.message,Or=jr.data,tr=qn(),Gr=tr-Cn>($t+3)*1e3,Kn!==0&&!Gr&&(Pt({type:ct.SET_EXECUTE_MESSAGE,payload:pr}),setTimeout($n,1e3)),!Gr){Br.next=13;break}return g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_DEBUGING,payload:!1}),Br.abrupt("return");case 13:Kn===0&&(Pt({type:ct.SET_DEBUGING,payload:!1}),Or.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Or.status===2&&g.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Pt({type:ct.SET_EXECUTE_RESULT,payload:Object(u.a)(Object(u.a)({},Dt),{},{debugResult:Or,debuging:!1})}));case 14:case"end":return Br.stop()}},Vr)})),Sr.apply(this,arguments)},$n=function(){return Sr.apply(this,arguments)},$t=Rt.time_limit,_t={input:encodeURIComponent(Jt.test_case.input)},ht.query.type==="exercises"&&(_t.exercise_id=ht.query.exercisesId),sn.next=14,Object(T.b)(Mt,_t);case 14:if(an=sn.sent,!(an.status===-1&&ht.query.coursesId)){sn.next=18;break}return window.parent.location.href="/classrooms/".concat(ht.query.coursesId,"/exercise/").concat(ht.query.exercisesId,"/detail"),sn.abrupt("return");case 18:Cn=qn(),$n(),sn.next=23;break;case 22:Pt({type:ct.SET_DEBUGING,payload:!1});case 23:sn.next=28;break;case 25:sn.prev=25,sn.t0=sn.catch(2),console.log(sn.t0);case 28:return sn.prev=28,sn.finish(28);case 30:case"end":return sn.stop()}},Qt,null,[[2,25,28,30]])})),Vt.apply(this,arguments)}function yr(Qt){Pt({type:ct.SET_DATA,payload:Object(u.a)(Object(u.a)({},Jt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{code:Qt})})})}var mn=function(){var Qt=Object(A.a)(i.a.mark(function Ct($t){var _t,an;return i.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return $n.next=2,Object(ot.a)("/api/problems/".concat(Rt==null?void 0:Rt.identifier,"/start.json"),{method:"get",params:{language:$t==="C++"||$t==="c++"?encodeURIComponent($t):$t,hack_user_id:jn==null?void 0:jn.user_id}});case 2:_t=$n.sent,_t.status!==-1&&Zt.replace("/myproblems/".concat(_t==null?void 0:_t.identifier,"?type=").concat(ht==null||((an=ht.query)===null||an===void 0)?void 0:an.type));case 4:case"end":return $n.stop()}},Ct)}));return function($t){return Qt.apply(this,arguments)}}();function Vn(Qt){var Ct=Qt.target.value;Pt({type:ct.SET_DATA,payload:Object(u.a)(Object(u.a)({},Jt),{},{test_case:{input:Ct}})})}function Yn(){return fr.apply(this,arguments)}function fr(){return fr=Object(A.a)(i.a.mark(function Qt(){var Ct;return i.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.prev=0,_t.next=3,Object(T.g)(Mt);case 3:Ct=_t.sent,Ct.status===401?Zt.replace("/login",{from:ht.pathname}):yr(P.Base64.decode(Ct.code)),_t.next=10;break;case 7:_t.prev=7,_t.t0=_t.catch(0),console.log(_t.t0);case 10:case"end":return _t.stop()}},Qt,null,[[0,7]])})),fr.apply(this,arguments)}function Wi(){g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",n.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(A.a)(i.a.mark(function Ct(){var $t;return i.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(T.i)(Mt);case 2:$t=an.sent,$t.status===401?Zt.replace("/login",{from:ht.pathname}):yr(P.Base64.decode($t.code));case 4:case"end":return an.stop()}},Ct)}))()}})}function gn(){Pt({type:ct.SET_SHOW_NOTE,payload:!0})}function rn(){Pt({type:ct.SET_SHOW_NOTE,payload:!1})}function on(Qt){return hr.apply(this,arguments)}function hr(){return hr=Object(A.a)(i.a.mark(function Qt(Ct){return i.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(T.a)(Mt,Ct);case 2:Pt({type:ct.GET_DATA,payload:{showNote:!1,data:Object(u.a)(Object(u.a)({},Jt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{notes:Ct.notes})})}});case 3:case"end":return _t.stop()}},Qt)})),hr.apply(this,arguments)}var Zr={hack:Rt,isLoading:Pn,input:Jt==null||((Ce=Jt.test_case)===null||Ce===void 0)?void 0:Ce.input,language:Rt==null?void 0:Rt.language,code:Rt==null?void 0:Rt.code,title:"main."+nt[Rt==null?void 0:Rt.language],modify_code:Rt==null?void 0:Rt.modify_code,notes:Rt==null?void 0:Rt.notes,debugResult:In,debuging:bn,submitting:Dn,executingMessage:rr,onCancelNote:rn,onAddNote:on,showNote:wn,user:jn,onShowNote:gn,onSubmitCode:en,onChangeCode:yr,onChangeInput:Vn,onDebugCode:er,onResetCode:Yn,onSyncCode:Wi,onUpdateCode:Yt,onChangeLanguage:mn};function qr(){return ri.apply(this,arguments)}function ri(){return ri=Object(A.a)(i.a.mark(function Qt(){var Ct,$t,_t;return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(T.j)(Rt.id,{container_type:"Hack",type:1});case 2:Ct=Cn.sent,$t=Ct.praise_count,_t=Object(u.a)(Object(u.a)({},Jt),{},{hack:Object(u.a)(Object(u.a)({},Rt),{},{praises_count:$t,user_praise:!Rt.user_praise})}),Pt({type:ct.SET_DATA,payload:_t});case 6:case"end":return Cn.stop()}},Qt)})),ri.apply(this,arguments)}var Ti={topicId:Mt,submitResult:kt,submitRecords:Mn,submitting:Dn,page:kn,onPageChange:Xt,hack:Rt,user:Jt==null?void 0:Jt.user,onTriggerPraise:qr};return n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a,{spinning:un,delay:500},Jt?n.a.createElement(n.a.Fragment,null,n.a.createElement("header",{className:z.a.header},ht.query.type!=="exercises"&&n.a.createElement("div",null,n.a.createElement("img",{src:"".concat(c.a.IMG_SERVER,"/images/").concat(jn.image_url),alt:"user",width:30}),n.a.createElement("span",null,jn.name)),n.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},n.a.createElement("div",null,Rt.name),(Rt==null?void 0:Rt.is_program)&&n.a.createElement(zn.a,{defaultValue:Rt==null?void 0:Rt.answer_long_time,onChange:function(Ct){console.log(Ct),Kr.current=Ct},className:"font12 c-grey-999"})),jn.hack_manager?n.a.createElement(w.a,{className:z.a.btn_back,to:(ht==null||((It=ht.query)===null||It===void 0)?void 0:It.type)==="1"?"/problems/".concat(Rt.identifier,"/edit?type=1"):"/problems/".concat(Rt.identifier,"/edit"),style:{marginRight:10}}," ",n.a.createElement(O.a,null)," \u7F16\u8F91"):null,(xt==null||((Ht=xt.exercise)===null||Ht===void 0)?void 0:Ht.left_time)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("span",{style:{color:xn},className:"iconfont icon-kaoshishichang mr5"}),n.a.createElement("span",{className:"c-white mr20"},n.a.createElement(gr,{valueStyle:{color:xn,fontSize:16,fontWeight:"normal"},title:n.a.createElement("span",{style:{color:xn,fontSize:16}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:pn,onFinish:Object(A.a)(i.a.mark(function Qt(){var Ct,$t;return i.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(y.Z)({categoryId:ht.query.exercisesId,commit_method:2});case 2:Ct=an.sent,(Ct==null?void 0:Ct.status)===0&&(Yt(),g.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:n.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",n.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Cn=Object(A.a)(i.a.mark(function Sr(){return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:window.parent.location.href="/classrooms/".concat(ht.query.coursesId,"/exercise/").concat(ht.query.exercisesId,"/detail");case 1:case"end":return sn.stop()}},Sr)}));function $n(){return Cn.apply(this,arguments)}return $n}()})),(Ct==null?void 0:Ct.status)===-3&&($t=parseInt(Ct==null?void 0:Ct.message),zt(Date.now()+$t*1e3));case 5:case"end":return an.stop()}},Qt)}))}))),(ht==null||((vn=ht.query)===null||vn===void 0)?void 0:vn.type)==="exercises"?n.a.createElement(k.a,{type:"primary",onClick:function(){Yt(),g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){wt()}})}},n.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," \u8FD4\u56DE\u8BD5\u5377"):n.a.createElement("span",{className:z.a.btn_back,onClick:function(){var Ct;if((ht==null||((Ct=ht.query)===null||Ct===void 0)?void 0:Ct.type)==="1"){var $t,_t=($t=localStorage.getItem("program_homework"))===null||$t===void 0?void 0:$t.split(",");Zt.push("/classrooms/".concat(_t==null?void 0:_t[0],"/program_homework/").concat(_t==null?void 0:_t[1],"/detail"))}else Zt.push("/problemset")}}," ",n.a.createElement(S.a,null),"\u9000\u51FA")),n.a.createElement(R.a,{size:"large",spinning:Pn},n.a.createElement(p.a,{className:"my-problems",leftChild:n.a.createElement(ln,Ti),rightChild:n.a.createElement(Lt,Zr)}))):null,n.a.createElement(g.a,{centered:!0,closable:!1,width:680,footer:null,visible:zr,className:"oj-modal"},n.a.createElement("section",{className:"oj-modal-content"},n.a.createElement("div",{className:"oj-modal-head"},n.a.createElement("img",{src:An.a,alt:""}),n.a.createElement("i",{onClick:function(){return Nr(!1)},className:"iconfont icon-guanbi1"})),n.a.createElement("aside",null,n.a.createElement("img",{className:"mr30",src:Wn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",n.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},kt==null?void 0:kt.execute_time,"ms"),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(kt==null?void 0:kt.time_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("aside",{className:"mb50"},n.a.createElement("img",{src:Gt.a,className:"mr30"}),n.a.createElement("span",{className:"oj-modal-tt"},n.a.createElement("span",null,n.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),n.a.createElement("span",{className:"c-light-primary"},kt==null?void 0:kt.execute_memory,"kb")),n.a.createElement("span",null,n.a.createElement("span",null))),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(kt==null?void 0:kt.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("div",{id:"oj-modal-next",onClick:Object(A.a)(i.a.mark(function Qt(){var Ct,$t,_t;return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!(kt!=null&&kt.next_identifier)){Cn.next=7;break}return Cn.next=3,Object(ot.a)("/api/problems/".concat(kt==null?void 0:kt.next_identifier,"/start.json"),{method:"get",params:{hack_user_id:jn==null?void 0:jn.user_id}});case 3:Ct=Cn.sent,Ct&&(Zt.replace("/myproblems/".concat(Ct==null?void 0:Ct.identifier,"?type=1")),window.location.reload()),Cn.next=9;break;case 7:_t=($t=localStorage.getItem("program_homework"))===null||$t===void 0?void 0:$t.split(","),Zt.push("/classrooms/".concat(_t==null?void 0:_t[0],"/program_homework/").concat(_t==null?void 0:_t[1],"/detail"));case 9:case"end":return Cn.stop()}},Qt)})),className:"oj-modal-btn"},kt!=null&&kt.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875")))))};function Fn(Pe){var Ce,It=Pe.title,Ht=Pe.modify_code,vn=Pe.onSyncCode,fn=Pe.onShowCodeSetting,nn=Pe.onResetCode,Kt=Pe.hack,Dt=Pe.onChangeLanguage,Pt=function(){g.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:n.a.createElement(E.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:nn})};return console.log(Kt,"hack"),n.a.createElement("div",{className:"action-bar",style:{paddingLeft:0}},(Kt==null?void 0:Kt.is_program)&&n.a.createElement(H.a,{className:"oj-select",value:Kt==null?void 0:Kt.language,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Kt==null||((Ce=Kt.all_language)===null||Ce===void 0)?void 0:Ce.map(function(Ft){return n.a.createElement(H.a.Option,{key:Ft,value:Ft},Ft)})),n.a.createElement("span",null),Ht?n.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:vn},n.a.createElement("img",{src:I.a,alt:"notice"})):null,n.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Pt},n.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),n.a.createElement("a",{onClick:fn},n.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Lt(Pe){var Ce=Pe.input,It=Pe.showNote,Ht=Pe.onShowNote,vn=Pe.notes,fn=Pe.onCancelNote,nn=Pe.onAddNote,Kt=Pe.debugResult,Dt=Pe.language,Pt=Pe.debuging,Ft=Pe.submitting,Mt=Pe.executingMessage,Zt=Pe.code,ht=Pe.onSubmitCode,un=Pe.onDebugCode,Jt=Pe.onChangeCode,In=Pe.onChangeInput,kt=Pe.onUpdateCode,Mn=Pe.user,kn=Pe.isLoading,wn=Object(K.a)(Pe,["input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading"]);function bn(rr){return n.a.createElement(Fn,Object(Y.a)({},wn,{onShowCodeSetting:rr}))}var Dn=Object(u.a)({input:Ce,debugResult:Kt,debuging:Pt,submitting:Ft,executingMessage:Mt,onDebugCode:un,onChangeCode:Jt,onSubmitCode:ht,onChangeInput:In,user:Mn},wn);return n.a.createElement("div",{className:"right-panel"},n.a.createElement(_.a,{isLoading:kn,language:Dt,value:Zt,onChange:Jt,ActionBarRender:bn}),n.a.createElement("div",{className:"note-form-area ".concat(It?"active":"")},n.a.createElement(le,{onCancel:fn,notes:vn,callback:nn})),n.a.createElement(C.b,Dn))}},RELg:function(Le,ye,F){var Y=F("MFOe"),K=Y.Global;Le.exports={name:"oldIE-userDataStorage",write:j,read:k,each:A,remove:D,clearAll:g};var L="storejs",H=K.document,N=d(),R=(K.navigator?K.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function j(s,l){if(R)return;var i=u(s);N(function(o){o.setAttribute(i,l),o.save(L)})}function k(s){if(R)return;var l=u(s),i=null;return N(function(o){i=o.getAttribute(l)}),i}function A(s){N(function(l){for(var i=l.XMLDocument.documentElement.attributes,o=i.length-1;o>=0;o--){var n=i[o];s(l.getAttribute(n.name),n.name)}})}function D(s){var l=u(s);N(function(i){i.removeAttribute(l),i.save(L)})}function g(){N(function(s){var l=s.XMLDocument.documentElement.attributes;s.load(L);for(var i=l.length-1;i>=0;i--)s.removeAttribute(l[i].name);s.save(L)})}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function u(s){return s.replace(/^\d/,"___$&").replace(h,"___")}function d(){if(!H||!H.documentElement||!H.documentElement.addBehavior)return null;var s="script",l,i,o;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window'),i.close(),l=i.w.frames[0].document,o=l.createElement("div")}catch(n){o=H.createElement("div"),l=H.body}return function(n){var f=[].slice.call(arguments,0);f.unshift(o),l.appendChild(o),o.addBehavior("#default#userData"),o.load(L),n.apply(this,f),l.removeChild(o);return}}},"S+dL":function(Le,ye){Le.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"S/kP":function(Le,ye,F){Le.exports=F.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Le,ye,F){var Y=F("wTVA"),K=F("EbDI"),L=F("ZhPi"),H=F("wkBT");function N(R){return Y(R)||K(R)||L(R)||H()}Le.exports=N,Le.exports.__esModule=!0,Le.exports.default=Le.exports},SJMd:function(Le,ye){/** * @license * Copyright (C) 2006 Google Inc. * @@ -91,12 +91,12 @@ Please report this to https://github.com/markedjs/marked.`,ae.silent)return"

    A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var F,Y,K,L=!1,H,N;window.PR_SHOULD_USE_CONTINUATION=!0;var R,j;(function(){var k=window,A=["break,continue,do,else,for,if,return,while"],D=[A,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[g,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],d=[g,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",l=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[A,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],n=[A,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],f=[A,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[h,d,u,l,i,o,n,f],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",w="kwd",T="com",y="typ",v="lit",p="pun",c="pln",E="tag",_="dec",b="src",I="atn",P="atv",B="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(Ke){for(var We=0,ze=!1,at=!1,Je=0,Xe=Ke.length;Je122||(Q<65||ie>90||Ne.push([Math.max(65,ie)|32,Math.min(Q,90)|32]),Q<97||ie>122||Ne.push([Math.max(97,ie)&~32,Math.min(Q,122)&~32]))}}Ne.sort(function(ce,Se){return ce[0]-Se[0]||Se[1]-ce[1]});for(var q=[],te=[],Ie=0;Iese[0]&&(se[1]+1>se[0]&&Ee.push("-"),Ee.push(dt(se[1])))}return Ee.push("]"),Ee.join("")}function _t(be){for(var _e=be.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ne=_e.length,ke=[],Ee=0,Ie=0;Ee=2&&ie==="["?_e[Ee]=lt(pe):ie!=="\\"&&(_e[Ee]=pe.replace(/[a-zA-Z]/g,function(te){var se=te.charCodeAt(0);return"["+String.fromCharCode(se&~32,se|32)+"]"}))}return _e.join("")}for(var ht=[],Je=0,Xe=Ke.length;Je=0;)ze[ht.charAt(be)]=_t;var _e=_t[1],Ne=""+_e;ft.hasOwnProperty(Ne)||(ot.push(_e),ft[Ne]=null)}ot.push(/[\0-\uffff]/),at=U(ot)})();var Je=We.length,Xe=function(He){for(var ot=He.sourceCode,ft=He.basePos,dt=He.sourceNode,lt=[ft,c],_t=0,ht=ot.match(at)||[],be={},_e=0,Ne=ht.length;_e=5&&Ee.substring(0,5)==="lang-",pe&&!(Ie&&typeof Ie[1]=="string")&&(pe=!1,Ee=b),pe||(be[ke]=Ee)}var Q=_t;if(_t+=ke.length,!pe)lt.push(ft+Q,Ee);else{var q=Ie[1],te=ke.indexOf(q),se=te+q.length;Ie[2]&&(se=ke.length-Ie[2].length,te=se-q.length);var ce=Ee.substring(5);W(dt,ft+Q,ke.substring(0,te),Xe,lt),W(dt,ft+Q+te,q,oe(ce,q),lt),W(dt,ft+Q+se,ke.substring(se),Xe,lt)}}He.decorations=lt};return Xe}function fe(Ke){var We=[],ze=[];Ke.tripleQuotedStrings?We.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ke.multiLineStrings?We.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):We.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ke.verbatimStrings&&ze.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var at=Ke.hashComments;at&&(Ke.cStyleComments?(at>1?We.push([T,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):We.push([T,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ze.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):We.push([T,/^#[^\r\n]*/,null,"#"])),Ke.cStyleComments&&(ze.push([T,/^\/\/[^\r\n]*/,null]),ze.push([T,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Je=Ke.regexLiterals;if(Je){var Xe=Je>1?"":` + */var F,Y,K,L=!1,H,N;window.PR_SHOULD_USE_CONTINUATION=!0;var R,j;(function(){var k=window,A=["break,continue,do,else,for,if,return,while"],D=[A,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[g,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],d=[g,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",l=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[A,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],n=[A,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],f=[A,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[h,d,u,l,i,o,n,f],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",w="kwd",T="com",y="typ",v="lit",p="pun",c="pln",E="tag",_="dec",b="src",I="atn",P="atv",B="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(Ke){for(var We=0,ze=!1,at=!1,Je=0,Xe=Ke.length;Je122||(Q<65||ie>90||Ne.push([Math.max(65,ie)|32,Math.min(Q,90)|32]),Q<97||ie>122||Ne.push([Math.max(97,ie)&~32,Math.min(Q,122)&~32]))}}Ne.sort(function(ce,Se){return ce[0]-Se[0]||Se[1]-ce[1]});for(var q=[],te=[],Ie=0;Iese[0]&&(se[1]+1>se[0]&&Ee.push("-"),Ee.push(dt(se[1])))}return Ee.push("]"),Ee.join("")}function yt(be){for(var _e=be.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ne=_e.length,ke=[],Ee=0,Ie=0;Ee=2&&ie==="["?_e[Ee]=lt(pe):ie!=="\\"&&(_e[Ee]=pe.replace(/[a-zA-Z]/g,function(te){var se=te.charCodeAt(0);return"["+String.fromCharCode(se&~32,se|32)+"]"}))}return _e.join("")}for(var pt=[],Je=0,Xe=Ke.length;Je=0;)ze[pt.charAt(be)]=yt;var _e=yt[1],Ne=""+_e;ft.hasOwnProperty(Ne)||(ot.push(_e),ft[Ne]=null)}ot.push(/[\0-\uffff]/),at=U(ot)})();var Je=We.length,Xe=function(He){for(var ot=He.sourceCode,ft=He.basePos,dt=He.sourceNode,lt=[ft,c],yt=0,pt=ot.match(at)||[],be={},_e=0,Ne=pt.length;_e=5&&Ee.substring(0,5)==="lang-",pe&&!(Ie&&typeof Ie[1]=="string")&&(pe=!1,Ee=b),pe||(be[ke]=Ee)}var Q=yt;if(yt+=ke.length,!pe)lt.push(ft+Q,Ee);else{var q=Ie[1],te=ke.indexOf(q),se=te+q.length;Ie[2]&&(se=ke.length-Ie[2].length,te=se-q.length);var ce=Ee.substring(5);W(dt,ft+Q,ke.substring(0,te),Xe,lt),W(dt,ft+Q+te,q,oe(ce,q),lt),W(dt,ft+Q+se,ke.substring(se),Xe,lt)}}He.decorations=lt};return Xe}function fe(Ke){var We=[],ze=[];Ke.tripleQuotedStrings?We.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ke.multiLineStrings?We.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):We.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ke.verbatimStrings&&ze.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var at=Ke.hashComments;at&&(Ke.cStyleComments?(at>1?We.push([T,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):We.push([T,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ze.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):We.push([T,/^#[^\r\n]*/,null,"#"])),Ke.cStyleComments&&(ze.push([T,/^\/\/[^\r\n]*/,null]),ze.push([T,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Je=Ke.regexLiterals;if(Je){var Xe=Je>1?"":` \r`,He=Xe?".":"[\\S\\s]",ot="/(?=[^/*"+Xe+"])(?:[^/\\x5B\\x5C"+Xe+"]|\\x5C"+He+"|\\x5B(?:[^\\x5C\\x5D"+Xe+"]|\\x5C"+He+")*(?:\\x5D|$))+/";ze.push(["lang-regex",RegExp("^"+z+"("+ot+")")])}var ft=Ke.types;ft&&ze.push([y,ft]);var dt=(""+Ke.keywords).replace(/^ | $/g,"");dt.length&&ze.push([w,new RegExp("^(?:"+dt.replace(/[\s,]+/g,"|")+")\\b"),null]),We.push([c,/^\s+/,null,` \r - \xA0`]);var lt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ke.regexLiterals&&(lt+="(?!s*/)"),ze.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[p,new RegExp(lt),null]),ne(We,ze)}var ue=fe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(Ke,We,ze){for(var at=/(?:^|\s)nocode(?:\s|$)/,Je=/\r\n?|\n/,Xe=Ke.ownerDocument,He=Xe.createElement("li");Ke.firstChild;)He.appendChild(Ke.firstChild);var ot=[He];function ft(_e){var Ne=_e.nodeType;if(Ne==1&&!at.test(_e.className))if(_e.nodeName==="br")dt(_e),_e.parentNode&&_e.parentNode.removeChild(_e);else for(var ke=_e.firstChild;ke;ke=ke.nextSibling)ft(ke);else if((Ne==3||Ne==4)&&ze){var Ee=_e.nodeValue,Ie=Ee.match(Je);if(Ie){var pe=Ee.substring(0,Ie.index);_e.nodeValue=pe;var ae=Ee.substring(Ie.index+Ie[0].length);if(ae){var ie=_e.parentNode;ie.insertBefore(Xe.createTextNode(ae),_e.nextSibling)}dt(_e),pe||_e.parentNode.removeChild(_e)}}}function dt(_e){for(;!_e.nextSibling;)if(_e=_e.parentNode,!_e)return;function Ne(Ie,pe){var ae=pe?Ie.cloneNode(!1):Ie,ie=Ie.parentNode;if(ie){var Q=Ne(ie,1),q=Ie.nextSibling;Q.appendChild(ae);for(var te=q;te;te=q)q=te.nextSibling,Q.appendChild(te)}return ae}for(var ke=Ne(_e.nextSibling,0),Ee;(Ee=ke.parentNode)&&Ee.nodeType===1;)ke=Ee;ot.push(ke)}for(var lt=0;lt=ie&&(ft+=2),Xe>=Q&&(_t+=2)}}finally{Ee&&(Ee.style.display=Ie)}}var ge={};function re(Ke,We){for(var ze=We.length;--ze>=0;){var at=We[ze];ge.hasOwnProperty(at)?k.console&&console.warn("cannot override language handler %s",at):ge[at]=Ke}}function oe(Ke,We){return Ke&&ge.hasOwnProperty(Ke)||(Ke=/^\s*]*(?:>|$)/],[T,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),re(ne([[c,/^[\s]+/,null,` \r -`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),re(ne([],[[P,/^[\s\S]+/]]),["uq.val"]),re(fe({keywords:h,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),re(fe({keywords:"null,true,false"}),["json"]),re(fe({keywords:d,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),re(fe({keywords:u,cStyleComments:!0}),["java"]),re(fe({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),re(fe({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),re(fe({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),re(fe({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),re(fe({keywords:l,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),re(fe({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),re(ne([],[[x,/^[\s\S]+/]]),["regex"]);function xe(Ke){var We=Ke.langExtension;try{var ze=C(Ke.sourceNode,Ke.pre),at=ze.sourceCode;Ke.sourceCode=at,Ke.spans=ze.spans,Ke.basePos=0,oe(We,at)(Ke),me(Ke)}catch(Je){k.console&&console.log(Je&&Je.stack||Je)}}function Be(Ke,We,ze){var at=ze||!1,Je=We||null,Xe=document.createElement("div");Xe.innerHTML="

    "+Ke+"
    ",Xe=Xe.firstChild,at&&le(Xe,at,!0);var He={langExtension:Je,numberLines:at,sourceNode:Xe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return xe(He),Xe.innerHTML}function Ve(Ke,We){var ze=We||document.body,at=ze.ownerDocument||document;function Je(ae){return ze.getElementsByTagName(ae)}for(var Xe=[Je("pre"),Je("code"),Je("xmp")],He=[],ot=0;ot=0;d--)if(this.__items[d].match(u))return!0;return!1},D.prototype.set_indent=function(u,d){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(u){this.__items.push(u);var d=u.lastIndexOf(` + \xA0`]);var lt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ke.regexLiterals&&(lt+="(?!s*/)"),ze.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[p,new RegExp(lt),null]),ne(We,ze)}var ue=fe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(Ke,We,ze){for(var at=/(?:^|\s)nocode(?:\s|$)/,Je=/\r\n?|\n/,Xe=Ke.ownerDocument,He=Xe.createElement("li");Ke.firstChild;)He.appendChild(Ke.firstChild);var ot=[He];function ft(_e){var Ne=_e.nodeType;if(Ne==1&&!at.test(_e.className))if(_e.nodeName==="br")dt(_e),_e.parentNode&&_e.parentNode.removeChild(_e);else for(var ke=_e.firstChild;ke;ke=ke.nextSibling)ft(ke);else if((Ne==3||Ne==4)&&ze){var Ee=_e.nodeValue,Ie=Ee.match(Je);if(Ie){var pe=Ee.substring(0,Ie.index);_e.nodeValue=pe;var ae=Ee.substring(Ie.index+Ie[0].length);if(ae){var ie=_e.parentNode;ie.insertBefore(Xe.createTextNode(ae),_e.nextSibling)}dt(_e),pe||_e.parentNode.removeChild(_e)}}}function dt(_e){for(;!_e.nextSibling;)if(_e=_e.parentNode,!_e)return;function Ne(Ie,pe){var ae=pe?Ie.cloneNode(!1):Ie,ie=Ie.parentNode;if(ie){var Q=Ne(ie,1),q=Ie.nextSibling;Q.appendChild(ae);for(var te=q;te;te=q)q=te.nextSibling,Q.appendChild(te)}return ae}for(var ke=Ne(_e.nextSibling,0),Ee;(Ee=ke.parentNode)&&Ee.nodeType===1;)ke=Ee;ot.push(ke)}for(var lt=0;lt=ie&&(ft+=2),Xe>=Q&&(yt+=2)}}finally{Ee&&(Ee.style.display=Ie)}}var ge={};function re(Ke,We){for(var ze=We.length;--ze>=0;){var at=We[ze];ge.hasOwnProperty(at)?k.console&&console.warn("cannot override language handler %s",at):ge[at]=Ke}}function oe(Ke,We){return Ke&&ge.hasOwnProperty(Ke)||(Ke=/^\s*]*(?:>|$)/],[T,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),re(ne([[c,/^[\s]+/,null,` \r +`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),re(ne([],[[P,/^[\s\S]+/]]),["uq.val"]),re(fe({keywords:h,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),re(fe({keywords:"null,true,false"}),["json"]),re(fe({keywords:d,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),re(fe({keywords:u,cStyleComments:!0}),["java"]),re(fe({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),re(fe({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),re(fe({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),re(fe({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),re(fe({keywords:l,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),re(fe({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),re(ne([],[[x,/^[\s\S]+/]]),["regex"]);function xe(Ke){var We=Ke.langExtension;try{var ze=C(Ke.sourceNode,Ke.pre),at=ze.sourceCode;Ke.sourceCode=at,Ke.spans=ze.spans,Ke.basePos=0,oe(We,at)(Ke),me(Ke)}catch(Je){k.console&&console.log(Je&&Je.stack||Je)}}function Be(Ke,We,ze){var at=ze||!1,Je=We||null,Xe=document.createElement("div");Xe.innerHTML="
    "+Ke+"
    ",Xe=Xe.firstChild,at&&le(Xe,at,!0);var He={langExtension:Je,numberLines:at,sourceNode:Xe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return xe(He),Xe.innerHTML}function Ve(Ke,We){var ze=We||document.body,at=ze.ownerDocument||document;function Je(ae){return ze.getElementsByTagName(ae)}for(var Xe=[Je("pre"),Je("code"),Je("xmp")],He=[],ot=0;ot=0;d--)if(this.__items[d].match(u))return!0;return!1},D.prototype.set_indent=function(u,d){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(u){this.__items.push(u);var d=u.lastIndexOf(` `);d!==-1?this.__character_count=u.length-d:this.__character_count+=u.length},D.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function g(u,d){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),d=d||"",u.indent_level>0&&(d=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}g.prototype.get_indent_size=function(u,d){var s=this.__base_string_length;return d=d||0,u<0&&(s=0),s+=u*this.__indent_size,s+=d,s},g.prototype.get_indent_string=function(u,d){var s=this.__base_string;return d=d||0,u<0&&(u=0,s=""),d+=u*this.__indent_size,this.__ensure_cache(d),s+=this.__cache[d],s},g.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var u=this.__cache.length,d=0,s="";this.__indent_size&&u>=this.__indent_size&&(d=Math.floor(u/this.__indent_size),u-=d*this.__indent_size,s=new Array(d+1).join(this.__indent_string)),u&&(s+=new Array(u+1).join(" ")),this.__cache.push(s)};function h(u,d){this.__indent_cache=new g(u,d),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(u,d){return this.__indent_cache.get_indent_string(u,d)},h.prototype.get_indent_size=function(u,d){return this.__indent_cache.get_indent_size(u,d)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(u){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===` `&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(` `);return u!==` @@ -110,30 +110,30 @@ You passed in: '`+this.raw_options[u]+"'");return l},D.prototype._is_valid_selec `&&((y===0||y0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,T=this._options.eol;T==="auto"&&(T=` `,w&&i.test(w||"")&&(T=w.match(i)[0])),w=w.replace(o,` `);var y=w.match(/^[\t ]*/)[0];this._output=new u(this._options,y),this._input=new d(w),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var v=0,p=!1,c=!1,E=!1,_=!1,b=!1,I=!1,P=this._ch,B=!1,z,U,C;z=this._input.read(f),U=z!=="",C=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var W=this._input.read(O),V=l.get_directives(W);V&&V.ignore==="start"&&(W+=l.readIgnored(this._input)),this.print_string(W),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(S)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var J=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);J.match(/[ :]$/)&&(J=this.eatString(": ").replace(/\s$/,""),this.print_string(J),this._output.space_before_token=!0),J=J.replace(/\s$/,""),J==="extend"?_=!0:J==="import"&&(b=!0),J in this.NESTED_AT_RULE?(this._nestedLevel+=1,J in this.CONDITIONAL_GROUP_RULE&&(E=!0)):!p&&v===0&&J.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),E?(E=!1,p=this._indentLevel>=this._nestedLevel):p=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&p&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(C==="("?this._output.space_before_token=!1:C!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),C==="{"&&this._output.trim(!0),b=!1,_=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),p=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ne=0;ne"||this._ch==="+"||this._ch==="~")&&!c&&v===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var le=C==='"'||C==="'";this.preserveSingleSpace(le||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&B&&this._output.add_new_line()}var me=this._output.get_code(T);return me},A.exports.Beautifier=x},function(A,D,g){var h=g(6).Options;function u(d){h.call(this,d,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i=15&&(h=!1,A=!0);var x=n&&(D||h&&(S==null||S<12.11)),w=L||j&&k>=9;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,t){var a=e.className,r=T(t).exec(a);if(r){var m=a.slice(r.index+r[0].length);e.className=a.slice(0,r.index)+(m?r[1]+m:"")}};function v(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function p(e,t){return v(e).appendChild(t)}function c(e,t,a,r){var m=document.createElement(e);if(a&&(m.className=a),r&&(m.style.cssText=r),typeof t=="string")m.appendChild(document.createTextNode(t));else if(t)for(var M=0;M=t)return G+(t-M);G+=X-M,G+=a-G%a,M=X+1}}var V=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var a=+new Date+e;(!this.id||a=t)return r+Math.min(G,t-m);if(m+=M-r,m+=a-m%a,r=M+1,m>=t)return r}}var re=[""];function oe(e){for(;re.length<=e;)re.push(xe(re)+" ");return re[e]}function xe(e){return e[e.length-1]}function Be(e,t){for(var a=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ke.test(e))}function ze(e,t){return t?t.source.indexOf("\\w")>-1&&We(e)?!0:t.test(e):We(e)}function at(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Je=/[\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 Xe(e){return e.charCodeAt(0)>=768&&Je.test(e)}function He(e,t,a){for(;(a<0?t>0:ta?-1:1;;){if(t==a)return t;var m=(t+a)/2,M=r<0?Math.ceil(m):Math.floor(m);if(M==t)return e(M)?t:a;e(M)?a=M:t=M+r}}function ft(e,t,a,r){if(!e)return r(t,a,"ltr",0);for(var m=!1,M=0;Mt||t==a&&G.to==t)&&(r(Math.max(G.from,t),Math.min(G.to,a),G.level==1?"rtl":"ltr",M),m=!0)}m||r(t,a,"ltr")}var dt=null;function lt(e,t,a){var r;dt=null;for(var m=0;mt)return m;M.to==t&&(M.from!=M.to&&a=="before"?r=m:dt=m),M.from==t&&(M.from!=M.to&&a!="before"?r=m:dt=m)}return r!=null?r:dt}var _t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(Z){return Z<=247?e.charAt(Z):1424<=Z&&Z<=1524?"R":1536<=Z&&Z<=1785?t.charAt(Z-1536):1774<=Z&&Z<=2220?"r":8192<=Z&&Z<=8203?"w":Z==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,m=/[stwN]/,M=/[LRr]/,G=/[Lb1n]/,X=/[1n]/;function $(Z,de,ve){this.level=Z,this.from=de,this.to=ve}return function(Z,de){var ve=de=="ltr"?"L":"R";if(Z.length==0||de=="ltr"&&!r.test(Z))return!1;for(var De=Z.length,Oe=[],Ge=0;Ge-1&&(r[t]=m.slice(0,M).concat(m.slice(M+1)))}}}function Ee(e,t){var a=Ne(e,t);if(!a.length)return;for(var r=Array.prototype.slice.call(arguments,2),m=0;m0}function ie(e){e.prototype.on=function(t,a){_e(this,t,a)},e.prototype.off=function(t,a){ke(this,t,a)}}function Q(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function q(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function te(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function se(e){Q(e),q(e)}function ce(e){return e.target||e.srcElement}function Se(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),n&&e.ctrlKey&&t==1&&(t=3),t}var je=function(){if(j&&k<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Ze;function ut(e){if(Ze==null){var t=c("span","\u200B");p(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ze=t.offsetWidth<=1&&t.offsetHeight>2&&!(j&&k<8))}var a=Ze?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var it;function rt(e){if(it!=null)return it;var t=p(e,document.createTextNode("A\u062EA")),a=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return v(e),!a||a.left==a.right?!1:it=r.right-a.right<3}var Me=` +`&&B&&this._output.add_new_line()}var me=this._output.get_code(T);return me},A.exports.Beautifier=x},function(A,D,g){var h=g(6).Options;function u(d){h.call(this,d,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i=15&&(h=!1,A=!0);var x=n&&(D||h&&(S==null||S<12.11)),w=L||j&&k>=9;function T(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,t){var a=e.className,r=T(t).exec(a);if(r){var m=a.slice(r.index+r[0].length);e.className=a.slice(0,r.index)+(m?r[1]+m:"")}};function v(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function p(e,t){return v(e).appendChild(t)}function c(e,t,a,r){var m=document.createElement(e);if(a&&(m.className=a),r&&(m.style.cssText=r),typeof t=="string")m.appendChild(document.createTextNode(t));else if(t)for(var M=0;M=t)return G+(t-M);G+=X-M,G+=a-G%a,M=X+1}}var V=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var a=+new Date+e;(!this.id||a=t)return r+Math.min(G,t-m);if(m+=M-r,m+=a-m%a,r=M+1,m>=t)return r}}var re=[""];function oe(e){for(;re.length<=e;)re.push(xe(re)+" ");return re[e]}function xe(e){return e[e.length-1]}function Be(e,t){for(var a=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ke.test(e))}function ze(e,t){return t?t.source.indexOf("\\w")>-1&&We(e)?!0:t.test(e):We(e)}function at(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Je=/[\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 Xe(e){return e.charCodeAt(0)>=768&&Je.test(e)}function He(e,t,a){for(;(a<0?t>0:ta?-1:1;;){if(t==a)return t;var m=(t+a)/2,M=r<0?Math.ceil(m):Math.floor(m);if(M==t)return e(M)?t:a;e(M)?a=M:t=M+r}}function ft(e,t,a,r){if(!e)return r(t,a,"ltr",0);for(var m=!1,M=0;Mt||t==a&&G.to==t)&&(r(Math.max(G.from,t),Math.min(G.to,a),G.level==1?"rtl":"ltr",M),m=!0)}m||r(t,a,"ltr")}var dt=null;function lt(e,t,a){var r;dt=null;for(var m=0;mt)return m;M.to==t&&(M.from!=M.to&&a=="before"?r=m:dt=m),M.from==t&&(M.from!=M.to&&a!="before"?r=m:dt=m)}return r!=null?r:dt}var yt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(Z){return Z<=247?e.charAt(Z):1424<=Z&&Z<=1524?"R":1536<=Z&&Z<=1785?t.charAt(Z-1536):1774<=Z&&Z<=2220?"r":8192<=Z&&Z<=8203?"w":Z==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,m=/[stwN]/,M=/[LRr]/,G=/[Lb1n]/,X=/[1n]/;function $(Z,de,ve){this.level=Z,this.from=de,this.to=ve}return function(Z,de){var ve=de=="ltr"?"L":"R";if(Z.length==0||de=="ltr"&&!r.test(Z))return!1;for(var De=Z.length,Oe=[],Ge=0;Ge-1&&(r[t]=m.slice(0,M).concat(m.slice(M+1)))}}}function Ee(e,t){var a=Ne(e,t);if(!a.length)return;for(var r=Array.prototype.slice.call(arguments,2),m=0;m0}function ie(e){e.prototype.on=function(t,a){_e(this,t,a)},e.prototype.off=function(t,a){ke(this,t,a)}}function Q(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function q(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function te(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function se(e){Q(e),q(e)}function ce(e){return e.target||e.srcElement}function Se(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),n&&e.ctrlKey&&t==1&&(t=3),t}var je=function(){if(j&&k<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Ze;function ut(e){if(Ze==null){var t=c("span","\u200B");p(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ze=t.offsetWidth<=1&&t.offsetHeight>2&&!(j&&k<8))}var a=Ze?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var it;function rt(e){if(it!=null)return it;var t=p(e,document.createTextNode("A\u062EA")),a=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return v(e),!a||a.left==a.right?!1:it=r.right-a.right<3}var Me=` b`.split(/\n/).length!=3?function(e){for(var t=0,a=[],r=e.length;t<=r;){var m=e.indexOf(` -`,t);m==-1&&(m=e.length);var M=e.slice(t,e.charAt(m-1)=="\r"?m-1:m),G=M.indexOf("\r");G!=-1?(a.push(M.slice(0,G)),t+=G+1):(a.push(M),t=m+1)}return a}:function(e){return e.split(/\r\n?|\n/)},Ue=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(a){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},we=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ee=null;function he(e){if(ee!=null)return ee;var t=p(e,c("span","x")),a=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return ee=Math.abs(a.left-r.left)>1}var Fe={},Re={};function et(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function tt(e,t){Re[e]=t}function Te(e){if(typeof e=="string"&&Re.hasOwnProperty(e))e=Re[e];else if(e&&typeof e.name=="string"&&Re.hasOwnProperty(e.name)){var t=Re[e.name];typeof t=="string"&&(t={name:t}),e=$e(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Te("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Te("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ae(e,t){t=Te(t);var a=Fe[t.name];if(!a)return Ae(e,"text/plain");var r=a(e,t);if(Qe.hasOwnProperty(t.name)){var m=Qe[t.name];for(var M in m){if(!m.hasOwnProperty(M))continue;r.hasOwnProperty(M)&&(r["_"+M]=r[M]),r[M]=m[M]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var G in t.modeProps)r[G]=t.modeProps[G];return r}var Qe={};function Et(e,t){var a=Qe.hasOwnProperty(e)?Qe[e]:Qe[e]={};C(t,a)}function vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var a={};for(var r in t){var m=t[r];m instanceof Array&&(m=m.concat([])),a[r]=m}return a}function cn(e,t){for(var a;e.innerMode&&!(a=e.innerMode(t),!a||a.mode==e);)t=a.state,e=a.mode;return a||{mode:e,state:t}}function yn(e,t,a){return e.startState?e.startState(t,a):!0}var ln=function(e,t,a){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.post},ln.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ln.prototype.backUp=function(e){this.pos-=e},ln.prototype.column=function(){return this.lastColumnPos0?null:(M&&t!==!1&&(this.pos+=M[0].length),M)}},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ln.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ln.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function bt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var a=e;!a.lines;)for(var r=0;;++r){var m=a.children[r],M=m.chunkSize();if(t=e.first&&ta?nt(a,bt(e,a).text.length):Pe(t,bt(e,t.line).text.length)}function Pe(e,t){var a=e.ch;return a==null||a>t?nt(e.line,t):a<0?nt(e.line,0):e}function Ce(e,t){for(var a=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Kt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Kt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Kt.fromSaved=function(e,t,a){return t instanceof It?new Kt(e,vt(e.mode,t.state),a,t.lookAhead):new Kt(e,vt(e.mode,t),a)},Kt.prototype.save=function(e){var t=e!==!1?vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new It(t,this.maxLookAhead):t};function vn(e,t,a,r){var m=[e.state.modeGen],M={};gt(e,t.text,e.doc.mode,a,function(Z,de){return m.push(Z,de)},M,r);for(var G=a.state,X=function(Z){a.baseTokens=m;var de=e.state.overlays[Z],ve=1,De=0;a.state=!0,gt(e,t.text,de.mode,a,function(Oe,Ge){for(var qe=ve;DeOe&&m.splice(ve,1,Oe,m[ve+1],st),ve+=2,De=Math.min(Oe,st)}if(!Ge)return;if(de.opaque)m.splice(qe,ve-qe,Oe,"overlay "+Ge),ve=qe+2;else for(;qee.options.maxHighlightLength&&vt(e.doc.mode,r.state),M=vn(e,t,r);m&&(r.state=m),t.stateAfter=r.save(!m),t.styles=M.styles,M.classes?t.styleClasses=M.classes:t.styleClasses&&(t.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function rn(e,t,a){var r=e.doc,m=e.display;if(!r.mode.startState)return new Kt(r,!0,t);var M=un(e,t,a),G=M>r.first&&bt(r,M-1).stateAfter,X=G?Kt.fromSaved(r,G,M):new Kt(r,yn(r.mode),M);return r.iter(M,t,function($){Gt(e,$.text,X);var Z=X.line;$.stateAfter=Z==t-1||Z%5==0||Z>=m.viewFrom&&Zt.start)return M}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ft=function(e,t,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=a};function Mt(e,t,a,r){var m=e.doc,M=m.mode,G;t=Lt(m,t);var X=bt(m,t.line),$=rn(e,t.line,a),Z=new ln(X.text,e.options.tabSize,$),de;for(r&&(de=[]);(r||Z.pose.options.maxHighlightLength?(X=!1,G&&Gt(e,t,r,de.pos),de.pos=t.length,ve=null):ve=qt(Pt(a,de,r.state,De),M),De){var Oe=De[0].name;Oe&&(ve="m-"+(ve?Oe+" "+ve:Oe))}if(!X||Z!=ve){for(;$G;--X){if(X<=M.first)return M.first;var $=bt(M,X-1),Z=$.stateAfter;if(Z&&(!a||X+(Z instanceof It?Z.lookAhead:0)<=M.modeFrontier))return X;var de=W($.text,null,e.options.tabSize);(m==null||r>de)&&(m=X-1,r=de)}return m}function Qt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiera;r--){var m=bt(e,r).stateAfter;if(m&&(!(m instanceof It)||r+m.lookAhead=t:M.to>t);(r||(r=[])).push(new wn(G,M.from,$?null:M.to))}}return r}function Xn(e,t,a){var r;if(e)for(var m=0;m=t:M.to>t);if(X||M.from==t&&G.type=="bookmark"&&(!a||M.marker.insertLeft)){var $=M.from==null||(G.inclusiveLeft?M.from<=t:M.from0&&X)for(var Ot=0;Ot0)continue;var de=[$,1],ve=ct(Z.from,X.from),De=ct(Z.to,X.to);(ve<0||!G.inclusiveLeft&&!ve)&&de.push({from:Z.from,to:X.from}),(De>0||!G.inclusiveRight&&!De)&&de.push({from:X.to,to:Z.to}),m.splice.apply(m,de),$+=de.length-3}return m}function hn(e){var t=e.markedSpans;if(!t)return;for(var a=0;at)&&(!r||jt(r,M.marker)<0)&&(r=M.marker)}return r}function Mn(e,t,a,r,m){var M=bt(e,t),G=kt&&M.markedSpans;if(G)for(var X=0;X=0&&ve<=0||de<=0&&ve>=0)continue;if(de<=0&&($.marker.inclusiveRight&&m.inclusiveLeft?ct(Z.to,a)>=0:ct(Z.to,a)>0)||de>=0&&($.marker.inclusiveRight&&m.inclusiveLeft?ct(Z.from,r)<=0:ct(Z.from,r)<0))return!0}}function dr(e){for(var t;t=en(e);)e=t.find(-1,!0).line;return e}function Qr(e){for(var t;t=Ut(e);)e=t.find(1,!0).line;return e}function Ir(e){for(var t,a;t=Ut(e);)e=t.find(1,!0).line,(a||(a=[])).push(e);return a}function Gr(e,t){var a=bt(e,t),r=dr(a);return a==r?t:zt(r)}function Mr(e,t){if(t>e.lastLine())return t;var a=bt(e,t),r;if(!Or(e,a))return t;for(;r=Ut(a);)a=r.find(1,!0).line;return zt(a)+1}function Or(e,t){var a=kt&&t.markedSpans;if(a)for(var r=void 0,m=0;mt.maxLineLength&&(t.maxLineLength=m,t.maxLine=r)})}var gr=function(e,t,a){this.text=e,pn(this,t),this.height=a?a(this):1};gr.prototype.lineNo=function(){return zt(this)},ie(gr);function ni(e,t,a,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),hn(e),pn(e,a);var m=r?r(e):1;m!=e.height&&Tn(e,m)}function wt(e){e.parent=null,hn(e)}var Wt={},At={};function Vt(e,t){if(!e||/^\s*$/.test(e))return null;var a=t.addModeClass?At:Wt;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,t){var a=E("span",null,null,A?"padding-right: .1px":null),r={pre:E("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var m=0;m<=(t.rest?t.rest.length:0);m++){var M=m?t.rest[m-1]:t.line,G=void 0;r.pos=0,r.addToken=tn,rt(e.display.measure)&&(G=ht(M,e.doc.direction))&&(r.addToken=er(r.addToken,G)),r.map=[];var X=t!=e.display.externalMeasured&&zt(M);vr(M,r,fn(e,M,X)),M.styleClasses&&(M.styleClasses.bgClass&&(r.bgClass=B(M.styleClasses.bgClass,r.bgClass||"")),M.styleClasses.textClass&&(r.textClass=B(M.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ut(e.display.measure))),m==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(A){var $=r.content.lastChild;(/\bcm-tab\b/.test($.className)||$.querySelector&&$.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ee(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=B(r.pre.className,r.textClass||"")),r}function _n(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function tn(e,t,a,r,m,M,G){if(!t)return;var X=e.splitSpaces?Pn(t,e.trailingSpace):t,$=e.cm.state.specialChars,Z=!1,de;if(!$.test(t))e.col+=t.length,de=document.createTextNode(X),e.map.push(e.pos,e.pos+t.length,de),j&&k<9&&(Z=!0),e.pos+=t.length;else{de=document.createDocumentFragment();for(var ve=0;;){$.lastIndex=ve;var De=$.exec(t),Oe=De?De.index-ve:t.length-ve;if(Oe){var Ge=document.createTextNode(X.slice(ve,ve+Oe));j&&k<9?de.appendChild(c("span",[Ge])):de.appendChild(Ge),e.map.push(e.pos,e.pos+Oe,Ge),e.col+=Oe,e.pos+=Oe}if(!De)break;ve+=Oe+1;var qe=void 0;if(De[0]==" "){var st=e.cm.options.tabSize,pt=st-e.col%st;qe=de.appendChild(c("span",oe(pt),"cm-tab")),qe.setAttribute("role","presentation"),qe.setAttribute("cm-text"," "),e.col+=pt}else De[0]=="\r"||De[0]==` -`?(qe=de.appendChild(c("span",De[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),qe.setAttribute("cm-text",De[0]),e.col+=1):(qe=e.cm.options.specialCharPlaceholder(De[0]),qe.setAttribute("cm-text",De[0]),j&&k<9?de.appendChild(c("span",[qe])):de.appendChild(qe),e.col+=1);e.map.push(e.pos,e.pos+1,qe),e.pos++}}if(e.trailingSpace=X.charCodeAt(t.length-1)==32,a||r||m||Z||M||G){var Tt=a||"";r&&(Tt+=r),m&&(Tt+=m);var mt=c("span",[de],Tt,M);if(G)for(var Ot in G)G.hasOwnProperty(Ot)&&Ot!="style"&&Ot!="class"&&mt.setAttribute(Ot,G[Ot]);return e.content.appendChild(mt)}e.content.appendChild(de)}function Pn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var a=t,r="",m=0;mZ&&ve.from<=Z);De++);if(ve.to>=de)return e(a,r,m,M,G,X,$);e(a,r.slice(0,ve.to-Z),m,M,null,X,$),M=null,r=r.slice(ve.to-Z),Z=ve.to}}}function Yt(e,t,a,r){var m=!r&&a.widgetNode;m&&e.map.push(e.pos,e.pos+t,m),!r&&e.cm.display.input.needsContentAttribute&&(m||(m=e.content.appendChild(document.createElement("span"))),m.setAttribute("cm-marker",a.id)),m&&(e.cm.display.input.setUneditable(m),e.content.appendChild(m)),e.pos+=t,e.trailingSpace=!1}function vr(e,t,a){var r=e.markedSpans,m=e.text,M=0;if(!r){for(var G=1;G$||nn.collapsed&&Nt.to==$&&Nt.from==$)){if(Nt.to!=null&&Nt.to!=$&&Oe>Nt.to&&(Oe=Nt.to,qe=""),nn.className&&(Ge+=" "+nn.className),nn.css&&(De=(De?De+";":"")+nn.css),nn.startStyle&&Nt.from==$&&(st+=" "+nn.startStyle),nn.endStyle&&Nt.to==Oe&&(Ot||(Ot=[])).push(nn.endStyle,Nt.to),nn.title&&((Tt||(Tt={})).title=nn.title),nn.attributes)for(var Dn in nn.attributes)(Tt||(Tt={}))[Dn]=nn.attributes[Dn];nn.collapsed&&(!pt||jt(pt.marker,nn)<0)&&(pt=Nt)}else Nt.from>$&&Oe>Nt.from&&(Oe=Nt.from)}if(Ot)for(var or=0;or=X)break;for(var kr=Math.min(X,Oe);;){if(de){var Ar=$+de.length;if(!pt){var Qn=Ar>kr?de.slice(0,kr-$):de;t.addToken(t,Qn,ve?ve+Ge:Ge,st,$+Qn.length==Oe?qe:"",De,Tt)}if(Ar>=kr){de=de.slice(kr-$),$=kr;break}$=Ar,st=""}de=m.slice(M,M=a[Z++]),ve=Vt(a[Z++],t.cm.options)}}}function mn(e,t,a){this.line=t,this.rest=Ir(t),this.size=this.rest?zt(xe(this.rest))-a+1:1,this.node=this.text=null,this.hidden=Or(e,t)}function Vn(e,t,a){for(var r=[],m,M=t;M2&&M.push(($.bottom+Z.top)/2-a.top)}}M.push(a.bottom-a.top)}}function Kr(e,t,a){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;ra)return{map:e.measure.maps[m],cache:e.measure.caches[m],before:!0}}function Hi(e,t){t=dr(t);var a=zt(t),r=e.display.externalMeasured=new mn(e.doc,t,a);r.lineN=a;var m=r.built=$t(e,r);return r.text=m.pre,p(e.display.lineMeasure,m.pre),r}function Vr(e,t,a,r){return ei(e,Si(e,t),a,r)}function Pr(e,t){if(t>=e.display.viewFrom&&t=a.lineN&&tt)&&(M=$-X,m=M-1,t>=$&&(G="right")),m!=null){if(r=e[Z+2],X==$&&a==(r.insertLeft?"left":"right")&&(G=a),a=="left"&&m==0)for(;Z&&e[Z-2]==e[Z-3]&&e[Z-1].insertLeft;)r=e[(Z-=3)+2],G="left";if(a=="right"&&m==$-X)for(;Z=0&&!((a=e[m]).left!=a.right);m--);return a}function Ws(e,t,a,r){var m=po(t.map,a,r),M=m.node,G=m.start,X=m.end,$=m.collapse,Z;if(M.nodeType==3){for(var de=0;de<4;de++){for(;G&&Xe(t.line.text.charAt(m.coverStart+G));)--G;for(;m.coverStart+X0&&($=r="right");var ve;e.options.lineWrapping&&(ve=M.getClientRects()).length>1?Z=ve[r=="right"?ve.length-1:0]:Z=M.getBoundingClientRect()}if(j&&k<9&&!G&&(!Z||!Z.left&&!Z.right)){var De=M.parentNode.getClientRects()[0];De?Z={left:De.left,right:De.left+wi(e.display),top:De.top,bottom:De.bottom}:Z=ho}for(var Oe=Z.top-t.rect.top,Ge=Z.bottom-t.rect.top,qe=(Oe+Ge)/2,st=t.view.measure.heights,pt=0;pt=r.text.length?($=r.text.length,Z="before"):$<=0&&($=0,Z="after"),!X)return G(Z=="before"?$-1:$,Z=="before");function de(Ge,qe,st){var pt=X[qe],Tt=pt.level==1;return G(st?Ge-1:Ge,Tt!=st)}var ve=lt(X,$,Z),De=dt,Oe=de($,ve,Z=="before");return De!=null&&(Oe.other=de($,De,Z!="before")),Oe}function bo(e,t){var a=0;t=Lt(e.doc,t),e.options.lineWrapping||(a=wi(e.display)*t.ch);var r=bt(e.doc,t.line),m=Fn(r)+Wr(e.display);return{left:a,right:a,top:m,bottom:m+r.height}}function Pa(e,t,a,r,m){var M=nt(e,t,a);return M.xRel=m,r&&(M.outside=r),M}function Na(e,t,a){var r=e.doc;if(a+=e.display.viewOffset,a<0)return Pa(r.first,0,null,-1,-1);var m=Sn(r,a),M=r.first+r.size-1;if(m>M)return Pa(r.first+r.size-1,bt(r,M).text.length,null,1,1);t<0&&(t=0);for(var G=bt(r,m);;){var X=Ks(e,G,m,t,a),$=rr(G,X.ch+(X.xRel>0||X.outside>0?1:0));if(!$)return X;var Z=$.find(1);if(Z.line==m)return Z;G=bt(r,m=Z.line)}}function Eo(e,t,a,r){r-=Ia(t);var m=t.text.length,M=ot(function(G){return ei(e,a,G-1).bottom<=r},m,0);return m=ot(function(G){return ei(e,a,G).top>r},M,m),{begin:M,end:m}}function xo(e,t,a,r){a||(a=Si(e,t));var m=ca(e,t,ei(e,a,r),"line").top;return Eo(e,t,a,m)}function ka(e,t,a,r){return e.bottom<=a?!1:e.top>a?!0:(r?e.left:e.right)>t}function Ks(e,t,a,r,m){m-=Fn(t);var M=Si(e,t),G=Ia(t),X=0,$=t.text.length,Z=!0,de=ht(t,e.doc.direction);if(de){var ve=(e.options.lineWrapping?zs:Gs)(e,t,a,M,de,r,m);Z=ve.level!=1,X=Z?ve.from:ve.to-1,$=Z?ve.to:ve.from-1}var De=null,Oe=null,Ge=ot(function(Ht){var Nt=ei(e,M,Ht);return Nt.top+=G,Nt.bottom+=G,ka(Nt,r,m,!1)?(Nt.top<=m&&Nt.left<=r&&(De=Ht,Oe=Nt),!0):!1},X,$),qe,st,pt=!1;if(Oe){var Tt=r-Oe.left=Ot.bottom?1:0}return Ge=He(t.text,Ge,1),Pa(a,Ge,st,pt,r-qe)}function Gs(e,t,a,r,m,M,G){var X=ot(function(ve){var De=m[ve],Oe=De.level!=1;return ka(Yr(e,nt(a,Oe?De.to:De.from,Oe?"before":"after"),"line",t,r),M,G,!0)},0,m.length-1),$=m[X];if(X>0){var Z=$.level!=1,de=Yr(e,nt(a,Z?$.from:$.to,Z?"after":"before"),"line",t,r);ka(de,M,G,!0)&&de.top>G&&($=m[X-1])}return $}function zs(e,t,a,r,m,M,G){var X=Eo(e,t,r,G),$=X.begin,Z=X.end;/\s/.test(t.text.charAt(Z-1))&&Z--;for(var de=null,ve=null,De=0;De=Z||Oe.to<=$)continue;var Ge=Oe.level!=1,qe=ei(e,r,Ge?Math.min(Z,Oe.to)-1:Math.max($,Oe.from)).right,st=qest)&&(de=Oe,ve=st)}return de||(de=m[m.length-1]),de.from<$&&(de={from:$,to:de.to,level:de.level}),de.to>Z&&(de={from:de.from,to:Z,level:de.level}),de}var pi;function Oi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pi==null){pi=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pi.appendChild(document.createTextNode("x")),pi.appendChild(c("br"));pi.appendChild(document.createTextNode("x"))}p(e.measure,pi);var a=pi.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),v(e.measure),a||1}function wi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),a=c("pre",[t],"CodeMirror-line-like");p(e.measure,a);var r=t.getBoundingClientRect(),m=(r.right-r.left)/10;return m>2&&(e.cachedCharWidth=m),m||10}function Ua(e){for(var t=e.display,a={},r={},m=t.gutters.clientLeft,M=t.gutters.firstChild,G=0;M;M=M.nextSibling,++G){var X=e.display.gutterSpecs[G].className;a[X]=M.offsetLeft+M.clientLeft+m,r[X]=M.clientWidth}return{fixedPos:Fa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:a,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Fa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function To(e){var t=Oi(e.display),a=e.options.lineWrapping,r=a&&Math.max(5,e.display.scroller.clientWidth/wi(e.display)-3);return function(m){if(Or(e.doc,m))return 0;var M=0;if(m.widgets)for(var G=0;G0&&(Z=bt(e.doc,$.line).text).length==$.ch){var de=W(Z,Z.length,e.options.tabSize)-Z.length;$=nt($.line,Math.max(0,Math.round((M-wr(e.display).left)/wi(e.display))-de))}return $}function gi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var a=e.display.view,r=0;rt)&&(m.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=m.viewTo)kt&&Gr(e.doc,t)m.viewFrom?si(e):(m.viewFrom+=r,m.viewTo+=r);else if(t<=m.viewFrom&&a>=m.viewTo)si(e);else if(t<=m.viewFrom){var M=fa(e,a,a+r,1);M?(m.view=m.view.slice(M.index),m.viewFrom=M.lineN,m.viewTo+=r):si(e)}else if(a>=m.viewTo){var G=fa(e,t,t,-1);G?(m.view=m.view.slice(0,G.index),m.viewTo=G.lineN):si(e)}else{var X=fa(e,t,t,-1),$=fa(e,a,a+r,1);X&&$?(m.view=m.view.slice(0,X.index).concat(Vn(e,X.lineN,$.lineN)).concat(m.view.slice($.index)),m.viewTo+=r):si(e)}var Z=m.externalMeasured;Z&&(a=m.lineN&&t=r.viewTo)return;var M=r.view[gi(e,t)];if(M.node==null)return;var G=M.changes||(M.changes=[]);J(G,a)==-1&&G.push(a)}function si(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fa(e,t,a,r){var m=gi(e,t),M,G=e.display.view;if(!kt||a==e.doc.first+e.doc.size)return{index:m,lineN:a};for(var X=e.display.viewFrom,$=0;$0){if(m==G.length-1)return null;M=X+G[m].size-t,m++}else M=X-t;t+=M,a+=M}for(;Gr(e.doc,a)!=a;){if(m==(r<0?0:G.length-1))return null;a+=r*G[m-(r<0?1:0)].size,m+=r}return{index:m,lineN:a}}function Xs(e,t,a){var r=e.display,m=r.view;m.length==0||t>=r.viewTo||a<=r.viewFrom?(r.view=Vn(e,t,a),r.viewFrom=t):(r.viewFrom>t?r.view=Vn(e,t,r.viewFrom).concat(r.view):r.viewFroma&&(r.view=r.view.slice(0,gi(e,a)))),r.viewTo=a}function So(e){for(var t=e.display.view,a=0,r=0;r=e.display.viewTo||X.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Ci(e),t.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),Wa(e))}function Ro(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ci(e))},100)}function Wa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ee(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),A&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ba(e)}function Ci(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ee(e,"blur",e,t),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function pa(e){for(var t=e.display,a=t.lineDiv.offsetTop,r=0;r.005||de<-.005)&&(Tn(m.line,G),Ao(m.line),m.rest))for(var ve=0;vee.display.sizerWidth){var De=Math.ceil(X/wi(e.display));De>e.display.maxLineLength&&(e.display.maxLineLength=De,e.display.maxLine=m.line,e.display.maxLineChanged=!0)}}}function Ao(e){if(e.widgets)for(var t=0;t=G&&(M=Sn(t,Fn(bt(t,$))-e.wrapper.clientHeight),G=$)}return{from:M,to:Math.max(G,M+1)}}function Ys(e,t){if(Ie(e,"scrollCursorIntoView"))return;var a=e.display,r=a.sizer.getBoundingClientRect(),m=null;if(t.top+r.top<0?m=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(m=!1),m!=null&&!s){var M=c("div","\u200B",null,`position: absolute; - top: `+(t.top-a.viewOffset-Wr(e.display))+`px; +`,t);m==-1&&(m=e.length);var M=e.slice(t,e.charAt(m-1)=="\r"?m-1:m),G=M.indexOf("\r");G!=-1?(a.push(M.slice(0,G)),t+=G+1):(a.push(M),t=m+1)}return a}:function(e){return e.split(/\r\n?|\n/)},Ue=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(a){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},we=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ee=null;function he(e){if(ee!=null)return ee;var t=p(e,c("span","x")),a=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return ee=Math.abs(a.left-r.left)>1}var Fe={},Re={};function et(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function tt(e,t){Re[e]=t}function Te(e){if(typeof e=="string"&&Re.hasOwnProperty(e))e=Re[e];else if(e&&typeof e.name=="string"&&Re.hasOwnProperty(e.name)){var t=Re[e.name];typeof t=="string"&&(t={name:t}),e=$e(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Te("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Te("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ae(e,t){t=Te(t);var a=Fe[t.name];if(!a)return Ae(e,"text/plain");var r=a(e,t);if(Qe.hasOwnProperty(t.name)){var m=Qe[t.name];for(var M in m){if(!m.hasOwnProperty(M))continue;r.hasOwnProperty(M)&&(r["_"+M]=r[M]),r[M]=m[M]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var G in t.modeProps)r[G]=t.modeProps[G];return r}var Qe={};function Et(e,t){var a=Qe.hasOwnProperty(e)?Qe[e]:Qe[e]={};C(t,a)}function vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var a={};for(var r in t){var m=t[r];m instanceof Array&&(m=m.concat([])),a[r]=m}return a}function cn(e,t){for(var a;e.innerMode&&!(a=e.innerMode(t),!a||a.mode==e);)t=a.state,e=a.mode;return a||{mode:e,state:t}}function yn(e,t,a){return e.startState?e.startState(t,a):!0}var ln=function(e,t,a){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.post},ln.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ln.prototype.backUp=function(e){this.pos-=e},ln.prototype.column=function(){return this.lastColumnPos0?null:(M&&t!==!1&&(this.pos+=M[0].length),M)}},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ln.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ln.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function bt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var a=e;!a.lines;)for(var r=0;;++r){var m=a.children[r],M=m.chunkSize();if(t=e.first&&ta?nt(a,bt(e,a).text.length):Pe(t,bt(e,t.line).text.length)}function Pe(e,t){var a=e.ch;return a==null||a>t?nt(e.line,t):a<0?nt(e.line,0):e}function Ce(e,t){for(var a=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ht.fromSaved=function(e,t,a){return t instanceof It?new Ht(e,vt(e.mode,t.state),a,t.lookAhead):new Ht(e,vt(e.mode,t),a)},Ht.prototype.save=function(e){var t=e!==!1?vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new It(t,this.maxLookAhead):t};function vn(e,t,a,r){var m=[e.state.modeGen],M={};ht(e,t.text,e.doc.mode,a,function(Z,de){return m.push(Z,de)},M,r);for(var G=a.state,X=function(Z){a.baseTokens=m;var de=e.state.overlays[Z],ve=1,De=0;a.state=!0,ht(e,t.text,de.mode,a,function(Oe,Ge){for(var qe=ve;DeOe&&m.splice(ve,1,Oe,m[ve+1],st),ve+=2,De=Math.min(Oe,st)}if(!Ge)return;if(de.opaque)m.splice(qe,ve-qe,Oe,"overlay "+Ge),ve=qe+2;else for(;qee.options.maxHighlightLength&&vt(e.doc.mode,r.state),M=vn(e,t,r);m&&(r.state=m),t.stateAfter=r.save(!m),t.styles=M.styles,M.classes?t.styleClasses=M.classes:t.styleClasses&&(t.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function nn(e,t,a){var r=e.doc,m=e.display;if(!r.mode.startState)return new Ht(r,!0,t);var M=un(e,t,a),G=M>r.first&&bt(r,M-1).stateAfter,X=G?Ht.fromSaved(r,G,M):new Ht(r,yn(r.mode),M);return r.iter(M,t,function($){Kt(e,$.text,X);var Z=X.line;$.stateAfter=Z==t-1||Z%5==0||Z>=m.viewFrom&&Zt.start)return M}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ft=function(e,t,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=a};function Mt(e,t,a,r){var m=e.doc,M=m.mode,G;t=Lt(m,t);var X=bt(m,t.line),$=nn(e,t.line,a),Z=new ln(X.text,e.options.tabSize,$),de;for(r&&(de=[]);(r||Z.pose.options.maxHighlightLength?(X=!1,G&&Kt(e,t,r,de.pos),de.pos=t.length,ve=null):ve=Zt(Pt(a,de,r.state,De),M),De){var Oe=De[0].name;Oe&&(ve="m-"+(ve?Oe+" "+ve:Oe))}if(!X||Z!=ve){for(;$G;--X){if(X<=M.first)return M.first;var $=bt(M,X-1),Z=$.stateAfter;if(Z&&(!a||X+(Z instanceof It?Z.lookAhead:0)<=M.modeFrontier))return X;var de=W($.text,null,e.options.tabSize);(m==null||r>de)&&(m=X-1,r=de)}return m}function Jt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiera;r--){var m=bt(e,r).stateAfter;if(m&&(!(m instanceof It)||r+m.lookAhead=t:M.to>t);(r||(r=[])).push(new wn(G,M.from,$?null:M.to))}}return r}function Xn(e,t,a){var r;if(e)for(var m=0;m=t:M.to>t);if(X||M.from==t&&G.type=="bookmark"&&(!a||M.marker.insertLeft)){var $=M.from==null||(G.inclusiveLeft?M.from<=t:M.from0&&X)for(var Ot=0;Ot0)continue;var de=[$,1],ve=ct(Z.from,X.from),De=ct(Z.to,X.to);(ve<0||!G.inclusiveLeft&&!ve)&&de.push({from:Z.from,to:X.from}),(De>0||!G.inclusiveRight&&!De)&&de.push({from:X.to,to:Z.to}),m.splice.apply(m,de),$+=de.length-3}return m}function hn(e){var t=e.markedSpans;if(!t)return;for(var a=0;at)&&(!r||jt(r,M.marker)<0)&&(r=M.marker)}return r}function Pn(e,t,a,r,m){var M=bt(e,t),G=kt&&M.markedSpans;if(G)for(var X=0;X=0&&ve<=0||de<=0&&ve>=0)continue;if(de<=0&&($.marker.inclusiveRight&&m.inclusiveLeft?ct(Z.to,a)>=0:ct(Z.to,a)>0)||de>=0&&($.marker.inclusiveRight&&m.inclusiveLeft?ct(Z.from,r)<=0:ct(Z.from,r)<0))return!0}}function cr(e){for(var t;t=qt(e);)e=t.find(-1,!0).line;return e}function Qr(e){for(var t;t=Ut(e);)e=t.find(1,!0).line;return e}function Pr(e){for(var t,a;t=Ut(e);)e=t.find(1,!0).line,(a||(a=[])).push(e);return a}function zr(e,t){var a=bt(e,t),r=cr(a);return a==r?t:Gt(r)}function Nr(e,t){if(t>e.lastLine())return t;var a=bt(e,t),r;if(!Rr(e,a))return t;for(;r=Ut(a);)a=r.find(1,!0).line;return Gt(a)+1}function Rr(e,t){var a=kt&&t.markedSpans;if(a)for(var r=void 0,m=0;mt.maxLineLength&&(t.maxLineLength=m,t.maxLine=r)})}var _r=function(e,t,a){this.text=e,pn(this,t),this.height=a?a(this):1};_r.prototype.lineNo=function(){return Gt(this)},ie(_r);function ni(e,t,a,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),hn(e),pn(e,a);var m=r?r(e):1;m!=e.height&&Tn(e,m)}function wt(e){e.parent=null,hn(e)}var Bt={},At={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var a=t.addModeClass?At:Bt;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var a=E("span",null,null,A?"padding-right: .1px":null),r={pre:E("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var m=0;m<=(t.rest?t.rest.length:0);m++){var M=m?t.rest[m-1]:t.line,G=void 0;r.pos=0,r.addToken=en,rt(e.display.measure)&&(G=pt(M,e.doc.direction))&&(r.addToken=er(r.addToken,G)),r.map=[];var X=t!=e.display.externalMeasured&&Gt(M);yr(M,r,fn(e,M,X)),M.styleClasses&&(M.styleClasses.bgClass&&(r.bgClass=B(M.styleClasses.bgClass,r.bgClass||"")),M.styleClasses.textClass&&(r.textClass=B(M.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ut(e.display.measure))),m==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(A){var $=r.content.lastChild;(/\bcm-tab\b/.test($.className)||$.querySelector&&$.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ee(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=B(r.pre.className,r.textClass||"")),r}function _n(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function en(e,t,a,r,m,M,G){if(!t)return;var X=e.splitSpaces?Nn(t,e.trailingSpace):t,$=e.cm.state.specialChars,Z=!1,de;if(!$.test(t))e.col+=t.length,de=document.createTextNode(X),e.map.push(e.pos,e.pos+t.length,de),j&&k<9&&(Z=!0),e.pos+=t.length;else{de=document.createDocumentFragment();for(var ve=0;;){$.lastIndex=ve;var De=$.exec(t),Oe=De?De.index-ve:t.length-ve;if(Oe){var Ge=document.createTextNode(X.slice(ve,ve+Oe));j&&k<9?de.appendChild(c("span",[Ge])):de.appendChild(Ge),e.map.push(e.pos,e.pos+Oe,Ge),e.col+=Oe,e.pos+=Oe}if(!De)break;ve+=Oe+1;var qe=void 0;if(De[0]==" "){var st=e.cm.options.tabSize,mt=st-e.col%st;qe=de.appendChild(c("span",oe(mt),"cm-tab")),qe.setAttribute("role","presentation"),qe.setAttribute("cm-text"," "),e.col+=mt}else De[0]=="\r"||De[0]==` +`?(qe=de.appendChild(c("span",De[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),qe.setAttribute("cm-text",De[0]),e.col+=1):(qe=e.cm.options.specialCharPlaceholder(De[0]),qe.setAttribute("cm-text",De[0]),j&&k<9?de.appendChild(c("span",[qe])):de.appendChild(qe),e.col+=1);e.map.push(e.pos,e.pos+1,qe),e.pos++}}if(e.trailingSpace=X.charCodeAt(t.length-1)==32,a||r||m||Z||M||G){var Tt=a||"";r&&(Tt+=r),m&&(Tt+=m);var gt=c("span",[de],Tt,M);if(G)for(var Ot in G)G.hasOwnProperty(Ot)&&Ot!="style"&&Ot!="class"&>.setAttribute(Ot,G[Ot]);return e.content.appendChild(gt)}e.content.appendChild(de)}function Nn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var a=t,r="",m=0;mZ&&ve.from<=Z);De++);if(ve.to>=de)return e(a,r,m,M,G,X,$);e(a,r.slice(0,ve.to-Z),m,M,null,X,$),M=null,r=r.slice(ve.to-Z),Z=ve.to}}}function Vt(e,t,a,r){var m=!r&&a.widgetNode;m&&e.map.push(e.pos,e.pos+t,m),!r&&e.cm.display.input.needsContentAttribute&&(m||(m=e.content.appendChild(document.createElement("span"))),m.setAttribute("cm-marker",a.id)),m&&(e.cm.display.input.setUneditable(m),e.content.appendChild(m)),e.pos+=t,e.trailingSpace=!1}function yr(e,t,a){var r=e.markedSpans,m=e.text,M=0;if(!r){for(var G=1;G$||tn.collapsed&&Nt.to==$&&Nt.from==$)){if(Nt.to!=null&&Nt.to!=$&&Oe>Nt.to&&(Oe=Nt.to,qe=""),tn.className&&(Ge+=" "+tn.className),tn.css&&(De=(De?De+";":"")+tn.css),tn.startStyle&&Nt.from==$&&(st+=" "+tn.startStyle),tn.endStyle&&Nt.to==Oe&&(Ot||(Ot=[])).push(tn.endStyle,Nt.to),tn.title&&((Tt||(Tt={})).title=tn.title),tn.attributes)for(var Ln in tn.attributes)(Tt||(Tt={}))[Ln]=tn.attributes[Ln];tn.collapsed&&(!mt||jt(mt.marker,tn)<0)&&(mt=Nt)}else Nt.from>$&&Oe>Nt.from&&(Oe=Nt.from)}if(Ot)for(var sr=0;sr=X)break;for(var Ur=Math.min(X,Oe);;){if(de){var Lr=$+de.length;if(!mt){var Qn=Lr>Ur?de.slice(0,Ur-$):de;t.addToken(t,Qn,ve?ve+Ge:Ge,st,$+Qn.length==Oe?qe:"",De,Tt)}if(Lr>=Ur){de=de.slice(Ur-$),$=Ur;break}$=Lr,st=""}de=m.slice(M,M=a[Z++]),ve=Xt(a[Z++],t.cm.options)}}}function mn(e,t,a){this.line=t,this.rest=Pr(t),this.size=this.rest?Gt(xe(this.rest))-a+1:1,this.node=this.text=null,this.hidden=Rr(e,t)}function Vn(e,t,a){for(var r=[],m,M=t;M2&&M.push(($.bottom+Z.top)/2-a.top)}}M.push(a.bottom-a.top)}}function Gr(e,t,a){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;ra)return{map:e.measure.maps[m],cache:e.measure.caches[m],before:!0}}function Si(e,t){t=cr(t);var a=Gt(t),r=e.display.externalMeasured=new mn(e.doc,t,a);r.lineN=a;var m=r.built=Yt(e,r);return r.text=m.pre,p(e.display.lineMeasure,m.pre),r}function Br(e,t,a,r){return ei(e,br(e,t),a,r)}function da(e,t){if(t>=e.display.viewFrom&&t=a.lineN&&tt)&&(M=$-X,m=M-1,t>=$&&(G="right")),m!=null){if(r=e[Z+2],X==$&&a==(r.insertLeft?"left":"right")&&(G=a),a=="left"&&m==0)for(;Z&&e[Z-2]==e[Z-3]&&e[Z-1].insertLeft;)r=e[(Z-=3)+2],G="left";if(a=="right"&&m==$-X)for(;Z=0&&!((a=e[m]).left!=a.right);m--);return a}function Ws(e,t,a,r){var m=po(t.map,a,r),M=m.node,G=m.start,X=m.end,$=m.collapse,Z;if(M.nodeType==3){for(var de=0;de<4;de++){for(;G&&Xe(t.line.text.charAt(m.coverStart+G));)--G;for(;m.coverStart+X0&&($=r="right");var ve;e.options.lineWrapping&&(ve=M.getClientRects()).length>1?Z=ve[r=="right"?ve.length-1:0]:Z=M.getBoundingClientRect()}if(j&&k<9&&!G&&(!Z||!Z.left&&!Z.right)){var De=M.parentNode.getClientRects()[0];De?Z={left:De.left,right:De.left+wi(e.display),top:De.top,bottom:De.bottom}:Z=ho}for(var Oe=Z.top-t.rect.top,Ge=Z.bottom-t.rect.top,qe=(Oe+Ge)/2,st=t.view.measure.heights,mt=0;mt=r.text.length?($=r.text.length,Z="before"):$<=0&&($=0,Z="after"),!X)return G(Z=="before"?$-1:$,Z=="before");function de(Ge,qe,st){var mt=X[qe],Tt=mt.level==1;return G(st?Ge-1:Ge,Tt!=st)}var ve=lt(X,$,Z),De=dt,Oe=de($,ve,Z=="before");return De!=null&&(Oe.other=de($,De,Z!="before")),Oe}function bo(e,t){var a=0;t=Lt(e.doc,t),e.options.lineWrapping||(a=wi(e.display)*t.ch);var r=bt(e.doc,t.line),m=jn(r)+Rn(e.display);return{left:a,right:a,top:m,bottom:m+r.height}}function Pa(e,t,a,r,m){var M=nt(e,t,a);return M.xRel=m,r&&(M.outside=r),M}function Na(e,t,a){var r=e.doc;if(a+=e.display.viewOffset,a<0)return Pa(r.first,0,null,-1,-1);var m=Sn(r,a),M=r.first+r.size-1;if(m>M)return Pa(r.first+r.size-1,bt(r,M).text.length,null,1,1);t<0&&(t=0);for(var G=bt(r,m);;){var X=Ks(e,G,m,t,a),$=ir(G,X.ch+(X.xRel>0||X.outside>0?1:0));if(!$)return X;var Z=$.find(1);if(Z.line==m)return Z;G=bt(r,m=Z.line)}}function Eo(e,t,a,r){r-=Ia(t);var m=t.text.length,M=ot(function(G){return ei(e,a,G-1).bottom<=r},m,0);return m=ot(function(G){return ei(e,a,G).top>r},M,m),{begin:M,end:m}}function xo(e,t,a,r){a||(a=br(e,t));var m=ca(e,t,ei(e,a,r),"line").top;return Eo(e,t,a,m)}function ka(e,t,a,r){return e.bottom<=a?!1:e.top>a?!0:(r?e.left:e.right)>t}function Ks(e,t,a,r,m){m-=jn(t);var M=br(e,t),G=Ia(t),X=0,$=t.text.length,Z=!0,de=pt(t,e.doc.direction);if(de){var ve=(e.options.lineWrapping?zs:Gs)(e,t,a,M,de,r,m);Z=ve.level!=1,X=Z?ve.from:ve.to-1,$=Z?ve.to:ve.from-1}var De=null,Oe=null,Ge=ot(function(Wt){var Nt=ei(e,M,Wt);return Nt.top+=G,Nt.bottom+=G,ka(Nt,r,m,!1)?(Nt.top<=m&&Nt.left<=r&&(De=Wt,Oe=Nt),!0):!1},X,$),qe,st,mt=!1;if(Oe){var Tt=r-Oe.left=Ot.bottom?1:0}return Ge=He(t.text,Ge,1),Pa(a,Ge,st,mt,r-qe)}function Gs(e,t,a,r,m,M,G){var X=ot(function(ve){var De=m[ve],Oe=De.level!=1;return ka(Yr(e,nt(a,Oe?De.to:De.from,Oe?"before":"after"),"line",t,r),M,G,!0)},0,m.length-1),$=m[X];if(X>0){var Z=$.level!=1,de=Yr(e,nt(a,Z?$.from:$.to,Z?"after":"before"),"line",t,r);ka(de,M,G,!0)&&de.top>G&&($=m[X-1])}return $}function zs(e,t,a,r,m,M,G){var X=Eo(e,t,r,G),$=X.begin,Z=X.end;/\s/.test(t.text.charAt(Z-1))&&Z--;for(var de=null,ve=null,De=0;De=Z||Oe.to<=$)continue;var Ge=Oe.level!=1,qe=ei(e,r,Ge?Math.min(Z,Oe.to)-1:Math.max($,Oe.from)).right,st=qest)&&(de=Oe,ve=st)}return de||(de=m[m.length-1]),de.from<$&&(de={from:$,to:de.to,level:de.level}),de.to>Z&&(de={from:de.from,to:Z,level:de.level}),de}var pi;function Oi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pi==null){pi=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pi.appendChild(document.createTextNode("x")),pi.appendChild(c("br"));pi.appendChild(document.createTextNode("x"))}p(e.measure,pi);var a=pi.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),v(e.measure),a||1}function wi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),a=c("pre",[t],"CodeMirror-line-like");p(e.measure,a);var r=t.getBoundingClientRect(),m=(r.right-r.left)/10;return m>2&&(e.cachedCharWidth=m),m||10}function Ua(e){for(var t=e.display,a={},r={},m=t.gutters.clientLeft,M=t.gutters.firstChild,G=0;M;M=M.nextSibling,++G){var X=e.display.gutterSpecs[G].className;a[X]=M.offsetLeft+M.clientLeft+m,r[X]=M.clientWidth}return{fixedPos:Fa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:a,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Fa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function To(e){var t=Oi(e.display),a=e.options.lineWrapping,r=a&&Math.max(5,e.display.scroller.clientWidth/wi(e.display)-3);return function(m){if(Rr(e.doc,m))return 0;var M=0;if(m.widgets)for(var G=0;G0&&(Z=bt(e.doc,$.line).text).length==$.ch){var de=W(Z,Z.length,e.options.tabSize)-Z.length;$=nt($.line,Math.max(0,Math.round((M-jr(e.display).left)/wi(e.display))-de))}return $}function gi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var a=e.display.view,r=0;rt)&&(m.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=m.viewTo)kt&&zr(e.doc,t)m.viewFrom?si(e):(m.viewFrom+=r,m.viewTo+=r);else if(t<=m.viewFrom&&a>=m.viewTo)si(e);else if(t<=m.viewFrom){var M=fa(e,a,a+r,1);M?(m.view=m.view.slice(M.index),m.viewFrom=M.lineN,m.viewTo+=r):si(e)}else if(a>=m.viewTo){var G=fa(e,t,t,-1);G?(m.view=m.view.slice(0,G.index),m.viewTo=G.lineN):si(e)}else{var X=fa(e,t,t,-1),$=fa(e,a,a+r,1);X&&$?(m.view=m.view.slice(0,X.index).concat(Vn(e,X.lineN,$.lineN)).concat(m.view.slice($.index)),m.viewTo+=r):si(e)}var Z=m.externalMeasured;Z&&(a=m.lineN&&t=r.viewTo)return;var M=r.view[gi(e,t)];if(M.node==null)return;var G=M.changes||(M.changes=[]);J(G,a)==-1&&G.push(a)}function si(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fa(e,t,a,r){var m=gi(e,t),M,G=e.display.view;if(!kt||a==e.doc.first+e.doc.size)return{index:m,lineN:a};for(var X=e.display.viewFrom,$=0;$0){if(m==G.length-1)return null;M=X+G[m].size-t,m++}else M=X-t;t+=M,a+=M}for(;zr(e.doc,a)!=a;){if(m==(r<0?0:G.length-1))return null;a+=r*G[m-(r<0?1:0)].size,m+=r}return{index:m,lineN:a}}function Xs(e,t,a){var r=e.display,m=r.view;m.length==0||t>=r.viewTo||a<=r.viewFrom?(r.view=Vn(e,t,a),r.viewFrom=t):(r.viewFrom>t?r.view=Vn(e,t,r.viewFrom).concat(r.view):r.viewFroma&&(r.view=r.view.slice(0,gi(e,a)))),r.viewTo=a}function So(e){for(var t=e.display.view,a=0,r=0;r=e.display.viewTo||X.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Ci(e),t.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),Wa(e))}function Ro(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ci(e))},100)}function Wa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ee(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),A&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ba(e)}function Ci(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ee(e,"blur",e,t),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function pa(e){for(var t=e.display,a=t.lineDiv.offsetTop,r=0;r.005||de<-.005)&&(Tn(m.line,G),Ao(m.line),m.rest))for(var ve=0;vee.display.sizerWidth){var De=Math.ceil(X/wi(e.display));De>e.display.maxLineLength&&(e.display.maxLineLength=De,e.display.maxLine=m.line,e.display.maxLineChanged=!0)}}}function Ao(e){if(e.widgets)for(var t=0;t=G&&(M=Sn(t,jn(bt(t,$))-e.wrapper.clientHeight),G=$)}return{from:M,to:Math.max(G,M+1)}}function Ys(e,t){if(Ie(e,"scrollCursorIntoView"))return;var a=e.display,r=a.sizer.getBoundingClientRect(),m=null;if(t.top+r.top<0?m=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(m=!1),m!=null&&!s){var M=c("div","\u200B",null,`position: absolute; + top: `+(t.top-a.viewOffset-Rn(e.display))+`px; height: `+(t.bottom-t.top+Kn(e)+a.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(M),M.scrollIntoView(m),e.display.lineSpace.removeChild(M)}}function $s(e,t,a,r){r==null&&(r=0);var m;!e.options.lineWrapping&&t==a&&(t=t.ch?nt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,a=t.sticky=="before"?nt(t.line,t.ch+1,"before"):t);for(var M=0;M<5;M++){var G=!1,X=Yr(e,t),$=!a||a==t?X:Yr(e,a);m={left:Math.min(X.left,$.left),top:Math.min(X.top,$.top)-r,right:Math.max(X.left,$.left),bottom:Math.max(X.bottom,$.bottom)+r};var Z=Ha(e,m),de=e.doc.scrollTop,ve=e.doc.scrollLeft;if(Z.scrollTop!=null&&(Xi(e,Z.scrollTop),Math.abs(e.doc.scrollTop-de)>1&&(G=!0)),Z.scrollLeft!=null&&(vi(e,Z.scrollLeft),Math.abs(e.doc.scrollLeft-ve)>1&&(G=!0)),!G)break}return m}function Js(e,t){var a=Ha(e,t);a.scrollTop!=null&&Xi(e,a.scrollTop),a.scrollLeft!=null&&vi(e,a.scrollLeft)}function Ha(e,t){var a=e.display,r=Oi(e.display);t.top<0&&(t.top=0);var m=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,M=Hr(e),G={};t.bottom-t.top>M&&(t.bottom=t.top+M);var X=e.doc.height+Xr(a),$=t.topX-r;if(t.topm+M){var de=Math.min(t.top,(Z?X:t.bottom)-M);de!=m&&(G.scrollTop=de)}var ve=e.options.fixedGutter?0:a.gutters.offsetWidth,De=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft-ve,Oe=$n(e)-a.gutters.offsetWidth,Ge=t.right-t.left>Oe;return Ge&&(t.right=t.left+Oe),t.left<10?G.scrollLeft=0:t.leftOe+De-3&&(G.scrollLeft=t.right+(Ge?0:10)-Oe),G}function Ka(e,t){if(t==null)return;ga(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ri(e){ga(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function zi(e,t,a){(t!=null||a!=null)&&ga(e),t!=null&&(e.curOp.scrollLeft=t),a!=null&&(e.curOp.scrollTop=a)}function Qs(e,t){ga(e),e.curOp.scrollToPos=t}function ga(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var a=bo(e,t.from),r=bo(e,t.to);Do(e,a,r,t.margin)}}function Do(e,t,a,r){var m=Ha(e,{left:Math.min(t.left,a.left),top:Math.min(t.top,a.top)-r,right:Math.max(t.right,a.right),bottom:Math.max(t.bottom,a.bottom)+r});zi(e,m.scrollLeft,m.scrollTop)}function Xi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;L||za(e,{top:t}),Lo(e,t,!0),L&&za(e),$i(e,100)}function Lo(e,t,a){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!a)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function vi(e,t,a,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,ko(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Vi(e){var t=e.display,a=t.gutters.offsetWidth,r=Math.round(e.doc.height+Xr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:r,scrollHeight:r+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:a}}var _i=function(e,t,a){this.cm=a;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),m=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=m.tabIndex=-1,e(r),e(m),_e(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_e(m,"scroll",function(){m.clientWidth&&t(m.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,j&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_i.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var m=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+m)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=a?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var M=e.viewWidth-e.barLeft-(a?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+M)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?r:0,bottom:t?r:0}},_i.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_i.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_i.prototype.zeroWidthHack=function(){var e=n&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},_i.prototype.enableZeroWidthBar=function(e,t,a){e.style.pointerEvents="auto";function r(){var m=e.getBoundingClientRect(),M=a=="vert"?document.elementFromPoint(m.right-1,(m.top+m.bottom)/2):document.elementFromPoint((m.right+m.left)/2,m.bottom-1);M!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},_i.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Yi=function(){};Yi.prototype.update=function(){return{bottom:0,right:0}},Yi.prototype.setScrollLeft=function(){},Yi.prototype.setScrollTop=function(){},Yi.prototype.clear=function(){};function Ai(e,t){t||(t=Vi(e));var a=e.display.barWidth,r=e.display.barHeight;Io(e,t);for(var m=0;m<4&&a!=e.display.barWidth||r!=e.display.barHeight;m++)a!=e.display.barWidth&&e.options.lineWrapping&&pa(e),Io(e,Vi(e)),a=e.display.barWidth,r=e.display.barHeight}function Io(e,t){var a=e.display,r=a.scrollbars.update(t);a.sizer.style.paddingRight=(a.barWidth=r.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=r.bottom)+"px",a.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=r.bottom+"px",a.scrollbarFiller.style.width=r.right+"px"):a.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=r.bottom+"px",a.gutterFiller.style.width=t.gutterWidth+"px"):a.gutterFiller.style.display=""}var Mo={native:_i,null:Yi};function Po(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Mo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),_e(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,a){a=="horizontal"?vi(e,t):Xi(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function yi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Zs},cr(e.curOp)}function bi(e){var t=e.curOp;t&&gn(t,function(a){for(var r=0;r=a.viewTo)||a.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new va(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ga(e.cm,e.update)}function nl(e){var t=e.cm,a=t.display;e.updatedDisplay&&pa(t),e.barMeasure=Vi(t),a.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Vr(t,a.maxLine,a.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-$n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date+e.options.workTime,r=rn(e,t.highlightFrontier),m=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(M){if(r.line>=e.display.viewFrom){var G=M.styles,X=M.text.length>e.options.maxHighlightLength?vt(t.mode,r.state):null,$=vn(e,M,r,!0);X&&(r.state=X),M.styles=$.styles;var Z=M.styleClasses,de=$.classes;de?M.styleClasses=de:Z&&(M.styleClasses=null);for(var ve=!G||G.length!=M.styles.length||Z!=de&&(!Z||!de||Z.bgClass!=de.bgClass||Z.textClass!=de.textClass),De=0;!ve&&Dea)return $i(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),m.length&&Nr(e,function(){for(var M=0;M=a.viewFrom&&t.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&So(e)==0)return!1;Uo(e)&&(si(e),t.dims=Ua(e));var m=r.first+r.size,M=Math.max(t.visible.from-e.options.viewportMargin,r.first),G=Math.min(m,t.visible.to+e.options.viewportMargin);a.viewFromG&&a.viewTo-G<20&&(G=Math.min(m,a.viewTo)),kt&&(M=Gr(e.doc,M),G=Mr(e.doc,G));var X=M!=a.viewFrom||G!=a.viewTo||a.lastWrapHeight!=t.wrapperHeight||a.lastWrapWidth!=t.wrapperWidth;Xs(e,M,G),a.viewOffset=Fn(bt(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var $=So(e);if(!X&&$==0&&!t.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var Z=sl(e);return $>4&&(a.lineDiv.style.display="none"),ul(e,a.updateLineNumbers,t.dims),$>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,ll(Z),v(a.cursorDiv),v(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,X&&(a.lastWrapHeight=t.wrapperHeight,a.lastWrapWidth=t.wrapperWidth,$i(e,400)),a.updateLineNumbers=null,!0}function No(e,t){for(var a=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==$n(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+Xr(e.display)-Hr(e),a.top)}),t.visible=ma(e.display,e.doc,a),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ma(e.display,e.doc,a));if(!Ga(e,t))break;pa(e);var m=Vi(e);Gi(e),Ai(e,m),Va(e,m),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,t){var a=new va(e,t);if(Ga(e,a)){pa(e),No(e,a);var r=Vi(e);Gi(e),Ai(e,r),Va(e,r),a.finish()}}function ul(e,t,a){var r=e.display,m=e.options.lineNumbers,M=r.lineDiv,G=M.firstChild;function X(Ge){var qe=Ge.nextSibling;return A&&n&&e.display.currentWheelTarget==Ge?Ge.style.display="none":Ge.parentNode.removeChild(Ge),qe}for(var $=r.view,Z=r.viewFrom,de=0;de<$.length;de++){var ve=$[de];if(!ve.hidden)if(!ve.node||ve.node.parentNode!=M){var De=on(e,ve,Z,a);M.insertBefore(De,G)}else{for(;G!=ve.node;)G=X(G);var Oe=m&&t!=null&&t<=Z&&ve.lineNumber;ve.changes&&(J(ve.changes,"gutter")>-1&&(Oe=!1),Zr(e,ve,Z,a)),Oe&&(v(ve.lineNumber),ve.lineNumber.appendChild(document.createTextNode(pr(e.options,Z)))),G=ve.node.nextSibling}Z+=ve.size}for(;G;)G=X(G)}function Xa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Va(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kn(e)+"px"}function ko(e){var t=e.display,a=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Fa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,m=t.gutters.offsetWidth,M=r+"px",G=0;GG.clientWidth,$=G.scrollHeight>G.clientHeight;if(!(r&&X||m&&$))return;if(m&&n&&A){e:for(var Z=t.target,de=M.view;Z!=G;Z=Z.parentNode)for(var ve=0;ve=0&&ct(e,r.to())<=0)return a}return-1};var En=function(e,t){this.anchor=e,this.head=t};En.prototype.from=function(){return Ur(this.anchor,this.head)},En.prototype.to=function(){return mr(this.anchor,this.head)},En.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $r(e,t,a){var r=e&&e.options.selectionsMayTouch,m=t[a];t.sort(function(De,Oe){return ct(De.from(),Oe.from())}),a=J(t,m);for(var M=1;M0:$>=0){var Z=Ur(X.from(),G.from()),de=mr(X.to(),G.to()),ve=X.empty()?G.from()==G.head:X.from()==X.head;M<=a&&--a,t.splice(--M,2,new En(ve?de:Z,ve?Z:de))}}return new jr(t,a)}function li(e,t){return new jr([new En(e,t||e)],0)}function ui(e){return e.text?nt(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Wo(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return ui(t);var a=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ui(t).ch-t.to.ch),nt(a,r)}function $a(e,t){for(var a=[],r=0;r1&&e.remove(X.line+1,Ge-1),e.insert(X.line+1,pt)}sn(e,"change",e,t)}function di(e,t,a){function r(m,M,G){if(m.linked)for(var X=0;X1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function Vo(e,t,a,r){var m=e.history;m.undone.length=0;var M=+new Date,G,X;if((m.lastOp==r||m.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&m.lastModTime>M-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(G=pl(m,m.lastOp==r)))X=xe(G.changes),ct(t.from,t.to)==0&&ct(t.from,X.to)==0?X.to=ui(t):G.changes.push(Za(e,t));else{var $=xe(m.done);for((!$||!$.ranges)&&ba(e.sel,m.done),G={changes:[Za(e,t)],generation:m.generation},m.done.push(G);m.done.length>m.undoDepth;)m.done.shift(),m.done[0].ranges||m.done.shift()}m.done.push(a),m.generation=++m.maxGeneration,m.lastModTime=m.lastSelTime=M,m.lastOp=m.lastSelOp=r,m.lastOrigin=m.lastSelOrigin=t.origin,X||Ee(e,"historyAdded")}function ml(e,t,a,r){var m=t.charAt(0);return m=="*"||m=="+"&&a.ranges.length==r.ranges.length&&a.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,a,r){var m=e.history,M=r&&r.origin;a==m.lastSelOp||M&&m.lastSelOrigin==M&&(m.lastModTime==m.lastSelTime&&m.lastOrigin==M||ml(e,M,xe(m.done),t))?m.done[m.done.length-1]=t:ba(t,m.done),m.lastSelTime=+new Date,m.lastSelOrigin=M,m.lastSelOp=a,r&&r.clearRedo!==!1&&Xo(m.undone)}function ba(e,t){var a=xe(t);a&&a.ranges&&a.equals(e)||t.push(e)}function Yo(e,t,a,r){var m=t["spans_"+e.id],M=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,r),function(G){G.markedSpans&&((m||(m=t["spans_"+e.id]={}))[M]=G.markedSpans),++M})}function vl(e){if(!e)return null;for(var t,a=0;a-1&&(xe(X)[ve]=Z[ve],delete Z[ve]))}}return r}function qa(e,t,a,r){if(r){var m=e.anchor;if(a){var M=ct(t,m)<0;M!=ct(a,m)<0?(m=t,t=a):M!=ct(t,a)<0&&(t=a)}return new En(m,t)}else return new En(a||t,t)}function Ea(e,t,a,r,m){m==null&&(m=e.cm&&(e.cm.display.shift||e.extend)),br(e,new jr([qa(e.sel.primary(),t,a,m)],0),r)}function Jo(e,t,a){for(var r=[],m=e.cm&&(e.cm.display.shift||e.extend),M=0;M=t.ch:X.to>t.ch))){if(m&&(Ee($,"beforeCursorEnter"),$.explicitlyCleared))if(M.markedSpans){--G;continue}else break;if(!$.atomic)continue;if(a){var ve=$.find(r<0?1:-1),De=void 0;if((r<0?de:Z)&&(ve=ns(e,ve,-r,ve&&ve.line==t.line?M:null)),ve&&ve.line==t.line&&(De=ct(ve,a))&&(r<0?De<0:De>0))return Li(e,ve,t,r,m)}var Oe=$.find(r<0?-1:1);return(r<0?Z:de)&&(Oe=ns(e,Oe,r,Oe.line==t.line?M:null)),Oe?Li(e,Oe,t,r,m):null}}return t}function Ta(e,t,a,r,m){var M=r||1,G=Li(e,t,a,M,m)||!m&&Li(e,t,a,M,!0)||Li(e,t,a,-M,m)||!m&&Li(e,t,a,-M,!0);return G||(e.cantEdit=!0,nt(e.first,0))}function ns(e,t,a,r){return a<0&&t.ch==0?t.line>e.first?Lt(e,nt(t.line-1)):null:a>0&&t.ch==(r||bt(e,t.line)).text.length?t.line=0;--m)as(e,{from:r[m].from,to:r[m].to,text:m?[""]:t.text,origin:t.origin});else as(e,t)}function as(e,t){if(t.text.length==1&&t.text[0]==""&&ct(t.from,t.to)==0)return;var a=$a(e,t);Vo(e,t,a,e.cm?e.cm.curOp.id:NaN),Zi(e,t,a,xn(e,t));var r=[];di(e,function(m,M){!M&&J(r,m.history)==-1&&(us(m.history,t),r.push(m.history)),Zi(m,t,null,xn(m,t))})}function Sa(e,t,a){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!a)return;for(var m=e.history,M,G=e.sel,X=t=="undo"?m.done:m.undone,$=t=="undo"?m.undone:m.done,Z=0;Z=0;--Oe){var Ge=De(Oe);if(Ge)return Ge.v}}function os(e,t){if(t==0)return;if(e.first+=t,e.sel=new jr(Be(e.sel.ranges,function(m){return new En(nt(m.anchor.line+t,m.anchor.ch),nt(m.head.line+t,m.head.ch))}),e.sel.primIndex),e.cm){Cr(e.cm,e.first,e.first-t,t);for(var a=e.cm.display,r=a.viewFrom;re.lastLine())return;if(t.from.lineM&&(t={from:t.from,to:nt(M,bt(e,M).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Rn(e,t.from,t.to),a||(a=$a(e,t)),e.cm?bl(e.cm,t,r):Qa(e,t,r),xa(e,a,ue),e.cantEdit&&Ta(e,nt(e.firstLine(),0))&&(e.cantEdit=!1)}function bl(e,t,a){var r=e.doc,m=e.display,M=t.from,G=t.to,X=!1,$=M.line;e.options.lineWrapping||($=zt(dr(bt(r,M.line))),r.iter($,G.line+1,function(Oe){if(Oe==m.maxLine)return X=!0,!0})),r.sel.contains(t.from,t.to)>-1&&pe(e),Qa(r,t,a,To(e)),e.options.lineWrapping||(r.iter($,M.line+t.text.length,function(Oe){var Ge=Rt(Oe);Ge>m.maxLineLength&&(m.maxLine=Oe,m.maxLineLength=Ge,m.maxLineChanged=!0,X=!1)}),X&&(e.curOp.updateMaxLine=!0)),Qt(r,M.line),$i(e,400);var Z=t.text.length-(G.line-M.line)-1;t.full?Cr(e):M.line==G.line&&t.text.length==1&&!Ko(e.doc,t)?oi(e,M.line,"text"):Cr(e,M.line,G.line+1,Z);var de=ae(e,"changes"),ve=ae(e,"change");if(ve||de){var De={from:M,to:G,text:t.text,removed:t.removed,origin:t.origin};ve&&sn(e,"change",e,De),de&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(De)}e.display.selForContextMenu=null}function Mi(e,t,a,r,m){var M;r||(r=a),ct(r,a)<0&&(M=[r,a],a=M[0],r=M[1]),typeof t=="string"&&(t=e.splitLines(t)),Ii(e,{from:a,to:r,text:t,origin:m})}function ss(e,t,a,r){a1||!(this.children[0]instanceof ea))){var X=[];this.collapse(X),this.children=[new ea(X)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var G=m.lines.length%25+25,X=G;X10);e.parent.maybeSpill()},iterN:function(e,t,a){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=Z,e.display.maxLineLength=de,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Cr(e,r,m+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&es(e.doc)),e&&sn(e,"markerCleared",e,this,r,m),t&&bi(e),this.parent&&this.parent.clear()},ci.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var a,r,m=0;m0||G==0&&M.clearWhenEmpty!==!1)return M;if(M.replacedWith&&(M.collapsed=!0,M.widgetNode=E("span",[M.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||M.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(M.widgetNode.insertLeft=!0)),M.collapsed){if(Mn(e,t.line,t,a,M)||t.line!=a.line&&Mn(e,a.line,t,a,M))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}M.addToHistory&&Vo(e,{from:t,to:a,origin:"markText"},e.sel,NaN);var X=t.line,$=e.cm,Z;if(e.iter(X,a.line+1,function(ve){$&&M.collapsed&&!$.options.lineWrapping&&dr(ve)==$.display.maxLine&&(Z=!0),M.collapsed&&X!=t.line&&Tn(ve,0),nr(ve,new wn(M,X==t.line?t.ch:null,X==a.line?a.ch:null)),++X}),M.collapsed&&e.iter(t.line,a.line+1,function(ve){Or(e,ve)&&Tn(ve,0)}),M.clearOnEnter&&_e(M,"beforeCursorEnter",function(){return M.clear()}),M.readOnly&&(In(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),M.collapsed&&(M.id=++cs,M.atomic=!0),$){if(Z&&($.curOp.updateMaxLine=!0),M.collapsed)Cr($,t.line,a.line+1);else if(M.className||M.startStyle||M.endStyle||M.css||M.attributes||M.title)for(var de=t.line;de<=a.line;de++)oi($,de,"text");M.atomic&&es($.doc),sn($,"markerAdded",$,M)}return M}var ra=function(e,t){this.markers=e,this.primary=t;for(var a=0;a=0;$--)Ii(this,r[$]);X?Zo(this,X):this.cm&&Ri(this.cm)}),undo:ar(function(){Sa(this,"undo")}),redo:ar(function(){Sa(this,"redo")}),undoSelection:ar(function(){Sa(this,"undo",!0)}),redoSelection:ar(function(){Sa(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,a=0,r=0;r=e.ch)&&t.push(m.marker.parent||m.marker)}return t},findMarks:function(e,t,a){e=Lt(this,e),t=Lt(this,t);var r=[],m=e.line;return this.iter(e.line,t.line+1,function(M){var G=M.markedSpans;if(G)for(var X=0;X=$.to||$.from==null&&m!=e.line||$.from!=null&&m==t.line&&$.from>=t.ch)&&(!a||a($.marker))&&r.push($.marker.parent||$.marker)}++m}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var a=t.markedSpans;if(a)for(var r=0;re)return t=e,!0;e-=M,++a}),Lt(this,nt(a,t))},indexFromPos:function(e){e=Lt(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var de=e.dataTransfer.getData("Text");if(de){var ve;if(t.state.draggingText&&!t.state.draggingText.copy&&(ve=t.listSelections()),xa(t.doc,li(a,a)),ve)for(var De=0;De=0;X--)Mi(e.doc,"",r[X].from,r[X].to,"+delete");Ri(e)})}function to(e,t,a){var r=He(e.text,t+a,a);return r<0||r>e.text.length?null:r}function no(e,t,a){var r=to(e,t.ch,a);return r==null?null:new nt(t.line,r,a<0?"after":"before")}function ro(e,t,a,r,m){if(e){t.doc.direction=="rtl"&&(m=-m);var M=ht(a,t.doc.direction);if(M){var G=m<0?xe(M):M[0],X=m<0==(G.level==1),$=X?"after":"before",Z;if(G.level>0||t.doc.direction=="rtl"){var de=Si(t,a);Z=m<0?a.text.length-1:0;var ve=ei(t,de,Z).top;Z=ot(function(De){return ei(t,de,De).top==ve},m<0==(G.level==1)?G.from:G.to-1,Z),$=="before"&&(Z=to(a,Z,1))}else Z=m<0?G.to:G.from;return new nt(r,Z,$)}}return new nt(r,m<0?a.text.length:0,m<0?"before":"after")}function Pl(e,t,a,r){var m=ht(t,e.doc.direction);if(!m)return no(t,a,r);a.ch>=t.text.length?(a.ch=t.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var M=lt(m,a.ch,a.sticky),G=m[M];if(e.doc.direction=="ltr"&&G.level%2==0&&(r>0?G.to>a.ch:G.from=G.from&&De>=de.begin)){var Oe=ve?"before":"after";return new nt(a.line,De,Oe)}}var Ge=function(pt,Tt,mt){for(var Ot=function(Dn,or){return or?new nt(a.line,X(Dn,1),"before"):new nt(a.line,Dn,"after")};pt>=0&&pt0==(Ht.level!=1),nn=Nt?mt.begin:X(mt.end,-1);if(Ht.from<=nn&&nn0?de.end:X(de.begin,-1);return st!=null&&!(r>0&&st==t.text.length)&&(qe=Ge(r>0?0:m.length-1,r,Z(st)),qe)?qe:null}var oa={selectAll:rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return ki(e,function(t){if(t.empty()){var a=bt(e.doc,t.head.line).text.length;return t.head.ch==a&&t.head.line0)m=new nt(m.line,m.ch+1),e.replaceRange(M.charAt(m.ch-1)+M.charAt(m.ch-2),nt(m.line,m.ch-2),m,"+transpose");else if(m.line>e.doc.first){var G=bt(e.doc,m.line-1).text;G&&(m=new nt(m.line,1),e.replaceRange(M.charAt(0)+e.doc.lineSeparator()+G.charAt(G.length-1),nt(m.line-1,G.length-1),m,"+transpose"))}}a.push(new En(m,m))}e.setSelections(a)})},newlineAndIndent:function(e){return Nr(e,function(){for(var t=e.listSelections(),a=t.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),t[a].anchor,t[a].head,"+input");t=e.listSelections();for(var r=0;re&&ct(t,this.pos)==0&&a==this.button};var la,ua;function Wl(e,t){var a=+new Date;return ua&&ua.compare(a,e,t)?(la=ua=null,"triple"):la&&la.compare(a,e,t)?(ua=new ao(a,e,t),la=null,"double"):(la=new ao(a,e,t),ua=null,"single")}function Cs(e){var t=this,a=t.display;if(Ie(t,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Bt(a,e)){A||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(oo(t,e))return;var r=mi(t,e),m=Se(e),M=r?Wl(r,m):"single";if(window.focus(),m==1&&t.state.selectingText&&t.state.selectingText(e),r&&Hl(t,m,r,M,e))return;m==1?r?Gl(t,r,M,e):ce(e)==a.scroller&&Q(e):m==2?(r&&Ea(t.doc,r),setTimeout(function(){return a.input.focus()},20)):m==3&&(w?t.display.input.onContextMenu(e):Ro(t))}function Hl(e,t,a,r,m){var M="Click";return r=="double"?M="Double"+M:r=="triple"&&(M="Triple"+M),M=(t==1?"Left":t==2?"Middle":"Right")+M,sa(e,_s(M,m),m,function(G){if(typeof G=="string"&&(G=oa[G]),!G)return!1;var X=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),X=G(e,a)!=fe}finally{e.state.suppressEdits=!1}return X})}function Kl(e,t,a){var r=e.getOption("configureMouse"),m=r?r(e,t,a):{};if(m.unit==null){var M=f?a.shiftKey&&a.metaKey:a.altKey;m.unit=M?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(m.extend==null||e.doc.extend)&&(m.extend=e.doc.extend||a.shiftKey),m.addNew==null&&(m.addNew=n?a.metaKey:a.ctrlKey),m.moveOnDrag==null&&(m.moveOnDrag=!(n?a.altKey:a.ctrlKey)),m}function Gl(e,t,a,r){j?setTimeout(U(Co,e),0):e.curOp.focus=I();var m=Kl(e,a,r),M=e.doc.sel,G;e.options.dragDrop&&je&&!e.isReadOnly()&&a=="single"&&(G=M.contains(t))>-1&&(ct((G=M.ranges[G]).from(),t)<0||t.xRel>0)&&(ct(G.to(),t)>0||t.xRel<0)?zl(e,r,t,m):Xl(e,r,t,m)}function zl(e,t,a,r){var m=e.display,M=!1,G=ir(e,function(Z){A&&(m.scroller.draggable=!1),e.state.draggingText=!1,ke(m.wrapper.ownerDocument,"mouseup",G),ke(m.wrapper.ownerDocument,"mousemove",X),ke(m.scroller,"dragstart",$),ke(m.scroller,"drop",G),M||(Q(Z),r.addNew||Ea(e.doc,a,null,null,r.extend),A&&!u||j&&k==9?setTimeout(function(){m.wrapper.ownerDocument.body.focus({preventScroll:!0}),m.input.focus()},20):m.input.focus())}),X=function(Z){M=M||Math.abs(t.clientX-Z.clientX)+Math.abs(t.clientY-Z.clientY)>=10},$=function(){return M=!0};A&&(m.scroller.draggable=!0),e.state.draggingText=G,G.copy=!r.moveOnDrag,m.scroller.dragDrop&&m.scroller.dragDrop(),_e(m.wrapper.ownerDocument,"mouseup",G),_e(m.wrapper.ownerDocument,"mousemove",X),_e(m.scroller,"dragstart",$),_e(m.scroller,"drop",G),Ro(e),setTimeout(function(){return m.input.focus()},20)}function Rs(e,t,a){if(a=="char")return new En(t,t);if(a=="word")return e.findWordAt(t);if(a=="line")return new En(nt(t.line,0),Lt(e.doc,nt(t.line+1,0)));var r=a(e,t);return new En(r.from,r.to)}function Xl(e,t,a,r){var m=e.display,M=e.doc;Q(t);var G,X,$=M.sel,Z=$.ranges;if(r.addNew&&!r.extend?(X=M.sel.contains(a),X>-1?G=Z[X]:G=new En(a,a)):(G=M.sel.primary(),X=M.sel.primIndex),r.unit=="rectangle")r.addNew||(G=new En(a,a)),a=mi(e,t,!0,!0),X=-1;else{var de=Rs(e,a,r.unit);r.extend?G=qa(G,de.anchor,de.head,r.extend):G=de}r.addNew?X==-1?(X=Z.length,br(M,$r(e,Z.concat([G]),X),{scroll:!1,origin:"*mouse"})):Z.length>1&&Z[X].empty()&&r.unit=="char"&&!r.extend?(br(M,$r(e,Z.slice(0,X).concat(Z.slice(X+1)),0),{scroll:!1,origin:"*mouse"}),$=M.sel):eo(M,X,G,le):(X=0,br(M,new jr([G],0),le),$=M.sel);var ve=a;function De(mt){if(ct(ve,mt)==0)return;if(ve=mt,r.unit=="rectangle"){for(var Ot=[],Ht=e.options.tabSize,Nt=W(bt(M,a.line).text,a.ch,Ht),nn=W(bt(M,mt.line).text,mt.ch,Ht),Dn=Math.min(Nt,nn),or=Math.max(Nt,nn),jn=Math.min(a.line,mt.line),kr=Math.min(e.lastLine(),Math.max(a.line,mt.line));jn<=kr;jn++){var Ar=bt(M,jn).text,Qn=ge(Ar,Dn,Ht);Dn==or?Ot.push(new En(nt(jn,Qn),nt(jn,Qn))):Ar.length>Qn&&Ot.push(new En(nt(jn,Qn),nt(jn,ge(Ar,or,Ht))))}Ot.length||Ot.push(new En(a,a)),br(M,$r(e,$.ranges.slice(0,X).concat(Ot),X),{origin:"*mouse",scroll:!1}),e.scrollIntoView(mt)}else{var Dr=G,hr=Rs(e,mt,r.unit),tr=Dr.anchor,Zn;ct(hr.anchor,tr)>0?(Zn=hr.head,tr=Ur(Dr.from(),hr.anchor)):(Zn=hr.anchor,tr=mr(Dr.to(),hr.head));var Wn=$.ranges.slice(0);Wn[X]=Vl(e,new En(Lt(M,tr),Zn)),br(M,$r(e,Wn,X),le)}}var Oe=m.wrapper.getBoundingClientRect(),Ge=0;function qe(mt){var Ot=++Ge,Ht=mi(e,mt,!0,r.unit=="rectangle");if(!Ht)return;if(ct(Ht,ve)!=0){e.curOp.focus=I(),De(Ht);var Nt=ma(m,M);(Ht.line>=Nt.to||Ht.lineOe.bottom?20:0;nn&&setTimeout(ir(e,function(){if(Ge!=Ot)return;m.scroller.scrollTop+=nn,qe(mt)}),50)}}function st(mt){e.state.selectingText=!1,Ge=Infinity,mt&&(Q(mt),m.input.focus()),ke(m.wrapper.ownerDocument,"mousemove",pt),ke(m.wrapper.ownerDocument,"mouseup",Tt),M.history.lastSelOrigin=null}var pt=ir(e,function(mt){mt.buttons===0||!Se(mt)?st(mt):qe(mt)}),Tt=ir(e,st);e.state.selectingText=Tt,_e(m.wrapper.ownerDocument,"mousemove",pt),_e(m.wrapper.ownerDocument,"mouseup",Tt)}function Vl(e,t){var a=t.anchor,r=t.head,m=bt(e.doc,a.line);if(ct(a,r)==0&&a.sticky==r.sticky)return t;var M=ht(m);if(!M)return t;var G=lt(M,a.ch,a.sticky),X=M[G];if(X.from!=a.ch&&X.to!=a.ch)return t;var $=G+(X.from==a.ch==(X.level!=1)?0:1);if($==0||$==M.length)return t;var Z;if(r.line!=a.line)Z=(r.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var de=lt(M,r.ch,r.sticky),ve=de-G||(r.ch-a.ch)*(X.level==1?-1:1);de==$-1||de==$?Z=ve<0:Z=ve>0}var De=M[$+(Z?-1:0)],Oe=Z==(De.level==1),Ge=Oe?De.from:De.to,qe=Oe?"after":"before";return a.ch==Ge&&a.sticky==qe?t:new En(new nt(a.line,Ge,qe),r)}function As(e,t,a,r){var m,M;if(t.touches)m=t.touches[0].clientX,M=t.touches[0].clientY;else try{m=t.clientX,M=t.clientY}catch(De){return!1}if(m>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Q(t);var G=e.display,X=G.lineDiv.getBoundingClientRect();if(M>X.bottom||!ae(e,a))return te(t);M-=X.top-G.viewOffset;for(var $=0;$=m){var de=Sn(e.doc,M),ve=e.display.gutterSpecs[$];return Ee(e,a,e,de,ve.className,t),te(t)}}}function oo(e,t){return As(e,t,"gutterClick",!0)}function Ds(e,t){if(Bt(e.display,t)||Yl(e,t))return;if(Ie(e,t,"contextmenu"))return;w||e.display.input.onContextMenu(t)}function Yl(e,t){return ae(e,"gutterContextMenu")?As(e,t,"gutterContextMenu",!1):!1}function Ls(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ki(e)}var Ui={toString:function(){return"CodeMirror.Init"}},Is={},Ra={};function $l(e){var t=e.optionHandlers;function a(r,m,M,G){e.defaults[r]=m,M&&(t[r]=G?function(X,$,Z){Z!=Ui&&M(X,$,Z)}:M)}e.defineOption=a,e.Init=Ui,a("value","",function(r,m){return r.setValue(m)},!0),a("mode",null,function(r,m){r.doc.modeOption=m,Ja(r)},!0),a("indentUnit",2,Ja,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(r){Qi(r),Ki(r),Cr(r)},!0),a("lineSeparator",null,function(r,m){if(r.doc.lineSep=m,!m)return;var M=[],G=r.doc.first;r.doc.iter(function($){for(var Z=0;;){var de=$.text.indexOf(m,Z);if(de==-1)break;Z=de+m.length,M.push(nt(G,de))}G++});for(var X=M.length-1;X>=0;X--)Mi(r.doc,m,M[X],nt(M[X].line,M[X].ch+m.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,m,M){r.state.specialChars=new RegExp(m.source+(m.test(" ")?"":"| "),"g"),M!=Ui&&r.refresh()}),a("specialCharPlaceholder",_n,function(r){return r.refresh()},!0),a("electricChars",!0),a("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(r,m){return r.getInputField().spellcheck=m},!0),a("autocorrect",!1,function(r,m){return r.getInputField().autocorrect=m},!0),a("autocapitalize",!1,function(r,m){return r.getInputField().autocapitalize=m},!0),a("rtlMoveVisually",!O),a("wholeLineUpdateBefore",!0),a("theme","default",function(r){Ls(r),Ji(r)},!0),a("keyMap","default",function(r,m,M){var G=wa(m),X=M!=Ui&&wa(M);X&&X.detach&&X.detach(r,G),G.attach&&G.attach(r,X||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Ql,!0),a("gutters",[],function(r,m){r.display.gutterSpecs=Ya(m,r.options.lineNumbers),Ji(r)},!0),a("fixedGutter",!0,function(r,m){r.display.gutters.style.left=m?Fa(r.display)+"px":"0",r.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(r){return Ai(r)},!0),a("scrollbarStyle","native",function(r){Po(r),Ai(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),a("lineNumbers",!1,function(r,m){r.display.gutterSpecs=Ya(r.options.gutters,m),Ji(r)},!0),a("firstLineNumber",1,Ji,!0),a("lineNumberFormatter",function(r){return r},Ji,!0),a("showCursorWhenSelecting",!1,Gi,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(r,m){m=="nocursor"&&(Ci(r),r.display.input.blur()),r.display.input.readOnlyChanged(m)}),a("screenReaderLabel",null,function(r,m){m=m===""?null:m,r.display.input.screenReaderLabelChanged(m)}),a("disableInput",!1,function(r,m){m||r.display.input.reset()},!0),a("dragDrop",!0,Jl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Gi,!0),a("singleCursorHeightPerLine",!0,Gi,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,Qi,!0),a("addModeClass",!1,Qi,!0),a("pollInterval",100),a("undoDepth",200,function(r,m){return r.doc.history.undoDepth=m}),a("historyEventDelay",1250),a("viewportMargin",10,function(r){return r.refresh()},!0),a("maxHighlightLength",1e4,Qi,!0),a("moveInputWithCursor",!0,function(r,m){m||r.display.input.resetPosition()}),a("tabindex",null,function(r,m){return r.display.input.getField().tabIndex=m||""}),a("autofocus",null),a("direction","ltr",function(r,m){return r.doc.setDirection(m)},!0),a("phrases",null)}function Jl(e,t,a){var r=a&&a!=Ui;if(!t!=!r){var m=e.display.dragFunctions,M=t?_e:ke;M(e.display.scroller,"dragstart",m.start),M(e.display.scroller,"dragenter",m.enter),M(e.display.scroller,"dragover",m.over),M(e.display.scroller,"dragleave",m.leave),M(e.display.scroller,"drop",m.drop)}}function Ql(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),zr(e)),ja(e),Cr(e),Ki(e),setTimeout(function(){return Ai(e)},100)}function kn(e,t){var a=this;if(!(this instanceof kn))return new kn(e,t);this.options=t=t?C(t):{},C(Is,t,!1);var r=t.value;typeof r=="string"?r=new Rr(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var m=new kn.inputStyles[t.inputStyle](this),M=this.display=new dl(e,r,m,t);M.wrapper.CodeMirror=this,Ls(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Po(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 V,keySeq:null,specialChars:null},t.autofocus&&!o&&M.input.focus(),j&&k<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Zl(this),Al(),yi(this),this.curOp.forceUpdate=!0,Go(this,r),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&Wa(a)},20):Ci(this);for(var G in Ra)Ra.hasOwnProperty(G)&&Ra[G](this,t[G],Ui);Uo(this),t.finishInit&&t.finishInit(this);for(var X=0;X20*20}_e(t.scroller,"touchstart",function($){if(!Ie(e,$)&&!M($)&&!oo(e,$)){t.input.ensurePolled(),clearTimeout(a);var Z=+new Date;t.activeTouch={start:Z,moved:!1,prev:Z-r.end<=300?r:null},$.touches.length==1&&(t.activeTouch.left=$.touches[0].pageX,t.activeTouch.top=$.touches[0].pageY)}}),_e(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_e(t.scroller,"touchend",function($){var Z=t.activeTouch;if(Z&&!Bt(t,$)&&Z.left!=null&&!Z.moved&&new Date-Z.start<300){var de=e.coordsChar(t.activeTouch,"page"),ve;!Z.prev||G(Z,Z.prev)?ve=new En(de,de):!Z.prev.prev||G(Z,Z.prev.prev)?ve=e.findWordAt(de):ve=new En(nt(de.line,0),Lt(e.doc,nt(de.line+1,0))),e.setSelection(ve.anchor,ve.head),e.focus(),Q($)}m()}),_e(t.scroller,"touchcancel",m),_e(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Xi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),_e(t.scroller,"mousewheel",function($){return Bo(e,$)}),_e(t.scroller,"DOMMouseScroll",function($){return Bo(e,$)}),_e(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function($){Ie(e,$)||se($)},over:function($){Ie(e,$)||(Rl(e,$),se($))},start:function($){return Cl(e,$)},drop:ir(e,wl),leave:function($){Ie(e,$)||ps(e)}};var X=t.input.getField();_e(X,"keyup",function($){return Os.call(e,$)}),_e(X,"keydown",ir(e,Ss)),_e(X,"keypress",ir(e,ws)),_e(X,"focus",function($){return Wa(e,$)}),_e(X,"blur",function($){return Ci(e,$)})}var so=[];kn.defineInitHook=function(e){return so.push(e)};function da(e,t,a,r){var m=e.doc,M;a==null&&(a="add"),a=="smart"&&(m.mode.indent?M=rn(e,t).state:a="prev");var G=e.options.tabSize,X=bt(m,t),$=W(X.text,null,G);X.stateAfter&&(X.stateAfter=null);var Z=X.text.match(/^\s*/)[0],de;if(!r&&!/\S/.test(X.text))de=0,a="not";else if(a=="smart"&&(de=m.mode.indent(M,X.text.slice(Z.length),X.text),de==fe||de>150)){if(!r)return;a="prev"}a=="prev"?t>m.first?de=W(bt(m,t-1).text,null,G):de=0:a=="add"?de=$+e.options.indentUnit:a=="subtract"?de=$-e.options.indentUnit:typeof a=="number"&&(de=$+a),de=Math.max(0,de);var ve="",De=0;if(e.options.indentWithTabs)for(var Oe=Math.floor(de/G);Oe;--Oe)De+=G,ve+=" ";if(DeG,$=Me(t),Z=null;if(X&&r.ranges.length>1)if(Jr&&Jr.text.join(` -`)==t){if(r.ranges.length%Jr.text.length==0){Z=[];for(var de=0;de=0;De--){var Oe=r.ranges[De],Ge=Oe.from(),qe=Oe.to();Oe.empty()&&(a&&a>0?Ge=nt(Ge.line,Ge.ch-a):e.state.overwrite&&!X?qe=nt(qe.line,Math.min(bt(M,qe.line).text.length,qe.ch+xe($).length)):X&&Jr&&Jr.lineWise&&Jr.text.join(` + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(M),M.scrollIntoView(m),e.display.lineSpace.removeChild(M)}}function $s(e,t,a,r){r==null&&(r=0);var m;!e.options.lineWrapping&&t==a&&(t=t.ch?nt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,a=t.sticky=="before"?nt(t.line,t.ch+1,"before"):t);for(var M=0;M<5;M++){var G=!1,X=Yr(e,t),$=!a||a==t?X:Yr(e,a);m={left:Math.min(X.left,$.left),top:Math.min(X.top,$.top)-r,right:Math.max(X.left,$.left),bottom:Math.max(X.bottom,$.bottom)+r};var Z=Ha(e,m),de=e.doc.scrollTop,ve=e.doc.scrollLeft;if(Z.scrollTop!=null&&(zi(e,Z.scrollTop),Math.abs(e.doc.scrollTop-de)>1&&(G=!0)),Z.scrollLeft!=null&&(vi(e,Z.scrollLeft),Math.abs(e.doc.scrollLeft-ve)>1&&(G=!0)),!G)break}return m}function Js(e,t){var a=Ha(e,t);a.scrollTop!=null&&zi(e,a.scrollTop),a.scrollLeft!=null&&vi(e,a.scrollLeft)}function Ha(e,t){var a=e.display,r=Oi(e.display);t.top<0&&(t.top=0);var m=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,M=Or(e),G={};t.bottom-t.top>M&&(t.bottom=t.top+M);var X=e.doc.height+Vr(a),$=t.topX-r;if(t.topm+M){var de=Math.min(t.top,(Z?X:t.bottom)-M);de!=m&&(G.scrollTop=de)}var ve=e.options.fixedGutter?0:a.gutters.offsetWidth,De=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft-ve,Oe=pr(e)-a.gutters.offsetWidth,Ge=t.right-t.left>Oe;return Ge&&(t.right=t.left+Oe),t.left<10?G.scrollLeft=0:t.leftOe+De-3&&(G.scrollLeft=t.right+(Ge?0:10)-Oe),G}function Ka(e,t){if(t==null)return;ga(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ri(e){ga(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Gi(e,t,a){(t!=null||a!=null)&&ga(e),t!=null&&(e.curOp.scrollLeft=t),a!=null&&(e.curOp.scrollTop=a)}function Qs(e,t){ga(e),e.curOp.scrollToPos=t}function ga(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var a=bo(e,t.from),r=bo(e,t.to);Do(e,a,r,t.margin)}}function Do(e,t,a,r){var m=Ha(e,{left:Math.min(t.left,a.left),top:Math.min(t.top,a.top)-r,right:Math.max(t.right,a.right),bottom:Math.max(t.bottom,a.bottom)+r});Gi(e,m.scrollLeft,m.scrollTop)}function zi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;L||za(e,{top:t}),Lo(e,t,!0),L&&za(e),Yi(e,100)}function Lo(e,t,a){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!a)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function vi(e,t,a,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,ko(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Xi(e){var t=e.display,a=t.gutters.offsetWidth,r=Math.round(e.doc.height+Vr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:r,scrollHeight:r+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:a}}var _i=function(e,t,a){this.cm=a;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),m=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=m.tabIndex=-1,e(r),e(m),_e(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_e(m,"scroll",function(){m.clientWidth&&t(m.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,j&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_i.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var m=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+m)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=a?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var M=e.viewWidth-e.barLeft-(a?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+M)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?r:0,bottom:t?r:0}},_i.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_i.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_i.prototype.zeroWidthHack=function(){var e=n&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},_i.prototype.enableZeroWidthBar=function(e,t,a){e.style.pointerEvents="auto";function r(){var m=e.getBoundingClientRect(),M=a=="vert"?document.elementFromPoint(m.right-1,(m.top+m.bottom)/2):document.elementFromPoint((m.right+m.left)/2,m.bottom-1);M!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},_i.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Vi=function(){};Vi.prototype.update=function(){return{bottom:0,right:0}},Vi.prototype.setScrollLeft=function(){},Vi.prototype.setScrollTop=function(){},Vi.prototype.clear=function(){};function Ai(e,t){t||(t=Xi(e));var a=e.display.barWidth,r=e.display.barHeight;Io(e,t);for(var m=0;m<4&&a!=e.display.barWidth||r!=e.display.barHeight;m++)a!=e.display.barWidth&&e.options.lineWrapping&&pa(e),Io(e,Xi(e)),a=e.display.barWidth,r=e.display.barHeight}function Io(e,t){var a=e.display,r=a.scrollbars.update(t);a.sizer.style.paddingRight=(a.barWidth=r.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=r.bottom)+"px",a.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=r.bottom+"px",a.scrollbarFiller.style.width=r.right+"px"):a.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=r.bottom+"px",a.gutterFiller.style.width=t.gutterWidth+"px"):a.gutterFiller.style.display=""}var Mo={native:_i,null:Vi};function Po(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Mo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),_e(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,a){a=="horizontal"?vi(e,t):zi(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function yi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Zs},fr(e.curOp)}function bi(e){var t=e.curOp;t&&gn(t,function(a){for(var r=0;r=a.viewTo)||a.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new va(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ga(e.cm,e.update)}function nl(e){var t=e.cm,a=t.display;e.updatedDisplay&&pa(t),e.barMeasure=Xi(t),a.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Br(t,a.maxLine,a.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date+e.options.workTime,r=nn(e,t.highlightFrontier),m=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(M){if(r.line>=e.display.viewFrom){var G=M.styles,X=M.text.length>e.options.maxHighlightLength?vt(t.mode,r.state):null,$=vn(e,M,r,!0);X&&(r.state=X),M.styles=$.styles;var Z=M.styleClasses,de=$.classes;de?M.styleClasses=de:Z&&(M.styleClasses=null);for(var ve=!G||G.length!=M.styles.length||Z!=de&&(!Z||!de||Z.bgClass!=de.bgClass||Z.textClass!=de.textClass),De=0;!ve&&Dea)return Yi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),m.length&&kr(e,function(){for(var M=0;M=a.viewFrom&&t.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&So(e)==0)return!1;Uo(e)&&(si(e),t.dims=Ua(e));var m=r.first+r.size,M=Math.max(t.visible.from-e.options.viewportMargin,r.first),G=Math.min(m,t.visible.to+e.options.viewportMargin);a.viewFromG&&a.viewTo-G<20&&(G=Math.min(m,a.viewTo)),kt&&(M=zr(e.doc,M),G=Nr(e.doc,G));var X=M!=a.viewFrom||G!=a.viewTo||a.lastWrapHeight!=t.wrapperHeight||a.lastWrapWidth!=t.wrapperWidth;Xs(e,M,G),a.viewOffset=jn(bt(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var $=So(e);if(!X&&$==0&&!t.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var Z=sl(e);return $>4&&(a.lineDiv.style.display="none"),ul(e,a.updateLineNumbers,t.dims),$>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,ll(Z),v(a.cursorDiv),v(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,X&&(a.lastWrapHeight=t.wrapperHeight,a.lastWrapWidth=t.wrapperWidth,Yi(e,400)),a.updateLineNumbers=null,!0}function No(e,t){for(var a=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+Vr(e.display)-Or(e),a.top)}),t.visible=ma(e.display,e.doc,a),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ma(e.display,e.doc,a));if(!Ga(e,t))break;pa(e);var m=Xi(e);Ki(e),Ai(e,m),Va(e,m),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,t){var a=new va(e,t);if(Ga(e,a)){pa(e),No(e,a);var r=Xi(e);Ki(e),Ai(e,r),Va(e,r),a.finish()}}function ul(e,t,a){var r=e.display,m=e.options.lineNumbers,M=r.lineDiv,G=M.firstChild;function X(Ge){var qe=Ge.nextSibling;return A&&n&&e.display.currentWheelTarget==Ge?Ge.style.display="none":Ge.parentNode.removeChild(Ge),qe}for(var $=r.view,Z=r.viewFrom,de=0;de<$.length;de++){var ve=$[de];if(!ve.hidden)if(!ve.node||ve.node.parentNode!=M){var De=an(e,ve,Z,a);M.insertBefore(De,G)}else{for(;G!=ve.node;)G=X(G);var Oe=m&&t!=null&&t<=Z&&ve.lineNumber;ve.changes&&(J(ve.changes,"gutter")>-1&&(Oe=!1),Zr(e,ve,Z,a)),Oe&&(v(ve.lineNumber),ve.lineNumber.appendChild(document.createTextNode(gr(e.options,Z)))),G=ve.node.nextSibling}Z+=ve.size}for(;G;)G=X(G)}function Xa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Va(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kn(e)+"px"}function ko(e){var t=e.display,a=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Fa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,m=t.gutters.offsetWidth,M=r+"px",G=0;GG.clientWidth,$=G.scrollHeight>G.clientHeight;if(!(r&&X||m&&$))return;if(m&&n&&A){e:for(var Z=t.target,de=M.view;Z!=G;Z=Z.parentNode)for(var ve=0;ve=0&&ct(e,r.to())<=0)return a}return-1};var En=function(e,t){this.anchor=e,this.head=t};En.prototype.from=function(){return Fr(this.anchor,this.head)},En.prototype.to=function(){return vr(this.anchor,this.head)},En.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $r(e,t,a){var r=e&&e.options.selectionsMayTouch,m=t[a];t.sort(function(De,Oe){return ct(De.from(),Oe.from())}),a=J(t,m);for(var M=1;M0:$>=0){var Z=Fr(X.from(),G.from()),de=vr(X.to(),G.to()),ve=X.empty()?G.from()==G.head:X.from()==X.head;M<=a&&--a,t.splice(--M,2,new En(ve?de:Z,ve?Z:de))}}return new Hr(t,a)}function li(e,t){return new Hr([new En(e,t||e)],0)}function ui(e){return e.text?nt(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Wo(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return ui(t);var a=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ui(t).ch-t.to.ch),nt(a,r)}function $a(e,t){for(var a=[],r=0;r1&&e.remove(X.line+1,Ge-1),e.insert(X.line+1,mt)}on(e,"change",e,t)}function di(e,t,a){function r(m,M,G){if(m.linked)for(var X=0;X1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function Vo(e,t,a,r){var m=e.history;m.undone.length=0;var M=+new Date,G,X;if((m.lastOp==r||m.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&m.lastModTime>M-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(G=pl(m,m.lastOp==r)))X=xe(G.changes),ct(t.from,t.to)==0&&ct(t.from,X.to)==0?X.to=ui(t):G.changes.push(Za(e,t));else{var $=xe(m.done);for((!$||!$.ranges)&&ba(e.sel,m.done),G={changes:[Za(e,t)],generation:m.generation},m.done.push(G);m.done.length>m.undoDepth;)m.done.shift(),m.done[0].ranges||m.done.shift()}m.done.push(a),m.generation=++m.maxGeneration,m.lastModTime=m.lastSelTime=M,m.lastOp=m.lastSelOp=r,m.lastOrigin=m.lastSelOrigin=t.origin,X||Ee(e,"historyAdded")}function ml(e,t,a,r){var m=t.charAt(0);return m=="*"||m=="+"&&a.ranges.length==r.ranges.length&&a.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,a,r){var m=e.history,M=r&&r.origin;a==m.lastSelOp||M&&m.lastSelOrigin==M&&(m.lastModTime==m.lastSelTime&&m.lastOrigin==M||ml(e,M,xe(m.done),t))?m.done[m.done.length-1]=t:ba(t,m.done),m.lastSelTime=+new Date,m.lastSelOrigin=M,m.lastSelOp=a,r&&r.clearRedo!==!1&&Xo(m.undone)}function ba(e,t){var a=xe(t);a&&a.ranges&&a.equals(e)||t.push(e)}function Yo(e,t,a,r){var m=t["spans_"+e.id],M=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,r),function(G){G.markedSpans&&((m||(m=t["spans_"+e.id]={}))[M]=G.markedSpans),++M})}function vl(e){if(!e)return null;for(var t,a=0;a-1&&(xe(X)[ve]=Z[ve],delete Z[ve]))}}return r}function qa(e,t,a,r){if(r){var m=e.anchor;if(a){var M=ct(t,m)<0;M!=ct(a,m)<0?(m=t,t=a):M!=ct(t,a)<0&&(t=a)}return new En(m,t)}else return new En(a||t,t)}function Ea(e,t,a,r,m){m==null&&(m=e.cm&&(e.cm.display.shift||e.extend)),Er(e,new Hr([qa(e.sel.primary(),t,a,m)],0),r)}function Jo(e,t,a){for(var r=[],m=e.cm&&(e.cm.display.shift||e.extend),M=0;M=t.ch:X.to>t.ch))){if(m&&(Ee($,"beforeCursorEnter"),$.explicitlyCleared))if(M.markedSpans){--G;continue}else break;if(!$.atomic)continue;if(a){var ve=$.find(r<0?1:-1),De=void 0;if((r<0?de:Z)&&(ve=ns(e,ve,-r,ve&&ve.line==t.line?M:null)),ve&&ve.line==t.line&&(De=ct(ve,a))&&(r<0?De<0:De>0))return Li(e,ve,t,r,m)}var Oe=$.find(r<0?-1:1);return(r<0?Z:de)&&(Oe=ns(e,Oe,r,Oe.line==t.line?M:null)),Oe?Li(e,Oe,t,r,m):null}}return t}function Ta(e,t,a,r,m){var M=r||1,G=Li(e,t,a,M,m)||!m&&Li(e,t,a,M,!0)||Li(e,t,a,-M,m)||!m&&Li(e,t,a,-M,!0);return G||(e.cantEdit=!0,nt(e.first,0))}function ns(e,t,a,r){return a<0&&t.ch==0?t.line>e.first?Lt(e,nt(t.line-1)):null:a>0&&t.ch==(r||bt(e,t.line)).text.length?t.line=0;--m)as(e,{from:r[m].from,to:r[m].to,text:m?[""]:t.text,origin:t.origin});else as(e,t)}function as(e,t){if(t.text.length==1&&t.text[0]==""&&ct(t.from,t.to)==0)return;var a=$a(e,t);Vo(e,t,a,e.cm?e.cm.curOp.id:NaN),Qi(e,t,a,xn(e,t));var r=[];di(e,function(m,M){!M&&J(r,m.history)==-1&&(us(m.history,t),r.push(m.history)),Qi(m,t,null,xn(m,t))})}function Sa(e,t,a){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!a)return;for(var m=e.history,M,G=e.sel,X=t=="undo"?m.done:m.undone,$=t=="undo"?m.undone:m.done,Z=0;Z=0;--Oe){var Ge=De(Oe);if(Ge)return Ge.v}}function os(e,t){if(t==0)return;if(e.first+=t,e.sel=new Hr(Be(e.sel.ranges,function(m){return new En(nt(m.anchor.line+t,m.anchor.ch),nt(m.head.line+t,m.head.ch))}),e.sel.primIndex),e.cm){Ar(e.cm,e.first,e.first-t,t);for(var a=e.cm.display,r=a.viewFrom;re.lastLine())return;if(t.from.lineM&&(t={from:t.from,to:nt(M,bt(e,M).text.length),text:[t.text[0]],origin:t.origin}),t.removed=An(e,t.from,t.to),a||(a=$a(e,t)),e.cm?bl(e.cm,t,r):Qa(e,t,r),xa(e,a,ue),e.cantEdit&&Ta(e,nt(e.firstLine(),0))&&(e.cantEdit=!1)}function bl(e,t,a){var r=e.doc,m=e.display,M=t.from,G=t.to,X=!1,$=M.line;e.options.lineWrapping||($=Gt(cr(bt(r,M.line))),r.iter($,G.line+1,function(Oe){if(Oe==m.maxLine)return X=!0,!0})),r.sel.contains(t.from,t.to)>-1&&pe(e),Qa(r,t,a,To(e)),e.options.lineWrapping||(r.iter($,M.line+t.text.length,function(Oe){var Ge=Rt(Oe);Ge>m.maxLineLength&&(m.maxLine=Oe,m.maxLineLength=Ge,m.maxLineChanged=!0,X=!1)}),X&&(e.curOp.updateMaxLine=!0)),Jt(r,M.line),Yi(e,400);var Z=t.text.length-(G.line-M.line)-1;t.full?Ar(e):M.line==G.line&&t.text.length==1&&!Ko(e.doc,t)?oi(e,M.line,"text"):Ar(e,M.line,G.line+1,Z);var de=ae(e,"changes"),ve=ae(e,"change");if(ve||de){var De={from:M,to:G,text:t.text,removed:t.removed,origin:t.origin};ve&&on(e,"change",e,De),de&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(De)}e.display.selForContextMenu=null}function Mi(e,t,a,r,m){var M;r||(r=a),ct(r,a)<0&&(M=[r,a],a=M[0],r=M[1]),typeof t=="string"&&(t=e.splitLines(t)),Ii(e,{from:a,to:r,text:t,origin:m})}function ss(e,t,a,r){a1||!(this.children[0]instanceof qi))){var X=[];this.collapse(X),this.children=[new qi(X)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var G=m.lines.length%25+25,X=G;X10);e.parent.maybeSpill()},iterN:function(e,t,a){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=Z,e.display.maxLineLength=de,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Ar(e,r,m+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&es(e.doc)),e&&on(e,"markerCleared",e,this,r,m),t&&bi(e),this.parent&&this.parent.clear()},ci.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var a,r,m=0;m0||G==0&&M.clearWhenEmpty!==!1)return M;if(M.replacedWith&&(M.collapsed=!0,M.widgetNode=E("span",[M.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||M.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(M.widgetNode.insertLeft=!0)),M.collapsed){if(Pn(e,t.line,t,a,M)||t.line!=a.line&&Pn(e,a.line,t,a,M))throw new Error("Inserting collapsed marker partially overlapping an existing one");kn()}M.addToHistory&&Vo(e,{from:t,to:a,origin:"markText"},e.sel,NaN);var X=t.line,$=e.cm,Z;if(e.iter(X,a.line+1,function(ve){$&&M.collapsed&&!$.options.lineWrapping&&cr(ve)==$.display.maxLine&&(Z=!0),M.collapsed&&X!=t.line&&Tn(ve,0),rr(ve,new wn(M,X==t.line?t.ch:null,X==a.line?a.ch:null)),++X}),M.collapsed&&e.iter(t.line,a.line+1,function(ve){Rr(e,ve)&&Tn(ve,0)}),M.clearOnEnter&&_e(M,"beforeCursorEnter",function(){return M.clear()}),M.readOnly&&(Mn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),M.collapsed&&(M.id=++cs,M.atomic=!0),$){if(Z&&($.curOp.updateMaxLine=!0),M.collapsed)Ar($,t.line,a.line+1);else if(M.className||M.startStyle||M.endStyle||M.css||M.attributes||M.title)for(var de=t.line;de<=a.line;de++)oi($,de,"text");M.atomic&&es($.doc),on($,"markerAdded",$,M)}return M}var na=function(e,t){this.markers=e,this.primary=t;for(var a=0;a=0;$--)Ii(this,r[$]);X?Zo(this,X):this.cm&&Ri(this.cm)}),undo:or(function(){Sa(this,"undo")}),redo:or(function(){Sa(this,"redo")}),undoSelection:or(function(){Sa(this,"undo",!0)}),redoSelection:or(function(){Sa(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,a=0,r=0;r=e.ch)&&t.push(m.marker.parent||m.marker)}return t},findMarks:function(e,t,a){e=Lt(this,e),t=Lt(this,t);var r=[],m=e.line;return this.iter(e.line,t.line+1,function(M){var G=M.markedSpans;if(G)for(var X=0;X=$.to||$.from==null&&m!=e.line||$.from!=null&&m==t.line&&$.from>=t.ch)&&(!a||a($.marker))&&r.push($.marker.parent||$.marker)}++m}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var a=t.markedSpans;if(a)for(var r=0;re)return t=e,!0;e-=M,++a}),Lt(this,nt(a,t))},indexFromPos:function(e){e=Lt(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var de=e.dataTransfer.getData("Text");if(de){var ve;if(t.state.draggingText&&!t.state.draggingText.copy&&(ve=t.listSelections()),xa(t.doc,li(a,a)),ve)for(var De=0;De=0;X--)Mi(e.doc,"",r[X].from,r[X].to,"+delete");Ri(e)})}function to(e,t,a){var r=He(e.text,t+a,a);return r<0||r>e.text.length?null:r}function no(e,t,a){var r=to(e,t.ch,a);return r==null?null:new nt(t.line,r,a<0?"after":"before")}function ro(e,t,a,r,m){if(e){t.doc.direction=="rtl"&&(m=-m);var M=pt(a,t.doc.direction);if(M){var G=m<0?xe(M):M[0],X=m<0==(G.level==1),$=X?"after":"before",Z;if(G.level>0||t.doc.direction=="rtl"){var de=br(t,a);Z=m<0?a.text.length-1:0;var ve=ei(t,de,Z).top;Z=ot(function(De){return ei(t,de,De).top==ve},m<0==(G.level==1)?G.from:G.to-1,Z),$=="before"&&(Z=to(a,Z,1))}else Z=m<0?G.to:G.from;return new nt(r,Z,$)}}return new nt(r,m<0?a.text.length:0,m<0?"before":"after")}function Pl(e,t,a,r){var m=pt(t,e.doc.direction);if(!m)return no(t,a,r);a.ch>=t.text.length?(a.ch=t.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var M=lt(m,a.ch,a.sticky),G=m[M];if(e.doc.direction=="ltr"&&G.level%2==0&&(r>0?G.to>a.ch:G.from=G.from&&De>=de.begin)){var Oe=ve?"before":"after";return new nt(a.line,De,Oe)}}var Ge=function(mt,Tt,gt){for(var Ot=function(Ln,sr){return sr?new nt(a.line,X(Ln,1),"before"):new nt(a.line,Ln,"after")};mt>=0&&mt0==(Wt.level!=1),tn=Nt?gt.begin:X(gt.end,-1);if(Wt.from<=tn&&tn0?de.end:X(de.begin,-1);return st!=null&&!(r>0&&st==t.text.length)&&(qe=Ge(r>0?0:m.length-1,r,Z(st)),qe)?qe:null}var aa={selectAll:rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return ki(e,function(t){if(t.empty()){var a=bt(e.doc,t.head.line).text.length;return t.head.ch==a&&t.head.line0)m=new nt(m.line,m.ch+1),e.replaceRange(M.charAt(m.ch-1)+M.charAt(m.ch-2),nt(m.line,m.ch-2),m,"+transpose");else if(m.line>e.doc.first){var G=bt(e.doc,m.line-1).text;G&&(m=new nt(m.line,1),e.replaceRange(M.charAt(0)+e.doc.lineSeparator()+G.charAt(G.length-1),nt(m.line-1,G.length-1),m,"+transpose"))}}a.push(new En(m,m))}e.setSelections(a)})},newlineAndIndent:function(e){return kr(e,function(){for(var t=e.listSelections(),a=t.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),t[a].anchor,t[a].head,"+input");t=e.listSelections();for(var r=0;re&&ct(t,this.pos)==0&&a==this.button};var sa,la;function Wl(e,t){var a=+new Date;return la&&la.compare(a,e,t)?(sa=la=null,"triple"):sa&&sa.compare(a,e,t)?(la=new ao(a,e,t),sa=null,"double"):(sa=new ao(a,e,t),la=null,"single")}function Cs(e){var t=this,a=t.display;if(Ie(t,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,sn(a,e)){A||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(oo(t,e))return;var r=mi(t,e),m=Se(e),M=r?Wl(r,m):"single";if(window.focus(),m==1&&t.state.selectingText&&t.state.selectingText(e),r&&Hl(t,m,r,M,e))return;m==1?r?Gl(t,r,M,e):ce(e)==a.scroller&&Q(e):m==2?(r&&Ea(t.doc,r),setTimeout(function(){return a.input.focus()},20)):m==3&&(w?t.display.input.onContextMenu(e):Ro(t))}function Hl(e,t,a,r,m){var M="Click";return r=="double"?M="Double"+M:r=="triple"&&(M="Triple"+M),M=(t==1?"Left":t==2?"Middle":"Right")+M,oa(e,_s(M,m),m,function(G){if(typeof G=="string"&&(G=aa[G]),!G)return!1;var X=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),X=G(e,a)!=fe}finally{e.state.suppressEdits=!1}return X})}function Kl(e,t,a){var r=e.getOption("configureMouse"),m=r?r(e,t,a):{};if(m.unit==null){var M=f?a.shiftKey&&a.metaKey:a.altKey;m.unit=M?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(m.extend==null||e.doc.extend)&&(m.extend=e.doc.extend||a.shiftKey),m.addNew==null&&(m.addNew=n?a.metaKey:a.ctrlKey),m.moveOnDrag==null&&(m.moveOnDrag=!(n?a.altKey:a.ctrlKey)),m}function Gl(e,t,a,r){j?setTimeout(U(Co,e),0):e.curOp.focus=I();var m=Kl(e,a,r),M=e.doc.sel,G;e.options.dragDrop&&je&&!e.isReadOnly()&&a=="single"&&(G=M.contains(t))>-1&&(ct((G=M.ranges[G]).from(),t)<0||t.xRel>0)&&(ct(G.to(),t)>0||t.xRel<0)?zl(e,r,t,m):Xl(e,r,t,m)}function zl(e,t,a,r){var m=e.display,M=!1,G=ar(e,function(Z){A&&(m.scroller.draggable=!1),e.state.draggingText=!1,ke(m.wrapper.ownerDocument,"mouseup",G),ke(m.wrapper.ownerDocument,"mousemove",X),ke(m.scroller,"dragstart",$),ke(m.scroller,"drop",G),M||(Q(Z),r.addNew||Ea(e.doc,a,null,null,r.extend),A&&!u||j&&k==9?setTimeout(function(){m.wrapper.ownerDocument.body.focus({preventScroll:!0}),m.input.focus()},20):m.input.focus())}),X=function(Z){M=M||Math.abs(t.clientX-Z.clientX)+Math.abs(t.clientY-Z.clientY)>=10},$=function(){return M=!0};A&&(m.scroller.draggable=!0),e.state.draggingText=G,G.copy=!r.moveOnDrag,m.scroller.dragDrop&&m.scroller.dragDrop(),_e(m.wrapper.ownerDocument,"mouseup",G),_e(m.wrapper.ownerDocument,"mousemove",X),_e(m.scroller,"dragstart",$),_e(m.scroller,"drop",G),Ro(e),setTimeout(function(){return m.input.focus()},20)}function Rs(e,t,a){if(a=="char")return new En(t,t);if(a=="word")return e.findWordAt(t);if(a=="line")return new En(nt(t.line,0),Lt(e.doc,nt(t.line+1,0)));var r=a(e,t);return new En(r.from,r.to)}function Xl(e,t,a,r){var m=e.display,M=e.doc;Q(t);var G,X,$=M.sel,Z=$.ranges;if(r.addNew&&!r.extend?(X=M.sel.contains(a),X>-1?G=Z[X]:G=new En(a,a)):(G=M.sel.primary(),X=M.sel.primIndex),r.unit=="rectangle")r.addNew||(G=new En(a,a)),a=mi(e,t,!0,!0),X=-1;else{var de=Rs(e,a,r.unit);r.extend?G=qa(G,de.anchor,de.head,r.extend):G=de}r.addNew?X==-1?(X=Z.length,Er(M,$r(e,Z.concat([G]),X),{scroll:!1,origin:"*mouse"})):Z.length>1&&Z[X].empty()&&r.unit=="char"&&!r.extend?(Er(M,$r(e,Z.slice(0,X).concat(Z.slice(X+1)),0),{scroll:!1,origin:"*mouse"}),$=M.sel):eo(M,X,G,le):(X=0,Er(M,new Hr([G],0),le),$=M.sel);var ve=a;function De(gt){if(ct(ve,gt)==0)return;if(ve=gt,r.unit=="rectangle"){for(var Ot=[],Wt=e.options.tabSize,Nt=W(bt(M,a.line).text,a.ch,Wt),tn=W(bt(M,gt.line).text,gt.ch,Wt),Ln=Math.min(Nt,tn),sr=Math.max(Nt,tn),Bn=Math.min(a.line,gt.line),Ur=Math.min(e.lastLine(),Math.max(a.line,gt.line));Bn<=Ur;Bn++){var Lr=bt(M,Bn).text,Qn=ge(Lr,Ln,Wt);Ln==sr?Ot.push(new En(nt(Bn,Qn),nt(Bn,Qn))):Lr.length>Qn&&Ot.push(new En(nt(Bn,Qn),nt(Bn,ge(Lr,sr,Wt))))}Ot.length||Ot.push(new En(a,a)),Er(M,$r(e,$.ranges.slice(0,X).concat(Ot),X),{origin:"*mouse",scroll:!1}),e.scrollIntoView(gt)}else{var Ir=G,mr=Rs(e,gt,r.unit),nr=Ir.anchor,Zn;ct(mr.anchor,nr)>0?(Zn=mr.head,nr=Fr(Ir.from(),mr.anchor)):(Zn=mr.anchor,nr=vr(Ir.to(),mr.head));var Hn=$.ranges.slice(0);Hn[X]=Vl(e,new En(Lt(M,nr),Zn)),Er(M,$r(e,Hn,X),le)}}var Oe=m.wrapper.getBoundingClientRect(),Ge=0;function qe(gt){var Ot=++Ge,Wt=mi(e,gt,!0,r.unit=="rectangle");if(!Wt)return;if(ct(Wt,ve)!=0){e.curOp.focus=I(),De(Wt);var Nt=ma(m,M);(Wt.line>=Nt.to||Wt.lineOe.bottom?20:0;tn&&setTimeout(ar(e,function(){if(Ge!=Ot)return;m.scroller.scrollTop+=tn,qe(gt)}),50)}}function st(gt){e.state.selectingText=!1,Ge=Infinity,gt&&(Q(gt),m.input.focus()),ke(m.wrapper.ownerDocument,"mousemove",mt),ke(m.wrapper.ownerDocument,"mouseup",Tt),M.history.lastSelOrigin=null}var mt=ar(e,function(gt){gt.buttons===0||!Se(gt)?st(gt):qe(gt)}),Tt=ar(e,st);e.state.selectingText=Tt,_e(m.wrapper.ownerDocument,"mousemove",mt),_e(m.wrapper.ownerDocument,"mouseup",Tt)}function Vl(e,t){var a=t.anchor,r=t.head,m=bt(e.doc,a.line);if(ct(a,r)==0&&a.sticky==r.sticky)return t;var M=pt(m);if(!M)return t;var G=lt(M,a.ch,a.sticky),X=M[G];if(X.from!=a.ch&&X.to!=a.ch)return t;var $=G+(X.from==a.ch==(X.level!=1)?0:1);if($==0||$==M.length)return t;var Z;if(r.line!=a.line)Z=(r.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var de=lt(M,r.ch,r.sticky),ve=de-G||(r.ch-a.ch)*(X.level==1?-1:1);de==$-1||de==$?Z=ve<0:Z=ve>0}var De=M[$+(Z?-1:0)],Oe=Z==(De.level==1),Ge=Oe?De.from:De.to,qe=Oe?"after":"before";return a.ch==Ge&&a.sticky==qe?t:new En(new nt(a.line,Ge,qe),r)}function As(e,t,a,r){var m,M;if(t.touches)m=t.touches[0].clientX,M=t.touches[0].clientY;else try{m=t.clientX,M=t.clientY}catch(De){return!1}if(m>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Q(t);var G=e.display,X=G.lineDiv.getBoundingClientRect();if(M>X.bottom||!ae(e,a))return te(t);M-=X.top-G.viewOffset;for(var $=0;$=m){var de=Sn(e.doc,M),ve=e.display.gutterSpecs[$];return Ee(e,a,e,de,ve.className,t),te(t)}}}function oo(e,t){return As(e,t,"gutterClick",!0)}function Ds(e,t){if(sn(e.display,t)||Yl(e,t))return;if(Ie(e,t,"contextmenu"))return;w||e.display.input.onContextMenu(t)}function Yl(e,t){return ae(e,"gutterContextMenu")?As(e,t,"gutterContextMenu",!1):!1}function Ls(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hi(e)}var Ui={toString:function(){return"CodeMirror.Init"}},Is={},Ra={};function $l(e){var t=e.optionHandlers;function a(r,m,M,G){e.defaults[r]=m,M&&(t[r]=G?function(X,$,Z){Z!=Ui&&M(X,$,Z)}:M)}e.defineOption=a,e.Init=Ui,a("value","",function(r,m){return r.setValue(m)},!0),a("mode",null,function(r,m){r.doc.modeOption=m,Ja(r)},!0),a("indentUnit",2,Ja,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(r){Ji(r),Hi(r),Ar(r)},!0),a("lineSeparator",null,function(r,m){if(r.doc.lineSep=m,!m)return;var M=[],G=r.doc.first;r.doc.iter(function($){for(var Z=0;;){var de=$.text.indexOf(m,Z);if(de==-1)break;Z=de+m.length,M.push(nt(G,de))}G++});for(var X=M.length-1;X>=0;X--)Mi(r.doc,m,M[X],nt(M[X].line,M[X].ch+m.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,m,M){r.state.specialChars=new RegExp(m.source+(m.test(" ")?"":"| "),"g"),M!=Ui&&r.refresh()}),a("specialCharPlaceholder",_n,function(r){return r.refresh()},!0),a("electricChars",!0),a("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(r,m){return r.getInputField().spellcheck=m},!0),a("autocorrect",!1,function(r,m){return r.getInputField().autocorrect=m},!0),a("autocapitalize",!1,function(r,m){return r.getInputField().autocapitalize=m},!0),a("rtlMoveVisually",!O),a("wholeLineUpdateBefore",!0),a("theme","default",function(r){Ls(r),$i(r)},!0),a("keyMap","default",function(r,m,M){var G=wa(m),X=M!=Ui&&wa(M);X&&X.detach&&X.detach(r,G),G.attach&&G.attach(r,X||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Ql,!0),a("gutters",[],function(r,m){r.display.gutterSpecs=Ya(m,r.options.lineNumbers),$i(r)},!0),a("fixedGutter",!0,function(r,m){r.display.gutters.style.left=m?Fa(r.display)+"px":"0",r.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(r){return Ai(r)},!0),a("scrollbarStyle","native",function(r){Po(r),Ai(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),a("lineNumbers",!1,function(r,m){r.display.gutterSpecs=Ya(r.options.gutters,m),$i(r)},!0),a("firstLineNumber",1,$i,!0),a("lineNumberFormatter",function(r){return r},$i,!0),a("showCursorWhenSelecting",!1,Ki,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(r,m){m=="nocursor"&&(Ci(r),r.display.input.blur()),r.display.input.readOnlyChanged(m)}),a("screenReaderLabel",null,function(r,m){m=m===""?null:m,r.display.input.screenReaderLabelChanged(m)}),a("disableInput",!1,function(r,m){m||r.display.input.reset()},!0),a("dragDrop",!0,Jl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Ki,!0),a("singleCursorHeightPerLine",!0,Ki,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,Ji,!0),a("addModeClass",!1,Ji,!0),a("pollInterval",100),a("undoDepth",200,function(r,m){return r.doc.history.undoDepth=m}),a("historyEventDelay",1250),a("viewportMargin",10,function(r){return r.refresh()},!0),a("maxHighlightLength",1e4,Ji,!0),a("moveInputWithCursor",!0,function(r,m){m||r.display.input.resetPosition()}),a("tabindex",null,function(r,m){return r.display.input.getField().tabIndex=m||""}),a("autofocus",null),a("direction","ltr",function(r,m){return r.doc.setDirection(m)},!0),a("phrases",null)}function Jl(e,t,a){var r=a&&a!=Ui;if(!t!=!r){var m=e.display.dragFunctions,M=t?_e:ke;M(e.display.scroller,"dragstart",m.start),M(e.display.scroller,"dragenter",m.enter),M(e.display.scroller,"dragover",m.over),M(e.display.scroller,"dragleave",m.leave),M(e.display.scroller,"drop",m.drop)}}function Ql(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),Xr(e)),ja(e),Ar(e),Hi(e),setTimeout(function(){return Ai(e)},100)}function Un(e,t){var a=this;if(!(this instanceof Un))return new Un(e,t);this.options=t=t?C(t):{},C(Is,t,!1);var r=t.value;typeof r=="string"?r=new Dr(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var m=new Un.inputStyles[t.inputStyle](this),M=this.display=new dl(e,r,m,t);M.wrapper.CodeMirror=this,Ls(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Po(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 V,keySeq:null,specialChars:null},t.autofocus&&!o&&M.input.focus(),j&&k<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Zl(this),Al(),yi(this),this.curOp.forceUpdate=!0,Go(this,r),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&Wa(a)},20):Ci(this);for(var G in Ra)Ra.hasOwnProperty(G)&&Ra[G](this,t[G],Ui);Uo(this),t.finishInit&&t.finishInit(this);for(var X=0;X20*20}_e(t.scroller,"touchstart",function($){if(!Ie(e,$)&&!M($)&&!oo(e,$)){t.input.ensurePolled(),clearTimeout(a);var Z=+new Date;t.activeTouch={start:Z,moved:!1,prev:Z-r.end<=300?r:null},$.touches.length==1&&(t.activeTouch.left=$.touches[0].pageX,t.activeTouch.top=$.touches[0].pageY)}}),_e(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_e(t.scroller,"touchend",function($){var Z=t.activeTouch;if(Z&&!sn(t,$)&&Z.left!=null&&!Z.moved&&new Date-Z.start<300){var de=e.coordsChar(t.activeTouch,"page"),ve;!Z.prev||G(Z,Z.prev)?ve=new En(de,de):!Z.prev.prev||G(Z,Z.prev.prev)?ve=e.findWordAt(de):ve=new En(nt(de.line,0),Lt(e.doc,nt(de.line+1,0))),e.setSelection(ve.anchor,ve.head),e.focus(),Q($)}m()}),_e(t.scroller,"touchcancel",m),_e(t.scroller,"scroll",function(){t.scroller.clientHeight&&(zi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),_e(t.scroller,"mousewheel",function($){return Bo(e,$)}),_e(t.scroller,"DOMMouseScroll",function($){return Bo(e,$)}),_e(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function($){Ie(e,$)||se($)},over:function($){Ie(e,$)||(Rl(e,$),se($))},start:function($){return Cl(e,$)},drop:ar(e,wl),leave:function($){Ie(e,$)||ps(e)}};var X=t.input.getField();_e(X,"keyup",function($){return Os.call(e,$)}),_e(X,"keydown",ar(e,Ss)),_e(X,"keypress",ar(e,ws)),_e(X,"focus",function($){return Wa(e,$)}),_e(X,"blur",function($){return Ci(e,$)})}var so=[];Un.defineInitHook=function(e){return so.push(e)};function ua(e,t,a,r){var m=e.doc,M;a==null&&(a="add"),a=="smart"&&(m.mode.indent?M=nn(e,t).state:a="prev");var G=e.options.tabSize,X=bt(m,t),$=W(X.text,null,G);X.stateAfter&&(X.stateAfter=null);var Z=X.text.match(/^\s*/)[0],de;if(!r&&!/\S/.test(X.text))de=0,a="not";else if(a=="smart"&&(de=m.mode.indent(M,X.text.slice(Z.length),X.text),de==fe||de>150)){if(!r)return;a="prev"}a=="prev"?t>m.first?de=W(bt(m,t-1).text,null,G):de=0:a=="add"?de=$+e.options.indentUnit:a=="subtract"?de=$-e.options.indentUnit:typeof a=="number"&&(de=$+a),de=Math.max(0,de);var ve="",De=0;if(e.options.indentWithTabs)for(var Oe=Math.floor(de/G);Oe;--Oe)De+=G,ve+=" ";if(DeG,$=Me(t),Z=null;if(X&&r.ranges.length>1)if(Jr&&Jr.text.join(` +`)==t){if(r.ranges.length%Jr.text.length==0){Z=[];for(var de=0;de=0;De--){var Oe=r.ranges[De],Ge=Oe.from(),qe=Oe.to();Oe.empty()&&(a&&a>0?Ge=nt(Ge.line,Ge.ch-a):e.state.overwrite&&!X?qe=nt(qe.line,Math.min(bt(M,qe.line).text.length,qe.ch+xe($).length)):X&&Jr&&Jr.lineWise&&Jr.text.join(` `)==$.join(` -`)&&(Ge=qe=nt(Ge.line,0)));var st={from:Ge,to:qe,text:Z?Z[De%Z.length]:$,origin:m||(X?"paste":e.state.cutIncoming>G?"cut":"+input")};Ii(e.doc,st),sn(e,"inputRead",e,st)}t&&!X&&Ps(e,t),Ri(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ve),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ms(e,t){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Nr(t,function(){return lo(t,a,0,null,"paste")}),!0}function Ps(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,r=a.ranges.length-1;r>=0;r--){var m=a.ranges[r];if(m.head.ch>100||r&&a.ranges[r-1].head.line==m.head.line)continue;var M=e.getModeAt(m.head),G=!1;if(M.electricChars){for(var X=0;X-1){G=da(e,m.head.line,"smart");break}}else M.electricInput&&(M.electricInput.test(bt(e.doc,m.head.line).text.slice(0,m.head.ch))&&(G=da(e,m.head.line,"smart")));G&&sn(e,"electricInput",e,m.head.line)}}function Ns(e){for(var t=[],a=[],r=0;rM&&(da(this,X.head.line,r,!0),M=X.head.line,G==this.doc.sel.primIndex&&Ri(this));else{var $=X.from(),Z=X.to(),de=Math.max(M,$.line);M=Math.min(this.lastLine(),Z.line-(Z.ch?0:1))+1;for(var ve=de;ve0&&eo(this.doc,G,new En($,De[G].to()),ue)}}}),getTokenAt:function(r,m){return Mt(this,r,m)},getLineTokens:function(r,m){return Mt(this,nt(r),m,!0)},getTokenTypeAt:function(r){r=Lt(this.doc,r);var m=fn(this,bt(this.doc,r.line)),M=0,G=(m.length-1)/2,X=r.ch,$;if(X==0)$=m[2];else for(;;){var Z=M+G>>1;if((Z?m[Z*2-1]:0)>=X)G=Z;else if(m[Z*2+1]$&&(r=$,G=!0),X=bt(this.doc,r)}else X=r;return ca(this,X,{top:0,left:0},m||"page",M||G).top+(G?this.doc.height-Fn(X):0)},defaultTextHeight:function(){return Oi(this.display)},defaultCharWidth:function(){return wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,m,M,G,X){var $=this.display;r=Yr(this,Lt(this.doc,r));var Z=r.bottom,de=r.left;if(m.style.position="absolute",m.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(m),$.sizer.appendChild(m),G=="over")Z=r.top;else if(G=="above"||G=="near"){var ve=Math.max($.wrapper.clientHeight,this.doc.height),De=Math.max($.sizer.clientWidth,$.lineSpace.clientWidth);(G=="above"||r.bottom+m.offsetHeight>ve)&&r.top>m.offsetHeight?Z=r.top-m.offsetHeight:r.bottom+m.offsetHeight<=ve&&(Z=r.bottom),de+m.offsetWidth>De&&(de=De-m.offsetWidth)}m.style.top=Z+"px",m.style.left=m.style.right="",X=="right"?(de=$.sizer.clientWidth-m.offsetWidth,m.style.right="0px"):(X=="left"?de=0:X=="middle"&&(de=($.sizer.clientWidth-m.offsetWidth)/2),m.style.left=de+"px"),M&&Js(this,{left:de,top:Z,right:de+m.offsetWidth,bottom:Z+m.offsetHeight})},triggerOnKeyDown:Tr(Ss),triggerOnKeyPress:Tr(ws),triggerOnKeyUp:Os,triggerOnMouseDown:Tr(Cs),execCommand:function(r){if(oa.hasOwnProperty(r))return oa[r].call(null,this)},triggerElectric:Tr(function(r){Ps(this,r)}),findPosH:function(r,m,M,G){var X=1;m<0&&(X=-1,m=-m);for(var $=Lt(this.doc,r),Z=0;Z0&&de(M.charAt(G-1));)--G;for(;X.5||this.options.lineWrapping)&&ja(this),Ee(this,"refresh",this)}),swapDoc:Tr(function(r){var m=this.doc;return m.cm=null,this.state.selectingText&&this.state.selectingText(),Go(this,r),Ki(this),this.display.input.reset(),zi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,m),m}),phrase:function(r){var m=this.options.phrases;return m&&Object.prototype.hasOwnProperty.call(m,r)?m[r]:r},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}},ie(e),e.registerHelper=function(r,m,M){a.hasOwnProperty(r)||(a[r]=e[r]={_global:[]}),a[r][m]=M},e.registerGlobalHelper=function(r,m,M,G){e.registerHelper(r,m,G),a[r]._global.push({pred:M,val:G})}}function uo(e,t,a,r,m){var M=t,G=a,X=bt(e,t.line),$=m&&e.direction=="rtl"?-a:a;function Z(){var Tt=t.line+$;return Tt=e.first+e.size?!1:(t=new nt(Tt,t.ch,t.sticky),X=bt(e,Tt))}function de(Tt){var mt;if(r=="codepoint"){var Ot=X.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(Ot)?mt=null:mt=new nt(t.line,Math.max(0,Math.min(X.text.length,t.ch+a*(Ot>=55296&&Ot<56320?2:1))),-a)}else m?mt=Pl(e.cm,X,t,a):mt=no(X,t,a);if(mt==null)if(!Tt&&Z())t=ro(m,e.cm,X,t.line,$);else return!1;else t=mt;return!0}if(r=="char"||r=="codepoint")de();else if(r=="column")de(!0);else if(r=="word"||r=="group")for(var ve=null,De=r=="group",Oe=e.cm&&e.cm.getHelper(t,"wordChars"),Ge=!0;!(a<0&&!de(!Ge));Ge=!1){var qe=X.text.charAt(t.ch)||` +`)&&(Ge=qe=nt(Ge.line,0)));var st={from:Ge,to:qe,text:Z?Z[De%Z.length]:$,origin:m||(X?"paste":e.state.cutIncoming>G?"cut":"+input")};Ii(e.doc,st),on(e,"inputRead",e,st)}t&&!X&&Ps(e,t),Ri(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ve),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ms(e,t){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&kr(t,function(){return lo(t,a,0,null,"paste")}),!0}function Ps(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,r=a.ranges.length-1;r>=0;r--){var m=a.ranges[r];if(m.head.ch>100||r&&a.ranges[r-1].head.line==m.head.line)continue;var M=e.getModeAt(m.head),G=!1;if(M.electricChars){for(var X=0;X-1){G=ua(e,m.head.line,"smart");break}}else M.electricInput&&(M.electricInput.test(bt(e.doc,m.head.line).text.slice(0,m.head.ch))&&(G=ua(e,m.head.line,"smart")));G&&on(e,"electricInput",e,m.head.line)}}function Ns(e){for(var t=[],a=[],r=0;rM&&(ua(this,X.head.line,r,!0),M=X.head.line,G==this.doc.sel.primIndex&&Ri(this));else{var $=X.from(),Z=X.to(),de=Math.max(M,$.line);M=Math.min(this.lastLine(),Z.line-(Z.ch?0:1))+1;for(var ve=de;ve0&&eo(this.doc,G,new En($,De[G].to()),ue)}}}),getTokenAt:function(r,m){return Mt(this,r,m)},getLineTokens:function(r,m){return Mt(this,nt(r),m,!0)},getTokenTypeAt:function(r){r=Lt(this.doc,r);var m=fn(this,bt(this.doc,r.line)),M=0,G=(m.length-1)/2,X=r.ch,$;if(X==0)$=m[2];else for(;;){var Z=M+G>>1;if((Z?m[Z*2-1]:0)>=X)G=Z;else if(m[Z*2+1]$&&(r=$,G=!0),X=bt(this.doc,r)}else X=r;return ca(this,X,{top:0,left:0},m||"page",M||G).top+(G?this.doc.height-jn(X):0)},defaultTextHeight:function(){return Oi(this.display)},defaultCharWidth:function(){return wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,m,M,G,X){var $=this.display;r=Yr(this,Lt(this.doc,r));var Z=r.bottom,de=r.left;if(m.style.position="absolute",m.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(m),$.sizer.appendChild(m),G=="over")Z=r.top;else if(G=="above"||G=="near"){var ve=Math.max($.wrapper.clientHeight,this.doc.height),De=Math.max($.sizer.clientWidth,$.lineSpace.clientWidth);(G=="above"||r.bottom+m.offsetHeight>ve)&&r.top>m.offsetHeight?Z=r.top-m.offsetHeight:r.bottom+m.offsetHeight<=ve&&(Z=r.bottom),de+m.offsetWidth>De&&(de=De-m.offsetWidth)}m.style.top=Z+"px",m.style.left=m.style.right="",X=="right"?(de=$.sizer.clientWidth-m.offsetWidth,m.style.right="0px"):(X=="left"?de=0:X=="middle"&&(de=($.sizer.clientWidth-m.offsetWidth)/2),m.style.left=de+"px"),M&&Js(this,{left:de,top:Z,right:de+m.offsetWidth,bottom:Z+m.offsetHeight})},triggerOnKeyDown:wr(Ss),triggerOnKeyPress:wr(ws),triggerOnKeyUp:Os,triggerOnMouseDown:wr(Cs),execCommand:function(r){if(aa.hasOwnProperty(r))return aa[r].call(null,this)},triggerElectric:wr(function(r){Ps(this,r)}),findPosH:function(r,m,M,G){var X=1;m<0&&(X=-1,m=-m);for(var $=Lt(this.doc,r),Z=0;Z0&&de(M.charAt(G-1));)--G;for(;X.5||this.options.lineWrapping)&&ja(this),Ee(this,"refresh",this)}),swapDoc:wr(function(r){var m=this.doc;return m.cm=null,this.state.selectingText&&this.state.selectingText(),Go(this,r),Hi(this),this.display.input.reset(),Gi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,on(this,"swapDoc",this,m),m}),phrase:function(r){var m=this.options.phrases;return m&&Object.prototype.hasOwnProperty.call(m,r)?m[r]:r},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}},ie(e),e.registerHelper=function(r,m,M){a.hasOwnProperty(r)||(a[r]=e[r]={_global:[]}),a[r][m]=M},e.registerGlobalHelper=function(r,m,M,G){e.registerHelper(r,m,G),a[r]._global.push({pred:M,val:G})}}function uo(e,t,a,r,m){var M=t,G=a,X=bt(e,t.line),$=m&&e.direction=="rtl"?-a:a;function Z(){var Tt=t.line+$;return Tt=e.first+e.size?!1:(t=new nt(Tt,t.ch,t.sticky),X=bt(e,Tt))}function de(Tt){var gt;if(r=="codepoint"){var Ot=X.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(Ot)?gt=null:gt=new nt(t.line,Math.max(0,Math.min(X.text.length,t.ch+a*(Ot>=55296&&Ot<56320?2:1))),-a)}else m?gt=Pl(e.cm,X,t,a):gt=no(X,t,a);if(gt==null)if(!Tt&&Z())t=ro(m,e.cm,X,t.line,$);else return!1;else t=gt;return!0}if(r=="char"||r=="codepoint")de();else if(r=="column")de(!0);else if(r=="word"||r=="group")for(var ve=null,De=r=="group",Oe=e.cm&&e.cm.getHelper(t,"wordChars"),Ge=!0;!(a<0&&!de(!Ge));Ge=!1){var qe=X.text.charAt(t.ch)||` `,st=ze(qe,Oe)?"w":De&&qe==` -`?"n":!De||/\s/.test(qe)?null:"p";if(De&&!Ge&&!st&&(st="s"),ve&&ve!=st){a<0&&(a=1,de(),t.sticky="after");break}if(st&&(ve=st),a>0&&!de(!Ge))break}var pt=Ta(e,t,M,G,!0);return qn(M,pt)&&(pt.hitSide=!0),pt}function Fs(e,t,a,r){var m=e.doc,M=t.left,G;if(r=="page"){var X=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$=Math.max(X-.5*Oi(e.display),3);G=(a>0?t.bottom:t.top)+a*$}else r=="line"&&(G=a>0?t.bottom+3:t.top-3);for(var Z;!(Z=Na(e,M,G),!Z.outside);){if(a<0?G<=0:G>=m.height){Z.hitSide=!0;break}G+=a*5}return Z}var On=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};On.prototype.init=function(e){var t=this,a=this,r=a.cm,m=a.div=e.lineDiv;ks(m,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function M(X){for(var $=X.target;$;$=$.parentNode){if($==m)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($.className))break}return!1}_e(m,"paste",function(X){if(!M(X)||Ie(r,X)||Ms(X,r))return;k<=11&&setTimeout(ir(r,function(){return t.updateFromDOM()}),20)}),_e(m,"compositionstart",function(X){t.composing={data:X.data,done:!1}}),_e(m,"compositionupdate",function(X){t.composing||(t.composing={data:X.data,done:!1})}),_e(m,"compositionend",function(X){t.composing&&(X.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_e(m,"touchstart",function(){return a.forceCompositionEnd()}),_e(m,"input",function(){t.composing||t.readFromDOMSoon()});function G(X){if(!M(X)||Ie(r,X))return;if(r.somethingSelected())Aa({lineWise:!1,text:r.getSelections()}),X.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var $=Ns(r);Aa({lineWise:!0,text:$.text}),X.type=="cut"&&r.operation(function(){r.setSelections($.ranges,0,ue),r.replaceSelection("",null,"cut")})}else return;if(X.clipboardData){X.clipboardData.clearData();var Z=Jr.text.join(` +`?"n":!De||/\s/.test(qe)?null:"p";if(De&&!Ge&&!st&&(st="s"),ve&&ve!=st){a<0&&(a=1,de(),t.sticky="after");break}if(st&&(ve=st),a>0&&!de(!Ge))break}var mt=Ta(e,t,M,G,!0);return qn(M,mt)&&(mt.hitSide=!0),mt}function Fs(e,t,a,r){var m=e.doc,M=t.left,G;if(r=="page"){var X=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$=Math.max(X-.5*Oi(e.display),3);G=(a>0?t.bottom:t.top)+a*$}else r=="line"&&(G=a>0?t.bottom+3:t.top-3);for(var Z;!(Z=Na(e,M,G),!Z.outside);){if(a<0?G<=0:G>=m.height){Z.hitSide=!0;break}G+=a*5}return Z}var On=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};On.prototype.init=function(e){var t=this,a=this,r=a.cm,m=a.div=e.lineDiv;ks(m,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function M(X){for(var $=X.target;$;$=$.parentNode){if($==m)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($.className))break}return!1}_e(m,"paste",function(X){if(!M(X)||Ie(r,X)||Ms(X,r))return;k<=11&&setTimeout(ar(r,function(){return t.updateFromDOM()}),20)}),_e(m,"compositionstart",function(X){t.composing={data:X.data,done:!1}}),_e(m,"compositionupdate",function(X){t.composing||(t.composing={data:X.data,done:!1})}),_e(m,"compositionend",function(X){t.composing&&(X.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_e(m,"touchstart",function(){return a.forceCompositionEnd()}),_e(m,"input",function(){t.composing||t.readFromDOMSoon()});function G(X){if(!M(X)||Ie(r,X))return;if(r.somethingSelected())Aa({lineWise:!1,text:r.getSelections()}),X.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var $=Ns(r);Aa({lineWise:!0,text:$.text}),X.type=="cut"&&r.operation(function(){r.setSelections($.ranges,0,ue),r.replaceSelection("",null,"cut")})}else return;if(X.clipboardData){X.clipboardData.clearData();var Z=Jr.text.join(` `);if(X.clipboardData.setData("Text",Z),X.clipboardData.getData("Text")==Z){X.preventDefault();return}}var de=Us(),ve=de.firstChild;r.display.lineSpace.insertBefore(de,r.display.lineSpace.firstChild),ve.value=Jr.text.join(` -`);var De=document.activeElement;z(ve),setTimeout(function(){r.display.lineSpace.removeChild(de),De.focus(),De==m&&a.showPrimarySelection()},50)}_e(m,"copy",G),_e(m,"cut",G)},On.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},On.prototype.prepareSelection=function(){var e=Oo(this.cm,!1);return e.focus=document.activeElement==this.div,e},On.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},On.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},On.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,a=t.doc.sel.primary(),r=a.from(),m=a.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||m.line=t.display.viewFrom&&js(t,r)||{node:X[0].measure.map[2],offset:0},Z=m.linee.firstLine()&&(r=nt(r.line-1,bt(e.doc,r.line-1).length)),m.ch==bt(e.doc,m.line).text.length&&m.linet.viewTo-1)return!1;var M,G,X;r.line==t.viewFrom||(M=gi(e,r.line))==0?(G=zt(t.view[0].line),X=t.view[0].node):(G=zt(t.view[M].line),X=t.view[M-1].node.nextSibling);var $=gi(e,m.line),Z,de;if($==t.view.length-1?(Z=t.viewTo-1,de=t.lineDiv.lastChild):(Z=zt(t.view[$+1].line)-1,de=t.view[$+1].node.previousSibling),!X)return!1;for(var ve=e.doc.splitLines(tu(e,X,de,G,Z)),De=Rn(e.doc,nt(G,0),nt(Z,bt(e.doc,Z).text.length));ve.length>1&&De.length>1;)if(xe(ve)==xe(De))ve.pop(),De.pop(),Z--;else if(ve[0]==De[0])ve.shift(),De.shift(),G++;else break;for(var Oe=0,Ge=0,qe=ve[0],st=De[0],pt=Math.min(qe.length,st.length);Oer.ch&&Tt.charCodeAt(Tt.length-Ge-1)==mt.charCodeAt(mt.length-Ge-1);)Oe--,Ge++;ve[ve.length-1]=Tt.slice(0,Tt.length-Ge).replace(/^\u200b+/,""),ve[0]=ve[0].slice(Oe).replace(/\u200b+$/,"");var Ht=nt(G,Oe),Nt=nt(Z,De.length?xe(De).length-Ge:0);if(ve.length>1||ve[0]||ct(Ht,Nt))return Mi(e.doc,ve,Ht,Nt,"+input"),!0},On.prototype.ensurePolled=function(){this.forceCompositionEnd()},On.prototype.reset=function(){this.forceCompositionEnd()},On.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},On.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},On.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Nr(this.cm,function(){return Cr(e.cm)})},On.prototype.setUneditable=function(e){e.contentEditable="false"},On.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ir(this.cm,lo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},On.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},On.prototype.onContextMenu=function(){},On.prototype.resetPosition=function(){},On.prototype.needsContentAttribute=!0;function js(e,t){var a=Pr(e,t.line);if(!a||a.hidden)return null;var r=bt(e.doc,t.line),m=Kr(a,r,t.line),M=ht(r,e.doc.direction),G="left";if(M){var X=lt(M,t.ch);G=X%2?"right":"left"}var $=po(m.map,t.ch,G);return $.offset=$.collapse=="right"?$.end:$.start,$}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Fi(e,t){return t&&(e.bad=!0),e}function tu(e,t,a,r,m){var M="",G=!1,X=e.doc.lineSeparator(),$=!1;function Z(Oe){return function(Ge){return Ge.id==Oe}}function de(){G&&(M+=X,$&&(M+=X),G=$=!1)}function ve(Oe){Oe&&(de(),M+=Oe)}function De(Oe){if(Oe.nodeType==1){var Ge=Oe.getAttribute("cm-text");if(Ge){ve(Ge);return}var qe=Oe.getAttribute("cm-marker"),st;if(qe){var pt=e.findMarks(nt(r,0),nt(m+1,0),Z(+qe));pt.length&&(st=pt[0].find(0))&&ve(Rn(e.doc,st.from,st.to).join(X));return}if(Oe.getAttribute("contenteditable")=="false")return;var Tt=/^(pre|div|p|li|table|br)$/i.test(Oe.nodeName);if(!/^br$/i.test(Oe.nodeName)&&Oe.textContent.length==0)return;Tt&&de();for(var mt=0;mt=9&&t.hasSelection&&(t.hasSelection=null),a.poll()}),_e(m,"paste",function(G){if(Ie(r,G)||Ms(G,r))return;r.state.pasteIncoming=+new Date,a.fastPoll()});function M(G){if(Ie(r,G))return;if(r.somethingSelected())Aa({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var X=Ns(r);Aa({lineWise:!0,text:X.text}),G.type=="cut"?r.setSelections(X.ranges,null,ue):(a.prevInput="",m.value=X.text.join(` -`),z(m))}else return;G.type=="cut"&&(r.state.cutIncoming=+new Date)}_e(m,"cut",M),_e(m,"copy",M),_e(e.scroller,"paste",function(G){if(Bt(e,G)||Ie(r,G))return;if(!m.dispatchEvent){r.state.pasteIncoming=+new Date,a.focus();return}var X=new Event("paste");X.clipboardData=G.clipboardData,m.dispatchEvent(X)}),_e(e.lineSpace,"selectstart",function(G){Bt(e,G)||Q(G)}),_e(m,"compositionstart",function(){var G=r.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:G,range:r.markText(G,r.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(m,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},Gn.prototype.createField=function(e){this.wrapper=Us(),this.textarea=this.wrapper.firstChild},Gn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Gn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,a=e.doc,r=Oo(e);if(e.options.moveInputWithCursor){var m=Yr(e,a.sel.primary().head,"div"),M=t.wrapper.getBoundingClientRect(),G=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,m.top+G.top-M.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,m.left+G.left-M.left))}return r},Gn.prototype.showSelection=function(e){var t=this.cm,a=t.display;p(a.cursorDiv,e.cursors),p(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var a=t.getSelection();this.textarea.value=a,t.state.focused&&z(this.textarea),j&&k>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",j&&k>=9&&(this.hasSelection=null))},Gn.prototype.getField=function(){return this.textarea},Gn.prototype.supportsTouch=function(){return!1},Gn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gn.prototype.blur=function(){this.textarea.blur()},Gn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gn.prototype.receivedFocus=function(){this.slowPoll()},Gn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function a(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,a)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,a)},Gn.prototype.poll=function(){var e=this,t=this.cm,a=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ue(a)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var m=a.value;if(m==r&&!t.somethingSelected())return!1;if(j&&k>=9&&this.hasSelection===m||n&&/[\uf700-\uf7ff]/.test(m))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var M=m.charCodeAt(0);if(M==8203&&!r&&(r="\u200B"),M==8666)return this.reset(),this.cm.execCommand("undo")}for(var G=0,X=Math.min(r.length,m.length);G1e3||m.indexOf(` -`)>-1?a.value=e.prevInput="":e.prevInput=m,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gn.prototype.onKeyPress=function(){j&&k>=9&&(this.hasSelection=null),this.fastPoll()},Gn.prototype.onContextMenu=function(e){var t=this,a=t.cm,r=a.display,m=t.textarea;t.contextMenuPending&&t.contextMenuPending();var M=mi(a,e),G=r.scroller.scrollTop;if(!M||h)return;var X=a.options.resetSelectionOnContextMenu;X&&a.doc.sel.contains(M)==-1&&ir(a,br)(a.doc,li(M),ue);var $=m.style.cssText,Z=t.wrapper.style.cssText,de=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",m.style.cssText=`position: absolute; width: 30px; height: 30px; +`);var De=document.activeElement;z(ve),setTimeout(function(){r.display.lineSpace.removeChild(de),De.focus(),De==m&&a.showPrimarySelection()},50)}_e(m,"copy",G),_e(m,"cut",G)},On.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},On.prototype.prepareSelection=function(){var e=Oo(this.cm,!1);return e.focus=document.activeElement==this.div,e},On.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},On.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},On.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,a=t.doc.sel.primary(),r=a.from(),m=a.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||m.line=t.display.viewFrom&&js(t,r)||{node:X[0].measure.map[2],offset:0},Z=m.linee.firstLine()&&(r=nt(r.line-1,bt(e.doc,r.line-1).length)),m.ch==bt(e.doc,m.line).text.length&&m.linet.viewTo-1)return!1;var M,G,X;r.line==t.viewFrom||(M=gi(e,r.line))==0?(G=Gt(t.view[0].line),X=t.view[0].node):(G=Gt(t.view[M].line),X=t.view[M-1].node.nextSibling);var $=gi(e,m.line),Z,de;if($==t.view.length-1?(Z=t.viewTo-1,de=t.lineDiv.lastChild):(Z=Gt(t.view[$+1].line)-1,de=t.view[$+1].node.previousSibling),!X)return!1;for(var ve=e.doc.splitLines(tu(e,X,de,G,Z)),De=An(e.doc,nt(G,0),nt(Z,bt(e.doc,Z).text.length));ve.length>1&&De.length>1;)if(xe(ve)==xe(De))ve.pop(),De.pop(),Z--;else if(ve[0]==De[0])ve.shift(),De.shift(),G++;else break;for(var Oe=0,Ge=0,qe=ve[0],st=De[0],mt=Math.min(qe.length,st.length);Oer.ch&&Tt.charCodeAt(Tt.length-Ge-1)==gt.charCodeAt(gt.length-Ge-1);)Oe--,Ge++;ve[ve.length-1]=Tt.slice(0,Tt.length-Ge).replace(/^\u200b+/,""),ve[0]=ve[0].slice(Oe).replace(/\u200b+$/,"");var Wt=nt(G,Oe),Nt=nt(Z,De.length?xe(De).length-Ge:0);if(ve.length>1||ve[0]||ct(Wt,Nt))return Mi(e.doc,ve,Wt,Nt,"+input"),!0},On.prototype.ensurePolled=function(){this.forceCompositionEnd()},On.prototype.reset=function(){this.forceCompositionEnd()},On.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},On.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},On.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&kr(this.cm,function(){return Ar(e.cm)})},On.prototype.setUneditable=function(e){e.contentEditable="false"},On.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ar(this.cm,lo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},On.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},On.prototype.onContextMenu=function(){},On.prototype.resetPosition=function(){},On.prototype.needsContentAttribute=!0;function js(e,t){var a=da(e,t.line);if(!a||a.hidden)return null;var r=bt(e.doc,t.line),m=Gr(a,r,t.line),M=pt(r,e.doc.direction),G="left";if(M){var X=lt(M,t.ch);G=X%2?"right":"left"}var $=po(m.map,t.ch,G);return $.offset=$.collapse=="right"?$.end:$.start,$}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Fi(e,t){return t&&(e.bad=!0),e}function tu(e,t,a,r,m){var M="",G=!1,X=e.doc.lineSeparator(),$=!1;function Z(Oe){return function(Ge){return Ge.id==Oe}}function de(){G&&(M+=X,$&&(M+=X),G=$=!1)}function ve(Oe){Oe&&(de(),M+=Oe)}function De(Oe){if(Oe.nodeType==1){var Ge=Oe.getAttribute("cm-text");if(Ge){ve(Ge);return}var qe=Oe.getAttribute("cm-marker"),st;if(qe){var mt=e.findMarks(nt(r,0),nt(m+1,0),Z(+qe));mt.length&&(st=mt[0].find(0))&&ve(An(e.doc,st.from,st.to).join(X));return}if(Oe.getAttribute("contenteditable")=="false")return;var Tt=/^(pre|div|p|li|table|br)$/i.test(Oe.nodeName);if(!/^br$/i.test(Oe.nodeName)&&Oe.textContent.length==0)return;Tt&&de();for(var gt=0;gt=9&&t.hasSelection&&(t.hasSelection=null),a.poll()}),_e(m,"paste",function(G){if(Ie(r,G)||Ms(G,r))return;r.state.pasteIncoming=+new Date,a.fastPoll()});function M(G){if(Ie(r,G))return;if(r.somethingSelected())Aa({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var X=Ns(r);Aa({lineWise:!0,text:X.text}),G.type=="cut"?r.setSelections(X.ranges,null,ue):(a.prevInput="",m.value=X.text.join(` +`),z(m))}else return;G.type=="cut"&&(r.state.cutIncoming=+new Date)}_e(m,"cut",M),_e(m,"copy",M),_e(e.scroller,"paste",function(G){if(sn(e,G)||Ie(r,G))return;if(!m.dispatchEvent){r.state.pasteIncoming=+new Date,a.focus();return}var X=new Event("paste");X.clipboardData=G.clipboardData,m.dispatchEvent(X)}),_e(e.lineSpace,"selectstart",function(G){sn(e,G)||Q(G)}),_e(m,"compositionstart",function(){var G=r.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:G,range:r.markText(G,r.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(m,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},Gn.prototype.createField=function(e){this.wrapper=Us(),this.textarea=this.wrapper.firstChild},Gn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Gn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,a=e.doc,r=Oo(e);if(e.options.moveInputWithCursor){var m=Yr(e,a.sel.primary().head,"div"),M=t.wrapper.getBoundingClientRect(),G=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,m.top+G.top-M.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,m.left+G.left-M.left))}return r},Gn.prototype.showSelection=function(e){var t=this.cm,a=t.display;p(a.cursorDiv,e.cursors),p(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var a=t.getSelection();this.textarea.value=a,t.state.focused&&z(this.textarea),j&&k>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",j&&k>=9&&(this.hasSelection=null))},Gn.prototype.getField=function(){return this.textarea},Gn.prototype.supportsTouch=function(){return!1},Gn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gn.prototype.blur=function(){this.textarea.blur()},Gn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gn.prototype.receivedFocus=function(){this.slowPoll()},Gn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function a(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,a)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,a)},Gn.prototype.poll=function(){var e=this,t=this.cm,a=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ue(a)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var m=a.value;if(m==r&&!t.somethingSelected())return!1;if(j&&k>=9&&this.hasSelection===m||n&&/[\uf700-\uf7ff]/.test(m))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var M=m.charCodeAt(0);if(M==8203&&!r&&(r="\u200B"),M==8666)return this.reset(),this.cm.execCommand("undo")}for(var G=0,X=Math.min(r.length,m.length);G1e3||m.indexOf(` +`)>-1?a.value=e.prevInput="":e.prevInput=m,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gn.prototype.onKeyPress=function(){j&&k>=9&&(this.hasSelection=null),this.fastPoll()},Gn.prototype.onContextMenu=function(e){var t=this,a=t.cm,r=a.display,m=t.textarea;t.contextMenuPending&&t.contextMenuPending();var M=mi(a,e),G=r.scroller.scrollTop;if(!M||h)return;var X=a.options.resetSelectionOnContextMenu;X&&a.doc.sel.contains(M)==-1&&ar(a,Er)(a.doc,li(M),ue);var $=m.style.cssText,Z=t.wrapper.style.cssText,de=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",m.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-de.top-5)+"px; left: "+(e.clientX-de.left-5)+`px; z-index: 1000; background: `+(j?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ve;A&&(ve=window.scrollY),r.input.focus(),A&&window.scrollTo(null,ve),r.input.reset(),a.somethingSelected()||(m.value=t.prevInput=" "),t.contextMenuPending=Oe,r.selForContextMenu=a.doc.sel,clearTimeout(r.detectingSelectAll);function De(){if(m.selectionStart!=null){var qe=a.somethingSelected(),st="\u200B"+(qe?m.value:"");m.value="\u21DA",m.value=st,t.prevInput=qe?"":"\u200B",m.selectionStart=1,m.selectionEnd=st.length,r.selForContextMenu=a.doc.sel}}function Oe(){if(t.contextMenuPending!=Oe)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=Z,m.style.cssText=$,j&&k<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=G),m.selectionStart!=null){(!j||j&&k<9)&&De();var qe=0,st=function(){r.selForContextMenu==a.doc.sel&&m.selectionStart==0&&m.selectionEnd>0&&t.prevInput=="\u200B"?ir(a,rs)(a):qe++<10?r.detectingSelectAll=setTimeout(st,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(st,200)}}if(j&&k>=9&&De(),w){se(e);var Ge=function(){ke(window,"mouseup",Ge),setTimeout(Oe,20)};_e(window,"mouseup",Ge)}else setTimeout(Oe,50)},Gn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Gn.prototype.setUneditable=function(){},Gn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?C(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var a=I();t.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function r(){e.value=X.getValue()}var m;if(e.form&&(_e(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var M=e.form;m=M.submit;try{var G=M.submit=function(){r(),M.submit=m,M.submit(),M.submit=G}}catch($){}}t.finishInit=function($){$.save=r,$.getTextArea=function(){return e},$.toTextArea=function(){$.toTextArea=isNaN,r(),e.parentNode.removeChild($.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=m))}},e.style.display="none";var X=kn(function($){return e.parentNode.insertBefore($,e.nextSibling)},t);return X}function iu(e){e.off=ke,e.on=_e,e.wheelEventPixels=cl,e.Doc=Rr,e.splitLines=Me,e.countColumn=W,e.findColumn=ge,e.isWordChar=We,e.Pass=fe,e.signal=Ee,e.Line=gr,e.changeEnd=ui,e.scrollbarModel=Mo,e.Pos=nt,e.cmpPos=ct,e.modes=Fe,e.mimeModes=Re,e.resolveMode=Te,e.getMode=Ae,e.modeExtensions=Qe,e.extendMode=Et,e.copyState=vt,e.startState=yn,e.innerMode=cn,e.commands=oa,e.keyMap=ii,e.keyName=ys,e.isModifierKey=vs,e.lookupKey=Ni,e.normalizeKeyMap=Ml,e.StringStream=ln,e.SharedTextMarker=ra,e.TextMarker=ci,e.LineWidget=na,e.e_preventDefault=Q,e.e_stopPropagation=q,e.e_stop=se,e.addClass=P,e.contains=b,e.rmClass=y,e.keyNames=fi}$l(kn),ql(kn);var au="iter insert remove copy getEditor constructor".split(" ");for(var La in Rr.prototype)Rr.prototype.hasOwnProperty(La)&&J(au,La)<0&&(kn.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rr.prototype[La]));return ie(Rr),kn.inputStyles={textarea:Gn,contenteditable:On},kn.defineMode=function(e){!kn.defaults.mode&&e!="null"&&(kn.defaults.mode=e),et.apply(this,arguments)},kn.defineMIME=tt,kn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),kn.defineMIME("text/plain","null"),kn.defineExtension=function(e,t){kn.prototype[e]=t},kn.defineDocExtension=function(e,t){Rr.prototype[e]=t},kn.fromTextArea=ru,iu(kn),kn.version="5.58.2",kn})},WaYH:function(Le,ye,F){"use strict";var Y=F("rePB"),K=F("Ff2n"),L=F("VTBJ"),H=F("1OyB"),N=F("vuIU"),R=F("JX7q"),j=F("Ji7U"),k=F("LK+K"),A=F("cDcd"),D=F("TSYQ"),g=F.n(D),h=F("sboe"),u=F("OZM5"),d=function(w){var T=w.prefixCls,y=w.level,v=w.isStart,p=w.isEnd;if(!y)return null;for(var c="".concat(T,"-indent-unit"),E=[],_=0;_0&&t.prevInput=="\u200B"?ar(a,rs)(a):qe++<10?r.detectingSelectAll=setTimeout(st,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(st,200)}}if(j&&k>=9&&De(),w){se(e);var Ge=function(){ke(window,"mouseup",Ge),setTimeout(Oe,20)};_e(window,"mouseup",Ge)}else setTimeout(Oe,50)},Gn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Gn.prototype.setUneditable=function(){},Gn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?C(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var a=I();t.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function r(){e.value=X.getValue()}var m;if(e.form&&(_e(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var M=e.form;m=M.submit;try{var G=M.submit=function(){r(),M.submit=m,M.submit(),M.submit=G}}catch($){}}t.finishInit=function($){$.save=r,$.getTextArea=function(){return e},$.toTextArea=function(){$.toTextArea=isNaN,r(),e.parentNode.removeChild($.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=m))}},e.style.display="none";var X=Un(function($){return e.parentNode.insertBefore($,e.nextSibling)},t);return X}function iu(e){e.off=ke,e.on=_e,e.wheelEventPixels=cl,e.Doc=Dr,e.splitLines=Me,e.countColumn=W,e.findColumn=ge,e.isWordChar=We,e.Pass=fe,e.signal=Ee,e.Line=_r,e.changeEnd=ui,e.scrollbarModel=Mo,e.Pos=nt,e.cmpPos=ct,e.modes=Fe,e.mimeModes=Re,e.resolveMode=Te,e.getMode=Ae,e.modeExtensions=Qe,e.extendMode=Et,e.copyState=vt,e.startState=yn,e.innerMode=cn,e.commands=aa,e.keyMap=ii,e.keyName=ys,e.isModifierKey=vs,e.lookupKey=Ni,e.normalizeKeyMap=Ml,e.StringStream=ln,e.SharedTextMarker=na,e.TextMarker=ci,e.LineWidget=ta,e.e_preventDefault=Q,e.e_stopPropagation=q,e.e_stop=se,e.addClass=P,e.contains=b,e.rmClass=y,e.keyNames=fi}$l(Un),ql(Un);var au="iter insert remove copy getEditor constructor".split(" ");for(var La in Dr.prototype)Dr.prototype.hasOwnProperty(La)&&J(au,La)<0&&(Un.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(Dr.prototype[La]));return ie(Dr),Un.inputStyles={textarea:Gn,contenteditable:On},Un.defineMode=function(e){!Un.defaults.mode&&e!="null"&&(Un.defaults.mode=e),et.apply(this,arguments)},Un.defineMIME=tt,Un.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Un.defineMIME("text/plain","null"),Un.defineExtension=function(e,t){Un.prototype[e]=t},Un.defineDocExtension=function(e,t){Dr.prototype[e]=t},Un.fromTextArea=ru,iu(Un),Un.version="5.58.2",Un})},WaYH:function(Le,ye,F){"use strict";var Y=F("rePB"),K=F("Ff2n"),L=F("VTBJ"),H=F("1OyB"),N=F("vuIU"),R=F("JX7q"),j=F("Ji7U"),k=F("LK+K"),A=F("cDcd"),D=F("TSYQ"),g=F.n(D),h=F("sboe"),u=F("OZM5"),d=function(w){var T=w.prefixCls,y=w.level,v=w.isStart,p=w.isEnd;if(!y)return null;for(var c="".concat(T,"-indent-unit"),E=[],_=0;_",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)}]},i={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` -`)}]},o=F("5VLF"),n=F.n(o),f={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},O=function(C,W){return W.map(function(V){return{label:V,kind:C.languages.CompletionItemKind.Keyword,insertText:V}})},S=function(C){return Object.keys(f.tables).map(function(W){return{label:W,kind:C.languages.CompletionItemKind.Variable,insertText:W}})},x=function(C,W){var V=f.tables[C];return V?V.map(function(J){return{label:J,kind:W.languages.CompletionItemKind.Field,insertText:J}}):[]};function w(U,C,W,V,J){var ne=C.getWordUntilPosition(W),fe={startLineNumber:W.lineNumber,endLineNumber:W.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn},ue=V.map(function(le){return{label:le,kind:U.languages.CompletionItemKind.Keyword,insertText:le,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}});return J.map(function(le){ue.push(Object(Y.a)(Object(Y.a)({},le),{},{range:fe}))}),ue}var T=function(U){f.languages.map(function(J){return U.languages.registerDocumentFormattingEditProvider(J,{provideDocumentFormattingEdits:function(fe,ue,le){return Object(g.a)(u.a.mark(function me(){var ge;return u.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ge=n()(fe.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),oe.abrupt("return",[{range:fe.getFullModelRange(),text:ge}]);case 2:case"end":return oe.stop()}},me)}))()}}),J});var C=l.quickKey.map(function(J){return{label:J.label,kind:U.languages.CompletionItemKind.Method,insertText:J.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),W=i.quickKey.map(function(J){return{label:J.label,kind:U.languages.CompletionItemKind.Method,insertText:J.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),V=s.quickKey.map(function(J){return{label:J.label,kind:U.languages.CompletionItemKind.Method,insertText:J.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(D.a)(l.keywords),Object(D.a)(l.quickKey.map(function(J){return J.label}))),provideCompletionItems:function(ne,fe){var ue=ne.getValueInRange({startLineNumber:fe.lineNumber,startColumn:1,endLineNumber:fe.lineNumber,endColumn:fe.column}),le=ue.match(/cu/gim);console.log("match:",le,fe,ue,ne);var me=[],ge=fe.lineNumber,re=fe.column,oe=ne.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:re}),xe=oe.trim().split(/\s+/),Be=xe[xe.length-1];if(Be.endsWith(".")){var Ve=Be.slice(0,Be.length-1);Object.keys(f.tables).includes(Ve)&&(me=Object(D.a)(x(Ve,U)))}else Be==="."?me=[]:me=[].concat(Object(D.a)(S(U)),Object(D.a)(O(U,l.keywords)),Object(D.a)(C));return{suggestions:me}}}),U.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(D.a)(d.keywords)),provideCompletionItems:function(ne,fe){var ue=ne.getValueInRange({startLineNumber:fe.lineNumber,startColumn:1,endLineNumber:fe.lineNumber,endColumn:fe.column}),le=ue.match(/cu/gim);console.log("match:",le,fe,ue,ne);var me=[],ge=fe.lineNumber,re=fe.column,oe=ne.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:re}),xe=oe.trim().split(/\s+/),Be=xe[xe.length-1];if(Be.endsWith(".")){var Ve=Be.slice(0,Be.length-1);Object.keys(f.tables).includes(Ve)&&(me=Object(D.a)(x(Ve,U)))}else Be==="."?me=[]:me=[].concat(Object(D.a)(S(U)),Object(D.a)(O(U,d.keywords)));return{suggestions:me}}}),U.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(D.a)(s.keywords)),provideCompletionItems:function(ne,fe){var ue=[],le=fe.lineNumber,me=fe.column,ge=ne.getValueInRange({startLineNumber:le,startColumn:0,endLineNumber:le,endColumn:me}),re=ge.trim().split(/\s+/),oe=re[re.length-1];if(oe.endsWith(".")){var xe=oe.slice(0,oe.length-1);Object.keys(f.tables).includes(xe)&&(ue=Object(D.a)(x(xe,U)))}else oe==="."?ue=[]:ue=[].concat(Object(D.a)(S(U)),Object(D.a)(O(U,s.keywords)),Object(D.a)(V));return{suggestions:ue}}}),U.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(D.a)(i.keywords)),provideCompletionItems:function(ne,fe){var ue=[],le=fe.lineNumber,me=fe.column,ge=ne.getValueInRange({startLineNumber:le,startColumn:0,endLineNumber:le,endColumn:me}),re=ge.trim().split(/\s+/),oe=re[re.length-1];if(oe.endsWith(".")){var xe=oe.slice(0,oe.length-1);Object.keys(f.tables).includes(xe)&&(ue=Object(D.a)(x(xe,U)))}else oe==="."?ue=[]:ue=[].concat(Object(D.a)(S(U)),Object(D.a)(O(U,i.keywords)),Object(D.a)(W));return{suggestions:ue}}})},y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",v=F("LvDl"),p=F("+ua5");function c(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function E(){}var _=!1,b={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function I(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=U;if(Array.isArray(U)){for(var W=0;W0||vt.target.offsetWidth>0)&&Ee.current.instance.layout()}}catch(cn){Qe.e(cn)}finally{Qe.f()}}),Te.observe(ke.current)),Te}function ce(){L.b.warn(decodeURIComponent(y))}var Se=function(){var Ae=Ee.current.instance;if(ne!=null&&Ae&&q){var Qe=Ae.getModel();Qe&&ne!==Qe.getValue()&&(_=!0,Qe.setValue(ne),Ae.layout(),_=!1)}};Object(j.useEffect)(function(){Ie.current&&clearTimeout(Ie.current),Ie.current=setTimeout(function(){Se()},500)},[ne,q,Ee.current]),Object(j.useEffect)(function(){if(ht&&Ee.current&&Ee.current.instance){var Te=Ee.current.instance;Te.changeViewZones(function(Qe){var Et=document.createElement("div");Et.style.padding="10px 20px",Et.style.width="calc(100% - 20px)",Et.className="my-error-line-wrp",Et.innerHTML=_e,Qe.addZone({afterLineNumber:ht||11,heightInLines:3,domNode:Et})});var Ae={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Te.addOverlayWidget(Ae),Te.revealPositionInCenter({lineNumber:20,column:1})}},[ht,Ee.current,q]);function je(){var Te=Ee.current.instance;if(Te){var Ae=Te.getSelection(),Qe=Ee.current.pastePos||{},Et=new P.Range(Qe.startLineNumber||Ae.endLineNumber,Qe.startColumn||Ae.endColumn,Qe.endLineNumber||Ae.endLineNumber,Qe.endColumn||Ae.endColumn);setTimeout(function(){Te.executeEdits("",[{range:Et,text:""}])},300)}}function Ze(Te){(window.navigator.platform.match("Mac")?Te.metaKey:Te.ctrlKey)&&Te.keyCode==83&&(Te.preventDefault(),$e())}var ut=function(){if(We&&Ee.current.instance){var Ae=Ee.current.instance.getContentHeight();et(Ae0||He.target.offsetWidth>0)&&We.layout()}}catch(ot){Je.e(ot)}finally{Je.f()}}),ze.observe(ge.current)),ze}Object(j.useEffect)(function(){ge.current&&F.e(27).then(F.t.bind(null,"M/lh",7)).then(function(We){P=We;var ze=P.editor.createDiffEditor(ge.current,Object(Y.a)(Object(Y.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},me),{},{wordWrap:!0}));Be(ze);var at=Ve(ze);return function(){ze.dispose();var Je=ze.getModel();Je&&Je.dispose(),at.unobserve(ge.current)}})},[]),Object(j.useEffect)(function(){xe&&xe.setModel({original:P.editor.createModel(ne,ue),modified:P.editor.createModel(fe,ue)})},[ne,fe,ue,xe]);var Ye=c(W),$e=c(J),Ke={width:Ye,height:$e};return k.a.createElement("div",{className:"my-diff-editor",ref:ge,style:Ke})}},ZpRC:function(Le,ye,F){"use strict";function Y(g){return typeof g=="object"&&g!=null&&g.nodeType===1}function K(g,h){return(!h||g!=="hidden")&&g!=="visible"&&g!=="clip"}function L(g,h){if(g.clientHeighth||l>g&&i=h&&o>=u?l-g-d:i>h&&ou?i-h+s:0}var N=function(g,h){var u=window,d=h.scrollMode,s=h.block,l=h.inline,i=h.boundary,o=h.skipOverflowHiddenElements,n=typeof i=="function"?i:function(ze){return ze!==i};if(!Y(g))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,O=[],S=g;Y(S)&&n(S);){if((S=S.parentElement)===f){O.push(S);break}S!=null&&S===document.body&&L(S)&&!L(document.documentElement)||S!=null&&L(S,o)&&O.push(S)}for(var x=u.visualViewport?u.visualViewport.width:innerWidth,w=u.visualViewport?u.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,v=g.getBoundingClientRect(),p=v.height,c=v.width,E=v.top,_=v.right,b=v.bottom,I=v.left,P=s==="start"||s==="nearest"?E:s==="end"?b:E+p/2,B=l==="center"?I+c/2:l==="end"?_:I,z=[],U=0;U=0&&I>=0&&b<=w&&_<=x&&E>=ne&&b<=ue&&I>=le&&_<=fe)return z;var me=getComputedStyle(C),ge=parseInt(me.borderLeftWidth,10),re=parseInt(me.borderTopWidth,10),oe=parseInt(me.borderRightWidth,10),xe=parseInt(me.borderBottomWidth,10),Be=0,Ve=0,Ye="offsetWidth"in C?C.offsetWidth-C.clientWidth-ge-oe:0,$e="offsetHeight"in C?C.offsetHeight-C.clientHeight-re-xe:0;if(f===C)Be=s==="start"?P:s==="end"?P-w:s==="nearest"?H(y,y+w,w,re,xe,y+P,y+P+p,p):P-w/2,Ve=l==="start"?B:l==="center"?B-x/2:l==="end"?B-x:H(T,T+x,x,ge,oe,T+B,T+B+c,c),Be=Math.max(0,Be+y),Ve=Math.max(0,Ve+T);else{Be=s==="start"?P-ne-re:s==="end"?P-ue+xe+$e:s==="nearest"?H(ne,ue,V,re,xe+$e,P,P+p,p):P-(ne+V/2)+$e/2,Ve=l==="start"?B-le-ge:l==="center"?B-(le+J/2)+Ye/2:l==="end"?B-fe+oe+Ye:H(le,fe,J,ge,oe+Ye,B,B+c,c);var Ke=C.scrollLeft,We=C.scrollTop;P+=We-(Be=Math.max(0,Math.min(We+Be,C.scrollHeight-V+$e))),B+=Ke-(Ve=Math.max(0,Math.min(Ke+Ve,C.scrollWidth-J+Ye)))}z.push({el:C,top:Be,left:Ve})}return z};function R(g){return g===Object(g)&&Object.keys(g).length!==0}function j(g,h){h===void 0&&(h="auto");var u="scrollBehavior"in document.body.style;g.forEach(function(d){var s=d.el,l=d.top,i=d.left;s.scroll&&u?s.scroll({top:l,left:i,behavior:h}):(s.scrollTop=l,s.scrollLeft=i)})}function k(g){return g===!1?{block:"end",inline:"nearest"}:R(g)?g:{block:"start",inline:"nearest"}}function A(g,h){var u=!g.ownerDocument.documentElement.contains(g);if(R(h)&&typeof h.behavior=="function")return h.behavior(u?[]:N(g,h));if(u)return;var d=k(h);return j(N(g,d),d.behavior)}var D=ye.a=A},a4uL:function(Le,ye,F){},bCnd:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return H}),F.d(ye,"a",function(){return N});var Y=F("je13"),K=F.n(Y),L=!1;function H(R,j){var k=K.a.get("__ec");k||(k={}),k[R]=j,K.a.set("__ec",k)}function N(R,j){var k=K.a.get("__ec");return k?k[R]===void 0?j:k[R]:j}},bT9E:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return K});var Y=F("VTBJ");function K(L,H){var N=Object(Y.a)({},L);return Array.isArray(H)&&H.forEach(function(R){delete N[R]}),N}},biw7:function(Le,ye,F){"use strict";var Y=F("cDcd"),K=F.n(Y),L=Y.createContext(null);ye.a=L},c5Ni:function(Le,ye,F){},cDPC:function(Le,ye,F){"use strict";var Y=F("tJVT"),K=F("cDcd"),L=F.n(K),H=F("i3hx"),N=F.n(H);ye.a=function(R){var j=R.defaultX,k=j===void 0?"40%":j,A=R.leftChild,D=R.rightChild,g=R.className,h=R.hideResize,u=h===void 0?!1:h,d=Object(K.useState)(k),s=Object(Y.a)(d,2),l=s[0],i=s[1],o=Object(K.useRef)();function n(){o.current=!0}Object(K.useEffect)(function(){function S(w){o.current&&i(w.pageX)}function x(){o.current=!1}return window.addEventListener("mousemove",S),window.addEventListener("mouseup",x),function(){window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",x)}},[]);var f=typeof l=="number"&&l!==.01?"".concat(l,"px"):k,O="calc(100% - ".concat(u?"0px":"4px"," - ").concat(f,")");return L.a.createElement("div",{className:"split-panel-container ".concat(g)},L.a.createElement("section",{style:{width:f,display:l===.01?"none":""}},A),L.a.createElement("section",{className:"resize-x-bar",onMouseDown:n},L.a.createElement("a",{className:"btn-resize"},L.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},L.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),L.a.createElement("section",{style:{width:O}},D))}},dejd:function(Le,ye,F){},dmUQ:function(Le,ye,F){"use strict";var Y=F("Ff2n"),K=F("rePB"),L=F("1OyB"),H=F("vuIU"),N=F("Ji7U"),R=F("md7G"),j=F("foSv"),k=F("cDcd"),A=F.n(k),D=F("TSYQ"),g=F.n(D),h=F("4IlW");function u(p,c){var E=Object.keys(p);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(p);c&&(_=_.filter(function(b){return Object.getOwnPropertyDescriptor(p,b).enumerable})),E.push.apply(E,_)}return E}function d(p){for(var c=1;c1?J-1:0),fe=1;fe1?U-1:0),W=1;W=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},b.getInputDisplayValue=function(B){var z=B||b.state,U=z.focused,C=z.inputValue,W=z.value,V;U?V=C:V=b.toPrecisionAsStep(W),V==null&&(V="");var J=b.formatWrapper(V);return x(b.props.decimalSeparator)&&(J=J.toString().replace(".",b.props.decimalSeparator)),J},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(B){}},b.restoreByAfter=function(B){if(B===void 0)return!1;var z=b.input.value,U=z.lastIndexOf(B);if(U===-1)return!1;var C=b.cursorBefore.length;return b.lastKeyCode===h.a.DELETE&&b.cursorBefore.charAt(C-1)===B[0]?(b.fixCaret(C,C),!0):U+B.length===z.length?(b.fixCaret(U,U),!0):!1},b.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(z,U){var C=B.substring(U);return b.restoreByAfter(C)})},b.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(B,z,U){b.pressingUpOrDown=!0,b.step("down",B,z,U)},b.up=function(B,z,U){b.pressingUpOrDown=!0,b.step("up",B,z,U)},b.saveInput=function(B){b.input=B};var I=_.value;I===void 0&&(I=_.defaultValue),b.state={focused:_.autoFocus};var P=b.getValidValue(b.toNumber(I));return b.state=d(d({},b.state),{},{inputValue:b.toPrecisionAsStep(P),value:P}),b}return Object(H.a)(E,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var I=this.props,P=I.value,B=I.onChange,z=I.max,U=I.min,C=this.state.focused;if(b){if(!w(b.value,P)||!w(b.max,z)||!w(b.min,U)){var W=C?P:this.getValidValue(P),V;this.pressingUpOrDown?V=W:this.inputting?V=this.rawInput:V=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:V})}var J="value"in this.props?P:this.state.value;"max"in this.props&&b.max!==z&&typeof J=="number"&&J>z&&B&&B(z),"min"in this.props&&b.min!==U&&typeof J=="number"&&J1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(b);return isNaN(B)?b:(BP&&(B=P),B)}},{key:"setValue",value:function(b,I){var P=this.props.precision,B=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),z=this.state.value,U=z===void 0?null:z,C=this.state.inputValue,W=C===void 0?null:C,V=typeof B=="number"?B.toFixed(P):"".concat(B),J=B!==U||V!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},I)):this.setState({value:B,inputValue:this.toPrecisionAsStep(b)},I),J&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(b){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,B=P.precision,z=P.step;if(x(B))return B;var U=this.getPrecision(I),C=this.getPrecision(z),W=this.getPrecision(b);return b?Math.max(W,U+C):U+C}},{key:"getPrecisionFactor",value:function(b){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(b,I);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var I=Math.abs(this.getMaxPrecision(b));return isNaN(I)?b.toString():Number(b).toFixed(I)}},{key:"toNumber",value:function(b){var I=this.props.precision,P=this.state.focused,B=b&&b.length>16&&P;return this.isNotCompleteNumber(b)||B?b:x(I)?Math.round(b*Math.pow(10,I))/Math.pow(10,I):Number(b)}},{key:"upStep",value:function(b,I){var P=this.props.step,B=this.getPrecisionFactor(b,I),z=Math.abs(this.getMaxPrecision(b,I)),U=((B*b+B*P*I)/B).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(b,I){var P=this.props.step,B=this.getPrecisionFactor(b,I),z=Math.abs(this.getMaxPrecision(b,I)),U=((B*b-B*P*I)/B).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(b,I){var P=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var U=this.props;if(U.disabled)return;var C=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(C))return;var W=this["".concat(b,"Step")](C,B),V=W>U.max||WU.max?W=U.max:W=ne),Ie=(_t||_t===0)&&(isNaN(_t)||Number(_t)<=fe),pe=Ee||B||z,ae=Ie||B||z,ie=g()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(K.a)({},"".concat(P,"-handler-up-disabled"),pe)),Q=g()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(K.a)({},"".concat(P,"-handler-down-disabled"),ae)),q=U?{onTouchStart:pe?i:this.up,onTouchEnd:this.stop}:{onMouseDown:pe?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},te=U?{onTouchStart:ae?i:this.down,onTouchEnd:this.stop}:{onMouseDown:ae?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return A.a.createElement("div",{className:be,style:ue,title:le,onMouseEnter:me,onMouseLeave:ge,onMouseOver:re,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},A.a.createElement("div",{className:"".concat(P,"-handler-wrap")},A.a.createElement("span",Object.assign({unselectable:"on"},q,{role:"button","aria-label":"Increase Value","aria-disabled":pe,className:ie}),W||A.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:o})),A.a.createElement("span",Object.assign({unselectable:"on"},te,{role:"button","aria-label":"Decrease Value","aria-disabled":ae,className:Q}),V||A.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:o}))),A.a.createElement("div",{className:"".concat(P,"-input-wrap")},A.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":fe,"aria-valuemax":ne,"aria-valuenow":_t,required:xe,type:Ye,placeholder:$e,onPaste:ot,onClick:Be,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:Ve,autoComplete:C,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ne?this.onKeyDown:i,onKeyUp:Ne?this.onKeyUp:i,autoFocus:Xe,maxLength:Je,readOnly:z,disabled:B,max:ne,min:fe,step:at,name:He,title:le,id:Ke,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ke),pattern:ze,inputMode:We,onInput:ft},_e))))}}]),E}(A.a.Component);T.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:n,required:!1,autoComplete:"off"};var y=T,v=ye.a=y},fcSX:function(Le,ye,F){"use strict";var Y=F("Ff2n"),K=F("1OyB"),L=F("vuIU"),H=F("Ji7U"),N=F("md7G"),R=F("foSv"),j=F("1W/9"),k=F("cDcd"),A=F("rePB"),D=F("JX7q"),g=F("TSYQ"),h=F.n(g),u=F("qx4F"),d=F("4IlW");function s(B){return Array.isArray(B)?B:[B]}var l={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(l).filter(function(B){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return B in(z?z.style:{})})[0],o=l[i];function n(B,z,U,C){B.addEventListener?B.addEventListener(z,U,C):B.attachEvent&&B.attachEvent("on".concat(z),U)}function f(B,z,U,C){B.removeEventListener?B.removeEventListener(z,U,C):B.attachEvent&&B.detachEvent("on".concat(z),U)}function O(B,z){var U=typeof B=="function"?B(z):B;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var S=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),w=function B(z,U,C,W){if(!U||U===document||U instanceof Document)return!1;if(U===z.parentNode)return!0;var V=Math.max(Math.abs(C),Math.abs(W))===Math.abs(W),J=Math.max(Math.abs(C),Math.abs(W))===Math.abs(C),ne=U.scrollHeight-U.clientHeight,fe=U.scrollWidth-U.clientWidth,ue=document.defaultView.getComputedStyle(U),le=ue.overflowY==="auto"||ue.overflowY==="scroll",me=ue.overflowX==="auto"||ue.overflowX==="scroll",ge=ne&&le,re=fe&&me;return V&&(!ge||ge&&(U.scrollTop>=ne&&W<0||U.scrollTop<=0&&W>0))||J&&(!re||re&&(U.scrollLeft>=fe&&C<0||U.scrollLeft<=0&&C>0))?B(z,U.parentNode,C,W):!1};function T(B){var z=y();return function(){var C=Object(R.a)(B),W;if(z){var V=Object(R.a)(this).constructor;W=Reflect.construct(C,arguments,V)}else W=C.apply(this,arguments);return Object(N.a)(this,W)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(B){return!1}}var v={},p=function(B){Object(H.a)(U,B);var z=T(U);function U(C){var W;return Object(K.a)(this,U),W=z.call(this,C),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(V){if(V.touches.length>1)return;W.startPos={x:V.touches[0].clientX,y:V.touches[0].clientY}},W.removeMoveHandler=function(V){if(V.changedTouches.length>1)return;var J=V.currentTarget,ne=V.changedTouches[0].clientX-W.startPos.x,fe=V.changedTouches[0].clientY-W.startPos.y;(J===W.maskDom||J===W.handlerDom||J===W.contentDom&&w(J,V.target,ne,fe))&&V.cancelable&&V.preventDefault()},W.transitionEnd=function(V){var J=V.target;f(J,o,W.transitionEnd),J.style.transition=""},W.onKeyDown=function(V){if(V.keyCode===d.a.ESC){var J=W.props.onClose;V.stopPropagation(),J&&J(V)}},W.onWrapperTransitionEnd=function(V){var J=W.props,ne=J.open,fe=J.afterVisibleChange;V.target===W.contentWrapper&&V.propertyName.match(/transform$/)&&(W.dom.style.transition="",!ne&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),fe&&fe(!!ne))},W.openLevelTransition=function(){var V=W.props,J=V.open,ne=V.width,fe=V.height,ue=W.getHorizontalBoolAndPlacementName(),le=ue.isHorizontal,me=ue.placementName,ge=W.contentDom?W.contentDom.getBoundingClientRect()[le?"width":"height"]:0,re=(le?ne:fe)||ge;W.setLevelAndScrolling(J,me,re)},W.setLevelTransform=function(V,J,ne,fe){var ue=W.props,le=ue.placement,me=ue.levelMove,ge=ue.duration,re=ue.ease,oe=ue.showMask;W.levelDom.forEach(function(xe){xe.style.transition="transform ".concat(ge," ").concat(re),n(xe,o,W.transitionEnd);var Be=V?ne:0;if(me){var Ve=O(me,{target:xe,open:V});Be=V?Ve[0]:Ve[1]||0}var Ye=typeof Be=="number"?"".concat(Be,"px"):Be,$e=le==="left"||le==="top"?Ye:"-".concat(Ye);$e=oe&&le==="right"&&fe?"calc(".concat($e," + ").concat(fe,"px)"):$e,xe.style.transform=Be?"".concat(J,"(").concat($e,")"):""})},W.setLevelAndScrolling=function(V,J,ne){var fe=W.props.onChange;if(!x){var ue=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(u.a)(!0):0;W.setLevelTransform(V,J,ne,ue),W.toggleScrollingToDrawerAndBody(ue)}fe&&fe(V)},W.toggleScrollingToDrawerAndBody=function(V){var J=W.props,ne=J.getOpenCount,fe=J.getContainer,ue=J.showMask,le=J.open,me=fe&&fe(),ge=ne&&ne();if(me&&me.parentNode===document.body&&ue){var re=["touchstart"],oe=[document.body,W.maskDom,W.handlerDom,W.contentDom];le&&document.body.style.overflow!=="hidden"?(V&&W.addScrollingEffect(V),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",oe.forEach(function(xe,Be){if(!xe)return;n(xe,re[Be]||"touchmove",Be?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",V&&W.remScrollingEffect(V),oe.forEach(function(xe,Be){if(!xe)return;f(xe,re[Be]||"touchmove",Be?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(V){var J=W.props,ne=J.placement,fe=J.duration,ue=J.ease,le=J.getOpenCount,me=J.switchScrollingEffect,ge=le&&le();ge===1&&me();var re="width ".concat(fe," ").concat(ue),oe="transform ".concat(fe," ").concat(ue);W.dom.style.transition="none";switch(ne){case"right":W.dom.style.transform="translateX(-".concat(V,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(V,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(oe,",").concat(re),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(V){var J=W.props,ne=J.placement,fe=J.duration,ue=J.ease,le=J.getOpenCount,me=J.switchScrollingEffect,ge=le&&le();ge||me(!0),i&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var re,oe="width ".concat(fe," ").concat(ue),xe="transform ".concat(fe," ").concat(ue);switch(ne){case"left":{W.dom.style.width="100%",oe="width 0s ".concat(ue," ").concat(fe);break}case"right":{W.dom.style.transform="translateX(".concat(V,"px)"),W.dom.style.width="100%",oe="width 0s ".concat(ue," ").concat(fe),W.maskDom&&(W.maskDom.style.left="-".concat(V,"px"),W.maskDom.style.width="calc(100% + ".concat(V,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(V,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",re="height 0s ".concat(ue," ").concat(fe);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(xe,",").concat(re?"".concat(re,","):"").concat(oe),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(v).some(function(V){return v[V]})},W.getLevelDom=function(V){var J=V.level,ne=V.getContainer;if(x)return;var fe=ne&&ne(),ue=fe?fe.parentNode:null;if(W.levelDom=[],J==="all"){var le=ue?Array.prototype.slice.call(ue.children):[];le.forEach(function(me){me.nodeName!=="SCRIPT"&&me.nodeName!=="STYLE"&&me.nodeName!=="LINK"&&me!==fe&&W.levelDom.push(me)})}else J&&s(J).forEach(function(me){document.querySelectorAll(me).forEach(function(ge){W.levelDom.push(ge)})})},W.getHorizontalBoolAndPlacementName=function(){var V=W.props.placement,J=V==="left"||V==="right",ne="translate".concat(J?"X":"Y");return{isHorizontal:J,placementName:ne}},W.state={_self:Object(D.a)(W)},W}return Object(L.a)(U,[{key:"componentDidMount",value:function(){var W=this;if(!x){var V=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return V=!0,null}}))}catch(le){}this.passive=V?{passive:!1}:!1}var J=this.props,ne=J.open,fe=J.getContainer,ue=fe&&fe();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ne&&(ue&&ue.parentNode===document.body&&(v[this.drawerId]=ne),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var V=this.props,J=V.open,ne=V.getContainer,fe=ne&&ne();J!==W.open&&(J&&this.domFocus(),fe&&fe.parentNode===document.body&&(v[this.drawerId]=!!J),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,V=W.getOpenCount,J=W.open,ne=W.switchScrollingEffect,fe=typeof V=="function"&&V();delete v[this.drawerId],J&&(this.setLevelTransform(!1),document.body.style.touchAction=""),fe||(document.body.style.overflow="",ne(!0))}},{key:"render",value:function(){var W,V=this,J=this.props,ne=J.className,fe=J.children,ue=J.style,le=J.width,me=J.height,ge=J.defaultOpen,re=J.open,oe=J.prefixCls,xe=J.placement,Be=J.level,Ve=J.levelMove,Ye=J.ease,$e=J.duration,Ke=J.getContainer,We=J.handler,ze=J.onChange,at=J.afterVisibleChange,Je=J.showMask,Xe=J.maskClosable,He=J.maskStyle,ot=J.onClose,ft=J.onHandleClick,dt=J.keyboard,lt=J.getOpenCount,_t=J.switchScrollingEffect,ht=Object(Y.a)(J,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),be=this.dom?re:!1,_e=h()(oe,(W={},Object(A.a)(W,"".concat(oe,"-").concat(xe),!0),Object(A.a)(W,"".concat(oe,"-open"),be),Object(A.a)(W,ne||"",!!ne),Object(A.a)(W,"no-mask",!Je),W)),Ne=this.getHorizontalBoolAndPlacementName(),ke=Ne.placementName,Ee=xe==="left"||xe==="top"?"-100%":"100%",Ie=be?"":"".concat(ke,"(").concat(Ee,")"),pe=We&&k.cloneElement(We,{onClick:function(ie){We.props.onClick&&We.props.onClick(),ft&&ft(ie)},ref:function(ie){V.handlerDom=ie}});return k.createElement("div",Object.assign({},ht,{tabIndex:-1,className:_e,style:ue,ref:function(ie){V.dom=ie},onKeyDown:be&&dt?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),Je&&k.createElement("div",{className:"".concat(oe,"-mask"),onClick:Xe?ot:void 0,style:He,ref:function(ie){V.maskDom=ie}}),k.createElement("div",{className:"".concat(oe,"-content-wrapper"),style:{transform:Ie,msTransform:Ie,width:S(le)?"".concat(le,"px"):le,height:S(me)?"".concat(me,"px"):me},ref:function(ie){V.contentWrapper=ie}},k.createElement("div",{className:"".concat(oe,"-content"),ref:function(ie){V.contentDom=ie},onTouchStart:be&&Je?this.removeStartHandler:void 0,onTouchMove:be&&Je?this.removeMoveHandler:void 0},fe),pe))}}],[{key:"getDerivedStateFromProps",value:function(W,V){var J=V.prevProps,ne=V._self,fe={prevProps:W};if(J!==void 0){var ue=W.placement,le=W.level;ue!==J.placement&&(ne.contentDom=null),le!==J.level&&ne.getLevelDom(W)}return fe}}]),U}(k.Component);p.defaultProps={switchScrollingEffect:function(){}};var c=p;function E(B){var z=_();return function(){var C=Object(R.a)(B),W;if(z){var V=Object(R.a)(this).constructor;W=Reflect.construct(C,arguments,V)}else W=C.apply(this,arguments);return Object(N.a)(this,W)}}function _(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(B){return!1}}var b=function(B){Object(H.a)(U,B);var z=E(U);function U(C){var W;Object(K.a)(this,U),W=z.call(this,C),W.onHandleClick=function(J){var ne=W.props,fe=ne.onHandleClick,ue=ne.open;if(fe&&fe(J),typeof ue=="undefined"){var le=W.state.open;W.setState({open:!le})}},W.onClose=function(J){var ne=W.props,fe=ne.onClose,ue=ne.open;fe&&fe(J),typeof ue=="undefined"&&W.setState({open:!1})};var V=typeof C.open!="undefined"?C.open:!!C.defaultOpen;return W.state={open:V},"onMaskClick"in C&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(L.a)(U,[{key:"render",value:function(){var W=this,V=this.props,J=V.defaultOpen,ne=V.getContainer,fe=V.wrapperClassName,ue=V.forceRender,le=V.handler,me=Object(Y.a)(V,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!ne)return k.createElement("div",{className:fe,ref:function(xe){W.dom=xe}},k.createElement(c,Object.assign({},me,{open:ge,handler:le,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var re=!!le||ue;return k.createElement(j.a,{visible:ge,forceRender:re,getContainer:ne,wrapperClassName:fe},function(oe){var xe=oe.visible,Be=oe.afterClose,Ve=Object(Y.a)(oe,["visible","afterClose"]);return k.createElement(c,Object.assign({},me,Ve,{open:xe!==void 0?xe:ge,afterVisibleChange:Be!==void 0?Be:me.afterVisibleChange,handler:le,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,V){var J=V.prevProps,ne={prevProps:W};return typeof J!="undefined"&&W.open!==J.open&&(ne.open=W.open),ne}}]),U}(k.Component);b.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:k.createElement("div",{className:"drawer-handle"},k.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=b,P=ye.a=I},fcyK:function(Le,ye,F){},fyJ8:function(Le,ye,F){"use strict";var Y=F("rePB"),K=F("VTBJ"),L=F("Ff2n"),H=F("U8pU"),N=F("cDcd"),R=F.n(N),j=F("TSYQ"),k=F.n(j),A=F("c+Xe"),D=F("sR1s");function g(l){return l&&Object(H.a)(l)==="object"&&!Array.isArray(l)&&!N.isValidElement(l)}function h(l){return typeof l=="string"?!0:Object(A.c)(l)}function u(l,i){var o,n=l.prefixCls,f=l.className,O=l.record,S=l.index,x=l.dataIndex,w=l.render,T=l.children,y=l.component,v=y===void 0?"td":y,p=l.colSpan,c=l.rowSpan,E=l.fixLeft,_=l.fixRight,b=l.firstFixLeft,I=l.lastFixLeft,P=l.firstFixRight,B=l.lastFixRight,z=l.appendNode,U=l.additionalProps,C=U===void 0?{}:U,W=l.ellipsis,V=l.align,J=l.rowType,ne=l.isSticky,fe="".concat(n,"-cell"),ue,le;if(T)le=T;else{var me=Object(D.b)(O,x);if(le=me,w){var ge=w(me,O,S);g(ge)?(le=ge.children,ue=ge.props):le=ge}}Object(H.a)(le)==="object"&&!Array.isArray(le)&&!N.isValidElement(le)&&(le=null),W&&(I||P)&&(le=N.createElement("span",{className:"".concat(fe,"-content")},le));var re=ue||{},oe=re.colSpan,xe=re.rowSpan,Be=re.style,Ve=re.className,Ye=Object(L.a)(re,["colSpan","rowSpan","style","className"]),$e=oe!==void 0?oe:p,Ke=xe!==void 0?xe:c;if($e===0||Ke===0)return null;var We={},ze=typeof E=="number",at=typeof _=="number";ze&&(We.position="sticky",We.left=E),at&&(We.position="sticky",We.right=_);var Je={};V&&(Je.textAlign=V);var Xe,He=W===!0?{showTitle:!0}:W;He&&(He.showTitle||J==="header")&&(typeof le=="string"||typeof le=="number"?Xe=le.toString():N.isValidElement(le)&&typeof le.props.children=="string"&&(Xe=le.props.children));var ot=Object(K.a)(Object(K.a)(Object(K.a)({title:Xe},Ye),C),{},{colSpan:$e&&$e!==1?$e:null,rowSpan:Ke&&Ke!==1?Ke:null,className:k()(fe,f,(o={},Object(Y.a)(o,"".concat(fe,"-fix-left"),ze),Object(Y.a)(o,"".concat(fe,"-fix-left-first"),b),Object(Y.a)(o,"".concat(fe,"-fix-left-last"),I),Object(Y.a)(o,"".concat(fe,"-fix-right"),at),Object(Y.a)(o,"".concat(fe,"-fix-right-first"),P),Object(Y.a)(o,"".concat(fe,"-fix-right-last"),B),Object(Y.a)(o,"".concat(fe,"-ellipsis"),W),Object(Y.a)(o,"".concat(fe,"-with-append"),z),Object(Y.a)(o,"".concat(fe,"-fix-sticky"),(ze||at)&&ne),o),C.className,Ve),style:Object(K.a)(Object(K.a)(Object(K.a)(Object(K.a)({},C.style),Je),We),Be),ref:h(v)?i:null});return N.createElement(v,Object.assign({},ot),z,le)}var d=N.forwardRef(u);d.displayName="Cell";var s=N.memo(d,function(l,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,l.record):!1});ye.a=s},gRFJ:function(Le,ye,F){Le.exports=[F("rdUC"),F("ynwM"),F("RELg"),F("DlR+"),F("CrYA"),F("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(Le){return Le<10?"0"+Le:Le}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Le){return rx_escapable.lastIndex=0,rx_escapable.test(Le)?'"'+Le.replace(rx_escapable,function(ye){var F=meta[ye];return typeof F=="string"?F:"\\u"+("0000"+ye.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Le+'"'}function str(Le,ye){var F,Y,K,L,H=gap,N,R=ye[Le];R&&typeof R=="object"&&typeof R.toJSON=="function"&&(R=R.toJSON(Le)),typeof rep=="function"&&(R=rep.call(ye,Le,R));switch(typeof R){case"string":return quote(R);case"number":return isFinite(R)?String(R):"null";case"boolean":case"null":return String(R);case"object":if(!R)return"null";if(gap+=indent,N=[],Object.prototype.toString.apply(R)==="[object Array]"){for(L=R.length,F=0;F0&&arguments[0]!==void 0?arguments[0]:[],C=U;if(Array.isArray(U)){for(var W=0;W0||vt.target.offsetWidth>0)&&Ee.current.instance.layout()}}catch(cn){Qe.e(cn)}finally{Qe.f()}}),Te.observe(ke.current)),Te}function ce(){L.b.warn(decodeURIComponent(y))}var Se=function(){var Ae=Ee.current.instance;if(ne!=null&&Ae&&q){var Qe=Ae.getModel();Qe&&ne!==Qe.getValue()&&(_=!0,Qe.setValue(ne),Ae.layout(),_=!1)}};Object(j.useEffect)(function(){Ie.current&&clearTimeout(Ie.current),Ie.current=setTimeout(function(){Se()},500)},[ne,q,Ee.current]),Object(j.useEffect)(function(){if(pt&&Ee.current&&Ee.current.instance){var Te=Ee.current.instance;Te.changeViewZones(function(Qe){var Et=document.createElement("div");Et.style.padding="10px 20px",Et.style.width="calc(100% - 20px)",Et.className="my-error-line-wrp",Et.innerHTML=_e,Qe.addZone({afterLineNumber:pt||11,heightInLines:3,domNode:Et})});var Ae={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Te.addOverlayWidget(Ae),Te.revealPositionInCenter({lineNumber:20,column:1})}},[pt,Ee.current,q]);function je(){var Te=Ee.current.instance;if(Te){var Ae=Te.getSelection(),Qe=Ee.current.pastePos||{},Et=new P.Range(Qe.startLineNumber||Ae.endLineNumber,Qe.startColumn||Ae.endColumn,Qe.endLineNumber||Ae.endLineNumber,Qe.endColumn||Ae.endColumn);setTimeout(function(){Te.executeEdits("",[{range:Et,text:""}])},300)}}function Ze(Te){(window.navigator.platform.match("Mac")?Te.metaKey:Te.ctrlKey)&&Te.keyCode==83&&(Te.preventDefault(),$e())}var ut=function(){if(We&&Ee.current.instance){var Ae=Ee.current.instance.getContentHeight();et(Ae0||He.target.offsetWidth>0)&&We.layout()}}catch(ot){Je.e(ot)}finally{Je.f()}}),ze.observe(ge.current)),ze}Object(j.useEffect)(function(){ge.current&&F.e(27).then(F.t.bind(null,"M/lh",7)).then(function(We){P=We;var ze=P.editor.createDiffEditor(ge.current,Object(Y.a)(Object(Y.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},me),{},{wordWrap:!0}));Be(ze);var at=Ve(ze);return function(){ze.dispose();var Je=ze.getModel();Je&&Je.dispose(),at.unobserve(ge.current)}})},[]),Object(j.useEffect)(function(){xe&&xe.setModel({original:P.editor.createModel(ne,ue),modified:P.editor.createModel(fe,ue)})},[ne,fe,ue,xe]);var Ye=c(W),$e=c(J),Ke={width:Ye,height:$e};return k.a.createElement("div",{className:"my-diff-editor",ref:ge,style:Ke})}},ZpRC:function(Le,ye,F){"use strict";function Y(g){return typeof g=="object"&&g!=null&&g.nodeType===1}function K(g,h){return(!h||g!=="hidden")&&g!=="visible"&&g!=="clip"}function L(g,h){if(g.clientHeighth||l>g&&i=h&&o>=u?l-g-d:i>h&&ou?i-h+s:0}var N=function(g,h){var u=window,d=h.scrollMode,s=h.block,l=h.inline,i=h.boundary,o=h.skipOverflowHiddenElements,n=typeof i=="function"?i:function(ze){return ze!==i};if(!Y(g))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,O=[],S=g;Y(S)&&n(S);){if((S=S.parentElement)===f){O.push(S);break}S!=null&&S===document.body&&L(S)&&!L(document.documentElement)||S!=null&&L(S,o)&&O.push(S)}for(var x=u.visualViewport?u.visualViewport.width:innerWidth,w=u.visualViewport?u.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,v=g.getBoundingClientRect(),p=v.height,c=v.width,E=v.top,_=v.right,b=v.bottom,I=v.left,P=s==="start"||s==="nearest"?E:s==="end"?b:E+p/2,B=l==="center"?I+c/2:l==="end"?_:I,z=[],U=0;U=0&&I>=0&&b<=w&&_<=x&&E>=ne&&b<=ue&&I>=le&&_<=fe)return z;var me=getComputedStyle(C),ge=parseInt(me.borderLeftWidth,10),re=parseInt(me.borderTopWidth,10),oe=parseInt(me.borderRightWidth,10),xe=parseInt(me.borderBottomWidth,10),Be=0,Ve=0,Ye="offsetWidth"in C?C.offsetWidth-C.clientWidth-ge-oe:0,$e="offsetHeight"in C?C.offsetHeight-C.clientHeight-re-xe:0;if(f===C)Be=s==="start"?P:s==="end"?P-w:s==="nearest"?H(y,y+w,w,re,xe,y+P,y+P+p,p):P-w/2,Ve=l==="start"?B:l==="center"?B-x/2:l==="end"?B-x:H(T,T+x,x,ge,oe,T+B,T+B+c,c),Be=Math.max(0,Be+y),Ve=Math.max(0,Ve+T);else{Be=s==="start"?P-ne-re:s==="end"?P-ue+xe+$e:s==="nearest"?H(ne,ue,V,re,xe+$e,P,P+p,p):P-(ne+V/2)+$e/2,Ve=l==="start"?B-le-ge:l==="center"?B-(le+J/2)+Ye/2:l==="end"?B-fe+oe+Ye:H(le,fe,J,ge,oe+Ye,B,B+c,c);var Ke=C.scrollLeft,We=C.scrollTop;P+=We-(Be=Math.max(0,Math.min(We+Be,C.scrollHeight-V+$e))),B+=Ke-(Ve=Math.max(0,Math.min(Ke+Ve,C.scrollWidth-J+Ye)))}z.push({el:C,top:Be,left:Ve})}return z};function R(g){return g===Object(g)&&Object.keys(g).length!==0}function j(g,h){h===void 0&&(h="auto");var u="scrollBehavior"in document.body.style;g.forEach(function(d){var s=d.el,l=d.top,i=d.left;s.scroll&&u?s.scroll({top:l,left:i,behavior:h}):(s.scrollTop=l,s.scrollLeft=i)})}function k(g){return g===!1?{block:"end",inline:"nearest"}:R(g)?g:{block:"start",inline:"nearest"}}function A(g,h){var u=!g.ownerDocument.documentElement.contains(g);if(R(h)&&typeof h.behavior=="function")return h.behavior(u?[]:N(g,h));if(u)return;var d=k(h);return j(N(g,d),d.behavior)}var D=ye.a=A},a4uL:function(Le,ye,F){},bCnd:function(Le,ye,F){"use strict";F.d(ye,"b",function(){return H}),F.d(ye,"a",function(){return N});var Y=F("je13"),K=F.n(Y),L=!1;function H(R,j){var k=K.a.get("__ec");k||(k={}),k[R]=j,K.a.set("__ec",k)}function N(R,j){var k=K.a.get("__ec");return k?k[R]===void 0?j:k[R]:j}},bT9E:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return K});var Y=F("VTBJ");function K(L,H){var N=Object(Y.a)({},L);return Array.isArray(H)&&H.forEach(function(R){delete N[R]}),N}},biw7:function(Le,ye,F){"use strict";var Y=F("cDcd"),K=F.n(Y),L=Y.createContext(null);ye.a=L},c5Ni:function(Le,ye,F){},cDPC:function(Le,ye,F){"use strict";var Y=F("tJVT"),K=F("cDcd"),L=F.n(K),H=F("i3hx"),N=F.n(H);ye.a=function(R){var j=R.defaultX,k=j===void 0?"40%":j,A=R.leftChild,D=R.rightChild,g=R.className,h=R.hideResize,u=h===void 0?!1:h,d=Object(K.useState)(k),s=Object(Y.a)(d,2),l=s[0],i=s[1],o=Object(K.useRef)();function n(){o.current=!0}Object(K.useEffect)(function(){function S(w){o.current&&i(w.pageX)}function x(){o.current=!1}return window.addEventListener("mousemove",S),window.addEventListener("mouseup",x),function(){window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",x)}},[]);var f=typeof l=="number"&&l!==.01?"".concat(l,"px"):k,O="calc(100% - ".concat(u?"0px":"4px"," - ").concat(f,")");return L.a.createElement("div",{className:"split-panel-container ".concat(g)},L.a.createElement("section",{style:{width:f,display:l===.01?"none":""}},A),L.a.createElement("section",{className:"resize-x-bar",onMouseDown:n},L.a.createElement("a",{className:"btn-resize"},L.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},L.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),L.a.createElement("section",{style:{width:O}},D))}},dejd:function(Le,ye,F){},dmUQ:function(Le,ye,F){"use strict";var Y=F("Ff2n"),K=F("rePB"),L=F("1OyB"),H=F("vuIU"),N=F("Ji7U"),R=F("md7G"),j=F("foSv"),k=F("cDcd"),A=F.n(k),D=F("TSYQ"),g=F.n(D),h=F("4IlW");function u(p,c){var E=Object.keys(p);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(p);c&&(_=_.filter(function(b){return Object.getOwnPropertyDescriptor(p,b).enumerable})),E.push.apply(E,_)}return E}function d(p){for(var c=1;c1?J-1:0),fe=1;fe1?U-1:0),W=1;W=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},b.getInputDisplayValue=function(B){var z=B||b.state,U=z.focused,C=z.inputValue,W=z.value,V;U?V=C:V=b.toPrecisionAsStep(W),V==null&&(V="");var J=b.formatWrapper(V);return x(b.props.decimalSeparator)&&(J=J.toString().replace(".",b.props.decimalSeparator)),J},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(B){}},b.restoreByAfter=function(B){if(B===void 0)return!1;var z=b.input.value,U=z.lastIndexOf(B);if(U===-1)return!1;var C=b.cursorBefore.length;return b.lastKeyCode===h.a.DELETE&&b.cursorBefore.charAt(C-1)===B[0]?(b.fixCaret(C,C),!0):U+B.length===z.length?(b.fixCaret(U,U),!0):!1},b.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(z,U){var C=B.substring(U);return b.restoreByAfter(C)})},b.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(B,z,U){b.pressingUpOrDown=!0,b.step("down",B,z,U)},b.up=function(B,z,U){b.pressingUpOrDown=!0,b.step("up",B,z,U)},b.saveInput=function(B){b.input=B};var I=_.value;I===void 0&&(I=_.defaultValue),b.state={focused:_.autoFocus};var P=b.getValidValue(b.toNumber(I));return b.state=d(d({},b.state),{},{inputValue:b.toPrecisionAsStep(P),value:P}),b}return Object(H.a)(E,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var I=this.props,P=I.value,B=I.onChange,z=I.max,U=I.min,C=this.state.focused;if(b){if(!w(b.value,P)||!w(b.max,z)||!w(b.min,U)){var W=C?P:this.getValidValue(P),V;this.pressingUpOrDown?V=W:this.inputting?V=this.rawInput:V=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:V})}var J="value"in this.props?P:this.state.value;"max"in this.props&&b.max!==z&&typeof J=="number"&&J>z&&B&&B(z),"min"in this.props&&b.min!==U&&typeof J=="number"&&J1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(b);return isNaN(B)?b:(BP&&(B=P),B)}},{key:"setValue",value:function(b,I){var P=this.props.precision,B=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),z=this.state.value,U=z===void 0?null:z,C=this.state.inputValue,W=C===void 0?null:C,V=typeof B=="number"?B.toFixed(P):"".concat(B),J=B!==U||V!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},I)):this.setState({value:B,inputValue:this.toPrecisionAsStep(b)},I),J&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(b){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,B=P.precision,z=P.step;if(x(B))return B;var U=this.getPrecision(I),C=this.getPrecision(z),W=this.getPrecision(b);return b?Math.max(W,U+C):U+C}},{key:"getPrecisionFactor",value:function(b){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(b,I);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var I=Math.abs(this.getMaxPrecision(b));return isNaN(I)?b.toString():Number(b).toFixed(I)}},{key:"toNumber",value:function(b){var I=this.props.precision,P=this.state.focused,B=b&&b.length>16&&P;return this.isNotCompleteNumber(b)||B?b:x(I)?Math.round(b*Math.pow(10,I))/Math.pow(10,I):Number(b)}},{key:"upStep",value:function(b,I){var P=this.props.step,B=this.getPrecisionFactor(b,I),z=Math.abs(this.getMaxPrecision(b,I)),U=((B*b+B*P*I)/B).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(b,I){var P=this.props.step,B=this.getPrecisionFactor(b,I),z=Math.abs(this.getMaxPrecision(b,I)),U=((B*b-B*P*I)/B).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(b,I){var P=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var U=this.props;if(U.disabled)return;var C=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(C))return;var W=this["".concat(b,"Step")](C,B),V=W>U.max||WU.max?W=U.max:W=ne),Ie=(yt||yt===0)&&(isNaN(yt)||Number(yt)<=fe),pe=Ee||B||z,ae=Ie||B||z,ie=g()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(K.a)({},"".concat(P,"-handler-up-disabled"),pe)),Q=g()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(K.a)({},"".concat(P,"-handler-down-disabled"),ae)),q=U?{onTouchStart:pe?i:this.up,onTouchEnd:this.stop}:{onMouseDown:pe?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},te=U?{onTouchStart:ae?i:this.down,onTouchEnd:this.stop}:{onMouseDown:ae?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return A.a.createElement("div",{className:be,style:ue,title:le,onMouseEnter:me,onMouseLeave:ge,onMouseOver:re,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},A.a.createElement("div",{className:"".concat(P,"-handler-wrap")},A.a.createElement("span",Object.assign({unselectable:"on"},q,{role:"button","aria-label":"Increase Value","aria-disabled":pe,className:ie}),W||A.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:o})),A.a.createElement("span",Object.assign({unselectable:"on"},te,{role:"button","aria-label":"Decrease Value","aria-disabled":ae,className:Q}),V||A.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:o}))),A.a.createElement("div",{className:"".concat(P,"-input-wrap")},A.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":fe,"aria-valuemax":ne,"aria-valuenow":yt,required:xe,type:Ye,placeholder:$e,onPaste:ot,onClick:Be,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:Ve,autoComplete:C,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ne?this.onKeyDown:i,onKeyUp:Ne?this.onKeyUp:i,autoFocus:Xe,maxLength:Je,readOnly:z,disabled:B,max:ne,min:fe,step:at,name:He,title:le,id:Ke,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ke),pattern:ze,inputMode:We,onInput:ft},_e))))}}]),E}(A.a.Component);T.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:n,required:!1,autoComplete:"off"};var y=T,v=ye.a=y},fcSX:function(Le,ye,F){"use strict";var Y=F("Ff2n"),K=F("1OyB"),L=F("vuIU"),H=F("Ji7U"),N=F("md7G"),R=F("foSv"),j=F("1W/9"),k=F("cDcd"),A=F("rePB"),D=F("JX7q"),g=F("TSYQ"),h=F.n(g),u=F("qx4F"),d=F("4IlW");function s(B){return Array.isArray(B)?B:[B]}var l={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(l).filter(function(B){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return B in(z?z.style:{})})[0],o=l[i];function n(B,z,U,C){B.addEventListener?B.addEventListener(z,U,C):B.attachEvent&&B.attachEvent("on".concat(z),U)}function f(B,z,U,C){B.removeEventListener?B.removeEventListener(z,U,C):B.attachEvent&&B.detachEvent("on".concat(z),U)}function O(B,z){var U=typeof B=="function"?B(z):B;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var S=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),w=function B(z,U,C,W){if(!U||U===document||U instanceof Document)return!1;if(U===z.parentNode)return!0;var V=Math.max(Math.abs(C),Math.abs(W))===Math.abs(W),J=Math.max(Math.abs(C),Math.abs(W))===Math.abs(C),ne=U.scrollHeight-U.clientHeight,fe=U.scrollWidth-U.clientWidth,ue=document.defaultView.getComputedStyle(U),le=ue.overflowY==="auto"||ue.overflowY==="scroll",me=ue.overflowX==="auto"||ue.overflowX==="scroll",ge=ne&&le,re=fe&&me;return V&&(!ge||ge&&(U.scrollTop>=ne&&W<0||U.scrollTop<=0&&W>0))||J&&(!re||re&&(U.scrollLeft>=fe&&C<0||U.scrollLeft<=0&&C>0))?B(z,U.parentNode,C,W):!1};function T(B){var z=y();return function(){var C=Object(R.a)(B),W;if(z){var V=Object(R.a)(this).constructor;W=Reflect.construct(C,arguments,V)}else W=C.apply(this,arguments);return Object(N.a)(this,W)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(B){return!1}}var v={},p=function(B){Object(H.a)(U,B);var z=T(U);function U(C){var W;return Object(K.a)(this,U),W=z.call(this,C),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(V){if(V.touches.length>1)return;W.startPos={x:V.touches[0].clientX,y:V.touches[0].clientY}},W.removeMoveHandler=function(V){if(V.changedTouches.length>1)return;var J=V.currentTarget,ne=V.changedTouches[0].clientX-W.startPos.x,fe=V.changedTouches[0].clientY-W.startPos.y;(J===W.maskDom||J===W.handlerDom||J===W.contentDom&&w(J,V.target,ne,fe))&&V.cancelable&&V.preventDefault()},W.transitionEnd=function(V){var J=V.target;f(J,o,W.transitionEnd),J.style.transition=""},W.onKeyDown=function(V){if(V.keyCode===d.a.ESC){var J=W.props.onClose;V.stopPropagation(),J&&J(V)}},W.onWrapperTransitionEnd=function(V){var J=W.props,ne=J.open,fe=J.afterVisibleChange;V.target===W.contentWrapper&&V.propertyName.match(/transform$/)&&(W.dom.style.transition="",!ne&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),fe&&fe(!!ne))},W.openLevelTransition=function(){var V=W.props,J=V.open,ne=V.width,fe=V.height,ue=W.getHorizontalBoolAndPlacementName(),le=ue.isHorizontal,me=ue.placementName,ge=W.contentDom?W.contentDom.getBoundingClientRect()[le?"width":"height"]:0,re=(le?ne:fe)||ge;W.setLevelAndScrolling(J,me,re)},W.setLevelTransform=function(V,J,ne,fe){var ue=W.props,le=ue.placement,me=ue.levelMove,ge=ue.duration,re=ue.ease,oe=ue.showMask;W.levelDom.forEach(function(xe){xe.style.transition="transform ".concat(ge," ").concat(re),n(xe,o,W.transitionEnd);var Be=V?ne:0;if(me){var Ve=O(me,{target:xe,open:V});Be=V?Ve[0]:Ve[1]||0}var Ye=typeof Be=="number"?"".concat(Be,"px"):Be,$e=le==="left"||le==="top"?Ye:"-".concat(Ye);$e=oe&&le==="right"&&fe?"calc(".concat($e," + ").concat(fe,"px)"):$e,xe.style.transform=Be?"".concat(J,"(").concat($e,")"):""})},W.setLevelAndScrolling=function(V,J,ne){var fe=W.props.onChange;if(!x){var ue=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(u.a)(!0):0;W.setLevelTransform(V,J,ne,ue),W.toggleScrollingToDrawerAndBody(ue)}fe&&fe(V)},W.toggleScrollingToDrawerAndBody=function(V){var J=W.props,ne=J.getOpenCount,fe=J.getContainer,ue=J.showMask,le=J.open,me=fe&&fe(),ge=ne&&ne();if(me&&me.parentNode===document.body&&ue){var re=["touchstart"],oe=[document.body,W.maskDom,W.handlerDom,W.contentDom];le&&document.body.style.overflow!=="hidden"?(V&&W.addScrollingEffect(V),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",oe.forEach(function(xe,Be){if(!xe)return;n(xe,re[Be]||"touchmove",Be?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",V&&W.remScrollingEffect(V),oe.forEach(function(xe,Be){if(!xe)return;f(xe,re[Be]||"touchmove",Be?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(V){var J=W.props,ne=J.placement,fe=J.duration,ue=J.ease,le=J.getOpenCount,me=J.switchScrollingEffect,ge=le&&le();ge===1&&me();var re="width ".concat(fe," ").concat(ue),oe="transform ".concat(fe," ").concat(ue);W.dom.style.transition="none";switch(ne){case"right":W.dom.style.transform="translateX(-".concat(V,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(V,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(oe,",").concat(re),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(V){var J=W.props,ne=J.placement,fe=J.duration,ue=J.ease,le=J.getOpenCount,me=J.switchScrollingEffect,ge=le&&le();ge||me(!0),i&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var re,oe="width ".concat(fe," ").concat(ue),xe="transform ".concat(fe," ").concat(ue);switch(ne){case"left":{W.dom.style.width="100%",oe="width 0s ".concat(ue," ").concat(fe);break}case"right":{W.dom.style.transform="translateX(".concat(V,"px)"),W.dom.style.width="100%",oe="width 0s ".concat(ue," ").concat(fe),W.maskDom&&(W.maskDom.style.left="-".concat(V,"px"),W.maskDom.style.width="calc(100% + ".concat(V,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(V,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",re="height 0s ".concat(ue," ").concat(fe);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(xe,",").concat(re?"".concat(re,","):"").concat(oe),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(v).some(function(V){return v[V]})},W.getLevelDom=function(V){var J=V.level,ne=V.getContainer;if(x)return;var fe=ne&&ne(),ue=fe?fe.parentNode:null;if(W.levelDom=[],J==="all"){var le=ue?Array.prototype.slice.call(ue.children):[];le.forEach(function(me){me.nodeName!=="SCRIPT"&&me.nodeName!=="STYLE"&&me.nodeName!=="LINK"&&me!==fe&&W.levelDom.push(me)})}else J&&s(J).forEach(function(me){document.querySelectorAll(me).forEach(function(ge){W.levelDom.push(ge)})})},W.getHorizontalBoolAndPlacementName=function(){var V=W.props.placement,J=V==="left"||V==="right",ne="translate".concat(J?"X":"Y");return{isHorizontal:J,placementName:ne}},W.state={_self:Object(D.a)(W)},W}return Object(L.a)(U,[{key:"componentDidMount",value:function(){var W=this;if(!x){var V=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return V=!0,null}}))}catch(le){}this.passive=V?{passive:!1}:!1}var J=this.props,ne=J.open,fe=J.getContainer,ue=fe&&fe();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ne&&(ue&&ue.parentNode===document.body&&(v[this.drawerId]=ne),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var V=this.props,J=V.open,ne=V.getContainer,fe=ne&&ne();J!==W.open&&(J&&this.domFocus(),fe&&fe.parentNode===document.body&&(v[this.drawerId]=!!J),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,V=W.getOpenCount,J=W.open,ne=W.switchScrollingEffect,fe=typeof V=="function"&&V();delete v[this.drawerId],J&&(this.setLevelTransform(!1),document.body.style.touchAction=""),fe||(document.body.style.overflow="",ne(!0))}},{key:"render",value:function(){var W,V=this,J=this.props,ne=J.className,fe=J.children,ue=J.style,le=J.width,me=J.height,ge=J.defaultOpen,re=J.open,oe=J.prefixCls,xe=J.placement,Be=J.level,Ve=J.levelMove,Ye=J.ease,$e=J.duration,Ke=J.getContainer,We=J.handler,ze=J.onChange,at=J.afterVisibleChange,Je=J.showMask,Xe=J.maskClosable,He=J.maskStyle,ot=J.onClose,ft=J.onHandleClick,dt=J.keyboard,lt=J.getOpenCount,yt=J.switchScrollingEffect,pt=Object(Y.a)(J,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),be=this.dom?re:!1,_e=h()(oe,(W={},Object(A.a)(W,"".concat(oe,"-").concat(xe),!0),Object(A.a)(W,"".concat(oe,"-open"),be),Object(A.a)(W,ne||"",!!ne),Object(A.a)(W,"no-mask",!Je),W)),Ne=this.getHorizontalBoolAndPlacementName(),ke=Ne.placementName,Ee=xe==="left"||xe==="top"?"-100%":"100%",Ie=be?"":"".concat(ke,"(").concat(Ee,")"),pe=We&&k.cloneElement(We,{onClick:function(ie){We.props.onClick&&We.props.onClick(),ft&&ft(ie)},ref:function(ie){V.handlerDom=ie}});return k.createElement("div",Object.assign({},pt,{tabIndex:-1,className:_e,style:ue,ref:function(ie){V.dom=ie},onKeyDown:be&&dt?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),Je&&k.createElement("div",{className:"".concat(oe,"-mask"),onClick:Xe?ot:void 0,style:He,ref:function(ie){V.maskDom=ie}}),k.createElement("div",{className:"".concat(oe,"-content-wrapper"),style:{transform:Ie,msTransform:Ie,width:S(le)?"".concat(le,"px"):le,height:S(me)?"".concat(me,"px"):me},ref:function(ie){V.contentWrapper=ie}},k.createElement("div",{className:"".concat(oe,"-content"),ref:function(ie){V.contentDom=ie},onTouchStart:be&&Je?this.removeStartHandler:void 0,onTouchMove:be&&Je?this.removeMoveHandler:void 0},fe),pe))}}],[{key:"getDerivedStateFromProps",value:function(W,V){var J=V.prevProps,ne=V._self,fe={prevProps:W};if(J!==void 0){var ue=W.placement,le=W.level;ue!==J.placement&&(ne.contentDom=null),le!==J.level&&ne.getLevelDom(W)}return fe}}]),U}(k.Component);p.defaultProps={switchScrollingEffect:function(){}};var c=p;function E(B){var z=_();return function(){var C=Object(R.a)(B),W;if(z){var V=Object(R.a)(this).constructor;W=Reflect.construct(C,arguments,V)}else W=C.apply(this,arguments);return Object(N.a)(this,W)}}function _(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(B){return!1}}var b=function(B){Object(H.a)(U,B);var z=E(U);function U(C){var W;Object(K.a)(this,U),W=z.call(this,C),W.onHandleClick=function(J){var ne=W.props,fe=ne.onHandleClick,ue=ne.open;if(fe&&fe(J),typeof ue=="undefined"){var le=W.state.open;W.setState({open:!le})}},W.onClose=function(J){var ne=W.props,fe=ne.onClose,ue=ne.open;fe&&fe(J),typeof ue=="undefined"&&W.setState({open:!1})};var V=typeof C.open!="undefined"?C.open:!!C.defaultOpen;return W.state={open:V},"onMaskClick"in C&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(L.a)(U,[{key:"render",value:function(){var W=this,V=this.props,J=V.defaultOpen,ne=V.getContainer,fe=V.wrapperClassName,ue=V.forceRender,le=V.handler,me=Object(Y.a)(V,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!ne)return k.createElement("div",{className:fe,ref:function(xe){W.dom=xe}},k.createElement(c,Object.assign({},me,{open:ge,handler:le,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var re=!!le||ue;return k.createElement(j.a,{visible:ge,forceRender:re,getContainer:ne,wrapperClassName:fe},function(oe){var xe=oe.visible,Be=oe.afterClose,Ve=Object(Y.a)(oe,["visible","afterClose"]);return k.createElement(c,Object.assign({},me,Ve,{open:xe!==void 0?xe:ge,afterVisibleChange:Be!==void 0?Be:me.afterVisibleChange,handler:le,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,V){var J=V.prevProps,ne={prevProps:W};return typeof J!="undefined"&&W.open!==J.open&&(ne.open=W.open),ne}}]),U}(k.Component);b.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:k.createElement("div",{className:"drawer-handle"},k.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=b,P=ye.a=I},fcyK:function(Le,ye,F){},fyJ8:function(Le,ye,F){"use strict";var Y=F("rePB"),K=F("VTBJ"),L=F("Ff2n"),H=F("U8pU"),N=F("cDcd"),R=F.n(N),j=F("TSYQ"),k=F.n(j),A=F("c+Xe"),D=F("sR1s");function g(l){return l&&Object(H.a)(l)==="object"&&!Array.isArray(l)&&!N.isValidElement(l)}function h(l){return typeof l=="string"?!0:Object(A.c)(l)}function u(l,i){var o,n=l.prefixCls,f=l.className,O=l.record,S=l.index,x=l.dataIndex,w=l.render,T=l.children,y=l.component,v=y===void 0?"td":y,p=l.colSpan,c=l.rowSpan,E=l.fixLeft,_=l.fixRight,b=l.firstFixLeft,I=l.lastFixLeft,P=l.firstFixRight,B=l.lastFixRight,z=l.appendNode,U=l.additionalProps,C=U===void 0?{}:U,W=l.ellipsis,V=l.align,J=l.rowType,ne=l.isSticky,fe="".concat(n,"-cell"),ue,le;if(T)le=T;else{var me=Object(D.b)(O,x);if(le=me,w){var ge=w(me,O,S);g(ge)?(le=ge.children,ue=ge.props):le=ge}}Object(H.a)(le)==="object"&&!Array.isArray(le)&&!N.isValidElement(le)&&(le=null),W&&(I||P)&&(le=N.createElement("span",{className:"".concat(fe,"-content")},le));var re=ue||{},oe=re.colSpan,xe=re.rowSpan,Be=re.style,Ve=re.className,Ye=Object(L.a)(re,["colSpan","rowSpan","style","className"]),$e=oe!==void 0?oe:p,Ke=xe!==void 0?xe:c;if($e===0||Ke===0)return null;var We={},ze=typeof E=="number",at=typeof _=="number";ze&&(We.position="sticky",We.left=E),at&&(We.position="sticky",We.right=_);var Je={};V&&(Je.textAlign=V);var Xe,He=W===!0?{showTitle:!0}:W;He&&(He.showTitle||J==="header")&&(typeof le=="string"||typeof le=="number"?Xe=le.toString():N.isValidElement(le)&&typeof le.props.children=="string"&&(Xe=le.props.children));var ot=Object(K.a)(Object(K.a)(Object(K.a)({title:Xe},Ye),C),{},{colSpan:$e&&$e!==1?$e:null,rowSpan:Ke&&Ke!==1?Ke:null,className:k()(fe,f,(o={},Object(Y.a)(o,"".concat(fe,"-fix-left"),ze),Object(Y.a)(o,"".concat(fe,"-fix-left-first"),b),Object(Y.a)(o,"".concat(fe,"-fix-left-last"),I),Object(Y.a)(o,"".concat(fe,"-fix-right"),at),Object(Y.a)(o,"".concat(fe,"-fix-right-first"),P),Object(Y.a)(o,"".concat(fe,"-fix-right-last"),B),Object(Y.a)(o,"".concat(fe,"-ellipsis"),W),Object(Y.a)(o,"".concat(fe,"-with-append"),z),Object(Y.a)(o,"".concat(fe,"-fix-sticky"),(ze||at)&&ne),o),C.className,Ve),style:Object(K.a)(Object(K.a)(Object(K.a)(Object(K.a)({},C.style),Je),We),Be),ref:h(v)?i:null});return N.createElement(v,Object.assign({},ot),z,le)}var d=N.forwardRef(u);d.displayName="Cell";var s=N.memo(d,function(l,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,l.record):!1});ye.a=s},gRFJ:function(Le,ye,F){Le.exports=[F("rdUC"),F("ynwM"),F("RELg"),F("DlR+"),F("CrYA"),F("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(Le){return Le<10?"0"+Le:Le}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Le){return rx_escapable.lastIndex=0,rx_escapable.test(Le)?'"'+Le.replace(rx_escapable,function(ye){var F=meta[ye];return typeof F=="string"?F:"\\u"+("0000"+ye.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Le+'"'}function str(Le,ye){var F,Y,K,L,H=gap,N,R=ye[Le];R&&typeof R=="object"&&typeof R.toJSON=="function"&&(R=R.toJSON(Le)),typeof rep=="function"&&(R=rep.call(ye,Le,R));switch(typeof R){case"string":return quote(R);case"number":return isFinite(R)?String(R):"null";case"boolean":case"null":return String(R);case"object":if(!R)return"null";if(gap+=indent,N=[],Object.prototype.toString.apply(R)==="[object Array]"){for(L=R.length,F=0;F=o&&this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),E.executeEnd=l(),[O(p)];var J=W.flush(z);return S(J)?J.then(function(ne){return c.flushRemux(B,ne,p),B}):(this.flushRemux(B,J,p),B)},y.flushRemux=function(p,c,E){var _=c.audioTrack,b=c.avcTrack,I=c.id3Track,P=c.textTrack,B=this.currentTransmuxState,z=B.accurateTimeOffset,U=B.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+E.sn+(E.part>-1?" p: "+E.part:"")+" of level "+E.level);var C=this.remuxer.remux(_,b,I,P,U,z,!0,this.id);p.push({remuxResult:C,chunkMeta:E}),E.transmuxing.executeEnd=l()},y.resetInitialTimestamp=function(p){var c=this.demuxer,E=this.remuxer;if(!c||!E)return;c.resetTimeStamp(p),E.resetTimeStamp(p)},y.resetContiguity=function(){var p=this.demuxer,c=this.remuxer;if(!p||!c)return;p.resetContiguity(),c.resetNextTimestamp()},y.resetInitSegment=function(p,c,E,_){var b=this.demuxer,I=this.remuxer;if(!b||!I)return;b.resetInitSegment(c,E,_),I.resetInitSegment(p,c,E)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(p,c,E,_,b){var I;return c&&c.method==="SAMPLE-AES"?I=this.transmuxSampleAes(p,c,E,_,b):I=this.transmuxUnencrypted(p,E,_,b),I},y.transmuxUnencrypted=function(p,c,E,_){var b=this.demuxer.demux(p,c,!1,!this.config.progressive),I=b.audioTrack,P=b.avcTrack,B=b.id3Track,z=b.textTrack,U=this.remuxer.remux(I,P,B,z,c,E,!1,this.id);return{remuxResult:U,chunkMeta:_}},y.transmuxSampleAes=function(p,c,E,_,b){var I=this;return this.demuxer.demuxSampleAes(p,c,E).then(function(P){var B=I.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,E,_,!1,I.id);return{remuxResult:B,chunkMeta:b}})},y.configureTransmuxer=function(p,c){for(var E=this.config,_=this.observer,b=this.typeSupported,I=this.vendor,P=c.audioCodec,B=c.defaultInitPts,z=c.duration,U=c.initSegmentData,C=c.videoCodec,W,V=0,J=i.length;V0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(v=y),v}var O=function(y){return{remuxResult:{},chunkMeta:y}};function S(T){return"then"in T&&T.then instanceof Function}var x=function(y,v,p,c,E){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=v,this.initSegmentData=p,this.duration=c,this.defaultInitPts=E},w=function(y,v,p,c,E){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=v,this.accurateTimeOffset=p,this.trackSwitch=c,this.timeOffset=E}},"./src/demux/tsdemuxer.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"discardEPB",function(){return O});var H=L("./src/demux/adts.ts"),N=L("./src/demux/mpegaudio.ts"),R=L("./src/demux/exp-golomb.ts"),j=L("./src/demux/id3.ts"),k=L("./src/demux/sample-aes.ts"),A=L("./src/events.ts"),D=L("./src/utils/mp4-tools.ts"),g=L("./src/utils/logger.ts"),h=L("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},d=function(){function S(w,T,y){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=w,this.config=T,this.typeSupported=y}S.probe=function(T){var y=S.syncOffset(T);return y<0?!1:(y&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},S.syncOffset=function(T){for(var y=Math.min(1e3,T.length-3*188),v=0;v>4,re=void 0;if(ge>1){if(re=ue+5+T[ue+4],re===ue+188)continue}else re=ue+4;switch(me){case I:le&&(P&&(c=o(P))&&this.parseAVCPES(c,!1),P={data:[],size:0}),P&&(P.data.push(T.subarray(re,ue+188)),P.size+=ue+188-re);break;case B:le&&(U&&(c=o(U))&&(_.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),U={data:[],size:0}),U&&(U.data.push(T.subarray(re,ue+188)),U.size+=ue+188-re);break;case z:le&&(C&&(c=o(C))&&this.parseID3PES(c),C={data:[],size:0}),C&&(C.data.push(T.subarray(re,ue+188)),C.size+=ue+188-re);break;case 0:le&&(re+=T[re]+1),J=this._pmtId=l(T,re);break;case J:{le&&(re+=T[re]+1);var oe=i(T,re,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,v);I=oe.avc,I>0&&(E.pid=I),B=oe.audio,B>0&&(_.pid=B,_.isAAC=oe.isAAC),z=oe.id3,z>0&&(b.pid=z),W&&!V&&(g.logger.log("reparse from beginning"),W=!1,ue=fe-188),V=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!0;break}}else this.observer.emit(A.Events.ERROR,A.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E.pesData=P,_.pesData=U,b.pesData=C;var xe={audioTrack:_,avcTrack:E,id3Track:b,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(xe),xe},x.flush=function(){var T=this.remainderData;this.remainderData=null;var y;return T?y=this.demux(T,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},x.extractRemainingSamples=function(T){var y=T.audioTrack,v=T.avcTrack,p=T.id3Track,c=v.pesData,E=y.pesData,_=p.pesData,b;c&&(b=o(c))?(this.parseAVCPES(b,!0),v.pesData=null):v.pesData=c,E&&(b=o(E))?(y.isAAC?this.parseAACPES(b):this.parseMPEGPES(b),y.pesData=null):(E!=null&&E.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=E),_&&(b=o(_))?(this.parseID3PES(b),p.pesData=null):p.pesData=_},x.demuxSampleAes=function(T,y,v){var p=this.demux(T,v,!0,!this.config.progressive),c=this.sampleAes=new k.default(this.observer,this.config,y);return this.decrypt(p,c)},x.decrypt=function(T,y){return new Promise(function(v){var p=T.audioTrack,c=T.avcTrack;p.samples&&p.isAAC?y.decryptAacSamples(p.samples,0,function(){c.samples?y.decryptAvcSamples(c.samples,0,0,function(){v(T)}):v(T)}):c.samples&&y.decryptAvcSamples(c.samples,0,0,function(){v(T)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(T,y){var v=this,p=this._avcTrack,c=this.parseAVCNALu(T.data),E=!1,_=this.avcSample,b,I=!1;T.data=null,_&&c.length&&!p.audFound&&(n(_,p),_=this.avcSample=s(!1,T.pts,T.dts,"")),c.forEach(function(P){switch(P.type){case 1:{b=!0,_||(_=v.avcSample=s(!0,T.pts,T.dts,"")),E&&(_.debug+="NDR "),_.frame=!0;var B=P.data;if(I&&B.length>4){var z=new R.default(B).readSliceType();(z===2||z===4||z===7||z===9)&&(_.key=!0)}break}case 5:b=!0,_||(_=v.avcSample=s(!0,T.pts,T.dts,"")),E&&(_.debug+="IDR "),_.key=!0,_.frame=!0;break;case 6:{b=!0,E&&_&&(_.debug+="SEI ");var U=new R.default(O(P.data));U.readUByte();for(var C=0,W=0,V=!1,J=0;!V&&U.bytesAvailable>1;){C=0;do J=U.readUByte(),C+=J;while(J===255);W=0;do J=U.readUByte(),W+=J;while(J===255);if(C===4&&U.bytesAvailable!==0){V=!0;var ne=U.readUByte();if(ne===181){var fe=U.readUShort();if(fe===49){var ue=U.readUInt();if(ue===1195456820){var le=U.readUByte();if(le===3){for(var me=U.readUByte(),ge=U.readUByte(),re=31&me,oe=[me,ge],xe=0;xe16){for(var Be=[],Ve=0;Ve<16;Ve++)Be.push(U.readUByte().toString(16)),(Ve===3||Ve===5||Ve===7||Ve===9)&&Be.push("-");for(var Ye=W-16,$e=new Uint8Array(Ye),Ke=0;Ke=0){var U={data:T.subarray(B,_-p-1),type:z};E.push(U)}else{var C=this.getLastNalUnit();if(C&&(c&&_<=4-c&&(C.state&&(C.data=C.data.subarray(0,C.data.byteLength-c))),I=_-p-1,I>0)){var W=new Uint8Array(C.data.byteLength+I);W.set(C.data,0),W.set(T.subarray(0,I),C.data.byteLength),C.data=W,C.state=0}}_=0&&p>=0){var V={data:T.subarray(B,y),type:z,state:p};E.push(V)}if(E.length===0){var J=this.getLastNalUnit();if(J){var ne=new Uint8Array(J.data.byteLength+T.byteLength);ne.set(J.data,0),ne.set(T,J.data.byteLength),J.data=ne}}return v.naluState=p,E},x.parseAACPES=function(T){var y=0,v=this._audioTrack,p=this.aacOverFlow,c=T.data;if(p){this.aacOverFlow=null;var E=p.sample.unit.byteLength,_=Math.min(p.missing,E),b=E-_;p.sample.unit.set(c.subarray(0,_),b),v.samples.push(p.sample),y=p.missing}var I,P;for(I=y,P=c.length;I1;){var E=new Uint8Array(c[0].length+c[1].length);E.set(c[0]),E.set(c[1],c[0].length),c[0]=E,c.splice(1,1)}w=c[0];var _=(w[0]<<16)+(w[1]<<8)+w[2];if(_===1){if(T=(w[4]<<8)+w[5],T&&T>S.size-6)return null;var b=w[7];b&192&&(v=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,b&64?(p=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,v-p>60*9e4&&(g.logger.warn(Math.round((v-p)/9e4)+"s delta between PTS and DTS, align them"),v=p)):p=v),y=w[8];var I=y+9;if(S.size<=I)return null;S.size-=I;for(var P=new Uint8Array(S.size),B=0,z=c.length;BU){I-=U;continue}else w=w.subarray(I),U-=I,I=0;P.set(w,x),x+=U}return T&&(T-=y+3),{data:P,pts:v,dts:p,len:T}}return null}function n(S,x){if(S.units.length&&S.frame){if(S.pts===void 0){var w=x.samples,T=w.length;if(T){var y=w[T-1];S.pts=y.pts,S.dts=y.dts}else{x.dropped++;return}}x.samples.push(S)}S.debug.length&&g.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function f(S,x){var w=S.length;if(w>0){if(x.pts>=S[w-1].pts)S.push(x);else for(var T=w-1;T>=0;T--)if(x.ptsv)return c;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,v=this.autoLevelCapping,p;return v===-1&&y&&y.length?p=y.length-1:p=v,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var v=this.audioTrackController;v&&(v.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var v=this.subtitleTrackController;v&&(v.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var v=this.subtitleTrackController;v&&(v.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:s.hlsDefaultConfig},set:function(y){x.defaultConfig=y}}]),x}();S.defaultConfig=void 0},"./src/is-supported.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"isSupported",function(){return R}),L.d(K,"changeTypeSupported",function(){return j});var H=L("./src/utils/mediasource-helper.ts");function N(){return self.SourceBuffer||self.WebKitSourceBuffer}function R(){var k=Object(H.getMediaSource)();if(!k)return!1;var A=N(),D=k&&typeof k.isTypeSupported=="function"&&k.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!A||A.prototype&&typeof A.prototype.appendBuffer=="function"&&typeof A.prototype.remove=="function";return!!D&&!!g}function j(){var k,A=N();return typeof(A==null||((k=A.prototype)===null||k===void 0)?void 0:k.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return d}),L.d(K,"LoadError",function(){return l});var H=L("./src/polyfills/number.ts"),N=L("./src/errors.ts");function R(i,o){i.prototype=Object.create(o.prototype),i.prototype.constructor=i,g(i,o)}function j(i){var o=typeof Map=="function"?new Map:void 0;return j=function(f){if(f===null||!D(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(f))return o.get(f);o.set(f,O)}function O(){return k(f,arguments,h(this).constructor)}return O.prototype=Object.create(f.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g(O,f)},j(i)}function k(i,o,n){return A()?k=Reflect.construct:k=function(O,S,x){var w=[null];w.push.apply(w,S);var T=Function.bind.apply(O,w),y=new T;return x&&g(y,x.prototype),y},k.apply(null,arguments)}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function D(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function g(i,o){return g=Object.setPrototypeOf||function(f,O){return f.__proto__=O,f},g(i,o)}function h(i){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},h(i)}var u=Math.pow(2,17),d=function(){function i(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var o=i.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(f,O){var S=this,x=f.url;if(!x)return Promise.reject(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var w=this.config,T=w.fLoader,y=w.loader;return new Promise(function(v,p){S.loader&&S.loader.destroy();var c=S.loader=f.loader=T?new T(w):new y(w),E=s(f),_={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:u};f.stats=c.stats,c.load(E,_,{onSuccess:function(I,P,B,z){S.resetLoader(f,c),v({frag:f,part:null,payload:I.data,networkDetails:z})},onError:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:I,networkDetails:B}))},onAbort:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:B}))},onTimeout:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:B}))},onProgress:function(I,P,B,z){O&&O({frag:f,part:null,payload:B,networkDetails:z})}})})},o.loadPart=function(f,O,S){var x=this;this.abort();var w=this.config,T=w.fLoader,y=w.loader;return new Promise(function(v,p){x.loader&&x.loader.destroy();var c=x.loader=f.loader=T?new T(w):new y(w),E=s(f,O),_={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:u};O.stats=c.stats,c.load(E,_,{onSuccess:function(I,P,B,z){x.resetLoader(f,c),x.updateStatsFromPart(f,O);var U={frag:f,part:O,payload:I.data,networkDetails:z};S(U),v(U)},onError:function(I,P,B){x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:O,response:I,networkDetails:B}))},onAbort:function(I,P,B){f.stats.aborted=O.stats.aborted,x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:O,networkDetails:B}))},onTimeout:function(I,P,B){x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:O,networkDetails:B}))}})})},o.updateStatsFromPart=function(f,O){var S=f.stats,x=O.stats,w=x.total;if(S.loaded+=x.loaded,w){var T=Math.round(f.duration/O.duration),y=Math.min(Math.round(S.loaded/w),T),v=T-y,p=v*Math.round(S.loaded/y);S.total=S.loaded+p}else S.total=Math.max(S.loaded,S.total);var c=S.loading,E=x.loading;c.start?c.first+=E.first-E.start:(c.start=E.start,c.first=E.first),c.end=E.end},o.resetLoader=function(f,O){f.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},i}();function s(i,o){o===void 0&&(o=null);var n=o||i,f={frag:i,part:o,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},O=n.byteRangeStartOffset,S=n.byteRangeEndOffset;return Object(H.isFiniteNumber)(O)&&Object(H.isFiniteNumber)(S)&&(f.rangeStart=O,f.rangeEnd=S),f}var l=function(i){R(o,i);function o(n){for(var f,O=arguments.length,S=new Array(O>1?O-1:0),x=1;x>8*(15-w)&255;return x},f.setDecryptDataFromLevelKey=function(S,x){var w=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(w=k.LevelKey.fromURI(S.uri),w.method=S.method,w.iv=this.createInitializationVector(x),w.keyFormat="identity"),w},f.setElementaryStreamInfo=function(S,x,w,T,y,v){v===void 0&&(v=!1);var p=this.elementaryStreams,c=p[S];if(!c){p[S]={startPTS:x,endPTS:w,startDTS:T,endDTS:y,partial:v};return}c.startPTS=Math.min(c.startPTS,x),c.endPTS=Math.max(c.endPTS,w),c.startDTS=Math.min(c.startDTS,T),c.endDTS=Math.max(c.endDTS,y)},f.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[d.AUDIO]=null,S[d.VIDEO]=null,S[d.AUDIOVIDEO]=null},u(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&j.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(H.isFiniteNumber)(this.programDateTime))return null;var S=Object(H.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),n}(s),i=function(o){D(n,o);function n(f,O,S,x,w){var T;T=o.call(this,S)||this,T.fragOffset=0,T.duration=0,T.gap=!1,T.independent=!1,T.relurl=void 0,T.fragment=void 0,T.index=void 0,T.stats=new A.LoadStats,T.duration=f.decimalFloatingPoint("DURATION"),T.gap=f.bool("GAP"),T.independent=f.bool("INDEPENDENT"),T.relurl=f.enumeratedString("URI"),T.fragment=O,T.index=x;var y=f.enumeratedString("BYTERANGE");return y&&T.setByteRange(y,w),w&&(T.fragOffset=w.fragOffset+w.duration),T}return u(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),n}(s)},"./src/loader/key-loader.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return j});var H=L("./src/events.ts"),N=L("./src/errors.ts"),R=L("./src/utils/logger.ts"),j=function(){function k(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var A=k.prototype;return A._registerListeners=function(){this.hls.on(H.Events.KEY_LOADING,this.onKeyLoading,this)},A._unregisterListeners=function(){this.hls.off(H.Events.KEY_LOADING,this.onKeyLoading)},A.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var h=this.loaders[g];h&&h.destroy()}this.loaders={}},A.onKeyLoading=function(g,h){var u=h.frag,d=u.type,s=this.loaders[d];if(!u.decryptdata){R.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var l=u.decryptdata.uri;if(l!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(R.logger.warn("abort previous key loader for type:"+d),s.abort()),!l){R.logger.warn("key uri is falsy");return}var o=i.loader,n=u.loader=this.loaders[d]=new o(i);this.decrypturl=l,this.decryptkey=null;var f={url:l,frag:u,responseType:"arraybuffer"},O={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(f,O,S)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(H.Events.KEY_LOADED,{frag:u}))},A.loadsuccess=function(g,h,u){var d=u.frag;if(!d.decryptdata){R.logger.error("after key load, decryptdata unset");return}this.decryptkey=d.decryptdata.key=new Uint8Array(g.data),d.loader=null,delete this.loaders[d.type],this.hls.trigger(H.Events.KEY_LOADED,{frag:d})},A.loaderror=function(g,h){var u=h.frag,d=u.loader;d&&d.abort(),delete this.loaders[u.type],this.hls.trigger(H.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:g})},A.loadtimeout=function(g,h){var u=h.frag,d=u.loader;d&&d.abort(),delete this.loaders[u.type],this.hls.trigger(H.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},k}()},"./src/loader/level-details.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"LevelDetails",function(){return k});var H=L("./src/polyfills/number.ts");function N(A,D){for(var g=0;gh.endSN||u>0||u===0&&d>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},R(A,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(H.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||j}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var u=this.driftEnd-this.driftStart;return u*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),A}()},"./src/loader/level-key.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"LevelKey",function(){return k});var H=L("./node_modules/url-toolkit/src/url-toolkit.js"),N=L.n(H);function R(A,D){for(var g=0;g2){var p=v.shift()+".";return p+=parseInt(v.shift()).toString(16),p+=("000"+parseInt(v.shift()).toString(16)).substr(-4),p}return y},w.resolve=function(y,v){return N.buildAbsoluteURL(v,y,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(y,v){var p=[],c={},E=!1;u.lastIndex=0;for(var _;(_=u.exec(y))!=null;)if(_[1]){var b=new D.AttrList(_[1]),I={attrs:b,bitrate:b.decimalInteger("AVERAGE-BANDWIDTH")||b.decimalInteger("BANDWIDTH"),name:b.NAME,url:w.resolve(_[2],v)},P=b.decimalResolution("RESOLUTION");P&&(I.width=P.width,I.height=P.height),f((b.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=w.convertAVC1ToAVCOTI(I.videoCodec)),p.push(I)}else if(_[3]){var B=new D.AttrList(_[3]);B["DATA-ID"]&&(E=!0,c[B["DATA-ID"]]=B)}return{levels:p,sessionData:E?c:null}},w.parseMasterPlaylistMedia=function(y,v,p,c){c===void 0&&(c=[]);var E,_=[],b=0;for(d.lastIndex=0;(E=d.exec(y))!==null;){var I=new D.AttrList(E[1]);if(I.TYPE===p){var P={attrs:I,bitrate:0,id:b++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:p,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?w.resolve(I.URI,v):""};if(c.length){var B=w.findGroup(c,P.groupId)||c[0];O(P,B,"audioCodec"),O(P,B,"textCodec")}_.push(P)}}return _},w.parseLevelPlaylist=function(y,v,p,c,E){var _=new k.LevelDetails(v),b=_.fragments,I=null,P=0,B=0,z=0,U=0,C=null,W=new j.Fragment(c,v),V,J,ne,fe=-1,ue=!1;for(s.lastIndex=0,_.m3u8=y;(V=s.exec(y))!==null;){ue&&(ue=!1,W=new j.Fragment(c,v),W.start=z,W.sn=P,W.cc=U,W.level=p,I&&(W.initSegment=I,W.rawProgramDateTime=I.rawProgramDateTime));var le=V[1];if(le){W.duration=parseFloat(le);var me=(" "+V[2]).slice(1);W.title=me||null,W.tagList.push(me?["INF",le,me]:["INF",le])}else if(V[3])Object(H.isFiniteNumber)(W.duration)&&(W.start=z,ne&&(W.levelkey=ne),W.sn=P,W.level=p,W.cc=U,W.urlId=E,b.push(W),W.relurl=(" "+V[3]).slice(1),x(W,C),C=W,z+=W.duration,P++,B=0,ue=!0);else if(V[4]){var ge=(" "+V[4]).slice(1);C?W.setByteRange(ge,C):W.setByteRange(ge)}else if(V[5])W.rawProgramDateTime=(" "+V[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),fe===-1&&(fe=b.length);else{if(V=V[0].match(l),!V){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(J=1;J-1){g.logger.warn("Keyformat "+ot+" is not supported from the manifest");continue}else if(ot!=="identity")continue;ze&&(ne=A.LevelKey.fromURL(v,at),at&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ze)>=0&&(ne.method=ze,ne.keyFormat=ot,He&&(ne.keyID=He),Xe&&(ne.keyFormatVersions=Xe),ne.iv=Je));break}case"START":{var dt=new D.AttrList(oe),lt=dt.decimalFloatingPoint("TIME-OFFSET");Object(H.isFiniteNumber)(lt)&&(_.startTimeOffset=lt);break}case"MAP":{var _t=new D.AttrList(oe);W.relurl=_t.URI,_t.BYTERANGE&&W.setByteRange(_t.BYTERANGE),W.level=p,W.sn="initSegment",ne&&(W.levelkey=ne),W.initSegment=null,I=W,ue=!0;break}case"SERVER-CONTROL":{var ht=new D.AttrList(oe);_.canBlockReload=ht.bool("CAN-BLOCK-RELOAD"),_.canSkipUntil=ht.optionalFloat("CAN-SKIP-UNTIL",0),_.canSkipDateRanges=_.canSkipUntil>0&&ht.bool("CAN-SKIP-DATERANGES"),_.partHoldBack=ht.optionalFloat("PART-HOLD-BACK",0),_.holdBack=ht.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var be=new D.AttrList(oe);_.partTarget=be.decimalFloatingPoint("PART-TARGET");break}case"PART":{var _e=_.partList;_e||(_e=_.partList=[]);var Ne=B>0?_e[_e.length-1]:void 0,ke=B++,Ee=new j.Part(new D.AttrList(oe),W,v,ke,Ne);_e.push(Ee),W.duration+=Ee.duration;break}case"PRELOAD-HINT":{var Ie=new D.AttrList(oe);_.preloadHint=Ie;break}case"RENDITION-REPORT":{var pe=new D.AttrList(oe);_.renditionReports=_.renditionReports||[],_.renditionReports.push(pe);break}default:g.logger.warn("line parsed but not handled: "+V);break}}}C&&!C.relurl?(b.pop(),z-=C.duration,_.partList&&(_.fragmentHint=C)):_.partList&&(x(W,C),W.cc=U,_.fragmentHint=W);var ae=b.length,ie=b[0],Q=b[ae-1];if(z+=_.skippedSegments*_.targetduration,z>0&&ae&&Q){_.averagetargetduration=z/ae;var q=Q.sn;_.endSN=q!=="initSegment"?q:0,ie&&(_.startCC=ie.cc,ie.initSegment||_.fragments.every(function(te){return te.relurl&&o(te.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new j.Fragment(c,v),W.relurl=Q.relurl,W.level=p,W.sn="initSegment",ie.initSegment=W,_.needSidxRanges=!0))}else _.endSN=0,_.startCC=0;return _.fragmentHint&&(z+=_.fragmentHint.duration),_.totalduration=z,_.endCC=U,fe>0&&S(b,fe),_},w}();function f(w,T){["video","audio","text"].forEach(function(y){var v=w.filter(function(c){return Object(h.isCodecType)(c,y)});if(v.length){var p=v.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});T[y+"Codec"]=p.length>0?p[0]:v[0],w=w.filter(function(c){return v.indexOf(c)===-1})}}),T.unknownCodecs=w}function O(w,T,y){var v=T[y];v&&(w[y]=v)}function S(w,T){for(var y=w[T],v=T;v--;){var p=w[v];if(!p)return;p.programDateTime=y.programDateTime-p.duration*1e3,y=p}}function x(w,T){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):T!=null&&T.programDateTime&&(w.programDateTime=T.endProgramDateTime),Object(H.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Y,K,L){"use strict";L.r(K);var H=L("./src/polyfills/number.ts"),N=L("./src/events.ts"),R=L("./src/errors.ts"),j=L("./src/utils/logger.ts"),k=L("./src/utils/mp4-tools.ts"),A=L("./src/loader/m3u8-parser.ts"),D=L("./src/types/loader.ts"),g=L("./src/utils/attr-list.ts");function h(s){var l=s.type;switch(l){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function u(s,l){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=l.url),i}var d=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var l=s.prototype;return l.registerListeners=function(){var o=this.hls;o.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.unregisterListeners=function(){var o=this.hls;o.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.createInternalLoader=function(o){var n=this.hls.config,f=n.pLoader,O=n.loader,S=f||O,x=new S(n);return o.loader=x,this.loaders[o.type]=x,x},l.getInternalLoader=function(o){return this.loaders[o.type]},l.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},l.destroyInternalLoaders=function(){for(var o in this.loaders){var n=this.loaders[o];n&&n.destroy(),this.resetInternalLoader(o)}},l.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},l.onManifestLoading=function(o,n){var f=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},l.onLevelLoading=function(o,n){var f=n.id,O=n.level,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:null,level:O,responseType:"text",type:D.PlaylistContextType.LEVEL,url:S,deliveryDirectives:x})},l.onAudioTrackLoading=function(o,n){var f=n.id,O=n.groupId,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:x})},l.onSubtitleTrackLoading=function(o,n){var f=n.id,O=n.groupId,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:x})},l.load=function(o){var n,f=this.hls.config,O=this.getInternalLoader(o);if(O){var S=O.context;if(S&&S.url===o.url){j.logger.trace("[playlist-loader]: playlist request ongoing");return}j.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),O.abort()}var x,w,T,y;switch(o.type){case D.PlaylistContextType.MANIFEST:x=f.manifestLoadingMaxRetry,w=f.manifestLoadingTimeOut,T=f.manifestLoadingRetryDelay,y=f.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:x=0,w=f.levelLoadingTimeOut;break;default:x=f.levelLoadingMaxRetry,w=f.levelLoadingTimeOut,T=f.levelLoadingRetryDelay,y=f.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(o),(n=o.deliveryDirectives)!==null&&n!==void 0&&n.part){var v;if(o.type===D.PlaylistContextType.LEVEL&&o.level!==null?v=this.hls.levels[o.level].details:o.type===D.PlaylistContextType.AUDIO_TRACK&&o.id!==null?v=this.hls.audioTracks[o.id].details:o.type===D.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(v=this.hls.subtitleTracks[o.id].details),v){var p=v.partTarget,c=v.targetduration;p&&c&&(w=Math.min(Math.max(p*3,c*.8)*1e3,w))}}var E={timeout:w,maxRetry:x,retryDelay:T,maxRetryDelay:y,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(o,E,_)},l.loadsuccess=function(o,n,f,O){if(O===void 0&&(O=null),f.isSidxRequest){this.handleSidxRequest(o,f),this.handlePlaylistLoaded(o,n,f,O);return}this.resetInternalLoader(f.type);var S=o.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,f,"no EXTM3U delimiter",O);return}n.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,n,f,O):this.handleMasterPlaylist(o,n,f,O)},l.loaderror=function(o,n,f){f===void 0&&(f=null),this.handleNetworkError(n,f,!1,o)},l.loadtimeout=function(o,n,f){f===void 0&&(f=null),this.handleNetworkError(n,f,!0)},l.handleMasterPlaylist=function(o,n,f,O){var S=this.hls,x=o.data,w=u(o,f),T=A.default.parseMasterPlaylist(x,w),y=T.levels,v=T.sessionData;if(!y.length){this.handleManifestParsingError(o,f,"no level found in manifest",O);return}var p=y.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),c=y.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),E=A.default.parseMasterPlaylistMedia(x,w,"AUDIO",p),_=A.default.parseMasterPlaylistMedia(x,w,"SUBTITLES",c),b=A.default.parseMasterPlaylistMedia(x,w,"CLOSED-CAPTIONS");if(E.length){var I=E.some(function(P){return!P.url});!I&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(j.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),E.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}S.trigger(N.Events.MANIFEST_LOADED,{levels:y,audioTracks:E,subtitles:_,captions:b,url:w,stats:n,networkDetails:O,sessionData:v})},l.handleTrackOrLevelPlaylist=function(o,n,f,O){var S=this.hls,x=f.id,w=f.level,T=f.type,y=u(o,f),v=Object(H.isFiniteNumber)(x)?x:0,p=Object(H.isFiniteNumber)(w)?w:v,c=h(f),E=A.default.parseLevelPlaylist(o.data,y,p,c,v);if(!E.fragments.length){S.trigger(N.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(T===D.PlaylistContextType.MANIFEST){var _={attrs:new g.AttrList({}),bitrate:0,details:E,name:"",url:y};S.trigger(N.Events.MANIFEST_LOADED,{levels:[_],audioTracks:[],url:y,stats:n,networkDetails:O,sessionData:null})}if(n.parsing.end=performance.now(),E.needSidxRanges){var b,I=(b=E.fragments[0].initSegment)===null||b===void 0?void 0:b.url;this.load({url:I,isSidxRequest:!0,type:T,level:w,levelDetails:E,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=E,this.handlePlaylistLoaded(o,n,f,O)},l.handleSidxRequest=function(o,n){var f=Object(k.parseSegmentIndex)(new Uint8Array(o.data));if(!f)return;var O=f.references,S=n.levelDetails;O.forEach(function(x,w){var T=x.info,y=S.fragments[w];y.byteRange.length===0&&y.setByteRange(String(1+T.end-T.start)+"@"+String(T.start)),y.initSegment&&y.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},l.handleManifestParsingError=function(o,n,f,O){this.hls.trigger(N.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===D.PlaylistContextType.MANIFEST,url:o.url,reason:f,response:o,context:n,networkDetails:O})},l.handleNetworkError=function(o,n,f,O){f===void 0&&(f=!1),j.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var S=R.ErrorDetails.UNKNOWN,x=!1,w=this.getInternalLoader(o);switch(o.type){case D.PlaylistContextType.MANIFEST:S=f?R.ErrorDetails.MANIFEST_LOAD_TIMEOUT:R.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case D.PlaylistContextType.LEVEL:S=f?R.ErrorDetails.LEVEL_LOAD_TIMEOUT:R.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.AUDIO_TRACK:S=f?R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:S=f?R.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:R.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}w&&this.resetInternalLoader(o.type);var T={type:R.ErrorTypes.NETWORK_ERROR,details:S,fatal:x,url:o.url,loader:w,context:o,networkDetails:n};O&&(T.response=O),this.hls.trigger(N.Events.ERROR,T)},l.handlePlaylistLoaded=function(o,n,f,O){var S=f.type,x=f.level,w=f.id,T=f.groupId,y=f.loader,v=f.levelDetails,p=f.deliveryDirectives;if(!(v!=null&&v.targetduration)){this.handleManifestParsingError(o,f,"invalid target duration",O);return}if(!y)return;v.live&&(y.getCacheAge&&(v.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(v.ageHeader))&&(v.ageHeader=0));switch(S){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(N.Events.LEVEL_LOADED,{details:v,level:x||0,id:w||0,stats:n,networkDetails:O,deliveryDirectives:p});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(N.Events.AUDIO_TRACK_LOADED,{details:v,id:w||0,groupId:T||"",stats:n,networkDetails:O,deliveryDirectives:p});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADED,{details:v,id:w||0,groupId:T||"",stats:n,networkDetails:O,deliveryDirectives:p});break}},s}();K.default=d},"./src/polyfills/number.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"isFiniteNumber",function(){return H}),L.d(K,"MAX_SAFE_INTEGER",function(){return N});var H=Number.isFinite||function(R){return typeof R=="number"&&isFinite(R)},N=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Y,K,L){"use strict";L.r(K);var H=function(){function N(){}return N.getSilentFrame=function(j,k){switch(j){case"mp4a.40.2":if(k===1)return new Uint8Array([0,200,0,128,35,128]);if(k===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(k===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(k===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(k===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(k===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(k===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},N}();K.default=H},"./src/remux/mp4-generator.ts":function(Y,K,L){"use strict";L.r(K);var H=Math.pow(2,32)-1,N=function(){function R(){}return R.init=function(){R.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var k;for(k in R.types)R.types.hasOwnProperty(k)&&(R.types[k]=[k.charCodeAt(0),k.charCodeAt(1),k.charCodeAt(2),k.charCodeAt(3)]);var A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),D=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);R.HDLR_TYPES={video:A,audio:D};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);R.STTS=R.STSC=R.STCO=h,R.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),R.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),R.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),d=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);R.FTYP=R.box(R.types.ftyp,u,s,u,d),R.DINF=R.box(R.types.dinf,R.box(R.types.dref,g))},R.box=function(k){for(var A=8,D=arguments.length,g=new Array(D>1?D-1:0),h=1;h>24&255,s[1]=A>>16&255,s[2]=A>>8&255,s[3]=A&255,s.set(k,4),u=0,A=8;u>24&255,k>>16&255,k>>8&255,k&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},R.mdia=function(k){return R.box(R.types.mdia,R.mdhd(k.timescale,k.duration),R.hdlr(k.type),R.minf(k))},R.mfhd=function(k){return R.box(R.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},R.minf=function(k){return k.type==="audio"?R.box(R.types.minf,R.box(R.types.smhd,R.SMHD),R.DINF,R.stbl(k)):R.box(R.types.minf,R.box(R.types.vmhd,R.VMHD),R.DINF,R.stbl(k))},R.moof=function(k,A,D){return R.box(R.types.moof,R.mfhd(k),R.traf(D,A))},R.moov=function(k){for(var A=k.length,D=[];A--;)D[A]=R.trak(k[A]);return R.box.apply(null,[R.types.moov,R.mvhd(k[0].timescale,k[0].duration)].concat(D).concat(R.mvex(k)))},R.mvex=function(k){for(var A=k.length,D=[];A--;)D[A]=R.trex(k[A]);return R.box.apply(null,[R.types.mvex].concat(D))},R.mvhd=function(k,A){A*=k;var D=Math.floor(A/(H+1)),g=Math.floor(A%(H+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return R.box(R.types.mvhd,h)},R.sdtp=function(k){var A=k.samples||[],D=new Uint8Array(4+A.length),g,h;for(g=0;g>>8&255),A.push(u&255),A=A.concat(Array.prototype.slice.call(h));for(g=0;g>>8&255),D.push(u&255),D=D.concat(Array.prototype.slice.call(h));var d=R.box(R.types.avcC,new Uint8Array([1,A[3],A[4],A[5],252|3,224|k.sps.length].concat(A).concat([k.pps.length]).concat(D))),s=k.width,l=k.height,i=k.pixelRatio[0],o=k.pixelRatio[1];return R.box(R.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,l>>8&255,l&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),d,R.box(R.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),R.box(R.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,o>>24,o>>16&255,o>>8&255,o&255])))},R.esds=function(k){var A=k.config.length;return new Uint8Array([0,0,0,0,3,23+A,0,1,0,4,15+A,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([A]).concat(k.config).concat([6,1,2]))},R.mp4a=function(k){var A=k.samplerate;return R.box(R.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,A>>8&255,A&255,0,0]),R.box(R.types.esds,R.esds(k)))},R.mp3=function(k){var A=k.samplerate;return R.box(R.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,A>>8&255,A&255,0,0]))},R.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?R.box(R.types.stsd,R.STSD,R.mp3(k)):R.box(R.types.stsd,R.STSD,R.mp4a(k)):R.box(R.types.stsd,R.STSD,R.avc1(k))},R.tkhd=function(k){var A=k.id,D=k.duration*k.timescale,g=k.width,h=k.height,u=Math.floor(D/(H+1)),d=Math.floor(D%(H+1));return R.box(R.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,A>>24&255,A>>16&255,A>>8&255,A&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,d>>24,d>>16&255,d>>8&255,d&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,g>>8&255,g&255,0,0,h>>8&255,h&255,0,0]))},R.traf=function(k,A){var D=R.sdtp(k),g=k.id,h=Math.floor(A/(H+1)),u=Math.floor(A%(H+1));return R.box(R.types.traf,R.box(R.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),R.box(R.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,u>>24,u>>16&255,u>>8&255,u&255])),R.trun(k,D.length+16+20+8+16+8+8),D)},R.trak=function(k){return k.duration=k.duration||4294967295,R.box(R.types.trak,R.tkhd(k),R.mdia(k))},R.trex=function(k){var A=k.id;return R.box(R.types.trex,new Uint8Array([0,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},R.trun=function(k,A){var D=k.samples||[],g=D.length,h=12+16*g,u=new Uint8Array(h),d,s,l,i,o,n;for(A+=8+h,u.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,A>>>24&255,A>>>16&255,A>>>8&255,A&255],0),d=0;d>>24&255,l>>>16&255,l>>>8&255,l&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*d);return R.box(R.types.trun,u)},R.initSegment=function(k){R.types||R.init();var A=R.moov(k),D=new Uint8Array(R.FTYP.byteLength+A.byteLength);return D.set(R.FTYP),D.set(A,R.FTYP.byteLength),D},R}();N.types=void 0,N.HDLR_TYPES=void 0,N.STTS=void 0,N.STSC=void 0,N.STCO=void 0,N.STSZ=void 0,N.VMHD=void 0,N.SMHD=void 0,N.STSD=void 0,N.FTYP=void 0,N.DINF=void 0,K.default=N},"./src/remux/mp4-remuxer.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return n}),L.d(K,"normalizePts",function(){return f});var H=L("./src/polyfills/number.ts"),N=L("./src/remux/aac-helper.ts"),R=L("./src/remux/mp4-generator.ts"),j=L("./src/events.ts"),k=L("./src/errors.ts"),A=L("./src/utils/logger.ts"),D=L("./src/types/loader.ts"),g=L("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(w){for(var T=1;T0?E:_.pts},v[0].pts);return p&&A.logger.debug("PTS rollover detected"),c},T.remux=function(v,p,c,E,_,b,I,P){var B,z,U,C,W,V,J=_,ne=_,fe=v.pid>-1,ue=p.pid>-1,le=p.samples.length,me=v.samples.length>0,ge=le>1,re=(!fe||me)&&(!ue||ge)||this.ISGenerated||I;if(re){this.ISGenerated||(U=this.generateIS(v,p,_));var oe=this.isVideoContiguous,xe=-1;if(ge&&(xe=O(p.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(V=!0,xe>0){A.logger.warn("[mp4-remuxer]: Dropped "+xe+" out of "+le+" video samples due to a missing keyframe");var Be=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(xe),p.dropped+=xe,ne+=(p.samples[0].pts-Be)/(p.timescale||9e4)}else xe===-1&&(A.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),V=!1);if(this.ISGenerated){if(me&&ge){var Ve=this.getVideoStartPts(p.samples),Ye=f(v.samples[0].pts,Ve)-Ve,$e=Ye/p.inputTimeScale;J+=Math.max(0,$e),ne+=Math.max(0,-$e)}if(me){if(v.samplerate||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(v,p,_)),z=this.remuxAudio(v,J,this.isAudioContiguous,b,ue||ge||P===D.PlaylistLevelType.AUDIO?ne:void 0),ge){var Ke=z?z.endPTS-z.startPTS:0;p.inputTimeScale||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(v,p,_)),B=this.remuxVideo(p,ne,oe,Ke)}}else ge&&(B=this.remuxVideo(p,ne,oe,0));B&&(B.firstKeyFrame=xe,B.independent=xe!==-1)}}return this.ISGenerated&&(c.samples.length&&(W=this.remuxID3(c,_)),E.samples.length&&(C=this.remuxText(E,_))),{audio:z,video:B,initSegment:U,independent:V,text:C,id3:W}},T.generateIS=function(v,p,c){var E=v.samples,_=p.samples,b=this.typeSupported,I={},P=!Object(H.isFiniteNumber)(this._initPTS),B="audio/mp4",z,U,C;if(P&&(z=U=Infinity),v.config&&E.length&&(v.timescale=v.samplerate,v.isAAC||(b.mpeg?(B="audio/mpeg",v.codec=""):b.mp3&&(v.codec="mp3")),I.audio={id:"audio",container:B,codec:v.codec,initSegment:!v.isAAC&&b.mpeg?new Uint8Array(0):R.default.initSegment([v]),metadata:{channelCount:v.channelCount}},P&&(C=v.inputTimeScale,z=U=E[0].pts-Math.round(C*c))),p.sps&&p.pps&&_.length&&(p.timescale=p.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:R.default.initSegment([p]),metadata:{width:p.width,height:p.height}},P)){C=p.inputTimeScale;var W=this.getVideoStartPts(_),V=Math.round(C*c);U=Math.min(U,f(_[0].dts,W)-V),z=Math.min(z,W-V)}if(Object.keys(I).length)return this.ISGenerated=!0,P&&(this._initPTS=z,this._initDTS=U),{tracks:I,initPTS:z,timescale:C}},T.remuxVideo=function(v,p,c,E){var _=v.inputTimeScale,b=v.samples,I=[],P=b.length,B=this._initPTS,z=this.nextAvcDts,U=8,C,W,V,J=Number.POSITIVE_INFINITY,ne=Number.NEGATIVE_INFINITY,fe=0,ue=!1;if(!c||z===null){var le=p*_,me=b[0].pts-f(b[0].dts,b[0].pts);z=le-me}for(var ge=0;gere.pts){var oe=9e4*.2;fe=Math.max(Math.min(fe,re.pts-re.dts),-1*oe)}re.dts0?ge-1:ge].dts&&(ue=!0)}ue&&b.sort(function(rt,Me){var Ue=rt.dts-Me.dts,we=rt.pts-Me.pts;return Ue||we}),W=b[0].dts,V=b[b.length-1].dts;var xe=Math.round((V-W)/(P-1));if(fe<0){if(fexe,We=$e<-1;if(Ke||We){Ke?A.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)($e,!0)+" ms ("+$e+"dts) hole between fragments detected, filling it"):A.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-$e,!0)+" ms ("+$e+"dts) overlapping between fragments detected"),W=z;var ze=b[0].pts-$e;b[0].dts=W,b[0].pts=ze,A.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(ze,!0)+"/"+Object(g.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(g.toMsFromMpegTsClock)($e,!0)+" ms")}}o&&(W=Math.max(0,W));for(var at=0,Je=0,Xe=0;Xe0?_e-1:_e].dts;if(q.stretchShortVideoTrack&&this.nextAudioPts!==null){var se=Math.floor(q.maxBufferHole*_),ce=(E?J+E*_:this.nextAudioPts)-Ne.pts;ce>se?(C=ce-te,C<0&&(C=te),A.logger.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+C/90+" ms for the last video frame.")):C=te}else C=te}var Se=Math.round(Ne.pts-Ne.dts);I.push(new S(Ne.key,C,Ee,Se))}if(I.length&&l&&l<70){var je=I[0].flags;je.dependsOn=2,je.isNonSync=0}console.assert(C!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=V+C,this.isVideoContiguous=!0;var Ze=R.default.moof(v.sequenceNumber++,W,h({},v,{samples:I})),ut="video",it={data1:Ze,data2:ht,startPTS:J/_,endPTS:(ne+C)/_,startDTS:W/_,endDTS:z/_,type:ut,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:v.dropped};return v.samples=[],v.dropped=0,console.assert(ht.length,"MDAT length must not be zero"),it},T.remuxAudio=function(v,p,c,E,_){var b=v.inputTimeScale,I=v.samplerate?v.samplerate:b,P=b/I,B=v.isAAC?d:s,z=B*P,U=this._initPTS,C=!v.isAAC&&this.typeSupported.mpeg,W=[],V=v.samples,J=C?0:8,ne=this.nextAudioPts||-1,fe=p*b;if(this.isAudioContiguous=c=c||V.length&&ne>0&&(E&&Math.abs(fe-ne)<9e3||Math.abs(f(V[0].pts-U,fe)-ne)<20*z),V.forEach(function(ie){ie.pts=f(ie.pts-U,fe)}),!c||ne<0){if(V=V.filter(function(ie){return ie.pts>=0}),!V.length)return;_===0?ne=0:E?ne=Math.max(0,fe):ne=V[0].pts}if(v.isAAC)for(var ue=_!==void 0,le=this.config.maxAudioFramesDrift,me=0,ge=ne;me=le*z&&Be0){Je+=J;try{at=new Uint8Array(Je)}catch(ie){this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:k.ErrorTypes.MUX_ERROR,details:k.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Je,reason:"fail allocating audio mdat "+Je});return}if(!C){var ht=new DataView(at.buffer);ht.setUint32(0,Je),at.set(R.default.types.mdat,4)}}else return;at.set(dt,J);var be=dt.byteLength;J+=be,W.push(new S(!0,B,be,0)),ze=lt}var _e=W.length;if(!_e)return;var Ne=W[W.length-1];this.nextAudioPts=ne=ze+P*Ne.duration;var ke=C?new Uint8Array(0):R.default.moof(v.sequenceNumber++,We/P,h({},v,{samples:W}));v.samples=[];var Ee=We/b,Ie=ne/b,pe="audio",ae={data1:ke,data2:at,startPTS:Ee,endPTS:Ie,startDTS:Ee,endDTS:Ie,type:pe,hasAudio:!0,hasVideo:!1,nb:_e};return this.isAudioContiguous=!0,console.assert(at.length,"MDAT length must not be zero"),ae},T.remuxEmptyAudio=function(v,p,c,E){var _=v.inputTimeScale,b=v.samplerate?v.samplerate:_,I=_/b,P=this.nextAudioPts,B=(P!==null?P:E.startDTS*_)+this._initDTS,z=E.endDTS*_+this._initDTS,U=I*d,C=Math.ceil((z-B)/U),W=N.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);if(A.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){A.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var V=[],J=0;J4294967296;)w+=y;return w}function O(w){for(var T=0;T0?this.lastEndDTS=v:(j.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!w.audio,c=!!w.video,E="";p&&(E+="audio"),c&&(E+="video");var _={data1:S,startPTS:y,startDTS:y,endPTS:v,endDTS:v,type:E,hasAudio:p,hasVideo:c,nb:1,dropped:0};return O.audio=_.type==="audio"?_:void 0,O.video=_.type!=="audio"?_:void 0,O.text=i,O.id3=l,O.initSegment=x,O},g}(),A=function(h,u,d){return Object(N.getStartDTS)(h,u)-d};function D(g,h){var u=g==null?void 0:g.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||h===R.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}K.default=k},"./src/task-loop.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return H});var H=function(){function N(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var R=N.prototype;return R.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},R.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},R.onHandlerDestroyed=function(){},R.hasInterval=function(){return!!this._tickInterval},R.hasNextTick=function(){return!!this._tickTimer},R.setInterval=function(k){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,k),!0)},R.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},R.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},R.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},R.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},R.doTick=function(){},N}()},"./src/types/cmcd.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"CMCDVersion",function(){return H}),L.d(K,"CMCDObjectType",function(){return N}),L.d(K,"CMCDStreamingFormat",function(){return R}),L.d(K,"CMCDStreamType",function(){return j});var H=1,N;(function(k){k.MANIFEST="m",k.AUDIO="a",k.VIDEO="v",k.MUXED="av",k.INIT="i",k.CAPTION="c",k.TIMED_TEXT="tt",k.KEY="k",k.OTHER="o"})(N||(N={}));var R;(function(k){k.DASH="d",k.HLS="h",k.SMOOTH="s",k.OTHER="o"})(R||(R={}));var j;(function(k){k.VOD="v",k.LIVE="l"})(j||(j={}))},"./src/types/level.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"HlsSkip",function(){return R}),L.d(K,"getSkipValue",function(){return j}),L.d(K,"HlsUrlParameters",function(){return k}),L.d(K,"Level",function(){return A});function H(D,g){for(var h=0;hNumber.MAX_SAFE_INTEGER?Infinity:g},k.hexadecimalInteger=function(D){if(this[D]){var g=(this[D]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var h=new Uint8Array(g.length/2),u=0;uNumber.MAX_SAFE_INTEGER?Infinity:g},k.decimalFloatingPoint=function(D){return parseFloat(this[D])},k.optionalFloat=function(D,g){var h=this[D];return h?parseFloat(h):g},k.enumeratedString=function(D){return this[D]},k.bool=function(D){return this[D]==="YES"},k.decimalResolution=function(D){var g=H.exec(this[D]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},j.parseAttrList=function(D){var g,h={},u='"';for(N.lastIndex=0;(g=N.exec(D))!==null;){var d=g[2];d.indexOf(u)===0&&d.lastIndexOf(u)===d.length-1&&(d=d.slice(1,-1)),h[g[1]]=d}return h},j}()},"./src/utils/binary-search.ts":function(Y,K,L){"use strict";L.r(K);var H={search:function(R,j){for(var k=0,A=R.length-1,D=null,g=null;k<=A;){D=(k+A)/2|0,g=R[D];var h=j(g);if(h>0)k=D+1;else if(h<0)A=D-1;else return g}return null}};K.default=H},"./src/utils/buffer-helper.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"BufferHelper",function(){return R});var H=L("./src/utils/logger.ts"),N={length:0,start:function(){return 0},end:function(){return 0}},R=function(){function j(){}return j.isBuffered=function(A,D){try{if(A){for(var g=j.getBuffered(A),h=0;h=g.start(h)&&D<=g.end(h))return!0}}catch(u){}return!1},j.bufferInfo=function(A,D,g){try{if(A){var h=j.getBuffered(A),u=[],d;for(d=0;ds&&(h[d-1].end=A[u].end):h.push(A[u])}else h.push(A[u])}else h=A;for(var l=0,i,o=D,n=D,f=0;f=O&&D=c&&H.logger.log(this.time+" ["+c+"] "+E)},y}(),l=function(v){for(var p=[],c=0;ck&&(this.logger.log(d.DEBUG,"Too large cursor position "+this.pos),this.pos=k)},v.moveCursor=function(c){var E=this.pos+c;if(c>1)for(var _=this.pos+1;_=144&&this.backSpace();var E=R(c);if(this.pos>=k){this.logger.log(d.ERROR,"Cannot insert "+c.toString(16)+" ("+E+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(E,this.currPenState),this.moveCursor(1)},v.clearFromPos=function(c){var E;for(E=c;E0&&(c?_="["+E.join(" | ")+"]":_=E.join(` + timeOffset: `+_);var J=new j.TransmuxConfig(f,O,n,w,v);this.configureTransmuxer(J)}if(this.frag=S,this.part=x,E)E.postMessage({cmd:"demux",data:o,decryptdata:b,chunkMeta:y,state:V},o instanceof ArrayBuffer?[o]:[]);else if(c){var ne=c.push(o,b,y,V);Object(j.isPromise)(ne)?ne.then(function(fe){p.handleTransmuxComplete(fe)}):this.handleTransmuxComplete(ne)}},l.flush=function(o){var n=this;o.transmuxing.start=self.performance.now();var f=this.transmuxer,O=this.worker;if(O)O.postMessage({cmd:"flush",chunkMeta:o});else if(f){var S=f.flush(o);Object(j.isPromise)(S)?S.then(function(x){n.handleFlushResult(x,o)}):this.handleFlushResult(S,o)}},l.handleFlushResult=function(o,n){var f=this;o.forEach(function(O){f.handleTransmuxComplete(O)}),this.onFlush(n)},l.onWorkerMessage=function(o){var n=o.data,f=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,f.trigger(n.event,n.data);break}}},l.configureTransmuxer=function(o){var n=this.worker,f=this.transmuxer;n?n.postMessage({cmd:"configure",config:o}):f&&f.configure(o)},l.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},s}()},"./src/demux/transmuxer-worker.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return A});var H=L("./src/demux/transmuxer.ts"),N=L("./src/events.ts"),R=L("./src/utils/logger.ts"),j=L("./node_modules/eventemitter3/index.js"),k=L.n(j);function A(d){var s=new j.EventEmitter,l=function(o,n){d.postMessage({event:o,data:n})};s.on(N.Events.FRAG_DECRYPTED,l),s.on(N.Events.ERROR,l),d.addEventListener("message",function(i){var o=i.data;switch(o.cmd){case"init":{var n=JSON.parse(o.config);d.transmuxer=new H.default(s,o.typeSupported,n,o.vendor,o.id),Object(R.enableLogs)(n.debug),l("init",null);break}case"configure":{d.transmuxer.configure(o.config);break}case"demux":{var f=d.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(H.isPromise)(f)?f.then(function(x){D(d,x)}):D(d,f);break}case"flush":{var O=o.chunkMeta,S=d.transmuxer.flush(O);Object(H.isPromise)(S)?S.then(function(x){h(d,x,O)}):h(d,S,O);break}default:break}})}function D(d,s){if(u(s.remuxResult))return;var l=[],i=s.remuxResult,o=i.audio,n=i.video;o&&g(l,o),n&&g(l,n),d.postMessage({event:"transmuxComplete",data:s},l)}function g(d,s){s.data1&&d.push(s.data1.buffer),s.data2&&d.push(s.data2.buffer)}function h(d,s,l){s.forEach(function(i){D(d,i)}),d.postMessage({event:"flush",data:l})}function u(d){return!d.audio&&!d.video&&!d.text&&!d.id3&&!d.initSegment}},"./src/demux/transmuxer.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return n}),L.d(K,"isPromise",function(){return S}),L.d(K,"TransmuxConfig",function(){return x}),L.d(K,"TransmuxState",function(){return w});var H=L("./src/events.ts"),N=L("./src/errors.ts"),R=L("./src/crypt/decrypter.ts"),j=L("./src/demux/aacdemuxer.ts"),k=L("./src/demux/mp4demuxer.ts"),A=L("./src/demux/tsdemuxer.ts"),D=L("./src/demux/mp3demuxer.ts"),g=L("./src/remux/mp4-remuxer.ts"),h=L("./src/remux/passthrough-remuxer.ts"),u=L("./src/demux/chunk-cache.ts"),d=L("./src/utils/mp4-tools.ts"),s=L("./src/utils/logger.ts"),l;try{l=self.performance.now.bind(self.performance)}catch(T){s.logger.debug("Unable to use Performance API on this environment"),l=self.Date.now}var i=[{demux:A.default,remux:g.default},{demux:k.default,remux:h.default},{demux:j.default,remux:g.default},{demux:D.default,remux:g.default}],o=1024;i.forEach(function(T){var y=T.demux;o=Math.max(o,y.minProbeByteLength)});var n=function(){function T(v,p,c,E,_){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new u.default,this.observer=v,this.typeSupported=p,this.config=c,this.vendor=E,this.id=_}var y=T.prototype;return y.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},y.push=function(p,c,E,_){var b=this,I=E.transmuxing;I.executeStart=l();var P=new Uint8Array(p),B=this.cache,z=this.config,U=this.currentTransmuxState,C=this.transmuxConfig;_&&(this.currentTransmuxState=_);var W=f(P,c);if(W&&W.method==="AES-128"){var V=this.getDecrypter();if(z.enableSoftwareAES){var J=V.softwareDecrypt(P,W.key.buffer,W.iv.buffer);if(!J)return I.executeEnd=l(),O(E);P=new Uint8Array(J)}else return this.decryptionPromise=V.webCryptoDecrypt(P,W.key.buffer,W.iv.buffer).then(function(We){var ze=b.push(We,null,E);return b.decryptionPromise=null,ze}),this.decryptionPromise}var ne=_||U,fe=ne.contiguous,ue=ne.discontinuity,le=ne.trackSwitch,me=ne.accurateTimeOffset,ge=ne.timeOffset,re=C.audioCodec,oe=C.videoCodec,xe=C.defaultInitPts,Be=C.duration,Ve=C.initSegmentData;if((ue||le)&&this.resetInitSegment(Ve,re,oe,Be),ue&&this.resetInitialTimestamp(xe),fe||this.resetContiguity(),this.needsProbing(P,ue,le)){if(B.dataLength){var Ye=B.flush();P=Object(d.appendUint8Array)(Ye,P)}this.configureTransmuxer(P,C)}var $e=this.transmux(P,W,ge,me,E),Ke=this.currentTransmuxState;return Ke.contiguous=!0,Ke.discontinuity=!1,Ke.trackSwitch=!1,I.executeEnd=l(),$e},y.flush=function(p){var c=this,E=p.transmuxing;E.executeStart=l();var _=this.decrypter,b=this.cache,I=this.currentTransmuxState,P=this.decryptionPromise;if(P)return P.then(function(){return c.flush(p)});var B=[],z=I.timeOffset;if(_){var U=_.flush();U&&B.push(this.push(U,null,p))}var C=b.dataLength;b.reset();var W=this.demuxer,V=this.remuxer;if(!W||!V)return C>=o&&this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),E.executeEnd=l(),[O(p)];var J=W.flush(z);return S(J)?J.then(function(ne){return c.flushRemux(B,ne,p),B}):(this.flushRemux(B,J,p),B)},y.flushRemux=function(p,c,E){var _=c.audioTrack,b=c.avcTrack,I=c.id3Track,P=c.textTrack,B=this.currentTransmuxState,z=B.accurateTimeOffset,U=B.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+E.sn+(E.part>-1?" p: "+E.part:"")+" of level "+E.level);var C=this.remuxer.remux(_,b,I,P,U,z,!0,this.id);p.push({remuxResult:C,chunkMeta:E}),E.transmuxing.executeEnd=l()},y.resetInitialTimestamp=function(p){var c=this.demuxer,E=this.remuxer;if(!c||!E)return;c.resetTimeStamp(p),E.resetTimeStamp(p)},y.resetContiguity=function(){var p=this.demuxer,c=this.remuxer;if(!p||!c)return;p.resetContiguity(),c.resetNextTimestamp()},y.resetInitSegment=function(p,c,E,_){var b=this.demuxer,I=this.remuxer;if(!b||!I)return;b.resetInitSegment(c,E,_),I.resetInitSegment(p,c,E)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(p,c,E,_,b){var I;return c&&c.method==="SAMPLE-AES"?I=this.transmuxSampleAes(p,c,E,_,b):I=this.transmuxUnencrypted(p,E,_,b),I},y.transmuxUnencrypted=function(p,c,E,_){var b=this.demuxer.demux(p,c,!1,!this.config.progressive),I=b.audioTrack,P=b.avcTrack,B=b.id3Track,z=b.textTrack,U=this.remuxer.remux(I,P,B,z,c,E,!1,this.id);return{remuxResult:U,chunkMeta:_}},y.transmuxSampleAes=function(p,c,E,_,b){var I=this;return this.demuxer.demuxSampleAes(p,c,E).then(function(P){var B=I.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,E,_,!1,I.id);return{remuxResult:B,chunkMeta:b}})},y.configureTransmuxer=function(p,c){for(var E=this.config,_=this.observer,b=this.typeSupported,I=this.vendor,P=c.audioCodec,B=c.defaultInitPts,z=c.duration,U=c.initSegmentData,C=c.videoCodec,W,V=0,J=i.length;V0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(v=y),v}var O=function(y){return{remuxResult:{},chunkMeta:y}};function S(T){return"then"in T&&T.then instanceof Function}var x=function(y,v,p,c,E){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=v,this.initSegmentData=p,this.duration=c,this.defaultInitPts=E},w=function(y,v,p,c,E){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=v,this.accurateTimeOffset=p,this.trackSwitch=c,this.timeOffset=E}},"./src/demux/tsdemuxer.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"discardEPB",function(){return O});var H=L("./src/demux/adts.ts"),N=L("./src/demux/mpegaudio.ts"),R=L("./src/demux/exp-golomb.ts"),j=L("./src/demux/id3.ts"),k=L("./src/demux/sample-aes.ts"),A=L("./src/events.ts"),D=L("./src/utils/mp4-tools.ts"),g=L("./src/utils/logger.ts"),h=L("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},d=function(){function S(w,T,y){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=w,this.config=T,this.typeSupported=y}S.probe=function(T){var y=S.syncOffset(T);return y<0?!1:(y&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},S.syncOffset=function(T){for(var y=Math.min(1e3,T.length-3*188),v=0;v>4,re=void 0;if(ge>1){if(re=ue+5+T[ue+4],re===ue+188)continue}else re=ue+4;switch(me){case I:le&&(P&&(c=o(P))&&this.parseAVCPES(c,!1),P={data:[],size:0}),P&&(P.data.push(T.subarray(re,ue+188)),P.size+=ue+188-re);break;case B:le&&(U&&(c=o(U))&&(_.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),U={data:[],size:0}),U&&(U.data.push(T.subarray(re,ue+188)),U.size+=ue+188-re);break;case z:le&&(C&&(c=o(C))&&this.parseID3PES(c),C={data:[],size:0}),C&&(C.data.push(T.subarray(re,ue+188)),C.size+=ue+188-re);break;case 0:le&&(re+=T[re]+1),J=this._pmtId=l(T,re);break;case J:{le&&(re+=T[re]+1);var oe=i(T,re,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,v);I=oe.avc,I>0&&(E.pid=I),B=oe.audio,B>0&&(_.pid=B,_.isAAC=oe.isAAC),z=oe.id3,z>0&&(b.pid=z),W&&!V&&(g.logger.log("reparse from beginning"),W=!1,ue=fe-188),V=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!0;break}}else this.observer.emit(A.Events.ERROR,A.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E.pesData=P,_.pesData=U,b.pesData=C;var xe={audioTrack:_,avcTrack:E,id3Track:b,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(xe),xe},x.flush=function(){var T=this.remainderData;this.remainderData=null;var y;return T?y=this.demux(T,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},x.extractRemainingSamples=function(T){var y=T.audioTrack,v=T.avcTrack,p=T.id3Track,c=v.pesData,E=y.pesData,_=p.pesData,b;c&&(b=o(c))?(this.parseAVCPES(b,!0),v.pesData=null):v.pesData=c,E&&(b=o(E))?(y.isAAC?this.parseAACPES(b):this.parseMPEGPES(b),y.pesData=null):(E!=null&&E.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=E),_&&(b=o(_))?(this.parseID3PES(b),p.pesData=null):p.pesData=_},x.demuxSampleAes=function(T,y,v){var p=this.demux(T,v,!0,!this.config.progressive),c=this.sampleAes=new k.default(this.observer,this.config,y);return this.decrypt(p,c)},x.decrypt=function(T,y){return new Promise(function(v){var p=T.audioTrack,c=T.avcTrack;p.samples&&p.isAAC?y.decryptAacSamples(p.samples,0,function(){c.samples?y.decryptAvcSamples(c.samples,0,0,function(){v(T)}):v(T)}):c.samples&&y.decryptAvcSamples(c.samples,0,0,function(){v(T)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(T,y){var v=this,p=this._avcTrack,c=this.parseAVCNALu(T.data),E=!1,_=this.avcSample,b,I=!1;T.data=null,_&&c.length&&!p.audFound&&(n(_,p),_=this.avcSample=s(!1,T.pts,T.dts,"")),c.forEach(function(P){switch(P.type){case 1:{b=!0,_||(_=v.avcSample=s(!0,T.pts,T.dts,"")),E&&(_.debug+="NDR "),_.frame=!0;var B=P.data;if(I&&B.length>4){var z=new R.default(B).readSliceType();(z===2||z===4||z===7||z===9)&&(_.key=!0)}break}case 5:b=!0,_||(_=v.avcSample=s(!0,T.pts,T.dts,"")),E&&(_.debug+="IDR "),_.key=!0,_.frame=!0;break;case 6:{b=!0,E&&_&&(_.debug+="SEI ");var U=new R.default(O(P.data));U.readUByte();for(var C=0,W=0,V=!1,J=0;!V&&U.bytesAvailable>1;){C=0;do J=U.readUByte(),C+=J;while(J===255);W=0;do J=U.readUByte(),W+=J;while(J===255);if(C===4&&U.bytesAvailable!==0){V=!0;var ne=U.readUByte();if(ne===181){var fe=U.readUShort();if(fe===49){var ue=U.readUInt();if(ue===1195456820){var le=U.readUByte();if(le===3){for(var me=U.readUByte(),ge=U.readUByte(),re=31&me,oe=[me,ge],xe=0;xe16){for(var Be=[],Ve=0;Ve<16;Ve++)Be.push(U.readUByte().toString(16)),(Ve===3||Ve===5||Ve===7||Ve===9)&&Be.push("-");for(var Ye=W-16,$e=new Uint8Array(Ye),Ke=0;Ke=0){var U={data:T.subarray(B,_-p-1),type:z};E.push(U)}else{var C=this.getLastNalUnit();if(C&&(c&&_<=4-c&&(C.state&&(C.data=C.data.subarray(0,C.data.byteLength-c))),I=_-p-1,I>0)){var W=new Uint8Array(C.data.byteLength+I);W.set(C.data,0),W.set(T.subarray(0,I),C.data.byteLength),C.data=W,C.state=0}}_=0&&p>=0){var V={data:T.subarray(B,y),type:z,state:p};E.push(V)}if(E.length===0){var J=this.getLastNalUnit();if(J){var ne=new Uint8Array(J.data.byteLength+T.byteLength);ne.set(J.data,0),ne.set(T,J.data.byteLength),J.data=ne}}return v.naluState=p,E},x.parseAACPES=function(T){var y=0,v=this._audioTrack,p=this.aacOverFlow,c=T.data;if(p){this.aacOverFlow=null;var E=p.sample.unit.byteLength,_=Math.min(p.missing,E),b=E-_;p.sample.unit.set(c.subarray(0,_),b),v.samples.push(p.sample),y=p.missing}var I,P;for(I=y,P=c.length;I1;){var E=new Uint8Array(c[0].length+c[1].length);E.set(c[0]),E.set(c[1],c[0].length),c[0]=E,c.splice(1,1)}w=c[0];var _=(w[0]<<16)+(w[1]<<8)+w[2];if(_===1){if(T=(w[4]<<8)+w[5],T&&T>S.size-6)return null;var b=w[7];b&192&&(v=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,b&64?(p=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,v-p>60*9e4&&(g.logger.warn(Math.round((v-p)/9e4)+"s delta between PTS and DTS, align them"),v=p)):p=v),y=w[8];var I=y+9;if(S.size<=I)return null;S.size-=I;for(var P=new Uint8Array(S.size),B=0,z=c.length;BU){I-=U;continue}else w=w.subarray(I),U-=I,I=0;P.set(w,x),x+=U}return T&&(T-=y+3),{data:P,pts:v,dts:p,len:T}}return null}function n(S,x){if(S.units.length&&S.frame){if(S.pts===void 0){var w=x.samples,T=w.length;if(T){var y=w[T-1];S.pts=y.pts,S.dts=y.dts}else{x.dropped++;return}}x.samples.push(S)}S.debug.length&&g.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function f(S,x){var w=S.length;if(w>0){if(x.pts>=S[w-1].pts)S.push(x);else for(var T=w-1;T>=0;T--)if(x.ptsv)return c;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,v=this.autoLevelCapping,p;return v===-1&&y&&y.length?p=y.length-1:p=v,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var v=this.audioTrackController;v&&(v.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var v=this.subtitleTrackController;v&&(v.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var v=this.subtitleTrackController;v&&(v.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:s.hlsDefaultConfig},set:function(y){x.defaultConfig=y}}]),x}();S.defaultConfig=void 0},"./src/is-supported.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"isSupported",function(){return R}),L.d(K,"changeTypeSupported",function(){return j});var H=L("./src/utils/mediasource-helper.ts");function N(){return self.SourceBuffer||self.WebKitSourceBuffer}function R(){var k=Object(H.getMediaSource)();if(!k)return!1;var A=N(),D=k&&typeof k.isTypeSupported=="function"&&k.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!A||A.prototype&&typeof A.prototype.appendBuffer=="function"&&typeof A.prototype.remove=="function";return!!D&&!!g}function j(){var k,A=N();return typeof(A==null||((k=A.prototype)===null||k===void 0)?void 0:k.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return d}),L.d(K,"LoadError",function(){return l});var H=L("./src/polyfills/number.ts"),N=L("./src/errors.ts");function R(i,o){i.prototype=Object.create(o.prototype),i.prototype.constructor=i,g(i,o)}function j(i){var o=typeof Map=="function"?new Map:void 0;return j=function(f){if(f===null||!D(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(f))return o.get(f);o.set(f,O)}function O(){return k(f,arguments,h(this).constructor)}return O.prototype=Object.create(f.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g(O,f)},j(i)}function k(i,o,n){return A()?k=Reflect.construct:k=function(O,S,x){var w=[null];w.push.apply(w,S);var T=Function.bind.apply(O,w),y=new T;return x&&g(y,x.prototype),y},k.apply(null,arguments)}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function D(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function g(i,o){return g=Object.setPrototypeOf||function(f,O){return f.__proto__=O,f},g(i,o)}function h(i){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},h(i)}var u=Math.pow(2,17),d=function(){function i(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var o=i.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(f,O){var S=this,x=f.url;if(!x)return Promise.reject(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var w=this.config,T=w.fLoader,y=w.loader;return new Promise(function(v,p){S.loader&&S.loader.destroy();var c=S.loader=f.loader=T?new T(w):new y(w),E=s(f),_={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:u};f.stats=c.stats,c.load(E,_,{onSuccess:function(I,P,B,z){S.resetLoader(f,c),v({frag:f,part:null,payload:I.data,networkDetails:z})},onError:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:I,networkDetails:B}))},onAbort:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:B}))},onTimeout:function(I,P,B){S.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:B}))},onProgress:function(I,P,B,z){O&&O({frag:f,part:null,payload:B,networkDetails:z})}})})},o.loadPart=function(f,O,S){var x=this;this.abort();var w=this.config,T=w.fLoader,y=w.loader;return new Promise(function(v,p){x.loader&&x.loader.destroy();var c=x.loader=f.loader=T?new T(w):new y(w),E=s(f,O),_={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:u};O.stats=c.stats,c.load(E,_,{onSuccess:function(I,P,B,z){x.resetLoader(f,c),x.updateStatsFromPart(f,O);var U={frag:f,part:O,payload:I.data,networkDetails:z};S(U),v(U)},onError:function(I,P,B){x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:O,response:I,networkDetails:B}))},onAbort:function(I,P,B){f.stats.aborted=O.stats.aborted,x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:O,networkDetails:B}))},onTimeout:function(I,P,B){x.resetLoader(f,c),p(new l({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:O,networkDetails:B}))}})})},o.updateStatsFromPart=function(f,O){var S=f.stats,x=O.stats,w=x.total;if(S.loaded+=x.loaded,w){var T=Math.round(f.duration/O.duration),y=Math.min(Math.round(S.loaded/w),T),v=T-y,p=v*Math.round(S.loaded/y);S.total=S.loaded+p}else S.total=Math.max(S.loaded,S.total);var c=S.loading,E=x.loading;c.start?c.first+=E.first-E.start:(c.start=E.start,c.first=E.first),c.end=E.end},o.resetLoader=function(f,O){f.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},i}();function s(i,o){o===void 0&&(o=null);var n=o||i,f={frag:i,part:o,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},O=n.byteRangeStartOffset,S=n.byteRangeEndOffset;return Object(H.isFiniteNumber)(O)&&Object(H.isFiniteNumber)(S)&&(f.rangeStart=O,f.rangeEnd=S),f}var l=function(i){R(o,i);function o(n){for(var f,O=arguments.length,S=new Array(O>1?O-1:0),x=1;x>8*(15-w)&255;return x},f.setDecryptDataFromLevelKey=function(S,x){var w=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(w=k.LevelKey.fromURI(S.uri),w.method=S.method,w.iv=this.createInitializationVector(x),w.keyFormat="identity"),w},f.setElementaryStreamInfo=function(S,x,w,T,y,v){v===void 0&&(v=!1);var p=this.elementaryStreams,c=p[S];if(!c){p[S]={startPTS:x,endPTS:w,startDTS:T,endDTS:y,partial:v};return}c.startPTS=Math.min(c.startPTS,x),c.endPTS=Math.max(c.endPTS,w),c.startDTS=Math.min(c.startDTS,T),c.endDTS=Math.max(c.endDTS,y)},f.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[d.AUDIO]=null,S[d.VIDEO]=null,S[d.AUDIOVIDEO]=null},u(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&j.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(H.isFiniteNumber)(this.programDateTime))return null;var S=Object(H.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),n}(s),i=function(o){D(n,o);function n(f,O,S,x,w){var T;T=o.call(this,S)||this,T.fragOffset=0,T.duration=0,T.gap=!1,T.independent=!1,T.relurl=void 0,T.fragment=void 0,T.index=void 0,T.stats=new A.LoadStats,T.duration=f.decimalFloatingPoint("DURATION"),T.gap=f.bool("GAP"),T.independent=f.bool("INDEPENDENT"),T.relurl=f.enumeratedString("URI"),T.fragment=O,T.index=x;var y=f.enumeratedString("BYTERANGE");return y&&T.setByteRange(y,w),w&&(T.fragOffset=w.fragOffset+w.duration),T}return u(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),n}(s)},"./src/loader/key-loader.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return j});var H=L("./src/events.ts"),N=L("./src/errors.ts"),R=L("./src/utils/logger.ts"),j=function(){function k(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var A=k.prototype;return A._registerListeners=function(){this.hls.on(H.Events.KEY_LOADING,this.onKeyLoading,this)},A._unregisterListeners=function(){this.hls.off(H.Events.KEY_LOADING,this.onKeyLoading)},A.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var h=this.loaders[g];h&&h.destroy()}this.loaders={}},A.onKeyLoading=function(g,h){var u=h.frag,d=u.type,s=this.loaders[d];if(!u.decryptdata){R.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var l=u.decryptdata.uri;if(l!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(R.logger.warn("abort previous key loader for type:"+d),s.abort()),!l){R.logger.warn("key uri is falsy");return}var o=i.loader,n=u.loader=this.loaders[d]=new o(i);this.decrypturl=l,this.decryptkey=null;var f={url:l,frag:u,responseType:"arraybuffer"},O={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(f,O,S)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(H.Events.KEY_LOADED,{frag:u}))},A.loadsuccess=function(g,h,u){var d=u.frag;if(!d.decryptdata){R.logger.error("after key load, decryptdata unset");return}this.decryptkey=d.decryptdata.key=new Uint8Array(g.data),d.loader=null,delete this.loaders[d.type],this.hls.trigger(H.Events.KEY_LOADED,{frag:d})},A.loaderror=function(g,h){var u=h.frag,d=u.loader;d&&d.abort(),delete this.loaders[u.type],this.hls.trigger(H.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:g})},A.loadtimeout=function(g,h){var u=h.frag,d=u.loader;d&&d.abort(),delete this.loaders[u.type],this.hls.trigger(H.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},k}()},"./src/loader/level-details.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"LevelDetails",function(){return k});var H=L("./src/polyfills/number.ts");function N(A,D){for(var g=0;gh.endSN||u>0||u===0&&d>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},R(A,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(H.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||j}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var u=this.driftEnd-this.driftStart;return u*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),A}()},"./src/loader/level-key.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"LevelKey",function(){return k});var H=L("./node_modules/url-toolkit/src/url-toolkit.js"),N=L.n(H);function R(A,D){for(var g=0;g2){var p=v.shift()+".";return p+=parseInt(v.shift()).toString(16),p+=("000"+parseInt(v.shift()).toString(16)).substr(-4),p}return y},w.resolve=function(y,v){return N.buildAbsoluteURL(v,y,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(y,v){var p=[],c={},E=!1;u.lastIndex=0;for(var _;(_=u.exec(y))!=null;)if(_[1]){var b=new D.AttrList(_[1]),I={attrs:b,bitrate:b.decimalInteger("AVERAGE-BANDWIDTH")||b.decimalInteger("BANDWIDTH"),name:b.NAME,url:w.resolve(_[2],v)},P=b.decimalResolution("RESOLUTION");P&&(I.width=P.width,I.height=P.height),f((b.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=w.convertAVC1ToAVCOTI(I.videoCodec)),p.push(I)}else if(_[3]){var B=new D.AttrList(_[3]);B["DATA-ID"]&&(E=!0,c[B["DATA-ID"]]=B)}return{levels:p,sessionData:E?c:null}},w.parseMasterPlaylistMedia=function(y,v,p,c){c===void 0&&(c=[]);var E,_=[],b=0;for(d.lastIndex=0;(E=d.exec(y))!==null;){var I=new D.AttrList(E[1]);if(I.TYPE===p){var P={attrs:I,bitrate:0,id:b++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:p,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?w.resolve(I.URI,v):""};if(c.length){var B=w.findGroup(c,P.groupId)||c[0];O(P,B,"audioCodec"),O(P,B,"textCodec")}_.push(P)}}return _},w.parseLevelPlaylist=function(y,v,p,c,E){var _=new k.LevelDetails(v),b=_.fragments,I=null,P=0,B=0,z=0,U=0,C=null,W=new j.Fragment(c,v),V,J,ne,fe=-1,ue=!1;for(s.lastIndex=0,_.m3u8=y;(V=s.exec(y))!==null;){ue&&(ue=!1,W=new j.Fragment(c,v),W.start=z,W.sn=P,W.cc=U,W.level=p,I&&(W.initSegment=I,W.rawProgramDateTime=I.rawProgramDateTime));var le=V[1];if(le){W.duration=parseFloat(le);var me=(" "+V[2]).slice(1);W.title=me||null,W.tagList.push(me?["INF",le,me]:["INF",le])}else if(V[3])Object(H.isFiniteNumber)(W.duration)&&(W.start=z,ne&&(W.levelkey=ne),W.sn=P,W.level=p,W.cc=U,W.urlId=E,b.push(W),W.relurl=(" "+V[3]).slice(1),x(W,C),C=W,z+=W.duration,P++,B=0,ue=!0);else if(V[4]){var ge=(" "+V[4]).slice(1);C?W.setByteRange(ge,C):W.setByteRange(ge)}else if(V[5])W.rawProgramDateTime=(" "+V[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),fe===-1&&(fe=b.length);else{if(V=V[0].match(l),!V){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(J=1;J-1){g.logger.warn("Keyformat "+ot+" is not supported from the manifest");continue}else if(ot!=="identity")continue;ze&&(ne=A.LevelKey.fromURL(v,at),at&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ze)>=0&&(ne.method=ze,ne.keyFormat=ot,He&&(ne.keyID=He),Xe&&(ne.keyFormatVersions=Xe),ne.iv=Je));break}case"START":{var dt=new D.AttrList(oe),lt=dt.decimalFloatingPoint("TIME-OFFSET");Object(H.isFiniteNumber)(lt)&&(_.startTimeOffset=lt);break}case"MAP":{var yt=new D.AttrList(oe);W.relurl=yt.URI,yt.BYTERANGE&&W.setByteRange(yt.BYTERANGE),W.level=p,W.sn="initSegment",ne&&(W.levelkey=ne),W.initSegment=null,I=W,ue=!0;break}case"SERVER-CONTROL":{var pt=new D.AttrList(oe);_.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),_.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),_.canSkipDateRanges=_.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),_.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),_.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var be=new D.AttrList(oe);_.partTarget=be.decimalFloatingPoint("PART-TARGET");break}case"PART":{var _e=_.partList;_e||(_e=_.partList=[]);var Ne=B>0?_e[_e.length-1]:void 0,ke=B++,Ee=new j.Part(new D.AttrList(oe),W,v,ke,Ne);_e.push(Ee),W.duration+=Ee.duration;break}case"PRELOAD-HINT":{var Ie=new D.AttrList(oe);_.preloadHint=Ie;break}case"RENDITION-REPORT":{var pe=new D.AttrList(oe);_.renditionReports=_.renditionReports||[],_.renditionReports.push(pe);break}default:g.logger.warn("line parsed but not handled: "+V);break}}}C&&!C.relurl?(b.pop(),z-=C.duration,_.partList&&(_.fragmentHint=C)):_.partList&&(x(W,C),W.cc=U,_.fragmentHint=W);var ae=b.length,ie=b[0],Q=b[ae-1];if(z+=_.skippedSegments*_.targetduration,z>0&&ae&&Q){_.averagetargetduration=z/ae;var q=Q.sn;_.endSN=q!=="initSegment"?q:0,ie&&(_.startCC=ie.cc,ie.initSegment||_.fragments.every(function(te){return te.relurl&&o(te.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new j.Fragment(c,v),W.relurl=Q.relurl,W.level=p,W.sn="initSegment",ie.initSegment=W,_.needSidxRanges=!0))}else _.endSN=0,_.startCC=0;return _.fragmentHint&&(z+=_.fragmentHint.duration),_.totalduration=z,_.endCC=U,fe>0&&S(b,fe),_},w}();function f(w,T){["video","audio","text"].forEach(function(y){var v=w.filter(function(c){return Object(h.isCodecType)(c,y)});if(v.length){var p=v.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});T[y+"Codec"]=p.length>0?p[0]:v[0],w=w.filter(function(c){return v.indexOf(c)===-1})}}),T.unknownCodecs=w}function O(w,T,y){var v=T[y];v&&(w[y]=v)}function S(w,T){for(var y=w[T],v=T;v--;){var p=w[v];if(!p)return;p.programDateTime=y.programDateTime-p.duration*1e3,y=p}}function x(w,T){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):T!=null&&T.programDateTime&&(w.programDateTime=T.endProgramDateTime),Object(H.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Y,K,L){"use strict";L.r(K);var H=L("./src/polyfills/number.ts"),N=L("./src/events.ts"),R=L("./src/errors.ts"),j=L("./src/utils/logger.ts"),k=L("./src/utils/mp4-tools.ts"),A=L("./src/loader/m3u8-parser.ts"),D=L("./src/types/loader.ts"),g=L("./src/utils/attr-list.ts");function h(s){var l=s.type;switch(l){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function u(s,l){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=l.url),i}var d=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var l=s.prototype;return l.registerListeners=function(){var o=this.hls;o.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.unregisterListeners=function(){var o=this.hls;o.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.createInternalLoader=function(o){var n=this.hls.config,f=n.pLoader,O=n.loader,S=f||O,x=new S(n);return o.loader=x,this.loaders[o.type]=x,x},l.getInternalLoader=function(o){return this.loaders[o.type]},l.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},l.destroyInternalLoaders=function(){for(var o in this.loaders){var n=this.loaders[o];n&&n.destroy(),this.resetInternalLoader(o)}},l.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},l.onManifestLoading=function(o,n){var f=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},l.onLevelLoading=function(o,n){var f=n.id,O=n.level,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:null,level:O,responseType:"text",type:D.PlaylistContextType.LEVEL,url:S,deliveryDirectives:x})},l.onAudioTrackLoading=function(o,n){var f=n.id,O=n.groupId,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:x})},l.onSubtitleTrackLoading=function(o,n){var f=n.id,O=n.groupId,S=n.url,x=n.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:x})},l.load=function(o){var n,f=this.hls.config,O=this.getInternalLoader(o);if(O){var S=O.context;if(S&&S.url===o.url){j.logger.trace("[playlist-loader]: playlist request ongoing");return}j.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),O.abort()}var x,w,T,y;switch(o.type){case D.PlaylistContextType.MANIFEST:x=f.manifestLoadingMaxRetry,w=f.manifestLoadingTimeOut,T=f.manifestLoadingRetryDelay,y=f.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:x=0,w=f.levelLoadingTimeOut;break;default:x=f.levelLoadingMaxRetry,w=f.levelLoadingTimeOut,T=f.levelLoadingRetryDelay,y=f.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(o),(n=o.deliveryDirectives)!==null&&n!==void 0&&n.part){var v;if(o.type===D.PlaylistContextType.LEVEL&&o.level!==null?v=this.hls.levels[o.level].details:o.type===D.PlaylistContextType.AUDIO_TRACK&&o.id!==null?v=this.hls.audioTracks[o.id].details:o.type===D.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(v=this.hls.subtitleTracks[o.id].details),v){var p=v.partTarget,c=v.targetduration;p&&c&&(w=Math.min(Math.max(p*3,c*.8)*1e3,w))}}var E={timeout:w,maxRetry:x,retryDelay:T,maxRetryDelay:y,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(o,E,_)},l.loadsuccess=function(o,n,f,O){if(O===void 0&&(O=null),f.isSidxRequest){this.handleSidxRequest(o,f),this.handlePlaylistLoaded(o,n,f,O);return}this.resetInternalLoader(f.type);var S=o.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,f,"no EXTM3U delimiter",O);return}n.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,n,f,O):this.handleMasterPlaylist(o,n,f,O)},l.loaderror=function(o,n,f){f===void 0&&(f=null),this.handleNetworkError(n,f,!1,o)},l.loadtimeout=function(o,n,f){f===void 0&&(f=null),this.handleNetworkError(n,f,!0)},l.handleMasterPlaylist=function(o,n,f,O){var S=this.hls,x=o.data,w=u(o,f),T=A.default.parseMasterPlaylist(x,w),y=T.levels,v=T.sessionData;if(!y.length){this.handleManifestParsingError(o,f,"no level found in manifest",O);return}var p=y.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),c=y.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),E=A.default.parseMasterPlaylistMedia(x,w,"AUDIO",p),_=A.default.parseMasterPlaylistMedia(x,w,"SUBTITLES",c),b=A.default.parseMasterPlaylistMedia(x,w,"CLOSED-CAPTIONS");if(E.length){var I=E.some(function(P){return!P.url});!I&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(j.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),E.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}S.trigger(N.Events.MANIFEST_LOADED,{levels:y,audioTracks:E,subtitles:_,captions:b,url:w,stats:n,networkDetails:O,sessionData:v})},l.handleTrackOrLevelPlaylist=function(o,n,f,O){var S=this.hls,x=f.id,w=f.level,T=f.type,y=u(o,f),v=Object(H.isFiniteNumber)(x)?x:0,p=Object(H.isFiniteNumber)(w)?w:v,c=h(f),E=A.default.parseLevelPlaylist(o.data,y,p,c,v);if(!E.fragments.length){S.trigger(N.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(T===D.PlaylistContextType.MANIFEST){var _={attrs:new g.AttrList({}),bitrate:0,details:E,name:"",url:y};S.trigger(N.Events.MANIFEST_LOADED,{levels:[_],audioTracks:[],url:y,stats:n,networkDetails:O,sessionData:null})}if(n.parsing.end=performance.now(),E.needSidxRanges){var b,I=(b=E.fragments[0].initSegment)===null||b===void 0?void 0:b.url;this.load({url:I,isSidxRequest:!0,type:T,level:w,levelDetails:E,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=E,this.handlePlaylistLoaded(o,n,f,O)},l.handleSidxRequest=function(o,n){var f=Object(k.parseSegmentIndex)(new Uint8Array(o.data));if(!f)return;var O=f.references,S=n.levelDetails;O.forEach(function(x,w){var T=x.info,y=S.fragments[w];y.byteRange.length===0&&y.setByteRange(String(1+T.end-T.start)+"@"+String(T.start)),y.initSegment&&y.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},l.handleManifestParsingError=function(o,n,f,O){this.hls.trigger(N.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===D.PlaylistContextType.MANIFEST,url:o.url,reason:f,response:o,context:n,networkDetails:O})},l.handleNetworkError=function(o,n,f,O){f===void 0&&(f=!1),j.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var S=R.ErrorDetails.UNKNOWN,x=!1,w=this.getInternalLoader(o);switch(o.type){case D.PlaylistContextType.MANIFEST:S=f?R.ErrorDetails.MANIFEST_LOAD_TIMEOUT:R.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case D.PlaylistContextType.LEVEL:S=f?R.ErrorDetails.LEVEL_LOAD_TIMEOUT:R.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.AUDIO_TRACK:S=f?R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:S=f?R.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:R.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}w&&this.resetInternalLoader(o.type);var T={type:R.ErrorTypes.NETWORK_ERROR,details:S,fatal:x,url:o.url,loader:w,context:o,networkDetails:n};O&&(T.response=O),this.hls.trigger(N.Events.ERROR,T)},l.handlePlaylistLoaded=function(o,n,f,O){var S=f.type,x=f.level,w=f.id,T=f.groupId,y=f.loader,v=f.levelDetails,p=f.deliveryDirectives;if(!(v!=null&&v.targetduration)){this.handleManifestParsingError(o,f,"invalid target duration",O);return}if(!y)return;v.live&&(y.getCacheAge&&(v.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(v.ageHeader))&&(v.ageHeader=0));switch(S){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(N.Events.LEVEL_LOADED,{details:v,level:x||0,id:w||0,stats:n,networkDetails:O,deliveryDirectives:p});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(N.Events.AUDIO_TRACK_LOADED,{details:v,id:w||0,groupId:T||"",stats:n,networkDetails:O,deliveryDirectives:p});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADED,{details:v,id:w||0,groupId:T||"",stats:n,networkDetails:O,deliveryDirectives:p});break}},s}();K.default=d},"./src/polyfills/number.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"isFiniteNumber",function(){return H}),L.d(K,"MAX_SAFE_INTEGER",function(){return N});var H=Number.isFinite||function(R){return typeof R=="number"&&isFinite(R)},N=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Y,K,L){"use strict";L.r(K);var H=function(){function N(){}return N.getSilentFrame=function(j,k){switch(j){case"mp4a.40.2":if(k===1)return new Uint8Array([0,200,0,128,35,128]);if(k===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(k===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(k===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(k===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(k===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(k===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},N}();K.default=H},"./src/remux/mp4-generator.ts":function(Y,K,L){"use strict";L.r(K);var H=Math.pow(2,32)-1,N=function(){function R(){}return R.init=function(){R.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var k;for(k in R.types)R.types.hasOwnProperty(k)&&(R.types[k]=[k.charCodeAt(0),k.charCodeAt(1),k.charCodeAt(2),k.charCodeAt(3)]);var A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),D=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);R.HDLR_TYPES={video:A,audio:D};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);R.STTS=R.STSC=R.STCO=h,R.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),R.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),R.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),d=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);R.FTYP=R.box(R.types.ftyp,u,s,u,d),R.DINF=R.box(R.types.dinf,R.box(R.types.dref,g))},R.box=function(k){for(var A=8,D=arguments.length,g=new Array(D>1?D-1:0),h=1;h>24&255,s[1]=A>>16&255,s[2]=A>>8&255,s[3]=A&255,s.set(k,4),u=0,A=8;u>24&255,k>>16&255,k>>8&255,k&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},R.mdia=function(k){return R.box(R.types.mdia,R.mdhd(k.timescale,k.duration),R.hdlr(k.type),R.minf(k))},R.mfhd=function(k){return R.box(R.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},R.minf=function(k){return k.type==="audio"?R.box(R.types.minf,R.box(R.types.smhd,R.SMHD),R.DINF,R.stbl(k)):R.box(R.types.minf,R.box(R.types.vmhd,R.VMHD),R.DINF,R.stbl(k))},R.moof=function(k,A,D){return R.box(R.types.moof,R.mfhd(k),R.traf(D,A))},R.moov=function(k){for(var A=k.length,D=[];A--;)D[A]=R.trak(k[A]);return R.box.apply(null,[R.types.moov,R.mvhd(k[0].timescale,k[0].duration)].concat(D).concat(R.mvex(k)))},R.mvex=function(k){for(var A=k.length,D=[];A--;)D[A]=R.trex(k[A]);return R.box.apply(null,[R.types.mvex].concat(D))},R.mvhd=function(k,A){A*=k;var D=Math.floor(A/(H+1)),g=Math.floor(A%(H+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,D>>24,D>>16&255,D>>8&255,D&255,g>>24,g>>16&255,g>>8&255,g&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return R.box(R.types.mvhd,h)},R.sdtp=function(k){var A=k.samples||[],D=new Uint8Array(4+A.length),g,h;for(g=0;g>>8&255),A.push(u&255),A=A.concat(Array.prototype.slice.call(h));for(g=0;g>>8&255),D.push(u&255),D=D.concat(Array.prototype.slice.call(h));var d=R.box(R.types.avcC,new Uint8Array([1,A[3],A[4],A[5],252|3,224|k.sps.length].concat(A).concat([k.pps.length]).concat(D))),s=k.width,l=k.height,i=k.pixelRatio[0],o=k.pixelRatio[1];return R.box(R.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,l>>8&255,l&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),d,R.box(R.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),R.box(R.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,o>>24,o>>16&255,o>>8&255,o&255])))},R.esds=function(k){var A=k.config.length;return new Uint8Array([0,0,0,0,3,23+A,0,1,0,4,15+A,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([A]).concat(k.config).concat([6,1,2]))},R.mp4a=function(k){var A=k.samplerate;return R.box(R.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,A>>8&255,A&255,0,0]),R.box(R.types.esds,R.esds(k)))},R.mp3=function(k){var A=k.samplerate;return R.box(R.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,A>>8&255,A&255,0,0]))},R.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?R.box(R.types.stsd,R.STSD,R.mp3(k)):R.box(R.types.stsd,R.STSD,R.mp4a(k)):R.box(R.types.stsd,R.STSD,R.avc1(k))},R.tkhd=function(k){var A=k.id,D=k.duration*k.timescale,g=k.width,h=k.height,u=Math.floor(D/(H+1)),d=Math.floor(D%(H+1));return R.box(R.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,A>>24&255,A>>16&255,A>>8&255,A&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,d>>24,d>>16&255,d>>8&255,d&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,g>>8&255,g&255,0,0,h>>8&255,h&255,0,0]))},R.traf=function(k,A){var D=R.sdtp(k),g=k.id,h=Math.floor(A/(H+1)),u=Math.floor(A%(H+1));return R.box(R.types.traf,R.box(R.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),R.box(R.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,u>>24,u>>16&255,u>>8&255,u&255])),R.trun(k,D.length+16+20+8+16+8+8),D)},R.trak=function(k){return k.duration=k.duration||4294967295,R.box(R.types.trak,R.tkhd(k),R.mdia(k))},R.trex=function(k){var A=k.id;return R.box(R.types.trex,new Uint8Array([0,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},R.trun=function(k,A){var D=k.samples||[],g=D.length,h=12+16*g,u=new Uint8Array(h),d,s,l,i,o,n;for(A+=8+h,u.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,A>>>24&255,A>>>16&255,A>>>8&255,A&255],0),d=0;d>>24&255,l>>>16&255,l>>>8&255,l&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*d);return R.box(R.types.trun,u)},R.initSegment=function(k){R.types||R.init();var A=R.moov(k),D=new Uint8Array(R.FTYP.byteLength+A.byteLength);return D.set(R.FTYP),D.set(A,R.FTYP.byteLength),D},R}();N.types=void 0,N.HDLR_TYPES=void 0,N.STTS=void 0,N.STSC=void 0,N.STCO=void 0,N.STSZ=void 0,N.VMHD=void 0,N.SMHD=void 0,N.STSD=void 0,N.FTYP=void 0,N.DINF=void 0,K.default=N},"./src/remux/mp4-remuxer.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return n}),L.d(K,"normalizePts",function(){return f});var H=L("./src/polyfills/number.ts"),N=L("./src/remux/aac-helper.ts"),R=L("./src/remux/mp4-generator.ts"),j=L("./src/events.ts"),k=L("./src/errors.ts"),A=L("./src/utils/logger.ts"),D=L("./src/types/loader.ts"),g=L("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(w){for(var T=1;T0?E:_.pts},v[0].pts);return p&&A.logger.debug("PTS rollover detected"),c},T.remux=function(v,p,c,E,_,b,I,P){var B,z,U,C,W,V,J=_,ne=_,fe=v.pid>-1,ue=p.pid>-1,le=p.samples.length,me=v.samples.length>0,ge=le>1,re=(!fe||me)&&(!ue||ge)||this.ISGenerated||I;if(re){this.ISGenerated||(U=this.generateIS(v,p,_));var oe=this.isVideoContiguous,xe=-1;if(ge&&(xe=O(p.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(V=!0,xe>0){A.logger.warn("[mp4-remuxer]: Dropped "+xe+" out of "+le+" video samples due to a missing keyframe");var Be=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(xe),p.dropped+=xe,ne+=(p.samples[0].pts-Be)/(p.timescale||9e4)}else xe===-1&&(A.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),V=!1);if(this.ISGenerated){if(me&&ge){var Ve=this.getVideoStartPts(p.samples),Ye=f(v.samples[0].pts,Ve)-Ve,$e=Ye/p.inputTimeScale;J+=Math.max(0,$e),ne+=Math.max(0,-$e)}if(me){if(v.samplerate||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(v,p,_)),z=this.remuxAudio(v,J,this.isAudioContiguous,b,ue||ge||P===D.PlaylistLevelType.AUDIO?ne:void 0),ge){var Ke=z?z.endPTS-z.startPTS:0;p.inputTimeScale||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(v,p,_)),B=this.remuxVideo(p,ne,oe,Ke)}}else ge&&(B=this.remuxVideo(p,ne,oe,0));B&&(B.firstKeyFrame=xe,B.independent=xe!==-1)}}return this.ISGenerated&&(c.samples.length&&(W=this.remuxID3(c,_)),E.samples.length&&(C=this.remuxText(E,_))),{audio:z,video:B,initSegment:U,independent:V,text:C,id3:W}},T.generateIS=function(v,p,c){var E=v.samples,_=p.samples,b=this.typeSupported,I={},P=!Object(H.isFiniteNumber)(this._initPTS),B="audio/mp4",z,U,C;if(P&&(z=U=Infinity),v.config&&E.length&&(v.timescale=v.samplerate,v.isAAC||(b.mpeg?(B="audio/mpeg",v.codec=""):b.mp3&&(v.codec="mp3")),I.audio={id:"audio",container:B,codec:v.codec,initSegment:!v.isAAC&&b.mpeg?new Uint8Array(0):R.default.initSegment([v]),metadata:{channelCount:v.channelCount}},P&&(C=v.inputTimeScale,z=U=E[0].pts-Math.round(C*c))),p.sps&&p.pps&&_.length&&(p.timescale=p.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:R.default.initSegment([p]),metadata:{width:p.width,height:p.height}},P)){C=p.inputTimeScale;var W=this.getVideoStartPts(_),V=Math.round(C*c);U=Math.min(U,f(_[0].dts,W)-V),z=Math.min(z,W-V)}if(Object.keys(I).length)return this.ISGenerated=!0,P&&(this._initPTS=z,this._initDTS=U),{tracks:I,initPTS:z,timescale:C}},T.remuxVideo=function(v,p,c,E){var _=v.inputTimeScale,b=v.samples,I=[],P=b.length,B=this._initPTS,z=this.nextAvcDts,U=8,C,W,V,J=Number.POSITIVE_INFINITY,ne=Number.NEGATIVE_INFINITY,fe=0,ue=!1;if(!c||z===null){var le=p*_,me=b[0].pts-f(b[0].dts,b[0].pts);z=le-me}for(var ge=0;gere.pts){var oe=9e4*.2;fe=Math.max(Math.min(fe,re.pts-re.dts),-1*oe)}re.dts0?ge-1:ge].dts&&(ue=!0)}ue&&b.sort(function(rt,Me){var Ue=rt.dts-Me.dts,we=rt.pts-Me.pts;return Ue||we}),W=b[0].dts,V=b[b.length-1].dts;var xe=Math.round((V-W)/(P-1));if(fe<0){if(fexe,We=$e<-1;if(Ke||We){Ke?A.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)($e,!0)+" ms ("+$e+"dts) hole between fragments detected, filling it"):A.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-$e,!0)+" ms ("+$e+"dts) overlapping between fragments detected"),W=z;var ze=b[0].pts-$e;b[0].dts=W,b[0].pts=ze,A.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(ze,!0)+"/"+Object(g.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(g.toMsFromMpegTsClock)($e,!0)+" ms")}}o&&(W=Math.max(0,W));for(var at=0,Je=0,Xe=0;Xe0?_e-1:_e].dts;if(q.stretchShortVideoTrack&&this.nextAudioPts!==null){var se=Math.floor(q.maxBufferHole*_),ce=(E?J+E*_:this.nextAudioPts)-Ne.pts;ce>se?(C=ce-te,C<0&&(C=te),A.logger.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+C/90+" ms for the last video frame.")):C=te}else C=te}var Se=Math.round(Ne.pts-Ne.dts);I.push(new S(Ne.key,C,Ee,Se))}if(I.length&&l&&l<70){var je=I[0].flags;je.dependsOn=2,je.isNonSync=0}console.assert(C!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=V+C,this.isVideoContiguous=!0;var Ze=R.default.moof(v.sequenceNumber++,W,h({},v,{samples:I})),ut="video",it={data1:Ze,data2:pt,startPTS:J/_,endPTS:(ne+C)/_,startDTS:W/_,endDTS:z/_,type:ut,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:v.dropped};return v.samples=[],v.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),it},T.remuxAudio=function(v,p,c,E,_){var b=v.inputTimeScale,I=v.samplerate?v.samplerate:b,P=b/I,B=v.isAAC?d:s,z=B*P,U=this._initPTS,C=!v.isAAC&&this.typeSupported.mpeg,W=[],V=v.samples,J=C?0:8,ne=this.nextAudioPts||-1,fe=p*b;if(this.isAudioContiguous=c=c||V.length&&ne>0&&(E&&Math.abs(fe-ne)<9e3||Math.abs(f(V[0].pts-U,fe)-ne)<20*z),V.forEach(function(ie){ie.pts=f(ie.pts-U,fe)}),!c||ne<0){if(V=V.filter(function(ie){return ie.pts>=0}),!V.length)return;_===0?ne=0:E?ne=Math.max(0,fe):ne=V[0].pts}if(v.isAAC)for(var ue=_!==void 0,le=this.config.maxAudioFramesDrift,me=0,ge=ne;me=le*z&&Be0){Je+=J;try{at=new Uint8Array(Je)}catch(ie){this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:k.ErrorTypes.MUX_ERROR,details:k.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Je,reason:"fail allocating audio mdat "+Je});return}if(!C){var pt=new DataView(at.buffer);pt.setUint32(0,Je),at.set(R.default.types.mdat,4)}}else return;at.set(dt,J);var be=dt.byteLength;J+=be,W.push(new S(!0,B,be,0)),ze=lt}var _e=W.length;if(!_e)return;var Ne=W[W.length-1];this.nextAudioPts=ne=ze+P*Ne.duration;var ke=C?new Uint8Array(0):R.default.moof(v.sequenceNumber++,We/P,h({},v,{samples:W}));v.samples=[];var Ee=We/b,Ie=ne/b,pe="audio",ae={data1:ke,data2:at,startPTS:Ee,endPTS:Ie,startDTS:Ee,endDTS:Ie,type:pe,hasAudio:!0,hasVideo:!1,nb:_e};return this.isAudioContiguous=!0,console.assert(at.length,"MDAT length must not be zero"),ae},T.remuxEmptyAudio=function(v,p,c,E){var _=v.inputTimeScale,b=v.samplerate?v.samplerate:_,I=_/b,P=this.nextAudioPts,B=(P!==null?P:E.startDTS*_)+this._initDTS,z=E.endDTS*_+this._initDTS,U=I*d,C=Math.ceil((z-B)/U),W=N.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);if(A.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){A.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var V=[],J=0;J4294967296;)w+=y;return w}function O(w){for(var T=0;T0?this.lastEndDTS=v:(j.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!w.audio,c=!!w.video,E="";p&&(E+="audio"),c&&(E+="video");var _={data1:S,startPTS:y,startDTS:y,endPTS:v,endDTS:v,type:E,hasAudio:p,hasVideo:c,nb:1,dropped:0};return O.audio=_.type==="audio"?_:void 0,O.video=_.type!=="audio"?_:void 0,O.text=i,O.id3=l,O.initSegment=x,O},g}(),A=function(h,u,d){return Object(N.getStartDTS)(h,u)-d};function D(g,h){var u=g==null?void 0:g.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||h===R.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}K.default=k},"./src/task-loop.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"default",function(){return H});var H=function(){function N(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var R=N.prototype;return R.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},R.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},R.onHandlerDestroyed=function(){},R.hasInterval=function(){return!!this._tickInterval},R.hasNextTick=function(){return!!this._tickTimer},R.setInterval=function(k){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,k),!0)},R.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},R.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},R.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},R.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},R.doTick=function(){},N}()},"./src/types/cmcd.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"CMCDVersion",function(){return H}),L.d(K,"CMCDObjectType",function(){return N}),L.d(K,"CMCDStreamingFormat",function(){return R}),L.d(K,"CMCDStreamType",function(){return j});var H=1,N;(function(k){k.MANIFEST="m",k.AUDIO="a",k.VIDEO="v",k.MUXED="av",k.INIT="i",k.CAPTION="c",k.TIMED_TEXT="tt",k.KEY="k",k.OTHER="o"})(N||(N={}));var R;(function(k){k.DASH="d",k.HLS="h",k.SMOOTH="s",k.OTHER="o"})(R||(R={}));var j;(function(k){k.VOD="v",k.LIVE="l"})(j||(j={}))},"./src/types/level.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"HlsSkip",function(){return R}),L.d(K,"getSkipValue",function(){return j}),L.d(K,"HlsUrlParameters",function(){return k}),L.d(K,"Level",function(){return A});function H(D,g){for(var h=0;hNumber.MAX_SAFE_INTEGER?Infinity:g},k.hexadecimalInteger=function(D){if(this[D]){var g=(this[D]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var h=new Uint8Array(g.length/2),u=0;uNumber.MAX_SAFE_INTEGER?Infinity:g},k.decimalFloatingPoint=function(D){return parseFloat(this[D])},k.optionalFloat=function(D,g){var h=this[D];return h?parseFloat(h):g},k.enumeratedString=function(D){return this[D]},k.bool=function(D){return this[D]==="YES"},k.decimalResolution=function(D){var g=H.exec(this[D]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},j.parseAttrList=function(D){var g,h={},u='"';for(N.lastIndex=0;(g=N.exec(D))!==null;){var d=g[2];d.indexOf(u)===0&&d.lastIndexOf(u)===d.length-1&&(d=d.slice(1,-1)),h[g[1]]=d}return h},j}()},"./src/utils/binary-search.ts":function(Y,K,L){"use strict";L.r(K);var H={search:function(R,j){for(var k=0,A=R.length-1,D=null,g=null;k<=A;){D=(k+A)/2|0,g=R[D];var h=j(g);if(h>0)k=D+1;else if(h<0)A=D-1;else return g}return null}};K.default=H},"./src/utils/buffer-helper.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"BufferHelper",function(){return R});var H=L("./src/utils/logger.ts"),N={length:0,start:function(){return 0},end:function(){return 0}},R=function(){function j(){}return j.isBuffered=function(A,D){try{if(A){for(var g=j.getBuffered(A),h=0;h=g.start(h)&&D<=g.end(h))return!0}}catch(u){}return!1},j.bufferInfo=function(A,D,g){try{if(A){var h=j.getBuffered(A),u=[],d;for(d=0;ds&&(h[d-1].end=A[u].end):h.push(A[u])}else h.push(A[u])}else h=A;for(var l=0,i,o=D,n=D,f=0;f=O&&D=c&&H.logger.log(this.time+" ["+c+"] "+E)},y}(),l=function(v){for(var p=[],c=0;ck&&(this.logger.log(d.DEBUG,"Too large cursor position "+this.pos),this.pos=k)},v.moveCursor=function(c){var E=this.pos+c;if(c>1)for(var _=this.pos+1;_=144&&this.backSpace();var E=R(c);if(this.pos>=k){this.logger.log(d.ERROR,"Cannot insert "+c.toString(16)+" ("+E+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(E,this.currPenState),this.moveCursor(1)},v.clearFromPos=function(c){var E;for(E=c;E0&&(c?_="["+E.join(" | ")+"]":_=E.join(` `)),_},v.getTextAndFormat=function(){return this.rows},y}(),O=function(){function y(p,c,E){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=p,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new f(E),this.nonDisplayedMemory=new f(E),this.lastOutputScreen=new f(E),this.currRollUpRow=this.displayedMemory.rows[j-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=E}var v=y.prototype;return v.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[j-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},v.getHandler=function(){return this.outputFilter},v.setHandler=function(c){this.outputFilter=c},v.setPAC=function(c){this.writeScreen.setPAC(c)},v.setBkgData=function(c){this.writeScreen.setBkgData(c)},v.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(d.INFO,"MODE="+c),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=c},v.insertChars=function(c){for(var E=0;E=46,E.italics)E.foreground="white";else{var _=Math.floor(c/2)-16,b=["white","green","blue","cyan","red","yellow","magenta"];E.foreground=b[_]}this.logger.log(d.INFO,"MIDROW: "+JSON.stringify(E)),this.writeScreen.setPen(E)},v.outputDataUpdate=function(c){c===void 0&&(c=!1);var E=this.logger.time;if(E===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=E:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,E,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:E),this.lastOutputScreen.copy(this.displayedMemory))},v.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},y}(),S=function(){function y(p,c,E){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var _=new s;this.channels=[null,new O(p,c,_),new O(p+1,E,_)],this.cmdHistory=T(),this.logger=_}var v=y.prototype;return v.getHandler=function(c){return this.channels[c].getHandler()},v.setHandler=function(c,E){this.channels[c].setHandler(E)},v.addData=function(c,E){var _,b,I,P=!1;this.logger.time=c;for(var B=0;B ("+l([b,I])+")"),_=this.parseCmd(b,I),_||(_=this.parseMidrow(b,I)),_||(_=this.parsePAC(b,I)),_||(_=this.parseBackgroundAttributes(b,I)),!_&&(P=this.parseChars(b,I),P)){var z=this.currentChannel;if(z&&z>0){var U=this.channels[z];U.insertChars(P)}else this.logger.log(d.WARNING,"No channel found yet. TEXT-MODE?")}!_&&!P&&this.logger.log(d.WARNING,"Couldn't parse cleaned data "+l([b,I])+" orig: "+l([E[B],E[B+1]]))}},v.parseCmd=function(c,E){var _=this.cmdHistory,b=(c===20||c===28||c===21||c===29)&&E>=32&&E<=47,I=(c===23||c===31)&&E>=33&&E<=35;if(!(b||I))return!1;if(w(c,E,_))return x(null,null,_),this.logger.log(d.DEBUG,"Repeated command ("+l([c,E])+") is dropped"),!0;var P=c===20||c===21||c===23?1:2,B=this.channels[P];return c===20||c===21||c===28||c===29?E===32?B.ccRCL():E===33?B.ccBS():E===34?B.ccAOF():E===35?B.ccAON():E===36?B.ccDER():E===37?B.ccRU(2):E===38?B.ccRU(3):E===39?B.ccRU(4):E===40?B.ccFON():E===41?B.ccRDC():E===42?B.ccTR():E===43?B.ccRTD():E===44?B.ccEDM():E===45?B.ccCR():E===46?B.ccENM():E===47&&B.ccEOC():B.ccTO(E-32),x(c,E,_),this.currentChannel=P,!0},v.parseMidrow=function(c,E){var _=0;if((c===17||c===25)&&E>=32&&E<=47){if(c===17?_=1:_=2,_!==this.currentChannel)return this.logger.log(d.ERROR,"Mismatch channel in midrow parsing"),!1;var b=this.channels[_];return b?(b.ccMIDROW(E),this.logger.log(d.DEBUG,"MIDROW ("+l([c,E])+")"),!0):!1}return!1},v.parsePAC=function(c,E){var _,b=this.cmdHistory,I=(c>=17&&c<=23||c>=25&&c<=31)&&E>=64&&E<=127,P=(c===16||c===24)&&E>=64&&E<=95;if(!(I||P))return!1;if(w(c,E,b))return x(null,null,b),!0;var B=c<=23?1:2;E>=64&&E<=95?_=B===1?A[c]:g[c]:_=B===1?D[c]:h[c];var z=this.channels[B];return z?(z.setPAC(this.interpretPAC(_,E)),x(c,E,b),this.currentChannel=B,!0):!1},v.interpretPAC=function(c,E){var _,b={color:null,italics:!1,indent:null,underline:!1,row:c};return E>95?_=E-96:_=E-64,b.underline=(_&1)===1,_<=13?b.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(_/2)]:_<=15?(b.italics=!0,b.color="white"):b.indent=Math.floor((_-16)/2)*4,b},v.parseChars=function(c,E){var _,b=null,I=null;if(c>=25?(_=2,I=c-8):(_=1,I=c),I>=17&&I<=19){var P;I===17?P=E+80:I===18?P=E+112:P=E+144,this.logger.log(d.INFO,"Special char '"+R(P)+"' in channel "+_),b=[P]}else c>=32&&c<=127&&(b=E===0?[c]:[c,E]);if(b){var B=l(b);this.logger.log(d.DEBUG,"Char codes = "+B.join(",")),x(c,E,this.cmdHistory)}return b},v.parseBackgroundAttributes=function(c,E){var _=(c===16||c===24)&&E>=32&&E<=47,b=(c===23||c===31)&&E>=45&&E<=47;if(!(_||b))return!1;var I,P={};c===16||c===24?(I=Math.floor((E-32)/2),P.background=u[I],E%2===1&&(P.background=P.background+"_semi")):E===45?P.background="transparent":(P.foreground="black",E===47&&(P.underline=!0));var B=c<=23?1:2,z=this.channels[B];return z.setBkgData(P),x(c,E,this.cmdHistory),!0},v.reset=function(){for(var c=0;c=16?o--:o++;var x=Object(H.fixLineBreaks)(n.trim()),w=Object(N.generateCueId)(g,h,x);(!D||!D.cues||!D.cues.getCueById(w))&&(l=new f(g,h,x),l.id=w,l.line=O+1,l.align="left",l.position=10+Math.min(80,Math.floor(o*8/32)*10),d.push(l))}return D&&d.length&&(d.sort(function(T,y){return T.line==="auto"||y.line==="auto"?0:T.line>8&&y.line>8?y.line-T.line:T.line-y.line}),d.forEach(function(T){return Object(R.addCueToTrack)(D,T)})),d}};K.default=k},"./src/utils/discontinuities.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"findFirstFragWithCC",function(){return j}),L.d(K,"shouldAlignOnDiscontinuities",function(){return k}),L.d(K,"findDiscontinuousReferenceFrag",function(){return A}),L.d(K,"adjustSlidingStart",function(){return g}),L.d(K,"alignStream",function(){return h}),L.d(K,"alignPDT",function(){return d}),L.d(K,"alignFragmentByPDTDelta",function(){return s}),L.d(K,"alignMediaPlaylistByPDT",function(){return l});var H=L("./src/polyfills/number.ts"),N=L("./src/utils/logger.ts"),R=L("./src/controller/level-helper.ts");function j(i,o){for(var n=null,f=0,O=i.length;fn.startCC||i&&i.cc=this.minWeight_},j.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},j.destroy=function(){},R}();K.default=N},"./src/utils/ewma.ts":function(Y,K,L){"use strict";L.r(K);var H=function(){function N(j,k,A){k===void 0&&(k=0),A===void 0&&(A=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=j,this.alpha_=j?Math.exp(Math.log(.5)/j):0,this.estimate_=k,this.totalWeight_=A}var R=N.prototype;return R.sample=function(k,A){var D=Math.pow(this.alpha_,k);this.estimate_=A*(1-D)+D*this.estimate_,this.totalWeight_+=k},R.getTotalWeight=function(){return this.totalWeight_},R.getEstimate=function(){if(this.alpha_){var k=1-Math.pow(this.alpha_,this.totalWeight_);if(k)return this.estimate_/k}return this.estimate_},N}();K.default=H},"./src/utils/fetch-loader.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"fetchSupported",function(){return s});var H=L("./src/polyfills/number.ts"),N=L("./src/loader/load-stats.ts"),R=L("./src/demux/chunk-cache.ts");function j(f,O){f.prototype=Object.create(O.prototype),f.prototype.constructor=f,h(f,O)}function k(f){var O=typeof Map=="function"?new Map:void 0;return k=function(x){if(x===null||!g(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(x))return O.get(x);O.set(x,w)}function w(){return A(x,arguments,u(this).constructor)}return w.prototype=Object.create(x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),h(w,x)},k(f)}function A(f,O,S){return D()?A=Reflect.construct:A=function(w,T,y){var v=[null];v.push.apply(v,T);var p=Function.bind.apply(w,v),c=new p;return y&&h(c,y.prototype),c},A.apply(null,arguments)}function D(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function g(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function h(f,O){return h=Object.setPrototypeOf||function(x,w){return x.__proto__=w,x},h(f,O)}function u(f){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},u(f)}function d(){return d=Object.assign||function(f){for(var O=1;O=y&&v(w,T,p.flush(),x)):v(w,T,I,x),_()}).catch(function(){return Promise.reject()})};return E()},f}();function i(f,O){var S={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(d({},f.headers))};return f.rangeEnd&&S.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),S}function o(f,O){return new self.Request(f.url,O)}var n=function(f){j(O,f);function O(S,x,w){var T;return T=f.call(this,S)||this,T.code=void 0,T.details=void 0,T.code=x,T.details=w,T}return O}(k(Error));K.default=l},"./src/utils/imsc1-ttml-parser.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"IMSC1_CODEC",function(){return g}),L.d(K,"parseIMSC1",function(){return s});var H=L("./src/utils/mp4-tools.ts"),N=L("./src/utils/vttparser.ts"),R=L("./src/utils/vttcue.ts"),j=L("./src/demux/id3.ts"),k=L("./src/utils/timescale-conversion.ts"),A=L("./src/utils/webvtt-parser.ts");function D(){return D=Object.assign||function(y){for(var v=1;v"):H}function k(g){for(var h=arguments.length,u=new Array(h>1?h-1:0),d=1;d>24,O[S+1]=x>>16&255,O[S+2]=x>>8&255,O[S+3]=x&255}function h(O,S){var x=[];if(!S.length)return x;var w,T,y;"data"in O?(w=O.data,T=O.start,y=O.end):(w=O,T=0,y=w.byteLength);for(var v=T;v1?v+p:y;if(c===S[0])if(S.length===1)x.push({data:w,start:v+8,end:E});else{var _=h({data:w,start:v+8,end:E},S.slice(1));_.length&&j.apply(x,_)}v=E}return x}function u(O){var S=h(O,["moov"]),x=S[0],w=x?x.end:null,T=h(O,["sidx"]);if(!T||!T[0])return null;var y=[],v=T[0],p=v.data[0],c=p===0?8:16,E=D(v,c);c+=4;var _=0,b=0;p===0?c+=8:c+=16,c+=2;var I=v.end+b,P=A(v,c);c+=2;for(var B=0;B>>31;if(W===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var V=D(v,z);z+=4,y.push({referenceSize:C,subsegmentDuration:V,info:{duration:V/E,start:I,end:I+C-1}}),I+=C,z+=4,c=z}return{earliestPresentationTime:_,timescale:E,version:p,referencesCount:P,references:y,moovEndOffset:w}}function d(O){for(var S=[],x=h(O,["moov","trak"]),w=0;wk)&&(this.startTime=k),this.endTime=A,this.screen=D,this.timelineController.createCaptionsTrack(this.trackName)},R.reset=function(){this.cueRanges=[]},N}()},"./src/utils/texttrack-utils.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"sendAddTrackEvent",function(){return N}),L.d(K,"addCueToTrack",function(){return R}),L.d(K,"clearCurrentCues",function(){return j}),L.d(K,"removeCuesInRange",function(){return k}),L.d(K,"getCuesInRange",function(){return D});var H=L("./src/utils/logger.ts");function N(g,h){var u;try{u=new Event("addtrack")}catch(d){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=g,h.dispatchEvent(u)}function R(g,h){var u=g.mode;if(u==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(h.id))try{if(g.addCue(h),!g.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(s){H.logger.debug("[texttrack-utils]: "+s);var d=new self.TextTrackCue(h.startTime,h.endTime,h.text);d.id=h.id,g.addCue(d)}u==="disabled"&&(g.mode=u)}function j(g){var h=g.mode;if(h==="disabled"&&(g.mode="hidden"),g.cues)for(var u=g.cues.length;u--;)g.removeCue(g.cues[u]);h==="disabled"&&(g.mode=h)}function k(g,h,u){var d=g.mode;if(d==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var s=D(g.cues,h,u),l=0;lg[u].endTime)return-1;for(var d=0,s=u;d<=s;){var l=Math.floor((s+d)/2);if(hg[l].startTime&&d-1)for(var l=s,i=g.length;l=h&&o.endTime<=u)d.push(o);else if(o.startTime>u)return d}return d}},"./src/utils/time-ranges.ts":function(Y,K,L){"use strict";L.r(K);var H={toString:function(R){for(var j="",k=R.length,A=0;A1?h-1:0),d=1;d100)throw new Error("Position must be between 0 and 100.");y=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",A({},s,{get:function(){return v},set:function(_){var b=k(_);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",A({},s,{get:function(){return p},set:function(_){if(_<0||_>100)throw new Error("Size must be between 0 and 100.");p=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",A({},s,{get:function(){return c},set:function(_){var b=k(_);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");c=b,this.hasBeenReset=!0}})),d.displayState=void 0}return D.prototype.getCueAsHTML=function(){var g=self.WebVTT;return g.convertCueToDOMTree(self,this.text)},D}()},"./src/utils/vttparser.ts":function(Y,K,L){"use strict";L.r(K),L.d(K,"parseTimeStamp",function(){return R}),L.d(K,"fixLineBreaks",function(){return h}),L.d(K,"VTTParser",function(){return u});var H=L("./src/utils/vttcue.ts"),N=function(){function d(){}var s=d.prototype;return s.decode=function(i,o){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},d}();function R(d){function s(i,o,n,f){return(i|0)*3600+(o|0)*60+(n|0)+parseFloat(f||0)}var l=d.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return l?parseFloat(l[2])>59?s(l[2],l[3],0,l[4]):s(l[1],l[2],l[3],l[4]):null}var j=function(){function d(){this.values=Object.create(null)}var s=d.prototype;return s.set=function(i,o){!this.get(i)&&o!==""&&(this.values[i]=o)},s.get=function(i,o,n){return n?this.has(i)?this.values[i]:o[n]:this.has(i)?this.values[i]:o},s.has=function(i){return i in this.values},s.alt=function(i,o,n){for(var f=0;f=0&&n<=100)return this.set(i,n),!0}return!1},d}();function k(d,s,l,i){var o=i?d.split(i):[d];for(var n in o){if(typeof o[n]!="string")continue;var f=o[n].split(l);if(f.length!==2)continue;var O=f[0],S=f[1];s(O,S)}}var A=new H.default(0,0,""),D=A.align==="middle"?"middle":"center";function g(d,s,l){var i=d;function o(){var O=R(d);if(O===null)throw new Error("Malformed timestamp: "+i);return d=d.replace(/^[^\sa-zA-Z-]+/,""),O}function n(O,S){var x=new j;k(O,function(y,v){var p;switch(y){case"region":for(var c=l.length-1;c>=0;c--)if(l[c].id===v){x.set(y,l[c].region);break}break;case"vertical":x.alt(y,v,["rl","lr"]);break;case"line":p=v.split(","),x.integer(y,p[0]),x.percent(y,p[0])&&x.set("snapToLines",!1),x.alt(y,p[0],["auto"]),p.length===2&&x.alt("lineAlign",p[1],["start",D,"end"]);break;case"position":p=v.split(","),x.percent(y,p[0]),p.length===2&&x.alt("positionAlign",p[1],["start",D,"end","line-left","line-right","auto"]);break;case"size":x.percent(y,v);break;case"align":x.alt(y,v,["start",D,"end","left","right"]);break}},/:/,/\s/),S.region=x.get("region",null),S.vertical=x.get("vertical","");var w=x.get("line","auto");w==="auto"&&A.line===-1&&(w=-1),S.line=w,S.lineAlign=x.get("lineAlign","start"),S.snapToLines=x.get("snapToLines",!0),S.size=x.get("size",100),S.align=x.get("align",D);var T=x.get("position","auto");T==="auto"&&A.position===50&&(T=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=T}function f(){d=d.replace(/^\s+/,"")}if(f(),s.startTime=o(),f(),d.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);d=d.substr(3),f(),s.endTime=o(),f(),n(d,s)}function h(d){return d.replace(//gi,` `)}var u=function(){function d(){this.state="INITIAL",this.buffer="",this.decoder=new N,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=d.prototype;return s.parse=function(i){var o=this;i&&(o.buffer+=o.decoder.decode(i,{stream:!0}));function n(){var T=o.buffer,y=0;for(T=h(T);y9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(H.isFiniteNumber)(o)||!Object(H.isFiniteNumber)(n)||!Object(H.isFiniteNumber)(f)||!Object(H.isFiniteNumber)(O))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return o+=1e3*n,o+=60*1e3*f,o+=60*60*1e3*O,o},h=function(i){for(var o=5381,n=i.length;n;)o=o*33^i.charCodeAt(--n);return(o>>>0).toString()};function u(l,i,o){return h(l.toString())+h(i.toString())+h(o)}var d=function(i,o,n){var f=i[o],O=i[f.prevCC];if(!O||!O.new&&f.new){i.ccOffset=i.presentationOffset=f.start,f.new=!1;return}for(;(S=O)!==null&&S!==void 0&&S.new;){var S;i.ccOffset+=f.start-O.start,f.new=!1,f=O,O=i[f.prevCC]}i.presentationOffset=n};function s(l,i,o,n,f,O,S,x){var w=new N.VTTParser,T=Object(R.utf8ArrayToStr)(new Uint8Array(l)).trim().replace(A,` `).split(` `),y=[],v=Object(j.toMpegTsClockFromTimescale)(i,o),p="00:00.000",c=0,E=0,_,b=!0,I=!1;w.oncue=function(P){var B=n[f],z=n.ccOffset,U=(c-v)/9e4;if(B!=null&&B.new&&(E!==void 0?z=n.ccOffset=B.start:d(n,f,U)),U&&(z=U-n.presentationOffset),I){var C=P.endTime-P.startTime,W=Object(k.normalizePts)((P.startTime+z-E)*9e4,O*9e4)/9e4;P.startTime=W,P.endTime=W+C}var V=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(V)),P.id||(P.id=u(P.startTime,P.endTime,V)),P.endTime>0&&y.push(P)},w.onparsingerror=function(P){_=P},w.onflush=function(){if(_){x(_);return}S(y)},T.forEach(function(P){if(b)if(D(P,"X-TIMESTAMP-MAP=")){b=!1,I=!0,P.substr(16).split(",").forEach(function(B){D(B,"LOCAL:")?p=B.substr(6):D(B,"MPEGTS:")&&(c=parseInt(B.substr(7)))});try{E=g(p)/1e3}catch(B){I=!1,_=B}return}else P===""&&(b=!1);w.parse(P+` -`)}),w.flush()}},"./src/utils/xhr-loader.ts":function(Y,K,L){"use strict";L.r(K);var H=L("./src/utils/logger.ts"),N=L("./src/loader/load-stats.ts"),R=/^age:\s*[\d.]+\s*$/m,j=function(){function k(D){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=D?D.xhrSetup:null,this.stats=new N.LoadStats,this.retryDelay=0}var A=k.prototype;return A.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},A.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},A.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},A.load=function(g,h,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=h,this.callbacks=u,this.retryDelay=h.retryDelay,this.loadInternal()},A.loadInternal=function(){var g=this.config,h=this.context;if(!g)return;var u=this.loader=new self.XMLHttpRequest,d=this.stats;d.loading.first=0,d.loaded=0;var s=this.xhrSetup;try{if(s)try{s(u,h.url)}catch(o){u.open("GET",h.url,!0),s(u,h.url)}u.readyState||u.open("GET",h.url,!0);var l=this.context.headers;if(l)for(var i in l)u.setRequestHeader(i,l[i])}catch(o){this.callbacks.onError({code:u.status,text:o.message},h,u);return}h.rangeEnd&&u.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),u.send()},A.readystatechange=function(){var g=this.context,h=this.loader,u=this.stats;if(!g||!h)return;var d=h.readyState,s=this.config;if(u.aborted)return;if(d>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),d===4){h.onreadystatechange=null,h.onprogress=null;var l=h.status;if(l>=200&&l<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var i,o;if(g.responseType==="arraybuffer"?(i=h.response,o=i.byteLength):(i=h.responseText,o=i.length),u.loaded=u.total=o,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(u,g,i,h),!this.callbacks)return;var f={url:h.responseURL,data:i};this.callbacks.onSuccess(f,u,g,h)}else u.retry>=s.maxRetry||l>=400&&l<499?(H.logger.error(l+" while loading "+g.url),this.callbacks.onError({code:l,text:h.statusText},g,h)):(H.logger.warn(l+" while loading "+g.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},A.loadtimeout=function(){H.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},A.loadprogress=function(g){var h=this.stats;h.loaded=g.loaded,g.lengthComputable&&(h.total=g.total)},A.getCacheAge=function(){var g=null;if(this.loader&&R.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");g=h?parseFloat(h):null}return g},k}();K.default=j}}).default})},vHTk:function(Le,ye,F){Le.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return dt});var Y=F("rePB"),K=F("VTBJ"),L=F("KQm4"),H=F("U8pU"),N=F("ODXe"),R=F("cDcd"),j=F("TSYQ"),k=F.n(j),A=F("Gytx"),D=F.n(A),g=F("Kwbf"),h=F("t23M"),u=F("qx4F"),d=F("6eGT"),s=F("IBYe"),l=F("Ff2n"),i=F("c+Xe"),o=F("fyJ8"),n=F("biw7");function f(be,_e,Ne,ke,Ee){var Ie=Ne[be]||{},pe=Ne[_e]||{},ae,ie;Ie.fixed==="left"?ae=ke.left[be]:pe.fixed==="right"&&(ie=ke.right[_e]);var Q=!1,q=!1,te=!1,se=!1,ce=Ne[_e+1],Se=Ne[be-1];if(Ee==="rtl"){if(ae!==void 0){var je=Se&&Se.fixed==="left";se=!je}else if(ie!==void 0){var Ze=ce&&ce.fixed==="right";te=!Ze}}else if(ae!==void 0){var ut=ce&&ce.fixed==="left";Q=!ut}else if(ie!==void 0){var it=Se&&Se.fixed==="right";q=!it}return{fixLeft:ae,fixRight:ie,lastFixLeft:Q,firstFixRight:q,lastFixRight:te,firstFixLeft:se,isSticky:ke.isSticky}}var O=F("sR1s");function S(be){var _e=be.cells,Ne=be.stickyOffsets,ke=be.flattenColumns,Ee=be.rowComponent,Ie=be.cellComponent,pe=be.onHeaderRow,ae=be.index,ie=R.useContext(n.a),Q=ie.prefixCls,q=ie.direction,te;pe&&(te=pe(_e.map(function(ce){return ce.column}),ae));var se=Object(O.a)(_e.map(function(ce){return ce.column}));return R.createElement(Ee,Object.assign({},te),_e.map(function(ce,Se){var je=ce.column,Ze=f(ce.colStart,ce.colEnd,ke,Ne,q),ut;return je&&je.onHeaderCell&&(ut=ce.column.onHeaderCell(je)),R.createElement(o.a,Object.assign({},ce,{ellipsis:je.ellipsis,align:je.align,component:Ie,prefixCls:Q,key:se[Se]},Ze,{additionalProps:ut,rowType:"header"}))}))}S.displayName="HeaderRow";var x=S;function w(be){var _e=[];function Ne(pe,ae){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;_e[ie]=_e[ie]||[];var Q=ae,q=pe.filter(Boolean).map(function(te){var se={key:te.key,className:te.className||"",children:te.title,column:te,colStart:Q},ce=1,Se=te.children;return Se&&Se.length>0&&(ce=Ne(Se,Q,ie+1).reduce(function(je,Ze){return je+Ze},0),se.hasSubColumns=!0),"colSpan"in te&&(ce=te.colSpan),"rowSpan"in te&&(se.rowSpan=te.rowSpan),se.colSpan=ce,se.colEnd=se.colStart+ce-1,_e[ie].push(se),Q+=ce,ce});return q}Ne(be,0);for(var ke=_e.length,Ee=function(ae){_e[ae].forEach(function(ie){!("rowSpan"in ie)&&!ie.hasSubColumns&&(ie.rowSpan=ke-ae)})},Ie=0;Ie=0;ae-=1){var ie=_e[ae],Q=Ne&&Ne[ae],q=Q&&Q[v.a];(ie||q||pe)&&(Ee.unshift(R.createElement("col",Object.assign({key:ae,style:{width:ie,minWidth:ie}},q))),pe=!0)}return R.createElement("colgroup",null,Ee)}var c=p;function E(be,_e){return Object(R.useMemo)(function(){for(var Ne=[],ke=0;ke<_e;ke+=1){var Ee=be[ke];if(Ee!==void 0)Ne[ke]=Ee;else return null}return Ne},[be.join("_"),_e])}var _=R.forwardRef(function(be,_e){var Ne=be.noData,ke=be.columns,Ee=be.flattenColumns,Ie=be.colWidths,pe=be.columCount,ae=be.stickyOffsets,ie=be.direction,Q=be.fixHeader,q=be.offsetHeader,te=be.stickyClassName,se=be.onScroll,ce=Object(l.a)(be,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Se=R.useContext(n.a),je=Se.prefixCls,Ze=Se.scrollbarSize,ut=Se.isSticky,it=ut&&!Q?0:Ze,rt=R.useRef(null),Me=R.useCallback(function(et){Object(i.b)(_e,et),Object(i.b)(rt,et)},[]);R.useEffect(function(){var et;function tt(Te){var Ae=Te.currentTarget,Qe=Te.deltaX;Qe&&(se({currentTarget:Ae,scrollLeft:Ae.scrollLeft+Qe}),Te.preventDefault())}return(et=rt.current)===null||et===void 0||et.addEventListener("wheel",tt),function(){var Te;(Te=rt.current)===null||Te===void 0||Te.removeEventListener("wheel",tt)}},[]);var Ue=Ee[Ee.length-1],we={fixed:Ue?Ue.fixed:null,onHeaderCell:function(){return{className:"".concat(je,"-cell-scrollbar")}}},ee=Object(R.useMemo)(function(){return it?[].concat(Object(L.a)(ke),[we]):ke},[it,ke]),he=Object(R.useMemo)(function(){return it?[].concat(Object(L.a)(Ee),[we]):Ee},[it,Ee]),Fe=Object(R.useMemo)(function(){var et=ae.right,tt=ae.left;return Object(K.a)(Object(K.a)({},ae),{},{left:ie==="rtl"?[].concat(Object(L.a)(tt.map(function(Te){return Te+it})),[0]):tt,right:ie==="rtl"?et:[].concat(Object(L.a)(et.map(function(Te){return Te+it})),[0]),isSticky:ut})},[it,ae,ut]),Re=E(Ie,pe);return R.createElement("div",{style:Object(K.a)({overflow:"hidden"},ut?{top:q}:{}),ref:Me,className:k()("".concat(je,"-header"),Object(Y.a)({},te,!!te))},R.createElement("table",{style:{tableLayout:"fixed",visibility:Ne||Re?null:"hidden"}},R.createElement(c,{colWidths:Re?[].concat(Object(L.a)(Re),[it]):[],columCount:pe+1,columns:he}),R.createElement(y,Object.assign({},ce,{stickyOffsets:Fe,columns:ee,flattenColumns:he}))))});_.displayName="FixedHeader";var b=_,I=R.createContext(null),P=I;function B(be){var _e=be.prefixCls,Ne=be.children,ke=be.component,Ee=be.cellComponent,Ie=be.fixHeader,pe=be.fixColumn,ae=be.horizonScroll,ie=be.className,Q=be.expanded,q=be.componentWidth,te=be.colSpan,se=R.useContext(n.a),ce=se.scrollbarSize;return R.useMemo(function(){var Se=Ne;return pe&&(Se=R.createElement("div",{style:{width:q-(Ie?ce:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(_e,"-expanded-row-fixed")},Se)),R.createElement(ke,{className:ie,style:{display:Q?null:"none"}},R.createElement(o.a,{component:Ee,prefixCls:_e,colSpan:te},Se))},[Ne,ke,Ie,ae,ie,Q,q,te,ce])}var z=B;function U(be){var _e=be.className,Ne=be.style,ke=be.record,Ee=be.index,Ie=be.rowKey,pe=be.getRowKey,ae=be.rowExpandable,ie=be.expandedKeys,Q=be.onRow,q=be.indent,te=q===void 0?0:q,se=be.rowComponent,ce=be.cellComponent,Se=be.childrenColumnName,je=R.useContext(n.a),Ze=je.prefixCls,ut=je.fixedInfoList,it=R.useContext(P),rt=it.fixHeader,Me=it.fixColumn,Ue=it.horizonScroll,we=it.componentWidth,ee=it.flattenColumns,he=it.expandableType,Fe=it.expandRowByClick,Re=it.onTriggerExpand,et=it.rowClassName,tt=it.expandedRowClassName,Te=it.indentSize,Ae=it.expandIcon,Qe=it.expandedRowRender,Et=it.expandIconColumnIndex,vt=R.useState(!1),cn=Object(N.a)(vt,2),yn=cn[0],ln=cn[1],bt=ie&&ie.has(be.recordKey);R.useEffect(function(){bt&&ln(!0)},[bt]);var Rn=he==="row"&&(!ae||ae(ke)),zn=he==="nest",Tn=Se&&ke&&ke[Se],zt=Rn||zn,Sn;Q&&(Sn=Q(ke,Ee));var Bn=function(Lt){if(Fe&&zt&&Re(ke,Lt),Sn&&Sn.onClick){for(var Pe,Ce=arguments.length,It=new Array(Ce>1?Ce-1:0),Kt=1;Kt=te&&(vt=te-se),pe({scrollLeft:vt/te*(q+2)}),it.current.x=Te.pageX},Re=function(){var Te=Object(at.b)(Ie.current).top,Ae=Te+Ie.current.offsetHeight,Qe=document.documentElement.scrollTop+window.innerHeight;Ae-Object(u.a)()<=Qe||Te>=Qe-ae?ut(function(Et){return Object(K.a)(Object(K.a)({},Et),{},{isHiddenScrollBar:!0})}):ut(function(Et){return Object(K.a)(Object(K.a)({},Et),{},{isHiddenScrollBar:!1})})},et=function(Te){ut(function(Ae){return Object(K.a)(Object(K.a)({},Ae),{},{scrollLeft:Te/q*te||0})})};return R.useImperativeHandle(Ne,function(){return{setScrollLeft:et}}),R.useEffect(function(){var tt=Object(ze.a)(document.body,"mouseup",ee,!1),Te=Object(ze.a)(document.body,"mousemove",Fe,!1);return Re(),function(){tt.remove(),Te.remove()}},[se,Ue]),R.useEffect(function(){var tt=Object(ze.a)(window,"scroll",Re,!1),Te=Object(ze.a)(window,"resize",Re,!1);return function(){tt.remove(),Te.remove()}},[]),R.useEffect(function(){Ze.isHiddenScrollBar||ut(function(tt){var Te,Ae;return Object(K.a)(Object(K.a)({},tt),{},{scrollLeft:Ie.current.scrollLeft/((Te=Ie.current)===null||Te===void 0?void 0:Te.scrollWidth)*((Ae=Ie.current)===null||Ae===void 0?void 0:Ae.clientWidth)})})},[Ze.isHiddenScrollBar]),q<=te||!se||Ze.isHiddenScrollBar?null:R.createElement("div",{style:{height:Object(u.a)(),width:te,bottom:ae},className:"".concat(Q,"-sticky-scroll")},R.createElement("div",{onMouseDown:he,ref:ce,className:k()("".concat(Q,"-sticky-scroll-bar"),Object(Y.a)({},"".concat(Q,"-sticky-scroll-bar-active"),Ue)),style:{width:"".concat(se,"px"),transform:"translate3d(".concat(Ze.scrollLeft,"px, 0, 0)")}}))},Xe=R.forwardRef(Je);function He(be,_e){return R.useMemo(function(){var Ne=!!be;return{isSticky:Ne,stickyClassName:Ne?"".concat(_e,"-sticky-header"):"",offsetHeader:Object(H.a)(be)==="object"&&be.offsetHeader||0,offsetScroll:Object(H.a)(be)==="object"&&be.offsetScroll||0}},[be,_e])}var ot=[],ft={},dt="rc-table-internal-hook",lt=R.memo(function(be){var _e=be.children;return _e},function(be,_e){return D()(be.props,_e.props)?be.pingLeft!==_e.pingLeft||be.pingRight!==_e.pingRight:!1});function _t(be){var _e,Ne=be.prefixCls,ke=be.className,Ee=be.rowClassName,Ie=be.style,pe=be.data,ae=be.rowKey,ie=be.scroll,Q=be.tableLayout,q=be.direction,te=be.title,se=be.footer,ce=be.summary,Se=be.id,je=be.showHeader,Ze=be.components,ut=be.emptyText,it=be.onRow,rt=be.onHeaderRow,Me=be.internalHooks,Ue=be.transformColumns,we=be.internalRefs,ee=be.sticky,he=pe||ot,Fe=!!he.length,Re=R.useState(0),et=Object(N.a)(Re,2),tt=et[0],Te=et[1];R.useEffect(function(){Te(Object(u.a)())});var Ae=R.useMemo(function(){return Object(O.c)(Ze,{})},[Ze]),Qe=R.useCallback(function(gn,an){return Object(O.b)(Ae,gn)||an},[Ae]),Et=R.useMemo(function(){return typeof ae=="function"?ae:function(gn){var an=gn&&gn[ae];return an}},[ae]),vt=Object(v.c)(be),cn=vt.expandIcon,yn=vt.expandedRowKeys,ln=vt.defaultExpandedRowKeys,bt=vt.defaultExpandAllRows,Rn=vt.expandedRowRender,zn=vt.onExpand,Tn=vt.onExpandedRowsChange,zt=vt.expandRowByClick,Sn=vt.rowExpandable,Bn=vt.expandIconColumnIndex,pr=vt.expandedRowClassName,nt=vt.childrenColumnName,ct=vt.indentSize,qn=cn||Ke,xr=nt||"children",mr=R.useMemo(function(){return Rn?"row":be.expandable&&Me===dt&&be.expandable.__PARENT_RENDER_ICON__||he.some(function(gn){return gn&&Object(H.a)(gn)==="object"&&gn[xr]})?"nest":!1},[!!Rn,he]),Ur=R.useState(function(){return ln||(bt?We(he,Et,xr):[])}),Un=Object(N.a)(Ur,2),Lt=Un[0],Pe=Un[1],Ce=R.useMemo(function(){return new Set(yn||Lt||[])},[yn,Lt]),It=R.useCallback(function(gn){var an=Et(gn,he.indexOf(gn)),sn,fr=Ce.has(an);fr?(Ce.delete(an),sn=Object(L.a)(Ce)):sn=[].concat(Object(L.a)(Ce),[an]),Pe(sn),zn&&zn(!fr,gn),Tn&&Tn(sn)},[Et,Ce,he,zn,Tn]),Kt=R.useState(0),vn=Object(N.a)(Kt,2),fn=vn[0],rn=vn[1],Gt=Object(le.b)(Object(K.a)(Object(K.a)(Object(K.a)({},be),vt),{},{expandable:!!Rn,expandedKeys:Ce,getRowKey:Et,onTriggerExpand:It,expandIcon:qn,expandIconColumnIndex:Bn,direction:q}),Me===dt?Ue:null),Dt=Object(N.a)(Gt,2),Pt=Dt[0],Ft=Dt[1],Mt=R.useMemo(function(){return{columns:Pt,flattenColumns:Ft}},[Pt,Ft]),qt=R.useRef(),gt=R.useRef(),un=R.useRef(),Qt=R.useState(!1),Ln=Object(N.a)(Qt,2),kt=Ln[0],In=Ln[1],Nn=R.useState(!1),wn=Object(N.a)(Nn,2),bn=wn[0],An=wn[1],nr=re(new Map),lr=Object(N.a)(nr,2),Xn=lr[0],xn=lr[1],ur=Object(O.a)(Ft),dn=ur.map(function(gn){return Xn.get(gn)}),hn=R.useMemo(function(){return dn},[dn.join("_")]),pn=Be(hn,Ft.length,q),Xt=ie&&Object(O.d)(ie.y),St=ie&&Object(O.d)(ie.x),jt=St&&Ft.some(function(gn){var an=gn.fixed;return an}),xt=R.useRef(),en=He(ee,Ne),Ut=en.isSticky,rr=en.offsetHeader,Mn=en.offsetScroll,dr=en.stickyClassName,Qr,Ir,Gr;Xt&&(Ir={overflowY:"scroll",maxHeight:ie.y}),St&&(Qr={overflowX:"auto"},Xt||(Ir={overflowY:"hidden"}),Gr={width:ie.x===!0?"auto":ie.x,minWidth:"100%"});var Mr=R.useCallback(function(gn,an){xn(function(sn){var fr=new Map(sn);return fr.set(gn,an),fr})},[]),Or=oe(null),Br=Object(N.a)(Or,2),Fn=Br[0],Rt=Br[1];function zr(gn,an){if(!an)return;typeof an=="function"?an(gn):an.scrollLeft!==gn&&(an.scrollLeft=gn)}var gr=function(an){var sn=an.currentTarget,fr=an.scrollLeft,Zr=typeof fr=="number"?fr:sn.scrollLeft,qr=sn||ft;if(!Rt()||Rt()===qr){var ri;Fn(qr),zr(Zr,gt.current),zr(Zr,un.current),zr(Zr,(ri=xt.current)===null||ri===void 0?void 0:ri.setScrollLeft)}if(sn){var Ti=sn.scrollWidth,Zt=sn.clientWidth;In(Zr>0),An(Zr0?[].concat(Object(K.a)(l),Object(K.a)(g(f).map(function(O){return Object(L.a)({fixed:n},O)}))):[].concat(Object(K.a)(l),[Object(L.a)(Object(L.a)({},i),{},{fixed:n})])},[])}function h(s){for(var l=!0,i=0;i=0;f-=1){var O=s[f];if(n&&O.fixed!=="right")n=!1;else if(!n&&O.fixed==="right"){Object(j.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function u(s){return s.map(function(l){var i=l.fixed,o=Object(H.a)(l,["fixed"]),n=i;return i==="left"?n="right":i==="right"&&(n="left"),Object(L.a)({fixed:n},o)})}function d(s,l){var i=s.prefixCls,o=s.columns,n=s.children,f=s.expandable,O=s.expandedKeys,S=s.getRowKey,x=s.onTriggerExpand,w=s.expandIcon,T=s.rowExpandable,y=s.expandIconColumnIndex,v=s.direction,p=s.expandRowByClick,c=N.useMemo(function(){return o||D(n)},[o,n]),E=N.useMemo(function(){if(f){var I,P=y||0,B=c[P],z=(I={},Object(Y.a)(I,A.a,{className:"".concat(i,"-expand-icon-col")}),Object(Y.a)(I,"title",""),Object(Y.a)(I,"fixed",B?B.fixed:null),Object(Y.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(Y.a)(I,"render",function(W,V,J){var ne=S(V,J),fe=O.has(ne),ue=T?T(V):!0,le=w({prefixCls:i,expanded:fe,expandable:ue,record:V,onExpand:x});return p?N.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},le):le}),I),U=c.slice();return P>=0&&U.splice(P,0,z),U}return c},[f,c,S,O,w,v]),_=N.useMemo(function(){var I=E;return l&&(I=l(I)),I.length||(I=[{render:function(){return null}}]),I},[l,E,v]),b=N.useMemo(function(){return v==="rtl"?u(g(_)):g(_)},[_,v]);return[_,b]}ye.b=d},"y0+3":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return g}),F.d(ye,"b",function(){return u});var Y=/margin|padding|width|height|max|min|offset/,K={left:!0,top:!0},L={cssFloat:1,styleFloat:1,float:1};function H(d){return d.nodeType===1?d.ownerDocument.defaultView.getComputedStyle(d,null):{}}function N(d,s,l){if(s=s.toLowerCase(),l==="auto"){if(s==="height")return d.offsetHeight;if(s==="width")return d.offsetWidth}return s in K||(K[s]=Y.test(s)),K[s]?parseFloat(l)||0:l}function R(d,s){var l=arguments.length,i=H(d);return s=L[s]?"cssFloat"in d.style?"cssFloat":"styleFloat":s,l===1?i:N(d,s,i[s]||d.style[s])}function j(d,s,l){var i=arguments.length;if(s=L[s]?"cssFloat"in d.style?"cssFloat":"styleFloat":s,i===3)return typeof l=="number"&&Y.test(s)&&(l="".concat(l,"px")),d.style[s]=l,l;for(var o in s)s.hasOwnProperty(o)&&j(d,o,s[o]);return H(d)}function k(d){return d===document.body?document.documentElement.clientWidth:d.offsetWidth}function A(d){return d===document.body?window.innerHeight||document.documentElement.clientHeight:d.offsetHeight}function D(){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:d,height:s}}function g(){var d=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:d,height:s}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(d){var s=d.getBoundingClientRect(),l=document.documentElement;return{left:s.left+(window.pageXOffset||l.scrollLeft)-(l.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||l.scrollTop)-(l.clientTop||document.body.clientTop||0)}}},ynwM:function(Le,ye,F){var Y=F("MFOe"),K=Y.Global;Le.exports={name:"oldFF-globalStorage",read:H,write:N,each:R,remove:j,clearAll:k};var L=K.globalStorage;function H(A){return L[A]}function N(A,D){L[A]=D}function R(A){for(var D=L.length-1;D>=0;D--){var g=L.key(D);A(L[g],g)}}function j(A){return L.removeItem(A)}function k(){R(function(A,D){delete L[A]})}}}]); +`)}),w.flush()}},"./src/utils/xhr-loader.ts":function(Y,K,L){"use strict";L.r(K);var H=L("./src/utils/logger.ts"),N=L("./src/loader/load-stats.ts"),R=/^age:\s*[\d.]+\s*$/m,j=function(){function k(D){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=D?D.xhrSetup:null,this.stats=new N.LoadStats,this.retryDelay=0}var A=k.prototype;return A.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},A.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},A.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},A.load=function(g,h,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=h,this.callbacks=u,this.retryDelay=h.retryDelay,this.loadInternal()},A.loadInternal=function(){var g=this.config,h=this.context;if(!g)return;var u=this.loader=new self.XMLHttpRequest,d=this.stats;d.loading.first=0,d.loaded=0;var s=this.xhrSetup;try{if(s)try{s(u,h.url)}catch(o){u.open("GET",h.url,!0),s(u,h.url)}u.readyState||u.open("GET",h.url,!0);var l=this.context.headers;if(l)for(var i in l)u.setRequestHeader(i,l[i])}catch(o){this.callbacks.onError({code:u.status,text:o.message},h,u);return}h.rangeEnd&&u.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),u.send()},A.readystatechange=function(){var g=this.context,h=this.loader,u=this.stats;if(!g||!h)return;var d=h.readyState,s=this.config;if(u.aborted)return;if(d>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),d===4){h.onreadystatechange=null,h.onprogress=null;var l=h.status;if(l>=200&&l<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var i,o;if(g.responseType==="arraybuffer"?(i=h.response,o=i.byteLength):(i=h.responseText,o=i.length),u.loaded=u.total=o,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(u,g,i,h),!this.callbacks)return;var f={url:h.responseURL,data:i};this.callbacks.onSuccess(f,u,g,h)}else u.retry>=s.maxRetry||l>=400&&l<499?(H.logger.error(l+" while loading "+g.url),this.callbacks.onError({code:l,text:h.statusText},g,h)):(H.logger.warn(l+" while loading "+g.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},A.loadtimeout=function(){H.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},A.loadprogress=function(g){var h=this.stats;h.loaded=g.loaded,g.lengthComputable&&(h.total=g.total)},A.getCacheAge=function(){var g=null;if(this.loader&&R.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");g=h?parseFloat(h):null}return g},k}();K.default=j}}).default})},vHTk:function(Le,ye,F){Le.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Le,ye,F){"use strict";F.d(ye,"a",function(){return dt});var Y=F("rePB"),K=F("VTBJ"),L=F("KQm4"),H=F("U8pU"),N=F("ODXe"),R=F("cDcd"),j=F("TSYQ"),k=F.n(j),A=F("Gytx"),D=F.n(A),g=F("Kwbf"),h=F("t23M"),u=F("qx4F"),d=F("6eGT"),s=F("IBYe"),l=F("Ff2n"),i=F("c+Xe"),o=F("fyJ8"),n=F("biw7");function f(be,_e,Ne,ke,Ee){var Ie=Ne[be]||{},pe=Ne[_e]||{},ae,ie;Ie.fixed==="left"?ae=ke.left[be]:pe.fixed==="right"&&(ie=ke.right[_e]);var Q=!1,q=!1,te=!1,se=!1,ce=Ne[_e+1],Se=Ne[be-1];if(Ee==="rtl"){if(ae!==void 0){var je=Se&&Se.fixed==="left";se=!je}else if(ie!==void 0){var Ze=ce&&ce.fixed==="right";te=!Ze}}else if(ae!==void 0){var ut=ce&&ce.fixed==="left";Q=!ut}else if(ie!==void 0){var it=Se&&Se.fixed==="right";q=!it}return{fixLeft:ae,fixRight:ie,lastFixLeft:Q,firstFixRight:q,lastFixRight:te,firstFixLeft:se,isSticky:ke.isSticky}}var O=F("sR1s");function S(be){var _e=be.cells,Ne=be.stickyOffsets,ke=be.flattenColumns,Ee=be.rowComponent,Ie=be.cellComponent,pe=be.onHeaderRow,ae=be.index,ie=R.useContext(n.a),Q=ie.prefixCls,q=ie.direction,te;pe&&(te=pe(_e.map(function(ce){return ce.column}),ae));var se=Object(O.a)(_e.map(function(ce){return ce.column}));return R.createElement(Ee,Object.assign({},te),_e.map(function(ce,Se){var je=ce.column,Ze=f(ce.colStart,ce.colEnd,ke,Ne,q),ut;return je&&je.onHeaderCell&&(ut=ce.column.onHeaderCell(je)),R.createElement(o.a,Object.assign({},ce,{ellipsis:je.ellipsis,align:je.align,component:Ie,prefixCls:Q,key:se[Se]},Ze,{additionalProps:ut,rowType:"header"}))}))}S.displayName="HeaderRow";var x=S;function w(be){var _e=[];function Ne(pe,ae){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;_e[ie]=_e[ie]||[];var Q=ae,q=pe.filter(Boolean).map(function(te){var se={key:te.key,className:te.className||"",children:te.title,column:te,colStart:Q},ce=1,Se=te.children;return Se&&Se.length>0&&(ce=Ne(Se,Q,ie+1).reduce(function(je,Ze){return je+Ze},0),se.hasSubColumns=!0),"colSpan"in te&&(ce=te.colSpan),"rowSpan"in te&&(se.rowSpan=te.rowSpan),se.colSpan=ce,se.colEnd=se.colStart+ce-1,_e[ie].push(se),Q+=ce,ce});return q}Ne(be,0);for(var ke=_e.length,Ee=function(ae){_e[ae].forEach(function(ie){!("rowSpan"in ie)&&!ie.hasSubColumns&&(ie.rowSpan=ke-ae)})},Ie=0;Ie=0;ae-=1){var ie=_e[ae],Q=Ne&&Ne[ae],q=Q&&Q[v.a];(ie||q||pe)&&(Ee.unshift(R.createElement("col",Object.assign({key:ae,style:{width:ie,minWidth:ie}},q))),pe=!0)}return R.createElement("colgroup",null,Ee)}var c=p;function E(be,_e){return Object(R.useMemo)(function(){for(var Ne=[],ke=0;ke<_e;ke+=1){var Ee=be[ke];if(Ee!==void 0)Ne[ke]=Ee;else return null}return Ne},[be.join("_"),_e])}var _=R.forwardRef(function(be,_e){var Ne=be.noData,ke=be.columns,Ee=be.flattenColumns,Ie=be.colWidths,pe=be.columCount,ae=be.stickyOffsets,ie=be.direction,Q=be.fixHeader,q=be.offsetHeader,te=be.stickyClassName,se=be.onScroll,ce=Object(l.a)(be,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Se=R.useContext(n.a),je=Se.prefixCls,Ze=Se.scrollbarSize,ut=Se.isSticky,it=ut&&!Q?0:Ze,rt=R.useRef(null),Me=R.useCallback(function(et){Object(i.b)(_e,et),Object(i.b)(rt,et)},[]);R.useEffect(function(){var et;function tt(Te){var Ae=Te.currentTarget,Qe=Te.deltaX;Qe&&(se({currentTarget:Ae,scrollLeft:Ae.scrollLeft+Qe}),Te.preventDefault())}return(et=rt.current)===null||et===void 0||et.addEventListener("wheel",tt),function(){var Te;(Te=rt.current)===null||Te===void 0||Te.removeEventListener("wheel",tt)}},[]);var Ue=Ee[Ee.length-1],we={fixed:Ue?Ue.fixed:null,onHeaderCell:function(){return{className:"".concat(je,"-cell-scrollbar")}}},ee=Object(R.useMemo)(function(){return it?[].concat(Object(L.a)(ke),[we]):ke},[it,ke]),he=Object(R.useMemo)(function(){return it?[].concat(Object(L.a)(Ee),[we]):Ee},[it,Ee]),Fe=Object(R.useMemo)(function(){var et=ae.right,tt=ae.left;return Object(K.a)(Object(K.a)({},ae),{},{left:ie==="rtl"?[].concat(Object(L.a)(tt.map(function(Te){return Te+it})),[0]):tt,right:ie==="rtl"?et:[].concat(Object(L.a)(et.map(function(Te){return Te+it})),[0]),isSticky:ut})},[it,ae,ut]),Re=E(Ie,pe);return R.createElement("div",{style:Object(K.a)({overflow:"hidden"},ut?{top:q}:{}),ref:Me,className:k()("".concat(je,"-header"),Object(Y.a)({},te,!!te))},R.createElement("table",{style:{tableLayout:"fixed",visibility:Ne||Re?null:"hidden"}},R.createElement(c,{colWidths:Re?[].concat(Object(L.a)(Re),[it]):[],columCount:pe+1,columns:he}),R.createElement(y,Object.assign({},ce,{stickyOffsets:Fe,columns:ee,flattenColumns:he}))))});_.displayName="FixedHeader";var b=_,I=R.createContext(null),P=I;function B(be){var _e=be.prefixCls,Ne=be.children,ke=be.component,Ee=be.cellComponent,Ie=be.fixHeader,pe=be.fixColumn,ae=be.horizonScroll,ie=be.className,Q=be.expanded,q=be.componentWidth,te=be.colSpan,se=R.useContext(n.a),ce=se.scrollbarSize;return R.useMemo(function(){var Se=Ne;return pe&&(Se=R.createElement("div",{style:{width:q-(Ie?ce:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(_e,"-expanded-row-fixed")},Se)),R.createElement(ke,{className:ie,style:{display:Q?null:"none"}},R.createElement(o.a,{component:Ee,prefixCls:_e,colSpan:te},Se))},[Ne,ke,Ie,ae,ie,Q,q,te,ce])}var z=B;function U(be){var _e=be.className,Ne=be.style,ke=be.record,Ee=be.index,Ie=be.rowKey,pe=be.getRowKey,ae=be.rowExpandable,ie=be.expandedKeys,Q=be.onRow,q=be.indent,te=q===void 0?0:q,se=be.rowComponent,ce=be.cellComponent,Se=be.childrenColumnName,je=R.useContext(n.a),Ze=je.prefixCls,ut=je.fixedInfoList,it=R.useContext(P),rt=it.fixHeader,Me=it.fixColumn,Ue=it.horizonScroll,we=it.componentWidth,ee=it.flattenColumns,he=it.expandableType,Fe=it.expandRowByClick,Re=it.onTriggerExpand,et=it.rowClassName,tt=it.expandedRowClassName,Te=it.indentSize,Ae=it.expandIcon,Qe=it.expandedRowRender,Et=it.expandIconColumnIndex,vt=R.useState(!1),cn=Object(N.a)(vt,2),yn=cn[0],ln=cn[1],bt=ie&&ie.has(be.recordKey);R.useEffect(function(){bt&&ln(!0)},[bt]);var An=he==="row"&&(!ae||ae(ke)),zn=he==="nest",Tn=Se&&ke&&ke[Se],Gt=An||zn,Sn;Q&&(Sn=Q(ke,Ee));var Wn=function(Lt){if(Fe&&Gt&&Re(ke,Lt),Sn&&Sn.onClick){for(var Pe,Ce=arguments.length,It=new Array(Ce>1?Ce-1:0),Ht=1;Ht=te&&(vt=te-se),pe({scrollLeft:vt/te*(q+2)}),it.current.x=Te.pageX},Re=function(){var Te=Object(at.b)(Ie.current).top,Ae=Te+Ie.current.offsetHeight,Qe=document.documentElement.scrollTop+window.innerHeight;Ae-Object(u.a)()<=Qe||Te>=Qe-ae?ut(function(Et){return Object(K.a)(Object(K.a)({},Et),{},{isHiddenScrollBar:!0})}):ut(function(Et){return Object(K.a)(Object(K.a)({},Et),{},{isHiddenScrollBar:!1})})},et=function(Te){ut(function(Ae){return Object(K.a)(Object(K.a)({},Ae),{},{scrollLeft:Te/q*te||0})})};return R.useImperativeHandle(Ne,function(){return{setScrollLeft:et}}),R.useEffect(function(){var tt=Object(ze.a)(document.body,"mouseup",ee,!1),Te=Object(ze.a)(document.body,"mousemove",Fe,!1);return Re(),function(){tt.remove(),Te.remove()}},[se,Ue]),R.useEffect(function(){var tt=Object(ze.a)(window,"scroll",Re,!1),Te=Object(ze.a)(window,"resize",Re,!1);return function(){tt.remove(),Te.remove()}},[]),R.useEffect(function(){Ze.isHiddenScrollBar||ut(function(tt){var Te,Ae;return Object(K.a)(Object(K.a)({},tt),{},{scrollLeft:Ie.current.scrollLeft/((Te=Ie.current)===null||Te===void 0?void 0:Te.scrollWidth)*((Ae=Ie.current)===null||Ae===void 0?void 0:Ae.clientWidth)})})},[Ze.isHiddenScrollBar]),q<=te||!se||Ze.isHiddenScrollBar?null:R.createElement("div",{style:{height:Object(u.a)(),width:te,bottom:ae},className:"".concat(Q,"-sticky-scroll")},R.createElement("div",{onMouseDown:he,ref:ce,className:k()("".concat(Q,"-sticky-scroll-bar"),Object(Y.a)({},"".concat(Q,"-sticky-scroll-bar-active"),Ue)),style:{width:"".concat(se,"px"),transform:"translate3d(".concat(Ze.scrollLeft,"px, 0, 0)")}}))},Xe=R.forwardRef(Je);function He(be,_e){return R.useMemo(function(){var Ne=!!be;return{isSticky:Ne,stickyClassName:Ne?"".concat(_e,"-sticky-header"):"",offsetHeader:Object(H.a)(be)==="object"&&be.offsetHeader||0,offsetScroll:Object(H.a)(be)==="object"&&be.offsetScroll||0}},[be,_e])}var ot=[],ft={},dt="rc-table-internal-hook",lt=R.memo(function(be){var _e=be.children;return _e},function(be,_e){return D()(be.props,_e.props)?be.pingLeft!==_e.pingLeft||be.pingRight!==_e.pingRight:!1});function yt(be){var _e,Ne=be.prefixCls,ke=be.className,Ee=be.rowClassName,Ie=be.style,pe=be.data,ae=be.rowKey,ie=be.scroll,Q=be.tableLayout,q=be.direction,te=be.title,se=be.footer,ce=be.summary,Se=be.id,je=be.showHeader,Ze=be.components,ut=be.emptyText,it=be.onRow,rt=be.onHeaderRow,Me=be.internalHooks,Ue=be.transformColumns,we=be.internalRefs,ee=be.sticky,he=pe||ot,Fe=!!he.length,Re=R.useState(0),et=Object(N.a)(Re,2),tt=et[0],Te=et[1];R.useEffect(function(){Te(Object(u.a)())});var Ae=R.useMemo(function(){return Object(O.c)(Ze,{})},[Ze]),Qe=R.useCallback(function(gn,rn){return Object(O.b)(Ae,gn)||rn},[Ae]),Et=R.useMemo(function(){return typeof ae=="function"?ae:function(gn){var rn=gn&&gn[ae];return rn}},[ae]),vt=Object(v.c)(be),cn=vt.expandIcon,yn=vt.expandedRowKeys,ln=vt.defaultExpandedRowKeys,bt=vt.defaultExpandAllRows,An=vt.expandedRowRender,zn=vt.onExpand,Tn=vt.onExpandedRowsChange,Gt=vt.expandRowByClick,Sn=vt.rowExpandable,Wn=vt.expandIconColumnIndex,gr=vt.expandedRowClassName,nt=vt.childrenColumnName,ct=vt.indentSize,qn=cn||Ke,Tr=nt||"children",vr=R.useMemo(function(){return An?"row":be.expandable&&Me===dt&&be.expandable.__PARENT_RENDER_ICON__||he.some(function(gn){return gn&&Object(H.a)(gn)==="object"&&gn[Tr]})?"nest":!1},[!!An,he]),Fr=R.useState(function(){return ln||(bt?We(he,Et,Tr):[])}),Fn=Object(N.a)(Fr,2),Lt=Fn[0],Pe=Fn[1],Ce=R.useMemo(function(){return new Set(yn||Lt||[])},[yn,Lt]),It=R.useCallback(function(gn){var rn=Et(gn,he.indexOf(gn)),on,hr=Ce.has(rn);hr?(Ce.delete(rn),on=Object(L.a)(Ce)):on=[].concat(Object(L.a)(Ce),[rn]),Pe(on),zn&&zn(!hr,gn),Tn&&Tn(on)},[Et,Ce,he,zn,Tn]),Ht=R.useState(0),vn=Object(N.a)(Ht,2),fn=vn[0],nn=vn[1],Kt=Object(le.b)(Object(K.a)(Object(K.a)(Object(K.a)({},be),vt),{},{expandable:!!An,expandedKeys:Ce,getRowKey:Et,onTriggerExpand:It,expandIcon:qn,expandIconColumnIndex:Wn,direction:q}),Me===dt?Ue:null),Dt=Object(N.a)(Kt,2),Pt=Dt[0],Ft=Dt[1],Mt=R.useMemo(function(){return{columns:Pt,flattenColumns:Ft}},[Pt,Ft]),Zt=R.useRef(),ht=R.useRef(),un=R.useRef(),Jt=R.useState(!1),In=Object(N.a)(Jt,2),kt=In[0],Mn=In[1],kn=R.useState(!1),wn=Object(N.a)(kn,2),bn=wn[0],Dn=wn[1],rr=re(new Map),ur=Object(N.a)(rr,2),Xn=ur[0],xn=ur[1],dr=Object(O.a)(Ft),dn=dr.map(function(gn){return Xn.get(gn)}),hn=R.useMemo(function(){return dn},[dn.join("_")]),pn=Be(hn,Ft.length,q),zt=ie&&Object(O.d)(ie.y),St=ie&&Object(O.d)(ie.x),jt=St&&Ft.some(function(gn){var rn=gn.fixed;return rn}),xt=R.useRef(),qt=He(ee,Ne),Ut=qt.isSticky,ir=qt.offsetHeader,Pn=qt.offsetScroll,cr=qt.stickyClassName,Qr,Pr,zr;zt&&(Pr={overflowY:"scroll",maxHeight:ie.y}),St&&(Qr={overflowX:"auto"},zt||(Pr={overflowY:"hidden"}),zr={width:ie.x===!0?"auto":ie.x,minWidth:"100%"});var Nr=R.useCallback(function(gn,rn){xn(function(on){var hr=new Map(on);return hr.set(gn,rn),hr})},[]),Rr=oe(null),Kr=Object(N.a)(Rr,2),jn=Kr[0],Rt=Kr[1];function Xr(gn,rn){if(!rn)return;typeof rn=="function"?rn(gn):rn.scrollLeft!==gn&&(rn.scrollLeft=gn)}var _r=function(rn){var on=rn.currentTarget,hr=rn.scrollLeft,Zr=typeof hr=="number"?hr:on.scrollLeft,qr=on||ft;if(!Rt()||Rt()===qr){var ri;jn(qr),Xr(Zr,ht.current),Xr(Zr,un.current),Xr(Zr,(ri=xt.current)===null||ri===void 0?void 0:ri.setScrollLeft)}if(on){var Ti=on.scrollWidth,Qt=on.clientWidth;Mn(Zr>0),Dn(Zr0?[].concat(Object(K.a)(l),Object(K.a)(g(f).map(function(O){return Object(L.a)({fixed:n},O)}))):[].concat(Object(K.a)(l),[Object(L.a)(Object(L.a)({},i),{},{fixed:n})])},[])}function h(s){for(var l=!0,i=0;i=0;f-=1){var O=s[f];if(n&&O.fixed!=="right")n=!1;else if(!n&&O.fixed==="right"){Object(j.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function u(s){return s.map(function(l){var i=l.fixed,o=Object(H.a)(l,["fixed"]),n=i;return i==="left"?n="right":i==="right"&&(n="left"),Object(L.a)({fixed:n},o)})}function d(s,l){var i=s.prefixCls,o=s.columns,n=s.children,f=s.expandable,O=s.expandedKeys,S=s.getRowKey,x=s.onTriggerExpand,w=s.expandIcon,T=s.rowExpandable,y=s.expandIconColumnIndex,v=s.direction,p=s.expandRowByClick,c=N.useMemo(function(){return o||D(n)},[o,n]),E=N.useMemo(function(){if(f){var I,P=y||0,B=c[P],z=(I={},Object(Y.a)(I,A.a,{className:"".concat(i,"-expand-icon-col")}),Object(Y.a)(I,"title",""),Object(Y.a)(I,"fixed",B?B.fixed:null),Object(Y.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(Y.a)(I,"render",function(W,V,J){var ne=S(V,J),fe=O.has(ne),ue=T?T(V):!0,le=w({prefixCls:i,expanded:fe,expandable:ue,record:V,onExpand:x});return p?N.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},le):le}),I),U=c.slice();return P>=0&&U.splice(P,0,z),U}return c},[f,c,S,O,w,v]),_=N.useMemo(function(){var I=E;return l&&(I=l(I)),I.length||(I=[{render:function(){return null}}]),I},[l,E,v]),b=N.useMemo(function(){return v==="rtl"?u(g(_)):g(_)},[_,v]);return[_,b]}ye.b=d},"y0+3":function(Le,ye,F){"use strict";F.d(ye,"a",function(){return g}),F.d(ye,"b",function(){return u});var Y=/margin|padding|width|height|max|min|offset/,K={left:!0,top:!0},L={cssFloat:1,styleFloat:1,float:1};function H(d){return d.nodeType===1?d.ownerDocument.defaultView.getComputedStyle(d,null):{}}function N(d,s,l){if(s=s.toLowerCase(),l==="auto"){if(s==="height")return d.offsetHeight;if(s==="width")return d.offsetWidth}return s in K||(K[s]=Y.test(s)),K[s]?parseFloat(l)||0:l}function R(d,s){var l=arguments.length,i=H(d);return s=L[s]?"cssFloat"in d.style?"cssFloat":"styleFloat":s,l===1?i:N(d,s,i[s]||d.style[s])}function j(d,s,l){var i=arguments.length;if(s=L[s]?"cssFloat"in d.style?"cssFloat":"styleFloat":s,i===3)return typeof l=="number"&&Y.test(s)&&(l="".concat(l,"px")),d.style[s]=l,l;for(var o in s)s.hasOwnProperty(o)&&j(d,o,s[o]);return H(d)}function k(d){return d===document.body?document.documentElement.clientWidth:d.offsetWidth}function A(d){return d===document.body?window.innerHeight||document.documentElement.clientHeight:d.offsetHeight}function D(){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:d,height:s}}function g(){var d=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:d,height:s}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(d){var s=d.getBoundingClientRect(),l=document.documentElement;return{left:s.left+(window.pageXOffset||l.scrollLeft)-(l.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||l.scrollTop)-(l.clientTop||document.body.clientTop||0)}}},ynwM:function(Le,ye,F){var Y=F("MFOe"),K=Y.Global;Le.exports={name:"oldFF-globalStorage",read:H,write:N,each:R,remove:j,clearAll:k};var L=K.globalStorage;function H(A){return L[A]}function N(A,D){L[A]=D}function R(A){for(var D=L.length-1;D>=0;D--){var g=L.key(D);A(L[g],g)}}function j(A){return L.removeItem(A)}function k(){R(function(A,D){delete L[A]})}}}]); diff --git a/umi.697211d5.js b/umi.c253ce2c.js similarity index 99% rename from umi.697211d5.js rename to umi.c253ce2c.js index b6f751f258..8282567040 100644 --- a/umi.697211d5.js +++ b/umi.c253ce2c.js @@ -1,4 +1,4 @@ -(function(b){function h(l){for(var p=l[0],o=l[1],m=l[2],c,v,y=0,j=[];y