|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},84105:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},73331:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},15277:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},61485:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},47472:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(54476),J=f(59301),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},j=C,p=f(7657),P=function(b,be){return J.createElement(p.Z,(0,E.Z)({},b,{ref:be,icon:j}))},T=J.forwardRef(P),ye=T},2018:function(){"use strict"},66551:function(){"use strict"},94949:function(nn,xe,f){"use strict";f.d(xe,{t:function(){return N}});var E=f(59301),J=f(3113),C={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},j=f(92310),p=f.n(j),P=Object.defineProperty,T=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,b=(ve,Ee,V)=>Ee in ve?P(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:V}):ve[Ee]=V,be=(ve,Ee)=>{for(var V in Ee||(Ee={}))ye.call(Ee,V)&&b(ve,V,Ee[V]);if(T)for(var V of T(Ee))q.call(Ee,V)&&b(ve,V,Ee[V]);return ve};const N=({cancelText:ve="\u53D6\u6D88",okText:Ee="\u786E\u5B9A",loading:V=!1,hasOkBtn:Xe=!0,hasCancelBtn:et=!0,okButtonProps:yt={},onCancel:Lt=()=>{},onOk:Z=()=>{},className:F=""})=>E.createElement("div",{className:p()(C.buttonFixed,F)},E.createElement("div",{className:C.buttonWrap},et&&E.createElement(J.ZP,{size:"middle",className:`${C.button} mr20`,onClick:Lt},ve),Xe&&E.createElement(J.ZP,be({size:"middle",type:"primary",className:`${C.button} mr20`,loading:V,onClick:Z},yt),Ee)))},92928:function(nn,xe,f){"use strict";f.d(xe,{h:function(){return F}});var E=f(59301),J=f(57809),C=f(78241),j=f(3113),p=f(89780),P=f.n(p),T=f(2018),ye=f(66551),q=Object.defineProperty,b=Object.defineProperties,be=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,V=(m,c,S)=>c in m?q(m,c,{enumerable:!0,configurable:!0,writable:!0,value:S}):m[c]=S,Xe=(m,c)=>{for(var S in c||(c={}))ve.call(c,S)&&V(m,S,c[S]);if(N)for(var S of N(c))Ee.call(c,S)&&V(m,S,c[S]);return m},et=(m,c)=>b(m,be(c));const yt=J.default.Option,Lt={labelCol:{span:4},wrapperCol:{span:20}},Z={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"]};xe.Z=({callback:m,onCancel:c})=>{const[S,I]=(0,E.useState)("python");function B(ne){I(Z[ne][1])}function R(ne){m(ne)}return E.createElement(C.default,et(Xe({},Lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:R,style:{width:500}}),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.createElement(J.default,{getPopupContainer:ne=>ne.parentNode,onChange:B},Object.keys(Z).map(ne=>E.createElement(yt,{key:ne,value:ne},Z[ne][0])))),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.createElement(F,{mode:S})),E.createElement("div",{className:"flex-container flex-end"},E.createElement(j.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(j.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function F({value:m,onChange:c,mode:S,options:I={}}){const B=(0,E.useRef)(),[R,ne]=(0,E.useState)();return(0,E.useEffect)(()=>{if(R){let ze=function(Ze){const ge=Ze.getValue();c&&c(ge)};return R.on("change",ze),()=>{R.off("change",ze)}}},[R,c]),(0,E.useEffect)(()=>{R&&R.setOption("mode",S)},[R,S]),(0,E.useEffect)(()=>{R&&(m!==R.getValue()||m==="")&&setTimeout(()=>{R.setValue(m||"")},300)},[R,m]),(0,E.useEffect)(()=>{if(B.current&&!R){const ze=P().fromTextArea(B.current,Xe({mode:S,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},I));ne(ze)}},[B.current,R]),E.createElement("div",{className:"my-codemirror-container"},E.createElement("textarea",{ref:B}))}},66996:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{default:function(){return Lt}});var E=f(59301),J=f(58106),C=f(78241),j=f(92832),p=f(92928),P=f(94949),T={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},ye=Object.defineProperty,q=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,N=(Z,F,m)=>F in Z?ye(Z,F,{enumerable:!0,configurable:!0,writable:!0,value:m}):Z[F]=m,ve=(Z,F)=>{for(var m in F||(F={}))b.call(F,m)&&N(Z,m,F[m]);if(q)for(var m of q(F))be.call(F,m)&&N(Z,m,F[m]);return Z},Ee=(Z,F)=>{var m={};for(var c in Z)b.call(Z,c)&&F.indexOf(c)<0&&(m[c]=Z[c]);if(Z!=null&&q)for(var c of q(Z))F.indexOf(c)<0&&be.call(Z,c)&&(m[c]=Z[c]);return m},V=(Z,F,m)=>new Promise((c,S)=>{var I=ne=>{try{R(m.next(ne))}catch(ze){S(ze)}},B=ne=>{try{R(m.throw(ne))}catch(ze){S(ze)}},R=ne=>ne.done?c(ne.value):Promise.resolve(ne.value).then(I,B);R((m=m.apply(Z,F)).next())});const Xe=Z=>{var F=Z,{shixunsDetail:m,globalSetting:c,loading:S,user:I,dispatch:B}=F,R=Ee(F,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ne=(0,J.useLocation)(),[ze,Ze]=(0,E.useState)({}),ge=(0,E.useRef)(),dt=(0,E.useRef)(),[Ge]=C.default.useForm(),[Fe,le]=(0,E.useState)("");(0,E.useEffect)(()=>(B({type:"globalSetting/footerToggle",payload:!1}),()=>{B({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,E.useEffect)(()=>{const X=sessionStorage.getItem("pathArray");if(X){const k=X.split(",").join("/"),We=k.indexOf("/")===0?k.substr(1):k;le(We)}},[]),(0,E.useEffect)(()=>{var X,k,We,Te;dt.current=(k=(X=ne.pathname)==null?void 0:X.split("/"))==null?void 0:k[2],ge.current=((Te=(We=ne.pathname)==null?void 0:We.split("/"))==null?void 0:Te[3])==="repository"},[]);const _=(...X)=>V(void 0,[...X],function*(k={}){if(yield B({type:"shixunsDetail/addRepositoryFile",payload:{id:dt.current,message:k.commitMessage,content:k.codeMirror,path:`${Fe?`${Fe}/`:""}${k.path||""}`,secret_repository:ge.current?void 0:!0}})){const Te=ge.current?`/shixuns/${dt.current}/repository${Fe?`/master/shixun_show/${Fe}`:""}`:`/shixuns/${dt.current}/secret_repository`;J.history.replace(Te)}}),ae=()=>{var X,k;J.history.push(`/shixuns/${dt.current}/${(k=(X=ne.pathname)==null?void 0:X.split("/"))==null?void 0:k[3]}${Fe?`/master/shixun_show/${Fe}`:""}`)};return E.createElement("section",{className:T.bg},E.createElement("div",{className:T.wrap},E.createElement("div",{className:T.title},"\u65B0\u5EFA\u6587\u4EF6"),E.createElement(C.default,{className:"mt10",form:Ge,scrollToFirstError:!0,layout:"vertical",onFinish:_,onValuesChange:()=>Ze(ve({},Ge.getFieldsValue()))},E.createElement(C.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},E.createElement(C.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},E.createElement("span",null,E.createElement("span",{className:"mr5"},Fe?`${Fe}/`:""),E.createElement(j.default,{className:T.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),E.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),E.createElement(C.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},E.createElement(j.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),E.createElement("div",{className:"mt10 mb20"},E.createElement(C.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},E.createElement(p.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),E.createElement(C.default.Item,{noStyle:!0},E.createElement(P.t,{okButtonProps:{htmlType:"submit"},onCancel:ae})))))};var et=(0,J.connect)(({shixunsDetail:Z,loading:F,globalSetting:m,user:c})=>({shixunsDetail:Z,globalSetting:m,user:c,loading:F.models.index}))(Xe);const yt=({globalSetting:Z})=>E.createElement(et,null);var Lt=(0,J.connect)(({globalSetting:Z})=>({globalSetting:Z}))(yt)},19080:function(nn,xe,f){"use strict";f.d(xe,{F:function(){return p},Z:function(){return j}});var E=f(92310),J=f.n(E);const C=null;function j(P,T,ye){return J()({[`${P}-status-success`]:T==="success",[`${P}-status-warning`]:T==="warning",[`${P}-status-error`]:T==="error",[`${P}-status-validating`]:T==="validating",[`${P}-has-feedback`]:ye})}const p=(P,T)=>T||P},93891:function(nn,xe,f){"use strict";var E=f(59301),J=f(36355),C=f(64165);const j=p=>{const{componentName:P}=p,{getPrefixCls:T}=(0,E.useContext)(J.E_),ye=T("empty");switch(P){case"Table":case"List":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return E.createElement(C.Z,null)}};xe.Z=j},64165:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return Z}});var E=f(92310),J=f.n(E),C=f(59301),j=f(36355),p=f(9763),P=f(64993),T=f(88088),q=()=>{const[,F]=(0,T.Z)(),c=new P.C(F.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return C.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{fill:"none",fillRule:"evenodd"},C.createElement("g",{transform:"translate(24 31.67)"},C.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),C.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),C.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),C.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),C.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),C.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),C.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},C.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),C.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},be=()=>{const[,F]=(0,T.Z)(),{colorFill:m,colorFillTertiary:c,colorFillQuaternary:S,colorBgContainer:I}=F,{borderColor:B,shadowColor:R,contentColor:ne}=(0,C.useMemo)(()=>({borderColor:new P.C(m).onBackground(I).toHexShortString(),shadowColor:new P.C(c).onBackground(I).toHexShortString(),contentColor:new P.C(S).onBackground(I).toHexShortString()}),[m,c,S,I]);return C.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},C.createElement("ellipse",{fill:R,cx:"32",cy:"33",rx:"32",ry:"7"}),C.createElement("g",{fillRule:"nonzero",stroke:B},C.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),C.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:ne}))))},N=f(83116),ve=f(37613);const Ee=F=>{const{componentCls:m,margin:c,marginXS:S,marginXL:I,fontSize:B,lineHeight:R}=F;return{[m]:{marginInline:S,fontSize:B,lineHeight:R,textAlign:"center",[`${m}-image`]:{height:F.emptyImgHeight,marginBottom:S,opacity:F.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${m}-description`]:{color:F.colorText},[`${m}-footer`]:{marginTop:c},"&-normal":{marginBlock:I,color:F.colorTextDisabled,[`${m}-description`]:{color:F.colorTextDisabled},[`${m}-image`]:{height:F.emptyImgHeightMD}},"&-small":{marginBlock:S,color:F.colorTextDisabled,[`${m}-image`]:{height:F.emptyImgHeightSM}}}}};var V=(0,N.Z)("Empty",F=>{const{componentCls:m,controlHeightLG:c}=F,S=(0,ve.TS)(F,{emptyImgCls:`${m}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Ee(S)]}),Xe=function(F,m){var c={};for(var S in F)Object.prototype.hasOwnProperty.call(F,S)&&m.indexOf(S)<0&&(c[S]=F[S]);if(F!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,S=Object.getOwnPropertySymbols(F);I<S.length;I++)m.indexOf(S[I])<0&&Object.prototype.propertyIsEnumerable.call(F,S[I])&&(c[S[I]]=F[S[I]]);return c};const et=C.createElement(q,null),yt=C.createElement(be,null),Lt=F=>{var{className:m,rootClassName:c,prefixCls:S,image:I=et,description:B,children:R,imageStyle:ne,style:ze}=F,Ze=Xe(F,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ge,direction:dt,empty:Ge}=C.useContext(j.E_),Fe=ge("empty",S),[le,_]=V(Fe),[ae]=(0,p.Z)("Empty"),X=typeof B!="undefined"?B:ae==null?void 0:ae.description,k=typeof X=="string"?X:"empty";let We=null;return typeof I=="string"?We=C.createElement("img",{alt:k,src:I}):We=I,le(C.createElement("div",Object.assign({className:J()(_,Fe,Ge==null?void 0:Ge.className,{[`${Fe}-normal`]:I===yt,[`${Fe}-rtl`]:dt==="rtl"},m,c),style:Object.assign(Object.assign({},Ge==null?void 0:Ge.style),ze)},Ze),C.createElement("div",{className:`${Fe}-image`,style:ne},We),X&&C.createElement("div",{className:`${Fe}-description`},X),R&&C.createElement("div",{className:`${Fe}-footer`},R)))};Lt.PRESENTED_IMAGE_DEFAULT=et,Lt.PRESENTED_IMAGE_SIMPLE=yt;var Z=Lt},78241:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return _t}});var E=f(94480),J=f(92310),C=f.n(J),j=f(77900),p=f(59301),P=f(62892),T=f(32441);function ye(y){const[D,z]=p.useState(y);return p.useEffect(()=>{const h=setTimeout(()=>{z(y)},y.length?0:10);return()=>{clearTimeout(h)}},[y]),D}var q=f(17313),b=f(29878),be=f(8378),N=f(37613),ve=f(83116),V=y=>{const{componentCls:D}=y,z=`${D}-show-help`,h=`${D}-show-help-item`;return{[z]:{transition:`opacity ${y.motionDurationSlow} ${y.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[h]:{overflow:"hidden",transition:`height ${y.motionDurationSlow} ${y.motionEaseInOut},
|
|
|
opacity ${y.motionDurationSlow} ${y.motionEaseInOut},
|
|
|
transform ${y.motionDurationSlow} ${y.motionEaseInOut} !important`,[`&${h}-appear, &${h}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${h}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Xe=y=>({legend:{display:"block",width:"100%",marginBottom:y.marginLG,padding:0,color:y.colorTextDescription,fontSize:y.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${y.lineWidth}px ${y.lineType} ${y.colorBorder}`},label:{fontSize:y.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${y.controlOutlineWidth}px ${y.controlOutline}`},output:{display:"block",paddingTop:15,color:y.colorText,fontSize:y.fontSize,lineHeight:y.lineHeight}}),et=(y,D)=>{const{formItemCls:z}=y;return{[z]:{[`${z}-label > label`]:{height:D},[`${z}-control-input`]:{minHeight:D}}}},yt=y=>{const{componentCls:D}=y;return{[y.componentCls]:Object.assign(Object.assign(Object.assign({},(0,q.Wf)(y)),Xe(y)),{[`${D}-text`]:{display:"inline-block",paddingInlineEnd:y.paddingSM},"&-small":Object.assign({},et(y,y.controlHeightSM)),"&-large":Object.assign({},et(y,y.controlHeightLG))})}},Lt=y=>{const{formItemCls:D,iconCls:z,componentCls:h,rootPrefixCls:d,labelRequiredMarkColor:x,labelColor:L,labelFontSize:te,labelHeight:$,labelColonMarginInlineStart:W,labelColonMarginInlineEnd:ie,itemMarginBottom:oe}=y;return{[D]:Object.assign(Object.assign({},(0,q.Wf)(y)),{marginBottom:oe,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${d}-row`]:{display:"none"},"&-has-warning":{[`${D}-split`]:{color:y.colorError}},"&-has-error":{[`${D}-split`]:{color:y.colorWarning}},[`${D}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${y.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:$,color:L,fontSize:te,[`> ${z}`]:{fontSize:y.fontSize,verticalAlign:"top"},[`&${D}-required:not(${D}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:y.marginXXS,color:x,fontSize:y.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${h}-hide-required-mark &`]:{display:"none"}},[`${D}-optional`]:{display:"inline-block",marginInlineStart:y.marginXXS,color:y.colorTextDescription,[`${h}-hide-required-mark &`]:{display:"none"}},[`${D}-tooltip`]:{color:y.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:y.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:W,marginInlineEnd:ie},[`&${D}-no-colon::after`]:{content:'"\\a0"'}}},[`${D}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${d}-col-'"]):not([class*="' ${d}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:y.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[D]:{"&-explain, &-extra":{clear:"both",color:y.colorTextDescription,fontSize:y.fontSize,lineHeight:y.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:y.controlHeightSM,transition:`color ${y.motionDurationMid} ${y.motionEaseOut}`},"&-explain":{"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning}}},[`&-with-help ${D}-explain`]:{height:"auto",opacity:1},[`${D}-feedback-icon`]:{fontSize:y.fontSize,textAlign:"center",visibility:"visible",animationName:b.kr,animationDuration:y.motionDurationMid,animationTimingFunction:y.motionEaseOutBack,pointerEvents:"none","&-success":{color:y.colorSuccess},"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning},"&-validating":{color:y.colorPrimary}}})}},Z=y=>{const{componentCls:D,formItemCls:z}=y;return{[`${D}-horizontal`]:{[`${z}-label`]:{flexGrow:0},[`${z}-control`]:{flex:"1 1 0",minWidth:0},[`${z}-label[class$='-24'], ${z}-label[class*='-24 ']`]:{[`& + ${z}-control`]:{minWidth:"unset"}}}}},F=y=>{const{componentCls:D,formItemCls:z}=y;return{[`${D}-inline`]:{display:"flex",flexWrap:"wrap",[z]:{flex:"none",marginInlineEnd:y.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${z}-label,
|
|
|
> ${z}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${z}-label`]:{flex:"none"},[`${D}-text`]:{display:"inline-block"},[`${z}-has-feedback`]:{display:"inline-block"}}}}},m=y=>({padding:y.verticalLabelPadding,margin:y.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=y=>{const{componentCls:D,formItemCls:z,rootPrefixCls:h}=y;return{[`${z} ${z}-label`]:m(y),[D]:{[z]:{flexWrap:"wrap",[`${z}-label, ${z}-control`]:{[`&:not([class*=" ${h}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},S=y=>{const{componentCls:D,formItemCls:z,rootPrefixCls:h}=y;return{[`${D}-vertical`]:{[z]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${D}-item-control`]:{width:"100%"}}},[`${D}-vertical ${z}-label,
|
|
|
.${h}-col-24${z}-label,
|
|
|
.${h}-col-xl-24${z}-label`]:m(y),[`@media (max-width: ${y.screenXSMax}px)`]:[c(y),{[D]:{[`.${h}-col-xs-24${z}-label`]:m(y)}}],[`@media (max-width: ${y.screenSMMax}px)`]:{[D]:{[`.${h}-col-sm-24${z}-label`]:m(y)}},[`@media (max-width: ${y.screenMDMax}px)`]:{[D]:{[`.${h}-col-md-24${z}-label`]:m(y)}},[`@media (max-width: ${y.screenLGMax}px)`]:{[D]:{[`.${h}-col-lg-24${z}-label`]:m(y)}}}},I=(y,D)=>(0,N.TS)(y,{formItemCls:`${y.componentCls}-item`,rootPrefixCls:D});var B=(0,ve.Z)("Form",(y,D)=>{let{rootPrefixCls:z}=D;const h=I(y,z);return[yt(h),Lt(h),V(h),Z(h),F(h),S(h),(0,be.Z)(h),b.kr]},y=>({labelRequiredMarkColor:y.colorError,labelColor:y.colorTextHeading,labelFontSize:y.fontSize,labelHeight:y.controlHeight,labelColonMarginInlineStart:y.marginXXS/2,labelColonMarginInlineEnd:y.marginXS,itemMarginBottom:y.marginLG,verticalLabelPadding:`0 0 ${y.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const R=[];function ne(y,D,z){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof y=="string"?y:`${D}-${h}`,error:y,errorStatus:z}}var Ze=y=>{let{help:D,helpStatus:z,errors:h=R,warnings:d=R,className:x,fieldId:L,onVisibleChanged:te}=y;const{prefixCls:$}=p.useContext(T.Rk),W=`${$}-item-explain`,[,ie]=B($),oe=(0,p.useMemo)(()=>(0,P.Z)($),[$]),Ae=ye(h),M=ye(d),K=p.useMemo(()=>D!=null?[ne(D,"help",z)]:[].concat((0,E.Z)(Ae.map((pe,_e)=>ne(pe,"error","error",_e))),(0,E.Z)(M.map((pe,_e)=>ne(pe,"warning","warning",_e)))),[D,z,Ae,M]),Ve={};return L&&(Ve.id=`${L}_help`),p.createElement(j.default,{motionDeadline:oe.motionDeadline,motionName:`${$}-show-help`,visible:!!K.length,onVisibleChanged:te},pe=>{const{className:_e,style:Me}=pe;return p.createElement("div",Object.assign({},Ve,{className:C()(W,_e,x,ie),style:Me,role:"alert"}),p.createElement(j.CSSMotionList,Object.assign({keys:K},(0,P.Z)($),{motionName:`${$}-show-help-item`,component:!1}),ot=>{const{key:Q,error:Ye,errorStatus:gt,className:Mt,style:qe}=ot;return p.createElement("div",{key:Q,className:C()(Mt,{[`${W}-${gt}`]:gt}),style:qe},Ye)}))})},ge=f(95013),dt=f(36355),Ge=f(1684),Fe=f(52946),le=f(19716),_=f(16722);const ae=["parentNode"],X="form_item";function k(y){return y===void 0||y===!1?[]:Array.isArray(y)?y:[y]}function We(y,D){if(!y.length)return;const z=y.join("_");return D?`${D}_${z}`:ae.includes(z)?`${X}_${z}`:z}function Te(y,D,z,h,d,x){let L=h;return x!==void 0?L=x:z.validating?L="validating":y.length?L="error":D.length?L="warning":(z.touched||d&&z.validated)&&(L="success"),L}function ue(y){return k(y).join("_")}function Ie(y){const[D]=(0,ge.useForm)(),z=p.useRef({}),h=p.useMemo(()=>y!=null?y:Object.assign(Object.assign({},D),{__INTERNAL__:{itemRef:d=>x=>{const L=ue(d);x?z.current[L]=x:delete z.current[L]}},scrollToField:function(d){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const L=k(d),te=We(L,h.__INTERNAL__.name),$=te?document.getElementById(te):null;$&&(0,_.Z)($,Object.assign({scrollMode:"if-needed",block:"nearest"},x))},getFieldInstance:d=>{const x=ue(d);return z.current[x]}}),[y,D]);return[h]}var fe=f(28726),xt=function(y,D){var z={};for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&D.indexOf(h)<0&&(z[h]=y[h]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(y);d<h.length;d++)D.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(y,h[d])&&(z[h[d]]=y[h[d]]);return z};const Dt=(y,D)=>{const z=p.useContext(Ge.Z),{getPrefixCls:h,direction:d,form:x}=p.useContext(dt.E_),{prefixCls:L,className:te,rootClassName:$,size:W,disabled:ie=z,form:oe,colon:Ae,labelAlign:M,labelWrap:K,labelCol:Ve,wrapperCol:pe,hideRequiredMark:_e,layout:Me="horizontal",scrollToFirstError:ot,requiredMark:Q,onFinishFailed:Ye,name:gt,style:Mt,feedbackIcons:qe}=y,ht=xt(y,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),zt=(0,le.Z)(W),Oe=p.useContext(fe.Z),je=(0,p.useMemo)(()=>Q!==void 0?Q:x&&x.requiredMark!==void 0?x.requiredMark:!_e,[_e,Q,x]),at=Ae!=null?Ae:x==null?void 0:x.colon,ft=h("form",L),[Ht,kt]=B(ft),Gt=C()(ft,`${ft}-${Me}`,{[`${ft}-hide-required-mark`]:je===!1,[`${ft}-rtl`]:d==="rtl",[`${ft}-${zt}`]:zt},kt,x==null?void 0:x.className,te,$),[Vt]=Ie(oe),{__INTERNAL__:Tt}=Vt;Tt.name=gt;const Et=(0,p.useMemo)(()=>({name:gt,labelAlign:M,labelCol:Ve,labelWrap:K,wrapperCol:pe,vertical:Me==="vertical",colon:at,requiredMark:je,itemRef:Tt.itemRef,form:Vt,feedbackIcons:qe}),[gt,M,Ve,pe,Me,at,je,Vt,qe]);p.useImperativeHandle(D,()=>Vt);const Wt=(cn,Nt)=>{if(cn){let Zt={block:"nearest"};typeof cn=="object"&&(Zt=cn),Vt.scrollToField(Nt,Zt)}},Ot=cn=>{if(Ye==null||Ye(cn),cn.errorFields.length){const Nt=cn.errorFields[0].name;if(ot!==void 0){Wt(ot,Nt);return}x&&x.scrollToFirstError!==void 0&&Wt(x.scrollToFirstError,Nt)}};return Ht(p.createElement(Ge.n,{disabled:ie},p.createElement(Fe.q,{size:zt},p.createElement(T.RV,Object.assign({},{validateMessages:Oe}),p.createElement(T.q3.Provider,{value:Et},p.createElement(ge.default,Object.assign({id:gt},ht,{name:gt,onFinishFailed:Ot,form:Vt,style:Object.assign(Object.assign({},x==null?void 0:x.style),Mt),className:Gt})))))))};var Je=p.forwardRef(Dt),It=f(41799),it=f(8654),A=f(92343),Ce=f(11592);function se(y){if(typeof y=="function")return y;const D=(0,Ce.Z)(y);return D.length<=1?D[0]:D}const G=()=>{const{status:y,errors:D=[],warnings:z=[]}=(0,p.useContext)(T.aM);return{status:y,errors:D,warnings:z}};G.Context=T.aM;var re=G,de=f(16089);function Se(y){const[D,z]=p.useState(y),h=(0,p.useRef)(null),d=(0,p.useRef)([]),x=(0,p.useRef)(!1);p.useEffect(()=>(x.current=!1,()=>{x.current=!0,de.Z.cancel(h.current),h.current=null}),[]);function L(te){x.current||(h.current===null&&(d.current=[],h.current=(0,de.Z)(()=>{h.current=null,z($=>{let W=$;return d.current.forEach(ie=>{W=ie(W)}),W})})),d.current.push(te))}return[D,L]}function ce(){const{itemRef:y}=p.useContext(T.q3),D=p.useRef({});function z(h,d){const x=d&&typeof d=="object"&&d.ref,L=h.join("_");return(D.current.name!==L||D.current.originRef!==x)&&(D.current.name=L,D.current.originRef=x,D.current.ref=(0,it.sQ)(y(h),x)),D.current.ref}return z}var De=f(29194),ee=f(34280),Be=f(2738),he=f(27382),Pe=f(37028);const we=y=>{const{formItemCls:D}=y;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${D}-control`]:{display:"flex"}}}};var Ne=(0,ve.b)(["Form","item-item"],(y,D)=>{let{rootPrefixCls:z}=D;const h=I(y,z);return[we(h)]}),U=y=>{const{prefixCls:D,status:z,wrapperCol:h,children:d,errors:x,warnings:L,_internalItemRender:te,extra:$,help:W,fieldId:ie,marginBottom:oe,onErrorVisibleChanged:Ae}=y,M=`${D}-item`,K=p.useContext(T.q3),Ve=h||K.wrapperCol||{},pe=C()(`${M}-control`,Ve.className),_e=p.useMemo(()=>Object.assign({},K),[K]);delete _e.labelCol,delete _e.wrapperCol;const Me=p.createElement("div",{className:`${M}-control-input`},p.createElement("div",{className:`${M}-control-input-content`},d)),ot=p.useMemo(()=>({prefixCls:D,status:z}),[D,z]),Q=oe!==null||x.length||L.length?p.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},p.createElement(T.Rk.Provider,{value:ot},p.createElement(Ze,{fieldId:ie,errors:x,warnings:L,help:W,helpStatus:z,className:`${M}-explain-connected`,onVisibleChanged:Ae})),!!oe&&p.createElement("div",{style:{width:0,height:oe}})):null,Ye={};ie&&(Ye.id=`${ie}_extra`);const gt=$?p.createElement("div",Object.assign({},Ye,{className:`${M}-extra`}),$):null,Mt=te&&te.mark==="pro_table_render"&&te.render?te.render(y,{input:Me,errorList:Q,extra:gt}):p.createElement(p.Fragment,null,Me,Q,gt);return p.createElement(T.q3.Provider,{value:_e},p.createElement(Pe.Z,Object.assign({},Ve,{className:pe}),Mt),p.createElement(Ne,{prefixCls:D}))},tt=f(61485),He=f(31724),st=f(9763),pt=f(6848),rn=function(y,D){var z={};for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&D.indexOf(h)<0&&(z[h]=y[h]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(y);d<h.length;d++)D.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(y,h[d])&&(z[h[d]]=y[h[d]]);return z};function Kt(y){return y?typeof y=="object"&&!p.isValidElement(y)?y:{title:y}:null}var $t=y=>{let{prefixCls:D,label:z,htmlFor:h,labelCol:d,labelAlign:x,colon:L,required:te,requiredMark:$,tooltip:W}=y;var ie;const[oe]=(0,st.Z)("Form"),{vertical:Ae,labelAlign:M,labelCol:K,labelWrap:Ve,colon:pe}=p.useContext(T.q3);if(!z)return null;const _e=d||K||{},Me=x||M,ot=`${D}-item-label`,Q=C()(ot,Me==="left"&&`${ot}-left`,_e.className,{[`${ot}-wrap`]:!!Ve});let Ye=z;const gt=L===!0||pe!==!1&&L!==!1;gt&&!Ae&&typeof z=="string"&&z.trim()!==""&&(Ye=z.replace(/[:|:]\s*$/,""));const qe=Kt(W);if(qe){const{icon:je=p.createElement(tt.Z,null)}=qe,at=rn(qe,["icon"]),ft=p.createElement(pt.Z,Object.assign({},at),p.cloneElement(je,{className:`${D}-item-tooltip`,title:""}));Ye=p.createElement(p.Fragment,null,Ye,ft)}const ht=$==="optional",zt=typeof $=="function";zt?Ye=$(Ye,{required:!!te}):ht&&!te&&(Ye=p.createElement(p.Fragment,null,Ye,p.createElement("span",{className:`${D}-item-optional`,title:""},(oe==null?void 0:oe.optional)||((ie=He.Z.Form)===null||ie===void 0?void 0:ie.optional))));const Oe=C()({[`${D}-item-required`]:te,[`${D}-item-required-mark-optional`]:ht||zt,[`${D}-item-no-colon`]:!gt});return p.createElement(Pe.Z,Object.assign({},_e,{className:Q}),p.createElement("label",{htmlFor:h,className:Oe,title:typeof z=="string"?z:""},Ye))},en=f(29679),Ut=f(19248),sn=f(96512),Cn=f(58617);const fn={success:en.Z,warning:sn.Z,error:Ut.Z,validating:Cn.Z};function An(y){let{children:D,errors:z,warnings:h,hasFeedback:d,validateStatus:x,prefixCls:L,meta:te,noStyle:$}=y;const W=`${L}-item`,{feedbackIcons:ie}=p.useContext(T.q3),oe=Te(z,h,te,null,!!d,x),{isFormItemInput:Ae,status:M}=p.useContext(T.aM),K=p.useMemo(()=>{var Ve;let pe;if(d){const ot=d!==!0&&d.icons||ie,Q=oe&&((Ve=ot==null?void 0:ot({status:oe,errors:z,warnings:h}))===null||Ve===void 0?void 0:Ve[oe]),Ye=oe&&fn[oe];pe=Q!==!1&&Ye?p.createElement("span",{className:C()(`${W}-feedback-icon`,`${W}-feedback-icon-${oe}`)},Q||p.createElement(Ye,null)):null}let _e=!0,Me=oe||"";return $&&(_e=Ae,Me=(oe!=null?oe:M)||""),{status:Me,errors:z,warnings:h,hasFeedback:!!d,feedbackIcon:pe,isFormItemInput:_e}},[oe,d,$,Ae,M]);return p.createElement(T.aM.Provider,{value:K},D)}var Wn=function(y,D){var z={};for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&D.indexOf(h)<0&&(z[h]=y[h]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(y);d<h.length;d++)D.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(y,h[d])&&(z[h[d]]=y[h[d]]);return z};function xn(y){const{prefixCls:D,className:z,rootClassName:h,style:d,help:x,errors:L,warnings:te,validateStatus:$,meta:W,hasFeedback:ie,hidden:oe,children:Ae,fieldId:M,required:K,isRequired:Ve,onSubItemMetaChange:pe}=y,_e=Wn(y,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Me=`${D}-item`,{requiredMark:ot}=p.useContext(T.q3),Q=p.useRef(null),Ye=ye(L),gt=ye(te),Mt=x!=null,qe=!!(Mt||L.length||te.length),ht=!!Q.current&&(0,De.Z)(Q.current),[zt,Oe]=p.useState(null);(0,ee.Z)(()=>{if(qe&&Q.current){const kt=getComputedStyle(Q.current);Oe(parseInt(kt.marginBottom,10))}},[qe,ht]);const je=kt=>{kt||Oe(null)},ft=function(){let kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Gt=kt?Ye:W.errors,Vt=kt?gt:W.warnings;return Te(Gt,Vt,W,"",!!ie,$)}(),Ht=C()(Me,z,h,{[`${Me}-with-help`]:Mt||Ye.length||gt.length,[`${Me}-has-feedback`]:ft&&ie,[`${Me}-has-success`]:ft==="success",[`${Me}-has-warning`]:ft==="warning",[`${Me}-has-error`]:ft==="error",[`${Me}-is-validating`]:ft==="validating",[`${Me}-hidden`]:oe});return p.createElement("div",{className:Ht,style:d,ref:Q},p.createElement(he.Z,Object.assign({className:`${Me}-row`},(0,Be.Z)(_e,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),p.createElement($t,Object.assign({htmlFor:M},y,{requiredMark:ot,required:K!=null?K:Ve,prefixCls:D})),p.createElement(U,Object.assign({},y,W,{errors:Ye,warnings:gt,prefixCls:D,status:ft,help:x,marginBottom:zt,onErrorVisibleChanged:je}),p.createElement(T.qI.Provider,{value:pe},p.createElement(An,{prefixCls:D,meta:W,errors:W.errors,warnings:W.warnings,hasFeedback:ie,validateStatus:ft},Ae)))),!!zt&&p.createElement("div",{className:`${Me}-margin-offset`,style:{marginBottom:-zt}}))}const Pn="__SPLIT__",vn=null,In=p.memo(y=>{let{children:D}=y;return D},(y,D)=>y.value===D.value&&y.update===D.update&&y.childProps.length===D.childProps.length&&y.childProps.every((z,h)=>z===D.childProps[h]));function wn(y){return y!=null}function pn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Dn(y){const{name:D,noStyle:z,className:h,dependencies:d,prefixCls:x,shouldUpdate:L,rules:te,children:$,required:W,label:ie,messageVariables:oe,trigger:Ae="onChange",validateTrigger:M,hidden:K,help:Ve}=y,{getPrefixCls:pe}=p.useContext(dt.E_),{name:_e}=p.useContext(T.q3),Me=se($),ot=typeof Me=="function",Q=p.useContext(T.qI),{validateTrigger:Ye}=p.useContext(ge.FieldContext),gt=M!==void 0?M:Ye,Mt=wn(D),qe=pe("form",x),[ht,zt]=B(qe),Oe=p.useContext(ge.ListContext),je=p.useRef(),[at,ft]=Se({}),[Ht,kt]=(0,It.Z)(()=>pn()),Gt=Nt=>{const Zt=Oe==null?void 0:Oe.getKey(Nt.name);if(kt(Nt.destroy?pn():Nt,!0),z&&Ve!==!1&&Q){let an=Nt.name;if(Nt.destroy)an=je.current||an;else if(Zt!==void 0){const[Xt,En]=Zt;an=[Xt].concat((0,E.Z)(En)),je.current=an}Q(Nt,an)}},Vt=(Nt,Zt)=>{ft(an=>{const Xt=Object.assign({},an),Un=[].concat((0,E.Z)(Nt.name.slice(0,-1)),(0,E.Z)(Zt)).join(Pn);return Nt.destroy?delete Xt[Un]:Xt[Un]=Nt,Xt})},[Tt,Et]=p.useMemo(()=>{const Nt=(0,E.Z)(Ht.errors),Zt=(0,E.Z)(Ht.warnings);return Object.values(at).forEach(an=>{Nt.push.apply(Nt,(0,E.Z)(an.errors||[])),Zt.push.apply(Zt,(0,E.Z)(an.warnings||[]))}),[Nt,Zt]},[at,Ht.errors,Ht.warnings]),Wt=ce();function Ot(Nt,Zt,an){return z&&!K?p.createElement(An,{prefixCls:qe,hasFeedback:y.hasFeedback,validateStatus:y.validateStatus,meta:Ht,errors:Tt,warnings:Et,noStyle:!0},Nt):p.createElement(xn,Object.assign({key:"row"},y,{className:C()(h,zt),prefixCls:qe,fieldId:Zt,isRequired:an,errors:Tt,warnings:Et,meta:Ht,onSubItemMetaChange:Vt}),Nt)}if(!Mt&&!ot&&!d)return ht(Ot(Me));let cn={};return typeof ie=="string"?cn.label=ie:D&&(cn.label=String(D)),oe&&(cn=Object.assign(Object.assign({},cn),oe)),ht(p.createElement(ge.Field,Object.assign({},y,{messageVariables:cn,trigger:Ae,validateTrigger:gt,onMetaChange:Gt}),(Nt,Zt,an)=>{const Xt=k(D).length&&Zt?Zt.name:[],En=We(Xt,_e),Un=W!==void 0?W:!!(te&&te.some(ut=>{if(ut&&typeof ut=="object"&&ut.required&&!ut.warningOnly)return!0;if(typeof ut=="function"){const qt=ut(an);return qt&&qt.required&&!qt.warningOnly}return!1})),Rt=Object.assign({},Nt);let lt=null;if(Array.isArray(Me)&&Mt)lt=Me;else if(!(ot&&(!(L||d)||Mt))){if(!(d&&!ot&&!Mt))if((0,A.l$)(Me)){const ut=Object.assign(Object.assign({},Me.props),Rt);if(ut.id||(ut.id=En),Ve||Tt.length>0||Et.length>0||y.extra){const Yt=[];(Ve||Tt.length>0)&&Yt.push(`${En}_help`),y.extra&&Yt.push(`${En}_extra`),ut["aria-describedby"]=Yt.join(" ")}Tt.length>0&&(ut["aria-invalid"]="true"),Un&&(ut["aria-required"]="true"),(0,it.Yr)(Me)&&(ut.ref=Wt(Xt,Me)),new Set([].concat((0,E.Z)(k(Ae)),(0,E.Z)(k(gt)))).forEach(Yt=>{ut[Yt]=function(){for(var At,ln,gn,mn,Ln,Ue=arguments.length,$e=new Array(Ue),mt=0;mt<Ue;mt++)$e[mt]=arguments[mt];(gn=Rt[Yt])===null||gn===void 0||(At=gn).call.apply(At,[Rt].concat($e)),(Ln=(mn=Me.props)[Yt])===null||Ln===void 0||(ln=Ln).call.apply(ln,[mn].concat($e))}});const tn=[ut["aria-required"],ut["aria-invalid"],ut["aria-describedby"]];lt=p.createElement(In,{value:Rt[y.valuePropName||"value"],update:Me,childProps:tn},(0,A.Tm)(Me,ut))}else ot&&(L||d)&&!Mt?lt=Me(an):lt=Me}return Ot(lt,En,Un)}))}const on=Dn;on.useStatus=re;var Fn=on,Hn=function(y,D){var z={};for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&D.indexOf(h)<0&&(z[h]=y[h]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(y);d<h.length;d++)D.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(y,h[d])&&(z[h[d]]=y[h[d]]);return z},gr=y=>{var{prefixCls:D,children:z}=y,h=Hn(y,["prefixCls","children"]);const{getPrefixCls:d}=p.useContext(dt.E_),x=d("form",D),L=p.useMemo(()=>({prefixCls:x,status:"error"}),[x]);return p.createElement(ge.List,Object.assign({},h),(te,$,W)=>p.createElement(T.Rk.Provider,{value:L},z(te.map(ie=>Object.assign(Object.assign({},ie),{fieldKey:ie.key})),$,{errors:W.errors,warnings:W.warnings})))};function Jt(){const{form:y}=(0,p.useContext)(T.q3);return y}const nt=Je;nt.Item=Fn,nt.List=gr,nt.ErrorList=Ze,nt.useForm=Ie,nt.useFormInstance=Jt,nt.useWatch=ge.useWatch,nt.Provider=T.RV,nt.create=()=>{};var _t=nt},9432:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return Lt},n:function(){return et}});var E=f(19248),J=f(92310),C=f.n(J),j=f(93681),p=f(8654),P=f(59301),T=f(19080),ye=f(36355),q=f(1684),b=f(19716),be=f(32441),N=f(33234),ve=f(59412),Ee=f(9937);function V(Z){return!!(Z.prefix||Z.suffix||Z.allowClear)}var Xe=function(Z,F){var m={};for(var c in Z)Object.prototype.hasOwnProperty.call(Z,c)&&F.indexOf(c)<0&&(m[c]=Z[c]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,c=Object.getOwnPropertySymbols(Z);S<c.length;S++)F.indexOf(c[S])<0&&Object.prototype.propertyIsEnumerable.call(Z,c[S])&&(m[c[S]]=Z[c[S]]);return m};function et(Z,F){if(!Z)return;Z.focus(F);const{cursor:m}=F||{};if(m){const c=Z.value.length;switch(m){case"start":Z.setSelectionRange(0,0);break;case"end":Z.setSelectionRange(c,c);break;default:Z.setSelectionRange(0,c);break}}}var Lt=(0,P.forwardRef)((Z,F)=>{var m;const{prefixCls:c,bordered:S=!0,status:I,size:B,disabled:R,onBlur:ne,onFocus:ze,suffix:Ze,allowClear:ge,addonAfter:dt,addonBefore:Ge,className:Fe,style:le,styles:_,rootClassName:ae,onChange:X,classNames:k}=Z,We=Xe(Z,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Te,direction:ue,input:Ie}=P.useContext(ye.E_),fe=Te("input",c),xt=(0,P.useRef)(null),[Dt,Ct]=(0,Ee.ZP)(fe),{compactSize:Je,compactItemClassnames:It}=(0,N.ri)(fe,ue),it=(0,b.Z)(Ne=>{var Ke;return(Ke=B!=null?B:Je)!==null&&Ke!==void 0?Ke:Ne}),A=P.useContext(q.Z),Ce=R!=null?R:A,{status:se,hasFeedback:G,feedbackIcon:re}=(0,P.useContext)(be.aM),de=(0,T.F)(se,I),Se=V(Z)||!!G,ce=(0,P.useRef)(Se);(0,P.useEffect)(()=>{var Ne;Se&&ce.current,ce.current=Se},[Se]);const De=(0,ve.Z)(xt,!0),ee=Ne=>{De(),ne==null||ne(Ne)},Be=Ne=>{De(),ze==null||ze(Ne)},he=Ne=>{De(),X==null||X(Ne)},Pe=(G||Ze)&&P.createElement(P.Fragment,null,Ze,G&&re);let we;return typeof ge=="object"&&(ge!=null&&ge.clearIcon)?we=ge:ge&&(we={clearIcon:P.createElement(E.Z,null)}),Dt(P.createElement(j.default,Object.assign({ref:(0,p.sQ)(F,xt),prefixCls:fe,autoComplete:Ie==null?void 0:Ie.autoComplete},We,{disabled:Ce,onBlur:ee,onFocus:Be,style:Object.assign(Object.assign({},Ie==null?void 0:Ie.style),le),styles:Object.assign(Object.assign({},Ie==null?void 0:Ie.styles),_),suffix:Pe,allowClear:we,className:C()(Fe,ae,It,Ie==null?void 0:Ie.className),onChange:he,addonAfter:dt&&P.createElement(N.BR,null,P.createElement(be.Ux,{override:!0,status:!0},dt)),addonBefore:Ge&&P.createElement(N.BR,null,P.createElement(be.Ux,{override:!0,status:!0},Ge)),classNames:Object.assign(Object.assign(Object.assign({},k),Ie==null?void 0:Ie.classNames),{input:C()({[`${fe}-sm`]:it==="small",[`${fe}-lg`]:it==="large",[`${fe}-rtl`]:ue==="rtl",[`${fe}-borderless`]:!S},!Se&&(0,T.Z)(fe,de),k==null?void 0:k.input,(m=Ie==null?void 0:Ie.classNames)===null||m===void 0?void 0:m.input,Ct)}),classes:{affixWrapper:C()({[`${fe}-affix-wrapper-sm`]:it==="small",[`${fe}-affix-wrapper-lg`]:it==="large",[`${fe}-affix-wrapper-rtl`]:ue==="rtl",[`${fe}-affix-wrapper-borderless`]:!S},(0,T.Z)(`${fe}-affix-wrapper`,de,G),Ct),wrapper:C()({[`${fe}-group-rtl`]:ue==="rtl"},Ct),group:C()({[`${fe}-group-wrapper-sm`]:it==="small",[`${fe}-group-wrapper-lg`]:it==="large",[`${fe}-group-wrapper-rtl`]:ue==="rtl",[`${fe}-group-wrapper-disabled`]:Ce},(0,T.Z)(`${fe}-group-wrapper`,de,G),Ct)}})))})},1643:function(nn,xe,f){"use strict";var E=f(19248),J=f(92310),C=f.n(J),j=f(9296),p=f(59301),P=f(19080),T=f(36355),ye=f(1684),q=f(19716),b=f(32441),be=f(9432),N=f(9937),ve=function(V,Xe){var et={};for(var yt in V)Object.prototype.hasOwnProperty.call(V,yt)&&Xe.indexOf(yt)<0&&(et[yt]=V[yt]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,yt=Object.getOwnPropertySymbols(V);Lt<yt.length;Lt++)Xe.indexOf(yt[Lt])<0&&Object.prototype.propertyIsEnumerable.call(V,yt[Lt])&&(et[yt[Lt]]=V[yt[Lt]]);return et};const Ee=(0,p.forwardRef)((V,Xe)=>{const{prefixCls:et,bordered:yt=!0,size:Lt,disabled:Z,status:F,allowClear:m,showCount:c,classNames:S,rootClassName:I,className:B}=V,R=ve(V,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ne,direction:ze}=p.useContext(T.E_),Ze=(0,q.Z)(Lt),ge=p.useContext(ye.Z),dt=Z!=null?Z:ge,{status:Ge,hasFeedback:Fe,feedbackIcon:le}=p.useContext(b.aM),_=(0,P.F)(Ge,F),ae=p.useRef(null);p.useImperativeHandle(Xe,()=>{var ue;return{resizableTextArea:(ue=ae.current)===null||ue===void 0?void 0:ue.resizableTextArea,focus:Ie=>{var fe,xt;(0,be.n)((xt=(fe=ae.current)===null||fe===void 0?void 0:fe.resizableTextArea)===null||xt===void 0?void 0:xt.textArea,Ie)},blur:()=>{var Ie;return(Ie=ae.current)===null||Ie===void 0?void 0:Ie.blur()}}});const X=ne("input",et);let k;typeof m=="object"&&(m!=null&&m.clearIcon)?k=m:m&&(k={clearIcon:p.createElement(E.Z,null)});const[We,Te]=(0,N.ZP)(X);return We(p.createElement(j.default,Object.assign({},R,{disabled:dt,allowClear:k,className:C()(B,I),classes:{affixWrapper:C()(`${X}-textarea-affix-wrapper`,{[`${X}-affix-wrapper-rtl`]:ze==="rtl",[`${X}-affix-wrapper-borderless`]:!yt,[`${X}-affix-wrapper-sm`]:Ze==="small",[`${X}-affix-wrapper-lg`]:Ze==="large",[`${X}-textarea-show-count`]:c},(0,P.Z)(`${X}-affix-wrapper`,_),Te)},classNames:Object.assign(Object.assign({},S),{textarea:C()({[`${X}-borderless`]:!yt,[`${X}-sm`]:Ze==="small",[`${X}-lg`]:Ze==="large"},(0,P.Z)(X,_),Te,S==null?void 0:S.textarea)}),prefixCls:X,suffix:Fe&&p.createElement("span",{className:`${X}-textarea-suffix`},le),showCount:c,ref:ae})))});xe.Z=Ee},59412:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return J}});var E=f(59301);function J(C,j){const p=(0,E.useRef)([]),P=()=>{p.current.push(setTimeout(()=>{var T,ye,q,b;!((T=C.current)===null||T===void 0)&&T.input&&((ye=C.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((q=C.current)===null||q===void 0)&&q.input.hasAttribute("value"))&&((b=C.current)===null||b===void 0||b.input.removeAttribute("value"))}))};return(0,E.useEffect)(()=>(j&&P(),()=>p.current.forEach(T=>{T&&clearTimeout(T)})),[]),P}},92832:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return Ze}});var E=f(92310),J=f.n(E),C=f(59301),j=f(36355),p=f(32441),P=f(9937),ye=ge=>{const{getPrefixCls:dt,direction:Ge}=(0,C.useContext)(j.E_),{prefixCls:Fe,className:le}=ge,_=dt("input-group",Fe),ae=dt("input"),[X,k]=(0,P.ZP)(ae),We=J()(_,{[`${_}-lg`]:ge.size==="large",[`${_}-sm`]:ge.size==="small",[`${_}-compact`]:ge.compact,[`${_}-rtl`]:Ge==="rtl"},k,le),Te=(0,C.useContext)(p.aM),ue=(0,C.useMemo)(()=>Object.assign(Object.assign({},Te),{isFormItemInput:!1}),[Te]);return X(C.createElement("span",{className:We,style:ge.style,onMouseEnter:ge.onMouseEnter,onMouseLeave:ge.onMouseLeave,onFocus:ge.onFocus,onBlur:ge.onBlur},C.createElement(p.aM.Provider,{value:ue},ge.children)))},q=f(9432),b=f(73331),be=f(15277),N=f(2738),ve=f(8654),Ee=f(59412),V=function(ge,dt){var Ge={};for(var Fe in ge)Object.prototype.hasOwnProperty.call(ge,Fe)&&dt.indexOf(Fe)<0&&(Ge[Fe]=ge[Fe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Fe=Object.getOwnPropertySymbols(ge);le<Fe.length;le++)dt.indexOf(Fe[le])<0&&Object.prototype.propertyIsEnumerable.call(ge,Fe[le])&&(Ge[Fe[le]]=ge[Fe[le]]);return Ge};const Xe=ge=>ge?C.createElement(be.Z,null):C.createElement(b.Z,null),et={click:"onClick",hover:"onMouseOver"};var Lt=C.forwardRef((ge,dt)=>{const{visibilityToggle:Ge=!0}=ge,Fe=typeof Ge=="object"&&Ge.visible!==void 0,[le,_]=(0,C.useState)(()=>Fe?Ge.visible:!1),ae=(0,C.useRef)(null);C.useEffect(()=>{Fe&&_(Ge.visible)},[Fe,Ge]);const X=(0,Ee.Z)(ae),k=()=>{const{disabled:Ce}=ge;Ce||(le&&X(),_(se=>{var G;const re=!se;return typeof Ge=="object"&&((G=Ge.onVisibleChange)===null||G===void 0||G.call(Ge,re)),re}))},We=Ce=>{const{action:se="click",iconRender:G=Xe}=ge,re=et[se]||"",de=G(le),Se={[re]:k,className:`${Ce}-icon`,key:"passwordIcon",onMouseDown:ce=>{ce.preventDefault()},onMouseUp:ce=>{ce.preventDefault()}};return C.cloneElement(C.isValidElement(de)?de:C.createElement("span",null,de),Se)},{className:Te,prefixCls:ue,inputPrefixCls:Ie,size:fe}=ge,xt=V(ge,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Dt}=C.useContext(j.E_),Ct=Dt("input",Ie),Je=Dt("input-password",ue),It=Ge&&We(Je),it=J()(Je,Te,{[`${Je}-${fe}`]:!!fe}),A=Object.assign(Object.assign({},(0,N.Z)(xt,["suffix","iconRender","visibilityToggle"])),{type:le?"text":"password",className:it,prefixCls:Ct,suffix:It});return fe&&(A.size=fe),C.createElement(q.Z,Object.assign({ref:(0,ve.sQ)(dt,ae)},A))}),Z=f(47472),F=f(92343),m=f(3113),c=f(19716),S=f(33234),I=function(ge,dt){var Ge={};for(var Fe in ge)Object.prototype.hasOwnProperty.call(ge,Fe)&&dt.indexOf(Fe)<0&&(Ge[Fe]=ge[Fe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Fe=Object.getOwnPropertySymbols(ge);le<Fe.length;le++)dt.indexOf(Fe[le])<0&&Object.prototype.propertyIsEnumerable.call(ge,Fe[le])&&(Ge[Fe[le]]=ge[Fe[le]]);return Ge},R=C.forwardRef((ge,dt)=>{const{prefixCls:Ge,inputPrefixCls:Fe,className:le,size:_,suffix:ae,enterButton:X=!1,addonAfter:k,loading:We,disabled:Te,onSearch:ue,onChange:Ie,onCompositionStart:fe,onCompositionEnd:xt}=ge,Dt=I(ge,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Ct,direction:Je}=C.useContext(j.E_),It=C.useRef(!1),it=Ct("input-search",Ge),A=Ct("input",Fe),{compactSize:Ce}=(0,S.ri)(it,Je),se=(0,c.Z)(U=>{var tt;return(tt=_!=null?_:Ce)!==null&&tt!==void 0?tt:U}),G=C.useRef(null),re=U=>{U&&U.target&&U.type==="click"&&ue&&ue(U.target.value,U,{source:"clear"}),Ie&&Ie(U)},de=U=>{var tt;document.activeElement===((tt=G.current)===null||tt===void 0?void 0:tt.input)&&U.preventDefault()},Se=U=>{var tt,He;ue&&ue((He=(tt=G.current)===null||tt===void 0?void 0:tt.input)===null||He===void 0?void 0:He.value,U,{source:"input"})},ce=U=>{It.current||We||Se(U)},De=typeof X=="boolean"?C.createElement(Z.Z,null):null,ee=`${it}-button`;let Be;const he=X||{},Pe=he.type&&he.type.__ANT_BUTTON===!0;Pe||he.type==="button"?Be=(0,F.Tm)(he,Object.assign({onMouseDown:de,onClick:U=>{var tt,He;(He=(tt=he==null?void 0:he.props)===null||tt===void 0?void 0:tt.onClick)===null||He===void 0||He.call(tt,U),Se(U)},key:"enterButton"},Pe?{className:ee,size:se}:{})):Be=C.createElement(m.ZP,{className:ee,type:X?"primary":void 0,size:se,disabled:Te,key:"enterButton",onMouseDown:de,onClick:Se,loading:We,icon:De},X),k&&(Be=[Be,(0,F.Tm)(k,{key:"addonAfter"})]);const we=J()(it,{[`${it}-rtl`]:Je==="rtl",[`${it}-${se}`]:!!se,[`${it}-with-button`]:!!X},le),Ne=U=>{It.current=!0,fe==null||fe(U)},Ke=U=>{It.current=!1,xt==null||xt(U)};return C.createElement(q.Z,Object.assign({ref:(0,ve.sQ)(G,dt),onPressEnter:ce},Dt,{size:se,onCompositionStart:Ne,onCompositionEnd:Ke,prefixCls:A,addonAfter:Be,suffix:ae,onChange:re,className:we,disabled:Te}))}),ne=f(1643);const ze=q.Z;ze.Group=ye,ze.Search=R,ze.TextArea=ne.Z,ze.Password=Lt;var Ze=ze},9937:function(nn,xe,f){"use strict";f.d(xe,{M1:function(){return T},TM:function(){return F},Xy:function(){return ye},bi:function(){return be},e5:function(){return Z},ik:function(){return N},nz:function(){return p},pU:function(){return P},s7:function(){return ve},x0:function(){return b}});var E=f(17313),J=f(74207),C=f(37613),j=f(83116);const p=m=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:m,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),P=m=>({borderColor:m.hoverBorderColor}),T=m=>({borderColor:m.activeBorderColor,boxShadow:m.activeShadow,outline:0}),ye=m=>({color:m.colorTextDisabled,backgroundColor:m.colorBgContainerDisabled,borderColor:m.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},P((0,C.TS)(m,{hoverBorderColor:m.colorBorder})))}),q=m=>{const{paddingBlockLG:c,fontSizeLG:S,lineHeightLG:I,borderRadiusLG:B,paddingInlineLG:R}=m;return{padding:`${c}px ${R}px`,fontSize:S,lineHeight:I,borderRadius:B}},b=m=>({padding:`${m.paddingBlockSM}px ${m.paddingInlineSM}px`,borderRadius:m.borderRadiusSM}),be=(m,c)=>{const{componentCls:S,colorError:I,colorWarning:B,errorActiveShadow:R,warningActiveShadow:ne,colorErrorBorderHover:ze,colorWarningBorderHover:Ze}=m;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:I,"&:hover":{borderColor:ze},"&:focus, &-focused":Object.assign({},T((0,C.TS)(m,{activeBorderColor:I,activeShadow:R}))),[`${S}-prefix, ${S}-suffix`]:{color:I}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:B,"&:hover":{borderColor:Ze},"&:focus, &-focused":Object.assign({},T((0,C.TS)(m,{activeBorderColor:B,activeShadow:ne}))),[`${S}-prefix, ${S}-suffix`]:{color:B}}}},N=m=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${m.paddingBlock}px ${m.paddingInline}px`,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight,backgroundColor:m.colorBgContainer,backgroundImage:"none",borderWidth:m.lineWidth,borderStyle:m.lineType,borderColor:m.colorBorder,borderRadius:m.borderRadius,transition:`all ${m.motionDurationMid}`},p(m.colorTextPlaceholder)),{"&:hover":Object.assign({},P(m)),"&:focus, &-focused":Object.assign({},T(m)),"&-disabled, &[disabled]":Object.assign({},ye(m)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:m.controlHeight,lineHeight:m.lineHeight,verticalAlign:"bottom",transition:`all ${m.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},q(m)),"&-sm":Object.assign({},b(m)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ve=m=>{const{componentCls:c,antCls:S}=m;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:m.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},q(m)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},b(m)),[`&-lg ${S}-select-single ${S}-select-selector`]:{height:m.controlHeightLG},[`&-sm ${S}-select-single ${S}-select-selector`]:{height:m.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${m.paddingInline}px`,color:m.colorText,fontWeight:"normal",fontSize:m.fontSize,textAlign:"center",backgroundColor:m.colorFillAlter,border:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`,borderRadius:m.borderRadius,transition:`all ${m.motionDurationSlow}`,lineHeight:1,[`${S}-select`]:{margin:`-${m.paddingBlock+1}px -${m.paddingInline}px`,[`&${S}-select-single:not(${S}-select-customize-input)`]:{[`${S}-select-selector`]:{backgroundColor:"inherit",border:`${m.lineWidth}px ${m.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${S}-select-selector`]:{color:m.colorPrimary}}},[`${S}-cascader-picker`]:{margin:`-9px -${m.paddingInline}px`,backgroundColor:"transparent",[`${S}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,E.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:m.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${c}-affix-wrapper,
|
|
|
& > ${c}-number-affix-wrapper,
|
|
|
& > ${S}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-m.lineWidth,borderInlineEndWidth:m.lineWidth},[`${c}`]:{float:"none"},[`& > ${S}-select > ${S}-select-selector,
|
|
|
& > ${S}-select-auto-complete ${c},
|
|
|
& > ${S}-cascader-picker ${c},
|
|
|
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:m.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${S}-select-focused`]:{zIndex:1},[`& > ${S}-select > ${S}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${S}-select:first-child > ${S}-select-selector,
|
|
|
& > ${S}-select-auto-complete:first-child ${c},
|
|
|
& > ${S}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius},[`& > *:last-child,
|
|
|
& > ${S}-select:last-child > ${S}-select-selector,
|
|
|
& > ${S}-cascader-picker:last-child ${c},
|
|
|
& > ${S}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:m.lineWidth,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius},[`& > ${S}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-m.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:m.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:m.borderRadius}}}})}},Ee=m=>{const{componentCls:c,controlHeightSM:S,lineWidth:I}=m,R=(S-I*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,E.Wf)(m)),N(m)),be(m,c)),{'&[type="color"]':{height:m.controlHeight,[`&${c}-lg`]:{height:m.controlHeightLG},[`&${c}-sm`]:{height:S,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},V=m=>{const{componentCls:c}=m;return{[`${c}-clear-icon`]:{margin:0,color:m.colorTextQuaternary,fontSize:m.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${m.motionDurationSlow}`,"&:hover":{color:m.colorTextTertiary},"&:active":{color:m.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${m.inputAffixPadding}px`}}}},Xe=m=>{const{componentCls:c,inputAffixPadding:S,colorTextDescription:I,motionDurationSlow:B,colorIcon:R,colorIconHover:ne,iconCls:ze}=m;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N(m)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},P(m)),{zIndex:1,[`${c}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${c}[disabled]`]:{background:"transparent"}},[`> input${c}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${c}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:m.paddingXS}},"&-show-count-suffix":{color:I},"&-show-count-has-suffix":{marginInlineEnd:m.paddingXXS},"&-prefix":{marginInlineEnd:S},"&-suffix":{marginInlineStart:S}}}),V(m)),{[`${ze}${c}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${B}`,"&:hover":{color:ne}}}),be(m,`${c}-affix-wrapper`))}},et=m=>{const{componentCls:c,colorError:S,colorWarning:I,borderRadiusLG:B,borderRadiusSM:R}=m;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,E.Wf)(m)),ve(m)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:B,fontSize:m.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${c}-group-addon`]:{color:S,borderColor:S}},"&-status-warning":{[`${c}-group-addon`]:{color:I,borderColor:I}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ye(m))},[`&:not(${c}-compact-first-item):not(${c}-compact-last-item)${c}-compact-item`]:{[`${c}, ${c}-group-addon`]:{borderRadius:0}},[`&:not(${c}-compact-last-item)${c}-compact-first-item`]:{[`${c}, ${c}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${c}-compact-first-item)${c}-compact-last-item`]:{[`${c}, ${c}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},yt=m=>{const{componentCls:c,antCls:S}=m,I=`${c}-search`;return{[I]:{[`${c}`]:{"&:hover, &:focus":{borderColor:m.colorPrimaryHover,[`+ ${c}-group-addon ${I}-button:not(${S}-btn-primary)`]:{borderInlineStartColor:m.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:m.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${I}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${I}-button:not(${S}-btn-primary)`]:{color:m.colorTextDescription,"&:hover":{color:m.colorPrimaryHover},"&:active":{color:m.colorPrimaryActive},[`&${S}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${I}-button`]:{height:m.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${I}-button`]:{height:m.controlHeightLG},[`&-small ${I}-button`]:{height:m.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-m.lineWidth,borderRadius:0}}},[`&:not(${c}-compact-first-item)`]:{[`${c},${c}-affix-wrapper`]:{borderRadius:0}},[`> ${c}-group-addon ${c}-search-button,
|
|
|
> ${c},
|
|
|
${c}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${c}-affix-wrapper-focused`]:{zIndex:2}}}}},Lt=m=>{const{componentCls:c,paddingLG:S}=m,I=`${c}-textarea`;return{[I]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-m.fontSize*m.lineHeight,insetInlineEnd:0,color:m.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${I}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:m.paddingXS,insetBlockStart:m.paddingXS},[`${I}-suffix`]:{position:"absolute",top:0,insetInlineEnd:m.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Z(m){return(0,C.TS)(m,{inputAffixPadding:m.paddingXXS})}const F=m=>{const{controlHeight:c,fontSize:S,lineHeight:I,lineWidth:B,controlHeightSM:R,controlHeightLG:ne,fontSizeLG:ze,lineHeightLG:Ze,paddingSM:ge,controlPaddingHorizontalSM:dt,controlPaddingHorizontal:Ge,colorFillAlter:Fe,colorPrimaryHover:le,controlOutlineWidth:_,controlOutline:ae,colorErrorOutline:X,colorWarningOutline:k}=m;return{paddingBlock:Math.max(Math.round((c-S*I)/2*10)/10-B,3),paddingBlockSM:Math.max(Math.round((R-S*I)/2*10)/10-B,0),paddingBlockLG:Math.ceil((ne-ze*Ze)/2*10)/10-B,paddingInline:ge-B,paddingInlineSM:dt-B,paddingInlineLG:Ge-B,addonBg:Fe,activeBorderColor:le,hoverBorderColor:le,activeShadow:`0 0 0 ${_}px ${ae}`,errorActiveShadow:`0 0 0 ${_}px ${X}`,warningActiveShadow:`0 0 0 ${_}px ${k}`}};xe.ZP=(0,j.Z)("Input",m=>{const c=(0,C.TS)(m,Z(m));return[Ee(c),Lt(c),Xe(c),et(c),yt(c),(0,J.c)(c)]},F)},57809:function(nn,xe,f){"use strict";var E=f(92310),J=f.n(E),C=f(77861),j=f(2738),p=f(59301),P=f(53487),T=f(62892),ye=f(19080),q=f(36355),b=f(1684),be=f(93891),N=f(19716),ve=f(32441),Ee=f(33234),V=f(14154),Xe=f(58582),et=f(84443),yt=f(66339),Lt=function(S,I){var B={};for(var R in S)Object.prototype.hasOwnProperty.call(S,R)&&I.indexOf(R)<0&&(B[R]=S[R]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ne=0,R=Object.getOwnPropertySymbols(S);ne<R.length;ne++)I.indexOf(R[ne])<0&&Object.prototype.propertyIsEnumerable.call(S,R[ne])&&(B[R[ne]]=S[R[ne]]);return B};const Z="SECRET_COMBOBOX_MODE_DO_NOT_USE",F=(S,I)=>{var B,{prefixCls:R,bordered:ne=!0,className:ze,rootClassName:Ze,getPopupContainer:ge,popupClassName:dt,dropdownClassName:Ge,listHeight:Fe=256,placement:le,listItemHeight:_=24,size:ae,disabled:X,notFoundContent:k,status:We,builtinPlacements:Te,dropdownMatchSelectWidth:ue,popupMatchSelectWidth:Ie,direction:fe,style:xt,allowClear:Dt}=S,Ct=Lt(S,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Je,getPrefixCls:It,renderEmpty:it,direction:A,virtual:Ce,popupMatchSelectWidth:se,popupOverflow:G,select:re}=p.useContext(q.E_),de=It("select",R),Se=It(),ce=fe!=null?fe:A,{compactSize:De,compactItemClassnames:ee}=(0,Ee.ri)(de,ce),[Be,he]=(0,V.Z)(de),Pe=p.useMemo(()=>{const{mode:In}=Ct;if(In!=="combobox")return In===Z?"combobox":In},[Ct.mode]),we=Pe==="multiple"||Pe==="tags",Ne=(0,et.Z)(Ct.suffixIcon,Ct.showArrow),Ke=(B=Ie!=null?Ie:ue)!==null&&B!==void 0?B:se,{status:U,hasFeedback:tt,isFormItemInput:He,feedbackIcon:st}=p.useContext(ve.aM),pt=(0,ye.F)(U,We);let rn;k!==void 0?rn=k:Pe==="combobox"?rn=null:rn=(it==null?void 0:it("Select"))||p.createElement(be.Z,{componentName:"Select"});const{suffixIcon:Kt,itemIcon:Ft,removeIcon:$t,clearIcon:en}=(0,yt.Z)(Object.assign(Object.assign({},Ct),{multiple:we,hasFeedback:tt,feedbackIcon:st,showSuffixIcon:Ne,prefixCls:de,showArrow:Ct.showArrow,componentName:"Select"})),Ut=Dt===!0?{clearIcon:en}:Dt,sn=(0,j.Z)(Ct,["suffixIcon","itemIcon"]),Cn=J()(dt||Ge,{[`${de}-dropdown-${ce}`]:ce==="rtl"},Ze,he),fn=(0,N.Z)(In=>{var wn;return(wn=ae!=null?ae:De)!==null&&wn!==void 0?wn:In}),An=p.useContext(b.Z),Wn=X!=null?X:An,xn=J()({[`${de}-lg`]:fn==="large",[`${de}-sm`]:fn==="small",[`${de}-rtl`]:ce==="rtl",[`${de}-borderless`]:!ne,[`${de}-in-form-item`]:He},(0,ye.Z)(de,pt,tt),ee,re==null?void 0:re.className,ze,Ze,he),Pn=p.useMemo(()=>le!==void 0?le:ce==="rtl"?"bottomRight":"bottomLeft",[le,ce]),vn=(0,Xe.Z)(Te,G);return Be(p.createElement(C.ZP,Object.assign({ref:I,virtual:Ce,showSearch:re==null?void 0:re.showSearch},sn,{style:Object.assign(Object.assign({},re==null?void 0:re.style),xt),dropdownMatchSelectWidth:Ke,builtinPlacements:vn,transitionName:(0,T.m)(Se,"slide-up",Ct.transitionName),listHeight:Fe,listItemHeight:_,mode:Pe,prefixCls:de,placement:Pn,direction:ce,suffixIcon:Kt,menuItemSelectedIcon:Ft,removeIcon:$t,allowClear:Ut,notFoundContent:rn,className:xn,getPopupContainer:ge||Je,dropdownClassName:Cn,disabled:Wn})))},m=p.forwardRef(F),c=(0,P.Z)(m);m.SECRET_COMBOBOX_MODE_DO_NOT_USE=Z,m.Option=C.Wx,m.OptGroup=C.Xo,m._InternalPanelDoNotUseOrYouWillBeFired=c,xe.default=m},14154:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return m}});var E=f(17313),J=f(74207),C=f(37613),j=f(83116),p=f(13826),P=f(92899);const T=c=>{const{optionHeight:S,optionFontSize:I,optionLineHeight:B,optionPadding:R}=c;return{position:"relative",display:"block",minHeight:S,padding:R,color:c.colorText,fontWeight:"normal",fontSize:I,lineHeight:B,boxSizing:"border-box"}};var q=c=>{const{antCls:S,componentCls:I}=c,B=`${I}-item`,R=`&${S}-slide-up-enter${S}-slide-up-enter-active`,ne=`&${S}-slide-up-appear${S}-slide-up-appear-active`,ze=`&${S}-slide-up-leave${S}-slide-up-leave-active`,Ze=`${I}-dropdown-placement-`;return[{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,E.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
|
|
|
${R}${Ze}bottomLeft,
|
|
|
${ne}${Ze}bottomLeft
|
|
|
`]:{animationName:p.fJ},[`
|
|
|
${R}${Ze}topLeft,
|
|
|
${ne}${Ze}topLeft,
|
|
|
${R}${Ze}topRight,
|
|
|
${ne}${Ze}topRight
|
|
|
`]:{animationName:p.Qt},[`${ze}${Ze}bottomLeft`]:{animationName:p.Uw},[`
|
|
|
${ze}${Ze}topLeft,
|
|
|
${ze}${Ze}topRight
|
|
|
`]:{animationName:p.ly},"&-hidden":{display:"none"},[`${B}`]:Object.assign(Object.assign({},T(c)),{cursor:"pointer",transition:`background ${c.motionDurationSlow} ease`,borderRadius:c.borderRadiusSM,"&-group":{color:c.colorTextDescription,fontSize:c.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},E.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${B}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${B}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${B}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${B}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,p.oN)(c,"slide-up"),(0,p.oN)(c,"slide-down"),(0,P.Fm)(c,"move-up"),(0,P.Fm)(c,"move-down")]};const b=2,be=c=>{let{controlHeightSM:S,controlHeight:I,lineWidth:B}=c;const R=(I-S)/2-B,ne=Math.ceil(R/2);return[R,ne]};function N(c,S){const{componentCls:I,iconCls:B}=c,R=`${I}-selection-overflow`,ne=c.multipleSelectItemHeight,[ze]=be(c),Ze=S?`${I}-${S}`:"";return{[`${I}-multiple${Ze}`]:{fontSize:c.fontSize,[R]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${I}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ze-b}px ${b*2}px`,borderRadius:c.borderRadius,[`${I}-show-search&`]:{cursor:"text"},[`${I}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${b}px 0`,lineHeight:`${ne}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${I}-show-arrow ${I}-selector,
|
|
|
&${I}-allow-clear ${I}-selector
|
|
|
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${I}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ne,marginTop:b,marginBottom:b,lineHeight:`${ne-c.lineWidth*2}px`,background:c.multipleItemBg,border:`${c.lineWidth}px ${c.lineType} ${c.multipleItemBorderColor}`,borderRadius:c.borderRadiusSM,cursor:"default",transition:`font-size ${c.motionDurationSlow}, line-height ${c.motionDurationSlow}, height ${c.motionDurationSlow}`,userSelect:"none",marginInlineEnd:b*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${I}-disabled&`]:{color:c.multipleItemColorDisabled,borderColor:c.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:c.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,E.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${B}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${R}-item + ${R}-item`]:{[`${I}-selection-search`]:{marginInlineStart:0}},[`${I}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-ze,"\n &-input,\n &-mirror\n ":{height:ne,fontFamily:c.fontFamily,lineHeight:`${ne}px`,transition:`all ${c.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${I}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Ee=c=>{const{componentCls:S}=c,I=(0,C.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),B=(0,C.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,R]=be(c);return[N(c),N(I,"sm"),{[`${S}-multiple${S}-sm`]:{[`${S}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${S}-selection-search`]:{marginInlineStart:R}}},N(B,"lg")]};function V(c,S){const{componentCls:I,inputPaddingHorizontalBase:B,borderRadius:R}=c,ne=c.controlHeight-c.lineWidth*2,ze=Math.ceil(c.fontSize*1.25),Ze=S?`${I}-${S}`:"";return{[`${I}-single${Ze}`]:{fontSize:c.fontSize,[`${I}-selector`]:Object.assign(Object.assign({},(0,E.Wf)(c)),{display:"flex",borderRadius:R,[`${I}-selection-search`]:{position:"absolute",top:0,insetInlineStart:B,insetInlineEnd:B,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${I}-selection-item,
|
|
|
${I}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${ne}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ne}px`}},[`${I}-selection-item`]:{position:"relative",userSelect:"none"},[`${I}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${I}-selection-item:after`,`${I}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${I}-show-arrow ${I}-selection-item,
|
|
|
&${I}-show-arrow ${I}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ze},[`&${I}-open ${I}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${I}-customize-input)`]:{[`${I}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${B}px`,[`${I}-selection-search-input`]:{height:ne},"&:after":{lineHeight:`${ne}px`}}},[`&${I}-customize-input`]:{[`${I}-selector`]:{"&:after":{display:"none"},[`${I}-selection-search`]:{position:"static",width:"100%"},[`${I}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${B}px`,"&:after":{display:"none"}}}}}}}function Xe(c){const{componentCls:S}=c,I=c.controlPaddingHorizontalSM-c.lineWidth;return[V(c),V((0,C.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${S}-single${S}-sm`]:{[`&:not(${S}-customize-input)`]:{[`${S}-selection-search`]:{insetInlineStart:I,insetInlineEnd:I},[`${S}-selector`]:{padding:`0 ${I}px`},[`&${S}-show-arrow ${S}-selection-search`]:{insetInlineEnd:I+c.fontSize*1.5},[`
|
|
|
&${S}-show-arrow ${S}-selection-item,
|
|
|
&${S}-show-arrow ${S}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:c.fontSize*1.5}}}},V((0,C.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const et=c=>{const{componentCls:S,selectorBg:I}=c;return{position:"relative",backgroundColor:I,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${S}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${S}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${S}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},yt=function(c,S){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:B,borderHoverColor:R,outlineColor:ne,antCls:ze}=S,Ze=I?{[`${B}-selector`]:{borderColor:R}}:{};return{[c]:{[`&:not(${B}-disabled):not(${B}-customize-input):not(${ze}-pagination-size-changer)`]:Object.assign(Object.assign({},Ze),{[`${B}-focused& ${B}-selector`]:{borderColor:R,boxShadow:`0 0 0 ${S.controlOutlineWidth}px ${ne}`,outline:0},[`&:hover ${B}-selector`]:{borderColor:R}})}}},Lt=c=>{const{componentCls:S}=c;return{[`${S}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Z=c=>{const{componentCls:S,inputPaddingHorizontalBase:I,iconCls:B}=c;return{[S]:Object.assign(Object.assign({},(0,E.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${S}-customize-input) ${S}-selector`]:Object.assign(Object.assign({},et(c)),Lt(c)),[`${S}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},E.vS),[`${S}-selection-placeholder`]:Object.assign(Object.assign({},E.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${S}-arrow`]:Object.assign(Object.assign({},(0,E.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[B]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${S}-suffix)`]:{pointerEvents:"auto"}},[`${S}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${S}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${S}-clear`]:{opacity:1}}}),[`${S}-has-feedback`]:{[`${S}-clear`]:{insetInlineEnd:I+c.fontSize+c.paddingXS}}}},F=c=>{const{componentCls:S}=c;return[{[S]:{[`&-borderless ${S}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${S}-in-form-item`]:{width:"100%"}}},Z(c),Xe(c),Ee(c),q(c),{[`${S}-rtl`]:{direction:"rtl"}},yt(S,(0,C.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),yt(`${S}-status-error`,(0,C.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),yt(`${S}-status-warning`,(0,C.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,J.c)(c,{borderElCls:`${S}-selector`,focusElCls:`${S}-focused`})]};var m=(0,j.Z)("Select",(c,S)=>{let{rootPrefixCls:I}=S;const B=(0,C.TS)(c,{rootPrefixCls:I,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[F(B)]},c=>{const{fontSize:S,lineHeight:I,controlHeight:B,controlPaddingHorizontal:R,zIndexPopupBase:ne,colorText:ze,fontWeightStrong:Ze,controlItemBgActive:ge,controlItemBgHover:dt,colorBgContainer:Ge,colorFillSecondary:Fe,controlHeightLG:le,controlHeightSM:_,colorBgContainerDisabled:ae,colorTextDisabled:X}=c;return{zIndexPopup:ne+50,optionSelectedColor:ze,optionSelectedFontWeight:Ze,optionSelectedBg:ge,optionActiveBg:dt,optionPadding:`${(B-S*I)/2}px ${R}px`,optionFontSize:S,optionLineHeight:I,optionHeight:B,selectorBg:Ge,clearBg:Ge,singleItemHeightLG:le,multipleItemBg:Fe,multipleItemBorderColor:"transparent",multipleItemHeight:_,multipleItemHeightLG:B,multipleSelectorBgDisabled:ae,multipleItemColorDisabled:X,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return J}});const E=C=>{const p={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:C==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},p),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},p),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},p),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},p),{points:["br","tr"],offset:[0,-4]})}};function J(C,j){return C||E(j)}},84443:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return E}});function E(J,C){return C!==void 0?C:J!==null}},66339:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});var E=f(40001),J=f(19248),C=f(99267),j=f(84105),p=f(58617),P=f(47472),T=f(59301);function ye(q){let{suffixIcon:b,clearIcon:be,menuItemSelectedIcon:N,removeIcon:ve,loading:Ee,multiple:V,hasFeedback:Xe,prefixCls:et,showSuffixIcon:yt,feedbackIcon:Lt,showArrow:Z,componentName:F}=q;const m=be!=null?be:T.createElement(J.Z,null),c=R=>b===null&&!Xe&&!Z?null:T.createElement(T.Fragment,null,yt!==!1&&R,Xe&&Lt);let S=null;if(b!==void 0)S=c(b);else if(Ee)S=c(T.createElement(p.Z,{spin:!0}));else{const R=`${et}-suffix`;S=ne=>{let{open:ze,showSearch:Ze}=ne;return c(ze&&Ze?T.createElement(P.Z,{className:R}):T.createElement(j.Z,{className:R}))}}let I=null;N!==void 0?I=N:V?I=T.createElement(E.Z,null):I=null;let B=null;return ve!==void 0?B=ve:B=T.createElement(C.Z,null),{clearIcon:m,suffixIcon:S,itemIcon:I,removeIcon:B}}},8378:function(nn,xe){"use strict";const f=E=>({[E.componentCls]:{[`${E.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
|
|
|
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}},[`${E.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
|
|
|
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}}});xe.Z=f},92899:function(nn,xe,f){"use strict";f.d(xe,{Fm:function(){return N}});var E=f(36237),J=f(95406);const C=new E.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),j=new E.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),p=new E.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new E.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),T=new E.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ye=new E.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),q=new E.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),b=new E.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),be={"move-up":{inKeyframes:q,outKeyframes:b},"move-down":{inKeyframes:C,outKeyframes:j},"move-left":{inKeyframes:p,outKeyframes:P},"move-right":{inKeyframes:T,outKeyframes:ye}},N=(ve,Ee)=>{const{antCls:V}=ve,Xe=`${V}-${Ee}`,{inKeyframes:et,outKeyframes:yt}=be[Ee];return[(0,J.R)(Xe,et,yt,ve.motionDurationMid),{[`
|
|
|
${Xe}-enter,
|
|
|
${Xe}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:ve.motionEaseOutCirc},[`${Xe}-leave`]:{animationTimingFunction:ve.motionEaseInOutCirc}}]}},13826:function(nn,xe,f){"use strict";f.d(xe,{Qt:function(){return p},Uw:function(){return j},fJ:function(){return C},ly:function(){return P},oN:function(){return N}});var E=f(36237),J=f(95406);const C=new E.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),j=new E.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new E.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),P=new E.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),T=new E.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ye=new E.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),q=new E.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),b=new E.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),be={"slide-up":{inKeyframes:C,outKeyframes:j},"slide-down":{inKeyframes:p,outKeyframes:P},"slide-left":{inKeyframes:T,outKeyframes:ye},"slide-right":{inKeyframes:q,outKeyframes:b}},N=(ve,Ee)=>{const{antCls:V}=ve,Xe=`${V}-${Ee}`,{inKeyframes:et,outKeyframes:yt}=be[Ee];return[(0,J.R)(Xe,et,yt,ve.motionDurationMid),{[`
|
|
|
${Xe}-enter,
|
|
|
${Xe}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ve.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Xe}-leave`]:{animationTimingFunction:ve.motionEaseInQuint}}]}},89780:function(nn){(function(xe,f){nn.exports=f()})(this,function(){"use strict";var xe=navigator.userAgent,f=navigator.platform,E=/gecko\/\d/i.test(xe),J=/MSIE \d/.test(xe),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe),j=/Edge\/(\d+)/.exec(xe),p=J||C||j,P=p&&(J?document.documentMode||6:+(j||C)[1]),T=!j&&/WebKit\//.test(xe),ye=T&&/Qt\/\d+\.\d+/.test(xe),q=!j&&/Chrome\//.test(xe),b=/Opera\//.test(xe),be=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(xe),ve=/PhantomJS/.test(xe),Ee=!j&&/AppleWebKit/.test(xe)&&/Mobile\/\w+/.test(xe),V=/Android/.test(xe),Xe=Ee||V||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(xe),et=Ee||/Mac/.test(f),yt=/\bCrOS\b/.test(xe),Lt=/win/i.test(f),Z=b&&xe.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(b=!1,T=!0);var F=et&&(ye||b&&(Z==null||Z<12.11)),m=E||p&&P>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function B(e,t){return I(e).appendChild(t)}function R(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function ne(e,t,r,n){var i=R(e,t,r,n);return i.setAttribute("role","presentation"),i}var ze;document.createRange?ze=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ze=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function Ze(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ge(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function dt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Ge(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!c(r[n]).test(t)&&(t+=" "+r[n]);return t}var Fe=function(e){e.select()};Ee?Fe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(Fe=function(e){try{e.select()}catch(t){}});function le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function ae(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=le(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function k(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var We=50,Te={toString:function(){return"CodeMirror.Pass"}},ue={scroll:!1},Ie={origin:"*mouse"},fe={origin:"+move"};function xt(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var Dt=[""];function Ct(e){for(;Dt.length<=e;)Dt.push(Je(Dt)+" ");return Dt[e]}function Je(e){return e[e.length-1]}function It(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function it(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function A(){}function Ce(e,t){var r;return Object.create?r=Object.create(e):(A.prototype=e,r=new A),t&&_(t,r),r}var se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function G(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||se.test(e))}function re(e,t){return t?t.source.indexOf("\\w")>-1&&G(e)?!0:t.test(e):G(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Se=/[\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 ce(e){return e.charCodeAt(0)>=768&&Se.test(e)}function De(e,t,r){for(;(r<0?t>0:t<e.length)&&ce(e.charAt(t));)t+=r;return t}function ee(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function Be(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),a.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var he=null;function Pe(e,t,r){var n;he=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&r=="before"?n=i:he=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:he=i)}return n!=null?n:he}var we=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,v,g){this.level=u,this.from=v,this.to=g}return function(u,v){var g=v=="ltr"?"L":"R";if(u.length==0||v=="ltr"&&!n.test(u))return!1;for(var O=u.length,w=[],H=0;H<O;++H)w.push(r(u.charCodeAt(H)));for(var Y=0,me=g;Y<O;++Y){var Re=w[Y];Re=="m"?w[Y]=me:me=Re}for(var ke=0,Le=g;ke<O;++ke){var Qe=w[ke];Qe=="1"&&Le=="r"?w[ke]="n":o.test(Qe)&&(Le=Qe,Qe=="r"&&(w[ke]="R"))}for(var wt=1,vt=w[0];wt<O-1;++wt){var jt=w[wt];jt=="+"&&vt=="1"&&w[wt+1]=="1"?w[wt]="1":jt==","&&vt==w[wt+1]&&(vt=="1"||vt=="n")&&(w[wt]=vt),vt=jt}for(var Sn=0;Sn<O;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Tn=void 0;for(Tn=Sn+1;Tn<O&&w[Tn]=="%";++Tn);for(var Sr=Sn&&w[Sn-1]=="!"||Tn<O&&w[Tn]=="1"?"1":"N",hr=Sn;hr<Tn;++hr)w[hr]=Sr;Sn=Tn-1}}for(var Zn=0,vr=g;Zn<O;++Zn){var er=w[Zn];vr=="L"&&er=="1"?w[Zn]="L":o.test(er)&&(vr=er)}for(var jn=0;jn<O;++jn)if(i.test(w[jn])){var Bn=void 0;for(Bn=jn+1;Bn<O&&i.test(w[Bn]);++Bn);for(var Nn=(jn?w[jn-1]:g)=="L",pr=(Bn<O?w[Bn]:g)=="L",Wi=Nn==pr?Nn?"L":"R":g,ai=jn;ai<Bn;++ai)w[ai]=Wi;jn=Bn-1}for(var ir=[],Br,Jn=0;Jn<O;)if(a.test(w[Jn])){var ba=Jn;for(++Jn;Jn<O&&a.test(w[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=v=="rtl"?1:0;for(++Jn;Jn<O&&w[Jn]!="L";++Jn);for(var sr=Vr;sr<Jn;)if(l.test(w[sr])){Vr<sr&&(ir.splice(yi,0,new s(1,Vr,sr)),yi+=bi);var Hi=sr;for(++sr;sr<Jn&&l.test(w[sr]);++sr);ir.splice(yi,0,new s(2,Hi,sr)),yi+=bi,Vr=sr}else++sr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return v=="ltr"&&(ir[0].level==1&&(Br=u.match(/^\s+/))&&(ir[0].from=Br[0].length,ir.unshift(new s(0,0,Br[0].length))),Je(ir).level==1&&(Br=u.match(/\s+$/))&&(Je(ir).to-=Br[0].length,ir.push(new s(0,O-Br[0].length,O)))),v=="rtl"?ir.reverse():ir}}();function Ne(e,t){var r=e.order;return r==null&&(r=e.order=we(e.text,t)),r}var Ke=[],U=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ke).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Ke}function He(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=k(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function st(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function pt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),st(e,r||t.type,e,t),Ut(t)||t.codemirrorIgnore}function rn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)k(r,t[n])==-1&&r.push(t[n])}function Kt(e,t){return tt(e,t).length>0}function Ft(e){e.prototype.on=function(t,r){U(this,t,r)},e.prototype.off=function(t,r){He(this,t,r)}}function $t(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function en(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ut(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){$t(e),en(e)}function Cn(e){return e.target||e.srcElement}function fn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),et&&e.ctrlKey&&t==1&&(t=3),t}var An=function(){if(p&&P<9)return!1;var e=R("div");return"draggable"in e||"dragDrop"in e}(),Wn;function xn(e){if(Wn==null){var t=R("span","\u200B");B(e,R("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Wn=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&P<8))}var r=Wn?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Pn;function vn(e){if(Pn!=null)return Pn;var t=B(e,document.createTextNode("A\u062EA")),r=ze(t,0,1).getBoundingClientRect(),n=ze(t,1,2).getBoundingClientRect();return I(e),!r||r.left==r.right?!1:Pn=n.right-r.right<3}var In=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
|
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},wn=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(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},pn=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Dn=null;function on(e){if(Dn!=null)return Dn;var t=B(e,R("span","x")),r=t.getBoundingClientRect(),n=ze(t,0,1).getBoundingClientRect();return Dn=Math.abs(r.left-n.left)>1}var Fn={},Hn={};function or(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fn[e]=t}function gr(e,t){Hn[e]=t}function Jt(e){if(typeof e=="string"&&Hn.hasOwnProperty(e))e=Hn[e];else if(e&&typeof e.name=="string"&&Hn.hasOwnProperty(e.name)){var t=Hn[e.name];typeof t=="string"&&(t={name:t}),e=Ce(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Jt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Jt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function nt(e,t){t=Jt(t);var r=Fn[t.name];if(!r)return nt(e,"text/plain");var n=r(e,t);if(_t.hasOwnProperty(t.name)){var i=_t[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var _t={};function y(e,t){var r=_t.hasOwnProperty(e)?_t[e]:_t[e]={};_(t,r)}function D(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function z(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function h(e,t,r){return e.startState?e.startState(t,r):!0}var d=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};d.prototype.eol=function(){return this.pos>=this.string.length},d.prototype.sol=function(){return this.pos==this.lineStart},d.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},d.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},d.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},d.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},d.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},d.prototype.skipToEnd=function(){this.pos=this.string.length},d.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},d.prototype.backUp=function(e){this.pos-=e},d.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ae(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ae(this.string,this.lineStart,this.tabSize):0)},d.prototype.indentation=function(){return ae(this.string,null,this.tabSize)-(this.lineStart?ae(this.string,this.lineStart,this.tabSize):0)},d.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(a){return r?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},d.prototype.current=function(){return this.string.slice(this.start,this.pos)},d.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},d.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},d.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function x(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function L(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(o){var a=o.text;i==r.line&&(a=a.slice(0,r.ch)),i==t.line&&(a=a.slice(t.ch)),n.push(a),++i}),n}function te(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function $(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function W(e){if(e.parent==null)return null;for(var t=e.parent,r=k(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function ie(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function oe(e,t){return t>=e.first&&t<e.first+e.size}function Ae(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function M(e,t,r){if(r===void 0&&(r=null),!(this instanceof M))return new M(e,t,r);this.line=e,this.ch=t,this.sticky=r}function K(e,t){return e.line-t.line||e.ch-t.ch}function Ve(e,t){return e.sticky==t.sticky&&K(e,t)==0}function pe(e){return M(e.line,e.ch)}function _e(e,t){return K(e,t)<0?t:e}function Me(e,t){return K(e,t)<0?e:t}function ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Q(e,t){if(t.line<e.first)return M(e.first,0);var r=e.first+e.size-1;return t.line>r?M(r,x(e,r).text.length):Ye(t,x(e,t.line).text.length)}function Ye(e,t){var r=e.ch;return r==null||r>t?M(e.line,t):r<0?M(e.line,0):e}function gt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Q(e,t[n]);return r}var Mt=function(e,t){this.state=e,this.lookAhead=t},qe=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};qe.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},qe.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}},qe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qe.fromSaved=function(e,t,r){return t instanceof Mt?new qe(e,D(e.mode,t.state),r,t.lookAhead):new qe(e,D(e.mode,t),r)},qe.prototype.save=function(e){var t=e!==!1?D(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Mt(t,this.maxLookAhead):t};function ht(e,t,r,n){var i=[e.state.modeGen],o={};Vt(e,t.text,e.doc.mode,r,function(u,v){return i.push(u,v)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var v=e.state.overlays[u],g=1,O=0;r.state=!0,Vt(e,t.text,v.mode,r,function(w,H){for(var Y=g;O<w;){var me=i[g];me>w&&i.splice(g,1,w,i[g+1],me),g+=2,O=Math.min(w,me)}if(H)if(v.opaque)i.splice(Y,g-Y,w,"overlay "+H),g=Y+2;else for(;Y<g;Y+=2){var Re=i[Y+1];i[Y+1]=(Re?Re+" ":"")+"overlay "+H}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Oe(e,W(t)),i=t.text.length>e.options.maxHighlightLength&&D(e.doc.mode,n.state),o=ht(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Oe(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new qe(n,!0,t);var o=Tt(e,t,r),a=o>n.first&&x(n,o-1).stateAfter,l=a?qe.fromSaved(n,a,o):new qe(n,h(n.mode),o);return n.iter(o,t,function(s){je(e,s.text,l);var u=l.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function je(e,t,r,n){var i=e.doc.mode,o=new d(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&at(i,r.state);!o.eol();)ft(i,o,r.state),o.start=o.pos}function at(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=z(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function ft(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=z(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ht=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function kt(e,t,r,n){var i=e.doc,o=i.mode,a;t=Q(i,t);var l=x(i,t.line),s=Oe(e,t.line,r),u=new d(l.text,e.options.tabSize,s),v;for(n&&(v=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=ft(o,u,s.state),n&&v.push(new Ht(u,a,D(i.mode,s.state)));return n?v:new Ht(u,a,s.state)}function Gt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Vt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,v=new d(t,e.options.tabSize,n),g,O=e.options.addModeClass&&[null];for(t==""&&Gt(at(r,n.state),o);!v.eol();){if(v.pos>e.options.maxHighlightLength?(l=!1,a&&je(e,t,n,v.pos),v.pos=t.length,g=null):g=Gt(ft(r,v,n.state,O),o),O){var w=O[0].name;w&&(g="m-"+(g?w+" "+g:w))}if(!l||u!=g){for(;s<v.start;)s=Math.min(v.start,s+5e3),i(s,u);u=g}v.start=v.pos}for(;s<v.pos;){var H=Math.min(v.pos,s+5e3);i(H,u),s=H}}function Tt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=x(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof Mt?u.lookAhead:0)<=o.modeFrontier))return l;var v=ae(s.text,null,e.options.tabSize);(i==null||n>v)&&(i=l-1,n=v)}return i}function Et(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=x(e,n).stateAfter;if(i&&(!(i instanceof Mt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Wt=!1,Ot=!1;function cn(){Wt=!0}function Nt(){Ot=!0}function Zt(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Xt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function En(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Un(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Zt(a,o.from,s?null:o.to))}}return n}function Rt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!r||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Zt(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function lt(e,t){if(t.full)return null;var r=oe(e,t.from.line)&&x(e,t.from.line).markedSpans,n=oe(e,t.to.line)&&x(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=K(t.from,t.to)==0,l=Un(r,i,a),s=Rt(n,o,a),u=t.text.length==1,v=Je(t.text).length+(u?i:0);if(l)for(var g=0;g<l.length;++g){var O=l[g];if(O.to==null){var w=an(s,O.marker);w?u&&(O.to=w.to==null?null:w.to+v):O.to=i}}if(s)for(var H=0;H<s.length;++H){var Y=s[H];if(Y.to!=null&&(Y.to+=v),Y.from==null){var me=an(l,Y.marker);me||(Y.from=v,u&&(l||(l=[])).push(Y))}else Y.from+=v,u&&(l||(l=[])).push(Y)}l&&(l=ut(l)),s&&s!=l&&(s=ut(s));var Re=[l];if(!u){var ke=t.text.length-2,Le;if(ke>0&&l)for(var Qe=0;Qe<l.length;++Qe)l[Qe].to==null&&(Le||(Le=[])).push(new Zt(l[Qe].marker,null,null));for(var wt=0;wt<ke;++wt)Re.push(Le);Re.push(s)}return Re}function ut(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function qt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var H=0;H<w.markedSpans.length;++H){var Y=w.markedSpans[H].marker;Y.readOnly&&(!n||k(n,Y)==-1)&&(n||(n=[])).push(Y)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(K(u.to,l.from)<0||K(u.from,l.to)>0)){var v=[s,1],g=K(u.from,l.from),O=K(u.to,l.to);(g<0||!a.inclusiveLeft&&!g)&&v.push({from:u.from,to:l.from}),(O>0||!a.inclusiveRight&&!O)&&v.push({from:l.to,to:u.to}),i.splice.apply(i,v),s+=v.length-3}}return i}function tn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Yt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=K(n.from,i.from)||At(e)-At(t);if(o)return-o;var a=K(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=Ot&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Ln(e){return mn(e,!0)}function Ue(e){return mn(e,!1)}function $e(e,t){var r=Ot&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function mt(e,t,r,n,i){var o=x(e,t),a=Ot&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),v=K(u.from,r)||At(s.marker)-At(i),g=K(u.to,n)||ln(s.marker)-ln(i);if(!(v>=0&&g<=0||v<=0&&g>=0)&&(v<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.to,r)>=0:K(u.to,r)>0)||v>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.from,n)<=0:K(u.from,n)<0)))return!0}}}function bt(e){for(var t;t=Ln(e);)e=t.find(-1,!0).line;return e}function hn(e){for(var t;t=Ue(e);)e=t.find(1,!0).line;return e}function xr(e){for(var t,r;t=Ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Kn(e,t){var r=x(e,t),n=bt(r);return r==n?t:W(n)}function _n(e,t){if(t>e.lastLine())return t;var r=x(e,t),n;if(!$n(e,r))return t;for(;n=Ue(r);)r=n.find(1,!0).line;return W(r)+1}function $n(e,t){var r=Ot&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=bt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function ur(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ln(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ue(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function qn(e){var t=e.display,r=e.doc;t.maxLine=x(r,r.first),t.maxLineLength=ur(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=ur(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Yt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return W(this)},Ft(tr);function Kr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),tn(e),Yt(e,r);var i=n?n(e):1;i!=e.height&&$(e,i)}function Xr(e){e.parent=null,tn(e)}var li={},Yr={};function Cr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yr:li;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qr(e,t){var r=ne("span",null,null,T?"padding-right: .1px":null),n={pre:ne("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Zi,vn(e.display.measure)&&(a=Ne(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&W(o);xi(o,n,zt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Ge(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Ge(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(xn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(T){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return st(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ge(n.pre.className,n.textClass||"")),n}function Ir(e){var t=R("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,v;if(!s.test(t))e.col+=t.length,v=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,v),p&&P<9&&(u=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var O=s.exec(t),w=O?O.index-g:t.length-g;if(w){var H=document.createTextNode(l.slice(g,g+w));p&&P<9?v.appendChild(R("span",[H])):v.appendChild(H),e.map.push(e.pos,e.pos+w,H),e.col+=w,e.pos+=w}if(!O)break;g+=w+1;var Y=void 0;if(O[0]==" "){var me=e.cm.options.tabSize,Re=me-e.col%me;Y=v.appendChild(R("span",Ct(Re),"cm-tab")),Y.setAttribute("role","presentation"),Y.setAttribute("cm-text"," "),e.col+=Re}else O[0]=="\r"||O[0]==`
|
|
|
`?(Y=v.appendChild(R("span",O[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Y.setAttribute("cm-text",O[0]),e.col+=1):(Y=e.cm.options.specialCharPlaceholder(O[0]),Y.setAttribute("cm-text",O[0]),p&&P<9?v.appendChild(R("span",[Y])):v.appendChild(Y),e.col+=1);e.map.push(e.pos,e.pos+1,Y),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var ke=r||"";n&&(ke+=n),i&&(ke+=i);var Le=R("span",[v],ke,o);if(a)for(var Qe in a)a.hasOwnProperty(Qe)&&Qe!="style"&&Qe!="class"&&Le.setAttribute(Qe,a[Qe]);return e.content.appendChild(Le)}e.content.appendChild(v)}}function Si(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),n+=o,r=o==" "}return n}function si(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,v=u+n.length;;){for(var g=void 0,O=0;O<t.length&&(g=t[O],!(g.to>u&&g.from<=u));O++);if(g.to>=v)return e(r,n,i,o,a,l,s);e(r,n.slice(0,g.to-u),i,o,null,l,s),o=null,n=n.slice(g.to-u),u=g.to}}}function _r(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xi(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),Cr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,v="",g,O,w=0,H,Y,me,Re,ke;;){if(w==s){H=Y=me=O="",ke=null,Re=null,w=1/0;for(var Le=[],Qe=void 0,wt=0;wt<n.length;++wt){var vt=n[wt],jt=vt.marker;if(jt.type=="bookmark"&&vt.from==s&&jt.widgetNode)Le.push(jt);else if(vt.from<=s&&(vt.to==null||vt.to>s||jt.collapsed&&vt.to==s&&vt.from==s)){if(vt.to!=null&&vt.to!=s&&w>vt.to&&(w=vt.to,Y=""),jt.className&&(H+=" "+jt.className),jt.css&&(O=(O?O+";":"")+jt.css),jt.startStyle&&vt.from==s&&(me+=" "+jt.startStyle),jt.endStyle&&vt.to==w&&(Qe||(Qe=[])).push(jt.endStyle,vt.to),jt.title&&((ke||(ke={})).title=jt.title),jt.attributes)for(var Sn in jt.attributes)(ke||(ke={}))[Sn]=jt.attributes[Sn];jt.collapsed&&(!Re||gn(Re.marker,jt)<0)&&(Re=vt)}else vt.from>s&&w>vt.from&&(w=vt.from)}if(Qe)for(var Qn=0;Qn<Qe.length;Qn+=2)Qe[Qn+1]==w&&(Y+=" "+Qe[Qn]);if(!Re||Re.from==s)for(var Tn=0;Tn<Le.length;++Tn)_r(t,0,Le[Tn]);if(Re&&(Re.from||0)==s){if(_r(t,(Re.to==null?l+1:Re.to)-s,Re.marker,Re.from==null),Re.to==null)return;Re.to==s&&(Re=!1)}}if(s>=l)break;for(var Sr=Math.min(l,w);;){if(v){var hr=s+v.length;if(!Re){var Zn=hr>Sr?v.slice(0,Sr-s):v;t.addToken(t,Zn,g?g+H:H,me,s+Zn.length==w?Y:"",O,ke)}if(hr>=Sr){v=v.slice(Sr-s),s=Sr;break}s=hr,me=""}v=i.slice(o,o=r[u++]),g=Cr(r[u++],t.cm.options)}}}function Ci(e,t,r){this.line=t,this.rest=xr(t),this.size=this.rest?W(Je(this.rest))-r+1:1,this.node=this.text=null,this.hidden=$n(e,t)}function jr(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new Ci(e.doc,x(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ar=null;function ui(e){Ar?Ar.ops.push(e):e.ownsGroup=Ar={ops:[e],delayedCallbacks:[]}}function ct(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Pt(e,t){var r=e.ownsGroup;if(r)try{ct(r)}finally{Ar=null,t(r)}}var St=null;function rt(e,t){var r=tt(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:St?i=St:(i=St=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=St;St=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Bi(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=R("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&P<8&&(e.node.style.zIndex=2)),e.node}function Mr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(R("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Fr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Fr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Mr(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function ci(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=R("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=cr(t),l=t.gutter=R("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(R("div",Ae(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,v=o.hasOwnProperty(u)&&o[u];v&&l.appendChild(R("div",[v],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Bi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Hr(e,t,r)}function mo(e,t,r,n){var i=Fr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),ci(e,t,r,n),Hr(e,t,n),t.node}function Hr(e,t,r){if(Lr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Lr(e,t.rest[n],t,r,!1)}function Lr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=R("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Bo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),rt(s,"redraw")}}function Bo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Tr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Ze(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),B(t.display.measure,R("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=Cn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function wi(e){return e.lineSpace.offsetTop}function Ki(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=B(e.measure,R("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Pr(e){return We-e.display.nativeBarWidth}function Zr(e){return e.display.scroller.clientWidth-Pr(e)-e.display.barWidth}function _i(e){return e.display.scroller.clientHeight-Pr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Zr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function ji(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(W(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ko(e,t){t=bt(t);var r=W(t),n=e.display.externalMeasured=new Ci(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,B(e.display.lineMeasure,i.pre),n}function Ui(e,t,r,n){return Dr(e,Jr(e,t),r,n)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Jr(e,t){var r=W(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=Ko(e,t));var i=ji(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dr(e,t,r,n,i){t.before&&(r=-1);var o=r+(n||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bo(e,t.view,t.rect),t.hasHeights=!0),a=Qt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Qt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var v=0;v<4;v++){for(;a&&ce(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ce(t.line.text.charAt(i.coverStart+l));)++l;if(p&&P<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(ze(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&P<11&&(u=Bt(e.display.measure,u))}else{a>0&&(s=n="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?u=g[n=="right"?g.length-1:0]:u=o.getBoundingClientRect()}if(p&&P<9&&!a&&(!u||!u.left&&!u.right)){var O=o.parentNode.getClientRects()[0];O?u={left:O.left,right:O.left+Oi(e.display),top:O.top,bottom:O.bottom}:u=So}for(var w=u.top-t.rect.top,H=u.bottom-t.rect.top,Y=(w+H)/2,me=t.view.measure.heights,Re=0;Re<me.length-1&&!(Y<me[Re]);Re++);var ke=Re?me[Re-1]:0,Le=me[Re],Qe={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:ke,bottom:Le};return!u.left&&!u.right&&(Qe.bogus=!0),e.options.singleCursorHeightPerLine||(Qe.rtop=w,Qe.rbottom=H),Qe}function Bt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!on(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ar(){return q&&V?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mr(){return q&&V?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Tr(e.widgets[r]));return t}function wr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=wi(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:mr());var s=l.left+(n=="window"?0:ar());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kr(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=ar(),i-=mr();else if(r=="local"||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Nr(e,t,r,n,i){return n||(n=x(e.doc,t.line)),wr(e,n,Ui(e,n,t.ch,i),r)}function yr(e,t,r,n,i,o){n=n||x(e.doc,t.line),i||(i=Jr(e,n));function a(H,Y){var me=Dr(e,i,H,Y?"right":"left",o);return Y?me.left=me.right:me.right=me.left,wr(e,n,me,r)}var l=Ne(n,e.doc.direction),s=t.ch,u=t.sticky;if(s>=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function v(H,Y,me){var Re=l[Y],ke=Re.level==1;return a(me?H-1:H,ke!=me)}var g=Pe(l,s,u),O=he,w=v(s,g,u=="before");return O!=null&&(w.other=v(s,O,u!="before")),w}function xa(e,t){var r=0;t=Q(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=x(e.doc,t.line),i=Mn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _o(e,t,r,n,i){var o=M(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function jo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return _o(n.first,0,null,-1,-1);var i=ie(n,r),o=n.first+n.size-1;if(i>o)return _o(n.first+n.size-1,x(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=x(n,i);;){var l=Bl(e,a,i,t,r),s=$e(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=x(n,i=u.line)}}function Ca(e,t,r,n){n-=Ur(t);var i=t.text.length,o=ee(function(a){return Dr(e,r,a-1).bottom<=n},i,0);return i=ee(function(a){return Dr(e,r,a).top>n},o,i),{begin:o,end:i}}function wa(e,t,r,n){r||(r=Jr(e,t));var i=wr(e,t,Dr(e,r,n),"line").top;return Ca(e,t,r,i)}function Uo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=Ur(t),l=0,s=t.text.length,u=!0,v=Ne(t,e.doc.direction);if(v){var g=(e.options.lineWrapping?_l:Kl)(e,t,r,o,v,n,i);u=g.level!=1,l=u?g.from:g.to-1,s=u?g.to:g.from-1}var O=null,w=null,H=ee(function(wt){var vt=Dr(e,o,wt);return vt.top+=a,vt.bottom+=a,Uo(vt,n,i,!1)?(vt.top<=i&&vt.left<=n&&(O=wt,w=vt),!0):!1},l,s),Y,me,Re=!1;if(w){var ke=n-w.left<w.right-n,Le=ke==u;H=O+(Le?0:1),me=Le?"after":"before",Y=ke?w.left:w.right}else{!u&&(H==s||H==l)&&H++,me=H==0?"after":H==t.text.length?"before":Dr(e,o,H-(u?1:0)).bottom+a<=i==u?"after":"before";var Qe=yr(e,M(r,H,me),"line",t,o);Y=Qe.left,Re=i<Qe.top?-1:i>=Qe.bottom?1:0}return H=De(t.text,H,1),_o(r,H,me,Re,n-Y)}function Kl(e,t,r,n,i,o,a){var l=ee(function(g){var O=i[g],w=O.level!=1;return Uo(yr(e,M(r,w?O.to:O.from,w?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,v=yr(e,M(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Uo(v,o,a,!0)&&v.top>a&&(s=i[l-1])}return s}function _l(e,t,r,n,i,o,a){var l=Ca(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var v=null,g=null,O=0;O<i.length;O++){var w=i[O];if(!(w.from>=u||w.to<=s)){var H=w.level!=1,Y=Dr(e,n,H?Math.min(u,w.to)-1:Math.max(s,w.from)).right,me=Y<o?o-Y+1e9:Y-o;(!v||g>me)&&(v=w,g=me)}}return v||(v=i[i.length-1]),v.from<s&&(v={from:s,to:v.to,level:v.level}),v.to>u&&(v={from:v.from,to:u,level:v.level}),v}var fi;function Ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=R("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(R("br"));fi.appendChild(document.createTextNode("x"))}B(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),I(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=R("span","xxxxxxxxxx"),r=R("pre",[t],"CodeMirror-line-like");B(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ko(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Go(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Go(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ea(e){var t=Ei(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if($n(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Vo(e){var t=e.doc,r=Ea(e);t.iter(function(n){var i=r(n);i!=n.height&&$(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&Cn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(g){return null}var s=jo(e,o,a),u;if(n&&s.xRel>0&&(u=x(e.doc,s.line).text).length==s.ch){var v=ae(u,u.length,e.options.tabSize)-u.length;s=M(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-v))}return s}function hi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function fr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ot&&Kn(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)Ot&&_n(e.doc,r+n)>i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=xo(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var a=xo(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=xo(e,t,t,-1),s=xo(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(jr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);k(a,r)==-1&&a.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function xo(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!Ot||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;Kn(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function jl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=jr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=jr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(jr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||Ul(e,l,o)}}return n}function Ma(e,t,r){var n=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(R("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(R("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Co(e,t){return e.top-t.top||e.left-t.left}function Ul(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Zr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function v(Le,Qe,wt,vt){Qe<0&&(Qe=0),Qe=Math.round(Qe),vt=Math.round(vt),o.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+Le+`px;
|
|
|
top: `+Qe+"px; width: "+(wt==null?s-Le:wt)+`px;
|
|
|
height: `+(vt-Qe)+"px"))}function g(Le,Qe,wt){var vt=x(i,Le),jt=vt.text.length,Sn,Qn;function Tn(Zn,vr){return Nr(e,M(Le,Zn),"div",vt,vr)}function Sr(Zn,vr,er){var jn=wa(e,vt,null,Zn),Bn=vr=="ltr"==(er=="after")?"left":"right",Nn=er=="after"?jn.begin:jn.end-(/\s/.test(vt.text.charAt(jn.end-1))?2:1);return Tn(Nn,Bn)[Bn]}var hr=Ne(vt,i.direction);return Be(hr,Qe||0,wt==null?jt:wt,function(Zn,vr,er,jn){var Bn=er=="ltr",Nn=Tn(Zn,Bn?"left":"right"),pr=Tn(vr-1,Bn?"right":"left"),Wi=Qe==null&&Zn==0,ai=wt==null&&vr==jt,ir=jn==0,Br=!hr||jn==hr.length-1;if(pr.top-Nn.top<=3){var Jn=(u?Wi:ai)&&ir,ba=(u?ai:Wi)&&Br,Vr=Jn?l:(Bn?Nn:pr).left,yi=ba?s:(Bn?pr:Nn).right;v(Vr,Nn.top,yi-Vr,Nn.bottom)}else{var bi,sr,Hi,Sa;Bn?(bi=u&&Wi&&ir?l:Nn.left,sr=u?s:Sr(Zn,er,"before"),Hi=u?l:Sr(vr,er,"after"),Sa=u&&ai&&Br?s:pr.right):(bi=u?Sr(Zn,er,"before"):l,sr=!u&&Wi&&ir?s:Nn.right,Hi=!u&&ai&&Br?l:pr.left,Sa=u?Sr(vr,er,"after"):s),v(bi,Nn.top,sr-bi,Nn.bottom),Nn.bottom<pr.top&&v(l,Nn.bottom,null,pr.top),v(Hi,pr.top,Sa-Hi,pr.bottom)}(!Sn||Co(Nn,Sn)<0)&&(Sn=Nn),Co(pr,Sn)<0&&(Sn=pr),(!Qn||Co(Nn,Qn)<0)&&(Qn=Nn),Co(pr,Qn)<0&&(Qn=pr)}),{start:Sn,end:Qn}}var O=t.from(),w=t.to();if(O.line==w.line)g(O.line,O.ch,w.ch);else{var H=x(i,O.line),Y=x(i,w.line),me=bt(H)==bt(Y),Re=g(O.line,O.ch,me?H.text.length+1:null).end,ke=g(w.line,me?0:null,w.ch).start;me&&(Re.top<ke.top-2?(v(Re.right,Re.top,null,Re.bottom),v(l,ke.top,ke.left,ke.bottom)):v(Re.right,Re.top,ke.left-Re.right,Re.bottom)),Re.bottom<ke.top&&v(l,Re.bottom,null,ke.top)}r.appendChild(o)}function Xo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.state.focused||(e.display.input.focus(),Yo(e))}function La(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Yo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(st(e,"focus",e,t),e.state.focused=!0,dt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),T&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(st(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(p&&P<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-r,r=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var v=i.line.height-a;if((v>.005||v<-.005)&&($(i.line,a),Ta(i.line),i.rest))for(var g=0;g<i.rest.length;g++)Ta(i.rest[g]);if(l>e.display.sizerWidth){var O=Math.ceil(l/Oi(e.display));O>e.display.maxLineLength&&(e.display.maxLineLength=O,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ta(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Eo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wi(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=ie(t,n),a=ie(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=ie(t,Mn(x(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ie(t,Mn(x(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!pt(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!ve){var o=R("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-r.viewOffset-wi(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+Pr(e)+r.barHeight)+`px;
|
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Gl(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?M(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?M(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=yr(e,t),s=!r||r==t?l:yr(e,r);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Qo(e,i),v=e.doc.scrollTop,g=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(a=!0)),!a)break}return i}function Vl(e,t){var r=Qo(e,t);r.scrollTop!=null&&Qi(e,r.scrollTop),r.scrollLeft!=null&&vi(e,r.scrollLeft)}function Qo(e,t){var r=e.display,n=Ei(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=_i(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Ki(r),s=t.top<n,u=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var v=Math.min(t.top,(u?l:t.bottom)-o);v!=i&&(a.scrollTop=v)}var g=e.options.fixedGutter?0:r.gutters.offsetWidth,O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-g,w=Zr(e)-r.gutters.offsetWidth,H=t.right-t.left>w;return H&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<O?a.scrollLeft=Math.max(0,t.left+g-(H?0:10)):t.right>w+O-3&&(a.scrollLeft=t.right+(H?0:10)-w),a}function Jo(e,t){t!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mi(e){Oo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Oo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Xl(e,t){Oo(e),e.curOp.scrollToPos=t}function Oo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=xa(e,t.from),n=xa(e,t.to);Pa(e,r,n,t.margin)}}function Pa(e,t,r,n){var i=Qo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Qi(e,t){Math.abs(e.doc.scrollTop-t)<2||(E||ea(e,{top:t}),Da(e,t,!0),E&&ea(e),eo(e,100))}function Da(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,za(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ji(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ki(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?r:0,docHeight:n,scrollHeight:n+Pr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),U(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),U(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&P<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=et&&!N?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},pi.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Ri(e,t){t||(t=Ji(e));var r=e.display.barWidth,n=e.display.barHeight;Na(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wo(e),Na(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Na(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Aa={native:pi,null:qi};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),U(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?vi(e,t):Qi(e,t)},e),e.display.scrollbars.addClass&&dt(e.display.wrapper,e.display.scrollbars.addClass)}var Yl=0;function gi(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:++Yl},ui(e.curOp)}function mi(e){var t=e.curOp;t&&Pt(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ql(r)})}function Ql(e){for(var t=e.ops,r=0;r<t.length;r++)Jl(t[r]);for(var n=0;n<t.length;n++)ql(t[n]);for(var i=0;i<t.length;i++)es(t[i]);for(var o=0;o<t.length;o++)ts(t[o]);for(var a=0;a<t.length;a++)ns(t[a])}function Jl(e){var t=e.cm,r=t.display;is(t),e.updateMaxLine&&qn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ql(e){e.updatedDisplay=e.mustUpdate&&qo(e.cm,e.update)}function es(e){var t=e.cm,r=t.display;e.updatedDisplay&&wo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ui(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Pr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Zr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ge();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ri(t,e.barMeasure),e.updatedDisplay&&na(t,e.barMeasure),e.selectionChanged&&Xo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Ra(e.cm)}function ns(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&$a(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Da(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,Q(n,e.scrollToPos.from),Q(n,e.scrollToPos.to),e.scrollToPos.margin);kl(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||st(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&st(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&st(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function br(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function lr(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,le(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Oe(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?D(t.mode,n.state):null,s=ht(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,v=s.classes;v?o.styleClasses=v:u&&(o.styleClasses=null);for(var g=!a||a.length!=o.styles.length||u!=v&&(!u||!v||u.bgClass!=v.bgClass||u.textClass!=v.textClass),O=0;!g&&O<a.length;++O)g=a[O]!=o.styles[O];g&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&je(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&br(e,function(){for(var o=0;o<i.length;o++)qr(e,i[o],"text")})}}var Io=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Eo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Zr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Kt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)st.apply(null,this.events[e])};function is(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Pr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Pr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=ge();if(!t||!Ze(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Ze(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function as(e){if(!(!e||!e.activeElt||e.activeElt==ge())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Ze(document.body,e.anchorNode)&&Ze(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function qo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return ei(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Oa(e)==0)return!1;Wa(e)&&(ei(e),t.dims=ko(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Ot&&(o=Kn(e.doc,o),a=_n(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jl(e,o,a),r.viewOffset=Mn(x(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Oa(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),I(r.cursorDiv),I(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function $a(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Zr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ki(e.display)-_i(e),r.top)}),t.visible=Eo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Eo(e.display,e.doc,r));if(!qo(e,t))break;wo(e);var i=Ji(e);Xi(e),Ri(e,i),na(e,i),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 ea(e,t){var r=new Io(e,t);if(qo(e,r)){wo(e),$a(e,r);var n=Ji(e);Xi(e),Ri(e,n),na(e,n),r.finish()}}function ls(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(H){var Y=H.nextSibling;return T&&et&&e.display.currentWheelTarget==H?H.style.display="none":H.parentNode.removeChild(H),Y}for(var s=n.view,u=n.viewFrom,v=0;v<s.length;v++){var g=s[v];if(!g.hidden)if(!g.node||g.node.parentNode!=o){var O=mo(e,g,u,r);o.insertBefore(O,a)}else{for(;a!=g.node;)a=l(a);var w=i&&t!=null&&t<=u&&g.lineNumber;g.changes&&(k(g.changes,"gutter")>-1&&(w=!1),bn(e,g,u,r)),w&&(I(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(Ae(e.options,u)))),a=g.node.nextSibling}u+=g.size}for(;a;)a=l(a)}function ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function na(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+Pr(e)+"px"}function za(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Go(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Wa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Ae(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(R("div",[R("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ta(e.display),!0}return!1}function ra(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Ha(e){var t=e.gutters,r=e.gutterSpecs;I(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(R("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ta(e)}function to(e){Ha(e.display),fr(e),za(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=ne("div",null,"CodeMirror-code"),i.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=R("div",null,"CodeMirror-cursors"),i.measure=R("div",null,"CodeMirror-measure"),i.lineMeasure=R("div",null,"CodeMirror-measure"),i.lineSpace=ne("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=ne("div",[i.lineSpace],"CodeMirror-lines");i.mover=R("div",[o],null,"position: relative"),i.sizer=R("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=R("div",null,null,"position: absolute; height: "+We+"px; width: 1px;"),i.gutters=R("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=R("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=R("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),p&&P<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!T&&!(E&&Xe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ra(n.gutters,n.lineNumbers),Ha(i),r.init(i)}var Mo=0,Er=null;p?Er=-.53:E?Er=15:q?Er=-.7:be&&(Er=-1/3);function Za(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=Za(e);return t.x*=Er,t.y*=Er,t}function Ba(e,t){var r=Za(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&et&&T){e:for(var u=t.target,v=o.view;u!=a;u=u.parentNode)for(var g=0;g<v.length;g++)if(v[g].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!E&&!b&&Er!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*Er)),vi(e,Math.max(0,a.scrollLeft+n*Er)),(!i||i&&s)&&$t(t),o.wheelStartX=null;return}if(i&&Er!=null){var O=i*Er,w=e.doc.scrollTop,H=w+o.wrapper.clientHeight;O<0?w=Math.max(0,w+O-50):H=Math.min(e.doc.height,H+O+50),ea(e,{top:w,bottom:H})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var Y=a.scrollLeft-o.wheelStartX,me=a.scrollTop-o.wheelStartY,Re=me&&o.wheelDY&&me/o.wheelDY||Y&&o.wheelDX&&Y/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Re&&(Er=(Er*Mo+Re)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Ve(r.anchor,n.anchor)||!Ve(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new un(pe(this.ranges[t].anchor),pe(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(K(t,n.from())>=0&&K(e,n.to())<=0)return r}return-1};var un=function(e,t){this.anchor=e,this.head=t};un.prototype.from=function(){return Me(this.anchor,this.head)},un.prototype.to=function(){return _e(this.anchor,this.head)},un.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zr(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(O,w){return K(O.from(),w.from())}),r=k(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=K(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Me(l.from(),a.from()),v=_e(l.to(),a.to()),g=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new un(g?v:u,g?u:v))}}return new Or(t,r)}function ti(e,t){return new Or([new un(e,t||e)],0)}function ni(e){return e.text?M(e.from.line+e.text.length-1,Je(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ka(e,t){if(K(e,t.from)<0)return e;if(K(e,t.to)<=0)return ni(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ni(t).ch-t.to.ch),M(r,n)}function ia(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new un(Ka(i.anchor,t),Ka(i.head,t)))}return zr(e.cm,r,e.sel.primIndex)}function _a(e,t,r){return e.line==t.line?M(r.line,e.ch-t.ch+r.ch):M(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=M(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=_a(l.from,i,o),u=_a(ni(l),i,o);if(i=l.to,o=u,r=="around"){var v=e.sel.ranges[a],g=K(v.head,v.anchor)<0;n[a]=new un(g?u:s,g?s:u)}else n[a]=new un(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=nt(e.options,e.doc.modeOption),no(e)}function no(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,eo(e,100),e.state.modeGen++,e.curOp&&fr(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&Je(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(ke){return r?r[ke]:null}function o(ke,Le,Qe){Kr(ke,Le,Qe,n),rt(ke,"change",ke,t)}function a(ke,Le){for(var Qe=[],wt=ke;wt<Le;++wt)Qe.push(new tr(u[wt],i(wt),n));return Qe}var l=t.from,s=t.to,u=t.text,v=x(e,l.line),g=x(e,s.line),O=Je(u),w=i(u.length-1),H=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(ja(e,t)){var Y=a(0,u.length-1);o(g,g.text,w),H&&e.remove(l.line,H),Y.length&&e.insert(l.line,Y)}else if(v==g)if(u.length==1)o(v,v.text.slice(0,l.ch)+O+v.text.slice(s.ch),w);else{var me=a(1,u.length-1);me.push(new tr(O+v.text.slice(s.ch),w,n)),o(v,v.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,me)}else if(u.length==1)o(v,v.text.slice(0,l.ch)+u[0]+g.text.slice(s.ch),i(0)),e.remove(l.line+1,H);else{o(v,v.text.slice(0,l.ch)+u[0],i(0)),o(g,O+g.text.slice(s.ch),w);var Re=a(1,u.length-1);H>1&&e.remove(l.line+1,H-1),e.insert(l.line+1,Re)}rt(e,"change",e,t)}function ri(e,t,r){function n(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function Ua(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,fr(e)}function ka(e){(e.doc.direction=="rtl"?dt:S)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){br(e,function(){ka(e),fr(e)})}function Ro(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function la(e,t){var r={from:pe(t.from),to:ni(t),text:L(e,t.from,t.to)};return Xa(e,r,t.from.line,t.to.line+1),ri(e,function(n){return Xa(n,r,t.from.line,t.to.line+1)},!0),r}function Ga(e){for(;e.length;){var t=Je(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),Je(e.done);if(e.done.length&&!Je(e.done).ranges)return Je(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Je(e.done)}function Va(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==n)))l=Je(a.changes),K(t.from,t.to)==0&&K(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=Je(i.done);for((!s||!s.ranges)&&Lo(e.sel,i.done),a={changes:[la(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||st(e,"historyAdded")}function hs(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vs(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hs(e,o,Je(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Lo(e,t){var r=Je(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Xa(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function Ya(e,t){var r=gs(e,t),n=lt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Li(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],v=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var g in u)(v=g.match(/^spans_(\d+)$/))&&k(t,Number(v[1]))>-1&&(Je(l)[g]=u[g],delete u[g])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=K(t,i)<0;o!=K(r,i)<0?(i=t,t=r):o!=K(t,r)<0&&(t=r)}return new un(i,t)}else return new un(r||t,t)}function To(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=zr(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,zr(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new un(Q(e,i[o].anchor),Q(e,i[o].head))},origin:r&&r.origin};return st(e,"beforeSelectionChange",e,n),e.cm&&st(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?zr(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=Je(n);i&&i.ranges?(n[n.length-1]=t,Po(e,t,r)):rr(e,t,r)}function rr(e,t,r){Po(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Po(e,t,r){(Kt(e,"beforeSelectionChange")||e.cm&&Kt(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(K(t.primary().head,e.sel.primary().head)<0?-1:1);el(e,nl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Mi(e.cm)}function el(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,rn(e.cm)),rt(e,"cursorActivity",e))}function tl(e){el(e,nl(e,e.sel,null,!1))}function nl(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Do(e,a.anchor,l&&l.anchor,r,n),u=Do(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new un(s,u))}return i?zr(e.cm,i,t.primIndex):t}function Ti(e,t,r,n,i){var o=x(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,v="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(v?l.to>=t.ch:l.to>t.ch))){if(i&&(st(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var g=s.find(n<0?1:-1),O=void 0;if((n<0?v:u)&&(g=rl(e,g,-n,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(O=K(g,r))&&(n<0?O<0:O>0))return Ti(e,g,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:v)&&(w=rl(e,w,n,w.line==t.line?o:null)),w?Ti(e,w,t,n,i):null}}return t}function Do(e,t,r,n,i){var o=n||1,a=Ti(e,t,r,o,i)||!i&&Ti(e,t,r,o,!0)||Ti(e,t,r,-o,i)||!i&&Ti(e,t,r,-o,!0);return a||(e.cantEdit=!0,M(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Q(e,M(t.line-1)):null:r>0&&t.ch==(n||x(e,t.line)).text.length?t.line<e.first+e.size-1?M(t.line+1,0):null:new M(t.line,t.ch+r)}function il(e){e.setSelection(M(e.firstLine(),0),M(e.lastLine()),ue)}function ol(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,o,a,l){i&&(n.from=Q(e,i)),o&&(n.to=Q(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),st(e,"beforeChange",e,n),e.cm&&st(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Pi(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Pi)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Kt(e,"beforeChange")||e.cm&&Kt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=Wt&&!r&&qt(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else al(e,t)}}function al(e,t){if(!(t.text.length==1&&t.text[0]==""&&K(t.from,t.to)==0)){var r=ia(e,t);Va(e,t,r,e.cm?e.cm.curOp.id:NaN),ro(e,t,r,lt(e,t));var n=[];ri(e,function(i,o){!o&&k(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,lt(i,t))})}}function No(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(Lo(o,s),r&&!o.equals(e.sel)){rr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var v=[];Lo(a,s),s.push({changes:v,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var g=Kt(e,"beforeChange")||e.cm&&Kt(e.cm,"beforeChange"),O=function(Y){var me=o.changes[Y];if(me.origin=t,g&&!ol(e,me,!1))return l.length=0,{};v.push(la(e,me));var Re=Y?ia(e,me):Je(l);ro(e,me,Re,Ya(e,me)),!Y&&e.cm&&e.cm.scrollIntoView({from:me.from,to:ni(me)});var ke=[];ri(e,function(Le,Qe){!Qe&&k(ke,Le.history)==-1&&(cl(Le.history,me),ke.push(Le.history)),ro(Le,me,null,Ya(Le,me))})},w=o.changes.length-1;w>=0;--w){var H=O(w);if(H)return H.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(It(e.sel.ranges,function(i){return new un(M(i.anchor.line+t,i.anchor.ch),M(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function ro(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ll(e,i),t={from:M(e.first,0),to:M(t.to.line+i,t.to.ch),text:[Je(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:M(o,x(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Po(e,r,ue),e.cantEdit&&Do(e,M(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=W(bt(x(n,o.line))),n.iter(s,a.line+1,function(w){if(w==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&rn(e),aa(n,t,r,Ea(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var H=ur(w);H>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=H,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Et(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?fr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):fr(e,o.line,a.line+1,u);var v=Kt(e,"changes"),g=Kt(e,"change");if(g||v){var O={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};g&&rt(e,"change",e,O),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(O)}e.display.selForContextMenu=null}function Di(e,t,r,n,i){var o;n||(n=r),K(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Pi(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)sl(o.ranges[l].anchor,t,r,n),sl(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=M(u.from.line+n,u.from.ch),u.to=M(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function io(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=x(e,ot(e,t)):i=W(t),i==null?null:(n(o,i)&&e.cm&&qr(e.cm,i,r),o)}function oo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Xr(i),rt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var l=[];this.collapse(l),this.children=[new oo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new oo(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=k(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var lo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};lo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=W(r);if(!(n==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Tr(this);$(r,Math.max(0,r.height-o)),e&&(br(e,function(){fl(e,r,-o),qr(e,n,"widget")}),rt(e,"lineWidgetCleared",e,this,n))}},lo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Tr(this)-t;i&&($n(this.doc,n)||$(n,n.height+i),r&&br(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),rt(r,"lineWidgetChanged",r,e,W(n))}))},Ft(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!$n(e,a)){var s=Mn(a)<e.scrollTop;$(a,a.height+Tr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&rt(o,"lineWidgetAdded",o,i,typeof t=="number"?t:W(t)),i}var dl=0,ii=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++dl};ii.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&gi(e),Kt(this,"clear")){var r=this.find();r&&rt(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=an(a.markedSpans,this);e&&!this.collapsed?qr(e,W(a),"text"):e&&(l.to!=null&&(i=W(a)),l.from!=null&&(n=W(a))),a.markedSpans=Xt(a.markedSpans,l),l.from==null&&this.collapsed&&!$n(this.doc,a)&&e&&$(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=bt(this.lines[s]),v=ur(u);v>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&fr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tl(e.doc)),e&&rt(e,"markerCleared",e,this,n,i),t&&mi(e),this.parent&&this.parent.clear()}},ii.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=an(o.markedSpans,this);if(a.from!=null&&(r=M(t?o:W(o),a.from),e==-1))return r;if(a.to!=null&&(n=M(t?o:W(o),a.to),e==1))return n}return r&&{from:r,to:n}},ii.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||br(n,function(){var i=t.line,o=W(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!$n(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&$(i,i.height+s)}rt(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||k(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(k(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ft(ii);function Ni(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Ni)(e,t,r,n,i);var o=new ii(e,i),a=K(t,r);if(n&&_(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ne("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(mt(e,t.line,t,r,o)||t.line!=r.line&&mt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt()}o.addToHistory&&Va(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(g){s&&o.collapsed&&!s.options.lineWrapping&&bt(g)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&$(g,0),En(g,new Zt(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(g){$n(e,g)&&$(g,0)}),o.clearOnEnter&&U(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(cn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++dl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)fr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var v=t.line;v<=r.line;v++)qr(s,v,"text");o.atomic&&tl(s.doc),rt(s,"markerAdded",s,o)}return o}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();rt(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},Ft(so);function Ss(e,t,r,n,i){n=_(n),n.shared=!1;var o=[Ni(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ni(s,Q(s,t),Q(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=Je(o)}),new so(o,a)}function hl(e){return e.findMarks(M(e.first,0),e.clipPos(M(e.lastLine())),function(t){return t.parent})}function xs(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(K(o,a)){var l=Ni(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Cs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];ri(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];k(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,dr=function(e,t,r,n,i){if(!(this instanceof dr))return new dr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=M(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++ws,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),aa(this,{from:o,to:o,text:e}),rr(this,ti(o),ue)};dr.prototype=Ce(ao.prototype,{constructor:dr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=te(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=M(this.first,0),r=this.first+this.size-1;Pi(this,{from:t,to:M(r,x(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),ue)}),replaceRange:function(e,t,r,n){t=Q(this,t),r=r?Q(this,r):t,Di(this,e,t,r,n)},getRange:function(e,t,r){var n=L(this,Q(this,e),Q(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(oe(this,e))return x(this,e)},getLineNumber:function(e){return W(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=x(this,e)),bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Q(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,Q(this,typeof e=="number"?M(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,Q(this,e),Q(this,t||e),r)}),extendSelection:Yn(function(e,t,r){To(this,Q(this,e),t&&Q(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,gt(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=It(this.sel.ranges,e);Qa(this,gt(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new un(Q(this,e[i].anchor),Q(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,zr(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new un(Q(this,e),Q(this,t||e))),rr(this,zr(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=L(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=L(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Pi(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){No(this,"undo")}),redo:Yn(function(){No(this,"redo")}),undoSelection:Yn(function(){No(this,"undo",!0)}),redoSelection:Yn(function(){No(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),ri(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Li(this.history.done),undone:Li(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Li(e.done.slice(0),null,!0),t.undone=Li(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&de(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,de(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!oe(this,e)||(t=e,e=x(this,e),!e))return null}else if(t=W(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ni(this,Q(this,e),Q(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Q(this,e),Ni(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Q(this,e);var t=[],r=x(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Q(this,e),t=Q(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!r||r(s.marker))&&n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Q(this,M(r,t))},indexFromPos:function(e){e=Q(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new dr(te(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new dr(te(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],xs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Cs(hl(this));break}}if(e.history==this.history){var n=[e.id];ri(e,function(i){return n.push(i.id)},!0),e.history=new Ro(null),e.history.done=Li(this.history.done,n),e.history.undone=Li(this.history.undone,n)}},iterLinkedDocs:function(e){ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):In(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),dr.prototype.eachLine=dr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(pt(t,e)||$r(t.display,e))){$t(e),p&&(vl=+new Date);var r=di(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Xn(t,function(){r=Q(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(H){return H!=null}).join(t.doc.lineSeparator())),origin:"paste"};Pi(t.doc,w),qa(t.doc,ti(Q(t.doc,r),Q(t.doc,ni(w))))})()},s=function(w,H){if(t.options.allowDropFileTypes&&k(t.options.allowDropFileTypes,w.type)==-1){l();return}var Y=new FileReader;Y.onerror=function(){return l()},Y.onload=function(){var me=Y.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(me)){l();return}o[H]=me,l()},Y.readAsText(w)},u=0;u<n.length;u++)s(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var v=e.dataTransfer.getData("Text");if(v){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),Po(t.doc,ti(r,r)),g)for(var O=0;O<g.length;++O)Di(t.doc,"",g[O].anchor,g[O].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Os(e,t){if(p&&(!e.state.draggingText||+new Date-vl<100)){sn(t);return}if(!(pt(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!be)){var r=R("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",b&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),b&&r.parentNode.removeChild(r)}}function Is(e,t){var r=di(e,t);if(r){var n=document.createDocumentFragment();Ma(e,r,n),e.display.dragCursor||(e.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),B(e.display.dragCursor,n)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var ml=!1;function Ms(){ml||(Rs(),ml=!0)}function Rs(){var e;U(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),U(window,"blur",function(){return gl(Ii)})}function Ls(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var oi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},uo=0;uo<10;uo++)oi[uo+48]=oi[uo+96]=String(uo);for(var Ao=65;Ao<=90;Ao++)oi[Ao]=String.fromCharCode(Ao);for(var co=1;co<=12;co++)oi[co+111]=oi[co+63235]="F"+co;var Gr={};Gr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gr.default=et?Gr.macDefault:Gr.pcDefault;function Ts(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ps(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=It(r.split(" "),Ts),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ai(e,t,r,n){t=Fo(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ai(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ai(e,t.fallthrough[o],r,n);if(a)return a}}}function yl(e){var t=typeof e=="string"?e:oi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(F?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(F?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(b&&e.keyCode==34&&e.char)return!1;var r=oi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),bl(r,e,t))}function Fo(e){return typeof e=="string"?Gr[e]:e}function Fi(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&K(o.from,Je(n).to)<=0;){var a=n.pop();if(K(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}br(e,function(){for(var l=n.length-1;l>=0;l--)Di(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=De(e.text,t+r,r);return n<0||n>e.text.length?null:n}function fa(e,t,r){var n=ca(e,t.ch,r);return n==null?null:new M(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ne(r,t.doc.direction);if(o){var a=i<0?Je(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var v=Jr(t,r);u=i<0?r.text.length-1:0;var g=Dr(t,v,u).top;u=ee(function(O){return Dr(t,v,O).top==g},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=ca(r,u,1))}else u=i<0?a.to:a.from;return new M(n,u,s)}}return new M(n,i<0?r.text.length:0,i<0?"before":"after")}function Ds(e,t,r,n){var i=Ne(t,e.doc.direction);if(!i)return fa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Pe(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function(Re,ke){return ca(t,Re instanceof M?Re.ch:Re,ke)},s,u=function(Re){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Re)):{begin:0,end:t.text.length}},v=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var g=a.level==1==n<0,O=l(r,g?1:-1);if(O!=null&&(g?O<=a.to&&O<=v.end:O>=a.from&&O>=v.begin)){var w=g?"before":"after";return new M(r.line,O,w)}}var H=function(Re,ke,Le){for(var Qe=function(Sn,Qn){return Qn?new M(r.line,l(Sn,1),"before"):new M(r.line,Sn,"after")};Re>=0&&Re<i.length;Re+=ke){var wt=i[Re],vt=ke>0==(wt.level!=1),jt=vt?Le.begin:l(Le.end,-1);if(wt.from<=jt&&jt<wt.to||(jt=vt?wt.from:l(wt.to,-1),Le.begin<=jt&&jt<Le.end))return Qe(jt,vt)}},Y=H(o+n,n,v);if(Y)return Y;var me=n>0?v.end:l(v.begin,-1);return me!=null&&!(n>0&&me==t.text.length)&&(Y=H(n>0?0:i.length-1,n,u(me)),Y)?Y:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return Fi(e,function(t){if(t.empty()){var r=x(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:M(t.head.line+1,0)}:{from:t.head,to:M(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:Q(e.doc,M(t.to().line+1,0))}})},delLineLeft:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Fi(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Fi(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(M(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(M(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ns(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},fe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},fe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Cl(e,t.head):n},fe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=ae(e.getLine(o.line),o.ch,n);t.push(Ct(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return br(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=x(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new M(i.line,i.ch-1)),i.ch>0)i=new M(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),M(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=x(e.doc,i.line-1).text;a&&(i=new M(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),M(i.line-1,a.length-1),i,"+transpose"))}}r.push(new un(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return br(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Mi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xl(e,t){var r=x(e.doc,t),n=bt(r);return n!=r&&(t=W(n)),da(!0,e,n,t,1)}function Ns(e,t){var r=x(e.doc,t),n=hn(r);return n!=r&&(t=W(n)),da(!0,e,r,t,-1)}function Cl(e,t){var r=xl(e,t.line),n=x(e.doc,r.line),i=Ne(n,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return M(r.line,a?0:o,r.sticky)}return r}function $o(e,t,r){if(typeof t=="string"&&(t=fo[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Te}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function As(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ai(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ai(t,e.options.extraKeys,r,e)||Ai(t,e.options.keyMap,r,e)}var Fs=new X;function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(yl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),wl(e,i+" "+t,r,n))return!0}return wl(e,t,r,n)}function wl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&rt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&($t(r),Xo(e)),!!i}function El(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return $o(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $o(e,n)}):ho(e,r,t,function(n){return $o(e,n)}):!1}function $s(e,t,r){return ho(e,"'"+r+"'",t,function(n){return $o(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ge(),!pt(t,e))){p&&P<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=El(t,e);b&&(ha=n?r:null,!n&&r==88&&!pn&&(et?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),E&&!et&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&zs(t)}}function zs(e){var t=e.display.lineDiv;dt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(S(t,"CodeMirror-crosshair"),He(document,"keyup",r),He(document,"mouseover",r))}U(document,"keyup",r),U(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),pt(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||pt(t,e)||e.ctrlKey&&!e.altKey||et&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(b&&r==ha){ha=null,$t(e);return}if(!(b&&(!e.which||e.which<10)&&El(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(t,e,i)||t.display.input.onKeyPress(e))}}}var Ws=400,va=function(e,t,r){this.time=e,this.pos=t,this.button=r};va.prototype.compare=function(e,t,r){return this.time+Ws>e&&K(t,this.pos)==0&&r==this.button};var vo,po;function Hs(e,t){var r=+new Date;return po&&po.compare(r,e,t)?(vo=po=null,"triple"):vo&&vo.compare(r,e,t)?(po=new va(r,e,t),vo=null,"double"):(vo=new va(r,e,t),po=null,"single")}function Rl(e){var t=this,r=t.display;if(!(pt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){T||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=fn(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Zs(t,i,n,o,e))&&(i==1?n?Ks(t,n,o,e):Cn(e)==r.scroller&&$t(e):i==2?(n&&To(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(m?t.display.input.onContextMenu(e):La(t)))}}}function Zs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=Te}finally{e.state.suppressEdits=!1}return l})}function Bs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=yt?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=et?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(et?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){p?setTimeout(le(Ra,e),0):e.curOp.focus=ge();var i=Bs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&An&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(K((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(K(a.to(),t)>0||t.xRel<0)?_s(e,n,t,i):js(e,n,t,i)}function _s(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){T&&(i.scroller.draggable=!1),e.state.draggingText=!1,He(i.wrapper.ownerDocument,"mouseup",a),He(i.wrapper.ownerDocument,"mousemove",l),He(i.scroller,"dragstart",s),He(i.scroller,"drop",a),o||($t(u),n.addNew||To(e.doc,r,null,null,n.extend),T&&!be||p&&P==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};T&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),U(i.wrapper.ownerDocument,"mouseup",a),U(i.wrapper.ownerDocument,"mousemove",l),U(i.scroller,"dragstart",s),U(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new un(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new un(M(t.line,0),Q(e.doc,M(t.line+1,0)));var n=r(e,t);return new un(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;$t(t);var a,l,s=o.sel,u=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),l>-1?a=u[l]:a=new un(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new un(r,r)),r=di(e,t,!0,!0),l=-1;else{var v=Ll(e,r,n.unit);n.extend?a=sa(a,v.anchor,v.head,n.extend):a=v}n.addNew?l==-1?(l=u.length,rr(o,zr(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,zr(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,Ie):(l=0,rr(o,new Or([a],0),Ie),s=o.sel);var g=r;function O(Le){if(K(g,Le)!=0)if(g=Le,n.unit=="rectangle"){for(var Qe=[],wt=e.options.tabSize,vt=ae(x(o,r.line).text,r.ch,wt),jt=ae(x(o,Le.line).text,Le.ch,wt),Sn=Math.min(vt,jt),Qn=Math.max(vt,jt),Tn=Math.min(r.line,Le.line),Sr=Math.min(e.lastLine(),Math.max(r.line,Le.line));Tn<=Sr;Tn++){var hr=x(o,Tn).text,Zn=xt(hr,Sn,wt);Sn==Qn?Qe.push(new un(M(Tn,Zn),M(Tn,Zn))):hr.length>Zn&&Qe.push(new un(M(Tn,Zn),M(Tn,xt(hr,Qn,wt))))}Qe.length||Qe.push(new un(r,r)),rr(o,zr(e,s.ranges.slice(0,l).concat(Qe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Le)}else{var vr=a,er=Ll(e,Le,n.unit),jn=vr.anchor,Bn;K(er.anchor,jn)>0?(Bn=er.head,jn=Me(vr.from(),er.anchor)):(Bn=er.anchor,jn=_e(vr.to(),er.head));var Nn=s.ranges.slice(0);Nn[l]=Us(e,new un(Q(o,jn),Bn)),rr(o,zr(e,Nn,l),Ie)}}var w=i.wrapper.getBoundingClientRect(),H=0;function Y(Le){var Qe=++H,wt=di(e,Le,!0,n.unit=="rectangle");if(wt)if(K(wt,g)!=0){e.curOp.focus=ge(),O(wt);var vt=Eo(i,o);(wt.line>=vt.to||wt.line<vt.from)&&setTimeout(Xn(e,function(){H==Qe&&Y(Le)}),150)}else{var jt=Le.clientY<w.top?-20:Le.clientY>w.bottom?20:0;jt&&setTimeout(Xn(e,function(){H==Qe&&(i.scroller.scrollTop+=jt,Y(Le))}),50)}}function me(Le){e.state.selectingText=!1,H=1/0,Le&&($t(Le),i.input.focus()),He(i.wrapper.ownerDocument,"mousemove",Re),He(i.wrapper.ownerDocument,"mouseup",ke),o.history.lastSelOrigin=null}var Re=Xn(e,function(Le){Le.buttons===0||!fn(Le)?me(Le):Y(Le)}),ke=Xn(e,me);e.state.selectingText=ke,U(i.wrapper.ownerDocument,"mousemove",Re),U(i.wrapper.ownerDocument,"mouseup",ke)}function Us(e,t){var r=t.anchor,n=t.head,i=x(e.doc,r.line);if(K(r,n)==0&&r.sticky==n.sticky)return t;var o=Ne(i);if(!o)return t;var a=Pe(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var v=Pe(o,n.ch,n.sticky),g=v-a||(n.ch-r.ch)*(l.level==1?-1:1);v==s-1||v==s?u=g<0:u=g>0}var O=o[s+(u?-1:0)],w=u==(O.level==1),H=w?O.from:O.to,Y=w?"after":"before";return r.ch==H&&r.sticky==Y?t:new un(new M(r.line,H,Y),n)}function Tl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(O){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&$t(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Kt(e,r))return Ut(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var v=ie(e.doc,o),g=e.display.gutterSpecs[s];return st(e,r,e,v,g.className,t),Ut(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Pl(e,t){$r(e.display,t)||ks(e,t)||pt(e,t,"contextmenu")||m||e.display.input.onContextMenu(t)}function ks(e,t){return Kt(e,"gutterContextMenu")?Tl(e,t,"gutterContextMenu",!1):!1}function Dl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),On(e)}var $i={toString:function(){return"CodeMirror.Init"}},Nl={},zo={};function Gs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=$i&&o(l,s,u)}:o)}e.defineOption=r,e.Init=$i,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,oa(n)},!0),r("indentUnit",2,oa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){no(n),On(n),fr(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(s){for(var u=0;;){var v=s.text.indexOf(i,u);if(v==-1)break;u=v+i.length,o.push(M(a,v))}a++});for(var l=o.length-1;l>=0;l--)Di(n.doc,i,o[l],M(o[l].line,o[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,o){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=$i&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",Xe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Lt),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Dl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=Fo(i),l=o!=$i&&Fo(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Xs,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ra(i,n.options.lineNumbers),to(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Go(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ri(n)},!0),r("scrollbarStyle","native",function(n){Fa(n),Ri(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ra(n.options.gutters,i),to(n)},!0),r("firstLineNumber",1,to,!0),r("lineNumberFormatter",function(n){return n},to,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Vs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,no,!0),r("addModeClass",!1,no,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,no,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Vs(e,t,r){var n=r&&r!=$i;if(!t!=!n){var i=e.display.dragFunctions,o=t?U:He;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Xs(e){e.options.lineWrapping?(dt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),fr(e),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?_(t):{},_(Nl,t,!1);var n=t.value;typeof n=="string"?n=new dr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rn.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Dl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 X,keySeq:null,specialChars:null},t.autofocus&&!Xe&&o.input.focus(),p&&P<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,Ua(this,n),t.autofocus&&!Xe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in zo)zo.hasOwnProperty(a)&&zo[a](this,t[a],$i);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),T&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Nl,Rn.optionHandlers=zo;function Ys(e){var t=e.display;U(t.scroller,"mousedown",Xn(e,Rl)),p&&P<11?U(t.scroller,"dblclick",Xn(e,function(s){if(!pt(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){$t(s);var v=e.findWordAt(u);To(e.doc,v.anchor,v.head)}}})):U(t.scroller,"dblclick",function(s){return pt(e,s)||$t(s)}),U(t.scroller,"contextmenu",function(s){return Pl(e,s)}),U(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Pl(e,s)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var v=u.left-s.left,g=u.top-s.top;return v*v+g*g>20*20}U(t.scroller,"touchstart",function(s){if(!pt(e,s)&&!o(s)&&!pa(e,s)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),U(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),U(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!$r(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var v=e.coordsChar(t.activeTouch,"page"),g;!u.prev||a(u,u.prev)?g=new un(v,v):!u.prev.prev||a(u,u.prev.prev)?g=e.findWordAt(v):g=new un(M(v.line,0),Q(e.doc,M(v.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),$t(s)}i()}),U(t.scroller,"touchcancel",i),U(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),st(e,"scroll",e))}),U(t.scroller,"mousewheel",function(s){return Ba(e,s)}),U(t.scroller,"DOMMouseScroll",function(s){return Ba(e,s)}),U(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){pt(e,s)||sn(s)},over:function(s){pt(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){pt(e,s)||pl(e)}};var l=t.input.getField();U(l,"keyup",function(s){return Il.call(e,s)}),U(l,"keydown",Xn(e,Ol)),U(l,"keypress",Xn(e,Ml)),U(l,"focus",function(s){return Yo(e,s)}),U(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Oe(e,t).state:r="prev");var a=e.options.tabSize,l=x(i,t),s=ae(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],v;if(!n&&!/\S/.test(l.text))v=0,r="not";else if(r=="smart"&&(v=i.mode.indent(o,l.text.slice(u.length),l.text),v==Te||v>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?v=ae(x(i,t-1).text,null,a):v=0:r=="add"?v=s+e.options.indentUnit:r=="subtract"?v=s-e.options.indentUnit:typeof r=="number"&&(v=s+r),v=Math.max(0,v);var g="",O=0;if(e.options.indentWithTabs)for(var w=Math.floor(v/a);w;--w)O+=a,g+=" ";if(O<v&&(g+=Ct(v-O)),g!=u)return Di(i,g,M(t,0),M(t,u.length),"+input"),l.stateAfter=null,!0;for(var H=0;H<i.sel.ranges.length;H++){var Y=i.sel.ranges[H];if(Y.head.line==t&&Y.head.ch<u.length){var me=M(t,u.length);ua(i,H,new un(me,me));break}}}var Wr=null;function Wo(e){Wr=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(Wr&&Wr.text.join(`
|
|
|
`)==t){if(n.ranges.length%Wr.text.length==0){u=[];for(var v=0;v<Wr.text.length;v++)u.push(o.splitLines(Wr.text[v]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=It(s,function(Re){return[Re]}));for(var g=e.curOp.updateInput,O=n.ranges.length-1;O>=0;O--){var w=n.ranges[O],H=w.from(),Y=w.to();w.empty()&&(r&&r>0?H=M(H.line,H.ch-r):e.state.overwrite&&!l?Y=M(Y.line,Math.min(x(o,Y.line).text.length,Y.ch+Je(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
|
|
|
`)==s.join(`
|
|
|
`)&&(H=Y=M(H.line,0)));var me={from:H,to:Y,text:u?u[O%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Pi(e.doc,me),rt(e,"inputRead",e,me)}t&&!l&&Fl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&br(t,function(){return ma(t,r,0,null,"paste")}),!0}function Fl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=go(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(x(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&rt(e,"electricInput",e,i.head.line)}}}function $l(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:M(i,0),head:M(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function zl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=R("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return T?e.style.width="1000px":e.setAttribute("wrap","off"),Ee&&(e.style.border="1px solid black"),zl(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Xn(this,t[n])(this,i,a),st(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Fo(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:lr(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");it(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,fr(this)}),removeOverlay:lr(function(n){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==n||typeof n=="string"&&a.name==n){i.splice(o,1),this.state.modeGen++,fr(this);return}}}),indentLine:lr(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),oe(this.doc,n)&&go(this,n,i,o)}),indentSelection:lr(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(go(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&Mi(this));else{var s=l.from(),u=l.to(),v=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var g=v;g<o;++g)go(this,g,n);var O=this.doc.sel.ranges;s.ch==0&&i.length==O.length&&O[a].from().ch>0&&ua(this.doc,a,new un(s,O[a].to()),ue)}}}),getTokenAt:function(n,i){return kt(this,n,i)},getLineTokens:function(n,i){return kt(this,M(n),i,!0)},getTokenTypeAt:function(n){n=Q(this.doc,n);var i=zt(this,x(this.doc,n.line)),o=0,a=(i.length-1)/2,l=n.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var o=[];if(!r.hasOwnProperty(i))return o;var a=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var u=a[l[i][s]];u&&o.push(u)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var v=0;v<a._global.length;v++){var g=a._global[v];g.pred(l,this)&&k(o,g.val)==-1&&o.push(g.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ot(o,n==null?o.first+o.size-1:n),Oe(this,n+1,i).state},cursorCoords:function(n,i){var o,a=this.doc.sel.primary();return n==null?o=a.head:typeof n=="object"?o=Q(this.doc,n):o=n?a.from():a.to(),yr(this,o,i||"page")},charCoords:function(n,i){return Nr(this,Q(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),jo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,ie(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,o){var a=!1,l;if(typeof n=="number"){var s=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>s&&(n=s,a=!0),l=x(this.doc,n)}else l=n;return wr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(l):0)},defaultTextHeight:function(){return Ei(this.display)},defaultCharWidth:function(){return Oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=yr(this,Q(this.doc,n));var u=n.bottom,v=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var g=Math.max(s.wrapper.clientHeight,this.doc.height),O=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>g)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=g&&(u=n.bottom),v+i.offsetWidth>O&&(v=O-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(v=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?v=0:l=="middle"&&(v=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=v+"px"),o&&Vl(this,{left:v,top:u,right:v+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:lr(Ol),triggerOnKeyPress:lr(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:lr(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:lr(function(n){Fl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Q(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:lr(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ya(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},fe)}),deleteH:lr(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Fi(this,function(l){var s=ya(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=Q(this.doc,n),v=0;v<i;++v){var g=yr(this,u,"div");if(s==null?s=g.left:g.left=s,u=Hl(this,g,l,o),u.hitSide)break}return u},moveV:lr(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(v){if(s)return n<0?v.from():v.to();var g=yr(o,v.head,"div");v.goalColumn!=null&&(g.left=v.goalColumn),l.push(g.left);var O=Hl(o,g,n,i);return i=="page"&&v==a.sel.primary()&&Jo(o,Nr(o,O,"div").top-g.top),O},fe),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(n){var i=this.doc,o=x(i,n.line).text,a=n.ch,l=n.ch;if(o){var s=this.getHelper(n,"wordChars");(n.sticky=="before"||l==o.length)&&a?--a:++l;for(var u=o.charAt(a),v=re(u,s)?function(g){return re(g,s)}:/\s/.test(u)?function(g){return/\s/.test(g)}:function(g){return!/\s/.test(g)&&!re(g)};a>0&&v(o.charAt(a-1));)--a;for(;l<o.length&&v(o.charAt(l));)++l}return new un(M(n.line,a),M(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?dt(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),st(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ge()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:lr(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Pr(this)-this.display.barHeight,width:n.scrollWidth-Pr(this)-this.display.barWidth,clientHeight:_i(this),clientWidth:Zr(this)}},scrollIntoView:lr(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:M(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Xl(this,n):Pa(this,n.from,n.to,n.margin)}),setSize:lr(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,st(this,"refresh",this)}),operation:function(n){return br(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:lr(function(){var n=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,On(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-Ei(this.display))>.5||this.options.lineWrapping)&&Vo(this),st(this,"refresh",this)}),swapDoc:lr(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ua(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,rt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},Ft(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function ya(e,t,r,n,i){var o=t,a=r,l=x(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var ke=t.line+s;return ke<e.first||ke>=e.first+e.size?!1:(t=new M(ke,t.ch,t.sticky),l=x(e,ke))}function v(ke){var Le;if(n=="codepoint"){var Qe=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Qe)?Le=null:Le=new M(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Qe>=55296&&Qe<56320?2:1))),-r)}else i?Le=Ds(e.cm,l,t,r):Le=fa(l,t,r);if(Le==null)if(!ke&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=Le;return!0}if(n=="char"||n=="codepoint")v();else if(n=="column")v(!0);else if(n=="word"||n=="group")for(var g=null,O=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),H=!0;!(r<0&&!v(!H));H=!1){var Y=l.text.charAt(t.ch)||`
|
|
|
`,me=re(Y,w)?"w":O&&Y==`
|
|
|
`?"n":!O||/\s/.test(Y)?null:"p";if(O&&!H&&!me&&(me="s"),g&&g!=me){r<0&&(r=1,v(),t.sticky="after");break}if(me&&(g=me),r>0&&!v(!H))break}var Re=Do(e,t,o,a,!0);return Ve(o,Re)&&(Re.hitSide=!0),Re}function Hl(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Ei(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=jo(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var dn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};dn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;zl(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}U(i,"paste",function(l){!o(l)||pt(n,l)||Al(l,n)||P<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),U(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),U(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),U(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),U(i,"touchstart",function(){return r.forceCompositionEnd()}),U(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||pt(n,l))){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=$l(n);Wo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,ue),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Wr.text.join(`
|
|
|
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var v=Wl(),g=v.firstChild;n.display.lineSpace.insertBefore(v,n.display.lineSpace.firstChild),g.value=Wr.text.join(`
|
|
|
`);var O=document.activeElement;Fe(g),setTimeout(function(){n.display.lineSpace.removeChild(v),O.focus(),O==i&&r.showPrimarySelection()},50)}}U(i,"copy",a),U(i,"cut",a)},dn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},dn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},dn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},dn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},dn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=Ho(t,e.anchorNode,e.anchorOffset),a=Ho(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&K(Me(o,a),n)==0&&K(_e(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Zl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Zl(t,i);if(!u){var v=l[l.length-1].measure,g=v.maps?v.maps[v.maps.length-1]:v.map;u={node:g[g.length-1],offset:g[g.length-2]-g[g.length-3]}}if(!s||!u){e.removeAllRanges();return}var O=e.rangeCount&&e.getRangeAt(0),w;try{w=ze(s.node,s.offset,u.offset,u.node)}catch(H){}w&&(!E&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),O&&e.anchorNode==null?e.addRange(O):E&&this.startGracePeriod()),this.rememberSelection()}},dn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},dn.prototype.showMultipleSelections=function(e){B(this.cm.display.cursorDiv,e.cursors),B(this.cm.display.selectionDiv,e.selection)},dn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},dn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ze(this.div,t)},dn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},dn.prototype.blur=function(){this.div.blur()},dn.prototype.getField=function(){return this.div},dn.prototype.supportsTouch=function(){return!0},dn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():br(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},dn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},dn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(V&&q&&this.cm.display.gutterSpecs.length&&Js(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var r=Ho(t,e.anchorNode,e.anchorOffset),n=Ho(t,e.focusNode,e.focusOffset);r&&n&&br(t,function(){rr(t.doc,ti(r,n),ue),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},dn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=M(n.line-1,x(e.doc,n.line-1).length)),i.ch==x(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=M(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=hi(e,n.line))==0?(a=W(t.view[0].line),l=t.view[0].node):(a=W(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,v;if(s==t.view.length-1?(u=t.viewTo-1,v=t.lineDiv.lastChild):(u=W(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!l)return!1;for(var g=e.doc.splitLines(qs(e,l,v,a,u)),O=L(e.doc,M(a,0),M(u,x(e.doc,u).text.length));g.length>1&&O.length>1;)if(Je(g)==Je(O))g.pop(),O.pop(),u--;else if(g[0]==O[0])g.shift(),O.shift(),a++;else break;for(var w=0,H=0,Y=g[0],me=O[0],Re=Math.min(Y.length,me.length);w<Re&&Y.charCodeAt(w)==me.charCodeAt(w);)++w;for(var ke=Je(g),Le=Je(O),Qe=Math.min(ke.length-(g.length==1?w:0),Le.length-(O.length==1?w:0));H<Qe&&ke.charCodeAt(ke.length-H-1)==Le.charCodeAt(Le.length-H-1);)++H;if(g.length==1&&O.length==1&&a==n.line)for(;w&&w>n.ch&&ke.charCodeAt(ke.length-H-1)==Le.charCodeAt(Le.length-H-1);)w--,H++;g[g.length-1]=ke.slice(0,ke.length-H).replace(/^\u200b+/,""),g[0]=g[0].slice(w).replace(/\u200b+$/,"");var wt=M(a,w),vt=M(u,O.length?Je(O).length-H:0);if(g.length>1||g[0]||K(wt,vt))return Di(e.doc,g,wt,vt,"+input"),!0},dn.prototype.ensurePolled=function(){this.forceCompositionEnd()},dn.prototype.reset=function(){this.forceCompositionEnd()},dn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},dn.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},dn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&br(this.cm,function(){return fr(e.cm)})},dn.prototype.setUneditable=function(e){e.contentEditable="false"},dn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},dn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},dn.prototype.onContextMenu=function(){},dn.prototype.resetPosition=function(){},dn.prototype.needsContentAttribute=!0;function Zl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=x(e.doc,t.line),i=ji(r,n,t.line),o=Ne(n,e.doc.direction),a="left";if(o){var l=Pe(o,t.ch);a=l%2?"right":"left"}var s=Gi(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function zi(e,t){return t&&(e.bad=!0),e}function qs(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(w){return function(H){return H.id==w}}function v(){a&&(o+=l,s&&(o+=l),a=s=!1)}function g(w){w&&(v(),o+=w)}function O(w){if(w.nodeType==1){var H=w.getAttribute("cm-text");if(H){g(H);return}var Y=w.getAttribute("cm-marker"),me;if(Y){var Re=e.findMarks(M(n,0),M(i+1,0),u(+Y));Re.length&&(me=Re[0].find(0))&&g(L(e.doc,me.from,me.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var ke=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;ke&&v();for(var Le=0;Le<w.childNodes.length;Le++)O(w.childNodes[Le]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),ke&&(a=!0)}else w.nodeType==3&&g(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;O(t),t!=r;)t=t.nextSibling,s=!1;return o}function Ho(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return zi(e.clipPos(M(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return eu(o,t,r)}}function eu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!Ze(n,t))return zi(M(W(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Je(e.rest):e.line;return zi(M(W(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,u=s.maps;function v(me,Re,ke){for(var Le=-1;Le<(u?u.length:0);Le++)for(var Qe=Le<0?s.map:u[Le],wt=0;wt<Qe.length;wt+=3){var vt=Qe[wt+2];if(vt==me||vt==Re){var jt=W(Le<0?e.line:e.rest[Le]),Sn=Qe[wt]+ke;return(ke<0||vt!=me)&&(Sn=Qe[wt+(ke?1:0)]),M(jt,Sn)}}}var g=v(a,l,r);if(g)return zi(g,i);for(var O=l.nextSibling,w=a?a.nodeValue.length-r:0;O;O=O.nextSibling){if(g=v(O,O.firstChild,0),g)return zi(M(g.line,g.ch-w),i);w+=O.textContent.length}for(var H=l.previousSibling,Y=r;H;H=H.previousSibling){if(g=v(H,H.firstChild,-1),g)return zi(M(g.line,g.ch+Y),i);Y+=H.textContent.length}}var zn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};zn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Ee&&(i.style.width="0px"),U(i,"input",function(){p&&P>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),U(i,"paste",function(a){pt(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!pt(n,a)){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=$l(n);Wo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,ue):(r.prevInput="",i.value=l.text.join(`
|
|
|
`),Fe(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}U(i,"cut",o),U(i,"copy",o),U(e.scroller,"paste",function(a){if(!($r(e,a)||pt(n,a))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),U(e.lineSpace,"selectstart",function(a){$r(e,a)||$t(a)}),U(i,"compositionstart",function(){var a=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:a,range:n.markText(a,n.getCursor("to"),{className:"CodeMirror-composing"})}}),U(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},zn.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},zn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=yr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},zn.prototype.showSelection=function(e){var t=this.cm,r=t.display;B(r.cursorDiv,e.cursors),B(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},zn.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Fe(this.textarea),p&&P>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",p&&P>=9&&(this.hasSelection=null))}},zn.prototype.getField=function(){return this.textarea},zn.prototype.supportsTouch=function(){return!1},zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Xe||ge()!=this.textarea))try{this.textarea.focus()}catch(e){}},zn.prototype.blur=function(){this.textarea.blur()},zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},zn.prototype.receivedFocus=function(){this.slowPoll()},zn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},zn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},zn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||wn(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(p&&P>=9&&this.hasSelection===i||et&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return br(t,function(){ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},zn.prototype.onKeyPress=function(){p&&P>=9&&(this.hasSelection=null),this.fastPoll()},zn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||b)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),ue);var s=i.style.cssText,u=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
|
|
|
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;T&&(g=window.scrollY),n.input.focus(),T&&window.scrollTo(null,g),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function O(){if(i.selectionStart!=null){var Y=r.somethingSelected(),me="\u200B"+(Y?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=Y?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,p&&P<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&P<9)&&O();var Y=0,me=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):Y++<10?n.detectingSelectAll=setTimeout(me,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(me,200)}}if(p&&P>=9&&O(),m){sn(e);var H=function(){He(window,"mouseup",H),setTimeout(w,20)};U(window,"mouseup",H)}else setTimeout(w,50)},zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},zn.prototype.setUneditable=function(){},zn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?_(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 r=ge();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(U(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=n,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,n(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(He(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=He,e.on=U,e.wheelEventPixels=us,e.Doc=dr,e.splitLines=In,e.countColumn=ae,e.findColumn=xt,e.isWordChar=G,e.Pass=Te,e.signal=st,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=M,e.cmpPos=K,e.modes=Fn,e.mimeModes=Hn,e.resolveMode=Jt,e.getMode=nt,e.modeExtensions=_t,e.extendMode=y,e.copyState=D,e.startState=h,e.innerMode=z,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ps,e.StringStream=d,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=$t,e.e_stopPropagation=en,e.e_stop=sn,e.addClass=dt,e.contains=Ze,e.rmClass=S,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Zo in dr.prototype)dr.prototype.hasOwnProperty(Zo)&&k(ru,Zo)<0&&(Rn.prototype[Zo]=function(e){return function(){return e.apply(this.doc,arguments)}}(dr.prototype[Zo]));return Ft(dr),Rn.inputStyles={textarea:zn,contenteditable:dn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),or.apply(this,arguments)},Rn.defineMIME=gr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){dr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{BaseInput:function(){return b},default:function(){return Lt}});var E=f(54476),J=f(33885),C=f(20068),j=f(76190),p=f(92310),P=f.n(p),T=f(59301),ye=f(5643),q=function(F){var m,c,S=F.inputElement,I=F.prefixCls,B=F.prefix,R=F.suffix,ne=F.addonBefore,ze=F.addonAfter,Ze=F.className,ge=F.style,dt=F.disabled,Ge=F.readOnly,Fe=F.focused,le=F.triggerFocus,_=F.allowClear,ae=F.value,X=F.handleReset,k=F.hidden,We=F.classes,Te=F.classNames,ue=F.dataAttrs,Ie=F.styles,fe=F.components,xt=(fe==null?void 0:fe.affixWrapper)||"span",Dt=(fe==null?void 0:fe.groupWrapper)||"span",Ct=(fe==null?void 0:fe.wrapper)||"span",Je=(fe==null?void 0:fe.groupAddon)||"span",It=(0,T.useRef)(null),it=function(he){var Pe;(Pe=It.current)!==null&&Pe!==void 0&&Pe.contains(he.target)&&(le==null||le())},A=function(){var he;if(!_)return null;var Pe=!dt&&!Ge&&ae,we="".concat(I,"-clear-icon"),Ne=(0,j.Z)(_)==="object"&&_!==null&&_!==void 0&&_.clearIcon?_.clearIcon:"\u2716";return T.createElement("span",{onClick:X,onMouseDown:function(U){return U.preventDefault()},className:P()(we,(he={},(0,C.Z)(he,"".concat(we,"-hidden"),!Pe),(0,C.Z)(he,"".concat(we,"-has-suffix"),!!R),he)),role:"button",tabIndex:-1},Ne)},Ce=(0,T.cloneElement)(S,{value:ae,hidden:k,className:P()((m=S.props)===null||m===void 0?void 0:m.className,!(0,ye.X3)(F)&&!(0,ye.He)(F)&&Ze)||null,style:(0,J.Z)((0,J.Z)({},(c=S.props)===null||c===void 0?void 0:c.style),!(0,ye.X3)(F)&&!(0,ye.He)(F)?ge:{})});if((0,ye.X3)(F)){var se,G="".concat(I,"-affix-wrapper"),re=P()(G,(se={},(0,C.Z)(se,"".concat(G,"-disabled"),dt),(0,C.Z)(se,"".concat(G,"-focused"),Fe),(0,C.Z)(se,"".concat(G,"-readonly"),Ge),(0,C.Z)(se,"".concat(G,"-input-with-clear-btn"),R&&_&&ae),se),!(0,ye.He)(F)&&Ze,We==null?void 0:We.affixWrapper,Te==null?void 0:Te.affixWrapper),de=(R||_)&&T.createElement("span",{className:P()("".concat(I,"-suffix"),Te==null?void 0:Te.suffix),style:Ie==null?void 0:Ie.suffix},A(),R);Ce=T.createElement(xt,(0,E.Z)({className:re,style:(0,J.Z)((0,J.Z)({},(0,ye.He)(F)?void 0:ge),Ie==null?void 0:Ie.affixWrapper),hidden:!(0,ye.He)(F)&&k,onClick:it},ue==null?void 0:ue.affixWrapper,{ref:It}),B&&T.createElement("span",{className:P()("".concat(I,"-prefix"),Te==null?void 0:Te.prefix),style:Ie==null?void 0:Ie.prefix},B),(0,T.cloneElement)(S,{value:ae,hidden:null}),de)}if((0,ye.He)(F)){var Se="".concat(I,"-group"),ce="".concat(Se,"-addon"),De=P()("".concat(I,"-wrapper"),Se,We==null?void 0:We.wrapper),ee=P()("".concat(I,"-group-wrapper"),Ze,We==null?void 0:We.group);return T.createElement(Dt,{className:ee,style:ge,hidden:k},T.createElement(Ct,{className:De},ne&&T.createElement(Je,{className:ce},ne),(0,T.cloneElement)(Ce,{hidden:null}),ze&&T.createElement(Je,{className:ce},ze)))}return Ce},b=q,be=f(94480),N=f(42978),ve=f(75931),Ee=f(18929),V=f(2738),Xe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],et=(0,T.forwardRef)(function(Z,F){var m=Z.autoComplete,c=Z.onChange,S=Z.onFocus,I=Z.onBlur,B=Z.onPressEnter,R=Z.onKeyDown,ne=Z.prefixCls,ze=ne===void 0?"rc-input":ne,Ze=Z.disabled,ge=Z.htmlSize,dt=Z.className,Ge=Z.maxLength,Fe=Z.suffix,le=Z.showCount,_=Z.type,ae=_===void 0?"text":_,X=Z.classes,k=Z.classNames,We=Z.styles,Te=(0,ve.Z)(Z,Xe),ue=(0,Ee.Z)(Z.defaultValue,{value:Z.value}),Ie=(0,N.Z)(ue,2),fe=Ie[0],xt=Ie[1],Dt=(0,T.useState)(!1),Ct=(0,N.Z)(Dt,2),Je=Ct[0],It=Ct[1],it=(0,T.useRef)(null),A=function(ee){it.current&&(0,ye.nH)(it.current,ee)};(0,T.useImperativeHandle)(F,function(){return{focus:A,blur:function(){var ee;(ee=it.current)===null||ee===void 0||ee.blur()},setSelectionRange:function(ee,Be,he){var Pe;(Pe=it.current)===null||Pe===void 0||Pe.setSelectionRange(ee,Be,he)},select:function(){var ee;(ee=it.current)===null||ee===void 0||ee.select()},input:it.current}}),(0,T.useEffect)(function(){It(function(De){return De&&Ze?!1:De})},[Ze]);var Ce=function(ee){Z.value===void 0&&xt(ee.target.value),it.current&&(0,ye.rJ)(it.current,ee,c)},se=function(ee){B&&ee.key==="Enter"&&B(ee),R==null||R(ee)},G=function(ee){It(!0),S==null||S(ee)},re=function(ee){It(!1),I==null||I(ee)},de=function(ee){xt(""),A(),it.current&&(0,ye.rJ)(it.current,ee,c)},Se=function(){var ee=(0,V.Z)(Z,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return T.createElement("input",(0,E.Z)({autoComplete:m},ee,{onChange:Ce,onFocus:G,onBlur:re,onKeyDown:se,className:P()(ze,(0,C.Z)({},"".concat(ze,"-disabled"),Ze),k==null?void 0:k.input),style:We==null?void 0:We.input,ref:it,size:ge,type:ae}))},ce=function(){var ee=Number(Ge)>0;if(Fe||le){var Be=(0,ye.D7)(fe),he=(0,be.Z)(Be).length,Pe=(0,j.Z)(le)==="object"?le.formatter({value:Be,count:he,maxLength:Ge}):"".concat(he).concat(ee?" / ".concat(Ge):"");return T.createElement(T.Fragment,null,!!le&&T.createElement("span",{className:P()("".concat(ze,"-show-count-suffix"),(0,C.Z)({},"".concat(ze,"-show-count-has-suffix"),!!Fe),k==null?void 0:k.count),style:(0,J.Z)({},We==null?void 0:We.count)},Pe),Fe)}return null};return T.createElement(b,(0,E.Z)({},Te,{prefixCls:ze,className:dt,inputElement:Se(),handleReset:de,value:(0,ye.D7)(fe),focused:Je,triggerFocus:A,suffix:ce(),disabled:Ze,classes:X,classNames:k,styles:We}))}),yt=et,Lt=yt},5643:function(nn,xe,f){"use strict";f.d(xe,{D7:function(){return p},He:function(){return E},X3:function(){return J},nH:function(){return j},rJ:function(){return C}});function E(P){return!!(P.addonBefore||P.addonAfter)}function J(P){return!!(P.prefix||P.suffix||P.allowClear)}function C(P,T,ye,q){if(ye){var b=T;if(T.type==="click"){var be=P.cloneNode(!0);b=Object.create(T,{target:{value:be},currentTarget:{value:be}}),be.value="",ye(b);return}if(q!==void 0){b=Object.create(T,{target:{value:P},currentTarget:{value:P}}),P.value=q,ye(b);return}ye(b)}}function j(P,T){if(P){P.focus(T);var ye=T||{},q=ye.cursor;if(q){var b=P.value.length;switch(q){case"start":P.setSelectionRange(0,0);break;case"end":P.setSelectionRange(b,b);break;default:P.setSelectionRange(0,b)}}}}function p(P){return typeof P=="undefined"||P===null?"":String(P)}},83836:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return le}});var E=f(54476),J=f(33885),C=f(42978),j=f(75931),p=f(59301),P=f(92310),T=f.n(P),ye=f(29301),q=f(34280),b=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],be=void 0;function N(_,ae){var X=_.prefixCls,k=_.invalidate,We=_.item,Te=_.renderItem,ue=_.responsive,Ie=_.responsiveDisabled,fe=_.registerSize,xt=_.itemKey,Dt=_.className,Ct=_.style,Je=_.children,It=_.display,it=_.order,A=_.component,Ce=A===void 0?"div":A,se=(0,j.Z)(_,b),G=ue&&!It;function re(ee){fe(xt,ee)}p.useEffect(function(){return function(){re(null)}},[]);var de=Te&&We!==be?Te(We,{index:it}):Je,Se;k||(Se={opacity:G?0:1,height:G?0:be,overflowY:G?"hidden":be,order:ue?it:be,pointerEvents:G?"none":be,position:G?"absolute":be});var ce={};G&&(ce["aria-hidden"]=!0);var De=p.createElement(Ce,(0,E.Z)({className:T()(!k&&X,Dt),style:(0,J.Z)((0,J.Z)({},Se),Ct)},ce,se,{ref:ae}),de);return ue&&(De=p.createElement(ye.Z,{onResize:function(Be){var he=Be.offsetWidth;re(he)},disabled:Ie},De)),De}var ve=p.forwardRef(N);ve.displayName="Item";var Ee=ve,V=f(6089),Xe=f(4676),et=f(16089);function yt(_){if(typeof MessageChannel=="undefined")(0,et.Z)(_);else{var ae=new MessageChannel;ae.port1.onmessage=function(){return _()},ae.port2.postMessage(void 0)}}function Lt(){var _=p.useRef(null),ae=function(k){_.current||(_.current=[],yt(function(){(0,Xe.unstable_batchedUpdates)(function(){_.current.forEach(function(We){We()}),_.current=null})})),_.current.push(k)};return ae}function Z(_,ae){var X=p.useState(ae),k=(0,C.Z)(X,2),We=k[0],Te=k[1],ue=(0,V.Z)(function(Ie){_(function(){Te(Ie)})});return[We,ue]}var F=p.createContext(null),m=["component"],c=["className"],S=["className"],I=function(ae,X){var k=p.useContext(F);if(!k){var We=ae.component,Te=We===void 0?"div":We,ue=(0,j.Z)(ae,m);return p.createElement(Te,(0,E.Z)({},ue,{ref:X}))}var Ie=k.className,fe=(0,j.Z)(k,c),xt=ae.className,Dt=(0,j.Z)(ae,S);return p.createElement(F.Provider,{value:null},p.createElement(Ee,(0,E.Z)({ref:X,className:T()(Ie,xt)},fe,Dt)))},B=p.forwardRef(I);B.displayName="RawItem";var R=B,ne=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],ze="responsive",Ze="invalidate";function ge(_){return"+ ".concat(_.length," ...")}function dt(_,ae){var X=_.prefixCls,k=X===void 0?"rc-overflow":X,We=_.data,Te=We===void 0?[]:We,ue=_.renderItem,Ie=_.renderRawItem,fe=_.itemKey,xt=_.itemWidth,Dt=xt===void 0?10:xt,Ct=_.ssr,Je=_.style,It=_.className,it=_.maxCount,A=_.renderRest,Ce=_.renderRawRest,se=_.prefix,G=_.suffix,re=_.component,de=re===void 0?"div":re,Se=_.itemComponent,ce=_.onVisibleChange,De=(0,j.Z)(_,ne),ee=Ct==="full",Be=Lt(),he=Z(Be,null),Pe=(0,C.Z)(he,2),we=Pe[0],Ne=Pe[1],Ke=we||0,U=Z(Be,new Map),tt=(0,C.Z)(U,2),He=tt[0],st=tt[1],pt=Z(Be,0),rn=(0,C.Z)(pt,2),Kt=rn[0],Ft=rn[1],$t=Z(Be,0),en=(0,C.Z)($t,2),Ut=en[0],sn=en[1],Cn=Z(Be,0),fn=(0,C.Z)(Cn,2),An=fn[0],Wn=fn[1],xn=Z(Be,0),Pn=(0,C.Z)(xn,2),vn=Pn[0],In=Pn[1],wn=(0,p.useState)(null),pn=(0,C.Z)(wn,2),Dn=pn[0],on=pn[1],Fn=(0,p.useState)(null),Hn=(0,C.Z)(Fn,2),or=Hn[0],gr=Hn[1],Jt=p.useMemo(function(){return or===null&&ee?Number.MAX_SAFE_INTEGER:or||0},[or,we]),nt=(0,p.useState)(!1),_t=(0,C.Z)(nt,2),y=_t[0],D=_t[1],z="".concat(k,"-item"),h=Math.max(Kt,Ut),d=it===ze,x=Te.length&&d,L=it===Ze,te=x||typeof it=="number"&&Te.length>it,$=(0,p.useMemo)(function(){var Oe=Te;return x?we===null&&ee?Oe=Te:Oe=Te.slice(0,Math.min(Te.length,Ke/Dt)):typeof it=="number"&&(Oe=Te.slice(0,it)),Oe},[Te,Dt,we,it,x]),W=(0,p.useMemo)(function(){return x?Te.slice(Jt+1):Te.slice($.length)},[Te,$,x,Jt]),ie=(0,p.useCallback)(function(Oe,je){var at;return typeof fe=="function"?fe(Oe):(at=fe&&(Oe==null?void 0:Oe[fe]))!==null&&at!==void 0?at:je},[fe]),oe=(0,p.useCallback)(ue||function(Oe){return Oe},[ue]);function Ae(Oe,je,at){or===Oe&&(je===void 0||je===Dn)||(gr(Oe),at||(D(Oe<Te.length-1),ce==null||ce(Oe)),je!==void 0&&on(je))}function M(Oe,je){Ne(je.clientWidth)}function K(Oe,je){st(function(at){var ft=new Map(at);return je===null?ft.delete(Oe):ft.set(Oe,je),ft})}function Ve(Oe,je){sn(je),Ft(Ut)}function pe(Oe,je){Wn(je)}function _e(Oe,je){In(je)}function Me(Oe){return He.get(ie($[Oe],Oe))}(0,q.Z)(function(){if(Ke&&typeof h=="number"&&$){var Oe=An+vn,je=$.length,at=je-1;if(!je){Ae(0,null);return}for(var ft=0;ft<je;ft+=1){var Ht=Me(ft);if(ee&&(Ht=Ht||0),Ht===void 0){Ae(ft-1,void 0,!0);break}if(Oe+=Ht,at===0&&Oe<=Ke||ft===at-1&&Oe+Me(at)<=Ke){Ae(at,null);break}else if(Oe+h>Ke){Ae(ft-1,Oe-Ht-vn+Ut);break}}G&&Me(0)+vn>Ke&&on(null)}},[Ke,He,Ut,An,vn,ie,$]);var ot=y&&!!W.length,Q={};Dn!==null&&x&&(Q={position:"absolute",left:Dn,top:0});var Ye={prefixCls:z,responsive:x,component:Se,invalidate:L},gt=Ie?function(Oe,je){var at=ie(Oe,je);return p.createElement(F.Provider,{key:at,value:(0,J.Z)((0,J.Z)({},Ye),{},{order:je,item:Oe,itemKey:at,registerSize:K,display:je<=Jt})},Ie(Oe,je))}:function(Oe,je){var at=ie(Oe,je);return p.createElement(Ee,(0,E.Z)({},Ye,{order:je,key:at,item:Oe,renderItem:oe,itemKey:at,registerSize:K,display:je<=Jt}))},Mt={order:ot?Jt:Number.MAX_SAFE_INTEGER,className:"".concat(z,"-rest"),registerSize:Ve,display:ot},qe=A||ge,ht=Ce?p.createElement(F.Provider,{value:(0,J.Z)((0,J.Z)({},Ye),Mt)},Ce(W)):p.createElement(Ee,(0,E.Z)({},Ye,Mt),typeof qe=="function"?qe(W):qe),zt=p.createElement(de,(0,E.Z)({className:T()(!L&&k,It),style:Je,ref:ae},De),se&&p.createElement(Ee,(0,E.Z)({},Ye,{responsive:d,responsiveDisabled:!x,order:-1,className:"".concat(z,"-prefix"),registerSize:pe,display:!0}),se),$.map(gt),te?ht:null,G&&p.createElement(Ee,(0,E.Z)({},Ye,{responsive:d,responsiveDisabled:!x,order:Jt,className:"".concat(z,"-suffix"),registerSize:_e,display:!0,style:Q}),G));return d?p.createElement(ye.Z,{onResize:M,disabled:!x},zt):zt}var Ge=p.forwardRef(dt);Ge.displayName="Overflow",Ge.Item=R,Ge.RESPONSIVE=ze,Ge.INVALIDATE=Ze;var Fe=Ge,le=Fe},17115:function(nn,xe,f){"use strict";f.d(xe,{ZP:function(){return T}});var E=f(42978),J=f(59301),C=f(47273),j=0,p=(0,C.Z)();function P(){var ye;return p?(ye=j,j+=1):ye="TEST_OR_SSR",ye}function T(ye){var q=J.useState(),b=(0,E.Z)(q,2),be=b[0],N=b[1];return J.useEffect(function(){N("rc_select_".concat(P()))},[]),ye||be}},77861:function(nn,xe,f){"use strict";f.d(xe,{Ac:function(){return we},Xo:function(){return Ut},Wx:function(){return Cn},ZP:function(){return z},lk:function(){return F}});var E=f(54476),J=f(94480),C=f(20068),j=f(33885),p=f(42978),P=f(75931),T=f(76190),ye=f(18929),q=f(48736),b=f(59301),be=f(92310),N=f.n(be),ve=f(34280),Ee=f(49658),V=f(10228),Xe=f(8654),et=function(d){var x=d.className,L=d.customizeIcon,te=d.customizeIconProps,$=d.onMouseDown,W=d.onClick,ie=d.children,oe;return typeof L=="function"?oe=L(te):oe=L,b.createElement("span",{className:x,onMouseDown:function(M){M.preventDefault(),$&&$(M)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:W,"aria-hidden":!0},oe!==void 0?oe:b.createElement("span",{className:N()(x.split(/\s+/).map(function(Ae){return"".concat(Ae,"-icon")}))},ie))},yt=et;function Lt(h,d,x,L,te){var $=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,W=arguments.length>6?arguments[6]:void 0,ie=arguments.length>7?arguments[7]:void 0,oe=b.useMemo(function(){if((0,T.Z)(L)==="object")return L.clearIcon;if(te)return te},[L,te]),Ae=b.useMemo(function(){return!!(!$&&L&&(x.length||W)&&!(ie==="combobox"&&W===""))},[L,$,x.length,W,ie]);return{allowClear:Ae,clearIcon:b.createElement(yt,{className:"".concat(h,"-clear"),onMouseDown:d,customizeIcon:oe},"\xD7")}}var Z=b.createContext(null);function F(){return b.useContext(Z)}function m(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,d=b.useState(!1),x=(0,p.Z)(d,2),L=x[0],te=x[1],$=b.useRef(null),W=function(){window.clearTimeout($.current)};b.useEffect(function(){return W},[]);var ie=function(Ae,M){W(),$.current=window.setTimeout(function(){te(Ae),M&&M()},h)};return[L,ie,W]}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,d=b.useRef(null),x=b.useRef(null);b.useEffect(function(){return function(){window.clearTimeout(x.current)}},[]);function L(te){(te||d.current===null)&&(d.current=te),window.clearTimeout(x.current),x.current=window.setTimeout(function(){d.current=null},h)}return[function(){return d.current},L]}function S(h,d,x,L){var te=b.useRef(null);te.current={open:d,triggerOpen:x,customizedTrigger:L},b.useEffect(function(){function $(W){var ie;if(!((ie=te.current)!==null&&ie!==void 0&&ie.customizedTrigger)){var oe=W.target;oe.shadowRoot&&W.composed&&(oe=W.composedPath()[0]||oe),te.current.open&&h().filter(function(Ae){return Ae}).every(function(Ae){return!Ae.contains(oe)&&Ae!==oe})&&te.current.triggerOpen(!1)}}return window.addEventListener("mousedown",$),function(){return window.removeEventListener("mousedown",$)}},[])}var I=f(26112),B=f(83836),R=function(d,x){var L,te,$=d.prefixCls,W=d.id,ie=d.inputElement,oe=d.disabled,Ae=d.tabIndex,M=d.autoFocus,K=d.autoComplete,Ve=d.editable,pe=d.activeDescendantId,_e=d.value,Me=d.maxLength,ot=d.onKeyDown,Q=d.onMouseDown,Ye=d.onChange,gt=d.onPaste,Mt=d.onCompositionStart,qe=d.onCompositionEnd,ht=d.open,zt=d.attrs,Oe=ie||b.createElement("input",null),je=Oe,at=je.ref,ft=je.props,Ht=ft.onKeyDown,kt=ft.onChange,Gt=ft.onMouseDown,Vt=ft.onCompositionStart,Tt=ft.onCompositionEnd,Et=ft.style;return(0,q.Kp)(!("maxLength"in Oe.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Oe=b.cloneElement(Oe,(0,j.Z)((0,j.Z)((0,j.Z)({type:"search"},ft),{},{id:W,ref:(0,Xe.sQ)(x,at),disabled:oe,tabIndex:Ae,autoComplete:K||"off",autoFocus:M,className:N()("".concat($,"-selection-search-input"),(L=Oe)===null||L===void 0||(te=L.props)===null||te===void 0?void 0:te.className),role:"combobox","aria-label":"Search","aria-expanded":ht||!1,"aria-haspopup":"listbox","aria-owns":"".concat(W,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(W,"_list"),"aria-activedescendant":ht?pe:void 0},zt),{},{value:Ve?_e:"",maxLength:Me,readOnly:!Ve,unselectable:Ve?null:"on",style:(0,j.Z)((0,j.Z)({},Et),{},{opacity:Ve?null:0}),onKeyDown:function(Ot){ot(Ot),Ht&&Ht(Ot)},onMouseDown:function(Ot){Q(Ot),Gt&&Gt(Ot)},onChange:function(Ot){Ye(Ot),kt&&kt(Ot)},onCompositionStart:function(Ot){Mt(Ot),Vt&&Vt(Ot)},onCompositionEnd:function(Ot){qe(Ot),Tt&&Tt(Ot)},onPaste:gt})),Oe},ne=b.forwardRef(R);ne.displayName="Input";var ze=ne;function Ze(h){return Array.isArray(h)?h:h!==void 0?[h]:[]}var ge=typeof window!="undefined"&&window.document&&window.document.documentElement,dt=ge;function Ge(h){return h!=null}function Fe(h){return!h&&h!==0}function le(h){return["string","number"].includes((0,T.Z)(h))}function _(h){var d=void 0;return h&&(le(h.title)?d=h.title.toString():le(h.label)&&(d=h.label.toString())),d}function ae(h,d){dt?b.useLayoutEffect(h,d):b.useEffect(h,d)}function X(h){var d;return(d=h.key)!==null&&d!==void 0?d:h.value}var k=function(d){d.preventDefault(),d.stopPropagation()},We=function(d){var x=d.id,L=d.prefixCls,te=d.values,$=d.open,W=d.searchValue,ie=d.autoClearSearchValue,oe=d.inputRef,Ae=d.placeholder,M=d.disabled,K=d.mode,Ve=d.showSearch,pe=d.autoFocus,_e=d.autoComplete,Me=d.activeDescendantId,ot=d.tabIndex,Q=d.removeIcon,Ye=d.maxTagCount,gt=d.maxTagTextLength,Mt=d.maxTagPlaceholder,qe=Mt===void 0?function(At){return"+ ".concat(At.length," ...")}:Mt,ht=d.tagRender,zt=d.onToggleOpen,Oe=d.onRemove,je=d.onInputChange,at=d.onInputPaste,ft=d.onInputKeyDown,Ht=d.onInputMouseDown,kt=d.onInputCompositionStart,Gt=d.onInputCompositionEnd,Vt=b.useRef(null),Tt=(0,b.useState)(0),Et=(0,p.Z)(Tt,2),Wt=Et[0],Ot=Et[1],cn=(0,b.useState)(!1),Nt=(0,p.Z)(cn,2),Zt=Nt[0],an=Nt[1],Xt="".concat(L,"-selection"),En=$||K==="multiple"&&ie===!1||K==="tags"?W:"",Un=K==="tags"||K==="multiple"&&ie===!1||Ve&&($||Zt);ae(function(){Ot(Vt.current.scrollWidth)},[En]);function Rt(At,ln,gn,mn,Ln){return b.createElement("span",{className:N()("".concat(Xt,"-item"),(0,C.Z)({},"".concat(Xt,"-item-disabled"),gn)),title:_(At)},b.createElement("span",{className:"".concat(Xt,"-item-content")},ln),mn&&b.createElement(yt,{className:"".concat(Xt,"-item-remove"),onMouseDown:k,onClick:Ln,customizeIcon:Q},"\xD7"))}function lt(At,ln,gn,mn,Ln){var Ue=function(mt){k(mt),zt(!$)};return b.createElement("span",{onMouseDown:Ue},ht({label:ln,value:At,disabled:gn,closable:mn,onClose:Ln}))}function ut(At){var ln=At.disabled,gn=At.label,mn=At.value,Ln=!M&&!ln,Ue=gn;if(typeof gt=="number"&&(typeof gn=="string"||typeof gn=="number")){var $e=String(Ue);$e.length>gt&&(Ue="".concat($e.slice(0,gt),"..."))}var mt=function(hn){hn&&hn.stopPropagation(),Oe(At)};return typeof ht=="function"?lt(mn,Ue,ln,Ln,mt):Rt(At,Ue,ln,Ln,mt)}function qt(At){var ln=typeof qe=="function"?qe(At):qe;return Rt({title:ln},ln,!1)}var tn=b.createElement("div",{className:"".concat(Xt,"-search"),style:{width:Wt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},b.createElement(ze,{ref:oe,open:$,prefixCls:L,id:x,inputElement:null,disabled:M,autoFocus:pe,autoComplete:_e,editable:Un,activeDescendantId:Me,value:En,onKeyDown:ft,onMouseDown:Ht,onChange:je,onPaste:at,onCompositionStart:kt,onCompositionEnd:Gt,tabIndex:ot,attrs:(0,I.Z)(d,!0)}),b.createElement("span",{ref:Vt,className:"".concat(Xt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Yt=b.createElement(B.Z,{prefixCls:"".concat(Xt,"-overflow"),data:te,renderItem:ut,renderRest:qt,suffix:tn,itemKey:X,maxCount:Ye});return b.createElement(b.Fragment,null,Yt,!te.length&&!En&&b.createElement("span",{className:"".concat(Xt,"-placeholder")},Ae))},Te=We,ue=function(d){var x=d.inputElement,L=d.prefixCls,te=d.id,$=d.inputRef,W=d.disabled,ie=d.autoFocus,oe=d.autoComplete,Ae=d.activeDescendantId,M=d.mode,K=d.open,Ve=d.values,pe=d.placeholder,_e=d.tabIndex,Me=d.showSearch,ot=d.searchValue,Q=d.activeValue,Ye=d.maxLength,gt=d.onInputKeyDown,Mt=d.onInputMouseDown,qe=d.onInputChange,ht=d.onInputPaste,zt=d.onInputCompositionStart,Oe=d.onInputCompositionEnd,je=d.title,at=b.useState(!1),ft=(0,p.Z)(at,2),Ht=ft[0],kt=ft[1],Gt=M==="combobox",Vt=Gt||Me,Tt=Ve[0],Et=ot||"";Gt&&Q&&!Ht&&(Et=Q),b.useEffect(function(){Gt&&kt(!1)},[Gt,Q]);var Wt=M!=="combobox"&&!K&&!Me?!1:!!Et,Ot=je===void 0?_(Tt):je,cn=function(){if(Tt)return null;var Zt=Wt?{visibility:"hidden"}:void 0;return b.createElement("span",{className:"".concat(L,"-selection-placeholder"),style:Zt},pe)};return b.createElement(b.Fragment,null,b.createElement("span",{className:"".concat(L,"-selection-search")},b.createElement(ze,{ref:$,prefixCls:L,id:te,open:K,inputElement:x,disabled:W,autoFocus:ie,autoComplete:oe,editable:Vt,activeDescendantId:Ae,value:Et,onKeyDown:gt,onMouseDown:Mt,onChange:function(Zt){kt(!0),qe(Zt)},onPaste:ht,onCompositionStart:zt,onCompositionEnd:Oe,tabIndex:_e,attrs:(0,I.Z)(d,!0),maxLength:Gt?Ye:void 0})),!Gt&&Tt?b.createElement("span",{className:"".concat(L,"-selection-item"),title:Ot,style:Wt?{visibility:"hidden"}:void 0},Tt.label):null,cn())},Ie=ue;function fe(h){return![V.Z.ESC,V.Z.SHIFT,V.Z.BACKSPACE,V.Z.TAB,V.Z.WIN_KEY,V.Z.ALT,V.Z.META,V.Z.WIN_KEY_RIGHT,V.Z.CTRL,V.Z.SEMICOLON,V.Z.EQUALS,V.Z.CAPS_LOCK,V.Z.CONTEXT_MENU,V.Z.F1,V.Z.F2,V.Z.F3,V.Z.F4,V.Z.F5,V.Z.F6,V.Z.F7,V.Z.F8,V.Z.F9,V.Z.F10,V.Z.F11,V.Z.F12].includes(h)}var xt=function(d,x){var L=(0,b.useRef)(null),te=(0,b.useRef)(!1),$=d.prefixCls,W=d.open,ie=d.mode,oe=d.showSearch,Ae=d.tokenWithEnter,M=d.autoClearSearchValue,K=d.onSearch,Ve=d.onSearchSubmit,pe=d.onToggleOpen,_e=d.onInputKeyDown,Me=d.domRef;b.useImperativeHandle(x,function(){return{focus:function(){L.current.focus()},blur:function(){L.current.blur()}}});var ot=c(0),Q=(0,p.Z)(ot,2),Ye=Q[0],gt=Q[1],Mt=function(Et){var Wt=Et.which;(Wt===V.Z.UP||Wt===V.Z.DOWN)&&Et.preventDefault(),_e&&_e(Et),Wt===V.Z.ENTER&&ie==="tags"&&!te.current&&!W&&(Ve==null||Ve(Et.target.value)),fe(Wt)&&pe(!0)},qe=function(){gt(!0)},ht=(0,b.useRef)(null),zt=function(Et){K(Et,!0,te.current)!==!1&&pe(!0)},Oe=function(){te.current=!0},je=function(Et){te.current=!1,ie!=="combobox"&&zt(Et.target.value)},at=function(Et){var Wt=Et.target.value;if(Ae&&ht.current&&/[\r\n]/.test(ht.current)){var Ot=ht.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Wt=Wt.replace(Ot,ht.current)}ht.current=null,zt(Wt)},ft=function(Et){var Wt=Et.clipboardData,Ot=Wt.getData("text");ht.current=Ot},Ht=function(Et){var Wt=Et.target;if(Wt!==L.current){var Ot=document.body.style.msTouchAction!==void 0;Ot?setTimeout(function(){L.current.focus()}):L.current.focus()}},kt=function(Et){var Wt=Ye();Et.target!==L.current&&!Wt&&ie!=="combobox"&&Et.preventDefault(),(ie!=="combobox"&&(!oe||!Wt)||!W)&&(W&&M!==!1&&K("",!0,!1),pe())},Gt={inputRef:L,onInputKeyDown:Mt,onInputMouseDown:qe,onInputChange:at,onInputPaste:ft,onInputCompositionStart:Oe,onInputCompositionEnd:je},Vt=ie==="multiple"||ie==="tags"?b.createElement(Te,(0,E.Z)({},d,Gt)):b.createElement(Ie,(0,E.Z)({},d,Gt));return b.createElement("div",{ref:Me,className:"".concat($,"-selector"),onClick:Ht,onMouseDown:kt},Vt)},Dt=b.forwardRef(xt);Dt.displayName="Selector";var Ct=Dt,Je=f(35593),It=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],it=function(d){var x=d===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"}}},A=function(d,x){var L=d.prefixCls,te=d.disabled,$=d.visible,W=d.children,ie=d.popupElement,oe=d.animation,Ae=d.transitionName,M=d.dropdownStyle,K=d.dropdownClassName,Ve=d.direction,pe=Ve===void 0?"ltr":Ve,_e=d.placement,Me=d.builtinPlacements,ot=d.dropdownMatchSelectWidth,Q=d.dropdownRender,Ye=d.dropdownAlign,gt=d.getPopupContainer,Mt=d.empty,qe=d.getTriggerDOMNode,ht=d.onPopupVisibleChange,zt=d.onPopupMouseEnter,Oe=(0,P.Z)(d,It),je="".concat(L,"-dropdown"),at=ie;Q&&(at=Q(ie));var ft=b.useMemo(function(){return Me||it(ot)},[Me,ot]),Ht=oe?"".concat(je,"-").concat(oe):Ae,kt=typeof ot=="number",Gt=b.useMemo(function(){return kt?null:ot===!1?"minWidth":"width"},[ot,kt]),Vt=M;kt&&(Vt=(0,j.Z)((0,j.Z)({},Vt),{},{width:ot}));var Tt=b.useRef(null);return b.useImperativeHandle(x,function(){return{getPopupElement:function(){return Tt.current}}}),b.createElement(Je.Z,(0,E.Z)({},Oe,{showAction:ht?["click"]:[],hideAction:ht?["click"]:[],popupPlacement:_e||(pe==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ft,prefixCls:je,popupTransitionName:Ht,popup:b.createElement("div",{ref:Tt,onMouseEnter:zt},at),stretch:Gt,popupAlign:Ye,popupVisible:$,getPopupContainer:gt,popupClassName:N()(K,(0,C.Z)({},"".concat(je,"-empty"),Mt)),popupStyle:Vt,getTriggerDOMNode:qe,onPopupVisibleChange:ht}),W)},Ce=b.forwardRef(A);Ce.displayName="SelectTrigger";var se=Ce,G=f(66712);function re(h,d){var x=h.key,L;return"value"in h&&(L=h.value),x!=null?x:L!==void 0?L:"rc-index-key-".concat(d)}function de(h,d){var x=h||{},L=x.label,te=x.value,$=x.options,W=x.groupLabel,ie=L||(d?"children":"label");return{label:ie,value:te||"value",options:$||"options",groupLabel:W||ie}}function Se(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=d.fieldNames,L=d.childrenAsData,te=[],$=de(x,!1),W=$.label,ie=$.value,oe=$.options,Ae=$.groupLabel;function M(K,Ve){K.forEach(function(pe){if(Ve||!(oe in pe)){var _e=pe[ie];te.push({key:re(pe,te.length),groupOption:Ve,data:pe,label:pe[W],value:_e})}else{var Me=pe[Ae];Me===void 0&&L&&(Me=pe.label),te.push({key:re(pe,te.length),group:!0,data:pe,label:Me}),M(pe[oe],!0)}})}return M(h,!1),te}function ce(h){var d=(0,j.Z)({},h);return"props"in d||Object.defineProperty(d,"props",{get:function(){return(0,q.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),d}}),d}function De(h,d){if(!d||!d.length)return null;var x=!1;function L($,W){var ie=(0,G.Z)(W),oe=ie[0],Ae=ie.slice(1);if(!oe)return[$];var M=$.split(oe);return x=x||M.length>1,M.reduce(function(K,Ve){return[].concat((0,J.Z)(K),(0,J.Z)(L(Ve,Ae)))},[]).filter(function(K){return K})}var te=L(h,d);return x?te:null}var ee=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Be=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function he(h){return h==="tags"||h==="multiple"}var Pe=b.forwardRef(function(h,d){var x,L,te=h.id,$=h.prefixCls,W=h.className,ie=h.showSearch,oe=h.tagRender,Ae=h.direction,M=h.omitDomProps,K=h.displayValues,Ve=h.onDisplayValuesChange,pe=h.emptyOptions,_e=h.notFoundContent,Me=_e===void 0?"Not Found":_e,ot=h.onClear,Q=h.mode,Ye=h.disabled,gt=h.loading,Mt=h.getInputElement,qe=h.getRawInputElement,ht=h.open,zt=h.defaultOpen,Oe=h.onDropdownVisibleChange,je=h.activeValue,at=h.onActiveValueChange,ft=h.activeDescendantId,Ht=h.searchValue,kt=h.autoClearSearchValue,Gt=h.onSearch,Vt=h.onSearchSplit,Tt=h.tokenSeparators,Et=h.allowClear,Wt=h.suffixIcon,Ot=h.clearIcon,cn=h.OptionList,Nt=h.animation,Zt=h.transitionName,an=h.dropdownStyle,Xt=h.dropdownClassName,En=h.dropdownMatchSelectWidth,Un=h.dropdownRender,Rt=h.dropdownAlign,lt=h.placement,ut=h.builtinPlacements,qt=h.getPopupContainer,tn=h.showAction,Yt=tn===void 0?[]:tn,At=h.onFocus,ln=h.onBlur,gn=h.onKeyUp,mn=h.onKeyDown,Ln=h.onMouseDown,Ue=(0,P.Z)(h,ee),$e=he(Q),mt=(ie!==void 0?ie:$e)||Q==="combobox",bt=(0,j.Z)({},Ue);Be.forEach(function(Qt){delete bt[Qt]}),M==null||M.forEach(function(Qt){delete bt[Qt]});var hn=b.useState(!1),xr=(0,p.Z)(hn,2),Kn=xr[0],_n=xr[1];b.useEffect(function(){_n((0,Ee.Z)())},[]);var $n=b.useRef(null),kn=b.useRef(null),Mn=b.useRef(null),ur=b.useRef(null),qn=b.useRef(null),tr=m(),Kr=(0,p.Z)(tr,3),Xr=Kr[0],li=Kr[1],Yr=Kr[2];b.useImperativeHandle(d,function(){var Qt,Bt;return{focus:(Qt=ur.current)===null||Qt===void 0?void 0:Qt.focus,blur:(Bt=ur.current)===null||Bt===void 0?void 0:Bt.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var Cr=b.useMemo(function(){var Qt;if(Q!=="combobox")return Ht;var Bt=(Qt=K[0])===null||Qt===void 0?void 0:Qt.value;return typeof Bt=="string"||typeof Bt=="number"?String(Bt):""},[Ht,Q,K]),Qr=Q==="combobox"&&typeof Mt=="function"&&Mt()||null,Ir=typeof qe=="function"&&qe(),Zi=(0,Xe.x1)(kn,Ir==null||(x=Ir.props)===null||x===void 0?void 0:x.ref),Si=b.useState(!1),si=(0,p.Z)(Si,2),_r=si[0],xi=si[1];(0,ve.Z)(function(){xi(!0)},[]);var Ci=(0,ye.Z)(!1,{defaultValue:zt,value:ht}),jr=(0,p.Z)(Ci,2),Ar=jr[0],ui=jr[1],ct=_r?Ar:!1,Pt=!Me&&pe;(Ye||Pt&&ct&&Q==="combobox")&&(ct=!1);var St=Pt?!1:ct,rt=b.useCallback(function(Qt){var Bt=Qt!==void 0?Qt:!ct;Ye||(ui(Bt),ct!==Bt&&(Oe==null||Oe(Bt)))},[Ye,ct,ui,Oe]),yn=b.useMemo(function(){return(Tt||[]).some(function(Qt){return[`
|
|
|
`,`\r
|
|
|
`].includes(Qt)})},[Tt]),bn=function(Bt,Vn,nr){var On=!0,ar=Bt;at==null||at(null);var mr=nr?null:De(Bt,Tt);return Q!=="combobox"&&mr&&(ar="",Vt==null||Vt(mr),rt(!1),On=!1),Gt&&Cr!==ar&&Gt(ar,{source:Vn?"typing":"effect"}),On},cr=function(Bt){!Bt||!Bt.trim()||Gt(Bt,{source:"submit"})};b.useEffect(function(){!ct&&!$e&&Q!=="combobox"&&bn("",!1,!1)},[ct]),b.useEffect(function(){Ar&&Ye&&ui(!1),Ye&&li(!1)},[Ye]);var Mr=c(),Fr=(0,p.Z)(Mr,2),Gn=Fr[0],Rr=Fr[1],ci=function(Bt){var Vn=Gn(),nr=Bt.which;if(nr===V.Z.ENTER&&(Q!=="combobox"&&Bt.preventDefault(),ct||rt(!0)),Rr(!!Cr),nr===V.Z.BACKSPACE&&!Vn&&$e&&!Cr&&K.length){for(var On=(0,J.Z)(K),ar=null,mr=On.length-1;mr>=0;mr-=1){var Ur=On[mr];if(!Ur.disabled){On.splice(mr,1),ar=Ur;break}}ar&&Ve(On,{type:"remove",values:[ar]})}for(var wr=arguments.length,kr=new Array(wr>1?wr-1:0),Nr=1;Nr<wr;Nr++)kr[Nr-1]=arguments[Nr];if(ct&&qn.current){var yr;(yr=qn.current).onKeyDown.apply(yr,[Bt].concat(kr))}mn==null||mn.apply(void 0,[Bt].concat(kr))},Bi=function(Bt){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(ct&&qn.current){var ar;(ar=qn.current).onKeyUp.apply(ar,[Bt].concat(nr))}gn==null||gn.apply(void 0,[Bt].concat(nr))},mo=function(Bt){var Vn=K.filter(function(nr){return nr!==Bt});Ve(Vn,{type:"remove",values:[Bt]})},Hr=b.useRef(!1),Lr=function(){li(!0),Ye||(At&&!Hr.current&&At.apply(void 0,arguments),Yt.includes("focus")&&rt(!0)),Hr.current=!0},Bo=function(){li(!1,function(){Hr.current=!1,rt(!1)}),!Ye&&(Cr&&(Q==="tags"?Gt(Cr,{source:"submit"}):Q==="multiple"&&Gt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];b.useEffect(function(){return function(){Tr.forEach(function(Qt){return clearTimeout(Qt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Bt){var Vn,nr=Bt.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var ar=setTimeout(function(){var kr=Tr.indexOf(ar);if(kr!==-1&&Tr.splice(kr,1),Yr(),!Kn&&!On.contains(document.activeElement)){var Nr;(Nr=ur.current)===null||Nr===void 0||Nr.focus()}});Tr.push(ar)}for(var mr=arguments.length,Ur=new Array(mr>1?mr-1:0),wr=1;wr<mr;wr++)Ur[wr-1]=arguments[wr];Ln==null||Ln.apply(void 0,[Bt].concat(Ur))},wi=b.useState({}),Ki=(0,p.Z)(wi,2),yo=Ki[1];function Pr(){yo({})}var Zr;Ir&&(Zr=function(Bt){rt(Bt)}),S(function(){var Qt;return[$n.current,(Qt=Mn.current)===null||Qt===void 0?void 0:Qt.getPopupElement()]},St,rt,!!Ir);var _i=b.useMemo(function(){return(0,j.Z)((0,j.Z)({},h),{},{notFoundContent:Me,open:ct,triggerOpen:St,id:te,showSearch:mt,multiple:$e,toggleOpen:rt})},[h,Me,St,ct,te,mt,$e,rt]),bo=!!Wt||gt,ji;bo&&(ji=b.createElement(yt,{className:N()("".concat($,"-arrow"),(0,C.Z)({},"".concat($,"-arrow-loading"),gt)),customizeIcon:Wt,customizeIconProps:{loading:gt,searchValue:Cr,open:ct,focused:Xr,showSearch:mt}}));var Ko=function(){var Bt;ot==null||ot(),(Bt=ur.current)===null||Bt===void 0||Bt.focus(),Ve([],{type:"clear",values:K}),bn("",!1,!1)},Ui=Lt($,Ko,K,Et,Ot,Ye,Cr,Q),ki=Ui.allowClear,Jr=Ui.clearIcon,Dr=b.createElement(cn,{ref:qn}),So=N()($,W,(L={},(0,C.Z)(L,"".concat($,"-focused"),Xr),(0,C.Z)(L,"".concat($,"-multiple"),$e),(0,C.Z)(L,"".concat($,"-single"),!$e),(0,C.Z)(L,"".concat($,"-allow-clear"),Et),(0,C.Z)(L,"".concat($,"-show-arrow"),bo),(0,C.Z)(L,"".concat($,"-disabled"),Ye),(0,C.Z)(L,"".concat($,"-loading"),gt),(0,C.Z)(L,"".concat($,"-open"),ct),(0,C.Z)(L,"".concat($,"-customize-input"),Qr),(0,C.Z)(L,"".concat($,"-show-search"),mt),L)),Gi=b.createElement(se,{ref:Mn,disabled:Ye,prefixCls:$,visible:St,popupElement:Dr,animation:Nt,transitionName:Zt,dropdownStyle:an,dropdownClassName:Xt,direction:Ae,dropdownMatchSelectWidth:En,dropdownRender:Un,dropdownAlign:Rt,placement:lt,builtinPlacements:ut,getPopupContainer:qt,empty:pe,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Zr,onPopupMouseEnter:Pr},Ir?b.cloneElement(Ir,{ref:Zi}):b.createElement(Ct,(0,E.Z)({},h,{domRef:kn,prefixCls:$,inputElement:Qr,ref:ur,id:te,showSearch:mt,autoClearSearchValue:kt,mode:Q,activeDescendantId:ft,tagRender:oe,values:K,open:ct,onToggleOpen:rt,activeValue:je,searchValue:Cr,onSearch:bn,onSearchSubmit:cr,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=b.createElement("div",(0,E.Z)({className:So},bt,{ref:$n,onMouseDown:$r,onKeyDown:ci,onKeyUp:Bi,onFocus:Lr,onBlur:Bo}),Xr&&!ct&&b.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(K.map(function(Qt){var Bt=Qt.label,Vn=Qt.value;return["number","string"].includes((0,T.Z)(Bt))?Bt:Vn}).join(", "))),Gi,ji,ki&&Jr),b.createElement(Z.Provider,{value:_i},Vi)}),we=Pe,Ne=function(h,d){var x=b.useRef({values:new Map,options:new Map}),L=b.useMemo(function(){var $=x.current,W=$.values,ie=$.options,oe=h.map(function(K){if(K.label===void 0){var Ve;return(0,j.Z)((0,j.Z)({},K),{},{label:(Ve=W.get(K.value))===null||Ve===void 0?void 0:Ve.label})}return K}),Ae=new Map,M=new Map;return oe.forEach(function(K){Ae.set(K.value,K),M.set(K.value,d.get(K.value)||ie.get(K.value))}),x.current.values=Ae,x.current.options=M,oe},[h,d]),te=b.useCallback(function($){return d.get($)||x.current.options.get($)},[d]);return[L,te]};function Ke(h,d){return Ze(h).join("").toUpperCase().includes(d)}var U=function(h,d,x,L,te){return b.useMemo(function(){if(!x||L===!1)return h;var $=d.options,W=d.label,ie=d.value,oe=[],Ae=typeof L=="function",M=x.toUpperCase(),K=Ae?L:function(pe,_e){return te?Ke(_e[te],M):_e[$]?Ke(_e[W!=="children"?W:"label"],M):Ke(_e[ie],M)},Ve=Ae?function(pe){return ce(pe)}:function(pe){return pe};return h.forEach(function(pe){if(pe[$]){var _e=K(x,Ve(pe));if(_e)oe.push(pe);else{var Me=pe[$].filter(function(ot){return K(x,Ve(ot))});Me.length&&oe.push((0,j.Z)((0,j.Z)({},pe),{},(0,C.Z)({},$,Me)))}return}K(x,Ve(pe))&&oe.push(pe)}),oe},[h,L,te,x,d])},tt=f(17115),He=f(11592),st=["children","value"],pt=["children"];function rn(h){var d=h,x=d.key,L=d.props,te=L.children,$=L.value,W=(0,P.Z)(L,st);return(0,j.Z)({key:x,value:$!==void 0?$:x,children:te},W)}function Kt(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,He.Z)(h).map(function(x,L){if(!b.isValidElement(x)||!x.type)return null;var te=x,$=te.type.isSelectOptGroup,W=te.key,ie=te.props,oe=ie.children,Ae=(0,P.Z)(ie,pt);return d||!$?rn(x):(0,j.Z)((0,j.Z)({key:"__RC_SELECT_GRP__".concat(W===null?L:W,"__"),label:W},Ae),{},{options:Kt(oe)})}).filter(function(x){return x})}function Ft(h,d,x,L,te){return b.useMemo(function(){var $=h,W=!h;W&&($=Kt(d));var ie=new Map,oe=new Map,Ae=function(Ve,pe,_e){_e&&typeof _e=="string"&&Ve.set(pe[_e],pe)};function M(K){for(var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=0;pe<K.length;pe+=1){var _e=K[pe];!_e[x.options]||Ve?(ie.set(_e[x.value],_e),Ae(oe,_e,x.label),Ae(oe,_e,L),Ae(oe,_e,te)):M(_e[x.options],!0)}}return M($),{options:$,valueOptions:ie,labelOptions:oe}},[h,d,x,L,te])}function $t(h){var d=b.useRef();d.current=h;var x=b.useCallback(function(){return d.current.apply(d,arguments)},[]);return x}var en=function(){return null};en.isSelectOptGroup=!0;var Ut=en,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,fn=f(80547),An=f(2738),Wn=f(48911),xn=b.createContext(null),Pn=xn;function vn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function wn(h){return typeof h=="string"||typeof h=="number"}var pn=function(d,x){var L=F(),te=L.prefixCls,$=L.id,W=L.open,ie=L.multiple,oe=L.mode,Ae=L.searchValue,M=L.toggleOpen,K=L.notFoundContent,Ve=L.onPopupScroll,pe=b.useContext(Pn),_e=pe.flattenOptions,Me=pe.onActiveValue,ot=pe.defaultActiveFirstOption,Q=pe.onSelect,Ye=pe.menuItemSelectedIcon,gt=pe.rawValues,Mt=pe.fieldNames,qe=pe.virtual,ht=pe.direction,zt=pe.listHeight,Oe=pe.listItemHeight,je="".concat(te,"-item"),at=(0,fn.Z)(function(){return _e},[W,_e],function(Rt,lt){return lt[0]&&Rt[1]!==lt[1]}),ft=b.useRef(null),Ht=function(lt){lt.preventDefault()},kt=function(lt){ft.current&&ft.current.scrollTo(typeof lt=="number"?{index:lt}:lt)},Gt=function(lt){for(var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,qt=at.length,tn=0;tn<qt;tn+=1){var Yt=(lt+tn*ut+qt)%qt,At=at[Yt],ln=At.group,gn=At.data;if(!ln&&!gn.disabled)return Yt}return-1},Vt=b.useState(function(){return Gt(0)}),Tt=(0,p.Z)(Vt,2),Et=Tt[0],Wt=Tt[1],Ot=function(lt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Wt(lt);var qt={source:ut?"keyboard":"mouse"},tn=at[lt];if(!tn){Me(null,-1,qt);return}Me(tn.value,lt,qt)};(0,b.useEffect)(function(){Ot(ot!==!1?Gt(0):-1)},[at.length,Ae]);var cn=b.useCallback(function(Rt){return gt.has(Rt)&&oe!=="combobox"},[oe,(0,J.Z)(gt).toString(),gt.size]);(0,b.useEffect)(function(){var Rt=setTimeout(function(){if(!ie&&W&>.size===1){var ut=Array.from(gt)[0],qt=at.findIndex(function(tn){var Yt=tn.data;return Yt.value===ut});qt!==-1&&(Ot(qt),kt(qt))}});if(W){var lt;(lt=ft.current)===null||lt===void 0||lt.scrollTo(void 0)}return function(){return clearTimeout(Rt)}},[W,Ae,_e.length]);var Nt=function(lt){lt!==void 0&&Q(lt,{selected:!gt.has(lt)}),ie||M(!1)};if(b.useImperativeHandle(x,function(){return{onKeyDown:function(lt){var ut=lt.which,qt=lt.ctrlKey;switch(ut){case V.Z.N:case V.Z.P:case V.Z.UP:case V.Z.DOWN:{var tn=0;if(ut===V.Z.UP?tn=-1:ut===V.Z.DOWN?tn=1:vn()&&qt&&(ut===V.Z.N?tn=1:ut===V.Z.P&&(tn=-1)),tn!==0){var Yt=Gt(Et+tn,tn);kt(Yt),Ot(Yt,!0)}break}case V.Z.ENTER:{var At=at[Et];At&&!At.data.disabled?Nt(At.value):Nt(void 0),W&<.preventDefault();break}case V.Z.ESC:M(!1),W&<.stopPropagation()}},onKeyUp:function(){},scrollTo:function(lt){kt(lt)}}}),at.length===0)return b.createElement("div",{role:"listbox",id:"".concat($,"_list"),className:"".concat(je,"-empty"),onMouseDown:Ht},K);var Zt=Object.keys(Mt).map(function(Rt){return Mt[Rt]}),an=function(lt){return lt.label};function Xt(Rt,lt){var ut=Rt.group;return{role:ut?"presentation":"option",id:"".concat($,"_list_").concat(lt)}}var En=function(lt){var ut=at[lt];if(!ut)return null;var qt=ut.data||{},tn=qt.value,Yt=ut.group,At=(0,I.Z)(qt,!0),ln=an(ut);return ut?b.createElement("div",(0,E.Z)({"aria-label":typeof ln=="string"&&!Yt?ln:null},At,{key:lt},Xt(ut,lt),{"aria-selected":cn(tn)}),tn):null},Un={role:"listbox",id:"".concat($,"_list")};return b.createElement(b.Fragment,null,qe&&b.createElement("div",(0,E.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),En(Et-1),En(Et),En(Et+1)),b.createElement(Wn.Z,{itemKey:"key",ref:ft,data:at,height:zt,itemHeight:Oe,fullHeight:!1,onMouseDown:Ht,onScroll:Ve,virtual:qe,direction:ht,innerProps:qe?null:Un},function(Rt,lt){var ut,qt=Rt.group,tn=Rt.groupOption,Yt=Rt.data,At=Rt.label,ln=Rt.value,gn=Yt.key;if(qt){var mn,Ln=(mn=Yt.title)!==null&&mn!==void 0?mn:wn(At)?At.toString():void 0;return b.createElement("div",{className:N()(je,"".concat(je,"-group")),title:Ln},At!==void 0?At:gn)}var Ue=Yt.disabled,$e=Yt.title,mt=Yt.children,bt=Yt.style,hn=Yt.className,xr=(0,P.Z)(Yt,In),Kn=(0,An.Z)(xr,Zt),_n=cn(ln),$n="".concat(je,"-option"),kn=N()(je,$n,hn,(ut={},(0,C.Z)(ut,"".concat($n,"-grouped"),tn),(0,C.Z)(ut,"".concat($n,"-active"),Et===lt&&!Ue),(0,C.Z)(ut,"".concat($n,"-disabled"),Ue),(0,C.Z)(ut,"".concat($n,"-selected"),_n),ut)),Mn=an(Rt),ur=!Ye||typeof Ye=="function"||_n,qn=typeof Mn=="number"?Mn:Mn||ln,tr=wn(qn)?qn.toString():void 0;return $e!==void 0&&(tr=$e),b.createElement("div",(0,E.Z)({},(0,I.Z)(Kn),qe?{}:Xt(Rt,lt),{"aria-selected":_n,className:kn,title:tr,onMouseMove:function(){Et===lt||Ue||Ot(lt)},onClick:function(){Ue||Nt(ln)},style:bt}),b.createElement("div",{className:"".concat($n,"-content")},qn),b.isValidElement(Ye)||_n,ur&&b.createElement(yt,{className:"".concat(je,"-option-state"),customizeIcon:Ye,customizeIconProps:{isSelected:_n}},_n?"\u2713":null))}))},Dn=b.forwardRef(pn);Dn.displayName="OptionList";var on=Dn;function Fn(h){var d=h.mode,x=h.options,L=h.children,te=h.backfill,$=h.allowClear,W=h.placeholder,ie=h.getInputElement,oe=h.showSearch,Ae=h.onSearch,M=h.defaultOpen,K=h.autoFocus,Ve=h.labelInValue,pe=h.value,_e=h.inputValue,Me=h.optionLabelProp,ot=isMultiple(d),Q=oe!==void 0?oe:ot||d==="combobox",Ye=x||convertChildrenToData(L);if(warning(d!=="tags"||Ye.every(function(ht){return!ht.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),d==="tags"||d==="combobox"){var gt=Ye.some(function(ht){return ht.options?ht.options.some(function(zt){return typeof("value"in zt?zt.value:zt.key)=="number"}):typeof("value"in ht?ht.value:ht.key)=="number"});warning(!gt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(d!=="combobox"||!Me,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(d==="combobox"||!te,"`backfill` only works with `combobox` mode."),warning(d==="combobox"||!ie,"`getInputElement` only work with `combobox` mode."),noteOnce(d!=="combobox"||!ie||!$||!W,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!Q&&d!=="combobox"&&d!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!M||K,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),pe!=null){var Mt=toArray(pe);warning(!Ve||Mt.every(function(ht){return _typeof(ht)==="object"&&("key"in ht||"value"in ht)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ot||Array.isArray(pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(L){var qe=null;toNodeArray(L).some(function(ht){if(!React.isValidElement(ht)||!ht.type)return!1;var zt=ht,Oe=zt.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var je=toNodeArray(ht.props.children).every(function(at){return!React.isValidElement(at)||!ht.type||at.type.isSelectOption?!0:(qe=at.type,!1)});return!je}return qe=Oe,!0}),qe&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(qe.displayName||qe.name||qe,"`.")),warning(_e===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hn(h,d){if(h){var x=function L(te){for(var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,W=0;W<te.length;W++){var ie=te[W];if(ie[d==null?void 0:d.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!$&&Array.isArray(ie[d==null?void 0:d.options])&&L(ie[d==null?void 0:d.options],!0))break}};x(h)}}var or=null,gr=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Jt=["inputValue"];function nt(h){return!h||(0,T.Z)(h)!=="object"}var _t=b.forwardRef(function(h,d){var x=h.id,L=h.mode,te=h.prefixCls,$=te===void 0?"rc-select":te,W=h.backfill,ie=h.fieldNames,oe=h.inputValue,Ae=h.searchValue,M=h.onSearch,K=h.autoClearSearchValue,Ve=K===void 0?!0:K,pe=h.onSelect,_e=h.onDeselect,Me=h.dropdownMatchSelectWidth,ot=Me===void 0?!0:Me,Q=h.filterOption,Ye=h.filterSort,gt=h.optionFilterProp,Mt=h.optionLabelProp,qe=h.options,ht=h.children,zt=h.defaultActiveFirstOption,Oe=h.menuItemSelectedIcon,je=h.virtual,at=h.direction,ft=h.listHeight,Ht=ft===void 0?200:ft,kt=h.listItemHeight,Gt=kt===void 0?20:kt,Vt=h.value,Tt=h.defaultValue,Et=h.labelInValue,Wt=h.onChange,Ot=(0,P.Z)(h,gr),cn=(0,tt.ZP)(x),Nt=he(L),Zt=!!(!qe&&ht),an=b.useMemo(function(){return Q===void 0&&L==="combobox"?!1:Q},[Q,L]),Xt=b.useMemo(function(){return de(ie,Zt)},[JSON.stringify(ie),Zt]),En=(0,ye.Z)("",{value:Ae!==void 0?Ae:oe,postState:function(Pt){return Pt||""}}),Un=(0,p.Z)(En,2),Rt=Un[0],lt=Un[1],ut=Ft(qe,ht,Xt,gt,Mt),qt=ut.valueOptions,tn=ut.labelOptions,Yt=ut.options,At=b.useCallback(function(ct){var Pt=Ze(ct);return Pt.map(function(St){var rt,yn,bn,cr,Mr;if(nt(St))rt=St;else{var Fr;bn=St.key,yn=St.label,rt=(Fr=St.value)!==null&&Fr!==void 0?Fr:bn}var Gn=qt.get(rt);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[Mt||Xt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:rt),cr=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:rt,key:bn,disabled:cr,title:Mr}})},[Xt,Mt,qt]),ln=(0,ye.Z)(Tt,{value:Vt}),gn=(0,p.Z)(ln,2),mn=gn[0],Ln=gn[1],Ue=b.useMemo(function(){var ct,Pt=At(mn);return L==="combobox"&&Fe((ct=Pt[0])===null||ct===void 0?void 0:ct.value)?[]:Pt},[mn,At,L]),$e=Ne(Ue,qt),mt=(0,p.Z)($e,2),bt=mt[0],hn=mt[1],xr=b.useMemo(function(){if(!L&&bt.length===1){var ct=bt[0];if(ct.value===null&&(ct.label===null||ct.label===void 0))return[]}return bt.map(function(Pt){var St;return(0,j.Z)((0,j.Z)({},Pt),{},{label:(St=Pt.label)!==null&&St!==void 0?St:Pt.value})})},[L,bt]),Kn=b.useMemo(function(){return new Set(bt.map(function(ct){return ct.value}))},[bt]);b.useEffect(function(){if(L==="combobox"){var ct,Pt=(ct=bt[0])===null||ct===void 0?void 0:ct.value;lt(Ge(Pt)?String(Pt):"")}},[bt]);var _n=$t(function(ct,Pt){var St,rt=Pt!=null?Pt:ct;return St={},(0,C.Z)(St,Xt.value,ct),(0,C.Z)(St,Xt.label,rt),St}),$n=b.useMemo(function(){if(L!=="tags")return Yt;var ct=(0,J.Z)(Yt),Pt=function(rt){return qt.has(rt)};return(0,J.Z)(bt).sort(function(St,rt){return St.value<rt.value?-1:1}).forEach(function(St){var rt=St.value;Pt(rt)||ct.push(_n(rt,St.label))}),ct},[_n,Yt,qt,bt,L]),kn=U($n,Xt,Rt,an,gt),Mn=b.useMemo(function(){return L!=="tags"||!Rt||kn.some(function(ct){return ct[gt||"value"]===Rt})||kn.some(function(ct){return ct[Xt.value]===Rt})?kn:[_n(Rt)].concat((0,J.Z)(kn))},[_n,gt,L,kn,Rt,Xt]),ur=b.useMemo(function(){return Ye?(0,J.Z)(Mn).sort(function(ct,Pt){return Ye(ct,Pt)}):Mn},[Mn,Ye]),qn=b.useMemo(function(){return Se(ur,{fieldNames:Xt,childrenAsData:Zt})},[ur,Xt,Zt]),tr=function(Pt){var St=At(Pt);if(Ln(St),Wt&&(St.length!==bt.length||St.some(function(bn,cr){var Mr;return((Mr=bt[cr])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var rt=Et?St:St.map(function(bn){return bn.value}),yn=St.map(function(bn){return ce(hn(bn.value))});Wt(Nt?rt:rt[0],Nt?yn:yn[0])}},Kr=b.useState(null),Xr=(0,p.Z)(Kr,2),li=Xr[0],Yr=Xr[1],Cr=b.useState(0),Qr=(0,p.Z)(Cr,2),Ir=Qr[0],Zi=Qr[1],Si=zt!==void 0?zt:L!=="combobox",si=b.useCallback(function(ct,Pt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt=St.source,yn=rt===void 0?"keyboard":rt;Zi(Pt),W&&L==="combobox"&&ct!==null&&yn==="keyboard"&&Yr(String(ct))},[W,L]),_r=function(Pt,St,rt){var yn=function(){var Hr,Lr=hn(Pt);return[Et?{label:Lr==null?void 0:Lr[Xt.label],value:Pt,key:(Hr=Lr==null?void 0:Lr.key)!==null&&Hr!==void 0?Hr:Pt}:Pt,ce(Lr)]};if(St&&pe){var bn=yn(),cr=(0,p.Z)(bn,2),Mr=cr[0],Fr=cr[1];pe(Mr,Fr)}else if(!St&&_e&&rt!=="clear"){var Gn=yn(),Rr=(0,p.Z)(Gn,2),ci=Rr[0],Bi=Rr[1];_e(ci,Bi)}},xi=$t(function(ct,Pt){var St,rt=Nt?Pt.selected:!0;rt?St=Nt?[].concat((0,J.Z)(bt),[ct]):[ct]:St=bt.filter(function(yn){return yn.value!==ct}),tr(St),_r(ct,rt),L==="combobox"?Yr(""):(!he||Ve)&&(lt(""),Yr(""))}),Ci=function(Pt,St){tr(Pt);var rt=St.type,yn=St.values;(rt==="remove"||rt==="clear")&&yn.forEach(function(bn){_r(bn.value,!1,rt)})},jr=function(Pt,St){if(lt(Pt),Yr(null),St.source==="submit"){var rt=(Pt||"").trim();if(rt){var yn=Array.from(new Set([].concat((0,J.Z)(Kn),[rt])));tr(yn),_r(rt,!0),lt("")}return}St.source!=="blur"&&(L==="combobox"&&tr(Pt),M==null||M(Pt))},Ar=function(Pt){var St=Pt;L!=="tags"&&(St=Pt.map(function(yn){var bn=tn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var rt=Array.from(new Set([].concat((0,J.Z)(Kn),(0,J.Z)(St))));tr(rt),rt.forEach(function(yn){_r(yn,!0)})},ui=b.useMemo(function(){var ct=je!==!1&&ot!==!1;return(0,j.Z)((0,j.Z)({},ut),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:xi,menuItemSelectedIcon:Oe,rawValues:Kn,fieldNames:Xt,virtual:ct,direction:at,listHeight:Ht,listItemHeight:Gt,childrenAsData:Zt})},[ut,qn,si,Si,xi,Oe,Kn,Xt,je,ot,Ht,Gt,Zt]);return b.createElement(Pn.Provider,{value:ui},b.createElement(we,(0,E.Z)({},Ot,{id:cn,prefixCls:$,ref:d,omitDomProps:Jt,mode:L,displayValues:xr,onDisplayValuesChange:Ci,direction:at,searchValue:Rt,onSearch:jr,autoClearSearchValue:Ve,onSearchSplit:Ar,dropdownMatchSelectWidth:ot,OptionList:on,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(cn,"_list_").concat(Ir)})))}),y=_t;y.Option=Cn,y.OptGroup=Ut;var D=y,z=D},9296:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{ResizableTextArea:function(){return ne},default:function(){return Fe}});var E=f(54476),J=f(33885),C=f(20068),j=f(76190),p=f(42978),P=f(75931),T=f(94480),ye=f(92310),q=f.n(ye),b=f(93681),be=f(5643),N=f(18929),ve=f(59301),Ee=f(29301),V=f(34280),Xe=f(16089),et=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,yt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Lt={},Z;function F(le){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=le.getAttribute("id")||le.getAttribute("data-reactid")||le.getAttribute("name");if(_&&Lt[ae])return Lt[ae];var X=window.getComputedStyle(le),k=X.getPropertyValue("box-sizing")||X.getPropertyValue("-moz-box-sizing")||X.getPropertyValue("-webkit-box-sizing"),We=parseFloat(X.getPropertyValue("padding-bottom"))+parseFloat(X.getPropertyValue("padding-top")),Te=parseFloat(X.getPropertyValue("border-bottom-width"))+parseFloat(X.getPropertyValue("border-top-width")),ue=yt.map(function(fe){return"".concat(fe,":").concat(X.getPropertyValue(fe))}).join(";"),Ie={sizingStyle:ue,paddingSize:We,borderSize:Te,boxSizing:k};return _&&ae&&(Lt[ae]=Ie),Ie}function m(le){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Z||(Z=document.createElement("textarea"),Z.setAttribute("tab-index","-1"),Z.setAttribute("aria-hidden","true"),document.body.appendChild(Z)),le.getAttribute("wrap")?Z.setAttribute("wrap",le.getAttribute("wrap")):Z.removeAttribute("wrap");var k=F(le,_),We=k.paddingSize,Te=k.borderSize,ue=k.boxSizing,Ie=k.sizingStyle;Z.setAttribute("style","".concat(Ie,";").concat(et)),Z.value=le.value||le.placeholder||"";var fe=void 0,xt=void 0,Dt,Ct=Z.scrollHeight;if(ue==="border-box"?Ct+=Te:ue==="content-box"&&(Ct-=We),ae!==null||X!==null){Z.value=" ";var Je=Z.scrollHeight-We;ae!==null&&(fe=Je*ae,ue==="border-box"&&(fe=fe+We+Te),Ct=Math.max(fe,Ct)),X!==null&&(xt=Je*X,ue==="border-box"&&(xt=xt+We+Te),Dt=Ct>xt?"":"hidden",Ct=Math.min(xt,Ct))}var It={height:Ct,overflowY:Dt,resize:"none"};return fe&&(It.minHeight=fe),xt&&(It.maxHeight=xt),It}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],S=0,I=1,B=2,R=ve.forwardRef(function(le,_){var ae=le,X=ae.prefixCls,k=ae.onPressEnter,We=ae.defaultValue,Te=ae.value,ue=ae.autoSize,Ie=ae.onResize,fe=ae.className,xt=ae.style,Dt=ae.disabled,Ct=ae.onChange,Je=ae.onInternalAutoSize,It=(0,P.Z)(ae,c),it=(0,N.Z)(We,{value:Te,postState:function(Ut){return Ut!=null?Ut:""}}),A=(0,p.Z)(it,2),Ce=A[0],se=A[1],G=function(Ut){se(Ut.target.value),Ct==null||Ct(Ut)},re=ve.useRef();ve.useImperativeHandle(_,function(){return{textArea:re.current}});var de=ve.useMemo(function(){return ue&&(0,j.Z)(ue)==="object"?[ue.minRows,ue.maxRows]:[]},[ue]),Se=(0,p.Z)(de,2),ce=Se[0],De=Se[1],ee=!!ue,Be=function(){try{if(document.activeElement===re.current){var Ut=re.current,sn=Ut.selectionStart,Cn=Ut.selectionEnd,fn=Ut.scrollTop;re.current.setSelectionRange(sn,Cn),re.current.scrollTop=fn}}catch(An){}},he=ve.useState(B),Pe=(0,p.Z)(he,2),we=Pe[0],Ne=Pe[1],Ke=ve.useState(),U=(0,p.Z)(Ke,2),tt=U[0],He=U[1],st=function(){Ne(S)};(0,V.Z)(function(){ee&&st()},[Te,ce,De,ee]),(0,V.Z)(function(){if(we===S)Ne(I);else if(we===I){var en=m(re.current,!1,ce,De);Ne(B),He(en)}else Be()},[we]);var pt=ve.useRef(),rn=function(){Xe.Z.cancel(pt.current)},Kt=function(Ut){we===B&&(Ie==null||Ie(Ut),ue&&(rn(),pt.current=(0,Xe.Z)(function(){st()})))};ve.useEffect(function(){return rn},[]);var Ft=ee?tt:null,$t=(0,J.Z)((0,J.Z)({},xt),Ft);return(we===S||we===I)&&($t.overflowY="hidden",$t.overflowX="hidden"),ve.createElement(Ee.Z,{onResize:Kt,disabled:!(ue||Ie)},ve.createElement("textarea",(0,E.Z)({},It,{ref:re,style:$t,className:q()(X,fe,(0,C.Z)({},"".concat(X,"-disabled"),Dt)),disabled:Dt,value:Ce,onChange:G})))}),ne=R,ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ze(le,_){return(0,T.Z)(le||"").slice(0,_).join("")}function ge(le,_,ae,X){var k=ae;return le?k=Ze(ae,X):(0,T.Z)(_||"").length<ae.length&&(0,T.Z)(ae||"").length>X&&(k=_),k}var dt=ve.forwardRef(function(le,_){var ae,X=le.defaultValue,k=le.value,We=le.onFocus,Te=le.onBlur,ue=le.onChange,Ie=le.allowClear,fe=le.maxLength,xt=le.onCompositionStart,Dt=le.onCompositionEnd,Ct=le.suffix,Je=le.prefixCls,It=Je===void 0?"rc-textarea":Je,it=le.classes,A=le.showCount,Ce=le.className,se=le.style,G=le.disabled,re=le.hidden,de=le.classNames,Se=le.styles,ce=le.onResize,De=(0,P.Z)(le,ze),ee=(0,N.Z)(X,{value:k,defaultValue:X}),Be=(0,p.Z)(ee,2),he=Be[0],Pe=Be[1],we=(0,ve.useRef)(null),Ne=ve.useState(!1),Ke=(0,p.Z)(Ne,2),U=Ke[0],tt=Ke[1],He=ve.useState(!1),st=(0,p.Z)(He,2),pt=st[0],rn=st[1],Kt=ve.useRef(),Ft=ve.useRef(0),$t=ve.useState(null),en=(0,p.Z)($t,2),Ut=en[0],sn=en[1],Cn=function(){var nt;(nt=we.current)===null||nt===void 0||nt.textArea.focus()};(0,ve.useImperativeHandle)(_,function(){return{resizableTextArea:we.current,focus:Cn,blur:function(){var nt;(nt=we.current)===null||nt===void 0||nt.textArea.blur()}}}),(0,ve.useEffect)(function(){tt(function(Jt){return!G&&Jt})},[G]);var fn=Number(fe)>0,An=function(nt){rn(!0),Kt.current=he,Ft.current=nt.currentTarget.selectionStart,xt==null||xt(nt)},Wn=function(nt){rn(!1);var _t=nt.currentTarget.value;if(fn){var y,D=Ft.current>=fe+1||Ft.current===((y=Kt.current)===null||y===void 0?void 0:y.length);_t=ge(D,Kt.current,_t,fe)}_t!==he&&(Pe(_t),(0,be.rJ)(nt.currentTarget,nt,ue,_t)),Dt==null||Dt(nt)},xn=function(nt){var _t=nt.target.value;if(!pt&&fn){var y=nt.target.selectionStart>=fe+1||nt.target.selectionStart===_t.length||!nt.target.selectionStart;_t=ge(y,he,_t,fe)}Pe(_t),(0,be.rJ)(nt.currentTarget,nt,ue,_t)},Pn=function(nt){var _t=De.onPressEnter,y=De.onKeyDown;nt.key==="Enter"&&_t&&_t(nt),y==null||y(nt)},vn=function(nt){tt(!0),We==null||We(nt)},In=function(nt){tt(!1),Te==null||Te(nt)},wn=function(nt){var _t;Pe(""),Cn(),(0,be.rJ)((_t=we.current)===null||_t===void 0?void 0:_t.textArea,nt,ue)},pn=(0,be.D7)(he);!pt&&fn&&k==null&&(pn=Ze(pn,fe));var Dn=Ct,on;if(A){var Fn=(0,T.Z)(pn).length;(0,j.Z)(A)==="object"?on=A.formatter({value:pn,count:Fn,maxLength:fe}):on="".concat(Fn).concat(fn?" / ".concat(fe):""),Dn=ve.createElement(ve.Fragment,null,Dn,ve.createElement("span",{className:q()("".concat(It,"-data-count"),de==null?void 0:de.count),style:Se==null?void 0:Se.count},on))}var Hn=function(nt){var _t;ce==null||ce(nt),(_t=we.current)!==null&&_t!==void 0&&_t.textArea.style.height&&sn(!0)},or=!De.autoSize&&!A&&!Ie,gr=ve.createElement(b.BaseInput,{value:pn,allowClear:Ie,handleReset:wn,suffix:Dn,prefixCls:It,classes:{affixWrapper:q()(it==null?void 0:it.affixWrapper,(ae={},(0,C.Z)(ae,"".concat(It,"-show-count"),A),(0,C.Z)(ae,"".concat(It,"-textarea-allow-clear"),Ie),ae))},disabled:G,focused:U,className:Ce,style:(0,J.Z)((0,J.Z)({},se),Ut&&!or?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof on=="string"?on:void 0}},hidden:re,inputElement:ve.createElement(ne,(0,E.Z)({},De,{onKeyDown:Pn,onChange:xn,onFocus:vn,onBlur:In,onCompositionStart:An,onCompositionEnd:Wn,className:de==null?void 0:de.textarea,style:(0,J.Z)((0,J.Z)({},Se==null?void 0:Se.textarea),{},{resize:se==null?void 0:se.resize}),disabled:G,prefixCls:It,onResize:Hn,ref:we}))});return gr}),Ge=dt,Fe=Ge},48911:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return it}});var E=f(54476),J=f(76190),C=f(33885),j=f(20068),p=f(42978),P=f(75931),T=f(92310),ye=f.n(T),q=f(29301),b=f(70425),be=f(34280),N=f(59301),ve=f(4676),Ee=N.forwardRef(function(A,Ce){var se=A.height,G=A.offsetY,re=A.offsetX,de=A.children,Se=A.prefixCls,ce=A.onInnerResize,De=A.innerProps,ee=A.rtl,Be=A.extra,he={},Pe={display:"flex",flexDirection:"column"};return G!==void 0&&(he={height:se,position:"relative",overflow:"hidden"},Pe=(0,C.Z)((0,C.Z)({},Pe),{},(0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)((0,j.Z)({transform:"translateY(".concat(G,"px)")},ee?"marginRight":"marginLeft",-re),"position","absolute"),"left",0),"right",0),"top",0))),N.createElement("div",{style:he},N.createElement(q.Z,{onResize:function(Ne){var Ke=Ne.offsetHeight;Ke&&ce&&ce()}},N.createElement("div",(0,E.Z)({style:Pe,className:ye()((0,j.Z)({},"".concat(Se,"-holder-inner"),Se)),ref:Ce},De),de,Be)))});Ee.displayName="Filler";var V=Ee;function Xe(A){var Ce=A.children,se=A.setRef,G=N.useCallback(function(re){se(re)},[]);return N.cloneElement(Ce,{ref:G})}function et(A,Ce,se,G,re,de,Se,ce){var De=ce.getKey;return A.slice(Ce,se+1).map(function(ee,Be){var he=Ce+Be,Pe=Se(ee,he,{style:{width:G},offsetX:re}),we=De(ee);return N.createElement(Xe,{key:we,setRef:function(Ke){return de(ee,Ke)}},Pe)})}function yt(A,Ce,se,G){var re=se-A,de=Ce-se,Se=Math.min(re,de)*2;if(G<=Se){var ce=Math.floor(G/2);return G%2?se+ce+1:se-ce}return re>de?se-(G-de):se+(G-re)}function Lt(A,Ce,se){var G=A.length,re=Ce.length,de,Se;if(G===0&&re===0)return null;G<re?(de=A,Se=Ce):(de=Ce,Se=A);var ce={__EMPTY_ITEM__:!0};function De(Ne){return Ne!==void 0?se(Ne):ce}for(var ee=null,Be=Math.abs(G-re)!==1,he=0;he<Se.length;he+=1){var Pe=De(de[he]),we=De(Se[he]);if(Pe!==we){ee=he,Be=Be||Pe!==De(Se[he+1]);break}}return ee===null?null:{index:ee,multiple:Be}}function Z(A,Ce,se){var G=N.useState(A),re=(0,p.Z)(G,2),de=re[0],Se=re[1],ce=N.useState(null),De=(0,p.Z)(ce,2),ee=De[0],Be=De[1];return N.useEffect(function(){var he=Lt(de||[],A||[],Ce);(he==null?void 0:he.index)!==void 0&&(se==null||se(he.index),Be(A[he.index])),Se(A)},[A]),[ee]}var F=f(16089),m=(typeof navigator=="undefined"?"undefined":(0,J.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=m,S=function(A,Ce,se,G){var re=(0,N.useRef)(!1),de=(0,N.useRef)(null);function Se(){clearTimeout(de.current),re.current=!0,de.current=setTimeout(function(){re.current=!1},50)}var ce=(0,N.useRef)({top:A,bottom:Ce,left:se,right:G});return ce.current.top=A,ce.current.bottom=Ce,ce.current.left=se,ce.current.right=G,function(De,ee){var Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,he=De?ee<0&&ce.current.left||ee>0&&ce.current.right:ee<0&&ce.current.top||ee>0&&ce.current.bottom;return Be&&he?(clearTimeout(de.current),re.current=!1):(!he||re.current)&&Se(),!re.current&&he}};function I(A,Ce,se,G,re,de,Se){var ce=(0,N.useRef)(0),De=(0,N.useRef)(null),ee=(0,N.useRef)(null),Be=(0,N.useRef)(!1),he=S(Ce,se,G,re);function Pe(He,st){if(F.Z.cancel(De.current),!he(!1,st)){var pt=He;if(!pt._virtualHandled)pt._virtualHandled=!0;else return;ce.current+=st,ee.current=st,c||pt.preventDefault(),De.current=(0,F.Z)(function(){var rn=Be.current?10:1;Se(ce.current*rn,!1),ce.current=0})}}function we(He,st){Se(st,!0),c||He.preventDefault()}var Ne=(0,N.useRef)(null),Ke=(0,N.useRef)(null);function U(He){if(A){F.Z.cancel(Ke.current),Ke.current=(0,F.Z)(function(){Ne.current=null},2);var st=He.deltaX,pt=He.deltaY,rn=He.shiftKey,Kt=st,Ft=pt;(Ne.current==="sx"||!Ne.current&&rn&&pt&&!st)&&(Kt=pt,Ft=0,Ne.current="sx");var $t=Math.abs(Kt),en=Math.abs(Ft);Ne.current===null&&(Ne.current=de&&$t>en?"x":"y"),Ne.current==="y"?Pe(He,Ft):we(He,Kt)}}function tt(He){A&&(Be.current=He.detail===ee.current)}return[U,tt]}function B(A,Ce,se,G){var re=N.useMemo(function(){return[new Map,[]]},[A,se.id,G]),de=(0,p.Z)(re,2),Se=de[0],ce=de[1],De=function(Be){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Be,Pe=Se.get(Be),we=Se.get(he);if(Pe===void 0||we===void 0)for(var Ne=A.length,Ke=ce.length;Ke<Ne;Ke+=1){var U,tt=A[Ke],He=Ce(tt);Se.set(He,Ke);var st=(U=se.get(He))!==null&&U!==void 0?U:G;if(ce[Ke]=(ce[Ke-1]||0)+st,He===Be&&(Pe=Ke),He===he&&(we=Ke),Pe!==void 0&&we!==void 0)break}return{top:ce[Pe-1]||0,bottom:ce[we]}};return De}var R=f(67732),ne=f(83652),ze=function(){function A(){(0,R.Z)(this,A),(0,j.Z)(this,"maps",void 0),(0,j.Z)(this,"id",0),(0,j.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ne.Z)(A,[{key:"set",value:function(se,G){this.diffRecords.set(se,this.maps[se]),this.maps[se]=G,this.id+=1}},{key:"get",value:function(se){return this.maps[se]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),A}(),Ze=ze;function ge(A){var Ce=parseFloat(A);return isNaN(Ce)?0:Ce}function dt(A,Ce,se){var G=N.useState(0),re=(0,p.Z)(G,2),de=re[0],Se=re[1],ce=(0,N.useRef)(new Map),De=(0,N.useRef)(new Ze),ee=(0,N.useRef)(0);function Be(){ee.current+=1}function he(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Be();var Ne=function(){var tt=!1;ce.current.forEach(function(He,st){if(He&&He.offsetParent){var pt=He.offsetHeight,rn=getComputedStyle(He),Kt=rn.marginTop,Ft=rn.marginBottom,$t=ge(Kt),en=ge(Ft),Ut=pt+$t+en;De.current.get(st)!==Ut&&(De.current.set(st,Ut),tt=!0)}}),tt&&Se(function(He){return He+1})};if(we)Ne();else{ee.current+=1;var Ke=ee.current;Promise.resolve().then(function(){Ke===ee.current&&Ne()})}}function Pe(we,Ne){var Ke=A(we),U=ce.current.get(Ke);Ne?(ce.current.set(Ke,Ne),he()):ce.current.delete(Ke),!U!=!Ne&&(Ne?Ce==null||Ce(we):se==null||se(we))}return(0,N.useEffect)(function(){return Be},[]),[Pe,he,De.current,de]}var Ge=14/15;function Fe(A,Ce,se){var G=(0,N.useRef)(!1),re=(0,N.useRef)(0),de=(0,N.useRef)(0),Se=(0,N.useRef)(null),ce=(0,N.useRef)(null),De,ee=function(we){if(G.current){var Ne=Math.ceil(we.touches[0].pageX),Ke=Math.ceil(we.touches[0].pageY),U=re.current-Ne,tt=de.current-Ke,He=Math.abs(U)>Math.abs(tt);He?re.current=Ne:de.current=Ke;var st=se(He,He?U:tt,!1,we);st&&we.preventDefault(),clearInterval(ce.current),st&&(ce.current=setInterval(function(){He?U*=Ge:tt*=Ge;var pt=Math.floor(He?U:tt);(!se(He,pt,!0)||Math.abs(pt)<=.1)&&clearInterval(ce.current)},16))}},Be=function(){G.current=!1,De()},he=function(we){De(),we.touches.length===1&&!G.current&&(G.current=!0,re.current=Math.ceil(we.touches[0].pageX),de.current=Math.ceil(we.touches[0].pageY),Se.current=we.target,Se.current.addEventListener("touchmove",ee,{passive:!1}),Se.current.addEventListener("touchend",Be,{passive:!0}))};De=function(){Se.current&&(Se.current.removeEventListener("touchmove",ee),Se.current.removeEventListener("touchend",Be))},(0,be.Z)(function(){return A&&Ce.current.addEventListener("touchstart",he,{passive:!0}),function(){var Pe;(Pe=Ce.current)===null||Pe===void 0||Pe.removeEventListener("touchstart",he),De(),clearInterval(ce.current)}},[A])}function le(A){return Math.floor(Math.pow(A,.5))}function _(A,Ce){var se="touches"in A?A.touches[0]:A;return se[Ce?"pageX":"pageY"]-window[Ce?"scrollX":"scrollY"]}function ae(A,Ce,se){N.useEffect(function(){var G=Ce.current;if(A&&G){var re=!1,de,Se,ce=function(){F.Z.cancel(de)},De=function Pe(){ce(),de=(0,F.Z)(function(){se(Se),Pe()})},ee=function(){re=!1,ce()},Be=function(we){if(!(we.target.draggable||we.button!==0)){var Ne=we;Ne._virtualHandled||(Ne._virtualHandled=!0,re=!0)}},he=function(we){if(re){var Ne=_(we,!1),Ke=G.getBoundingClientRect(),U=Ke.top,tt=Ke.bottom;if(Ne<=U){var He=U-Ne;Se=-le(He),De()}else if(Ne>=tt){var st=Ne-tt;Se=le(st),De()}else ce()}};return G.addEventListener("mousedown",Be),G.ownerDocument.addEventListener("mouseup",ee),G.ownerDocument.addEventListener("mousemove",he),G.ownerDocument.addEventListener("dragend",ee),function(){G.removeEventListener("mousedown",Be),G.ownerDocument.removeEventListener("mouseup",ee),G.ownerDocument.removeEventListener("mousemove",he),G.ownerDocument.removeEventListener("dragend",ee),ce()}}},[A])}var X=10;function k(A,Ce,se,G,re,de,Se,ce){var De=N.useRef(),ee=N.useState(null),Be=(0,p.Z)(ee,2),he=Be[0],Pe=Be[1];return(0,be.Z)(function(){if(he&&he.times<X){if(!A.current){Pe(function(In){return(0,C.Z)({},In)});return}de();var we=he.targetAlign,Ne=he.originAlign,Ke=he.index,U=he.offset,tt=A.current.clientHeight,He=!1,st=we,pt=null;if(tt){for(var rn=we||Ne,Kt=0,Ft=0,$t=0,en=Math.min(Ce.length-1,Ke),Ut=0;Ut<=en;Ut+=1){var sn=re(Ce[Ut]);Ft=Kt;var Cn=se.get(sn);$t=Ft+(Cn===void 0?G:Cn),Kt=$t}for(var fn=rn==="top"?U:tt-U,An=en;An>=0;An-=1){var Wn=re(Ce[An]),xn=se.get(Wn);if(xn===void 0){He=!0;break}if(fn-=xn,fn<=0)break}switch(rn){case"top":pt=Ft-U;break;case"bottom":pt=$t-tt+U;break;default:{var Pn=A.current.scrollTop,vn=Pn+tt;Ft<Pn?st="top":$t>vn&&(st="bottom")}}pt!==null&&Se(pt),pt!==he.lastTop&&(He=!0)}He&&Pe((0,C.Z)((0,C.Z)({},he),{},{times:he.times+1,targetAlign:st,lastTop:pt}))}},[he,A.current]),function(we){if(we==null){ce();return}if(F.Z.cancel(De.current),typeof we=="number")Se(we);else if(we&&(0,J.Z)(we)==="object"){var Ne,Ke=we.align;"index"in we?Ne=we.index:Ne=Ce.findIndex(function(He){return re(He)===we.key});var U=we.offset,tt=U===void 0?0:U;Pe({times:0,index:Ne,offset:tt,originAlign:Ke})}}}var We=N.forwardRef(function(A,Ce){var se=A.prefixCls,G=A.rtl,re=A.scrollOffset,de=A.scrollRange,Se=A.onStartMove,ce=A.onStopMove,De=A.onScroll,ee=A.horizontal,Be=A.spinSize,he=A.containerSize,Pe=A.style,we=A.thumbStyle,Ne=A.showScrollBar,Ke=N.useState(!1),U=(0,p.Z)(Ke,2),tt=U[0],He=U[1],st=N.useState(null),pt=(0,p.Z)(st,2),rn=pt[0],Kt=pt[1],Ft=N.useState(null),$t=(0,p.Z)(Ft,2),en=$t[0],Ut=$t[1],sn=!G,Cn=N.useRef(),fn=N.useRef(),An=N.useState(Ne),Wn=(0,p.Z)(An,2),xn=Wn[0],Pn=Wn[1],vn=N.useRef(),In=function(){Ne===!0||Ne===!1||(clearTimeout(vn.current),Pn(!0),vn.current=setTimeout(function(){Pn(!1)},3e3))},wn=de-he||0,pn=he-Be||0,Dn=N.useMemo(function(){if(re===0||wn===0)return 0;var y=re/wn;return y*pn},[re,wn,pn]),on=function(D){D.stopPropagation(),D.preventDefault()},Fn=N.useRef({top:Dn,dragging:tt,pageY:rn,startTop:en});Fn.current={top:Dn,dragging:tt,pageY:rn,startTop:en};var Hn=function(D){He(!0),Kt(_(D,ee)),Ut(Fn.current.top),Se(),D.stopPropagation(),D.preventDefault()};N.useEffect(function(){var y=function(d){d.preventDefault()},D=Cn.current,z=fn.current;return D.addEventListener("touchstart",y,{passive:!1}),z.addEventListener("touchstart",Hn,{passive:!1}),function(){D.removeEventListener("touchstart",y),z.removeEventListener("touchstart",Hn)}},[]);var or=N.useRef();or.current=wn;var gr=N.useRef();gr.current=pn,N.useEffect(function(){if(tt){var y,D=function(d){var x=Fn.current,L=x.dragging,te=x.pageY,$=x.startTop;F.Z.cancel(y);var W=Cn.current.getBoundingClientRect(),ie=he/(ee?W.width:W.height);if(L){var oe=(_(d,ee)-te)*ie,Ae=$;!sn&&ee?Ae-=oe:Ae+=oe;var M=or.current,K=gr.current,Ve=K?Ae/K:0,pe=Math.ceil(Ve*M);pe=Math.max(pe,0),pe=Math.min(pe,M),y=(0,F.Z)(function(){De(pe,ee)})}},z=function(){He(!1),ce()};return window.addEventListener("mousemove",D,{passive:!0}),window.addEventListener("touchmove",D,{passive:!0}),window.addEventListener("mouseup",z,{passive:!0}),window.addEventListener("touchend",z,{passive:!0}),function(){window.removeEventListener("mousemove",D),window.removeEventListener("touchmove",D),window.removeEventListener("mouseup",z),window.removeEventListener("touchend",z),F.Z.cancel(y)}}},[tt]),N.useEffect(function(){return In(),function(){clearTimeout(vn.current)}},[re]),N.useImperativeHandle(Ce,function(){return{delayHidden:In}});var Jt="".concat(se,"-scrollbar"),nt={position:"absolute",visibility:xn?null:"hidden"},_t={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ee?(Object.assign(nt,{height:8,left:0,right:0,bottom:0}),Object.assign(_t,(0,j.Z)({height:"100%",width:Be},sn?"left":"right",Dn))):(Object.assign(nt,(0,j.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(_t,{width:"100%",height:Be,top:Dn})),N.createElement("div",{ref:Cn,className:ye()(Jt,(0,j.Z)((0,j.Z)((0,j.Z)({},"".concat(Jt,"-horizontal"),ee),"".concat(Jt,"-vertical"),!ee),"".concat(Jt,"-visible"),xn)),style:(0,C.Z)((0,C.Z)({},nt),Pe),onMouseDown:on,onMouseMove:In},N.createElement("div",{ref:fn,className:ye()("".concat(Jt,"-thumb"),(0,j.Z)({},"".concat(Jt,"-thumb-moving"),tt)),style:(0,C.Z)((0,C.Z)({},_t),we),onMouseDown:Hn}))}),Te=We,ue=20;function Ie(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se=A/Ce*A;return isNaN(se)&&(se=0),se=Math.max(se,ue),Math.floor(se)}var fe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],xt=[],Dt={overflowY:"auto",overflowAnchor:"none"};function Ct(A,Ce){var se=A.prefixCls,G=se===void 0?"rc-virtual-list":se,re=A.className,de=A.height,Se=A.itemHeight,ce=A.fullHeight,De=ce===void 0?!0:ce,ee=A.style,Be=A.data,he=A.children,Pe=A.itemKey,we=A.virtual,Ne=A.direction,Ke=A.scrollWidth,U=A.component,tt=U===void 0?"div":U,He=A.onScroll,st=A.onVirtualScroll,pt=A.onVisibleChange,rn=A.innerProps,Kt=A.extraRender,Ft=A.styles,$t=A.showScrollBar,en=$t===void 0?"optional":$t,Ut=(0,P.Z)(A,fe),sn=N.useCallback(function(Ue){return typeof Pe=="function"?Pe(Ue):Ue==null?void 0:Ue[Pe]},[Pe]),Cn=dt(sn,null,null),fn=(0,p.Z)(Cn,4),An=fn[0],Wn=fn[1],xn=fn[2],Pn=fn[3],vn=!!(we!==!1&&de&&Se),In=N.useMemo(function(){return Object.values(xn.maps).reduce(function(Ue,$e){return Ue+$e},0)},[xn.id,xn.maps]),wn=vn&&Be&&(Math.max(Se*Be.length,In)>de||!!Ke),pn=Ne==="rtl",Dn=ye()(G,(0,j.Z)({},"".concat(G,"-rtl"),pn),re),on=Be||xt,Fn=(0,N.useRef)(),Hn=(0,N.useRef)(),or=(0,N.useRef)(),gr=(0,N.useState)(0),Jt=(0,p.Z)(gr,2),nt=Jt[0],_t=Jt[1],y=(0,N.useState)(0),D=(0,p.Z)(y,2),z=D[0],h=D[1],d=(0,N.useState)(!1),x=(0,p.Z)(d,2),L=x[0],te=x[1],$=function(){te(!0)},W=function(){te(!1)},ie={getKey:sn};function oe(Ue){_t(function($e){var mt;typeof Ue=="function"?mt=Ue($e):mt=Ue;var bt=Gt(mt);return Fn.current.scrollTop=bt,bt})}var Ae=(0,N.useRef)({start:0,end:on.length}),M=(0,N.useRef)(),K=Z(on,sn),Ve=(0,p.Z)(K,1),pe=Ve[0];M.current=pe;var _e=N.useMemo(function(){if(!vn)return{scrollHeight:void 0,start:0,end:on.length-1,offset:void 0};if(!wn){var Ue;return{scrollHeight:((Ue=Hn.current)===null||Ue===void 0?void 0:Ue.offsetHeight)||0,start:0,end:on.length-1,offset:void 0}}for(var $e=0,mt,bt,hn,xr=on.length,Kn=0;Kn<xr;Kn+=1){var _n=on[Kn],$n=sn(_n),kn=xn.get($n),Mn=$e+(kn===void 0?Se:kn);Mn>=nt&&mt===void 0&&(mt=Kn,bt=$e),Mn>nt+de&&hn===void 0&&(hn=Kn),$e=Mn}return mt===void 0&&(mt=0,bt=0,hn=Math.ceil(de/Se)),hn===void 0&&(hn=on.length-1),hn=Math.min(hn+1,on.length-1),{scrollHeight:$e,start:mt,end:hn,offset:bt}},[wn,vn,nt,on,Pn,de]),Me=_e.scrollHeight,ot=_e.start,Q=_e.end,Ye=_e.offset;Ae.current.start=ot,Ae.current.end=Q,N.useLayoutEffect(function(){var Ue=xn.getRecord();if(Ue.size===1){var $e=Array.from(Ue.keys())[0],mt=Ue.get($e),bt=on[ot];if(bt&&mt===void 0){var hn=sn(bt);if(hn===$e){var xr=xn.get($e),Kn=xr-Se;oe(function(_n){return _n+Kn})}}}xn.resetRecord()},[Me]);var gt=N.useState({width:0,height:de}),Mt=(0,p.Z)(gt,2),qe=Mt[0],ht=Mt[1],zt=function($e){ht({width:$e.offsetWidth,height:$e.offsetHeight})},Oe=(0,N.useRef)(),je=(0,N.useRef)(),at=N.useMemo(function(){return Ie(qe.width,Ke)},[qe.width,Ke]),ft=N.useMemo(function(){return Ie(qe.height,Me)},[qe.height,Me]),Ht=Me-de,kt=(0,N.useRef)(Ht);kt.current=Ht;function Gt(Ue){var $e=Ue;return Number.isNaN(kt.current)||($e=Math.min($e,kt.current)),$e=Math.max($e,0),$e}var Vt=nt<=0,Tt=nt>=Ht,Et=z<=0,Wt=z>=Ke,Ot=S(Vt,Tt,Et,Wt),cn=function(){return{x:pn?-z:z,y:nt}},Nt=(0,N.useRef)(cn()),Zt=(0,b.useEvent)(function(Ue){if(st){var $e=(0,C.Z)((0,C.Z)({},cn()),Ue);(Nt.current.x!==$e.x||Nt.current.y!==$e.y)&&(st($e),Nt.current=$e)}});function an(Ue,$e){var mt=Ue;$e?((0,ve.flushSync)(function(){h(mt)}),Zt()):oe(mt)}function Xt(Ue){var $e=Ue.currentTarget.scrollTop;$e!==nt&&oe($e),He==null||He(Ue),Zt()}var En=function($e){var mt=$e,bt=Ke?Ke-qe.width:0;return mt=Math.max(mt,0),mt=Math.min(mt,bt),mt},Un=(0,b.useEvent)(function(Ue,$e){$e?((0,ve.flushSync)(function(){h(function(mt){var bt=mt+(pn?-Ue:Ue);return En(bt)})}),Zt()):oe(function(mt){var bt=mt+Ue;return bt})}),Rt=I(vn,Vt,Tt,Et,Wt,!!Ke,Un),lt=(0,p.Z)(Rt,2),ut=lt[0],qt=lt[1];Fe(vn,Fn,function(Ue,$e,mt,bt){var hn=bt;return Ot(Ue,$e,mt)?!1:!hn||!hn._virtualHandled?(hn&&(hn._virtualHandled=!0),ut({preventDefault:function(){},deltaX:Ue?$e:0,deltaY:Ue?0:$e}),!0):!1}),ae(wn,Fn,function(Ue){oe(function($e){return $e+Ue})}),(0,be.Z)(function(){function Ue(mt){var bt=Vt&&mt.detail<0,hn=Tt&&mt.detail>0;vn&&!bt&&!hn&&mt.preventDefault()}var $e=Fn.current;return $e.addEventListener("wheel",ut,{passive:!1}),$e.addEventListener("DOMMouseScroll",qt,{passive:!0}),$e.addEventListener("MozMousePixelScroll",Ue,{passive:!1}),function(){$e.removeEventListener("wheel",ut),$e.removeEventListener("DOMMouseScroll",qt),$e.removeEventListener("MozMousePixelScroll",Ue)}},[vn,Vt,Tt]),(0,be.Z)(function(){if(Ke){var Ue=En(z);h(Ue),Zt({x:Ue})}},[qe.width,Ke]);var tn=function(){var $e,mt;($e=Oe.current)===null||$e===void 0||$e.delayHidden(),(mt=je.current)===null||mt===void 0||mt.delayHidden()},Yt=k(Fn,on,xn,Se,sn,function(){return Wn(!0)},oe,tn);N.useImperativeHandle(Ce,function(){return{nativeElement:or.current,getScrollInfo:cn,scrollTo:function($e){function mt(bt){return bt&&(0,J.Z)(bt)==="object"&&("left"in bt||"top"in bt)}mt($e)?($e.left!==void 0&&h(En($e.left)),Yt($e.top)):Yt($e)}}}),(0,be.Z)(function(){if(pt){var Ue=on.slice(ot,Q+1);pt(Ue,on)}},[ot,Q,on]);var At=B(on,sn,xn,Se),ln=Kt==null?void 0:Kt({start:ot,end:Q,virtual:wn,offsetX:z,offsetY:Ye,rtl:pn,getSize:At}),gn=et(on,ot,Q,Ke,z,An,he,ie),mn=null;de&&(mn=(0,C.Z)((0,j.Z)({},De?"height":"maxHeight",de),Dt),vn&&(mn.overflowY="hidden",Ke&&(mn.overflowX="hidden"),L&&(mn.pointerEvents="none")));var Ln={};return pn&&(Ln.dir="rtl"),N.createElement("div",(0,E.Z)({ref:or,style:(0,C.Z)((0,C.Z)({},ee),{},{position:"relative"}),className:Dn},Ln,Ut),N.createElement(q.Z,{onResize:zt},N.createElement(tt,{className:"".concat(G,"-holder"),style:mn,ref:Fn,onScroll:Xt,onMouseEnter:tn},N.createElement(V,{prefixCls:G,height:Me,offsetX:z,offsetY:Ye,scrollWidth:Ke,onInnerResize:Wn,ref:Hn,innerProps:rn,rtl:pn,extra:ln},gn))),wn&&Me>de&&N.createElement(Te,{ref:Oe,prefixCls:G,scrollOffset:nt,scrollRange:Me,rtl:pn,onScroll:an,onStartMove:$,onStopMove:W,spinSize:ft,containerSize:qe.height,style:Ft==null?void 0:Ft.verticalScrollBar,thumbStyle:Ft==null?void 0:Ft.verticalScrollBarThumb,showScrollBar:en}),wn&&Ke>qe.width&&N.createElement(Te,{ref:je,prefixCls:G,scrollOffset:z,scrollRange:Ke,rtl:pn,onScroll:an,onStartMove:$,onStopMove:W,spinSize:at,containerSize:qe.width,horizontal:!0,style:Ft==null?void 0:Ft.horizontalScrollBar,thumbStyle:Ft==null?void 0:Ft.horizontalScrollBarThumb,showScrollBar:en}))}var Je=N.forwardRef(Ct);Je.displayName="List";var It=Je,it=It},16722:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ye}});const E=q=>typeof q=="object"&&q!=null&&q.nodeType===1,J=(q,b)=>(!b||q!=="hidden")&&q!=="visible"&&q!=="clip",C=(q,b)=>{if(q.clientHeight<q.scrollHeight||q.clientWidth<q.scrollWidth){const be=getComputedStyle(q,null);return J(be.overflowY,b)||J(be.overflowX,b)||(N=>{const ve=(Ee=>{if(!Ee.ownerDocument||!Ee.ownerDocument.defaultView)return null;try{return Ee.ownerDocument.defaultView.frameElement}catch(V){return null}})(N);return!!ve&&(ve.clientHeight<N.scrollHeight||ve.clientWidth<N.scrollWidth)})(q)}return!1},j=(q,b,be,N,ve,Ee,V,Xe)=>Ee<q&&V>b||Ee>q&&V<b?0:Ee<=q&&Xe<=be||V>=b&&Xe>=be?Ee-q-N:V>b&&Xe<be||Ee<q&&Xe>be?V-b+ve:0,p=q=>{const b=q.parentElement;return b==null?q.getRootNode().host||null:b},P=(q,b)=>{var be,N,ve,Ee;if(typeof document=="undefined")return[];const{scrollMode:V,block:Xe,inline:et,boundary:yt,skipOverflowHiddenElements:Lt}=b,Z=typeof yt=="function"?yt:Te=>Te!==yt;if(!E(q))throw new TypeError("Invalid target");const F=document.scrollingElement||document.documentElement,m=[];let c=q;for(;E(c)&&Z(c);){if(c=p(c),c===F){m.push(c);break}c!=null&&c===document.body&&C(c)&&!C(document.documentElement)||c!=null&&C(c,Lt)&&m.push(c)}const S=(N=(be=window.visualViewport)==null?void 0:be.width)!=null?N:innerWidth,I=(Ee=(ve=window.visualViewport)==null?void 0:ve.height)!=null?Ee:innerHeight,{scrollX:B,scrollY:R}=window,{height:ne,width:ze,top:Ze,right:ge,bottom:dt,left:Ge}=q.getBoundingClientRect(),{top:Fe,right:le,bottom:_,left:ae}=(Te=>{const ue=window.getComputedStyle(Te);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(q);let X=Xe==="start"||Xe==="nearest"?Ze-Fe:Xe==="end"?dt+_:Ze+ne/2-Fe+_,k=et==="center"?Ge+ze/2-ae+le:et==="end"?ge+le:Ge-ae;const We=[];for(let Te=0;Te<m.length;Te++){const ue=m[Te],{height:Ie,width:fe,top:xt,right:Dt,bottom:Ct,left:Je}=ue.getBoundingClientRect();if(V==="if-needed"&&Ze>=0&&Ge>=0&&dt<=I&&ge<=S&&(ue===F&&!C(ue)||Ze>=xt&&dt<=Ct&&Ge>=Je&&ge<=Dt))return We;const It=getComputedStyle(ue),it=parseInt(It.borderLeftWidth,10),A=parseInt(It.borderTopWidth,10),Ce=parseInt(It.borderRightWidth,10),se=parseInt(It.borderBottomWidth,10);let G=0,re=0;const de="offsetWidth"in ue?ue.offsetWidth-ue.clientWidth-it-Ce:0,Se="offsetHeight"in ue?ue.offsetHeight-ue.clientHeight-A-se:0,ce="offsetWidth"in ue?ue.offsetWidth===0?0:fe/ue.offsetWidth:0,De="offsetHeight"in ue?ue.offsetHeight===0?0:Ie/ue.offsetHeight:0;if(F===ue)G=Xe==="start"?X:Xe==="end"?X-I:Xe==="nearest"?j(R,R+I,I,A,se,R+X,R+X+ne,ne):X-I/2,re=et==="start"?k:et==="center"?k-S/2:et==="end"?k-S:j(B,B+S,S,it,Ce,B+k,B+k+ze,ze),G=Math.max(0,G+R),re=Math.max(0,re+B);else{G=Xe==="start"?X-xt-A:Xe==="end"?X-Ct+se+Se:Xe==="nearest"?j(xt,Ct,Ie,A,se+Se,X,X+ne,ne):X-(xt+Ie/2)+Se/2,re=et==="start"?k-Je-it:et==="center"?k-(Je+fe/2)+de/2:et==="end"?k-Dt+Ce+de:j(Je,Dt,fe,it,Ce+de,k,k+ze,ze);const{scrollLeft:ee,scrollTop:Be}=ue;G=De===0?0:Math.max(0,Math.min(Be+G/De,ue.scrollHeight-Ie/De+Se)),re=ce===0?0:Math.max(0,Math.min(ee+re/ce,ue.scrollWidth-fe/ce+de)),X+=Be-G,k+=ee-re}We.push({el:ue,top:G,left:re})}return We},T=q=>q===!1?{block:"end",inline:"nearest"}:(b=>b===Object(b)&&Object.keys(b).length!==0)(q)?q:{block:"start",inline:"nearest"};function ye(q,b){if(!q.isConnected||!(ve=>{let Ee=ve;for(;Ee&&Ee.parentNode;){if(Ee.parentNode===document)return!0;Ee=Ee.parentNode instanceof ShadowRoot?Ee.parentNode.host:Ee.parentNode}return!1})(q))return;const be=(ve=>{const Ee=window.getComputedStyle(ve);return{top:parseFloat(Ee.scrollMarginTop)||0,right:parseFloat(Ee.scrollMarginRight)||0,bottom:parseFloat(Ee.scrollMarginBottom)||0,left:parseFloat(Ee.scrollMarginLeft)||0}})(q);if((ve=>typeof ve=="object"&&typeof ve.behavior=="function")(b))return b.behavior(P(q,b));const N=typeof b=="boolean"||b==null?void 0:b.behavior;for(const{el:ve,top:Ee,left:V}of P(q,T(b))){const Xe=Ee-be.top+be.bottom,et=V-be.left+be.right;ve.scroll({top:Xe,left:et,behavior:N})}}}}]);
|