|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},84105:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},73331:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},15277:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},61485:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},47472:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(14809),H=f(59301),x={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"},K=x,p=f(7657),D=function(S,Ce){return H.createElement(p.Z,(0,L.Z)({},S,{ref:Ce,icon:K}))},P=H.forwardRef(D),pe=P},8336:function(){"use strict"},12469:function(){"use strict"},81705:function(nn,xe,f){"use strict";f.d(xe,{t:function(){return N}});var L=f(59301),H=f(3113),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},K=f(92310),p=f.n(K),D=Object.defineProperty,P=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,S=(fe,Oe,G)=>Oe in fe?D(fe,Oe,{enumerable:!0,configurable:!0,writable:!0,value:G}):fe[Oe]=G,Ce=(fe,Oe)=>{for(var G in Oe||(Oe={}))pe.call(Oe,G)&&S(fe,G,Oe[G]);if(P)for(var G of P(Oe))te.call(Oe,G)&&S(fe,G,Oe[G]);return fe};const N=({cancelText:fe="\u53D6\u6D88",okText:Oe="\u786E\u5B9A",loading:G=!1,hasOkBtn:Ve=!0,hasCancelBtn:qe=!0,okButtonProps:vt={},onCancel:It=()=>{},onOk:ee=()=>{},className:A=""})=>L.createElement("div",{className:p()(x.buttonFixed,A)},L.createElement("div",{className:x.buttonWrap},qe&&L.createElement(H.ZP,{size:"middle",className:`${x.button} mr20`,onClick:It},fe),Ve&&L.createElement(H.ZP,Ce({size:"middle",type:"primary",className:`${x.button} mr20`,loading:G,onClick:ee},vt),Oe)))},69720:function(nn,xe,f){"use strict";f.d(xe,{h:function(){return A}});var L=f(59301),H=f(57809),x=f(78241),K=f(3113),p=f(89780),D=f.n(p),P=f(8336),pe=f(12469),te=Object.defineProperty,S=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,G=(m,c,b)=>c in m?te(m,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):m[c]=b,Ve=(m,c)=>{for(var b in c||(c={}))fe.call(c,b)&&G(m,b,c[b]);if(N)for(var b of N(c))Oe.call(c,b)&&G(m,b,c[b]);return m},qe=(m,c)=>S(m,Ce(c));const vt=H.default.Option,It={labelCol:{span:4},wrapperCol:{span:20}},ee={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[b,O]=(0,L.useState)("python");function j(ge){O(ee[ge][1])}function M(ge){m(ge)}return L.createElement(x.default,qe(Ve({},It),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M,style:{width:500}}),L.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},L.createElement(H.default,{getPopupContainer:ge=>ge.parentNode,onChange:j},Object.keys(ee).map(ge=>L.createElement(vt,{key:ge,value:ge},ee[ge][0])))),L.createElement(x.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},L.createElement(A,{mode:b})),L.createElement("div",{className:"flex-container flex-end"},L.createElement(K.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.createElement(K.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function A({value:m,onChange:c,mode:b,options:O={}}){const j=(0,L.useRef)(),[M,ge]=(0,L.useState)();return(0,L.useEffect)(()=>{if(M){let Me=function(ze){const be=ze.getValue();c&&c(be)};return M.on("change",Me),()=>{M.off("change",Me)}}},[M,c]),(0,L.useEffect)(()=>{M&&M.setOption("mode",b)},[M,b]),(0,L.useEffect)(()=>{M&&(m!==M.getValue()||m==="")&&setTimeout(()=>{M.setValue(m||"")},300)},[M,m]),(0,L.useEffect)(()=>{if(j.current&&!M){const Me=D().fromTextArea(j.current,Ve({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},O));ge(Me)}},[j.current,M]),L.createElement("div",{className:"my-codemirror-container"},L.createElement("textarea",{ref:j}))}},87580:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{default:function(){return ee}});var L=f(32162),H=f(59301),x=f(25690),K=f(78241),p=f(92832),D=f(69720),P=f(81705),pe={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},te=Object.defineProperty,S=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,fe=(A,m,c)=>m in A?te(A,m,{enumerable:!0,configurable:!0,writable:!0,value:c}):A[m]=c,Oe=(A,m)=>{for(var c in m||(m={}))Ce.call(m,c)&&fe(A,c,m[c]);if(S)for(var c of S(m))N.call(m,c)&&fe(A,c,m[c]);return A},G=(A,m)=>{var c={};for(var b in A)Ce.call(A,b)&&m.indexOf(b)<0&&(c[b]=A[b]);if(A!=null&&S)for(var b of S(A))m.indexOf(b)<0&&N.call(A,b)&&(c[b]=A[b]);return c},Ve=(A,m,c)=>new Promise((b,O)=>{var j=Me=>{try{ge(c.next(Me))}catch(ze){O(ze)}},M=Me=>{try{ge(c.throw(Me))}catch(ze){O(ze)}},ge=Me=>Me.done?b(Me.value):Promise.resolve(Me.value).then(j,M);ge((c=c.apply(A,m)).next())});const qe=A=>{var m=A,{shixunsDetail:c,globalSetting:b,loading:O,user:j,dispatch:M}=m,ge=G(m,["shixunsDetail","globalSetting","loading","user","dispatch"]);const Me=(0,x.useLocation)(),[ze,be]=(0,H.useState)({}),pt=(0,H.useRef)(),Ke=(0,H.useRef)(),[Ge]=K.default.useForm(),[J,U]=(0,H.useState)("");(0,H.useEffect)(()=>(M({type:"globalSetting/footerToggle",payload:!1}),()=>{M({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,H.useEffect)(()=>{const k=sessionStorage.getItem("pathArray");if(k){const Ie=k.split(",").join("/"),Te=Ie.indexOf("/")===0?Ie.substr(1):Ie;U(Te)}},[]),(0,H.useEffect)(()=>{var k,Ie,Te,re;Ke.current=(Ie=(k=Me.pathname)==null?void 0:k.split("/"))==null?void 0:Ie[2],pt.current=((re=(Te=Me.pathname)==null?void 0:Te.split("/"))==null?void 0:re[3])==="repository"},[]);const ae=(...k)=>Ve(void 0,[...k],function*(Ie={}){if(yield M({type:"shixunsDetail/addRepositoryFile",payload:{id:Ke.current,message:Ie.commitMessage,content:Ie.codeMirror,path:`${J?`${J}/`:""}${Ie.path||""}`,secret_repository:pt.current?void 0:!0}})){const re=pt.current?`/shixuns/${Ke.current}/repository${J?`/master/shixun_show/${J}`:""}`:`/shixuns/${Ke.current}/secret_repository`;x.history.replace(re)}}),ne=()=>{var k,Ie;x.history.push(`/shixuns/${Ke.current}/${(Ie=(k=Me.pathname)==null?void 0:k.split("/"))==null?void 0:Ie[3]}${J?`/master/shixun_show/${J}`:""}`)};return H.createElement("section",{className:pe.bg},H.createElement("div",{className:pe.wrap},H.createElement("div",{className:pe.title},"\u65B0\u5EFA\u6587\u4EF6"),H.createElement(K.default,{className:"mt10",form:Ge,scrollToFirstError:!0,layout:"vertical",onFinish:ae,onValuesChange:()=>be(Oe({},Ge.getFieldsValue()))},H.createElement(K.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},H.createElement(K.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},H.createElement("span",null,H.createElement("span",{className:"mr5"},J?`${J}/`:""),H.createElement(p.default,{className:pe.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),H.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")),H.createElement(K.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"}]},H.createElement(p.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"})),H.createElement("div",{className:"mt10 mb20"},H.createElement(K.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},H.createElement(D.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"]}}))),H.createElement(K.default.Item,{noStyle:!0},H.createElement(P.t,{okButtonProps:{htmlType:"submit"},onCancel:ne})))))};var vt=(0,x.connect)(({shixunsDetail:A,loading:m,globalSetting:c,user:b})=>({shixunsDetail:A,globalSetting:c,user:b,loading:m.models.index}))(qe);const It=({globalSetting:A})=>{var m;switch(Number((m=A==null?void 0:A.setting)==null?void 0:m.theme)){case L.Fy.THEMEONE:return H.createElement(vt,null);case L.Fy.DEFAULT:default:return H.createElement(ee,null)}};var ee=(0,x.connect)(({globalSetting:A})=>({globalSetting:A}))(It)},19080:function(nn,xe,f){"use strict";f.d(xe,{F:function(){return p},Z:function(){return K}});var L=f(92310),H=f.n(L);const x=null;function K(D,P,pe){return H()({[`${D}-status-success`]:P==="success",[`${D}-status-warning`]:P==="warning",[`${D}-status-error`]:P==="error",[`${D}-status-validating`]:P==="validating",[`${D}-has-feedback`]:pe})}const p=(D,P)=>P||D},93891:function(nn,xe,f){"use strict";var L=f(59301),H=f(36355),x=f(64165);const K=p=>{const{componentName:D}=p,{getPrefixCls:P}=(0,L.useContext)(H.E_),pe=P("empty");switch(D){case"Table":case"List":return L.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return L.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE,className:`${pe}-small`});default:return L.createElement(x.Z,null)}};xe.Z=K},64165:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return ee}});var L=f(92310),H=f.n(L),x=f(59301),K=f(36355),p=f(9763),D=f(64993),P=f(88088),te=()=>{const[,A]=(0,P.Z)(),c=new D.C(A.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return x.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{fill:"none",fillRule:"evenodd"},x.createElement("g",{transform:"translate(24 31.67)"},x.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),x.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"}),x.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)"}),x.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"}),x.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"})),x.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"}),x.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},x.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),x.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ce=()=>{const[,A]=(0,P.Z)(),{colorFill:m,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:O}=A,{borderColor:j,shadowColor:M,contentColor:ge}=(0,x.useMemo)(()=>({borderColor:new D.C(m).onBackground(O).toHexShortString(),shadowColor:new D.C(c).onBackground(O).toHexShortString(),contentColor:new D.C(b).onBackground(O).toHexShortString()}),[m,c,b,O]);return x.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},x.createElement("ellipse",{fill:M,cx:"32",cy:"33",rx:"32",ry:"7"}),x.createElement("g",{fillRule:"nonzero",stroke:j},x.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"}),x.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:ge}))))},N=f(83116),fe=f(37613);const Oe=A=>{const{componentCls:m,margin:c,marginXS:b,marginXL:O,fontSize:j,lineHeight:M}=A;return{[m]:{marginInline:b,fontSize:j,lineHeight:M,textAlign:"center",[`${m}-image`]:{height:A.emptyImgHeight,marginBottom:b,opacity:A.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${m}-description`]:{color:A.colorText},[`${m}-footer`]:{marginTop:c},"&-normal":{marginBlock:O,color:A.colorTextDisabled,[`${m}-description`]:{color:A.colorTextDisabled},[`${m}-image`]:{height:A.emptyImgHeightMD}},"&-small":{marginBlock:b,color:A.colorTextDisabled,[`${m}-image`]:{height:A.emptyImgHeightSM}}}}};var G=(0,N.Z)("Empty",A=>{const{componentCls:m,controlHeightLG:c}=A,b=(0,fe.TS)(A,{emptyImgCls:`${m}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Oe(b)]}),Ve=function(A,m){var c={};for(var b in A)Object.prototype.hasOwnProperty.call(A,b)&&m.indexOf(b)<0&&(c[b]=A[b]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function")for(var O=0,b=Object.getOwnPropertySymbols(A);O<b.length;O++)m.indexOf(b[O])<0&&Object.prototype.propertyIsEnumerable.call(A,b[O])&&(c[b[O]]=A[b[O]]);return c};const qe=x.createElement(te,null),vt=x.createElement(Ce,null),It=A=>{var{className:m,rootClassName:c,prefixCls:b,image:O=qe,description:j,children:M,imageStyle:ge,style:Me}=A,ze=Ve(A,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:be,direction:pt,empty:Ke}=x.useContext(K.E_),Ge=be("empty",b),[J,U]=G(Ge),[ae]=(0,p.Z)("Empty"),ne=typeof j!="undefined"?j:ae==null?void 0:ae.description,k=typeof ne=="string"?ne:"empty";let Ie=null;return typeof O=="string"?Ie=x.createElement("img",{alt:k,src:O}):Ie=O,J(x.createElement("div",Object.assign({className:H()(U,Ge,Ke==null?void 0:Ke.className,{[`${Ge}-normal`]:O===vt,[`${Ge}-rtl`]:pt==="rtl"},m,c),style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),Me)},ze),x.createElement("div",{className:`${Ge}-image`,style:ge},Ie),ne&&x.createElement("div",{className:`${Ge}-description`},ne),M&&x.createElement("div",{className:`${Ge}-footer`},M)))};It.PRESENTED_IMAGE_DEFAULT=qe,It.PRESENTED_IMAGE_SIMPLE=vt;var ee=It},78241:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return Wt}});var L=f(95190),H=f(92310),x=f.n(H),K=f(77900),p=f(59301),D=f(62892),P=f(32441);function pe(g){const[T,W]=p.useState(g);return p.useEffect(()=>{const d=setTimeout(()=>{W(g)},g.length?0:10);return()=>{clearTimeout(d)}},[g]),T}var te=f(17313),S=f(29878),Ce=f(8378),N=f(37613),fe=f(83116),G=g=>{const{componentCls:T}=g,W=`${T}-show-help`,d=`${T}-show-help-item`;return{[W]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[d]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${d}-appear, &${d}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${d}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Ve=g=>({legend:{display:"block",width:"100%",marginBottom:g.marginLG,padding:0,color:g.colorTextDescription,fontSize:g.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`},label:{fontSize:g.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 ${g.controlOutlineWidth}px ${g.controlOutline}`},output:{display:"block",paddingTop:15,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight}}),qe=(g,T)=>{const{formItemCls:W}=g;return{[W]:{[`${W}-label > label`]:{height:T},[`${W}-control-input`]:{minHeight:T}}}},vt=g=>{const{componentCls:T}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,te.Wf)(g)),Ve(g)),{[`${T}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},qe(g,g.controlHeightSM)),"&-large":Object.assign({},qe(g,g.controlHeightLG))})}},It=g=>{const{formItemCls:T,iconCls:W,componentCls:d,rootPrefixCls:h,labelRequiredMarkColor:C,labelColor:R,labelFontSize:Q,labelHeight:B,labelColonMarginInlineStart:$,labelColonMarginInlineEnd:ue,itemMarginBottom:oe}=g;return{[T]:Object.assign(Object.assign({},(0,te.Wf)(g)),{marginBottom:oe,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${h}-row`]:{display:"none"},"&-has-warning":{[`${T}-split`]:{color:g.colorError}},"&-has-error":{[`${T}-split`]:{color:g.colorWarning}},[`${T}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${g.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:B,color:R,fontSize:Q,[`> ${W}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${T}-required:not(${T}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:C,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${d}-hide-required-mark &`]:{display:"none"}},[`${T}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${d}-hide-required-mark &`]:{display:"none"}},[`${T}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:$,marginInlineEnd:ue},[`&${T}-no-colon::after`]:{content:'"\\a0"'}}},[`${T}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${h}-col-'"]):not([class*="' ${h}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[T]:{"&-explain, &-extra":{clear:"both",color:g.colorTextDescription,fontSize:g.fontSize,lineHeight:g.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:g.controlHeightSM,transition:`color ${g.motionDurationMid} ${g.motionEaseOut}`},"&-explain":{"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning}}},[`&-with-help ${T}-explain`]:{height:"auto",opacity:1},[`${T}-feedback-icon`]:{fontSize:g.fontSize,textAlign:"center",visibility:"visible",animationName:S.kr,animationDuration:g.motionDurationMid,animationTimingFunction:g.motionEaseOutBack,pointerEvents:"none","&-success":{color:g.colorSuccess},"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning},"&-validating":{color:g.colorPrimary}}})}},ee=g=>{const{componentCls:T,formItemCls:W}=g;return{[`${T}-horizontal`]:{[`${W}-label`]:{flexGrow:0},[`${W}-control`]:{flex:"1 1 0",minWidth:0},[`${W}-label[class$='-24'], ${W}-label[class*='-24 ']`]:{[`& + ${W}-control`]:{minWidth:"unset"}}}}},A=g=>{const{componentCls:T,formItemCls:W}=g;return{[`${T}-inline`]:{display:"flex",flexWrap:"wrap",[W]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${W}-label,
|
|
|
> ${W}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${W}-label`]:{flex:"none"},[`${T}-text`]:{display:"inline-block"},[`${W}-has-feedback`]:{display:"inline-block"}}}}},m=g=>({padding:g.verticalLabelPadding,margin:g.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=g=>{const{componentCls:T,formItemCls:W,rootPrefixCls:d}=g;return{[`${W} ${W}-label`]:m(g),[T]:{[W]:{flexWrap:"wrap",[`${W}-label, ${W}-control`]:{[`&:not([class*=" ${d}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:T,formItemCls:W,rootPrefixCls:d}=g;return{[`${T}-vertical`]:{[W]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${T}-item-control`]:{width:"100%"}}},[`${T}-vertical ${W}-label,
|
|
|
.${d}-col-24${W}-label,
|
|
|
.${d}-col-xl-24${W}-label`]:m(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[T]:{[`.${d}-col-xs-24${W}-label`]:m(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[T]:{[`.${d}-col-sm-24${W}-label`]:m(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[T]:{[`.${d}-col-md-24${W}-label`]:m(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[T]:{[`.${d}-col-lg-24${W}-label`]:m(g)}}}},O=(g,T)=>(0,N.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:T});var j=(0,fe.Z)("Form",(g,T)=>{let{rootPrefixCls:W}=T;const d=O(g,W);return[vt(d),It(d),G(d),ee(d),A(d),b(d),(0,Ce.Z)(d),S.kr]},g=>({labelRequiredMarkColor:g.colorError,labelColor:g.colorTextHeading,labelFontSize:g.fontSize,labelHeight:g.controlHeight,labelColonMarginInlineStart:g.marginXXS/2,labelColonMarginInlineEnd:g.marginXS,itemMarginBottom:g.marginLG,verticalLabelPadding:`0 0 ${g.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const M=[];function ge(g,T,W){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${T}-${d}`,error:g,errorStatus:W}}var ze=g=>{let{help:T,helpStatus:W,errors:d=M,warnings:h=M,className:C,fieldId:R,onVisibleChanged:Q}=g;const{prefixCls:B}=p.useContext(P.Rk),$=`${B}-item-explain`,[,ue]=j(B),oe=(0,p.useMemo)(()=>(0,D.Z)(B),[B]),We=pe(d),I=pe(h),Z=p.useMemo(()=>T!=null?[ge(T,"help",W)]:[].concat((0,L.Z)(We.map((me,Ze)=>ge(me,"error","error",Ze))),(0,L.Z)(I.map((me,Ze)=>ge(me,"warning","warning",Ze)))),[T,W,We,I]),je={};return R&&(je.id=`${R}_help`),p.createElement(K.default,{motionDeadline:oe.motionDeadline,motionName:`${B}-show-help`,visible:!!Z.length,onVisibleChanged:Q},me=>{const{className:Ze,style:Ne}=me;return p.createElement("div",Object.assign({},je,{className:x()($,Ze,C,ue),style:Ne,role:"alert"}),p.createElement(K.CSSMotionList,Object.assign({keys:Z},(0,D.Z)(B),{motionName:`${B}-show-help-item`,component:!1}),st=>{const{key:Y,error:se,errorStatus:Ae,className:nt,style:Ue}=st;return p.createElement("div",{key:Y,className:x()(nt,{[`${$}-${Ae}`]:Ae}),style:Ue},se)}))})},be=f(95013),pt=f(36355),Ke=f(1684),Ge=f(52946),J=f(19716),U=f(16722);const ae=["parentNode"],ne="form_item";function k(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function Ie(g,T){if(!g.length)return;const W=g.join("_");return T?`${T}_${W}`:ae.includes(W)?`${ne}_${W}`:W}function Te(g,T,W,d,h,C){let R=d;return C!==void 0?R=C:W.validating?R="validating":g.length?R="error":T.length?R="warning":(W.touched||h&&W.validated)&&(R="success"),R}function re(g){return k(g).join("_")}function De(g){const[T]=(0,be.useForm)(),W=p.useRef({}),d=p.useMemo(()=>g!=null?g:Object.assign(Object.assign({},T),{__INTERNAL__:{itemRef:h=>C=>{const R=re(h);C?W.current[R]=C:delete W.current[R]}},scrollToField:function(h){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const R=k(h),Q=Ie(R,d.__INTERNAL__.name),B=Q?document.getElementById(Q):null;B&&(0,U.Z)(B,Object.assign({scrollMode:"if-needed",block:"nearest"},C))},getFieldInstance:h=>{const C=re(h);return W.current[C]}}),[g,T]);return[d]}var de=f(28726),yt=function(g,T){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&T.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)T.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};const Tt=(g,T)=>{const W=p.useContext(Ke.Z),{getPrefixCls:d,direction:h,form:C}=p.useContext(pt.E_),{prefixCls:R,className:Q,rootClassName:B,size:$,disabled:ue=W,form:oe,colon:We,labelAlign:I,labelWrap:Z,labelCol:je,wrapperCol:me,hideRequiredMark:Ze,layout:Ne="horizontal",scrollToFirstError:st,requiredMark:Y,onFinishFailed:se,name:Ae,style:nt,feedbackIcons:Ue}=g,ot=yt(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),jt=(0,J.Z)($),Mt=p.useContext(de.Z),Ft=(0,p.useMemo)(()=>Y!==void 0?Y:C&&C.requiredMark!==void 0?C.requiredMark:!Ze,[Ze,Y,C]),$t=We!=null?We:C==null?void 0:C.colon,xt=d("form",R),[qt,Ut]=j(xt),_t=x()(xt,`${xt}-${Ne}`,{[`${xt}-hide-required-mark`]:Ft===!1,[`${xt}-rtl`]:h==="rtl",[`${xt}-${jt}`]:jt},Ut,C==null?void 0:C.className,Q,B),[kt]=De(oe),{__INTERNAL__:Rt}=kt;Rt.name=Ae;const Ct=(0,p.useMemo)(()=>({name:Ae,labelAlign:I,labelCol:je,labelWrap:Z,wrapperCol:me,vertical:Ne==="vertical",colon:$t,requiredMark:Ft,itemRef:Rt.itemRef,form:kt,feedbackIcons:Ue}),[Ae,I,je,me,Ne,$t,Ft,kt,Ue]);p.useImperativeHandle(T,()=>kt);const zt=(fn,Pt)=>{if(fn){let Ht={block:"nearest"};typeof fn=="object"&&(Ht=fn),kt.scrollToField(Pt,Ht)}},wt=fn=>{if(se==null||se(fn),fn.errorFields.length){const Pt=fn.errorFields[0].name;if(st!==void 0){zt(st,Pt);return}C&&C.scrollToFirstError!==void 0&&zt(C.scrollToFirstError,Pt)}};return qt(p.createElement(Ke.n,{disabled:ue},p.createElement(Ge.q,{size:jt},p.createElement(P.RV,Object.assign({},{validateMessages:Mt}),p.createElement(P.q3.Provider,{value:Ct},p.createElement(be.default,Object.assign({id:Ae},ot,{name:Ae,onFinishFailed:wt,form:kt,style:Object.assign(Object.assign({},C==null?void 0:C.style),nt),className:_t})))))))};var Je=p.forwardRef(Tt),Et=f(41799),it=f(8654),F=f(92343),we=f(11592);function le(g){if(typeof g=="function")return g;const T=(0,we.Z)(g);return T.length<=1?T[0]:T}const V=()=>{const{status:g,errors:T=[],warnings:W=[]}=(0,p.useContext)(P.aM);return{status:g,errors:T,warnings:W}};V.Context=P.aM;var ie=V,he=f(16089);function Se(g){const[T,W]=p.useState(g),d=(0,p.useRef)(null),h=(0,p.useRef)([]),C=(0,p.useRef)(!1);p.useEffect(()=>(C.current=!1,()=>{C.current=!0,he.Z.cancel(d.current),d.current=null}),[]);function R(Q){C.current||(d.current===null&&(h.current=[],d.current=(0,he.Z)(()=>{d.current=null,W(B=>{let $=B;return h.current.forEach(ue=>{$=ue($)}),$})})),h.current.push(Q))}return[T,R]}function ve(){const{itemRef:g}=p.useContext(P.q3),T=p.useRef({});function W(d,h){const C=h&&typeof h=="object"&&h.ref,R=d.join("_");return(T.current.name!==R||T.current.originRef!==C)&&(T.current.name=R,T.current.originRef=C,T.current.ref=(0,it.sQ)(g(d),C)),T.current.ref}return W}var Pe=f(29194),q=f(34280),Xe=f(2738),ce=f(27382),Re=f(37028);const Le=g=>{const{formItemCls:T}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${T}-control`]:{display:"flex"}}}};var Ee=(0,fe.b)(["Form","item-item"],(g,T)=>{let{rootPrefixCls:W}=T;const d=O(g,W);return[Le(d)]}),_=g=>{const{prefixCls:T,status:W,wrapperCol:d,children:h,errors:C,warnings:R,_internalItemRender:Q,extra:B,help:$,fieldId:ue,marginBottom:oe,onErrorVisibleChanged:We}=g,I=`${T}-item`,Z=p.useContext(P.q3),je=d||Z.wrapperCol||{},me=x()(`${I}-control`,je.className),Ze=p.useMemo(()=>Object.assign({},Z),[Z]);delete Ze.labelCol,delete Ze.wrapperCol;const Ne=p.createElement("div",{className:`${I}-control-input`},p.createElement("div",{className:`${I}-control-input-content`},h)),st=p.useMemo(()=>({prefixCls:T,status:W}),[T,W]),Y=oe!==null||C.length||R.length?p.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},p.createElement(P.Rk.Provider,{value:st},p.createElement(ze,{fieldId:ue,errors:C,warnings:R,help:$,helpStatus:W,className:`${I}-explain-connected`,onVisibleChanged:We})),!!oe&&p.createElement("div",{style:{width:0,height:oe}})):null,se={};ue&&(se.id=`${ue}_extra`);const Ae=B?p.createElement("div",Object.assign({},se,{className:`${I}-extra`}),B):null,nt=Q&&Q.mark==="pro_table_render"&&Q.render?Q.render(g,{input:Ne,errorList:Y,extra:Ae}):p.createElement(p.Fragment,null,Ne,Y,Ae);return p.createElement(P.q3.Provider,{value:Ze},p.createElement(Re.Z,Object.assign({},je,{className:me}),nt),p.createElement(Ee,{prefixCls:T}))},et=f(61485),Be=f(31724),lt=f(9763),ft=f(6848),rn=function(g,T){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&T.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)T.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function Zt(g){return g?typeof g=="object"&&!p.isValidElement(g)?g:{title:g}:null}var Dt=g=>{let{prefixCls:T,label:W,htmlFor:d,labelCol:h,labelAlign:C,colon:R,required:Q,requiredMark:B,tooltip:$}=g;var ue;const[oe]=(0,lt.Z)("Form"),{vertical:We,labelAlign:I,labelCol:Z,labelWrap:je,colon:me}=p.useContext(P.q3);if(!W)return null;const Ze=h||Z||{},Ne=C||I,st=`${T}-item-label`,Y=x()(st,Ne==="left"&&`${st}-left`,Ze.className,{[`${st}-wrap`]:!!je});let se=W;const Ae=R===!0||me!==!1&&R!==!1;Ae&&!We&&typeof W=="string"&&W.trim()!==""&&(se=W.replace(/[:|:]\s*$/,""));const Ue=Zt($);if(Ue){const{icon:Ft=p.createElement(et.Z,null)}=Ue,$t=rn(Ue,["icon"]),xt=p.createElement(ft.Z,Object.assign({},$t),p.cloneElement(Ft,{className:`${T}-item-tooltip`,title:""}));se=p.createElement(p.Fragment,null,se,xt)}const ot=B==="optional",jt=typeof B=="function";jt?se=B(se,{required:!!Q}):ot&&!Q&&(se=p.createElement(p.Fragment,null,se,p.createElement("span",{className:`${T}-item-optional`,title:""},(oe==null?void 0:oe.optional)||((ue=Be.Z.Form)===null||ue===void 0?void 0:ue.optional))));const Mt=x()({[`${T}-item-required`]:Q,[`${T}-item-required-mark-optional`]:ot||jt,[`${T}-item-no-colon`]:!Ae});return p.createElement(Re.Z,Object.assign({},Ze,{className:Y}),p.createElement("label",{htmlFor:d,className:Mt,title:typeof W=="string"?W:""},se))},Xt=f(29679),Yt=f(19248),sn=f(96512),Cn=f(58617);const un={success:Xt.Z,warning:sn.Z,error:Yt.Z,validating:Cn.Z};function $n(g){let{children:T,errors:W,warnings:d,hasFeedback:h,validateStatus:C,prefixCls:R,meta:Q,noStyle:B}=g;const $=`${R}-item`,{feedbackIcons:ue}=p.useContext(P.q3),oe=Te(W,d,Q,null,!!h,C),{isFormItemInput:We,status:I}=p.useContext(P.aM),Z=p.useMemo(()=>{var je;let me;if(h){const st=h!==!0&&h.icons||ue,Y=oe&&((je=st==null?void 0:st({status:oe,errors:W,warnings:d}))===null||je===void 0?void 0:je[oe]),se=oe&&un[oe];me=Y!==!1&&se?p.createElement("span",{className:x()(`${$}-feedback-icon`,`${$}-feedback-icon-${oe}`)},Y||p.createElement(se,null)):null}let Ze=!0,Ne=oe||"";return B&&(Ze=We,Ne=(oe!=null?oe:I)||""),{status:Ne,errors:W,warnings:d,hasFeedback:!!h,feedbackIcon:me,isFormItemInput:Ze}},[oe,h,B,We,I]);return p.createElement(P.aM.Provider,{value:Z},T)}var zn=function(g,T){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&T.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)T.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function pn(g){const{prefixCls:T,className:W,rootClassName:d,style:h,help:C,errors:R,warnings:Q,validateStatus:B,meta:$,hasFeedback:ue,hidden:oe,children:We,fieldId:I,required:Z,isRequired:je,onSubItemMetaChange:me}=g,Ze=zn(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ne=`${T}-item`,{requiredMark:st}=p.useContext(P.q3),Y=p.useRef(null),se=pe(R),Ae=pe(Q),nt=C!=null,Ue=!!(nt||R.length||Q.length),ot=!!Y.current&&(0,Pe.Z)(Y.current),[jt,Mt]=p.useState(null);(0,q.Z)(()=>{if(Ue&&Y.current){const Ut=getComputedStyle(Y.current);Mt(parseInt(Ut.marginBottom,10))}},[Ue,ot]);const Ft=Ut=>{Ut||Mt(null)},xt=function(){let Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const _t=Ut?se:$.errors,kt=Ut?Ae:$.warnings;return Te(_t,kt,$,"",!!ue,B)}(),qt=x()(Ne,W,d,{[`${Ne}-with-help`]:nt||se.length||Ae.length,[`${Ne}-has-feedback`]:xt&&ue,[`${Ne}-has-success`]:xt==="success",[`${Ne}-has-warning`]:xt==="warning",[`${Ne}-has-error`]:xt==="error",[`${Ne}-is-validating`]:xt==="validating",[`${Ne}-hidden`]:oe});return p.createElement("div",{className:qt,style:h,ref:Y},p.createElement(ce.Z,Object.assign({className:`${Ne}-row`},(0,Xe.Z)(Ze,["_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(Dt,Object.assign({htmlFor:I},g,{requiredMark:st,required:Z!=null?Z:je,prefixCls:T})),p.createElement(_,Object.assign({},g,$,{errors:se,warnings:Ae,prefixCls:T,status:xt,help:C,marginBottom:jt,onErrorVisibleChanged:Ft}),p.createElement(P.qI.Provider,{value:me},p.createElement($n,{prefixCls:T,meta:$,errors:$.errors,warnings:$.warnings,hasFeedback:ue,validateStatus:xt},We)))),!!jt&&p.createElement("div",{className:`${Ne}-margin-offset`,style:{marginBottom:-jt}}))}const Ln="__SPLIT__",wn=null,In=p.memo(g=>{let{children:T}=g;return T},(g,T)=>g.value===T.value&&g.update===T.update&&g.childProps.length===T.childProps.length&&g.childProps.every((W,d)=>W===T.childProps[d]));function xn(g){return g!=null}function dn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Wn(g){const{name:T,noStyle:W,className:d,dependencies:h,prefixCls:C,shouldUpdate:R,rules:Q,children:B,required:$,label:ue,messageVariables:oe,trigger:We="onChange",validateTrigger:I,hidden:Z,help:je}=g,{getPrefixCls:me}=p.useContext(pt.E_),{name:Ze}=p.useContext(P.q3),Ne=le(B),st=typeof Ne=="function",Y=p.useContext(P.qI),{validateTrigger:se}=p.useContext(be.FieldContext),Ae=I!==void 0?I:se,nt=xn(T),Ue=me("form",C),[ot,jt]=j(Ue),Mt=p.useContext(be.ListContext),Ft=p.useRef(),[$t,xt]=Se({}),[qt,Ut]=(0,Et.Z)(()=>dn()),_t=Pt=>{const Ht=Mt==null?void 0:Mt.getKey(Pt.name);if(Ut(Pt.destroy?dn():Pt,!0),W&&je!==!1&&Y){let an=Pt.name;if(Pt.destroy)an=Ft.current||an;else if(Ht!==void 0){const[Gt,En]=Ht;an=[Gt].concat((0,L.Z)(En)),Ft.current=an}Y(Pt,an)}},kt=(Pt,Ht)=>{xt(an=>{const Gt=Object.assign({},an),_n=[].concat((0,L.Z)(Pt.name.slice(0,-1)),(0,L.Z)(Ht)).join(Ln);return Pt.destroy?delete Gt[_n]:Gt[_n]=Pt,Gt})},[Rt,Ct]=p.useMemo(()=>{const Pt=(0,L.Z)(qt.errors),Ht=(0,L.Z)(qt.warnings);return Object.values($t).forEach(an=>{Pt.push.apply(Pt,(0,L.Z)(an.errors||[])),Ht.push.apply(Ht,(0,L.Z)(an.warnings||[]))}),[Pt,Ht]},[$t,qt.errors,qt.warnings]),zt=ve();function wt(Pt,Ht,an){return W&&!Z?p.createElement($n,{prefixCls:Ue,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:qt,errors:Rt,warnings:Ct,noStyle:!0},Pt):p.createElement(pn,Object.assign({key:"row"},g,{className:x()(d,jt),prefixCls:Ue,fieldId:Ht,isRequired:an,errors:Rt,warnings:Ct,meta:qt,onSubItemMetaChange:kt}),Pt)}if(!nt&&!st&&!h)return ot(wt(Ne));let fn={};return typeof ue=="string"?fn.label=ue:T&&(fn.label=String(T)),oe&&(fn=Object.assign(Object.assign({},fn),oe)),ot(p.createElement(be.Field,Object.assign({},g,{messageVariables:fn,trigger:We,validateTrigger:Ae,onMetaChange:_t}),(Pt,Ht,an)=>{const Gt=k(T).length&&Ht?Ht.name:[],En=Ie(Gt,Ze),_n=$!==void 0?$:!!(Q&&Q.some(ut=>{if(ut&&typeof ut=="object"&&ut.required&&!ut.warningOnly)return!0;if(typeof ut=="function"){const en=ut(an);return en&&en.required&&!en.warningOnly}return!1})),Ot=Object.assign({},Pt);let at=null;if(Array.isArray(Ne)&&nt)at=Ne;else if(!(st&&(!(R||h)||nt))){if(!(h&&!st&&!nt))if((0,F.l$)(Ne)){const ut=Object.assign(Object.assign({},Ne.props),Ot);if(ut.id||(ut.id=En),je||Rt.length>0||Ct.length>0||g.extra){const Vt=[];(je||Rt.length>0)&&Vt.push(`${En}_help`),g.extra&&Vt.push(`${En}_extra`),ut["aria-describedby"]=Vt.join(" ")}Rt.length>0&&(ut["aria-invalid"]="true"),_n&&(ut["aria-required"]="true"),(0,it.Yr)(Ne)&&(ut.ref=zt(Gt,Ne)),new Set([].concat((0,L.Z)(k(We)),(0,L.Z)(k(Ae)))).forEach(Vt=>{ut[Vt]=function(){for(var Nt,ln,gn,mn,Tn,_e=arguments.length,He=new Array(_e),ht=0;ht<_e;ht++)He[ht]=arguments[ht];(gn=Ot[Vt])===null||gn===void 0||(Nt=gn).call.apply(Nt,[Ot].concat(He)),(Tn=(mn=Ne.props)[Vt])===null||Tn===void 0||(ln=Tn).call.apply(ln,[mn].concat(He))}});const tn=[ut["aria-required"],ut["aria-invalid"],ut["aria-describedby"]];at=p.createElement(In,{value:Ot[g.valuePropName||"value"],update:Ne,childProps:tn},(0,F.Tm)(Ne,ut))}else st&&(R||h)&&!nt?at=Ne(an):at=Ne}return wt(at,En,_n)}))}const Qt=Wn;Qt.useStatus=ie;var Nn=Qt,Hn=function(g,T){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&T.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)T.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W},pr=g=>{var{prefixCls:T,children:W}=g,d=Hn(g,["prefixCls","children"]);const{getPrefixCls:h}=p.useContext(pt.E_),C=h("form",T),R=p.useMemo(()=>({prefixCls:C,status:"error"}),[C]);return p.createElement(be.List,Object.assign({},d),(Q,B,$)=>p.createElement(P.Rk.Provider,{value:R},W(Q.map(ue=>Object.assign(Object.assign({},ue),{fieldKey:ue.key})),B,{errors:$.errors,warnings:$.warnings})))};function on(){const{form:g}=(0,p.useContext)(P.q3);return g}const tt=Je;tt.Item=Nn,tt.List=pr,tt.ErrorList=ze,tt.useForm=De,tt.useFormInstance=on,tt.useWatch=be.useWatch,tt.Provider=P.RV,tt.create=()=>{};var Wt=tt},9432:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return It},n:function(){return qe}});var L=f(19248),H=f(92310),x=f.n(H),K=f(93681),p=f(8654),D=f(59301),P=f(19080),pe=f(36355),te=f(1684),S=f(19716),Ce=f(32441),N=f(33234),fe=f(59412),Oe=f(9937);function G(ee){return!!(ee.prefix||ee.suffix||ee.allowClear)}var Ve=function(ee,A){var m={};for(var c in ee)Object.prototype.hasOwnProperty.call(ee,c)&&A.indexOf(c)<0&&(m[c]=ee[c]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(ee);b<c.length;b++)A.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(ee,c[b])&&(m[c[b]]=ee[c[b]]);return m};function qe(ee,A){if(!ee)return;ee.focus(A);const{cursor:m}=A||{};if(m){const c=ee.value.length;switch(m){case"start":ee.setSelectionRange(0,0);break;case"end":ee.setSelectionRange(c,c);break;default:ee.setSelectionRange(0,c);break}}}var It=(0,D.forwardRef)((ee,A)=>{var m;const{prefixCls:c,bordered:b=!0,status:O,size:j,disabled:M,onBlur:ge,onFocus:Me,suffix:ze,allowClear:be,addonAfter:pt,addonBefore:Ke,className:Ge,style:J,styles:U,rootClassName:ae,onChange:ne,classNames:k}=ee,Ie=Ve(ee,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Te,direction:re,input:De}=D.useContext(pe.E_),de=Te("input",c),yt=(0,D.useRef)(null),[Tt,bt]=(0,Oe.ZP)(de),{compactSize:Je,compactItemClassnames:Et}=(0,N.ri)(de,re),it=(0,S.Z)(Ee=>{var Ye;return(Ye=j!=null?j:Je)!==null&&Ye!==void 0?Ye:Ee}),F=D.useContext(te.Z),we=M!=null?M:F,{status:le,hasFeedback:V,feedbackIcon:ie}=(0,D.useContext)(Ce.aM),he=(0,P.F)(le,O),Se=G(ee)||!!V,ve=(0,D.useRef)(Se);(0,D.useEffect)(()=>{var Ee;Se&&ve.current,ve.current=Se},[Se]);const Pe=(0,fe.Z)(yt,!0),q=Ee=>{Pe(),ge==null||ge(Ee)},Xe=Ee=>{Pe(),Me==null||Me(Ee)},ce=Ee=>{Pe(),ne==null||ne(Ee)},Re=(V||ze)&&D.createElement(D.Fragment,null,ze,V&&ie);let Le;return typeof be=="object"&&(be!=null&&be.clearIcon)?Le=be:be&&(Le={clearIcon:D.createElement(L.Z,null)}),Tt(D.createElement(K.default,Object.assign({ref:(0,p.sQ)(A,yt),prefixCls:de,autoComplete:De==null?void 0:De.autoComplete},Ie,{disabled:we,onBlur:q,onFocus:Xe,style:Object.assign(Object.assign({},De==null?void 0:De.style),J),styles:Object.assign(Object.assign({},De==null?void 0:De.styles),U),suffix:Re,allowClear:Le,className:x()(Ge,ae,Et,De==null?void 0:De.className),onChange:ce,addonAfter:pt&&D.createElement(N.BR,null,D.createElement(Ce.Ux,{override:!0,status:!0},pt)),addonBefore:Ke&&D.createElement(N.BR,null,D.createElement(Ce.Ux,{override:!0,status:!0},Ke)),classNames:Object.assign(Object.assign(Object.assign({},k),De==null?void 0:De.classNames),{input:x()({[`${de}-sm`]:it==="small",[`${de}-lg`]:it==="large",[`${de}-rtl`]:re==="rtl",[`${de}-borderless`]:!b},!Se&&(0,P.Z)(de,he),k==null?void 0:k.input,(m=De==null?void 0:De.classNames)===null||m===void 0?void 0:m.input,bt)}),classes:{affixWrapper:x()({[`${de}-affix-wrapper-sm`]:it==="small",[`${de}-affix-wrapper-lg`]:it==="large",[`${de}-affix-wrapper-rtl`]:re==="rtl",[`${de}-affix-wrapper-borderless`]:!b},(0,P.Z)(`${de}-affix-wrapper`,he,V),bt),wrapper:x()({[`${de}-group-rtl`]:re==="rtl"},bt),group:x()({[`${de}-group-wrapper-sm`]:it==="small",[`${de}-group-wrapper-lg`]:it==="large",[`${de}-group-wrapper-rtl`]:re==="rtl",[`${de}-group-wrapper-disabled`]:we},(0,P.Z)(`${de}-group-wrapper`,he,V),bt)}})))})},1643:function(nn,xe,f){"use strict";var L=f(19248),H=f(92310),x=f.n(H),K=f(9296),p=f(59301),D=f(19080),P=f(36355),pe=f(1684),te=f(19716),S=f(32441),Ce=f(9432),N=f(9937),fe=function(G,Ve){var qe={};for(var vt in G)Object.prototype.hasOwnProperty.call(G,vt)&&Ve.indexOf(vt)<0&&(qe[vt]=G[vt]);if(G!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,vt=Object.getOwnPropertySymbols(G);It<vt.length;It++)Ve.indexOf(vt[It])<0&&Object.prototype.propertyIsEnumerable.call(G,vt[It])&&(qe[vt[It]]=G[vt[It]]);return qe};const Oe=(0,p.forwardRef)((G,Ve)=>{const{prefixCls:qe,bordered:vt=!0,size:It,disabled:ee,status:A,allowClear:m,showCount:c,classNames:b,rootClassName:O,className:j}=G,M=fe(G,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ge,direction:Me}=p.useContext(P.E_),ze=(0,te.Z)(It),be=p.useContext(pe.Z),pt=ee!=null?ee:be,{status:Ke,hasFeedback:Ge,feedbackIcon:J}=p.useContext(S.aM),U=(0,D.F)(Ke,A),ae=p.useRef(null);p.useImperativeHandle(Ve,()=>{var re;return{resizableTextArea:(re=ae.current)===null||re===void 0?void 0:re.resizableTextArea,focus:De=>{var de,yt;(0,Ce.n)((yt=(de=ae.current)===null||de===void 0?void 0:de.resizableTextArea)===null||yt===void 0?void 0:yt.textArea,De)},blur:()=>{var De;return(De=ae.current)===null||De===void 0?void 0:De.blur()}}});const ne=ge("input",qe);let k;typeof m=="object"&&(m!=null&&m.clearIcon)?k=m:m&&(k={clearIcon:p.createElement(L.Z,null)});const[Ie,Te]=(0,N.ZP)(ne);return Ie(p.createElement(K.default,Object.assign({},M,{disabled:pt,allowClear:k,className:x()(j,O),classes:{affixWrapper:x()(`${ne}-textarea-affix-wrapper`,{[`${ne}-affix-wrapper-rtl`]:Me==="rtl",[`${ne}-affix-wrapper-borderless`]:!vt,[`${ne}-affix-wrapper-sm`]:ze==="small",[`${ne}-affix-wrapper-lg`]:ze==="large",[`${ne}-textarea-show-count`]:c},(0,D.Z)(`${ne}-affix-wrapper`,U),Te)},classNames:Object.assign(Object.assign({},b),{textarea:x()({[`${ne}-borderless`]:!vt,[`${ne}-sm`]:ze==="small",[`${ne}-lg`]:ze==="large"},(0,D.Z)(ne,U),Te,b==null?void 0:b.textarea)}),prefixCls:ne,suffix:Ge&&p.createElement("span",{className:`${ne}-textarea-suffix`},J),showCount:c,ref:ae})))});xe.Z=Oe},59412:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return H}});var L=f(59301);function H(x,K){const p=(0,L.useRef)([]),D=()=>{p.current.push(setTimeout(()=>{var P,pe,te,S;!((P=x.current)===null||P===void 0)&&P.input&&((pe=x.current)===null||pe===void 0?void 0:pe.input.getAttribute("type"))==="password"&&(!((te=x.current)===null||te===void 0)&&te.input.hasAttribute("value"))&&((S=x.current)===null||S===void 0||S.input.removeAttribute("value"))}))};return(0,L.useEffect)(()=>(K&&D(),()=>p.current.forEach(P=>{P&&clearTimeout(P)})),[]),D}},92832:function(nn,xe,f){"use strict";f.d(xe,{default:function(){return ze}});var L=f(92310),H=f.n(L),x=f(59301),K=f(36355),p=f(32441),D=f(9937),pe=be=>{const{getPrefixCls:pt,direction:Ke}=(0,x.useContext)(K.E_),{prefixCls:Ge,className:J}=be,U=pt("input-group",Ge),ae=pt("input"),[ne,k]=(0,D.ZP)(ae),Ie=H()(U,{[`${U}-lg`]:be.size==="large",[`${U}-sm`]:be.size==="small",[`${U}-compact`]:be.compact,[`${U}-rtl`]:Ke==="rtl"},k,J),Te=(0,x.useContext)(p.aM),re=(0,x.useMemo)(()=>Object.assign(Object.assign({},Te),{isFormItemInput:!1}),[Te]);return ne(x.createElement("span",{className:Ie,style:be.style,onMouseEnter:be.onMouseEnter,onMouseLeave:be.onMouseLeave,onFocus:be.onFocus,onBlur:be.onBlur},x.createElement(p.aM.Provider,{value:re},be.children)))},te=f(9432),S=f(73331),Ce=f(15277),N=f(2738),fe=f(8654),Oe=f(59412),G=function(be,pt){var Ke={};for(var Ge in be)Object.prototype.hasOwnProperty.call(be,Ge)&&pt.indexOf(Ge)<0&&(Ke[Ge]=be[Ge]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Ge=Object.getOwnPropertySymbols(be);J<Ge.length;J++)pt.indexOf(Ge[J])<0&&Object.prototype.propertyIsEnumerable.call(be,Ge[J])&&(Ke[Ge[J]]=be[Ge[J]]);return Ke};const Ve=be=>be?x.createElement(Ce.Z,null):x.createElement(S.Z,null),qe={click:"onClick",hover:"onMouseOver"};var It=x.forwardRef((be,pt)=>{const{visibilityToggle:Ke=!0}=be,Ge=typeof Ke=="object"&&Ke.visible!==void 0,[J,U]=(0,x.useState)(()=>Ge?Ke.visible:!1),ae=(0,x.useRef)(null);x.useEffect(()=>{Ge&&U(Ke.visible)},[Ge,Ke]);const ne=(0,Oe.Z)(ae),k=()=>{const{disabled:we}=be;we||(J&&ne(),U(le=>{var V;const ie=!le;return typeof Ke=="object"&&((V=Ke.onVisibleChange)===null||V===void 0||V.call(Ke,ie)),ie}))},Ie=we=>{const{action:le="click",iconRender:V=Ve}=be,ie=qe[le]||"",he=V(J),Se={[ie]:k,className:`${we}-icon`,key:"passwordIcon",onMouseDown:ve=>{ve.preventDefault()},onMouseUp:ve=>{ve.preventDefault()}};return x.cloneElement(x.isValidElement(he)?he:x.createElement("span",null,he),Se)},{className:Te,prefixCls:re,inputPrefixCls:De,size:de}=be,yt=G(be,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Tt}=x.useContext(K.E_),bt=Tt("input",De),Je=Tt("input-password",re),Et=Ke&&Ie(Je),it=H()(Je,Te,{[`${Je}-${de}`]:!!de}),F=Object.assign(Object.assign({},(0,N.Z)(yt,["suffix","iconRender","visibilityToggle"])),{type:J?"text":"password",className:it,prefixCls:bt,suffix:Et});return de&&(F.size=de),x.createElement(te.Z,Object.assign({ref:(0,fe.sQ)(pt,ae)},F))}),ee=f(47472),A=f(92343),m=f(3113),c=f(19716),b=f(33234),O=function(be,pt){var Ke={};for(var Ge in be)Object.prototype.hasOwnProperty.call(be,Ge)&&pt.indexOf(Ge)<0&&(Ke[Ge]=be[Ge]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Ge=Object.getOwnPropertySymbols(be);J<Ge.length;J++)pt.indexOf(Ge[J])<0&&Object.prototype.propertyIsEnumerable.call(be,Ge[J])&&(Ke[Ge[J]]=be[Ge[J]]);return Ke},M=x.forwardRef((be,pt)=>{const{prefixCls:Ke,inputPrefixCls:Ge,className:J,size:U,suffix:ae,enterButton:ne=!1,addonAfter:k,loading:Ie,disabled:Te,onSearch:re,onChange:De,onCompositionStart:de,onCompositionEnd:yt}=be,Tt=O(be,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:bt,direction:Je}=x.useContext(K.E_),Et=x.useRef(!1),it=bt("input-search",Ke),F=bt("input",Ge),{compactSize:we}=(0,b.ri)(it,Je),le=(0,c.Z)(_=>{var et;return(et=U!=null?U:we)!==null&&et!==void 0?et:_}),V=x.useRef(null),ie=_=>{_&&_.target&&_.type==="click"&&re&&re(_.target.value,_,{source:"clear"}),De&&De(_)},he=_=>{var et;document.activeElement===((et=V.current)===null||et===void 0?void 0:et.input)&&_.preventDefault()},Se=_=>{var et,Be;re&&re((Be=(et=V.current)===null||et===void 0?void 0:et.input)===null||Be===void 0?void 0:Be.value,_,{source:"input"})},ve=_=>{Et.current||Ie||Se(_)},Pe=typeof ne=="boolean"?x.createElement(ee.Z,null):null,q=`${it}-button`;let Xe;const ce=ne||{},Re=ce.type&&ce.type.__ANT_BUTTON===!0;Re||ce.type==="button"?Xe=(0,A.Tm)(ce,Object.assign({onMouseDown:he,onClick:_=>{var et,Be;(Be=(et=ce==null?void 0:ce.props)===null||et===void 0?void 0:et.onClick)===null||Be===void 0||Be.call(et,_),Se(_)},key:"enterButton"},Re?{className:q,size:le}:{})):Xe=x.createElement(m.ZP,{className:q,type:ne?"primary":void 0,size:le,disabled:Te,key:"enterButton",onMouseDown:he,onClick:Se,loading:Ie,icon:Pe},ne),k&&(Xe=[Xe,(0,A.Tm)(k,{key:"addonAfter"})]);const Le=H()(it,{[`${it}-rtl`]:Je==="rtl",[`${it}-${le}`]:!!le,[`${it}-with-button`]:!!ne},J),Ee=_=>{Et.current=!0,de==null||de(_)},Ye=_=>{Et.current=!1,yt==null||yt(_)};return x.createElement(te.Z,Object.assign({ref:(0,fe.sQ)(V,pt),onPressEnter:ve},Tt,{size:le,onCompositionStart:Ee,onCompositionEnd:Ye,prefixCls:F,addonAfter:Xe,suffix:ae,onChange:ie,className:Le,disabled:Te}))}),ge=f(1643);const Me=te.Z;Me.Group=pe,Me.Search=M,Me.TextArea=ge.Z,Me.Password=It;var ze=Me},9937:function(nn,xe,f){"use strict";f.d(xe,{M1:function(){return P},TM:function(){return A},Xy:function(){return pe},bi:function(){return Ce},e5:function(){return ee},ik:function(){return N},nz:function(){return p},pU:function(){return D},s7:function(){return fe},x0:function(){return S}});var L=f(17313),H=f(74207),x=f(37613),K=f(83116);const p=m=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:m,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),D=m=>({borderColor:m.hoverBorderColor}),P=m=>({borderColor:m.activeBorderColor,boxShadow:m.activeShadow,outline:0}),pe=m=>({color:m.colorTextDisabled,backgroundColor:m.colorBgContainerDisabled,borderColor:m.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},D((0,x.TS)(m,{hoverBorderColor:m.colorBorder})))}),te=m=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:O,borderRadiusLG:j,paddingInlineLG:M}=m;return{padding:`${c}px ${M}px`,fontSize:b,lineHeight:O,borderRadius:j}},S=m=>({padding:`${m.paddingBlockSM}px ${m.paddingInlineSM}px`,borderRadius:m.borderRadiusSM}),Ce=(m,c)=>{const{componentCls:b,colorError:O,colorWarning:j,errorActiveShadow:M,warningActiveShadow:ge,colorErrorBorderHover:Me,colorWarningBorderHover:ze}=m;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:O,"&:hover":{borderColor:Me},"&:focus, &-focused":Object.assign({},P((0,x.TS)(m,{activeBorderColor:O,activeShadow:M}))),[`${b}-prefix, ${b}-suffix`]:{color:O}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:j,"&:hover":{borderColor:ze},"&:focus, &-focused":Object.assign({},P((0,x.TS)(m,{activeBorderColor:j,activeShadow:ge}))),[`${b}-prefix, ${b}-suffix`]:{color:j}}}},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({},D(m)),"&:focus, &-focused":Object.assign({},P(m)),"&-disabled, &[disabled]":Object.assign({},pe(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({},te(m)),"&-sm":Object.assign({},S(m)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),fe=m=>{const{componentCls:c,antCls:b}=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({},te(m)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},S(m)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:m.controlHeightLG},[`&-sm ${b}-select-single ${b}-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,[`${b}-select`]:{margin:`-${m.paddingBlock+1}px -${m.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${m.lineWidth}px ${m.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:m.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${m.paddingInline}px`,backgroundColor:"transparent",[`${b}-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,[`${b}-select ${b}-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,[`${b}-select ${b}-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,L.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,
|
|
|
& > ${b}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-m.lineWidth,borderInlineEndWidth:m.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
|
|
|
& > ${b}-select-auto-complete ${c},
|
|
|
& > ${b}-cascader-picker ${c},
|
|
|
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:m.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${b}-select:first-child > ${b}-select-selector,
|
|
|
& > ${b}-select-auto-complete:first-child ${c},
|
|
|
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius},[`& > *:last-child,
|
|
|
& > ${b}-select:last-child > ${b}-select-selector,
|
|
|
& > ${b}-cascader-picker:last-child ${c},
|
|
|
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:m.lineWidth,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius},[`& > ${b}-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}}}})}},Oe=m=>{const{componentCls:c,controlHeightSM:b,lineWidth:O}=m,M=(b-O*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,L.Wf)(m)),N(m)),Ce(m,c)),{'&[type="color"]':{height:m.controlHeight,[`&${c}-lg`]:{height:m.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:M,paddingBottom:M}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},G=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`}}}},Ve=m=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:O,motionDurationSlow:j,colorIcon:M,colorIconHover:ge,iconCls:Me}=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({},D(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:O},"&-show-count-has-suffix":{marginInlineEnd:m.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),G(m)),{[`${Me}${c}-password-icon`]:{color:M,cursor:"pointer",transition:`all ${j}`,"&:hover":{color:ge}}}),Ce(m,`${c}-affix-wrapper`))}},qe=m=>{const{componentCls:c,colorError:b,colorWarning:O,borderRadiusLG:j,borderRadiusSM:M}=m;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,L.Wf)(m)),fe(m)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:j,fontSize:m.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:M}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:O,borderColor:O}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},pe(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}}}})}},vt=m=>{const{componentCls:c,antCls:b}=m,O=`${c}-search`;return{[O]:{[`${c}`]:{"&:hover, &:focus":{borderColor:m.colorPrimaryHover,[`+ ${c}-group-addon ${O}-button:not(${b}-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,[`${O}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${O}-button:not(${b}-btn-primary)`]:{color:m.colorTextDescription,"&:hover":{color:m.colorPrimaryHover},"&:active":{color:m.colorPrimaryActive},[`&${b}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${O}-button`]:{height:m.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${O}-button`]:{height:m.controlHeightLG},[`&-small ${O}-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}}}}},It=m=>{const{componentCls:c,paddingLG:b}=m,O=`${c}-textarea`;return{[O]:{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:b}},[`&-affix-wrapper${O}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:b}},[`&-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},[`${O}-suffix`]:{position:"absolute",top:0,insetInlineEnd:m.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function ee(m){return(0,x.TS)(m,{inputAffixPadding:m.paddingXXS})}const A=m=>{const{controlHeight:c,fontSize:b,lineHeight:O,lineWidth:j,controlHeightSM:M,controlHeightLG:ge,fontSizeLG:Me,lineHeightLG:ze,paddingSM:be,controlPaddingHorizontalSM:pt,controlPaddingHorizontal:Ke,colorFillAlter:Ge,colorPrimaryHover:J,controlOutlineWidth:U,controlOutline:ae,colorErrorOutline:ne,colorWarningOutline:k}=m;return{paddingBlock:Math.max(Math.round((c-b*O)/2*10)/10-j,3),paddingBlockSM:Math.max(Math.round((M-b*O)/2*10)/10-j,0),paddingBlockLG:Math.ceil((ge-Me*ze)/2*10)/10-j,paddingInline:be-j,paddingInlineSM:pt-j,paddingInlineLG:Ke-j,addonBg:Ge,activeBorderColor:J,hoverBorderColor:J,activeShadow:`0 0 0 ${U}px ${ae}`,errorActiveShadow:`0 0 0 ${U}px ${ne}`,warningActiveShadow:`0 0 0 ${U}px ${k}`}};xe.ZP=(0,K.Z)("Input",m=>{const c=(0,x.TS)(m,ee(m));return[Oe(c),It(c),Ve(c),qe(c),vt(c),(0,H.c)(c)]},A)},57809:function(nn,xe,f){"use strict";var L=f(92310),H=f.n(L),x=f(77861),K=f(2738),p=f(59301),D=f(53487),P=f(62892),pe=f(19080),te=f(36355),S=f(1684),Ce=f(93891),N=f(19716),fe=f(32441),Oe=f(33234),G=f(14154),Ve=f(58582),qe=f(84443),vt=f(66339),It=function(b,O){var j={};for(var M in b)Object.prototype.hasOwnProperty.call(b,M)&&O.indexOf(M)<0&&(j[M]=b[M]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,M=Object.getOwnPropertySymbols(b);ge<M.length;ge++)O.indexOf(M[ge])<0&&Object.prototype.propertyIsEnumerable.call(b,M[ge])&&(j[M[ge]]=b[M[ge]]);return j};const ee="SECRET_COMBOBOX_MODE_DO_NOT_USE",A=(b,O)=>{var j,{prefixCls:M,bordered:ge=!0,className:Me,rootClassName:ze,getPopupContainer:be,popupClassName:pt,dropdownClassName:Ke,listHeight:Ge=256,placement:J,listItemHeight:U=24,size:ae,disabled:ne,notFoundContent:k,status:Ie,builtinPlacements:Te,dropdownMatchSelectWidth:re,popupMatchSelectWidth:De,direction:de,style:yt,allowClear:Tt}=b,bt=It(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Je,getPrefixCls:Et,renderEmpty:it,direction:F,virtual:we,popupMatchSelectWidth:le,popupOverflow:V,select:ie}=p.useContext(te.E_),he=Et("select",M),Se=Et(),ve=de!=null?de:F,{compactSize:Pe,compactItemClassnames:q}=(0,Oe.ri)(he,ve),[Xe,ce]=(0,G.Z)(he),Re=p.useMemo(()=>{const{mode:In}=bt;if(In!=="combobox")return In===ee?"combobox":In},[bt.mode]),Le=Re==="multiple"||Re==="tags",Ee=(0,qe.Z)(bt.suffixIcon,bt.showArrow),Ye=(j=De!=null?De:re)!==null&&j!==void 0?j:le,{status:_,hasFeedback:et,isFormItemInput:Be,feedbackIcon:lt}=p.useContext(fe.aM),ft=(0,pe.F)(_,Ie);let rn;k!==void 0?rn=k:Re==="combobox"?rn=null:rn=(it==null?void 0:it("Select"))||p.createElement(Ce.Z,{componentName:"Select"});const{suffixIcon:Zt,itemIcon:At,removeIcon:Dt,clearIcon:Xt}=(0,vt.Z)(Object.assign(Object.assign({},bt),{multiple:Le,hasFeedback:et,feedbackIcon:lt,showSuffixIcon:Ee,prefixCls:he,showArrow:bt.showArrow,componentName:"Select"})),Yt=Tt===!0?{clearIcon:Xt}:Tt,sn=(0,K.Z)(bt,["suffixIcon","itemIcon"]),Cn=H()(pt||Ke,{[`${he}-dropdown-${ve}`]:ve==="rtl"},ze,ce),un=(0,N.Z)(In=>{var xn;return(xn=ae!=null?ae:Pe)!==null&&xn!==void 0?xn:In}),$n=p.useContext(S.Z),zn=ne!=null?ne:$n,pn=H()({[`${he}-lg`]:un==="large",[`${he}-sm`]:un==="small",[`${he}-rtl`]:ve==="rtl",[`${he}-borderless`]:!ge,[`${he}-in-form-item`]:Be},(0,pe.Z)(he,ft,et),q,ie==null?void 0:ie.className,Me,ze,ce),Ln=p.useMemo(()=>J!==void 0?J:ve==="rtl"?"bottomRight":"bottomLeft",[J,ve]),wn=(0,Ve.Z)(Te,V);return Xe(p.createElement(x.ZP,Object.assign({ref:O,virtual:we,showSearch:ie==null?void 0:ie.showSearch},sn,{style:Object.assign(Object.assign({},ie==null?void 0:ie.style),yt),dropdownMatchSelectWidth:Ye,builtinPlacements:wn,transitionName:(0,P.m)(Se,"slide-up",bt.transitionName),listHeight:Ge,listItemHeight:U,mode:Re,prefixCls:he,placement:Ln,direction:ve,suffixIcon:Zt,menuItemSelectedIcon:At,removeIcon:Dt,allowClear:Yt,notFoundContent:rn,className:pn,getPopupContainer:be||Je,dropdownClassName:Cn,disabled:zn})))},m=p.forwardRef(A),c=(0,D.Z)(m);m.SECRET_COMBOBOX_MODE_DO_NOT_USE=ee,m.Option=x.Wx,m.OptGroup=x.Xo,m._InternalPanelDoNotUseOrYouWillBeFired=c,xe.default=m},14154:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return m}});var L=f(17313),H=f(74207),x=f(37613),K=f(83116),p=f(13826),D=f(92899);const P=c=>{const{optionHeight:b,optionFontSize:O,optionLineHeight:j,optionPadding:M}=c;return{position:"relative",display:"block",minHeight:b,padding:M,color:c.colorText,fontWeight:"normal",fontSize:O,lineHeight:j,boxSizing:"border-box"}};var te=c=>{const{antCls:b,componentCls:O}=c,j=`${O}-item`,M=`&${b}-slide-up-enter${b}-slide-up-enter-active`,ge=`&${b}-slide-up-appear${b}-slide-up-appear-active`,Me=`&${b}-slide-up-leave${b}-slide-up-leave-active`,ze=`${O}-dropdown-placement-`;return[{[`${O}-dropdown`]:Object.assign(Object.assign({},(0,L.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,[`
|
|
|
${M}${ze}bottomLeft,
|
|
|
${ge}${ze}bottomLeft
|
|
|
`]:{animationName:p.fJ},[`
|
|
|
${M}${ze}topLeft,
|
|
|
${ge}${ze}topLeft,
|
|
|
${M}${ze}topRight,
|
|
|
${ge}${ze}topRight
|
|
|
`]:{animationName:p.Qt},[`${Me}${ze}bottomLeft`]:{animationName:p.Uw},[`
|
|
|
${Me}${ze}topLeft,
|
|
|
${Me}${ze}topRight
|
|
|
`]:{animationName:p.ly},"&-hidden":{display:"none"},[`${j}`]:Object.assign(Object.assign({},P(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"},L.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${j}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${j}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${j}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${j}-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,D.Fm)(c,"move-up"),(0,D.Fm)(c,"move-down")]};const S=2,Ce=c=>{let{controlHeightSM:b,controlHeight:O,lineWidth:j}=c;const M=(O-b)/2-j,ge=Math.ceil(M/2);return[M,ge]};function N(c,b){const{componentCls:O,iconCls:j}=c,M=`${O}-selection-overflow`,ge=c.multipleSelectItemHeight,[Me]=Ce(c),ze=b?`${O}-${b}`:"";return{[`${O}-multiple${ze}`]:{fontSize:c.fontSize,[M]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${O}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Me-S}px ${S*2}px`,borderRadius:c.borderRadius,[`${O}-show-search&`]:{cursor:"text"},[`${O}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${S}px 0`,lineHeight:`${ge}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${O}-show-arrow ${O}-selector,
|
|
|
&${O}-allow-clear ${O}-selector
|
|
|
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${O}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ge,marginTop:S,marginBottom:S,lineHeight:`${ge-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:S*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${O}-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,L.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${j}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${M}-item + ${M}-item`]:{[`${O}-selection-search`]:{marginInlineStart:0}},[`${O}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-Me,"\n &-input,\n &-mirror\n ":{height:ge,fontFamily:c.fontFamily,lineHeight:`${ge}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"}},[`${O}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Oe=c=>{const{componentCls:b}=c,O=(0,x.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),j=(0,x.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,M]=Ce(c);return[N(c),N(O,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:M}}},N(j,"lg")]};function G(c,b){const{componentCls:O,inputPaddingHorizontalBase:j,borderRadius:M}=c,ge=c.controlHeight-c.lineWidth*2,Me=Math.ceil(c.fontSize*1.25),ze=b?`${O}-${b}`:"";return{[`${O}-single${ze}`]:{fontSize:c.fontSize,[`${O}-selector`]:Object.assign(Object.assign({},(0,L.Wf)(c)),{display:"flex",borderRadius:M,[`${O}-selection-search`]:{position:"absolute",top:0,insetInlineStart:j,insetInlineEnd:j,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${O}-selection-item,
|
|
|
${O}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${ge}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ge}px`}},[`${O}-selection-item`]:{position:"relative",userSelect:"none"},[`${O}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${O}-selection-item:after`,`${O}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${O}-show-arrow ${O}-selection-item,
|
|
|
&${O}-show-arrow ${O}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Me},[`&${O}-open ${O}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${O}-customize-input)`]:{[`${O}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${j}px`,[`${O}-selection-search-input`]:{height:ge},"&:after":{lineHeight:`${ge}px`}}},[`&${O}-customize-input`]:{[`${O}-selector`]:{"&:after":{display:"none"},[`${O}-selection-search`]:{position:"static",width:"100%"},[`${O}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${j}px`,"&:after":{display:"none"}}}}}}}function Ve(c){const{componentCls:b}=c,O=c.controlPaddingHorizontalSM-c.lineWidth;return[G(c),G((0,x.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:O,insetInlineEnd:O},[`${b}-selector`]:{padding:`0 ${O}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:O+c.fontSize*1.5},[`
|
|
|
&${b}-show-arrow ${b}-selection-item,
|
|
|
&${b}-show-arrow ${b}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:c.fontSize*1.5}}}},G((0,x.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const qe=c=>{const{componentCls:b,selectorBg:O}=c;return{position:"relative",backgroundColor:O,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${b}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${b}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${b}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},vt=function(c,b){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:j,borderHoverColor:M,outlineColor:ge,antCls:Me}=b,ze=O?{[`${j}-selector`]:{borderColor:M}}:{};return{[c]:{[`&:not(${j}-disabled):not(${j}-customize-input):not(${Me}-pagination-size-changer)`]:Object.assign(Object.assign({},ze),{[`${j}-focused& ${j}-selector`]:{borderColor:M,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${ge}`,outline:0},[`&:hover ${j}-selector`]:{borderColor:M}})}}},It=c=>{const{componentCls:b}=c;return{[`${b}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ee=c=>{const{componentCls:b,inputPaddingHorizontalBase:O,iconCls:j}=c;return{[b]:Object.assign(Object.assign({},(0,L.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},qe(c)),It(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},L.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},L.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,L.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:O,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[j]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${b}-suffix)`]:{pointerEvents:"auto"}},[`${b}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${b}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:O,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":{[`${b}-clear`]:{opacity:1}}}),[`${b}-has-feedback`]:{[`${b}-clear`]:{insetInlineEnd:O+c.fontSize+c.paddingXS}}}},A=c=>{const{componentCls:b}=c;return[{[b]:{[`&-borderless ${b}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${b}-in-form-item`]:{width:"100%"}}},ee(c),Ve(c),Oe(c),te(c),{[`${b}-rtl`]:{direction:"rtl"}},vt(b,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),vt(`${b}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),vt(`${b}-status-warning`,(0,x.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,H.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var m=(0,K.Z)("Select",(c,b)=>{let{rootPrefixCls:O}=b;const j=(0,x.TS)(c,{rootPrefixCls:O,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[A(j)]},c=>{const{fontSize:b,lineHeight:O,controlHeight:j,controlPaddingHorizontal:M,zIndexPopupBase:ge,colorText:Me,fontWeightStrong:ze,controlItemBgActive:be,controlItemBgHover:pt,colorBgContainer:Ke,colorFillSecondary:Ge,controlHeightLG:J,controlHeightSM:U,colorBgContainerDisabled:ae,colorTextDisabled:ne}=c;return{zIndexPopup:ge+50,optionSelectedColor:Me,optionSelectedFontWeight:ze,optionSelectedBg:be,optionActiveBg:pt,optionPadding:`${(j-b*O)/2}px ${M}px`,optionFontSize:b,optionLineHeight:O,optionHeight:j,selectorBg:Ke,clearBg:Ke,singleItemHeightLG:J,multipleItemBg:Ge,multipleItemBorderColor:"transparent",multipleItemHeight:U,multipleItemHeightLG:j,multipleSelectorBgDisabled:ae,multipleItemColorDisabled:ne,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return H}});const L=x=>{const p={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:x==="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 H(x,K){return x||L(K)}},84443:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return L}});function L(H,x){return x!==void 0?x:H!==null}},66339:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});var L=f(40001),H=f(19248),x=f(99267),K=f(84105),p=f(58617),D=f(47472),P=f(59301);function pe(te){let{suffixIcon:S,clearIcon:Ce,menuItemSelectedIcon:N,removeIcon:fe,loading:Oe,multiple:G,hasFeedback:Ve,prefixCls:qe,showSuffixIcon:vt,feedbackIcon:It,showArrow:ee,componentName:A}=te;const m=Ce!=null?Ce:P.createElement(H.Z,null),c=M=>S===null&&!Ve&&!ee?null:P.createElement(P.Fragment,null,vt!==!1&&M,Ve&&It);let b=null;if(S!==void 0)b=c(S);else if(Oe)b=c(P.createElement(p.Z,{spin:!0}));else{const M=`${qe}-suffix`;b=ge=>{let{open:Me,showSearch:ze}=ge;return c(Me&&ze?P.createElement(D.Z,{className:M}):P.createElement(K.Z,{className:M}))}}let O=null;N!==void 0?O=N:G?O=P.createElement(L.Z,null):O=null;let j=null;return fe!==void 0?j=fe:j=P.createElement(x.Z,null),{clearIcon:m,suffixIcon:b,itemIcon:O,removeIcon:j}}},8378:function(nn,xe){"use strict";const f=L=>({[L.componentCls]:{[`${L.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
|
|
|
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}},[`${L.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
|
|
|
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}}});xe.Z=f},92899:function(nn,xe,f){"use strict";f.d(xe,{Fm:function(){return N}});var L=f(93083),H=f(95406);const x=new L.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),K=new L.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 L.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),D=new L.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),P=new L.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),pe=new L.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),te=new L.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),S=new L.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ce={"move-up":{inKeyframes:te,outKeyframes:S},"move-down":{inKeyframes:x,outKeyframes:K},"move-left":{inKeyframes:p,outKeyframes:D},"move-right":{inKeyframes:P,outKeyframes:pe}},N=(fe,Oe)=>{const{antCls:G}=fe,Ve=`${G}-${Oe}`,{inKeyframes:qe,outKeyframes:vt}=Ce[Oe];return[(0,H.R)(Ve,qe,vt,fe.motionDurationMid),{[`
|
|
|
${Ve}-enter,
|
|
|
${Ve}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:fe.motionEaseOutCirc},[`${Ve}-leave`]:{animationTimingFunction:fe.motionEaseInOutCirc}}]}},13826:function(nn,xe,f){"use strict";f.d(xe,{Qt:function(){return p},Uw:function(){return K},fJ:function(){return x},ly:function(){return D},oN:function(){return N}});var L=f(93083),H=f(95406);const x=new L.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),K=new L.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new L.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),D=new L.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),P=new L.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),pe=new L.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),te=new L.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),S=new L.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ce={"slide-up":{inKeyframes:x,outKeyframes:K},"slide-down":{inKeyframes:p,outKeyframes:D},"slide-left":{inKeyframes:P,outKeyframes:pe},"slide-right":{inKeyframes:te,outKeyframes:S}},N=(fe,Oe)=>{const{antCls:G}=fe,Ve=`${G}-${Oe}`,{inKeyframes:qe,outKeyframes:vt}=Ce[Oe];return[(0,H.R)(Ve,qe,vt,fe.motionDurationMid),{[`
|
|
|
${Ve}-enter,
|
|
|
${Ve}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:fe.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Ve}-leave`]:{animationTimingFunction:fe.motionEaseInQuint}}]}},89780:function(nn){(function(xe,f){nn.exports=f()})(this,function(){"use strict";var xe=navigator.userAgent,f=navigator.platform,L=/gecko\/\d/i.test(xe),H=/MSIE \d/.test(xe),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe),K=/Edge\/(\d+)/.exec(xe),p=H||x||K,D=p&&(H?document.documentMode||6:+(K||x)[1]),P=!K&&/WebKit\//.test(xe),pe=P&&/Qt\/\d+\.\d+/.test(xe),te=!K&&/Chrome\//.test(xe),S=/Opera\//.test(xe),Ce=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(xe),fe=/PhantomJS/.test(xe),Oe=!K&&/AppleWebKit/.test(xe)&&/Mobile\/\w+/.test(xe),G=/Android/.test(xe),Ve=Oe||G||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(xe),qe=Oe||/Mac/.test(f),vt=/\bCrOS\b/.test(xe),It=/win/i.test(f),ee=S&&xe.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(S=!1,P=!0);var A=qe&&(pe||S&&(ee==null||ee<12.11)),m=L||p&&D>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=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 O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return O(e).appendChild(t)}function M(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 ge(e,t,r,n){var i=M(e,t,r,n);return i.setAttribute("role","presentation"),i}var Me;document.createRange?Me=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:Me=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 be(){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 pt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Ke(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 Ge=function(e){e.select()};Oe?Ge=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(Ge=function(e){try{e.select()}catch(t){}});function J(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function U(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 ne=function(){this.id=null,this.f=null,this.time=0,this.handler=J(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.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 Ie=50,Te={toString:function(){return"CodeMirror.Pass"}},re={scroll:!1},De={origin:"*mouse"},de={origin:"+move"};function yt(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 Tt=[""];function bt(e){for(;Tt.length<=e;)Tt.push(Je(Tt)+" ");return Tt[e]}function Je(e){return e[e.length-1]}function Et(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 F(){}function we(e,t){var r;return Object.create?r=Object.create(e):(F.prototype=e,r=new F),t&&U(t,r),r}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function V(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||le.test(e))}function ie(e,t){return t?t.source.indexOf("\\w")>-1&&V(e)?!0:t.test(e):V(e)}function he(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 ve(e){return e.charCodeAt(0)>=768&&Se.test(e)}function Pe(e,t,r){for(;(r<0?t>0:t<e.length)&&ve(e.charAt(t));)t+=r;return t}function q(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 Xe(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 ce=null;function Re(e,t,r){var n;ce=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:ce=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:ce=i)}return n!=null?n:ce}var Le=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,y){this.level=u,this.from=v,this.to=y}return function(u,v){var y=v=="ltr"?"L":"R";if(u.length==0||v=="ltr"&&!n.test(u))return!1;for(var E=u.length,w=[],z=0;z<E;++z)w.push(r(u.charCodeAt(z)));for(var X=0,ye=y;X<E;++X){var Fe=w[X];Fe=="m"?w[X]=ye:ye=Fe}for(var ke=0,$e=y;ke<E;++ke){var Qe=w[ke];Qe=="1"&&$e=="r"?w[ke]="n":o.test(Qe)&&($e=Qe,Qe=="r"&&(w[ke]="R"))}for(var St=1,dt=w[0];St<E-1;++St){var Kt=w[St];Kt=="+"&&dt=="1"&&w[St+1]=="1"?w[St]="1":Kt==","&&dt==w[St+1]&&(dt=="1"||dt=="n")&&(w[St]=dt),dt=Kt}for(var Sn=0;Sn<E;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Dn=void 0;for(Dn=Sn+1;Dn<E&&w[Dn]=="%";++Dn);for(var br=Sn&&w[Sn-1]=="!"||Dn<E&&w[Dn]=="1"?"1":"N",dr=Sn;dr<Dn;++dr)w[dr]=br;Sn=Dn-1}}for(var Bn=0,hr=y;Bn<E;++Bn){var er=w[Bn];hr=="L"&&er=="1"?w[Bn]="L":o.test(er)&&(hr=er)}for(var Un=0;Un<E;++Un)if(i.test(w[Un])){var Zn=void 0;for(Zn=Un+1;Zn<E&&i.test(w[Zn]);++Zn);for(var Pn=(Un?w[Un-1]:y)=="L",vr=(Zn<E?w[Zn]:y)=="L",Wi=Pn==vr?Pn?"L":"R":y,ai=Un;ai<Zn;++ai)w[ai]=Wi;Un=Zn-1}for(var ir=[],Zr,Jn=0;Jn<E;)if(a.test(w[Jn])){var ba=Jn;for(++Jn;Jn<E&&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<E&&w[Jn]!="L";++Jn);for(var lr=Vr;lr<Jn;)if(l.test(w[lr])){Vr<lr&&(ir.splice(yi,0,new s(1,Vr,lr)),yi+=bi);var Hi=lr;for(++lr;lr<Jn&&l.test(w[lr]);++lr);ir.splice(yi,0,new s(2,Hi,lr)),yi+=bi,Vr=lr}else++lr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return v=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),Je(ir).level==1&&(Zr=u.match(/\s+$/))&&(Je(ir).to-=Zr[0].length,ir.push(new s(0,E-Zr[0].length,E)))),v=="rtl"?ir.reverse():ir}}();function Ee(e,t){var r=e.order;return r==null&&(r=e.order=Le(e.text,t)),r}var Ye=[],_=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]||Ye).concat(r)}};function et(e,t){return e._handlers&&e._handlers[t]||Ye}function Be(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 lt(e,t){var r=et(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 ft(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),lt(e,r||t.type,e,t),Yt(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 Zt(e,t){return et(e,t).length>0}function At(e){e.prototype.on=function(t,r){_(this,t,r)},e.prototype.off=function(t,r){Be(this,t,r)}}function Dt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Xt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){Dt(e),Xt(e)}function Cn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),qe&&e.ctrlKey&&t==1&&(t=3),t}var $n=function(){if(p&&D<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}(),zn;function pn(e){if(zn==null){var t=M("span","\u200B");j(e,M("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(zn=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&D<8))}var r=zn?M("span","\u200B"):M("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ln;function wn(e){if(Ln!=null)return Ln;var t=j(e,document.createTextNode("A\u062EA")),r=Me(t,0,1).getBoundingClientRect(),n=Me(t,1,2).getBoundingClientRect();return O(e),!r||r.left==r.right?!1:Ln=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/)},xn=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},dn=function(){var e=M("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Wn=null;function Qt(e){if(Wn!=null)return Wn;var t=j(e,M("span","x")),r=t.getBoundingClientRect(),n=Me(t,0,1).getBoundingClientRect();return Wn=Math.abs(r.left-n.left)>1}var Nn={},Hn={};function Sr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Nn[e]=t}function pr(e,t){Hn[e]=t}function on(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=we(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return on("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return on("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function tt(e,t){t=on(t);var r=Nn[t.name];if(!r)return tt(e,"text/plain");var n=r(e,t);if(Wt.hasOwnProperty(t.name)){var i=Wt[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 Wt={};function g(e,t){var r=Wt.hasOwnProperty(e)?Wt[e]:Wt[e]={};U(t,r)}function T(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 W(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 d(e,t,r){return e.startState?e.startState(t,r):!0}var h=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};h.prototype.eol=function(){return this.pos>=this.string.length},h.prototype.sol=function(){return this.pos==this.lineStart},h.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},h.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},h.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},h.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},h.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},h.prototype.skipToEnd=function(){this.pos=this.string.length},h.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},h.prototype.backUp=function(e){this.pos-=e},h.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)},h.prototype.indentation=function(){return ae(this.string,null,this.tabSize)-(this.lineStart?ae(this.string,this.lineStart,this.tabSize):0)},h.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)}},h.prototype.current=function(){return this.string.slice(this.start,this.pos)},h.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},h.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},h.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function C(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 R(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 Q(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function B(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function $(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 ue(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 We(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function I(e,t,r){if(r===void 0&&(r=null),!(this instanceof I))return new I(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Z(e,t){return e.line-t.line||e.ch-t.ch}function je(e,t){return e.sticky==t.sticky&&Z(e,t)==0}function me(e){return I(e.line,e.ch)}function Ze(e,t){return Z(e,t)<0?t:e}function Ne(e,t){return Z(e,t)<0?e:t}function st(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Y(e,t){if(t.line<e.first)return I(e.first,0);var r=e.first+e.size-1;return t.line>r?I(r,C(e,r).text.length):se(t,C(e,t.line).text.length)}function se(e,t){var r=e.ch;return r==null||r>t?I(e.line,t):r<0?I(e.line,0):e}function Ae(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Y(e,t[n]);return r}var nt=function(e,t){this.state=e,this.lookAhead=t},Ue=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Ue.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ue.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}},Ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ue.fromSaved=function(e,t,r){return t instanceof nt?new Ue(e,T(e.mode,t.state),r,t.lookAhead):new Ue(e,T(e.mode,t),r)},Ue.prototype.save=function(e){var t=e!==!1?T(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new nt(t,this.maxLookAhead):t};function ot(e,t,r,n){var i=[e.state.modeGen],o={};kt(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],y=1,E=0;r.state=!0,kt(e,t.text,v.mode,r,function(w,z){for(var X=y;E<w;){var ye=i[y];ye>w&&i.splice(y,1,w,i[y+1],ye),y+=2,E=Math.min(w,ye)}if(z)if(v.opaque)i.splice(X,y-X,w,"overlay "+z),y=X+2;else for(;X<y;X+=2){var Fe=i[X+1];i[X+1]=(Fe?Fe+" ":"")+"overlay "+z}},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 jt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Mt(e,$(t)),i=t.text.length>e.options.maxHighlightLength&&T(e.doc.mode,n.state),o=ot(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 Mt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Ue(n,!0,t);var o=Rt(e,t,r),a=o>n.first&&C(n,o-1).stateAfter,l=a?Ue.fromSaved(n,a,o):new Ue(n,d(n.mode),o);return n.iter(o,t,function(s){Ft(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 Ft(e,t,r,n){var i=e.doc.mode,o=new h(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&$t(i,r.state);!o.eol();)xt(i,o,r.state),o.start=o.pos}function $t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=W(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function xt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=W(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 qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ut(e,t,r,n){var i=e.doc,o=i.mode,a;t=Y(i,t);var l=C(i,t.line),s=Mt(e,t.line,r),u=new h(l.text,e.options.tabSize,s),v;for(n&&(v=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=xt(o,u,s.state),n&&v.push(new qt(u,a,T(i.mode,s.state)));return n?v:new qt(u,a,s.state)}function _t(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 kt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,v=new h(t,e.options.tabSize,n),y,E=e.options.addModeClass&&[null];for(t==""&&_t($t(r,n.state),o);!v.eol();){if(v.pos>e.options.maxHighlightLength?(l=!1,a&&Ft(e,t,n,v.pos),v.pos=t.length,y=null):y=_t(xt(r,v,n.state,E),o),E){var w=E[0].name;w&&(y="m-"+(y?w+" "+y:w))}if(!l||u!=y){for(;s<v.start;)s=Math.min(v.start,s+5e3),i(s,u);u=y}v.start=v.pos}for(;s<v.pos;){var z=Math.min(v.pos,s+5e3);i(z,u),s=z}}function Rt(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=C(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof nt?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 Ct(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=C(e,n).stateAfter;if(i&&(!(i instanceof nt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var zt=!1,wt=!1;function fn(){zt=!0}function Pt(){wt=!0}function Ht(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 Gt(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 _n(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 Ht(a,o.from,s?null:o.to))}}return n}function Ot(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 Ht(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function at(e,t){if(t.full)return null;var r=oe(e,t.from.line)&&C(e,t.from.line).markedSpans,n=oe(e,t.to.line)&&C(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=Z(t.from,t.to)==0,l=_n(r,i,a),s=Ot(n,o,a),u=t.text.length==1,v=Je(t.text).length+(u?i:0);if(l)for(var y=0;y<l.length;++y){var E=l[y];if(E.to==null){var w=an(s,E.marker);w?u&&(E.to=w.to==null?null:w.to+v):E.to=i}}if(s)for(var z=0;z<s.length;++z){var X=s[z];if(X.to!=null&&(X.to+=v),X.from==null){var ye=an(l,X.marker);ye||(X.from=v,u&&(l||(l=[])).push(X))}else X.from+=v,u&&(l||(l=[])).push(X)}l&&(l=ut(l)),s&&s!=l&&(s=ut(s));var Fe=[l];if(!u){var ke=t.text.length-2,$e;if(ke>0&&l)for(var Qe=0;Qe<l.length;++Qe)l[Qe].to==null&&($e||($e=[])).push(new Ht(l[Qe].marker,null,null));for(var St=0;St<ke;++St)Fe.push($e);Fe.push(s)}return Fe}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 en(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var z=0;z<w.markedSpans.length;++z){var X=w.markedSpans[z].marker;X.readOnly&&(!n||k(n,X)==-1)&&(n||(n=[])).push(X)}}),!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(!(Z(u.to,l.from)<0||Z(u.from,l.to)>0)){var v=[s,1],y=Z(u.from,l.from),E=Z(u.to,l.to);(y<0||!a.inclusiveLeft&&!y)&&v.push({from:u.from,to:l.from}),(E>0||!a.inclusiveRight&&!E)&&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 Vt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Nt(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=Z(n.from,i.from)||Nt(e)-Nt(t);if(o)return-o;var a=Z(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=wt&&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 Tn(e){return mn(e,!0)}function _e(e){return mn(e,!1)}function He(e,t){var r=wt&&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 ht(e,t,r,n,i){var o=C(e,t),a=wt&&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=Z(u.from,r)||Nt(s.marker)-Nt(i),y=Z(u.to,n)||ln(s.marker)-ln(i);if(!(v>=0&&y<=0||v<=0&&y>=0)&&(v<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,r)>=0:Z(u.to,r)>0)||v>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,n)<=0:Z(u.from,n)<0)))return!0}}}function gt(e){for(var t;t=Tn(e);)e=t.find(-1,!0).line;return e}function vn(e){for(var t;t=_e(e);)e=t.find(1,!0).line;return e}function Cr(e){for(var t,r;t=_e(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Kn(e,t){var r=C(e,t),n=gt(r);return r==n?t:$(n)}function jn(e,t){if(t>e.lastLine())return t;var r=C(e,t),n;if(!An(e,r))return t;for(;n=_e(r);)r=n.find(1,!0).line;return $(r)+1}function An(e,t){var r=wt&&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=gt(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 sr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Tn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=_e(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=C(r,r.first),t.maxLineLength=sr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=sr(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return $(this)},At(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),Vt(e,r);var i=n?n(e):1;i!=e.height&&B(e,i)}function Xr(e){e.parent=null,tn(e)}var li={},Yr={};function xr(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=ge("span",null,null,P?"padding-right: .1px":null),n={pre:ge("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=Bi,wn(e.display.measure)&&(a=Ee(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&$(o);Ci(o,n,jt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Ke(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Ke(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pn(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(P){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 lt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ke(n.pre.className,n.textClass||"")),n}function Ir(e){var t=M("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Bi(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&&D<9&&(u=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var y=0;;){s.lastIndex=y;var E=s.exec(t),w=E?E.index-y:t.length-y;if(w){var z=document.createTextNode(l.slice(y,y+w));p&&D<9?v.appendChild(M("span",[z])):v.appendChild(z),e.map.push(e.pos,e.pos+w,z),e.col+=w,e.pos+=w}if(!E)break;y+=w+1;var X=void 0;if(E[0]==" "){var ye=e.cm.options.tabSize,Fe=ye-e.col%ye;X=v.appendChild(M("span",bt(Fe),"cm-tab")),X.setAttribute("role","presentation"),X.setAttribute("cm-text"," "),e.col+=Fe}else E[0]=="\r"||E[0]==`
|
|
|
`?(X=v.appendChild(M("span",E[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),X.setAttribute("cm-text",E[0]),e.col+=1):(X=e.cm.options.specialCharPlaceholder(E[0]),X.setAttribute("cm-text",E[0]),p&&D<9?v.appendChild(M("span",[X])):v.appendChild(X),e.col+=1);e.map.push(e.pos,e.pos+1,X),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 $e=M("span",[v],ke,o);if(a)for(var Qe in a)a.hasOwnProperty(Qe)&&Qe!="style"&&Qe!="class"&&$e.setAttribute(Qe,a[Qe]);return e.content.appendChild($e)}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 y=void 0,E=0;E<t.length&&(y=t[E],!(y.to>u&&y.from<=u));E++);if(y.to>=v)return e(r,n,i,o,a,l,s);e(r,n.slice(0,y.to-u),i,o,null,l,s),o=null,n=n.slice(y.to-u),u=y.to}}}function jr(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 Ci(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]),xr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,v="",y,E,w=0,z,X,ye,Fe,ke;;){if(w==s){z=X=ye=E="",ke=null,Fe=null,w=1/0;for(var $e=[],Qe=void 0,St=0;St<n.length;++St){var dt=n[St],Kt=dt.marker;if(Kt.type=="bookmark"&&dt.from==s&&Kt.widgetNode)$e.push(Kt);else if(dt.from<=s&&(dt.to==null||dt.to>s||Kt.collapsed&&dt.to==s&&dt.from==s)){if(dt.to!=null&&dt.to!=s&&w>dt.to&&(w=dt.to,X=""),Kt.className&&(z+=" "+Kt.className),Kt.css&&(E=(E?E+";":"")+Kt.css),Kt.startStyle&&dt.from==s&&(ye+=" "+Kt.startStyle),Kt.endStyle&&dt.to==w&&(Qe||(Qe=[])).push(Kt.endStyle,dt.to),Kt.title&&((ke||(ke={})).title=Kt.title),Kt.attributes)for(var Sn in Kt.attributes)(ke||(ke={}))[Sn]=Kt.attributes[Sn];Kt.collapsed&&(!Fe||gn(Fe.marker,Kt)<0)&&(Fe=dt)}else dt.from>s&&w>dt.from&&(w=dt.from)}if(Qe)for(var Qn=0;Qn<Qe.length;Qn+=2)Qe[Qn+1]==w&&(X+=" "+Qe[Qn]);if(!Fe||Fe.from==s)for(var Dn=0;Dn<$e.length;++Dn)jr(t,0,$e[Dn]);if(Fe&&(Fe.from||0)==s){if(jr(t,(Fe.to==null?l+1:Fe.to)-s,Fe.marker,Fe.from==null),Fe.to==null)return;Fe.to==s&&(Fe=!1)}}if(s>=l)break;for(var br=Math.min(l,w);;){if(v){var dr=s+v.length;if(!Fe){var Bn=dr>br?v.slice(0,br-s):v;t.addToken(t,Bn,y?y+z:z,ye,s+Bn.length==w?X:"",E,ke)}if(dr>=br){v=v.slice(br-s),s=br;break}s=dr,ye=""}v=i.slice(o,o=r[u++]),y=xr(r[u++],t.cm.options)}}}function xi(e,t,r){this.line=t,this.rest=Cr(t),this.size=this.rest?$(Je(this.rest))-r+1:1,this.node=this.text=null,this.hidden=An(e,t)}function Ur(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new xi(e.doc,C(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 Lt(e,t){var r=e.ownsGroup;if(r)try{ct(r)}finally{Ar=null,t(r)}}var mt=null;function rt(e,t){var r=et(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:mt?i=mt:(i=mt=[],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=mt;mt=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"&&Zi(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=M("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&D<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=ur(t);t.background=n.insertBefore(M("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?ur(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=ur(t);t.gutterBackground=M("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=ur(t),l=t.gutter=M("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(M("div",We(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(M("div",[v],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Zi(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=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=M("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Zo(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 Zo(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;"),j(t.display.measure,M("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=j(e.measure,M("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 Dr(e){return Ie-e.display.nativeBarWidth}function Br(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function ji(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Br(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 Ui(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($(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ko(e,t){t=gt(t);var r=$(t),n=e.display.externalMeasured=new xi(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,j(e.display.lineMeasure,i.pre),n}function _i(e,t,r,n){return Pr(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=$(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=Ui(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Pr(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=Jt(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 Jt(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&&ve(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ve(t.line.text.charAt(i.coverStart+l));)++l;if(p&&D<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(Me(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&D<11&&(u=Bt(e.display.measure,u))}else{a>0&&(s=n="right");var y;e.options.lineWrapping&&(y=o.getClientRects()).length>1?u=y[n=="right"?y.length-1:0]:u=o.getBoundingClientRect()}if(p&&D<9&&!a&&(!u||!u.left&&!u.right)){var E=o.parentNode.getClientRects()[0];E?u={left:E.left,right:E.left+Oi(e.display),top:E.top,bottom:E.bottom}:u=So}for(var w=u.top-t.rect.top,z=u.bottom-t.rect.top,X=(w+z)/2,ye=t.view.measure.heights,Fe=0;Fe<ye.length-1&&!(X<ye[Fe]);Fe++);var ke=Fe?ye[Fe-1]:0,$e=ye[Fe],Qe={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:ke,bottom:$e};return!u.left&&!u.right&&(Qe.bogus=!0),e.options.singleCursorHeightPerLine||(Qe.rtop=w,Qe.rbottom=z),Qe}function Bt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(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,O(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 or(){return te&&G?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gr(){return te&&G?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function _r(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=_r(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:gr());var s=l.left+(n=="window"?0:or());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-=or(),i-=gr();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=C(e.doc,t.line)),wr(e,n,_i(e,n,t.ch,i),r)}function mr(e,t,r,n,i,o){n=n||C(e.doc,t.line),i||(i=Jr(e,n));function a(z,X){var ye=Pr(e,i,z,X?"right":"left",o);return X?ye.left=ye.right:ye.right=ye.left,wr(e,n,ye,r)}var l=Ee(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(z,X,ye){var Fe=l[X],ke=Fe.level==1;return a(ye?z-1:z,ke!=ye)}var y=Re(l,s,u),E=ce,w=v(s,y,u=="before");return E!=null&&(w.other=v(s,E,u!="before")),w}function Ca(e,t){var r=0;t=Y(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=C(e.doc,t.line),i=Mn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function jo(e,t,r,n,i){var o=I(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Uo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return jo(n.first,0,null,-1,-1);var i=ue(n,r),o=n.first+n.size-1;if(i>o)return jo(n.first+n.size-1,C(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=C(n,i);;){var l=Zl(e,a,i,t,r),s=He(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=C(n,i=u.line)}}function xa(e,t,r,n){n-=_r(t);var i=t.text.length,o=q(function(a){return Pr(e,r,a-1).bottom<=n},i,0);return i=q(function(a){return Pr(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,Pr(e,r,n),"line").top;return xa(e,t,r,i)}function _o(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=_r(t),l=0,s=t.text.length,u=!0,v=Ee(t,e.doc.direction);if(v){var y=(e.options.lineWrapping?jl:Kl)(e,t,r,o,v,n,i);u=y.level!=1,l=u?y.from:y.to-1,s=u?y.to:y.from-1}var E=null,w=null,z=q(function(St){var dt=Pr(e,o,St);return dt.top+=a,dt.bottom+=a,_o(dt,n,i,!1)?(dt.top<=i&&dt.left<=n&&(E=St,w=dt),!0):!1},l,s),X,ye,Fe=!1;if(w){var ke=n-w.left<w.right-n,$e=ke==u;z=E+($e?0:1),ye=$e?"after":"before",X=ke?w.left:w.right}else{!u&&(z==s||z==l)&&z++,ye=z==0?"after":z==t.text.length?"before":Pr(e,o,z-(u?1:0)).bottom+a<=i==u?"after":"before";var Qe=mr(e,I(r,z,ye),"line",t,o);X=Qe.left,Fe=i<Qe.top?-1:i>=Qe.bottom?1:0}return z=Pe(t.text,z,1),jo(r,z,ye,Fe,n-X)}function Kl(e,t,r,n,i,o,a){var l=q(function(y){var E=i[y],w=E.level!=1;return _o(mr(e,I(r,w?E.to:E.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=mr(e,I(r,u?s.from:s.to,u?"after":"before"),"line",t,n);_o(v,o,a,!0)&&v.top>a&&(s=i[l-1])}return s}function jl(e,t,r,n,i,o,a){var l=xa(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var v=null,y=null,E=0;E<i.length;E++){var w=i[E];if(!(w.from>=u||w.to<=s)){var z=w.level!=1,X=Pr(e,n,z?Math.min(u,w.to)-1:Math.max(s,w.from)).right,ye=X<o?o-X+1e9:X-o;(!v||y>ye)&&(v=w,y=ye)}}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=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(M("br"));fi.appendChild(document.createTextNode("x"))}j(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),O(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),r=M("pre",[t],"CodeMirror-line-like");j(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(An(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&&B(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(y){return null}var s=Uo(e,o,a),u;if(n&&s.xRel>0&&(u=C(e.doc,s.line).text).length==s.ch){var v=ae(u,u.length,e.options.tabSize)-u.length;s=I(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 cr(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)wt&&Kn(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)wt&&jn(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=Co(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=Co(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=Co(e,t,t,-1),s=Co(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Ur(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 Co(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!wt||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 Ul(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Ur(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ur(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(Ur(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||_l(e,l,o)}}return n}function Ma(e,t,r){var n=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(M("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(M("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 xo(e,t){return e.top-t.top||e.left-t.left}function _l(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,Br(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function v($e,Qe,St,dt){Qe<0&&(Qe=0),Qe=Math.round(Qe),dt=Math.round(dt),o.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+$e+`px;
|
|
|
top: `+Qe+"px; width: "+(St==null?s-$e:St)+`px;
|
|
|
height: `+(dt-Qe)+"px"))}function y($e,Qe,St){var dt=C(i,$e),Kt=dt.text.length,Sn,Qn;function Dn(Bn,hr){return Nr(e,I($e,Bn),"div",dt,hr)}function br(Bn,hr,er){var Un=wa(e,dt,null,Bn),Zn=hr=="ltr"==(er=="after")?"left":"right",Pn=er=="after"?Un.begin:Un.end-(/\s/.test(dt.text.charAt(Un.end-1))?2:1);return Dn(Pn,Zn)[Zn]}var dr=Ee(dt,i.direction);return Xe(dr,Qe||0,St==null?Kt:St,function(Bn,hr,er,Un){var Zn=er=="ltr",Pn=Dn(Bn,Zn?"left":"right"),vr=Dn(hr-1,Zn?"right":"left"),Wi=Qe==null&&Bn==0,ai=St==null&&hr==Kt,ir=Un==0,Zr=!dr||Un==dr.length-1;if(vr.top-Pn.top<=3){var Jn=(u?Wi:ai)&&ir,ba=(u?ai:Wi)&&Zr,Vr=Jn?l:(Zn?Pn:vr).left,yi=ba?s:(Zn?vr:Pn).right;v(Vr,Pn.top,yi-Vr,Pn.bottom)}else{var bi,lr,Hi,Sa;Zn?(bi=u&&Wi&&ir?l:Pn.left,lr=u?s:br(Bn,er,"before"),Hi=u?l:br(hr,er,"after"),Sa=u&&ai&&Zr?s:vr.right):(bi=u?br(Bn,er,"before"):l,lr=!u&&Wi&&ir?s:Pn.right,Hi=!u&&ai&&Zr?l:vr.left,Sa=u?br(hr,er,"after"):s),v(bi,Pn.top,lr-bi,Pn.bottom),Pn.bottom<vr.top&&v(l,Pn.bottom,null,vr.top),v(Hi,vr.top,Sa-Hi,vr.bottom)}(!Sn||xo(Pn,Sn)<0)&&(Sn=Pn),xo(vr,Sn)<0&&(Sn=vr),(!Qn||xo(Pn,Qn)<0)&&(Qn=Pn),xo(vr,Qn)<0&&(Qn=vr)}),{start:Sn,end:Qn}}var E=t.from(),w=t.to();if(E.line==w.line)y(E.line,E.ch,w.ch);else{var z=C(i,E.line),X=C(i,w.line),ye=gt(z)==gt(X),Fe=y(E.line,E.ch,ye?z.text.length+1:null).end,ke=y(w.line,ye?0:null,w.ch).start;ye&&(Fe.top<ke.top-2?(v(Fe.right,Fe.top,null,Fe.bottom),v(l,ke.top,ke.left,ke.bottom)):v(Fe.right,Fe.top,ke.left-Fe.right,Fe.bottom)),Fe.bottom<ke.top&&v(l,Fe.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||(lt(e,"focus",e,t),e.state.focused=!0,pt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),P&&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&&(lt(e,"blur",e,t),e.state.focused=!1,b(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&&D<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)&&(B(i.line,a),Ta(i.line),i.rest))for(var y=0;y<i.rest.length;y++)Ta(i.rest[y]);if(l>e.display.sizerWidth){var E=Math.ceil(l/Oi(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,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=ue(t,n),a=ue(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=ue(t,Mn(C(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ue(t,Mn(C(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!ft(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&&!fe){var o=M("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-r.viewOffset-wi(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+Dr(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?I(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?I(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=mr(e,t),s=!r||r==t?l:mr(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,y=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-y)>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=ji(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 y=e.options.fixedGutter?0:r.gutters.offsetWidth,E=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-y,w=Br(e)-r.gutters.offsetWidth,z=t.right-t.left>w;return z&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<E?a.scrollLeft=Math.max(0,t.left+y-(z?0:10)):t.right>w+E-3&&(a.scrollLeft=t.right+(z?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=Ca(e,t.from),n=Ca(e,t.to);Da(e,r,n,t.margin)}}function Da(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||(L||ea(e,{top:t}),Pa(e,t,!0),L&&ea(e),eo(e,100))}function Pa(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+Dr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),_(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),_(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&D<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=qe&&!N?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},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&&b(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),_(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&&pt(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&&Lt(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=_i(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+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Br(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==be();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&&Pa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,Y(n,e.scrollToPos.from),Y(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||lt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&<(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&<(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yr(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 ar(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,J(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Mt(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?T(t.mode,n.state):null,s=ot(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 y=!a||a.length!=o.styles.length||u!=v&&(!u||!v||u.bgClass!=v.bgClass||u.textClass!=v.textClass),E=0;!y&&E<a.length;++E)y=a[E]!=o.styles[E];y&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Ft(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&&yr(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=Br(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Zt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)lt.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=Dr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Dr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=be();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==be())&&(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)),wt&&(o=Kn(e.doc,o),a=jn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ul(e,o,a),r.viewOffset=Mn(C(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),O(r.cursorDiv),O(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==Br(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ki(e.display)-ji(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(z){var X=z.nextSibling;return P&&qe&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),X}for(var s=n.view,u=n.viewFrom,v=0;v<s.length;v++){var y=s[v];if(!y.hidden)if(!y.node||y.node.parentNode!=o){var E=mo(e,y,u,r);o.insertBefore(E,a)}else{for(;a!=y.node;)a=l(a);var w=i&&t!=null&&t<=u&&y.lineNumber;y.changes&&(k(y.changes,"gutter")>-1&&(w=!1),bn(e,y,u,r)),w&&(O(y.lineNumber),y.lineNumber.appendChild(document.createTextNode(We(e.options,u)))),a=y.node.nextSibling}u+=y.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+Dr(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=We(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(M("div",[M("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;O(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(M("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),cr(e),za(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=M("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=M("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=ge("div",null,"CodeMirror-code"),i.selectionDiv=M("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=M("div",null,"CodeMirror-cursors"),i.measure=M("div",null,"CodeMirror-measure"),i.lineMeasure=M("div",null,"CodeMirror-measure"),i.lineSpace=ge("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=ge("div",[i.lineSpace],"CodeMirror-lines");i.mover=M("div",[o],null,"position: relative"),i.sizer=M("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=M("div",null,null,"position: absolute; height: "+Ie+"px; width: 1px;"),i.gutters=M("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=M("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=M("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),p&&D<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!P&&!(L&&Ve)&&(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:L?Er=15:te?Er=-.7:Ce&&(Er=-1/3);function Ba(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=Ba(e);return t.x*=Er,t.y*=Er,t}function Za(e,t){var r=Ba(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&&qe&&P){e:for(var u=t.target,v=o.view;u!=a;u=u.parentNode)for(var y=0;y<v.length;y++)if(v[y].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!L&&!S&&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)&&Dt(t),o.wheelStartX=null;return}if(i&&Er!=null){var E=i*Er,w=e.doc.scrollTop,z=w+o.wrapper.clientHeight;E<0?w=Math.max(0,w+E-50):z=Math.min(e.doc.height,z+E+50),ea(e,{top:w,bottom:z})}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 X=a.scrollLeft-o.wheelStartX,ye=a.scrollTop-o.wheelStartY,Fe=ye&&o.wheelDY&&ye/o.wheelDY||X&&o.wheelDX&&X/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Fe&&(Er=(Er*Mo+Fe)/(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(!je(r.anchor,n.anchor)||!je(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 cn(me(this.ranges[t].anchor),me(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(Z(t,n.from())>=0&&Z(e,n.to())<=0)return r}return-1};var cn=function(e,t){this.anchor=e,this.head=t};cn.prototype.from=function(){return Ne(this.anchor,this.head)},cn.prototype.to=function(){return Ze(this.anchor,this.head)},cn.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(E,w){return Z(E.from(),w.from())}),r=k(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=Z(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Ne(l.from(),a.from()),v=Ze(l.to(),a.to()),y=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new cn(y?v:u,y?u:v))}}return new Or(t,r)}function ti(e,t){return new Or([new cn(e,t||e)],0)}function ni(e){return e.text?I(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(Z(e,t.from)<0)return e;if(Z(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),I(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 cn(Ka(i.anchor,t),Ka(i.head,t)))}return zr(e.cm,r,e.sel.primIndex)}function ja(e,t,r){return e.line==t.line?I(r.line,e.ch-t.ch+r.ch):I(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=I(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=ja(l.from,i,o),u=ja(ni(l),i,o);if(i=l.to,o=u,r=="around"){var v=e.sel.ranges[a],y=Z(v.head,v.anchor)<0;n[a]=new cn(y?u:s,y?s:u)}else n[a]=new cn(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=tt(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&&cr(e)}function Ua(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,$e,Qe){Kr(ke,$e,Qe,n),rt(ke,"change",ke,t)}function a(ke,$e){for(var Qe=[],St=ke;St<$e;++St)Qe.push(new tr(u[St],i(St),n));return Qe}var l=t.from,s=t.to,u=t.text,v=C(e,l.line),y=C(e,s.line),E=Je(u),w=i(u.length-1),z=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Ua(e,t)){var X=a(0,u.length-1);o(y,y.text,w),z&&e.remove(l.line,z),X.length&&e.insert(l.line,X)}else if(v==y)if(u.length==1)o(v,v.text.slice(0,l.ch)+E+v.text.slice(s.ch),w);else{var ye=a(1,u.length-1);ye.push(new tr(E+v.text.slice(s.ch),w,n)),o(v,v.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,ye)}else if(u.length==1)o(v,v.text.slice(0,l.ch)+u[0]+y.text.slice(s.ch),i(0)),e.remove(l.line+1,z);else{o(v,v.text.slice(0,l.ch)+u[0],i(0)),o(y,E+y.text.slice(s.ch),w);var Fe=a(1,u.length-1);z>1&&e.remove(l.line+1,z-1),e.insert(l.line+1,Fe)}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 _a(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,cr(e)}function ka(e){(e.doc.direction=="rtl"?pt:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){yr(e,function(){ka(e),cr(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:me(t.from),to:ni(t),text:R(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),Z(t.from,t.to)==0&&Z(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||lt(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=at(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 y in u)(v=y.match(/^spans_(\d+)$/))&&k(t,Number(v[1]))>-1&&(Je(l)[y]=u[y],delete u[y])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=Z(t,i)<0;o!=Z(r,i)<0?(i=t,t=r):o!=Z(t,r)<0&&(t=r)}return new cn(i,t)}else return new cn(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 cn(Y(e,i[o].anchor),Y(e,i[o].head))},origin:r&&r.origin};return lt(e,"beforeSelectionChange",e,n),e.cm&<(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,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Zt(e,"beforeSelectionChange")||e.cm&&Zt(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(Z(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=Po(e,a.anchor,l&&l.anchor,r,n),u=Po(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 cn(s,u))}return i?zr(e.cm,i,t.primIndex):t}function Ti(e,t,r,n,i){var o=C(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&&(lt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var y=s.find(n<0?1:-1),E=void 0;if((n<0?v:u)&&(y=rl(e,y,-n,y&&y.line==t.line?o:null)),y&&y.line==t.line&&(E=Z(y,r))&&(n<0?E<0:E>0))return Ti(e,y,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 Po(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,I(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Y(e,I(t.line-1)):null:r>0&&t.ch==(n||C(e,t.line)).text.length?t.line<e.first+e.size-1?I(t.line+1,0):null:new I(t.line,t.ch+r)}function il(e){e.setSelection(I(e.firstLine(),0),I(e.lastLine()),re)}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=Y(e,i)),o&&(n.to=Y(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),lt(e,"beforeChange",e,n),e.cm&<(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 Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=zt&&!r&&en(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]==""&&Z(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,at(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,at(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 y=Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"),E=function(X){var ye=o.changes[X];if(ye.origin=t,y&&!ol(e,ye,!1))return l.length=0,{};v.push(la(e,ye));var Fe=X?ia(e,ye):Je(l);ro(e,ye,Fe,Ya(e,ye)),!X&&e.cm&&e.cm.scrollIntoView({from:ye.from,to:ni(ye)});var ke=[];ri(e,function($e,Qe){!Qe&&k(ke,$e.history)==-1&&(cl($e.history,ye),ke.push($e.history)),ro($e,ye,null,Ya($e,ye))})},w=o.changes.length-1;w>=0;--w){var z=E(w);if(z)return z.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(Et(e.sel.ranges,function(i){return new cn(I(i.anchor.line+t,i.anchor.ch),I(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){cr(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:I(e.first,0),to:I(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:I(o,C(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=R(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,re),e.cantEdit&&Po(e,I(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=$(gt(C(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 z=sr(w);z>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=z,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Ct(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?cr(e):o.line==a.line&&t.text.length==1&&!Ua(e.doc,t)?qr(e,o.line,"text"):cr(e,o.line,a.line+1,u);var v=Zt(e,"changes"),y=Zt(e,"change");if(y||v){var E={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};y&&rt(e,"change",e,E),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(E)}e.display.selForContextMenu=null}function Pi(e,t,r,n,i){var o;n||(n=r),Z(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(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=I(u.from.line+n,u.from.ch),u.to=I(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=C(e,st(e,t)):i=$(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=$(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);B(r,Math.max(0,r.height-o)),e&&(yr(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&&(An(this.doc,n)||B(n,n.height+i),r&&yr(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),rt(r,"lineWidgetChanged",r,e,$(n))}))},At(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&&!An(e,a)){var s=Mn(a)<e.scrollTop;B(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:$(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),Zt(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,$(a),"text"):e&&(l.to!=null&&(i=$(a)),l.from!=null&&(n=$(a))),a.markedSpans=Gt(a.markedSpans,l),l.from==null&&this.collapsed&&!An(this.doc,a)&&e&&B(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=gt(this.lines[s]),v=sr(u);v>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&cr(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=I(t?o:$(o),a.from),e==-1))return r;if(a.to!=null&&(n=I(t?o:$(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||yr(n,function(){var i=t.line,o=$(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!An(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&B(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)}},At(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=Z(t,r);if(n&&U(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ge("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(ht(e,t.line,t,r,o)||t.line!=r.line&&ht(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}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(y){s&&o.collapsed&&!s.options.lineWrapping&>(y)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&B(y,0),En(y,new Ht(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(y){An(e,y)&&B(y,0)}),o.clearOnEnter&&_(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fn(),(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)cr(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)},At(so);function Ss(e,t,r,n,i){n=U(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,Y(s,t),Y(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(I(e.first,0),e.clipPos(I(e.lastLine())),function(t){return t.parent})}function Cs(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(Z(o,a)){var l=Ni(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xs(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,fr=function(e,t,r,n,i){if(!(this instanceof fr))return new fr(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=I(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),re)};fr.prototype=we(ao.prototype,{constructor:fr,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=Q(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=I(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:I(r,C(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),re)}),replaceRange:function(e,t,r,n){t=Y(this,t),r=r?Y(this,r):t,Pi(this,e,t,r,n)},getRange:function(e,t,r){var n=R(this,Y(this,e),Y(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 C(this,e)},getLineNumber:function(e){return $(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=C(this,e)),gt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Y(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,Y(this,typeof e=="number"?I(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,Y(this,e),Y(this,t||e),r)}),extendSelection:Yn(function(e,t,r){To(this,Y(this,e),t&&Y(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,Ae(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=Et(this.sel.ranges,e);Qa(this,Ae(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new cn(Y(this,e[i].anchor),Y(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 cn(Y(this,e),Y(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=R(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=R(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--)Di(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&&he(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,he(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!oe(this,e)||(t=e,e=C(this,e),!e))return null}else if(t=$(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,Y(this,e),Y(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=Y(this,e),Ni(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Y(this,e);var t=[],r=C(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=Y(this,e),t=Y(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}),Y(this,I(r,t))},indexFromPos:function(e){e=Y(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 fr(Q(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 fr(Q(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}],Cs(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),xs(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))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(ft(t,e)||$r(t.display,e))){Dt(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=Y(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,w),qa(t.doc,ti(Y(t.doc,r),Y(t.doc,ni(w))))})()},s=function(w,z){if(t.options.allowDropFileTypes&&k(t.options.allowDropFileTypes,w.type)==-1){l();return}var X=new FileReader;X.onerror=function(){return l()},X.onload=function(){var ye=X.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ye)){l();return}o[z]=ye,l()},X.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 y;if(t.state.draggingText&&!t.state.draggingText.copy&&(y=t.listSelections()),Do(t.doc,ti(r,r)),y)for(var E=0;E<y.length;++E)Pi(t.doc,"",y[E].anchor,y[E].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(!(ft(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce)){var r=M("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",S&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),S&&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=M("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(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;_(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),_(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=qe?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 Ds(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=Et(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),(A?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(A?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(S&&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&&Z(o.from,Je(n).to)<=0;){var a=n.pop();if(Z(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}yr(e,function(){for(var l=n.length-1;l>=0;l--)Pi(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=Pe(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 I(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Ee(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 y=Pr(t,v,u).top;u=q(function(E){return Pr(t,v,E).top==y},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 I(n,u,s)}}return new I(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=Ee(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=Re(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(Fe,ke){return ca(t,Fe instanceof I?Fe.ch:Fe,ke)},s,u=function(Fe){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Fe)):{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 y=a.level==1==n<0,E=l(r,y?1:-1);if(E!=null&&(y?E<=a.to&&E<=v.end:E>=a.from&&E>=v.begin)){var w=y?"before":"after";return new I(r.line,E,w)}}var z=function(Fe,ke,$e){for(var Qe=function(Sn,Qn){return Qn?new I(r.line,l(Sn,1),"before"):new I(r.line,Sn,"after")};Fe>=0&&Fe<i.length;Fe+=ke){var St=i[Fe],dt=ke>0==(St.level!=1),Kt=dt?$e.begin:l($e.end,-1);if(St.from<=Kt&&Kt<St.to||(Kt=dt?St.from:l(St.to,-1),$e.begin<=Kt&&Kt<$e.end))return Qe(Kt,dt)}},X=z(o+n,n,v);if(X)return X;var ye=n>0?v.end:l(v.begin,-1);return ye!=null&&!(n>0&&ye==t.text.length)&&(X=z(n>0?0:i.length-1,n,u(ye)),X)?X:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),re)},killLine:function(e){return Fi(e,function(t){if(t.empty()){var r=C(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:I(t.head.line+1,0)}:{from:t.head,to:I(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Fi(e,function(t){return{from:I(t.from().line,0),to:Y(e.doc,I(t.to().line+1,0))}})},delLineLeft:function(e){return Fi(e,function(t){return{from:I(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(I(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(I(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return xl(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")},de)},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")},de)},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/)?xl(e,t.head):n},de)},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(bt(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return yr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=C(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new I(i.line,i.ch-1)),i.ch>0)i=new I(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),I(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=C(e.doc,i.line-1).text;a&&(i=new I(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),I(i.line-1,a.length-1),i,"+transpose"))}}r.push(new cn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yr(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 Cl(e,t){var r=C(e.doc,t),n=gt(r);return n!=r&&(t=$(n)),da(!0,e,n,t,1)}function Ns(e,t){var r=C(e.doc,t),n=vn(r);return n!=r&&(t=$(n)),da(!0,e,r,t,-1)}function xl(e,t){var r=Cl(e,t.line),n=C(e.doc,r.line),i=Ee(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 I(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 ne;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")&&(Dt(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=be(),!ft(t,e))){p&&D<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=El(t,e);S&&(ha=n?r:null,!n&&r==88&&!dn&&(qe?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),L&&!qe&&!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;pt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),Be(document,"keyup",r),Be(document,"mouseover",r))}_(document,"keyup",r),_(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),ft(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||ft(t,e)||e.ctrlKey&&!e.altKey||qe&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(S&&r==ha){ha=null,Dt(e);return}if(!(S&&(!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&&Z(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(!(ft(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){P||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=un(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Bs(t,i,n,o,e))&&(i==1?n?Ks(t,n,o,e):Cn(e)==r.scroller&&Dt(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 Bs(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 Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=vt?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=qe?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(qe?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){p?setTimeout(J(Ra,e),0):e.curOp.focus=be();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&$n&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(Z((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(Z(a.to(),t)>0||t.xRel<0)?js(e,n,t,i):Us(e,n,t,i)}function js(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){P&&(i.scroller.draggable=!1),e.state.draggingText=!1,Be(i.wrapper.ownerDocument,"mouseup",a),Be(i.wrapper.ownerDocument,"mousemove",l),Be(i.scroller,"dragstart",s),Be(i.scroller,"drop",a),o||(Dt(u),n.addNew||To(e.doc,r,null,null,n.extend),P&&!Ce||p&&D==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};P&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),_(i.wrapper.ownerDocument,"mouseup",a),_(i.wrapper.ownerDocument,"mousemove",l),_(i.scroller,"dragstart",s),_(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new cn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new cn(I(t.line,0),Y(e.doc,I(t.line+1,0)));var n=r(e,t);return new cn(n.from,n.to)}function Us(e,t,r,n){var i=e.display,o=e.doc;Dt(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 cn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new cn(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,De):(l=0,rr(o,new Or([a],0),De),s=o.sel);var y=r;function E($e){if(Z(y,$e)!=0)if(y=$e,n.unit=="rectangle"){for(var Qe=[],St=e.options.tabSize,dt=ae(C(o,r.line).text,r.ch,St),Kt=ae(C(o,$e.line).text,$e.ch,St),Sn=Math.min(dt,Kt),Qn=Math.max(dt,Kt),Dn=Math.min(r.line,$e.line),br=Math.min(e.lastLine(),Math.max(r.line,$e.line));Dn<=br;Dn++){var dr=C(o,Dn).text,Bn=yt(dr,Sn,St);Sn==Qn?Qe.push(new cn(I(Dn,Bn),I(Dn,Bn))):dr.length>Bn&&Qe.push(new cn(I(Dn,Bn),I(Dn,yt(dr,Qn,St))))}Qe.length||Qe.push(new cn(r,r)),rr(o,zr(e,s.ranges.slice(0,l).concat(Qe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView($e)}else{var hr=a,er=Ll(e,$e,n.unit),Un=hr.anchor,Zn;Z(er.anchor,Un)>0?(Zn=er.head,Un=Ne(hr.from(),er.anchor)):(Zn=er.anchor,Un=Ze(hr.to(),er.head));var Pn=s.ranges.slice(0);Pn[l]=_s(e,new cn(Y(o,Un),Zn)),rr(o,zr(e,Pn,l),De)}}var w=i.wrapper.getBoundingClientRect(),z=0;function X($e){var Qe=++z,St=di(e,$e,!0,n.unit=="rectangle");if(St)if(Z(St,y)!=0){e.curOp.focus=be(),E(St);var dt=Eo(i,o);(St.line>=dt.to||St.line<dt.from)&&setTimeout(Xn(e,function(){z==Qe&&X($e)}),150)}else{var Kt=$e.clientY<w.top?-20:$e.clientY>w.bottom?20:0;Kt&&setTimeout(Xn(e,function(){z==Qe&&(i.scroller.scrollTop+=Kt,X($e))}),50)}}function ye($e){e.state.selectingText=!1,z=1/0,$e&&(Dt($e),i.input.focus()),Be(i.wrapper.ownerDocument,"mousemove",Fe),Be(i.wrapper.ownerDocument,"mouseup",ke),o.history.lastSelOrigin=null}var Fe=Xn(e,function($e){$e.buttons===0||!un($e)?ye($e):X($e)}),ke=Xn(e,ye);e.state.selectingText=ke,_(i.wrapper.ownerDocument,"mousemove",Fe),_(i.wrapper.ownerDocument,"mouseup",ke)}function _s(e,t){var r=t.anchor,n=t.head,i=C(e.doc,r.line);if(Z(r,n)==0&&r.sticky==n.sticky)return t;var o=Ee(i);if(!o)return t;var a=Re(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=Re(o,n.ch,n.sticky),y=v-a||(n.ch-r.ch)*(l.level==1?-1:1);v==s-1||v==s?u=y<0:u=y>0}var E=o[s+(u?-1:0)],w=u==(E.level==1),z=w?E.from:E.to,X=w?"after":"before";return r.ch==z&&r.sticky==X?t:new cn(new I(r.line,z,X),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(E){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Dt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Zt(e,r))return Yt(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=ue(e.doc,o),y=e.display.gutterSpecs[s];return lt(e,r,e,v,y.className,t),Yt(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||ft(e,t,"contextmenu")||m||e.display.input.onContextMenu(t)}function ks(e,t){return Zt(e,"gutterContextMenu")?Tl(e,t,"gutterContextMenu",!1):!1}function Pl(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),cr(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(I(a,v))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],I(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",Ve?"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",!It),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Pl(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?_:Be;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?(pt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),cr(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?U(t):{},U(Nl,t,!1);var n=t.value;typeof n=="string"?n=new fr(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,Pl(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 ne,keySeq:null,specialChars:null},t.autofocus&&!Ve&&o.input.focus(),p&&D<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,_a(this,n),t.autofocus&&!Ve||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),P&&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;_(t.scroller,"mousedown",Xn(e,Rl)),p&&D<11?_(t.scroller,"dblclick",Xn(e,function(s){if(!ft(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){Dt(s);var v=e.findWordAt(u);To(e.doc,v.anchor,v.head)}}})):_(t.scroller,"dblclick",function(s){return ft(e,s)||Dt(s)}),_(t.scroller,"contextmenu",function(s){return Dl(e,s)}),_(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Dl(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,y=u.top-s.top;return v*v+y*y>20*20}_(t.scroller,"touchstart",function(s){if(!ft(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)}}),_(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_(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"),y;!u.prev||a(u,u.prev)?y=new cn(v,v):!u.prev.prev||a(u,u.prev.prev)?y=e.findWordAt(v):y=new cn(I(v.line,0),Y(e.doc,I(v.line+1,0))),e.setSelection(y.anchor,y.head),e.focus(),Dt(s)}i()}),_(t.scroller,"touchcancel",i),_(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),lt(e,"scroll",e))}),_(t.scroller,"mousewheel",function(s){return Za(e,s)}),_(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),_(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){ft(e,s)||sn(s)},over:function(s){ft(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){ft(e,s)||pl(e)}};var l=t.input.getField();_(l,"keyup",function(s){return Il.call(e,s)}),_(l,"keydown",Xn(e,Ol)),_(l,"keypress",Xn(e,Ml)),_(l,"focus",function(s){return Yo(e,s)}),_(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=Mt(e,t).state:r="prev");var a=e.options.tabSize,l=C(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(C(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 y="",E=0;if(e.options.indentWithTabs)for(var w=Math.floor(v/a);w;--w)E+=a,y+=" ";if(E<v&&(y+=bt(v-E)),y!=u)return Pi(i,y,I(t,0),I(t,u.length),"+input"),l.stateAfter=null,!0;for(var z=0;z<i.sel.ranges.length;z++){var X=i.sel.ranges[z];if(X.head.line==t&&X.head.ch<u.length){var ye=I(t,u.length);ua(i,z,new cn(ye,ye));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=Et(s,function(Fe){return[Fe]}));for(var y=e.curOp.updateInput,E=n.ranges.length-1;E>=0;E--){var w=n.ranges[E],z=w.from(),X=w.to();w.empty()&&(r&&r>0?z=I(z.line,z.ch-r):e.state.overwrite&&!l?X=I(X.line,Math.min(C(o,X.line).text.length,X.ch+Je(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
|
|
|
`)==s.join(`
|
|
|
`)&&(z=X=I(z.line,0)));var ye={from:z,to:X,text:u?u[E%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,ye),rt(e,"inputRead",e,ye)}t&&!l&&Fl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=y),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&&yr(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(C(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:I(i,0),head:I(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=M("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=M("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return P?e.style.width="1000px":e.setAttribute("wrap","off"),Oe&&(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),lt(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:ar(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++,cr(this)}),removeOverlay:ar(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++,cr(this);return}}}),indentLine:ar(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:ar(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 y=v;y<o;++y)go(this,y,n);var E=this.doc.sel.ranges;s.ch==0&&i.length==E.length&&E[a].from().ch>0&&ua(this.doc,a,new cn(s,E[a].to()),re)}}}),getTokenAt:function(n,i){return Ut(this,n,i)},getLineTokens:function(n,i){return Ut(this,I(n),i,!0)},getTokenTypeAt:function(n){n=Y(this.doc,n);var i=jt(this,C(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 y=a._global[v];y.pred(l,this)&&k(o,y.val)==-1&&o.push(y.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=st(o,n==null?o.first+o.size-1:n),Mt(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=Y(this.doc,n):o=n?a.from():a.to(),mr(this,o,i||"page")},charCoords:function(n,i){return Nr(this,Y(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),Uo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,ue(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=C(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=mr(this,Y(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 y=Math.max(s.wrapper.clientHeight,this.doc.height),E=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>y)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=y&&(u=n.bottom),v+i.offsetWidth>E&&(v=E-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:ar(Ol),triggerOnKeyPress:ar(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:ar(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:ar(function(n){Fl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Y(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:ar(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()},de)}),deleteH:ar(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=Y(this.doc,n),v=0;v<i;++v){var y=mr(this,u,"div");if(s==null?s=y.left:y.left=s,u=Hl(this,y,l,o),u.hitSide)break}return u},moveV:ar(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 y=mr(o,v.head,"div");v.goalColumn!=null&&(y.left=v.goalColumn),l.push(y.left);var E=Hl(o,y,n,i);return i=="page"&&v==a.sel.primary()&&Jo(o,Nr(o,E,"div").top-y.top),E},de),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=C(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=ie(u,s)?function(y){return ie(y,s)}:/\s/.test(u)?function(y){return/\s/.test(y)}:function(y){return!/\s/.test(y)&&!ie(y)};a>0&&v(o.charAt(a-1));)--a;for(;l<o.length&&v(o.charAt(l));)++l}return new cn(I(n.line,a),I(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?pt(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),lt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==be()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ar(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Dr(this)-this.display.barHeight,width:n.scrollWidth-Dr(this)-this.display.barWidth,clientHeight:ji(this),clientWidth:Br(this)}},scrollIntoView:ar(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:I(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):Da(this,n.from,n.to,n.margin)}),setSize:ar(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,lt(this,"refresh",this)}),operation:function(n){return yr(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:ar(function(){var n=this.display.cachedTextHeight;cr(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),lt(this,"refresh",this)}),swapDoc:ar(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),_a(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}},At(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=C(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 I(ke,t.ch,t.sticky),l=C(e,ke))}function v(ke){var $e;if(n=="codepoint"){var Qe=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Qe)?$e=null:$e=new I(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Qe>=55296&&Qe<56320?2:1))),-r)}else i?$e=Ps(e.cm,l,t,r):$e=fa(l,t,r);if($e==null)if(!ke&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=$e;return!0}if(n=="char"||n=="codepoint")v();else if(n=="column")v(!0);else if(n=="word"||n=="group")for(var y=null,E=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(r<0&&!v(!z));z=!1){var X=l.text.charAt(t.ch)||`
|
|
|
`,ye=ie(X,w)?"w":E&&X==`
|
|
|
`?"n":!E||/\s/.test(X)?null:"p";if(E&&!z&&!ye&&(ye="s"),y&&y!=ye){r<0&&(r=1,v(),t.sticky="after");break}if(ye&&(y=ye),r>0&&!v(!z))break}var Fe=Po(e,t,o,a,!0);return je(o,Fe)&&(Fe.hitSide=!0),Fe}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=Uo(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hn.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}_(i,"paste",function(l){!o(l)||ft(n,l)||Al(l,n)||D<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),_(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),_(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),_(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_(i,"touchstart",function(){return r.forceCompositionEnd()}),_(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||ft(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,re),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(),y=v.firstChild;n.display.lineSpace.insertBefore(v,n.display.lineSpace.firstChild),y.value=Wr.text.join(`
|
|
|
`);var E=document.activeElement;Ge(y),setTimeout(function(){n.display.lineSpace.removeChild(v),E.focus(),E==i&&r.showPrimarySelection()},50)}}_(i,"copy",a),_(i,"cut",a)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.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&&Z(Ne(o,a),n)==0&&Z(Ze(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Bl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Bl(t,i);if(!u){var v=l[l.length-1].measure,y=v.maps?v.maps[v.maps.length-1]:v.map;u={node:y[y.length-1],offset:y[y.length-2]-y[y.length-3]}}if(!s||!u){e.removeAllRanges();return}var E=e.rangeCount&&e.getRangeAt(0),w;try{w=Me(s.node,s.offset,u.offset,u.node)}catch(z){}w&&(!L&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),E&&e.anchorNode==null?e.addRange(E):L&&this.startGracePeriod()),this.rememberSelection()}},hn.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)},hn.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ze(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():yr(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)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(G&&te&&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&&yr(t,function(){rr(t.doc,ti(r,n),re),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},hn.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=I(n.line-1,C(e.doc,n.line-1).length)),i.ch==C(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=I(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=$(t.view[0].line),l=t.view[0].node):(a=$(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=$(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!l)return!1;for(var y=e.doc.splitLines(qs(e,l,v,a,u)),E=R(e.doc,I(a,0),I(u,C(e.doc,u).text.length));y.length>1&&E.length>1;)if(Je(y)==Je(E))y.pop(),E.pop(),u--;else if(y[0]==E[0])y.shift(),E.shift(),a++;else break;for(var w=0,z=0,X=y[0],ye=E[0],Fe=Math.min(X.length,ye.length);w<Fe&&X.charCodeAt(w)==ye.charCodeAt(w);)++w;for(var ke=Je(y),$e=Je(E),Qe=Math.min(ke.length-(y.length==1?w:0),$e.length-(E.length==1?w:0));z<Qe&&ke.charCodeAt(ke.length-z-1)==$e.charCodeAt($e.length-z-1);)++z;if(y.length==1&&E.length==1&&a==n.line)for(;w&&w>n.ch&&ke.charCodeAt(ke.length-z-1)==$e.charCodeAt($e.length-z-1);)w--,z++;y[y.length-1]=ke.slice(0,ke.length-z).replace(/^\u200b+/,""),y[0]=y[0].slice(w).replace(/\u200b+$/,"");var St=I(a,w),dt=I(u,E.length?Je(E).length-z:0);if(y.length>1||y[0]||Z(St,dt))return Pi(e.doc,y,St,dt,"+input"),!0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},hn.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))},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&yr(this.cm,function(){return cr(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.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))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;function Bl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=C(e.doc,t.line),i=Ui(r,n,t.line),o=Ee(n,e.doc.direction),a="left";if(o){var l=Re(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(z){return z.id==w}}function v(){a&&(o+=l,s&&(o+=l),a=s=!1)}function y(w){w&&(v(),o+=w)}function E(w){if(w.nodeType==1){var z=w.getAttribute("cm-text");if(z){y(z);return}var X=w.getAttribute("cm-marker"),ye;if(X){var Fe=e.findMarks(I(n,0),I(i+1,0),u(+X));Fe.length&&(ye=Fe[0].find(0))&&y(R(e.doc,ye.from,ye.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 $e=0;$e<w.childNodes.length;$e++)E(w.childNodes[$e]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),ke&&(a=!0)}else w.nodeType==3&&y(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;E(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(I(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(I($(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(I($(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(ye,Fe,ke){for(var $e=-1;$e<(u?u.length:0);$e++)for(var Qe=$e<0?s.map:u[$e],St=0;St<Qe.length;St+=3){var dt=Qe[St+2];if(dt==ye||dt==Fe){var Kt=$($e<0?e.line:e.rest[$e]),Sn=Qe[St]+ke;return(ke<0||dt!=ye)&&(Sn=Qe[St+(ke?1:0)]),I(Kt,Sn)}}}var y=v(a,l,r);if(y)return zi(y,i);for(var E=l.nextSibling,w=a?a.nodeValue.length-r:0;E;E=E.nextSibling){if(y=v(E,E.firstChild,0),y)return zi(I(y.line,y.ch-w),i);w+=E.textContent.length}for(var z=l.previousSibling,X=r;z;z=z.previousSibling){if(y=v(z,z.firstChild,-1),y)return zi(I(y.line,y.ch+X),i);X+=z.textContent.length}}var Fn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};Fn.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),Oe&&(i.style.width="0px"),_(i,"input",function(){p&&D>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),_(i,"paste",function(a){ft(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!ft(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,re):(r.prevInput="",i.value=l.text.join(`
|
|
|
`),Ge(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}_(i,"cut",o),_(i,"copy",o),_(e.scroller,"paste",function(a){if(!($r(e,a)||ft(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)}}),_(e.lineSpace,"selectstart",function(a){$r(e,a)||Dt(a)}),_(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"})}}),_(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Fn.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},Fn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=mr(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},Fn.prototype.showSelection=function(e){var t=this.cm,r=t.display;j(r.cursorDiv,e.cursors),j(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Fn.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&&Ge(this.textarea),p&&D>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",p&&D>=9&&(this.hasSelection=null))}},Fn.prototype.getField=function(){return this.textarea},Fn.prototype.supportsTouch=function(){return!1},Fn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ve||be()!=this.textarea))try{this.textarea.focus()}catch(e){}},Fn.prototype.blur=function(){this.textarea.blur()},Fn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fn.prototype.receivedFocus=function(){this.slowPoll()},Fn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Fn.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)},Fn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xn(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&&D>=9&&this.hasSelection===i||qe&&/[\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 yr(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},Fn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fn.prototype.onKeyPress=function(){p&&D>=9&&(this.hasSelection=null),this.fastPoll()},Fn.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||S)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),re);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 y;P&&(y=window.scrollY),n.input.focus(),P&&window.scrollTo(null,y),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function E(){if(i.selectionStart!=null){var X=r.somethingSelected(),ye="\u200B"+(X?i.value:"");i.value="\u21DA",i.value=ye,t.prevInput=X?"":"\u200B",i.selectionStart=1,i.selectionEnd=ye.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&&D<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&D<9)&&E();var X=0,ye=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):X++<10?n.detectingSelectAll=setTimeout(ye,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ye,200)}}if(p&&D>=9&&E(),m){sn(e);var z=function(){Be(window,"mouseup",z),setTimeout(w,20)};_(window,"mouseup",z)}else setTimeout(w,50)},Fn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Fn.prototype.setUneditable=function(){},Fn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?U(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=be();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(_(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&&(Be(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=Be,e.on=_,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=In,e.countColumn=ae,e.findColumn=yt,e.isWordChar=V,e.Pass=Te,e.signal=lt,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=I,e.cmpPos=Z,e.modes=Nn,e.mimeModes=Hn,e.resolveMode=on,e.getMode=tt,e.modeExtensions=Wt,e.extendMode=g,e.copyState=T,e.startState=d,e.innerMode=W,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=h,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=Dt,e.e_stopPropagation=Xt,e.e_stop=sn,e.addClass=pt,e.contains=ze,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Bo in fr.prototype)fr.prototype.hasOwnProperty(Bo)&&k(ru,Bo)<0&&(Rn.prototype[Bo]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Bo]));return At(fr),Rn.inputStyles={textarea:Fn,contenteditable:hn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),Sr.apply(this,arguments)},Rn.defineMIME=pr,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){fr.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 S},default:function(){return It}});var L=f(14809),H=f(20439),x=f(4635),K=f(93664),p=f(92310),D=f.n(p),P=f(59301),pe=f(5643),te=function(A){var m,c,b=A.inputElement,O=A.prefixCls,j=A.prefix,M=A.suffix,ge=A.addonBefore,Me=A.addonAfter,ze=A.className,be=A.style,pt=A.disabled,Ke=A.readOnly,Ge=A.focused,J=A.triggerFocus,U=A.allowClear,ae=A.value,ne=A.handleReset,k=A.hidden,Ie=A.classes,Te=A.classNames,re=A.dataAttrs,De=A.styles,de=A.components,yt=(de==null?void 0:de.affixWrapper)||"span",Tt=(de==null?void 0:de.groupWrapper)||"span",bt=(de==null?void 0:de.wrapper)||"span",Je=(de==null?void 0:de.groupAddon)||"span",Et=(0,P.useRef)(null),it=function(ce){var Re;(Re=Et.current)!==null&&Re!==void 0&&Re.contains(ce.target)&&(J==null||J())},F=function(){var ce;if(!U)return null;var Re=!pt&&!Ke&&ae,Le="".concat(O,"-clear-icon"),Ee=(0,K.Z)(U)==="object"&&U!==null&&U!==void 0&&U.clearIcon?U.clearIcon:"\u2716";return P.createElement("span",{onClick:ne,onMouseDown:function(_){return _.preventDefault()},className:D()(Le,(ce={},(0,x.Z)(ce,"".concat(Le,"-hidden"),!Re),(0,x.Z)(ce,"".concat(Le,"-has-suffix"),!!M),ce)),role:"button",tabIndex:-1},Ee)},we=(0,P.cloneElement)(b,{value:ae,hidden:k,className:D()((m=b.props)===null||m===void 0?void 0:m.className,!(0,pe.X3)(A)&&!(0,pe.He)(A)&&ze)||null,style:(0,H.Z)((0,H.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,pe.X3)(A)&&!(0,pe.He)(A)?be:{})});if((0,pe.X3)(A)){var le,V="".concat(O,"-affix-wrapper"),ie=D()(V,(le={},(0,x.Z)(le,"".concat(V,"-disabled"),pt),(0,x.Z)(le,"".concat(V,"-focused"),Ge),(0,x.Z)(le,"".concat(V,"-readonly"),Ke),(0,x.Z)(le,"".concat(V,"-input-with-clear-btn"),M&&U&&ae),le),!(0,pe.He)(A)&&ze,Ie==null?void 0:Ie.affixWrapper,Te==null?void 0:Te.affixWrapper),he=(M||U)&&P.createElement("span",{className:D()("".concat(O,"-suffix"),Te==null?void 0:Te.suffix),style:De==null?void 0:De.suffix},F(),M);we=P.createElement(yt,(0,L.Z)({className:ie,style:(0,H.Z)((0,H.Z)({},(0,pe.He)(A)?void 0:be),De==null?void 0:De.affixWrapper),hidden:!(0,pe.He)(A)&&k,onClick:it},re==null?void 0:re.affixWrapper,{ref:Et}),j&&P.createElement("span",{className:D()("".concat(O,"-prefix"),Te==null?void 0:Te.prefix),style:De==null?void 0:De.prefix},j),(0,P.cloneElement)(b,{value:ae,hidden:null}),he)}if((0,pe.He)(A)){var Se="".concat(O,"-group"),ve="".concat(Se,"-addon"),Pe=D()("".concat(O,"-wrapper"),Se,Ie==null?void 0:Ie.wrapper),q=D()("".concat(O,"-group-wrapper"),ze,Ie==null?void 0:Ie.group);return P.createElement(Tt,{className:q,style:be,hidden:k},P.createElement(bt,{className:Pe},ge&&P.createElement(Je,{className:ve},ge),(0,P.cloneElement)(we,{hidden:null}),Me&&P.createElement(Je,{className:ve},Me)))}return we},S=te,Ce=f(95190),N=f(50298),fe=f(62646),Oe=f(18929),G=f(2738),Ve=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],qe=(0,P.forwardRef)(function(ee,A){var m=ee.autoComplete,c=ee.onChange,b=ee.onFocus,O=ee.onBlur,j=ee.onPressEnter,M=ee.onKeyDown,ge=ee.prefixCls,Me=ge===void 0?"rc-input":ge,ze=ee.disabled,be=ee.htmlSize,pt=ee.className,Ke=ee.maxLength,Ge=ee.suffix,J=ee.showCount,U=ee.type,ae=U===void 0?"text":U,ne=ee.classes,k=ee.classNames,Ie=ee.styles,Te=(0,fe.Z)(ee,Ve),re=(0,Oe.Z)(ee.defaultValue,{value:ee.value}),De=(0,N.Z)(re,2),de=De[0],yt=De[1],Tt=(0,P.useState)(!1),bt=(0,N.Z)(Tt,2),Je=bt[0],Et=bt[1],it=(0,P.useRef)(null),F=function(q){it.current&&(0,pe.nH)(it.current,q)};(0,P.useImperativeHandle)(A,function(){return{focus:F,blur:function(){var q;(q=it.current)===null||q===void 0||q.blur()},setSelectionRange:function(q,Xe,ce){var Re;(Re=it.current)===null||Re===void 0||Re.setSelectionRange(q,Xe,ce)},select:function(){var q;(q=it.current)===null||q===void 0||q.select()},input:it.current}}),(0,P.useEffect)(function(){Et(function(Pe){return Pe&&ze?!1:Pe})},[ze]);var we=function(q){ee.value===void 0&&yt(q.target.value),it.current&&(0,pe.rJ)(it.current,q,c)},le=function(q){j&&q.key==="Enter"&&j(q),M==null||M(q)},V=function(q){Et(!0),b==null||b(q)},ie=function(q){Et(!1),O==null||O(q)},he=function(q){yt(""),F(),it.current&&(0,pe.rJ)(it.current,q,c)},Se=function(){var q=(0,G.Z)(ee,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return P.createElement("input",(0,L.Z)({autoComplete:m},q,{onChange:we,onFocus:V,onBlur:ie,onKeyDown:le,className:D()(Me,(0,x.Z)({},"".concat(Me,"-disabled"),ze),k==null?void 0:k.input),style:Ie==null?void 0:Ie.input,ref:it,size:be,type:ae}))},ve=function(){var q=Number(Ke)>0;if(Ge||J){var Xe=(0,pe.D7)(de),ce=(0,Ce.Z)(Xe).length,Re=(0,K.Z)(J)==="object"?J.formatter({value:Xe,count:ce,maxLength:Ke}):"".concat(ce).concat(q?" / ".concat(Ke):"");return P.createElement(P.Fragment,null,!!J&&P.createElement("span",{className:D()("".concat(Me,"-show-count-suffix"),(0,x.Z)({},"".concat(Me,"-show-count-has-suffix"),!!Ge),k==null?void 0:k.count),style:(0,H.Z)({},Ie==null?void 0:Ie.count)},Re),Ge)}return null};return P.createElement(S,(0,L.Z)({},Te,{prefixCls:Me,className:pt,inputElement:Se(),handleReset:he,value:(0,pe.D7)(de),focused:Je,triggerFocus:F,suffix:ve(),disabled:ze,classes:ne,classNames:k,styles:Ie}))}),vt=qe,It=vt},5643:function(nn,xe,f){"use strict";f.d(xe,{D7:function(){return p},He:function(){return L},X3:function(){return H},nH:function(){return K},rJ:function(){return x}});function L(D){return!!(D.addonBefore||D.addonAfter)}function H(D){return!!(D.prefix||D.suffix||D.allowClear)}function x(D,P,pe,te){if(pe){var S=P;if(P.type==="click"){var Ce=D.cloneNode(!0);S=Object.create(P,{target:{value:Ce},currentTarget:{value:Ce}}),Ce.value="",pe(S);return}if(te!==void 0){S=Object.create(P,{target:{value:D},currentTarget:{value:D}}),D.value=te,pe(S);return}pe(S)}}function K(D,P){if(D){D.focus(P);var pe=P||{},te=pe.cursor;if(te){var S=D.value.length;switch(te){case"start":D.setSelectionRange(0,0);break;case"end":D.setSelectionRange(S,S);break;default:D.setSelectionRange(0,S)}}}}function p(D){return typeof D=="undefined"||D===null?"":String(D)}},11780:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return J}});var L=f(14809),H=f(20439),x=f(50298),K=f(62646),p=f(59301),D=f(92310),P=f.n(D),pe=f(29301),te=f(34280),S=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ce=void 0;function N(U,ae){var ne=U.prefixCls,k=U.invalidate,Ie=U.item,Te=U.renderItem,re=U.responsive,De=U.responsiveDisabled,de=U.registerSize,yt=U.itemKey,Tt=U.className,bt=U.style,Je=U.children,Et=U.display,it=U.order,F=U.component,we=F===void 0?"div":F,le=(0,K.Z)(U,S),V=re&&!Et;function ie(q){de(yt,q)}p.useEffect(function(){return function(){ie(null)}},[]);var he=Te&&Ie!==Ce?Te(Ie,{index:it}):Je,Se;k||(Se={opacity:V?0:1,height:V?0:Ce,overflowY:V?"hidden":Ce,order:re?it:Ce,pointerEvents:V?"none":Ce,position:V?"absolute":Ce});var ve={};V&&(ve["aria-hidden"]=!0);var Pe=p.createElement(we,(0,L.Z)({className:P()(!k&&ne,Tt),style:(0,H.Z)((0,H.Z)({},Se),bt)},ve,le,{ref:ae}),he);return re&&(Pe=p.createElement(pe.Z,{onResize:function(Xe){var ce=Xe.offsetWidth;ie(ce)},disabled:De},Pe)),Pe}var fe=p.forwardRef(N);fe.displayName="Item";var Oe=fe,G=f(6089),Ve=f(4676),qe=f(16089);function vt(U){if(typeof MessageChannel=="undefined")(0,qe.Z)(U);else{var ae=new MessageChannel;ae.port1.onmessage=function(){return U()},ae.port2.postMessage(void 0)}}function It(){var U=p.useRef(null),ae=function(k){U.current||(U.current=[],vt(function(){(0,Ve.unstable_batchedUpdates)(function(){U.current.forEach(function(Ie){Ie()}),U.current=null})})),U.current.push(k)};return ae}function ee(U,ae){var ne=p.useState(ae),k=(0,x.Z)(ne,2),Ie=k[0],Te=k[1],re=(0,G.Z)(function(De){U(function(){Te(De)})});return[Ie,re]}var A=p.createContext(null),m=["component"],c=["className"],b=["className"],O=function(ae,ne){var k=p.useContext(A);if(!k){var Ie=ae.component,Te=Ie===void 0?"div":Ie,re=(0,K.Z)(ae,m);return p.createElement(Te,(0,L.Z)({},re,{ref:ne}))}var De=k.className,de=(0,K.Z)(k,c),yt=ae.className,Tt=(0,K.Z)(ae,b);return p.createElement(A.Provider,{value:null},p.createElement(Oe,(0,L.Z)({ref:ne,className:P()(De,yt)},de,Tt)))},j=p.forwardRef(O);j.displayName="RawItem";var M=j,ge=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Me="responsive",ze="invalidate";function be(U){return"+ ".concat(U.length," ...")}function pt(U,ae){var ne=U.prefixCls,k=ne===void 0?"rc-overflow":ne,Ie=U.data,Te=Ie===void 0?[]:Ie,re=U.renderItem,De=U.renderRawItem,de=U.itemKey,yt=U.itemWidth,Tt=yt===void 0?10:yt,bt=U.ssr,Je=U.style,Et=U.className,it=U.maxCount,F=U.renderRest,we=U.renderRawRest,le=U.suffix,V=U.component,ie=V===void 0?"div":V,he=U.itemComponent,Se=U.onVisibleChange,ve=(0,K.Z)(U,ge),Pe=bt==="full",q=It(),Xe=ee(q,null),ce=(0,x.Z)(Xe,2),Re=ce[0],Le=ce[1],Ee=Re||0,Ye=ee(q,new Map),_=(0,x.Z)(Ye,2),et=_[0],Be=_[1],lt=ee(q,0),ft=(0,x.Z)(lt,2),rn=ft[0],Zt=ft[1],At=ee(q,0),Dt=(0,x.Z)(At,2),Xt=Dt[0],Yt=Dt[1],sn=ee(q,0),Cn=(0,x.Z)(sn,2),un=Cn[0],$n=Cn[1],zn=(0,p.useState)(null),pn=(0,x.Z)(zn,2),Ln=pn[0],wn=pn[1],In=(0,p.useState)(null),xn=(0,x.Z)(In,2),dn=xn[0],Wn=xn[1],Qt=p.useMemo(function(){return dn===null&&Pe?Number.MAX_SAFE_INTEGER:dn||0},[dn,Re]),Nn=(0,p.useState)(!1),Hn=(0,x.Z)(Nn,2),Sr=Hn[0],pr=Hn[1],on="".concat(k,"-item"),tt=Math.max(rn,Xt),Wt=it===Me,g=Te.length&&Wt,T=it===ze,W=g||typeof it=="number"&&Te.length>it,d=(0,p.useMemo)(function(){var se=Te;return g?Re===null&&Pe?se=Te:se=Te.slice(0,Math.min(Te.length,Ee/Tt)):typeof it=="number"&&(se=Te.slice(0,it)),se},[Te,Tt,Re,it,g]),h=(0,p.useMemo)(function(){return g?Te.slice(Qt+1):Te.slice(d.length)},[Te,d,g,Qt]),C=(0,p.useCallback)(function(se,Ae){var nt;return typeof de=="function"?de(se):(nt=de&&(se==null?void 0:se[de]))!==null&&nt!==void 0?nt:Ae},[de]),R=(0,p.useCallback)(re||function(se){return se},[re]);function Q(se,Ae,nt){dn===se&&(Ae===void 0||Ae===Ln)||(Wn(se),nt||(pr(se<Te.length-1),Se==null||Se(se)),Ae!==void 0&&wn(Ae))}function B(se,Ae){Le(Ae.clientWidth)}function $(se,Ae){Be(function(nt){var Ue=new Map(nt);return Ae===null?Ue.delete(se):Ue.set(se,Ae),Ue})}function ue(se,Ae){Yt(Ae),Zt(Xt)}function oe(se,Ae){$n(Ae)}function We(se){return et.get(C(d[se],se))}(0,te.Z)(function(){if(Ee&&typeof tt=="number"&&d){var se=un,Ae=d.length,nt=Ae-1;if(!Ae){Q(0,null);return}for(var Ue=0;Ue<Ae;Ue+=1){var ot=We(Ue);if(Pe&&(ot=ot||0),ot===void 0){Q(Ue-1,void 0,!0);break}if(se+=ot,nt===0&&se<=Ee||Ue===nt-1&&se+We(nt)<=Ee){Q(nt,null);break}else if(se+tt>Ee){Q(Ue-1,se-ot-un+Xt);break}}le&&We(0)+un>Ee&&wn(null)}},[Ee,et,Xt,un,C,d]);var I=Sr&&!!h.length,Z={};Ln!==null&&g&&(Z={position:"absolute",left:Ln,top:0});var je={prefixCls:on,responsive:g,component:he,invalidate:T},me=De?function(se,Ae){var nt=C(se,Ae);return p.createElement(A.Provider,{key:nt,value:(0,H.Z)((0,H.Z)({},je),{},{order:Ae,item:se,itemKey:nt,registerSize:$,display:Ae<=Qt})},De(se,Ae))}:function(se,Ae){var nt=C(se,Ae);return p.createElement(Oe,(0,L.Z)({},je,{order:Ae,key:nt,item:se,renderItem:R,itemKey:nt,registerSize:$,display:Ae<=Qt}))},Ze={order:I?Qt:Number.MAX_SAFE_INTEGER,className:"".concat(on,"-rest"),registerSize:ue,display:I},Ne=F||be,st=we?p.createElement(A.Provider,{value:(0,H.Z)((0,H.Z)({},je),Ze)},we(h)):p.createElement(Oe,(0,L.Z)({},je,Ze),typeof Ne=="function"?Ne(h):Ne),Y=p.createElement(ie,(0,L.Z)({className:P()(!T&&k,Et),style:Je,ref:ae},ve),d.map(me),W?st:null,le&&p.createElement(Oe,(0,L.Z)({},je,{responsive:Wt,responsiveDisabled:!g,order:Qt,className:"".concat(on,"-suffix"),registerSize:oe,display:!0,style:Z}),le));return Wt?p.createElement(pe.Z,{onResize:B,disabled:!g},Y):Y}var Ke=p.forwardRef(pt);Ke.displayName="Overflow",Ke.Item=M,Ke.RESPONSIVE=Me,Ke.INVALIDATE=ze;var Ge=Ke,J=Ge},17115:function(nn,xe,f){"use strict";f.d(xe,{ZP:function(){return P}});var L=f(50298),H=f(59301),x=f(47273),K=0,p=(0,x.Z)();function D(){var pe;return p?(pe=K,K+=1):pe="TEST_OR_SSR",pe}function P(pe){var te=H.useState(),S=(0,L.Z)(te,2),Ce=S[0],N=S[1];return H.useEffect(function(){N("rc_select_".concat(D()))},[]),pe||Ce}},77861:function(nn,xe,f){"use strict";f.d(xe,{Ac:function(){return Le},Xo:function(){return Yt},Wx:function(){return Cn},ZP:function(){return W},lk:function(){return A}});var L=f(14809),H=f(95190),x=f(4635),K=f(20439),p=f(50298),D=f(62646),P=f(93664),pe=f(18929),te=f(48736),S=f(59301),Ce=f(92310),N=f.n(Ce),fe=f(34280),Oe=f(49658),G=f(10228),Ve=f(8654),qe=function(h){var C=h.className,R=h.customizeIcon,Q=h.customizeIconProps,B=h.onMouseDown,$=h.onClick,ue=h.children,oe;return typeof R=="function"?oe=R(Q):oe=R,S.createElement("span",{className:C,onMouseDown:function(I){I.preventDefault(),B&&B(I)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$,"aria-hidden":!0},oe!==void 0?oe:S.createElement("span",{className:N()(C.split(/\s+/).map(function(We){return"".concat(We,"-icon")}))},ue))},vt=qe;function It(d,h,C,R,Q){var B=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$=arguments.length>6?arguments[6]:void 0,ue=arguments.length>7?arguments[7]:void 0,oe=S.useMemo(function(){if((0,P.Z)(R)==="object")return R.clearIcon;if(Q)return Q},[R,Q]),We=S.useMemo(function(){return!!(!B&&R&&(C.length||$)&&!(ue==="combobox"&&$===""))},[R,B,C.length,$,ue]);return{allowClear:We,clearIcon:S.createElement(vt,{className:"".concat(d,"-clear"),onMouseDown:h,customizeIcon:oe},"\xD7")}}var ee=S.createContext(null);function A(){return S.useContext(ee)}function m(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,h=S.useState(!1),C=(0,p.Z)(h,2),R=C[0],Q=C[1],B=S.useRef(null),$=function(){window.clearTimeout(B.current)};S.useEffect(function(){return $},[]);var ue=function(We,I){$(),B.current=window.setTimeout(function(){Q(We),I&&I()},d)};return[R,ue,$]}function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,h=S.useRef(null),C=S.useRef(null);S.useEffect(function(){return function(){window.clearTimeout(C.current)}},[]);function R(Q){(Q||h.current===null)&&(h.current=Q),window.clearTimeout(C.current),C.current=window.setTimeout(function(){h.current=null},d)}return[function(){return h.current},R]}function b(d,h,C,R){var Q=S.useRef(null);Q.current={open:h,triggerOpen:C,customizedTrigger:R},S.useEffect(function(){function B($){var ue;if(!((ue=Q.current)!==null&&ue!==void 0&&ue.customizedTrigger)){var oe=$.target;oe.shadowRoot&&$.composed&&(oe=$.composedPath()[0]||oe),Q.current.open&&d().filter(function(We){return We}).every(function(We){return!We.contains(oe)&&We!==oe})&&Q.current.triggerOpen(!1)}}return window.addEventListener("mousedown",B),function(){return window.removeEventListener("mousedown",B)}},[])}var O=f(26112),j=f(11780),M=function(h,C){var R,Q,B=h.prefixCls,$=h.id,ue=h.inputElement,oe=h.disabled,We=h.tabIndex,I=h.autoFocus,Z=h.autoComplete,je=h.editable,me=h.activeDescendantId,Ze=h.value,Ne=h.maxLength,st=h.onKeyDown,Y=h.onMouseDown,se=h.onChange,Ae=h.onPaste,nt=h.onCompositionStart,Ue=h.onCompositionEnd,ot=h.open,jt=h.attrs,Mt=ue||S.createElement("input",null),Ft=Mt,$t=Ft.ref,xt=Ft.props,qt=xt.onKeyDown,Ut=xt.onChange,_t=xt.onMouseDown,kt=xt.onCompositionStart,Rt=xt.onCompositionEnd,Ct=xt.style;return(0,te.Kp)(!("maxLength"in Mt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Mt=S.cloneElement(Mt,(0,K.Z)((0,K.Z)((0,K.Z)({type:"search"},xt),{},{id:$,ref:(0,Ve.sQ)(C,$t),disabled:oe,tabIndex:We,autoComplete:Z||"off",autoFocus:I,className:N()("".concat(B,"-selection-search-input"),(R=Mt)===null||R===void 0||(Q=R.props)===null||Q===void 0?void 0:Q.className),role:"combobox","aria-label":"Search","aria-expanded":ot||!1,"aria-haspopup":"listbox","aria-owns":"".concat($,"_list"),"aria-autocomplete":"list","aria-controls":"".concat($,"_list"),"aria-activedescendant":ot?me:void 0},jt),{},{value:je?Ze:"",maxLength:Ne,readOnly:!je,unselectable:je?null:"on",style:(0,K.Z)((0,K.Z)({},Ct),{},{opacity:je?null:0}),onKeyDown:function(wt){st(wt),qt&&qt(wt)},onMouseDown:function(wt){Y(wt),_t&&_t(wt)},onChange:function(wt){se(wt),Ut&&Ut(wt)},onCompositionStart:function(wt){nt(wt),kt&&kt(wt)},onCompositionEnd:function(wt){Ue(wt),Rt&&Rt(wt)},onPaste:Ae})),Mt},ge=S.forwardRef(M);ge.displayName="Input";var Me=ge;function ze(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var be=typeof window!="undefined"&&window.document&&window.document.documentElement,pt=be;function Ke(d){return d!=null}function Ge(d){return!d&&d!==0}function J(d){return["string","number"].includes((0,P.Z)(d))}function U(d){var h=void 0;return d&&(J(d.title)?h=d.title.toString():J(d.label)&&(h=d.label.toString())),h}function ae(d,h){pt?S.useLayoutEffect(d,h):S.useEffect(d,h)}function ne(d){var h;return(h=d.key)!==null&&h!==void 0?h:d.value}var k=function(h){h.preventDefault(),h.stopPropagation()},Ie=function(h){var C=h.id,R=h.prefixCls,Q=h.values,B=h.open,$=h.searchValue,ue=h.autoClearSearchValue,oe=h.inputRef,We=h.placeholder,I=h.disabled,Z=h.mode,je=h.showSearch,me=h.autoFocus,Ze=h.autoComplete,Ne=h.activeDescendantId,st=h.tabIndex,Y=h.removeIcon,se=h.maxTagCount,Ae=h.maxTagTextLength,nt=h.maxTagPlaceholder,Ue=nt===void 0?function(Nt){return"+ ".concat(Nt.length," ...")}:nt,ot=h.tagRender,jt=h.onToggleOpen,Mt=h.onRemove,Ft=h.onInputChange,$t=h.onInputPaste,xt=h.onInputKeyDown,qt=h.onInputMouseDown,Ut=h.onInputCompositionStart,_t=h.onInputCompositionEnd,kt=S.useRef(null),Rt=(0,S.useState)(0),Ct=(0,p.Z)(Rt,2),zt=Ct[0],wt=Ct[1],fn=(0,S.useState)(!1),Pt=(0,p.Z)(fn,2),Ht=Pt[0],an=Pt[1],Gt="".concat(R,"-selection"),En=B||Z==="multiple"&&ue===!1||Z==="tags"?$:"",_n=Z==="tags"||Z==="multiple"&&ue===!1||je&&(B||Ht);ae(function(){wt(kt.current.scrollWidth)},[En]);function Ot(Nt,ln,gn,mn,Tn){return S.createElement("span",{className:N()("".concat(Gt,"-item"),(0,x.Z)({},"".concat(Gt,"-item-disabled"),gn)),title:U(Nt)},S.createElement("span",{className:"".concat(Gt,"-item-content")},ln),mn&&S.createElement(vt,{className:"".concat(Gt,"-item-remove"),onMouseDown:k,onClick:Tn,customizeIcon:Y},"\xD7"))}function at(Nt,ln,gn,mn,Tn){var _e=function(ht){k(ht),jt(!B)};return S.createElement("span",{onMouseDown:_e},ot({label:ln,value:Nt,disabled:gn,closable:mn,onClose:Tn}))}function ut(Nt){var ln=Nt.disabled,gn=Nt.label,mn=Nt.value,Tn=!I&&!ln,_e=gn;if(typeof Ae=="number"&&(typeof gn=="string"||typeof gn=="number")){var He=String(_e);He.length>Ae&&(_e="".concat(He.slice(0,Ae),"..."))}var ht=function(vn){vn&&vn.stopPropagation(),Mt(Nt)};return typeof ot=="function"?at(mn,_e,ln,Tn,ht):Ot(Nt,_e,ln,Tn,ht)}function en(Nt){var ln=typeof Ue=="function"?Ue(Nt):Ue;return Ot({title:ln},ln,!1)}var tn=S.createElement("div",{className:"".concat(Gt,"-search"),style:{width:zt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},S.createElement(Me,{ref:oe,open:B,prefixCls:R,id:C,inputElement:null,disabled:I,autoFocus:me,autoComplete:Ze,editable:_n,activeDescendantId:Ne,value:En,onKeyDown:xt,onMouseDown:qt,onChange:Ft,onPaste:$t,onCompositionStart:Ut,onCompositionEnd:_t,tabIndex:st,attrs:(0,O.Z)(h,!0)}),S.createElement("span",{ref:kt,className:"".concat(Gt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Vt=S.createElement(j.Z,{prefixCls:"".concat(Gt,"-overflow"),data:Q,renderItem:ut,renderRest:en,suffix:tn,itemKey:ne,maxCount:se});return S.createElement(S.Fragment,null,Vt,!Q.length&&!En&&S.createElement("span",{className:"".concat(Gt,"-placeholder")},We))},Te=Ie,re=function(h){var C=h.inputElement,R=h.prefixCls,Q=h.id,B=h.inputRef,$=h.disabled,ue=h.autoFocus,oe=h.autoComplete,We=h.activeDescendantId,I=h.mode,Z=h.open,je=h.values,me=h.placeholder,Ze=h.tabIndex,Ne=h.showSearch,st=h.searchValue,Y=h.activeValue,se=h.maxLength,Ae=h.onInputKeyDown,nt=h.onInputMouseDown,Ue=h.onInputChange,ot=h.onInputPaste,jt=h.onInputCompositionStart,Mt=h.onInputCompositionEnd,Ft=h.title,$t=S.useState(!1),xt=(0,p.Z)($t,2),qt=xt[0],Ut=xt[1],_t=I==="combobox",kt=_t||Ne,Rt=je[0],Ct=st||"";_t&&Y&&!qt&&(Ct=Y),S.useEffect(function(){_t&&Ut(!1)},[_t,Y]);var zt=I!=="combobox"&&!Z&&!Ne?!1:!!Ct,wt=Ft===void 0?U(Rt):Ft,fn=function(){if(Rt)return null;var Ht=zt?{visibility:"hidden"}:void 0;return S.createElement("span",{className:"".concat(R,"-selection-placeholder"),style:Ht},me)};return S.createElement(S.Fragment,null,S.createElement("span",{className:"".concat(R,"-selection-search")},S.createElement(Me,{ref:B,prefixCls:R,id:Q,open:Z,inputElement:C,disabled:$,autoFocus:ue,autoComplete:oe,editable:kt,activeDescendantId:We,value:Ct,onKeyDown:Ae,onMouseDown:nt,onChange:function(Ht){Ut(!0),Ue(Ht)},onPaste:ot,onCompositionStart:jt,onCompositionEnd:Mt,tabIndex:Ze,attrs:(0,O.Z)(h,!0),maxLength:_t?se:void 0})),!_t&&Rt?S.createElement("span",{className:"".concat(R,"-selection-item"),title:wt,style:zt?{visibility:"hidden"}:void 0},Rt.label):null,fn())},De=re;function de(d){return![G.Z.ESC,G.Z.SHIFT,G.Z.BACKSPACE,G.Z.TAB,G.Z.WIN_KEY,G.Z.ALT,G.Z.META,G.Z.WIN_KEY_RIGHT,G.Z.CTRL,G.Z.SEMICOLON,G.Z.EQUALS,G.Z.CAPS_LOCK,G.Z.CONTEXT_MENU,G.Z.F1,G.Z.F2,G.Z.F3,G.Z.F4,G.Z.F5,G.Z.F6,G.Z.F7,G.Z.F8,G.Z.F9,G.Z.F10,G.Z.F11,G.Z.F12].includes(d)}var yt=function(h,C){var R=(0,S.useRef)(null),Q=(0,S.useRef)(!1),B=h.prefixCls,$=h.open,ue=h.mode,oe=h.showSearch,We=h.tokenWithEnter,I=h.autoClearSearchValue,Z=h.onSearch,je=h.onSearchSubmit,me=h.onToggleOpen,Ze=h.onInputKeyDown,Ne=h.domRef;S.useImperativeHandle(C,function(){return{focus:function(){R.current.focus()},blur:function(){R.current.blur()}}});var st=c(0),Y=(0,p.Z)(st,2),se=Y[0],Ae=Y[1],nt=function(Ct){var zt=Ct.which;(zt===G.Z.UP||zt===G.Z.DOWN)&&Ct.preventDefault(),Ze&&Ze(Ct),zt===G.Z.ENTER&&ue==="tags"&&!Q.current&&!$&&(je==null||je(Ct.target.value)),de(zt)&&me(!0)},Ue=function(){Ae(!0)},ot=(0,S.useRef)(null),jt=function(Ct){Z(Ct,!0,Q.current)!==!1&&me(!0)},Mt=function(){Q.current=!0},Ft=function(Ct){Q.current=!1,ue!=="combobox"&&jt(Ct.target.value)},$t=function(Ct){var zt=Ct.target.value;if(We&&ot.current&&/[\r\n]/.test(ot.current)){var wt=ot.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zt=zt.replace(wt,ot.current)}ot.current=null,jt(zt)},xt=function(Ct){var zt=Ct.clipboardData,wt=zt.getData("text");ot.current=wt},qt=function(Ct){var zt=Ct.target;if(zt!==R.current){var wt=document.body.style.msTouchAction!==void 0;wt?setTimeout(function(){R.current.focus()}):R.current.focus()}},Ut=function(Ct){var zt=se();Ct.target!==R.current&&!zt&&ue!=="combobox"&&Ct.preventDefault(),(ue!=="combobox"&&(!oe||!zt)||!$)&&($&&I!==!1&&Z("",!0,!1),me())},_t={inputRef:R,onInputKeyDown:nt,onInputMouseDown:Ue,onInputChange:$t,onInputPaste:xt,onInputCompositionStart:Mt,onInputCompositionEnd:Ft},kt=ue==="multiple"||ue==="tags"?S.createElement(Te,(0,L.Z)({},h,_t)):S.createElement(De,(0,L.Z)({},h,_t));return S.createElement("div",{ref:Ne,className:"".concat(B,"-selector"),onClick:qt,onMouseDown:Ut},kt)},Tt=S.forwardRef(yt);Tt.displayName="Selector";var bt=Tt,Je=f(35593),Et=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],it=function(h){var C=h===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"}}},F=function(h,C){var R=h.prefixCls,Q=h.disabled,B=h.visible,$=h.children,ue=h.popupElement,oe=h.animation,We=h.transitionName,I=h.dropdownStyle,Z=h.dropdownClassName,je=h.direction,me=je===void 0?"ltr":je,Ze=h.placement,Ne=h.builtinPlacements,st=h.dropdownMatchSelectWidth,Y=h.dropdownRender,se=h.dropdownAlign,Ae=h.getPopupContainer,nt=h.empty,Ue=h.getTriggerDOMNode,ot=h.onPopupVisibleChange,jt=h.onPopupMouseEnter,Mt=(0,D.Z)(h,Et),Ft="".concat(R,"-dropdown"),$t=ue;Y&&($t=Y(ue));var xt=S.useMemo(function(){return Ne||it(st)},[Ne,st]),qt=oe?"".concat(Ft,"-").concat(oe):We,Ut=typeof st=="number",_t=S.useMemo(function(){return Ut?null:st===!1?"minWidth":"width"},[st,Ut]),kt=I;Ut&&(kt=(0,K.Z)((0,K.Z)({},kt),{},{width:st}));var Rt=S.useRef(null);return S.useImperativeHandle(C,function(){return{getPopupElement:function(){return Rt.current}}}),S.createElement(Je.Z,(0,L.Z)({},Mt,{showAction:ot?["click"]:[],hideAction:ot?["click"]:[],popupPlacement:Ze||(me==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:xt,prefixCls:Ft,popupTransitionName:qt,popup:S.createElement("div",{ref:Rt,onMouseEnter:jt},$t),stretch:_t,popupAlign:se,popupVisible:B,getPopupContainer:Ae,popupClassName:N()(Z,(0,x.Z)({},"".concat(Ft,"-empty"),nt)),popupStyle:kt,getTriggerDOMNode:Ue,onPopupVisibleChange:ot}),$)},we=S.forwardRef(F);we.displayName="SelectTrigger";var le=we,V=f(21696);function ie(d,h){var C=d.key,R;return"value"in d&&(R=d.value),C!=null?C:R!==void 0?R:"rc-index-key-".concat(h)}function he(d,h){var C=d||{},R=C.label,Q=C.value,B=C.options,$=C.groupLabel,ue=R||(h?"children":"label");return{label:ue,value:Q||"value",options:B||"options",groupLabel:$||ue}}function Se(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=h.fieldNames,R=h.childrenAsData,Q=[],B=he(C,!1),$=B.label,ue=B.value,oe=B.options,We=B.groupLabel;function I(Z,je){Z.forEach(function(me){if(je||!(oe in me)){var Ze=me[ue];Q.push({key:ie(me,Q.length),groupOption:je,data:me,label:me[$],value:Ze})}else{var Ne=me[We];Ne===void 0&&R&&(Ne=me.label),Q.push({key:ie(me,Q.length),group:!0,data:me,label:Ne}),I(me[oe],!0)}})}return I(d,!1),Q}function ve(d){var h=(0,K.Z)({},d);return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,te.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),h}}),h}function Pe(d,h){if(!h||!h.length)return null;var C=!1;function R(B,$){var ue=(0,V.Z)($),oe=ue[0],We=ue.slice(1);if(!oe)return[B];var I=B.split(oe);return C=C||I.length>1,I.reduce(function(Z,je){return[].concat((0,H.Z)(Z),(0,H.Z)(R(je,We)))},[]).filter(function(Z){return Z})}var Q=R(d,h);return C?Q:null}var q=["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"],Xe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function ce(d){return d==="tags"||d==="multiple"}var Re=S.forwardRef(function(d,h){var C,R,Q=d.id,B=d.prefixCls,$=d.className,ue=d.showSearch,oe=d.tagRender,We=d.direction,I=d.omitDomProps,Z=d.displayValues,je=d.onDisplayValuesChange,me=d.emptyOptions,Ze=d.notFoundContent,Ne=Ze===void 0?"Not Found":Ze,st=d.onClear,Y=d.mode,se=d.disabled,Ae=d.loading,nt=d.getInputElement,Ue=d.getRawInputElement,ot=d.open,jt=d.defaultOpen,Mt=d.onDropdownVisibleChange,Ft=d.activeValue,$t=d.onActiveValueChange,xt=d.activeDescendantId,qt=d.searchValue,Ut=d.autoClearSearchValue,_t=d.onSearch,kt=d.onSearchSplit,Rt=d.tokenSeparators,Ct=d.allowClear,zt=d.suffixIcon,wt=d.clearIcon,fn=d.OptionList,Pt=d.animation,Ht=d.transitionName,an=d.dropdownStyle,Gt=d.dropdownClassName,En=d.dropdownMatchSelectWidth,_n=d.dropdownRender,Ot=d.dropdownAlign,at=d.placement,ut=d.builtinPlacements,en=d.getPopupContainer,tn=d.showAction,Vt=tn===void 0?[]:tn,Nt=d.onFocus,ln=d.onBlur,gn=d.onKeyUp,mn=d.onKeyDown,Tn=d.onMouseDown,_e=(0,D.Z)(d,q),He=ce(Y),ht=(ue!==void 0?ue:He)||Y==="combobox",gt=(0,K.Z)({},_e);Xe.forEach(function(Jt){delete gt[Jt]}),I==null||I.forEach(function(Jt){delete gt[Jt]});var vn=S.useState(!1),Cr=(0,p.Z)(vn,2),Kn=Cr[0],jn=Cr[1];S.useEffect(function(){jn((0,Oe.Z)())},[]);var An=S.useRef(null),kn=S.useRef(null),Mn=S.useRef(null),sr=S.useRef(null),qn=S.useRef(null),tr=m(),Kr=(0,p.Z)(tr,3),Xr=Kr[0],li=Kr[1],Yr=Kr[2];S.useImperativeHandle(h,function(){var Jt,Bt;return{focus:(Jt=sr.current)===null||Jt===void 0?void 0:Jt.focus,blur:(Bt=sr.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 xr=S.useMemo(function(){var Jt;if(Y!=="combobox")return qt;var Bt=(Jt=Z[0])===null||Jt===void 0?void 0:Jt.value;return typeof Bt=="string"||typeof Bt=="number"?String(Bt):""},[qt,Y,Z]),Qr=Y==="combobox"&&typeof nt=="function"&&nt()||null,Ir=typeof Ue=="function"&&Ue(),Bi=(0,Ve.x1)(kn,Ir==null||(C=Ir.props)===null||C===void 0?void 0:C.ref),Si=S.useState(!1),si=(0,p.Z)(Si,2),jr=si[0],Ci=si[1];(0,fe.Z)(function(){Ci(!0)},[]);var xi=(0,pe.Z)(!1,{defaultValue:jt,value:ot}),Ur=(0,p.Z)(xi,2),Ar=Ur[0],ui=Ur[1],ct=jr?Ar:!1,Lt=!Ne&&me;(se||Lt&&ct&&Y==="combobox")&&(ct=!1);var mt=Lt?!1:ct,rt=S.useCallback(function(Jt){var Bt=Jt!==void 0?Jt:!ct;se||(ui(Bt),ct!==Bt&&(Mt==null||Mt(Bt)))},[se,ct,ui,Mt]),yn=S.useMemo(function(){return(Rt||[]).some(function(Jt){return[`
|
|
|
`,`\r
|
|
|
`].includes(Jt)})},[Rt]),bn=function(Bt,Vn,nr){var On=!0,or=Bt;$t==null||$t(null);var gr=nr?null:Pe(Bt,Rt);return Y!=="combobox"&&gr&&(or="",kt==null||kt(gr),rt(!1),On=!1),_t&&xr!==or&&_t(or,{source:Vn?"typing":"effect"}),On},ur=function(Bt){!Bt||!Bt.trim()||_t(Bt,{source:"submit"})};S.useEffect(function(){!ct&&!He&&Y!=="combobox"&&bn("",!1,!1)},[ct]),S.useEffect(function(){Ar&&se&&ui(!1),se&&li(!1)},[se]);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===G.Z.ENTER&&(Y!=="combobox"&&Bt.preventDefault(),ct||rt(!0)),Rr(!!xr),nr===G.Z.BACKSPACE&&!Vn&&He&&!xr&&Z.length){for(var On=(0,H.Z)(Z),or=null,gr=On.length-1;gr>=0;gr-=1){var _r=On[gr];if(!_r.disabled){On.splice(gr,1),or=_r;break}}or&&je(On,{type:"remove",values:[or]})}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 mr;(mr=qn.current).onKeyDown.apply(mr,[Bt].concat(kr))}mn==null||mn.apply(void 0,[Bt].concat(kr))},Zi=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 or;(or=qn.current).onKeyUp.apply(or,[Bt].concat(nr))}gn==null||gn.apply(void 0,[Bt].concat(nr))},mo=function(Bt){var Vn=Z.filter(function(nr){return nr!==Bt});je(Vn,{type:"remove",values:[Bt]})},Hr=S.useRef(!1),Lr=function(){li(!0),se||(Nt&&!Hr.current&&Nt.apply(void 0,arguments),Vt.includes("focus")&&rt(!0)),Hr.current=!0},Zo=function(){li(!1,function(){Hr.current=!1,rt(!1)}),!se&&(xr&&(Y==="tags"?_t(xr,{source:"submit"}):Y==="multiple"&&_t("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];S.useEffect(function(){return function(){Tr.forEach(function(Jt){return clearTimeout(Jt)}),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 or=setTimeout(function(){var kr=Tr.indexOf(or);if(kr!==-1&&Tr.splice(kr,1),Yr(),!Kn&&!On.contains(document.activeElement)){var Nr;(Nr=sr.current)===null||Nr===void 0||Nr.focus()}});Tr.push(or)}for(var gr=arguments.length,_r=new Array(gr>1?gr-1:0),wr=1;wr<gr;wr++)_r[wr-1]=arguments[wr];Tn==null||Tn.apply(void 0,[Bt].concat(_r))},wi=S.useState({}),Ki=(0,p.Z)(wi,2),yo=Ki[1];function Dr(){yo({})}var Br;Ir&&(Br=function(Bt){rt(Bt)}),b(function(){var Jt;return[An.current,(Jt=Mn.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},mt,rt,!!Ir);var ji=S.useMemo(function(){return(0,K.Z)((0,K.Z)({},d),{},{notFoundContent:Ne,open:ct,triggerOpen:mt,id:Q,showSearch:ht,multiple:He,toggleOpen:rt})},[d,Ne,mt,ct,Q,ht,He,rt]),bo=!!zt||Ae,Ui;bo&&(Ui=S.createElement(vt,{className:N()("".concat(B,"-arrow"),(0,x.Z)({},"".concat(B,"-arrow-loading"),Ae)),customizeIcon:zt,customizeIconProps:{loading:Ae,searchValue:xr,open:ct,focused:Xr,showSearch:ht}}));var Ko=function(){var Bt;st==null||st(),(Bt=sr.current)===null||Bt===void 0||Bt.focus(),je([],{type:"clear",values:Z}),bn("",!1,!1)},_i=It(B,Ko,Z,Ct,wt,se,xr,Y),ki=_i.allowClear,Jr=_i.clearIcon,Pr=S.createElement(fn,{ref:qn}),So=N()(B,$,(R={},(0,x.Z)(R,"".concat(B,"-focused"),Xr),(0,x.Z)(R,"".concat(B,"-multiple"),He),(0,x.Z)(R,"".concat(B,"-single"),!He),(0,x.Z)(R,"".concat(B,"-allow-clear"),Ct),(0,x.Z)(R,"".concat(B,"-show-arrow"),bo),(0,x.Z)(R,"".concat(B,"-disabled"),se),(0,x.Z)(R,"".concat(B,"-loading"),Ae),(0,x.Z)(R,"".concat(B,"-open"),ct),(0,x.Z)(R,"".concat(B,"-customize-input"),Qr),(0,x.Z)(R,"".concat(B,"-show-search"),ht),R)),Gi=S.createElement(le,{ref:Mn,disabled:se,prefixCls:B,visible:mt,popupElement:Pr,animation:Pt,transitionName:Ht,dropdownStyle:an,dropdownClassName:Gt,direction:We,dropdownMatchSelectWidth:En,dropdownRender:_n,dropdownAlign:Ot,placement:at,builtinPlacements:ut,getPopupContainer:en,empty:me,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Br,onPopupMouseEnter:Dr},Ir?S.cloneElement(Ir,{ref:Bi}):S.createElement(bt,(0,L.Z)({},d,{domRef:kn,prefixCls:B,inputElement:Qr,ref:sr,id:Q,showSearch:ht,autoClearSearchValue:Ut,mode:Y,activeDescendantId:xt,tagRender:oe,values:Z,open:ct,onToggleOpen:rt,activeValue:Ft,searchValue:xr,onSearch:bn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=S.createElement("div",(0,L.Z)({className:So},gt,{ref:An,onMouseDown:$r,onKeyDown:ci,onKeyUp:Zi,onFocus:Lr,onBlur:Zo}),Xr&&!ct&&S.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Z.map(function(Jt){var Bt=Jt.label,Vn=Jt.value;return["number","string"].includes((0,P.Z)(Bt))?Bt:Vn}).join(", "))),Gi,Ui,ki&&Jr),S.createElement(ee.Provider,{value:ji},Vi)}),Le=Re,Ee=function(d,h){var C=S.useRef({values:new Map,options:new Map}),R=S.useMemo(function(){var B=C.current,$=B.values,ue=B.options,oe=d.map(function(Z){if(Z.label===void 0){var je;return(0,K.Z)((0,K.Z)({},Z),{},{label:(je=$.get(Z.value))===null||je===void 0?void 0:je.label})}return Z}),We=new Map,I=new Map;return oe.forEach(function(Z){We.set(Z.value,Z),I.set(Z.value,h.get(Z.value)||ue.get(Z.value))}),C.current.values=We,C.current.options=I,oe},[d,h]),Q=S.useCallback(function(B){return h.get(B)||C.current.options.get(B)},[h]);return[R,Q]};function Ye(d,h){return ze(d).join("").toUpperCase().includes(h)}var _=function(d,h,C,R,Q){return S.useMemo(function(){if(!C||R===!1)return d;var B=h.options,$=h.label,ue=h.value,oe=[],We=typeof R=="function",I=C.toUpperCase(),Z=We?R:function(me,Ze){return Q?Ye(Ze[Q],I):Ze[B]?Ye(Ze[$!=="children"?$:"label"],I):Ye(Ze[ue],I)},je=We?function(me){return ve(me)}:function(me){return me};return d.forEach(function(me){if(me[B]){var Ze=Z(C,je(me));if(Ze)oe.push(me);else{var Ne=me[B].filter(function(st){return Z(C,je(st))});Ne.length&&oe.push((0,K.Z)((0,K.Z)({},me),{},(0,x.Z)({},B,Ne)))}return}Z(C,je(me))&&oe.push(me)}),oe},[d,R,Q,C,h])},et=f(17115),Be=f(11592),lt=["children","value"],ft=["children"];function rn(d){var h=d,C=h.key,R=h.props,Q=R.children,B=R.value,$=(0,D.Z)(R,lt);return(0,K.Z)({key:C,value:B!==void 0?B:C,children:Q},$)}function Zt(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Be.Z)(d).map(function(C,R){if(!S.isValidElement(C)||!C.type)return null;var Q=C,B=Q.type.isSelectOptGroup,$=Q.key,ue=Q.props,oe=ue.children,We=(0,D.Z)(ue,ft);return h||!B?rn(C):(0,K.Z)((0,K.Z)({key:"__RC_SELECT_GRP__".concat($===null?R:$,"__"),label:$},We),{},{options:Zt(oe)})}).filter(function(C){return C})}function At(d,h,C,R,Q){return S.useMemo(function(){var B=d,$=!d;$&&(B=Zt(h));var ue=new Map,oe=new Map,We=function(je,me,Ze){Ze&&typeof Ze=="string"&&je.set(me[Ze],me)};function I(Z){for(var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=0;me<Z.length;me+=1){var Ze=Z[me];!Ze[C.options]||je?(ue.set(Ze[C.value],Ze),We(oe,Ze,C.label),We(oe,Ze,R),We(oe,Ze,Q)):I(Ze[C.options],!0)}}return I(B),{options:B,valueOptions:ue,labelOptions:oe}},[d,h,C,R,Q])}function Dt(d){var h=S.useRef();h.current=d;var C=S.useCallback(function(){return h.current.apply(h,arguments)},[]);return C}var Xt=function(){return null};Xt.isSelectOptGroup=!0;var Yt=Xt,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,un=f(80547),$n=f(2738),zn=f(6790),pn=S.createContext(null),Ln=pn;function wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function xn(d){return typeof d=="string"||typeof d=="number"}var dn=function(h,C){var R=A(),Q=R.prefixCls,B=R.id,$=R.open,ue=R.multiple,oe=R.mode,We=R.searchValue,I=R.toggleOpen,Z=R.notFoundContent,je=R.onPopupScroll,me=S.useContext(Ln),Ze=me.flattenOptions,Ne=me.onActiveValue,st=me.defaultActiveFirstOption,Y=me.onSelect,se=me.menuItemSelectedIcon,Ae=me.rawValues,nt=me.fieldNames,Ue=me.virtual,ot=me.direction,jt=me.listHeight,Mt=me.listItemHeight,Ft="".concat(Q,"-item"),$t=(0,un.Z)(function(){return Ze},[$,Ze],function(Ot,at){return at[0]&&Ot[1]!==at[1]}),xt=S.useRef(null),qt=function(at){at.preventDefault()},Ut=function(at){xt.current&&xt.current.scrollTo(typeof at=="number"?{index:at}:at)},_t=function(at){for(var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,en=$t.length,tn=0;tn<en;tn+=1){var Vt=(at+tn*ut+en)%en,Nt=$t[Vt],ln=Nt.group,gn=Nt.data;if(!ln&&!gn.disabled)return Vt}return-1},kt=S.useState(function(){return _t(0)}),Rt=(0,p.Z)(kt,2),Ct=Rt[0],zt=Rt[1],wt=function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;zt(at);var en={source:ut?"keyboard":"mouse"},tn=$t[at];if(!tn){Ne(null,-1,en);return}Ne(tn.value,at,en)};(0,S.useEffect)(function(){wt(st!==!1?_t(0):-1)},[$t.length,We]);var fn=S.useCallback(function(Ot){return Ae.has(Ot)&&oe!=="combobox"},[oe,(0,H.Z)(Ae).toString(),Ae.size]);(0,S.useEffect)(function(){var Ot=setTimeout(function(){if(!ue&&$&&Ae.size===1){var ut=Array.from(Ae)[0],en=$t.findIndex(function(tn){var Vt=tn.data;return Vt.value===ut});en!==-1&&(wt(en),Ut(en))}});if($){var at;(at=xt.current)===null||at===void 0||at.scrollTo(void 0)}return function(){return clearTimeout(Ot)}},[$,We,Ze.length]);var Pt=function(at){at!==void 0&&Y(at,{selected:!Ae.has(at)}),ue||I(!1)};if(S.useImperativeHandle(C,function(){return{onKeyDown:function(at){var ut=at.which,en=at.ctrlKey;switch(ut){case G.Z.N:case G.Z.P:case G.Z.UP:case G.Z.DOWN:{var tn=0;if(ut===G.Z.UP?tn=-1:ut===G.Z.DOWN?tn=1:wn()&&en&&(ut===G.Z.N?tn=1:ut===G.Z.P&&(tn=-1)),tn!==0){var Vt=_t(Ct+tn,tn);Ut(Vt),wt(Vt,!0)}break}case G.Z.ENTER:{var Nt=$t[Ct];Nt&&!Nt.data.disabled?Pt(Nt.value):Pt(void 0),$&&at.preventDefault();break}case G.Z.ESC:I(!1),$&&at.stopPropagation()}},onKeyUp:function(){},scrollTo:function(at){Ut(at)}}}),$t.length===0)return S.createElement("div",{role:"listbox",id:"".concat(B,"_list"),className:"".concat(Ft,"-empty"),onMouseDown:qt},Z);var Ht=Object.keys(nt).map(function(Ot){return nt[Ot]}),an=function(at){return at.label};function Gt(Ot,at){var ut=Ot.group;return{role:ut?"presentation":"option",id:"".concat(B,"_list_").concat(at)}}var En=function(at){var ut=$t[at];if(!ut)return null;var en=ut.data||{},tn=en.value,Vt=ut.group,Nt=(0,O.Z)(en,!0),ln=an(ut);return ut?S.createElement("div",(0,L.Z)({"aria-label":typeof ln=="string"&&!Vt?ln:null},Nt,{key:at},Gt(ut,at),{"aria-selected":fn(tn)}),tn):null},_n={role:"listbox",id:"".concat(B,"_list")};return S.createElement(S.Fragment,null,Ue&&S.createElement("div",(0,L.Z)({},_n,{style:{height:0,width:0,overflow:"hidden"}}),En(Ct-1),En(Ct),En(Ct+1)),S.createElement(zn.Z,{itemKey:"key",ref:xt,data:$t,height:jt,itemHeight:Mt,fullHeight:!1,onMouseDown:qt,onScroll:je,virtual:Ue,direction:ot,innerProps:Ue?null:_n},function(Ot,at){var ut,en=Ot.group,tn=Ot.groupOption,Vt=Ot.data,Nt=Ot.label,ln=Ot.value,gn=Vt.key;if(en){var mn,Tn=(mn=Vt.title)!==null&&mn!==void 0?mn:xn(Nt)?Nt.toString():void 0;return S.createElement("div",{className:N()(Ft,"".concat(Ft,"-group")),title:Tn},Nt!==void 0?Nt:gn)}var _e=Vt.disabled,He=Vt.title,ht=Vt.children,gt=Vt.style,vn=Vt.className,Cr=(0,D.Z)(Vt,In),Kn=(0,$n.Z)(Cr,Ht),jn=fn(ln),An="".concat(Ft,"-option"),kn=N()(Ft,An,vn,(ut={},(0,x.Z)(ut,"".concat(An,"-grouped"),tn),(0,x.Z)(ut,"".concat(An,"-active"),Ct===at&&!_e),(0,x.Z)(ut,"".concat(An,"-disabled"),_e),(0,x.Z)(ut,"".concat(An,"-selected"),jn),ut)),Mn=an(Ot),sr=!se||typeof se=="function"||jn,qn=typeof Mn=="number"?Mn:Mn||ln,tr=xn(qn)?qn.toString():void 0;return He!==void 0&&(tr=He),S.createElement("div",(0,L.Z)({},(0,O.Z)(Kn),Ue?{}:Gt(Ot,at),{"aria-selected":jn,className:kn,title:tr,onMouseMove:function(){Ct===at||_e||wt(at)},onClick:function(){_e||Pt(ln)},style:gt}),S.createElement("div",{className:"".concat(An,"-content")},qn),S.isValidElement(se)||jn,sr&&S.createElement(vt,{className:"".concat(Ft,"-option-state"),customizeIcon:se,customizeIconProps:{isSelected:jn}},jn?"\u2713":null))}))},Wn=S.forwardRef(dn);Wn.displayName="OptionList";var Qt=Wn;function Nn(d){var h=d.mode,C=d.options,R=d.children,Q=d.backfill,B=d.allowClear,$=d.placeholder,ue=d.getInputElement,oe=d.showSearch,We=d.onSearch,I=d.defaultOpen,Z=d.autoFocus,je=d.labelInValue,me=d.value,Ze=d.inputValue,Ne=d.optionLabelProp,st=isMultiple(h),Y=oe!==void 0?oe:st||h==="combobox",se=C||convertChildrenToData(R);if(warning(h!=="tags"||se.every(function(ot){return!ot.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),h==="tags"||h==="combobox"){var Ae=se.some(function(ot){return ot.options?ot.options.some(function(jt){return typeof("value"in jt?jt.value:jt.key)=="number"}):typeof("value"in ot?ot.value:ot.key)=="number"});warning(!Ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(h!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(h==="combobox"||!Q,"`backfill` only works with `combobox` mode."),warning(h==="combobox"||!ue,"`getInputElement` only work with `combobox` mode."),noteOnce(h!=="combobox"||!ue||!B||!$,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),We&&!Y&&h!=="combobox"&&h!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!I||Z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),me!=null){var nt=toArray(me);warning(!je||nt.every(function(ot){return _typeof(ot)==="object"&&("key"in ot||"value"in ot)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!st||Array.isArray(me),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var Ue=null;toNodeArray(R).some(function(ot){if(!React.isValidElement(ot)||!ot.type)return!1;var jt=ot,Mt=jt.type;if(Mt.isSelectOption)return!1;if(Mt.isSelectOptGroup){var Ft=toNodeArray(ot.props.children).every(function($t){return!React.isValidElement($t)||!ot.type||$t.type.isSelectOption?!0:(Ue=$t.type,!1)});return!Ft}return Ue=Mt,!0}),Ue&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ue.displayName||Ue.name||Ue,"`.")),warning(Ze===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hn(d,h){if(d){var C=function R(Q){for(var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=0;$<Q.length;$++){var ue=Q[$];if(ue[h==null?void 0:h.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!B&&Array.isArray(ue[h==null?void 0:h.options])&&R(ue[h==null?void 0:h.options],!0))break}};C(d)}}var Sr=null,pr=["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"],on=["inputValue"];function tt(d){return!d||(0,P.Z)(d)!=="object"}var Wt=S.forwardRef(function(d,h){var C=d.id,R=d.mode,Q=d.prefixCls,B=Q===void 0?"rc-select":Q,$=d.backfill,ue=d.fieldNames,oe=d.inputValue,We=d.searchValue,I=d.onSearch,Z=d.autoClearSearchValue,je=Z===void 0?!0:Z,me=d.onSelect,Ze=d.onDeselect,Ne=d.dropdownMatchSelectWidth,st=Ne===void 0?!0:Ne,Y=d.filterOption,se=d.filterSort,Ae=d.optionFilterProp,nt=d.optionLabelProp,Ue=d.options,ot=d.children,jt=d.defaultActiveFirstOption,Mt=d.menuItemSelectedIcon,Ft=d.virtual,$t=d.direction,xt=d.listHeight,qt=xt===void 0?200:xt,Ut=d.listItemHeight,_t=Ut===void 0?20:Ut,kt=d.value,Rt=d.defaultValue,Ct=d.labelInValue,zt=d.onChange,wt=(0,D.Z)(d,pr),fn=(0,et.ZP)(C),Pt=ce(R),Ht=!!(!Ue&&ot),an=S.useMemo(function(){return Y===void 0&&R==="combobox"?!1:Y},[Y,R]),Gt=S.useMemo(function(){return he(ue,Ht)},[JSON.stringify(ue),Ht]),En=(0,pe.Z)("",{value:We!==void 0?We:oe,postState:function(Lt){return Lt||""}}),_n=(0,p.Z)(En,2),Ot=_n[0],at=_n[1],ut=At(Ue,ot,Gt,Ae,nt),en=ut.valueOptions,tn=ut.labelOptions,Vt=ut.options,Nt=S.useCallback(function(ct){var Lt=ze(ct);return Lt.map(function(mt){var rt,yn,bn,ur,Mr;if(tt(mt))rt=mt;else{var Fr;bn=mt.key,yn=mt.label,rt=(Fr=mt.value)!==null&&Fr!==void 0?Fr:bn}var Gn=en.get(rt);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[nt||Gt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:rt),ur=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:rt,key:bn,disabled:ur,title:Mr}})},[Gt,nt,en]),ln=(0,pe.Z)(Rt,{value:kt}),gn=(0,p.Z)(ln,2),mn=gn[0],Tn=gn[1],_e=S.useMemo(function(){var ct,Lt=Nt(mn);return R==="combobox"&&Ge((ct=Lt[0])===null||ct===void 0?void 0:ct.value)?[]:Lt},[mn,Nt,R]),He=Ee(_e,en),ht=(0,p.Z)(He,2),gt=ht[0],vn=ht[1],Cr=S.useMemo(function(){if(!R&>.length===1){var ct=gt[0];if(ct.value===null&&(ct.label===null||ct.label===void 0))return[]}return gt.map(function(Lt){var mt;return(0,K.Z)((0,K.Z)({},Lt),{},{label:(mt=Lt.label)!==null&&mt!==void 0?mt:Lt.value})})},[R,gt]),Kn=S.useMemo(function(){return new Set(gt.map(function(ct){return ct.value}))},[gt]);S.useEffect(function(){if(R==="combobox"){var ct,Lt=(ct=gt[0])===null||ct===void 0?void 0:ct.value;at(Ke(Lt)?String(Lt):"")}},[gt]);var jn=Dt(function(ct,Lt){var mt,rt=Lt!=null?Lt:ct;return mt={},(0,x.Z)(mt,Gt.value,ct),(0,x.Z)(mt,Gt.label,rt),mt}),An=S.useMemo(function(){if(R!=="tags")return Vt;var ct=(0,H.Z)(Vt),Lt=function(rt){return en.has(rt)};return(0,H.Z)(gt).sort(function(mt,rt){return mt.value<rt.value?-1:1}).forEach(function(mt){var rt=mt.value;Lt(rt)||ct.push(jn(rt,mt.label))}),ct},[jn,Vt,en,gt,R]),kn=_(An,Gt,Ot,an,Ae),Mn=S.useMemo(function(){return R!=="tags"||!Ot||kn.some(function(ct){return ct[Ae||"value"]===Ot})||kn.some(function(ct){return ct[Gt.value]===Ot})?kn:[jn(Ot)].concat((0,H.Z)(kn))},[jn,Ae,R,kn,Ot,Gt]),sr=S.useMemo(function(){return se?(0,H.Z)(Mn).sort(function(ct,Lt){return se(ct,Lt)}):Mn},[Mn,se]),qn=S.useMemo(function(){return Se(sr,{fieldNames:Gt,childrenAsData:Ht})},[sr,Gt,Ht]),tr=function(Lt){var mt=Nt(Lt);if(Tn(mt),zt&&(mt.length!==gt.length||mt.some(function(bn,ur){var Mr;return((Mr=gt[ur])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var rt=Ct?mt:mt.map(function(bn){return bn.value}),yn=mt.map(function(bn){return ve(vn(bn.value))});zt(Pt?rt:rt[0],Pt?yn:yn[0])}},Kr=S.useState(null),Xr=(0,p.Z)(Kr,2),li=Xr[0],Yr=Xr[1],xr=S.useState(0),Qr=(0,p.Z)(xr,2),Ir=Qr[0],Bi=Qr[1],Si=jt!==void 0?jt:R!=="combobox",si=S.useCallback(function(ct,Lt){var mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt=mt.source,yn=rt===void 0?"keyboard":rt;Bi(Lt),$&&R==="combobox"&&ct!==null&&yn==="keyboard"&&Yr(String(ct))},[$,R]),jr=function(Lt,mt,rt){var yn=function(){var Hr,Lr=vn(Lt);return[Ct?{label:Lr==null?void 0:Lr[Gt.label],value:Lt,key:(Hr=Lr==null?void 0:Lr.key)!==null&&Hr!==void 0?Hr:Lt}:Lt,ve(Lr)]};if(mt&&me){var bn=yn(),ur=(0,p.Z)(bn,2),Mr=ur[0],Fr=ur[1];me(Mr,Fr)}else if(!mt&&Ze&&rt!=="clear"){var Gn=yn(),Rr=(0,p.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];Ze(ci,Zi)}},Ci=Dt(function(ct,Lt){var mt,rt=Pt?Lt.selected:!0;rt?mt=Pt?[].concat((0,H.Z)(gt),[ct]):[ct]:mt=gt.filter(function(yn){return yn.value!==ct}),tr(mt),jr(ct,rt),R==="combobox"?Yr(""):(!ce||je)&&(at(""),Yr(""))}),xi=function(Lt,mt){tr(Lt);var rt=mt.type,yn=mt.values;(rt==="remove"||rt==="clear")&&yn.forEach(function(bn){jr(bn.value,!1,rt)})},Ur=function(Lt,mt){if(at(Lt),Yr(null),mt.source==="submit"){var rt=(Lt||"").trim();if(rt){var yn=Array.from(new Set([].concat((0,H.Z)(Kn),[rt])));tr(yn),jr(rt,!0),at("")}return}mt.source!=="blur"&&(R==="combobox"&&tr(Lt),I==null||I(Lt))},Ar=function(Lt){var mt=Lt;R!=="tags"&&(mt=Lt.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,H.Z)(Kn),(0,H.Z)(mt))));tr(rt),rt.forEach(function(yn){jr(yn,!0)})},ui=S.useMemo(function(){var ct=Ft!==!1&&st!==!1;return(0,K.Z)((0,K.Z)({},ut),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:Ci,menuItemSelectedIcon:Mt,rawValues:Kn,fieldNames:Gt,virtual:ct,direction:$t,listHeight:qt,listItemHeight:_t,childrenAsData:Ht})},[ut,qn,si,Si,Ci,Mt,Kn,Gt,Ft,st,qt,_t,Ht]);return S.createElement(Ln.Provider,{value:ui},S.createElement(Le,(0,L.Z)({},wt,{id:fn,prefixCls:B,ref:h,omitDomProps:on,mode:R,displayValues:Cr,onDisplayValuesChange:xi,direction:$t,searchValue:Ot,onSearch:Ur,autoClearSearchValue:je,onSearchSplit:Ar,dropdownMatchSelectWidth:st,OptionList:Qt,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(fn,"_list_").concat(Ir)})))}),g=Wt;g.Option=Cn,g.OptGroup=Yt;var T=g,W=T},9296:function(nn,xe,f){"use strict";f.r(xe),f.d(xe,{ResizableTextArea:function(){return ge},default:function(){return Ge}});var L=f(14809),H=f(20439),x=f(4635),K=f(93664),p=f(50298),D=f(62646),P=f(95190),pe=f(92310),te=f.n(pe),S=f(93681),Ce=f(5643),N=f(18929),fe=f(59301),Oe=f(29301),G=f(34280),Ve=f(16089),qe=`
|
|
|
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;
|
|
|
`,vt=["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"],It={},ee;function A(J){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=J.getAttribute("id")||J.getAttribute("data-reactid")||J.getAttribute("name");if(U&&It[ae])return It[ae];var ne=window.getComputedStyle(J),k=ne.getPropertyValue("box-sizing")||ne.getPropertyValue("-moz-box-sizing")||ne.getPropertyValue("-webkit-box-sizing"),Ie=parseFloat(ne.getPropertyValue("padding-bottom"))+parseFloat(ne.getPropertyValue("padding-top")),Te=parseFloat(ne.getPropertyValue("border-bottom-width"))+parseFloat(ne.getPropertyValue("border-top-width")),re=vt.map(function(de){return"".concat(de,":").concat(ne.getPropertyValue(de))}).join(";"),De={sizingStyle:re,paddingSize:Ie,borderSize:Te,boxSizing:k};return U&&ae&&(It[ae]=De),De}function m(J){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ee||(ee=document.createElement("textarea"),ee.setAttribute("tab-index","-1"),ee.setAttribute("aria-hidden","true"),document.body.appendChild(ee)),J.getAttribute("wrap")?ee.setAttribute("wrap",J.getAttribute("wrap")):ee.removeAttribute("wrap");var k=A(J,U),Ie=k.paddingSize,Te=k.borderSize,re=k.boxSizing,De=k.sizingStyle;ee.setAttribute("style","".concat(De,";").concat(qe)),ee.value=J.value||J.placeholder||"";var de=void 0,yt=void 0,Tt,bt=ee.scrollHeight;if(re==="border-box"?bt+=Te:re==="content-box"&&(bt-=Ie),ae!==null||ne!==null){ee.value=" ";var Je=ee.scrollHeight-Ie;ae!==null&&(de=Je*ae,re==="border-box"&&(de=de+Ie+Te),bt=Math.max(de,bt)),ne!==null&&(yt=Je*ne,re==="border-box"&&(yt=yt+Ie+Te),Tt=bt>yt?"":"hidden",bt=Math.min(yt,bt))}var Et={height:bt,overflowY:Tt,resize:"none"};return de&&(Et.minHeight=de),yt&&(Et.maxHeight=yt),Et}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,O=1,j=2,M=fe.forwardRef(function(J,U){var ae=J,ne=ae.prefixCls,k=ae.onPressEnter,Ie=ae.defaultValue,Te=ae.value,re=ae.autoSize,De=ae.onResize,de=ae.className,yt=ae.style,Tt=ae.disabled,bt=ae.onChange,Je=ae.onInternalAutoSize,Et=(0,D.Z)(ae,c),it=(0,N.Z)(Ie,{value:Te,postState:function(Yt){return Yt!=null?Yt:""}}),F=(0,p.Z)(it,2),we=F[0],le=F[1],V=function(Yt){le(Yt.target.value),bt==null||bt(Yt)},ie=fe.useRef();fe.useImperativeHandle(U,function(){return{textArea:ie.current}});var he=fe.useMemo(function(){return re&&(0,K.Z)(re)==="object"?[re.minRows,re.maxRows]:[]},[re]),Se=(0,p.Z)(he,2),ve=Se[0],Pe=Se[1],q=!!re,Xe=function(){try{if(document.activeElement===ie.current){var Yt=ie.current,sn=Yt.selectionStart,Cn=Yt.selectionEnd,un=Yt.scrollTop;ie.current.setSelectionRange(sn,Cn),ie.current.scrollTop=un}}catch($n){}},ce=fe.useState(j),Re=(0,p.Z)(ce,2),Le=Re[0],Ee=Re[1],Ye=fe.useState(),_=(0,p.Z)(Ye,2),et=_[0],Be=_[1],lt=function(){Ee(b)};(0,G.Z)(function(){q&<()},[Te,ve,Pe,q]),(0,G.Z)(function(){if(Le===b)Ee(O);else if(Le===O){var Xt=m(ie.current,!1,ve,Pe);Ee(j),Be(Xt)}else Xe()},[Le]);var ft=fe.useRef(),rn=function(){Ve.Z.cancel(ft.current)},Zt=function(Yt){Le===j&&(De==null||De(Yt),re&&(rn(),ft.current=(0,Ve.Z)(function(){lt()})))};fe.useEffect(function(){return rn},[]);var At=q?et:null,Dt=(0,H.Z)((0,H.Z)({},yt),At);return(Le===b||Le===O)&&(Dt.overflowY="hidden",Dt.overflowX="hidden"),fe.createElement(Oe.Z,{onResize:Zt,disabled:!(re||De)},fe.createElement("textarea",(0,L.Z)({},Et,{ref:ie,style:Dt,className:te()(ne,de,(0,x.Z)({},"".concat(ne,"-disabled"),Tt)),disabled:Tt,value:we,onChange:V})))}),ge=M,Me=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ze(J,U){return(0,P.Z)(J||"").slice(0,U).join("")}function be(J,U,ae,ne){var k=ae;return J?k=ze(ae,ne):(0,P.Z)(U||"").length<ae.length&&(0,P.Z)(ae||"").length>ne&&(k=U),k}var pt=fe.forwardRef(function(J,U){var ae,ne=J.defaultValue,k=J.value,Ie=J.onFocus,Te=J.onBlur,re=J.onChange,De=J.allowClear,de=J.maxLength,yt=J.onCompositionStart,Tt=J.onCompositionEnd,bt=J.suffix,Je=J.prefixCls,Et=Je===void 0?"rc-textarea":Je,it=J.classes,F=J.showCount,we=J.className,le=J.style,V=J.disabled,ie=J.hidden,he=J.classNames,Se=J.styles,ve=J.onResize,Pe=(0,D.Z)(J,Me),q=(0,N.Z)(ne,{value:k,defaultValue:ne}),Xe=(0,p.Z)(q,2),ce=Xe[0],Re=Xe[1],Le=(0,fe.useRef)(null),Ee=fe.useState(!1),Ye=(0,p.Z)(Ee,2),_=Ye[0],et=Ye[1],Be=fe.useState(!1),lt=(0,p.Z)(Be,2),ft=lt[0],rn=lt[1],Zt=fe.useRef(),At=fe.useRef(0),Dt=fe.useState(null),Xt=(0,p.Z)(Dt,2),Yt=Xt[0],sn=Xt[1],Cn=function(){var tt;(tt=Le.current)===null||tt===void 0||tt.textArea.focus()};(0,fe.useImperativeHandle)(U,function(){return{resizableTextArea:Le.current,focus:Cn,blur:function(){var tt;(tt=Le.current)===null||tt===void 0||tt.textArea.blur()}}}),(0,fe.useEffect)(function(){et(function(on){return!V&&on})},[V]);var un=Number(de)>0,$n=function(tt){rn(!0),Zt.current=ce,At.current=tt.currentTarget.selectionStart,yt==null||yt(tt)},zn=function(tt){rn(!1);var Wt=tt.currentTarget.value;if(un){var g,T=At.current>=de+1||At.current===((g=Zt.current)===null||g===void 0?void 0:g.length);Wt=be(T,Zt.current,Wt,de)}Wt!==ce&&(Re(Wt),(0,Ce.rJ)(tt.currentTarget,tt,re,Wt)),Tt==null||Tt(tt)},pn=function(tt){var Wt=tt.target.value;if(!ft&&un){var g=tt.target.selectionStart>=de+1||tt.target.selectionStart===Wt.length||!tt.target.selectionStart;Wt=be(g,ce,Wt,de)}Re(Wt),(0,Ce.rJ)(tt.currentTarget,tt,re,Wt)},Ln=function(tt){var Wt=Pe.onPressEnter,g=Pe.onKeyDown;tt.key==="Enter"&&Wt&&Wt(tt),g==null||g(tt)},wn=function(tt){et(!0),Ie==null||Ie(tt)},In=function(tt){et(!1),Te==null||Te(tt)},xn=function(tt){var Wt;Re(""),Cn(),(0,Ce.rJ)((Wt=Le.current)===null||Wt===void 0?void 0:Wt.textArea,tt,re)},dn=(0,Ce.D7)(ce);!ft&&un&&k==null&&(dn=ze(dn,de));var Wn=bt,Qt;if(F){var Nn=(0,P.Z)(dn).length;(0,K.Z)(F)==="object"?Qt=F.formatter({value:dn,count:Nn,maxLength:de}):Qt="".concat(Nn).concat(un?" / ".concat(de):""),Wn=fe.createElement(fe.Fragment,null,Wn,fe.createElement("span",{className:te()("".concat(Et,"-data-count"),he==null?void 0:he.count),style:Se==null?void 0:Se.count},Qt))}var Hn=function(tt){var Wt;ve==null||ve(tt),(Wt=Le.current)!==null&&Wt!==void 0&&Wt.textArea.style.height&&sn(!0)},Sr=!Pe.autoSize&&!F&&!De,pr=fe.createElement(S.BaseInput,{value:dn,allowClear:De,handleReset:xn,suffix:Wn,prefixCls:Et,classes:{affixWrapper:te()(it==null?void 0:it.affixWrapper,(ae={},(0,x.Z)(ae,"".concat(Et,"-show-count"),F),(0,x.Z)(ae,"".concat(Et,"-textarea-allow-clear"),De),ae))},disabled:V,focused:_,className:we,style:(0,H.Z)((0,H.Z)({},le),Yt&&!Sr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qt=="string"?Qt:void 0}},hidden:ie,inputElement:fe.createElement(ge,(0,L.Z)({},Pe,{onKeyDown:Ln,onChange:pn,onFocus:wn,onBlur:In,onCompositionStart:$n,onCompositionEnd:zn,className:he==null?void 0:he.textarea,style:(0,H.Z)((0,H.Z)({},Se==null?void 0:Se.textarea),{},{resize:le==null?void 0:le.resize}),disabled:V,prefixCls:Et,onResize:Hn,ref:Le}))});return pr}),Ke=pt,Ge=Ke},6790:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return it}});var L=f(14809),H=f(93664),x=f(20439),K=f(4635),p=f(50298),D=f(62646),P=f(92310),pe=f.n(P),te=f(29301),S=f(70425),Ce=f(34280),N=f(59301),fe=f(4676),Oe=N.forwardRef(function(F,we){var le=F.height,V=F.offsetY,ie=F.offsetX,he=F.children,Se=F.prefixCls,ve=F.onInnerResize,Pe=F.innerProps,q=F.rtl,Xe=F.extra,ce={},Re={display:"flex",flexDirection:"column"};return V!==void 0&&(ce={height:le,position:"relative",overflow:"hidden"},Re=(0,x.Z)((0,x.Z)({},Re),{},(0,K.Z)((0,K.Z)((0,K.Z)((0,K.Z)((0,K.Z)({transform:"translateY(".concat(V,"px)")},q?"marginRight":"marginLeft",-ie),"position","absolute"),"left",0),"right",0),"top",0))),N.createElement("div",{style:ce},N.createElement(te.Z,{onResize:function(Ee){var Ye=Ee.offsetHeight;Ye&&ve&&ve()}},N.createElement("div",(0,L.Z)({style:Re,className:pe()((0,K.Z)({},"".concat(Se,"-holder-inner"),Se)),ref:we},Pe),he,Xe)))});Oe.displayName="Filler";var G=Oe;function Ve(F){var we=F.children,le=F.setRef,V=N.useCallback(function(ie){le(ie)},[]);return N.cloneElement(we,{ref:V})}function qe(F,we,le,V,ie,he,Se,ve){var Pe=ve.getKey;return F.slice(we,le+1).map(function(q,Xe){var ce=we+Xe,Re=Se(q,ce,{style:{width:V},offsetX:ie}),Le=Pe(q);return N.createElement(Ve,{key:Le,setRef:function(Ye){return he(q,Ye)}},Re)})}function vt(F,we,le,V){var ie=le-F,he=we-le,Se=Math.min(ie,he)*2;if(V<=Se){var ve=Math.floor(V/2);return V%2?le+ve+1:le-ve}return ie>he?le-(V-he):le+(V-ie)}function It(F,we,le){var V=F.length,ie=we.length,he,Se;if(V===0&&ie===0)return null;V<ie?(he=F,Se=we):(he=we,Se=F);var ve={__EMPTY_ITEM__:!0};function Pe(Ee){return Ee!==void 0?le(Ee):ve}for(var q=null,Xe=Math.abs(V-ie)!==1,ce=0;ce<Se.length;ce+=1){var Re=Pe(he[ce]),Le=Pe(Se[ce]);if(Re!==Le){q=ce,Xe=Xe||Re!==Pe(Se[ce+1]);break}}return q===null?null:{index:q,multiple:Xe}}function ee(F,we,le){var V=N.useState(F),ie=(0,p.Z)(V,2),he=ie[0],Se=ie[1],ve=N.useState(null),Pe=(0,p.Z)(ve,2),q=Pe[0],Xe=Pe[1];return N.useEffect(function(){var ce=It(he||[],F||[],we);(ce==null?void 0:ce.index)!==void 0&&(le==null||le(ce.index),Xe(F[ce.index])),Se(F)},[F]),[q]}var A=f(16089),m=(typeof navigator=="undefined"?"undefined":(0,H.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=m,b=function(F,we,le,V){var ie=(0,N.useRef)(!1),he=(0,N.useRef)(null);function Se(){clearTimeout(he.current),ie.current=!0,he.current=setTimeout(function(){ie.current=!1},50)}var ve=(0,N.useRef)({top:F,bottom:we,left:le,right:V});return ve.current.top=F,ve.current.bottom=we,ve.current.left=le,ve.current.right=V,function(Pe,q){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ce=Pe?q<0&&ve.current.left||q>0&&ve.current.right:q<0&&ve.current.top||q>0&&ve.current.bottom;return Xe&&ce?(clearTimeout(he.current),ie.current=!1):(!ce||ie.current)&&Se(),!ie.current&&ce}};function O(F,we,le,V,ie,he,Se){var ve=(0,N.useRef)(0),Pe=(0,N.useRef)(null),q=(0,N.useRef)(null),Xe=(0,N.useRef)(!1),ce=b(we,le,V,ie);function Re(Be,lt){if(A.Z.cancel(Pe.current),!ce(!1,lt)){var ft=Be;if(!ft._virtualHandled)ft._virtualHandled=!0;else return;ve.current+=lt,q.current=lt,c||ft.preventDefault(),Pe.current=(0,A.Z)(function(){var rn=Xe.current?10:1;Se(ve.current*rn,!1),ve.current=0})}}function Le(Be,lt){Se(lt,!0),c||Be.preventDefault()}var Ee=(0,N.useRef)(null),Ye=(0,N.useRef)(null);function _(Be){if(F){A.Z.cancel(Ye.current),Ye.current=(0,A.Z)(function(){Ee.current=null},2);var lt=Be.deltaX,ft=Be.deltaY,rn=Be.shiftKey,Zt=lt,At=ft;(Ee.current==="sx"||!Ee.current&&rn&&ft&&!lt)&&(Zt=ft,At=0,Ee.current="sx");var Dt=Math.abs(Zt),Xt=Math.abs(At);Ee.current===null&&(Ee.current=he&&Dt>Xt?"x":"y"),Ee.current==="y"?Re(Be,At):Le(Be,Zt)}}function et(Be){F&&(Xe.current=Be.detail===q.current)}return[_,et]}function j(F,we,le,V){var ie=N.useMemo(function(){return[new Map,[]]},[F,le.id,V]),he=(0,p.Z)(ie,2),Se=he[0],ve=he[1],Pe=function(Xe){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xe,Re=Se.get(Xe),Le=Se.get(ce);if(Re===void 0||Le===void 0)for(var Ee=F.length,Ye=ve.length;Ye<Ee;Ye+=1){var _,et=F[Ye],Be=we(et);Se.set(Be,Ye);var lt=(_=le.get(Be))!==null&&_!==void 0?_:V;if(ve[Ye]=(ve[Ye-1]||0)+lt,Be===Xe&&(Re=Ye),Be===ce&&(Le=Ye),Re!==void 0&&Le!==void 0)break}return{top:ve[Re-1]||0,bottom:ve[Le]}};return Pe}var M=f(99153),ge=f(84851),Me=function(){function F(){(0,M.Z)(this,F),(0,K.Z)(this,"maps",void 0),(0,K.Z)(this,"id",0),(0,K.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ge.Z)(F,[{key:"set",value:function(le,V){this.diffRecords.set(le,this.maps[le]),this.maps[le]=V,this.id+=1}},{key:"get",value:function(le){return this.maps[le]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),F}(),ze=Me;function be(F){var we=parseFloat(F);return isNaN(we)?0:we}function pt(F,we,le){var V=N.useState(0),ie=(0,p.Z)(V,2),he=ie[0],Se=ie[1],ve=(0,N.useRef)(new Map),Pe=(0,N.useRef)(new ze),q=(0,N.useRef)(0);function Xe(){q.current+=1}function ce(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Xe();var Ee=function(){var et=!1;ve.current.forEach(function(Be,lt){if(Be&&Be.offsetParent){var ft=Be.offsetHeight,rn=getComputedStyle(Be),Zt=rn.marginTop,At=rn.marginBottom,Dt=be(Zt),Xt=be(At),Yt=ft+Dt+Xt;Pe.current.get(lt)!==Yt&&(Pe.current.set(lt,Yt),et=!0)}}),et&&Se(function(Be){return Be+1})};if(Le)Ee();else{q.current+=1;var Ye=q.current;Promise.resolve().then(function(){Ye===q.current&&Ee()})}}function Re(Le,Ee){var Ye=F(Le),_=ve.current.get(Ye);Ee?(ve.current.set(Ye,Ee),ce()):ve.current.delete(Ye),!_!=!Ee&&(Ee?we==null||we(Le):le==null||le(Le))}return(0,N.useEffect)(function(){return Xe},[]),[Re,ce,Pe.current,he]}var Ke=14/15;function Ge(F,we,le){var V=(0,N.useRef)(!1),ie=(0,N.useRef)(0),he=(0,N.useRef)(0),Se=(0,N.useRef)(null),ve=(0,N.useRef)(null),Pe,q=function(Le){if(V.current){var Ee=Math.ceil(Le.touches[0].pageX),Ye=Math.ceil(Le.touches[0].pageY),_=ie.current-Ee,et=he.current-Ye,Be=Math.abs(_)>Math.abs(et);Be?ie.current=Ee:he.current=Ye;var lt=le(Be,Be?_:et,!1,Le);lt&&Le.preventDefault(),clearInterval(ve.current),lt&&(ve.current=setInterval(function(){Be?_*=Ke:et*=Ke;var ft=Math.floor(Be?_:et);(!le(Be,ft,!0)||Math.abs(ft)<=.1)&&clearInterval(ve.current)},16))}},Xe=function(){V.current=!1,Pe()},ce=function(Le){Pe(),Le.touches.length===1&&!V.current&&(V.current=!0,ie.current=Math.ceil(Le.touches[0].pageX),he.current=Math.ceil(Le.touches[0].pageY),Se.current=Le.target,Se.current.addEventListener("touchmove",q,{passive:!1}),Se.current.addEventListener("touchend",Xe,{passive:!0}))};Pe=function(){Se.current&&(Se.current.removeEventListener("touchmove",q),Se.current.removeEventListener("touchend",Xe))},(0,Ce.Z)(function(){return F&&we.current.addEventListener("touchstart",ce,{passive:!0}),function(){var Re;(Re=we.current)===null||Re===void 0||Re.removeEventListener("touchstart",ce),Pe(),clearInterval(ve.current)}},[F])}function J(F){return Math.floor(Math.pow(F,.5))}function U(F,we){var le="touches"in F?F.touches[0]:F;return le[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function ae(F,we,le){N.useEffect(function(){var V=we.current;if(F&&V){var ie=!1,he,Se,ve=function(){A.Z.cancel(he)},Pe=function Re(){ve(),he=(0,A.Z)(function(){le(Se),Re()})},q=function(Le){if(!(Le.target.draggable||Le.button!==0)){var Ee=Le;Ee._virtualHandled||(Ee._virtualHandled=!0,ie=!0)}},Xe=function(){ie=!1,ve()},ce=function(Le){if(ie){var Ee=U(Le,!1),Ye=V.getBoundingClientRect(),_=Ye.top,et=Ye.bottom;if(Ee<=_){var Be=_-Ee;Se=-J(Be),Pe()}else if(Ee>=et){var lt=Ee-et;Se=J(lt),Pe()}else ve()}};return V.addEventListener("mousedown",q),V.ownerDocument.addEventListener("mouseup",Xe),V.ownerDocument.addEventListener("mousemove",ce),function(){V.removeEventListener("mousedown",q),V.ownerDocument.removeEventListener("mouseup",Xe),V.ownerDocument.removeEventListener("mousemove",ce),ve()}}},[F])}var ne=10;function k(F,we,le,V,ie,he,Se,ve){var Pe=N.useRef(),q=N.useState(null),Xe=(0,p.Z)(q,2),ce=Xe[0],Re=Xe[1];return(0,Ce.Z)(function(){if(ce&&ce.times<ne){if(!F.current){Re(function(In){return(0,x.Z)({},In)});return}he();var Le=ce.targetAlign,Ee=ce.originAlign,Ye=ce.index,_=ce.offset,et=F.current.clientHeight,Be=!1,lt=Le,ft=null;if(et){for(var rn=Le||Ee,Zt=0,At=0,Dt=0,Xt=Math.min(we.length-1,Ye),Yt=0;Yt<=Xt;Yt+=1){var sn=ie(we[Yt]);At=Zt;var Cn=le.get(sn);Dt=At+(Cn===void 0?V:Cn),Zt=Dt}for(var un=rn==="top"?_:et-_,$n=Xt;$n>=0;$n-=1){var zn=ie(we[$n]),pn=le.get(zn);if(pn===void 0){Be=!0;break}if(un-=pn,un<=0)break}switch(rn){case"top":ft=At-_;break;case"bottom":ft=Dt-et+_;break;default:{var Ln=F.current.scrollTop,wn=Ln+et;At<Ln?lt="top":Dt>wn&&(lt="bottom")}}ft!==null&&Se(ft),ft!==ce.lastTop&&(Be=!0)}Be&&Re((0,x.Z)((0,x.Z)({},ce),{},{times:ce.times+1,targetAlign:lt,lastTop:ft}))}},[ce,F.current]),function(Le){if(Le==null){ve();return}if(A.Z.cancel(Pe.current),typeof Le=="number")Se(Le);else if(Le&&(0,H.Z)(Le)==="object"){var Ee,Ye=Le.align;"index"in Le?Ee=Le.index:Ee=we.findIndex(function(Be){return ie(Be)===Le.key});var _=Le.offset,et=_===void 0?0:_;Re({times:0,index:Ee,offset:et,originAlign:Ye})}}}var Ie=N.forwardRef(function(F,we){var le=F.prefixCls,V=F.rtl,ie=F.scrollOffset,he=F.scrollRange,Se=F.onStartMove,ve=F.onStopMove,Pe=F.onScroll,q=F.horizontal,Xe=F.spinSize,ce=F.containerSize,Re=F.style,Le=F.thumbStyle,Ee=F.showScrollBar,Ye=N.useState(!1),_=(0,p.Z)(Ye,2),et=_[0],Be=_[1],lt=N.useState(null),ft=(0,p.Z)(lt,2),rn=ft[0],Zt=ft[1],At=N.useState(null),Dt=(0,p.Z)(At,2),Xt=Dt[0],Yt=Dt[1],sn=!V,Cn=N.useRef(),un=N.useRef(),$n=N.useState(Ee),zn=(0,p.Z)($n,2),pn=zn[0],Ln=zn[1],wn=N.useRef(),In=function(){Ee===!0||Ee===!1||(clearTimeout(wn.current),Ln(!0),wn.current=setTimeout(function(){Ln(!1)},3e3))},xn=he-ce||0,dn=ce-Xe||0,Wn=N.useMemo(function(){if(ie===0||xn===0)return 0;var g=ie/xn;return g*dn},[ie,xn,dn]),Qt=function(T){T.stopPropagation(),T.preventDefault()},Nn=N.useRef({top:Wn,dragging:et,pageY:rn,startTop:Xt});Nn.current={top:Wn,dragging:et,pageY:rn,startTop:Xt};var Hn=function(T){Be(!0),Zt(U(T,q)),Yt(Nn.current.top),Se(),T.stopPropagation(),T.preventDefault()};N.useEffect(function(){var g=function(h){h.preventDefault()},T=Cn.current,W=un.current;return T.addEventListener("touchstart",g,{passive:!1}),W.addEventListener("touchstart",Hn,{passive:!1}),function(){T.removeEventListener("touchstart",g),W.removeEventListener("touchstart",Hn)}},[]);var Sr=N.useRef();Sr.current=xn;var pr=N.useRef();pr.current=dn,N.useEffect(function(){if(et){var g,T=function(h){var C=Nn.current,R=C.dragging,Q=C.pageY,B=C.startTop;A.Z.cancel(g);var $=Cn.current.getBoundingClientRect(),ue=ce/(q?$.width:$.height);if(R){var oe=(U(h,q)-Q)*ue,We=B;!sn&&q?We-=oe:We+=oe;var I=Sr.current,Z=pr.current,je=Z?We/Z:0,me=Math.ceil(je*I);me=Math.max(me,0),me=Math.min(me,I),g=(0,A.Z)(function(){Pe(me,q)})}},W=function(){Be(!1),ve()};return window.addEventListener("mousemove",T,{passive:!0}),window.addEventListener("touchmove",T,{passive:!0}),window.addEventListener("mouseup",W,{passive:!0}),window.addEventListener("touchend",W,{passive:!0}),function(){window.removeEventListener("mousemove",T),window.removeEventListener("touchmove",T),window.removeEventListener("mouseup",W),window.removeEventListener("touchend",W),A.Z.cancel(g)}}},[et]),N.useEffect(function(){return In(),function(){clearTimeout(wn.current)}},[ie]),N.useImperativeHandle(we,function(){return{delayHidden:In}});var on="".concat(le,"-scrollbar"),tt={position:"absolute",visibility:pn?null:"hidden"},Wt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return q?(Object.assign(tt,{height:8,left:0,right:0,bottom:0}),Object.assign(Wt,(0,K.Z)({height:"100%",width:Xe},sn?"left":"right",Wn))):(Object.assign(tt,(0,K.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(Wt,{width:"100%",height:Xe,top:Wn})),N.createElement("div",{ref:Cn,className:pe()(on,(0,K.Z)((0,K.Z)((0,K.Z)({},"".concat(on,"-horizontal"),q),"".concat(on,"-vertical"),!q),"".concat(on,"-visible"),pn)),style:(0,x.Z)((0,x.Z)({},tt),Re),onMouseDown:Qt,onMouseMove:In},N.createElement("div",{ref:un,className:pe()("".concat(on,"-thumb"),(0,K.Z)({},"".concat(on,"-thumb-moving"),et)),style:(0,x.Z)((0,x.Z)({},Wt),Le),onMouseDown:Hn}))}),Te=Ie,re=20;function De(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,le=F/we*F;return isNaN(le)&&(le=0),le=Math.max(le,re),Math.floor(le)}var de=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],yt=[],Tt={overflowY:"auto",overflowAnchor:"none"};function bt(F,we){var le=F.prefixCls,V=le===void 0?"rc-virtual-list":le,ie=F.className,he=F.height,Se=F.itemHeight,ve=F.fullHeight,Pe=ve===void 0?!0:ve,q=F.style,Xe=F.data,ce=F.children,Re=F.itemKey,Le=F.virtual,Ee=F.direction,Ye=F.scrollWidth,_=F.component,et=_===void 0?"div":_,Be=F.onScroll,lt=F.onVirtualScroll,ft=F.onVisibleChange,rn=F.innerProps,Zt=F.extraRender,At=F.styles,Dt=F.showScrollBar,Xt=Dt===void 0?"optional":Dt,Yt=(0,D.Z)(F,de),sn=N.useCallback(function(_e){return typeof Re=="function"?Re(_e):_e==null?void 0:_e[Re]},[Re]),Cn=pt(sn,null,null),un=(0,p.Z)(Cn,4),$n=un[0],zn=un[1],pn=un[2],Ln=un[3],wn=!!(Le!==!1&&he&&Se),In=N.useMemo(function(){return Object.values(pn.maps).reduce(function(_e,He){return _e+He},0)},[pn.id,pn.maps]),xn=wn&&Xe&&(Math.max(Se*Xe.length,In)>he||!!Ye),dn=Ee==="rtl",Wn=pe()(V,(0,K.Z)({},"".concat(V,"-rtl"),dn),ie),Qt=Xe||yt,Nn=(0,N.useRef)(),Hn=(0,N.useRef)(),Sr=(0,N.useRef)(),pr=(0,N.useState)(0),on=(0,p.Z)(pr,2),tt=on[0],Wt=on[1],g=(0,N.useState)(0),T=(0,p.Z)(g,2),W=T[0],d=T[1],h=(0,N.useState)(!1),C=(0,p.Z)(h,2),R=C[0],Q=C[1],B=function(){Q(!0)},$=function(){Q(!1)},ue={getKey:sn};function oe(_e){Wt(function(He){var ht;typeof _e=="function"?ht=_e(He):ht=_e;var gt=_t(ht);return Nn.current.scrollTop=gt,gt})}var We=(0,N.useRef)({start:0,end:Qt.length}),I=(0,N.useRef)(),Z=ee(Qt,sn),je=(0,p.Z)(Z,1),me=je[0];I.current=me;var Ze=N.useMemo(function(){if(!wn)return{scrollHeight:void 0,start:0,end:Qt.length-1,offset:void 0};if(!xn){var _e;return{scrollHeight:((_e=Hn.current)===null||_e===void 0?void 0:_e.offsetHeight)||0,start:0,end:Qt.length-1,offset:void 0}}for(var He=0,ht,gt,vn,Cr=Qt.length,Kn=0;Kn<Cr;Kn+=1){var jn=Qt[Kn],An=sn(jn),kn=pn.get(An),Mn=He+(kn===void 0?Se:kn);Mn>=tt&&ht===void 0&&(ht=Kn,gt=He),Mn>tt+he&&vn===void 0&&(vn=Kn),He=Mn}return ht===void 0&&(ht=0,gt=0,vn=Math.ceil(he/Se)),vn===void 0&&(vn=Qt.length-1),vn=Math.min(vn+1,Qt.length-1),{scrollHeight:He,start:ht,end:vn,offset:gt}},[xn,wn,tt,Qt,Ln,he]),Ne=Ze.scrollHeight,st=Ze.start,Y=Ze.end,se=Ze.offset;We.current.start=st,We.current.end=Y,N.useLayoutEffect(function(){var _e=pn.getRecord();if(_e.size===1){var He=Array.from(_e.keys())[0],ht=_e.get(He),gt=Qt[st];if(gt&&ht===void 0){var vn=sn(gt);if(vn===He){var Cr=pn.get(He),Kn=Cr-Se;oe(function(jn){return jn+Kn})}}}pn.resetRecord()},[Ne]);var Ae=N.useState({width:0,height:he}),nt=(0,p.Z)(Ae,2),Ue=nt[0],ot=nt[1],jt=function(He){ot({width:He.offsetWidth,height:He.offsetHeight})},Mt=(0,N.useRef)(),Ft=(0,N.useRef)(),$t=N.useMemo(function(){return De(Ue.width,Ye)},[Ue.width,Ye]),xt=N.useMemo(function(){return De(Ue.height,Ne)},[Ue.height,Ne]),qt=Ne-he,Ut=(0,N.useRef)(qt);Ut.current=qt;function _t(_e){var He=_e;return Number.isNaN(Ut.current)||(He=Math.min(He,Ut.current)),He=Math.max(He,0),He}var kt=tt<=0,Rt=tt>=qt,Ct=W<=0,zt=W>=Ye,wt=b(kt,Rt,Ct,zt),fn=function(){return{x:dn?-W:W,y:tt}},Pt=(0,N.useRef)(fn()),Ht=(0,S.useEvent)(function(_e){if(lt){var He=(0,x.Z)((0,x.Z)({},fn()),_e);(Pt.current.x!==He.x||Pt.current.y!==He.y)&&(lt(He),Pt.current=He)}});function an(_e,He){var ht=_e;He?((0,fe.flushSync)(function(){d(ht)}),Ht()):oe(ht)}function Gt(_e){var He=_e.currentTarget.scrollTop;He!==tt&&oe(He),Be==null||Be(_e),Ht()}var En=function(He){var ht=He,gt=Ye?Ye-Ue.width:0;return ht=Math.max(ht,0),ht=Math.min(ht,gt),ht},_n=(0,S.useEvent)(function(_e,He){He?((0,fe.flushSync)(function(){d(function(ht){var gt=ht+(dn?-_e:_e);return En(gt)})}),Ht()):oe(function(ht){var gt=ht+_e;return gt})}),Ot=O(wn,kt,Rt,Ct,zt,!!Ye,_n),at=(0,p.Z)(Ot,2),ut=at[0],en=at[1];Ge(wn,Nn,function(_e,He,ht,gt){var vn=gt;return wt(_e,He,ht)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),ut({preventDefault:function(){},deltaX:_e?He:0,deltaY:_e?0:He}),!0):!1}),ae(xn,Nn,function(_e){oe(function(He){return He+_e})}),(0,Ce.Z)(function(){function _e(ht){var gt=kt&&ht.detail<0,vn=Rt&&ht.detail>0;wn&&!gt&&!vn&&ht.preventDefault()}var He=Nn.current;return He.addEventListener("wheel",ut,{passive:!1}),He.addEventListener("DOMMouseScroll",en,{passive:!0}),He.addEventListener("MozMousePixelScroll",_e,{passive:!1}),function(){He.removeEventListener("wheel",ut),He.removeEventListener("DOMMouseScroll",en),He.removeEventListener("MozMousePixelScroll",_e)}},[wn,kt,Rt]),(0,Ce.Z)(function(){if(Ye){var _e=En(W);d(_e),Ht({x:_e})}},[Ue.width,Ye]);var tn=function(){var He,ht;(He=Mt.current)===null||He===void 0||He.delayHidden(),(ht=Ft.current)===null||ht===void 0||ht.delayHidden()},Vt=k(Nn,Qt,pn,Se,sn,function(){return zn(!0)},oe,tn);N.useImperativeHandle(we,function(){return{nativeElement:Sr.current,getScrollInfo:fn,scrollTo:function(He){function ht(gt){return gt&&(0,H.Z)(gt)==="object"&&("left"in gt||"top"in gt)}ht(He)?(He.left!==void 0&&d(En(He.left)),Vt(He.top)):Vt(He)}}}),(0,Ce.Z)(function(){if(ft){var _e=Qt.slice(st,Y+1);ft(_e,Qt)}},[st,Y,Qt]);var Nt=j(Qt,sn,pn,Se),ln=Zt==null?void 0:Zt({start:st,end:Y,virtual:xn,offsetX:W,offsetY:se,rtl:dn,getSize:Nt}),gn=qe(Qt,st,Y,Ye,W,$n,ce,ue),mn=null;he&&(mn=(0,x.Z)((0,K.Z)({},Pe?"height":"maxHeight",he),Tt),wn&&(mn.overflowY="hidden",Ye&&(mn.overflowX="hidden"),R&&(mn.pointerEvents="none")));var Tn={};return dn&&(Tn.dir="rtl"),N.createElement("div",(0,L.Z)({ref:Sr,style:(0,x.Z)((0,x.Z)({},q),{},{position:"relative"}),className:Wn},Tn,Yt),N.createElement(te.Z,{onResize:jt},N.createElement(et,{className:"".concat(V,"-holder"),style:mn,ref:Nn,onScroll:Gt,onMouseEnter:tn},N.createElement(G,{prefixCls:V,height:Ne,offsetX:W,offsetY:se,scrollWidth:Ye,onInnerResize:zn,ref:Hn,innerProps:rn,rtl:dn,extra:ln},gn))),xn&&Ne>he&&N.createElement(Te,{ref:Mt,prefixCls:V,scrollOffset:tt,scrollRange:Ne,rtl:dn,onScroll:an,onStartMove:B,onStopMove:$,spinSize:xt,containerSize:Ue.height,style:At==null?void 0:At.verticalScrollBar,thumbStyle:At==null?void 0:At.verticalScrollBarThumb,showScrollBar:Xt}),xn&&Ye>Ue.width&&N.createElement(Te,{ref:Ft,prefixCls:V,scrollOffset:W,scrollRange:Ye,rtl:dn,onScroll:an,onStartMove:B,onStopMove:$,spinSize:$t,containerSize:Ue.width,horizontal:!0,style:At==null?void 0:At.horizontalScrollBar,thumbStyle:At==null?void 0:At.horizontalScrollBarThumb,showScrollBar:Xt}))}var Je=N.forwardRef(bt);Je.displayName="List";var Et=Je,it=Et},16722:function(nn,xe,f){"use strict";f.d(xe,{Z:function(){return pe}});const L=te=>typeof te=="object"&&te!=null&&te.nodeType===1,H=(te,S)=>(!S||te!=="hidden")&&te!=="visible"&&te!=="clip",x=(te,S)=>{if(te.clientHeight<te.scrollHeight||te.clientWidth<te.scrollWidth){const Ce=getComputedStyle(te,null);return H(Ce.overflowY,S)||H(Ce.overflowX,S)||(N=>{const fe=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(G){return null}})(N);return!!fe&&(fe.clientHeight<N.scrollHeight||fe.clientWidth<N.scrollWidth)})(te)}return!1},K=(te,S,Ce,N,fe,Oe,G,Ve)=>Oe<te&&G>S||Oe>te&&G<S?0:Oe<=te&&Ve<=Ce||G>=S&&Ve>=Ce?Oe-te-N:G>S&&Ve<Ce||Oe<te&&Ve>Ce?G-S+fe:0,p=te=>{const S=te.parentElement;return S==null?te.getRootNode().host||null:S},D=(te,S)=>{var Ce,N,fe,Oe;if(typeof document=="undefined")return[];const{scrollMode:G,block:Ve,inline:qe,boundary:vt,skipOverflowHiddenElements:It}=S,ee=typeof vt=="function"?vt:Te=>Te!==vt;if(!L(te))throw new TypeError("Invalid target");const A=document.scrollingElement||document.documentElement,m=[];let c=te;for(;L(c)&&ee(c);){if(c=p(c),c===A){m.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,It)&&m.push(c)}const b=(N=(Ce=window.visualViewport)==null?void 0:Ce.width)!=null?N:innerWidth,O=(Oe=(fe=window.visualViewport)==null?void 0:fe.height)!=null?Oe:innerHeight,{scrollX:j,scrollY:M}=window,{height:ge,width:Me,top:ze,right:be,bottom:pt,left:Ke}=te.getBoundingClientRect(),{top:Ge,right:J,bottom:U,left:ae}=(Te=>{const re=window.getComputedStyle(Te);return{top:parseFloat(re.scrollMarginTop)||0,right:parseFloat(re.scrollMarginRight)||0,bottom:parseFloat(re.scrollMarginBottom)||0,left:parseFloat(re.scrollMarginLeft)||0}})(te);let ne=Ve==="start"||Ve==="nearest"?ze-Ge:Ve==="end"?pt+U:ze+ge/2-Ge+U,k=qe==="center"?Ke+Me/2-ae+J:qe==="end"?be+J:Ke-ae;const Ie=[];for(let Te=0;Te<m.length;Te++){const re=m[Te],{height:De,width:de,top:yt,right:Tt,bottom:bt,left:Je}=re.getBoundingClientRect();if(G==="if-needed"&&ze>=0&&Ke>=0&&pt<=O&&be<=b&&(re===A&&!x(re)||ze>=yt&&pt<=bt&&Ke>=Je&&be<=Tt))return Ie;const Et=getComputedStyle(re),it=parseInt(Et.borderLeftWidth,10),F=parseInt(Et.borderTopWidth,10),we=parseInt(Et.borderRightWidth,10),le=parseInt(Et.borderBottomWidth,10);let V=0,ie=0;const he="offsetWidth"in re?re.offsetWidth-re.clientWidth-it-we:0,Se="offsetHeight"in re?re.offsetHeight-re.clientHeight-F-le:0,ve="offsetWidth"in re?re.offsetWidth===0?0:de/re.offsetWidth:0,Pe="offsetHeight"in re?re.offsetHeight===0?0:De/re.offsetHeight:0;if(A===re)V=Ve==="start"?ne:Ve==="end"?ne-O:Ve==="nearest"?K(M,M+O,O,F,le,M+ne,M+ne+ge,ge):ne-O/2,ie=qe==="start"?k:qe==="center"?k-b/2:qe==="end"?k-b:K(j,j+b,b,it,we,j+k,j+k+Me,Me),V=Math.max(0,V+M),ie=Math.max(0,ie+j);else{V=Ve==="start"?ne-yt-F:Ve==="end"?ne-bt+le+Se:Ve==="nearest"?K(yt,bt,De,F,le+Se,ne,ne+ge,ge):ne-(yt+De/2)+Se/2,ie=qe==="start"?k-Je-it:qe==="center"?k-(Je+de/2)+he/2:qe==="end"?k-Tt+we+he:K(Je,Tt,de,it,we+he,k,k+Me,Me);const{scrollLeft:q,scrollTop:Xe}=re;V=Pe===0?0:Math.max(0,Math.min(Xe+V/Pe,re.scrollHeight-De/Pe+Se)),ie=ve===0?0:Math.max(0,Math.min(q+ie/ve,re.scrollWidth-de/ve+he)),ne+=Xe-V,k+=q-ie}Ie.push({el:re,top:V,left:ie})}return Ie},P=te=>te===!1?{block:"end",inline:"nearest"}:(S=>S===Object(S)&&Object.keys(S).length!==0)(te)?te:{block:"start",inline:"nearest"};function pe(te,S){if(!te.isConnected||!(fe=>{let Oe=fe;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(te))return;const Ce=(fe=>{const Oe=window.getComputedStyle(fe);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(te);if((fe=>typeof fe=="object"&&typeof fe.behavior=="function")(S))return S.behavior(D(te,S));const N=typeof S=="boolean"||S==null?void 0:S.behavior;for(const{el:fe,top:Oe,left:G}of D(te,P(S))){const Ve=Oe-Ce.top+Ce.bottom,qe=G-Ce.left+Ce.right;fe.scroll({top:Ve,left:qe,behavior:N})}}}}]);
|