(window.webpackJsonp=window.webpackJsonp||[]).push([[211,5,7,8,14],{"+NIl":function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){"use strict";te.defineMode("stex",function(Y,N){"use strict";function z(c,a){c.cmdState.push(a)}function P(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function F(c){var a=c.cmdState.pop();a&&a.closeBracket()}function G(c){for(var a=c.cmdState,p=a.length-1;p>=0;p--){var l=a[p];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function K(c,a,p){return function(){this.name=c,this.bracketNo=0,this.style=a,this.styles=p,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=K("importmodule","tag",["string","builtin"]),n.documentclass=K("documentclass","tag",["","atom"]),n.usepackage=K("usepackage","tag",["atom"]),n.begin=K("begin","tag",["atom"]),n.end=K("end","tag",["atom"]),n.label=K("label","tag",["atom"]),n.ref=K("ref","tag",["atom"]),n.eqref=K("eqref","tag",["atom"]),n.cite=K("cite","tag",["atom"]),n.bibitem=K("bibitem","tag",["atom"]),n.Bibitem=K("Bibitem","tag",["atom"]),n.RBibitem=K("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function I(c,a){c.f=a}function E(c,a){var p;if(c.match(/^\\[a-zA-Z@]+/)){var l=c.current().slice(1);return p=n.hasOwnProperty(l)?n[l]:n.DEFAULT,p=new p,z(a,p),I(a,b),p.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return I(a,function(s,i){return f(s,i,"\\]")}),"keyword";if(c.match("\\("))return I(a,function(s,i){return f(s,i,"\\)")}),"keyword";if(c.match("$$"))return I(a,function(s,i){return f(s,i,"$$")}),"keyword";if(c.match("$"))return I(a,function(s,i){return f(s,i,"$")}),"keyword";var u=c.next();if(u=="%")return c.skipToEnd(),"comment";if(u=="}"||u=="]"){if(p=P(a),p)p.closeBracket(u),I(a,b);else return"error";return"bracket"}else return u=="{"||u=="["?(p=n.DEFAULT,p=new p,z(a,p),"bracket"):/\d/.test(u)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),p=G(a),p.name=="begin"&&(p.argument=c.current()),p.styleIdentifier())}function f(c,a,p){if(c.eatSpace())return null;if(p&&c.match(p))return I(a,E),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=c.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(c.skipToEnd(),"comment"):"error"}function b(c,a){var p=c.peek(),l;return p=="{"||p=="["?(l=P(a),l.openBracket(p),c.eat(p),I(a,E),"bracket"):/[ \t\r]/.test(p)?(c.eat(p),null):(I(a,E),F(a),E(c,a))}return{startState:function(){var c=N.inMathMode?function(a,p){return f(a,p)}:E;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,a){return a.f(c,a)},blankLine:function(c){c.f=E,c.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},"+ua5":function(ct,ge,U){},"+vTd":function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___37CPQ",flex_space_between:"flex_space_between___1yzV5",flex_box_vertical_center:"flex_box_vertical_center___2QH_C",flex_box_center_end:"flex_box_center_end___22kLi",flex_box_column:"flex_box_column___1Y3On",line:"line___-rzSr",b1:"b1___1zz_c",b2:"b2___1dAOW",list:"list___1gpez",title:"title___21uOv",tr:"tr___3kTJL",itemDetail:"itemDetail___8QmqJ",answerWrapper:"answerWrapper___3guKO",decoration:"decoration___1rcYW",row:"row___3uQSh",typeRow:"typeRow___ADZSj",type:"type___2pfNZ",typeName:"typeName___8ZhPv",typeIcon:"typeIcon___1Xniv",unpublished:"unpublished___dTXTI",private:"private___XQiDx",public:"public___iIFou",reviewFlag:"reviewFlag___YP4vk",typeRightAction:"typeRightAction___1PQjp",actionLink:"actionLink___2E5q_",actionIcon:"actionIcon___GCvNK",topicTitle:"topicTitle___3fJds",topicTitleContent:"topicTitleContent___35cf9",judgmentContent:"judgmentContent___SU5rV",programContent:"programContent___3G6-D",otherContent:"otherContent___1JHnX",combinationContent:"combinationContent___6ZXO-",con:"con___1_qCl",otherContentItem:"otherContentItem___18WrV",otehrContentHtml:"otehrContentHtml___LW3nV",difficultyRow:"difficultyRow___3HvT0",updateTimeRow:"updateTimeRow___1dNd0",updateTimeWrap:"updateTimeWrap___2PKks",updateTimeContent:"updateTimeContent___1mNBy",programLanguage:"programLanguage___3CnaJ",updateTimeRowAction:"updateTimeRowAction___1DaMt",bottomAction:"bottomAction___Y-BNC",borderColorBlue:"borderColorBlue___2Xd-0",borderColorRed:"borderColorRed___2zA_q",borderColorFFF:"borderColorFFF___2R5-5",borderColorGray:"borderColorGray___nZnDe",selectIcon:"selectIcon___2byLd",colorGreen:"colorGreen___1iOKR",parseAnswerBorder:"parseAnswerBorder___1LTYn",answer:"answer___2L9lv",answerHtml:"answerHtml___3zrOk",parse:"parse___3d3dm",parseText:"parseText___1C_VL",parseAnswer:"parseAnswer___QMVPC",parseAnswerHtml:"parseAnswerHtml___2TCVz",actionBar:"actionBar___2ItMN",know:"know___y8QKK",menu:"menu___SYdg7",bottom:"bottom___2dFIa",textBtn:"textBtn___1y00f"}},"+z73":function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___3WSrc",flex_space_between:"flex_space_between___1fpCp",flex_box_vertical_center:"flex_box_vertical_center___3Wy8W",flex_box_center_end:"flex_box_center_end___3YIs2",flex_box_column:"flex_box_column___3CNwR",pWrap:"pWrap___2jVbQ",few:"few___3Eebn"}},"/cxE":function(ct,ge,U){"use strict";U.d(ge,"f",function(){return N}),U.d(ge,"g",function(){return z}),U.d(ge,"h",function(){return P}),U.d(ge,"e",function(){return G}),U.d(ge,"b",function(){return K}),U.d(ge,"c",function(){return n}),U.d(ge,"d",function(){return I}),U.d(ge,"a",function(){return E});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+` `+f.stack):f},0)}}emit(f){this.listeners.forEach(b=>{b(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const Y=new te;function N(f){G(f)||Y.onUnexpectedError(f);return}function z(f){G(f)||Y.onUnexpectedExternalError(f);return}function P(f){if(f instanceof Error){let{name:b,message:c}=f;const a=f.stacktrace||f.stack;return{$isError:!0,name:b,message:c,stack:a}}return f}const F="Canceled";function G(f){return f instanceof Error&&f.name===F&&f.message===F}function K(){const f=new Error(F);return f.name=f.message,f}function n(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function I(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class E extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"19Vz":function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){te.defineOption("placeholder","",function(K,n,I){var E=I&&I!=te.Init;if(n&&!E)K.on("blur",P),K.on("change",F),K.on("swapDoc",F),te.on(K.getInputField(),"compositionupdate",K.state.placeholderCompose=function(){z(K)}),F(K);else if(!n&&E){K.off("blur",P),K.off("change",F),K.off("swapDoc",F),te.off(K.getInputField(),"compositionupdate",K.state.placeholderCompose),Y(K);var f=K.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}n&&!K.hasFocus()&&P(K)});function Y(K){K.state.placeholder&&(K.state.placeholder.parentNode.removeChild(K.state.placeholder),K.state.placeholder=null)}function N(K){Y(K);var n=K.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=K.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var I=K.getOption("placeholder");typeof I=="string"&&(I=document.createTextNode(I)),n.appendChild(I),K.display.lineSpace.insertBefore(n,K.display.lineSpace.firstChild)}function z(K){setTimeout(function(){var n=!1,I=K.getInputField();I.nodeName=="TEXTAREA"?n=!I.value:K.lineCount()==1&&(n=!/[^\u200b]/.test(I.querySelector(".CodeMirror-line").textContent)),n?N(K):Y(K)},20)}function P(K){G(K)&&N(K)}function F(K){var n=K.getWrapperElement(),I=G(K);n.className=n.className.replace(" CodeMirror-empty","")+(I?" CodeMirror-empty":""),I?N(K):Y(K)}function G(K){return K.lineCount()===1&&K.getLine(0)===""}})},"1eCo":function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){"use strict";var Y={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},N={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(z,P){var F=z.indentUnit,G={},K=P.htmlMode?Y:N;for(var n in K)G[n]=K[n];for(var n in P)G[n]=P[n];var I,E;function f(d,C){function x(W){return C.tokenize=W,W(d,C)}var w=d.next();if(w=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?x(a("atom","]]>")):null:d.match("--")?x(a("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),x(p(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),C.tokenize=a("meta","?>"),"meta"):(I=d.eat("/")?"closeTag":"openTag",C.tokenize=b,"tag bracket");if(w=="&"){var j;return d.eat("#")?d.eat("x")?j=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):j=d.eatWhile(/[\d]/)&&d.eat(";"):j=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),j?"atom":"error"}else return d.eatWhile(/[^&<]/),null}f.isInText=!0;function b(d,C){var x=d.next();if(x==">"||x=="/"&&d.eat(">"))return C.tokenize=f,I=x==">"?"endTag":"selfcloseTag","tag bracket";if(x=="=")return I="equals",null;if(x=="<"){C.tokenize=f,C.state=i,C.tagName=C.tagStart=null;var w=C.tokenize(d,C);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(x)?(C.tokenize=c(x),C.stringStartCol=d.column(),C.tokenize(d,C)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(d){var C=function(x,w){for(;!x.eol();)if(x.next()==d){w.tokenize=b;break}return"string"};return C.isInAttribute=!0,C}function a(d,C){return function(x,w){for(;!x.eol();){if(x.match(C)){w.tokenize=f;break}x.next()}return d}}function p(d){return function(C,x){for(var w;(w=C.next())!=null;){if(w=="<")return x.tokenize=p(d+1),x.tokenize(C,x);if(w==">")if(d==1){x.tokenize=f;break}else return x.tokenize=p(d-1),x.tokenize(C,x)}return"meta"}}function l(d,C,x){this.prev=d.context,this.tagName=C,this.indent=d.indented,this.startOfLine=x,(G.doNotIndent.hasOwnProperty(C)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function u(d){d.context&&(d.context=d.context.prev)}function s(d,C){for(var x;;){if(!d.context)return;if(x=d.context.tagName,!G.contextGrabbers.hasOwnProperty(x)||!G.contextGrabbers[x].hasOwnProperty(C))return;u(d)}}function i(d,C,x){return d=="openTag"?(x.tagStart=C.column(),D):d=="closeTag"?A:i}function D(d,C,x){return d=="word"?(x.tagName=C.current(),E="tag",O):G.allowMissingTagName&&d=="endTag"?(E="tag bracket",O(d,C,x)):(E="error",D)}function A(d,C,x){if(d=="word"){var w=C.current();return x.context&&x.context.tagName!=w&&G.implicitlyClosed.hasOwnProperty(x.context.tagName)&&u(x),x.context&&x.context.tagName==w||G.matchClosing===!1?(E="tag",S):(E="tag error",R)}else return G.allowMissingTagName&&d=="endTag"?(E="tag bracket",S(d,C,x)):(E="error",R)}function S(d,C,x){return d!="endTag"?(E="error",S):(u(x),i)}function R(d,C,x){return E="error",S(d,C,x)}function O(d,C,x){if(d=="word")return E="attribute",g;if(d=="endTag"||d=="selfcloseTag"){var w=x.tagName,j=x.tagStart;return x.tagName=x.tagStart=null,d=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(w)?s(x,w):(s(x,w),x.context=new l(x,w,j==x.indented)),i}return E="error",O}function g(d,C,x){return d=="equals"?_:(G.allowMissing||(E="error"),O(d,C,x))}function _(d,C,x){return d=="string"?h:d=="word"&&G.allowUnquoted?(E="string",O):(E="error",O(d,C,x))}function h(d,C,x){return d=="string"?h:O(d,C,x)}return{startState:function(d){var C={tokenize:f,state:i,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(C.baseIndent=d),C},token:function(d,C){if(!C.tagName&&d.sol()&&(C.indented=d.indentation()),d.eatSpace())return null;I=null;var x=C.tokenize(d,C);return(x||I)&&x!="comment"&&(E=null,C.state=C.state(I||x,d,C),E&&(x=E=="error"?x+" error":E)),x},indent:function(d,C,x){var w=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+F;if(w&&w.noIndent)return te.Pass;if(d.tokenize!=b&&d.tokenize!=f)return x?x.match(/^(\s*)/)[0].length:0;if(d.tagName)return G.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+F*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/$/,blockCommentStart:"",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(d){d.state==_&&(d.state=O)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var C=[],x=d.context;x;x=x.prev)x.tagName&&C.push(x.tagName);return C.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1vnw":function(ct,ge,U){ct.exports={list:"list___1dAFk",btns:"btns___1YCLO",name:"name___2XX_F",folderWrapper:"folderWrapper___3sKHr",folderIcon:"folderIcon___Rov4k"}},"24hK":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return Y});class te{constructor(N){this.element=N,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class Y{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let N=this._first;for(;N!==te.Undefined;){const z=N.next;N.prev=te.Undefined,N.next=te.Undefined,N=z}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(N){return this._insert(N,!1)}push(N){return this._insert(N,!0)}_insert(N,z){const P=new te(N);if(this._first===te.Undefined)this._first=P,this._last=P;else if(z){const G=this._last;this._last=P,P.prev=G,G.next=P}else{const G=this._first;this._first=P,P.next=G,G.prev=P}this._size+=1;let F=!1;return()=>{F||(F=!0,this._remove(P))}}shift(){if(this._first===te.Undefined)return;{const N=this._first.element;return this._remove(this._first),N}}pop(){if(this._last===te.Undefined)return;{const N=this._last.element;return this._remove(this._last),N}}_remove(N){if(N.prev!==te.Undefined&&N.next!==te.Undefined){const z=N.prev;z.next=N.next,N.next.prev=z}else N.prev===te.Undefined&&N.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):N.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):N.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let N=this._first;for(;N!==te.Undefined;)yield N.element,N=N.next}}},"3/fG":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return Y});function te(N,z){let P;return z.length===0?P=N:P=N.replace(/\{(\d+)\}/g,function(F,G){const K=G[0];return typeof z[K]!="undefined"?z[K]:F}),P}function Y(N,z,...P){return te(z,P)}},"55Ip":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return s});var te=U("Ty5D"),Y=U("dI71"),N=U("q1tI"),z=U.n(N),P=U("YS25"),F=U("17x9"),G=U.n(F),K=U("wx14"),n=U("zLVn"),I=U("9R94"),E=function(_){Object(Y.a)(h,_);function h(){for(var C,x=arguments.length,w=new Array(x),j=0;j=0||x.relatedTarget.className.indexOf("".concat(T,"-next"))>=0))return;_.setState({goInputText:""}),W(_.getValidValue())},_.go=function(x){var w=_.state.goInputText;if(w==="")return;(x.keyCode===c.ENTER||x.type==="click")&&(_.setState({goInputText:""}),_.props.quickGo(_.getValidValue()))},_}return Object(P.a)(g,[{key:"getValidValue",value:function(){var h=this.state,d=h.goInputText,C=h.current;return!d||isNaN(d)?C:Number(d)}},{key:"getPageSizeOptions",value:function(){var h=this.props,d=h.pageSize,C=h.pageSizeOptions;return C.some(function(x){return x.toString()===d.toString()})?C:C.concat([d.toString()]).sort(function(x,w){var j=isNaN(Number(x))?0:Number(x),W=isNaN(Number(w))?0:Number(w);return j-W})}},{key:"render",value:function(){var h=this,d=this.props,C=d.pageSize,x=d.locale,w=d.rootPrefixCls,j=d.changeSize,W=d.quickGo,T=d.goButton,M=d.selectComponentClass,m=d.buildOptionText,v=d.selectPrefixCls,H=d.disabled,X=this.state.goInputText,q="".concat(w,"-options"),re=M,ye=null,pe=null,ue=null;if(!j&&!W)return null;var fe=this.getPageSizeOptions();if(j&&re){var be=fe.map(function(se,ae){return n.a.createElement(re.Option,{key:ae,value:se.toString()},(m||h.buildOptionText)(se))});ye=n.a.createElement(re,{disabled:H,prefixCls:v,showSearch:!1,className:"".concat(q,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||fe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},be)}return W&&(T&&(ue=typeof T=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:H,className:"".concat(q,"-quick-jumper-button")},x.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},T)),pe=n.a.createElement("div",{className:"".concat(q,"-quick-jumper")},x.jump_to,n.a.createElement("input",{disabled:H,type:"text",value:X,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),x.page,ue)),n.a.createElement("li",{className:"".concat(q)},ye,pe)}}]),g}(n.a.Component);a.defaultProps={pageSizeOptions:["10","20","50","100"]};var p=a,l=U("N2Kk");function u(){}function s(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function i(R,O,g){return g}function D(R,O,g){var _=typeof R=="undefined"?O.pageSize:R;return Math.floor((g.total-1)/_)+1}var A=function(R){Object(F.a)(g,R);var O=Object(G.a)(g);function g(_){var h;Object(z.a)(this,g),h=O.call(this,_),h.getJumpPrevPage=function(){return Math.max(1,h.state.current-(h.props.showLessItems?3:5))},h.getJumpNextPage=function(){return Math.min(D(void 0,h.state,h.props),h.state.current+(h.props.showLessItems?3:5))},h.getItemIcon=function(j,W){var T=h.props.prefixCls,M=j||n.a.createElement("button",{type:"button","aria-label":W,className:"".concat(T,"-item-link")});return typeof j=="function"&&(M=n.a.createElement(j,Object(N.a)({},h.props))),M},h.savePaginationNode=function(j){h.paginationNode=j},h.isValid=function(j){return s(j)&&j!==h.state.current},h.shouldDisplayQuickJumper=function(){var j=h.props,W=j.showQuickJumper,T=j.pageSize,M=j.total;return M<=T?!1:W},h.handleKeyDown=function(j){(j.keyCode===c.ARROW_UP||j.keyCode===c.ARROW_DOWN)&&j.preventDefault()},h.handleKeyUp=function(j){var W=h.getValidValue(j),T=h.state.currentInputValue;W!==T&&h.setState({currentInputValue:W}),j.keyCode===c.ENTER?h.handleChange(W):j.keyCode===c.ARROW_UP?h.handleChange(W-1):j.keyCode===c.ARROW_DOWN&&h.handleChange(W+1)},h.changePageSize=function(j){var W=h.state.current,T=D(j,h.state,h.props);W=W>T?T:W,T===0&&(W=h.state.current),typeof j=="number"&&("pageSize"in h.props||h.setState({pageSize:j}),"current"in h.props||h.setState({current:W,currentInputValue:W})),h.props.onShowSizeChange(W,j),"onChange"in h.props&&h.props.onChange&&h.props.onChange(W,j)},h.handleChange=function(j){var W=h.props.disabled,T=j;if(h.isValid(T)&&!W){var M=D(void 0,h.state,h.props);T>M?T=M:T<1&&(T=1),"current"in h.props||h.setState({current:T,currentInputValue:T});var m=h.state.pageSize;return h.props.onChange(T,m),T}return h.state.current},h.prev=function(){h.hasPrev()&&h.handleChange(h.state.current-1)},h.next=function(){h.hasNext()&&h.handleChange(h.state.current+1)},h.jumpPrev=function(){h.handleChange(h.getJumpPrevPage())},h.jumpNext=function(){h.handleChange(h.getJumpNextPage())},h.hasPrev=function(){return h.state.current>1},h.hasNext=function(){return h.state.current2?T-2:0),m=2;m=C?w=C:w=Number(d),w}},{key:"getShowSizeChanger",value:function(){var h=this.props,d=h.showSizeChanger,C=h.total,x=h.totalBoundaryShowSizeChanger;return typeof d!="undefined"?d:C>x}},{key:"renderPrev",value:function(h){var d=this.props,C=d.prevIcon,x=d.itemRender,w=x(h,"prev",this.getItemIcon(C,"prev page")),j=!this.hasPrev();return Object(K.isValidElement)(w)?Object(K.cloneElement)(w,{disabled:j}):w}},{key:"renderNext",value:function(h){var d=this.props,C=d.nextIcon,x=d.itemRender,w=x(h,"next",this.getItemIcon(C,"next page")),j=!this.hasNext();return Object(K.isValidElement)(w)?Object(K.cloneElement)(w,{disabled:j}):w}},{key:"render",value:function(){var h=this,d=this.props,C=d.prefixCls,x=d.className,w=d.style,j=d.disabled,W=d.hideOnSinglePage,T=d.total,M=d.locale,m=d.showQuickJumper,v=d.showLessItems,H=d.showTitle,X=d.showTotal,q=d.simple,re=d.itemRender,ye=d.showPrevNextJumpers,pe=d.jumpPrevIcon,ue=d.jumpNextIcon,fe=d.selectComponentClass,be=d.selectPrefixCls,se=d.pageSizeOptions,ae=this.state,Ce=ae.current,ze=ae.pageSize,Ye=ae.currentInputValue;if(W===!0&&T<=ze)return null;var He=D(void 0,this.state,this.props),Ve=[],Fe=null,Ke=null,nt=null,de=null,De=null,Ne=m&&m.goButton,Ue=v?1:2,rt=Ce-1>0?Ce-1:0,lt=Ce+1=Ue*2&&Ce!==1+2&&(Ve[0]=Object(K.cloneElement)(Ve[0],{className:"".concat(C,"-item-after-jump-prev")}),Ve.unshift(Fe)),He-Ce>=Ue*2&&Ce!==He-2&&(Ve[Ve.length-1]=Object(K.cloneElement)(Ve[Ve.length-1],{className:"".concat(C,"-item-before-jump-next")}),Ve.push(Ke)),kt!==1&&Ve.unshift(nt),Ot!==He&&Ve.push(de)}var xe=null;X&&(xe=n.a.createElement("li",{className:"".concat(C,"-total-text")},X(T,[T===0?0:(Ce-1)*ze+1,Ce*ze>T?T:Ce*ze])));var we=!this.hasPrev()||!He,me=!this.hasNext()||!He;return n.a.createElement("ul",Object(te.a)({className:E()(C,x,Object(Y.a)({},"".concat(C,"-disabled"),j)),style:w,unselectable:"unselectable",ref:this.savePaginationNode},ft),xe,n.a.createElement("li",{title:H?M.prev_page:null,onClick:this.prev,tabIndex:we?null:0,onKeyPress:this.runIfEnterPrev,className:E()("".concat(C,"-prev"),Object(Y.a)({},"".concat(C,"-disabled"),we)),"aria-disabled":we},this.renderPrev(rt)),Ve,n.a.createElement("li",{title:H?M.next_page:null,onClick:this.next,tabIndex:me?null:0,onKeyPress:this.runIfEnterNext,className:E()("".concat(C,"-next"),Object(Y.a)({},"".concat(C,"-disabled"),me)),"aria-disabled":me},this.renderNext(lt)),n.a.createElement(p,{disabled:j,locale:M,rootPrefixCls:C,selectComponentClass:fe,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ce,pageSize:ze,pageSizeOptions:se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ne}))}}],[{key:"getDerivedStateFromProps",value:function(h,d){var C={};if("current"in h&&(C.current=h.current,h.current!==d.current&&(C.currentInputValue=C.current)),"pageSize"in h&&h.pageSize!==d.pageSize){var x=d.current,w=D(h.pageSize,d,h);x=x>w?w:x,"current"in h||(C.current=x,C.currentInputValue=x),C.pageSize=h.pageSize}return C}}]),g}(n.a.Component);A.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:u,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:u,locale:l.a,style:{},itemRender:i,totalBoundaryShowSizeChanger:50};var S=A},"6UM0":function(ct,ge,U){var te,Y;(function(){var N;(function(){"use strict";var P=[function(n,I,E){var f=E(1).Beautifier,b=E(5).Options;function c(a,p){var l=new f(a,p);return l.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new b}},function(n,I,E){var f=E(2).Output,b=E(3).Token,c=E(4),a=E(5).Options,p=E(7).Tokenizer,l=E(7).line_starters,u=E(7).positionable_operators,s=E(7).TOKEN;function i(v,H){return H.indexOf(v)!==-1}function D(v){return v.replace(/^\s+/g,"")}function A(v){for(var H={},X=0;XX&&(X=v.line_indent_level));var q={mode:H,parent:v,last_token:v?v.last_token:new b(s.START_BLOCK,""),last_word:v?v.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:X,alignment:0,line_indent_level:v?v.line_indent_level:X,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},M.prototype._reset=function(v){var H=v.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var X=new p(v,this._options);return this._tokens=X.tokenize(),v},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var v,H=this._reset(this._source_text),X=this._options.eol;this._options.eol==="auto"&&(X=` `,H&&c.lineBreak.test(H||"")&&(X=H.match(c.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return v=this._output.get_code(X),v},M.prototype.handle_token=function(v,H){v.type===s.START_EXPR?this.handle_start_expr(v):v.type===s.END_EXPR?this.handle_end_expr(v):v.type===s.START_BLOCK?this.handle_start_block(v):v.type===s.END_BLOCK?this.handle_end_block(v):v.type===s.WORD?this.handle_word(v):v.type===s.RESERVED?this.handle_word(v):v.type===s.SEMICOLON?this.handle_semicolon(v):v.type===s.STRING?this.handle_string(v):v.type===s.EQUALS?this.handle_equals(v):v.type===s.OPERATOR?this.handle_operator(v):v.type===s.COMMA?this.handle_comma(v):v.type===s.BLOCK_COMMENT?this.handle_block_comment(v,H):v.type===s.COMMENT?this.handle_comment(v,H):v.type===s.DOT?this.handle_dot(v):v.type===s.EOF?this.handle_eof(v):v.type===s.UNKNOWN?this.handle_unknown(v,H):this.handle_unknown(v,H)},M.prototype.handle_whitespace_and_comments=function(v,H){var X=v.newlines,q=this._options.keep_array_indentation&&w(this._flags.mode);if(v.comments_before)for(var re=v.comments_before.next();re;)this.handle_whitespace_and_comments(re,H),this.handle_token(re,H),re=v.comments_before.next();if(q)for(var ye=0;ye0,H);else if(this._options.max_preserve_newlines&&X>this._options.max_preserve_newlines&&(X=this._options.max_preserve_newlines),this._options.preserve_newlines&&X>1){this.print_newline(!1,H);for(var pe=1;pe0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.set_mode=function(v){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,v),this._flags=this.create_flags(this._previous_flags,v),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(v){var H=!1;return H=H||R(this._flags.last_token,["var","let","const"])&&v.type===s.WORD,H=H||S(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&R(this._flags.last_token,m)&&!v.newlines,H=H||S(this._flags.last_token,"else")&&!(S(v,"if")&&!v.comments_before),H=H||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),H=H||this._flags.last_token.type===s.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(v.text==="--"||v.text==="++")&&this._last_last_text!=="function"&&v.type!==s.WORD&&v.type!==s.RESERVED,H=H||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),H?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(v,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v,R(v,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(v){this.start_of_statement(v)||this.handle_whitespace_and_comments(v);var H=d.Expression;if(v.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(v),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=d.ArrayLiteral,w(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),i(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=d.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=d.Conditional):i(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&v.whitespace_before===""?this._output.space_before_token=!1:(i(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var X=this._tokens.peek(-3);if(this._options.space_after_named_function&&X){var q=this._tokens.peek(-4);R(X,["async","function"])||X.text==="*"&&R(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(X.text==="{"||X.text===","||X.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(v);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&i(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(v,v.newlines),this.print_token(v),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(v){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(v),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(v,v.text==="]"&&w(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(v),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(v){this.handle_whitespace_and_comments(v);var H=this._tokens.peek(),X=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):X&&(i(X.text,[":",","])&&i(H.type,[s.STRING,s.WORD,s.RESERVED])||i(H.text,["get","set","..."])&&i(X.type,[s.WORD,s.RESERVED]))?i(this._last_last_text,["class","interface"])&&!i(X.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):i(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!H.comments_before&&H.text==="}",re=q&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var ye=0,pe=null;this._flags.inline_frame=!0;do if(ye+=1,pe=this._tokens.peek(ye-1),pe.newlines){this._flags.inline_frame=!1;break}while(pe.type!==s.EOF&&!(pe.type===s.END_BLOCK&&pe.opened===v))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&v.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(re||this._flags.last_token.type===s.EQUALS||R(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(w(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(v),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(v),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(v){for(this.handle_whitespace_and_comments(v);this._flags.mode===d.Statement;)this.restore_mode();var H=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(w(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(v)},M.prototype.handle_word=function(v){if(v.type===s.RESERVED){if(i(v.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)v.type=s.WORD;else if(v.text==="import"&&i(this._tokens.peek().text,["(","."]))v.type=s.WORD;else if(i(v.text,["as","from"])&&!this._flags.import_block)v.type=s.WORD;else if(this._flags.mode===d.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(v.type=s.WORD)}}if(this.start_of_statement(v)?R(this._flags.last_token,["var","let","const"])&&v.type===s.WORD&&(this._flags.declaration_statement=!0):v.newlines&&!j(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(v),this.print_newline()):this.handle_whitespace_and_comments(v),this._flags.do_block&&!this._flags.do_while)if(S(v,"while")){this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&S(v,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(v,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(v),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v)),S(v,"function")){(i(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(i(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!v.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,m)?this._output.space_before_token=!0:S(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(j(this._flags.mode)||w(this._flags.mode))||this.print_newline(),this.print_token(v),this._flags.last_word=v.text;return}var X="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?X="SPACE":R(v,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&v.newlines?X="NEWLINE":(X="SPACE",this._output.space_before_token=!0):X="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===d.BlockStatement?X="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&j(this._flags.mode)?X="SPACE":this._flags.last_token.type===s.STRING?X="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&i(this._last_last_text,["{",","]))?X="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?X="SPACE":X="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,X="NEWLINE"),R(v,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?X="SPACE":X="NEWLINE"),R(v,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&v.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else X==="NEWLINE"?R(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(v,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!R(v,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(v,"if")&&S(v.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(v,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&w(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():X==="SPACE"&&(this._output.space_before_token=!0);v.previous&&(v.previous.type===s.WORD||v.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(v),this._flags.last_word=v.text,v.type===s.RESERVED&&(v.text==="do"?this._flags.do_block=!0:v.text==="if"?this._flags.if_block=!0:v.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(v,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(v){this.start_of_statement(v)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(v);for(var H=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&S(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(v)},M.prototype.handle_string=function(v){v.text.startsWith("`")&&v.newlines===0&&v.whitespace_before===""&&(v.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(v)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(v),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(v):v.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(v.previous.text==="]"||v.previous.text===")")&&v.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(v)},M.prototype.handle_equals=function(v){this.start_of_statement(v)||this.handle_whitespace_and_comments(v),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0},M.prototype.handle_comma=function(v){this.handle_whitespace_and_comments(v,!0),this.print_token(v),this._output.space_before_token=!0,this._flags.declaration_statement?(j(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(v)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(v)},M.prototype.handle_operator=function(v){var H=v.text==="*"&&(R(this._flags.last_token,["function","yield"])||i(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),X=i(v.text,["-","+"])&&(i(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||i(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(v)){var q=!H;this.handle_whitespace_and_comments(v,q)}if(v.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(v);return}if(v.text==="::"){this.print_token(v);return}if(this._flags.last_token.type===s.OPERATOR&&i(this._options.operator_position,h)&&this.allow_wrap_or_preserved_newline(v),v.text===":"&&this._flags.in_case){this.print_token(v),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var re=!0,ye=!0,pe=!1;if(v.text===":"?this._flags.ternary_depth===0?re=!1:(this._flags.ternary_depth-=1,pe=!0):v.text==="?"&&(this._flags.ternary_depth+=1),!X&&!H&&this._options.preserve_newlines&&i(v.text,u)){var ue=v.text===":",fe=ue&&pe,be=ue&&!pe;switch(this._options.operator_position){case _.before_newline:this._output.space_before_token=!be,this.print_token(v),(!ue||fe)&&this.allow_wrap_or_preserved_newline(v),this._output.space_before_token=!0;return;case _.after_newline:this._output.space_before_token=!0,!ue||fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(v):this._output.space_before_token=!1,this.print_token(v),this._output.space_before_token=!0;return;case _.preserve_newline:be||this.allow_wrap_or_preserved_newline(v),re=!(this._output.just_added_newline()||be),this._output.space_before_token=re,this.print_token(v),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(v),re=!1;var se=this._tokens.peek();ye=se&&i(se.type,[s.WORD,s.RESERVED])}else if(v.text==="...")this.allow_wrap_or_preserved_newline(v),re=this._flags.last_token.type===s.START_BLOCK,ye=!1;else if(i(v.text,["--","++","!","~"])||X){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(v),re=!1,ye=!1,v.newlines&&(v.text==="--"||v.text==="++"||v.text==="~")){var ae=R(this._flags.last_token,O)&&v.newlines;ae&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ae,!0)}this._flags.last_token.text===";"&&j(this._flags.mode)&&(re=!0),this._flags.last_token.type===s.RESERVED?re=!0:this._flags.last_token.type===s.END_EXPR?re=!(this._flags.last_token.text==="]"&&(v.text==="--"||v.text==="++")):this._flags.last_token.type===s.OPERATOR&&(re=i(v.text,["--","-","++","+"])&&i(this._flags.last_token.text,["--","-","++","+"]),i(v.text,["+","-"])&&i(this._flags.last_token.text,["--","++"])&&(ye=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||re,this.print_token(v),this._output.space_before_token=ye},M.prototype.handle_block_comment=function(v,H){if(this._output.raw){this._output.add_raw_token(v),v.directives&&v.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(v.directives){this.print_newline(!1,H),this.print_token(v),v.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(v.text)&&!v.newlines){this._output.space_before_token=!0,this.print_token(v),this._output.space_before_token=!0;return}else this.print_block_commment(v,H)},M.prototype.print_block_commment=function(v,H){var X=x(v.text),q,re=!1,ye=!1,pe=v.whitespace_before,ue=pe.length;if(this.print_newline(!1,H),this.print_token_line_indentation(v),this._output.add_token(X[0]),this.print_newline(!1,H),X.length>1){for(X=X.slice(1),re=W(X,"*"),ye=T(X,pe),re&&(this._flags.alignment=1),q=0;q=0;c--)if(this.__items[c].match(b))return!0;return!1},I.prototype.set_indent=function(b,c){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},I.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(b){this.__items.push(b);var c=b.lastIndexOf(` `);c!==-1?this.__character_count=b.length-c:this.__character_count+=b.length},I.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function E(b,c){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),c=c||"",b.indent_level>0&&(c=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}E.prototype.get_indent_size=function(b,c){var a=this.__base_string_length;return c=c||0,b<0&&(a=0),a+=b*this.__indent_size,a+=c,a},E.prototype.get_indent_string=function(b,c){var a=this.__base_string;return c=c||0,b<0&&(b=0,a=""),c+=b*this.__indent_size,this.__ensure_cache(c),a+=this.__cache[c],a},E.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var b=this.__cache.length,c=0,a="";this.__indent_size&&b>=this.__indent_size&&(c=Math.floor(b/this.__indent_size),b-=c*this.__indent_size,a=new Array(c+1).join(this.__indent_string)),b&&(a+=new Array(b+1).join(" ")),this.__cache.push(a)};function f(b,c){this.__indent_cache=new E(b,c),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(b,c){return this.__indent_cache.get_indent_string(b,c)},f.prototype.get_indent_size=function(b,c){return this.__indent_cache.get_indent_size(b,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(b){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` `);return b!==` `&&(a=a.replace(/[\n]/g,b)),a},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(b,c){return b=b||0,c=c||0,this.next_line.set_indent(b,c),this.__lines.length>1?(this.current_line.set_indent(b,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(b){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(b,c){for(var a=this.__lines.length-2;a>=0;){var p=this.__lines[a];if(p.is_empty())break;if(p.item(0).indexOf(b)!==0&&p.item(-1)!==c){this.__lines.splice(a+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},n.exports.Output=f},function(n){function I(E,f,b,c){this.type=E,this.text=f,this.comments_before=null,this.newlines=b||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=I},function(n,I){var E="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",c="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",a="(?:\\\\u[0-9a-fA-F]{4}|["+E+b+"])",p="(?:\\\\u[0-9a-fA-F]{4}|["+f+b+c+"])*";I.identifier=new RegExp(a+p,"g"),I.identifierStart=new RegExp(a),I.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+b+c+"])+");var l=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;I.newline=/[\n\r\u2028\u2029]/,I.lineBreak=new RegExp(`\r |`+I.newline.source),I.allLineBreaks=new RegExp(I.lineBreak.source,"g")},function(n,I,E){var f=E(6).Options,b=["before-newline","after-newline","preserve-newline"];function c(a){f.call(this,a,"js");var p=this.raw_options.brace_style||null;p==="expand-strict"?this.raw_options.brace_style="expand":p==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var _=new RegExp(g),h="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=h.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+d.join("|")+")$"),x,w=function(W,T){b.call(this,W,T),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new l(this._input),m=new u(this._input).read_options(this._options);this.__patterns={template:m,identifier:m.starting_with(p.identifier).matching(p.identifierMatch),number:M.matching(A),punct:M.matching(_),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(//),include:M.starting_with(/#include/).until_after(p.lineBreak),shebang:M.starting_with(/#!/).until_after(p.lineBreak),xml:M.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:m.until(/['\\\n\r\u2028\u2029]/),double_quote:m.until(/["\\\n\r\u2028\u2029]/),template_text:m.until(/[`\\$]/),template_expression:m.until(/[`}\\]/)}};w.prototype=new b,w.prototype._is_comment=function(W){return W.type===i.COMMENT||W.type===i.BLOCK_COMMENT||W.type===i.UNKNOWN},w.prototype._is_opening=function(W){return W.type===i.START_BLOCK||W.type===i.START_EXPR},w.prototype._is_closing=function(W,T){return(W.type===i.END_BLOCK||W.type===i.END_EXPR)&&T&&(W.text==="]"&&T.text==="["||W.text===")"&&T.text==="("||W.text==="}"&&T.text==="{")},w.prototype._reset=function(){x=!1},w.prototype._get_next_token=function(W,T){var M=null;this._readWhitespace();var m=this._input.peek();return m===null?this._create_token(i.EOF,""):(M=M||this._read_non_javascript(m),M=M||this._read_string(m),M=M||this._read_word(W),M=M||this._read_singles(m),M=M||this._read_comment(m),M=M||this._read_regexp(m,W),M=M||this._read_xml(m,W),M=M||this._read_punctuation(),M=M||this._create_token(i.UNKNOWN,this._input.next()),M)},w.prototype._read_word=function(W){var T;if(T=this.__patterns.identifier.read(),T!=="")return T=T.replace(p.allLineBreaks,` `),!(W.type===i.DOT||W.type===i.RESERVED&&(W.text==="set"||W.text==="get"))&&C.test(T)?(T==="in"||T==="of")&&(W.type===i.WORD||W.type===i.STRING)?this._create_token(i.OPERATOR,T):this._create_token(i.RESERVED,T):this._create_token(i.WORD,T);if(T=this.__patterns.number.read(),T!=="")return this._create_token(i.WORD,T)},w.prototype._read_singles=function(W){var T=null;return W==="("||W==="["?T=this._create_token(i.START_EXPR,W):W===")"||W==="]"?T=this._create_token(i.END_EXPR,W):W==="{"?T=this._create_token(i.START_BLOCK,W):W==="}"?T=this._create_token(i.END_BLOCK,W):W===";"?T=this._create_token(i.SEMICOLON,W):W==="."&&R.test(this._input.peek(1))?T=this._create_token(i.DOT,W):W===","&&(T=this._create_token(i.COMMA,W)),T&&this._input.next(),T},w.prototype._read_punctuation=function(){var W=this.__patterns.punct.read();if(W!=="")return W==="="?this._create_token(i.EQUALS,W):W==="?."?this._create_token(i.DOT,W):this._create_token(i.OPERATOR,W)},w.prototype._read_non_javascript=function(W){var T="";if(W==="#"){if(this._is_first_token()&&(T=this.__patterns.shebang.read(),T))return this._create_token(i.UNKNOWN,T.trim()+` `);if(T=this.__patterns.include.read(),T)return this._create_token(i.UNKNOWN,T.trim()+` `);W=this._input.next();var M="#";if(this._input.hasNext()&&this._input.testChar(S)){do W=this._input.next(),M+=W;while(this._input.hasNext()&&W!=="#"&&W!=="=");return W==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(M+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(M+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,M)}this._input.back()}else if(W==="<"&&this._is_first_token()){if(T=this.__patterns.html_comment_start.read(),T){for(;this._input.hasNext()&&!this._input.testChar(p.newline);)T+=this._input.next();return x=!0,this._create_token(i.COMMENT,T)}}else if(x&&W==="-"&&(T=this.__patterns.html_comment_end.read(),T))return x=!1,this._create_token(i.COMMENT,T);return null},w.prototype._read_comment=function(W){var T=null;if(W==="/"){var M="";if(this._input.peek(1)==="*"){M=this.__patterns.block_comment.read();var m=D.get_directives(M);m&&m.ignore==="start"&&(M+=D.readIgnored(this._input)),M=M.replace(p.allLineBreaks,` `),T=this._create_token(i.BLOCK_COMMENT,M),T.directives=m}else this._input.peek(1)==="/"&&(M=this.__patterns.comment.read(),T=this._create_token(i.COMMENT,M))}return T},w.prototype._read_string=function(W){if(W==="`"||W==="'"||W==='"'){var T=this._input.next();return this.has_char_escapes=!1,W==="`"?T+=this._read_string_recursive("`",!0,"${"):T+=this._read_string_recursive(W),this.has_char_escapes&&this._options.unescape_strings&&(T=j(T)),this._input.peek()===W&&(T+=this._input.next()),T=T.replace(p.allLineBreaks,` `),this._create_token(i.STRING,T)}return null},w.prototype._allow_regexp_or_xml=function(W){return W.type===i.RESERVED&&s(W.text,["return","case","throw","else","do","typeof","yield"])||W.type===i.END_EXPR&&W.text===")"&&W.opened.previous.type===i.RESERVED&&s(W.opened.previous.text,["if","while","for"])||s(W.type,[i.COMMENT,i.START_EXPR,i.START_BLOCK,i.START,i.END_BLOCK,i.OPERATOR,i.EQUALS,i.EOF,i.SEMICOLON,i.COMMA])},w.prototype._read_regexp=function(W,T){if(W==="/"&&this._allow_regexp_or_xml(T)){for(var M=this._input.next(),m=!1,v=!1;this._input.hasNext()&&(m||v||this._input.peek()!==W)&&!this._input.testChar(p.newline);)M+=this._input.peek(),m?m=!1:(m=this._input.peek()==="\\",this._input.peek()==="["?v=!0:this._input.peek()==="]"&&(v=!1)),this._input.next();return this._input.peek()===W&&(M+=this._input.next(),M+=this._input.read(p.identifier)),this._create_token(i.STRING,M)}return null},w.prototype._read_xml=function(W,T){if(this._options.e4x&&W==="<"&&this._allow_regexp_or_xml(T)){var M="",m=this.__patterns.xml.read_match();if(m){for(var v=m[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=v.indexOf("{")===0,X=0;m;){var q=!!m[1],re=m[2],ye=!!m[m.length-1]||re.slice(0,8)==="![CDATA[";if(!ye&&(re===v||H&&re.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--X:++X),M+=m[0],X<=0)break;m=this.__patterns.xml.read_match()}return m||(M+=this._input.match(/[\s\S]*/g)[0]),M=M.replace(p.allLineBreaks,` `),this._create_token(i.STRING,M)}}return null};function j(W){for(var T="",M=0,m=new f(W),v=null;m.hasNext();)if(v=m.match(/([\s]|[^\\]|\\\\)+/g),v&&(T+=v[0]),m.peek()==="\\"){if(m.next(),m.peek()==="x")v=m.match(/x([0-9A-Fa-f]{2})/g);else if(m.peek()==="u")v=m.match(/u([0-9A-Fa-f]{4})/g);else{T+="\\",m.hasNext()&&(T+=m.next());continue}if(!v)return W;if(M=parseInt(v[1],16),M>126&&M<=255&&v[0].indexOf("x")===0)return W;if(M>=0&&M<32){T+="\\"+v[0];continue}else M===34||M===39||M===92?T+="\\"+String.fromCharCode(M):T+=String.fromCharCode(M)}return T}w.prototype._read_string_recursive=function(W,T,M){var m,v;W==="'"?v=this.__patterns.single_quote:W==='"'?v=this.__patterns.double_quote:W==="`"?v=this.__patterns.template_text:W==="}"&&(v=this.__patterns.template_expression);for(var H=v.read(),X="";this._input.hasNext();){if(X=this._input.next(),X===W||!T&&p.newline.test(X)){this._input.back();break}else X==="\\"&&this._input.hasNext()?(m=this._input.peek(),m==="x"||m==="u"?this.has_char_escapes=!0:m==="\r"&&this._input.peek(1)===` `&&this._input.next(),X+=this._input.next()):M&&(M==="${"&&X==="$"&&this._input.peek()==="{"&&(X+=this._input.next()),M===X&&(W==="`"?X+=this._read_string_recursive("}",T,"`"):X+=this._read_string_recursive("`",T,"${"),this._input.hasNext()&&(X+=this._input.next())));X+=v.read(),H+=X}return H},n.exports.Tokenizer=w,n.exports.TOKEN=i,n.exports.positionable_operators=O.slice(),n.exports.line_starters=h.slice()},function(n){var I=RegExp.prototype.hasOwnProperty("sticky");function E(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position=0&&f=0&&b=f.length&&this.__input.substring(b-f.length,b).toLowerCase()===f},n.exports.InputScanner=E},function(n,I,E){var f=E(8).InputScanner,b=E(3).Token,c=E(10).TokenStream,a=E(11).WhitespacePattern,p={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(u,s){this._input=new f(u),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var u,s=new b(p.START,""),i=null,D=[],A=new c;s.type!==p.EOF;){for(u=this._get_next_token(s,i);this._is_comment(u);)A.add(u),u=this._get_next_token(s,i);A.isEmpty()||(u.comments_before=A,A=new c),u.parent=i,this._is_opening(u)?(D.push(i),i=u):i&&this._is_closing(u,i)&&(u.opened=i,i.closed=u,i=D.pop(),u.parent=i),u.previous=s,s.next=u,this.__tokens.add(u),s=u}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(u,s){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(p.RAW,i):this._create_token(p.EOF,"")},l.prototype._is_comment=function(u){return!1},l.prototype._is_opening=function(u){return!1},l.prototype._is_closing=function(u,s){return!1},l.prototype._create_token=function(u,s){var i=new b(u,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return i},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=l,n.exports.TOKEN=p},function(n){function I(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}I.prototype.restart=function(){this.__position=0},I.prototype.isEmpty=function(){return this.__tokens_length===0},I.prototype.hasNext=function(){return this.__position=0&&E/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new f,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(a){var p=this._create();return p._disabled[a]=!0,p._update(),p},c.prototype.read_options=function(a){var p=this._create();for(var l in b)p._disabled[l]=a.templating.indexOf(l)===-1;return p._update(),p},c.prototype.exclude=function(a){var p=this._create();return p._excluded[a]=!0,p._update(),p},c.prototype.read=function(){var a="";this._match_pattern?a=this._input.read(this._starting_pattern):a=this._input.read(this._starting_pattern,this.__template_pattern);for(var p=this._read_template();p;)this._match_pattern?p+=this._input.read(this._match_pattern):p+=this._input.readUntil(this.__template_pattern),a+=p,p=this._read_template();return this._until_after&&(a+=this._input.readUntilAfter(this._until_pattern)),a},c.prototype.__set_templated_pattern=function(){var a=[];this._disabled.php||a.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||a.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||a.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(a.push(this.__patterns.django._starting_pattern.source),a.push(this.__patterns.django_value._starting_pattern.source),a.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||a.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&a.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+a.join("|")+")")},c.prototype._read_template=function(){var a="",p=this._input.peek();if(p==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(a=a||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(a=a||this.__patterns.erb.read())}else p==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(a=a||this.__patterns.handlebars_comment.read(),a=a||this.__patterns.handlebars_unescaped.read(),a=a||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(a=a||this.__patterns.django_value.read()),this._excluded.django||(a=a||this.__patterns.django_comment.read(),a=a||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(a=a||this.__patterns.smarty_comment.read(),a=a||this.__patterns.smarty_literal.read(),a=a||this.__patterns.smarty.read()));return a},n.exports.TemplatablePattern=c}],F={};function G(n){var I=F[n];if(I!==void 0)return I.exports;var E=F[n]={exports:{}};return P[n](E,E.exports,G),E.exports}var K=G(0);N=K})();var z=N;!(te=[],Y=function(){return{js_beautify:z}}.apply(ge,te),Y!==void 0&&(ct.exports=Y))})()},"746U":function(ct,ge,U){"use strict";U.d(ge,"f",function(){return te}),U.d(ge,"l",function(){return Y}),U.d(ge,"k",function(){return N}),U.d(ge,"j",function(){return z}),U.d(ge,"g",function(){return P}),U.d(ge,"m",function(){return F}),U.d(ge,"h",function(){return G}),U.d(ge,"n",function(){return K}),U.d(ge,"c",function(){return n}),U.d(ge,"a",function(){return I}),U.d(ge,"i",function(){return E}),U.d(ge,"o",function(){return f}),U.d(ge,"e",function(){return a}),U.d(ge,"d",function(){return p}),U.d(ge,"p",function(){return l}),U.d(ge,"b",function(){return u});function te(s){return Array.isArray(s)}function Y(s){return typeof s=="string"}function N(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function z(s){return typeof s=="number"&&!isNaN(s)}function P(s){return s===!0||s===!1}function F(s){return typeof s=="undefined"}function G(s){return!K(s)}function K(s){return F(s)||s===null}function n(s,i){if(!s)throw new Error(i?`Unexpected type, expected '${i}'`:"Unexpected type")}function I(s){if(K(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function E(s){return typeof s=="function"}function f(s,i){const D=Math.min(s.length,i.length);for(let A=0;Afunction(){const R=Array.prototype.slice.call(arguments,0);return i(S,R)};let A={};for(const S of s)A[S]=D(S);return A}function l(s){return s===null?void 0:s}function u(s,i="Unreachable"){throw new Error(i)}},"7Cbv":function(ct,ge,U){"use strict";var te=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Y=new Uint8Array(16);function N(){if(!te)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return te(Y)}var z=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function P(b){return typeof b=="string"&&z.test(b)}for(var F=P,G=[],K=0;K<256;++K)G.push((K+256).toString(16).substr(1));function n(b){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(G[b[c+0]]+G[b[c+1]]+G[b[c+2]]+G[b[c+3]]+"-"+G[b[c+4]]+G[b[c+5]]+"-"+G[b[c+6]]+G[b[c+7]]+"-"+G[b[c+8]]+G[b[c+9]]+"-"+G[b[c+10]]+G[b[c+11]]+G[b[c+12]]+G[b[c+13]]+G[b[c+14]]+G[b[c+15]]).toLowerCase();if(!F(a))throw TypeError("Stringified UUID is invalid");return a}var I=n;function E(b,c,a){b=b||{};var p=b.random||(b.rng||N)();if(p[6]=p[6]&15|64,p[8]=p[8]&63|128,c){a=a||0;for(var l=0;l<16;++l)c[a+l]=p[l];return c}return I(p)}var f=ge.a=E},"7ahc":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return D});var te=U("k1fw"),Y=U("0Owb"),N=U("+L6B"),z=U("2/Rp"),P=U("y8nQ"),F=U("Vl3Y"),G=U("tJVT"),K=U("OaEy"),n=U("2fM7"),I=U("q1tI"),E=U.n(I),f=U("VrN/"),b=U.n(f),c=U("p77/"),a=U.n(c),p=U("c5Ni"),l=U.n(p),u=n.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},i={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"]};ge.b=function(A){var S=A.callback,R=A.onCancel,O=Object(I.useState)("python"),g=Object(G.a)(O,2),_=g[0],h=g[1];function d(x){h(i[x][1])}function C(x){S(x)}return E.a.createElement(F.a,Object(Y.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),E.a.createElement(F.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.a.createElement(n.a,{onChange:d},Object.keys(i).map(function(x){return E.a.createElement(u,{key:x,value:x},i[x][0])}))),E.a.createElement(F.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.a.createElement(D,{mode:_})),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(z.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function D(A){var S=A.value,R=A.onChange,O=A.mode,g=A.options,_=g===void 0?{}:g,h=Object(I.useRef)(),d=Object(I.useState)(),C=Object(G.a)(d,2),x=C[0],w=C[1];return Object(I.useEffect)(function(){if(x){function j(W){var T=W.getValue();R&&R(T)}return x.on("change",j),function(){x.off("change",j)}}},[x,R]),Object(I.useEffect)(function(){x&&x.setOption("mode",O)},[x,O]),Object(I.useEffect)(function(){x&&((S!==x.getValue()||S==="")&&setTimeout(function(){x.setValue(S||" ")},300))},[x,S]),Object(I.useEffect)(function(){if(h.current&&!x){var j=b.a.fromTextArea(h.current,Object(te.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_));w(j)}},[h.current,x]),E.a.createElement("div",{className:"my-codemirror-container"},E.a.createElement("textarea",{ref:h}))}},"815F":function(ct,ge,U){"use strict";U.d(ge,"e",function(){return G}),U.d(ge,"c",function(){return n}),U.d(ge,"d",function(){return I}),U.d(ge,"a",function(){return f}),U.d(ge,"f",function(){return b}),U.d(ge,"b",function(){return c});var te=U("KQm4"),Y=U("VTBJ"),N=U("Ff2n"),z=U("Zm9Q"),P=U("Kwbf"),F=U("OZM5");function G(a,p){return a!=null?a:p}function K(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=new Map;function l(u){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(i){var D=i.key,A=i.children;Object(P.a)(D!=null,"Tree node must have a certain key: [".concat(s).concat(D,"]"));var S=String(D);Object(P.a)(!p.has(S)||D===null||D===void 0,"Same 'key' exist in the Tree: ".concat(S)),p.set(S,!0),l(A,"".concat(s).concat(S," > "))})}l(a)}function n(a){function p(l){var u=Object(z.a)(l);return u.map(function(s){if(!Object(F.i)(s))return Object(P.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var i=s.key,D=s.props,A=D.children,S=Object(N.a)(D,["children"]),R=Object(Y.a)({key:i},S),O=p(A);return O.length&&(R.children=O),R}).filter(function(s){return s})}return p(a)}function I(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(p===!0?[]:p),u=[];function s(i){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return i.map(function(A,S){var R=Object(F.h)(D?D.pos:"0",S),O=G(A.key,R),g=Object(Y.a)(Object(Y.a)({},A),{},{parent:D,pos:R,children:null,data:A,isStart:[].concat(Object(te.a)(D?D.isStart:[]),[S===0]),isEnd:[].concat(Object(te.a)(D?D.isEnd:[]),[S===i.length-1])});return u.push(g),p===!0||l.has(O)?g.children=s(A.children||[],g):g.children=[],g})}return s(a),u}function E(a,p,l){var u;l?typeof l=="string"?u=function(D){return D[l]}:typeof l=="function"&&(u=function(D){return l(D)}):u=function(D,A){return G(D.key,A)};function s(i,D,A){var S=i?i.children:a,R=i?Object(F.h)(A.pos,D):"0";if(i){var O=u(i,R),g={node:i,index:D,pos:R,key:O,parentPos:A.node?A.pos:null,level:A.level+1};p(g)}S&&S.forEach(function(_,h){s(_,h,{node:i,pos:R,level:A?A.level+1:-1})})}s(null)}function f(a){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=p.initWrapper,u=p.processEntity,s=p.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,D={},A={},S={posEntities:D,keyEntities:A};return l&&(S=l(S)||S),E(a,function(R){var O=R.node,g=R.index,_=R.pos,h=R.key,d=R.parentPos,C=R.level,x={node:O,index:g,key:h,pos:_,level:C},w=G(h,_);D[_]=x,A[w]=x,x.parent=D[d],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),u&&u(x,S)},i),s&&s(S),S}function b(a,p){var l=p.expandedKeys,u=p.selectedKeys,s=p.loadedKeys,i=p.loadingKeys,D=p.checkedKeys,A=p.halfCheckedKeys,S=p.dragOverNodeKey,R=p.dropPosition,O=p.keyEntities,g=O[a],_={eventKey:a,expanded:l.indexOf(a)!==-1,selected:u.indexOf(a)!==-1,loaded:s.indexOf(a)!==-1,loading:i.indexOf(a)!==-1,checked:D.indexOf(a)!==-1,halfChecked:A.indexOf(a)!==-1,pos:String(g?g.pos:""),dragOver:S===a&&R===0,dragOverGapTop:S===a&&R===-1,dragOverGapBottom:S===a&&R===1};return _}function c(a){var p=a.data,l=a.expanded,u=a.selected,s=a.checked,i=a.loaded,D=a.loading,A=a.halfChecked,S=a.dragOver,R=a.dragOverGapTop,O=a.dragOverGapBottom,g=a.pos,_=a.active,h=Object(Y.a)(Object(Y.a)({},p),{},{expanded:l,selected:u,checked:s,loaded:i,loading:D,halfChecked:A,dragOver:S,dragOverGapTop:R,dragOverGapBottom:O,pos:g,active:_});return"props"in h||Object.defineProperty(h,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),a}}),h}},"8EBN":function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){"use strict";te.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Y=0;Y-1&&z.substring(G+1,z.length);if(K)return te.findModeByExtension(K)},te.findModeByName=function(z){z=z.toLowerCase();for(var P=0;P=V.length?ne.slice(V.length):ne}).join(` `)}var l=[],u=["
    "],s=new c.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function D(){l.length=0,u=["
      "]}var A={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(Z,L,k,V){if(L>=Z.length||Z[L].level<=k)return L;var ne=Z[L];V.push("
    • "+ne.text+""),L++;var Q=[];return L=S(Z,L,ne.level,Q),Q.length>0&&(V.push("
        "),Q.forEach(function(Pe){V.push(Pe)}),V.push("
      ")),V.push("
    • "),L=S(Z,L,k,V),L}function R(){return S(l,0,0,u),u.push("
    "),u.join("")}var O={heading:function(L){var k=i.exec(L);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(L){var k=this.rules.block.fences.exec(L);if(k){var V=k[0],ne=p(V,k[3]||""),Q=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(Q)>=0){var Pe=h(),pt=ne;ne=Pe,d[Pe]={type:"block",expression:pt}}return{type:"code",raw:V,lang:Q,text:ne}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,h=function(){return"__special_katext_id_".concat(_++,"__")},d={};function C(){return d}function x(){_=0,d={}}function w(Z){return Z=Z.replace(g,function(L,k){var V=h();return d[V]={type:"inline",expression:k},V}),Z}var j=s.listitem;s.listitem=function(Z){return j(w(Z))};var W=s.paragraph;s.paragraph=function(Z){return W(w(Z))};var T=s.tablecell;s.tablecell=function(Z,L){return T(w(Z),L)},s.code=function(Z,L,k){var V=(L||"").match(/\S*/)[0];return V?["latex","katex","math"].indexOf(V)>=0?"

    ".concat(Z,"

    "):'
    ').concat(k?Z:Object(a.escape)(Z,!0),`
    `):'
    '+(k?Z:Object(a.escape)(Z,!0))+"
    "},s.heading=function(Z,L,k){var V=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:V,level:L,text:Z}),"'+Z+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:s});var M=c.a,m=U("SJMd"),v=U("ulZh"),H=U.n(v),X=U("m3rI"),q=U("Oy/b"),re=U("p5ED"),ye=U("ErOA");/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var pe=function(Z,L){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,V){k.__proto__=V}||function(k,V){for(var ne in V)Object.prototype.hasOwnProperty.call(V,ne)&&(k[ne]=V[ne])})(Z,L)};function ue(Z,L){function k(){this.constructor=Z}pe(Z,L),Z.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function fe(Z,L,k,V){return new(k||(k=Promise))(function(ne,Q){function Pe(rn){try{Lt(V.next(rn))}catch(vt){Q(vt)}}function pt(rn){try{Lt(V.throw(rn))}catch(vt){Q(vt)}}function Lt(rn){var vt;rn.done?ne(rn.value):(vt=rn.value,vt instanceof k?vt:new k(function(Gt){Gt(vt)})).then(Pe,pt)}Lt((V=V.apply(Z,L||[])).next())})}function be(Z,L){var k,V,ne,Q,Pe={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return Q={next:pt(0),throw:pt(1),return:pt(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function pt(Lt){return function(rn){return function(vt){if(k)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(k=1,V&&(ne=2&vt[0]?V.return:vt[0]?V.throw||((ne=V.return)&&ne.call(V),0):V.next)&&!(ne=ne.call(V,vt[1])).done)return ne;switch(V=0,ne&&(vt=[2&vt[0],ne.value]),vt[0]){case 0:case 1:ne=vt;break;case 4:return Pe.label++,{value:vt[1],done:!1};case 5:Pe.label++,V=vt[1],vt=[0];continue;case 7:vt=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ne=Pe.trys,(ne=ne.length>0&&ne[ne.length-1])||vt[0]!==6&&vt[0]!==2)){Pe=0;continue}if(vt[0]===3&&(!ne||vt[1]>ne[0]&&vt[1]',"select"),this.addActionButton(V,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(V,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(V,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(V,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(V,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(V,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(V,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Q){var Pe=document.createElement("div");Pe.className=""+k.toolbarButtonStyleClass.name,Pe.setAttribute("data-type-name",Q.typeName),Pe.innerHTML=Q.icon,Pe.addEventListener("click",function(){k.markerToolbarButtonClicked(Pe,Q)}),k.buttons.push(Pe),k.markerButtons.push(Pe)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ne),this.addActionButton(ne,'',"render"),this.addActionButton(ne,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Z.prototype.addButtonClickListener=function(L){this.buttonClickListeners.push(L)},Z.prototype.removeButtonClickListener=function(L){this.buttonClickListeners.indexOf(L)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(L),1)},Z.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Z.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var L=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var k=0;k0&&this.buttonClickListeners.forEach(function(V){return V("marker",k)}),this.markerButtonOverflowBlock.style.display="none"},Z.prototype.actionToolbarButtonClicked=function(L,k){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("action",k)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Z.prototype.setActiveButton=function(L){this.resetButtonStyles(),L.className=L.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),L.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Z.prototype.setActiveMarkerButton=function(L){var k=this.markerButtons.find(function(V){return V.getAttribute("data-type-name")===L});k&&this.setActiveButton(k)},Z.prototype.setCurrentMarker=function(L){var k=this;this.currentMarker=L,this.buttons.filter(function(V){return/delete|notes/.test(V.getAttribute("data-action"))}).forEach(function(V){k.currentMarker===void 0?(V.style.fillOpacity="0.4",V.style.pointerEvents="none"):(V.style.fillOpacity="1",V.style.pointerEvents="all")})},Z}(),nt=function(){function Z(L,k,V,ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=L,this.displayMode=k,this.uiStyleSettings=V,this.styles=ne,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Z.prototype.addStyles=function(){var L;this.toolboxStyleClass=this.styles.addClass(new Fe("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new Fe("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var k=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Fe("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Fe("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Fe("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Fe("toolbox-panel-row_colors",` background-color: `+((L=this.uiStyleSettings.toolboxBackgroundColor)!==null&&L!==void 0?L:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new Fe("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px; padding: `+k+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Fe("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Fe("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Ve("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Ve("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},Z.prototype.show=function(L){var k;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolboxStyleClass.name+" "+((k=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Z.prototype.setPanelButtons=function(L){var k,V,ne=this;this.panels=L,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var Pe;Q.uiStyleSettings=ne.uiStyleSettings;var pt=document.createElement("div");pt.className=ne.toolboxButtonStyleClass.name+" "+((Pe=ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:ne.toolboxButtonStyleColorsClass.name),pt.innerHTML=Q.icon,pt.title=Q.title,pt.addEventListener("click",function(){ne.panelButtonClick(Q)}),ne.panelButtons.push(pt),ne.buttonRow.appendChild(pt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Z.prototype.panelButtonClick=function(L){var k=this,V=-1;if(L!==this.activePanel){V=this.panels.indexOf(L),this.panelRow.innerHTML="";var ne=L.getUi();ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ne),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=L}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){k.displayMode==="inline"?k.panelRow.style.display="none":k.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,Pe){var pt,Lt;Q.className=k.toolboxButtonStyleClass.name+" "+(Pe===V?""+((pt=k.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&pt!==void 0?pt:k.toolboxActiveButtonStyleColorsClass.name):""+((Lt=k.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Lt!==void 0?Lt:k.toolboxButtonStyleColorsClass.name))})},Z}(),de=function(Z,L){this.title=Z,this.icon=L},De=function(Z){function L(k,V,ne,Q){var Pe=Z.call(this,k,Q||'')||this;return Pe.colors=[],Pe.addTransparent=!1,Pe.colorBoxes=[],Pe.colors=V,Pe.currentColor=ne,Pe.setCurrentColor=Pe.setCurrentColor.bind(Pe),Pe.getColorBox=Pe.getColorBox.bind(Pe),Pe}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.whiteSpace="nowrap",this.colors.forEach(function(ne){var Q=k.getColorBox(ne);V.appendChild(Q),k.colorBoxes.push(Q)}),V},L.prototype.getColorBox=function(k){var V=this,ne=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-ne,Pe=document.createElement("div");Pe.style.display="inline-block",Pe.style.boxSizing="content-box",Pe.style.width=Q-2+"px",Pe.style.height=Q-2+"px",Pe.style.padding="1px",Pe.style.marginRight="2px",Pe.style.marginBottom="2px",Pe.style.borderWidth="2px",Pe.style.borderStyle="solid",Pe.style.borderRadius=(Q+2)/2+"px",Pe.style.borderColor=k===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Pe.addEventListener("click",function(){V.setCurrentColor(k,Pe)});var pt=document.createElement("div");return pt.style.display="inline-block",pt.style.width=Q-2+"px",pt.style.height=Q-2+"px",pt.style.backgroundColor=k,pt.style.borderRadius=Q/2+"px",k==="transparent"&&(pt.style.fill=this.uiStyleSettings.toolboxAccentColor,pt.innerHTML=` `),Pe.appendChild(pt),Pe},L.prototype.setCurrentColor=function(k,V){var ne=this;this.currentColor=k,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},L}(de),Ne=function(){function Z(L,k,V){this._state="new",this._isSelected=!1,this._container=L,this._overlayContainer=k,this.globalSettings=V,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Z.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Z.prototype.ownsTarget=function(L){return!1},Object.defineProperty(Z.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Z.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Z.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Z.prototype.pointerDown=function(L,k){},Z.prototype.dblClick=function(L,k){},Z.prototype.manipulate=function(L){},Z.prototype.pointerUp=function(L){this.stateChanged()},Z.prototype.dispose=function(){},Z.prototype.addMarkerVisualToContainer=function(L){this.container.childNodes.length>0?this.container.insertBefore(L,this.container.childNodes[0]):this.container.appendChild(L)},Z.prototype.getState=function(){return{typeName:Z.typeName,state:this.state,notes:this.notes}},Z.prototype.restoreState=function(L){this._state=L.state,this.notes=L.notes},Z.prototype.scale=function(L,k){},Z.prototype.colorChanged=function(L){this.onColorChanged&&this.onColorChanged(L),this.stateChanged()},Z.prototype.fillColorChanged=function(L){this.onFillColorChanged&&this.onFillColorChanged(L),this.stateChanged()},Z.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var L=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),L.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(L)&&this.onStateChanged(this)}},Z.typeName="MarkerBase",Z}(),Ue=function(){function Z(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Z.prototype.findGripByVisual=function(L){return this.topLeft.ownsTarget(L)?this.topLeft:this.topCenter.ownsTarget(L)?this.topCenter:this.topRight.ownsTarget(L)?this.topRight:this.centerLeft.ownsTarget(L)?this.centerLeft:this.centerRight.ownsTarget(L)?this.centerRight:this.bottomLeft.ownsTarget(L)?this.bottomLeft:this.bottomCenter.ownsTarget(L)?this.bottomCenter:this.bottomRight.ownsTarget(L)?this.bottomRight:void 0},Z}(),rt=function(){function Z(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Z.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Z}(),lt=function(){function Z(){}return Z.toITransformMatrix=function(L){return{a:L.a,b:L.b,c:L.c,d:L.d,e:L.e,f:L.f}},Z.toSVGMatrix=function(L,k){return L.a=k.a,L.b=k.b,L.c=k.c,L.d=k.d,L.e=k.e,L.f=k.f,L},Z}(),ft=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.left=0,Q.top=0,Q.width=0,Q.height=0,Q.defaultSize={x:50,y:20},Q.offsetX=0,Q.offsetY=0,Q.rotationAngle=0,Q.CB_DISTANCE=10,Q._suppressMarkerCreateEvent=!1,Q.container.transform.baseVal.appendItem(ae.createTransform()),Q.setupControlBox(),Q}return ue(L,Z),Object.defineProperty(L.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var V=ae.createTransform();this._visual.transform.baseVal.appendItem(V)},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(k){return!!Z.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ne=this.unrotatePoint(k);if(this.manipulationStartX=ne.x,this.manipulationStartY=ne.y,this.offsetX=ne.x-this.left,this.offsetY=ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(V),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V)){this.activeGrip=this.rotatorGrip;var Q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Q.x-this.width/2,this.top=Q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},L.prototype.pointerUp=function(k){var V=this.state;Z.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",V==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},L.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},L.prototype.manipulate=function(k){var V=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(V.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(V.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(V):this.state==="rotate"&&this.rotate(k)},L.prototype.resize=function(k){var V=this.manipulationStartLeft,ne=this.manipulationStartWidth,Q=this.manipulationStartTop,Pe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:V=this.manipulationStartLeft+k.x-this.manipulationStartX,ne=this.manipulationStartWidth+this.manipulationStartLeft-V;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ne=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+k.y-this.manipulationStartY,Pe=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Pe=this.manipulationStartHeight+k.y-this.manipulationStartY}ne>=0?(this.left=V,this.width=ne):(this.left=V+ne,this.width=-ne),Pe>=0?(this.top=Q,this.height=Pe):(this.top=Q+Pe,this.height=-Pe),this.setSize()},L.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},L.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var V=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*V,this.applyRotation()}},L.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},L.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var V=this.container.getCTM(),ne=ae.createPoint(k.x,k.y);return{x:(ne=ne.matrixTransform(V)).x,y:ne.y}},L.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var V=this.container.getCTM();V=V.inverse();var ne=ae.createPoint(k.x,k.y);return{x:(ne=ne.matrixTransform(V)).x,y:ne.y}},L.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var k=ae.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=ae.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ae.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ue,this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},L.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},L.prototype.createGrip=function(){var k=new rt;return k.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,V=-k/2,ne=V,Q=(this.width+this.CB_DISTANCE)/2-k/2,Pe=(this.height+this.CB_DISTANCE)/2-k/2,pt=this.height+this.CB_DISTANCE-k/2,Lt=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,V,ne),this.positionGrip(this.controlGrips.topCenter.visual,Q,ne),this.positionGrip(this.controlGrips.topRight.visual,Lt,ne),this.positionGrip(this.controlGrips.centerLeft.visual,V,Pe),this.positionGrip(this.controlGrips.centerRight.visual,Lt,Pe),this.positionGrip(this.controlGrips.bottomLeft.visual,V,pt),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,pt),this.positionGrip(this.controlGrips.bottomRight.visual,Lt,pt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,ne-3*this.CB_DISTANCE)},L.prototype.positionGrip=function(k,V,ne){var Q=k.transform.baseVal.getItem(0);Q.setTranslate(V,ne),k.transform.baseVal.replaceItem(Q,0)},L.prototype.hideControlBox=function(){this.controlBox.style.display="none"},L.prototype.showControlBox=function(){this.controlBox.style.display=""},L.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:lt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:lt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Z.prototype.getState.call(this))},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k);var V=k;this.left=V.left,this.top=V.top,this.width=V.width,this.height=V.height,this.rotationAngle=V.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,V.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(lt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,V.containerTransformMatrix))},L.prototype.scale=function(k,V){Z.prototype.scale.call(this,k,V);var ne=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:ne.x*k,y:ne.y*V});this.left=Q.x,this.top=Q.y,this.width=this.width*k,this.height=this.height*V,this.adjustControlBox()},L}(Ne),at=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!(!Z.prototype.ownsTarget.call(this,k)&&k!==this.visual)},L.prototype.createVisual=function(){this.visual=ae.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.manipulate=function(k){Z.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Z.prototype.resize.call(this,k),this.setSize()},L.prototype.setSize=function(){Z.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){Z.prototype.pointerUp.call(this,k),this.setSize()},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},L.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Z.prototype.getState.call(this))},L.prototype.restoreState=function(k){var V=k;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),Z.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,V){Z.prototype.scale.call(this,k,V),this.setSize()},L.title="Rectangle marker",L}(ft),_t=function(Z){function L(k,V,ne,Q){var Pe=Z.call(this,k,Q||'')||this;return Pe.widths=[],Pe.widthBoxes=[],Pe.widths=V,Pe.currentWidth=ne,Pe.setCurrentWidth=Pe.setCurrentWidth.bind(Pe),Pe}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.widths.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.flexGrow="2",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=ne===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){k.setCurrentWidth(ne,Q)}),V.appendChild(Q);var Pe=document.createElement("div");Pe.innerText=ne.toString(),Pe.style.marginRight="5px",Q.appendChild(Pe);var pt=document.createElement("div");pt.style.minHeight="20px",pt.style.flexGrow="2",pt.style.display="flex",pt.style.alignItems="center";var Lt=document.createElement("hr");Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop=ne+"px solid "+k.uiStyleSettings.toolboxColor,Lt.style.flexGrow="2",pt.appendChild(Lt),Q.appendChild(pt),k.widthBoxes.push(Q)}),V},L.prototype.setCurrentWidth=function(k,V){var ne=this;this.currentWidth=k,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},L}(de),gt=function(Z){function L(k,V,ne,Q){var Pe=Z.call(this,k,Q||'')||this;return Pe.styles=[],Pe.styleBoxes=[],Pe.styles=V,Pe.currentStyle=ne,Pe.setCurrentStyle=Pe.setCurrentStyle.bind(Pe),Pe}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.styles.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/k.styles.length-5+"%",Q.style.borderColor=ne===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){k.setCurrentStyle(ne,Q)}),V.appendChild(Q);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.overflow="hidden";var pt=` `;Pe.innerHTML=pt,Q.appendChild(Pe),k.styleBoxes.push(Q)}),V},L.prototype.setCurrentStyle=function(k,V){var ne=this;this.currentStyle=k,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},L}(de),xt=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new De("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new _t("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new gt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return ue(L,Z),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Z.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="FrameMarker",L.title="Frame marker",L.icon='',L}(at),Ze=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},kt=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.x1=0,Q.y1=0,Q.x2=0,Q.y2=0,Q.defaultLength=50,Q.manipulationStartX=0,Q.manipulationStartY=0,Q.manipulationStartX1=0,Q.manipulationStartY1=0,Q.manipulationStartX2=0,Q.manipulationStartY2=0,Q.setupControlBox(),Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!!Z.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(V)?this.activeGrip=this.grip1:this.grip2.ownsTarget(V)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},L.prototype.pointerUp=function(k){var V=this.state;Z.prototype.pointerUp.call(this,k),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(k),this._state="select",V==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},L.prototype.adjustVisual=function(){},L.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},L.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},L.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){this.positionGrips()},L.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},L.prototype.createGrip=function(){var k=new rt;return k.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},L.prototype.positionGrip=function(k,V,ne){var Q=k.transform.baseVal.getItem(0);Q.setTranslate(V,ne),k.transform.baseVal.replaceItem(Q,0)},L.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Z.prototype.getState.call(this))},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k);var V=k;this.x1=V.x1,this.y1=V.y1,this.x2=V.x2,this.y2=V.y2},L.prototype.scale=function(k,V){Z.prototype.scale.call(this,k,V),this.x1=this.x1*k,this.y1=this.y1*V,this.x2=this.x2*k,this.y2=this.y2*V,this.adjustVisual(),this.adjustControlBox()},L}(Ne),Ot=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new De("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new _t("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new gt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!(!Z.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},L.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},L.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Z.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k);var V=k;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.createVisual(),this.adjustVisual()},L.typeName="LineMarker",L.title="Line marker",L.icon='',L}(kt),qe=function(Z){function L(k,V,ne,Q){var Pe=Z.call(this,k,Q||'')||this;return Pe.fonts=[],Pe.fontBoxes=[],Pe.fonts=V,Pe.currentFont=ne,Pe.setCurrentFont=Pe.setCurrentFont.bind(Pe),Pe}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.flexGrow="2",this.fonts.forEach(function(ne){var Q=document.createElement("div");Q.style.display="inline-block",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/k.fonts.length-5+"%",Q.style.borderColor=ne===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){k.setCurrentFont(ne,Q)}),V.appendChild(Q);var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.fontFamily=ne,Pe.style.overflow="hidden";var pt=document.createElement("div");pt.style.whiteSpace="nowrap",pt.style.overflow="hidden",pt.style.textOverflow="ellipsis",pt.innerHTML="The quick brown fox jumps over the lazy dog",Pe.appendChild(pt),Q.appendChild(Pe),k.fontBoxes.push(Q)}),V},L.prototype.setCurrentFont=function(k,V){var ne=this;this.currentFont=k,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},L}(de),st=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=ne.defaultColor,Q.fontFamily=ne.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setColor=Q.setColor.bind(Q),Q.setFont=Q.setFont.bind(Q),Q.renderText=Q.renderText.bind(Q),Q.sizeText=Q.sizeText.bind(Q),Q.textEditDivClicked=Q.textEditDivClicked.bind(Q),Q.showTextEditor=Q.showTextEditor.bind(Q),Q.setSize=Q.setSize.bind(Q),Q.positionTextEditor=Q.positionTextEditor.bind(Q),Q.colorPanel=new De("Color",ne.defaultColorSet,ne.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new qe("Font",ne.defaultFontFamilies,ne.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return ue(L,Z),L.prototype.ownsTarget=function(k){if(Z.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var V=!1;return this.textElement.childNodes.forEach(function(ne){ne===k&&(V=!0)}),V},L.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.renderText=function(){var k=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(V){k.textElement.appendChild(ae.createTSpan(V.trim()===""?" ":V.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},L.prototype.getTextScale=function(){var k=this.textElement.getBBox(),V=1;if(k.width>0&&k.height>0){var ne=(1*this.width-this.width*this.padding*2/100)/k.width,Q=(1*this.height-this.height*this.padding*2/100)/k.height;V=Math.min(ne,Q)}return V},L.prototype.getTextPosition=function(k){var V=this.textElement.getBBox(),ne=0,Q=0;return V.width>0&&V.height>0&&(ne=(this.width-V.width*k)/2,Q=this.height/2-V.height*k/2),{x:ne,y:Q}},L.prototype.sizeText=function(){var k=this.textElement.getBBox(),V=this.getTextScale(),ne=this.getTextPosition(V);ne.y-=k.y*V,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ne.x+"px, "+ne.y+"px) scale("+V+", "+V+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ne.x,ne.y),this.textElement.transform.baseVal.getItem(1).setScale(V,V))},L.prototype.manipulate=function(k){Z.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},L.prototype.resize=function(k){Z.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},L.prototype.setSize=function(){Z.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},L.prototype.pointerUp=function(k){var V=this.state;V==="creating"&&(this._suppressMarkerCreateEvent=!0),Z.prototype.pointerUp.call(this,k),this.setSize(),(V==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},L.prototype.showTextEditor=function(){var k=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(V){V.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var V=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&V>.9;)V-=.1,k.textEditor.style.fontSize=Math.max(V,.9)+"em"}),this.textEditor.addEventListener("keyup",function(V){V.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(V){if(V.clipboardData){var ne=V.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(ne)),V.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},L.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),V=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ne=this.textElement.getBBox(),Q={x:ne.width*k,y:ne.height*k};V.x-=Q.x/2,V.y-=Q.y/2,this.textEditor.style.top=V.y+"px",this.textEditor.style.left=V.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-V.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},L.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},L.prototype.select=function(){Z.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},L.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Z.prototype.deselect.call(this)},L.prototype.dblClick=function(k,V){Z.prototype.dblClick.call(this,k,V),this.showTextEditor()},L.prototype.setColor=function(k){this.textElement&&ae.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},L.prototype.setFont=function(k){this.textElement&&ae.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},L.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},L.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Z.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var V=k;this.color=V.color,this.fontFamily=V.fontFamily,this.padding=V.padding,this.text=V.text,this.createVisual(),Z.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,V){Z.prototype.scale.call(this,k,V),this.setSize(),this.sizeText(),this.positionTextEditor()},L.typeName="TextMarker",L.title="Text marker",L.icon='',L}(ft),xe=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=ne.defaultColor,Q.lineWidth=ne.defaultStrokeWidth,Q.pixelRatio=ne.freehandPixelRatio,Q.setColor=Q.setColor.bind(Q),Q.addCanvas=Q.addCanvas.bind(Q),Q.finishCreation=Q.finishCreation.bind(Q),Q.setLineWidth=Q.setLineWidth.bind(Q),Q.colorPanel=new De("Color",ne.defaultColorSet,ne.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new _t("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!(!Z.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},L.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var k=ae.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,V){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(k.x,k.y),this.drawing=!0):Z.prototype.pointerDown.call(this,k,V)},L.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Z.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Z.prototype.resize.call(this,k),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Z.prototype.pointerUp.call(this,k)},L.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},L.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.select.call(this)},L.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.deselect.call(this)},L.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),V=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ne=V[0],Q=V[1],Pe=V[2],pt=V[3],Lt=!1,rn=0;rn0&&(Lt=!0,rnpt&&(pt=rn),vt>Pe&&(Pe=vt));if(Lt){this.left=ne/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(Pe-ne)/this.pixelRatio,this.height=(pt-Q)/this.pixelRatio;var Gt=document.createElement("canvas");Gt.width=Pe-ne,Gt.height=pt-Q,Gt.getContext("2d").putImageData(this.canvasContext.getImageData(ne,Q,Pe-ne,pt-Q),0,0),this.drawingImgUrl=Gt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},L.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},L.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},L.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Z.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){this.createVisual(),Z.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},L.prototype.scale=function(k,V){Z.prototype.scale.call(this,k,V),this.setDrawingImage()},L.typeName="FreehandMarker",L.title="Freehand marker",L.icon='',L}(ft),we=function(Z){function L(k,V,ne){var Q=Z.call(this,k,ne||'')||this;return Q.typeBoxes=[],Q.currentType=V,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2";for(var ne=function(pt){var Lt="both";switch(pt){case 0:Lt="both";break;case 1:Lt="start";break;case 2:Lt="end";break;case 3:Lt="none"}var rn=document.createElement("div");if(rn.style.display="flex",rn.style.flexGrow="2",rn.style.alignItems="center",rn.style.justifyContent="space-between",rn.style.padding="5px",rn.style.borderWidth="2px",rn.style.borderStyle="solid",rn.style.borderColor=Lt===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",rn.addEventListener("click",function(){k.setCurrentType(Lt,rn)}),V.appendChild(rn),Lt==="both"||Lt==="start"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.innerHTML=` `,vt.style.marginLeft="5px",rn.appendChild(vt)}var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.style.flexGrow="2";var pr=document.createElement("hr");if(pr.style.minWidth="20px",pr.style.border="0px",pr.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),pr.style.flexGrow="2",Gt.appendChild(pr),rn.appendChild(Gt),Lt==="both"||Lt==="end"){var Ir=document.createElement("div");Ir.style.display="flex",Ir.style.alignItems="center",Ir.style.minHeight="20px",Ir.innerHTML=` `,Ir.style.marginRight="5px",rn.appendChild(Ir)}Q.typeBoxes.push(rn)},Q=this,Pe=0;Pe<4;Pe++)ne(Pe);return V},L.prototype.setCurrentType=function(k,V){var ne=this;this.currentType=k,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},L}(de),me=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.arrowType="end",Q.arrowBaseHeight=10,Q.arrowBaseWidth=10,Q.getArrowPoints=Q.getArrowPoints.bind(Q),Q.setArrowType=Q.setArrowType.bind(Q),Q.arrowTypePanel=new we("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!(!Z.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},L.prototype.getArrowPoints=function(k,V){var ne=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return k-ne/2+","+(V+Q/2)+" "+k+","+(V-Q/2)+" "+(k+ne/2)+","+(V+Q/2)},L.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(Z.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.arrow1.transform.baseVal.getItem(0);V.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(V,0);var ne=this.arrow2.transform.baseVal.getItem(0);ne.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ne,0)}},L.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Z.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k);var V=k;this.arrowType=V.arrowType,this.createTips(),this.adjustVisual()},L.typeName="ArrowMarker",L.title="Arrow marker",L.icon='',L}(Ot),ce=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.fillColor=ne.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new De("Color",ne.defaultColorSet,ne.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return ue(L,Z),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Z.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="CoverMarker",L.title="Cover marker",L.icon='',L}(at),he=function(Z){function L(k,V,ne,Q){var Pe=Z.call(this,k,Q||'')||this;return Pe.opacities=[],Pe.opacityBoxes=[],Pe.opacities=V,Pe.currentOpacity=ne,Pe.setCurrentOpacity=Pe.setCurrentOpacity.bind(Pe),Pe}return ue(L,Z),L.prototype.getUi=function(){var k=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",V.style.justifyContent="space-between",this.opacities.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="center",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=ne===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){k.setCurrentOpacity(ne,Q)}),V.appendChild(Q);var Pe=document.createElement("div");Pe.innerText=100*ne+"%",Q.appendChild(Pe),k.opacityBoxes.push(Q)}),V},L.prototype.setCurrentOpacity=function(k,V){var ne=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===V?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},L}(de),Te=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=ne.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=ne.defaultHighlightOpacity,Q.fillPanel=new De("Color",ne.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new he("Opacity",ne.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return ue(L,Z),L.prototype.setOpacity=function(k){this.opacity=k,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Z.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="HighlightMarker",L.title="Highlight marker",L.icon='',L}(ce),Re='',Me=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.bgColor="transparent",Q.tipPosition={x:0,y:0},Q.tipBase1Position={x:0,y:0},Q.tipBase2Position={x:0,y:0},Q.tipMoving=!1,Q.color=ne.defaultStrokeColor,Q.bgColor=ne.defaultFillColor,Q.fontFamily=ne.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setBgColor=Q.setBgColor.bind(Q),Q.getTipPoints=Q.getTipPoints.bind(Q),Q.positionTip=Q.positionTip.bind(Q),Q.setTipPoints=Q.setTipPoints.bind(Q),Q.colorPanel=new De("Text color",ne.defaultColorSet,Q.color,''),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new De("Fill color",ne.defaultColorSet,Q.bgColor,Re),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new qe("Font",ne.defaultFontFamilies,ne.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new rt,Q.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return Z.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},L.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},L.prototype.pointerDown=function(k,V){this.state==="new"&&Z.prototype.pointerDown.call(this,k,V),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(V)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Z.prototype.pointerDown.call(this,k,V)},L.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Z.prototype.pointerUp.call(this,k);else{var V=this.state==="creating";Z.prototype.pointerUp.call(this,k),this.setTipPoints(V),this.positionTip()}},L.prototype.manipulate=function(k){if(this.tipMoving){var V=this.unrotatePoint(k);this.tipPosition={x:V.x-this.manipulationStartLeft,y:V.y-this.manipulationStartTop},this.positionTip()}else Z.prototype.manipulate.call(this,k)},L.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",k]]),ae.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},L.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},L.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var V=Math.min(this.height/2,15),ne=this.height/5;k&&(this.tipPosition={x:V+ne/2,y:this.height+20});var Q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Q.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.tip1.transform.baseVal.getItem(0);V.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(V,0);var ne=this.tip2.transform.baseVal.getItem(0);ne.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ne,0)}},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Z.prototype.getState.call(this);return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},L.typeName="MeasurementMarker",L.title="Measurement marker",L.icon='',L}(Ot),Ut=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.strokePanel.colors=ne.defaultColorSet,Q.fillColor="transparent",Q}return ue(L,Z),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Z.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="EllipseFrameMarker",L.title="Ellipse frame marker",L.icon='',L}(et),nn=function(){function Z(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Z.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Z.prototype.addUndoStep=function(L){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(L)||(this.undoStack.push(L),JSON.stringify(this.lastRedoStep)!==JSON.stringify(L)&&this.redoStack.splice(0,this.redoStack.length))},Z.prototype.replaceLastUndoStep=function(L){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=L)},Z.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Z.prototype.undo=function(){if(this.undoStack.length>1){var L=this.undoStack.pop();return L!==void 0&&this.redoStack.push(L),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Z.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Z}(),en=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V,ne)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.curveX=0,Q.curveY=0,Q.manipulationStartCurveX=0,Q.manipulationStartCurveY=0,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.positionGrips=Q.positionGrips.bind(Q),Q.addControlGrips=Q.addControlGrips.bind(Q),Q.adjustVisual=Q.adjustVisual.bind(Q),Q.setupControlBox=Q.setupControlBox.bind(Q),Q.resize=Q.resize.bind(Q),Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new De("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new _t("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new gt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return ue(L,Z),L.prototype.ownsTarget=function(k){return!(!Z.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},L.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},L.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,V){Z.prototype.pointerDown.call(this,k,V),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(V)&&(this.activeGrip=this.curveGrip,this._state="resize")},L.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setupControlBox=function(){Z.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},L.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Z.prototype.addControlGrips.call(this)},L.prototype.positionGrips=function(){Z.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},L.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Z.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Z.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},L.prototype.scale=function(k,V){this.curveX=this.curveX*k,this.curveY=this.curveY*V,Z.prototype.scale.call(this,k,V)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Z.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Z.prototype.restoreState.call(this,k);var V=k;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.curveX=V.curveX,this.curveY=V.curveY,this.createVisual(),this.adjustVisual()},L.typeName="CurveMarker",L.title="Curve marker",L.icon='',L}(kt),mn=function(){function Z(L,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=L,this.cancelable=k}return Object.defineProperty(Z.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Z.prototype.preventDefault=function(){this._defaultPrevented=!0},Z}(),En=function(Z){function L(k,V,ne){var Q=Z.call(this,k,!1)||this;return Q.dataUrl=V,Q.state=ne,Q}return ue(L,Z),L}(mn),$t=function(Z){function L(k,V,ne){ne===void 0&&(ne=!1);var Q=Z.call(this,k,ne)||this;return Q.marker=V,Q}return ue(L,Z),L}(mn),rr=function(){function Z(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Z.prototype.addEventListener=function(L,k){this[L].push(k)},Z.prototype.removeEventListener=function(L,k){var V=this[L].indexOf(k);V>-1&&this[L].splice(V,1)},Z}(),Dn=function(){function Z(L){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ze,this._isOpen=!1,this.undoRedoManager=new nn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new rr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Z.instanceCounter++,this.styles=new He(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=L,this.targetRoot=document.body,this.width=L.clientWidth,this.height=L.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Z.prototype,"ALL_MARKER_TYPES",{get:function(){return[xt,xe,me,st,Ut,et,Te,Me,ht,ce,Ot,en]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[xt,xe,me,st,et,Te,Me]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"BASIC_MARKER_TYPES",{get:function(){return[xt,xe,me,st,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(L){var k=this;this._availableMarkerTypes.splice(0),L.forEach(function(V){if(typeof V=="string"){var ne=k.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===V});ne!==void 0&&k._availableMarkerTypes.push(ne)}else k._availableMarkerTypes.push(V)})},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(L){this._zoomLevel=L,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Z.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Z.prototype.show=function(){var L=this;this.styles.styleSheetRoot===void 0&&Ye.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ye.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new mn(L))})},Z.prototype.render=function(){return fe(this,void 0,void 0,function(){var L;return be(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(L=new ze).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.markersOnly=this.renderMarkersOnly,L.width=this.renderWidth,L.height=this.renderHeight,[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Z.prototype.close=function(L){var k=this;if(L===void 0&&(L=!1),this.isOpen){var V=!1;L||this.eventListeners.beforeclose.forEach(function(ne){var Q=new mn(k,!0);ne(Q),Q.defaultPrevented&&(V=!0)}),V||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ne){return ne(new mn(k))}),this.detachEvents(),this._isOpen=!1)}},Z.prototype.addMarkersToToolbar=function(){for(var L,k=[],V=0;Vthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*L:this.editorCanvas.clientWidth,V=k',L.title="Powered by marker.js",L.style.display="grid",L.style.alignItems="center",L.style.justifyItems="center",L.style.padding="3px",L.style.width="20px",L.style.height="20px",this.logoUI.appendChild(L),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Z.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Z.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Z.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Z.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ke(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(L),1),L.dispose()},Z.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Z.prototype.toolbarButtonClicked=function(L,k){if(L==="marker"&&k!==void 0)this.createNewMarker(k);else if(L==="action")switch(k){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Z.prototype.deleteSelectedMarker=function(){var L=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ne){var Q=new $t(L,L._currentMarker,!0);ne(Q),Q.defaultPrevented&&(k=!0)}),!k){var V=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ne){return ne(new $t(L,V))})}}},Z.prototype.clear=function(){var L=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Pe){var pt=new $t(L,void 0,!0);Pe(pt),pt.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var V=function(Pe){var pt=ne.markers[Pe];ne.setCurrentMarker(ne.markers[Pe]),ne._currentMarker.dispose(),ne.markerImage.removeChild(ne._currentMarker.container),ne.markers.splice(ne.markers.indexOf(ne._currentMarker),1),ne.eventListeners.markerdelete.forEach(function(Lt){return Lt(new $t(L,pt))})},ne=this,Q=this.markers.length-1;Q>=0;Q--)V(Q);this.addUndoStep()}},Object.defineProperty(Z.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Z.prototype.showNotesEditor=function(){var L;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(L=this._currentMarker.notes)!==null&&L!==void 0?L:"",this.overlayContainer.appendChild(this.notesArea))},Z.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Z.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Z.prototype.addUndoStep=function(){var L=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),V=this.undoRedoManager.getLastUndoStep();if(!V||V.width===k.width&&V.height===k.height){var ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),ne1&&this.panTo({x:L.clientX,y:L.clientY}))},Z.prototype.onPointerUp=function(L){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(L.clientX,L.clientY)),this.isDragging=!1,this.addUndoStep()},Z.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Z.prototype.onKeyUp=function(L){this._currentMarker===void 0||this.notesArea!==void 0||L.key!=="Delete"&&L.key!=="Backspace"||this.deleteSelectedMarker()},Z.prototype.clientToLocalCoordinates=function(L,k){var V=this.markerImage.getBoundingClientRect();return{x:(L-V.left)/this.zoomLevel,y:(k-V.top)/this.zoomLevel}},Z.prototype.onWindowResize=function(){this.positionUI()},Z.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Z.prototype.addLicenseKey=function(L){Ce.addKey(L)},Z.prototype.addEventListener=function(L,k){this.eventListeners.addEventListener(L,k)},Z.prototype.removeEventListener=function(L,k){this.eventListeners.removeEventListener(L,k)},Z.prototype.renderState=function(L){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(L),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Z.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Z.prototype.focus=function(){var L=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new mn(L))}))},Z.prototype.blur=function(){var L=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new mn(L))}))},Z.instanceCounter=0,Z}();/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE copyright Alan Mendelevich see README and LICENSE for details ********************************** *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Sr=function(Z,L){return(Sr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,V){k.__proto__=V}||function(k,V){for(var ne in V)Object.prototype.hasOwnProperty.call(V,ne)&&(k[ne]=V[ne])})(Z,L)};function br(Z,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function k(){this.constructor=Z}Sr(Z,L),Z.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function Pn(Z,L,k,V){return new(k||(k=Promise))(function(ne,Q){function Pe(rn){try{Lt(V.next(rn))}catch(vt){Q(vt)}}function pt(rn){try{Lt(V.throw(rn))}catch(vt){Q(vt)}}function Lt(rn){var vt;rn.done?ne(rn.value):(vt=rn.value,vt instanceof k?vt:new k(function(Gt){Gt(vt)})).then(Pe,pt)}Lt((V=V.apply(Z,L||[])).next())})}function Dr(Z,L){var k,V,ne,Q,Pe={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return Q={next:pt(0),throw:pt(1),return:pt(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function pt(Lt){return function(rn){return function(vt){if(k)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(k=1,V&&(ne=2&vt[0]?V.return:vt[0]?V.throw||((ne=V.return)&&ne.call(V),0):V.next)&&!(ne=ne.call(V,vt[1])).done)return ne;switch(V=0,ne&&(vt=[2&vt[0],ne.value]),vt[0]){case 0:case 1:ne=vt;break;case 4:return Pe.label++,{value:vt[1],done:!1};case 5:Pe.label++,V=vt[1],vt=[0];continue;case 7:vt=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ne=Pe.trys,(ne=ne.length>0&&ne[ne.length-1])||vt[0]!==6&&vt[0]!==2)){Pe=0;continue}if(vt[0]===3&&(!ne||vt[1]>ne[0]&&vt[1]0&&k>0){var V=new $r(L,k),ne=V.ratio>=1?20:V.getHorizontalLength(20),Q=V.ratio<1?20:V.getVerticalLength(20),Pe=document.createElementNS("http://www.w3.org/2000/svg","svg");Pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Pe);var pt=ln.createDefs();Pe.appendChild(pt);var Lt=ln.createElement("clipPath",[["id","text-bg-clip"]]);pt.appendChild(Lt);var rn=ln.createPath(ln.getHollowRectanglePath((24-ne)/2,(24-Q)/2,ne,Q,(24-ne)/2+2,(24-Q)/2+2,ne-4,Q-4));Pe.appendChild(rn);var vt=ln.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);vt.appendChild(ln.createTSpan(L+":"+k)),Pe.appendChild(vt);var Gt=vt.getBBox();ln.setAttributes(vt,[["x",((24-Gt.width)/2).toString()],["y",((24-Gt.height)/2-Gt.y).toString()]]);var pr=ln.createPath(ln.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Gt.width))/2,(24-Math.ceil(Gt.height))/2,Math.ceil(Gt.width),Math.ceil(Gt.height)));return Lt.appendChild(pr),ln.setAttributes(rn,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Pe),Pe.outerHTML}return''},Z}(),Lr=function(Z){function L(k,V,ne){var Q=Z.call(this,k,V)||this;return Q.isDropdownOpen=!1,Q.onClick=Q.dropdownButtonClicked,Q.dropdownButtons=ne,Q}return br(L,Z),L.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(V){V.className=k.className,V.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(V.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},L.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},L.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},L.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},L.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},L.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},L}(hn),kn=function(){function Z(L,k){this.GRIP_SIZE=10,this.color=L,this.fillColor=k,this.visual=ln.createGroup(),this.visual.appendChild(ln.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ln.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Z.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Z.prototype.setCenter=function(L,k){this.visual.childNodes.forEach(function(V){return ln.setAttributes(V,[["cx",L.toString()],["cy",k.toString()]])})},Z}(),Ur=function(){function Z(L,k,V,ne){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=L,this.canvasHeight=k,this.margin=V,this.container=ne,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Z.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(L){this._aspectRatio=L,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.gridContainer&&ln.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(L){this._zoomFactor=L,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Z.prototype.open=function(){var L=this;this.cropShadeElement=ln.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ln.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),ln.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var V=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Q,Pe){var pt=k.y+V*(Pe+1);ln.setAttributes(Q,[["x1",""+k.x],["y1",""+pt],["x2",""+(k.x+k.width)],["y2",""+pt]])});var ne=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Q,Pe){var pt=k.x+ne*(Pe+1);ln.setAttributes(Q,[["x1",""+pt],["y1",""+k.y],["x2",""+pt],["y2",""+(k.y+k.height)]])}),ln.setAttributes(this.cropShadeElement,[["d",ln.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Z.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Z.prototype.clientToLocalCoordinates=function(L,k){var V=this.container.getBoundingClientRect();return{x:L-V.left+this.margin,y:k-V.top+this.margin}},Z.prototype.onPointerDown=function(L){this.container.setPointerCapture(L.pointerId),this.previousPoint=this.clientToLocalCoordinates(L.clientX,L.clientY),this.cropRectElement===L.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(L.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(L.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(L.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(L.target)&&(this.activeGrip=this.bottomRightGrip)},Z.prototype.onPointerMove=function(L){if(this.isMoving)this.move(this.clientToLocalCoordinates(L.clientX,L.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(L.clientX,L.clientY);this.resize(k)}L.preventDefault()},Z.prototype.onPointerUp=function(L){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(L.pointerId)},Z.prototype.move=function(L){var k=L.x-this.previousPoint.x,V=L.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,V=-V/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+V),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=L},Z.prototype.resize=function(L){var k=Object.assign({},this.cropRect),V=L.x-this.previousPoint.x,ne=L.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Vthis.canvasWidth*this.zoomFactor&&(V=this.canvasWidth*this.zoomFactor-k.width),k.width+=V}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(V),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=ne,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=ne}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=L,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Z.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var L=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,V=this.aspectRatio.getHorizontalLength(this.cropRect.height),ne=this.aspectRatio.getVerticalLength(this.cropRect.width);V/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=L-this.cropRect.width/2,this.cropRect.y=k-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Z.prototype.getRescaledRect=function(L,k,V,ne,Q,Pe){var pt=V/L,Lt=ne/k;return{x:(Q.x-Pe)*pt+Pe,y:(Q.y-Pe)*Lt+Pe,width:Q.width*pt,height:Q.height*Lt}},Z.prototype.scaleCanvas=function(L,k){var V=this.getRescaledRect(this.canvasWidth,this.canvasHeight,L,k,this.cropRect,this.margin);this.canvasWidth=L,this.canvasHeight=k,this.onCropChange&&this.onCropChange(V),this.setCropRectangle(V)},Z}(),vi=function(){function Z(L){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=L,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Z.prototype,"angle",{get:function(){return this._angle},set:function(L){this._angle=L,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Z.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Z.prototype.onPointerDown=function(L){this.controlContainer.setPointerCapture(L.pointerId),this.isDragging=!0,this.previousPoint={x:L.clientX,y:L.clientY}},Z.prototype.onPointerMove=function(L){this.isDragging&&(this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.previousPoint.x=L.clientX)},Z.prototype.onPointerUp=function(L){this.isDragging&&this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(L.pointerId)},Z.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var L=this.angleLabelText.getBBox();ln.setAttributes(this.angleLabelElement,[["x",((this.width-L.width)/2).toString()],["y",(this.height/2).toString()]])}},Z.prototype.positionScaleShape=function(){if(this.scaleShape){var L=this.scaleShape.transform.baseVal.getItem(0);L.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(L,0)}},Z.prototype.getVisual=function(){var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.setAttribute("xmlns","http://www.w3.org/2000/svg"),L.setAttribute("width",this.width+"px"),L.setAttribute("height",this.height+"px"),L.setAttribute("viewBox","0 0 "+this.width+" "+this.height),L.style.flexShrink="0",document.body.appendChild(L);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,V=1;V<=this.width/5+10;V++){var ne=V%5==0?this.height/3:this.height/6;k+="h4v"+-ne+"h1v"+ne}k+="v1H0Z",this.scaleShape=ln.createPath(k);var Q=ln.createTransform();this.scaleShape.transform.baseVal.appendItem(Q),L.appendChild(this.scaleShape),this.angleLabelElement=ln.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ln.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Pe=ln.createTSpan("");return Pe.innerHTML="°",this.angleLabelElement.appendChild(Pe),L.appendChild(this.angleLabelElement),document.body.removeChild(L),L},Z}(),Ai=function(){function Z(){this.naturalSize=!1,this.imageType="image/png"}return Z.prototype.rasterize=function(L,k,V,ne,Q,Pe,pt){var Lt=this;return new Promise(function(rn){var vt=document.createElement("canvas");vt.width=L.width.baseVal.value-2*ne,vt.height=L.height.baseVal.value-2*ne;var Gt=1,pr=1;Lt.naturalSize===!0?(Gt=k.naturalWidth/(L.width.baseVal.value-2*ne)/Pe,pr=k.naturalHeight/(L.height.baseVal.value-2*ne)/pt,vt.width=k.naturalWidth/Pe,vt.height=k.naturalHeight/pt):Lt.width!==void 0&&Lt.height!==void 0&&(Gt=Lt.width/V.width,pr=Lt.height/V.height,vt.width*=Gt,vt.height*=pr);var Ir=vt.getContext("2d");Ir.translate(vt.width/2,vt.height/2),Ir.rotate(Q*Math.PI/180),Ir.scale(Pe,pt),Ir.translate(-vt.width/2,-vt.height/2),Ir.drawImage(k,0,0,vt.width,vt.height);var Zt=document.createElement("canvas");Zt.width=V.width*Gt,Zt.height=V.height*pr,Zt.getContext("2d").putImageData(Ir.getImageData((V.x-ne)*Gt,(V.y-ne)*pr,V.width*Gt,V.height*pr),0,0),rn(Zt.toDataURL(Lt.imageType,Lt.imageQuality))})},Z}(),Et=function(){function Z(L){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Z.instanceCounter++,this.styles=new Yr(this.instanceNo),this.target=L,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Z.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(L){this._zoomToCropEnabled=L,L?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"gridLines",{get:function(){return this._gridLines},set:function(L){this._gridLines=L,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(L){this._rotationAngle=L,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"aspectRatio",{get:function(){var L;return(L=this._aspectRatio)!==null&&L!==void 0?L:this.aspectRatios[0]},set:function(L){this._aspectRatio=L},enumerable:!1,configurable:!0}),Z.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Z.prototype.show=function(){this.showUI(),this.open()},Z.prototype.close=function(L){L===void 0&&(L=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),L||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Z.prototype.addRenderEventListener=function(L){this.renderEventListeners.push(L)},Z.prototype.removeRenderEventListener=function(L){this.renderEventListeners.indexOf(L)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(L),1)},Z.prototype.addCloseEventListener=function(L){this.closeEventListeners.push(L)},Z.prototype.removeCloseEventListener=function(L){this.closeEventListeners.indexOf(L)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(L),1)},Z.prototype.setupResizeObserver=function(){var L=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Z.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var L=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/L>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*L:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,V=k+2*this.CANVAS_MARGINL+this.CANVAS_MARGIN?this.target.offsetTop-(L+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Z.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Z.prototype.addTopToolbar=function(){var L=this;this.topToolbar=new Qn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new Nr;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var V=[];this.aspectRatios.forEach(function(pr){var Ir=new hn(fr.getIcon(pr.horizontal,pr.vertical),pr.horizontal===0&&pr.vertical===0?"FREE":pr.horizontal+":"+pr.vertical);Ir.onClick=function(){return L.ratioButtonClicked(pr)},V.push(Ir)}),this.aspectRatioButton=new Lr(fr.getIcon(0,0),"Aspect ratio",V),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ne=new hn('',"Toggle grid");ne.isActive=this.isGridVisible,ne.onClick=function(){L.isGridVisible=!L.isGridVisible,ne.isActive=L.isGridVisible},k.addButton(ne);var Q=new hn('',"Zoom to selection");if(Q.isActive=this.zoomToCropEnabled,Q.onClick=function(){L.zoomToCropEnabled=!L.zoomToCropEnabled,Q.isActive=L.zoomToCropEnabled},k.addButton(Q),!Or.isLicensed){var Pe=new Qt;this.topToolbar.addElementBlock(Pe);var pt=document.createElement("div");pt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Lt=document.createElement("a");Lt.style.color="currentColor",Lt.href="https://markerjs.com/products/cropro",Lt.target="_blank",Lt.innerHTML='',pt.appendChild(Lt),Pe.addElement(pt)}var rn=new Nr;rn.minWidth=3*this.toolbarHeight+"px",rn.contentAlign="end",this.topToolbar.addButtonBlock(rn);var vt=new hn('',"OK");vt.onClick=this.startRenderAndClose,rn.addButton(vt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(vt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Gt=new hn('',"Close");Gt.onClick=this.close,rn.addButton(Gt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Gt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Z.prototype.addBottomToolbar=function(){var L=this;this.bottomToolbar=new Qn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new Nr;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var V=new hn('',"Rotate left");V.onClick=this.rotateLeftButtonClicked,k.addButton(V);var ne=new hn('',"Rotate right");ne.onClick=this.rotateRightButtonClicked,k.addButton(ne);var Q=new Qt;Q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Q),this.straightener=new vi("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(rn){L.rotateBy(rn),L.straightener.angle=L.rotationAngle},Q.addElement(this.straightener.getUI());var Pe=new Nr;Pe.minWidth=2*this.toolbarHeight+"px",Pe.contentAlign="end",this.bottomToolbar.addButtonBlock(Pe);var pt=new hn('',"Flip horizontal");pt.onClick=this.flipHorizontallyButtonClicked,Pe.addButton(pt);var Lt=new hn('',"Flip vertical");Lt.onClick=this.flipVerticallyButtonClicked,Pe.addButton(Lt)},Z.prototype.ratioButtonClicked=function(L){this.aspectRatio=L,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Z.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=fr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Z.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new $r(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Z.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Z.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Z.prototype.restoreState=function(L){if(L){var k=this.cropLayer.getRescaledRect(L.width,L.height,this.imageWidth,this.imageHeight,L.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=L.flippedHorizontally,this.flippedVertically=L.flippedVertically,this.applyFlip(),this.rotationAngle=L.rotationAngle,this.applyRotation()}},Z.prototype.clientToLocalCoordinates=function(L,k){var V=this.cropImage.getBoundingClientRect();return{x:L-V.left,y:k-V.top}},Z.prototype.onWindowResize=function(){this.positionUI()},Z.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var L=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Z.prototype.rotateLeftButtonClicked=function(){var L=this.rotationAngle-90;this.rotationAngle%90!=0&&(L+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(L)},Z.prototype.rotateRightButtonClicked=function(){var L=this.rotationAngle+90;this.rotationAngle%90!=0&&(L-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(L)},Z.prototype.rotateTo=function(L){L=(L=L>180?L-360:L)<=-180?L+360:L,this.rotationAngle=L,this.applyRotation()},Z.prototype.rotateBy=function(L){this.rotateTo((this.rotationAngle+L)%360)},Z.prototype.applyRotation=function(){var L=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var V=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/V.width,this.imageHeight/V.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=L},Z.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Z.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Z.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Z.prototype.startRenderAndClose=function(){return Pn(this,void 0,void 0,function(){var L,k;return Dr(this,function(V){switch(V.label){case 0:return[4,this.render()];case 1:return L=V.sent(),k=this.getState(),this.renderEventListeners.forEach(function(ne){return ne(L,k)}),this.close(!0),[2]}})})},Z.prototype.render=function(){return Pn(this,void 0,void 0,function(){var L;return Dr(this,function(k){switch(k.label){case 0:return(L=new Ai).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.width=this.renderWidth,L.height=this.renderHeight,this.unzoomFromCrop(),ln.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,L.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return k.sent(),[4,L.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,k.sent()]}})})},Z.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new sn("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; flex-direction: row; justify-content: space-between; height: `+this.toolbarHeight+`px; box-sizing: content-box; overflow: hidden; line-height: 0px; `)),this.toolbarStyleColorsClass=this.styles.addClass(new sn("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new sn("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var L=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new sn("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*L)+`px; height: `+(this.toolbarHeight-2*L)+`px; padding: `+L+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new sn("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new sn("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new tn("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new tn("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new sn("toolbar_dropdown",` position: absolute; max-width: `+4*this.toolbarHeight+`px; z-index: 20; white-space: normal; box-sizing: content-box; box-shadow: 3px 3px rgba(33, 33, 33, 0.1); margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px; line-height: 0px; `)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new sn("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new sn("toolbar_straightener_block",` display: flex; overflow: hidden; justify-content: center; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%); `)),this.toolbarStraightenerStyleClass=this.styles.addClass(new sn("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*L)+`px; padding: `+L+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new sn("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},Z.instanceCounter=0,Z}(),fn=U("8hTe"),Gi=U.n(fn),zi=/]*>/g;function na(Z){var L=document.createElement("div");return L.innerHTML=Z,L.childNodes.length===0?"":L.childNodes[0].nodeValue}var Vi=ge.a=function(Z){var L=Z.value,k=L===void 0?"":L,V=Z.edit,ne=V===void 0?!1:V,Q=Z.className,Pe=Z.showTextOnly,pt=Z.showLines,Lt=Z.replaces,rn=Z.zoomImg,vt=Z.hasMask,Gt=Z.style,pr=Gt===void 0?{}:Gt,Ir=Z.stylesPrev,Zt=Ir===void 0?{}:Ir,mt=String(k),Pt=Object(I.useRef)(),Rt=Object(I.useRef)(),Ht=Object(I.useState)(""),un=Object(G.a)(Ht,2),xn=un[0],Cn=un[1],gn=Object(I.useState)("office"),Ln=Object(G.a)(gn,2),Kn=Ln[0],dn=Ln[1],Sn=function(){var jt=new Et(Rt.current);jt.displayMode="popup",jt.addRenderEventListener(function(){var yn=Object(F.a)(n.a.mark(function Ct(Mt){var Dt;return n.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Pt.current.style.display="none",Vt.next=3,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Mt}});case 3:Dt=Vt.sent,Dt!=null&&Dt.id&&Lt(Rt.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 5:case"end":return Vt.stop()}},Ct)}));return function(Ct){return yn.apply(this,arguments)}}()),jt.show()},hr=function(){var jt=new Dn(Rt.current);jt.settings.displayMode="popup",jt.addEventListener("render",function(){var yn=Object(F.a)(n.a.mark(function Ct(Mt){var Dt;return n.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(Pt.current.style.display="none",!Rt.current){Vt.next=6;break}return Vt.next=4,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Mt.dataUrl}});case 4:Dt=Vt.sent,Dt!=null&&Dt.id&&Lt(Rt.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 6:case"end":return Vt.stop()}},Ct)}));return function(Ct){return yn.apply(this,arguments)}}()),jt.show(),window.markerArea=jt},Nn=Object(I.useMemo)(function(){Pt.current&&(Pt.current.style.zIndex=-1);try{var zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,jt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;mt=mt.replace(zt,"("+X.a.API_SERVER+"/api/attachments/").replace(jt,'"'+X.a.API_SERVER+"/api/attachments/").replace(yn,'"'+X.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(ke){}var Ct=M(mt),Mt=C();if(mt.match(/\[TOC\]/)&&(Ct=Ct.replace("

    [TOC]

    ",R()),D()),Ct=Ct.replace(/(__special_katext_id_\d+__)/g,function(ke,Vt){var Tn=Mt[Vt],mr=Tn.type,On=Tn.expression;return Object(q.renderToString)(na(On)||"",{displayMode:mr==="block",throwOnError:!1,output:"html"})}),Ct=Ct.replace(/▁/g,"\u2581\u2581\u2581"),x(),Pe){var Dt=document.createElement("div");return Dt.innerHTML=Ct,Dt.innerText}return setTimeout(function(){return lr()},500),Ct},[mt]),Kt=Object(I.useRef)();A.WebkitLineClamp=pt,pt&&(pr=Object(P.a)(Object(P.a)({},pr),A));function An(zt){var jt=zt.target;if(jt.tagName.toUpperCase()==="IMG"){if(rn){var yn=jt.getAttribute("src");Cn(yn),dn("image")}}else if(jt.tagName.toUpperCase()==="A"){var Ct=jt.getAttribute("href");if(Ct.indexOf("office")>-1)zt.preventDefault(),Cn(Ct),dn("office");else if(Ct.indexOf("application/pdf")>-1)zt.preventDefault(),Cn(Ct),dn("pdf");else if(Ct.indexOf("text/html")>-1)zt.preventDefault(),Cn(Ct),dn("html");else if(Ct.startsWith("#")){zt.preventDefault();var Mt=document.getElementById(Ct.replace("#",""));Mt&&Mt.scrollIntoView(!0)}}}var lr=function(){var jt,yn=(jt=Kt.current)===null||jt===void 0?void 0:jt.querySelectorAll("video");yn==null||yn.forEach(function(Ct){if(Ct.oncontextmenu=function(){return!1},Ct.src.indexOf(".m3u8")>-1&&!Ct.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var Mt=new H.a;Mt.loadSource(Ct.src),Mt.attachMedia(Ct)}}})};Object(I.useEffect)(function(){if(Kt.current&&Nn&&(Nn.match(zi)&&window.PR.prettyPrint()),Kt.current)return Kt.current.addEventListener("click",An),function(){Kt.current.removeEventListener("click",An),x(),D()}},[Nn,Kt.current,An]);var Un=function(jt){if(!ne)return;jt.target.nodeName==="IMG"?(Pt.current.style.zIndex=1,Pt.current.style.display="flex",Pt.current.style.width=jt.target.clientWidth+"px",Pt.current.style.height=jt.target.clientHeight+"px",Pt.current.style.top=jt.target.offsetTop+"px",Pt.current.style.left=jt.target.offsetLeft+"px",Rt.current.src=jt.target.getAttribute("src")):Pt.current.style.display="none"};return E.a.createElement("div",{style:{position:"relative"}},E.a.createElement("div",{ref:Kt,style:Object(P.a)({},pr),className:"".concat(Q||""," markdown-body ").concat(Gi.a.mdBody),onMouseOver:Un,dangerouslySetInnerHTML:{__html:Nn}}),E.a.createElement("div",{ref:Pt,className:Gi.a.button},E.a.createElement(Y.a,null,E.a.createElement(z.a,{onClick:function(){return Sn()}},"\u88C1\u526A"),E.a.createElement(z.a,{onClick:function(){return hr()}},"\u7F16\u8F91"))),E.a.createElement("img",{ref:Rt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),E.a.createElement(re.a,{close:!0,data:xn,type:xn!=null&&xn.length?Kn:"",style:Object(P.a)({},Zt),onClose:function(){return Cn("")}}))}},"9VGf":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return N});var te=U("q1tI"),Y=U.n(te);function N(z,P){var F=Object(te.useRef)();Object(te.useEffect)(function(){F.current=z}),Object(te.useEffect)(function(){function G(){F.current()}if(P!==null){var K=setInterval(G,P);return function(){return clearInterval(K)}}},[P])}},"A60/":function(ct,ge,U){ct.exports={wrap:"wrap___37dvp",right20:"right20___2yZBe",right180:"right180___14fSn",basket:"basket___32ZdA",count:"count___2ydNT",iconWrap:"iconWrap___2cEp5",icon:"icon___3fYs3",name:"name___7IPYm"}},BU3w:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return F});var te=U("MNnm"),Y="rc-util-key";function N(G){if(G.attachTo)return G.attachTo;var K=document.querySelector("head");return K||document.body}function z(G){var K,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var I=document.createElement("style");if((K=n.csp)===null||K===void 0?void 0:K.nonce){var E;I.nonce=(E=n.csp)===null||E===void 0?void 0:E.nonce}I.innerHTML=G;var f=N(n),b=f.firstChild;return n.prepend&&f.prepend?f.prepend(I):n.prepend&&b?f.insertBefore(I,b):f.appendChild(I),I}var P=new Map;function F(G,K){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},I=N(n);if(!P.has(I)){var E=z("",n),f=E.parentNode;P.set(I,f),f.removeChild(E)}var b=Array.from(P.get(I).children).find(function(u){return u.tagName==="STYLE"&&u[Y]===K});if(b){var c,a;if(((c=n.csp)===null||c===void 0?void 0:c.nonce)&&b.nonce!==((a=n.csp)===null||a===void 0?void 0:a.nonce)){var p;b.nonce=(p=n.csp)===null||p===void 0?void 0:p.nonce}return b.innerHTML!==G&&(b.innerHTML=G),b}var l=z(G,n);return l[Y]=K,l}},Bd2K:function(ct,ge,U){(function(te){te(U("VrN/"),U("osHv"))})(function(te){te.defineOption("autoCloseTags",!1,function(n,I,E){if(E!=te.Init&&E&&n.removeKeyMap("autoCloseTags"),!I)return;var f={name:"autoCloseTags"};(typeof I!="object"||I.whenClosing!==!1)&&(f["'/'"]=function(b){return F(b)}),(typeof I!="object"||I.whenOpening!==!1)&&(f["'>'"]=function(b){return z(b)}),n.addKeyMap(f)});var Y=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],N=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function z(n){if(n.getOption("disableInput"))return te.Pass;for(var I=n.listSelections(),E=[],f=n.getOption("autoCloseTags"),b=0;bc.ch&&(s=s.slice(0,s.length-a.end+c.ch));var S=s.toLowerCase();if(!s||a.type=="string"&&(a.end!=c.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||a.string.length==1)||a.type=="tag"&&u.close||a.string.indexOf("/")==c.ch-a.start-1||D&&G(D,S)>-1||K(n,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(l)||[],s,c,!0))return te.Pass;var R=typeof f=="object"&&f.emptyTags;if(R&&G(R,s)>-1){E[b]={text:"/>",newPos:te.Pos(c.line,c.ch+2)};continue}var O=A&&G(A,S)>-1;E[b]={indent:O,text:">"+(O?` `:"")+"",newPos:O?te.Pos(c.line+1,0):te.Pos(c.line,c.ch+1)}}for(var g=typeof f=="object"&&f.dontIndentOnAutoClose,b=I.length-1;b>=0;b--){var _=E[b];n.replaceRange(_.text,I[b].head,I[b].anchor,"+insert");var h=n.listSelections().slice(0);h[b]={head:_.newPos,anchor:_.newPos},n.setSelections(h),!g&&_.indent&&(n.indentLine(_.newPos.line,null,!0),n.indentLine(_.newPos.line+1,null,!0))}}function P(n,I){for(var E=n.listSelections(),f=[],b=I?"/":""&&(D+=">"),f[p]=D}if(n.replaceSelections(f),E=n.listSelections(),!a)for(var p=0;p=0&&I[l]==E;l--)++p;f=a.to;for(var l=1;l0){for(var I=0;I1&&arguments[1]!==void 0?arguments[1]:"",I=[],E=0;EF,te.serviceIds.set(F,G),G}function P(F){return function(G,K,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");N(F,G,n,!0)}}},DlQD:function(ct,ge,U){(function(te,Y){ct.exports=Y()})(this,function(){"use strict";function te(xe,we){for(var me=0;mexe.length)&&(we=xe.length);for(var me=0,ce=new Array(we);me=xe.length?{done:!0}:{done:!1,value:xe[ce++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return me=xe[Symbol.iterator](),me.next.bind(me)}function F(xe,we){return we={exports:{}},xe(we,we.exports),we.exports}var G=F(function(xe){function we(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function me(ce){xe.exports.defaults=ce}xe.exports={defaults:we(),getDefaults:we,changeDefaults:me}}),K=G.defaults,n=G.getDefaults,I=G.changeDefaults,E=/[&<>"']/,f=/[&<>"']/g,b=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(we){return a[we]};function l(xe,we){if(we){if(E.test(xe))return xe.replace(f,p)}else if(b.test(xe))return xe.replace(c,p);return xe}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(xe){return xe.replace(u,function(we,me){return me=me.toLowerCase(),me==="colon"?":":me.charAt(0)==="#"?me.charAt(1)==="x"?String.fromCharCode(parseInt(me.substring(2),16)):String.fromCharCode(+me.substring(1)):""})}var i=/(^|[^\[])\^/g;function D(xe,we){xe=xe.source||xe,we=we||"";var me={replace:function(he,Te){return Te=Te.source||Te,Te=Te.replace(i,"$1"),xe=xe.replace(he,Te),me},getRegex:function(){return new RegExp(xe,we)}};return me}var A=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(xe,we,me){if(xe){var ce;try{ce=decodeURIComponent(s(me)).replace(A,"").toLowerCase()}catch(he){return null}if(ce.indexOf("javascript:")===0||ce.indexOf("vbscript:")===0||ce.indexOf("data:")===0)return null}we&&!S.test(me)&&(me=d(we,me));try{me=encodeURI(me).replace(/%25/g,"%")}catch(he){return null}return me}var O={},g=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(xe,we){O[" "+xe]||(g.test(xe)?O[" "+xe]=xe+"/":O[" "+xe]=j(xe,"/",!0)),xe=O[" "+xe];var me=xe.indexOf(":")===-1;return we.substring(0,2)==="//"?me?we:xe.replace(_,"$1")+we:we.charAt(0)==="/"?me?we:xe.replace(h,"$1")+we:xe+we}var C={exec:function(){}};function x(xe){for(var we=1,me,ce;we=0&&Me[ht]==="\\";)et=!et;return et?"|":" |"}),ce=me.split(/ \|/),he=0;if(ce.length>we)ce.splice(we);else for(;ce.length=ce.length?he.slice(ce.length):he}).join(` `)}var pe=function(){function xe(me){this.options=me||m}var we=xe.prototype;return we.space=function(ce){var he=this.rules.block.newline.exec(ce);if(he)return he[0].length>1?{type:"space",raw:he[0]}:{raw:` `}},we.code=function(ce,he){var Te=this.rules.block.code.exec(ce);if(Te){var Re=he[he.length-1];if(Re&&Re.type==="paragraph")return{raw:Te[0],text:Te[0].trimRight()};var Me=Te[0].replace(/^ {4}/gm,"");return{type:"code",raw:Te[0],codeBlockStyle:"indented",text:this.options.pedantic?Me:v(Me,` `)}}},we.fences=function(ce){var he=this.rules.block.fences.exec(ce);if(he){var Te=he[0],Re=ye(Te,he[3]||"");return{type:"code",raw:Te,lang:he[2]?he[2].trim():he[2],text:Re}}},we.heading=function(ce){var he=this.rules.block.heading.exec(ce);if(he)return{type:"heading",raw:he[0],depth:he[1].length,text:he[2]}},we.nptable=function(ce){var he=this.rules.block.nptable.exec(ce);if(he){var Te={type:"table",header:H(he[1].replace(/^ *| *\| *$/g,"")),align:he[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:he[3]?he[3].replace(/\n$/,"").split(` `):[],raw:he[0]};if(Te.header.length===Te.align.length){var Re=Te.align.length,Me;for(Me=0;Me ?/gm,"");return{type:"blockquote",raw:he[0],text:Te}}},we.list=function(ce){var he=this.rules.block.list.exec(ce);if(he){for(var Te=he[0],Re=he[2],Me=Re.length>1,et=Re[Re.length-1]===")",ht={type:"list",raw:Te,ordered:Me,start:Me?+Re.slice(0,-1):"",loose:!1,items:[]},Ut=he[0].match(this.rules.block.item),nn=!1,en,mn,En,$t,rr,Dn,Sr,br=Ut.length,Pn=0;Pn1||this.options.smartLists&&En!==Re)&&($t=Ut.slice(Pn+1).join(` `),ht.raw=ht.raw.substring(0,ht.raw.length-$t.length),Pn=br-1)),rr=nn||/\n\n(?!\s*$)/.test(en),Pn!==br-1&&(nn=en.charAt(en.length-1)===` `,rr||(rr=nn)),rr&&(ht.loose=!0),Dn=/^\[[ xX]\] /.test(en),Sr=void 0,Dn&&(Sr=en[1]!==" ",en=en.replace(/^\[[ xX]\] +/,"")),ht.items.push({type:"list_item",raw:Te,task:Dn,checked:Sr,loose:rr,text:en});return ht}},we.html=function(ce){var he=this.rules.block.html.exec(ce);if(he)return{type:this.options.sanitize?"paragraph":"html",raw:he[0],pre:!this.options.sanitizer&&(he[1]==="pre"||he[1]==="script"||he[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(he[0]):X(he[0]):he[0]}},we.def=function(ce){var he=this.rules.block.def.exec(ce);if(he){he[3]&&(he[3]=he[3].substring(1,he[3].length-1));var Te=he[1].toLowerCase().replace(/\s+/g," ");return{tag:Te,raw:he[0],href:he[2],title:he[3]}}},we.table=function(ce){var he=this.rules.block.table.exec(ce);if(he){var Te={type:"table",header:H(he[1].replace(/^ *| *\| *$/g,"")),align:he[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:he[3]?he[3].replace(/\n$/,"").split(` `):[]};if(Te.header.length===Te.align.length){Te.raw=he[0];var Re=Te.align.length,Me;for(Me=0;Me/i.test(Re[0])&&(he=!1),!Te&&/^<(pre|code|kbd|script)(\s|>)/i.test(Re[0])?Te=!0:Te&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Re[0])&&(Te=!1),{type:this.options.sanitize?"text":"html",raw:Re[0],inLink:he,inRawBlock:Te,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Re[0]):X(Re[0]):Re[0]}},we.link=function(ce){var he=this.rules.inline.link.exec(ce);if(he){var Te=q(he[2],"()");if(Te>-1){var Re=he[0].indexOf("!")===0?5:4,Me=Re+he[1].length+Te;he[2]=he[2].substring(0,Te),he[0]=he[0].substring(0,Me).trim(),he[3]=""}var et=he[2],ht="";if(this.options.pedantic){var Ut=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(et);Ut?(et=Ut[1],ht=Ut[3]):ht=""}else ht=he[3]?he[3].slice(1,-1):"";et=et.trim().replace(/^<([\s\S]*)>$/,"$1");var nn=re(he,{href:et&&et.replace(this.rules.inline._escapes,"$1"),title:ht&&ht.replace(this.rules.inline._escapes,"$1")},he[0]);return nn}},we.reflink=function(ce,he){var Te;if((Te=this.rules.inline.reflink.exec(ce))||(Te=this.rules.inline.nolink.exec(ce))){var Re=(Te[2]||Te[1]).replace(/\s+/g," ");if(Re=he[Re.toLowerCase()],!Re||!Re.href){var Me=Te[0].charAt(0);return{type:"text",raw:Me,text:Me}}var et=re(Te,Re,Te[0]);return et}},we.strong=function(ce,he,Te){Te===void 0&&(Te="");var Re=this.rules.inline.strong.start.exec(ce);if(Re&&(!Re[1]||Re[1]&&(Te===""||this.rules.inline.punctuation.exec(Te)))){he=he.slice(-1*ce.length);var Me=Re[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Me.lastIndex=0;for(var et;(Re=Me.exec(he))!=null;)if(et=this.rules.inline.strong.middle.exec(he.slice(0,Re.index+3)),et)return{type:"strong",raw:ce.slice(0,et[0].length),text:ce.slice(2,et[0].length-2)}}},we.em=function(ce,he,Te){Te===void 0&&(Te="");var Re=this.rules.inline.em.start.exec(ce);if(Re&&(!Re[1]||Re[1]&&(Te===""||this.rules.inline.punctuation.exec(Te)))){he=he.slice(-1*ce.length);var Me=Re[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Me.lastIndex=0;for(var et;(Re=Me.exec(he))!=null;)if(et=this.rules.inline.em.middle.exec(he.slice(0,Re.index+2)),et)return{type:"em",raw:ce.slice(0,et[0].length),text:ce.slice(1,et[0].length-1)}}},we.codespan=function(ce){var he=this.rules.inline.code.exec(ce);if(he){var Te=he[2].replace(/\n/g," "),Re=/[^ ]/.test(Te),Me=Te.startsWith(" ")&&Te.endsWith(" ");return Re&&Me&&(Te=Te.substring(1,Te.length-1)),Te=X(Te,!0),{type:"codespan",raw:he[0],text:Te}}},we.br=function(ce){var he=this.rules.inline.br.exec(ce);if(he)return{type:"br",raw:he[0]}},we.del=function(ce){var he=this.rules.inline.del.exec(ce);if(he)return{type:"del",raw:he[0],text:he[1]}},we.autolink=function(ce,he){var Te=this.rules.inline.autolink.exec(ce);if(Te){var Re,Me;return Te[2]==="@"?(Re=X(this.options.mangle?he(Te[1]):Te[1]),Me="mailto:"+Re):(Re=X(Te[1]),Me=Re),{type:"link",raw:Te[0],text:Re,href:Me,tokens:[{type:"text",raw:Re,text:Re}]}}},we.url=function(ce,he){var Te;if(Te=this.rules.inline.url.exec(ce)){var Re,Me;if(Te[2]==="@")Re=X(this.options.mangle?he(Te[0]):Te[0]),Me="mailto:"+Re;else{var et;do et=Te[0],Te[0]=this.rules.inline._backpedal.exec(Te[0])[0];while(et!==Te[0]);Re=X(Te[0]),Te[1]==="www."?Me="http://"+Re:Me=Re}return{type:"link",raw:Te[0],text:Re,href:Me,tokens:[{type:"text",raw:Re,text:Re}]}}},we.inlineText=function(ce,he,Te){var Re=this.rules.inline.text.exec(ce);if(Re){var Me;return he?Me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Re[0]):X(Re[0]):Re[0]:Me=X(this.options.smartypants?Te(Re[0]):Re[0]),{type:"text",raw:Re[0],text:Me}}},xe}(),ue=M.noopTest,fe=M.edit,be=M.merge,se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ue,table:ue,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=fe(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,se.item=fe(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.list=fe(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",se._comment=//,se.html=fe(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=fe(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.blockquote=fe(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=be({},se),se.gfm=be({},se.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),se.gfm.nptable=fe(se.gfm.nptable).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.gfm.table=fe(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.pedantic=be({},se.normal,{html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ue,paragraph:fe(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ue,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ue,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=fe(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=fe(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=fe(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=fe(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=fe(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=fe(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=fe(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=fe(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=fe(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=fe(ae._blockSkip,"g").getRegex(),ae.overlapSkip=fe(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ae.autolink=fe(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=fe(ae.tag).replace("comment",se._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=fe(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=fe(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=fe(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=be({},ae),ae.pedantic=be({},ae.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=be({},ae.normal,{escape:fe(ae.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ce="x"+ce.toString(16)),we+="&#"+ce+";";return we}var Ke=function(){function xe(me){this.tokens=[],this.tokens.links=Object.create(null),this.options=me||ze,this.options.tokenizer=this.options.tokenizer||new pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ce={block:Ye.normal,inline:He.normal};this.options.pedantic?(ce.block=Ye.pedantic,ce.inline=He.pedantic):this.options.gfm&&(ce.block=Ye.gfm,this.options.breaks?ce.inline=He.breaks:ce.inline=He.gfm),this.tokenizer.rules=ce}xe.lex=function(ce,he){var Te=new xe(he);return Te.lex(ce)};var we=xe.prototype;return we.lex=function(ce){return ce=ce.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(ce,this.tokens,!0),this.inline(this.tokens),this.tokens},we.blockTokens=function(ce,he,Te){he===void 0&&(he=[]),Te===void 0&&(Te=!0),ce=ce.replace(/^ +$/gm,"");for(var Re,Me,et,ht;ce;){if(Re=this.tokenizer.space(ce)){ce=ce.substring(Re.raw.length),Re.type&&he.push(Re);continue}if(Re=this.tokenizer.code(ce,he)){ce=ce.substring(Re.raw.length),Re.type?he.push(Re):(ht=he[he.length-1],ht.raw+=` `+Re.raw,ht.text+=` `+Re.text);continue}if(Re=this.tokenizer.fences(ce)){ce=ce.substring(Re.raw.length),he.push(Re);continue}if(Re=this.tokenizer.heading(ce)){ce=ce.substring(Re.raw.length),he.push(Re);continue}if(Re=this.tokenizer.nptable(ce)){ce=ce.substring(Re.raw.length),he.push(Re);continue}if(Re=this.tokenizer.hr(ce)){ce=ce.substring(Re.raw.length),he.push(Re);continue}if(Re=this.tokenizer.blockquote(ce)){ce=ce.substring(Re.raw.length),Re.tokens=this.blockTokens(Re.text,[],Te),he.push(Re);continue}if(Re=this.tokenizer.list(ce)){for(ce=ce.substring(Re.raw.length),et=Re.items.length,Me=0;Me0)for(;(Ut=this.tokenizer.rules.inline.reflinkSearch.exec(ht))!=null;)nn.includes(Ut[0].slice(Ut[0].lastIndexOf("[")+1,-1))&&(ht=ht.slice(0,Ut.index)+"["+"a".repeat(Ut[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ut=this.tokenizer.rules.inline.blockSkip.exec(ht))!=null;)ht=ht.slice(0,Ut.index)+"["+"a".repeat(Ut[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ce;){if(et=this.tokenizer.escape(ce)){ce=ce.substring(et.raw.length),he.push(et);continue}if(et=this.tokenizer.tag(ce,Te,Re)){ce=ce.substring(et.raw.length),Te=et.inLink,Re=et.inRawBlock,he.push(et);continue}if(et=this.tokenizer.link(ce)){ce=ce.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Re)),he.push(et);continue}if(et=this.tokenizer.reflink(ce,this.tokens.links)){ce=ce.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Re)),he.push(et);continue}if(et=this.tokenizer.strong(ce,ht,Me)){ce=ce.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Te,Re),he.push(et);continue}if(et=this.tokenizer.em(ce,ht,Me)){ce=ce.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Te,Re),he.push(et);continue}if(et=this.tokenizer.codespan(ce)){ce=ce.substring(et.raw.length),he.push(et);continue}if(et=this.tokenizer.br(ce)){ce=ce.substring(et.raw.length),he.push(et);continue}if(et=this.tokenizer.del(ce)){ce=ce.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Te,Re),he.push(et);continue}if(et=this.tokenizer.autolink(ce,Fe)){ce=ce.substring(et.raw.length),he.push(et);continue}if(!Te&&(et=this.tokenizer.url(ce,Fe))){ce=ce.substring(et.raw.length),he.push(et);continue}if(et=this.tokenizer.inlineText(ce,Re,Ve)){ce=ce.substring(et.raw.length),Me=et.raw.slice(-1),he.push(et);continue}if(ce){var en="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(en);break}else throw new Error(en)}}return he},Y(xe,null,[{key:"rules",get:function(){return{block:Ye,inline:He}}}]),xe}(),nt=G.defaults,de=M.cleanUrl,De=M.escape,Ne=function(){function xe(me){this.options=me||nt}var we=xe.prototype;return we.code=function(ce,he,Te){var Re=(he||"").match(/\S*/)[0];if(this.options.highlight){var Me=this.options.highlight(ce,Re);Me!=null&&Me!==ce&&(Te=!0,ce=Me)}return Re?'
    '+(Te?ce:De(ce,!0))+`
    `:"
    "+(Te?ce:De(ce,!0))+`
    `},we.blockquote=function(ce){return`
    `+ce+`
    `},we.html=function(ce){return ce},we.heading=function(ce,he,Te,Re){return this.options.headerIds?"'+ce+" `:""+ce+" `},we.hr=function(){return this.options.xhtml?`
    `:`
    `},we.list=function(ce,he,Te){var Re=he?"ol":"ul",Me=he&&Te!==1?' start="'+Te+'"':"";return"<"+Re+Me+`> `+ce+" `},we.listitem=function(ce){return"
  • "+ce+`
  • `},we.checkbox=function(ce){return" "},we.paragraph=function(ce){return"

    "+ce+`

    `},we.table=function(ce,he){return he&&(he=""+he+""),` `+ce+` `+he+`
    `},we.tablerow=function(ce){return` `+ce+` `},we.tablecell=function(ce,he){var Te=he.header?"th":"td",Re=he.align?"<"+Te+' align="'+he.align+'">':"<"+Te+">";return Re+ce+" `},we.strong=function(ce){return""+ce+""},we.em=function(ce){return""+ce+""},we.codespan=function(ce){return""+ce+""},we.br=function(){return this.options.xhtml?"
    ":"
    "},we.del=function(ce){return""+ce+""},we.link=function(ce,he,Te){if(ce=de(this.options.sanitize,this.options.baseUrl,ce),ce===null)return Te;var Re='",Re},we.image=function(ce,he,Te){if(ce=de(this.options.sanitize,this.options.baseUrl,ce),ce===null)return Te;var Re=''+Te+'":">",Re},we.text=function(ce){return ce},xe}(),Ue=function(){function xe(){}var we=xe.prototype;return we.strong=function(ce){return ce},we.em=function(ce){return ce},we.codespan=function(ce){return ce},we.del=function(ce){return ce},we.html=function(ce){return ce},we.text=function(ce){return ce},we.link=function(ce,he,Te){return""+Te},we.image=function(ce,he,Te){return""+Te},we.br=function(){return""},xe}(),rt=function(){function xe(){this.seen={}}var we=xe.prototype;return we.slug=function(ce){var he=ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(he)){var Te=he;do this.seen[Te]++,he=Te+"-"+this.seen[Te];while(this.seen.hasOwnProperty(he))}return this.seen[he]=0,he},xe}(),lt=G.defaults,ft=M.unescape,at=function(){function xe(me){this.options=me||lt,this.options.renderer=this.options.renderer||new Ne,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ue,this.slugger=new rt}xe.parse=function(ce,he){var Te=new xe(he);return Te.parse(ce)};var we=xe.prototype;return we.parse=function(ce,he){he===void 0&&(he=!0);var Te="",Re,Me,et,ht,Ut,nn,en,mn,En,$t,rr,Dn,Sr,br,Pn,Dr,Or,ln,Yr=ce.length;for(Re=0;Re0&&Pn.tokens[0].type==="text"?(Pn.tokens[0].text=ln+" "+Pn.tokens[0].text,Pn.tokens[0].tokens&&Pn.tokens[0].tokens.length>0&&Pn.tokens[0].tokens[0].type==="text"&&(Pn.tokens[0].tokens[0].text=ln+" "+Pn.tokens[0].tokens[0].text)):Pn.tokens.unshift({type:"text",text:ln}):br+=ln),br+=this.parse(Pn.tokens,Sr),En+=this.renderer.listitem(br,Or,Dr);Te+=this.renderer.list(En,rr,Dn);continue}case"html":{Te+=this.renderer.html($t.text);continue}case"paragraph":{Te+=this.renderer.paragraph(this.parseInline($t.tokens));continue}case"text":{for(En=$t.tokens?this.parseInline($t.tokens):$t.text;Re+1An error occurred:

    "+xt(et.message+"",!0)+"
    ";throw et}}qe.options=qe.setOptions=function(xe){return _t(qe.defaults,xe),kt(qe.defaults),qe},qe.getDefaults=Ze,qe.defaults=Ot,qe.use=function(xe){var we=_t({},xe);if(xe.renderer&&function(){var ce=qe.defaults.renderer||new Ne,he=function(Me){var et=ce[Me];ce[Me]=function(){for(var ht=arguments.length,Ut=new Array(ht),nn=0;nn-1?i[ue]:"",be="";g.choices.map(function(ze,Ye){ze.is_answer&&(be+=i[Ye])});var se=pe[g.item_type],ae={SINGLE:f.a.createElement(b.a,{className:a.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(fe||"\u65E0")}),MULTIPLE:f.a.createElement(b.a,{className:a.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(be||"\u65E0")}),COMPLETION:m()},Ce=f.a.createElement(b.a,{className:a.a.answerHtml,value:"\u7B54\u6848\uFF1A".concat(se||"\u65E0")});return ae[g.item_type]||Ce},H=function(q){var re=Object(G.a)(_);q.target.checked?re.push(g.id):re=re.filter(function(ye){return ye!==g.id}),d(re)};return f.a.createElement("div",{className:a.a.itemWrap},f.a.createElement("div",{className:a.a.list},x&&f.a.createElement(F.a,{className:"mr10",onChange:H,checked:_.includes(g.id)}),f.a.createElement("div",{className:a.a.title},f.a.createElement(b.a,{key:1,showLines:1,showTextOnly:!0,className:a.a.topicTitleContent,value:g.name})),f.a.createElement("div",{className:a.a.line},f.a.createElement("b",{className:a.a.b1}),f.a.createElement("b",{className:a.a.b2})),f.a.createElement("div",{onClick:function(){return T(!W)},className:a.a.tr},W?"\u6536\u8D77":"\u5C55\u5F00",f.a.createElement("i",{style:{transform:W?"scale(0.5) rotate(-180deg)":"scale(0.5) rotate(0deg)"},className:"iconfont icon-zhankai4"}))),f.a.createElement("aside",{style:W?{display:"block"}:{display:"none"},className:a.a.itemDetail},f.a.createElement("div",{style:{marginBottom:44}},f.a.createElement(b.a,{key:2,className:a.a.topicTitleContent,value:g.name}),f.a.createElement("div",{className:"".concat(a.a.row," mt15")},M()),f.a.createElement("div",{className:a.a.row},f.a.createElement("div",{className:a.a.updateTimeRow},f.a.createElement("div",{className:a.a.updateTimeWrap},g.item_type==="PROGRAM"&&f.a.createElement("p",{className:a.a.programLanguage},"\u7F16\u7A0B\u8BED\u8A00\uFF1A",(O=g.program_attr)===null||O===void 0?void 0:O.language))))),g.item_type!=="PROGRAM"&&g.item_type!=="COMBINATION"&&f.a.createElement("div",{className:a.a.answerWrapper},f.a.createElement("img",{src:u.a,alt:"",className:a.a.decoration}),f.a.createElement("div",{className:a.a.answer},v()),f.a.createElement("div",{className:a.a.parse},f.a.createElement("div",{className:a.a.parseText},"\u89E3\u6790\uFF1A"),f.a.createElement("div",{className:a.a.parseAnswer},g.analysis?f.a.createElement(b.a,{className:a.a.parseAnswerHtml,value:g.analysis}):"\u6682\u65E0\u89E3\u6790")))))},A=function(R){var O,g,_,h,d,C,x,w,j,W,T,M,m,v,H,X,q=R.isProblemset,re=R.data,ye=R.user,pe=R.activeTabsKey,ue=R.onPublicReview,fe=ue===void 0?function(){}:ue,be=R.onStartExperience,se=be===void 0?function(){}:be,ae=R.onSetPrivate,Ce=ae===void 0?function(){}:ae,ze=R.onCorrection,Ye=ze===void 0?function(){}:ze,He=R.onCollect,Ve=He===void 0?function(){}:He,Fe=R.onSetPublic,Ke=Fe===void 0?function(){}:Fe,nt=R.onDelete,de=nt===void 0?function(){}:nt,De=R.onCancel,Ne=De===void 0?function(){}:De,Ue=R.onSelect,rt=Ue===void 0?function(){}:Ue,lt=R.onMoveTo,ft=lt===void 0?function(){}:lt,at=R.onSetShare,_t=at===void 0?function(){}:at,gt=R.onCancelShare,xt=gt===void 0?function(){}:gt,Ze=R.onPublish,kt=Ze===void 0?function(){}:Ze,Ot=R.onCancelPublish,qe=Ot===void 0?function(){}:Ot,st=re.item_type==="PROGRAM"?"/problems/".concat((O=re.program_attr)===null||O===void 0?void 0:O.identifier,"/edit"):"/problemset/edit/".concat(re.id),xe=pe==="0"&&!re.public&&!re.apply&&(re.item_type==="PROGRAM"&&((g=re.program_attr)===null||g===void 0?void 0:g.status)!==0||re.item_type!=="PROGRAM"),we=f.a.createElement(z.a,{forceSubMenuRender:!0,className:a.a.menu},pe==="0"&&!re.public&&f.a.createElement(z.a.Item,{key:"-1"},f.a.createElement("a",{className:a.a.actionLink,target:"_blank",href:st},"\u7F16\u8F91")),(pe==="0"||pe==="3")&&re.item_type==="PROGRAM"&&((_=re.program_attr)===null||_===void 0?void 0:_.status)!==0&&!re.public&&((h=re.author)===null||h===void 0?void 0:h.login)===((d=ye.userInfo)===null||d===void 0?void 0:d.login)&&f.a.createElement(z.a.Item,{key:"0"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){var Te;return qe(re==null||((Te=re.program_attr)===null||Te===void 0)?void 0:Te.identifier)}},"\u64A4\u9500\u53D1\u5E03")),pe==="0"&&f.a.createElement(z.a.Item,{key:"1"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return ft(re.id)}},"\u79FB\u52A8\u5230")),pe==="0"&&!(re!=null&&re.is_share)&&f.a.createElement(z.a.Item,{key:"3"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return _t(re.id)}},"\u5171\u4EAB")),(pe==="0"&&(re==null?void 0:re.is_share)||pe==="3"&&((C=re.author)===null||C===void 0?void 0:C.login)===((x=ye.userInfo)===null||x===void 0?void 0:x.login))&&f.a.createElement(z.a.Item,{key:"3"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return xt(re.id)}},"\u64A4\u9500\u5171\u4EAB")),xe&&f.a.createElement(z.a.Item,{key:"4"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ke(re.id)}},"\u516C\u5F00")),pe==="0"&&!re.public&&re.apply&&(re.item_type==="PROGRAM"&&re.program_attr.status!==0||re.item_type!=="PROGRAM")&&f.a.createElement(z.a.Item,{key:"5"},f.a.createElement("a",{className:a.a.reviewFlag,onClick:fe},"\u5BA1\u6838\u4E2D")),(pe==="0"||pe==="1")&&re.public&&((w=re.author)===null||w===void 0?void 0:w.login)===((j=ye.userInfo)===null||j===void 0?void 0:j.login)&&f.a.createElement(z.a.Item,{key:"6"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ce(re.id)}},"\u64A4\u9500\u516C\u5F00")),pe==="2"&&f.a.createElement(z.a.Item,{key:"7"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ve(re.id,re.is_collected)}},"\u53D6\u6D88\u6536\u85CF")),(pe==="0"||pe==="3")&&re.item_type==="PROGRAM"&&((W=re.program_attr)===null||W===void 0?void 0:W.status)===0&&!re.public&&((T=re.author)===null||T===void 0?void 0:T.login)===((M=ye.userInfo)===null||M===void 0?void 0:M.login)&&f.a.createElement(z.a.Item,{key:"8"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){var Te;return kt(re==null||((Te=re.program_attr)===null||Te===void 0)?void 0:Te.identifier)}},"\u53D1\u5E03")),(pe==="1"||pe==="3")&&!Object(p.o)()&&!Object(p.m)()&&((m=re.author)===null||m===void 0?void 0:m.login)!==((v=ye.userInfo)===null||v===void 0?void 0:v.login)&&f.a.createElement(z.a.Item,{key:"9"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ve(re.id,re.is_collected)}},re.is_collected?"\u53D6\u6D88\u6536\u85CF":"\u6536\u85CF")),pe!=="0"&&!Object(p.o)()&&!Object(p.m)()&&f.a.createElement(z.a.Item,{key:"10"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ye(re.id)}},"\u7EA0\u9519")),(pe==="0"&&!re.public||pe==="1"&&Object(p.o)()&&((H=re.author)===null||H===void 0?void 0:H.login)!==((X=ye.userInfo)===null||X===void 0?void 0:X.login))&&f.a.createElement(z.a.Item,{key:"11"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return de(re.id)}},"\u5220\u9664"))),me=f.a.createElement(z.a,{forceSubMenuRender:!0,className:a.a.menu},f.a.createElement(z.a.Item,{key:"10"},f.a.createElement("a",{className:a.a.actionLink,onClick:function(){return Ye(re.id)}},"\u7EA0\u9519"))),ce=pe!=="0"&&!Object(p.o)()&&!Object(p.m)();return f.a.createElement(f.a.Fragment,null,q?f.a.createElement(f.a.Fragment,null,re.item_type!=="SUBJECTIVE"&&re.item_type!=="COMBINATION"&&f.a.createElement("span",{className:a.a.textBtn,style:{cursor:"pointer"},onClick:function(){return se(re)}},"\u4F53\u9A8C"),f.a.createElement(Y.a,{overlay:we},f.a.createElement("span",{style:{cursor:"default"},onClick:function(Te){return Te.preventDefault()}},f.a.createElement("span",{className:a.a.textBtn},"\u66F4\u591A")))):ce?f.a.createElement(Y.a,{className:"ml40",overlay:me},f.a.createElement("span",{style:{cursor:"default"},onClick:function(Te){return Te.preventDefault()}},f.a.createElement("span",null,"\u66F4\u591A"))):f.a.createElement("span",null))};ge.b=D},ELLl:function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){var Y={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},N=te.Pos;te.defineOption("autoCloseBrackets",!1,function(a,p,l){l&&l!=te.Init&&(a.removeKeyMap(P),a.state.closeBrackets=null),p&&(F(z(p,"pairs")),a.state.closeBrackets=p,a.addKeyMap(P))});function z(a,p){return p=="pairs"&&typeof a=="string"?a:typeof a=="object"&&a[p]!=null?a[p]:Y[p]}var P={Backspace:n,Enter:I};function F(a){for(var p=0;p=0;s--){var D=u[s].head;a.replaceRange("",N(D.line,D.ch-1),N(D.line,D.ch+1),"+delete")}}function I(a){var p=K(a),l=p&&z(p,"explode");if(!l||a.getOption("disableInput"))return te.Pass;for(var u=a.listSelections(),s=0;s0;return{anchor:new N(a.anchor.line,a.anchor.ch+(p?-1:1)),head:new N(a.head.line,a.head.ch+(p?1:-1))}}function f(a,p){var l=K(a);if(!l||a.getOption("disableInput"))return te.Pass;var u=z(l,"pairs"),s=u.indexOf(p);if(s==-1)return te.Pass;for(var i=z(l,"closeBefore"),D=z(l,"triples"),A=u.charAt(s+1)==p,S=a.listSelections(),R=s%2==0,O,g=0;g=0&&a.getRange(h,N(h.line,h.ch+3))==p+p+p?d="skipThree":d="skip";else if(A&&h.ch>1&&D.indexOf(p)>=0&&a.getRange(N(h.line,h.ch-2),h)==p+p){if(h.ch>2&&/\bstring/.test(a.getTokenTypeAt(N(h.line,h.ch-2))))return te.Pass;d="addFour"}else if(A){var x=h.ch==0?" ":a.getRange(N(h.line,h.ch-1),h);if(!te.isWordChar(C)&&x!=p&&!te.isWordChar(x))d="both";else return te.Pass}else if(R&&(C.length===0||/\s/.test(C)||i.indexOf(C)>-1))d="both";else return te.Pass;if(!O)O=d;else if(O!=d)return te.Pass}var w=s%2?u.charAt(s-1):p,j=s%2?p:u.charAt(s+1);a.operation(function(){if(O=="skip")a.execCommand("goCharRight");else if(O=="skipThree")for(var W=0;W<3;W++)a.execCommand("goCharRight");else if(O=="surround"){for(var T=a.getSelections(),W=0;W0?Rt[0].callbacks.push(Pt):Me.push({element:mt,callbacks:[Pt]}),{clear:function(){Me=Me.filter(function(un){return un.element!==mt})}}}},Ut=ht,nn=[{stateName:"single_questions_count",type:"SINGLE",typeName:"\u5355\u9009\u9898"},{stateName:"multiple_questions_count",type:"MULTIPLE",typeName:"\u591A\u9009\u9898"},{stateName:"judgement_questions_count",type:"JUDGMENT",typeName:"\u5224\u65AD\u9898"},{stateName:"completion_questions_count",type:"COMPLETION",typeName:"\u586B\u7A7A\u9898"},{stateName:"subjective_questions_count",type:"SUBJECTIVE",typeName:"\u7B80\u7B54\u9898"},{stateName:"program_questions_count",type:"PROGRAM",typeName:"\u7F16\u7A0B\u9898"},{stateName:"practical_questions_count",type:"PRACTICAL",typeName:"\u5B9E\u8BAD\u9898"},{stateName:"combination_questions_count",type:"COMBINATION",typeName:"\u7EC4\u5408\u9898"}],en=function(mt){var Pt=mt.visible,Rt=mt.basketData,Ht=mt.basketTotal,un=mt.onClose,xn=un===void 0?function(){}:un,Cn=mt.onDelete,gn=Cn===void 0?function(){}:Cn,Ln=Object(M.useRef)(),Kn=Object(M.useRef)();return Object(M.useEffect)(function(){return Kn.current?(Ht>=0&&!Ln.current&&(Ln.current=Ut.init(Kn.current,function(){xn()})),function(){Ln.current&&Ln.current.clear()}):void 0},[Kn.current]),m.a.createElement(he.a,{className:Re.a.drawerWrap,placement:"right",closable:!1,mask:!1,visible:Pt,forceRender:!0,onClose:xn},Ht>0?m.a.createElement("div",{style:{height:"100%"},ref:Kn},m.a.createElement("div",{className:Re.a.title},"\u8BD5\u9898\u7BEE"),nn.map(function(dn){return Rt[dn.stateName]>0&&m.a.createElement("div",{className:Re.a.problemset,key:dn.type},m.a.createElement("div",{className:Re.a.content},dn.typeName,"(",Rt[dn.stateName],")"),m.a.createElement("div",{className:Re.a.delete,onClick:function(){return gn(dn.type)}},m.a.createElement("i",{className:"iconfont icon-shanchu1 ".concat(Re.a.deleteIcon)})))}),m.a.createElement("div",{className:Re.a.previewWrap},m.a.createElement("div",{className:Re.a.preview,onClick:function(){return v.d.push("/problemset/preview")}},"\u8BD5\u5377\u9884\u89C8"))):m.a.createElement("div",{ref:Kn},m.a.createElement(re.a,{customText:"\u8BF7\u9009\u62E9\u8BD5\u9898\u8FDB\u884C\u7EC4\u5377"})))},mn={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",COMBINATION:"\u7EC4\u5408\u9898"},En=function(mt){var Pt,Rt,Ht=mt.problemset,un=mt.globalSetting,xn=mt.loading,Cn=mt.dispatch,gn=mt.onReloadData,Ln=gn===void 0?function(){}:gn,Kn=mt.onReloadBasketData,dn=Kn===void 0?function(){}:Kn,Sn=Object(d.a)(mt,["problemset","globalSetting","loading","dispatch","onReloadData","onReloadBasketData"]),hr=function(){var Nn=Object(_.a)(T.a.mark(function Kt(){var An;return T.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:return Un.next=2,Cn({type:"problemset/basketDelete",payload:Ht.actionTabs.params});case 2:An=Un.sent,Cn({type:"problemset/setActionTabs",payload:{}}),An.status===0&&(Ln(),dn());case 5:case"end":return Un.stop()}},Kt)}));return function(){return Nn.apply(this,arguments)}}();return m.a.createElement(R.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ht.actionTabs.key==="Problemset-BasketDelete",title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:xn["problemset/handleDelete"],width:"442px",onOk:hr,onCancel:function(){Cn({type:"problemset/setActionTabs",payload:{}})}},m.a.createElement("div",{className:pe.a.modalContent},"\u662F\u5426\u5220\u9664\u8BD5\u9898\u7BEE\u4E2D",mn[(Pt=Ht.actionTabs)===null||Pt===void 0||((Rt=Pt.params)===null||Rt===void 0)?void 0:Rt.type]))},$t=Object(v.a)(function(Zt){var mt=Zt.problemset,Pt=Zt.loading,Rt=Zt.globalSetting;return{problemset:mt,globalSetting:Rt,loading:Pt.effects}})(En),rr=U("A60/"),Dn=U.n(rr),Sr=function(mt){var Pt=mt.count,Rt=mt.visibleBasket,Ht=mt.onToggleVisible,un=Ht===void 0?function(){}:Ht;return m.a.createElement("div",{className:"".concat(Rt?Dn.a.right180:Dn.a.right20," ").concat(Dn.a.wrap)},m.a.createElement(c.a,{title:"\u8BD5\u9898\u7BEE",placement:"left"},m.a.createElement("div",{className:Dn.a.basket,onClick:un},Pt>0&&m.a.createElement("div",{className:Dn.a.count},Pt),m.a.createElement("span",{className:Dn.a.iconWrap},m.a.createElement("i",{className:"".concat(Dn.a.icon," iconfont icon-shitilan")})),m.a.createElement("p",{className:Dn.a.name},"\u8BD5\u9898\u7BEE"))))},br=U("EJTS"),Pn=U("LE3n"),Dr=U("1vsH"),Or=U("xKgJ"),ln=U("/zsF"),Yr=U("PArb"),tn=U("jCWc"),sn=U("kPKH"),Qn=U("y8nQ"),sr=U("Vl3Y"),Nr=U("nSDg"),hn=U.n(Nr),Qt=U("HBuW"),$r=U("NLgs"),fr=U("vkP9"),Lr=x.a.Search,kn={id:"type",name:"\u6765\u6E90",children:[{name:"\u5168\u90E8",id:"all",type:"type"},{name:"\u6211\u7684",id:"mine",type:"type"}]},Ur={id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]},vi=function(mt){var Pt,Rt,Ht,un,xn=mt.classroomList,Cn=mt.loading,gn=mt.dispatch,Ln=mt.cb,Kn=mt.shixunIds,dn=Kn===void 0?[]:Kn,Sn=Object(nt.i)(),hr=Object(nt.h)(),Nn=xn.actionTabs,Kt=sr.a.useForm(),An=Object(h.a)(Kt,1),lr=An[0],Un=xn.shixunLists,zt=Object(M.useState)([]),jt=Object(h.a)(zt,2),yn=jt[0],Ct=jt[1],Mt=Object(M.useState)([]),Dt=Object(h.a)(Mt,2),ke=Dt[0],Vt=Dt[1],Tn=Object(M.useState)({page:1,type:"all",diff:0,status:"published",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null}),mr=Object(h.a)(Tn,2),On=mr[0],ii=mr[1];Object(M.useEffect)(function(){xn.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"&&gn({type:"classroomList/getShixunLists",payload:Object(g.a)({},On)})},[xn.actionTabs.key]),Object(M.useEffect)(function(){return document.body.setAttribute("data-custom","height"),function(){document.body.removeAttribute("data-custom")}},[]),Object(M.useEffect)(function(){ai()},[Sn]);var ai=function(){var Bt=Object(_.a)(T.a.mark(function Er(){var ur;return T.a.wrap(function(oi){for(;;)switch(oi.prev=oi.next){case 0:return oi.next=2,Object(Qt.pb)({});case 2:ur=oi.sent,Vt((ur==null?void 0:ur.disciplines)||[]);case 4:case"end":return oi.stop()}},Er)}));return function(){return Bt.apply(this,arguments)}}(),Kr=function(Er,ur,Yn){On.tag_level=Er,On.sub_discipline_id=ur,On.discipline_id=Yn,ii(Object(g.a)({},On)),gn({type:"classroomList/getShixunLists",payload:Object(g.a)({},On)})},jn=function(){gn({type:"classroomList/setActionTabs",payload:{}}),ii({page:1,type:"all",diff:0,status:"published",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null})};return xn.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:m.a.createElement(he.a,{placement:"bottom",height:"100%",closable:!0,onClose:jn,visible:xn.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",className:hn.a.drawer,footer:m.a.createElement("div",{className:"tc"},m.a.createElement(I.a,{size:"large",onClick:function(){jn(),Ct([])},style:{marginRight:8}},"\u53D6\u6D88"),m.a.createElement(I.a,{size:"large",onClick:Object(_.a)(T.a.mark(function Bt(){var Er,ur,Yn;return T.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:Er=function(Yt){var pn=yn[Yt];if(dn.includes(pn)){var Gn,Mn;return i.b.info("\u8BF7\u52FF\u91CD\u590D\u9009\u62E9\uFF1A".concat(Un==null||((Gn=Un.shixun_list)===null||Gn===void 0||((Mn=Gn.find(function(qn){return qn.id===pn}))===null||Mn===void 0))?void 0:Mn.title)),{v:void 0}}},ur=0;case 2:if(!(ur<(yn==null?void 0:yn.length))){Xt.next=9;break}if(Yn=Er(ur),!(typeof Yn=="object")){Xt.next=6;break}return Xt.abrupt("return",Yn.v);case 6:ur++,Xt.next=2;break;case 9:jn(),Ln(yn),Ct([]);case 12:case"end":return Xt.stop()}},Bt)})),type:"primary"},"\u786E\u5B9A"))},m.a.createElement("section",{className:"tc"},m.a.createElement(fr.a,{onChange:function(Er){ii(Object(g.a)(Object(g.a)(Object(g.a)({},On),Er),{},{page:1})),gn({type:"classroomList/getShixunLists",payload:Object(g.a)(Object(g.a)(Object(g.a)({},On),Er),{},{page:1})})}})),m.a.createElement("section",{className:"edu-container"},m.a.createElement("ul",{className:hn.a.menu},m.a.createElement("li",null,kn.name),kn==null||((Pt=kn.children)===null||Pt===void 0)?void 0:Pt.map(function(Bt,Er){return m.a.createElement("li",{className:On[kn.id]==Bt.id?hn.a.actived:"",key:Bt.id,onClick:function(){On[kn.id]=Bt.id,ii(Object(g.a)({},On)),gn({type:"classroomList/getShixunLists",payload:Object(g.a)({},On)})}},m.a.createElement("strong",null,Bt.name))})),m.a.createElement("ul",{className:hn.a.menuDirection},m.a.createElement("li",{className:hn.a.directionName},"\u65B9\u5411"),m.a.createElement("li",{className:On.discipline_id?"":hn.a.actived,onClick:function(){Kr(null,null,null)}},m.a.createElement("strong",null,"\u5168\u90E8")),ke==null?void 0:ke.map(function(Bt,Er){return m.a.createElement("li",{key:Er,className:On.discipline_id==Bt.id?hn.a.actived:""},m.a.createElement("strong",{onClick:function(){Kr(1,null,Bt.id)}},Bt.name),m.a.createElement("div",null,Bt.sub_disciplines.map(function(ur,Yn){return m.a.createElement("div",{key:Yn,className:"mt5"},m.a.createElement("div",{className:On.sub_discipline_id==ur.id?"".concat(hn.a.actived2," ").concat(hn.a.subTag):hn.a.subTag,onClick:function(){Kr(2,ur.id,Bt.id)}},ur.name),m.a.createElement("ul",{className:"mt5"},ur.tags&&ur.tags.map(function(oi,Xt){return m.a.createElement("li",{key:Xt,className:On.sub_discipline_id==oi.id&&On.tag_level===3?hn.a.actived2:"",onClick:function(){Kr(3,oi.id,Bt.id)}},oi.name)})))})))})),m.a.createElement("ul",{className:hn.a.menu},m.a.createElement("li",null,Ur.name),Ur==null||((Rt=Ur.children)===null||Rt===void 0)?void 0:Rt.map(function(Bt,Er){return m.a.createElement("li",{className:On[Ur.id]==Bt.id?hn.a.actived:"",key:Bt.name,onClick:function(){On[Ur.id]=Bt.id,ii(Object(g.a)({},On)),gn({type:"classroomList/getShixunLists",payload:Object(g.a)({},On)})}},m.a.createElement("strong",null,Bt.name))})),m.a.createElement(Y.a,null,m.a.createElement(sn.a,{flex:"1"},m.a.createElement("div",{className:hn.a.menuCourse,style:{margin:"0px 15px"}},m.a.createElement("ul",null,m.a.createElement("li",null,"\u5DF2\u9009",m.a.createElement("span",{className:"c-blue"},yn.length),"\u4E2A\u5B9E\u8BAD"),m.a.createElement("li",null,"\u5171",m.a.createElement("span",{className:"c-blue"},Un.shixuns_count),"\u4E2A\u8BFE\u7A0B"),m.a.createElement("li",{className:"current",onClick:function(){var Er=Object(g.a)(Object(g.a)({},On),{},{order:On.order==="asc"?"desc":"asc"});ii(Er),gn({type:"classroomList/getShixunLists",payload:Er})}},"\u5B66\u4E60\u4EBA\u6570",m.a.createElement("p",{className:"edu-sorter current ".concat(On.order)},On.order==="asc"?m.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}):m.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))))),m.a.createElement(sn.a,{className:"c-grey-999"},"\u4EC5\u5DF2\u53D1\u5E03\u7684\u5B9E\u8BAD\u8FDB\u5165\u672C\u5217\u8868\u5907\u9009")),Un==null||((Ht=Un.shixun_list)===null||Ht===void 0)?void 0:Ht.map(function(Bt,Er){return m.a.createElement("div",{className:hn.a.listItem,key:Er},m.a.createElement(u.a,{checked:yn.includes(Bt.id),value:Bt.id,disabled:Bt==null?void 0:Bt.need_authorize,onChange:function(Yn){var oi=yn.indexOf(Bt.id);yn.indexOf(Bt.id)>-1?Ct(yn.filter(function(Xt){return Xt!==Bt.id})):Ct(yn.concat(Bt.id))}}),m.a.createElement("div",{className:hn.a.info},m.a.createElement("div",{className:hn.a.title},m.a.createElement("div",{className:hn.a.titleLeft},m.a.createElement("a",{className:"c-black",href:"/shixuns/".concat(Bt==null?void 0:Bt.identifier,"/challenges"),target:"_blank"},m.a.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:Bt.title}})),(Bt==null?void 0:Bt.need_authorize)&&m.a.createElement("span",{onClick:function(){Object($r.a)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10"},"\u9700\u6388\u6743"),Object(Or.v)()&&(Bt==null?void 0:Bt.mark_status)===1&&m.a.createElement(c.a,{title:Bt==null?void 0:Bt.mark_content},m.a.createElement("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10"},"\u6B63\u5E38")),Object(Or.v)()&&(Bt==null?void 0:Bt.mark_status)===2&&m.a.createElement(c.a,{title:Bt==null?void 0:Bt.mark_content},m.a.createElement("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10"},"\u9700\u5B8C\u5584")),Object(Or.v)()&&(Bt==null?void 0:Bt.mark_status)===3&&m.a.createElement(c.a,{title:Bt==null?void 0:Bt.mark_content},m.a.createElement("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10"},"\u65E0\u6CD5\u4F7F\u7528")))),m.a.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},m.a.createElement("span",{className:hn.a.description,dangerouslySetInnerHTML:{__html:Bt.description}})),m.a.createElement("div",{className:" mt15"},Bt.challenge_names.map(function(ur,Yn){return m.a.createElement("span",{key:Yn,className:"mr30 font12"},"\u7B2C",Yn+1,"\u5173 ",ur," ")})),m.a.createElement(Yr.a,{dashed:!0}),m.a.createElement("div",{className:"c-light-black mt20 font12"},m.a.createElement("span",null,Bt.author_name),m.a.createElement("span",{className:"ml15 mr15"},"|"),m.a.createElement("span",null,Bt.author_school_name),m.a.createElement("span",{className:"ml15 mr15"},"|"),m.a.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570 ",Bt.level),m.a.createElement("span",{className:"ml15 mr15"},"|"),m.a.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570 "),m.a.createElement("span",null,Bt.study_count))))}),(Un==null||((un=Un.shixun_list)===null||un===void 0)?void 0:un.length)===0&&m.a.createElement(re.a,null),m.a.createElement("p",null)),m.a.createElement("div",{className:"tc mt20"},m.a.createElement(z.a,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:10,showSizeChanger:!1,current:On.page||1,showQuickJumper:!0,total:Un==null?void 0:Un.shixuns_count,onChange:function(Er){var ur=Object(g.a)(Object(g.a)({},On),{},{page:Er});ii(ur),gn({type:"classroomList/getShixunLists",payload:ur})}})))},Ai=Object(v.a)(function(Zt){var mt=Zt.classroomList,Pt=Zt.loading;return{classroomList:mt,loading:Pt}})(vi),Et=U("mgmH"),fn=U("ErOA"),Gi=U("ORt/"),zi=U.n(Gi),na=U("Ot1p"),Vi=function(mt,Pt){var Rt,Ht=mt.data,un=sr.a.useForm(),xn=Object(h.a)(un,1),Cn=xn[0],gn=Object(M.useState)({}),Ln=Object(h.a)(gn,2),Kn=Ln[0],dn=Ln[1];return Object(M.useEffect)(function(){Ht&&(dn(Ht),Cn.setFieldsValue(Object(g.a)({},Ht)))},[Ht]),Object(M.useImperativeHandle)(Pt,function(){return{form:Cn}}),m.a.createElement("div",{className:zi.a.operating},m.a.createElement(sr.a,{form:Cn,scrollToFirstError:!0,onValuesChange:function(){dn(Object(g.a)({},Cn.getFieldsValue()))}},m.a.createElement(sr.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"},{max:30,message:"\u8BF7\u8F93\u5165\u6807\u9898\uFF0C\u6700\u5927\u9650\u523630\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},m.a.createElement(x.a,{placeholder:"\u8BF7\u8F93\u5165\u6807\u9898\uFF0C\u6700\u5927\u9650\u523630\u4E2A\u5B57\u7B26",suffix:"".concat(((Rt=Kn.name)===null||Rt===void 0?void 0:Rt.length)||0,"/30")})),m.a.createElement(sr.a.Item,{name:"languages",label:"\u7F16\u7A0B\u8BED\u8A00",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},m.a.createElement(u.a.Group,null,m.a.createElement(u.a,{value:"c"},"C"),m.a.createElement(u.a,{value:"c++"},"C++"),m.a.createElement(u.a,{value:"java"},"Java"),m.a.createElement(u.a,{value:"python"},"Python"))),m.a.createElement("div",{className:zi.a.tip},"\u9009\u62E9\u652F\u6301\u4EE5\u4E0B\u7F16\u7A0B\u8BD5\u9898\u8FDB\u884C\u7F16\u8BD1\u7684\u8BED\u8A00"),m.a.createElement("div",{style:{margin:"20px 0 12px 0px"}},"\u8BF4\u660E"),m.a.createElement(sr.a.Item,{name:"description"},m.a.createElement(na.a,{defaultValue:Kn.description||"",watch:!0}))))},Z=Object(M.forwardRef)(Vi),L=U("SVaM"),k=U("sesT"),V=U.n(k),ne=U("wNkr"),Q=U.n(ne),Pe=U("xTzM"),pt=U.n(Pe),Lt=j.a.TabPane,rn=x.a.Search,vt=x.a.TextArea,Gt;(function(Zt){Zt.Mine="0",Zt.Public="1",Zt.Collection="2",Zt.TeachGroupShare="3"})(Gt||(Gt={}));var pr=function(mt){var Pt,Rt,Ht,un,xn,Cn,gn,Ln,Kn,dn,Sn,hr,Nn=mt.classroomList,Kt=mt.problemset,An=mt.user,lr=mt.globalSetting,Un=mt.loading,zt=mt.dispatch,jt=mt.match,yn=mt.shixunHomeworks,Ct=Object(d.a)(mt,["classroomList","problemset","user","globalSetting","loading","dispatch","match","shixunHomeworks"]),Mt=Object(M.useState)({discipline_id:null,sub_discipline_id:null,tag_discipline_id:null,group_id:null,type:"0",item_type:null,difficulty:null,keyword:null,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",id:((Pt=Ct.location)===null||Pt===void 0||((Rt=Pt.query)===null||Rt===void 0)?void 0:Rt.id)||null,exam_id:(jt==null||((Ht=jt.params)===null||Ht===void 0)?void 0:Ht.id)||null,exercise_id:(jt==null||((un=jt.params)===null||un===void 0)?void 0:un.categoryId)||null}),Dt=Object(h.a)(Mt,2),ke=Dt[0],Vt=Dt[1],Tn=Object(M.useState)(0),mr=Object(h.a)(Tn,2),On=mr[0],ii=mr[1],ai=Object(M.useState)([]),Kr=Object(h.a)(ai,2),jn=Kr[0],Bt=Kr[1],Er=Object(M.useState)(Gt.Mine),ur=Object(h.a)(Er,2),Yn=ur[0],oi=ur[1],Xt=Object(M.useState)(0),Jt=Object(h.a)(Xt,2),Yt=Jt[0],pn=Jt[1],Gn=Object(M.useState)(-1),Mn=Object(h.a)(Gn,2),qn=Mn[0],gr=Mn[1],wi=Object(M.useState)([]),Zn=Object(h.a)(wi,2),Qi=Zn[0],vr=Zn[1],fi=Object(M.useState)(!1),si=Object(h.a)(fi,2),Ni=si[0],ka=si[1],Lo=Object(M.useState)([]),ua=Object(h.a)(Lo,2),Gr=ua[0],lo=ua[1],uo=Object(M.useState)(0),va=Object(h.a)(uo,2),ya=va[0],$a=va[1],co=Object(M.useState)(!1),Ma=Object(h.a)(co,2),Ca=Ma[0],ho=Ma[1],fo=Object(M.useState)(!1),Na=Object(h.a)(fo,2),po=Na[0],Qa=Na[1],_a=Object(M.useRef)(!1),ra=Object(M.useRef)(""),ba=Object(M.useRef)(),Ee=Object(M.useRef)(),Le=Object(M.useRef)(),We=Object(M.useState)(),Se=Object(h.a)(We,2),ie=Se[0],ve=Se[1],le=Object(M.useState)([]),Ae=Object(h.a)(le,2),_e=Ae[0],Be=Ae[1],je=Object(M.useRef)(!1),Ge=(jt==null?void 0:jt.url)==="/problemset",tt=jt==null||((xn=jt.url)===null||xn===void 0)?void 0:xn.includes("program_homework"),yt=tt&&jt!==null&&jt!==void 0&&(Cn=jt.params)!==null&&Cn!==void 0&&Cn.categoryId&&jt!==null&&jt!==void 0&&(gn=jt.url)!==null&&gn!==void 0&&gn.includes("edit")?jt==null||((Ln=jt.params)===null||Ln===void 0)?void 0:Ln.categoryId:"",Tt=yt?"\u7F16\u8F91\u7F16\u7A0B\u4F5C\u4E1A":"\u65B0\u5EFA\u7F16\u7A0B\u4F5C\u4E1A",Nt=Object(M.useState)({}),Rn=Object(h.a)(Nt,2),$n=Rn[0],Bn=Rn[1],zn=Object(M.useState)(!1),Xn=Object(h.a)(zn,2),Vn=Xn[0],Fn=Xn[1],Jn=An.userInfo||{},er=Jn.admin,jr=Jn.business,tr=Jn.is_shixun_marker,_n=Jn.is_teacher,vn=Jn.user_identity,Wn=er||jr||tr||_n||vn!=="\u5B66\u751F",cr=Object(M.useState)("\u6309\u66F4\u65B0\u65F6\u95F4\u964D\u5E8F"),an=Object(h.a)(cr,2),dr=an[0],Br=an[1],ir=yn.commonHomeWorkAddDefaultData,Ar=Object(M.useState)([]),xr=Object(h.a)(Ar,2),zr=xr[0],Qr=xr[1],Wr=Object(M.useRef)(null),yi=Object(M.useState)(!1),Ii=Object(h.a)(yi,2),Ci=Ii[0],Zr=Ii[1],Pr=Object(M.useState)([]),Tr=Object(h.a)(Pr,2),wn=Tr[0],wr=Tr[1],Ui=Object(M.useState)(""),Zi=Object(h.a)(Ui,2),ia=Zi[0],Cr=Zi[1],Xi=Object(M.useState)(!1),Ji=Object(h.a)(Xi,2),Rr=Ji[0],yr=Ji[1],Hr=Object(M.useRef)(null),Ua=[{name:"\u6309\u66F4\u65B0\u65F6\u95F4\u5347\u5E8F",type:"updated_at",direction:"asc"},{name:"\u6309\u66F4\u65B0\u65F6\u95F4\u964D\u5E8F",type:"updated_at",direction:"desc"},{name:"\u6309\u4F7F\u7528\u6B21\u6570\u5347\u5E8F",type:"quotes",direction:"asc"},{name:"\u6309\u4F7F\u7528\u6B21\u6570\u964D\u5E8F",type:"quotes",direction:"desc"}];Object(M.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Za=function(){var it=Object(_.a)(T.a.mark(function Je(){var $e,ot,ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.next=2,Object(Ke.q)({id:yt});case 2:$e=St.sent,$e!=null&&$e.name&&(ut={description:$e.description,languages:$e.languages,name:$e.name},Hr.current.form.setFieldsValue(ut),Bn(Object(g.a)({},ut)),wr(Object(O.a)($e.data)),Be((ot=$e.data)===null||ot===void 0?void 0:ot.map(function(wt){return wt.id})));case 4:case"end":return St.stop()}},Je)}));return function(){return it.apply(this,arguments)}}();Object(M.useEffect)(function(){yt&&Za()},[yt]),Object(M.useEffect)(function(){var it,Je=((it=Ct.location.query)===null||it===void 0?void 0:it.group_id)||0;ke.group_id=Number(Je),zt({type:"problemset/getDisciplines",payload:Object(g.a)(Object(g.a)({source:"question"},ke),{},{group_type:Yn})}),Vt(ke),ti(ke).then(function($e){$e!=null&&$e.status||Qr($e==null?void 0:$e.item_banks_group),Zr(!1)}),Yi(),Ea()},[]),Object(M.useEffect)(function(){return zt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),zt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){zt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),zt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[]),Object(M.useEffect)(function(){return zt({type:"globalSetting/headerFixedToggle",payload:!0}),function(){zt({type:"globalSetting/headerFixedToggle",payload:!1})}},[]),Object(M.useEffect)(function(){return zt({type:"globalSetting/headerFooterToggle",payload:Ge}),function(){zt({type:"globalSetting/headerFooterToggle",payload:!0})}},[]),Object(M.useEffect)(function(){Object(Dr.X)(tt?Tt:"\u8BD5\u9898\u5E93")},[tt,Tt]);var ca=function(Je,$e){var ot=[];if(!Je){var ut,At;Kt==null||((ut=Kt.disciplinesData)===null||ut===void 0||((At=ut.disciplines)===null||At===void 0))||At.forEach(function(Vr){var ji;Vr==null||((ji=Vr.sub_disciplines)===null||ji===void 0)||ji.forEach(function(ta){var La;ta==null||((La=ta.tag_disciplines)===null||La===void 0)||La.forEach(function(Bi){Bi.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&ot.push(Bi)})})})}if(Je&&!$e){var St,wt,cn,nr=Kt==null||((St=Kt.disciplinesData)===null||St===void 0||((wt=St.disciplines)===null||wt===void 0))?void 0:wt.find(function(Vr){return Vr.id===Je});nr==null||((cn=nr.sub_disciplines)===null||cn===void 0)||cn.forEach(function(Vr){var ji;Vr==null||((ji=Vr.tag_disciplines)===null||ji===void 0)||ji.forEach(function(ta){ta.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&ot.push(ta)})})}if(Je&&$e){var Oi,Hn,bi,Ei,mi=Kt==null||((Oi=Kt.disciplinesData)===null||Oi===void 0||((Hn=Oi.disciplines)===null||Hn===void 0))?void 0:Hn.find(function(Vr){return Vr.id===Je}),Ri=mi==null||((bi=mi.sub_disciplines)===null||bi===void 0)?void 0:bi.find(function(Vr){return Vr.id===$e});Ri==null||((Ei=Ri.tag_disciplines)===null||Ei===void 0)||Ei.forEach(function(Vr){Vr.name!=="\u672A\u5339\u914D\u77E5\u8BC6\u70B9"&&ot.push(Vr)})}return ot},Ea=function(){var it=Object(_.a)(T.a.mark(function Je(){return T.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:zt({type:"problemset/getTeachGroupData"});case 1:case"end":return ot.stop()}},Je)}));return function(){return it.apply(this,arguments)}}();Object(M.useEffect)(function(){var it=Kt.basketData||{},Je=it.completion_questions_count,$e=Je===void 0?0:Je,ot=it.judgement_questions_count,ut=ot===void 0?0:ot,At=it.multiple_questions_count,St=At===void 0?0:At,wt=it.practical_questions_count,cn=wt===void 0?0:wt,nr=it.program_questions_count,Oi=nr===void 0?0:nr,Hn=it.single_questions_count,bi=Hn===void 0?0:Hn,Ei=it.subjective_questions_count,mi=Ei===void 0?0:Ei,Ri=it.combination_questions_count,Vr=Ri===void 0?0:Ri,ji=$e+ut+St+cn+Oi+bi+mi+Vr;$a(ji)},[Kt.basketData]);var ti=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return ot=Object(g.a)({},$e),ot.item_type=tt?"PROGRAM":$e.item_type,Zr(!0),ot.keyword=encodeURIComponent($e.keyword||""),St.next=6,zt({type:"problemset/getItemBanks",payload:ot});case 6:if(ut=St.sent,!(ut&&ut.status!==403&&ut.status!==401&&ut.status!==500)){St.next=18;break}return ii(ut.items_count||0),Bt(ut.items||[]),vr(ut.tag_disciplines||[]),ve(ut.used_shixun_ids||[]),ja(ut.items||[]),tt||Be([]),lo((ut==null?void 0:ut.navigation)||[]),pn((ut==null?void 0:ut.added_num)||0),Zr(!1),St.abrupt("return",ut);case 18:case"end":return St.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),Yi=function(){zt({type:"problemset/getBasketList",payload:{}})},ja=function(Je){var $e=Je.every(function(ot){var ut;return((ut=ot.program_attr)===null||ut===void 0?void 0:ut.status)===0});_a.current=$e},Io=function(Je,$e){if(ke.discipline_id=Je||"",ke.sub_discipline_id=$e||"",ke.tag_discipline_id="",ke.page=1,ke.per_page=20,delete ke.id,gr(Je===null?-1:null),Vt(ke),ti(ke),Je===null)return},Po=function(Je){ke.item_type=Je||"",ke.page=1,ke.per_page=20,Vt(ke),ti(ke)},mo=function(Je){ke.difficulty=Je||"",ke.page=1,ke.per_page=20,delete ke.id,Vt(ke),ti(ke)},Ja=function(Je){ke.tag_discipline_id=Je,ke.page=1,ke.per_page=20,delete ke.id,Je===-1&&(ke.discipline_id="",ke.sub_discipline_id="",ke.tag_discipline_id=""),gr(Je),Vt(ke),ti(ke)},qa=Object(M.useState)(!1),da=Object(h.a)(qa,2),xa=da[0],go=da[1],Ba=function(Je){zt({type:"problemset/getDisciplines",payload:{source:"question",group_id:0,group_type:Je}}),ke.discipline_id="",ke.sub_discipline_id="",ke.tag_discipline_id="",ke.item_type=null,ke.difficulty=null,ke.type=Je,Je==="0"?ke.group_id=0:ke.group_id=null,Je==="3"&&tt?ke.only_published=!0:ke.only_published=null,Je==="3"?go(!0):go(!1),ke.page=1,ke.per_page=20,delete ke.id,gr(-1),oi(Je),Vt(ke),ti(ke)},Ta=function(Je,$e){ke.page=Je,ke.per_page=$e,Vt(ke),ti(ke)},ha=function(Je){ke.discipline_id="",ke.sub_discipline_id="",ke.tag_discipline_id="",ke.item_type=null,ke.difficulty=null,ke.page=1,ke.keyword=Je,delete ke.id,Je?(Qa(!0),Object(L.a)({name:Je,copywriting:Je,position:tt?"Practice":"ItemBank"})):Qa(!1),gr(-1),Vt(ke),ti(ke)},kr=function(){ke.per_page=20,Vt(ke),ti(ke)},Pi=function(Je){var $e=Je.length===jn.length&&ke.page>1?ke.page-1:ke.page;ke.page=$e,ke.per_page=20,Yi(),Vt(ke),ti(ke)},fa=function(){zt({type:"problemset/setActionTabs",payload:{key:"Problemset-PublicReview"}})},aa=function(){var it=Object(_.a)(T.a.mark(function Je($e,ot){var ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(!ot){St.next=6;break}return St.next=3,Object(Ke.n)({id:$e});case 3:St.t0=St.sent,St.next=9;break;case 6:return St.next=8,Object(Ke.G)({id:$e});case 8:St.t0=St.sent;case 9:ut=St.t0,(ut==null?void 0:ut.status)===0&&kr();case 11:case"end":return St.stop()}},Je)}));return function($e,ot){return it.apply(this,arguments)}}(),Sa=function(){var it=Object(_.a)(T.a.mark(function Je($e){return T.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:Ka($e);case 1:case"end":return ut.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),pa=function(){var it=Object(_.a)(T.a.mark(function Je($e){return T.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:Ha([$e]);case 1:case"end":return ut.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),Fa=function(Je){Ee.current="",ba.current="",R.a.confirm({centered:!0,width:530,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BD5\u9898\u7EA0\u9519",content:m.a.createElement("div",{className:"font14"},m.a.createElement("div",null,"\u9519\u8BEF\u7C7B\u578B\uFF1A"),m.a.createElement(A.a.Group,{className:"mt10",onChange:function(ot){return ba.current=ot.target.value}},m.a.createElement(A.a,{value:"\u9898\u5E72"},"\u9898\u5E72"),m.a.createElement(A.a,{value:"\u7B54\u6848"},"\u7B54\u6848"),m.a.createElement(A.a,{value:"\u89E3\u6790"},"\u89E3\u6790"),m.a.createElement(A.a,{value:"\u5C5E\u6027"},"\u5C5E\u6027"),m.a.createElement(A.a,{value:"\u5176\u5B83"},"\u5176\u5B83")),m.a.createElement("div",{className:"mt10"},"\u9519\u8BEF\u63CF\u8FF0\uFF1A"),m.a.createElement(vt,{className:"mt10",rows:4,defaultValue:Ee.current,onChange:function(ot){return Ee.current=ot.target.value}})),onOk:function(){return new Promise(function(){var ot=Object(_.a)(T.a.mark(function ut(At,St){var wt;return T.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(ba.current&&Ee.current){nr.next=3;break}return i.b.info("\u8BF7\u586B\u5199\u9519\u8BEF\u7C7B\u578B\u548C\u9519\u8BEF\u63CF\u8FF0\uFF01"),nr.abrupt("return",St());case 3:return nr.next=5,Object(Ke.o)({id:Je,clazz:ba.current,description:Ee.current});case 5:wt=nr.sent,wt.status===0&&i.b.info("\u6DFB\u52A0\u6210\u529F\uFF01"),At();case 8:case"end":return nr.stop()}},ut)}));return function(ut,At){return ot.apply(this,arguments)}}())}})},eo=function(Je){zt({type:"problemset/setActionTabs",payload:{key:"Problemset-SetPrivate",params:{id:Je}}})},Wa=function(Je){zt({type:"problemset/setActionTabs",payload:{key:"Problemset-Delete",params:{id:Je}}})},to=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut,At,St;return T.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(ot=$e.item_type,!(ot==="PROGRAM")){cn.next=12;break}return ut=$e.program_attr.identifier,cn.next=5,zt({type:"problemset/startExperience",payload:{id:ut}});case 5:if(At=cn.sent,!(At.status===0)){cn.next=10;break}return St=At.identifier,Object(Dr.S)("/myproblems/".concat(St)),cn.abrupt("return");case 10:return i.b.warn(At.message),cn.abrupt("return");case 12:zt({type:"problemset/setActionTabs",payload:{key:ot,params:$e}});case 13:case"end":return cn.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),qi=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut,At;return T.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!ke.exam_id){wt.next=6;break}return wt.next=3,Object(Ke.M)({item_id:$e,id:ke.exam_id});case 3:return ot=wt.sent,ot.status===0&&kr(),wt.abrupt("return");case 6:if(!(ke!=null&&ke.exercise_id)){wt.next=12;break}return wt.next=9,Object(fn.a)("/api/exercise_questions/delete_by_item_bank.json ",{method:"post",body:{exercise_id:ke==null?void 0:ke.exercise_id,item_bank_ids:[$e]}});case 9:return ut=wt.sent,ut.status===0&&kr(),wt.abrupt("return");case 12:return wt.next=14,zt({type:"problemset/cancel",payload:{id:$e,item_bank:1}});case 14:At=wt.sent,At.status===0&&(kr(),Yi());case 16:case"end":return wt.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),oa=function(){var it=Object(_.a)(T.a.mark(function Je($e){return T.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:zt({type:"problemset/getDisciplines",payload:{source:"question",group_id:Math.abs($e),group_type:Gt.Mine}}),ke.discipline_id="",ke.sub_discipline_id="",ke.tag_discipline_id="",ke.page=1,ke.per_page=20,ke.group_id=Math.abs($e),gr(-1),Vt(ke),ti(ke).then(function(At){return Qr(At==null?void 0:At.item_banks_group)});case 10:case"end":return ut.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),no=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut,At;return T.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!ke.exam_id){wt.next=6;break}return wt.next=3,Object(Ke.t)({exam_id:ke.exam_id,item_bank_ids:[$e]});case 3:return ot=wt.sent,ot.status===0&&kr(),wt.abrupt("return");case 6:if(!(ke!=null&&ke.exercise_id)){wt.next=12;break}return wt.next=9,Object(fn.a)("/api/exercises/".concat(ke==null?void 0:ke.exercise_id,"/select_questions.json"),{method:"post",body:{item_bank_ids:[$e]}});case 9:return ut=wt.sent,ut.status===0&&kr(),wt.abrupt("return");case 12:if(!(ya===200)){wt.next=15;break}return i.b.info("\u5DF2\u9009200\u4E2A\u8BD5\u9898\uFF08\u4E0D\u80FD\u5728\u9009\u7528\u66F4\u591A\u8BD5\u9898\uFF09"),wt.abrupt("return");case 15:return wt.next=17,zt({type:"problemset/select",payload:{item_bank_ids:[$e]}});case 17:At=wt.sent,At.status===0&&(kr(),Yi());case 19:case"end":return wt.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),ro=function(){var it=Object(_.a)(T.a.mark(function Je($e){return T.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if($e){ut.next=3;break}if(_e!=null&&_e.length){ut.next=3;break}return ut.abrupt("return",i.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898"));case 3:Le.current=[0],R.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u79FB\u52A8\u5230",maskClosable:!0,className:"custom-modal-divider",icon:null,content:m.a.createElement("div",{className:"font14 ".concat(me.a.overflow),style:{maxHeight:500,overflow:"auto"}},m.a.createElement("p",{className:"c-grey-333"},"\u8BF7\u9009\u62E9\u9700\u8981\u79FB\u52A8\u5230\u7684\u6587\u4EF6\u5939"),m.a.createElement(ae.a,{defaultValue:!0,value:Le.current,onChange:function(St){return Le.current=St}})),onOk:function(){var At=Object(_.a)(T.a.mark(function wt(){var cn,nr;return T.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(Ke.f)({ids:$e?[$e]:_e,groups_ids:(cn=Le.current)===null||cn===void 0?void 0:cn[0]});case 2:nr=Hn.sent,Le.current=[],(nr==null?void 0:nr.status)===0&&kr();case 5:case"end":return Hn.stop()}},wt)}));function St(){return At.apply(this,arguments)}return St}()});case 5:case"end":return ut.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),ko=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.next=2,Object(Ke.D)({clazz:"ItemBank",id:$e});case 2:ot=St.sent,ut=(ot==null?void 0:ot.groups)||[],Le.current=[],R.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A\u64A4\u9500",cancelText:"\u53D6\u6D88",title:"\u672C\u9898\u5DF2\u5171\u4EAB\u7684\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:m.a.createElement("div",{className:"font14 ".concat(me.a.overflow)},m.a.createElement("p",{className:"c-grey-999"},"\u9009\u4E2D\u5E76\u786E\u5B9A\uFF0C\u5373\u64A4\u9500\u672C\u9898\u5BF9\u9009\u4E2D\u6559\u7814\u56E2\u961F\u7684\u5206\u4EAB"),m.a.createElement(u.a.Group,{className:me.a.checkbox,defaultValue:Le.current,onChange:function(cn){return Le.current=cn}},ut==null?void 0:ut.map(function(wt){return m.a.createElement(u.a,{key:wt.group_id,value:wt.group_id},wt.name)}))),onOk:function(){var wt=Object(_.a)(T.a.mark(function nr(){return T.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.abrupt("return",new Promise(function(){var bi=Object(_.a)(T.a.mark(function Ei(mi,Ri){var Vr,ji,ta;return T.a.wrap(function(Bi){for(;;)switch(Bi.prev=Bi.next){case 0:if(Le.current.length){Bi.next=3;break}return i.b.warn("\u8BF7\u9009\u62E9\u9700\u8981\u64A4\u9500\u5171\u4EAB\u7684\u6559\u7814\u56E2\u961F"),Bi.abrupt("return",Ri());case 3:return ji=ut==null||((Vr=ut.map(function(_o){return _o.group_id}))===null||Vr===void 0)?void 0:Vr.filter(function(_o){return!Le.current.includes(_o)}),Bi.next=6,Object(Ke.l)({ids:[$e],clazz:"ItemBank",group_ids:ji});case 6:return ta=Bi.sent,Le.current=[],(ta==null?void 0:ta.status)===0&&(i.b.info("\u64A4\u9500\u5171\u4EAB\u6210\u529F"),kr()),Bi.abrupt("return",mi());case 10:case"end":return Bi.stop()}},Ei)}));return function(Ei,mi){return bi.apply(this,arguments)}}()));case 1:case"end":return Hn.stop()}},nr)}));function cn(){return wt.apply(this,arguments)}return cn}()});case 6:case"end":return St.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),Mo=function(Je){zt({type:"problemset/setActionTabs",payload:{key:"Problemset-BasketDelete",params:{type:Je}}})},io=function(){zt({type:"problemset/setActionTabs",payload:{key:"\u65B0\u5EFA\u6587\u4EF6\u5939",params:ke}});return},No=function(){var Je={discipline_id:"&discipline_id=".concat(ke.discipline_id),sub_discipline_id:"&sub_discipline_id=".concat(ke.sub_discipline_id),tag_discipline_id:"&sub_discipline_id=".concat(ke.tag_discipline_id),difficulty:"&difficulty=".concat(ke.difficulty),item_type:"&item_type=".concat(ke.item_type),group_id:"&group_id=".concat(ke.group_id||0)},$e="/problemset/newitem?pages=".concat(ke.page);Object.keys(Je).forEach(function(ot){ke[ot]&&($e=$e+Je[ot])}),v.d===null||v.d===void 0||v.d.push($e)},ni=function(Je){var $e=_e;if(!($e!=null&&$e.length))return i.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898");if(ya+$e.length>200&&Je&&Ge){i.b.info("\u8BD5\u9898\u7BEE\u4E2D\u6700\u591A\u53EF\u518D\u52A0\u5165".concat(200-ya,"\u9898\uFF0C\u5F53\u524D\u9009\u4E2D").concat($e.length,"\u9898\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9"));return}Je?Jr($e):pi($e)},Jr=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot;return T.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:ot=Object(O.a)($e),jn.forEach(function(St){if(ot.includes(St.id)){var wt;St.item_type==="PROGRAM"&&((wt=St.program_attr)===null||wt===void 0?void 0:wt.status)===0&&Object(ft.remove)(ot,function(cn){return cn===St.id})}}),R.a.confirm({width:530,title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:m.a.createElement("div",null,"\u5F53\u524D\u5DF2\u9009\u62E9",$e.length,"\u9053\u8BD5\u9898\uFF0C\u5DF2\u52A0\u5165\u8FC7\u7684\u8BD5\u9898\u6216\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\u5C06\u4E0D\u4F1A\u91CD\u590D\u52A0\u5165"," "),onOk:function(){var St=Object(_.a)(T.a.mark(function cn(){var nr;return T.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(!ke.exam_id){Hn.next=6;break}return Hn.next=3,Object(Ke.t)({exam_id:ke.exam_id,item_bank_ids:ot});case 3:nr=Hn.sent,Hn.next=15;break;case 6:if(!(ke!=null&&ke.exercise_id)){Hn.next=12;break}return Hn.next=9,Object(fn.a)("/api/exercises/".concat(ke==null?void 0:ke.exercise_id,"/select_questions.json"),{method:"post",body:{item_bank_ids:ot}});case 9:nr=Hn.sent,Hn.next=15;break;case 12:return Hn.next=14,zt({type:"problemset/select",payload:{item_bank_ids:ot}});case 14:nr=Hn.sent;case 15:nr.status===0&&(kr(),Yi());case 16:case"end":return Hn.stop()}},cn)}));function wt(){return St.apply(this,arguments)}return wt}()});case 3:case"end":return At.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),pi=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot;return T.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!ke.exam_id){At.next=6;break}return At.next=3,Object(fn.a)("/api/examination_banks/".concat(ke.exam_id,"/batch_revoke_item.json"),{method:"post",body:{item_ids:$e}});case 3:ot=At.sent,At.next=15;break;case 6:if(!(ke!=null&&ke.exercise_id)){At.next=12;break}return At.next=9,Object(fn.a)("/api/exercise_questions/delete_by_item_bank.json ",{method:"post",body:{exercise_id:ke==null?void 0:ke.exercise_id,item_bank_ids:$e}});case 9:ot=At.sent,At.next=15;break;case 12:return At.next=14,zt({type:"problemset/unselectAll",payload:{item_ids:$e}});case 14:ot=At.sent;case 15:ot.status===0&&(kr(),Yi());case 16:case"end":return At.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),qr=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot;return T.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!(Ge&&ya===200)){At.next=3;break}return i.b.info("\u5DF2\u9009200\u4E2A\u8BD5\u9898\uFF08\u4E0D\u80FD\u5728\u9009\u7528\u66F4\u591A\u8BD5\u9898\uFF09"),At.abrupt("return");case 3:if(!ke.exam_id){At.next=10;break}return At.next=6,Object(Ke.t)({exam_id:ke.exam_id,shixun_ids:$e});case 6:ot=At.sent,ot.status===0&&kr(),At.next=14;break;case 10:return At.next=12,zt({type:"problemset/select",payload:{shixun_ids:$e}});case 12:ot=At.sent,ot.status===0&&(Yi(),kr());case 14:case"end":return At.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),Aa=function(){zt({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}})},Ha=function(Je){var $e,ot,ut,At;if(!(($e=Kt.teachGroupData)!==null&&$e!==void 0&&(ot=$e.groups)!==null&&ot!==void 0&&ot.length))return i.b.info("\u60A8\u6682\u672A\u521B\u5EFA\u6216\u52A0\u5165\u4EFB\u4F55\u6559\u7814\u56E2\u961F\uFF0C\u8BF7\u524D\u5F80\u201C\u6211\u7684\u4E2A\u4EBA\u4E2D\u5FC3-\u6559\u7814\u56E2\u961F\u201D\u67E5\u770B");R.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5171\u4EAB\u81F3\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:m.a.createElement("div",{className:"font14 ".concat(me.a.overflow)},m.a.createElement(u.a.Group,{className:me.a.checkbox,defaultValue:Le.current,onChange:function(wt){return Le.current=wt}},(ut=Kt.teachGroupData)===null||ut===void 0||((At=ut.groups)===null||At===void 0)?void 0:At.map(function(St){return m.a.createElement(u.a,{key:St.group_id,value:St.group_id},St.name)}))),onOk:function(){return new Promise(function(){var wt=Object(_.a)(T.a.mark(function cn(nr,Oi){var Hn,bi;return T.a.wrap(function(mi){for(;;)switch(mi.prev=mi.next){case 0:if((Hn=Le.current)!==null&&Hn!==void 0&&Hn.length){mi.next=3;break}return i.b.info("\u8BF7\u5148\u9009\u62E9\u6559\u7814\u56E2\u961F"),mi.abrupt("return",Oi());case 3:return mi.next=5,Object(Ke.l)({ids:Je||_e,clazz:"ItemBank",group_ids:Le.current});case 5:bi=mi.sent,(bi==null?void 0:bi.status)===0&&(i.b.info("\u6240\u9009\u8BD5\u9898\u6210\u529F\u5206\u4EAB\u81F3\u6559\u7814\u56E2\u961F"),Le.current=[],Be([]),kr(),nr());case 7:case"end":return mi.stop()}},cn)}));return function(cn,nr){return wt.apply(this,arguments)}}())}})},ki=function(){var Je=function(){var $e=Object(_.a)(T.a.mark(function ot(){var ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return ka(!0),St.next=3,Object(Ke.j)({ids:_e});case 3:ut=St.sent,ka(!1),(ut==null?void 0:ut.status)===0&&R.a.info({centered:!0,width:530,className:"custom-modal-divider ",okText:"\u786E\u5B9A",title:"\u5220\u9664\u7ED3\u679C",maskClosable:!1,keyboard:!1,icon:null,content:"\u672C\u6B21\u6210\u529F\u5220\u9664".concat(ut.success,"\u6761\u8BD5\u9898\uFF0C\u6709").concat(ut.fail,"\u6761\u8BD5\u9898\u56E0\u4E3A\u516C\u5F00\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u64A4\u9500\u540E\u518D\u8FDB\u884C\u5220\u9664\u3002"),onOk:function(){Pi(new Array(ut.success))}});case 6:case"end":return St.stop()}},ot)}));return function(){return $e.apply(this,arguments)}}();if(_e!=null&&_e.length){R.a.confirm({centered:!0,width:530,className:"custom-modal-divider ",okText:"\u786E\u5B9A",title:"\u63D0\u793A",cancelText:"\u53D6\u6D88",icon:null,content:"\u672C\u6B21\u9009\u4E2D\u4E86".concat(_e==null?void 0:_e.length,"\u6761\u8BD5\u9898\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF0C\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\uFF1F"),onOk:Je});return}i.b.warn("\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u8BD5\u9898")},ao=function(){var Je,$e;if(!(_e!=null&&_e.length))return i.b.info("\u8BF7\u5148\u9009\u62E9\u8BD5\u9898");if(jn!=null&&(Je=jn.filter(function(ot){return _e.includes(ot.id)}))!==null&&Je!==void 0&&Je.every(function(ot){return ot.public}))return i.b.info("\u6240\u9009\u8BD5\u9898\u5DF2\u516C\u5F00\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9");if(jn!=null&&($e=jn.filter(function(ot){return _e.includes(ot.id)}))!==null&&$e!==void 0&&$e.find(function(ot){var ut;return ot.item_type==="PROGRAM"&&((ut=ot.program_attr)===null||ut===void 0?void 0:ut.status)===0}))return i.b.info("\u5DF2\u9009\u9898\u4E2D\u5B58\u5728\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898");window.localStorage.getItem("problemset-set-public-hint-flag")==="1"||An.userInfo.professional_certification?Ka():R.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u516C\u5F00\u89C4\u5219\u544A\u77E5",maskClosable:!0,icon:null,content:m.a.createElement("div",{className:"font16 c-grey-333"},"\u516C\u5F00\u5E76\u7ECF\u5E73\u53F0\u5BA1\u6838\u540E\uFF0C\u8BE5\u9898\u5C06\u5728\u516C\u5171\u8BD5\u9898\u5E93\u53EF\u89C1\uFF0CEducoder\u6240\u6709\u7528\u6237\u5747\u53EF\u4F7F\u7528\u8BE5\u9898\u3002",m.a.createElement("br",null),"\u516C\u5F00\u540E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u4F46\u53EF\u4EE5\u64A4\u9500\uFF1B\u64A4\u9500\u516C\u5F00\u540E\u53EF\u4EE5\u4FEE\u6539\u3002",m.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u7533\u8BF7\u516C\u5F00\uFF1F",m.a.createElement("br",null),m.a.createElement(u.a,{className:"mt10",defaultChecked:!1,onChange:function(ut){return je.current=ut.target.checked}},"\u4E0D\u518D\u63D0\u793A")),onOk:function(){Ka()}})},Ka=function(){var it=Object(_.a)(T.a.mark(function Je($e){var ot,ut;return T.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return ot=Yn===Gt.TeachGroupShare?1:2,St.next=3,Object(Ke.g)({ids:$e?[$e]:_e,source:ot});case 3:ut=St.sent,ut.status===0&&(je.current&&window.localStorage.setItem("problemset-set-public-hint-flag","1"),je.current=!1,Be([]),kr());case 5:case"end":return St.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),vo=function(Je){R.a.confirm({centered:!0,icon:null,title:"\u63D0\u793A",className:"custom-modal-divider",content:m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:me.a.modalContent},"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802"),m.a.createElement("div",{className:me.a.modalContent}," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var $e=Object(_.a)(T.a.mark(function ut(){var At;return T.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(Ke.L)({identifier:Je});case 2:At=wt.sent,(At==null?void 0:At.status)===0&&(i.b.success("\u53D1\u5E03\u6210\u529F"),kr());case 4:case"end":return wt.stop()}},ut)}));function ot(){return $e.apply(this,arguments)}return ot}()})},ma=function(Je){R.a.confirm({centered:!0,icon:null,title:"\u63D0\u793A",className:"custom-modal-divider",content:m.a.createElement("p",{className:me.a.modalContent},"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var $e=Object(_.a)(T.a.mark(function ut(){var At;return T.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(Ke.K)({identifier:Je});case 2:At=wt.sent,(At==null?void 0:At.status)===0&&(i.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),kr());case 4:case"end":return wt.stop()}},ut)}));function ot(){return $e.apply(this,arguments)}return ot}()})},Ga=function(){var it=Object(_.a)(T.a.mark(function Je($e){return T.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:zt({type:"problemset/getDisciplines",payload:{source:"question",group_id:$e,group_type:Gt.TeachGroupShare}}),ke.page=1,ke.group_id=$e||null,delete ke.id,Vt(Object(g.a)({},ke)),ti(ke);case 6:case"end":return ut.stop()}},Je)}));return function($e){return it.apply(this,arguments)}}(),Oa=function(Je){ke.sort_by=Je.type,ke.sort_direction=Je.direction,ke.page=1,ke.per_page=20,Br(Je.name),Vt(ke),ti(ke)},yo=function(){ke.page=1,Vt(ke),ti(ke)},za=function(Je){ke.discipline_id="",ke.sub_discipline_id="",ke.tag_discipline_id="",ke.item_type=null,ke.difficulty=null,ke.page=1,ke.per_page=20,ke.group_id=Je,gr(-1),Vt(ke),ti(ke).then(function($e){return Qr($e==null?void 0:$e.item_banks_group)})},_r=function(){if(!(_e!=null&&_e.length)){zt({type:"problemset/setActionTabs",payload:{key:"\u5BFC\u51FA\u8BD5\u9898",params:ke}});return}R.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5BFC\u51FA\u63D0\u793A",maskClosable:!0,icon:null,content:m.a.createElement("div",{className:"font14 ".concat(me.a.overflow)},"\u5DF2\u9009\u4E2D",_e==null?void 0:_e.length,"\u9053\u9898\uFF0C\u5176\u4E2D\u7F16\u7A0B\u9898\u4E0E\u5B9E\u8BAD\u9898\u6682\u4E0D\u652F\u6301\u5BFC\u51FA\u3002"),onOk:function(){Object(Et.k)({ids:_e})}})},or=function(){var it=Object(_.a)(T.a.mark(function Je(){var $e,ot,ut,At;return T.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(Ke.i)({ids:_e});case 2:$e=wt.sent,ot=$e.data||{},ut=ot.unpublish_program_question_count,At=ot.total_item_banks,ut===0?R.a.error({title:"\u9519\u8BEF",content:m.a.createElement("span",null,"\u53D1\u5E03\u9519\u8BEF\uFF01\u8BF7\u9009\u62E9\u5C1A\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\u8FDB\u884C\u53D1\u5E03"),centered:!0,okText:"\u786E\u8BA4"}):R.a.confirm({title:"\u63D0\u793A",content:m.a.createElement("span",null,"\u5F53\u524D\u9009\u4E2D",At,"\u9898\uFF0C\u5176\u4E2D\u5305\u542B",ut,"\u9053\u672A\u53D1\u5E03\u7684\u7F16\u7A0B\u9898\uFF0C \u8BF7\u786E\u8BA4\u662F\u5426\u53D1\u5E03\uFF1F"),centered:!0,onOk:function(){var cn=Object(_.a)(T.a.mark(function Oi(){var Hn;return T.a.wrap(function(Ei){for(;;)switch(Ei.prev=Ei.next){case 0:return Ei.next=2,Object(Ke.h)({ids:_e});case 2:Hn=Ei.sent,Hn.status===0&&(i.b.success("\u53D1\u5E03\u6210\u529F"),kr());case 4:case"end":return Ei.stop()}},Oi)}));function nr(){return cn.apply(this,arguments)}return nr}()});case 5:case"end":return wt.stop()}},Je)}));return function(){return it.apply(this,arguments)}}(),ci=m.a.createElement(p.a,null,Wn&&m.a.createElement(p.a.Item,{onClick:function(){return ni(!0)}},"\u6279\u91CF\u52A0\u5165"),Wn&&m.a.createElement(p.a.Item,{onClick:function(){return ni(!1)}},"\u6279\u91CF\u79FB\u51FA"),Yn===Gt.Mine&&Ge&&m.a.createElement(p.a.Item,{onClick:function(){return ro()}},"\u79FB\u52A8\u5230"),Yn===Gt.Mine&&Ge&&m.a.createElement(p.a.Item,{onClick:ao},"\u6279\u91CF\u516C\u5F00"),Yn===Gt.Mine&&Ge&&m.a.createElement(p.a.Item,{onClick:function(){return Ha()}},"\u6279\u91CF\u5171\u4EAB"),Yn===Gt.Mine&&Ge&&m.a.createElement(p.a.Item,{onClick:ki},"\u6279\u91CF\u5220\u9664")),_i=function(Je){if(tt)if((wn==null?void 0:wn.length)<=0){var $e=jn.filter(function(cn){return Je.includes(cn.id)});wr(Object(O.a)($e)),Be($e==null?void 0:$e.map(function(cn){return cn.id}))}else if(Je.length>wn.length){var ot,ut=jn.filter(function(cn){return Je.includes(cn.id)}),At=wn.map(function(cn){return cn.id}),St=ut.filter(function(cn){return!At.includes(cn.id)});wr([].concat(Object(O.a)(wn),Object(O.a)(St))),Be((ot=[].concat(Object(O.a)(wn),Object(O.a)(St)))===null||ot===void 0?void 0:ot.map(function(cn){return cn.id}))}else{var wt=wn.filter(function(cn){return Je.includes(cn.id)});wr(Object(O.a)(wt)),Be(wt==null?void 0:wt.map(function(cn){return cn.id}))}else Be(Je)},sa=function(Je){if(tt)if(Je){var $e,ot=wn==null?void 0:wn.map(function(wt){return wt.id}),ut=jn.filter(function(wt){return!ot.includes(wt.id)});wr([].concat(Object(O.a)(wn),Object(O.a)(ut))),Be(($e=[].concat(Object(O.a)(wn),Object(O.a)(ut)))===null||$e===void 0?void 0:$e.map(function(wt){return wt.id}))}else{var At=jn==null?void 0:jn.map(function(wt){return wt.id}),St=wn.filter(function(wt){return!At.includes(wt.id)});wr(Object(O.a)(St)),Be(St==null?void 0:St.map(function(wt){return wt.id}))}else Be(Je?jn==null?void 0:jn.map(function(wt){return wt.id}):[])},ea=function(){var Je="/problemset/preview";if(ke.exam_id&&(Je="/paperlibrary/edit/".concat(ke.exam_id)),ke!=null&&ke.exercise_id){var $e;Je="/classrooms/".concat(jt==null||(($e=jt.params)===null||$e===void 0)?void 0:$e.coursesId,"/exercise/").concat(ke==null?void 0:ke.exercise_id,"/edit")}v.d.push(Je)},Ra=[{type:"SINGLE",name:"\u5355\u9009\u9898"},{type:"MULTIPLE",name:"\u591A\u9009\u9898"},{type:"JUDGMENT",name:"\u5224\u65AD\u9898"},{type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},{type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},{type:"COMPLETION",name:"\u586B\u7A7A\u9898"},{type:"COMBINATION",name:"\u7EC4\u5408\u9898"}],la={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},li=function(Je,$e){var ot,ut=$e.id<0?"--":Wn?$e[ke.exercise_id?"added":"choosed"]?m.a.createElement("span",{key:1,className:me.a.btnAdd,onClick:function(wt){wt.target.style.pointerEvents="none",qi($e.id)}},Ge?"\u79FB\u51FA\u8BD5\u9898\u7BEE":m.a.createElement("span",null,m.a.createElement("b",{className:"iconfont icon-yichu ".concat(me.a.cancelC)}),"\u79FB\u51FA")):$e.item_type==="PROGRAM"&&((ot=$e.program_attr)===null||ot===void 0?void 0:ot.status)===0?m.a.createElement(c.a,{placement:"top",title:"\u7F16\u7A0B\u9898\u672A\u53D1\u5E03\uFF0C\u4E0D\u80FD\u52A0\u5165\uFF01"},m.a.createElement("span",{className:me.a.btnAdd,style:{cursor:"not-allowed",background:"#E3E6EC",color:"#B1BACD"}}," ",Ge?"\u52A0\u5165\u8BD5\u9898\u7BEE":m.a.createElement("span",{style:{padding:"0 3px"}},m.a.createElement("b",{className:"iconfont icon-jiaru ".concat(me.a.addC)}),"\u52A0\u5165")," ")):m.a.createElement("span",{className:me.a.btnAdd,onClick:function(){return no($e.id)}},Ge?"\u52A0\u5165\u8BD5\u9898\u7BEE":m.a.createElement("span",{style:{padding:"0 3px"}},m.a.createElement("b",{className:"iconfont icon-jiaru ".concat(me.a.addC)}),"\u52A0\u5165")):m.a.createElement(m.a.Fragment,null),At=m.a.createElement("span",{className:me.a.actonBtn},$e.id>0&&m.a.createElement(br.a,{isProblemset:Ge,user:An,key:$e.id,data:$e,activeTabsKey:Yn,selectIds:_e,onCollect:aa,onSetPublic:Sa,onStartExperience:to,onCorrection:Fa,onPublicReview:fa,onSetPrivate:eo,onDelete:Wa,onCancel:qi,onSelect:no,onMoveTo:ro,onSetShare:pa,onCancelShare:ko,onPublish:vo,onCancelPublish:ma}),ut);return At};Object(M.useEffect)(function(){if(tt){var it=jt.params,Je=it.coursesId,$e=it.categoryId;zt({type:"shixunHomeworks/addCommonHomeWorkDefaultData",payload:{category:$e,coursesId:Je,type:5}})}},[tt]);var Da=function(){var it=Object(_.a)(T.a.mark(function Je(){var $e,ot,ut,At,St;return T.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Hr.current.form.validateFields().catch(function(nr){document.body.scrollIntoView()}),cn.next=3,Hr.current.form.validateFields();case 3:if($e=Hr.current.form.getFieldsValue(),console.log($e,"value"),!((wn==null?void 0:wn.length)<=0)){cn.next=8;break}return i.b.info("\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898"),cn.abrupt("return");case 8:return Fn(!0),ot=jt.params,ut=ot.coursesId,At=ot.categoryId,cn.next=12,Object(fn.a)(yt?"/api/homework_commons/".concat(At,"/update_hack.json"):"/api/courses/".concat(ut,"/homework_commons.json"),{method:yt?"put":"post",body:Object(g.a)(Object(g.a)({},$e),{},{coursesId:ut,category:At,type:5,hack_ids:wn==null?void 0:wn.map(function(nr){return nr.id})})});case 12:St=cn.sent,(St==null?void 0:St.status)===0&&v.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework/").concat(yt?At:St.homework_id,"/detail?tabs=1")),Fn(!1);case 15:case"end":return cn.stop()}},Je)}));return function(){return it.apply(this,arguments)}}();return m.a.createElement("div",{className:me.a.page},m.a.createElement("section",null,m.a.createElement("div",{className:me.a.wrap},ir.course_name&&tt&&m.a.createElement("section",{className:"animated fadeIn"},m.a.createElement("aside",{className:"mt10"},ir.category&&m.a.createElement(f.a,{separator:">"},m.a.createElement(f.a.Item,null,m.a.createElement(H.a,{to:"/classrooms/".concat(ir.course_id,"/program_homework")},ir.course_name)),m.a.createElement(f.a.Item,null,m.a.createElement(H.a,{to:"/classrooms/".concat(ir.course_id,"/program_homework")},ir.category.category_name)),m.a.createElement(f.a.Item,null,Tt)))),m.a.createElement("div",{className:me.a.title},tt?Tt:"\u8BD5\u9898\u5E93"),tt&&m.a.createElement(Z,{data:$n,ref:Hr}),m.a.createElement("div",{className:me.a.headerWrapper},m.a.createElement("div",{className:me.a.tabsWrap},m.a.createElement(j.a,{activeKey:Yn,onChange:Ba,tabBarExtraContent:m.a.createElement("div",{className:me.a.searchWrap},Yn===Gt.Mine&&Ge&&m.a.createElement(I.a,{className:me.a.addQuestionBtn,onClick:No},m.a.createElement("img",{src:V.a,className:me.a.pngIcon,alt:""}),"\u65B0\u589E\u8BD5\u9898"),m.a.createElement(rn,{allowClear:!0,suffix:m.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(me.a.searchIcon),onClick:function(){return ha(ke.keyword)}}),className:me.a.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",size:"large",onChange:function(Je){ke.keyword=Je.target.value,Vt(Object(g.a)({},ke))},onSearch:ha}))},m.a.createElement(Lt,{tab:"\u516C\u5171",key:"1"}),((Kn=Kt.teachGroupData)===null||Kn===void 0||((dn=Kn.groups)===null||dn===void 0)?void 0:dn.length)&&m.a.createElement(Lt,{tab:"\u6211\u7684\u7FA4\u7EC4",key:"3"}),!Object(Or.o)()&&!Object(Or.m)()&&!tt&&m.a.createElement(Lt,{tab:"\u6536\u85CF\u5939",key:"2"}),m.a.createElement(Lt,{tab:"\u6211\u521B\u5EFA\u7684",key:"0"}))),m.a.createElement(X.a,{showSelectAll:!1,className:me.a.select,disciplinesData:(Sn=Kt.disciplinesData)===null||Sn===void 0?void 0:Sn.disciplines,knowledgeData:Qi,directionValue:ke.discipline_id,subDisciplineValue:ke.sub_discipline_id,typeValue:ke.item_type,isprogram_homework:tt,showKnowledge:!0,name:ia,setname:Cr,difficultyValue:ke.difficulty,showShixun:!Object(Or.m)()&&!ke.exercise_id&&Yn!==Gt.TeachGroupShare&&Yn!==Gt.Public,onShixunChange:Aa,onDirectionChange:Io,onTypeChange:Po,onDifficultyChange:mo,knowledgeValue:qn,onKnowledgeChange:Ja,teachGroupData:(hr=Kt.teachGroupData)===null||hr===void 0?void 0:hr.groups,onTeachGroupChange:Ga,teachGroupValue:ke.group_id,showTeachGroup:xa})),m.a.createElement("div",{className:me.a.treeWrapper,style:{display:Yn===Gt.Mine?"block":"none"}},m.a.createElement("div",{className:me.a.treeHeader},m.a.createElement(xe.a,{data:Gr,onClick:oa}),m.a.createElement(I.a,{type:"link",onClick:io,className:me.a.exportBtn},m.a.createElement("img",{src:pt.a,alt:"",className:me.a.pngIcon}),"\u65B0\u5EFA\u6587\u4EF6\u5939")),m.a.createElement(K.a,{spinning:Ci},m.a.createElement("div",{ref:Wr,className:me.a.treeContent},m.a.createElement(Pn.a,{isProblemset:Ge,reloadData:kr,data:zr,onShare:Ha,onOpen:oa})))),m.a.createElement("div",{className:me.a.contentWrap},m.a.createElement("div",{className:me.a.batchWrap},m.a.createElement("div",{style:{flex:1,display:"flex",alignItems:"center"}},!tt&&m.a.createElement("div",{className:"font14"},m.a.createElement(F.a,{overlay:m.a.createElement(p.a,{selectedKeys:[dr]},Ua==null?void 0:Ua.map(function(it,Je){return m.a.createElement(p.a.Item,{key:it.name,onClick:function(){return Oa(it)}},it.name)}))},m.a.createElement("span",{style:{color:"#464F66"}},m.a.createElement("i",{className:"iconfont icon-paixu font14 mr5 c-light-primary"}),dr))),tt&&m.a.createElement("div",null,m.a.createElement(u.a,{checked:(jn==null?void 0:jn.filter(function(it){return wn==null?void 0:wn.map(function(Je){return Je.id}).includes(it.id)}).length)===jn.length,onChange:function(Je){return sa(Je.target.checked)}},"\u672C\u9875\u5168\u9009",m.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",_e==null?void 0:_e.length,")"))),tt&&m.a.createElement(R.a,{visible:Rr,centered:!0,width:700,okText:"\u786E\u8BA4".concat(yt?"\u7F16\u8F91":"\u65B0\u5EFA"),onCancel:function(){return yr(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:Da,confirmLoading:Vn,title:"\u67E5\u770B\u5DF2\u9009"},m.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",wn==null?void 0:wn.length,"\u4E2A"),m.a.createElement("div",{style:{height:400,overflow:"auto"}},wn==null?void 0:wn.map(function(it,Je){var $e,ot,ut,At,St,wt;return m.a.createElement("div",{key:Je,className:me.a.sendModal},m.a.createElement("div",{className:me.a.li},m.a.createElement("p",null,it==null?void 0:it.name),m.a.createElement("div",{className:me.a.bottom},m.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),m.a.createElement("i",{className:me.a.line}),m.a.createElement("span",{className:"c-grey-333"},it.difficulty===1&&"\u7B80\u5355",it.difficulty===2&&"\u9002\u4E2D",it.difficulty===3&&"\u56F0\u96BE"),m.a.createElement("i",{className:me.a.line}),m.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",m.a.createElement(c.a,{title:it==null||(($e=it.author)===null||$e===void 0)?void 0:$e.name},m.a.createElement("span",{className:"c-grey-333"},(it==null||((ot=it.author)===null||ot===void 0||((ut=ot.name)===null||ut===void 0))?void 0:ut.length)>6?(it==null||((At=it.author)===null||At===void 0||((St=At.name)===null||St===void 0))?void 0:St.substr(0,3))+"...":it==null||((wt=it.author)===null||wt===void 0)?void 0:wt.name))),m.a.createElement("i",{className:me.a.line}),m.a.createElement("span",{className:me.a.des},"\u66F4\u65B0\xA0",m.a.createElement("span",{className:"c-grey-333"},it==null?void 0:it.updated_at)))),m.a.createElement("div",{className:me.a.del,onClick:function(){_i(wn.filter(function(nr){return nr.id!==it.id}).map(function(nr){return nr.id}))}},"\u5220\u9664"))})))),m.a.createElement("div",null,Yn===Gt.Mine&&Ge&&m.a.createElement(I.a,{onClick:_r,type:"link",className:me.a.exportBtn},m.a.createElement("img",{src:Q.a,className:me.a.pngIcon}),m.a.createElement("span",null,"\u5BFC\u51FA\u8BD5\u9898")))),po?m.a.createElement("div",null,m.a.createElement(I.a,{style:{paddingLeft:0},onClick:function(){ke.page=1,ke.keyword=null,delete ke.id,Vt(ke),Qa(!1),ti(ke)},type:"link"}," ",m.a.createElement("i",{className:"iconfont icon-fanhui2 font14"}),"\u8FD4\u56DE"),m.a.createElement("span",{className:"font14 mr20 c-grey-333"},"\u641C\u7D22\u201C",decodeURIComponent(ke.keyword),"\u201D")):null,m.a.createElement("div",{className:me.a.contentListWrap},On!==0?m.a.createElement(K.a,{size:"large",spinning:Un["problemset/getItemBanks"]},jn.map(function(it,Je){var $e,ot;return m.a.createElement("div",{className:me.a.li},m.a.createElement("div",{className:me.a.top},m.a.createElement(br.b,{key:it.id,data:it,selectIds:_e,onSelectCheckBox:_i})),m.a.createElement("div",{className:me.a.bottom},m.a.createElement("p",{className:"".concat(me.a.actionLeftItem," ").concat(me.a.questionTypeName)},($e=Ra.find(function(ut){return ut.type===it.item_type}))===null||$e===void 0?void 0:$e.name),m.a.createElement("p",{className:me.a.actionLeftItem},la[it.difficulty]),m.a.createElement("p",{className:me.a.actionLeftItem},"\u521B\u5EFA\u8005",m.a.createElement("span",{className:"c-grey-333"},it==null||((ot=it.author)===null||ot===void 0)?void 0:ot.name)),m.a.createElement("p",{className:me.a.actionLeftItem},"\u66F4\u65B0",m.a.createElement("span",{className:"c-grey-333"},it==null?void 0:it.updated_at)),m.a.createElement("p",{className:me.a.actionLeftItem},"\u4F7F\u7528\u6B21\u6570",m.a.createElement("span",{className:"c-grey-333"},it==null?void 0:it.quotes)),!tt&&m.a.createElement("div",{className:me.a.more},li({},it))))})):m.a.createElement(K.a,{size:"large",spinning:Un["problemset/getItemBanks"]},m.a.createElement(re.a,null))),On!==0&&!tt&&m.a.createElement(z.a,{showQuickJumper:!0,onChange:Ta,defaultCurrent:1,pageSize:ke==null?void 0:ke.per_page,current:ke.page||1,total:On,showTotal:function(Je){return m.a.createElement("span",{className:"mr10"},"\u5171",m.a.createElement("span",{className:"c-light-primary"},Je),"\u6761\u6570\u636E")}}),tt&&m.a.createElement("div",{style:{height:20}})),Ge&&m.a.createElement(en,{basketData:Kt.basketData,visible:Ca,basketTotal:ya,onClose:function(){return ho(!1)},onDelete:Mo}),!Object(Or.m)()&&Ge&&m.a.createElement(Sr,{visibleBasket:Ca,onToggleVisible:function(){return ho(!Ca)},count:ya})),m.a.createElement(fe,null),m.a.createElement(Ue,{onReloadData:kr}),m.a.createElement(lt,{onReloadData:function(){return Pi([null])}}),m.a.createElement($t,{onReloadData:kr,onReloadBasketData:Yi}),Nn.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?m.a.createElement(Ai,{shixunIds:ie,cb:qr}):null,m.a.createElement(gt,null),m.a.createElement(Ze,null),m.a.createElement(Ot,null),m.a.createElement(st,null),m.a.createElement(He,null),m.a.createElement(De,{onOk:yo}),m.a.createElement(q.a,{onOk:za})),Ge?m.a.createElement(M.Fragment,null,!!(_e!=null&&_e.length)&&m.a.createElement("div",{className:me.a.batch},m.a.createElement("aside",null,m.a.createElement("div",{style:{flexShrink:0,marginRight:20}},m.a.createElement(u.a,{className:"font14",checked:jn!=null&&jn.length?_e.length===(jn==null?void 0:jn.length):!1,onChange:function(Je){return sa(Je.target.checked)}},"\u672C\u9875\u5168\u9009",m.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",_e==null?void 0:_e.length,")"))),m.a.createElement("div",{className:me.a.btns},Wn&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return ni(!0)}},m.a.createElement("i",{className:"iconfont icon-piliangjiaru"}),"\u6279\u91CF\u52A0\u5165"),Wn&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return ni(!1)}},m.a.createElement("i",{className:"iconfont icon-piliangyichu"}),"\u6279\u91CF\u79FB\u51FA"),Yn===Gt.Mine&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return ro()}},m.a.createElement("i",{className:"iconfont icon-yidongmulu font16"}),"\u6279\u91CF\u79FB\u52A8"),Yn===Gt.Mine&&m.a.createElement("div",{className:me.a.btn,onClick:ao}," ",m.a.createElement("i",{className:"iconfont icon-pilianggongkai"}),"\u6279\u91CF\u516C\u5F00"),Yn===Gt.Mine&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return Ha()}}," ",m.a.createElement("i",{className:"iconfont icon-pilianggongxiang"}),"\u6279\u91CF\u5171\u4EAB"),Yn===Gt.Mine&&m.a.createElement("div",{className:me.a.btn,onClick:ki}," ",m.a.createElement("i",{className:"iconfont icon-piliangshanchu3 c-red"}),"\u6279\u91CF\u5220\u9664"),Yn===Gt.Mine&&m.a.createElement("div",{className:me.a.btn,onClick:or}," ",m.a.createElement("i",{className:"iconfont icon-fabu5"}),"\u6279\u91CF\u53D1\u5E03"),m.a.createElement("div",{onClick:function(){return Be([])},style:{marginLeft:"auto"},className:me.a.btn}," ",m.a.createElement("i",{className:"iconfont icon-piliangcaozuoicon2"}),"\u53D6\u6D88\u64CD\u4F5C"))))):tt?"":m.a.createElement("div",{className:me.a.batch},m.a.createElement("aside",null,m.a.createElement("div",{style:{flexShrink:0,marginRight:20}},m.a.createElement(u.a,{className:"font14",checked:jn!=null&&jn.length?_e.length===(jn==null?void 0:jn.length):!1,onChange:function(Je){return sa(Je.target.checked)}},"\u672C\u9875\u5168\u9009",m.a.createElement("span",{style:{color:"#999",fontSize:12}},"/\u5DF2\u9009(",_e==null?void 0:_e.length,")"))),m.a.createElement("div",{className:me.a.btns},Wn&&!!(_e!=null&&_e.length)&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return ni(!0)}},m.a.createElement("i",{className:"iconfont icon-piliangjiaru"}),"\u6279\u91CF\u52A0\u5165"),Wn&&!!(_e!=null&&_e.length)&&m.a.createElement("div",{className:me.a.btn,onClick:function(){return ni(!1)}},m.a.createElement("i",{className:"iconfont icon-piliangyichu"}),"\u6279\u91CF\u79FB\u51FA"),m.a.createElement("div",{className:"c-grey-333 font12 mr40",style:{marginLeft:"auto"}},"\u5DF2\u52A0\u5165:\xA0\xA0",Yt,"\u9898"),m.a.createElement("div",{onClick:ea,className:me.a.btn},"\u8FD4\u56DE\u8BD5\u5377")))),tt&&m.a.createElement("div",{className:me.a.batch},m.a.createElement("aside",null,m.a.createElement("div",{style:{flexShrink:0,marginRight:20}},m.a.createElement(z.a,{showQuickJumper:!0,onChange:Ta,defaultCurrent:1,pageSize:ke==null?void 0:ke.per_page,current:ke.page||1,hideOnSinglePage:!0,total:On,showTotal:function(Je){return m.a.createElement("span",{className:"mr10"},"\u5171",m.a.createElement("span",{className:"c-light-primary"},Je),"\u6761\u6570\u636E")}})),m.a.createElement("div",{className:me.a.btns},m.a.createElement(Y.a,{align:"middle",style:{marginLeft:"auto"}},m.a.createElement(Y.a,{onClick:function(){if((wn==null?void 0:wn.length)<=0){i.b.info("\u5F53\u524D\u6682\u65E0\u6570\u636E");return}yr(!0)},align:"middle",className:"current"},m.a.createElement("i",{className:"iconfont icon-yixuan mr10 c-light-primary font20"}),m.a.createElement("span",null,"\u5DF2\u9009",m.a.createElement("span",{className:"c-light-primary"},_e.length),"\u4E2A")),m.a.createElement(I.a,{className:"mr20 ml40",onClick:function(){if(yt){var Je;v.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework/").concat(jt==null||((Je=jt.params)===null||Je===void 0)?void 0:Je.categoryId,"/detail?tabs=1"));return}v.d.push("/classrooms/".concat(jt.params.coursesId,"/program_homework"))}},"\u53D6\u6D88"),m.a.createElement(I.a,{loading:Vn,onClick:Da,type:"primary"},"\u786E\u8BA4",yt?"\u7F16\u8F91":"\u65B0\u5EFA"))))))},Ir=ge.default=Object(v.a)(function(Zt){var mt=Zt.classroomList,Pt=Zt.problemset,Rt=Zt.user,Ht=Zt.loading,un=Zt.globalSetting,xn=Zt.shixunHomeworks;return{classroomList:mt,problemset:Pt,user:Rt,globalSetting:un,loading:Ht.effects,shixunHomeworks:xn}})(pr)},JYp7:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return te});var te;(function(Y){function N(i){return i&&typeof i=="object"&&typeof i[Symbol.iterator]=="function"}Y.is=N;const z=Object.freeze([]);function P(){return z}Y.empty=P;function*F(i){yield i}Y.single=F;function G(i){return i||z}Y.from=G;function K(i){return!i||i[Symbol.iterator]().next().done===!0}Y.isEmpty=K;function n(i){return i[Symbol.iterator]().next().value}Y.first=n;function I(i,D){for(const A of i)if(D(A))return!0;return!1}Y.some=I;function E(i,D){for(const A of i)if(D(A))return A;return}Y.find=E;function*f(i,D){for(const A of i)D(A)&&(yield A)}Y.filter=f;function*b(i,D){let A=0;for(const S of i)yield D(S,A++)}Y.map=b;function*c(...i){for(const D of i)for(const A of D)yield A}Y.concat=c;function*a(i){for(const D of i)for(const A of D)yield A}Y.concatNested=a;function p(i,D,A){let S=A;for(const R of i)S=D(S,R);return S}Y.reduce=p;function*l(i,D,A=i.length){for(D<0&&(D+=i.length),A<0?A+=i.length:A>i.length&&(A=i.length);DS===R){const S=i[Symbol.iterator](),R=D[Symbol.iterator]();for(;;){const O=S.next(),g=R.next();if(O.done!==g.done)return!1;if(O.done)return!0;if(!A(O.value,g.value))return!1}}Y.equals=s})(te||(te={}))},LE3n:function(ct,ge,U){"use strict";var te=U("ozfa"),Y=U("MJZm"),N=U("k1fw"),z=U("+L6B"),P=U("2/Rp"),F=U("5NDa"),G=U("5rEg"),K=U("2qtc"),n=U("kLXV"),I=U("miYZ"),E=U("tsqr"),f=U("9og8"),b=U("tJVT"),c=U("WmNS"),a=U.n(c),p=U("q1tI"),l=U.n(p),u=U("1vnw"),s=U.n(u),i=U("ErOA"),D=U("Ix/O"),A=U.n(D),S=U("xTzM"),R=U.n(S),O=U("WCUW"),g=U("LvDl"),_=U.n(g),h=function(x){var w=x.isProblemset,j=x.name,W=x.id,T=x.itemBanksCount,M=x.onOpen,m=M===void 0?function(){}:M,v=x.onShare,H=v===void 0?function(){}:v,X=x.onMove,q=X===void 0?function(){}:X,re=x.onDeleteOk,ye=re===void 0?function(){}:re,pe=Object(p.useState)(!1),ue=Object(b.a)(pe,2),fe=ue[0],be=ue[1],se=Object(p.useState)(j),ae=Object(b.a)(se,2),Ce=ae[0],ze=ae[1],Ye=Object(p.useState)(j),He=Object(b.a)(Ye,2),Ve=He[0],Fe=He[1],Ke=function(){var de=Object(f.a)(a.a.mark(function De(Ne){var Ue,rt,lt;return a.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(Ue=["\uFF1F","\u3001","/","\u2572","*","<",">","|"],Ve.trim()){at.next=4;break}return E.b.warn("\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"),at.abrupt("return");case 4:if(!(Ve.charAt(0)===" ")){at.next=7;break}return E.b.warn("\u9996\u5B57\u7B26\u4E0D\u80FD\u4E3A\u7A7A\u683C"),at.abrupt("return");case 7:rt=0;case 8:if(!(rt0?re(function(Ne){return be(Ne,He,{children:Ke.map(function(Ue){return{title:l.a.createElement(h,{isProblemset:w,name:Ue.name,id:Ue.id,itemBanksCount:Ue.item_banks_count,onMove:pe,onOpen:T,onShare:m,onDeleteOk:fe}),key:Ue.id,icon:l.a.createElement("img",{src:A.a,className:s.a.folderIcon}),isLeaf:!1}})})}):re(function(Ne){return be(Ne,He,{isLeaf:!0})});case 6:case"end":return De.stop()}},ze)}));return function(Ye){return Ce.apply(this,arguments)}}(),ae=function(ze,Ye){var He=Ye.node,Ve=Ye.expanded;re(function(Fe){return be(Fe,He.key,{icon:Ve?l.a.createElement("img",{src:R.a,className:s.a.folderIcon}):l.a.createElement("img",{src:A.a,className:s.a.folderIcon})})})};return(q==null?void 0:q.length)>0&&l.a.createElement(Y.a,{showLine:{showLeafIcon:!1},showIcon:!0,treeData:q,loadData:se,onExpand:ae,className:s.a.folderWrapper,selectable:!1})};ge.a=d},LdHM:function(ct,ge,U){"use strict";U.d(ge,"b",function(){return i}),U.d(ge,"a",function(){return A});var te=U("1OyB"),Y=U("vuIU"),N=U("Ji7U"),z=U("LK+K"),P=U("q1tI"),F=U("rePB"),G=U("Ff2n"),K=U("ODXe"),n=U("4IlW"),I=U("bX4T"),E=U("YrtM"),f=U("TSYQ"),b=U.n(f),c=U("+nKL"),a=U("8OUc"),p=function(H,X){var q=H.prefixCls,re=H.id,ye=H.flattenOptions,pe=H.childrenAsData,ue=H.values,fe=H.searchValue,be=H.multiple,se=H.defaultActiveFirstOption,ae=H.height,Ce=H.itemHeight,ze=H.notFoundContent,Ye=H.open,He=H.menuItemSelectedIcon,Ve=H.virtual,Fe=H.onSelect,Ke=H.onToggleOpen,nt=H.onActiveValue,de=H.onScroll,De=H.onMouseEnter,Ne="".concat(q,"-item"),Ue=Object(E.a)(function(){return ye},[Ye,ye],function(st,xe){return xe[0]&&st[1]!==xe[1]}),rt=P.useRef(null),lt=function(xe){xe.preventDefault()},ft=function(xe){rt.current&&rt.current.scrollTo({index:xe})},at=function(xe){for(var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,me=Ue.length,ce=0;ce1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(v).map(function(X,q){if(!P.isValidElement(X)||!X.type)return null;var re=X.type.isSelectOptGroup,ye=X.key,pe=X.props,ue=pe.children,fe=Object(G.a)(pe,["children"]);return H||!re?O(X):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(ye===null?q:ye,"__"),label:ye},fe),{},{options:g(ue)})}).filter(function(X){return X})}var _=U("2Qr1"),h=U("qNPg"),d=U("U8pU"),C=U("Kwbf"),x=U("WKfj");function w(v){var H=v.mode,X=v.options,q=v.children,re=v.backfill,ye=v.allowClear,pe=v.placeholder,ue=v.getInputElement,fe=v.showSearch,be=v.onSearch,se=v.defaultOpen,ae=v.autoFocus,Ce=v.labelInValue,ze=v.value,Ye=v.inputValue,He=v.optionLabelProp,Ve=H==="multiple"||H==="tags",Fe=fe!==void 0?fe:Ve||H==="combobox",Ke=X||g(q);if(Object(C.a)(H!=="tags"||Ke.every(function(Ne){return!Ne.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var nt=Ke.some(function(Ne){return Ne.options?Ne.options.some(function(Ue){return typeof("value"in Ue?Ue.value:Ue.key)=="number"}):typeof("value"in Ne?Ne.value:Ne.key)=="number"});Object(C.a)(!nt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(H!=="combobox"||!He,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(H==="combobox"||!re,"`backfill` only works with `combobox` mode."),Object(C.a)(H==="combobox"||!ue,"`getInputElement` only work with `combobox` mode."),Object(C.b)(H!=="combobox"||!ue||!ye||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!Fe&&H!=="combobox"&&H!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!se||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ze!=null){var de=Object(x.d)(ze);Object(C.a)(!Ce||de.every(function(Ne){return Object(d.a)(Ne)==="object"&&("key"in Ne||"value"in Ne)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!Ve||Array.isArray(ze),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var De=null;Object(R.a)(q).some(function(Ne){if(!P.isValidElement(Ne)||!Ne.type)return!1;var Ue=Ne.type;if(Ue.isSelectOption)return!1;if(Ue.isSelectOptGroup){var rt=Object(R.a)(Ne.props.children).every(function(lt){return!P.isValidElement(lt)||!Ne.type||lt.type.isSelectOption?!0:(De=lt.type,!1)});return!rt}return De=Ue,!0}),De&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(De.displayName||De.name||De,"`.")),Object(C.a)(Ye===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var j=w,W=Object(h.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:g,flattenOptions:_.d,getLabeledValue:_.e,filterOptions:_.b,isValueDisabled:_.g,findValueOption:_.c,warningProps:j,fillOptionsWithMissingValue:_.a}),T=function(v){Object(N.a)(X,v);var H=Object(z.a)(X);function X(){var q;return Object(te.a)(this,X),q=H.apply(this,arguments),q.selectRef=P.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(Y.a)(X,[{key:"render",value:function(){return P.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),X}(P.Component);T.Option=i,T.OptGroup=A;var M=T,m=ge.c=M},M8RZ:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return n});var te=U("fWQN"),Y=U("mtLc"),N=U("yKVA"),z=U("879j"),P=U("q1tI"),F=U.n(P),G=U("i8i4"),K=U.n(G),n=function(I){Object(N.a)(f,I);var E=Object(z.a)(f);function f(b){var c;Object(te.a)(this,f),c=E.call(this,b);var a=window.document;return c.node=a.createElement("div"),a.body.appendChild(c.node),c}return Object(Y.a)(f,[{key:"render",value:function(){var c=this.props.children;return Object(G.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(F.a.Component)},MI8n:function(ct,ge,U){"use strict";U.d(ge,"c",function(){return P}),U.d(ge,"b",function(){return n}),U.d(ge,"e",function(){return I}),U.d(ge,"a",function(){return E}),U.d(ge,"d",function(){return f}),U.d(ge,"f",function(){return b});var te=U("/cxE"),Y=U("pmY6"),N=U("24hK"),z=U("5Y4S"),P;(function(c){c.None=()=>Y.a.None;function a(w){return(j,W=null,T)=>{let M=!1,m;return m=w(v=>M?void 0:(m?m.dispose():M=!0,j.call(W,v)),null,T),M&&m.dispose(),m}}c.once=a;function p(w,j){return A((W,T=null,M)=>w(m=>W.call(T,j(m)),null,M))}c.map=p;function l(w,j){return A((W,T=null,M)=>w(m=>{j(m),W.call(T,m)},null,M))}c.forEach=l;function u(w,j){return A((W,T=null,M)=>w(m=>j(m)&&W.call(T,m),null,M))}c.filter=u;function s(w){return w}c.signal=s;function i(...w){return(j,W=null,T)=>Object(Y.e)(...w.map(M=>M(m=>j.call(W,m),null,T)))}c.any=i;function D(w,j,W){let T=W;return p(w,M=>(T=j(T,M),T))}c.reduce=D;function A(w){let j;const W=new n({onFirstListenerAdd(){j=w(W.fire,W)},onLastListenerRemove(){j.dispose()}});return W.event}function S(w,j,W=100,T=!1,M){let m,v,H,X=0;const q=new n({leakWarningThreshold:M,onFirstListenerAdd(){m=w(re=>{X++,v=j(v,re),T&&!H&&(q.fire(v),v=void 0),clearTimeout(H),H=setTimeout(()=>{const ye=v;v=void 0,H=void 0,(!T||X>1)&&q.fire(ye),X=0},W)})},onLastListenerRemove(){m.dispose()}});return q.event}c.debounce=S;function R(w,j=(W,T)=>W===T){let W=!0,T;return u(w,M=>{const m=W||!j(M,T);return W=!1,T=M,m})}c.latch=R;function O(w,j){return[c.filter(w,j),c.filter(w,W=>!j(W))]}c.split=O;function g(w,j=!1,W=[]){let T=W.slice(),M=w(H=>{T?T.push(H):v.fire(H)});const m=()=>{T&&T.forEach(H=>v.fire(H)),T=null},v=new n({onFirstListenerAdd(){M||(M=w(H=>v.fire(H)))},onFirstListenerDidAdd(){T&&(j?setTimeout(m):m())},onLastListenerRemove(){M&&M.dispose(),M=null}});return v.event}c.buffer=g;class _{constructor(w){this.event=w}map(w){return new _(p(this.event,w))}forEach(w){return new _(l(this.event,w))}filter(w){return new _(u(this.event,w))}reduce(w,j){return new _(D(this.event,w,j))}latch(){return new _(R(this.event))}debounce(w,j=100,W=!1,T){return new _(S(this.event,w,j,W,T))}on(w,j,W){return this.event(w,j,W)}once(w,j,W){return a(this.event)(w,j,W)}}function h(w){return new _(w)}c.chain=h;function d(w,j,W=T=>T){const T=(...H)=>v.fire(W(...H)),M=()=>w.on(j,T),m=()=>w.removeListener(j,T),v=new n({onFirstListenerAdd:M,onLastListenerRemove:m});return v.event}c.fromNodeEventEmitter=d;function C(w,j,W=T=>T){const T=(...H)=>v.fire(W(...H)),M=()=>w.addEventListener(j,T),m=()=>w.removeEventListener(j,T),v=new n({onFirstListenerAdd:M,onLastListenerRemove:m});return v.event}c.fromDOMEventEmitter=C;function x(w){return new Promise(j=>a(w)(j))}c.toPromise=x})(P||(P={}));class F{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${F._idPool++}`}start(c){this._stopWatch=new z.a(!0),this._listenerCount=c}stop(){if(this._stopWatch){const c=this._stopWatch.elapsed();this._elapsedOverall+=c,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${c.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}F._idPool=0;let G=-1;class K{constructor(c,a=Math.random().toString(18).slice(2,5)){this.customThreshold=c,this.name=a,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(c){let a=G;if(typeof this.customThreshold=="number"&&(a=this.customThreshold),a<=0||c{const u=this._stacks.get(p)||0;this._stacks.set(p,u-1)}}}class n{constructor(c){var a;this._disposed=!1,this._options=c,this._leakageMon=G>0?new K(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((a=this._options)===null||a===void 0?void 0:a._profName)?new F(this._options._profName):void 0}get event(){return this._event||(this._event=(c,a,p)=>{var l;this._listeners||(this._listeners=new N.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(a?[c,a]:c);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,c,a);const i=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),D=Object(Y.i)(()=>{if(i&&i(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const A=this._listeners&&!this._listeners.isEmpty();A||this._options.onLastListenerRemove(this)}});return p instanceof Y.b?p.add(D):Array.isArray(p)&&p.push(D),D}),this._event}fire(c){var a,p;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new N.a);for(let l of this._listeners)this._deliveryQueue.push([l,c]);for((a=this._perfMon)===null||a===void 0||a.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,u]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,u):l[0].call(l[1],u)}catch(s){Object(te.f)(s)}}(p=this._perfMon)===null||p===void 0||p.stop()}}dispose(){var c,a,p,l,u;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(a=this._deliveryQueue)===null||a===void 0||a.clear(),(l=(p=this._options)===null||p===void 0?void 0:p.onLastListenerRemove)===null||l===void 0||l.call(p),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class I extends n{constructor(c){super(c);this._isPaused=0,this._eventQueue=new N.a,this._mergeFn=c==null?void 0:c.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const c=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(c))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(c){this._listeners&&(this._isPaused!==0?this._eventQueue.push(c):super.fire(c))}}class E extends I{constructor(c){var a;super(c);this._delay=(a=c.delay)!==null&&a!==void 0?a:100}fire(c){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(c)}}class f{constructor(){this.buffers=[]}wrapEvent(c){return(a,p,l)=>c(u=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>a.call(p,u)):a.call(p,u)},void 0,l)}bufferEvents(c){const a=[];this.buffers.push(a);const p=c();return this.buffers.pop(),a.forEach(l=>l()),p}}class b{constructor(){this.listening=!1,this.inputEvent=P.None,this.inputEventListener=Y.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(c){this.inputEvent=c,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=c(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(ct,ge,U){"use strict";(function(te,Y){U.d(ge,"b",function(){return p}),U.d(ge,"i",function(){return i}),U.d(ge,"f",function(){return D}),U.d(ge,"d",function(){return A}),U.d(ge,"g",function(){return S}),U.d(ge,"h",function(){return R}),U.d(ge,"c",function(){return O}),U.d(ge,"k",function(){return g}),U.d(ge,"j",function(){return _}),U.d(ge,"a",function(){return h}),U.d(ge,"e",function(){return x});var N;const z="en";let P=!1,F=!1,G=!1,K=!1,n=!1,I=!1,E=!1,f,b=z,c,a;const p=typeof self=="object"?self:typeof te=="object"?te:{};let l;typeof p.vscode!="undefined"&&typeof p.vscode.process!="undefined"?l=p.vscode.process:typeof Y!="undefined"&&(l=Y);const u=typeof((N=l==null?void 0:l.versions)===null||N===void 0?void 0:N.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!u)a=navigator.userAgent,P=a.indexOf("Windows")>=0,F=a.indexOf("Macintosh")>=0,E=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=a.indexOf("Linux")>=0,I=!0,f=navigator.language,b=f;else if(typeof l=="object"){P=l.platform==="win32",F=l.platform==="darwin",G=l.platform==="linux",K=G&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,f=z,b=z;const w=l.env.VSCODE_NLS_CONFIG;if(w)try{const j=JSON.parse(w),W=j.availableLanguages["*"];f=j.locale,b=W||z,c=j._translationsConfigFile}catch(j){}n=!0}else console.error("Unable to resolve platform.");let s=0;F?s=1:P?s=3:G&&(s=2);const i=P,D=F,A=G,S=n,R=I,O=E,g=a,_=function(){if(p.setImmediate)return p.setImmediate.bind(p);if(typeof p.postMessage=="function"&&!p.importScripts){let W=[];p.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let m=0,v=W.length;m{const m=++T;W.push({id:m,callback:M}),p.postMessage({vscodeSetImmediateId:m},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const j=Promise.resolve();return W=>j.then(W)}(),h=F||E?2:P?1:3;let d=!0,C=!1;function x(){if(!C){C=!0;const w=new Uint8Array(2);w[0]=1,w[1]=2;const j=new Uint16Array(w.buffer);d=j[0]===(2<<8)+1}return d}}).call(this,U("IyRk"),U("Q2Ig"))},N0LK:function(ct,ge,U){"use strict";U.d(ge,"C",function(){return te}),U.d(ge,"v",function(){return N}),U.d(ge,"s",function(){return z}),U.d(ge,"t",function(){return P}),U.d(ge,"U",function(){return F}),U.d(ge,"J",function(){return G}),U.d(ge,"O",function(){return K}),U.d(ge,"p",function(){return n}),U.d(ge,"T",function(){return I}),U.d(ge,"q",function(){return E}),U.d(ge,"N",function(){return f}),U.d(ge,"M",function(){return b}),U.d(ge,"Q",function(){return c}),U.d(ge,"u",function(){return a}),U.d(ge,"x",function(){return p}),U.d(ge,"I",function(){return l}),U.d(ge,"f",function(){return u}),U.d(ge,"h",function(){return s}),U.d(ge,"g",function(){return i}),U.d(ge,"i",function(){return D}),U.d(ge,"G",function(){return A}),U.d(ge,"H",function(){return S}),U.d(ge,"r",function(){return R}),U.d(ge,"R",function(){return O}),U.d(ge,"d",function(){return g}),U.d(ge,"e",function(){return _}),U.d(ge,"E",function(){return h}),U.d(ge,"F",function(){return d}),U.d(ge,"j",function(){return C}),U.d(ge,"z",function(){return x}),U.d(ge,"K",function(){return j}),U.d(ge,"L",function(){return W}),U.d(ge,"m",function(){return M}),U.d(ge,"k",function(){return v}),U.d(ge,"A",function(){return X}),U.d(ge,"a",function(){return q}),U.d(ge,"n",function(){return re}),U.d(ge,"l",function(){return ye}),U.d(ge,"D",function(){return pe}),U.d(ge,"B",function(){return ue}),U.d(ge,"b",function(){return fe}),U.d(ge,"S",function(){return be}),U.d(ge,"o",function(){return se}),U.d(ge,"P",function(){return ae}),U.d(ge,"w",function(){return Ce}),U.d(ge,"c",function(){return ze}),U.d(ge,"y",function(){return Ve});function te(de){return!de||typeof de!="string"?!0:de.trim().length===0}const Y=/{(\d+)}/g;function N(de,...De){return De.length===0?de:de.replace(Y,function(Ne,Ue){const rt=parseInt(Ue,10);return isNaN(rt)||rt<0||rt>=De.length?Ne:De[rt]})}function z(de){return de.replace(/[<>&]/g,function(De){switch(De){case"<":return"<";case">":return">";case"&":return"&";default:return De}})}function P(de){return de.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function F(de,De=" "){const Ne=G(de,De);return K(Ne,De)}function G(de,De){if(!de||!De)return de;const Ne=De.length;if(Ne===0||de.length===0)return de;let Ue=0;for(;de.indexOf(De,Ue)===Ue;)Ue=Ue+Ne;return de.substring(Ue)}function K(de,De){if(!de||!De)return de;const Ne=De.length,Ue=de.length;if(Ne===0||Ue===0)return de;let rt=Ue,lt=-1;for(;!(lt=de.lastIndexOf(De,rt-1),lt===-1||lt+Ne!==rt);){if(lt===0)return"";rt=lt}return de.substring(0,rt)}function n(de){return de.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function I(de){return de.replace(/\*/g,"")}function E(de,De,Ne={}){if(!de)throw new Error("Cannot create regex from empty string");De||(de=P(de)),Ne.wholeWord&&(/\B/.test(de.charAt(0))||(de="\\b"+de),/\B/.test(de.charAt(de.length-1))||(de=de+"\\b"));let Ue="";return Ne.global&&(Ue+="g"),Ne.matchCase||(Ue+="i"),Ne.multiline&&(Ue+="m"),Ne.unicode&&(Ue+="u"),new RegExp(de,Ue)}function f(de){if(de.source==="^"||de.source==="^$"||de.source==="$"||de.source==="^\\s*$")return!1;const De=de.exec("");return!!(De&&de.lastIndex===0)}function b(de){return(de.global?"g":"")+(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")}function c(de){return de.split(/\r\n|\r|\n/)}function a(de){for(let De=0,Ne=de.length;De=0;Ne--){const Ue=de.charCodeAt(Ne);if(Ue!==32&&Ue!==9)return Ne}return-1}function u(de,De){return deDe?1:0}function s(de,De,Ne=0,Ue=de.length,rt=0,lt=De.length){for(;Negt)return 1}const ft=Ue-Ne,at=lt-rt;return ftat?1:0}function i(de,De){return D(de,De,0,de.length,0,De.length)}function D(de,De,Ne=0,Ue=de.length,rt=0,lt=De.length){for(;Ne=128||gt>=128)return s(de.toLowerCase(),De.toLowerCase(),Ne,Ue,rt,lt);A(_t)&&(_t-=32),A(gt)&&(gt-=32);const xt=_t-gt;if(xt===0)continue;return xt}const ft=Ue-Ne,at=lt-rt;return ftat?1:0}function A(de){return de>=97&&de<=122}function S(de){return de>=65&&de<=90}function R(de,De){return de.length===De.length&&D(de,De)===0}function O(de,De){const Ne=De.length;return De.length>de.length?!1:D(de,De,0,Ne)===0}function g(de,De){let Ne,Ue=Math.min(de.length,De.length);for(Ne=0;Ne1){const Ue=de.charCodeAt(De-2);if(h(Ue))return C(Ue,Ne)}return Ne}function j(de,De){const Ne=Ye.getInstance(),Ue=De,rt=de.length,lt=x(de,rt,De);De+=lt>=65536?2:1;let ft=Ne.getGraphemeBreakType(lt);for(;De=65536?2:1,ft=_t}return De-Ue}function W(de,De){const Ne=Ye.getInstance(),Ue=De,rt=w(de,De);De-=rt>=65536?2:1;let lt=Ne.getGraphemeBreakType(rt);for(;De>0;){const ft=w(de,De),at=Ne.getGraphemeBreakType(ft);if(ze(at,lt))break;De-=ft>=65536?2:1,lt=at}return Ue-De}const T=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function M(de){return T.test(de)}const m=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function v(de){return m.test(de)}const H=/^[\t\n\r\x20-\x7E]*$/;function X(de){return H.test(de)}const q=/[\u2028\u2029]/;function re(de){return q.test(de)}function ye(de){for(let De=0,Ne=de.length;De=11904&&de<=55215||de>=63744&&de<=64255||de>=65281&&de<=65374}function ue(de){return de>=127462&&de<=127487||de===8986||de===8987||de===9200||de===9203||de>=9728&&de<=10175||de===11088||de===11093||de>=127744&&de<=128591||de>=128640&&de<=128764||de>=128992&&de<=129003||de>=129280&&de<=129535||de>=129648&&de<=129750}const fe=String.fromCharCode(65279);function be(de){return!!(de&&de.length>0&&de.charCodeAt(0)===65279)}function se(de,De=!1){return de?(De&&(de=de.replace(/\\./g,"")),de.toLowerCase()!==de):!1}function ae(de){const De=90-65+1;return de=de%(2*De),deDe[3*Ue+1])Ue=2*Ue+1;else return De[3*Ue+2];return 0}}Ye._INSTANCE=null;function He(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Ve(de,De){if(de===0)return 0;const Ne=Fe(de,De);if(Ne!==void 0)return Ne;const Ue=w(De,de);return de-=Ke(Ue),de}function Fe(de,De){let Ne=w(De,de);for(de-=Ke(Ne);nt(Ne)||Ne===65039||Ne===8419;){if(de===0)return;Ne=w(De,de),de-=Ke(Ne)}if(!ue(Ne))return;if(de>=0){const Ue=w(De,de);Ue===8205&&(de-=Ke(Ue))}return de}function Ke(de){return de>=65536?2:1}function nt(de){return 127995<=de&&de<=127999}},NLgs:function(ct,ge,U){"use strict";U.d(ge,"e",function(){return l}),U.d(ge,"f",function(){return u}),U.d(ge,"d",function(){return i}),U.d(ge,"c",function(){return D}),U.d(ge,"a",function(){return A}),U.d(ge,"b",function(){return S});var te=U("miYZ"),Y=U("tsqr"),N=U("9og8"),z=U("2qtc"),P=U("kLXV"),F=U("WmNS"),G=U.n(F),K=U("q1tI"),n=U.n(K),I=U("9kvl"),E=U("xKgJ"),f=U("1vsH"),b=U("RCxd"),c=U("yTi+"),a=U.n(c),p=U("m3rI"),l=function(O){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(u(O)&&s(g))},u=function(O){return Object(E.p)()?!0:(O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},s=function(){var O,g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=Object(I.c)()._store.getState(),h=_.user;return(O=h.userInfo)!==null&&O!==void 0&&O.profile_completed?!0:(P.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:g?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){I.d.push("/account/profile/edit")}}),!1)},i=function(){var O,g=Object(I.c)()._store.getState(),_=g.user;return(O=_.userInfo)!==null&&O!==void 0&&O.professional_certification?!0:(P.a.confirm({title:"\u63D0\u793A",centered:!0,content:n.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(f.S)("/account/certification")}}),!1)},D=function(){var O;if(Object(E.a)())return!0;var g=Object(I.c)()._store.getState(),_=g.user,h=g.globalSetting;return P.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc",style:{marginLeft:-38}},n.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),n.a.createElement("img",{src:p.a.IMG_SERVER+(h==null||((O=h.setting)===null||O===void 0)?void 0:O.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},A=function(O,g){var _;if(O)return!0;var h=Object(I.c)()._store.getState(),d=h.user,C=h.globalSetting;return P.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:n.a.createElement("div",null,n.a.createElement("p",null,g||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),n.a.createElement("div",{style:{marginLeft:"110px"}},n.a.createElement("img",{src:p.a.IMG_SERVER+(C==null||((_=C.setting)===null||_===void 0)?void 0:_.authority_qrcode_url),width:200}),n.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(f.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},S=function(O){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=Object(I.c)()._store.getState(),h=_.shixunsDetail.detail;return(h==null?void 0:h.public)===2||(h==null?void 0:h.public)===1||(h==null?void 0:h.shixun_status)===3?(P.a.info({centered:!0,icon:n.a.createElement(b.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc",style:{marginLeft:-38}},n.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},n.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(h==null?void 0:h.public)===2?"\u5DF2\u516C\u5F00":(h==null?void 0:h.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",g,"\u3002"),n.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),n.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:a.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(h==null?void 0:h.shixun_status)===2?(P.a.confirm({centered:!0,icon:n.a.createElement(b.a,null),title:"\u63D0\u793A",content:n.a.createElement("div",null,n.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",g,"\u3002"),n.a.createElement("br",null),n.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){P.a.confirm({width:440,centered:!0,icon:n.a.createElement(b.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var C=Object(N.a)(G.a.mark(function w(){var j;return G.a.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,O({type:"shixunsDetail/cancelRelease",payload:{id:h==null?void 0:h.identifier}});case 2:j=T.sent,j.status!==401&&(Y.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),O({type:"shixunsDetail/getShixunsDetail",payload:{id:h==null?void 0:h.identifier}}),O({type:"practiceSetting/getCommonData",payload:{id:h==null?void 0:h.identifier}}));case 4:case"end":return T.stop()}},w)}));function x(){return C.apply(this,arguments)}return x}()})}}),!0):!1}},NvD2:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return F});var te=U("Kwbf");function Y(G,K){var n=new Set;return G.forEach(function(I){K.has(I)||n.add(I)}),n}function N(G){var K=G||{},n=K.disabled,I=K.disableCheckbox,E=K.checkable;return!!(n||I)||E===!1}function z(G,K,n,I){for(var E=new Set(G),f=new Set,b=0;b<=n;b+=1){var c=K.get(b)||new Set;c.forEach(function(u){var s=u.key,i=u.node,D=u.children,A=D===void 0?[]:D;E.has(s)&&!I(i)&&A.filter(function(S){return!I(S.node)}).forEach(function(S){E.add(S.key)})})}for(var a=new Set,p=n;p>=0;p-=1){var l=K.get(p)||new Set;l.forEach(function(u){var s=u.parent,i=u.node;if(I(i)||!u.parent||a.has(u.parent.key))return;if(I(u.parent.node)){a.add(s.key);return}var D=!0,A=!1;(s.children||[]).filter(function(S){return!I(S.node)}).forEach(function(S){var R=S.key,O=E.has(R);D&&!O&&(D=!1),!A&&(O||f.has(R))&&(A=!0)}),D&&E.add(s.key),A&&f.add(s.key),a.add(s.key)})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(Y(f,E))}}function P(G,K,n,I,E){for(var f=new Set(G),b=new Set(K),c=0;c<=I;c+=1){var a=n.get(c)||new Set;a.forEach(function(s){var i=s.key,D=s.node,A=s.children,S=A===void 0?[]:A;!f.has(i)&&!b.has(i)&&!E(D)&&S.filter(function(R){return!E(R.node)}).forEach(function(R){f.delete(R.key)})})}b=new Set;for(var p=new Set,l=I;l>=0;l-=1){var u=n.get(l)||new Set;u.forEach(function(s){var i=s.parent,D=s.node;if(E(D)||!s.parent||p.has(s.parent.key))return;if(E(s.parent.node)){p.add(i.key);return}var A=!0,S=!1;(i.children||[]).filter(function(R){return!E(R.node)}).forEach(function(R){var O=R.key,g=f.has(O);A&&!g&&(A=!1),!S&&(g||b.has(O))&&(S=!0)}),A||f.delete(i.key),S&&b.add(i.key),p.add(i.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(Y(b,f))}}function F(G,K,n,I){var E=[],f;I?f=I:f=N;var b=new Set(G.filter(function(l){var u=!!n[l];return u||E.push(l),u})),c=new Map,a=0;Object.keys(n).forEach(function(l){var u=n[l],s=u.level,i=c.get(s);i||(i=new Set,c.set(s,i)),i.add(u),a=Math.max(a,s)}),Object(te.a)(!E.length,"Tree missing follow keys: ".concat(E.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var p;return K===!0?p=z(b,c,a,f):p=P(b,K.halfCheckedKeys,c,a,f),p}},"ORt/":function(ct,ge,U){ct.exports={operating:"operating___1LS8K",tip:"tip___3LKV6"}},OZM5:function(ct,ge,U){"use strict";U.d(ge,"b",function(){return I}),U.d(ge,"a",function(){return E}),U.d(ge,"k",function(){return f}),U.d(ge,"h",function(){return b}),U.d(ge,"i",function(){return c}),U.d(ge,"g",function(){return a}),U.d(ge,"c",function(){return p}),U.d(ge,"d",function(){return l}),U.d(ge,"j",function(){return i}),U.d(ge,"e",function(){return D}),U.d(ge,"f",function(){return A});var te=U("KQm4"),Y=U("U8pU"),N=U("Ff2n"),z=U("q1tI"),P=U.n(z),F=U("Kwbf"),G=U("WaYH"),K=.25,n=2;function I(S,R){var O=S.slice(),g=O.indexOf(R);return g>=0&&O.splice(g,1),O}function E(S,R){var O=S.slice();return O.indexOf(R)===-1&&O.push(R),O}function f(S){return S.split("-")}function b(S,R){return"".concat(S,"-").concat(R)}function c(S){return S&&S.type&&S.type.isTreeNode}function a(S,R){var O=[S],g=R[S];function _(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];h.forEach(function(d){var C=d.key,x=d.children;O.push(C),_(x)})}return _(g.children),O}function p(S,R){var O=S.clientY,g=R.selectHandle.getBoundingClientRect(),_=g.top,h=g.bottom,d=g.height,C=Math.max(d*K,n);return O<=_+C?-1:O>=h-C?1:0}function l(S,R){if(!S)return;var O=R.multiple;return O?S.slice():S.length?[S[0]]:S}var u=function(R){return R};function s(S,R){if(!S)return[];var O=R||{},g=O.processProps,_=g===void 0?u:g,h=Array.isArray(S)?S:[S];return h.map(function(d){var C=d.children,x=Object(N.a)(d,["children"]),w=s(C,R);return P.a.createElement(G.a,Object.assign({},_(x)),w)})}function i(S){if(!S)return null;var R;if(Array.isArray(S))R={checkedKeys:S,halfCheckedKeys:void 0};else if(Object(Y.a)(S)==="object")R={checkedKeys:S.checked||void 0,halfCheckedKeys:S.halfChecked||void 0};else return Object(F.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function D(S,R){var O=new Set;function g(_){if(O.has(_))return;var h=R[_];if(!h)return;O.add(_);var d=h.parent,C=h.node;if(C.disabled)return;d&&g(d.key)}return(S||[]).forEach(function(_){g(_)}),Object(te.a)(O)}function A(S){var R={};return Object.keys(S).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(R[O]=S[O])}),R}},Ot1p:function(ct,ge,U){"use strict";var te=U("2qtc"),Y=U("kLXV"),N=U("rAM+"),z=U("miYZ"),P=U("tsqr"),F=U("9og8"),G=U("tJVT"),K=U("jrin"),n=U("WmNS"),I=U.n(n),E=U("q1tI"),f=U.n(E),b=U("VrN/"),c=U.n(b),a=U("bdgK"),p=U("p77/"),l=U("Bd2K"),u=U("ELLl"),s=U("19Vz"),i=U("lZu9"),D=U("+NIl"),A=U("kSUc"),S=U("9Bee"),R=function(Me){var et=Me.value,ht=et===void 0?"":et,Ut=Me.className,nn=Me.showTextOnly,en=Me.showLines,mn=Me.style,En=mn===void 0?{}:mn,$t=Object(E.useMemo)(function(){return""},[ht]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:$t}}))},O=U("0Owb"),g=U("dejd"),_=U("C+DQ"),h=U("1vsH"),d=U("m3rI"),C=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function x(Me){var et=Me.onActionCallback,ht=Me.title,Ut=Me.icon,nn=Me.actionName,en=Me.className,mn=en===void 0?"":en,En=Me.children;function $t(){et(nn)}return f.a.createElement("a",{title:ht,className:mn,onClick:$t},f.a.createElement("i",{className:"md-iconfont ".concat(Ut)}),En)}var w=function(Me){var et=Me.watch,ht=Me.showNullButton,Ut=Me.onActionCallback,nn=Me.fullScreen,en=Me.insertTemp,mn=Me.hidetoolBar,En=Me.uuid,$t=Me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(h.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.F)("_educoder_session"),"&key=").concat(En,"&api=").concat(encodeURIComponent(d.a.PROXY_SERVER)));var rr=[].concat(C,[{title:"".concat(et?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(et?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!mn&&rr.map(function(Dn,Sr){return f.a.createElement("li",{key:Sr},Dn.actionName?f.a.createElement(x,Object(O.a)({},Dn,{onActionCallback:Ut})):f.a.createElement("span",{className:"v-line"}))}),ht?f.a.createElement("li",null,f.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,en&&f.a.createElement("li",null,f.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(en),onActionCallback:Ut},f.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),f.a.createElement("li",{className:"btn-full-screen"},f.a.createElement(x,{icon:"".concat(nn?"icon-shrink":"icon-enlarge"),title:nn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},j=U("M8RZ"),W=U("+L6B"),T=U("2/Rp"),M=U("y8nQ"),m=U("Vl3Y"),v=U("5NDa"),H=U("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},q=function(Me){var et=Me.callback,ht=Me.onCancel;function Ut(nn){et(nn)}return f.a.createElement(m.a,Object(O.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ut}),f.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},f.a.createElement(H.a,null)),f.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},f.a.createElement(H.a,null)),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(T.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},re=U("7ahc"),ye=U("HmJG"),pe=U("BjJ7"),ue=m.a.useForm,fe={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}},se=function(Me){var et=Me.callback,ht=Me.onCancel,Ut=ue(),nn=Object(G.a)(Ut,1),en=nn[0];function mn(rr){et(rr)}function En(rr,Dn){if(rr.status===-1){P.b.error(rr.message);return}en.setFieldsValue({src:"/api/attachments/".concat(rr.id),type:Dn.type})}function $t(rr){var Dn=rr.target.files[0];Ce(Dn,En)}return f.a.createElement(m.a,Object(O.a)({form:en},be,{className:"upload-image-panel",onFinish:mn}),f.a.createElement(m.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},f.a.createElement("div",{className:"flex-container"},f.a.createElement(m.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},f.a.createElement(H.a,{style:fe})),f.a.createElement(ae,{onFileChange:$t}))),f.a.createElement(m.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(H.a,{style:{width:264}})),f.a.createElement(m.a.Item,{style:{textAlign:"right"}},f.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(T.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))};function ae(Me){var et=Me.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:et}))}function Ce(Me,et){if(!Me)throw new String("\u6CA1\u6709\u6587\u4EF6");var ht=new FormData;ht.append("editormd-image-file",Me),ht.append("file_param_name","editormd-image-file"),ht.append("byxhr","true");var Ut=new window.XMLHttpRequest;Ut.withCredentials=!0,Ut.addEventListener("load",function(nn){et(JSON.parse(nn.target.responseText),Me)},!1),Ut.addEventListener("error",function(nn){console.error(nn)},!1),Ut.open("POST","".concat(pe.a,"/api/attachments.json")),Ut.send(ht)}var ze=U("giR+"),Ye=U("fyUT"),He=U("7Kak"),Ve=U("9yH6"),Fe=Ve.a.Group,Ke={margin:"0 8px"},nt=function(Me){var et=Me.callback,ht=Me.onCancel;function Ut(nn){et(nn)}return f.a.createElement(m.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ut},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:Ke},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:Ke},"\u884C\u6570"),f.a.createElement(m.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(Ye.a,null)),f.a.createElement("span",{style:Ke},"\u5217\u6570"),f.a.createElement(m.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(Ye.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:Ke},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(m.a.Item,{name:"align"},f.a.createElement(Fe,null,f.a.createElement(Ve.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(Ve.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(Ve.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(Ve.a,{value:"right"},f.a.createElement("i",{className:"fa fa-align-right"}))))),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(T.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},de=U("ErOA"),De=U("7Cbv"),Ne="link",Ue="upload-image",rt="code-block",lt="add-table",ft="------------",at={default:ft,left:":".concat(ft),center:":".concat(ft,":"),right:"".concat(ft,":")},_t=U("9VGf"),gt,xt;function Ze(){}var kt=0,Ot=1e4,qe="\u2581",st=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function xe(Me){return/^\d+$/.test(Me)?"".concat(Me,"px"):Me}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,me=we?"Cmd":"Ctrl",ce=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],he=(gt={},Object(K.a)(gt,me+"-B","bold"),Object(K.a)(gt,me+"-I","italic"),gt),Te=(xt={},Object(K.a)(xt,Ne,"\u6DFB\u52A0\u94FE\u63A5"),Object(K.a)(xt,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(K.a)(xt,Ue,"\u6DFB\u52A0\u6587\u4EF6"),Object(K.a)(xt,lt,"\u6DFB\u52A0\u8868\u683C"),xt),Re=ge.a=function(Me){var et=Me.defaultValue,ht=et===void 0?"":et,Ut=Me.onChange,nn=Me.width,en=nn===void 0?"100%":nn,mn=Me.height,En=mn===void 0?400:mn,$t=Me.miniToolbar,rr=$t===void 0?!1:$t,Dn=Me.isFocus,Sr=Dn===void 0?!1:Dn,br=Me.watch,Pn=Me.insertTemp,Dr=Me.mode,Or=Dr===void 0?"markdown":Dr,ln=Me.id,Yr=ln===void 0?"markdown-editor-id":ln,tn=Me.showResizeBar,sn=tn===void 0?!1:tn,Qn=Me.noStorage,sr=Qn===void 0?!1:Qn,Nr=Me.showNullButton,hn=Nr===void 0?!1:Nr,Qt=Me.hidetoolBar,$r=Qt===void 0?!1:Qt,fr=Me.fullScreen,Lr=fr===void 0?!1:fr,kn=Me.onBlur,Ur=Me.onCMBeforeChange,vi=Me.onFullScreen,Ai=Me.className,Et=Ai===void 0?"":Ai,fn=Me.disablePaste,Gi=fn===void 0?!1:fn,zi=Me.placeholder,na=zi===void 0?"":zi,Vi=Me.values,Z=Vi===void 0?"":Vi,L=Object(E.useState)(null),k=Object(G.a)(L,2),V=k[0],ne=k[1],Q=Object(E.useState)(ht),Pe=Object(G.a)(Q,2),pt=Pe[0],Lt=Pe[1],rn=Object(E.useState)(br),vt=Object(G.a)(rn,2),Gt=vt[0],pr=vt[1],Ir=Object(E.useState)(Lr),Zt=Object(G.a)(Ir,2),mt=Zt[0],Pt=Zt[1],Rt=Object(E.useState)(""),Ht=Object(G.a)(Rt,2),un=Ht[0],xn=Ht[1],Cn=Object(E.useState)(0),gn=Object(G.a)(Cn,2),Ln=gn[0],Kn=gn[1],dn=Object(E.useState)(En),Sn=Object(G.a)(dn,2),hr=Sn[0],Nn=Sn[1],Kt=Object(E.useState)(!1),An=Object(G.a)(Kt,2),lr=An[0],Un=An[1],zt=Object(E.useRef)(Object(De.a)()),jt=Object(E.useRef)(!1),yn=Object(E.useRef)(),Ct=Object(E.useRef)(),Mt=Object(E.useRef)(),Dt=Object(E.useRef)(),ke=Object(E.useRef)(),Vt=function(){var Xt=Object(F.a)(I.a.mark(function Jt(){var Yt,pn;return I.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(de.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zt.current}});case 2:pn=Mn.sent,pn!=null&&(Yt=pn.attachments)!==null&&Yt!==void 0&&Yt.length&&(console.log("cm:",V,Ct),pn.attachments.map(function(qn){qn.content_type.indexOf("image")>-1?V.replaceSelection("![,](/api/attachments/".concat(qn.id,"?type=").concat(qn.content_type,")")):qn.content_type.indexOf("video")>-1?V.replaceSelection('')):qn.content_type.indexOf("pdf")>-1?V.replaceSelection('
    ').concat(qn.name,"")):V.replaceSelection("[".concat(qn.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(qn.id,"?type=").concat(qn.content_type,")"))}));case 4:case"end":return Mn.stop()}},Jt)}));return function(){return Xt.apply(this,arguments)}}();Object(E.useEffect)(function(){Lt(Z),V==null||V.setValue(Z)},[Z]),Object(E.useEffect)(function(){vi==null||vi(mt)},[mt]),Object(E.useEffect)(function(){if(Ct.current){var Xt=c.a.fromTextArea(Ct.current,{mode:Or,lineNumbers:!rr,lineWrapping:!0,value:ht,autoCloseTags:!0,autoCloseBrackets:!0});Sr&&Xt.focus();function Jt(Yt,pn){if(Gi){pn.preventDefault();return}var Gn=pn.clipboardData;if(Gn){var Mn=Gn.types.toString(),qn=Gn.items;if(Mn==="Files"||Gn.types.indexOf("Files")>-1){if(pn.preventDefault(),Or=="stex")return;try{var gr,wi=qn[1];((gr=qn[0])===null||gr===void 0?void 0:gr.kind)==="file"&&(wi=qn[0]);var Zn=wi.getAsFile(),Qi=Zn.name.split(".").pop();Ce(Zn,function(vr){if(vr.id){var fi,si,Ni;(Zn==null||((fi=Zn.type)===null||fi===void 0)?void 0:fi.indexOf("image"))>-1?Xt.replaceSelection("![,](/api/attachments/".concat(vr.id,"?type=").concat(vr.content_type,")")):(Zn==null||((si=Zn.type)===null||si===void 0)?void 0:si.indexOf("video"))>-1?Xt.replaceSelection('')):(Zn==null||((Ni=Zn.type)===null||Ni===void 0)?void 0:Ni.indexOf("pdf"))>-1?Xt.replaceSelection('').concat(Zn.name,"")):ce.includes(Qi)?Xt.replaceSelection('').concat(Zn.name,"")):Xt.replaceSelection("[".concat(Zn.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(vr.id,"?type=").concat(vr.content_type,")"))}else(vr==null?void 0:vr.status)===401&&(document.location.href="/user/login")})}catch(vr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Xt.on("paste",Jt),Xt.on("dragleave",function(Yt,pn){Mt.current.classList.remove("mouse-hover-md")}),Xt.on("dragover",function(Yt,pn){Mt.current.classList.add("mouse-hover-md")}),Xt.on("drop",function(Yt,pn){Mt.current.classList.add("mouse-hover-md");var Gn;if(Gn=pn.dataTransfer.files,Gn.length>0){pn.preventDefault(),pn.stopPropagation();for(var Mn=function(wi){var Zn=Gn[wi],Qi=Zn.name.split(".").pop();Ce(Zn,function(vr){if(vr.id){var fi,si,Ni;(Zn==null||((fi=Zn.type)===null||fi===void 0)?void 0:fi.indexOf("image"))>-1?Xt.replaceSelection("![,](/api/attachments/".concat(vr.id,"?type=").concat(vr.content_type,")")):(Zn==null||((si=Zn.type)===null||si===void 0)?void 0:si.indexOf("video"))>-1?Xt.replaceSelection('')):(Zn==null||((Ni=Zn.type)===null||Ni===void 0)?void 0:Ni.indexOf("pdf"))>-1?Xt.replaceSelection('').concat(Zn.name,"")):ce.includes(Qi)?Xt.replaceSelection('').concat(Zn.name,"")):Xt.replaceSelection("[".concat(Zn.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(vr.id,"?type=").concat(vr.content_type,")"))}else(vr==null?void 0:vr.status)===401&&(document.location.href="/user/login")})},qn=0;qn0||qn.target.offsetWidth>0)&&(Tn(),V.setSize("100%","100%"),V.refresh())}}catch(gr){Gn.e(gr)}finally{Gn.f()}});return Yt.observe(Ct.current.parentElement),Yt}if(V){var Jt=Xt();return function(){Jt.unobserve(Ct.current.parentElement)}}},[V,Tn]),Object(E.useEffect)(function(){if(V){for(var Xt=[],Jt=function(){var qn=pn[Yt];Gn=Object(G.a)(qn,2);var gr=Gn[0],wi=Gn[1],Zn=Object(K.a)({},gr,function(){mr(wi)});Xt.push(Zn),V.addKeyMap(Zn)},Yt=0,pn=Object.entries(he);Yt0){var Xt=new Date().getTime(),Jt=window.sessionStorage.getItem(Yr);Xt>=Ln+Ot&&(!Jt||Jt!==pt)&&(window.sessionStorage.setItem(Yr,pt),Un(!0))}},Ot),Object(E.useEffect)(function(){pr(br)},[V,br]),Object(E.useEffect)(function(){V&&(Sr&&V.focus())},[V,Sr]),Object(E.useEffect)(function(){if(Gt&&V){var Xt=V.getScrollerElement();function Jt(Yt){var pn=Yt.target;if(ke.current){var Gn=pn.scrollTop/pn.scrollHeight;ke.current.scrollTop=ke.current.scrollHeight*Gn}}return Xt.addEventListener("scroll",Jt),function(){Xt.removeEventListener("scroll",Jt)}}},[V,Gt]),Object(E.useEffect)(function(){if(V&&Ur){function Xt(Jt,Yt){Ur(Jt,Yt)}return V.on("beforeChange",Xt),function(){V.off("beforeChange",Xt)}}},[V,Ur]),Object(E.useEffect)(function(){if(V&&kn){function Xt(){kn(V.getValue())}return V.on("blur",Xt),function(){V.off("blur",Xt)}}},[V,kn]),Object(E.useEffect)(function(){if(V){function Xt(Jt){var Yt=Jt.getValue();Lt(Yt),Kn(new Date().getTime()),Jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ut&&Ut(Yt)}return V.on("change",Xt),function(){V.off("change",Xt)}}},[V,Ut]),Object(E.useEffect)(function(){V&&(ht==null?(V.setValue(""),Lt("")):ht!==V.getValue()&&(V.setValue(ht),Lt(ht),V.setCursor(V.lineCount(),0)))},[V,ht]);var mr=Object(E.useCallback)(function(Xt){var Jt=V.getCursor(),Yt=V.getSelection(),pn=Yt.split(` `);switch(Xt){case"bold":return V.replaceSelection("**"+Yt+"**"),Yt===""&&V.setCursor(Jt.line,Jt.ch+2),V.focus();case"italic":return V.replaceSelection("*"+Yt+"*"),Yt===""&&V.setCursor(Jt.line,Jt.ch+1),V.focus();case"code":return V.replaceSelection("`"+Yt+"`"),Yt===""&&V.setCursor(Jt.line,Jt.ch+1),V.focus();case"inline-latex":return V.replaceSelection("`$$"+Yt+"$$`"),Yt===""&&V.setCursor(Jt.line,Jt.ch+3),V.focus();case"latex":return V.replaceSelection("```latex\n"+Yt+"\n```"),V.setCursor(Jt.line+1,Yt.length+1),V.focus();case"line-break":return V.replaceSelection(`
    `),V.focus();case"list-ul":return Yt===""?V.replaceSelection("- "+Yt):V.replaceSelection(pn.map(function(Gn){return Gn===""?"":"- ".concat(Gn)}).join(` `)),V.focus();case"list-ol":return Yt===""?V.replaceSelection("1. "+Yt):V.replaceSelection(pn.map(function(Gn,Mn){return Gn===""?"":"".concat(Mn+1,". ").concat(Gn)}).join(` `)),V.focus();case"add-null-ch":return Yt===""&&V.setCursor(Jt.line,Jt.ch+1),V.replaceSelection(qe),V.focus();case"inster-template-1":return Yt===""&&V.setCursor(Jt.line,Jt.ch),V.replaceSelection(st),V.focus();case"eraser":return V.setValue(""),V.focus();case"trigger-watch":return pr(!Gt),V.focus();case"trigger-full-screen":return Pt(!mt),V.focus();case Ne:xn(Ne);return;case rt:xn(rt);return;case Ue:xn(Ue);return;case lt:xn(lt);return;default:throw new Error}},[V,Gt,mt]),On=Object(E.useCallback)(function(Xt){xn("");switch(un){case Ne:var Jt=Xt.title,Yt=Xt.link;return V.replaceSelection("[".concat(Jt,"](").concat(Yt,")")),V.focus();case rt:var pn=Xt.language,Gn=Xt.content;return V.replaceSelection(["```"+pn,Gn,"```"].join(` `)),V.focus();case Ue:var Mn=Xt.src,qn=Xt.alt;return qn?V.replaceSelection("![ ".concat(qn," ]( ").concat(Mn,' "').concat(qn,'" )')):V.replaceSelection("![,](".concat(Mn,")")),V.focus();case lt:for(var gr=Xt.row,wi=Xt.col,Zn=Xt.align,Qi=` `,vr=0;vr300&&(gr=300);var wi=En+gr+"px";Nn(wi)}}return Xt.addEventListener("mousedown",pn),document.addEventListener("mousemove",Mn),document.addEventListener("mouseup",Gn),function(){Xt.removeEventListener("mousedown",pn),document.removeEventListener("mousemove",Mn),document.removeEventListener("mouseup",Gn)}}},[V,Dt]),Object(E.useEffect)(function(){Nn(En)},[En]);var Kr=xe(en),jn=xe(hr),Bt={width:Kr,height:jn},Er=Object(E.useMemo)(function(){if(Ln){var Xt=new Date(Ln),Jt=Xt.getHours(),Yt=Xt.getMinutes(),pn=Xt.getSeconds();return Jt=Jt<10?"0"+Jt:Jt,Yt=Yt<10?"0"+Yt:Yt,pn=pn<10?"0"+pn:pn,"".concat(Jt,":").concat(Yt,":").concat(pn)}return 0},[Ln]);function ur(){window.sessionStorage.removeItem(Yr),Un(!1),Kn(0)}function Yn(){Un(!1),Kn(0),V.setValue(window.sessionStorage.getItem(Yr))}function oi(Xt,Jt){var Yt=V.getValue();Yt=Yt.replace(Xt,Jt),Lt(Yt),V==null||V.setValue(Yt)}return f.a.createElement(E.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:Mt},f.a.createElement("div",{className:"markdown-editor-container ".concat(Et," ").concat(Gt?"on-preview":""," ").concat(rr?"mini":""," ").concat(mt?"full-screen":""),style:Bt},f.a.createElement(w,{insertTemp:Pn,watch:Gt,fullScreen:mt,showNullButton:hn,onActionCallback:mr,hidetoolBar:$r,uuid:zt.current,setOpenPhones:function(){jt.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:Ct,placeholder:na})),Gt?f.a.createElement("div",{ref:ke,className:"preview-container"},Or==="stex"&&f.a.createElement(R,{value:pt}),Or!=="stex"&&f.a.createElement(S.a,{edit:!0,value:pt,replaces:oi})):null))),sn?f.a.createElement("a",{ref:Dt,className:"editor-resize"}):null,f.a.createElement(j.a,null,Te[un]?f.a.createElement(Y.a,{centered:!0,title:Te[un],visible:!0,onCancel:ai,footer:null,className:"markdown-popup-form"},ii):null))}},"P/tu":function(ct,ge,U){"use strict";var te=U("ozfa"),Y=U("MJZm"),N=U("0Owb"),z=U("9og8"),P=U("tJVT"),F=U("PpiC"),G=U("WmNS"),K=U.n(G),n=U("q1tI"),I=U.n(n),E=U("WCUW"),f=U("spXi"),b=U.n(f),c=function(p){var l=p.value,u=p.onChange,s=p.defaultValue,i=p.disabled,D=Object(F.a)(p,["value","onChange","defaultValue","disabled"]),A=Object(n.useState)([]),S=Object(P.a)(A,2),R=S[0],O=S[1],g=Object(n.useState)("1"),_=Object(P.a)(g,2),h=_[0],d=_[1];Object(n.useEffect)(function(){C()},[]);var C=function(){var j=Object(z.a)(K.a.mark(function W(){var T,M;return K.a.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,Object(E.A)({});case 2:T=v.sent,T!=null&&T.data&&(M=[{title:I.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:b.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:I.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:x(T.data||[])}],O(M),d("2"));case 4:case"end":return v.stop()}},W)}));return function(){return j.apply(this,arguments)}}(),x=function(W){function T(M){var m=M.children,v=Array.isArray(m)&&m.length>0,H=M==null?void 0:M.group_id;return{title:I.a.createElement("div",{title:M==null?void 0:M.name,className:b.a.name},M==null?void 0:M.name),value:H,key:H,icon:I.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:v?m==null?void 0:m.map(function(X){return T(X)}):[]}}return W==null?void 0:W.map(function(M){return T(M)})},w=s?{defaultExpandedKeys:[0]}:{selectedKeys:l,defaultExpandedKeys:l};return I.a.createElement("div",{className:b.a.customTree},I.a.createElement(Y.a,Object(N.a)({key:h},w,{showIcon:!0,treeData:R,onSelect:u,disabled:i},D)))};ge.a=c},Q0Vu:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___3fHaw",flex_space_between:"flex_space_between___1tu3K",flex_box_vertical_center:"flex_box_vertical_center___3kmTT",flex_box_center_end:"flex_box_center_end___19OcD",flex_box_column:"flex_box_column___1aMoy",main:"main___JkLSb",wrap:"wrap___1k_Ib",content:"content___1by-P",programName:"programName___1mMSD",name:"name___2mlTd",directionContentWrap:"directionContentWrap___3qsxQ",directionItem:"directionItem___2aAvu",active:"active___ACZqb",subActive:"subActive___2RkoB",subItem:"subItem___3tJgX",subMenu:"subMenu___Y_7S_",action:"action___xqgFs"}},SAoR:function(ct,ge,U){"use strict";var te=U("Q9mQ"),Y=U("diRs"),N=U("q1tI"),z=U.n(N),P=U("+z73"),F=U.n(P),G=function(n){var I=n.data,E=I===void 0?[]:I,f=n.onClick,b=function(){return E.map(function(p,l){return z.a.createElement("div",{key:l,className:F.a.few},z.a.createElement("b",{title:p.name,style:{color:l===0?"#333333":"#999999"},onClick:function(){return f(p.id)}},p.name),l1&&i5?c():b())};ge.a=G},SJMd:function(ct,ge){/** * @license * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var U,te,Y,N=!1,z,P;window.PR_SHOULD_USE_CONTINUATION=!0;var F,G;(function(){var K=window,n=["break,continue,do,else,for,if,return,while"],I=[n,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],E=[I,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[E,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],b=[E,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[E,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",p=[E,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",u=[n,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],s=[n,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],i=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],D=[f,c,b,p,l,u,s,i],A=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,S="str",R="kwd",O="com",g="typ",_="lit",h="pun",d="pln",C="tag",x="dec",w="src",j="atn",W="atv",T="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function m(Fe){for(var Ke=0,nt=!1,de=!1,De=0,Ne=Fe.length;De122||(ce<65||me>90||kt.push([Math.max(65,me)|32,Math.min(ce,90)|32]),ce<97||me>122||kt.push([Math.max(97,me)&~32,Math.min(ce,122)&~32]))}}kt.sort(function(Me,et){return Me[0]-et[0]||et[1]-Me[1]});for(var he=[],Te=[],st=0;stRe[0]&&(Re[1]+1>Re[0]&&qe.push("-"),qe.push(ft(Re[1])))}return qe.push("]"),qe.join("")}function _t(xt){for(var Ze=xt.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),kt=Ze.length,Ot=[],qe=0,st=0;qe=2&&me==="["?Ze[qe]=at(xe):me!=="\\"&&(Ze[qe]=xe.replace(/[a-zA-Z]/g,function(Te){var Re=Te.charCodeAt(0);return"["+String.fromCharCode(Re&~32,Re|32)+"]"}))}return Ze.join("")}for(var gt=[],De=0,Ne=Fe.length;De=0;)nt[gt.charAt(xt)]=_t;var Ze=_t[1],kt=""+Ze;lt.hasOwnProperty(kt)||(rt.push(Ze),lt[kt]=null)}rt.push(/[\0-\uffff]/),de=m(rt)})();var De=Ke.length,Ne=function(Ue){for(var rt=Ue.sourceCode,lt=Ue.basePos,ft=Ue.sourceNode,at=[lt,d],_t=0,gt=rt.match(de)||[],xt={},Ze=0,kt=gt.length;Ze=5&&qe.substring(0,5)==="lang-",xe&&!(st&&typeof st[1]=="string")&&(xe=!1,qe=w),xe||(xt[Ot]=qe)}var ce=_t;if(_t+=Ot.length,!xe)at.push(lt+ce,qe);else{var he=st[1],Te=Ot.indexOf(he),Re=Te+he.length;st[2]&&(Re=Ot.length-st[2].length,Te=Re-he.length);var Me=qe.substring(5);H(ft,lt+ce,Ot.substring(0,Te),Ne,at),H(ft,lt+ce+Te,he,ae(Me,he),at),H(ft,lt+ce+Re,Ot.substring(Re),Ne,at)}}Ue.decorations=at};return Ne}function ye(Fe){var Ke=[],nt=[];Fe.tripleQuotedStrings?Ke.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Fe.multiLineStrings?Ke.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ke.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Fe.verbatimStrings&&nt.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var de=Fe.hashComments;de&&(Fe.cStyleComments?(de>1?Ke.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ke.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),nt.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ke.push([O,/^#[^\r\n]*/,null,"#"])),Fe.cStyleComments&&(nt.push([O,/^\/\/[^\r\n]*/,null]),nt.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var De=Fe.regexLiterals;if(De){var Ne=De>1?"":` \r`,Ue=Ne?".":"[\\S\\s]",rt="/(?=[^/*"+Ne+"])(?:[^/\\x5B\\x5C"+Ne+"]|\\x5C"+Ue+"|\\x5B(?:[^\\x5C\\x5D"+Ne+"]|\\x5C"+Ue+")*(?:\\x5D|$))+/";nt.push(["lang-regex",RegExp("^"+M+"("+rt+")")])}var lt=Fe.types;lt&&nt.push([g,lt]);var ft=(""+Fe.keywords).replace(/^ | $/g,"");ft.length&&nt.push([R,new RegExp("^(?:"+ft.replace(/[\s,]+/g,"|")+")\\b"),null]),Ke.push([d,/^\s+/,null,` \r \xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return Fe.regexLiterals&&(at+="(?!s*/)"),nt.push([_,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[_,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[h,new RegExp(at),null]),re(Ke,nt)}var pe=ye({keywords:D,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ue(Fe,Ke,nt){for(var de=/(?:^|\s)nocode(?:\s|$)/,De=/\r\n?|\n/,Ne=Fe.ownerDocument,Ue=Ne.createElement("li");Fe.firstChild;)Ue.appendChild(Fe.firstChild);var rt=[Ue];function lt(Ze){var kt=Ze.nodeType;if(kt==1&&!de.test(Ze.className))if(Ze.nodeName==="br")ft(Ze),Ze.parentNode&&Ze.parentNode.removeChild(Ze);else for(var Ot=Ze.firstChild;Ot;Ot=Ot.nextSibling)lt(Ot);else if((kt==3||kt==4)&&nt){var qe=Ze.nodeValue,st=qe.match(De);if(st){var xe=qe.substring(0,st.index);Ze.nodeValue=xe;var we=qe.substring(st.index+st[0].length);if(we){var me=Ze.parentNode;me.insertBefore(Ne.createTextNode(we),Ze.nextSibling)}ft(Ze),xe||Ze.parentNode.removeChild(Ze)}}}function ft(Ze){for(;!Ze.nextSibling;)if(Ze=Ze.parentNode,!Ze)return;function kt(st,xe){var we=xe?st.cloneNode(!1):st,me=st.parentNode;if(me){var ce=kt(me,1),he=st.nextSibling;ce.appendChild(we);for(var Te=he;Te;Te=he)he=Te.nextSibling,ce.appendChild(Te)}return we}for(var Ot=kt(Ze.nextSibling,0),qe;(qe=Ot.parentNode)&&qe.nodeType===1;)Ot=qe;rt.push(Ot)}for(var at=0;at=me&&(lt+=2),Ne>=ce&&(_t+=2)}}finally{qe&&(qe.style.display=st)}}var be={};function se(Fe,Ke){for(var nt=Ke.length;--nt>=0;){var de=Ke[nt];be.hasOwnProperty(de)?K.console&&console.warn("cannot override language handler %s",de):be[de]=Fe}}function ae(Fe,Ke){return Fe&&be.hasOwnProperty(Fe)||(Fe=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[h,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),se(re([[d,/^[\s]+/,null,` \r `],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[j,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[h,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),se(re([],[[W,/^[\s\S]+/]]),["uq.val"]),se(ye({keywords:f,hashComments:!0,cStyleComments:!0,types:A}),["c","cc","cpp","cxx","cyc","m"]),se(ye({keywords:"null,true,false"}),["json"]),se(ye({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:A}),["cs"]),se(ye({keywords:b,cStyleComments:!0}),["java"]),se(ye({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),se(ye({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),se(ye({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),se(ye({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),se(ye({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),se(ye({keywords:a,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),se(re([],[[S,/^[\s\S]+/]]),["regex"]);function Ce(Fe){var Ke=Fe.langExtension;try{var nt=v(Fe.sourceNode,Fe.pre),de=nt.sourceCode;Fe.sourceCode=de,Fe.spans=nt.spans,Fe.basePos=0,ae(Ke,de)(Fe),fe(Fe)}catch(De){K.console&&console.log(De&&De.stack||De)}}function ze(Fe,Ke,nt){var de=nt||!1,De=Ke||null,Ne=document.createElement("div");Ne.innerHTML="
    "+Fe+"
    ",Ne=Ne.firstChild,de&&ue(Ne,de,!0);var Ue={langExtension:De,numberLines:de,sourceNode:Ne,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ce(Ue),Ne.innerHTML}function Ye(Fe,Ke){var nt=Ke||document.body,de=nt.ownerDocument||document;function De(we){return nt.getElementsByTagName(we)}for(var Ne=[De("pre"),De("code"),De("xmp")],Ue=[],rt=0;rt=0),P.set("isFirefox",z.indexOf("Firefox")>=0),P.set("isChrome",z.indexOf("Chrome")>=0),P.set("isSafari",z.indexOf("Safari")>=0);const F=Object.prototype.hasOwnProperty;class G{static has(T){return f.create(T)}static equals(T,M){return b.create(T,M)}static regex(T,M){return S.create(T,M)}static not(T){return l.create(T)}static and(...T){return g.create(T,null)}static or(...T){return _.create(T,null,!0)}static deserialize(T,M=!1){return T?this._deserializeOrExpression(T,M):void 0}static _deserializeOrExpression(T,M){let m=T.split("||");return _.create(m.map(v=>this._deserializeAndExpression(v,M)),null,!0)}static _deserializeAndExpression(T,M){let m=T.split("&&");return g.create(m.map(v=>this._deserializeOne(v,M)),null)}static _deserializeOne(T,M){if(T=T.trim(),T.indexOf("!=")>=0){let m=T.split("!=");return p.create(m[0].trim(),this._deserializeValue(m[1],M))}if(T.indexOf("==")>=0){let m=T.split("==");return b.create(m[0].trim(),this._deserializeValue(m[1],M))}if(T.indexOf("=~")>=0){let m=T.split("=~");return S.create(m[0].trim(),this._deserializeRegexValue(m[1],M))}if(T.indexOf(" in ")>=0){let m=T.split(" in ");return c.create(m[0].trim(),m[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const m=T.split(">=");return i.create(m[0].trim(),m[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const m=T.split(">");return s.create(m[0].trim(),m[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const m=T.split("<=");return A.create(m[0].trim(),m[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const m=T.split("<");return D.create(m[0].trim(),m[1].trim())}return/^\!\s*/.test(T)?l.create(T.substr(1).trim()):f.create(T)}static _deserializeValue(T,M){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let m=/^'([^']*)'$/.exec(T);return m?m[1].trim():T}static _deserializeRegexValue(T,M){if(Object(Y.C)(T)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let m=T.indexOf("/"),v=T.lastIndexOf("/");if(m===v||m<0){if(M)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let H=T.slice(m+1,v),X=T[v+1]==="i"?"i":"";try{return new RegExp(H,X)}catch(q){if(M)throw new Error(`bad regexp-value '${T}', parse error: ${q}`);return console.warn(`bad regexp-value '${T}', parse error: ${q}`),null}}}function K(T,M){const m=T?T.substituteConstants():void 0,v=M?M.substituteConstants():void 0;return!m&&!v?!0:!m||!v?!1:m.equals(v)}function n(T,M){return T.cmp(M)}class I{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return E.INSTANCE}}I.INSTANCE=new I;class E{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return I.INSTANCE}}E.INSTANCE=new E;class f{constructor(T,M){this.key=T,this.negated=M,this.type=2}static create(T,M=null){const m=P.get(T);return typeof m=="boolean"?m?E.INSTANCE:I.INSTANCE:new f(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:x(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=P.get(this.key);return typeof T=="boolean"?T?E.INSTANCE:I.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class b{constructor(T,M,m){this.key=T,this.value=M,this.negated=m,this.type=4}static create(T,M,m=null){if(typeof M=="boolean")return M?f.create(T,m):l.create(T,m);const v=P.get(T);if(typeof v=="boolean"){const H=v?"true":"false";return M===H?E.INSTANCE:I.INSTANCE}return new b(T,M,m)}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=P.get(this.key);if(typeof T=="boolean"){const M=T?"true":"false";return this.value===M?E.INSTANCE:I.INSTANCE}return this}evaluate(T){return T.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class c{constructor(T,M){this.key=T,this.valueKey=M,this.type=10,this.negated=null}static create(T,M){return new c(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const M=T.getValue(this.valueKey),m=T.getValue(this.key);return Array.isArray(M)?M.indexOf(m)>=0:typeof m=="string"&&typeof M=="object"&&M!==null?F.call(M,m):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=a.create(this)),this.negated}}class a{constructor(T){this._actual=T,this.type=11}static create(T){return new a(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class p{constructor(T,M,m){this.key=T,this.value=M,this.negated=m,this.type=5}static create(T,M,m=null){if(typeof M=="boolean")return M?l.create(T,m):f.create(T,m);const v=P.get(T);if(typeof v=="boolean"){const H=v?"true":"false";return M===H?I.INSTANCE:E.INSTANCE}return new p(T,M,m)}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=P.get(this.key);if(typeof T=="boolean"){const M=T?"true":"false";return this.value===M?I.INSTANCE:E.INSTANCE}return this}evaluate(T){return T.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class l{constructor(T,M){this.key=T,this.negated=M,this.type=3}static create(T,M=null){const m=P.get(T);return typeof m=="boolean"?m?I.INSTANCE:E.INSTANCE:new l(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:x(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=P.get(this.key);return typeof T=="boolean"?T?I.INSTANCE:E.INSTANCE:this}evaluate(T){return!T.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function u(T,M){if(typeof T=="string"){const m=parseFloat(T);isNaN(m)||(T=m)}return typeof T=="string"||typeof T=="number"?M(T):I.INSTANCE}class s{constructor(T,M,m){this.key=T,this.value=M,this.negated=m,this.type=12}static create(T,M,m=null){return u(M,v=>new s(T,v,m))}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class i{constructor(T,M,m){this.key=T,this.value=M,this.negated=m,this.type=13}static create(T,M,m=null){return u(M,v=>new i(T,v,m))}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class D{constructor(T,M,m){this.key=T,this.value=M,this.negated=m,this.type=14}static create(T,M,m=null){return u(M,v=>new D(T,v,m))}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))new A(T,v,m))}cmp(T){return T.type!==this.type?this.type-T.type:w(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class S{constructor(T,M){this.key=T,this.regexp=M,this.type=7,this.negated=null}static create(T,M){return new S(T,M)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.keyT.key)return 1;const M=this.regexp?this.regexp.source:"",m=T.regexp?T.regexp.source:"";return Mm?1:0}equals(T){if(T.type===this.type){const M=this.regexp?this.regexp.source:"",m=T.regexp?T.regexp.source:"";return this.key===T.key&&M===m}return!1}substituteConstants(){return this}evaluate(T){let M=T.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(T){this._actual=T,this.type=8}static create(T){return new R(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(T){let M=null;for(let m=0,v=T.length;mT.expr.length)return 1;for(let M=0,m=this.expr.length;M1;){const H=m[m.length-1];if(H.type!==9)break;m.pop();const X=m.pop(),q=m.length===0,re=_.create(H.expr.map(ye=>g.create([ye,X],null)),null,q);re&&(m.push(re),m.sort(n))}return m.length===1?m[0]:new g(m,M)}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let M of this.expr)T.push(...M.keys());return T}negate(){if(!this.negated){const T=[];for(let M of this.expr)T.push(M.negate());this.negated=_.create(T,this,!0)}return this.negated}}class _{constructor(T,M){this.expr=T,this.negated=M,this.type=9}static create(T,M,m){return _._normalizeArr(T,M,m)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.lengthT.expr.length)return 1;for(let M=0,m=this.expr.length;MT.serialize()).join(" || ")}keys(){const T=[];for(let M of this.expr)T.push(...M.keys());return T}negate(){if(!this.negated){let T=[];for(let M of this.expr)T.push(M.negate());for(;T.length>1;){const M=T.shift(),m=T.shift(),v=[];for(const X of W(M))for(const q of W(m))v.push(g.create([X,q],null));const H=T.length===0;T.unshift(_.create(v,null,H))}this.negated=T[0]}return this.negated}}class h extends f{constructor(T,M,m){super(T,null);this._defaultValue=M,typeof m=="object"?h._info.push(Object.assign(Object.assign({},m),{key:T})):m!==!0&&h._info.push({key:T,description:m,type:M!=null?typeof M:void 0})}static all(){return h._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return b.create(this.key,T)}}h._info=[];const d=Object(N.c)("contextKeyService"),C="setContext";function x(T,M){return TM?1:0}function w(T,M,m,v){return Tm?1:Mv?1:0}function j(T,M){if(M.type===6&&T.type!==9&&T.type!==6){for(const H of M.expr)if(T.equals(H))return!0}const m=T.negate(),v=W(m).concat(W(M));v.sort(n);for(let H=0;H=0;c--)if(this.__items[c].match(b))return!0;return!1},I.prototype.set_indent=function(b,c){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},I.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(b){this.__items.push(b);var c=b.lastIndexOf(` `);c!==-1?this.__character_count=b.length-c:this.__character_count+=b.length},I.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function E(b,c){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),c=c||"",b.indent_level>0&&(c=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}E.prototype.get_indent_size=function(b,c){var a=this.__base_string_length;return c=c||0,b<0&&(a=0),a+=b*this.__indent_size,a+=c,a},E.prototype.get_indent_string=function(b,c){var a=this.__base_string;return c=c||0,b<0&&(b=0,a=""),c+=b*this.__indent_size,this.__ensure_cache(c),a+=this.__cache[c],a},E.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var b=this.__cache.length,c=0,a="";this.__indent_size&&b>=this.__indent_size&&(c=Math.floor(b/this.__indent_size),b-=c*this.__indent_size,a=new Array(c+1).join(this.__indent_string)),b&&(a+=new Array(b+1).join(" ")),this.__cache.push(a)};function f(b,c){this.__indent_cache=new E(b,c),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(b,c){return this.__indent_cache.get_indent_string(b,c)},f.prototype.get_indent_size=function(b,c){return this.__indent_cache.get_indent_size(b,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(b){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` `);return b!==` `&&(a=a.replace(/[\n]/g,b)),a},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(b,c){return b=b||0,c=c||0,this.next_line.set_indent(b,c),this.__lines.length>1?(this.current_line.set_indent(b,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(b){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(b,c){for(var a=this.__lines.length-2;a>=0;){var p=this.__lines[a];if(p.is_empty())break;if(p.item(0).indexOf(b)!==0&&p.item(-1)!==c){this.__lines.splice(a+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},n.exports.Output=f},,,,function(n){function I(b,c){this.raw_options=E(b,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}I.prototype._get_array=function(b,c){var a=this.raw_options[b],p=c||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(p=a.concat()):typeof a=="string"&&(p=a.split(/[^a-zA-Z0-9_\/\-]+/)),p},I.prototype._get_boolean=function(b,c){var a=this.raw_options[b],p=a===void 0?!!c:!!a;return p},I.prototype._get_characters=function(b,c){var a=this.raw_options[b],p=c||"";return typeof a=="string"&&(p=a.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),p},I.prototype._get_number=function(b,c){var a=this.raw_options[b];c=parseInt(c,10),isNaN(c)&&(c=0);var p=parseInt(a,10);return isNaN(p)&&(p=c),p},I.prototype._get_selection=function(b,c,a){var p=this._get_selection_list(b,c,a);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+b+`' can only be one of the following values: `+c+` You passed in: '`+this.raw_options[b]+"'");return p[0]},I.prototype._get_selection_list=function(b,c,a){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[c[0]],!this._is_valid_selection(a,c))throw new Error("Invalid Default Value!");var p=this._get_array(b,a);if(!this._is_valid_selection(p,c))throw new Error("Invalid Option Value: The option '"+b+`' can contain only the following values: `+c+` You passed in: '`+this.raw_options[b]+"'");return p},I.prototype._is_valid_selection=function(b,c){return b.length&&c.length&&!b.some(function(a){return c.indexOf(a)===-1})};function E(b,c){var a={};b=f(b);var p;for(p in b)p!==c&&(a[p]=b[p]);if(c&&b[c])for(p in b[c])a[p]=b[c][p];return a}function f(b){var c={},a;for(a in b){var p=a.replace(/-/g,"_");c[p]=b[a]}return c}n.exports.Options=I,n.exports.normalizeOpts=f,n.exports.mergeOpts=E},,function(n){var I=RegExp.prototype.hasOwnProperty("sticky");function E(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position=0&&f=0&&b=f.length&&this.__input.substring(b-f.length,b).toLowerCase()===f},n.exports.InputScanner=E},,,,,function(n){function I(E,f){E=typeof E=="string"?E:E.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+f,"g")}I.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var b=this.__directive_pattern.exec(E);b;)f[b[1]]=b[2],b=this.__directive_pattern.exec(E);return f},I.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=I},,function(n,I,E){var f=E(16).Beautifier,b=E(17).Options;function c(a,p){var l=new f(a,p);return l.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new b}},function(n,I,E){var f=E(17).Options,b=E(2).Output,c=E(8).InputScanner,a=E(13).Directives,p=new a(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,s=/\s/,i=/(?:\s|\n)+/g,D=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,A=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(R,O){this._source_text=R||"",this._options=new f(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}S.prototype.eatString=function(R){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return O},S.prototype.eatWhitespace=function(R){for(var O=s.test(this._input.peek()),g=0;s.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===` `&&((g===0||g0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,O=this._options.eol;O==="auto"&&(O=` `,R&&l.test(R||"")&&(O=R.match(l)[0])),R=R.replace(u,` `);var g=R.match(/^[\t ]*/)[0];this._output=new b(this._options,g),this._input=new c(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var _=0,h=!1,d=!1,C=!1,x=!1,w=!1,j=!1,W=this._ch,T=!1,M,m,v;M=this._input.read(i),m=M!=="",v=W,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),W=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(D),X=p.get_directives(H);X&&X.ignore==="start"&&(H+=p.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(A)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(m),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s$/,""),this.print_string(q),this._output.space_before_token=!0),q=q.replace(/\s$/,""),q==="extend"?x=!0:q==="import"&&(w=!0),q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!h&&_===0&&q.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(m),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),C?(C=!1,h=this._indentLevel>=this._nestedLevel):h=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&h&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(v==="("?this._output.space_before_token=!1:v!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),v==="{"&&this._output.trim(!0),w=!1,x=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),h=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var re=0;re"||this._ch==="+"||this._ch==="~")&&!d&&_===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&s.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(m),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),s.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ue=v==='"'||v==="'";this.preserveSingleSpace(ue||m),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&T&&this._output.add_new_line()}var fe=this._output.get_code(O);return fe},n.exports.Beautifier=S},function(n,I,E){var f=E(6).Options;function b(c){f.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var a=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||a;var p=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l` ${E} `).trim():""}class G{constructor(n,I,E){this.id=n,this.definition=I,this.description=E,N.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var K;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const I=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function E(c){if(c instanceof G)return["codicon","codicon-"+c.id];const a=I.exec(c.id);if(!a)return E(G.error);let[,p,l]=a;const u=["codicon","codicon-"+p];return l&&u.push("codicon-modifier-"+l.substr(1)),u}n.asClassNameArray=E;function f(c){return E(c).join(" ")}n.asClassName=f;function b(c){return"."+E(c).join(".")}n.asCSSSelector=b})(K||(K={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(G||(G={}))},"VrN/":function(ct,ge,U){(function(te,Y){ct.exports=Y()})(this,function(){"use strict";var te=navigator.userAgent,Y=navigator.platform,N=/gecko\/\d/i.test(te),z=/MSIE \d/.test(te),P=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(te),F=/Edge\/(\d+)/.exec(te),G=z||P||F,K=G&&(z?document.documentMode||6:+(F||P)[1]),n=!F&&/WebKit\//.test(te),I=n&&/Qt\/\d+\.\d+/.test(te),E=!F&&/Chrome\//.test(te),f=/Opera\//.test(te),b=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(te),a=/PhantomJS/.test(te),p=!F&&/AppleWebKit/.test(te)&&/Mobile\/\w+/.test(te),l=/Android/.test(te),u=p||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(te),s=p||/Mac/.test(Y),i=/\bCrOS\b/.test(te),D=/win/i.test(Y),A=f&&te.match(/Version\/(\d*\.\d*)/);A&&(A=Number(A[1])),A&&A>=15&&(f=!1,n=!0);var S=s&&(I||f&&(A==null||A<12.11)),R=N||G&&K>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,t){var o=e.className,r=O(t).exec(o);if(r){var y=o.slice(r.index+r[0].length);e.className=o.slice(0,r.index)+(y?r[1]+y:"")}};function _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function h(e,t){return _(e).appendChild(t)}function d(e,t,o,r){var y=document.createElement(e);if(o&&(y.className=o),r&&(y.style.cssText=r),typeof t=="string")y.appendChild(document.createTextNode(t));else if(t)for(var B=0;B=t)return $+(t-B);$+=J-B,$+=o-$%o,B=J+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=m(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var o=+new Date+e;(!this.id||o=t)return r+Math.min($,t-y);if(y+=B-r,y+=o-y%o,r=B+1,y>=t)return r}}var se=[""];function ae(e){for(;se.length<=e;)se.push(Ce(se)+" ");return se[e]}function Ce(e){return e[e.length-1]}function ze(e,t){for(var o=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Fe.test(e))}function nt(e,t){return t?t.source.indexOf("\\w")>-1&&Ke(e)?!0:t.test(e):Ke(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var De=/[\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 Ne(e){return e.charCodeAt(0)>=768&&De.test(e)}function Ue(e,t,o){for(;(o<0?t>0:to?-1:1;;){if(t==o)return t;var y=(t+o)/2,B=r<0?Math.ceil(y):Math.floor(y);if(B==t)return e(B)?t:o;e(B)?o=B:t=B+r}}function lt(e,t,o,r){if(!e)return r(t,o,"ltr",0);for(var y=!1,B=0;Bt||t==o&&$.to==t)&&(r(Math.max($.from,t),Math.min($.to,o),$.level==1?"rtl":"ltr",B),y=!0)}y||r(t,o,"ltr")}var ft=null;function at(e,t,o){var r;ft=null;for(var y=0;yt)return y;B.to==t&&(B.from!=B.to&&o=="before"?r=y:ft=y),B.from==t&&(B.from!=B.to&&o!="before"?r=y:ft=y)}return r!=null?r:ft}var _t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function o(oe){return oe<=247?e.charAt(oe):1424<=oe&&oe<=1524?"R":1536<=oe&&oe<=1785?t.charAt(oe-1536):1774<=oe&&oe<=2220?"r":8192<=oe&&oe<=8203?"w":oe==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,y=/[stwN]/,B=/[LRr]/,$=/[Lb1n]/,J=/[1n]/;function ee(oe,Oe,Ie){this.level=oe,this.from=Oe,this.to=Ie}return function(oe,Oe){var Ie=Oe=="ltr"?"L":"R";if(oe.length==0||Oe=="ltr"&&!r.test(oe))return!1;for(var Qe=oe.length,Xe=[],dt=0;dt-1&&(r[t]=y.slice(0,B).concat(y.slice(B+1)))}}}function qe(e,t){var o=kt(e,t);if(!o.length)return;for(var r=Array.prototype.slice.call(arguments,2),y=0;y0}function me(e){e.prototype.on=function(t,o){Ze(this,t,o)},e.prototype.off=function(t,o){Ot(this,t,o)}}function ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function he(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Te(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Re(e){ce(e),he(e)}function Me(e){return e.target||e.srcElement}function et(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var ht=function(){if(G&&K<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Ut;function nn(e){if(Ut==null){var t=d("span","\u200B");h(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ut=t.offsetWidth<=1&&t.offsetHeight>2&&!(G&&K<8))}var o=Ut?d("span","\u200B"):d("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}var en;function mn(e){if(en!=null)return en;var t=h(e,document.createTextNode("A\u062EA")),o=x(t,0,1).getBoundingClientRect(),r=x(t,1,2).getBoundingClientRect();return _(e),!o||o.left==o.right?!1:en=r.right-o.right<3}var En=` b`.split(/\n/).length!=3?function(e){for(var t=0,o=[],r=e.length;t<=r;){var y=e.indexOf(` `,t);y==-1&&(y=e.length);var B=e.slice(t,e.charAt(y-1)=="\r"?y-1:y),$=B.indexOf("\r");$!=-1?(o.push(B.slice(0,$)),t+=$+1):(o.push(B),t=y+1)}return o}:function(e){return e.split(/\r\n?|\n/)},$t=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(o){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},rr=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Dn=null;function Sr(e){if(Dn!=null)return Dn;var t=h(e,d("span","x")),o=t.getBoundingClientRect(),r=x(t,0,1).getBoundingClientRect();return Dn=Math.abs(o.left-r.left)>1}var br={},Pn={};function Dr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),br[e]=t}function Or(e,t){Pn[e]=t}function ln(e){if(typeof e=="string"&&Pn.hasOwnProperty(e))e=Pn[e];else if(e&&typeof e.name=="string"&&Pn.hasOwnProperty(e.name)){var t=Pn[e.name];typeof t=="string"&&(t={name:t}),e=Ve(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ln("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ln("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Yr(e,t){t=ln(t);var o=br[t.name];if(!o)return Yr(e,"text/plain");var r=o(e,t);if(tn.hasOwnProperty(t.name)){var y=tn[t.name];for(var B in y){if(!y.hasOwnProperty(B))continue;r.hasOwnProperty(B)&&(r["_"+B]=r[B]),r[B]=y[B]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var $ in t.modeProps)r[$]=t.modeProps[$];return r}var tn={};function sn(e,t){var o=tn.hasOwnProperty(e)?tn[e]:tn[e]={};v(t,o)}function Qn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var o={};for(var r in t){var y=t[r];y instanceof Array&&(y=y.concat([])),o[r]=y}return o}function sr(e,t){for(var o;e.innerMode&&!(o=e.innerMode(t),!o||o.mode==e);)t=o.state,e=o.mode;return o||{mode:e,state:t}}function Nr(e,t,o){return e.startState?e.startState(t,o):!0}var hn=function(e,t,o){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=o};hn.prototype.eol=function(){return this.pos>=this.string.length},hn.prototype.sol=function(){return this.pos==this.lineStart},hn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},hn.prototype.next=function(){if(this.post},hn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},hn.prototype.skipToEnd=function(){this.pos=this.string.length},hn.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},hn.prototype.backUp=function(e){this.pos-=e},hn.prototype.column=function(){return this.lastColumnPos0?null:(B&&t!==!1&&(this.pos+=B[0].length),B)}},hn.prototype.current=function(){return this.string.slice(this.start,this.pos)},hn.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},hn.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},hn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Qt(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 o=e;!o.lines;)for(var r=0;;++r){var y=o.children[r],B=y.chunkSize();if(t=e.first&&to?Et(o,Qt(e,o).text.length):k(t,Qt(e,t.line).text.length)}function k(e,t){var o=e.ch;return o==null||o>t?Et(e.line,t):o<0?Et(e.line,0):e}function V(e,t){for(var o=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Q.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}},Q.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Q.fromSaved=function(e,t,o){return t instanceof ne?new Q(e,Qn(e.mode,t.state),o,t.lookAhead):new Q(e,Qn(e.mode,t),o)},Q.prototype.save=function(e){var t=e!==!1?Qn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ne(t,this.maxLookAhead):t};function Pe(e,t,o,r){var y=[e.state.modeGen],B={};mt(e,t.text,e.doc.mode,o,function(oe,Oe){return y.push(oe,Oe)},B,r);for(var $=o.state,J=function(oe){o.baseTokens=y;var Oe=e.state.overlays[oe],Ie=1,Qe=0;o.state=!0,mt(e,t.text,Oe.mode,o,function(Xe,dt){for(var bt=Ie;QeXe&&y.splice(Ie,1,Xe,y[Ie+1],It),Ie+=2,Qe=Math.min(Xe,It)}if(!dt)return;if(Oe.opaque)y.splice(bt,Ie-bt,Xe,"overlay "+dt),Ie=bt+2;else for(;bte.options.maxHighlightLength&&Qn(e.doc.mode,r.state),B=Pe(e,t,r);y&&(r.state=y),t.stateAfter=r.save(!y),t.styles=B.styles,B.classes?t.styleClasses=B.classes:t.styleClasses&&(t.styleClasses=null),o===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Lt(e,t,o){var r=e.doc,y=e.display;if(!r.mode.startState)return new Q(r,!0,t);var B=Pt(e,t,o),$=B>r.first&&Qt(r,B-1).stateAfter,J=$?Q.fromSaved(r,$,B):new Q(r,Nr(r.mode),B);return r.iter(B,t,function(ee){rn(e,ee.text,J);var oe=J.line;ee.stateAfter=oe==t-1||oe%5==0||oe>=y.viewFrom&&oet.start)return B}throw new Error("Mode "+e.name+" failed to advance stream.")}var pr=function(e,t,o){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=o};function Ir(e,t,o,r){var y=e.doc,B=y.mode,$;t=L(y,t);var J=Qt(y,t.line),ee=Lt(e,t.line,o),oe=new hn(J.text,e.options.tabSize,ee),Oe;for(r&&(Oe=[]);(r||oe.pose.options.maxHighlightLength?(J=!1,$&&rn(e,t,r,Oe.pos),Oe.pos=t.length,Ie=null):Ie=Zt(Gt(o,Oe,r.state,Qe),B),Qe){var Xe=Qe[0].name;Xe&&(Ie="m-"+(Ie?Xe+" "+Ie:Xe))}if(!J||oe!=Ie){for(;ee$;--J){if(J<=B.first)return B.first;var ee=Qt(B,J-1),oe=ee.stateAfter;if(oe&&(!o||J+(oe instanceof ne?oe.lookAhead:0)<=B.modeFrontier))return J;var Oe=H(ee.text,null,e.options.tabSize);(y==null||r>Oe)&&(y=J-1,r=Oe)}return y}function Rt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiero;r--){var y=Qt(e,r).stateAfter;if(y&&(!(y instanceof ne)||r+y.lookAhead=t:B.to>t);(r||(r=[])).push(new gn($,B.from,ee?null:B.to))}}return r}function hr(e,t,o){var r;if(e)for(var y=0;y=t:B.to>t);if(J||B.from==t&&$.type=="bookmark"&&(!o||B.marker.insertLeft)){var ee=B.from==null||($.inclusiveLeft?B.from<=t:B.from0&&J)for(var on=0;on0)continue;var Oe=[ee,1],Ie=fn(oe.from,J.from),Qe=fn(oe.to,J.to);(Ie<0||!$.inclusiveLeft&&!Ie)&&Oe.push({from:oe.from,to:J.from}),(Qe>0||!$.inclusiveRight&&!Qe)&&Oe.push({from:J.to,to:oe.to}),y.splice.apply(y,Oe),ee+=Oe.length-3}return y}function lr(e){var t=e.markedSpans;if(!t)return;for(var o=0;ot)&&(!r||yn(r,B.marker)<0)&&(r=B.marker)}return r}function Vt(e,t,o,r,y){var B=Qt(e,t),$=un&&B.markedSpans;if($)for(var J=0;J<$.length;++J){var ee=$[J];if(!ee.marker.collapsed)continue;var oe=ee.marker.find(0),Oe=fn(oe.from,o)||zt(ee.marker)-zt(y),Ie=fn(oe.to,r)||jt(ee.marker)-jt(y);if(Oe>=0&&Ie<=0||Oe<=0&&Ie>=0)continue;if(Oe<=0&&(ee.marker.inclusiveRight&&y.inclusiveLeft?fn(oe.to,o)>=0:fn(oe.to,o)>0)||Oe>=0&&(ee.marker.inclusiveRight&&y.inclusiveLeft?fn(oe.from,r)<=0:fn(oe.from,r)<0))return!0}}function Tn(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function mr(e){for(var t;t=Dt(e);)e=t.find(1,!0).line;return e}function On(e){for(var t,o;t=Dt(e);)e=t.find(1,!0).line,(o||(o=[])).push(e);return o}function ii(e,t){var o=Qt(e,t),r=Tn(o);return o==r?t:kn(r)}function ai(e,t){if(t>e.lastLine())return t;var o=Qt(e,t),r;if(!Kr(e,o))return t;for(;r=Dt(o);)o=r.find(1,!0).line;return kn(o)+1}function Kr(e,t){var o=un&&t.markedSpans;if(o)for(var r=void 0,y=0;yt.maxLineLength&&(t.maxLineLength=y,t.maxLine=r)})}var Yn=function(e,t,o){this.text=e,Un(this,t),this.height=o?o(this):1};Yn.prototype.lineNo=function(){return kn(this)},me(Yn);function oi(e,t,o,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),lr(e),Un(e,o);var y=r?r(e):1;y!=e.height&&Lr(e,y)}function Xt(e){e.parent=null,lr(e)}var Jt={},Yt={};function pn(e,t){if(!e||/^\s*$/.test(e))return null;var o=t.addModeClass?Yt:Jt;return o[e]||(o[e]=e.replace(/\S+/g,"cm-$&"))}function Gn(e,t){var o=C("span",null,null,n?"padding-right: .1px":null),r={pre:C("pre",[o],"CodeMirror-line"),content:o,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var y=0;y<=(t.rest?t.rest.length:0);y++){var B=y?t.rest[y-1]:t.line,$=void 0;r.pos=0,r.addToken=qn,mn(e.display.measure)&&($=gt(B,e.doc.direction))&&(r.addToken=wi(r.addToken,$)),r.map=[];var J=t!=e.display.externalMeasured&&kn(B);Qi(B,r,pt(e,B,J)),B.styleClasses&&(B.styleClasses.bgClass&&(r.bgClass=T(B.styleClasses.bgClass,r.bgClass||"")),B.styleClasses.textClass&&(r.textClass=T(B.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(nn(e.display.measure))),y==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var ee=r.content.lastChild;(/\bcm-tab\b/.test(ee.className)||ee.querySelector&&ee.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return qe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=T(r.pre.className,r.textClass||"")),r}function Mn(e){var t=d("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function qn(e,t,o,r,y,B,$){if(!t)return;var J=e.splitSpaces?gr(t,e.trailingSpace):t,ee=e.cm.state.specialChars,oe=!1,Oe;if(!ee.test(t))e.col+=t.length,Oe=document.createTextNode(J),e.map.push(e.pos,e.pos+t.length,Oe),G&&K<9&&(oe=!0),e.pos+=t.length;else{Oe=document.createDocumentFragment();for(var Ie=0;;){ee.lastIndex=Ie;var Qe=ee.exec(t),Xe=Qe?Qe.index-Ie:t.length-Ie;if(Xe){var dt=document.createTextNode(J.slice(Ie,Ie+Xe));G&&K<9?Oe.appendChild(d("span",[dt])):Oe.appendChild(dt),e.map.push(e.pos,e.pos+Xe,dt),e.col+=Xe,e.pos+=Xe}if(!Qe)break;Ie+=Xe+1;var bt=void 0;if(Qe[0]==" "){var It=e.cm.options.tabSize,Ft=It-e.col%It;bt=Oe.appendChild(d("span",ae(Ft),"cm-tab")),bt.setAttribute("role","presentation"),bt.setAttribute("cm-text"," "),e.col+=Ft}else Qe[0]=="\r"||Qe[0]==` `?(bt=Oe.appendChild(d("span",Qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),bt.setAttribute("cm-text",Qe[0]),e.col+=1):(bt=e.cm.options.specialCharPlaceholder(Qe[0]),bt.setAttribute("cm-text",Qe[0]),G&&K<9?Oe.appendChild(d("span",[bt])):Oe.appendChild(bt),e.col+=1);e.map.push(e.pos,e.pos+1,bt),e.pos++}}if(e.trailingSpace=J.charCodeAt(t.length-1)==32,o||r||y||oe||B||$){var qt=o||"";r&&(qt+=r),y&&(qt+=y);var Wt=d("span",[Oe],qt,B);if($)for(var on in $)$.hasOwnProperty(on)&&on!="style"&&on!="class"&&Wt.setAttribute(on,$[on]);return e.content.appendChild(Wt)}e.content.appendChild(Oe)}function gr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var o=t,r="",y=0;yoe&&Ie.from<=oe);Qe++);if(Ie.to>=Oe)return e(o,r,y,B,$,J,ee);e(o,r.slice(0,Ie.to-oe),y,B,null,J,ee),B=null,r=r.slice(Ie.to-oe),oe=Ie.to}}}function Zn(e,t,o,r){var y=!r&&o.widgetNode;y&&e.map.push(e.pos,e.pos+t,y),!r&&e.cm.display.input.needsContentAttribute&&(y||(y=e.content.appendChild(document.createElement("span"))),y.setAttribute("cm-marker",o.id)),y&&(e.cm.display.input.setUneditable(y),e.content.appendChild(y)),e.pos+=t,e.trailingSpace=!1}function Qi(e,t,o){var r=e.markedSpans,y=e.text,B=0;if(!r){for(var $=1;$ee||ar.collapsed&&bn.to==ee&&bn.from==ee)){if(bn.to!=null&&bn.to!=ee&&Xe>bn.to&&(Xe=bn.to,bt=""),ar.className&&(dt+=" "+ar.className),ar.css&&(Qe=(Qe?Qe+";":"")+ar.css),ar.startStyle&&bn.from==ee&&(It+=" "+ar.startStyle),ar.endStyle&&bn.to==Xe&&(on||(on=[])).push(ar.endStyle,bn.to),ar.title&&((qt||(qt={})).title=ar.title),ar.attributes)for(var Fr in ar.attributes)(qt||(qt={}))[Fr]=ar.attributes[Fr];ar.collapsed&&(!Ft||yn(Ft.marker,ar)<0)&&(Ft=bn)}else bn.from>ee&&Xe>bn.from&&(Xe=bn.from)}if(on)for(var xi=0;xi=J)break;for(var $i=Math.min(J,Xe);;){if(Oe){var Wi=ee+Oe.length;if(!Ft){var di=Wi>$i?Oe.slice(0,$i-ee):Oe;t.addToken(t,di,Ie?Ie+dt:dt,It,ee+di.length==Xe?bt:"",Qe,qt)}if(Wi>=$i){Oe=Oe.slice($i-ee),ee=$i;break}ee=Wi,It=""}Oe=y.slice(B,B=o[oe++]),Ie=pn(o[oe++],t.cm.options)}}}function vr(e,t,o){this.line=t,this.rest=On(t),this.size=this.rest?kn(Ce(this.rest))-o+1:1,this.node=this.text=null,this.hidden=Kr(e,t)}function fi(e,t,o){for(var r=[],y,B=t;B2&&B.push((ee.bottom+oe.top)/2-o.top)}}B.push(o.bottom-o.top)}}function le(e,t,o){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;ro)return{map:e.measure.maps[y],cache:e.measure.caches[y],before:!0}}function Ae(e,t){t=Tn(t);var o=kn(t),r=e.display.externalMeasured=new vr(e.doc,t,o);r.lineN=o;var y=r.built=Gn(e,r);return r.text=y.pre,h(e.display.lineMeasure,y.pre),r}function _e(e,t,o,r){return Ge(e,je(e,t),o,r)}function Be(e,t){if(t>=e.display.viewFrom&&t=o.lineN&&tt)&&(B=ee-J,y=B-1,t>=ee&&($="right")),y!=null){if(r=e[oe+2],J==ee&&o==(r.insertLeft?"left":"right")&&($=o),o=="left"&&y==0)for(;oe&&e[oe-2]==e[oe-3]&&e[oe-1].insertLeft;)r=e[(oe-=3)+2],$="left";if(o=="right"&&y==ee-J)for(;oe=0&&!((o=e[y]).left!=o.right);y--);return o}function Nt(e,t,o,r){var y=yt(t.map,o,r),B=y.node,$=y.start,J=y.end,ee=y.collapse,oe;if(B.nodeType==3){for(var Oe=0;Oe<4;Oe++){for(;$&&Ne(t.line.text.charAt(y.coverStart+$));)--$;for(;y.coverStart+J0&&(ee=r="right");var Ie;e.options.lineWrapping&&(Ie=B.getClientRects()).length>1?oe=Ie[r=="right"?Ie.length-1:0]:oe=B.getBoundingClientRect()}if(G&&K<9&&!$&&(!oe||!oe.left&&!oe.right)){var Qe=B.parentNode.getClientRects()[0];Qe?oe={left:Qe.left,right:Qe.left+Qr(e.display),top:Qe.top,bottom:Qe.bottom}:oe=tt}for(var Xe=oe.top-t.rect.top,dt=oe.bottom-t.rect.top,bt=(Xe+dt)/2,It=t.view.measure.heights,Ft=0;Ft=r.text.length?(ee=r.text.length,oe="before"):ee<=0&&(ee=0,oe="after"),!J)return $(oe=="before"?ee-1:ee,oe=="before");function Oe(dt,bt,It){var Ft=J[bt],qt=Ft.level==1;return $(It?dt-1:dt,qt!=It)}var Ie=at(J,ee,oe),Qe=ft,Xe=Oe(ee,Ie,oe=="before");return Qe!=null&&(Xe.other=Oe(ee,Qe,oe!="before")),Xe}function _n(e,t){var o=0;t=L(e.doc,t),e.options.lineWrapping||(o=Qr(e.display)*t.ch);var r=Qt(e.doc,t.line),y=Bt(r)+ba(e.display);return{left:o,right:o,top:y,bottom:y+r.height}}function vn(e,t,o,r,y){var B=Et(e,t,o);return B.xRel=y,r&&(B.outside=r),B}function Wn(e,t,o){var r=e.doc;if(o+=e.display.viewOffset,o<0)return vn(r.first,0,null,-1,-1);var y=Ur(r,o),B=r.first+r.size-1;if(y>B)return vn(r.first+r.size-1,Qt(r,B).text.length,null,1,1);t<0&&(t=0);for(var $=Qt(r,y);;){var J=Br(e,$,y,t,o),ee=ke($,J.ch+(J.xRel>0||J.outside>0?1:0));if(!ee)return J;var oe=ee.find(1);if(oe.line==y)return oe;$=Qt(r,y=oe.line)}}function cr(e,t,o,r){r-=Fn(t);var y=t.text.length,B=rt(function($){return Ge(e,o,$-1).bottom<=r},y,0);return y=rt(function($){return Ge(e,o,$).top>r},B,y),{begin:B,end:y}}function an(e,t,o,r){o||(o=je(e,t));var y=Jn(e,t,Ge(e,o,r),"line").top;return cr(e,t,o,y)}function dr(e,t,o,r){return e.bottom<=o?!1:e.top>o?!0:(r?e.left:e.right)>t}function Br(e,t,o,r,y){y-=Bt(t);var B=je(e,t),$=Fn(t),J=0,ee=t.text.length,oe=!0,Oe=gt(t,e.doc.direction);if(Oe){var Ie=(e.options.lineWrapping?Ar:ir)(e,t,o,B,Oe,r,y);oe=Ie.level!=1,J=oe?Ie.from:Ie.to-1,ee=oe?Ie.to:Ie.from-1}var Qe=null,Xe=null,dt=rt(function(In){var bn=Ge(e,B,In);return bn.top+=$,bn.bottom+=$,dr(bn,r,y,!1)?(bn.top<=y&&bn.left<=r&&(Qe=In,Xe=bn),!0):!1},J,ee),bt,It,Ft=!1;if(Xe){var qt=r-Xe.left=on.bottom?1:0}return dt=Ue(t.text,dt,1),vn(o,dt,It,Ft,r-bt)}function ir(e,t,o,r,y,B,$){var J=rt(function(Ie){var Qe=y[Ie],Xe=Qe.level!=1;return dr(tr(e,Et(o,Xe?Qe.to:Qe.from,Xe?"before":"after"),"line",t,r),B,$,!0)},0,y.length-1),ee=y[J];if(J>0){var oe=ee.level!=1,Oe=tr(e,Et(o,oe?ee.from:ee.to,oe?"after":"before"),"line",t,r);dr(Oe,B,$,!0)&&Oe.top>$&&(ee=y[J-1])}return ee}function Ar(e,t,o,r,y,B,$){var J=cr(e,t,r,$),ee=J.begin,oe=J.end;/\s/.test(t.text.charAt(oe-1))&&oe--;for(var Oe=null,Ie=null,Qe=0;Qe=oe||Xe.to<=ee)continue;var dt=Xe.level!=1,bt=Ge(e,r,dt?Math.min(oe,Xe.to)-1:Math.max(ee,Xe.from)).right,It=btIt)&&(Oe=Xe,Ie=It)}return Oe||(Oe=y[y.length-1]),Oe.fromoe&&(Oe={from:Oe.from,to:oe,level:Oe.level}),Oe}var xr;function zr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(xr==null){xr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)xr.appendChild(document.createTextNode("x")),xr.appendChild(d("br"));xr.appendChild(document.createTextNode("x"))}h(e.measure,xr);var o=xr.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),_(e.measure),o||1}function Qr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),o=d("pre",[t],"CodeMirror-line-like");h(e.measure,o);var r=t.getBoundingClientRect(),y=(r.right-r.left)/10;return y>2&&(e.cachedCharWidth=y),y||10}function Wr(e){for(var t=e.display,o={},r={},y=t.gutters.clientLeft,B=t.gutters.firstChild,$=0;B;B=B.nextSibling,++$){var J=e.display.gutterSpecs[$].className;o[J]=B.offsetLeft+B.clientLeft+y,r[J]=B.clientWidth}return{fixedPos:yi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:o,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ii(e){var t=zr(e.display),o=e.options.lineWrapping,r=o&&Math.max(5,e.display.scroller.clientWidth/Qr(e.display)-3);return function(y){if(Kr(e.doc,y))return 0;var B=0;if(y.widgets)for(var $=0;$0&&(oe=Qt(e.doc,ee.line).text).length==ee.ch){var Oe=H(oe,oe.length,e.options.tabSize)-oe.length;ee=Et(ee.line,Math.max(0,Math.round((B-Le(e.display).left)/Qr(e.display))-Oe))}return ee}function Pr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var o=e.display.view,r=0;rt)&&(y.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=y.viewTo)un&&ii(e.doc,t)y.viewFrom?wr(e):(y.viewFrom+=r,y.viewTo+=r);else if(t<=y.viewFrom&&o>=y.viewTo)wr(e);else if(t<=y.viewFrom){var B=Ui(e,o,o+r,1);B?(y.view=y.view.slice(B.index),y.viewFrom=B.lineN,y.viewTo+=r):wr(e)}else if(o>=y.viewTo){var $=Ui(e,t,t,-1);$?(y.view=y.view.slice(0,$.index),y.viewTo=$.lineN):wr(e)}else{var J=Ui(e,t,t,-1),ee=Ui(e,o,o+r,1);J&&ee?(y.view=y.view.slice(0,J.index).concat(fi(e,J.lineN,ee.lineN)).concat(y.view.slice(ee.index)),y.viewTo+=r):wr(e)}var oe=y.externalMeasured;oe&&(o=y.lineN&&t=r.viewTo)return;var B=r.view[Pr(e,t)];if(B.node==null)return;var $=B.changes||(B.changes=[]);q($,o)==-1&&$.push(o)}function wr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,t,o,r){var y=Pr(e,t),B,$=e.display.view;if(!un||o==e.doc.first+e.doc.size)return{index:y,lineN:o};for(var J=e.display.viewFrom,ee=0;ee0){if(y==$.length-1)return null;B=J+$[y].size-t,y++}else B=J-t;t+=B,o+=B}for(;ii(e.doc,o)!=o;){if(y==(r<0?0:$.length-1))return null;o+=r*$[y-(r<0?1:0)].size,y+=r}return{index:y,lineN:o}}function Zi(e,t,o){var r=e.display,y=r.view;y.length==0||t>=r.viewTo||o<=r.viewFrom?(r.view=fi(e,t,o),r.viewFrom=t):(r.viewFrom>t?r.view=fi(e,t,r.viewFrom).concat(r.view):r.viewFromo&&(r.view=r.view.slice(0,Pr(e,o)))),r.viewTo=o}function ia(e){for(var t=e.display.view,o=0,r=0;r=e.display.viewTo||J.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Ea(e),t.cursorDiv.style.visibility=(o=!o)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ua(e){e.state.focused||(e.display.input.focus(),ca(e))}function Za(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ea(e))},100)}function ca(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(qe(e,"focus",e,t),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hr(e)}function Ea(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(qe(e,"blur",e,t),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ti(e){for(var t=e.display,o=t.lineDiv.offsetTop,r=0;r.005||Oe<-.005)&&(Lr(y.line,$),Yi(y.line),y.rest))for(var Ie=0;Iee.display.sizerWidth){var Qe=Math.ceil(J/Qr(e.display));Qe>e.display.maxLineLength&&(e.display.maxLineLength=Qe,e.display.maxLine=y.line,e.display.maxLineChanged=!0)}}}function Yi(e){if(e.widgets)for(var t=0;t=$&&(B=Ur(t,Bt(Qt(t,ee))-e.wrapper.clientHeight),$=ee)}return{from:B,to:Math.max($,B+1)}}function Io(e,t){if(st(e,"scrollCursorIntoView"))return;var o=e.display,r=o.sizer.getBoundingClientRect(),y=null;if(t.top+r.top<0?y=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(y=!1),y!=null&&!a){var B=d("div","\u200B",null,`position: absolute; top: `+(t.top-o.viewOffset-ba(e.display))+`px; height: `+(t.bottom-t.top+We(e)+o.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(B),B.scrollIntoView(y),e.display.lineSpace.removeChild(B)}}function Po(e,t,o,r){r==null&&(r=0);var y;!e.options.lineWrapping&&t==o&&(t=t.ch?Et(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,o=t.sticky=="before"?Et(t.line,t.ch+1,"before"):t);for(var B=0;B<5;B++){var $=!1,J=tr(e,t),ee=!o||o==t?J:tr(e,o);y={left:Math.min(J.left,ee.left),top:Math.min(J.top,ee.top)-r,right:Math.max(J.left,ee.left),bottom:Math.max(J.bottom,ee.bottom)+r};var oe=Ja(e,y),Oe=e.doc.scrollTop,Ie=e.doc.scrollLeft;if(oe.scrollTop!=null&&(ha(e,oe.scrollTop),Math.abs(e.doc.scrollTop-Oe)>1&&($=!0)),oe.scrollLeft!=null&&(Pi(e,oe.scrollLeft),Math.abs(e.doc.scrollLeft-Ie)>1&&($=!0)),!$)break}return y}function mo(e,t){var o=Ja(e,t);o.scrollTop!=null&&ha(e,o.scrollTop),o.scrollLeft!=null&&Pi(e,o.scrollLeft)}function Ja(e,t){var o=e.display,r=zr(e.display);t.top<0&&(t.top=0);var y=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:o.scroller.scrollTop,B=ie(e),$={};t.bottom-t.top>B&&(t.bottom=t.top+B);var J=e.doc.height+Ee(o),ee=t.topJ-r;if(t.topy+B){var Oe=Math.min(t.top,(oe?J:t.bottom)-B);Oe!=y&&($.scrollTop=Oe)}var Ie=e.options.fixedGutter?0:o.gutters.offsetWidth,Qe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:o.scroller.scrollLeft-Ie,Xe=Se(e)-o.gutters.offsetWidth,dt=t.right-t.left>Xe;return dt&&(t.right=t.left+Xe),t.left<10?$.scrollLeft=0:t.leftXe+Qe-3&&($.scrollLeft=t.right+(dt?0:10)-Xe),$}function qa(e,t){if(t==null)return;Ba(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function da(e){Ba(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function xa(e,t,o){(t!=null||o!=null)&&Ba(e),t!=null&&(e.curOp.scrollLeft=t),o!=null&&(e.curOp.scrollTop=o)}function go(e,t){Ba(e),e.curOp.scrollToPos=t}function Ba(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var o=_n(e,t.from),r=_n(e,t.to);Ta(e,o,r,t.margin)}}function Ta(e,t,o,r){var y=Ja(e,{left:Math.min(t.left,o.left),top:Math.min(t.top,o.top)-r,right:Math.max(t.right,o.right),bottom:Math.max(t.bottom,o.bottom)+r});xa(e,y.scrollLeft,y.scrollTop)}function ha(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;N||Oa(e,{top:t}),kr(e,t,!0),N&&Oa(e),Aa(e,100)}function kr(e,t,o){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!o)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Pi(e,t,o,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(o?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,or(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function fa(e){var t=e.display,o=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ee(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?o:0,docHeight:r,scrollHeight:r+We(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:o}}var aa=function(e,t,o){this.cm=o;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),y=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=y.tabIndex=-1,e(r),e(y),Ze(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ze(y,"scroll",function(){y.clientWidth&&t(y.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,G&&K<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,o=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(o){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var y=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+y)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=o?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var B=e.viewWidth-e.barLeft-(o?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+B)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:o?r:0,bottom:t?r:0}},aa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var e=s&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},aa.prototype.enableZeroWidthBar=function(e,t,o){e.style.pointerEvents="auto";function r(){var y=e.getBoundingClientRect(),B=o=="vert"?document.elementFromPoint(y.right-1,(y.top+y.bottom)/2):document.elementFromPoint((y.right+y.left)/2,y.bottom-1);B!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},aa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Sa=function(){};Sa.prototype.update=function(){return{bottom:0,right:0}},Sa.prototype.setScrollLeft=function(){},Sa.prototype.setScrollTop=function(){},Sa.prototype.clear=function(){};function pa(e,t){t||(t=fa(e));var o=e.display.barWidth,r=e.display.barHeight;Fa(e,t);for(var y=0;y<4&&o!=e.display.barWidth||r!=e.display.barHeight;y++)o!=e.display.barWidth&&e.options.lineWrapping&&ti(e),Fa(e,fa(e)),o=e.display.barWidth,r=e.display.barHeight}function Fa(e,t){var o=e.display,r=o.scrollbars.update(t);o.sizer.style.paddingRight=(o.barWidth=r.right)+"px",o.sizer.style.paddingBottom=(o.barHeight=r.bottom)+"px",o.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(o.scrollbarFiller.style.display="block",o.scrollbarFiller.style.height=r.bottom+"px",o.scrollbarFiller.style.width=r.right+"px"):o.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(o.gutterFiller.style.display="block",o.gutterFiller.style.height=r.bottom+"px",o.gutterFiller.style.width=t.gutterWidth+"px"):o.gutterFiller.style.display=""}var eo={native:aa,null:Sa};function Wa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new eo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ze(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,o){o=="horizontal"?Pi(e,t):ha(e,t)},e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var to=0;function qi(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:++to},Ni(e.curOp)}function oa(e){var t=e.curOp;t&&Lo(t,function(o){for(var r=0;r=o.viewTo)||o.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ki(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ko(e){e.updatedDisplay=e.mustUpdate&&ma(e.cm,e.update)}function Mo(e){var t=e.cm,o=t.display;e.updatedDisplay&&ti(t),e.barMeasure=fa(t),o.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_e(t,o.maxLine,o.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(o.scroller.clientWidth,o.sizer.offsetLeft+e.adjustWidthTo+We(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,o.sizer.offsetLeft+e.adjustWidthTo-Se(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=o.input.prepareSelection())}function io(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var o=+new Date+e.options.workTime,r=Lt(e,t.highlightFrontier),y=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(B){if(r.line>=e.display.viewFrom){var $=B.styles,J=B.text.length>e.options.maxHighlightLength?Qn(t.mode,r.state):null,ee=Pe(e,B,r,!0);J&&(r.state=J),B.styles=ee.styles;var oe=B.styleClasses,Oe=ee.classes;Oe?B.styleClasses=Oe:oe&&(B.styleClasses=null);for(var Ie=!$||$.length!=B.styles.length||oe!=Oe&&(!oe||!Oe||oe.bgClass!=Oe.bgClass||oe.textClass!=Oe.textClass),Qe=0;!Ie&&Qe<$.length;++Qe)Ie=$[Qe]!=B.styles[Qe];Ie&&y.push(r.line),B.stateAfter=r.save(),r.nextLine()}else B.text.length<=e.options.maxHighlightLength&&rn(e,B.text,r),B.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>o)return Aa(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),y.length&&ni(e,function(){for(var B=0;B=o.viewFrom&&t.visible.to<=o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&ia(e)==0)return!1;ci(e)&&(wr(e),t.dims=Wr(e));var y=r.first+r.size,B=Math.max(t.visible.from-e.options.viewportMargin,r.first),$=Math.min(y,t.visible.to+e.options.viewportMargin);o.viewFrom$&&o.viewTo-$<20&&($=Math.min(y,o.viewTo)),un&&(B=ii(e.doc,B),$=ai(e.doc,$));var J=B!=o.viewFrom||$!=o.viewTo||o.lastWrapHeight!=t.wrapperHeight||o.lastWrapWidth!=t.wrapperWidth;Zi(e,B,$),o.viewOffset=Bt(Qt(e.doc,o.viewFrom)),e.display.mover.style.top=o.viewOffset+"px";var ee=ia(e);if(!J&&ee==0&&!t.force&&o.renderedView==o.view&&(o.updateLineNumbers==null||o.updateLineNumbers>=o.viewTo))return!1;var oe=Ka(e);return ee>4&&(o.lineDiv.style.display="none"),yo(e,o.updateLineNumbers,t.dims),ee>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,vo(oe),_(o.cursorDiv),_(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,J&&(o.lastWrapHeight=t.wrapperHeight,o.lastWrapWidth=t.wrapperWidth,Aa(e,400)),o.updateLineNumbers=null,!0}function Ga(e,t){for(var o=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Se(e)){if(o&&o.top!=null&&(o={top:Math.min(e.doc.height+Ee(e.display)-ie(e),o.top)}),t.visible=ja(e.display,e.doc,o),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ja(e.display,e.doc,o));if(!ma(e,t))break;ti(e);var y=fa(e);Cr(e),pa(e,y),_r(e,y),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 Oa(e,t){var o=new ki(e,t);if(ma(e,o)){ti(e),Ga(e,o);var r=fa(e);Cr(e),pa(e,r),_r(e,r),o.finish()}}function yo(e,t,o){var r=e.display,y=e.options.lineNumbers,B=r.lineDiv,$=B.firstChild;function J(dt){var bt=dt.nextSibling;return n&&s&&e.display.currentWheelTarget==dt?dt.style.display="none":dt.parentNode.removeChild(dt),bt}for(var ee=r.view,oe=r.viewFrom,Oe=0;Oe-1&&(Xe=!1),uo(e,Ie,oe,o)),Xe&&(_(Ie.lineNumber),Ie.lineNumber.appendChild(document.createTextNode(Ai(e.options,oe)))),$=Ie.node.nextSibling}oe+=Ie.size}for(;$;)$=J($)}function za(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function _r(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+We(e)+"px"}function or(e){var t=e.display,o=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=yi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,y=t.gutters.offsetWidth,B=r+"px",$=0;$$.clientWidth,ee=$.scrollHeight>$.clientHeight;if(!(r&&J||y&&ee))return;if(y&&s&&n){e:for(var oe=t.target,Oe=B.view;oe!=$;oe=oe.parentNode)for(var Ie=0;Ie=0&&fn(e,r.to())<=0)return o}return-1};var ot=function(e,t){this.anchor=e,this.head=t};ot.prototype.from=function(){return Vi(this.anchor,this.head)},ot.prototype.to=function(){return na(this.anchor,this.head)},ot.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ut(e,t,o){var r=e&&e.options.selectionsMayTouch,y=t[o];t.sort(function(Qe,Xe){return fn(Qe.from(),Xe.from())}),o=q(t,y);for(var B=1;B0:ee>=0){var oe=Vi(J.from(),$.from()),Oe=na(J.to(),$.to()),Ie=J.empty()?$.from()==$.head:J.from()==J.head;B<=o&&--o,t.splice(--B,2,new ot(Ie?Oe:oe,Ie?oe:Oe))}}return new $e(t,o)}function At(e,t){return new $e([new ot(e,t||e)],0)}function St(e){return e.text?Et(e.from.line+e.text.length-1,Ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function wt(e,t){if(fn(e,t.from)<0)return e;if(fn(e,t.to)<=0)return St(t);var o=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=St(t).ch-t.to.ch),Et(o,r)}function cn(e,t){for(var o=[],r=0;r1&&e.remove(J.line+1,dt-1),e.insert(J.line+1,Ft)}Gr(e,"change",e,t)}function Ri(e,t,o){function r(y,B,$){if(y.linked)for(var J=0;J1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ce(e.done)}function Es(e,t,o,r){var y=e.history;y.undone.length=0;var B=+new Date,$,J;if((y.lastOp==r||y.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&y.lastModTime>B-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&($=pl(y,y.lastOp==r)))J=Ce($.changes),fn(t.from,t.to)==0&&fn(t.from,J.to)==0?J.to=St(t):$.changes.push(Bi(e,t));else{var ee=Ce(y.done);for((!ee||!ee.ranges)&&Qo(e.sel,y.done),$={changes:[Bi(e,t)],generation:y.generation},y.done.push($);y.done.length>y.undoDepth;)y.done.shift(),y.done[0].ranges||y.done.shift()}y.done.push(o),y.generation=++y.maxGeneration,y.lastModTime=y.lastSelTime=B,y.lastOp=y.lastSelOp=r,y.lastOrigin=y.lastSelOrigin=t.origin,J||qe(e,"historyAdded")}function ml(e,t,o,r){var y=t.charAt(0);return y=="*"||y=="+"&&o.ranges.length==r.ranges.length&&o.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,o,r){var y=e.history,B=r&&r.origin;o==y.lastSelOp||B&&y.lastSelOrigin==B&&(y.lastModTime==y.lastSelTime&&y.lastOrigin==B||ml(e,B,Ce(y.done),t))?y.done[y.done.length-1]=t:Qo(t,y.done),y.lastSelTime=+new Date,y.lastSelOrigin=B,y.lastSelOp=o,r&&r.clearRedo!==!1&&_o(y.undone)}function Qo(e,t){var o=Ce(t);o&&o.ranges&&o.equals(e)||t.push(e)}function xs(e,t,o,r){var y=t["spans_"+e.id],B=0;e.iter(Math.max(e.first,o),Math.min(e.first+e.size,r),function($){$.markedSpans&&((y||(y=t["spans_"+e.id]={}))[B]=$.markedSpans),++B})}function vl(e){if(!e)return null;for(var t,o=0;o-1&&(Ce(J)[Ie]=oe[Ie],delete oe[Ie]))}}return r}function ls(e,t,o,r){if(r){var y=e.anchor;if(o){var B=fn(t,y)<0;B!=fn(o,y)<0?(y=t,t=o):B!=fn(t,o)<0&&(t=o)}return new ot(y,t)}else return new ot(o||t,t)}function Zo(e,t,o,r,y){y==null&&(y=e.cm&&(e.cm.display.shift||e.extend)),Di(e,new $e([ls(e.sel.primary(),t,o,y)],0),r)}function ws(e,t,o){for(var r=[],y=e.cm&&(e.cm.display.shift||e.extend),B=0;B=t.ch:J.to>t.ch))){if(y&&(qe(ee,"beforeCursorEnter"),ee.explicitlyCleared))if(B.markedSpans){--$;continue}else break;if(!ee.atomic)continue;if(o){var Ie=ee.find(r<0?1:-1),Qe=void 0;if((r<0?Oe:oe)&&(Ie=Ds(e,Ie,-r,Ie&&Ie.line==t.line?B:null)),Ie&&Ie.line==t.line&&(Qe=fn(Ie,o))&&(r<0?Qe<0:Qe>0))return Eo(e,Ie,t,r,y)}var Xe=ee.find(r<0?-1:1);return(r<0?oe:Oe)&&(Xe=Ds(e,Xe,r,Xe.line==t.line?B:null)),Xe?Eo(e,Xe,t,r,y):null}}return t}function qo(e,t,o,r,y){var B=r||1,$=Eo(e,t,o,B,y)||!y&&Eo(e,t,o,B,!0)||Eo(e,t,o,-B,y)||!y&&Eo(e,t,o,-B,!0);return $||(e.cantEdit=!0,Et(e.first,0))}function Ds(e,t,o,r){return o<0&&t.ch==0?t.line>e.first?L(e,Et(t.line-1)):null:o>0&&t.ch==(r||Qt(e,t.line)).text.length?t.line=0;--y)Ps(e,{from:r[y].from,to:r[y].to,text:y?[""]:t.text,origin:t.origin});else Ps(e,t)}function Ps(e,t){if(t.text.length==1&&t.text[0]==""&&fn(t.from,t.to)==0)return;var o=cn(e,t);Es(e,t,o,e.cm?e.cm.curOp.id:NaN),Uo(e,t,o,Nn(e,t));var r=[];Ri(e,function(y,B){!B&&q(r,y.history)==-1&&(Us(y.history,t),r.push(y.history)),Uo(y,t,null,Nn(y,t))})}function es(e,t,o){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!o)return;for(var y=e.history,B,$=e.sel,J=t=="undo"?y.done:y.undone,ee=t=="undo"?y.undone:y.done,oe=0;oe=0;--Xe){var dt=Qe(Xe);if(dt)return dt.v}}function ks(e,t){if(t==0)return;if(e.first+=t,e.sel=new $e(ze(e.sel.ranges,function(y){return new ot(Et(y.anchor.line+t,y.anchor.ch),Et(y.head.line+t,y.head.ch))}),e.sel.primIndex),e.cm){Tr(e.cm,e.first,e.first-t,t);for(var o=e.cm.display,r=o.viewFrom;re.lastLine())return;if(t.from.lineB&&(t={from:t.from,to:Et(B,Qt(e,B).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$r(e,t.from,t.to),o||(o=cn(e,t)),e.cm?bl(e.cm,t,r):mi(e,t,r),Jo(e,o,pe),e.cantEdit&&qo(e,Et(e.firstLine(),0))&&(e.cantEdit=!1)}function bl(e,t,o){var r=e.doc,y=e.display,B=t.from,$=t.to,J=!1,ee=B.line;e.options.lineWrapping||(ee=kn(Tn(Qt(r,B.line))),r.iter(ee,$.line+1,function(Xe){if(Xe==y.maxLine)return J=!0,!0})),r.sel.contains(t.from,t.to)>-1&&xe(e),mi(r,t,o,Ii(e)),e.options.lineWrapping||(r.iter(ee,B.line+t.text.length,function(Xe){var dt=Er(Xe);dt>y.maxLineLength&&(y.maxLine=Xe,y.maxLineLength=dt,y.maxLineChanged=!0,J=!1)}),J&&(e.curOp.updateMaxLine=!0)),Rt(r,B.line),Aa(e,400);var oe=t.text.length-($.line-B.line)-1;t.full?Tr(e):B.line==$.line&&t.text.length==1&&!Ei(e.doc,t)?wn(e,B.line,"text"):Tr(e,B.line,$.line+1,oe);var Oe=we(e,"changes"),Ie=we(e,"change");if(Ie||Oe){var Qe={from:B,to:$,text:t.text,removed:t.removed,origin:t.origin};Ie&&Gr(e,"change",e,Qe),Oe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Qe)}e.display.selForContextMenu=null}function To(e,t,o,r,y){var B;r||(r=o),fn(r,o)<0&&(B=[r,o],o=B[0],r=B[1]),typeof t=="string"&&(t=e.splitLines(t)),xo(e,{from:o,to:r,text:t,origin:y})}function Ms(e,t,o,r){o1||!(this.children[0]instanceof Bo))){var J=[];this.collapse(J),this.children=[new Bo(J)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var $=y.lines.length%25+25,J=$;J10);e.parent.maybeSpill()},iterN:function(e,t,o){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=oe,e.display.maxLineLength=Oe,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Tr(e,r,y+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Gr(e,"markerCleared",e,this,r,y),t&&oa(e),this.parent&&this.parent.clear()},Va.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var o,r,y=0;y0||$==0&&B.clearWhenEmpty!==!1)return B;if(B.replacedWith&&(B.collapsed=!0,B.widgetNode=C("span",[B.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||B.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(B.widgetNode.insertLeft=!0)),B.collapsed){if(Vt(e,t.line,t,o,B)||t.line!=o.line&&Vt(e,o.line,t,o,B))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cn()}B.addToHistory&&Es(e,{from:t,to:o,origin:"markText"},e.sel,NaN);var J=t.line,ee=e.cm,oe;if(e.iter(J,o.line+1,function(Ie){ee&&B.collapsed&&!ee.options.lineWrapping&&Tn(Ie)==ee.display.maxLine&&(oe=!0),B.collapsed&&J!=t.line&&Lr(Ie,0),dn(Ie,new gn(B,J==t.line?t.ch:null,J==o.line?o.ch:null)),++J}),B.collapsed&&e.iter(t.line,o.line+1,function(Ie){Kr(e,Ie)&&Lr(Ie,0)}),B.clearOnEnter&&Ze(B,"beforeCursorEnter",function(){return B.clear()}),B.readOnly&&(xn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),B.collapsed&&(B.id=++Bs,B.atomic=!0),ee){if(oe&&(ee.curOp.updateMaxLine=!0),B.collapsed)Tr(ee,t.line,o.line+1);else if(B.className||B.startStyle||B.endStyle||B.css||B.attributes||B.title)for(var Oe=t.line;Oe<=o.line;Oe++)wn(ee,Oe,"text");B.atomic&&Os(ee.doc),Gr(ee,"markerAdded",ee,B)}return B}var Ho=function(e,t){this.markers=e,this.primary=t;for(var o=0;o=0;ee--)xo(this,r[ee]);J?Ss(this,J):this.cm&&da(this.cm)}),undo:qr(function(){es(this,"undo")}),redo:qr(function(){es(this,"redo")}),undoSelection:qr(function(){es(this,"undo",!0)}),redoSelection:qr(function(){es(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,o=0,r=0;r=e.ch)&&t.push(y.marker.parent||y.marker)}return t},findMarks:function(e,t,o){e=L(this,e),t=L(this,t);var r=[],y=e.line;return this.iter(e.line,t.line+1,function(B){var $=B.markedSpans;if($)for(var J=0;J<$.length;J++){var ee=$[J];!(ee.to!=null&&y==e.line&&e.ch>=ee.to||ee.from==null&&y!=e.line||ee.from!=null&&y==t.line&&ee.from>=t.ch)&&(!o||o(ee.marker))&&r.push(ee.marker.parent||ee.marker)}++y}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var o=t.markedSpans;if(o)for(var r=0;re)return t=e,!0;e-=B,++o}),L(this,Et(o,t))},indexFromPos:function(e){e=L(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Oe=e.dataTransfer.getData("Text");if(Oe){var Ie;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ie=t.listSelections()),Jo(t.doc,At(o,o)),Ie)for(var Qe=0;Qe=0;J--)To(e.doc,"",r[J].from,r[J].to,"+delete");da(e)})}function cs(e,t,o){var r=Ue(e.text,t+o,o);return r<0||r>e.text.length?null:r}function ds(e,t,o){var r=cs(e,t.ch,o);return r==null?null:new Et(t.line,r,o<0?"after":"before")}function hs(e,t,o,r,y){if(e){t.doc.direction=="rtl"&&(y=-y);var B=gt(o,t.doc.direction);if(B){var $=y<0?Ce(B):B[0],J=y<0==($.level==1),ee=J?"after":"before",oe;if($.level>0||t.doc.direction=="rtl"){var Oe=je(t,o);oe=y<0?o.text.length-1:0;var Ie=Ge(t,Oe,oe).top;oe=rt(function(Qe){return Ge(t,Oe,Qe).top==Ie},y<0==($.level==1)?$.from:$.to-1,oe),ee=="before"&&(oe=cs(o,oe,1))}else oe=y<0?$.to:$.from;return new Et(r,oe,ee)}}return new Et(r,y<0?o.text.length:0,y<0?"before":"after")}function kl(e,t,o,r){var y=gt(t,e.doc.direction);if(!y)return ds(t,o,r);o.ch>=t.text.length?(o.ch=t.text.length,o.sticky="before"):o.ch<=0&&(o.ch=0,o.sticky="after");var B=at(y,o.ch,o.sticky),$=y[B];if(e.doc.direction=="ltr"&&$.level%2==0&&(r>0?$.to>o.ch:$.from=$.from&&Qe>=Oe.begin)){var Xe=Ie?"before":"after";return new Et(o.line,Qe,Xe)}}var dt=function(Ft,qt,Wt){for(var on=function(Fr,xi){return xi?new Et(o.line,J(Fr,1),"before"):new Et(o.line,Fr,"after")};Ft>=0&&Ft0==(In.level!=1),ar=bn?Wt.begin:J(Wt.end,-1);if(In.from<=ar&&ar0?Oe.end:J(Oe.begin,-1);return It!=null&&!(r>0&&It==t.text.length)&&(bt=dt(r>0?0:y.length-1,r,oe(It)),bt)?bt:null}var zo={selectAll:Ls,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),pe)},killLine:function(e){return So(e,function(t){if(t.empty()){var o=Qt(e.doc,t.head.line).text.length;return t.head.ch==o&&t.head.line0)y=new Et(y.line,y.ch+1),e.replaceRange(B.charAt(y.ch-1)+B.charAt(y.ch-2),Et(y.line,y.ch-2),y,"+transpose");else if(y.line>e.doc.first){var $=Qt(e.doc,y.line-1).text;$&&(y=new Et(y.line,1),e.replaceRange(B.charAt(0)+e.doc.lineSeparator()+$.charAt($.length-1),Et(y.line-1,$.length-1),y,"+transpose"))}}o.push(new ot(y,y))}e.setSelections(o)})},newlineAndIndent:function(e){return ni(e,function(){for(var t=e.listSelections(),o=t.length-1;o>=0;o--)e.replaceRange(e.doc.lineSeparator(),t[o].anchor,t[o].head,"+input");t=e.listSelections();for(var r=0;re&&fn(t,this.pos)==0&&o==this.button};var Xo,Yo;function Wl(e,t){var o=+new Date;return Yo&&Yo.compare(o,e,t)?(Xo=Yo=null,"triple"):Xo&&Xo.compare(o,e,t)?(Yo=new ps(o,e,t),Xo=null,"double"):(Xo=new ps(o,e,t),Yo=null,"single")}function tl(e){var t=this,o=t.display;if(st(t,e)||o.activeTouch&&o.input.supportsTouch())return;if(o.input.ensurePolled(),o.shift=e.shiftKey,ra(o,e)){n||(o.scroller.draggable=!1,setTimeout(function(){return o.scroller.draggable=!0},100));return}if(ms(t,e))return;var r=Zr(t,e),y=et(e),B=r?Wl(r,y):"single";if(window.focus(),y==1&&t.state.selectingText&&t.state.selectingText(e),r&&Hl(t,y,r,B,e))return;y==1?r?Gl(t,r,B,e):Me(e)==o.scroller&&ce(e):y==2?(r&&Zo(t.doc,r),setTimeout(function(){return o.input.focus()},20)):y==3&&(R?t.display.input.onContextMenu(e):Za(t))}function Hl(e,t,o,r,y){var B="Click";return r=="double"?B="Double"+B:r=="triple"&&(B="Triple"+B),B=(t==1?"Left":t==2?"Middle":"Right")+B,Vo(e,Vs(B,y),y,function($){if(typeof $=="string"&&($=zo[$]),!$)return!1;var J=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),J=$(e,o)!=ye}finally{e.state.suppressEdits=!1}return J})}function Kl(e,t,o){var r=e.getOption("configureMouse"),y=r?r(e,t,o):{};if(y.unit==null){var B=i?o.shiftKey&&o.metaKey:o.altKey;y.unit=B?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(y.extend==null||e.doc.extend)&&(y.extend=e.doc.extend||o.shiftKey),y.addNew==null&&(y.addNew=s?o.metaKey:o.ctrlKey),y.moveOnDrag==null&&(y.moveOnDrag=!(s?o.altKey:o.ctrlKey)),y}function Gl(e,t,o,r){G?setTimeout(m(Ua,e),0):e.curOp.focus=j();var y=Kl(e,o,r),B=e.doc.sel,$;e.options.dragDrop&&ht&&!e.isReadOnly()&&o=="single"&&($=B.contains(t))>-1&&(fn(($=B.ranges[$]).from(),t)<0||t.xRel>0)&&(fn($.to(),t)>0||t.xRel<0)?zl(e,r,t,y):Vl(e,r,t,y)}function zl(e,t,o,r){var y=e.display,B=!1,$=Jr(e,function(oe){n&&(y.scroller.draggable=!1),e.state.draggingText=!1,Ot(y.wrapper.ownerDocument,"mouseup",$),Ot(y.wrapper.ownerDocument,"mousemove",J),Ot(y.scroller,"dragstart",ee),Ot(y.scroller,"drop",$),B||(ce(oe),r.addNew||Zo(e.doc,o,null,null,r.extend),n&&!b||G&&K==9?setTimeout(function(){y.wrapper.ownerDocument.body.focus({preventScroll:!0}),y.input.focus()},20):y.input.focus())}),J=function(oe){B=B||Math.abs(t.clientX-oe.clientX)+Math.abs(t.clientY-oe.clientY)>=10},ee=function(){return B=!0};n&&(y.scroller.draggable=!0),e.state.draggingText=$,$.copy=!r.moveOnDrag,y.scroller.dragDrop&&y.scroller.dragDrop(),Ze(y.wrapper.ownerDocument,"mouseup",$),Ze(y.wrapper.ownerDocument,"mousemove",J),Ze(y.scroller,"dragstart",ee),Ze(y.scroller,"drop",$),Za(e),setTimeout(function(){return y.input.focus()},20)}function nl(e,t,o){if(o=="char")return new ot(t,t);if(o=="word")return e.findWordAt(t);if(o=="line")return new ot(Et(t.line,0),L(e.doc,Et(t.line+1,0)));var r=o(e,t);return new ot(r.from,r.to)}function Vl(e,t,o,r){var y=e.display,B=e.doc;ce(t);var $,J,ee=B.sel,oe=ee.ranges;if(r.addNew&&!r.extend?(J=B.sel.contains(o),J>-1?$=oe[J]:$=new ot(o,o)):($=B.sel.primary(),J=B.sel.primIndex),r.unit=="rectangle")r.addNew||($=new ot(o,o)),o=Zr(e,t,!0,!0),J=-1;else{var Oe=nl(e,o,r.unit);r.extend?$=ls($,Oe.anchor,Oe.head,r.extend):$=Oe}r.addNew?J==-1?(J=oe.length,Di(B,ut(e,oe.concat([$]),J),{scroll:!1,origin:"*mouse"})):oe.length>1&&oe[J].empty()&&r.unit=="char"&&!r.extend?(Di(B,ut(e,oe.slice(0,J).concat(oe.slice(J+1)),0),{scroll:!1,origin:"*mouse"}),ee=B.sel):us(B,J,$,ue):(J=0,Di(B,new $e([$],0),ue),ee=B.sel);var Ie=o;function Qe(Wt){if(fn(Ie,Wt)==0)return;if(Ie=Wt,r.unit=="rectangle"){for(var on=[],In=e.options.tabSize,bn=H(Qt(B,o.line).text,o.ch,In),ar=H(Qt(B,Wt.line).text,Wt.ch,In),Fr=Math.min(bn,ar),xi=Math.max(bn,ar),ei=Math.min(o.line,Wt.line),$i=Math.min(e.lastLine(),Math.max(o.line,Wt.line));ei<=$i;ei++){var Wi=Qt(B,ei).text,di=be(Wi,Fr,In);Fr==xi?on.push(new ot(Et(ei,di),Et(ei,di))):Wi.length>di&&on.push(new ot(Et(ei,di),Et(ei,be(Wi,xi,In))))}on.length||on.push(new ot(o,o)),Di(B,ut(e,ee.ranges.slice(0,J).concat(on),J),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Wt)}else{var Hi=$,Si=nl(e,Wt,r.unit),gi=Hi.anchor,hi;fn(Si.anchor,gi)>0?(hi=Si.head,gi=Vi(Hi.from(),Si.anchor)):(hi=Si.anchor,gi=na(Hi.to(),Si.head));var ri=ee.ranges.slice(0);ri[J]=Xl(e,new ot(L(B,gi),hi)),Di(B,ut(e,ri,J),ue)}}var Xe=y.wrapper.getBoundingClientRect(),dt=0;function bt(Wt){var on=++dt,In=Zr(e,Wt,!0,r.unit=="rectangle");if(!In)return;if(fn(In,Ie)!=0){e.curOp.focus=j(),Qe(In);var bn=ja(y,B);(In.line>=bn.to||In.lineXe.bottom?20:0;ar&&setTimeout(Jr(e,function(){if(dt!=on)return;y.scroller.scrollTop+=ar,bt(Wt)}),50)}}function It(Wt){e.state.selectingText=!1,dt=Infinity,Wt&&(ce(Wt),y.input.focus()),Ot(y.wrapper.ownerDocument,"mousemove",Ft),Ot(y.wrapper.ownerDocument,"mouseup",qt),B.history.lastSelOrigin=null}var Ft=Jr(e,function(Wt){Wt.buttons===0||!et(Wt)?It(Wt):bt(Wt)}),qt=Jr(e,It);e.state.selectingText=qt,Ze(y.wrapper.ownerDocument,"mousemove",Ft),Ze(y.wrapper.ownerDocument,"mouseup",qt)}function Xl(e,t){var o=t.anchor,r=t.head,y=Qt(e.doc,o.line);if(fn(o,r)==0&&o.sticky==r.sticky)return t;var B=gt(y);if(!B)return t;var $=at(B,o.ch,o.sticky),J=B[$];if(J.from!=o.ch&&J.to!=o.ch)return t;var ee=$+(J.from==o.ch==(J.level!=1)?0:1);if(ee==0||ee==B.length)return t;var oe;if(r.line!=o.line)oe=(r.line-o.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Oe=at(B,r.ch,r.sticky),Ie=Oe-$||(r.ch-o.ch)*(J.level==1?-1:1);Oe==ee-1||Oe==ee?oe=Ie<0:oe=Ie>0}var Qe=B[ee+(oe?-1:0)],Xe=oe==(Qe.level==1),dt=Xe?Qe.from:Qe.to,bt=Xe?"after":"before";return o.ch==dt&&o.sticky==bt?t:new ot(new Et(o.line,dt,bt),r)}function rl(e,t,o,r){var y,B;if(t.touches)y=t.touches[0].clientX,B=t.touches[0].clientY;else try{y=t.clientX,B=t.clientY}catch(Qe){return!1}if(y>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ce(t);var $=e.display,J=$.lineDiv.getBoundingClientRect();if(B>J.bottom||!we(e,o))return Te(t);B-=J.top-$.viewOffset;for(var ee=0;ee=y){var Oe=Ur(e.doc,B),Ie=e.display.gutterSpecs[ee];return qe(e,o,e,Oe,Ie.className,t),Te(t)}}}function ms(e,t){return rl(e,t,"gutterClick",!0)}function il(e,t){if(ra(e.display,t)||Yl(e,t))return;if(st(e,t,"contextmenu"))return;R||e.display.input.onContextMenu(t)}function Yl(e,t){return we(e,"gutterContextMenu")?rl(e,t,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(e)}var Ao={toString:function(){return"CodeMirror.Init"}},ol={},is={};function $l(e){var t=e.optionHandlers;function o(r,y,B,$){e.defaults[r]=y,B&&(t[r]=$?function(J,ee,oe){oe!=Ao&&B(J,ee,oe)}:B)}e.defineOption=o,e.Init=Ao,o("value","",function(r,y){return r.setValue(y)},!0),o("mode",null,function(r,y){r.doc.modeOption=y,Hn(r)},!0),o("indentUnit",2,Hn,!0),o("indentWithTabs",!1),o("smartIndent",!0),o("tabSize",4,function(r){bi(r),zn(r),Tr(r)},!0),o("lineSeparator",null,function(r,y){if(r.doc.lineSep=y,!y)return;var B=[],$=r.doc.first;r.doc.iter(function(ee){for(var oe=0;;){var Oe=ee.text.indexOf(y,oe);if(Oe==-1)break;oe=Oe+y.length,B.push(Et($,Oe))}$++});for(var J=B.length-1;J>=0;J--)To(r.doc,y,B[J],Et(B[J].line,B[J].ch+y.length))}),o("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,y,B){r.state.specialChars=new RegExp(y.source+(y.test(" ")?"":"| "),"g"),B!=Ao&&r.refresh()}),o("specialCharPlaceholder",Mn,function(r){return r.refresh()},!0),o("electricChars",!0),o("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),o("spellcheck",!1,function(r,y){return r.getInputField().spellcheck=y},!0),o("autocorrect",!1,function(r,y){return r.getInputField().autocorrect=y},!0),o("autocapitalize",!1,function(r,y){return r.getInputField().autocapitalize=y},!0),o("rtlMoveVisually",!D),o("wholeLineUpdateBefore",!0),o("theme","default",function(r){al(r),ea(r)},!0),o("keyMap","default",function(r,y,B){var $=ns(y),J=B!=Ao&&ns(B);J&&J.detach&&J.detach(r,$),$.attach&&$.attach(r,J||null)}),o("extraKeys",null),o("configureMouse",null),o("lineWrapping",!1,Zl,!0),o("gutters",[],function(r,y){r.display.gutterSpecs=_i(y,r.options.lineNumbers),ea(r)},!0),o("fixedGutter",!0,function(r,y){r.display.gutters.style.left=y?yi(r.display)+"px":"0",r.refresh()},!0),o("coverGutterNextToScrollbar",!1,function(r){return pa(r)},!0),o("scrollbarStyle","native",function(r){Wa(r),pa(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),o("lineNumbers",!1,function(r,y){r.display.gutterSpecs=_i(r.options.gutters,y),ea(r)},!0),o("firstLineNumber",1,ea,!0),o("lineNumberFormatter",function(r){return r},ea,!0),o("showCursorWhenSelecting",!1,Cr,!0),o("resetSelectionOnContextMenu",!0),o("lineWiseCopyCut",!0),o("pasteLinesPerSelection",!0),o("selectionsMayTouch",!1),o("readOnly",!1,function(r,y){y=="nocursor"&&(Ea(r),r.display.input.blur()),r.display.input.readOnlyChanged(y)}),o("screenReaderLabel",null,function(r,y){y=y===""?null:y,r.display.input.screenReaderLabelChanged(y)}),o("disableInput",!1,function(r,y){y||r.display.input.reset()},!0),o("dragDrop",!0,Ql),o("allowDropFileTypes",null),o("cursorBlinkRate",530),o("cursorScrollMargin",0),o("cursorHeight",1,Cr,!0),o("singleCursorHeightPerLine",!0,Cr,!0),o("workTime",100),o("workDelay",100),o("flattenSpans",!0,bi,!0),o("addModeClass",!1,bi,!0),o("pollInterval",100),o("undoDepth",200,function(r,y){return r.doc.history.undoDepth=y}),o("historyEventDelay",1250),o("viewportMargin",10,function(r){return r.refresh()},!0),o("maxHighlightLength",1e4,bi,!0),o("moveInputWithCursor",!0,function(r,y){y||r.display.input.resetPosition()}),o("tabindex",null,function(r,y){return r.display.input.getField().tabIndex=y||""}),o("autofocus",null),o("direction","ltr",function(r,y){return r.doc.setDirection(y)},!0),o("phrases",null)}function Ql(e,t,o){var r=o&&o!=Ao;if(!t!=!r){var y=e.display.dragFunctions,B=t?Ze:Ot;B(e.display.scroller,"dragstart",y.start),B(e.display.scroller,"dragenter",y.enter),B(e.display.scroller,"dragover",y.over),B(e.display.scroller,"dragleave",y.leave),B(e.display.scroller,"drop",y.drop)}}function Zl(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),ur(e)),Ci(e),Tr(e),zn(e),setTimeout(function(){return pa(e)},100)}function Xr(e,t){var o=this;if(!(this instanceof Xr))return new Xr(e,t);this.options=t=t?v(t):{},v(ol,t,!1);var r=t.value;typeof r=="string"?r=new Fi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var y=new Xr.inputStyles[t.inputStyle](this),B=this.display=new Ra(e,r,y,t);B.wrapper.CodeMirror=this,al(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new X,keySeq:null,specialChars:null},t.autofocus&&!u&&B.input.focus(),G&&K<11&&setTimeout(function(){return o.display.input.reset(!0)},20),Jl(this),Rl(),qi(this),this.curOp.forceUpdate=!0,Vr(this,r),t.autofocus&&!u||this.hasFocus()?setTimeout(function(){o.hasFocus()&&!o.state.focused&&ca(o)},20):Ea(this);for(var $ in is)is.hasOwnProperty($)&&is[$](this,t[$],Ao);ci(this),t.finishInit&&t.finishInit(this);for(var J=0;J20*20}Ze(t.scroller,"touchstart",function(ee){if(!st(e,ee)&&!B(ee)&&!ms(e,ee)){t.input.ensurePolled(),clearTimeout(o);var oe=+new Date;t.activeTouch={start:oe,moved:!1,prev:oe-r.end<=300?r:null},ee.touches.length==1&&(t.activeTouch.left=ee.touches[0].pageX,t.activeTouch.top=ee.touches[0].pageY)}}),Ze(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ze(t.scroller,"touchend",function(ee){var oe=t.activeTouch;if(oe&&!ra(t,ee)&&oe.left!=null&&!oe.moved&&new Date-oe.start<300){var Oe=e.coordsChar(t.activeTouch,"page"),Ie;!oe.prev||$(oe,oe.prev)?Ie=new ot(Oe,Oe):!oe.prev.prev||$(oe,oe.prev.prev)?Ie=e.findWordAt(Oe):Ie=new ot(Et(Oe.line,0),L(e.doc,Et(Oe.line+1,0))),e.setSelection(Ie.anchor,Ie.head),e.focus(),ce(ee)}y()}),Ze(t.scroller,"touchcancel",y),Ze(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ha(e,t.scroller.scrollTop),Pi(e,t.scroller.scrollLeft,!0),qe(e,"scroll",e))}),Ze(t.scroller,"mousewheel",function(ee){return Je(e,ee)}),Ze(t.scroller,"DOMMouseScroll",function(ee){return Je(e,ee)}),Ze(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ee){st(e,ee)||Re(ee)},over:function(ee){st(e,ee)||(Ol(e,ee),Re(ee))},start:function(ee){return Al(e,ee)},drop:Jr(e,Sl),leave:function(ee){st(e,ee)||Hs(e)}};var J=t.input.getField();Ze(J,"keyup",function(ee){return qs.call(e,ee)}),Ze(J,"keydown",Jr(e,Js)),Ze(J,"keypress",Jr(e,el)),Ze(J,"focus",function(ee){return ca(e,ee)}),Ze(J,"blur",function(ee){return Ea(e,ee)})}var gs=[];Xr.defineInitHook=function(e){return gs.push(e)};function $o(e,t,o,r){var y=e.doc,B;o==null&&(o="add"),o=="smart"&&(y.mode.indent?B=Lt(e,t).state:o="prev");var $=e.options.tabSize,J=Qt(y,t),ee=H(J.text,null,$);J.stateAfter&&(J.stateAfter=null);var oe=J.text.match(/^\s*/)[0],Oe;if(!r&&!/\S/.test(J.text))Oe=0,o="not";else if(o=="smart"&&(Oe=y.mode.indent(B,J.text.slice(oe.length),J.text),Oe==ye||Oe>150)){if(!r)return;o="prev"}o=="prev"?t>y.first?Oe=H(Qt(y,t-1).text,null,$):Oe=0:o=="add"?Oe=ee+e.options.indentUnit:o=="subtract"?Oe=ee-e.options.indentUnit:typeof o=="number"&&(Oe=ee+o),Oe=Math.max(0,Oe);var Ie="",Qe=0;if(e.options.indentWithTabs)for(var Xe=Math.floor(Oe/$);Xe;--Xe)Qe+=$,Ie+=" ";if(Qe$,ee=En(t),oe=null;if(J&&r.ranges.length>1)if(ga&&ga.text.join(` `)==t){if(r.ranges.length%ga.text.length==0){oe=[];for(var Oe=0;Oe=0;Qe--){var Xe=r.ranges[Qe],dt=Xe.from(),bt=Xe.to();Xe.empty()&&(o&&o>0?dt=Et(dt.line,dt.ch-o):e.state.overwrite&&!J?bt=Et(bt.line,Math.min(Qt(B,bt.line).text.length,bt.ch+Ce(ee).length)):J&&ga&&ga.lineWise&&ga.text.join(` `)==ee.join(` `)&&(dt=bt=Et(dt.line,0)));var It={from:dt,to:bt,text:oe?oe[Qe%oe.length]:ee,origin:y||(J?"paste":e.state.cutIncoming>$?"cut":"+input")};xo(e.doc,It),Gr(e,"inputRead",e,It)}t&&!J&&ll(e,t),da(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ie),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var o=e.clipboardData&&e.clipboardData.getData("Text");if(o)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&ni(t,function(){return vs(t,o,0,null,"paste")}),!0}function ll(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var o=e.doc.sel,r=o.ranges.length-1;r>=0;r--){var y=o.ranges[r];if(y.head.ch>100||r&&o.ranges[r-1].head.line==y.head.line)continue;var B=e.getModeAt(y.head),$=!1;if(B.electricChars){for(var J=0;J-1){$=$o(e,y.head.line,"smart");break}}else B.electricInput&&(B.electricInput.test(Qt(e.doc,y.head.line).text.slice(0,y.head.ch))&&($=$o(e,y.head.line,"smart")));$&&Gr(e,"electricInput",e,y.head.line)}}function ul(e){for(var t=[],o=[],r=0;rB&&($o(this,J.head.line,r,!0),B=J.head.line,$==this.doc.sel.primIndex&&da(this));else{var ee=J.from(),oe=J.to(),Oe=Math.max(B,ee.line);B=Math.min(this.lastLine(),oe.line-(oe.ch?0:1))+1;for(var Ie=Oe;Ie0&&us(this.doc,$,new ot(ee,Qe[$].to()),pe)}}}),getTokenAt:function(r,y){return Ir(this,r,y)},getLineTokens:function(r,y){return Ir(this,Et(r),y,!0)},getTokenTypeAt:function(r){r=L(this.doc,r);var y=pt(this,Qt(this.doc,r.line)),B=0,$=(y.length-1)/2,J=r.ch,ee;if(J==0)ee=y[2];else for(;;){var oe=B+$>>1;if((oe?y[oe*2-1]:0)>=J)$=oe;else if(y[oe*2+1]ee&&(r=ee,$=!0),J=Qt(this.doc,r)}else J=r;return Jn(this,J,{top:0,left:0},y||"page",B||$).top+($?this.doc.height-Bt(J):0)},defaultTextHeight:function(){return zr(this.display)},defaultCharWidth:function(){return Qr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,y,B,$,J){var ee=this.display;r=tr(this,L(this.doc,r));var oe=r.bottom,Oe=r.left;if(y.style.position="absolute",y.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(y),ee.sizer.appendChild(y),$=="over")oe=r.top;else if($=="above"||$=="near"){var Ie=Math.max(ee.wrapper.clientHeight,this.doc.height),Qe=Math.max(ee.sizer.clientWidth,ee.lineSpace.clientWidth);($=="above"||r.bottom+y.offsetHeight>Ie)&&r.top>y.offsetHeight?oe=r.top-y.offsetHeight:r.bottom+y.offsetHeight<=Ie&&(oe=r.bottom),Oe+y.offsetWidth>Qe&&(Oe=Qe-y.offsetWidth)}y.style.top=oe+"px",y.style.left=y.style.right="",J=="right"?(Oe=ee.sizer.clientWidth-y.offsetWidth,y.style.right="0px"):(J=="left"?Oe=0:J=="middle"&&(Oe=(ee.sizer.clientWidth-y.offsetWidth)/2),y.style.left=Oe+"px"),B&&mo(this,{left:Oe,top:oe,right:Oe+y.offsetWidth,bottom:oe+y.offsetHeight})},triggerOnKeyDown:pi(Js),triggerOnKeyPress:pi(el),triggerOnKeyUp:qs,triggerOnMouseDown:pi(tl),execCommand:function(r){if(zo.hasOwnProperty(r))return zo[r].call(null,this)},triggerElectric:pi(function(r){ll(this,r)}),findPosH:function(r,y,B,$){var J=1;y<0&&(J=-1,y=-y);for(var ee=L(this.doc,r),oe=0;oe0&&Oe(B.charAt($-1));)--$;for(;J.5||this.options.lineWrapping)&&Ci(this),qe(this,"refresh",this)}),swapDoc:pi(function(r){var y=this.doc;return y.cm=null,this.state.selectingText&&this.state.selectingText(),Vr(this,r),zn(this),this.display.input.reset(),xa(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Gr(this,"swapDoc",this,y),y}),phrase:function(r){var y=this.options.phrases;return y&&Object.prototype.hasOwnProperty.call(y,r)?y[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},me(e),e.registerHelper=function(r,y,B){o.hasOwnProperty(r)||(o[r]=e[r]={_global:[]}),o[r][y]=B},e.registerGlobalHelper=function(r,y,B,$){e.registerHelper(r,y,$),o[r]._global.push({pred:B,val:$})}}function ys(e,t,o,r,y){var B=t,$=o,J=Qt(e,t.line),ee=y&&e.direction=="rtl"?-o:o;function oe(){var qt=t.line+ee;return qt=e.first+e.size?!1:(t=new Et(qt,t.ch,t.sticky),J=Qt(e,qt))}function Oe(qt){var Wt;if(r=="codepoint"){var on=J.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(on)?Wt=null:Wt=new Et(t.line,Math.max(0,Math.min(J.text.length,t.ch+o*(on>=55296&&on<56320?2:1))),-o)}else y?Wt=kl(e.cm,J,t,o):Wt=ds(J,t,o);if(Wt==null)if(!qt&&oe())t=hs(y,e.cm,J,t.line,ee);else return!1;else t=Wt;return!0}if(r=="char"||r=="codepoint")Oe();else if(r=="column")Oe(!0);else if(r=="word"||r=="group")for(var Ie=null,Qe=r=="group",Xe=e.cm&&e.cm.getHelper(t,"wordChars"),dt=!0;!(o<0&&!Oe(!dt));dt=!1){var bt=J.text.charAt(t.ch)||` `,It=nt(bt,Xe)?"w":Qe&&bt==` `?"n":!Qe||/\s/.test(bt)?null:"p";if(Qe&&!dt&&!It&&(It="s"),Ie&&Ie!=It){o<0&&(o=1,Oe(),t.sticky="after");break}if(It&&(Ie=It),o>0&&!Oe(!dt))break}var Ft=qo(e,t,B,$,!0);return Gi(B,Ft)&&(Ft.hitSide=!0),Ft}function hl(e,t,o,r){var y=e.doc,B=t.left,$;if(r=="page"){var J=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ee=Math.max(J-.5*zr(e.display),3);$=(o>0?t.bottom:t.top)+o*ee}else r=="line"&&($=o>0?t.bottom+3:t.top-3);for(var oe;!(oe=Wn(e,B,$),!oe.outside);){if(o<0?$<=0:$>=y.height){oe.hitSide=!0;break}$+=o*5}return oe}var Mr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Mr.prototype.init=function(e){var t=this,o=this,r=o.cm,y=o.div=e.lineDiv;cl(y,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function B(J){for(var ee=J.target;ee;ee=ee.parentNode){if(ee==y)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ee.className))break}return!1}Ze(y,"paste",function(J){if(!B(J)||st(r,J)||sl(J,r))return;K<=11&&setTimeout(Jr(r,function(){return t.updateFromDOM()}),20)}),Ze(y,"compositionstart",function(J){t.composing={data:J.data,done:!1}}),Ze(y,"compositionupdate",function(J){t.composing||(t.composing={data:J.data,done:!1})}),Ze(y,"compositionend",function(J){t.composing&&(J.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ze(y,"touchstart",function(){return o.forceCompositionEnd()}),Ze(y,"input",function(){t.composing||t.readFromDOMSoon()});function $(J){if(!B(J)||st(r,J))return;if(r.somethingSelected())as({lineWise:!1,text:r.getSelections()}),J.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var ee=ul(r);as({lineWise:!0,text:ee.text}),J.type=="cut"&&r.operation(function(){r.setSelections(ee.ranges,0,pe),r.replaceSelection("",null,"cut")})}else return;if(J.clipboardData){J.clipboardData.clearData();var oe=ga.text.join(` `);if(J.clipboardData.setData("Text",oe),J.clipboardData.getData("Text")==oe){J.preventDefault();return}}var Oe=dl(),Ie=Oe.firstChild;r.display.lineSpace.insertBefore(Oe,r.display.lineSpace.firstChild),Ie.value=ga.text.join(` `);var Qe=document.activeElement;M(Ie),setTimeout(function(){r.display.lineSpace.removeChild(Oe),Qe.focus(),Qe==y&&o.showPrimarySelection()},50)}Ze(y,"copy",$),Ze(y,"cut",$)},Mr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Mr.prototype.prepareSelection=function(){var e=Xi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Mr.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Mr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Mr.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,o=t.doc.sel.primary(),r=o.from(),y=o.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||y.line=t.display.viewFrom&&fl(t,r)||{node:J[0].measure.map[2],offset:0},oe=y.linee.firstLine()&&(r=Et(r.line-1,Qt(e.doc,r.line-1).length)),y.ch==Qt(e.doc,y.line).text.length&&y.linet.viewTo-1)return!1;var B,$,J;r.line==t.viewFrom||(B=Pr(e,r.line))==0?($=kn(t.view[0].line),J=t.view[0].node):($=kn(t.view[B].line),J=t.view[B-1].node.nextSibling);var ee=Pr(e,y.line),oe,Oe;if(ee==t.view.length-1?(oe=t.viewTo-1,Oe=t.lineDiv.lastChild):(oe=kn(t.view[ee+1].line)-1,Oe=t.view[ee+1].node.previousSibling),!J)return!1;for(var Ie=e.doc.splitLines(tu(e,J,Oe,$,oe)),Qe=$r(e.doc,Et($,0),Et(oe,Qt(e.doc,oe).text.length));Ie.length>1&&Qe.length>1;)if(Ce(Ie)==Ce(Qe))Ie.pop(),Qe.pop(),oe--;else if(Ie[0]==Qe[0])Ie.shift(),Qe.shift(),$++;else break;for(var Xe=0,dt=0,bt=Ie[0],It=Qe[0],Ft=Math.min(bt.length,It.length);Xer.ch&&qt.charCodeAt(qt.length-dt-1)==Wt.charCodeAt(Wt.length-dt-1);)Xe--,dt++;Ie[Ie.length-1]=qt.slice(0,qt.length-dt).replace(/^\u200b+/,""),Ie[0]=Ie[0].slice(Xe).replace(/\u200b+$/,"");var In=Et($,Xe),bn=Et(oe,Qe.length?Ce(Qe).length-dt:0);if(Ie.length>1||Ie[0]||fn(In,bn))return To(e.doc,Ie,In,bn,"+input"),!0},Mr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Mr.prototype.reset=function(){this.forceCompositionEnd()},Mr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Mr.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},Mr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&ni(this.cm,function(){return Tr(e.cm)})},Mr.prototype.setUneditable=function(e){e.contentEditable="false"},Mr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Jr(this.cm,vs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Mr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Mr.prototype.onContextMenu=function(){},Mr.prototype.resetPosition=function(){},Mr.prototype.needsContentAttribute=!0;function fl(e,t){var o=Be(e,t.line);if(!o||o.hidden)return null;var r=Qt(e.doc,t.line),y=le(o,r,t.line),B=gt(r,e.doc.direction),$="left";if(B){var J=at(B,t.ch);$=J%2?"right":"left"}var ee=yt(y.map,t.ch,$);return ee.offset=ee.collapse=="right"?ee.end:ee.start,ee}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Oo(e,t){return t&&(e.bad=!0),e}function tu(e,t,o,r,y){var B="",$=!1,J=e.doc.lineSeparator(),ee=!1;function oe(Xe){return function(dt){return dt.id==Xe}}function Oe(){$&&(B+=J,ee&&(B+=J),$=ee=!1)}function Ie(Xe){Xe&&(Oe(),B+=Xe)}function Qe(Xe){if(Xe.nodeType==1){var dt=Xe.getAttribute("cm-text");if(dt){Ie(dt);return}var bt=Xe.getAttribute("cm-marker"),It;if(bt){var Ft=e.findMarks(Et(r,0),Et(y+1,0),oe(+bt));Ft.length&&(It=Ft[0].find(0))&&Ie($r(e.doc,It.from,It.to).join(J));return}if(Xe.getAttribute("contenteditable")=="false")return;var qt=/^(pre|div|p|li|table|br)$/i.test(Xe.nodeName);if(!/^br$/i.test(Xe.nodeName)&&Xe.textContent.length==0)return;qt&&Oe();for(var Wt=0;Wt=9&&t.hasSelection&&(t.hasSelection=null),o.poll()}),Ze(y,"paste",function($){if(st(r,$)||sl($,r))return;r.state.pasteIncoming=+new Date,o.fastPoll()});function B($){if(st(r,$))return;if(r.somethingSelected())as({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var J=ul(r);as({lineWise:!0,text:J.text}),$.type=="cut"?r.setSelections(J.ranges,null,pe):(o.prevInput="",y.value=J.text.join(` `),M(y))}else return;$.type=="cut"&&(r.state.cutIncoming=+new Date)}Ze(y,"cut",B),Ze(y,"copy",B),Ze(e.scroller,"paste",function($){if(ra(e,$)||st(r,$))return;if(!y.dispatchEvent){r.state.pasteIncoming=+new Date,o.focus();return}var J=new Event("paste");J.clipboardData=$.clipboardData,y.dispatchEvent(J)}),Ze(e.lineSpace,"selectstart",function($){ra(e,$)||ce($)}),Ze(y,"compositionstart",function(){var $=r.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:$,range:r.markText($,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ze(y,"compositionend",function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)})},ui.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ui.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ui.prototype.prepareSelection=function(){var e=this.cm,t=e.display,o=e.doc,r=Xi(e);if(e.options.moveInputWithCursor){var y=tr(e,o.sel.primary().head,"div"),B=t.wrapper.getBoundingClientRect(),$=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,y.top+$.top-B.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,y.left+$.left-B.left))}return r},ui.prototype.showSelection=function(e){var t=this.cm,o=t.display;h(o.cursorDiv,e.cursors),h(o.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ui.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var o=t.getSelection();this.textarea.value=o,t.state.focused&&M(this.textarea),G&&K>=9&&(this.hasSelection=o)}else e||(this.prevInput=this.textarea.value="",G&&K>=9&&(this.hasSelection=null))},ui.prototype.getField=function(){return this.textarea},ui.prototype.supportsTouch=function(){return!1},ui.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},ui.prototype.blur=function(){this.textarea.blur()},ui.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ui.prototype.receivedFocus=function(){this.slowPoll()},ui.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ui.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function o(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,o)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,o)},ui.prototype.poll=function(){var e=this,t=this.cm,o=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||$t(o)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var y=o.value;if(y==r&&!t.somethingSelected())return!1;if(G&&K>=9&&this.hasSelection===y||s&&/[\uf700-\uf7ff]/.test(y))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var B=y.charCodeAt(0);if(B==8203&&!r&&(r="\u200B"),B==8666)return this.reset(),this.cm.execCommand("undo")}for(var $=0,J=Math.min(r.length,y.length);$1e3||y.indexOf(` `)>-1?o.value=e.prevInput="":e.prevInput=y,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ui.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ui.prototype.onKeyPress=function(){G&&K>=9&&(this.hasSelection=null),this.fastPoll()},ui.prototype.onContextMenu=function(e){var t=this,o=t.cm,r=o.display,y=t.textarea;t.contextMenuPending&&t.contextMenuPending();var B=Zr(o,e),$=r.scroller.scrollTop;if(!B||f)return;var J=o.options.resetSelectionOnContextMenu;J&&o.doc.sel.contains(B)==-1&&Jr(o,Di)(o.doc,At(B),pe);var ee=y.style.cssText,oe=t.wrapper.style.cssText,Oe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",y.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Oe.top-5)+"px; left: "+(e.clientX-Oe.left-5)+`px; z-index: 1000; background: `+(G?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ie;n&&(Ie=window.scrollY),r.input.focus(),n&&window.scrollTo(null,Ie),r.input.reset(),o.somethingSelected()||(y.value=t.prevInput=" "),t.contextMenuPending=Xe,r.selForContextMenu=o.doc.sel,clearTimeout(r.detectingSelectAll);function Qe(){if(y.selectionStart!=null){var bt=o.somethingSelected(),It="\u200B"+(bt?y.value:"");y.value="\u21DA",y.value=It,t.prevInput=bt?"":"\u200B",y.selectionStart=1,y.selectionEnd=It.length,r.selForContextMenu=o.doc.sel}}function Xe(){if(t.contextMenuPending!=Xe)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=oe,y.style.cssText=ee,G&&K<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=$),y.selectionStart!=null){(!G||G&&K<9)&&Qe();var bt=0,It=function(){r.selForContextMenu==o.doc.sel&&y.selectionStart==0&&y.selectionEnd>0&&t.prevInput=="\u200B"?Jr(o,Ls)(o):bt++<10?r.detectingSelectAll=setTimeout(It,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(It,200)}}if(G&&K>=9&&Qe(),R){Re(e);var dt=function(){Ot(window,"mouseup",dt),setTimeout(Xe,20)};Ze(window,"mouseup",dt)}else setTimeout(Xe,50)},ui.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ui.prototype.setUneditable=function(){},ui.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?v(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 o=j();t.autofocus=o==e||e.getAttribute("autofocus")!=null&&o==document.body}function r(){e.value=J.getValue()}var y;if(e.form&&(Ze(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var B=e.form;y=B.submit;try{var $=B.submit=function(){r(),B.submit=y,B.submit(),B.submit=$}}catch(ee){}}t.finishInit=function(ee){ee.save=r,ee.getTextArea=function(){return e},ee.toTextArea=function(){ee.toTextArea=isNaN,r(),e.parentNode.removeChild(ee.getWrapperElement()),e.style.display="",e.form&&(Ot(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=y))}},e.style.display="none";var J=Xr(function(ee){return e.parentNode.insertBefore(ee,e.nextSibling)},t);return J}function iu(e){e.off=Ot,e.on=Ze,e.wheelEventPixels=it,e.Doc=Fi,e.splitLines=En,e.countColumn=H,e.findColumn=be,e.isWordChar=Ke,e.Pass=ye,e.signal=qe,e.Line=Yn,e.changeEnd=St,e.scrollbarModel=eo,e.Pos=Et,e.cmpPos=fn,e.modes=br,e.mimeModes=Pn,e.resolveMode=ln,e.getMode=Yr,e.modeExtensions=tn,e.extendMode=sn,e.copyState=Qn,e.startState=Nr,e.innerMode=sr,e.commands=zo,e.keyMap=Ia,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Co,e.normalizeKeyMap=Pl,e.StringStream=hn,e.SharedTextMarker=Ho,e.TextMarker=Va,e.LineWidget=Wo,e.e_preventDefault=ce,e.e_stopPropagation=he,e.e_stop=Re,e.addClass=W,e.contains=w,e.rmClass=g,e.keyNames=Xa}$l(Xr),ql(Xr);var au="iter insert remove copy getEditor constructor".split(" ");for(var ss in Fi.prototype)Fi.prototype.hasOwnProperty(ss)&&q(au,ss)<0&&(Xr.prototype[ss]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fi.prototype[ss]));return me(Fi),Xr.inputStyles={textarea:ui,contenteditable:Mr},Xr.defineMode=function(e){!Xr.defaults.mode&&e!="null"&&(Xr.defaults.mode=e),Dr.apply(this,arguments)},Xr.defineMIME=Or,Xr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xr.defineMIME("text/plain","null"),Xr.defineExtension=function(e,t){Xr.prototype[e]=t},Xr.defineDocExtension=function(e,t){Fi.prototype[e]=t},Xr.fromTextArea=ru,iu(Xr),Xr.version="5.58.2",Xr})},WaYH:function(ct,ge,U){"use strict";var te=U("rePB"),Y=U("Ff2n"),N=U("VTBJ"),z=U("1OyB"),P=U("vuIU"),F=U("JX7q"),G=U("Ji7U"),K=U("LK+K"),n=U("q1tI"),I=U("TSYQ"),E=U.n(I),f=U("sboe"),b=U("OZM5"),c=function(R){var O=R.prefixCls,g=R.level,_=R.isStart,h=R.isEnd;if(!g)return null;for(var d="".concat(O,"-indent-unit"),C=[],x=0;x1&&arguments[1]!==void 0?arguments[1]:!1,fe=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(ue&&j[fe])return j[fe];var be=window.getComputedStyle(pe),se=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),Ce=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),ze=w.map(function(He){return"".concat(He,":").concat(be.getPropertyValue(He))}).join(";"),Ye={sizingStyle:ze,paddingSize:ae,borderSize:Ce,boxSizing:se};return ue&&fe&&(j[fe]=Ye),Ye}function M(pe){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;W||(W=document.createElement("textarea"),W.setAttribute("tab-index","-1"),W.setAttribute("aria-hidden","true"),document.body.appendChild(W)),pe.getAttribute("wrap")?W.setAttribute("wrap",pe.getAttribute("wrap")):W.removeAttribute("wrap");var se=T(pe,ue),ae=se.paddingSize,Ce=se.borderSize,ze=se.boxSizing,Ye=se.sizingStyle;W.setAttribute("style","".concat(Ye,";").concat(x)),W.value=pe.value||pe.placeholder||"";var He=Number.MIN_SAFE_INTEGER,Ve=Number.MAX_SAFE_INTEGER,Fe=W.scrollHeight,Ke;if(ze==="border-box"?Fe+=Ce:ze==="content-box"&&(Fe-=ae),fe!==null||be!==null){W.value=" ";var nt=W.scrollHeight-ae;fe!==null&&(He=nt*fe,ze==="border-box"&&(He=He+ae+Ce),Fe=Math.max(He,Fe)),be!==null&&(Ve=nt*be,ze==="border-box"&&(Ve=Ve+ae+Ce),Ke=Fe>Ve?"":"hidden",Fe=Math.min(Ve,Fe))}return{height:Fe,minHeight:He,maxHeight:Ve,overflowY:Ke,resize:"none"}}var m=U("Gytx"),v=U.n(m),H;(function(pe){pe[pe.NONE=0]="NONE",pe[pe.RESIZING=1]="RESIZING",pe[pe.RESIZED=2]="RESIZED"})(H||(H={}));var X=function(pe){Object(z.a)(fe,pe);var ue=Object(P.a)(fe);function fe(be){var se;return Object(Y.a)(this,fe),se=ue.call(this,be),se.nextFrameActionId=void 0,se.resizeFrameId=void 0,se.textArea=void 0,se.saveTextArea=function(ae){se.textArea=ae},se.handleResize=function(ae){var Ce=se.state.resizeStatus,ze=se.props,Ye=ze.autoSize,He=ze.onResize;if(Ce!==H.NONE)return;typeof He=="function"&&He(ae),Ye&&se.resizeOnNextFrame()},se.resizeOnNextFrame=function(){cancelAnimationFrame(se.nextFrameActionId),se.nextFrameActionId=requestAnimationFrame(se.resizeTextarea)},se.resizeTextarea=function(){var ae=se.props.autoSize;if(!ae||!se.textArea)return;var Ce=ae.minRows,ze=ae.maxRows,Ye=M(se.textArea,!1,Ce,ze);se.setState({textareaStyles:Ye,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(se.resizeFrameId),se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:H.RESIZED},function(){se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:H.NONE}),se.fixFirefoxAutoScroll()})})})})},se.renderTextArea=function(){var ae=se.props,Ce=ae.prefixCls,ze=Ce===void 0?"rc-textarea":Ce,Ye=ae.autoSize,He=ae.onResize,Ve=ae.className,Fe=ae.disabled,Ke=se.state,nt=Ke.textareaStyles,de=Ke.resizeStatus,De=Object(h.a)(se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ne=C()(ze,Ve,Object(K.a)({},"".concat(ze,"-disabled"),Fe));"value"in De&&(De.value=De.value||"");var Ue=Object(G.a)(Object(G.a)(Object(G.a)({},se.props.style),nt),de===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return F.createElement(_,{onResize:se.handleResize,disabled:!(Ye||He)},F.createElement("textarea",Object(te.a)({},De,{className:Ne,style:Ue,ref:se.saveTextArea})))},se.state={textareaStyles:{},resizeStatus:H.NONE},se}return Object(N.a)(fe,[{key:"componentDidUpdate",value:function(se){(se.value!==this.props.value||!v()(se.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var se=this.textArea.selectionStart,ae=this.textArea.selectionEnd;this.textArea.setSelectionRange(se,ae)}}catch(Ce){}}},{key:"render",value:function(){return this.renderTextArea()}}]),fe}(F.Component),q=X,re=function(pe){Object(z.a)(fe,pe);var ue=Object(P.a)(fe);function fe(be){var se;Object(Y.a)(this,fe),se=ue.call(this,be),se.resizableTextArea=void 0,se.focus=function(){se.resizableTextArea.textArea.focus()},se.saveTextArea=function(Ce){se.resizableTextArea=Ce},se.handleChange=function(Ce){var ze=se.props.onChange;se.setValue(Ce.target.value,function(){se.resizableTextArea.resizeTextarea()}),ze&&ze(Ce)},se.handleKeyDown=function(Ce){var ze=se.props,Ye=ze.onPressEnter,He=ze.onKeyDown;Ce.keyCode===13&&Ye&&Ye(Ce),He&&He(Ce)};var ae=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return se.state={value:ae},se}return Object(N.a)(fe,[{key:"setValue",value:function(se,ae){"value"in this.props||this.setState({value:se},ae)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return F.createElement(q,Object(te.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(se){return"value"in se?{value:se.value}:null}}]),fe}(F.Component),ye=ge.default=re},ZW9T:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return m});var te=U("k1fw"),Y=U("oBTY"),N=U("miYZ"),z=U("tsqr"),P=U("rAM+"),F=U("tJVT"),G=U("PpiC"),K=U("q1tI"),n=U.n(K),I=U("bdgK"),E=U("9og8"),f=U("WmNS"),b=U.n(f),c={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},a={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},p={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},l={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},u=U("5VLF"),s=U.n(u),i={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},D=function(H,X){return X.map(function(q){return{label:q,kind:H.languages.CompletionItemKind.Keyword,insertText:q}})},A=function(H){return Object.keys(i.tables).map(function(X){return{label:X,kind:H.languages.CompletionItemKind.Variable,insertText:X}})},S=function(H,X){var q=i.tables[H];return q?q.map(function(re){return{label:re,kind:X.languages.CompletionItemKind.Field,insertText:re}}):[]};function R(v,H,X,q,re){var ye=H.getWordUntilPosition(X),pe={startLineNumber:X.lineNumber,endLineNumber:X.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},ue=q.map(function(fe){return{label:fe,kind:v.languages.CompletionItemKind.Keyword,insertText:fe,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pe}});return re.map(function(fe){ue.push(Object(te.a)(Object(te.a)({},fe),{},{range:pe}))}),ue}var O=function(v){i.languages.map(function(re){return v.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(pe,ue,fe){return Object(E.a)(b.a.mark(function be(){var se;return b.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return se=s()(pe.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Ce.abrupt("return",[{range:pe.getFullModelRange(),text:se}]);case 2:case"end":return Ce.stop()}},be)}))()}}),re});var H=p.quickKey.map(function(re){return{label:re.label,kind:v.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),X=l.quickKey.map(function(re){return{label:re.label,kind:v.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),q=a.quickKey.map(function(re){return{label:re.label,kind:v.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}});v.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ye,pe){var ue=ye.getWordUntilPosition(pe),fe={startLineNumber:pe.lineNumber,endLineNumber:pe.lineNumber,startColumn:ue.startColumn,endColumn:ue.endColumn},be=ye.getLineContent(pe.lineNumber).substring(ue.startColumn-2,ue.endColumn);return{suggestions:[].concat(Object(Y.a)(p.keywords.map(function(se){return{label:se,kind:v.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})),Object(Y.a)(p.quickKey.map(function(se){return{label:se.label,kind:v.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})))}}}),v.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ye,pe){var ue=ye.getWordUntilPosition(pe),fe={startLineNumber:pe.lineNumber,endLineNumber:pe.lineNumber,startColumn:ue.startColumn,endColumn:ue.endColumn};return{suggestions:Object(Y.a)(c.keywords.map(function(be){return{label:be,kind:v.languages.CompletionItemKind.Function,documentation:be,insertText:be,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}}))}}}),v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ye,pe){var ue=ye.getWordUntilPosition(pe),fe={startLineNumber:pe.lineNumber,endLineNumber:pe.lineNumber,startColumn:ue.startColumn,endColumn:ue.endColumn},be=ye.getLineContent(pe.lineNumber).substring(ue.startColumn-2,ue.endColumn);return{suggestions:[].concat(Object(Y.a)(a.keywords.map(function(se){return{label:se,kind:v.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})),Object(Y.a)(a.quickKey.map(function(se){return{label:se.label,kind:v.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})))}}}),v.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ye,pe){var ue=ye.getWordUntilPosition(pe),fe={startLineNumber:pe.lineNumber,endLineNumber:pe.lineNumber,startColumn:ue.startColumn,endColumn:ue.endColumn},be=ye.getLineContent(pe.lineNumber).substring(ue.startColumn-2,ue.endColumn);return{suggestions:[].concat(Object(Y.a)(l.keywords.map(function(se){return{label:se,kind:v.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})),Object(Y.a)(l.quickKey.map(function(se){return{label:se.label,kind:v.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:fe}})))}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",_=U("fjLI"),h=U("LvDl"),d=U("+ua5");function C(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}function x(){}var w=!1,j={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function W(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],H=v;if(Array.isArray(v)){for(var X=0;X0||Nr.target.offsetWidth>0)&&st.current.instance.layout()}}catch(hn){Qn.e(hn)}finally{Qn.f()}}),tn.observe(qe.current)),tn}function ht(){z.b.warn(decodeURIComponent(g))}var Ut=function(){var sn=st.current.instance;if(ye!=null&&sn&&Re){var Qn=sn.getModel();Qn&&ye!==Qn.getValue()&&(w=!0,Qn.setValue(ye),sn.layout(),w=!1)}};Object(K.useEffect)(function(){we.current&&clearTimeout(we.current),we.current=setTimeout(function(){Ut()},500)},[ye,Re,st.current]),Object(K.useEffect)(function(){if(xt&&st.current&&st.current.instance){var tn=st.current.instance;tn.changeViewZones(function(Qn){var sr=document.createElement("div");sr.style.padding="10px 20px",sr.style.width="calc(100% - 20px)",sr.className="my-error-line-wrp",sr.innerHTML=kt,Qn.addZone({afterLineNumber:xt||11,heightInLines:3,domNode:sr})});var sn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};tn.addOverlayWidget(sn),tn.revealPositionInCenter({lineNumber:20,column:1})}},[xt,st.current,Re]);function nn(){var tn=st.current.instance;if(tn){var sn=tn.getSelection(),Qn=st.current.pastePos||{},sr=new T.Range(Qn.startLineNumber||sn.endLineNumber,Qn.startColumn||sn.endColumn,Qn.endLineNumber||sn.endLineNumber,Qn.endColumn||sn.endColumn);setTimeout(function(){tn.executeEdits("",[{range:sr,text:""}])},300)}}function en(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),Fe())}var mn=function(){if(nt&&st.current.instance){var sn=st.current.instance.getContentHeight();ln(sn0||rt.target.offsetWidth>0)&&nt.layout()}}catch(lt){Ne.e(lt)}finally{Ne.f()}}),de.observe(se.current)),de}Object(K.useEffect)(function(){se.current&&Promise.all([U.e(16),U.e(28)]).then(U.t.bind(null,"M/lh",7)).then(function(nt){T=nt;var de=T.editor.createDiffEditor(se.current,Object(te.a)(Object(te.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},be),{},{wordWrap:!0}));Ye(de);var De=He(de);return function(){de.dispose();var Ne=de.getModel();Ne&&Ne.dispose(),De.unobserve(se.current)}})},[]),Object(K.useEffect)(function(){ze&&ze.setModel({original:T.editor.createModel(ye,ue),modified:T.editor.createModel(pe,ue)})},[ye,pe,ue,ze]);var Ve=C(X),Fe=C(re),Ke={width:Ve,height:Fe};return n.a.createElement("div",{className:"my-diff-editor",ref:se,style:Ke})}},ZpRC:function(ct,ge,U){"use strict";function te(E){return typeof E=="object"&&E!=null&&E.nodeType===1}function Y(E,f){return(!f||E!=="hidden")&&E!=="visible"&&E!=="clip"}function N(E,f){if(E.clientHeightf||p>E&&l=f&&u>=b?p-E-c:l>f&&ub?l-f+a:0}var P=function(E,f){var b=window,c=f.scrollMode,a=f.block,p=f.inline,l=f.boundary,u=f.skipOverflowHiddenElements,s=typeof l=="function"?l:function(nt){return nt!==l};if(!te(E))throw new TypeError("Invalid target");for(var i=document.scrollingElement||document.documentElement,D=[],A=E;te(A)&&s(A);){if((A=A.parentElement)===i){D.push(A);break}A!=null&&A===document.body&&N(A)&&!N(document.documentElement)||A!=null&&N(A,u)&&D.push(A)}for(var S=b.visualViewport?b.visualViewport.width:innerWidth,R=b.visualViewport?b.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,_=E.getBoundingClientRect(),h=_.height,d=_.width,C=_.top,x=_.right,w=_.bottom,j=_.left,W=a==="start"||a==="nearest"?C:a==="end"?w:C+h/2,T=p==="center"?j+d/2:p==="end"?x:j,M=[],m=0;m=0&&j>=0&&w<=R&&x<=S&&C>=re&&w<=pe&&j>=ue&&x<=ye)return M;var fe=getComputedStyle(v),be=parseInt(fe.borderLeftWidth,10),se=parseInt(fe.borderTopWidth,10),ae=parseInt(fe.borderRightWidth,10),Ce=parseInt(fe.borderBottomWidth,10),ze=0,Ye=0,He="offsetWidth"in v?v.offsetWidth-v.clientWidth-be-ae:0,Ve="offsetHeight"in v?v.offsetHeight-v.clientHeight-se-Ce:0;if(i===v)ze=a==="start"?W:a==="end"?W-R:a==="nearest"?z(g,g+R,R,se,Ce,g+W,g+W+h,h):W-R/2,Ye=p==="start"?T:p==="center"?T-S/2:p==="end"?T-S:z(O,O+S,S,be,ae,O+T,O+T+d,d),ze=Math.max(0,ze+g),Ye=Math.max(0,Ye+O);else{ze=a==="start"?W-re-se:a==="end"?W-pe+Ce+Ve:a==="nearest"?z(re,pe,X,se,Ce+Ve,W,W+h,h):W-(re+X/2)+Ve/2,Ye=p==="start"?T-ue-be:p==="center"?T-(ue+q/2)+He/2:p==="end"?T-ye+ae+He:z(ue,ye,q,be,ae+He,T,T+d,d);var Fe=v.scrollLeft,Ke=v.scrollTop;W+=Ke-(ze=Math.max(0,Math.min(Ke+ze,v.scrollHeight-X+Ve))),T+=Fe-(Ye=Math.max(0,Math.min(Fe+Ye,v.scrollWidth-q+He)))}M.push({el:v,top:ze,left:Ye})}return M};function F(E){return E===Object(E)&&Object.keys(E).length!==0}function G(E,f){f===void 0&&(f="auto");var b="scrollBehavior"in document.body.style;E.forEach(function(c){var a=c.el,p=c.top,l=c.left;a.scroll&&b?a.scroll({top:p,left:l,behavior:f}):(a.scrollTop=p,a.scrollLeft=l)})}function K(E){return E===!1?{block:"end",inline:"nearest"}:F(E)?E:{block:"start",inline:"nearest"}}function n(E,f){var b=!E.ownerDocument.documentElement.contains(E);if(F(f)&&typeof f.behavior=="function")return f.behavior(b?[]:P(E,f));if(b)return;var c=K(f);return G(P(E,c),c.behavior)}var I=ge.a=n},"a+yL":function(ct,ge,U){ct.exports={search:"search___t0h96",btn:"btn___t2oDx"}},bT9E:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return Y});var te=U("VTBJ");function Y(N,z){var P=Object(te.a)({},N);return Array.isArray(z)&&z.forEach(function(F){delete P[F]}),P}},c5Ni:function(ct,ge,U){},d5o6:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___2-Tej",flex_space_between:"flex_space_between___1Q3vH",flex_box_vertical_center:"flex_box_vertical_center___2x9ha",flex_box_center_end:"flex_box_center_end___1fvRI",flex_box_column:"flex_box_column___2RmOE",addModal:"addModal___2Pv06",row:"row___2XmSi",label:"label___1L8pt"}},dejd:function(ct,ge,U){},dmUQ:function(ct,ge,U){"use strict";var te=U("Ff2n"),Y=U("rePB"),N=U("1OyB"),z=U("vuIU"),P=U("Ji7U"),F=U("md7G"),G=U("foSv"),K=U("q1tI"),n=U.n(K),I=U("TSYQ"),E=U.n(I),f=U("4IlW");function b(h,d){var C=Object.keys(h);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(h);d&&(x=x.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),C.push.apply(C,x)}return C}function c(h){for(var d=1;d1?q-1:0),ye=1;ye1?m-1:0),H=1;H=0)return parseInt(M.slice(M.indexOf("e-")+2),10);var m=0;return M.indexOf(".")>=0&&(m=M.length-M.indexOf(".")-1),m},w.getInputDisplayValue=function(T){var M=T||w.state,m=M.focused,v=M.inputValue,H=M.value,X;m?X=v:X=w.toPrecisionAsStep(H),X==null&&(X="");var q=w.formatWrapper(X);return S(w.props.decimalSeparator)&&(q=q.toString().replace(".",w.props.decimalSeparator)),q},w.recordCursorPosition=function(){try{w.cursorStart=w.input.selectionStart,w.cursorEnd=w.input.selectionEnd,w.currentValue=w.input.value,w.cursorBefore=w.input.value.substring(0,w.cursorStart),w.cursorAfter=w.input.value.substring(w.cursorEnd)}catch(T){}},w.restoreByAfter=function(T){if(T===void 0)return!1;var M=w.input.value,m=M.lastIndexOf(T);if(m===-1)return!1;var v=w.cursorBefore.length;return w.lastKeyCode===f.a.DELETE&&w.cursorBefore.charAt(v-1)===T[0]?(w.fixCaret(v,v),!0):m+T.length===M.length?(w.fixCaret(m,m),!0):!1},w.partRestoreByAfter=function(T){return T===void 0?!1:Array.prototype.some.call(T,function(M,m){var v=T.substring(m);return w.restoreByAfter(v)})},w.isNotCompleteNumber=function(T){return isNaN(T)||T===""||T===null||T&&T.toString().indexOf(".")===T.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(T,M,m){w.pressingUpOrDown=!0,w.step("down",T,M,m)},w.up=function(T,M,m){w.pressingUpOrDown=!0,w.step("up",T,M,m)},w.saveInput=function(T){w.input=T};var j=x.value;j===void 0&&(j=x.defaultValue),w.state={focused:x.autoFocus};var W=w.getValidValue(w.toNumber(j));return w.state=c(c({},w.state),{},{inputValue:w.toPrecisionAsStep(W),value:W}),w}return Object(z.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var j=this.props,W=j.value,T=j.onChange,M=j.max,m=j.min,v=this.state.focused;if(w){if(!R(w.value,W)||!R(w.max,M)||!R(w.min,m)){var H=v?W:this.getValidValue(W),X;this.pressingUpOrDown?X=H:this.inputting?X=this.rawInput:X=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:X})}var q="value"in this.props?W:this.state.value;"max"in this.props&&w.max!==M&&typeof q=="number"&&q>M&&T&&T(M),"min"in this.props&&w.min!==m&&typeof q=="number"&&q1&&arguments[1]!==void 0?arguments[1]:this.props.min,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,T=parseFloat(w);return isNaN(T)?w:(TW&&(T=W),T)}},{key:"setValue",value:function(w,j){var W=this.props.precision,T=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),M=this.state.value,m=M===void 0?null:M,v=this.state.inputValue,H=v===void 0?null:v,X=typeof T=="number"?T.toFixed(W):"".concat(T),q=T!==m||X!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},j)):this.setState({value:T,inputValue:this.toPrecisionAsStep(w)},j),q&&this.props.onChange(T),T}},{key:"getMaxPrecision",value:function(w){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.props,T=W.precision,M=W.step;if(S(T))return T;var m=this.getPrecision(j),v=this.getPrecision(M),H=this.getPrecision(w);return w?Math.max(H,m+v):m+v}},{key:"getPrecisionFactor",value:function(w){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.getMaxPrecision(w,j);return Math.pow(10,W)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(w){return this.props.formatter?this.props.formatter(w):w}},{key:"toPrecisionAsStep",value:function(w){if(this.isNotCompleteNumber(w)||w==="")return w;var j=Math.abs(this.getMaxPrecision(w));return isNaN(j)?w.toString():Number(w).toFixed(j)}},{key:"toNumber",value:function(w){var j=this.props.precision,W=this.state.focused,T=w&&w.length>16&&W;return this.isNotCompleteNumber(w)||T?w:S(j)?Math.round(w*Math.pow(10,j))/Math.pow(10,j):Number(w)}},{key:"upStep",value:function(w,j){var W=this.props.step,T=this.getPrecisionFactor(w,j),M=Math.abs(this.getMaxPrecision(w,j)),m=((T*w+T*W*j)/T).toFixed(M);return this.toNumber(m)}},{key:"downStep",value:function(w,j){var W=this.props.step,T=this.getPrecisionFactor(w,j),M=Math.abs(this.getMaxPrecision(w,j)),m=((T*w-T*W*j)/T).toFixed(M);return this.toNumber(m)}},{key:"step",value:function(w,j){var W=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=arguments.length>3?arguments[3]:void 0;this.stop(),j&&(j.persist(),j.preventDefault());var m=this.props;if(m.disabled)return;var v=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(v))return;var H=this["".concat(w,"Step")](v,T),X=H>m.max||Hm.max?H=m.max:H=re),st=(_t||_t===0)&&(isNaN(_t)||Number(_t)<=ye),xe=qe||T||M,we=st||T||M,me=E()("".concat(W,"-handler"),"".concat(W,"-handler-up"),Object(Y.a)({},"".concat(W,"-handler-up-disabled"),xe)),ce=E()("".concat(W,"-handler"),"".concat(W,"-handler-down"),Object(Y.a)({},"".concat(W,"-handler-down-disabled"),we)),he=m?{onTouchStart:xe?l:this.up,onTouchEnd:this.stop}:{onMouseDown:xe?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Te=m?{onTouchStart:we?l:this.down,onTouchEnd:this.stop}:{onMouseDown:we?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:xt,style:pe,title:ue,onMouseEnter:fe,onMouseLeave:be,onMouseOver:se,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(W,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Increase Value","aria-disabled":xe,className:me}),H||n.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-up-inner"),onClick:u})),n.a.createElement("span",Object.assign({unselectable:"on"},Te,{role:"button","aria-label":"Decrease Value","aria-disabled":we,className:ce}),X||n.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-down-inner"),onClick:u}))),n.a.createElement("div",{className:"".concat(W,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":re,"aria-valuenow":_t,required:Ce,type:He,placeholder:Ve,onPaste:rt,onClick:ze,onMouseUp:this.onMouseUp,className:"".concat(W,"-input"),tabIndex:Ye,autoComplete:v,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:kt?this.onKeyDown:l,onKeyUp:kt?this.onKeyUp:l,autoFocus:Ne,maxLength:De,readOnly:M,disabled:T,max:re,min:ye,step:de,name:Ue,title:ue,id:Fe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ot),pattern:nt,inputMode:Ke,onInput:lt},Ze))))}}]),C}(n.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:A,min:-A,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var g=O,_=ge.a=g},fAei:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return i.a});var te=U("rePB"),Y=U("VTBJ"),N=U("KQm4"),z=U("1OyB"),P=U("vuIU"),F=U("Ji7U"),G=U("LK+K"),K=U("q1tI"),n=U("4IlW"),I=U("Kwbf"),E=U("TSYQ"),f=U.n(E),b=U("sboe"),c=U("OZM5"),a=U("815F"),p=U("ODXe"),l=U("Ff2n"),u=U("+nKL"),s=U("8XRh"),i=U("WaYH"),D=function(ye,pe){var ue=ye.className,fe=ye.style,be=ye.motion,se=ye.motionNodes,ae=ye.motionType,Ce=ye.onMotionStart,ze=ye.onMotionEnd,Ye=ye.active,He=ye.treeNodeRequiredProps,Ve=Object(l.a)(ye,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),Fe=K.useState(!0),Ke=Object(p.a)(Fe,2),nt=Ke[0],de=Ke[1],De=K.useContext(b.a),Ne=De.prefixCls,Ue=K.useRef(!1),rt=function(){Ue.current||ze(),Ue.current=!0};return Object(K.useEffect)(function(){se&&ae==="hide"&&nt&&de(!1)},[se]),Object(K.useEffect)(function(){return se&&Ce(),function(){se&&rt()}},[]),se?K.createElement(s.default,Object.assign({ref:pe,visible:nt},be,{motionAppear:ae==="show",onAppearEnd:rt,onLeaveEnd:rt}),function(lt,ft){var at=lt.className,_t=lt.style;return K.createElement("div",{ref:ft,className:f()("".concat(Ne,"-treenode-motion"),at),style:_t},se.map(function(gt){var xt=gt.data,Ze=xt.key,kt=Object(l.a)(xt,["key"]),Ot=gt.isStart,qe=gt.isEnd;delete kt.children;var st=Object(a.f)(Ze,He);return K.createElement(i.a,Object.assign({},kt,st,{active:Ye,data:gt.data,key:Ze,isStart:Ot,isEnd:qe}))}))}):K.createElement(i.a,Object.assign({domRef:pe,className:ue,style:fe},Ve,{active:Ye}))};D.displayName="MotionTreeNode";var A=K.forwardRef(D),S=A;function R(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],pe=re.length,ue=ye.length;if(Math.abs(pe-ue)!==1)return{add:!1,key:null};function fe(be,se){var ae=new Map;be.forEach(function(ze){ae.set(ze,!0)});var Ce=se.filter(function(ze){return!ae.has(ze)});return Ce.length===1?Ce[0]:null}return pe ").concat(ye);return ye}var T=function(ye,pe){var ue=ye.prefixCls,fe=ye.data,be=ye.selectable,se=ye.checkable,ae=ye.expandedKeys,Ce=ye.selectedKeys,ze=ye.checkedKeys,Ye=ye.loadedKeys,He=ye.loadingKeys,Ve=ye.halfCheckedKeys,Fe=ye.keyEntities,Ke=ye.disabled,nt=ye.dragging,de=ye.dragOverNodeKey,De=ye.dropPosition,Ne=ye.motion,Ue=ye.height,rt=ye.itemHeight,lt=ye.virtual,ft=ye.focusable,at=ye.activeItem,_t=ye.focused,gt=ye.tabIndex,xt=ye.onKeyDown,Ze=ye.onFocus,kt=ye.onBlur,Ot=ye.onActiveChange,qe=ye.onListChangeStart,st=ye.onListChangeEnd,xe=Object(l.a)(ye,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),we=K.useRef(null);K.useImperativeHandle(pe,function(){return{scrollTo:function(sn){we.current.scrollTo(sn)}}});var me=K.useState(ae),ce=Object(p.a)(me,2),he=ce[0],Te=ce[1],Re=K.useState(fe),Me=Object(p.a)(Re,2),et=Me[0],ht=Me[1],Ut=K.useState(fe),nn=Object(p.a)(Ut,2),en=nn[0],mn=nn[1],En=K.useState([]),$t=Object(p.a)(En,2),rr=$t[0],Dn=$t[1],Sr=K.useState(null),br=Object(p.a)(Sr,2),Pn=br[0],Dr=br[1];function Or(){ht(fe),mn(fe),Dn([]),Dr(null),st()}K.useEffect(function(){Te(ae);var tn=R(he,ae);if(tn.key!==null)if(tn.add){var sn=et.findIndex(function($r){var fr=$r.data.key;return fr===tn.key}),Qn=w(O(et,fe,tn.key),lt,Ue,rt),sr=et.slice();sr.splice(sn+1,0,x),mn(sr),Dn(Qn),Dr("show")}else{var Nr=fe.findIndex(function($r){var fr=$r.data.key;return fr===tn.key}),hn=w(O(fe,et,tn.key),lt,Ue,rt),Qt=fe.slice();Qt.splice(Nr+1,0,x),mn(Qt),Dn(hn),Dr("hide")}else et!==fe&&(ht(fe),mn(fe))},[ae,fe]),K.useEffect(function(){nt||Or()},[nt]);var ln=Ne?en:fe,Yr={expandedKeys:ae,selectedKeys:Ce,loadedKeys:Ye,loadingKeys:He,checkedKeys:ze,halfCheckedKeys:Ve,dragOverNodeKey:de,dropPosition:De,keyEntities:Fe};return K.createElement(K.Fragment,null,_t&&at&&K.createElement("span",{style:g,"aria-live":"assertive"},W(at)),K.createElement("div",{role:"tree"},K.createElement("input",{style:g,disabled:ft===!1||Ke,tabIndex:ft!==!1?gt:null,onKeyDown:xt,onFocus:Ze,onBlur:kt,value:"",onChange:_})),K.createElement(u.a,Object.assign({},xe,{data:ln,itemKey:j,height:Ue,fullHeight:!1,virtual:lt,itemHeight:rt,prefixCls:"".concat(ue,"-list"),ref:we}),function(tn){var sn=tn.pos,Qn=tn.data,sr=Qn.key,Nr=Object(l.a)(Qn,["key"]),hn=tn.isStart,Qt=tn.isEnd,$r=Object(a.e)(sr,sn);delete Nr.children;var fr=Object(a.f)($r,Yr);return K.createElement(S,Object.assign({},Nr,fr,{active:at&&sr===at.data.key,pos:sn,data:tn.data,isStart:hn,isEnd:Qt,motion:Ne,motionNodes:sr===h?rr:null,motionType:Pn,onMotionStart:qe,onMotionEnd:Or,treeNodeRequiredProps:Yr,onMouseMove:function(){Ot(null)}}))}))},M=K.forwardRef(T);M.displayName="NodeList";var m=M,v=U("NvD2"),H=function(re){Object(F.a)(pe,re);var ye=Object(G.a)(pe);function pe(){var ue;return Object(z.a)(this,pe),ue=ye.apply(this,arguments),ue.destroyed=!1,ue.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ue.listRef=K.createRef(),ue.onNodeDragStart=function(fe,be){var se=ue.state,ae=se.expandedKeys,Ce=se.keyEntities,ze=ue.props.onDragStart,Ye=be.props.eventKey;ue.dragNode=be;var He=Object(c.b)(ae,Ye);ue.setState({dragging:!0,dragNodesKeys:Object(c.g)(Ye,Ce)}),ue.setExpandedKeys(He),ze&&ze({event:fe,node:Object(a.b)(be.props)})},ue.onNodeDragEnter=function(fe,be){var se=ue.state,ae=se.expandedKeys,Ce=se.keyEntities,ze=se.dragNodesKeys,Ye=ue.props.onDragEnter,He=be.props,Ve=He.pos,Fe=He.eventKey;if(!ue.dragNode||ze.indexOf(Fe)!==-1)return;var Ke=Object(c.c)(fe,be);if(ue.dragNode.props.eventKey===Fe&&Ke===0){ue.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ue.setState({dragOverNodeKey:Fe,dropPosition:Ke}),ue.delayedDragEnterLogic||(ue.delayedDragEnterLogic={}),Object.keys(ue.delayedDragEnterLogic).forEach(function(nt){clearTimeout(ue.delayedDragEnterLogic[nt])}),ue.delayedDragEnterLogic[Ve]=window.setTimeout(function(){if(!ue.state.dragging)return;var nt=Object(N.a)(ae),de=Ce[Fe];de&&(de.children||[]).length&&(nt=Object(c.a)(ae,Fe)),"expandedKeys"in ue.props||ue.setExpandedKeys(nt),Ye&&Ye({event:fe,node:Object(a.b)(be.props),expandedKeys:nt})},400)},0)},ue.onNodeDragOver=function(fe,be){var se=ue.state.dragNodesKeys,ae=ue.props.onDragOver,Ce=be.props.eventKey;if(se.indexOf(Ce)!==-1)return;if(ue.dragNode&&Ce===ue.state.dragOverNodeKey){var ze=Object(c.c)(fe,be);if(ze===ue.state.dropPosition)return;ue.setState({dropPosition:ze})}ae&&ae({event:fe,node:Object(a.b)(be.props)})},ue.onNodeDragLeave=function(fe,be){var se=ue.props.onDragLeave;ue.setState({dragOverNodeKey:""}),se&&se({event:fe,node:Object(a.b)(be.props)})},ue.onNodeDragEnd=function(fe,be){var se=ue.props.onDragEnd;ue.setState({dragOverNodeKey:""}),ue.cleanDragState(),se&&se({event:fe,node:Object(a.b)(be.props)}),ue.dragNode=null},ue.onNodeDrop=function(fe,be){var se=ue.state,ae=se.dragNodesKeys,Ce=ae===void 0?[]:ae,ze=se.dropPosition,Ye=ue.props.onDrop,He=be.props,Ve=He.eventKey,Fe=He.pos;if(ue.setState({dragOverNodeKey:""}),ue.cleanDragState(),Ce.indexOf(Ve)!==-1){Object(I.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Ke=Object(c.k)(Fe),nt={event:fe,node:Object(a.b)(be.props),dragNode:ue.dragNode?Object(a.b)(ue.dragNode.props):null,dragNodesKeys:Ce.slice(),dropPosition:ze+Number(Ke[Ke.length-1]),dropToGap:!1};ze!==0&&(nt.dropToGap=!0),Ye&&Ye(nt),ue.dragNode=null},ue.cleanDragState=function(){var fe=ue.state.dragging;fe&&ue.setState({dragging:!1})},ue.onNodeClick=function(fe,be){var se=ue.props.onClick;se&&se(fe,be)},ue.onNodeDoubleClick=function(fe,be){var se=ue.props.onDoubleClick;se&&se(fe,be)},ue.onNodeSelect=function(fe,be){var se=ue.state.selectedKeys,ae=ue.state.keyEntities,Ce=ue.props,ze=Ce.onSelect,Ye=Ce.multiple,He=be.selected,Ve=be.key,Fe=!He;Fe?Ye?se=Object(c.a)(se,Ve):se=[Ve]:se=Object(c.b)(se,Ve);var Ke=se.map(function(nt){var de=ae[nt];return de?de.node:null}).filter(function(nt){return nt});ue.setUncontrolledState({selectedKeys:se}),ze&&ze(se,{event:"select",selected:Fe,node:be,selectedNodes:Ke,nativeEvent:fe.nativeEvent})},ue.onNodeCheck=function(fe,be,se){var ae=ue.state,Ce=ae.keyEntities,ze=ae.checkedKeys,Ye=ae.halfCheckedKeys,He=ue.props,Ve=He.checkStrictly,Fe=He.onCheck,Ke=be.key,nt,de={event:"check",node:be,checked:se,nativeEvent:fe.nativeEvent};if(Ve){var De=se?Object(c.a)(ze,Ke):Object(c.b)(ze,Ke),Ne=Object(c.b)(Ye,Ke);nt={checked:De,halfChecked:Ne},de.checkedNodes=De.map(function(_t){return Ce[_t]}).filter(function(_t){return _t}).map(function(_t){return _t.node}),ue.setUncontrolledState({checkedKeys:De})}else{var Ue=Object(v.a)([].concat(Object(N.a)(ze),[Ke]),!0,Ce),rt=Ue.checkedKeys,lt=Ue.halfCheckedKeys;if(!se){var ft=new Set(rt);ft.delete(Ke);var at=Object(v.a)(Array.from(ft),{checked:!1,halfCheckedKeys:lt},Ce);rt=at.checkedKeys,lt=at.halfCheckedKeys}nt=rt,de.checkedNodes=[],de.checkedNodesPositions=[],de.halfCheckedKeys=lt,rt.forEach(function(_t){var gt=Ce[_t];if(!gt)return;var xt=gt.node,Ze=gt.pos;de.checkedNodes.push(xt),de.checkedNodesPositions.push({node:xt,pos:Ze})}),ue.setUncontrolledState({checkedKeys:rt},!1,{halfCheckedKeys:lt})}Fe&&Fe(nt,de)},ue.onNodeLoad=function(fe){return new Promise(function(be){ue.setState(function(se){var ae=se.loadedKeys,Ce=ae===void 0?[]:ae,ze=se.loadingKeys,Ye=ze===void 0?[]:ze,He=ue.props,Ve=He.loadData,Fe=He.onLoad,Ke=fe.key;if(!Ve||Ce.indexOf(Ke)!==-1||Ye.indexOf(Ke)!==-1)return{};var nt=Ve(fe);return nt.then(function(){var de=ue.state,De=de.loadedKeys,Ne=de.loadingKeys,Ue=Object(c.a)(De,Ke),rt=Object(c.b)(Ne,Ke);Fe&&Fe(Ue,{event:"load",node:fe}),ue.setUncontrolledState({loadedKeys:Ue}),ue.setState({loadingKeys:rt}),be()}),{loadingKeys:Object(c.a)(Ye,Ke)}})})},ue.onNodeMouseEnter=function(fe,be){var se=ue.props.onMouseEnter;se&&se({event:fe,node:be})},ue.onNodeMouseLeave=function(fe,be){var se=ue.props.onMouseLeave;se&&se({event:fe,node:be})},ue.onNodeContextMenu=function(fe,be){var se=ue.props.onRightClick;se&&(fe.preventDefault(),se({event:fe,node:be}))},ue.onFocus=function(){var fe=ue.props.onFocus;ue.setState({focused:!0}),fe&&fe.apply(void 0,arguments)},ue.onBlur=function(){var fe=ue.props.onBlur;ue.setState({focused:!1}),ue.onActiveChange(null),fe&&fe.apply(void 0,arguments)},ue.getTreeNodeRequiredProps=function(){var fe=ue.state,be=fe.expandedKeys,se=fe.selectedKeys,ae=fe.loadedKeys,Ce=fe.loadingKeys,ze=fe.checkedKeys,Ye=fe.halfCheckedKeys,He=fe.dragOverNodeKey,Ve=fe.dropPosition,Fe=fe.keyEntities;return{expandedKeys:be||[],selectedKeys:se||[],loadedKeys:ae||[],loadingKeys:Ce||[],checkedKeys:ze||[],halfCheckedKeys:Ye||[],dragOverNodeKey:He,dropPosition:Ve,keyEntities:Fe}},ue.setExpandedKeys=function(fe){var be=ue.state.treeData,se=Object(a.d)(be,fe);ue.setUncontrolledState({expandedKeys:fe,flattenNodes:se},!0)},ue.onNodeExpand=function(fe,be){var se=ue.state.expandedKeys,ae=ue.state.listChanging,Ce=ue.props,ze=Ce.onExpand,Ye=Ce.loadData,He=be.key,Ve=be.expanded;if(ae)return;var Fe=se.indexOf(He),Ke=!Ve;if(Object(I.a)(Ve&&Fe!==-1||!Ve&&Fe===-1,"Expand state not sync with index check"),Ke?se=Object(c.a)(se,He):se=Object(c.b)(se,He),ue.setExpandedKeys(se),ze&&ze(se,{node:be,expanded:Ke,nativeEvent:fe.nativeEvent}),Ke&&Ye){var nt=ue.onNodeLoad(be);nt&&nt.then(function(){var de=Object(a.d)(ue.state.treeData,se);ue.setUncontrolledState({flattenNodes:de})})}},ue.onListChangeStart=function(){ue.setUncontrolledState({listChanging:!0})},ue.onListChangeEnd=function(){setTimeout(function(){ue.setUncontrolledState({listChanging:!1})})},ue.onActiveChange=function(fe){var be=ue.state.activeKey,se=ue.props.onActiveChange;if(be===fe)return;ue.setState({activeKey:fe}),fe!==null&&ue.scrollTo({key:fe}),se&&se(fe)},ue.getActiveItem=function(){var fe=ue.state,be=fe.activeKey,se=fe.flattenNodes;return be===null?null:se.find(function(ae){var Ce=ae.data.key;return Ce===be})||null},ue.offsetActiveKey=function(fe){var be=ue.state,se=be.flattenNodes,ae=be.activeKey,Ce=se.findIndex(function(He){var Ve=He.data.key;return Ve===ae});Ce===-1&&fe<0&&(Ce=se.length),Ce=(Ce+fe+se.length)%se.length;var ze=se[Ce];if(ze){var Ye=ze.data.key;ue.onActiveChange(Ye)}else ue.onActiveChange(null)},ue.onKeyDown=function(fe){var be=ue.state,se=be.activeKey,ae=be.expandedKeys,Ce=be.checkedKeys,ze=ue.props,Ye=ze.onKeyDown,He=ze.checkable,Ve=ze.selectable;switch(fe.which){case n.a.UP:{ue.offsetActiveKey(-1),fe.preventDefault();break}case n.a.DOWN:{ue.offsetActiveKey(1),fe.preventDefault();break}}var Fe=ue.getActiveItem();if(Fe&&Fe.data){var Ke=ue.getTreeNodeRequiredProps(),nt=Fe.data.isLeaf===!1||!!(Fe.data.children||[]).length,de=Object(a.b)(Object(Y.a)(Object(Y.a)({},Object(a.f)(se,Ke)),{},{data:Fe.data,active:!0}));switch(fe.which){case n.a.LEFT:{nt&&ae.includes(se)?ue.onNodeExpand({},de):Fe.parent&&ue.onActiveChange(Fe.parent.data.key),fe.preventDefault();break}case n.a.RIGHT:{nt&&!ae.includes(se)?ue.onNodeExpand({},de):Fe.children&&Fe.children.length&&ue.onActiveChange(Fe.children[0].data.key),fe.preventDefault();break}case n.a.ENTER:case n.a.SPACE:{He&&!de.disabled&&de.checkable!==!1&&!de.disableCheckbox?ue.onNodeCheck({},de,!Ce.includes(se)):!He&&Ve&&!de.disabled&&de.selectable!==!1&&ue.onNodeSelect({},de);break}}}Ye&&Ye(fe)},ue.setUncontrolledState=function(fe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ue.destroyed)return;var ae=!1,Ce=!0,ze={};Object.keys(fe).forEach(function(Ye){if(Ye in ue.props){Ce=!1;return}ae=!0,ze[Ye]=fe[Ye]}),ae&&(!be||Ce)&&ue.setState(Object(Y.a)(Object(Y.a)({},ze),se))},ue.scrollTo=function(fe){ue.listRef.current.scrollTo(fe)},ue}return Object(P.a)(pe,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var fe,be=this.state,se=be.focused,ae=be.flattenNodes,Ce=be.keyEntities,ze=be.dragging,Ye=be.activeKey,He=this.props,Ve=He.prefixCls,Fe=He.className,Ke=He.style,nt=He.showLine,de=He.focusable,De=He.tabIndex,Ne=De===void 0?0:De,Ue=He.selectable,rt=He.showIcon,lt=He.icon,ft=He.switcherIcon,at=He.draggable,_t=He.checkable,gt=He.checkStrictly,xt=He.disabled,Ze=He.motion,kt=He.loadData,Ot=He.filterTreeNode,qe=He.height,st=He.itemHeight,xe=He.virtual,we=He.titleRender,me=He.onContextMenu,ce=Object(c.f)(this.props);return K.createElement(b.a.Provider,{value:{prefixCls:Ve,selectable:Ue,showIcon:rt,icon:lt,switcherIcon:ft,draggable:at,checkable:_t,checkStrictly:gt,disabled:xt,keyEntities:Ce,loadData:kt,filterTreeNode:Ot,titleRender:we,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},K.createElement("div",{className:f()(Ve,Fe,(fe={},Object(te.a)(fe,"".concat(Ve,"-show-line"),nt),Object(te.a)(fe,"".concat(Ve,"-focused"),se),Object(te.a)(fe,"".concat(Ve,"-active-focused"),Ye!==null),fe))},K.createElement(m,Object.assign({ref:this.listRef,prefixCls:Ve,style:Ke,data:ae,disabled:xt,selectable:Ue,checkable:!!_t,motion:Ze,dragging:ze,height:qe,itemHeight:st,virtual:xe,focusable:de,focused:se,tabIndex:Ne,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:me},this.getTreeNodeRequiredProps(),ce))))}}],[{key:"getDerivedStateFromProps",value:function(fe,be){var se=be.prevProps,ae={prevProps:fe};function Ce(lt){return!se&< in fe||se&&se[lt]!==fe[lt]}var ze;if(Ce("treeData")?ze=fe.treeData:Ce("children")&&(Object(I.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ze=Object(a.c)(fe.children)),ze){ae.treeData=ze;var Ye=Object(a.a)(ze);ae.keyEntities=Object(Y.a)(Object(te.a)({},h,C),Ye.keyEntities)}var He=ae.keyEntities||be.keyEntities;if(Ce("expandedKeys")||se&&Ce("autoExpandParent"))ae.expandedKeys=fe.autoExpandParent||!se&&fe.defaultExpandParent?Object(c.e)(fe.expandedKeys,He):fe.expandedKeys;else if(!se&&fe.defaultExpandAll){var Ve=Object(Y.a)({},He);delete Ve[h],ae.expandedKeys=Object.keys(Ve).map(function(lt){return Ve[lt].key})}else!se&&fe.defaultExpandedKeys&&(ae.expandedKeys=fe.autoExpandParent||fe.defaultExpandParent?Object(c.e)(fe.defaultExpandedKeys,He):fe.defaultExpandedKeys);if(ae.expandedKeys||delete ae.expandedKeys,ze||ae.expandedKeys){var Fe=Object(a.d)(ze||be.treeData,ae.expandedKeys||be.expandedKeys);ae.flattenNodes=Fe}if(fe.selectable&&(Ce("selectedKeys")?ae.selectedKeys=Object(c.d)(fe.selectedKeys,fe):!se&&fe.defaultSelectedKeys&&(ae.selectedKeys=Object(c.d)(fe.defaultSelectedKeys,fe))),fe.checkable){var Ke;if(Ce("checkedKeys")?Ke=Object(c.j)(fe.checkedKeys)||{}:!se&&fe.defaultCheckedKeys?Ke=Object(c.j)(fe.defaultCheckedKeys)||{}:ze&&(Ke=Object(c.j)(fe.checkedKeys)||{checkedKeys:be.checkedKeys,halfCheckedKeys:be.halfCheckedKeys}),Ke){var nt=Ke,de=nt.checkedKeys,De=de===void 0?[]:de,Ne=nt.halfCheckedKeys,Ue=Ne===void 0?[]:Ne;if(!fe.checkStrictly){var rt=Object(v.a)(De,!0,He);De=rt.checkedKeys,Ue=rt.halfCheckedKeys}ae.checkedKeys=De,ae.halfCheckedKeys=Ue}}return Ce("loadedKeys")&&(ae.loadedKeys=fe.loadedKeys),ae}}]),pe}(K.Component);H.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},H.TreeNode=i.a;var X=H,q=ge.b=X},fcSX:function(ct,ge,U){"use strict";var te=U("Ff2n"),Y=U("1OyB"),N=U("vuIU"),z=U("Ji7U"),P=U("md7G"),F=U("foSv"),G=U("1W/9"),K=U("q1tI"),n=U("rePB"),I=U("JX7q"),E=U("TSYQ"),f=U.n(E),b=U("qx4F"),c=U("4IlW");function a(T){return Array.isArray(T)?T:[T]}var p={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},l=Object.keys(p).filter(function(T){if(typeof document=="undefined")return!1;var M=document.getElementsByTagName("html")[0];return T in(M?M.style:{})})[0],u=p[l];function s(T,M,m,v){T.addEventListener?T.addEventListener(M,m,v):T.attachEvent&&T.attachEvent("on".concat(M),m)}function i(T,M,m,v){T.removeEventListener?T.removeEventListener(M,m,v):T.attachEvent&&T.detachEvent("on".concat(M),m)}function D(T,M){var m=typeof T=="function"?T(M):T;return Array.isArray(m)?m.length===2?m:[m[0],m[1]]:[m]}var A=function(M){return!isNaN(parseFloat(M))&&isFinite(M)},S=!(typeof window!="undefined"&&window.document&&window.document.createElement),R=function T(M,m,v,H){if(!m||m===document||m instanceof Document)return!1;if(m===M.parentNode)return!0;var X=Math.max(Math.abs(v),Math.abs(H))===Math.abs(H),q=Math.max(Math.abs(v),Math.abs(H))===Math.abs(v),re=m.scrollHeight-m.clientHeight,ye=m.scrollWidth-m.clientWidth,pe=document.defaultView.getComputedStyle(m),ue=pe.overflowY==="auto"||pe.overflowY==="scroll",fe=pe.overflowX==="auto"||pe.overflowX==="scroll",be=re&&ue,se=ye&&fe;return X&&(!be||be&&(m.scrollTop>=re&&H<0||m.scrollTop<=0&&H>0))||q&&(!se||se&&(m.scrollLeft>=ye&&v<0||m.scrollLeft<=0&&v>0))?T(M,m.parentNode,v,H):!1};function O(T){var M=g();return function(){var v=Object(F.a)(T),H;if(M){var X=Object(F.a)(this).constructor;H=Reflect.construct(v,arguments,X)}else H=v.apply(this,arguments);return Object(P.a)(this,H)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(T){return!1}}var _={},h=function(T){Object(z.a)(m,T);var M=O(m);function m(v){var H;return Object(Y.a)(this,m),H=M.call(this,v),H.domFocus=function(){H.dom&&H.dom.focus()},H.removeStartHandler=function(X){if(X.touches.length>1)return;H.startPos={x:X.touches[0].clientX,y:X.touches[0].clientY}},H.removeMoveHandler=function(X){if(X.changedTouches.length>1)return;var q=X.currentTarget,re=X.changedTouches[0].clientX-H.startPos.x,ye=X.changedTouches[0].clientY-H.startPos.y;(q===H.maskDom||q===H.handlerDom||q===H.contentDom&&R(q,X.target,re,ye))&&X.cancelable&&X.preventDefault()},H.transitionEnd=function(X){var q=X.target;i(q,u,H.transitionEnd),q.style.transition=""},H.onKeyDown=function(X){if(X.keyCode===c.a.ESC){var q=H.props.onClose;X.stopPropagation(),q&&q(X)}},H.onWrapperTransitionEnd=function(X){var q=H.props,re=q.open,ye=q.afterVisibleChange;X.target===H.contentWrapper&&X.propertyName.match(/transform$/)&&(H.dom.style.transition="",!re&&H.getCurrentDrawerSome()&&(document.body.style.overflowX="",H.maskDom&&(H.maskDom.style.left="",H.maskDom.style.width="")),ye&&ye(!!re))},H.openLevelTransition=function(){var X=H.props,q=X.open,re=X.width,ye=X.height,pe=H.getHorizontalBoolAndPlacementName(),ue=pe.isHorizontal,fe=pe.placementName,be=H.contentDom?H.contentDom.getBoundingClientRect()[ue?"width":"height"]:0,se=(ue?re:ye)||be;H.setLevelAndScrolling(q,fe,se)},H.setLevelTransform=function(X,q,re,ye){var pe=H.props,ue=pe.placement,fe=pe.levelMove,be=pe.duration,se=pe.ease,ae=pe.showMask;H.levelDom.forEach(function(Ce){Ce.style.transition="transform ".concat(be," ").concat(se),s(Ce,u,H.transitionEnd);var ze=X?re:0;if(fe){var Ye=D(fe,{target:Ce,open:X});ze=X?Ye[0]:Ye[1]||0}var He=typeof ze=="number"?"".concat(ze,"px"):ze,Ve=ue==="left"||ue==="top"?He:"-".concat(He);Ve=ae&&ue==="right"&&ye?"calc(".concat(Ve," + ").concat(ye,"px)"):Ve,Ce.style.transform=ze?"".concat(q,"(").concat(Ve,")"):""})},H.setLevelAndScrolling=function(X,q,re){var ye=H.props.onChange;if(!S){var pe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(b.a)(!0):0;H.setLevelTransform(X,q,re,pe),H.toggleScrollingToDrawerAndBody(pe)}ye&&ye(X)},H.toggleScrollingToDrawerAndBody=function(X){var q=H.props,re=q.getOpenCount,ye=q.getContainer,pe=q.showMask,ue=q.open,fe=ye&&ye(),be=re&&re();if(fe&&fe.parentNode===document.body&&pe){var se=["touchstart"],ae=[document.body,H.maskDom,H.handlerDom,H.contentDom];ue&&document.body.style.overflow!=="hidden"?(X&&H.addScrollingEffect(X),be===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ae.forEach(function(Ce,ze){if(!Ce)return;s(Ce,se[ze]||"touchmove",ze?H.removeMoveHandler:H.removeStartHandler,H.passive)})):H.getCurrentDrawerSome()&&(be||(document.body.style.overflow=""),document.body.style.touchAction="",X&&H.remScrollingEffect(X),ae.forEach(function(Ce,ze){if(!Ce)return;i(Ce,se[ze]||"touchmove",ze?H.removeMoveHandler:H.removeStartHandler,H.passive)}))}},H.addScrollingEffect=function(X){var q=H.props,re=q.placement,ye=q.duration,pe=q.ease,ue=q.getOpenCount,fe=q.switchScrollingEffect,be=ue&&ue();be===1&&fe();var se="width ".concat(ye," ").concat(pe),ae="transform ".concat(ye," ").concat(pe);H.dom.style.transition="none";switch(re){case"right":H.dom.style.transform="translateX(-".concat(X,"px)");break;case"top":case"bottom":H.dom.style.width="calc(100% - ".concat(X,"px)"),H.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(ae,",").concat(se),H.dom.style.width="",H.dom.style.transform="")})},H.remScrollingEffect=function(X){var q=H.props,re=q.placement,ye=q.duration,pe=q.ease,ue=q.getOpenCount,fe=q.switchScrollingEffect,be=ue&&ue();be||fe(!0),l&&(document.body.style.overflowX="hidden"),H.dom.style.transition="none";var se,ae="width ".concat(ye," ").concat(pe),Ce="transform ".concat(ye," ").concat(pe);switch(re){case"left":{H.dom.style.width="100%",ae="width 0s ".concat(pe," ").concat(ye);break}case"right":{H.dom.style.transform="translateX(".concat(X,"px)"),H.dom.style.width="100%",ae="width 0s ".concat(pe," ").concat(ye),H.maskDom&&(H.maskDom.style.left="-".concat(X,"px"),H.maskDom.style.width="calc(100% + ".concat(X,"px)"));break}case"top":case"bottom":{H.dom.style.width="calc(100% + ".concat(X,"px)"),H.dom.style.height="100%",H.dom.style.transform="translateZ(0)",se="height 0s ".concat(pe," ").concat(ye);break}default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(Ce,",").concat(se?"".concat(se,","):"").concat(ae),H.dom.style.transform="",H.dom.style.width="",H.dom.style.height="")})},H.getCurrentDrawerSome=function(){return!Object.keys(_).some(function(X){return _[X]})},H.getLevelDom=function(X){var q=X.level,re=X.getContainer;if(S)return;var ye=re&&re(),pe=ye?ye.parentNode:null;if(H.levelDom=[],q==="all"){var ue=pe?Array.prototype.slice.call(pe.children):[];ue.forEach(function(fe){fe.nodeName!=="SCRIPT"&&fe.nodeName!=="STYLE"&&fe.nodeName!=="LINK"&&fe!==ye&&H.levelDom.push(fe)})}else q&&a(q).forEach(function(fe){document.querySelectorAll(fe).forEach(function(be){H.levelDom.push(be)})})},H.getHorizontalBoolAndPlacementName=function(){var X=H.props.placement,q=X==="left"||X==="right",re="translate".concat(q?"X":"Y");return{isHorizontal:q,placementName:re}},H.state={_self:Object(I.a)(H)},H}return Object(N.a)(m,[{key:"componentDidMount",value:function(){var H=this;if(!S){var X=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return X=!0,null}}))}catch(ue){}this.passive=X?{passive:!1}:!1}var q=this.props,re=q.open,ye=q.getContainer,pe=ye&&ye();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),re&&(pe&&pe.parentNode===document.body&&(_[this.drawerId]=re),this.openLevelTransition(),this.forceUpdate(function(){H.domFocus()}))}},{key:"componentDidUpdate",value:function(H){var X=this.props,q=X.open,re=X.getContainer,ye=re&&re();q!==H.open&&(q&&this.domFocus(),ye&&ye.parentNode===document.body&&(_[this.drawerId]=!!q),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var H=this.props,X=H.getOpenCount,q=H.open,re=H.switchScrollingEffect,ye=typeof X=="function"&&X();delete _[this.drawerId],q&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ye||(document.body.style.overflow="",re(!0))}},{key:"render",value:function(){var H,X=this,q=this.props,re=q.className,ye=q.children,pe=q.style,ue=q.width,fe=q.height,be=q.defaultOpen,se=q.open,ae=q.prefixCls,Ce=q.placement,ze=q.level,Ye=q.levelMove,He=q.ease,Ve=q.duration,Fe=q.getContainer,Ke=q.handler,nt=q.onChange,de=q.afterVisibleChange,De=q.showMask,Ne=q.maskClosable,Ue=q.maskStyle,rt=q.onClose,lt=q.onHandleClick,ft=q.keyboard,at=q.getOpenCount,_t=q.switchScrollingEffect,gt=Object(te.a)(q,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),xt=this.dom?se:!1,Ze=f()(ae,(H={},Object(n.a)(H,"".concat(ae,"-").concat(Ce),!0),Object(n.a)(H,"".concat(ae,"-open"),xt),Object(n.a)(H,re||"",!!re),Object(n.a)(H,"no-mask",!De),H)),kt=this.getHorizontalBoolAndPlacementName(),Ot=kt.placementName,qe=Ce==="left"||Ce==="top"?"-100%":"100%",st=xt?"":"".concat(Ot,"(").concat(qe,")"),xe=Ke&&K.cloneElement(Ke,{onClick:function(me){Ke.props.onClick&&Ke.props.onClick(),lt&<(me)},ref:function(me){X.handlerDom=me}});return K.createElement("div",Object.assign({},gt,{tabIndex:-1,className:Ze,style:pe,ref:function(me){X.dom=me},onKeyDown:xt&&ft?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),De&&K.createElement("div",{className:"".concat(ae,"-mask"),onClick:Ne?rt:void 0,style:Ue,ref:function(me){X.maskDom=me}}),K.createElement("div",{className:"".concat(ae,"-content-wrapper"),style:{transform:st,msTransform:st,width:A(ue)?"".concat(ue,"px"):ue,height:A(fe)?"".concat(fe,"px"):fe},ref:function(me){X.contentWrapper=me}},K.createElement("div",{className:"".concat(ae,"-content"),ref:function(me){X.contentDom=me},onTouchStart:xt&&De?this.removeStartHandler:void 0,onTouchMove:xt&&De?this.removeMoveHandler:void 0},ye),xe))}}],[{key:"getDerivedStateFromProps",value:function(H,X){var q=X.prevProps,re=X._self,ye={prevProps:H};if(q!==void 0){var pe=H.placement,ue=H.level;pe!==q.placement&&(re.contentDom=null),ue!==q.level&&re.getLevelDom(H)}return ye}}]),m}(K.Component);h.defaultProps={switchScrollingEffect:function(){}};var d=h;function C(T){var M=x();return function(){var v=Object(F.a)(T),H;if(M){var X=Object(F.a)(this).constructor;H=Reflect.construct(v,arguments,X)}else H=v.apply(this,arguments);return Object(P.a)(this,H)}}function x(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(T){return!1}}var w=function(T){Object(z.a)(m,T);var M=C(m);function m(v){var H;Object(Y.a)(this,m),H=M.call(this,v),H.onHandleClick=function(q){var re=H.props,ye=re.onHandleClick,pe=re.open;if(ye&&ye(q),typeof pe=="undefined"){var ue=H.state.open;H.setState({open:!ue})}},H.onClose=function(q){var re=H.props,ye=re.onClose,pe=re.open;ye&&ye(q),typeof pe=="undefined"&&H.setState({open:!1})};var X=typeof v.open!="undefined"?v.open:!!v.defaultOpen;return H.state={open:X},"onMaskClick"in v&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),H}return Object(N.a)(m,[{key:"render",value:function(){var H=this,X=this.props,q=X.defaultOpen,re=X.getContainer,ye=X.wrapperClassName,pe=X.forceRender,ue=X.handler,fe=Object(te.a)(X,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),be=this.state.open;if(!re)return K.createElement("div",{className:ye,ref:function(Ce){H.dom=Ce}},K.createElement(d,Object.assign({},fe,{open:be,handler:ue,getContainer:function(){return H.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var se=!!ue||pe;return K.createElement(G.a,{visible:be,forceRender:se,getContainer:re,wrapperClassName:ye},function(ae){var Ce=ae.visible,ze=ae.afterClose,Ye=Object(te.a)(ae,["visible","afterClose"]);return K.createElement(d,Object.assign({},fe,Ye,{open:Ce!==void 0?Ce:be,afterVisibleChange:ze!==void 0?ze:fe.afterVisibleChange,handler:ue,onClose:H.onClose,onHandleClick:H.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(H,X){var q=X.prevProps,re={prevProps:H};return typeof q!="undefined"&&H.open!==q.open&&(re.open=H.open),re}}]),m}(K.Component);w.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:K.createElement("div",{className:"drawer-handle"},K.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var j=w,W=ge.a=j},fjLI:function(ct,ge,U){"use strict";U.d(ge,"f",function(){return b}),U.d(ge,"b",function(){return c}),U.d(ge,"a",function(){return a}),U.d(ge,"d",function(){return p}),U.d(ge,"e",function(){return l}),U.d(ge,"c",function(){return u});var te=U("8HAY"),Y=U("Vhoy"),N=U("MI8n"),z=U("JYp7"),P=U("pmY6"),F=U("24hK"),G=U("nnTU"),K=U("T8No"),n=U("Cg/j"),I=U("t9D7"),E=function(s,i,D,A){var S=arguments.length,R=S<3?i:A===null?A=Object.getOwnPropertyDescriptor(i,D):A,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(s,i,D,A);else for(var g=s.length-1;g>=0;g--)(O=s[g])&&(R=(S<3?O(R):S>3?O(i,D,R):O(i,D))||R);return S>3&&R&&Object.defineProperty(i,D,R),R},f=function(s,i){return function(D,A){i(D,A,s)}};function b(s){return s.command!==void 0}class c{constructor(s){this.id=c._idPool++,this._debugName=s}}c._idPool=0,c.CommandPalette=new c("CommandPalette"),c.EditorContext=new c("EditorContext"),c.SimpleEditorContext=new c("SimpleEditorContext"),c.EditorContextCopy=new c("EditorContextCopy"),c.EditorContextPeek=new c("EditorContextPeek"),c.MenubarEditMenu=new c("MenubarEditMenu"),c.MenubarCopy=new c("MenubarCopy"),c.MenubarGoMenu=new c("MenubarGoMenu"),c.MenubarSelectionMenu=new c("MenubarSelectionMenu"),c.InlineCompletionsActions=new c("InlineCompletionsActions");const a=Object(n.c)("menuService"),p=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new N.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===c.CommandPalette}}addCommand(s){return this.addCommands(z.a.single(s))}addCommands(s){for(const i of s)this._commands.set(i.id,i);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(P.i)(()=>{let i=!1;for(const D of s)i=this._commands.delete(D.id)||i;i&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((i,D)=>s.set(D,i)),s}appendMenuItem(s,i){return this.appendMenuItems(z.a.single({id:s,item:i}))}appendMenuItems(s){const i=new Set,D=new F.a;for(const{id:A,item:S}of s){let R=this._menuItems.get(A);R||(R=new F.a,this._menuItems.set(A,R)),D.push(R.push(S)),i.add(A)}return this._onDidChangeMenu.fire(i),Object(P.i)(()=>{if(D.size>0){for(let A of D)A();this._onDidChangeMenu.fire(i),D.clear()}})}getMenuItems(s){let i;return this._menuItems.has(s)?i=[...this._menuItems.get(s)]:i=[],s===c.CommandPalette&&this._appendImplicitItems(i),i}_appendImplicitItems(s){const i=new Set;for(const D of s)b(D)&&(i.add(D.command.id),D.alt&&i.add(D.alt.id));this._commands.forEach((D,A)=>{i.has(A)||s.push({command:D})})}};class l extends te.e{constructor(s,i,D,A){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=i,this._contextKeyService=D,this._options=A}get actions(){const s=[],i=this._menuService.createMenu(this.item.submenu,this._contextKeyService),D=i.getActions(this._options);i.dispose();for(const[,A]of D)A.length>0&&(s.push(...A),s.push(new te.d));return s.length&&s.pop(),s}}let u=class s{constructor(i,D,A,S,R){var O,g;if(this._commandService=R,this.id=i.id,this.label=(A==null?void 0:A.renderShortTitle)&&i.shortTitle?typeof i.shortTitle=="string"?i.shortTitle:i.shortTitle.value:typeof i.title=="string"?i.title:i.title.value,this.tooltip=(g=typeof i.tooltip=="string"?i.tooltip:(O=i.tooltip)===null||O===void 0?void 0:O.value)!==null&&g!==void 0?g:"",this.enabled=!i.precondition||S.contextMatchesRules(i.precondition),this.checked=void 0,i.toggled){const _=i.toggled.condition?i.toggled:{condition:i.toggled};this.checked=S.contextMatchesRules(_.condition),this.checked&&_.tooltip&&(this.tooltip=typeof _.tooltip=="string"?_.tooltip:_.tooltip.value),_.title&&(this.label=typeof _.title=="string"?_.title:_.title.value)}this.item=i,this.alt=D?new s(D,void 0,A,S,R):void 0,this._options=A,I.d.isThemeIcon(i.icon)&&(this.class=Y.a.asClassName(i.icon))}dispose(){}run(...i){var D,A;let S=[];return((D=this._options)===null||D===void 0?void 0:D.arg)&&(S=[...S,this._options.arg]),((A=this._options)===null||A===void 0?void 0:A.shouldForwardArgs)&&(S=[...S,...i]),this._commandService.executeCommand(this.id,...S)}};u=E([f(3,K.b),f(4,G.b)],u)},i8i3:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___3Vf6o",flex_space_between:"flex_space_between___3kR1x",flex_box_vertical_center:"flex_box_vertical_center___25a0b",flex_box_center_end:"flex_box_center_end___3k_KQ",flex_box_column:"flex_box_column___38BD-",customModal:"customModal___2JXW3",shareModal:"shareModal___1xuLw",content:"content___1yjOV",group:"group___2tJcj",teachGroup:"teachGroup___VMxNc",footer:"footer___1OQG5"}},iNYN:function(ct,ge,U){ct.exports={modalContent:"modalContent___3NP2x",modalContentLeft:"modalContentLeft___ycFEY",green:"green___2njFR",textArea:"textArea___28pXQ",red:"red___2bPlD",row:"row___tW7CE",html:"html___30ord",line:"line___1f3U7"}},ic2d:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return z});var te=U("FWmy"),Y=U("746U");class N{constructor(){this.data=new Map}add(P,F){te.a(Y.l(P)),te.a(Y.k(F)),te.a(!this.data.has(P),"There is already an extension with this id"),this.data.set(P,F)}as(P){return this.data.get(P)||null}}const z=new N},iris:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return b});var te=U("qVdP"),Y=U("jsC+"),N=U("lUTK"),z=U("BvKs"),P=U("tJVT"),F=U("q1tI"),G=U.n(F),K=U("Q0Vu"),n=U.n(K),I=[{name:"\u7F16\u7A0B\u9898",value:"PROGRAM"},{name:"\u5355\u9009\u9898",value:"SINGLE"},{name:"\u591A\u9009\u9898",value:"MULTIPLE"},{name:"\u5224\u65AD\u9898",value:"JUDGMENT"},{name:"\u586B\u7A7A\u9898",value:"COMPLETION"},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE"},{name:"\u7EC4\u5408\u9898",value:"COMBINATION"}],E=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],f=[{name:"\u968F\u673A\u7EC4\u5377",value:1},{name:"\u4EBA\u5DE5\u7EC4\u5377",value:2}],b=function(a){var p=a.showSelectAll,l=p===void 0?!1:p,u=a.disciplinesData,s=u===void 0?[]:u,i=a.knowledgeData,D=i===void 0?[]:i,A=a.directionValue,S=a.subDisciplineValue,R=a.typeValue,O=a.knowledgeValue,g=a.showKnowledge,_=g===void 0?!1:g,h=a.showRandomType,d=h===void 0?!1:h,C=a.difficultyValue,x=a.randomValue,w=a.selectAll,j=a.languagesvalue,W=a.className,T=a.languages,M=T===void 0?[]:T,m=a.isprogram_homework,v=a.showShixun,H=v===void 0?!1:v,X=a.showItemType,q=X===void 0?!0:X,re=a.onShixunChange,ye=re===void 0?function(){}:re,pe=a.onDirectionChange,ue=pe===void 0?function(){}:pe,fe=a.onTypeChange,be=fe===void 0?function(){}:fe,se=a.onDifficultyChange,ae=se===void 0?function(){}:se,Ce=a.handlelanguagesChange,ze=Ce===void 0?function(){}:Ce,Ye=a.onKnowledgeChange,He=Ye===void 0?function(){}:Ye,Ve=a.onRandomChange,Fe=Ve===void 0?function(){}:Ve,Ke=a.showTeachGroup,nt=Ke===void 0?!1:Ke,de=a.teachGroupData,De=de===void 0?[]:de,Ne=a.onTeachGroupChange,Ue=Ne===void 0?function(){}:Ne,rt=a.teachGroupValue,lt=Object(F.useState)(0),ft=Object(P.a)(lt,2),at=ft[0],_t=ft[1],gt=Object(F.useRef)(null),xt=Object(F.useState)(0),Ze=Object(P.a)(xt,2),kt=Ze[0],Ot=Ze[1],qe=Object(F.useRef)(null);Object(F.useEffect)(function(){if(s.length!==0){var xe;(gt==null||((xe=gt.current)===null||xe===void 0)?void 0:xe.clientHeight)>108?_t(1):_t(0)}s.length===0&&_t(0)},[s]),Object(F.useEffect)(function(){if(console.log(D.length===0,"\u6570\u91CF"),D.length!==0){var xe,we;console.log(qe==null||((xe=qe.current)===null||xe===void 0)?void 0:xe.clientHeight,"\u9AD8\u5EA6"),(qe==null||((we=qe.current)===null||we===void 0)?void 0:we.clientHeight)>108?Ot(1):Ot(0)}D.length===0&&Ot(0)},[D]);var st=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],me=arguments.length>1?arguments[1]:void 0;return G.a.createElement(z.a,{className:n.a.subMenu},we.map(function(ce){return G.a.createElement(z.a.Item,{key:ce.id},G.a.createElement("a",{className:"".concat(n.a.subItem," ").concat(S===ce.id?n.a.subActive:""),onClick:function(){return ue(me,ce.id)}},ce.name))}))};return G.a.createElement("aside",{className:W?"".concat(n.a.main," ").concat(W):n.a.main},G.a.createElement("div",{className:n.a.wrap},m&&G.a.createElement("div",{className:n.a.programName},"\u8BD5\u9898\u5E93-\u7F16\u7A0B\u9898"),nt&&G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u56E2\u961F"),G.a.createElement("div",{className:n.a.directionContentWrap},G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(rt?"":n.a.active," "),onClick:function(){return Ue(null)}},"\u5168\u90E8"),De==null?void 0:De.map(function(xe){return G.a.createElement("li",{key:xe.group_id,className:"".concat(n.a.directionItem," ").concat(rt===xe.group_id?n.a.active:""," "),onClick:function(){return Ue(xe.group_id)}},xe.name)}))),G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u65B9\u5411"),G.a.createElement("span",null),G.a.createElement("div",{className:n.a.directionContentWrap,style:{overflow:"hidden",height:at===1?88:"auto"}},G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(A?"":n.a.active," "),onClick:function(){return ue(null)}},"\u5168\u90E8"),s.map(function(xe){var we;return G.a.createElement(G.a.Fragment,{key:xe.id},((we=xe.sub_disciplines)===null||we===void 0?void 0:we.length)>0?G.a.createElement(Y.a,{placement:"bottomLeft",overlayStyle:{width:600},getPopupContainer:function(ce){return ce.parentNode},overlay:function(){return st(xe.sub_disciplines,xe.id)}},G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(A===xe.id?n.a.active:""," "),onClick:function(){return ue(xe.id)}},xe.name)):G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(A===xe.id?n.a.active:""," "),onClick:function(){return ue(xe.id)}},xe.name))})),G.a.createElement("div",{className:n.a.directionContentWrap,ref:gt,style:{height:"auto",position:"fixed",left:0,top:0,width:1024,visibility:"hidden"}},s.map(function(xe){var we;return G.a.createElement(G.a.Fragment,{key:xe.id},((we=xe.sub_disciplines)===null||we===void 0?void 0:we.length)>0?G.a.createElement(Y.a,{placement:"bottomLeft",overlayStyle:{width:600},getPopupContainer:function(ce){return ce.parentNode},overlay:function(){return st(xe.sub_disciplines,xe.id)}},G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(A===xe.id?n.a.active:""," "),onClick:function(){return ue(xe.id)}},xe.name)):G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(A===xe.id?n.a.active:""," "),onClick:function(){return ue(xe.id)}},xe.name))})),!!at&&G.a.createElement("div",{className:n.a.action},at===1&&G.a.createElement("span",{onClick:function(){return _t(2)}},"\u5C55\u5F00",G.a.createElement("i",{className:"iconfont icon-xiala"})),at===2&&G.a.createElement("span",{onClick:function(){return _t(1)}},"\u6536\u8D77",G.a.createElement("i",{style:{transform:"scale(0.5) rotate(180deg) translateY(2px)"},className:"iconfont icon-xiala"})))),_&&G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u77E5\u8BC6\u70B9"),G.a.createElement("div",{className:n.a.directionContentWrap,style:{overflow:"hidden",height:kt===1?106:"auto"}},G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(O===-1?n.a.active:""," "),onClick:function(){return He(-1)}},"\u5168\u90E8"),D.map(function(xe){return G.a.createElement("li",{key:xe.id,className:"".concat(n.a.directionItem," ").concat(O===xe.id?n.a.active:""," "),onClick:function(){return He(xe.id)}},xe.name)})),G.a.createElement("div",{ref:qe,className:n.a.directionContentWrap,style:{height:"auto",position:"fixed",left:0,top:0,width:1010,visibility:"hidden"}},D.map(function(xe){return G.a.createElement("li",{key:xe.id,className:"".concat(n.a.directionItem," ").concat(O===xe.id?n.a.active:""," "),onClick:function(){return He(xe.id)}},xe.name)})),!!kt&&G.a.createElement("div",{className:n.a.action},kt===1&&G.a.createElement("span",{onClick:function(){return Ot(2)}},"\u5C55\u5F00",G.a.createElement("i",{className:"iconfont icon-xiala"})),kt===2&&G.a.createElement("span",{onClick:function(){return Ot(1)}},"\u6536\u8D77",G.a.createElement("i",{style:{transform:"scale(0.5) rotate(180deg) translateY(2px)"},className:"iconfont icon-xiala"})))),q&&!m&&G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u9898\u578B"),G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(R?"":n.a.active," "),onClick:function(){return be(null)}},"\u5168\u90E8"),G.a.createElement("div",{className:n.a.directionContentWrap},I.map(function(xe){return G.a.createElement("li",{key:xe.name,className:"".concat(n.a.directionItem," ").concat(R===xe.value?n.a.active:""," "),onClick:function(){return be(xe.value)}},xe.name)}),H&&G.a.createElement("li",{key:"\u5B9E\u8BAD\u9898",className:n.a.directionItem,onClick:function(){return ye()}},"\u5B9E\u8BAD\u9898"))),G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u96BE\u5EA6"),G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(C?"":n.a.active," "),onClick:function(){return ae(null)}},"\u5168\u90E8"),G.a.createElement("div",{className:n.a.directionContentWrap},E.map(function(xe){return G.a.createElement("li",{key:xe.name,className:"".concat(n.a.directionItem," ").concat(C===xe.value?n.a.active:""," "),onClick:function(){return ae(xe.value)}},xe.name)}))),d&&G.a.createElement("div",{className:n.a.content},G.a.createElement("span",{className:n.a.name},"\u7C7B\u578B"),G.a.createElement("li",{className:"".concat(n.a.directionItem," ").concat(x?"":n.a.active," "),onClick:function(){return Fe(null)}},"\u5168\u90E8"),G.a.createElement("div",{className:n.a.directionContentWrap},f.map(function(xe){return G.a.createElement("li",{key:xe.name,className:"".concat(n.a.directionItem," ").concat(x===xe.value?n.a.active:""," "),onClick:function(){return Fe(xe.value)}},xe.name)})))))}},jcZT:function(ct,ge,U){"use strict";var te=U("2qtc"),Y=U("kLXV"),N=U("5NDa"),z=U("5rEg"),P=U("miYZ"),F=U("tsqr"),G=U("9og8"),K=U("tJVT"),n=U("WmNS"),I=U.n(n),E=U("q1tI"),f=U.n(E),b=U("d5o6"),c=U.n(b),a=U("P/tu"),p=U("WCUW"),l=U("9kvl"),u=function(i){var D=i.problemset,A=i.dispatch,S=i.onOk,R=Object(E.useState)(""),O=Object(K.a)(R,2),g=O[0],_=O[1],h=Object(E.useState)([0]),d=Object(K.a)(h,2),C=d[0],x=d[1],w=function(){A({type:"problemset/setActionTabs",payload:{}})};Object(E.useEffect)(function(){if(D.actionTabs.key==="\u65B0\u5EFA\u6587\u4EF6\u5939"){var W,T;x([(W=D.actionTabs)===null||W===void 0||((T=W.params)===null||T===void 0)?void 0:T.group_id]),_("")}},[D.actionTabs.key]);var j=function(){var W=Object(G.a)(I.a.mark(function T(){var M,m,v;return I.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(M=["\uFF1F","\u3001","/","\u2572","*","<",">","|"],g.trim()){X.next=4;break}return F.b.warn("\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"),X.abrupt("return");case 4:if(!(g.charAt(0)===" ")){X.next=7;break}return F.b.warn("\u9996\u5B57\u7B26\u4E0D\u80FD\u4E3A\u7A7A\u683C"),X.abrupt("return");case 7:m=0;case 8:if(!(m0?C[0]:0,name:g});case 17:v=X.sent,v.status===0&&(w(),S(v==null?void 0:v.id));case 19:case"end":return X.stop()}},T)}));return function(){return W.apply(this,arguments)}}();return f.a.createElement(Y.a,{centered:!0,title:"\u65B0\u5EFA\u6587\u4EF6\u5939",visible:D.actionTabs.key==="\u65B0\u5EFA\u6587\u4EF6\u5939",width:500,onCancel:w,onOk:j,destroyOnClose:!0},f.a.createElement("div",{className:c.a.addModal},f.a.createElement("div",{className:c.a.row},f.a.createElement("span",{className:c.a.label},"\u6587\u4EF6\u5939\u540D\u79F0: "),f.a.createElement(z.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0",value:g,onChange:function(T){return _(T.target.value)}})),f.a.createElement("div",{className:c.a.row,style:{alignItems:"start",maxHeight:500,overflow:"auto"}},f.a.createElement("span",{className:c.a.label},"\u6587\u4EF6\u5939\u4F4D\u7F6E: "),f.a.createElement(a.a,{value:C,onChange:function(T){return x(T)}}))))};ge.a=Object(l.a)(function(s){var i=s.problemset;return{problemset:i}})(u)},k3GJ:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return fo});var te=U("rePB"),Y=U("ODXe"),N=U("Ff2n"),z=U("VTBJ"),P=U("q1tI"),F=U("TSYQ"),G=U.n(F),K=U("Zm9Q"),n=U("6cGi"),I=U("KQm4"),E=U("xEkU"),f=U.n(E),b=U("t23M");function c(Ee){var Le=Object(P.useRef)(),We=Object(P.useRef)(!1);function Se(){for(var ie=arguments.length,ve=new Array(ie),le=0;leGe&&(Tt=Ge-yt),Object(P.useMemo)(function(){if(!ve.length)return[0,0];for(var Nt=ve.length,Rn=Nt,$n=0;$nje+Tt){Rn=$n-1;break}}for(var zn=0,Xn=Nt-1;Xn>=0;Xn-=1){var Vn=Ee.get(ve[Xn].key)||D;if(Vn[Be]1&&arguments[1]!==void 0?arguments[1]:!1,Se=Le&&typeof Le.getBoundingClientRect=="function"&&Le.getBoundingClientRect().width;if(Se){if(We){var ie=getComputedStyle(Le),ve=ie.marginLeft,le=ie.marginRight;Se+=+ve.replace("px","")+ +le.replace("px","")}Se=+Se.toFixed(6)}return Se||0},Ne=function(Le,We,Se){Le&&Object(W.a)(Le.style)==="object"&&(Le.style[We]=Se)},Ue=function(){return Ye.any},rt=U("bdgK"),lt=U("i8i4"),ft=U.n(lt),at=U("wgJM"),_t=U("l4aY"),gt=U("m+aA"),xt=U("c+Xe"),Ze=U("zT1h"),kt=U("QC+M");function Ot(Ee,Le,We){return We?Ee[0]===Le[0]:Ee[0]===Le[0]&&Ee[1]===Le[1]}function qe(Ee,Le,We){var Se=Ee[Le]||{};return Object(z.a)(Object(z.a)({},Se),We)}function st(Ee,Le,We,Se){for(var ie=We.points,ve=Object.keys(Ee),le=0;le1&&arguments[1]!==void 0?arguments[1]:2;Le();var ve=Object(at.a)(function(){ie<=1?Se({isCanceled:function(){return ve!==Ee.current}}):We(Se,ie-1)});Ee.current=ve}return P.useEffect(function(){return function(){Le()}},[]),[We,Le]},sr=[Pn,Dr,Or,ln],Nr=!1,hn=!0;function Qt(Ee){return Ee===Or||Ee===ln}var $r=function(Ee,Le){var We=P.useState(br),Se=Object(Y.a)(We,2),ie=Se[0],ve=Se[1],le=Qn(),Ae=Object(Y.a)(le,2),_e=Ae[0],Be=Ae[1];function je(){ve(Pn)}return sn(function(){if(ie!==br&&ie!==ln){var Ge=sr.indexOf(ie),tt=sr[Ge+1],yt=Le(ie);yt===Nr?ve(tt):_e(function(Tt){function Nt(){if(Tt.isCanceled())return;ve(tt)}yt===!0?Nt():Promise.resolve(yt).then(Nt)})}},[Ee,ie]),P.useEffect(function(){return function(){Be()}},[]),[je,ie]},fr=function(Ee){var Le=Object(P.useRef)(),We=Object(P.useRef)(Ee);We.current=Ee;var Se=P.useCallback(function(le){We.current(le)},[]);function ie(le){le&&(le.removeEventListener(mn,Se),le.removeEventListener(en,Se))}function ve(le){Le.current&&Le.current!==le&&ie(Le.current),le&&le!==Le.current&&(le.addEventListener(mn,Se),le.addEventListener(en,Se),Le.current=le)}return P.useEffect(function(){return function(){ie(Le.current)}},[]),[ve,ie]};function Lr(Ee,Le,We,Se){var ie=Se.motionEnter,ve=ie===void 0?!0:ie,le=Se.motionAppear,Ae=le===void 0?!0:le,_e=Se.motionLeave,Be=_e===void 0?!0:_e,je=Se.motionDeadline,Ge=Se.motionLeaveImmediately,tt=Se.onAppearPrepare,yt=Se.onEnterPrepare,Tt=Se.onLeavePrepare,Nt=Se.onAppearStart,Rn=Se.onEnterStart,$n=Se.onLeaveStart,Bn=Se.onAppearActive,zn=Se.onEnterActive,Xn=Se.onLeaveActive,Vn=Se.onAppearEnd,Fn=Se.onEnterEnd,Jn=Se.onLeaveEnd,er=Se.onVisibleChanged,jr=Yr(),tr=Object(Y.a)(jr,2),_n=tr[0],vn=tr[1],Wn=Yr($t),cr=Object(Y.a)(Wn,2),an=cr[0],dr=cr[1],Br=Yr(null),ir=Object(Y.a)(Br,2),Ar=ir[0],xr=ir[1],zr=Object(P.useRef)(!1),Qr=Object(P.useRef)(null),Wr=Object(P.useRef)(!1),yi=Object(P.useRef)(null);function Ii(){var Rr=We();return Rr||yi.current}var Ci=Object(P.useRef)(!1);function Zr(Rr){var yr=Ii();if(Rr&&!Rr.deadline&&Rr.target!==yr)return;var Hr;an===rr&&Ci.current?Hr=Vn==null?void 0:Vn(yr,Rr):an===Dn&&Ci.current?Hr=Fn==null?void 0:Fn(yr,Rr):an===Sr&&Ci.current&&(Hr=Jn==null?void 0:Jn(yr,Rr)),Hr!==!1&&!Wr.current&&(dr($t),xr(null))}var Pr=fr(Zr),Tr=Object(Y.a)(Pr,1),wn=Tr[0],wr=P.useMemo(function(){var Rr,yr,Hr;switch(an){case"appear":return Rr={},Object(te.a)(Rr,Pn,tt),Object(te.a)(Rr,Dr,Nt),Object(te.a)(Rr,Or,Bn),Rr;case"enter":return yr={},Object(te.a)(yr,Pn,yt),Object(te.a)(yr,Dr,Rn),Object(te.a)(yr,Or,zn),yr;case"leave":return Hr={},Object(te.a)(Hr,Pn,Tt),Object(te.a)(Hr,Dr,$n),Object(te.a)(Hr,Or,Xn),Hr;default:return{}}},[an]),Ui=$r(an,function(Rr){if(Rr===Pn){var yr=wr[Pn];return yr?yr(Ii()):Nr}if(Cr in wr){var Hr;xr(((Hr=wr[Cr])===null||Hr===void 0?void 0:Hr.call(wr,Ii(),null))||null)}return Cr===Or&&(wn(Ii()),je>0&&(clearTimeout(Qr.current),Qr.current=setTimeout(function(){Zr({deadline:!0})},je))),hn}),Zi=Object(Y.a)(Ui,2),ia=Zi[0],Cr=Zi[1],Xi=Qt(Cr);Ci.current=Xi,sn(function(){vn(Le);var Rr=zr.current;if(zr.current=!0,!Ee)return;var yr;!Rr&&Le&&Ae&&(yr=rr),Rr&&Le&&ve&&(yr=Dn),(Rr&&!Le&&Be||!Rr&&Ge&&!Le&&Be)&&(yr=Sr),yr&&(dr(yr),ia())},[Le]),Object(P.useEffect)(function(){(an===rr&&!Ae||an===Dn&&!ve||an===Sr&&!Be)&&dr($t)},[Ae,ve,Be]),Object(P.useEffect)(function(){return function(){clearTimeout(Qr.current),Wr.current=!0}},[]),Object(P.useEffect)(function(){_n!==void 0&&an===$t&&(er==null||er(_n))},[_n,an]);var Ji=Ar;return wr[Pn]&&Cr===Dr&&(Ji=Object(z.a)({transition:"none"},Ji)),[an,Cr,Ji,_n!=null?_n:Le]}var kn=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(){return Object(R.a)(this,We),Le.apply(this,arguments)}return Object(O.a)(We,[{key:"render",value:function(){return this.props.children}}]),We}(P.Component),Ur=kn;function vi(Ee){var Le=Ee;Object(W.a)(Ee)==="object"&&(Le=Ee.transitionSupport);function We(ie){return!!(ie.motionName&&Le)}var Se=P.forwardRef(function(ie,ve){var le=ie.visible,Ae=le===void 0?!0:le,_e=ie.removeOnLeave,Be=_e===void 0?!0:_e,je=ie.forceRender,Ge=ie.children,tt=ie.motionName,yt=ie.leavedClassName,Tt=ie.eventProps,Nt=We(ie),Rn=Object(P.useRef)(),$n=Object(P.useRef)();function Bn(){try{return Object(gt.a)(Rn.current||$n.current)}catch(dr){return null}}var zn=Lr(Nt,Ae,Bn,ie),Xn=Object(Y.a)(zn,4),Vn=Xn[0],Fn=Xn[1],Jn=Xn[2],er=Xn[3],jr=P.useRef(er);er&&(jr.current=!0);var tr=Object(P.useRef)(ve);tr.current=ve;var _n=P.useCallback(function(dr){Rn.current=dr,Object(xt.b)(tr.current,dr)},[]),vn,Wn=Object(z.a)(Object(z.a)({},Tt),{},{visible:Ae});if(!Ge)vn=null;else if(Vn===$t||!We(ie))er?vn=Ge(Object(z.a)({},Wn),_n):!Be&&jr.current?vn=Ge(Object(z.a)(Object(z.a)({},Wn),{},{className:yt}),_n):je?vn=Ge(Object(z.a)(Object(z.a)({},Wn),{},{style:{display:"none"}}),_n):vn=null;else{var cr,an;Fn===Pn?an="prepare":Qt(Fn)?an="active":Fn===Dr&&(an="start"),vn=Ge(Object(z.a)(Object(z.a)({},Wn),{},{className:G()(En(tt,Vn),(cr={},Object(te.a)(cr,En(tt,"".concat(Vn,"-").concat(an)),an),Object(te.a)(cr,tt,typeof tt=="string"),cr)),style:Jn}),_n)}return P.createElement(Ur,{ref:$n},vn)});return Se.displayName="CSSMotion",Se}var Ai=vi(nn),Et="add",fn="keep",Gi="remove",zi="removed";function na(Ee){var Le;return Ee&&Object(W.a)(Ee)==="object"&&"key"in Ee?Le=Ee:Le={key:Ee},Object(z.a)(Object(z.a)({},Le),{},{key:String(Le.key)})}function Vi(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ee.map(na)}function Z(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],We=[],Se=0,ie=Le.length,ve=Vi(Ee),le=Vi(Le);ve.forEach(function(Be){for(var je=!1,Ge=Se;Ge1});return _e.forEach(function(Be){We=We.filter(function(je){var Ge=je.key,tt=je.status;return Ge!==Be||tt!==Gi}),We.forEach(function(je){je.key===Be&&(je.status=fn)})}),We}var L=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function k(Ee){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ai,We=function(Se){Object(_.a)(ve,Se);var ie=Object(h.a)(ve);function ve(){var le;return Object(R.a)(this,ve),le=ie.apply(this,arguments),le.state={keyEntities:[]},le.removeKey=function(Ae){le.setState(function(_e){var Be=_e.keyEntities;return{keyEntities:Be.map(function(je){return je.key!==Ae?je:Object(z.a)(Object(z.a)({},je),{},{status:zi})})}})},le}return Object(O.a)(ve,[{key:"render",value:function(){var Ae=this,_e=this.state.keyEntities,Be=this.props,je=Be.component,Ge=Be.children,tt=Be.onVisibleChanged,yt=Object(N.a)(Be,["component","children","onVisibleChanged"]),Tt=je||P.Fragment,Nt={};return L.forEach(function(Rn){Nt[Rn]=yt[Rn],delete yt[Rn]}),delete yt.keys,P.createElement(Tt,yt,_e.map(function(Rn){var $n=Rn.status,Bn=Object(N.a)(Rn,["status"]),zn=$n===Et||$n===fn;return P.createElement(Le,Object(S.a)({},Nt,{key:Bn.key,visible:zn,eventProps:Bn,onVisibleChanged:function(Vn){tt==null||tt(Vn,{key:Bn.key}),Vn||Ae.removeKey(Bn.key)}}),Ge)}))}}],[{key:"getDerivedStateFromProps",value:function(Ae,_e){var Be=Ae.keys,je=_e.keyEntities,Ge=Vi(Be),tt=Z(je,Ge);return{keyEntities:tt.filter(function(yt){var Tt=je.find(function(Nt){var Rn=Nt.key;return yt.key===Rn});return!(Tt&&Tt.status===zi&&yt.status===Gi)})}}}]),ve}(P.Component);return We.defaultProps={component:"div"},We}var V=k(nn),ne=Ai;function Q(Ee){var Le=Ee.prefixCls,We=Ee.motion,Se=Ee.animation,ie=Ee.transitionName;return We||(Se?{motionName:"".concat(Le,"-").concat(Se)}:ie?{motionName:ie}:null)}function Pe(Ee){var Le=Ee.prefixCls,We=Ee.visible,Se=Ee.zIndex,ie=Ee.mask,ve=Ee.maskMotion,le=Ee.maskAnimation,Ae=Ee.maskTransitionName;if(!ie)return null;var _e={};return(ve||Ae||le)&&(_e=Object(z.a)({motionAppear:!0},Q({motion:ve,prefixCls:Le,transitionName:Ae,animation:le}))),P.createElement(ne,Object(S.a)({},_e,{visible:We,removeOnLeave:!0}),function(Be){var je=Be.className;return P.createElement("div",{style:{zIndex:Se},className:G()("".concat(Le,"-mask"),je)})})}var pt=U("9mu1"),Lt=U("o0o1"),rn=U.n(Lt),vt=U("HaE+"),Gt=["measure","align",null,"motion"],pr=function(Ee,Le){var We=Object(P.useState)(null),Se=Object(Y.a)(We,2),ie=Se[0],ve=Se[1],le=Object(P.useRef)(),Ae=Object(P.useRef)(!1);function _e(Ge){Ae.current||ve(Ge)}function Be(){at.a.cancel(le.current)}function je(Ge){Be(),le.current=Object(at.a)(function(){_e(function(tt){switch(ie){case"align":return"motion";case"motion":return"stable";default:}return tt}),Ge==null||Ge()})}return Object(P.useEffect)(function(){_e("measure")},[Ee]),Object(P.useEffect)(function(){switch(ie){case"measure":Le();break;default:}ie&&(le.current=Object(at.a)(Object(vt.a)(rn.a.mark(function Ge(){var tt,yt;return rn.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:tt=Gt.indexOf(ie),yt=Gt[tt+1],yt&&tt!==-1&&_e(yt);case 3:case"end":return Nt.stop()}},Ge)}))))},[ie]),Object(P.useEffect)(function(){return function(){Ae.current=!0,Be()}},[]),[ie,je]},Ir=function(Ee){var Le=P.useState({width:0,height:0}),We=Object(Y.a)(Le,2),Se=We[0],ie=We[1];function ve(Ae){ie({width:Ae.offsetWidth,height:Ae.offsetHeight})}var le=P.useMemo(function(){var Ae={};if(Ee){var _e=Se.width,Be=Se.height;Ee.indexOf("height")!==-1&&Be?Ae.height=Be:Ee.indexOf("minHeight")!==-1&&Be&&(Ae.minHeight=Be),Ee.indexOf("width")!==-1&&_e?Ae.width=_e:Ee.indexOf("minWidth")!==-1&&_e&&(Ae.minWidth=_e)}return Ae},[Ee,Se]);return[le,ve]},Zt=P.forwardRef(function(Ee,Le){var We=Ee.visible,Se=Ee.prefixCls,ie=Ee.className,ve=Ee.style,le=Ee.children,Ae=Ee.zIndex,_e=Ee.stretch,Be=Ee.destroyPopupOnHide,je=Ee.forceRender,Ge=Ee.align,tt=Ee.point,yt=Ee.getRootDomNode,Tt=Ee.getClassNameFromAlign,Nt=Ee.onAlign,Rn=Ee.onMouseEnter,$n=Ee.onMouseLeave,Bn=Ee.onMouseDown,zn=Ee.onTouchStart,Xn=Object(P.useRef)(),Vn=Object(P.useRef)(),Fn=Object(P.useState)(),Jn=Object(Y.a)(Fn,2),er=Jn[0],jr=Jn[1],tr=Ir(_e),_n=Object(Y.a)(tr,2),vn=_n[0],Wn=_n[1];function cr(){_e&&Wn(yt())}var an=pr(We,cr),dr=Object(Y.a)(an,2),Br=dr[0],ir=dr[1],Ar=Object(P.useRef)();function xr(){return tt||yt}function zr(){var Pr;(Pr=Xn.current)===null||Pr===void 0||Pr.forceAlign()}function Qr(Pr,Tr){var wn=Tt(Tr);er!==wn&&jr(wn),Br==="align"&&(er!==wn?Promise.resolve().then(function(){zr()}):ir(function(){var wr;(wr=Ar.current)===null||wr===void 0||wr.call(Ar)}),Nt==null||Nt(Pr,Tr))}var Wr=Object(z.a)({},Q(Ee));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Pr){var Tr=Wr[Pr];Wr[Pr]=function(wn,wr){return ir(),Tr==null?void 0:Tr(wn,wr)}});function yi(){return new Promise(function(Pr){Ar.current=Pr})}P.useEffect(function(){!Wr.motionName&&Br==="motion"&&ir()},[Wr.motionName,Br]),P.useImperativeHandle(Le,function(){return{forceAlign:zr,getElement:function(){return Vn.current}}});var Ii=Object(z.a)(Object(z.a)({},vn),{},{zIndex:Ae,opacity:Br==="motion"||Br==="stable"||!We?void 0:0,pointerEvents:Br==="stable"?void 0:"none"},ve),Ci=!0;(Ge==null?void 0:Ge.points)&&(Br==="align"||Br==="stable")&&(Ci=!1);var Zr=le;return P.Children.count(le)>1&&(Zr=P.createElement("div",{className:"".concat(Se,"-content")},le)),P.createElement(ne,Object(S.a)({visible:We,ref:Vn,leavedClassName:"".concat(Se,"-hidden")},Wr,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:Be,forceRender:je}),function(Pr,Tr){var wn=Pr.className,wr=Pr.style,Ui=G()(Se,ie,er,wn);return P.createElement(pt.a,{target:xr(),key:"popup",ref:Xn,monitorWindowResize:!0,disabled:Ci,align:Ge,onAlign:Qr},P.createElement("div",{ref:Tr,className:Ui,onMouseEnter:Rn,onMouseLeave:$n,onMouseDownCapture:Bn,onTouchStartCapture:zn,style:Object(z.a)(Object(z.a)({},wr),Ii)},Zr))})});Zt.displayName="PopupInner";var mt=Zt,Pt=P.forwardRef(function(Ee,Le){var We=Ee.prefixCls,Se=Ee.visible,ie=Ee.zIndex,ve=Ee.children,le=Ee.mobile;le=le===void 0?{}:le;var Ae=le.popupClassName,_e=le.popupStyle,Be=le.popupMotion,je=Be===void 0?{}:Be,Ge=le.popupRender,tt=P.useRef();P.useImperativeHandle(Le,function(){return{forceAlign:function(){},getElement:function(){return tt.current}}});var yt=Object(z.a)({zIndex:ie},_e),Tt=ve;return P.Children.count(ve)>1&&(Tt=P.createElement("div",{className:"".concat(We,"-content")},ve)),Ge&&(Tt=Ge(Tt)),P.createElement(ne,Object(S.a)({visible:Se,ref:tt,removeOnLeave:!0},je),function(Nt,Rn){var $n=Nt.className,Bn=Nt.style,zn=G()(We,Ae,$n);return P.createElement("div",{ref:Rn,className:zn,style:Object(z.a)(Object(z.a)({},Bn),yt)},Tt)})});Pt.displayName="MobilePopupInner";var Rt=Pt,Ht=["visible","mobile"],un=P.forwardRef(function(Ee,Le){var We=Ee.visible,Se=Ee.mobile,ie=Object(N.a)(Ee,Ht),ve=Object(P.useState)(We),le=Object(Y.a)(ve,2),Ae=le[0],_e=le[1],Be=Object(P.useState)(!1),je=Object(Y.a)(Be,2),Ge=je[0],tt=je[1],yt=Object(z.a)(Object(z.a)({},ie),{},{visible:Ae});Object(P.useEffect)(function(){_e(We),We&&Se&&tt(xe())},[We,Se]);var Tt=Ge?P.createElement(Rt,Object(S.a)({},yt,{mobile:Se,ref:Le})):P.createElement(mt,Object(S.a)({},yt,{ref:Le}));return P.createElement("div",null,P.createElement(Pe,yt),Tt)});un.displayName="Popup";var xn=un,Cn=P.createContext(null),gn=Cn;function Ln(){}function Kn(){return""}function dn(Ee){return Ee?Ee.ownerDocument:window.document}var Sn=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function hr(Ee){var Le=function(We){Object(_.a)(ie,We);var Se=Object(h.a)(ie);function ie(ve){var le;Object(R.a)(this,ie),le=Se.call(this,ve),le.popupRef=P.createRef(),le.triggerRef=P.createRef(),le.attachId=void 0,le.clickOutsideHandler=void 0,le.touchOutsideHandler=void 0,le.contextMenuOutsideHandler1=void 0,le.contextMenuOutsideHandler2=void 0,le.mouseDownTimeout=void 0,le.focusTime=void 0,le.preClickTime=void 0,le.preTouchTime=void 0,le.delayTimer=void 0,le.hasPopupMouseDown=void 0,le.onMouseEnter=function(_e){var Be=le.props.mouseEnterDelay;le.fireEvents("onMouseEnter",_e),le.delaySetPopupVisible(!0,Be,Be?null:_e)},le.onMouseMove=function(_e){le.fireEvents("onMouseMove",_e),le.setPoint(_e)},le.onMouseLeave=function(_e){le.fireEvents("onMouseLeave",_e),le.delaySetPopupVisible(!1,le.props.mouseLeaveDelay)},le.onPopupMouseEnter=function(){le.clearDelayTimer()},le.onPopupMouseLeave=function(_e){var Be;if(_e.relatedTarget&&!_e.relatedTarget.setTimeout&&Object(_t.a)((Be=le.popupRef.current)===null||Be===void 0?void 0:Be.getElement(),_e.relatedTarget))return;le.delaySetPopupVisible(!1,le.props.mouseLeaveDelay)},le.onFocus=function(_e){le.fireEvents("onFocus",_e),le.clearDelayTimer(),le.isFocusToShow()&&(le.focusTime=Date.now(),le.delaySetPopupVisible(!0,le.props.focusDelay))},le.onMouseDown=function(_e){le.fireEvents("onMouseDown",_e),le.preClickTime=Date.now()},le.onTouchStart=function(_e){le.fireEvents("onTouchStart",_e),le.preTouchTime=Date.now()},le.onBlur=function(_e){le.fireEvents("onBlur",_e),le.clearDelayTimer(),le.isBlurToHide()&&le.delaySetPopupVisible(!1,le.props.blurDelay)},le.onContextMenu=function(_e){_e.preventDefault(),le.fireEvents("onContextMenu",_e),le.setPopupVisible(!0,_e)},le.onContextMenuClose=function(){le.isContextMenuToShow()&&le.close()},le.onClick=function(_e){if(le.fireEvents("onClick",_e),le.focusTime){var Be;if(le.preClickTime&&le.preTouchTime?Be=Math.min(le.preClickTime,le.preTouchTime):le.preClickTime?Be=le.preClickTime:le.preTouchTime&&(Be=le.preTouchTime),Math.abs(Be-le.focusTime)<20)return;le.focusTime=0}le.preClickTime=0,le.preTouchTime=0,le.isClickToShow()&&(le.isClickToHide()||le.isBlurToHide())&&_e&&_e.preventDefault&&_e.preventDefault();var je=!le.state.popupVisible;(le.isClickToHide()&&!je||je&&le.isClickToShow())&&le.setPopupVisible(!le.state.popupVisible,_e)},le.onPopupMouseDown=function(){if(le.hasPopupMouseDown=!0,clearTimeout(le.mouseDownTimeout),le.mouseDownTimeout=window.setTimeout(function(){le.hasPopupMouseDown=!1},0),le.context){var _e;(_e=le.context).onPopupMouseDown.apply(_e,arguments)}},le.onDocumentClick=function(_e){if(le.props.mask&&!le.props.maskClosable)return;var Be=_e.target,je=le.getRootDomNode(),Ge=le.getPopupDomNode();(!Object(_t.a)(je,Be)||le.isContextMenuOnly())&&!Object(_t.a)(Ge,Be)&&!le.hasPopupMouseDown&&le.close()},le.getRootDomNode=function(){var _e=le.props.getTriggerDOMNode;if(_e)return _e(le.triggerRef.current);try{var Be=Object(gt.a)(le.triggerRef.current);if(Be)return Be}catch(je){}return ft.a.findDOMNode(Object(g.a)(le))},le.getPopupClassNameFromAlign=function(_e){var Be=[],je=le.props,Ge=je.popupPlacement,tt=je.builtinPlacements,yt=je.prefixCls,Tt=je.alignPoint,Nt=je.getPopupClassNameFromAlign;return Ge&&tt&&Be.push(st(tt,yt,_e,Tt)),Nt&&Be.push(Nt(_e)),Be.join(" ")},le.getComponent=function(){var _e=le.props,Be=_e.prefixCls,je=_e.destroyPopupOnHide,Ge=_e.popupClassName,tt=_e.onPopupAlign,yt=_e.popupMotion,Tt=_e.popupAnimation,Nt=_e.popupTransitionName,Rn=_e.popupStyle,$n=_e.mask,Bn=_e.maskAnimation,zn=_e.maskTransitionName,Xn=_e.maskMotion,Vn=_e.zIndex,Fn=_e.popup,Jn=_e.stretch,er=_e.alignPoint,jr=_e.mobile,tr=_e.forceRender,_n=le.state,vn=_n.popupVisible,Wn=_n.point,cr=le.getPopupAlign(),an={};return le.isMouseEnterToShow()&&(an.onMouseEnter=le.onPopupMouseEnter),le.isMouseLeaveToHide()&&(an.onMouseLeave=le.onPopupMouseLeave),an.onMouseDown=le.onPopupMouseDown,an.onTouchStart=le.onPopupMouseDown,P.createElement(xn,Object(S.a)({prefixCls:Be,destroyPopupOnHide:je,visible:vn,point:er&&Wn,className:Ge,align:cr,onAlign:tt,animation:Tt,getClassNameFromAlign:le.getPopupClassNameFromAlign},an,{stretch:Jn,getRootDomNode:le.getRootDomNode,style:Rn,mask:$n,zIndex:Vn,transitionName:Nt,maskAnimation:Bn,maskTransitionName:zn,maskMotion:Xn,ref:le.popupRef,motion:yt,mobile:jr,forceRender:tr}),typeof Fn=="function"?Fn():Fn)},le.attachParent=function(_e){at.a.cancel(le.attachId);var Be=le.props,je=Be.getPopupContainer,Ge=Be.getDocument,tt=le.getRootDomNode(),yt;je?(tt||je.length===0)&&(yt=je(tt)):yt=Ge(le.getRootDomNode()).body,yt?yt.appendChild(_e):le.attachId=Object(at.a)(function(){le.attachParent(_e)})},le.getContainer=function(){var _e=le.props.getDocument,Be=_e(le.getRootDomNode()).createElement("div");return Be.style.position="absolute",Be.style.top="0",Be.style.left="0",Be.style.width="100%",le.attachParent(Be),Be},le.setPoint=function(_e){var Be=le.props.alignPoint;if(!Be||!_e)return;le.setState({point:{pageX:_e.pageX,pageY:_e.pageY}})},le.handlePortalUpdate=function(){le.state.prevPopupVisible!==le.state.popupVisible&&le.props.afterPopupVisibleChange(le.state.popupVisible)},le.triggerContextValue={onPopupMouseDown:le.onPopupMouseDown};var Ae;return"popupVisible"in ve?Ae=!!ve.popupVisible:Ae=!!ve.defaultPopupVisible,le.state={prevPopupVisible:Ae,popupVisible:Ae},Sn.forEach(function(_e){le["fire".concat(_e)]=function(Be){le.fireEvents(_e,Be)}}),le}return Object(O.a)(ie,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var le=this.props,Ae=this.state;if(Ae.popupVisible){var _e;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(_e=le.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ze.a)(_e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(_e=_e||le.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ze.a)(_e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(_e=_e||le.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ze.a)(_e,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ze.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var le;return((le=this.popupRef.current)===null||le===void 0?void 0:le.getElement())||null}},{key:"getPopupAlign",value:function(){var le=this.props,Ae=le.popupPlacement,_e=le.popupAlign,Be=le.builtinPlacements;return Ae&&Be?qe(Be,Ae,_e):_e}},{key:"setPopupVisible",value:function(le,Ae){var _e=this.props.alignPoint,Be=this.state.popupVisible;this.clearDelayTimer(),Be!==le&&("popupVisible"in this.props||this.setState({popupVisible:le,prevPopupVisible:Be}),this.props.onPopupVisibleChange(le)),_e&&Ae&&le&&this.setPoint(Ae)}},{key:"delaySetPopupVisible",value:function(le,Ae,_e){var Be=this,je=Ae*1e3;if(this.clearDelayTimer(),je){var Ge=_e?{pageX:_e.pageX,pageY:_e.pageY}:null;this.delayTimer=window.setTimeout(function(){Be.setPopupVisible(le,Ge),Be.clearDelayTimer()},je)}else this.setPopupVisible(le,_e)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(le){var Ae=this.props.children.props,_e=this.props;return Ae[le]&&_e[le]?this["fire".concat(le)]:Ae[le]||_e[le]}},{key:"isClickToShow",value:function(){var le=this.props,Ae=le.action,_e=le.showAction;return Ae.indexOf("click")!==-1||_e.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var le=this.props.action;return le==="contextMenu"||le.length===1&&le[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var le=this.props,Ae=le.action,_e=le.showAction;return Ae.indexOf("contextMenu")!==-1||_e.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var le=this.props,Ae=le.action,_e=le.hideAction;return Ae.indexOf("click")!==-1||_e.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var le=this.props,Ae=le.action,_e=le.showAction;return Ae.indexOf("hover")!==-1||_e.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var le=this.props,Ae=le.action,_e=le.hideAction;return Ae.indexOf("hover")!==-1||_e.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var le=this.props,Ae=le.action,_e=le.showAction;return Ae.indexOf("focus")!==-1||_e.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var le=this.props,Ae=le.action,_e=le.hideAction;return Ae.indexOf("focus")!==-1||_e.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var le;(le=this.popupRef.current)===null||le===void 0||le.forceAlign()}}},{key:"fireEvents",value:function(le,Ae){var _e=this.props.children.props[le];_e&&_e(Ae);var Be=this.props[le];Be&&Be(Ae)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var le=this.state.popupVisible,Ae=this.props,_e=Ae.children,Be=Ae.forceRender,je=Ae.alignPoint,Ge=Ae.className,tt=Ae.autoDestroy,yt=P.Children.only(_e),Tt={key:"trigger"};this.isContextMenuToShow()?Tt.onContextMenu=this.onContextMenu:Tt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Tt.onClick=this.onClick,Tt.onMouseDown=this.onMouseDown,Tt.onTouchStart=this.onTouchStart):(Tt.onClick=this.createTwoChains("onClick"),Tt.onMouseDown=this.createTwoChains("onMouseDown"),Tt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Tt.onMouseEnter=this.onMouseEnter,je&&(Tt.onMouseMove=this.onMouseMove)):Tt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Tt.onMouseLeave=this.onMouseLeave:Tt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Tt.onFocus=this.onFocus,Tt.onBlur=this.onBlur):(Tt.onFocus=this.createTwoChains("onFocus"),Tt.onBlur=this.createTwoChains("onBlur"));var Nt=G()(yt&&yt.props&&yt.props.className,Ge);Nt&&(Tt.className=Nt);var Rn=Object(z.a)({},Tt);Object(xt.c)(yt)&&(Rn.ref=Object(xt.a)(this.triggerRef,yt.ref));var $n=P.cloneElement(yt,Rn),Bn;return(le||this.popupRef.current||Be)&&(Bn=P.createElement(Ee,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!le&&tt&&(Bn=null),P.createElement(gn.Provider,{value:this.triggerContextValue},$n,Bn)}}],[{key:"getDerivedStateFromProps",value:function(le,Ae){var _e=le.popupVisible,Be={};return _e!==void 0&&Ae.popupVisible!==_e&&(Be.popupVisible=_e,Be.prevPopupVisible=Ae.popupVisible),Be}}]),ie}(P.Component);return Le.contextType=gn,Le.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Kn,getDocument:dn,onPopupVisibleChange:Ln,afterPopupVisibleChange:Ln,onPopupAlign:Ln,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Le}var Nn=hr(kt.a),Kt={adjustX:1,adjustY:1},An={topLeft:{points:["bl","tl"],overflow:Kt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Kt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Kt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Kt,offset:[4,0]}},lr={topLeft:{points:["bl","tl"],overflow:Kt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Kt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Kt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Kt,offset:[4,0]}},Un=An,zt=0,jt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},yn=function(Le,We,Se){var ie=Fe(We),ve=Le.getState();Le.setState({defaultActiveFirst:Object(z.a)(Object(z.a)({},ve.defaultActiveFirst),{},Object(te.a)({},ie,Se))})},Ct=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(Se){var ie;Object(R.a)(this,We),ie=Le.call(this,Se),ie.onDestroy=function(je){ie.props.onDestroy(je)},ie.onKeyDown=function(je){var Ge=je.keyCode,tt=ie.menuInstance,yt=ie.props.store,Tt=ie.getVisible();if(Ge===p.a.ENTER)return ie.onTitleClick(je),yn(yt,ie.props.eventKey,!0),!0;if(Ge===p.a.RIGHT)return Tt?tt.onKeyDown(je):(ie.triggerOpenChange(!0),yn(yt,ie.props.eventKey,!0)),!0;if(Ge===p.a.LEFT){var Nt;if(Tt)Nt=tt.onKeyDown(je);else return;return Nt||(ie.triggerOpenChange(!1),Nt=!0),Nt}return Tt&&(Ge===p.a.UP||Ge===p.a.DOWN)?tt.onKeyDown(je):void 0},ie.onOpenChange=function(je){ie.props.onOpenChange(je)},ie.onPopupVisibleChange=function(je){ie.triggerOpenChange(je,je?"mouseenter":"mouseleave")},ie.onMouseEnter=function(je){var Ge=ie.props,tt=Ge.eventKey,yt=Ge.onMouseEnter,Tt=Ge.store;yn(Tt,ie.props.eventKey,!1),yt({key:tt,domEvent:je})},ie.onMouseLeave=function(je){var Ge=ie.props,tt=Ge.parentMenu,yt=Ge.eventKey,Tt=Ge.onMouseLeave;tt.subMenuInstance=Object(g.a)(ie),Tt({key:yt,domEvent:je})},ie.onTitleMouseEnter=function(je){var Ge=ie.props,tt=Ge.eventKey,yt=Ge.onItemHover,Tt=Ge.onTitleMouseEnter;yt({key:tt,hover:!0}),Tt({key:tt,domEvent:je})},ie.onTitleMouseLeave=function(je){var Ge=ie.props,tt=Ge.parentMenu,yt=Ge.eventKey,Tt=Ge.onItemHover,Nt=Ge.onTitleMouseLeave;tt.subMenuInstance=Object(g.a)(ie),Tt({key:yt,hover:!1}),Nt({key:yt,domEvent:je})},ie.onTitleClick=function(je){var Ge=Object(g.a)(ie),tt=Ge.props;if(tt.onTitleClick({key:tt.eventKey,domEvent:je}),tt.triggerSubMenuAction==="hover")return;ie.triggerOpenChange(!ie.getVisible(),"click"),yn(tt.store,ie.props.eventKey,!1)},ie.onSubMenuClick=function(je){typeof ie.props.onClick=="function"&&ie.props.onClick(ie.addKeyPath(je))},ie.onSelect=function(je){ie.props.onSelect(je)},ie.onDeselect=function(je){ie.props.onDeselect(je)},ie.getPrefixCls=function(){return"".concat(ie.props.rootPrefixCls,"-submenu")},ie.getActiveClassName=function(){return"".concat(ie.getPrefixCls(),"-active")},ie.getDisabledClassName=function(){return"".concat(ie.getPrefixCls(),"-disabled")},ie.getSelectedClassName=function(){return"".concat(ie.getPrefixCls(),"-selected")},ie.getOpenClassName=function(){return"".concat(ie.props.rootPrefixCls,"-submenu-open")},ie.getVisible=function(){return ie.state.isOpen},ie.getMode=function(){return ie.state.mode},ie.saveMenuInstance=function(je){ie.menuInstance=je},ie.addKeyPath=function(je){return Object(z.a)(Object(z.a)({},je),{},{keyPath:(je.keyPath||[]).concat(ie.props.eventKey)})},ie.triggerOpenChange=function(je,Ge){var tt=ie.props.eventKey,yt=function(){ie.onOpenChange({key:tt,item:Object(g.a)(ie),trigger:Ge,open:je})};Ge==="mouseenter"?ie.mouseenterTimeout=setTimeout(function(){yt()},0):yt()},ie.isChildrenSelected=function(){var je={find:!1};return nt(ie.props.children,ie.props.selectedKeys,je),je.find},ie.isInlineMode=function(){return ie.getMode()==="inline"},ie.adjustWidth=function(){if(!ie.subMenuTitle||!ie.menuInstance)return;var je=lt.findDOMNode(ie.menuInstance);if(je.offsetWidth>=ie.subMenuTitle.offsetWidth)return;je.style.minWidth="".concat(ie.subMenuTitle.offsetWidth,"px")},ie.saveSubMenuTitle=function(je){ie.subMenuTitle=je},ie.getBaseProps=function(){var je=Object(g.a)(ie),Ge=je.props,tt=ie.getMode();return{mode:tt==="horizontal"?"vertical":tt,visible:ie.getVisible(),level:Ge.level+1,inlineIndent:Ge.inlineIndent,focusable:!1,onClick:ie.onSubMenuClick,onSelect:ie.onSelect,onDeselect:ie.onDeselect,onDestroy:ie.onDestroy,selectedKeys:Ge.selectedKeys,eventKey:"".concat(Ge.eventKey,"-menu-"),openKeys:Ge.openKeys,motion:Ge.motion,onOpenChange:ie.onOpenChange,subMenuOpenDelay:Ge.subMenuOpenDelay,parentMenu:Object(g.a)(ie),subMenuCloseDelay:Ge.subMenuCloseDelay,forceSubMenuRender:Ge.forceSubMenuRender,triggerSubMenuAction:Ge.triggerSubMenuAction,builtinPlacements:Ge.builtinPlacements,defaultActiveFirst:Ge.store.getState().defaultActiveFirst[Fe(Ge.eventKey)],multiple:Ge.multiple,prefixCls:Ge.rootPrefixCls,id:ie.internalMenuId,manualRef:ie.saveMenuInstance,itemIcon:Ge.itemIcon,expandIcon:Ge.expandIcon,direction:Ge.direction}},ie.getMotion=function(je,Ge){var tt=Object(g.a)(ie),yt=tt.haveRendered,Tt=ie.props,Nt=Tt.motion,Rn=Tt.rootPrefixCls,$n=Object(z.a)(Object(z.a)({},Nt),{},{leavedClassName:"".concat(Rn,"-hidden"),removeOnLeave:!1,motionAppear:yt||!Ge||je!=="inline"});return $n};var ve=Se.store,le=Se.eventKey,Ae=ve.getState(),_e=Ae.defaultActiveFirst;ie.isRootMenu=!1;var Be=!1;return _e&&(Be=_e[le]),yn(ve,le,Be),ie.state={mode:Se.mode,isOpen:Se.isOpen},ie}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ie=this,ve=this.props,le=ve.mode,Ae=ve.parentMenu,_e=ve.manualRef,Be=ve.isOpen,je=function(){ie.setState({mode:le,isOpen:Be})},Ge=Be!==this.state.isOpen,tt=le!==this.state.mode;if((tt||Ge)&&(at.a.cancel(this.updateStateRaf),tt?this.updateStateRaf=Object(at.a)(je):je()),_e&&_e(this),le!=="horizontal"||!(Ae==null?void 0:Ae.isRootMenu)||!Be)return;this.minWidthTimeout=setTimeout(function(){return ie.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ie=this.props,ve=ie.onDestroy,le=ie.eventKey;ve&&ve(le),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ie,ve){var le=this.getBaseProps();return P.createElement(ur,Object(S.a)({},le,{id:this.internalMenuId,className:ie,style:ve}),this.props.children)}},{key:"renderChildren",value:function(){var ie=this,ve=this.getBaseProps(),le=ve.mode,Ae=ve.visible,_e=ve.forceSubMenuRender,Be=ve.direction,je=this.getMotion(le,Ae);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ae||_e,!this.haveOpened)return P.createElement("div",null);var Ge=G()("".concat(ve.prefixCls,"-sub"),Object(te.a)({},"".concat(ve.prefixCls,"-rtl"),Be==="rtl"));return this.isInlineMode()?P.createElement(ne,Object(S.a)({visible:ve.visible,forceRender:_e},je),function(tt){var yt=tt.className,Tt=tt.style,Nt=G()(Ge,yt);return ie.renderPopupMenu(Nt,Tt)}):this.renderPopupMenu(Ge)}},{key:"render",value:function(){var ie,ve,le,Ae=Object(z.a)({},this.props),_e=this.getVisible(),Be=this.getPrefixCls(),je=this.isInlineMode(),Ge=this.getMode(),tt=G()(Be,"".concat(Be,"-").concat(Ge),(ie={},Object(te.a)(ie,Ae.className,!!Ae.className),Object(te.a)(ie,this.getOpenClassName(),_e),Object(te.a)(ie,this.getActiveClassName(),Ae.active||_e&&!je),Object(te.a)(ie,this.getDisabledClassName(),Ae.disabled),Object(te.a)(ie,this.getSelectedClassName(),this.isChildrenSelected()),ie));this.internalMenuId||(Ae.eventKey?this.internalMenuId="".concat(Ae.eventKey,"$Menu"):(zt+=1,this.internalMenuId="$__$".concat(zt,"$Menu")));var yt={},Tt={},Nt={};Ae.disabled||(yt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Tt={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Rn={},$n=Ae.direction,Bn=$n==="rtl";je&&(Bn?Rn.paddingRight=Ae.inlineIndent*Ae.level:Rn.paddingLeft=Ae.inlineIndent*Ae.level);var zn={};this.getVisible()&&(zn={"aria-owns":this.internalMenuId});var Xn=null;Ge!=="horizontal"&&(Xn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Xn=P.createElement(this.props.expandIcon,Object(z.a)({},this.props))));var Vn=P.createElement("div",Object(S.a)({ref:this.saveSubMenuTitle,style:Rn,className:"".concat(Be,"-title"),role:"button"},Nt,Tt,{"aria-expanded":_e},zn,{"aria-haspopup":"true",title:typeof Ae.title=="string"?Ae.title:void 0}),Ae.title,Xn||P.createElement("i",{className:"".concat(Be,"-arrow")})),Fn=this.renderChildren(),Jn=((ve=Ae.parentMenu)===null||ve===void 0?void 0:ve.isRootMenu)?Ae.parentMenu.props.getPopupContainer:function(xr){return xr.parentNode},er=jt[Ge],jr=Ae.popupOffset?{offset:Ae.popupOffset}:{},tr=G()((le={},Object(te.a)(le,Ae.popupClassName,Ae.popupClassName&&!je),Object(te.a)(le,"".concat(Be,"-rtl"),Bn),le)),_n=Ae.disabled,vn=Ae.triggerSubMenuAction,Wn=Ae.subMenuOpenDelay,cr=Ae.forceSubMenuRender,an=Ae.subMenuCloseDelay,dr=Ae.builtinPlacements;de.forEach(function(xr){return delete Ae[xr]}),delete Ae.onClick;var Br=Bn?Object(z.a)(Object(z.a)({},lr),dr):Object(z.a)(Object(z.a)({},An),dr);delete Ae.direction;var ir=this.getBaseProps(),Ar=je?null:this.getMotion(ir.mode,ir.visible);return P.createElement("li",Object(S.a)({},Ae,yt,{className:tt,role:"menuitem"}),P.createElement(Nn,{prefixCls:Be,popupClassName:G()("".concat(Be,"-popup"),tr),getPopupContainer:Jn,builtinPlacements:Br,popupPlacement:er,popupVisible:je?!1:_e,popupAlign:jr,popup:je?null:Fn,action:_n||je?[]:[vn],mouseEnterDelay:Wn,mouseLeaveDelay:an,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:cr,popupMotion:Ar},Vn),je?Fn:null)}}]),We}(P.Component);Ct.defaultProps={onMouseEnter:He,onMouseLeave:He,onTitleMouseEnter:He,onTitleMouseLeave:He,onTitleClick:He,manualRef:He,mode:"vertical",title:""};var Mt=Object(d.b)(function(Ee,Le){var We=Ee.openKeys,Se=Ee.activeKey,ie=Ee.selectedKeys,ve=Le.eventKey,le=Le.subMenuKey;return{isOpen:We.indexOf(ve)>-1,active:Se[le]===ve,selectedKeys:ie}})(Ct);Mt.isSubMenu=!0;var Dt=Mt,ke="menuitem-overflowed",Vt=.5,Tn=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(){var Se;return Object(R.a)(this,We),Se=Le.apply(this,arguments),Se.resizeObserver=null,Se.mutationObserver=null,Se.originalTotalWidth=0,Se.overflowedItems=[],Se.menuItemSizes=[],Se.cancelFrameId=null,Se.state={lastVisibleIndex:void 0},Se.childRef=P.createRef(),Se.getMenuItemNodes=function(){var ie=Se.props.prefixCls,ve=Se.childRef.current;return ve?[].slice.call(ve.children).filter(function(le){return le.className.split(" ").indexOf("".concat(ie,"-overflowed-submenu"))<0}):[]},Se.getOverflowedSubMenuItem=function(ie,ve,le){var Ae=Se.props,_e=Ae.overflowedIndicator,Be=Ae.level,je=Ae.mode,Ge=Ae.prefixCls,tt=Ae.theme;if(Be!==1||je!=="horizontal")return null;var yt=Se.props.children[0],Tt=yt.props,Nt=Tt.children,Rn=Tt.title,$n=Tt.style,Bn=Object(N.a)(Tt,["children","title","style"]),zn=Object(z.a)({},$n),Xn="".concat(ie,"-overflowed-indicator"),Vn="".concat(ie,"-overflowed-indicator");ve.length===0&&le!==!0?zn=Object(z.a)(Object(z.a)({},zn),{},{display:"none"}):le&&(zn=Object(z.a)(Object(z.a)({},zn),{},{visibility:"hidden",position:"absolute"}),Xn="".concat(Xn,"-placeholder"),Vn="".concat(Vn,"-placeholder"));var Fn=tt?"".concat(Ge,"-").concat(tt):"",Jn={};return de.forEach(function(er){Bn[er]!==void 0&&(Jn[er]=Bn[er])}),P.createElement(Dt,Object(S.a)({title:_e,className:"".concat(Ge,"-overflowed-submenu"),popupClassName:Fn},Jn,{key:Xn,eventKey:Vn,disabled:!1,style:zn}),ve)},Se.setChildrenWidthAndResize=function(){if(Se.props.mode!=="horizontal")return;var ie=Se.childRef.current;if(!ie)return;var ve=ie.children;if(!ve||ve.length===0)return;var le=ie.children[ve.length-1];Ne(le,"display","inline-block");var Ae=Se.getMenuItemNodes(),_e=Ae.filter(function(Be){return Be.className.split(" ").indexOf(ke)>=0});_e.forEach(function(Be){Ne(Be,"display","inline-block")}),Se.menuItemSizes=Ae.map(function(Be){return De(Be,!0)}),_e.forEach(function(Be){Ne(Be,"display","none")}),Se.overflowedIndicatorWidth=De(ie.children[ie.children.length-1],!0),Se.originalTotalWidth=Se.menuItemSizes.reduce(function(Be,je){return Be+je},0),Se.handleResize(),Ne(le,"display","none")},Se.handleResize=function(){if(Se.props.mode!=="horizontal")return;var ie=Se.childRef.current;if(!ie)return;var ve=De(ie);Se.overflowedItems=[];var le=0,Ae;Se.originalTotalWidth>ve+Vt&&(Ae=-1,Se.menuItemSizes.forEach(function(_e){le+=_e,le+Se.overflowedIndicatorWidth<=ve&&(Ae+=1)})),Se.setState({lastVisibleIndex:Ae})},Se}return Object(O.a)(We,[{key:"componentDidMount",value:function(){var ie=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ve=this.childRef.current;if(!ve)return;this.resizeObserver=new rt.default(function(le){le.forEach(function(){var Ae=ie.cancelFrameId;cancelAnimationFrame(Ae),ie.cancelFrameId=requestAnimationFrame(ie.setChildrenWidthAndResize)})}),[].slice.call(ve.children).concat(ve).forEach(function(le){ie.resizeObserver.observe(le)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ie.resizeObserver.disconnect(),[].slice.call(ve.children).concat(ve).forEach(function(le){ie.resizeObserver.observe(le)}),ie.setChildrenWidthAndResize()}),this.mutationObserver.observe(ve,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(ie){var ve=this,le=this.state.lastVisibleIndex;return(ie||[]).reduce(function(Ae,_e,Be){var je=_e;if(ve.props.mode==="horizontal"){var Ge=ve.getOverflowedSubMenuItem(_e.props.eventKey,[]);le!==void 0&&ve.props.className.indexOf("".concat(ve.props.prefixCls,"-root"))!==-1&&(Be>le&&(je=P.cloneElement(_e,{style:{display:"none"},eventKey:"".concat(_e.props.eventKey,"-hidden"),className:"".concat(ke)})),Be===le+1&&(ve.overflowedItems=ie.slice(le+1).map(function(yt){return P.cloneElement(yt,{key:yt.props.eventKey,mode:"vertical-left"})}),Ge=ve.getOverflowedSubMenuItem(_e.props.eventKey,ve.overflowedItems)));var tt=[].concat(Object(I.a)(Ae),[Ge,je]);return Be===ie.length-1&&tt.push(ve.getOverflowedSubMenuItem(_e.props.eventKey,[],!0)),tt}return[].concat(Object(I.a)(Ae),[je])},[])}},{key:"render",value:function(){var ie=this.props,ve=ie.visible,le=ie.prefixCls,Ae=ie.overflowedIndicator,_e=ie.mode,Be=ie.level,je=ie.tag,Ge=ie.children,tt=ie.theme,yt=Object(N.a)(ie,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tt=je;return P.createElement(Tt,Object(S.a)({ref:this.childRef},yt),this.renderChildren(Ge))}}]),We}(P.Component);Tn.defaultProps={tag:"div",className:""};var mr=Tn;function On(Ee){return Ee.length?Ee.every(function(Le){return!!Le.props.disabled}):!0}function ii(Ee,Le,We){var Se=Ee.getState();Ee.setState({activeKey:Object(z.a)(Object(z.a)({},Se.activeKey),{},Object(te.a)({},Le,We))})}function ai(Ee){return Ee.eventKey||"0-menu-"}function Kr(Ee,Le){var We=Le,Se=Ee.children,ie=Ee.eventKey;if(We){var ve;if(Ke(Se,function(le,Ae){le&&le.props&&!le.props.disabled&&We===Ve(le,ie,Ae)&&(ve=!0)}),ve)return We}return We=null,Ee.defaultActiveFirst&&Ke(Se,function(le,Ae){!We&&le&&!le.props.disabled&&(We=Ve(le,ie,Ae))}),We}function jn(Ee){if(!Ee)return;var Le=this.instanceArray.indexOf(Ee);Le!==-1?this.instanceArray[Le]=Ee:this.instanceArray.push(Ee)}var Bt=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(Se){var ie;return Object(R.a)(this,We),ie=Le.call(this,Se),ie.onKeyDown=function(ve,le){var Ae=ve.keyCode,_e;if(ie.getFlatInstanceArray().forEach(function(je){je&&je.props.active&&je.onKeyDown&&(_e=je.onKeyDown(ve))}),_e)return 1;var Be=null;return(Ae===p.a.UP||Ae===p.a.DOWN)&&(Be=ie.step(Ae===p.a.UP?-1:1)),Be?(ve.preventDefault(),ii(ie.props.store,ai(ie.props),Be.props.eventKey),typeof le=="function"&&le(Be),1):void 0},ie.onItemHover=function(ve){var le=ve.key,Ae=ve.hover;ii(ie.props.store,ai(ie.props),Ae?le:null)},ie.onDeselect=function(ve){ie.props.onDeselect(ve)},ie.onSelect=function(ve){ie.props.onSelect(ve)},ie.onClick=function(ve){ie.props.onClick(ve)},ie.onOpenChange=function(ve){ie.props.onOpenChange(ve)},ie.onDestroy=function(ve){ie.props.onDestroy(ve)},ie.getFlatInstanceArray=function(){return ie.instanceArray},ie.step=function(ve){var le=ie.getFlatInstanceArray(),Ae=ie.props.store.getState().activeKey[ai(ie.props)],_e=le.length;if(!_e)return null;ve<0&&(le=le.concat().reverse());var Be=-1;if(le.every(function(yt,Tt){return yt&&yt.props.eventKey===Ae?(Be=Tt,!1):!0}),!ie.props.defaultActiveFirst&&Be!==-1&&On(le.slice(Be,_e-1)))return;var je=(Be+1)%_e,Ge=je;do{var tt=le[Ge];if(!tt||tt.props.disabled)Ge=(Ge+1)%_e;else return tt}while(Ge!==je);return null},ie.renderCommonMenuItem=function(ve,le,Ae){var _e=ie.props.store.getState(),Be=Object(g.a)(ie),je=Be.props,Ge=Ve(ve,je.eventKey,le),tt=ve.props;if(!tt||typeof ve.type=="string")return ve;var yt=Ge===_e.activeKey,Tt=Object(z.a)(Object(z.a)({mode:tt.mode||je.mode,level:je.level,inlineIndent:je.inlineIndent,renderMenuItem:ie.renderMenuItem,rootPrefixCls:je.prefixCls,index:le,parentMenu:je.parentMenu,manualRef:tt.disabled?void 0:Object(x.a)(ve.ref,jn.bind(Object(g.a)(ie))),eventKey:Ge,active:!tt.disabled&&yt,multiple:je.multiple,onClick:function(Rn){(tt.onClick||He)(Rn),ie.onClick(Rn)},onItemHover:ie.onItemHover,motion:je.motion,subMenuOpenDelay:je.subMenuOpenDelay,subMenuCloseDelay:je.subMenuCloseDelay,forceSubMenuRender:je.forceSubMenuRender,onOpenChange:ie.onOpenChange,onDeselect:ie.onDeselect,onSelect:ie.onSelect,builtinPlacements:je.builtinPlacements,itemIcon:tt.itemIcon||ie.props.itemIcon,expandIcon:tt.expandIcon||ie.props.expandIcon},Ae),{},{direction:je.direction});return(je.mode==="inline"||Ue())&&(Tt.triggerSubMenuAction="click"),P.cloneElement(ve,Object(z.a)(Object(z.a)({},Tt),{},{key:Ge||le}))},ie.renderMenuItem=function(ve,le,Ae){if(!ve)return null;var _e=ie.props.store.getState(),Be={openKeys:_e.openKeys,selectedKeys:_e.selectedKeys,triggerSubMenuAction:ie.props.triggerSubMenuAction,subMenuKey:Ae};return ie.renderCommonMenuItem(ve,le,Be)},Se.store.setState({activeKey:Object(z.a)(Object(z.a)({},Se.store.getState().activeKey),{},Object(te.a)({},Se.eventKey,Kr(Se,Se.activeKey)))}),ie.instanceArray=[],ie}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ie){return this.props.visible||ie.visible||this.props.className!==ie.className||!j()(this.props.style,ie.style)}},{key:"componentDidUpdate",value:function(ie){var ve=this.props,le="activeKey"in ve?ve.activeKey:ve.store.getState().activeKey[ai(ve)],Ae=Kr(ve,le);if(Ae!==le)ii(ve.store,ai(ve),Ae);else if("activeKey"in ie){var _e=Kr(ie,ie.activeKey);Ae!==_e&&ii(ve.store,ai(ve),Ae)}}},{key:"render",value:function(){var ie=this,ve=Object(S.a)({},this.props);this.instanceArray=[];var le=G()(ve.prefixCls,ve.className,"".concat(ve.prefixCls,"-").concat(ve.mode)),Ae={className:le,role:ve.role||"menu"};ve.id&&(Ae.id=ve.id),ve.focusable&&(Ae.tabIndex=0,Ae.onKeyDown=this.onKeyDown);var _e=ve.prefixCls,Be=ve.eventKey,je=ve.visible,Ge=ve.level,tt=ve.mode,yt=ve.overflowedIndicator,Tt=ve.theme;return de.forEach(function(Nt){return delete ve[Nt]}),delete ve.onClick,P.createElement(mr,Object(S.a)({},ve,{prefixCls:_e,mode:tt,tag:"ul",level:Ge,theme:Tt,visible:je,overflowedIndicator:yt},Ae),Object(K.a)(ve.children).map(function(Nt,Rn){return ie.renderMenuItem(Nt,Rn,Be||"0-menu-")}))}}]),We}(P.Component);Bt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:He};var Er=Object(d.b)()(Bt),ur=Er,Yn=U("Kwbf");function oi(Ee,Le,We){var Se=Ee.prefixCls,ie=Ee.motion,ve=Ee.defaultMotions,le=ve===void 0?{}:ve,Ae=Ee.openAnimation,_e=Ee.openTransitionName,Be=Le.switchingModeFromInline;if(ie)return ie;if(Object(W.a)(Ae)==="object"&&Ae)Object(Yn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ae=="string")return{motionName:"".concat(Se,"-open-").concat(Ae)};if(_e)return{motionName:_e};var je=le[We];return je||(Be?null:le.other)}var Xt=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(Se){var ie;Object(R.a)(this,We),ie=Le.call(this,Se),ie.onSelect=function(Ae){var _e=Object(g.a)(ie),Be=_e.props;if(Be.selectable){var je=ie.store.getState(),Ge=je.selectedKeys,tt=Ae.key;Be.multiple?Ge=Ge.concat([tt]):Ge=[tt],"selectedKeys"in Be||ie.store.setState({selectedKeys:Ge}),Be.onSelect(Object(z.a)(Object(z.a)({},Ae),{},{selectedKeys:Ge}))}},ie.onClick=function(Ae){var _e=ie.getRealMenuMode(),Be=Object(g.a)(ie),je=Be.store,Ge=Be.props.onOpenChange;_e!=="inline"&&!("openKeys"in ie.props)&&(je.setState({openKeys:[]}),Ge([])),ie.props.onClick(Ae)},ie.onKeyDown=function(Ae,_e){ie.innerMenu.getWrappedInstance().onKeyDown(Ae,_e)},ie.onOpenChange=function(Ae){var _e=Object(g.a)(ie),Be=_e.props,je=ie.store.getState().openKeys.concat(),Ge=!1,tt=function(Tt){var Nt=!1;if(Tt.open)Nt=je.indexOf(Tt.key)===-1,Nt&&je.push(Tt.key);else{var Rn=je.indexOf(Tt.key);Nt=Rn!==-1,Nt&&je.splice(Rn,1)}Ge=Ge||Nt};Array.isArray(Ae)?Ae.forEach(tt):tt(Ae),Ge&&("openKeys"in ie.props||ie.store.setState({openKeys:je}),Be.onOpenChange(je))},ie.onDeselect=function(Ae){var _e=Object(g.a)(ie),Be=_e.props;if(Be.selectable){var je=ie.store.getState().selectedKeys.concat(),Ge=Ae.key,tt=je.indexOf(Ge);tt!==-1&&je.splice(tt,1),"selectedKeys"in Be||ie.store.setState({selectedKeys:je}),Be.onDeselect(Object(z.a)(Object(z.a)({},Ae),{},{selectedKeys:je}))}},ie.onMouseEnter=function(Ae){ie.restoreModeVerticalFromInline();var _e=ie.props.onMouseEnter;_e&&_e(Ae)},ie.onTransitionEnd=function(Ae){var _e=Ae.propertyName==="width"&&Ae.target===Ae.currentTarget,Be=Ae.target.className,je=Object.prototype.toString.call(Be)==="[object SVGAnimatedString]"?Be.animVal:Be,Ge=Ae.propertyName==="font-size"&&je.indexOf("anticon")>=0;(_e||Ge)&&ie.restoreModeVerticalFromInline()},ie.setInnerMenu=function(Ae){ie.innerMenu=Ae},ie.isRootMenu=!0;var ve=Se.defaultSelectedKeys,le=Se.defaultOpenKeys;return"selectedKeys"in Se&&(ve=Se.selectedKeys||[]),"openKeys"in Se&&(le=Se.openKeys||[]),ie.store=Object(d.c)({selectedKeys:ve,openKeys:le,activeKey:{"0-menu-":Kr(Se,Se.activeKey)}}),ie.state={switchingModeFromInline:!1,prevProps:Se,inlineOpenKeys:[],store:ie.store},ie}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ie){var ve=this.props,le=ve.siderCollapsed,Ae=ve.inlineCollapsed,_e=ve.onOpenChange;(!ie.inlineCollapsed&&Ae||!ie.siderCollapsed&&le)&&_e([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ie=this.props.collapsedWidth,ve=this.store,le=this.prevOpenKeys,Ae=this.getInlineCollapsed()&&(ie===0||ie==="0"||ie==="0px");Ae?(this.prevOpenKeys=ve.getState().openKeys.concat(),this.store.setState({openKeys:[]})):le&&(this.store.setState({openKeys:le}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ie=this.props.mode,ve=this.state.switchingModeFromInline,le=this.getInlineCollapsed();return ve&&le?"inline":le?"vertical":ie}},{key:"getInlineCollapsed",value:function(){var ie=this.props,ve=ie.inlineCollapsed,le=ie.siderCollapsed;return le!==void 0?le:ve}},{key:"restoreModeVerticalFromInline",value:function(){var ie=this.state.switchingModeFromInline;ie&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var ie=Object(z.a)({},Object(C.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ve=this.getRealMenuMode();return ie.className+=" ".concat(ie.prefixCls,"-root"),ie.direction==="rtl"&&(ie.className+=" ".concat(ie.prefixCls,"-rtl")),ie=Object(z.a)(Object(z.a)({},ie),{},{mode:ve,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:oi(this.props,this.state,ve)}),delete ie.openAnimation,delete ie.openTransitionName,P.createElement(d.a,{store:this.store},P.createElement(ur,Object(S.a)({},ie,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ie,ve){var le=ve.prevProps,Ae=ve.store,_e=Ae.getState(),Be={},je={prevProps:ie};return le.mode==="inline"&&ie.mode!=="inline"&&(je.switchingModeFromInline=!0),"openKeys"in ie?Be.openKeys=ie.openKeys||[]:((ie.inlineCollapsed&&!le.inlineCollapsed||ie.siderCollapsed&&!le.siderCollapsed)&&(je.switchingModeFromInline=!0,je.inlineOpenKeys=_e.openKeys,Be.openKeys=[]),(!ie.inlineCollapsed&&le.inlineCollapsed||!ie.siderCollapsed&&le.siderCollapsed)&&(Be.openKeys=ve.inlineOpenKeys,je.inlineOpenKeys=[])),Object.keys(Be).length&&Ae.setState(Be),je}}]),We}(P.Component);Xt.defaultProps={selectable:!0,onClick:He,onSelect:He,onOpenChange:He,onDeselect:He,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:P.createElement("span",null,"\xB7\xB7\xB7")};var Jt=Xt,Yt=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(){var Se;return Object(R.a)(this,We),Se=Le.apply(this,arguments),Se.onKeyDown=function(ie){var ve=ie.keyCode;return ve===p.a.ENTER?(Se.onClick(ie),!0):void 0},Se.onMouseLeave=function(ie){var ve=Se.props,le=ve.eventKey,Ae=ve.onItemHover,_e=ve.onMouseLeave;Ae({key:le,hover:!1}),_e({key:le,domEvent:ie})},Se.onMouseEnter=function(ie){var ve=Se.props,le=ve.eventKey,Ae=ve.onItemHover,_e=ve.onMouseEnter;Ae({key:le,hover:!0}),_e({key:le,domEvent:ie})},Se.onClick=function(ie){var ve=Se.props,le=ve.eventKey,Ae=ve.multiple,_e=ve.onClick,Be=ve.onSelect,je=ve.onDeselect,Ge=ve.isSelected,tt={key:le,keyPath:[le],item:Object(g.a)(Se),domEvent:ie};_e(tt),Ae?Ge?je(tt):Be(tt):Ge||Be(tt)},Se.saveNode=function(ie){Se.node=ie},Se}return Object(O.a)(We,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ie=this.props;ie.onDestroy&&ie.onDestroy(ie.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var ie,ve=Object(z.a)({},this.props),le=G()(this.getPrefixCls(),ve.className,(ie={},Object(te.a)(ie,this.getActiveClassName(),!ve.disabled&&ve.active),Object(te.a)(ie,this.getSelectedClassName(),ve.isSelected),Object(te.a)(ie,this.getDisabledClassName(),ve.disabled),ie)),Ae=Object(z.a)(Object(z.a)({},ve.attribute),{},{title:typeof ve.title=="string"?ve.title:void 0,className:le,role:ve.role||"menuitem","aria-disabled":ve.disabled});ve.role==="option"?Ae=Object(z.a)(Object(z.a)({},Ae),{},{role:"option","aria-selected":ve.isSelected}):(ve.role===null||ve.role==="none")&&(Ae.role="none");var _e={onClick:ve.disabled?null:this.onClick,onMouseLeave:ve.disabled?null:this.onMouseLeave,onMouseEnter:ve.disabled?null:this.onMouseEnter},Be=Object(z.a)({},ve.style);ve.mode==="inline"&&(ve.direction==="rtl"?Be.paddingRight=ve.inlineIndent*ve.level:Be.paddingLeft=ve.inlineIndent*ve.level),de.forEach(function(Ge){return delete ve[Ge]}),delete ve.direction;var je=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(je=P.createElement(this.props.itemIcon,this.props)),P.createElement("li",Object(S.a)({},Object(C.a)(ve,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ae,_e,{style:Be,ref:this.saveNode}),ve.children,je)}}]),We}(P.Component);Yt.isMenuItem=!0,Yt.defaultProps={onSelect:He,onMouseEnter:He,onMouseLeave:He,manualRef:He};var pn=Object(d.b)(function(Ee,Le){var We=Ee.activeKey,Se=Ee.selectedKeys,ie=Le.eventKey,ve=Le.subMenuKey;return{active:We[ve]===ie,isSelected:Array.isArray(Se)?Se.indexOf(ie)!==-1:Se===ie}})(Yt),Gn=pn,Mn=function(Ee){Object(_.a)(We,Ee);var Le=Object(h.a)(We);function We(){var Se;return Object(R.a)(this,We),Se=Le.apply(this,arguments),Se.renderInnerMenuItem=function(ie){var ve=Se.props,le=ve.renderMenuItem,Ae=ve.index;return le(ie,Ae,Se.props.subMenuKey)},Se}return Object(O.a)(We,[{key:"render",value:function(){var ie=Object(S.a)({},this.props),ve=ie.className,le=ve===void 0?"":ve,Ae=ie.rootPrefixCls,_e="".concat(Ae,"-item-group-title"),Be="".concat(Ae,"-item-group-list"),je=ie.title,Ge=ie.children;return de.forEach(function(tt){return delete ie[tt]}),delete ie.direction,P.createElement("li",Object(S.a)({},ie,{onClick:function(yt){return yt.stopPropagation()},className:"".concat(le," ").concat(Ae,"-item-group")}),P.createElement("div",{className:_e,title:typeof je=="string"?je:void 0},je),P.createElement("ul",{className:Be},P.Children.map(Ge,this.renderInnerMenuItem)))}}]),We}(P.Component);Mn.isMenuItemGroup=!0,Mn.defaultProps={disabled:!0};var qn=Mn,gr=function(Le){var We=Le.className,Se=Le.rootPrefixCls,ie=Le.style;return P.createElement("li",{className:"".concat(We," ").concat(Se,"-item-divider"),style:ie})};gr.defaultProps={disabled:!0,className:"",style:{}};var wi=gr,Zn=Jt,Qi=U("eDIo");function vr(Ee,Le){var We=Ee.prefixCls,Se=Ee.editable,ie=Ee.locale,ve=Ee.style;return!Se||Se.showAdd===!1?null:P.createElement("button",{ref:Le,type:"button",className:"".concat(We,"-nav-add"),style:ve,"aria-label":(ie==null?void 0:ie.addAriaLabel)||"Add tab",onClick:function(Ae){Se.onEdit("add",{event:Ae})}},Se.addIcon||"+")}var fi=P.forwardRef(vr);function si(Ee,Le){var We=Ee.prefixCls,Se=Ee.id,ie=Ee.tabs,ve=Ee.locale,le=Ee.mobile,Ae=Ee.moreIcon,_e=Ae===void 0?"More":Ae,Be=Ee.moreTransitionName,je=Ee.style,Ge=Ee.className,tt=Ee.editable,yt=Ee.tabBarGutter,Tt=Ee.rtl,Nt=Ee.onTabClick,Rn=Object(P.useState)(!1),$n=Object(Y.a)(Rn,2),Bn=$n[0],zn=$n[1],Xn=Object(P.useState)(null),Vn=Object(Y.a)(Xn,2),Fn=Vn[0],Jn=Vn[1],er="".concat(Se,"-more-popup"),jr="".concat(We,"-dropdown"),tr=Fn!==null?"".concat(er,"-").concat(Fn):null,_n=ve==null?void 0:ve.dropdownAriaLabel,vn=P.createElement(Zn,{onClick:function(Ar){var xr=Ar.key,zr=Ar.domEvent;Nt(xr,zr),zn(!1)},id:er,tabIndex:-1,role:"listbox","aria-activedescendant":tr,selectedKeys:[Fn],"aria-label":_n!==void 0?_n:"expanded dropdown"},ie.map(function(ir){return P.createElement(Gn,{key:ir.key,id:"".concat(er,"-").concat(ir.key),role:"option","aria-controls":Se&&"".concat(Se,"-panel-").concat(ir.key),disabled:ir.disabled},ir.tab)}));function Wn(ir){for(var Ar=ie.filter(function(yi){return!yi.disabled}),xr=Ar.findIndex(function(yi){return yi.key===Fn})||0,zr=Ar.length,Qr=0;Qrdr?(cr=vn,er.current="x"):(cr=Wn,er.current="y");var Br=Date.now();Br-Fn.current>100&&(Jn.current=!1),(Le(-cr,-cr)||Jn.current)&&(_n.preventDefault(),Jn.current=!0),Fn.current=Br}var tr=Object(P.useRef)(null);tr.current={onTouchStart:zn,onTouchMove:Xn,onTouchEnd:Vn,onWheel:jr},P.useEffect(function(){function _n(an){tr.current.onTouchStart(an)}function vn(an){tr.current.onTouchMove(an)}function Wn(an){tr.current.onTouchEnd(an)}function cr(an){tr.current.onWheel(an)}return document.addEventListener("touchmove",vn,{passive:!1}),document.addEventListener("touchend",Wn,{passive:!1}),Ee.current.addEventListener("touchstart",_n,{passive:!1}),Ee.current.addEventListener("wheel",cr),function(){document.removeEventListener("touchmove",vn),document.removeEventListener("touchend",Wn)}},[])}function ya(){var Ee=Object(P.useRef)(new Map);function Le(Se){return Ee.current.has(Se)||Ee.current.set(Se,P.createRef()),Ee.current.get(Se)}function We(Se){Ee.current.delete(Se)}return[Le,We]}function $a(Ee,Le){var We=P.useRef(Ee),Se=P.useState({}),ie=Object(Y.a)(Se,2),ve=ie[1];function le(Ae){var _e=typeof Ae=="function"?Ae(We.current):Ae;_e!==We.current&&Le(_e,We.current),We.current=_e,ve({})}return[We.current,le]}var co=function(Le){var We=Le.position,Se=Le.prefixCls,ie=Le.extra;if(!ie)return null;var ve,le=ie;return We==="right"&&(ve=le.right||!le.left&&le||null),We==="left"&&(ve=le.left||null),ve?P.createElement("div",{className:"".concat(Se,"-extra-content")},ve):null};function Ma(Ee,Le){var We,Se=P.useContext(ka),ie=Se.prefixCls,ve=Se.tabs,le=Ee.className,Ae=Ee.style,_e=Ee.id,Be=Ee.animated,je=Ee.activeKey,Ge=Ee.rtl,tt=Ee.extra,yt=Ee.editable,Tt=Ee.locale,Nt=Ee.tabPosition,Rn=Ee.tabBarGutter,$n=Ee.children,Bn=Ee.onTabClick,zn=Ee.onTabScroll,Xn=Object(P.useRef)(),Vn=Object(P.useRef)(),Fn=Object(P.useRef)(),Jn=Object(P.useRef)(),er=ya(),jr=Object(Y.a)(er,2),tr=jr[0],_n=jr[1],vn=Nt==="top"||Nt==="bottom",Wn=$a(0,function(_r,or){vn&&zn&&zn({direction:_r>or?"left":"right"})}),cr=Object(Y.a)(Wn,2),an=cr[0],dr=cr[1],Br=$a(0,function(_r,or){!vn&&zn&&zn({direction:_r>or?"top":"bottom"})}),ir=Object(Y.a)(Br,2),Ar=ir[0],xr=ir[1],zr=Object(P.useState)(0),Qr=Object(Y.a)(zr,2),Wr=Qr[0],yi=Qr[1],Ii=Object(P.useState)(0),Ci=Object(Y.a)(Ii,2),Zr=Ci[0],Pr=Ci[1],Tr=Object(P.useState)(0),wn=Object(Y.a)(Tr,2),wr=wn[0],Ui=wn[1],Zi=Object(P.useState)(0),ia=Object(Y.a)(Zi,2),Cr=ia[0],Xi=ia[1],Ji=Object(P.useState)(null),Rr=Object(Y.a)(Ji,2),yr=Rr[0],Hr=Rr[1],Ua=Object(P.useState)(null),Za=Object(Y.a)(Ua,2),ca=Za[0],Ea=Za[1],ti=Object(P.useState)(0),Yi=Object(Y.a)(ti,2),ja=Yi[0],Io=Yi[1],Po=Object(P.useState)(0),mo=Object(Y.a)(Po,2),Ja=mo[0],qa=mo[1],da=a(new Map),xa=Object(Y.a)(da,2),go=xa[0],Ba=xa[1],Ta=i(ve,go,Wr),ha="".concat(ie,"-nav-operations-hidden"),kr=0,Pi=0;vn?Ge?(kr=0,Pi=Math.max(0,Wr-yr)):(kr=Math.min(0,yr-Wr),Pi=0):(kr=Math.min(0,ca-Zr),Pi=0);function fa(_r){return _rPi?[Pi,!1]:[_r,!0]}var aa=Object(P.useRef)(),Sa=Object(P.useState)(),pa=Object(Y.a)(Sa,2),Fa=pa[0],eo=pa[1];function Wa(){eo(Date.now())}function to(){window.clearTimeout(aa.current)}va(Xn,function(_r,or){var ci=!1;function _i(sa,ea){sa(function(Ra){var la=fa(Ra+ea),li=Object(Y.a)(la,2),Da=li[0],it=li[1];return ci=it,Da})}if(vn){if(yr>=Wr)return ci;_i(dr,_r)}else{if(ca>=Zr)return ci;_i(xr,or)}return to(),Wa(),ci}),Object(P.useEffect)(function(){return to(),Fa&&(aa.current=window.setTimeout(function(){eo(0)},100)),to},[Fa]);function qi(){var _r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:je,or=Ta.get(_r);if(!or)return;if(vn){var ci=an;Ge?or.rightan+yr&&(ci=or.right+or.width-yr):or.left<-an?ci=-or.left:or.left+or.width>-an+yr&&(ci=-(or.left+or.width-yr)),xr(0),dr(fa(ci)[0])}else{var _i=Ar;or.top<-Ar?_i=-or.top:or.top+or.height>-Ar+ca&&(_i=-(or.top+or.height-ca)),dr(0),xr(fa(_i)[0])}}var oa=A(Ta,{width:yr,height:ca,left:an,top:Ar},{width:wr,height:Cr},{width:ja,height:Ja},Object(z.a)(Object(z.a)({},Ee),{},{tabs:ve})),no=Object(Y.a)(oa,2),ro=no[0],ko=no[1],Mo=ve.map(function(_r){var or=_r.key;return P.createElement(u,{id:_e,prefixCls:ie,key:or,rtl:Ge,tab:_r,closable:_r.closable,editable:yt,active:or===je,tabPosition:Nt,tabBarGutter:Rn,renderWrapper:$n,removeAriaLabel:Tt==null?void 0:Tt.removeAriaLabel,ref:tr(or),onClick:function(_i){Bn(or,_i)},onRemove:function(){_n(or)},onFocus:function(){qi(or),Wa(),Ge||(Xn.current.scrollLeft=0),Xn.current.scrollTop=0}})}),io=c(function(){var _r,or,ci,_i,sa,ea,Ra,la,li,Da=((_r=Xn.current)===null||_r===void 0?void 0:_r.offsetWidth)||0,it=((or=Xn.current)===null||or===void 0?void 0:or.offsetHeight)||0,Je=((ci=Jn.current)===null||ci===void 0?void 0:ci.offsetWidth)||0,$e=((_i=Jn.current)===null||_i===void 0?void 0:_i.offsetHeight)||0,ot=((sa=Fn.current)===null||sa===void 0?void 0:sa.offsetWidth)||0,ut=((ea=Fn.current)===null||ea===void 0?void 0:ea.offsetHeight)||0;Hr(Da),Ea(it),Io(Je),qa($e);var At=(((Ra=Vn.current)===null||Ra===void 0?void 0:Ra.offsetWidth)||0)-Je,St=(((la=Vn.current)===null||la===void 0?void 0:la.offsetHeight)||0)-$e;yi(At),Pr(St);var wt=(li=Fn.current)===null||li===void 0?void 0:li.className.includes(ha);Ui(At-(wt?0:ot)),Xi(St-(wt?0:ut)),Ba(function(){var cn=new Map;return ve.forEach(function(nr){var Oi=nr.key,Hn=tr(Oi).current;Hn&&cn.set(Oi,{width:Hn.offsetWidth,height:Hn.offsetHeight,left:Hn.offsetLeft,top:Hn.offsetTop})}),cn})}),No=ve.slice(0,ro),ni=ve.slice(ko+1),Jr=[].concat(Object(I.a)(No),Object(I.a)(ni)),pi=Object(P.useState)(),qr=Object(Y.a)(pi,2),Aa=qr[0],Ha=qr[1],ki=Ta.get(je),ao=Object(P.useRef)();function Ka(){f.a.cancel(ao.current)}Object(P.useEffect)(function(){var _r={};return ki&&(vn?(Ge?_r.right=ki.right:_r.left=ki.left,_r.width=ki.width):(_r.top=ki.top,_r.height=ki.height)),Ka(),ao.current=f()(function(){Ha(_r)}),Ka},[ki,vn,Ge]),Object(P.useEffect)(function(){qi()},[je,ki,Ta,vn]),Object(P.useEffect)(function(){io()},[Ge,Rn,je,ve.map(function(_r){return _r.key}).join("_")]);var vo=!!Jr.length,ma="".concat(ie,"-nav-wrap"),Ga,Oa,yo,za;return vn?Ge?(Oa=an>0,Ga=an+yr` "'(~:]+/,a=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,u=" ";function s(m,v,H){return v.f=v.inline=H,H(m,v)}function i(m,v,H){return v.f=v.block=H,H(m,v)}function D(m){return!m||!/\S/.test(m.string)}function A(m){if(m.linkTitle=!1,m.linkHref=!1,m.linkText=!1,m.em=!1,m.strong=!1,m.strikethrough=!1,m.quote=0,m.indentedCode=!1,m.f==R){var v=P;if(!v){var H=te.innerMode(z,m.htmlState);v=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}v&&(m.f=h,m.block=S,m.htmlState=null)}return m.trailingSpace=0,m.trailingSpaceNewLine=!1,m.prevLine=m.thisLine,m.thisLine={stream:null},null}function S(m,v){var H=m.column()===v.indentation,X=D(v.prevLine.stream),q=v.indentedCode,re=v.prevLine.hr,ye=v.list!==!1,pe=(v.listStack[v.listStack.length-1]||0)+3;v.indentedCode=!1;var ue=v.indentation;if(v.indentationDiff===null&&(v.indentationDiff=v.indentation,ye)){for(v.list=null;ue=4&&(q||v.prevLine.fencedCodeEnd||v.prevLine.header||X))return m.skipToEnd(),v.indentedCode=!0,G.code;if(m.eatSpace())return null;if(H&&v.indentation<=pe&&(se=m.match(f))&&se[1].length<=6)return v.quote=0,v.header=se[1].length,v.thisLine.header=!0,N.highlightFormatting&&(v.formatting="header"),v.f=v.inline,g(v);if(v.indentation<=pe&&m.eat(">"))return v.quote=H?1:v.quote+1,N.highlightFormatting&&(v.formatting="quote"),m.eatSpace(),g(v);if(!be&&!v.setext&&H&&v.indentation<=pe&&(se=m.match(I))){var ae=se[1]?"ol":"ul";return v.indentation=ue+m.current().length,v.list=!0,v.quote=0,v.listStack.push(v.indentation),v.em=!1,v.strong=!1,v.code=!1,v.strikethrough=!1,N.taskLists&&m.match(E,!1)&&(v.taskList=!0),v.f=v.inline,N.highlightFormatting&&(v.formatting=["list","list-"+ae]),g(v)}else{if(H&&v.indentation<=pe&&(se=m.match(a,!0)))return v.quote=0,v.fencedEndRE=new RegExp(se[1]+"+ *$"),v.localMode=N.fencedCodeBlockHighlighting&&F(se[2]||N.fencedCodeBlockDefaultMode),v.localMode&&(v.localState=te.startState(v.localMode)),v.f=v.block=O,N.highlightFormatting&&(v.formatting="code-block"),v.code=-1,g(v);if(v.setext||(!fe||!ye)&&!v.quote&&v.list===!1&&!v.code&&!be&&!p.test(m.string)&&(se=m.lookAhead(1))&&(se=se.match(b)))return v.setext?(v.header=v.setext,v.setext=0,m.skipToEnd(),N.highlightFormatting&&(v.formatting="header")):(v.header=se[0].charAt(0)=="="?1:2,v.setext=v.header),v.thisLine.header=!0,v.f=v.inline,g(v);if(be)return m.skipToEnd(),v.hr=!0,v.thisLine.hr=!0,G.hr;if(m.peek()==="[")return s(m,v,j)}return s(m,v,v.inline)}function R(m,v){var H=z.token(m,v.htmlState);if(!P){var X=te.innerMode(z,v.htmlState);(X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText||v.md_inside&&m.current().indexOf(">")>-1)&&(v.f=h,v.block=S,v.htmlState=null)}return H}function O(m,v){var H=v.listStack[v.listStack.length-1]||0,X=v.indentation=m.quote?v.push(G.formatting+"-"+m.formatting[H]+"-"+m.quote):v.push("error"))}if(m.taskOpen)return v.push("meta"),v.length?v.join(" "):null;if(m.taskClosed)return v.push("property"),v.length?v.join(" "):null;if(m.linkHref?v.push(G.linkHref,"url"):(m.strong&&v.push(G.strong),m.em&&v.push(G.em),m.strikethrough&&v.push(G.strikethrough),m.emoji&&v.push(G.emoji),m.linkText&&v.push(G.linkText),m.code&&v.push(G.code),m.image&&v.push(G.image),m.imageAltText&&v.push(G.imageAltText,"link"),m.imageMarker&&v.push(G.imageMarker)),m.header&&v.push(G.header,G.header+"-"+m.header),m.quote&&(v.push(G.quote),!N.maxBlockquoteDepth||N.maxBlockquoteDepth>=m.quote?v.push(G.quote+"-"+m.quote):v.push(G.quote+"-"+N.maxBlockquoteDepth)),m.list!==!1){var X=(m.listStack.length-1)%3;X?X===1?v.push(G.list2):v.push(G.list3):v.push(G.list1)}return m.trailingSpaceNewLine?v.push("trailing-space-new-line"):m.trailingSpace&&v.push("trailing-space-"+(m.trailingSpace%2?"a":"b")),v.length?v.join(" "):null}function _(m,v){return m.match(c,!0)?g(v):void 0}function h(m,v){var H=v.text(m,v);if(typeof H!="undefined")return H;if(v.list)return v.list=null,g(v);if(v.taskList){var X=m.match(E,!0)[1]===" ";return X?v.taskOpen=!0:v.taskClosed=!0,N.highlightFormatting&&(v.formatting="task"),v.taskList=!1,g(v)}if(v.taskOpen=!1,v.taskClosed=!1,v.header&&m.match(/^#+$/,!0))return N.highlightFormatting&&(v.formatting="header"),g(v);var q=m.next();if(v.linkTitle){v.linkTitle=!1;var re=q;q==="("&&(re=")"),re=(re+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+re+"\\\\]+|\\\\\\\\|\\\\.)"+re;if(m.match(new RegExp(ye),!0))return G.linkHref}if(q==="`"){var pe=v.formatting;N.highlightFormatting&&(v.formatting="code"),m.eatWhile("`");var ue=m.current().length;if(v.code==0&&(!v.quote||ue==1))return v.code=ue,g(v);if(ue==v.code){var fe=g(v);return v.code=0,fe}else return v.formatting=pe,g(v)}else if(v.code)return g(v);if(q==="\\"&&(m.next(),N.highlightFormatting)){var be=g(v),se=G.formatting+"-escape";return be?be+" "+se:se}if(q==="!"&&m.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return v.imageMarker=!0,v.image=!0,N.highlightFormatting&&(v.formatting="image"),g(v);if(q==="["&&v.imageMarker&&m.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return v.imageMarker=!1,v.imageAltText=!0,N.highlightFormatting&&(v.formatting="image"),g(v);if(q==="]"&&v.imageAltText){N.highlightFormatting&&(v.formatting="image");var be=g(v);return v.imageAltText=!1,v.image=!1,v.inline=v.f=C,be}if(q==="["&&!v.image)return v.linkText&&m.match(/^.*?\]/)||(v.linkText=!0,N.highlightFormatting&&(v.formatting="link")),g(v);if(q==="]"&&v.linkText){N.highlightFormatting&&(v.formatting="link");var be=g(v);return v.linkText=!1,v.inline=v.f=m.match(/\(.*?\)| ?\[.*?\]/,!1)?C:h,be}if(q==="<"&&m.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){v.f=v.inline=d,N.highlightFormatting&&(v.formatting="link");var be=g(v);return be?be+=" ":be="",be+G.linkInline}if(q==="<"&&m.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){v.f=v.inline=d,N.highlightFormatting&&(v.formatting="link");var be=g(v);return be?be+=" ":be="",be+G.linkEmail}if(N.xml&&q==="<"&&m.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=m.string.indexOf(">",m.pos);if(ae!=-1){var Ce=m.string.substring(m.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ce)&&(v.md_inside=!0)}return m.backUp(1),v.htmlState=te.startState(z),i(m,v,R)}if(N.xml&&q==="<"&&m.match(/^\/\w*?>/))return v.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var ze=1,Ye=m.pos==1?" ":m.string.charAt(m.pos-2);ze<3&&m.eat(q);)ze++;var He=m.peek()||" ",Ve=!/\s/.test(He)&&(!l.test(He)||/\s/.test(Ye)||l.test(Ye)),Fe=!/\s/.test(Ye)&&(!l.test(Ye)||/\s/.test(He)||l.test(He)),Ke=null,nt=null;if(ze%2&&(!v.em&&Ve&&(q==="*"||!Fe||l.test(Ye))?Ke=!0:v.em==q&&Fe&&(q==="*"||!Ve||l.test(He))&&(Ke=!1)),ze>1&&(!v.strong&&Ve&&(q==="*"||!Fe||l.test(Ye))?nt=!0:v.strong==q&&Fe&&(q==="*"||!Ve||l.test(He))&&(nt=!1)),nt!=null||Ke!=null){N.highlightFormatting&&(v.formatting=Ke==null?"strong":nt==null?"em":"strong em"),Ke===!0&&(v.em=q),nt===!0&&(v.strong=q);var fe=g(v);return Ke===!1&&(v.em=!1),nt===!1&&(v.strong=!1),fe}}else if(q===" "&&(m.eat("*")||m.eat("_"))){if(m.peek()===" ")return g(v);m.backUp(1)}if(N.strikethrough){if(q==="~"&&m.eatWhile(q)){if(v.strikethrough){N.highlightFormatting&&(v.formatting="strikethrough");var fe=g(v);return v.strikethrough=!1,fe}else if(m.match(/^[^\s]/,!1))return v.strikethrough=!0,N.highlightFormatting&&(v.formatting="strikethrough"),g(v)}else if(q===" "&&m.match(/^~~/,!0)){if(m.peek()===" ")return g(v);m.backUp(2)}}if(N.emoji&&q===":"&&m.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){v.emoji=!0,N.highlightFormatting&&(v.formatting="emoji");var de=g(v);return v.emoji=!1,de}return q===" "&&(m.match(/^ +$/,!1)?v.trailingSpace++:v.trailingSpace&&(v.trailingSpaceNewLine=!0)),g(v)}function d(m,v){var H=m.next();if(H===">"){v.f=v.inline=h,N.highlightFormatting&&(v.formatting="link");var X=g(v);return X?X+=" ":X="",X+G.linkInline}return m.match(/^[^>]+/,!0),G.linkInline}function C(m,v){if(m.eatSpace())return null;var H=m.next();return H==="("||H==="["?(v.f=v.inline=w(H==="("?")":"]"),N.highlightFormatting&&(v.formatting="link-string"),v.linkHref=!0,g(v)):"error"}var x={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(m){return function(v,H){var X=v.next();if(X===m){H.f=H.inline=h,N.highlightFormatting&&(H.formatting="link-string");var q=g(H);return H.linkHref=!1,q}return v.match(x[m]),H.linkHref=!0,g(H)}}function j(m,v){return m.match(/^([^\]\\]|\\.)*\]:/,!1)?(v.f=W,m.next(),N.highlightFormatting&&(v.formatting="link"),v.linkText=!0,g(v)):s(m,v,h)}function W(m,v){if(m.match(/^\]:/,!0)){v.f=v.inline=T,N.highlightFormatting&&(v.formatting="link");var H=g(v);return v.linkText=!1,H}return m.match(/^([^\]\\]|\\.)+/,!0),G.linkText}function T(m,v){return m.eatSpace()?null:(m.match(/^[^\s]+/,!0),m.peek()===void 0?v.linkTitle=!0:m.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),v.f=v.inline=h,G.linkHref+" url")}var M={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:h,text:_,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(m){return{f:m.f,prevLine:m.prevLine,thisLine:m.thisLine,block:m.block,htmlState:m.htmlState&&te.copyState(z,m.htmlState),indentation:m.indentation,localMode:m.localMode,localState:m.localMode?te.copyState(m.localMode,m.localState):null,inline:m.inline,text:m.text,formatting:!1,linkText:m.linkText,linkTitle:m.linkTitle,linkHref:m.linkHref,code:m.code,em:m.em,strong:m.strong,strikethrough:m.strikethrough,emoji:m.emoji,header:m.header,setext:m.setext,hr:m.hr,taskList:m.taskList,list:m.list,listStack:m.listStack.slice(0),quote:m.quote,indentedCode:m.indentedCode,trailingSpace:m.trailingSpace,trailingSpaceNewLine:m.trailingSpaceNewLine,md_inside:m.md_inside,fencedEndRE:m.fencedEndRE}},token:function(m,v){if(v.formatting=!1,m!=v.thisLine.stream){if(v.header=0,v.hr=!1,m.match(/^\s*$/,!0))return A(v),null;if(v.prevLine=v.thisLine,v.thisLine={stream:m},v.taskList=!1,v.trailingSpace=0,v.trailingSpaceNewLine=!1,!v.localState&&(v.f=v.block,v.f!=R)){var H=m.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(v.indentation=H,v.indentationDiff=null,H>0)return null}}return v.f(m,v)},innerMode:function(m){return m.block==R?{state:m.htmlState,mode:z}:m.localState?{state:m.localState,mode:m.localMode}:{state:m,mode:M}},indent:function(m,v,H){return m.block==R&&z.indent?z.indent(m.htmlState,v,H):m.localState&&m.localMode.indent?m.localMode.indent(m.localState,v,H):te.Pass},blankLine:A,getType:g,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},mgmH:function(ct,ge,U){"use strict";U.d(ge,"d",function(){return b}),U.d(ge,"b",function(){return c}),U.d(ge,"e",function(){return a}),U.d(ge,"c",function(){return p}),U.d(ge,"n",function(){return l}),U.d(ge,"g",function(){return u}),U.d(ge,"h",function(){return s}),U.d(ge,"j",function(){return D}),U.d(ge,"a",function(){return A}),U.d(ge,"l",function(){return S}),U.d(ge,"f",function(){return R}),U.d(ge,"k",function(){return O}),U.d(ge,"m",function(){return g}),U.d(ge,"i",function(){return _}),U.d(ge,"o",function(){return h}),U.d(ge,"t",function(){return d}),U.d(ge,"s",function(){return C}),U.d(ge,"p",function(){return x}),U.d(ge,"q",function(){return w}),U.d(ge,"r",function(){return j}),U.d(ge,"v",function(){return W}),U.d(ge,"u",function(){return T});var te=U("miYZ"),Y=U("tsqr"),N=U("k1fw"),z=U("9og8"),P=U("WmNS"),F=U.n(P),G=U("oUNq"),K=U("9kvl"),n=U("1vsH"),I=U("m3rI"),E=function(){Object(K.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},f=function(){Object(K.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},b=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return E(),q.next=3,Object(G.t)(Object(N.a)({},v));case 3:if(H=q.sent,!(H.status===0)){q.next=7;break}return q.next=7,Object(n.w)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/".concat(v.coursesId,"/export_couser_info.json"),query:v}));case 7:f();case 8:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),c=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.r)(Object(N.a)({},v));case 2:if(H=q.sent,!(H.status===0)){q.next=8;break}Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_member_act_score")),q.next=13;break;case 8:if(!(H.status===-2)){q.next=12;break}return q.abrupt("return",H);case 12:H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),a=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.u)(Object(N.a)({},v));case 2:if(H=q.sent,!(H.status===0)){q.next=8;break}Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_score")),q.next=13;break;case 8:if(!(H.status===-2)){q.next=12;break}return q.abrupt("return",H);case 12:H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_score")));case 13:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),p=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.s)(Object(N.a)({},v));case 2:if(H=q.sent,!(H.status===0)){q.next=8;break}Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_exercise_and_other")),q.next=13;break;case 8:if(!(H.status===-2)){q.next=12;break}return q.abrupt("return",H);case 12:H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),l=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.z)(Object(N.a)({},v));case 2:if(H=q.sent,!(H.status===0)){q.next=8;break}Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_exercise_and_other")),q.next=13;break;case 8:if(!(H.status===-2)){q.next=12;break}return q.abrupt("return",H);case 12:H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),u=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.v)(Object(N.a)({},v));case 2:if(H=q.sent,!(H.status===0)){q.next=8;break}Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_homework")),q.next=13;break;case 8:if(!(H.status===-2)){q.next=12;break}return q.abrupt("return",H);case 12:H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),s=function(){var M=Object(z.a)(F.a.mark(function m(v,H){var X;return F.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,Object(G.x)(Object(N.a)({},v));case 2:X=re.sent,X.status===0?(Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/").concat(H))):X.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/").concat(H)));case 4:case"end":return re.stop()}},m)}));return function(v,H){return M.apply(this,arguments)}}(),i=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return E(),q.next=3,Object(G.w)(Object(N.a)({},v));case 3:if(H=q.sent,!(H.status===0)){q.next=7;break}return q.next=7,Object(n.w)("",Object(n.Y)({url:I.a.API_SERVER+"/api/homework_commons/".concat(v.categoryId,"/works_list.zip"),query:v}));case 7:f();case 8:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),D=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return E(),q.next=3,Object(G.A)(Object(N.a)({},v));case 3:if(H=q.sent,!(H.status===0)){q.next=7;break}return q.next=7,Object(n.w)("",Object(n.Y)({url:I.a.API_SERVER+"/api/polls/".concat(v.categoryId,"/commit_result.xlsx"),query:v}));case 7:f();case 8:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),A=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/".concat(v.coursesId,"/attendances/export_xlsx_data.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),S=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/".concat(v.coursesId,"/video_study_statics.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),R=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/".concat(v.coursesId,"/export_course_students_info.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),O=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/item_banks/export.xlsx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),g=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),_=function(){var M=Object(z.a)(F.a.mark(function m(v){var H;return F.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(G.y)(Object(N.a)({},v));case 2:H=q.sent,H.status===0?(Y.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/exercise_score"))):H.status===-3&&(Object(K.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),K.d.push("/classrooms/".concat(v.coursesId,"/exportlist/exercise_score")));case 4:case"end":return q.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),h=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),X.next=3,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/export_records/".concat(v.id,".xlsx"),query:v}));case 3:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),d=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),C=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/ec_years/".concat(v==null?void 0:v.ec_year_id,"/ec_training_objectives.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),x=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)(v==null?void 0:v.name,Object(n.Y)({url:I.a.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),w=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/ec_years/".concat(v==null?void 0:v.ec_year_id,"/ec_courses.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),j=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/ec_years/".concat(v==null?void 0:v.ec_year_id,"/ec_graduation_requirements.xlsx"),query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),W=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/rank_list.xlsx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}(),T=function(){var M=Object(z.a)(F.a.mark(function m(v){return F.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,Object(n.v)("",Object(n.Y)({url:I.a.API_SERVER+"/api/courses/question_rank_list.xlsx",query:v}));case 2:case"end":return X.stop()}},m)}));return function(v){return M.apply(this,arguments)}}()},nEHx:function(ct,ge,U){"use strict";U.d(ge,"a",function(){return te});var te;(function(Y){Y.DARK="dark",Y.LIGHT="light",Y.HIGH_CONTRAST="hc"})(te||(te={}))},nSDg:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___2lqeg",flex_space_between:"flex_space_between___RuZ2s",flex_box_vertical_center:"flex_box_vertical_center___2AGHP",flex_box_center_end:"flex_box_center_end___FDazu",flex_box_column:"flex_box_column___1Yqjx",wrp:"wrp____lZAZ",drawer:"drawer___2XpEN",menu:"menu___fZQrG",actived:"actived___1Yg9q",actived2:"actived2___2KHN5",subTag:"subTag___3AbgU",directionName:"directionName___2Xp-L",menuDirection:"menuDirection___1ZMmo",listItem:"listItem___g9W0X",info:"info___1FHWU",title:"title___1VzwI",titleLeft:"titleLeft___yvqaz",titleRight:"titleRight___2Dqm5",search:"search___3pcQt",description:"description___3yQGh",menuCourse:"menuCourse___3iBFc",paginationWrap:"paginationWrap___KxpDN"}},nnTU:function(ct,ge,U){"use strict";U.d(ge,"b",function(){return G}),U.d(ge,"a",function(){return K});var te=U("MI8n"),Y=U("JYp7"),N=U("pmY6"),z=U("24hK"),P=U("746U"),F=U("Cg/j");const G=Object(F.c)("commandService"),K=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new te.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,I){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!I)throw new Error("invalid command");return this.registerCommand({id:n,handler:I})}if(n.description){const a=[];for(let l of n.description.args)a.push(l.constraint);const p=n.handler;n.handler=function(l,...u){return Object(P.o)(u,a),p(l,...u)}}const{id:E}=n;let f=this._commands.get(E);f||(f=new z.a,this._commands.set(E,f));let b=f.unshift(n),c=Object(N.i)(()=>{b();const a=this._commands.get(E);(a==null?void 0:a.isEmpty())&&this._commands.delete(E)});return this._onDidRegisterCommand.fire(E),c}registerCommandAlias(n,I){return K.registerCommand(n,(E,...f)=>E.get(G).executeCommand(I,...f))}getCommand(n){const I=this._commands.get(n);return!I||I.isEmpty()?void 0:Y.a.first(I)}getCommands(){const n=new Map;for(const I of this._commands.keys()){const E=this.getCommand(I);E&&n.set(I,E)}return n}};K.registerCommand("noop",()=>{})},osHv:function(ct,ge,U){(function(te){te(U("VrN/"))})(function(te){"use strict";var Y=te.Pos;function N(l,u){return l.line-u.line||l.ch-u.ch}var z="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",P=z+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",F=new RegExp("<(/?)(["+z+"]["+P+"]*)","g");function G(l,u,s,i){this.line=u,this.ch=s,this.cm=l,this.text=l.getLine(u),this.min=i?Math.max(i.from,l.firstLine()):l.firstLine(),this.max=i?Math.min(i.to-1,l.lastLine()):l.lastLine()}function K(l,u){var s=l.cm.getTokenTypeAt(Y(l.line,u));return s&&/\btag\b/.test(s)}function n(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function I(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function E(l){for(;;){var u=l.text.indexOf(">",l.ch);if(u==-1){if(n(l))continue;return}if(!K(l,u+1)){l.ch=u+1;continue}var s=l.text.lastIndexOf("/",u),i=s>-1&&!/\S/.test(l.text.slice(s+1,u));return l.ch=u+1,i?"selfClose":"regular"}}function f(l){for(;;){var u=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(u==-1){if(I(l))continue;return}if(!K(l,u+1)){l.ch=u;continue}F.lastIndex=u,l.ch=u;var s=F.exec(l.text);if(s&&s.index==u)return s}}function b(l){for(;;){F.lastIndex=l.ch;var u=F.exec(l.text);if(!u){if(n(l))continue;return}if(!K(l,u.index+1)){l.ch=u.index+1;continue}return l.ch=u.index+u[0].length,u}}function c(l){for(;;){var u=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(u==-1){if(I(l))continue;return}if(!K(l,u+1)){l.ch=u;continue}var s=l.text.lastIndexOf("/",u),i=s>-1&&!/\S/.test(l.text.slice(s+1,u));return l.ch=u+1,i?"selfClose":"regular"}}function a(l,u){for(var s=[];;){var i=b(l),D,A=l.line,S=l.ch-(i?i[0].length:0);if(!i||!(D=E(l)))return;if(D=="selfClose")continue;if(i[1]){for(var R=s.length-1;R>=0;--R)if(s[R]==i[2]){s.length=R;break}if(R<0&&(!u||u==i[2]))return{tag:i[2],from:Y(A,S),to:Y(l.line,l.ch)}}else s.push(i[2])}}function p(l,u){for(var s=[];;){var i=c(l);if(!i)return;if(i=="selfClose"){f(l);continue}var D=l.line,A=l.ch,S=f(l);if(!S)return;if(S[1])s.push(S[2]);else{for(var R=s.length-1;R>=0;--R)if(s[R]==S[2]){s.length=R;break}if(R<0&&(!u||u==S[2]))return{tag:S[2],from:Y(l.line,l.ch),to:Y(D,A)}}}}te.registerHelper("fold","xml",function(l,u){for(var s=new G(l,u.line,0);;){var i=b(s);if(!i||s.line!=u.line)return;var D=E(s);if(!D)return;if(!i[1]&&D!="selfClose"){var A=Y(s.line,s.ch),S=a(s,i[2]);return S&&N(S.from,A)>0?{from:A,to:S.from}:null}}}),te.findMatchingTag=function(l,u,s){var i=new G(l,u.line,u.ch,s);if(i.text.indexOf(">")==-1&&i.text.indexOf("<")==-1)return;var D=E(i),A=D&&Y(i.line,i.ch),S=D&&f(i);if(!D||!S||N(i,u)>0)return;var R={from:Y(i.line,i.ch),to:A,tag:S[2]};return D=="selfClose"?{open:R,close:null,at:"open"}:S[1]?{open:p(i,S[2]),close:R,at:"close"}:(i=new G(l,A.line,A.ch,s),{open:R,close:a(i,S[2]),at:"open"})},te.findEnclosingTag=function(l,u,s,i){for(var D=new G(l,u.line,u.ch,s);;){var A=p(D,i);if(!A)break;var S=new G(l,u.line,u.ch,s),R=a(S,A.tag);if(R)return{open:A,close:R}}},te.scanForClosingTag=function(l,u,s,i){var D=new G(l,u.line,u.ch,i?{from:0,to:i}:null);return a(D,s)}})},p5ED:function(ct,ge,U){"use strict";var te=U("+L6B"),Y=U("2/Rp"),N=U("5Dmo"),z=U("3S7+"),P=U("k1fw"),F=U("9og8"),G=U("tJVT"),K=U("WmNS"),n=U.n(K),I=U("q1tI"),E=U.n(I),f=U("vHTk"),b=U.n(f),c=U("yEEn"),a=U("ZW9T"),p=U("1vsH"),l=U("V0Rq"),u=U("m3rI");ge.a=function(s){var i,D,A,S,R,O,g,_=s.editOffice,h=_===void 0?"view":_,d=s.data,C=s.theme,x=s.type,w=s.filename,j=s.monacoEditor,W=s.className,T=s.style,M=s.close,m=s.onClose,v=s.hasMask,H=s.disabledDownload,X=Object(I.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),q=Object(G.a)(X,2),re=q[0],ye=q[1],pe=Object(I.useState)(""),ue=Object(G.a)(pe,2),fe=ue[0],be=ue[1],se=Object(I.useState)(),ae=Object(G.a)(se,2),Ce=ae[0],ze=ae[1],Ye=window.ENV==="build"?"/react/build":"",He=u.a.PROXY_SERVER||location.origin,Ve,Fe=1024*1024,Ke=10*Fe,nt=Object(I.useRef)();(i=d)!==null&&i!==void 0&&i.startsWith("/api")&&x!=="txt"&&(d=u.a.API_SERVER+d),x==="office"&&(Ve=Object(p.T)(d).filesize,Ve>Ke&&(x="other")),w&&j&&(j.filename=w),Object(I.useEffect)(function(){var Ue,rt,lt=(Ue=document.cookie)===null||Ue===void 0||((rt=Ue.replace(/\s/g,""))===null||rt===void 0)?void 0:rt.split(";");lt==null||lt.map(function(ft){var at=ft.split("=");at[0]==="_educoder_session"&&be(at[1])})},[]),Object(I.useEffect)(function(){x==="office"&&de()},[x,d]);var de=function(){var Ue=Object(F.a)(n.a.mark(function rt(){var lt,ft,at;return n.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return console.log("data:",d),lt=d,d.startsWith("http")||(lt=location.origin+lt),ft=new URL(lt).pathname.split("/").pop(),gt.next=6,Object(l.V)({attachment_id:ft});case 6:at=gt.sent,ze(at);case 8:case"end":return gt.stop()}},rt)}));return function(){return Ue.apply(this,arguments)}}(),De=function(){if(d.startsWith("http")||d.startsWith("blob:")){Ne();return}Object(p.z)(w||"educoder",d,w)},Ne=function(){Object(p.x)(w||"educoder",decodeURIComponent(d))};return E.a.createElement("div",{style:Object(P.a)({},T||{}),className:"".concat(v&&b.a.bgBlack," ").concat(x?b.a.wrp:"hide")},M&&E.a.createElement("div",{className:b.a.close,ref:nt},!H&&E.a.createElement(z.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return nt.current}},E.a.createElement("span",{onClick:Ne},E.a.createElement("i",{className:"icon-quxiaozhiding"}))),E.a.createElement(z.a,{title:"\u5173\u95ED",getPopupContainer:function(){return nt.current}},E.a.createElement("span",{className:"",onClick:m},E.a.createElement("i",{className:"icon-guanbi1"})))),E.a.createElement("div",{className:"".concat(b.a[W]," ").concat(W," ").concat(b.a.monaco," ").concat(x==="txt"?"show":"hide")},x==="txt"&&E.a.createElement(a.b,j)),x==="audio"&&E.a.createElement("audio",{src:"".concat(((D=d)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((A=d)===null||A===void 0?void 0:A.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(d),autoPlay:!0}),x==="video"&&E.a.createElement(E.a.Fragment,null,((S=d)===null||S===void 0?void 0:S.indexOf("http"))>-1?E.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):E.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),x==="office"&&Ce&&E.a.createElement("iframe",{src:"".concat(Ye,"/office.html?key=").concat(Ce.key,"&url=").concat(He+Ce.url,"&callbackUrl=").concat(He+Ce.callbackUrl,"&fileType=").concat(Ce.fileType,"&title=").concat(Ce.title,"&model=").concat(h,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!H)}),x==="html"&&E.a.createElement("iframe",{src:d+"&disposition=inline"}),x==="pdf"&&E.a.createElement("iframe",{src:"".concat(Ye,"/js/pdfview/index.html?url=").concat(d,"&disabledDownload=").concat(!!H)}),x==="image"&&E.a.createElement("img",{src:"".concat(((R=d)===null||R===void 0?void 0:R.indexOf("http://"))>-1||((O=d)===null||O===void 0?void 0:O.indexOf("https://"))>-1||(g=d)!==null&&g!==void 0&&g.startsWith("/api")?"":"data:image/png;base64,").concat(d)}),x==="other"&&E.a.createElement("div",null,E.a.createElement(Y.a,{type:"primary",size:"large",onClick:De},E.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),x==="download"&&E.a.createElement(Y.a,{type:"primary",size:"large",onClick:De},E.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ct,ge,U){},pmY6:function(ct,ge,U){"use strict";U.d(ge,"h",function(){return I}),U.d(ge,"g",function(){return f}),U.d(ge,"f",function(){return b}),U.d(ge,"e",function(){return c}),U.d(ge,"i",function(){return a}),U.d(ge,"b",function(){return p}),U.d(ge,"a",function(){return l}),U.d(ge,"d",function(){return u}),U.d(ge,"c",function(){return s});var te=U("C/vA"),Y=U("JYp7");const N=!1;let z=null;function P(i){z=i}if(N){const i="__is_disposable_tracked__";P(new class{trackDisposable(D){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{D[i]||console.log(A)},3e3)}setParent(D,A){if(D&&D!==l.None)try{D[i]=!0}catch(S){}}markAsDisposed(D){if(D&&D!==l.None)try{D[i]=!0}catch(A){}}markAsSingleton(D){}})}function F(i){return z==null||z.trackDisposable(i),i}function G(i){z==null||z.markAsDisposed(i)}function K(i,D){z==null||z.setParent(i,D)}function n(i,D){if(!z)return;for(const A of i)z.setParent(A,D)}function I(i){return z==null||z.markAsSingleton(i),i}class E extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`);this.errors=i}}function f(i){return typeof i.dispose=="function"&&i.dispose.length===0}function b(i){if(Y.a.is(i)){let D=[];for(const A of i)if(A)try{A.dispose()}catch(S){D.push(S)}if(D.length===1)throw D[0];if(D.length>1)throw new E(D);return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function c(...i){const D=a(()=>b(i));return n(i,D),D}function a(i){const D=F({dispose:Object(te.a)(()=>{G(D),i()})});return D}class p{constructor(){this._toDispose=new Set,this._isDisposed=!1,F(this)}dispose(){if(this._isDisposed)return;G(this),this._isDisposed=!0,this.clear()}clear(){try{b(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return K(i,this),this._isDisposed?p.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}}p.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new p,F(this),K(this._store,this)}dispose(){G(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}l.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,F(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var D;if(this._isDisposed||i===this._value)return;(D=this._value)===null||D===void 0||D.dispose(),i&&K(i,this),this._value=i}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,G(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}clearAndLeak(){const i=this._value;return this._value=void 0,i&&K(i,null),i}}class s{constructor(i){this.object=i}dispose(){}}},psGv:function(ct,ge,U){var te,Y;(function(){var N;(function(){"use strict";var G=[,,function(E){function f(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}f.prototype.clone_empty=function(){var a=new f(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},f.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},f.prototype.has_match=function(a){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(a))return!0;return!1},f.prototype.set_indent=function(a,p){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},f.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(a){this.__items.push(a);var p=a.lastIndexOf(` `);p!==-1?this.__character_count=a.length-p:this.__character_count+=a.length},f.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function b(a,p){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),p=p||"",a.indent_level>0&&(p=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}b.prototype.get_indent_size=function(a,p){var l=this.__base_string_length;return p=p||0,a<0&&(l=0),l+=a*this.__indent_size,l+=p,l},b.prototype.get_indent_string=function(a,p){var l=this.__base_string;return p=p||0,a<0&&(a=0,l=""),p+=a*this.__indent_size,this.__ensure_cache(p),l+=this.__cache[p],l},b.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var a=this.__cache.length,p=0,l="";this.__indent_size&&a>=this.__indent_size&&(p=Math.floor(a/this.__indent_size),a-=p*this.__indent_size,l=new Array(p+1).join(this.__indent_string)),a&&(l+=new Array(a+1).join(" ")),this.__cache.push(l)};function c(a,p){this.__indent_cache=new b(a,p),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(a,p){return this.__indent_cache.get_indent_string(a,p)},c.prototype.get_indent_size=function(a,p){return this.__indent_cache.get_indent_size(a,p)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(a){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===` `&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(` `);return a!==` `&&(l=l.replace(/[\n]/g,a)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(a,p){return a=a||0,p=p||0,this.next_line.set_indent(a,p),this.__lines.length>1?(this.current_line.set_indent(a,p),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(a){for(var p=0;p1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(a,p){for(var l=this.__lines.length-2;l>=0;){var u=this.__lines[l];if(u.is_empty())break;if(u.item(0).indexOf(a)!==0&&u.item(-1)!==p){this.__lines.splice(l+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},E.exports.Output=c},function(E){function f(b,c,a,p){this.type=b,this.text=c,this.comments_before=null,this.newlines=a||0,this.whitespace_before=p||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}E.exports.Token=f},,,function(E){function f(a,p){this.raw_options=b(a,p),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}f.prototype._get_array=function(a,p){var l=this.raw_options[a],u=p||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(u=l.concat()):typeof l=="string"&&(u=l.split(/[^a-zA-Z0-9_\/\-]+/)),u},f.prototype._get_boolean=function(a,p){var l=this.raw_options[a],u=l===void 0?!!p:!!l;return u},f.prototype._get_characters=function(a,p){var l=this.raw_options[a],u=p||"";return typeof l=="string"&&(u=l.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),u},f.prototype._get_number=function(a,p){var l=this.raw_options[a];p=parseInt(p,10),isNaN(p)&&(p=0);var u=parseInt(l,10);return isNaN(u)&&(u=p),u},f.prototype._get_selection=function(a,p,l){var u=this._get_selection_list(a,p,l);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: `+p+` You passed in: '`+this.raw_options[a]+"'");return u[0]},f.prototype._get_selection_list=function(a,p,l){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[p[0]],!this._is_valid_selection(l,p))throw new Error("Invalid Default Value!");var u=this._get_array(a,l);if(!this._is_valid_selection(u,p))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: `+p+` You passed in: '`+this.raw_options[a]+"'");return u},f.prototype._is_valid_selection=function(a,p){return a.length&&p.length&&!a.some(function(l){return p.indexOf(l)===-1})};function b(a,p){var l={};a=c(a);var u;for(u in a)u!==p&&(l[u]=a[u]);if(p&&a[p])for(u in a[p])l[u]=a[p][u];return l}function c(a){var p={},l;for(l in a){var u=l.replace(/-/g,"_");p[u]=a[l]}return p}E.exports.Options=f,E.exports.normalizeOpts=c,E.exports.mergeOpts=b},,function(E){var f=RegExp.prototype.hasOwnProperty("sticky");function b(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position=0&&c=0&&a=c.length&&this.__input.substring(a-c.length,a).toLowerCase()===c},E.exports.InputScanner=b},function(E,f,b){var c=b(8).InputScanner,a=b(3).Token,p=b(10).TokenStream,l=b(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(i,D){this._input=new c(i),this._options=D||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new p,this._reset();for(var i,D=new a(u.START,""),A=null,S=[],R=new p;D.type!==u.EOF;){for(i=this._get_next_token(D,A);this._is_comment(i);)R.add(i),i=this._get_next_token(D,A);R.isEmpty()||(i.comments_before=R,R=new p),i.parent=A,this._is_opening(i)?(S.push(A),A=i):A&&this._is_closing(i,A)&&(i.opened=A,A.closed=i,A=S.pop(),i.parent=A),i.previous=D,D.next=i,this.__tokens.add(i),D=i}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(i,D){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(u.RAW,A):this._create_token(u.EOF,"")},s.prototype._is_comment=function(i){return!1},s.prototype._is_opening=function(i){return!1},s.prototype._is_closing=function(i,D){return!1},s.prototype._create_token=function(i,D){var A=new a(i,D,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},E.exports.Tokenizer=s,E.exports.TOKEN=u},function(E){function f(b){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=b}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position=0&&b/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}p.prototype=new c,p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){this.__set_templated_pattern()},p.prototype.disable=function(l){var u=this._create();return u._disabled[l]=!0,u._update(),u},p.prototype.read_options=function(l){var u=this._create();for(var s in a)u._disabled[s]=l.templating.indexOf(s)===-1;return u._update(),u},p.prototype.exclude=function(l){var u=this._create();return u._excluded[l]=!0,u._update(),u},p.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),l+=u,u=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},p.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},p.prototype._read_template=function(){var l="",u=this._input.peek();if(u==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(l=l||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},E.exports.TemplatablePattern=p},,,,function(E,f,b){var c=b(19).Beautifier,a=b(20).Options;function p(l,u,s,i){var D=new c(l,u,s,i);return D.beautify()}E.exports=p,E.exports.defaultOptions=function(){return new a}},function(E,f,b){var c=b(20).Options,a=b(2).Output,p=b(21).Tokenizer,l=b(21).TOKEN,u=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,i=function(C,x){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=C.max_preserve_newlines,this.preserve_newlines=C.preserve_newlines,this._output=new a(C,x)};i.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},i.prototype.set_space_before_token=function(C,x){this._output.space_before_token=C,this._output.non_breaking_space=x},i.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},i.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},i.prototype.print_preserved_newlines=function(C){var x=0;C.type!==l.TEXT&&C.previous.type!==l.TEXT&&(x=C.newlines?1:0),this.preserve_newlines&&(x=C.newlines0);return x!==0},i.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},i.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},i.prototype.print_newline=function(C){this._output.add_new_line(C)},i.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},i.prototype.indent=function(){this.indent_level++},i.prototype.get_full_indent=function(C){return C=this.indent_level+(C||0),C<1?"":this._output.get_indent_string(C)};var D=function(C){for(var x=null,w=C.next;w.type!==l.EOF&&C.closed!==w;){if(w.type===l.ATTRIBUTE&&w.text==="type"){w.next&&w.next.type===l.EQUALS&&w.next.next&&w.next.next.type===l.VALUE&&(x=w.next.next.text);break}w=w.next}return x},A=function(C,x){var w=null,j=null;return x.closed?(C==="script"?w="text/javascript":C==="style"&&(w="text/css"),w=D(x)||w,w.search("text/css")>-1?j="css":w.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?j="javascript":w.search(/(text|application|dojo)\/(x-)?(html)/)>-1?j="html":w.search(/test\/null/)>-1&&(j="null"),j):null};function S(C,x){return x.indexOf(C)!==-1}function R(C,x,w){this.parent=C||null,this.tag=x?x.tag_name:"",this.indent_level=w||0,this.parser_token=x||null}function O(C){this._printer=C,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(C){var x=new R(this._current_frame,C,this._printer.indent_level);this._current_frame=x},O.prototype._try_pop_frame=function(C){var x=null;return C&&(x=C.parser_token,this._printer.indent_level=C.indent_level,this._current_frame=C.parent),x},O.prototype._get_frame=function(C,x){for(var w=this._current_frame;w&&!(C.indexOf(w.tag)!==-1);){if(x&&x.indexOf(w.tag)!==-1){w=null;break}w=w.parent}return w},O.prototype.try_pop=function(C,x){var w=this._get_frame([C],x);return this._try_pop_frame(w)},O.prototype.indent_to_tag=function(C){var x=this._get_frame(C);x&&(this._printer.indent_level=x.indent_level)};function g(C,x,w,j){this._source_text=C||"",x=x||{},this._js_beautify=w,this._css_beautify=j,this._tag_stack=null;var W=new c(x,"html");this._options=W,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,x=this._options.eol;this._options.eol==="auto"&&(x=` `,C&&u.test(C)&&(x=C.match(u)[0])),C=C.replace(s,` `);var w=C.match(/^[\t ]*/)[0],j={text:"",type:""},W=new _,T=new i(this._options,w),M=new p(C,this._options).tokenize();this._tag_stack=new O(T);for(var m=null,v=M.next();v.type!==l.EOF;)v.type===l.TAG_OPEN||v.type===l.COMMENT?(m=this._handle_tag_open(T,v,W,j),W=m):v.type===l.ATTRIBUTE||v.type===l.EQUALS||v.type===l.VALUE||v.type===l.TEXT&&!W.tag_complete?m=this._handle_inside_tag(T,v,W,M):v.type===l.TAG_CLOSE?m=this._handle_tag_close(T,v,W):v.type===l.TEXT?m=this._handle_text(T,v,W):T.add_raw_token(v),j=m,v=M.next();var H=T._output.get_code(x);return H},g.prototype._handle_tag_close=function(C,x,w){var j={text:x.text,type:x.type};return C.alignment_size=0,w.tag_complete=!0,C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),w.is_unformatted?C.add_raw_token(x):(w.tag_start_char==="<"&&(C.set_space_before_token(x.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&w.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(x)),w.indent_content&&!(w.is_unformatted||w.is_content_unformatted)&&(C.indent(),w.indent_content=!1),!w.is_inline_element&&!(w.is_unformatted||w.is_content_unformatted)&&C.set_wrap_point(),j},g.prototype._handle_inside_tag=function(C,x,w,j){var W=w.has_wrapped_attrs,T={text:x.text,type:x.type};if(C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),w.is_unformatted)C.add_raw_token(x);else if(w.tag_start_char==="{"&&x.type===l.TEXT)C.print_preserved_newlines(x)?(x.newlines=0,C.add_raw_token(x)):C.print_token(x);else{if(x.type===l.ATTRIBUTE?(C.set_space_before_token(!0),w.attr_count+=1):(x.type===l.EQUALS||x.type===l.VALUE&&x.previous.type===l.EQUALS)&&C.set_space_before_token(!1),x.type===l.ATTRIBUTE&&w.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(C.traverse_whitespace(x),W=W||x.newlines!==0),this._is_wrap_attributes_force)){var M=w.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&w.attr_count===1){var m=!0,v=0,H;do{if(H=j.peek(v),H.type===l.ATTRIBUTE){m=!1;break}v+=1}while(v<4&&H.type!==l.EOF&&H.type!==l.TAG_CLOSE);M=!m}M&&(C.print_newline(!1),W=!0)}C.print_token(x),W=W||C.previous_token_wrapped(),w.has_wrapped_attrs=W}return T},g.prototype._handle_text=function(C,x,w){var j={text:x.text,type:"TK_CONTENT"};return w.custom_beautifier_name?this._print_custom_beatifier_text(C,x,w):w.is_unformatted||w.is_content_unformatted?C.add_raw_token(x):(C.traverse_whitespace(x),C.print_token(x)),j},g.prototype._print_custom_beatifier_text=function(C,x,w){var j=this;if(x.text!==""){var W=x.text,T,M=1,m="",v="";w.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:w.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:w.custom_beautifier_name==="html"&&(T=function(pe,ue){var fe=new g(pe,ue,j._js_beautify,j._css_beautify);return fe.beautify()}),this._options.indent_scripts==="keep"?M=0:this._options.indent_scripts==="separate"&&(M=-C.indent_level);var H=C.get_full_indent(M);if(W=W.replace(/\n[ \t]*$/,""),w.custom_beautifier_name!=="html"&&W[0]==="<"&&W.match(/^(|]]>)$/.exec(W);if(!X){C.add_raw_token(x);return}m=H+X[1]+` `,W=X[4],X[5]&&(v=H+X[5]),W=W.replace(/\n[ \t]*$/,""),(X[2]||X[3].indexOf(` `)!==-1)&&(X=X[3].match(/[ \t]+$/),X&&(x.whitespace_before=X[0]))}if(W)if(T){var q=function(){this.eol=` `};q.prototype=this._options.raw_options;var re=new q;W=T(H+W,re)}else{var ye=x.whitespace_before;ye&&(W=W.replace(new RegExp(` (`+ye+")?","g"),` `)),W=H+W.replace(/\n/g,` `+H)}m&&(W?W=m+W+` `+v:W=m+v),C.print_newline(!1),W&&(x.text=W,x.whitespace_before="",x.newlines=0,C.add_raw_token(x),C.print_newline(!0))}},g.prototype._handle_tag_open=function(C,x,w,j){var W=this._get_tag_open_token(x);return(w.is_unformatted||w.is_content_unformatted)&&!w.is_empty_element&&x.type===l.TAG_OPEN&&x.text.indexOf("]*)/),this.tag_check=w?w[1]:""):(w=x.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=w?w[1]:"",(x.text.startsWith("{{#>")||x.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&x.next!==null?this.tag_check=x.next.text.split(" ")[0]:this.tag_check=x.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),x.type===l.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||x.closed&&x.closed.text==="/>";var j=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(j=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(j)))}};g.prototype._get_tag_open_token=function(C){var x=new _(this._tag_stack.get_parser_token(),C);return x.alignment_size=this._options.wrap_attributes_indent_size,x.is_end_tag=x.is_end_tag||S(x.tag_check,this._options.void_elements),x.is_empty_element=x.tag_complete||x.is_start_tag&&x.is_end_tag,x.is_unformatted=!x.tag_complete&&S(x.tag_check,this._options.unformatted),x.is_content_unformatted=!x.is_empty_element&&S(x.tag_check,this._options.content_unformatted),x.is_inline_element=S(x.tag_name,this._options.inline)||x.tag_name.includes("-")||x.tag_start_char==="{",x},g.prototype._set_tag_position=function(C,x,w,j,W){if(w.is_empty_element||(w.is_end_tag?w.start_tag_token=this._tag_stack.try_pop(w.tag_name):(this._do_optional_end_element(w)&&(w.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(w),(w.tag_name==="script"||w.tag_name==="style")&&!(w.is_unformatted||w.is_content_unformatted)&&(w.custom_beautifier_name=A(w.tag_check,x)))),S(w.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),w.is_empty_element){if(w.tag_start_char==="{"&&w.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),w.indent_content=!0;var T=C.current_line_has_match(/{{#if/);T||C.print_newline(!1)}w.tag_name==="!--"&&W.type===l.TAG_CLOSE&&j.is_end_tag&&w.text.indexOf(` `)===-1||(w.is_inline_element||w.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,w))}else if(w.is_end_tag){var M=!1;M=w.start_tag_token&&w.start_tag_token.multiline_content,M=M||!w.is_inline_element&&!(j.is_inline_element||j.is_unformatted)&&!(W.type===l.TAG_CLOSE&&w.start_tag_token===j)&&W.type!=="TK_CONTENT",(w.is_content_unformatted||w.is_unformatted)&&(M=!1),M&&C.print_newline(!1)}else w.indent_content=!w.custom_beautifier_name,w.tag_start_char==="<"&&(w.tag_name==="html"?w.indent_content=this._options.indent_inner_html:w.tag_name==="head"?w.indent_content=this._options.indent_head_inner_html:w.tag_name==="body"&&(w.indent_content=this._options.indent_body_inner_html)),!(w.is_inline_element||w.is_unformatted)&&(W.type!=="TK_CONTENT"||w.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,w)},g.prototype._calcluate_parent_multiline=function(C,x){x.parent&&C._output.just_added_newline()&&!((x.is_inline_element||x.is_unformatted)&&x.parent.is_inline_element)&&(x.parent.multiline_content=!0)};var h=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],d=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(C){var x=null;if(C.is_empty_element||!C.is_start_tag||!C.parent)return;if(C.tag_name==="body")x=x||this._tag_stack.try_pop("head");else if(C.tag_name==="li")x=x||this._tag_stack.try_pop("li",["ol","ul"]);else if(C.tag_name==="dd"||C.tag_name==="dt")x=x||this._tag_stack.try_pop("dt",["dl"]),x=x||this._tag_stack.try_pop("dd",["dl"]);else if(C.parent.tag_name==="p"&&h.indexOf(C.tag_name)!==-1){var w=C.parent.parent;(!w||d.indexOf(w.tag_name)===-1)&&(x=x||this._tag_stack.try_pop("p"))}else C.tag_name==="rp"||C.tag_name==="rt"?(x=x||this._tag_stack.try_pop("rt",["ruby","rtc"]),x=x||this._tag_stack.try_pop("rp",["ruby","rtc"])):C.tag_name==="optgroup"?x=x||this._tag_stack.try_pop("optgroup",["select"]):C.tag_name==="option"?x=x||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):C.tag_name==="colgroup"?x=x||this._tag_stack.try_pop("caption",["table"]):C.tag_name==="thead"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"])):C.tag_name==="tbody"||C.tag_name==="tfoot"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("thead",["table"]),x=x||this._tag_stack.try_pop("tbody",["table"])):C.tag_name==="tr"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(C.tag_name==="th"||C.tag_name==="td")&&(x=x||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),x=x||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return C.parent=this._tag_stack.get_parser_token(),x},E.exports.Beautifier=g},function(E,f,b){var c=b(6).Options;function a(p){c.call(this,p,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}a.prototype=new c,E.exports.Options=a},function(E,f,b){var c=b(9).Tokenizer,a=b(9).TOKEN,p=b(13).Directives,l=b(14).TemplatablePattern,u=b(12).Pattern,s={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},i=new p(/<\!--/,/-->/),D=function(A,S){c.call(this,A,S),this._current_tag_name="";var R=new l(this._input).read_options(this._options),O=new u(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(//),cdata:O.starting_with(//),conditional_comment:O.starting_with(//),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(g).until_after(g)}};D.prototype=new c,D.prototype._is_comment=function(A){return!1},D.prototype._is_opening=function(A){return A.type===s.TAG_OPEN},D.prototype._is_closing=function(A,S){return A.type===s.TAG_CLOSE&&S&&((A.text===">"||A.text==="/>")&&S.text[0]==="<"||A.text==="}}"&&S.text[0]==="{"&&S.text[1]==="{")},D.prototype._reset=function(){this._current_tag_name=""},D.prototype._get_next_token=function(A,S){var R=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(s.EOF,""):(R=R||this._read_open_handlebars(O,S),R=R||this._read_attribute(O,A,S),R=R||this._read_close(O,S),R=R||this._read_raw_content(O,A,S),R=R||this._read_content_word(O),R=R||this._read_comment_or_cdata(O),R=R||this._read_processing(O),R=R||this._read_open(O,S),R=R||this._create_token(s.UNKNOWN,this._input.next()),R)},D.prototype._read_comment_or_cdata=function(A){var S=null,R=null,O=null;if(A==="<"){var g=this._input.peek(1);g==="!"&&(R=this.__patterns.comment.read(),R?(O=i.get_directives(R),O&&O.ignore==="start"&&(R+=i.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(S=this._create_token(s.COMMENT,R),S.directives=O)}return S},D.prototype._read_processing=function(A){var S=null,R=null,O=null;if(A==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(S=this._create_token(s.COMMENT,R),S.directives=O)}return S},D.prototype._read_open=function(A,S){var R=null,O=null;return S||A==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),O=this._create_token(s.TAG_OPEN,R)),O},D.prototype._read_open_handlebars=function(A,S){var R=null,O=null;return S||this._options.indent_handlebars&&A==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),O=this._create_token(s.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),O=this._create_token(s.TAG_OPEN,R))),O},D.prototype._read_close=function(A,S){var R=null,O=null;return S&&(S.text[0]==="<"&&(A===">"||A==="/"&&this._input.peek(1)===">")?(R=this._input.next(),A==="/"&&(R+=this._input.next()),O=this._create_token(s.TAG_CLOSE,R)):S.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(s.TAG_CLOSE,"}}"))),O},D.prototype._read_attribute=function(A,S,R){var O=null,g="";if(R&&R.text[0]==="<")if(A==="=")O=this._create_token(s.EQUALS,this._input.next());else if(A==='"'||A==="'"){var _=this._input.next();A==='"'?_+=this.__patterns.double_quote.read():_+=this.__patterns.single_quote.read(),O=this._create_token(s.VALUE,_)}else g=this.__patterns.attribute.read(),g&&(S.type===s.EQUALS?O=this._create_token(s.VALUE,g):O=this._create_token(s.ATTRIBUTE,g));return O},D.prototype._is_content_unformatted=function(A){return this._options.void_elements.indexOf(A)===-1&&(this._options.content_unformatted.indexOf(A)!==-1||this._options.unformatted.indexOf(A)!==-1)},D.prototype._read_raw_content=function(A,S,R){var O="";if(R&&R.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(S.type===s.TAG_CLOSE&&S.opened.text[0]==="<"&&S.text[0]!=="/"){var g=S.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var _=this._read_comment_or_cdata(A);if(_)return _.type=s.TEXT,_;O=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(g)&&(O=this._input.readUntil(new RegExp("","ig")))}return O?this._create_token(s.TEXT,O):null},D.prototype._read_content_word=function(A){var S="";if(this._options.unformatted_content_delimiter&&(A===this._options.unformatted_content_delimiter[0]&&(S=this.__patterns.unformatted_content_delimiter.read())),S||(S=this.__patterns.word.read()),S)return this._create_token(s.TEXT,S)},E.exports.Tokenizer=D,E.exports.TOKEN=s}],K={};function n(E){var f=K[E];if(f!==void 0)return f.exports;var b=K[E]={exports:{}};return G[E](b,b.exports,n),b.exports}var I=n(18);N=I})();var z=N;if(!0)!(te=[U,U("6UM0"),U("TXwP")],Y=function(G){var K=U("6UM0"),n=U("TXwP");return{html_beautify:function(I,E){return z(I,E,K.js_beautify,n.css_beautify)}}}.apply(ge,te),Y!==void 0&&(ct.exports=Y));else var P,F})()},"rAM+":function(ct,ge,U){"use strict";U.d(ge,"a",function(){return Y});var te=U("Qw5x");function Y(N,z){var P;if(typeof Symbol=="undefined"||N[Symbol.iterator]==null){if(Array.isArray(N)||(P=Object(te.a)(N))||z&&N&&typeof N.length=="number"){P&&(N=P);var F=0,G=function(){};return{s:G,n:function(){return F>=N.length?{done:!0}:{done:!1,value:N[F++]}},e:function(f){throw f},f:G}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var K=!0,n=!1,I;return{s:function(){P=N[Symbol.iterator]()},n:function(){var f=P.next();return K=f.done,f},e:function(f){n=!0,I=f},f:function(){try{!K&&P.return!=null&&P.return()}finally{if(n)throw I}}}}},rUJ1:function(ct,ge){const U=/[&<>"']/,te=/[&<>"']/g,Y=/[<>"']|&(?!#?\w+;)/,N=/[<>"']|&(?!#?\w+;)/g,z={"&":"&","<":"<",">":">",'"':""","'":"'"},P=O=>z[O];function F(O,g){if(g){if(U.test(O))return O.replace(te,P)}else if(Y.test(O))return O.replace(N,P);return O}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function K(O){return O.replace(G,(g,_)=>(_=_.toLowerCase(),_==="colon"?":":_.charAt(0)==="#"?_.charAt(1)==="x"?String.fromCharCode(parseInt(_.substring(2),16)):String.fromCharCode(+_.substring(1)):""))}const n=/(^|[^\[])\^/g;function I(O,g){O=O.source||O,g=g||"";const _={replace:(h,d)=>(d=d.source||d,d=d.replace(n,"$1"),O=O.replace(h,d),_),getRegex:()=>new RegExp(O,g)};return _}const E=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(O,g,_){if(O){let h;try{h=decodeURIComponent(K(_)).replace(E,"").toLowerCase()}catch(d){return null}if(h.indexOf("javascript:")===0||h.indexOf("vbscript:")===0||h.indexOf("data:")===0)return null}g&&!f.test(_)&&(_=u(g,_));try{_=encodeURI(_).replace(/%25/g,"%")}catch(h){return null}return _}const c={},a=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(O,g){c[" "+O]||(a.test(O)?c[" "+O]=O+"/":c[" "+O]=A(O,"/",!0)),O=c[" "+O];const _=O.indexOf(":")===-1;return g.substring(0,2)==="//"?_?g:O.replace(p,"$1")+g:g.charAt(0)==="/"?_?g:O.replace(l,"$1")+g:O+g}const s={exec:function(){}};function i(O){let g=1,_,h;for(;g{let j=!1,W=x;for(;--W>=0&&w[W]==="\\";)j=!j;return j?"|":" |"}),h=_.split(/ \|/);let d=0;if(h.length>g)h.splice(g);else for(;h.length1)Object(I.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(I.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var D=i[0];if(F.isValidElement(D)&&Object(E.c)(D)){var A=D.ref;i[0]=F.cloneElement(D,{ref:Object(E.a)(A,this.setChildNode)})}return i.length===1?i[0]:i.map(function(S,R){return!F.isValidElement(S)||"key"in S&&S.key!==null?S:F.cloneElement(S,{key:"".concat(b,"-").concat(R)})})}}]),l}(F.Component);c.displayName="ResizeObserver",ge.a=c},t9D7:function(ct,ge,U){"use strict";U.d(ge,"b",function(){return G}),U.d(ge,"g",function(){return n}),U.d(ge,"d",function(){return I}),U.d(ge,"e",function(){return E}),U.d(ge,"a",function(){return f}),U.d(ge,"f",function(){return a}),U.d(ge,"c",function(){return p});var te=U("Vhoy"),Y=U("MI8n"),N=U("pmY6"),z=U("Cg/j"),P=U("ic2d"),F=U("nEHx");const G=Object(z.c)("themeService");var K;(function(l){function u(s){return s&&typeof s=="object"&&typeof s.id=="string"}l.isThemeColor=u})(K||(K={}));function n(l){return{id:l}}var I;(function(l){function u(R){return R&&typeof R=="object"&&typeof R.id=="string"&&(typeof R.color=="undefined"||K.isThemeColor(R.color))}l.isThemeIcon=u;const s=new RegExp(`^\\$\\((${te.a.iconNameExpression}(?:${te.a.iconModifierExpression})?)\\)$`);function i(R){const O=s.exec(R);if(!O)return;let[,g]=O;return{id:g}}l.fromString=i;function D(R,O){let g=R.id;const _=g.lastIndexOf("~");return _!==-1&&(g=g.substring(0,_)),O&&(g=`${g}~${O}`),{id:g}}l.modify=D;function A(R,O){var g,_;return R.id===O.id&&((g=R.color)===null||g===void 0?void 0:g.id)===((_=O.color)===null||_===void 0?void 0:_.id)}l.isEqual=A;function S(R,O){return{id:R.id,color:O?n(O):void 0}}l.asThemeIcon=S,l.asClassNameArray=te.a.asClassNameArray,l.asClassName=te.a.asClassName,l.asCSSSelector=te.a.asCSSSelector})(I||(I={}));function E(l){switch(l){case F.a.DARK:return"vs-dark";case F.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class b{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Y.b}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),Object(N.i)(()=>{const u=this.themingParticipants.indexOf(l);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let c=new b;P.a.add(f.ThemingContribution,c);function a(l){return c.onColorThemeChange(l)}class p extends N.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},tK3L:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___3uV00",flex_space_between:"flex_space_between___253zc",flex_box_vertical_center:"flex_box_vertical_center___3Nn4F",flex_box_center_end:"flex_box_center_end___3N00E",flex_box_column:"flex_box_column___wngbD",page:"page___1qj_b",wrap:"wrap___1vIxE",title:"title___3EB7K",select:"select___3yoep",contentWrap:"contentWrap___2vBaG",pngIcon:"pngIcon___3tbYk",tabsWrap:"tabsWrap___35WZr",searchWrap:"searchWrap___3zxJK",addQuestionBtn:"addQuestionBtn___3pN4A",search:"search___Qt6zp",searchIcon:"searchIcon___1fYTO",batchWrap:"batchWrap___1QFBy",customTable:"customTable___4pmq7",row:"row___mgwpl",contentListWrap:"contentListWrap___sfO91",li:"li___2kFZ7",bottom:"bottom___1-hPm",actionLeftItem:"actionLeftItem___3mz5t",questionTypeName:"questionTypeName___2Vr34",more:"more___Oo-pR",btnAdd:"btnAdd___3ROdW",cancelC:"cancelC___3SmK1",addC:"addC___3VFkF",actonBtn:"actonBtn___3j8EO",batch:"batch___1YJ8c",btns:"btns___33g-Q",btn:"btn___3yAUt",treeWrapper:"treeWrapper___3Sn4Z",treeHeader:"treeHeader___1fITD",treeContent:"treeContent___3wYv9",action:"action___2Ys8R",sendModal:"sendModal___3kKOa",line:"line___2PBOX",del:"del___1X0CN",divider:"divider___3XDiC",headerWrapper:"headerWrapper___3F2Wp",exportBtn:"exportBtn___3nux1"}},ulZh:function(ct,ge,U){typeof window!="undefined"&&function(Y,N){ct.exports=N()}(this,function(){return function(te){var Y={};function N(z){if(Y[z])return Y[z].exports;var P=Y[z]={i:z,l:!1,exports:{}};return te[z].call(P.exports,P,P.exports,N),P.l=!0,P.exports}return N.m=te,N.c=Y,N.d=function(z,P,F){N.o(z,P)||Object.defineProperty(z,P,{enumerable:!0,get:F})},N.r=function(z){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},N.t=function(z,P){if(P&1&&(z=N(z)),P&8)return z;if(P&4&&typeof z=="object"&&z&&z.__esModule)return z;var F=Object.create(null);if(N.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:z}),P&2&&typeof z!="string")for(var G in z)N.d(F,G,function(K){return z[K]}.bind(null,G));return F},N.n=function(z){var P=z&&z.__esModule?function(){return z.default}:function(){return z};return N.d(P,"a",P),P},N.o=function(z,P){return Object.prototype.hasOwnProperty.call(z,P)},N.p="/dist/",N(N.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(te,Y,N){"use strict";var z=Object.prototype.hasOwnProperty,P="~";function F(){}Object.create&&(F.prototype=Object.create(null),new F().__proto__||(P=!1));function G(E,f,b){this.fn=E,this.context=f,this.once=b||!1}function K(E,f,b,c,a){if(typeof b!="function")throw new TypeError("The listener must be a function");var p=new G(b,c||E,a),l=P?P+f:f;return E._events[l]?E._events[l].fn?E._events[l]=[E._events[l],p]:E._events[l].push(p):(E._events[l]=p,E._eventsCount++),E}function n(E,f){--E._eventsCount===0?E._events=new F:delete E._events[f]}function I(){this._events=new F,this._eventsCount=0}I.prototype.eventNames=function(){var f=[],b,c;if(this._eventsCount===0)return f;for(c in b=this._events)z.call(b,c)&&f.push(P?c.slice(1):c);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(b)):f},I.prototype.listeners=function(f){var b=P?P+f:f,c=this._events[b];if(!c)return[];if(c.fn)return[c.fn];for(var a=0,p=c.length,l=new Array(p);a0},!1)}function E(f,b){for(var c={main:[b]},a={main:[]},p={main:{}};I(c);)for(var l=Object.keys(c),u=0;u=2*R/g||w<=W)return;var T=Number.POSITIVE_INFINITY,M;for(M=l.level-1;M>h;M--){var m=_[M].maxBitrate;if(T=R*m/(8*.8*x),T=w)return;var v=this.bwEstimator.getEstimate();I.logger.warn("Fragment "+l.sn+(u?" part "+u.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+` Current BW estimate: `+(Object(z.isFiniteNumber)(v)?(v/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+w.toFixed(3)+` s Estimated load time for the next fragment: `+T.toFixed(3)+` s Time to underbuffer: `+W.toFixed(3)+" s"),s.nextLoadLevel=M,this.bwEstimator.sample(O,S.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(F.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:u,stats:S})},a.onFragLoaded=function(l,u){var s=u.frag,i=u.part;if(s.type===n.PlaylistLevelType.MAIN&&Object(z.isFiniteNumber)(s.sn)){var D=i?i.stats:s.stats,A=i?i.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var S=this.hls.levels[s.level],R=(S.loaded?S.loaded.bytes:0)+D.loaded,O=(S.loaded?S.loaded.duration:0)+A;S.loaded={bytes:R,duration:O},S.realBitrate=Math.round(8*R/O)}if(s.bitrateTest){var g={stats:D,frag:s,part:i,id:s.type};this.onFragBuffered(F.Events.FRAG_BUFFERED,g),s.bitrateTest=!1}}},a.onFragBuffered=function(l,u){var s=u.frag,i=u.part,D=i?i.stats:s.stats;if(D.aborted)return;if(s.type!==n.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var A=D.parsing.end-D.loading.start;this.bwEstimator.sample(A,D.loaded),D.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0},a.onError=function(l,u){switch(u.details){case K.ErrorDetails.FRAG_LOAD_ERROR:case K.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},a.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},a.getNextABRAutoLevel=function(){var l=this.fragCurrent,u=this.partCurrent,s=this.hls,i=s.maxAutoLevel,D=s.config,A=s.minAutoLevel,S=s.media,R=u?u.duration:l?l.duration:0,O=S?S.currentTime:0,g=S&&S.playbackRate!==0?Math.abs(S.playbackRate):1,_=this.bwEstimator?this.bwEstimator.getEstimate():D.abrEwmaDefaultEstimate,h=(G.BufferHelper.bufferInfo(S,O,D.maxBufferHole).end-O)/g,d=this.findBestLevel(_,A,i,h,D.abrBandWidthFactor,D.abrBandWidthUpFactor);if(d>=0)return d;I.logger.trace((h?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=R?Math.min(R,D.maxStarvationDelay):D.maxStarvationDelay,x=D.abrBandWidthFactor,w=D.abrBandWidthUpFactor;if(!h){var j=this.bitrateTestDelay;if(j){var W=R?Math.min(R,D.maxLoadingDelay):D.maxLoadingDelay;C=W-j,I.logger.trace("bitrate test took "+Math.round(1e3*j)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),x=w=1}}return d=this.findBestLevel(_,A,i,h+C,x,w),Math.max(d,0)},a.findBestLevel=function(l,u,s,i,D,A){for(var S,R=this.fragCurrent,O=this.partCurrent,g=this.lastLoadedFragLevel,_=this.hls.levels,h=_[g],d=!!(h!=null&&(S=h.details)!==null&&S!==void 0&&S.live),C=h==null?void 0:h.codecSet,x=O?O.duration:R?R.duration:0,w=s;w>=u;w--){var j=_[w];if(!j||C&&j.codecSet!==C)continue;var W=j.details,T=(O?W==null?void 0:W.partTarget:W==null?void 0:W.averagetargetduration)||x,M=void 0;w<=g?M=D*l:M=A*l;var m=_[w].maxBitrate,v=m*T/M;if(I.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+w+"/"+Math.round(M)+"/"+m+"/"+T+"/"+i+"/"+v),M>m&&(!v||d&&!this.bitrateTestDelay||v0&&h===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=h,this.tick()},g.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var h,d=this.levels,C=this.trackId,x=d==null||((h=d[C])===null||h===void 0)?void 0:h.details;if(x){if(this.waitForCdnTuneIn(x))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var w,j=performance.now(),W=this.retryDate;(!W||j>=W||(w=this.media)!==null&&w!==void 0&&w.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var T=this.waitingData;if(T){var M=T.frag,m=T.part,v=T.cache,H=T.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var X=v.flush(),q={frag:M,part:m,payload:X,networkDetails:null};this._handleFragmentLoadProgress(q),H&&R.prototype._handleFragmentLoadComplete.call(this,q)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var re=this.getLoadPosition(),ye=G.BufferHelper.bufferInfo(this.mediaBuffer,re,this.config.maxBufferHole),pe=Object(a.fragmentWithinToleranceTest)(ye.end,this.config.maxFragLookUpTolerance,M);pe<0&&(u.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+ye.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var h=this.waitingData;h&&(this.fragmentTracker.removeFragment(h.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},g.onTickEnd=function(){var h=this.media;if(!h||!h.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:h,C=d.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=h.currentTime},g.doTickIdle=function(){var h,d,C=this.hls,x=this.levels,w=this.media,j=this.trackId,W=C.config;if(!x||!x[j])return;if(!w&&(this.startFragRequested||!W.startFragPrefetch))return;var T=x[j],M=T.details;if(!M||M.live&&this.levelLastLoaded!==j||this.waitForCdnTuneIn(M)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,E.ElementaryStreamTypes.AUDIO,I.PlaylistLevelType.AUDIO));var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,I.PlaylistLevelType.AUDIO);if(m===null)return;var v=m.len,H=this.getMaxBufferLength(),X=this.audioSwitch;if(v>=H&&!X)return;if(!X&&this._streamEnded(m,M)){C.trigger(F.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var q=M.fragments,re=q[0].start,ye=m.end;if(X){var pe=this.getLoadPosition();ye=pe,M.PTSKnown&&pere||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),w.currentTime=re+.05))}var ue=this.getNextFragment(ye,M);if(!ue){this.bufferFlushed=!0;return}((h=ue.decryptdata)===null||h===void 0?void 0:h.keyFormat)==="identity"&&!((d=ue.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(ue,M):this.loadFragment(ue,M,ye)},g.getMaxBufferLength=function(){var h=R.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,I.PlaylistLevelType.MAIN);return d===null?h:Math.max(h,d.len)},g.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(h,d){var C=d.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(x){return new n.Level(x)})},g.onAudioTrackSwitching=function(h,d){var C=!!d.url;this.trackId=d.id;var x=this.fragCurrent;x!=null&&x.loader&&x.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(A):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(h,d){this.mainDetails=d.details},g.onAudioTrackLoaded=function(h,d){var C,x=this.levels,w=d.details,j=d.id;if(!x){this.warn("Audio tracks were reset while loading level "+j);return}this.log("Track "+j+" loaded ["+w.startSN+","+w.endSN+"],duration:"+w.totalduration);var W=x[j],T=0;if(w.live||(C=W.details)!==null&&C!==void 0&&C.live){var M=this.mainDetails;if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed||!M)return;!W.details&&w.hasProgramDateTime&&M.hasProgramDateTime?(Object(p.alignMediaPlaylistByPDT)(w,M),T=w.fragments[0].start):T=this.alignPlaylists(w,W.details)}W.details=w,this.levelLastLoaded=j,!this.startFragRequested&&(this.mainDetails||!w.live)&&this.setStartPosition(W.details,T),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(w)&&(this.state=P.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(h){var d,C=h.frag,x=h.part,w=h.payload,j=this.config,W=this.trackId,T=this.levels;if(!T){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var M=T[W];console.assert(M,"Audio track is defined on fragment load progress");var m=M.details;console.assert(m,"Audio track details are defined on fragment load progress");var v=j.defaultAudioCodec||M.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new b.default(this.hls,I.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var X=this.initPTS[C.cc],q=(d=C.initSegment)===null||d===void 0?void 0:d.data;if(X!==void 0){var re=!1,ye=x?x.index:-1,pe=ye!==-1,ue=new c.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,w.byteLength,ye,pe);H.push(w,q,v,"",C,x,m.totalduration,re,ue,X)}else{u.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+m.startSN+" ,"+m.endSN+"],track "+W);var fe=this.waitingData=this.waitingData||{frag:C,part:x,cache:new f.default,complete:!1},be=fe.cache;be.push(new Uint8Array(w)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(h){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,h)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(h,d){var C=d.tracks.audio;C&&(this.mediaBuffer=C.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},g.onFragBuffered=function(h,d){var C=d.frag,x=d.part;if(C.type!==I.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(x?" p: "+x.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(F.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,x)},g.onError=function(h,d){switch(d.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.AUDIO,d);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=d.fatal?P.State.ERROR:P.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var C=!0,x=this.getFwdBufferInfo(this.mediaBuffer,I.PlaylistLevelType.AUDIO);x&&x.len>.5&&(C=!this.reduceMaxBufferLength(x.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(h,d){var C=d.type;C===E.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(h){var d,C="audio",x=this.hls,w=h.remuxResult,j=h.chunkMeta,W=this.getCurrentContext(j);if(!W){this.warn("The loading context changed while buffering fragment "+j.sn+" of level "+j.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(j.level);return}var T=W.frag,M=W.part,m=w.audio,v=w.text,H=w.id3,X=w.initSegment;if(this.fragContextChanged(T))return;if(this.state=P.State.PARSING,this.audioSwitch&&m&&this.completeAudioSwitch(),X!=null&&X.tracks&&(this._bufferInitSegment(X.tracks,T,j),x.trigger(F.Events.FRAG_PARSING_INIT_SEGMENT,{frag:T,id:C,tracks:X.tracks})),m){var q=m.startPTS,re=m.endPTS,ye=m.startDTS,pe=m.endDTS;M&&(M.elementaryStreams[E.ElementaryStreamTypes.AUDIO]={startPTS:q,endPTS:re,startDTS:ye,endDTS:pe}),T.setElementaryStreamInfo(E.ElementaryStreamTypes.AUDIO,q,re,ye,pe),this.bufferFragmentData(m,T,M,j)}if(H!=null&&(d=H.samples)!==null&&d!==void 0&&d.length){var ue=s({frag:T,id:C},H);x.trigger(F.Events.FRAG_PARSING_METADATA,ue)}if(v){var fe=s({frag:T,id:C},v);x.trigger(F.Events.FRAG_PARSING_USERDATA,fe)}},g._bufferInitSegment=function(h,d,C){if(this.state!==P.State.PARSING)return;h.video&&delete h.video;var x=h.audio;if(!x)return;x.levelCodec=x.codec,x.id="audio",this.log("Init audio buffer, container:"+x.container+", codecs[parsed]=["+x.codec+"]"),this.hls.trigger(F.Events.BUFFER_CODECS,h);var w=x.initSegment;if(w!=null&&w.byteLength){var j={type:"audio",frag:d,part:null,chunkMeta:C,parent:d.type,data:w};this.hls.trigger(F.Events.BUFFER_APPENDING,j)}this.tick()},g.loadFragment=function(h,d,C){var x=this.fragmentTracker.getState(h);this.fragCurrent=h,(this.audioSwitch||x===K.FragmentState.NOT_LOADED||x===K.FragmentState.PARTIAL)&&(h.sn==="initSegment"?this._loadInitSegment(h):d.live&&!Object(z.isFiniteNumber)(this.initPTS[h.cc])?(this.log("Waiting for video PTS in continuity counter "+h.cc+" of live stream before loading audio fragment "+h.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,h,d,C)))},g.completeAudioSwitch=function(){var h=this.hls,d=this.media,C=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,h.trigger(F.Events.AUDIO_TRACK_SWITCHED,{id:C})},O}(P.default);Y.default=S},"./src/controller/audio-track-controller.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/events.ts"),P=N("./src/errors.ts"),F=N("./src/controller/base-playlist-controller.ts"),G=N("./src/types/loader.ts");function K(b,c){for(var a=0;a=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=u[this.trackId];this.log("Now switching to audio-track index "+l);var i=u[l],D=i.id,A=i.groupId,S=A===void 0?"":A,R=i.name,O=i.type,g=i.url;if(this.trackId=l,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(z.Events.AUDIO_TRACK_SWITCHING,{id:D,groupId:S,name:R,type:O,url:g}),i.details&&!i.details.live)return;var _=this.switchParams(i.url,s==null?void 0:s.details);this.loadPlaylist(_)},a.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,s=this.findTrackId(u)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},a.findTrackId=function(l){for(var u=this.tracksInGroup,s=0;sc.partTarget&&(i+=1)}if(Object(z.isFiniteNumber)(s))return new P.HlsUrlParameters(s,Object(z.isFiniteNumber)(i)?i:void 0,P.HlsSkip.No)}}},E.loadPlaylist=function(b){},E.shouldLoadTrack=function(b){return this.canLoad&&b&&!!b.url&&(!b.details||b.details.live)},E.playlistLoaded=function(b,c,a){var p=this,l=c.details,u=c.stats,s=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||a!=null&&a.live){if(l.reloaded(a),a&&this.log("live playlist "+b+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),a&&l.fragments.length>0&&Object(F.mergeDetails)(a,l),!this.canLoad||!l.live)return;var i,D=void 0,A=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var S=this.hls.config.lowLatencyMode,R=l.lastPartSn,O=l.endSN,g=l.lastPartIndex,_=g!==-1,h=R===O,d=S?0:g;_?(D=h?O+1:R,A=h?d:g+1):D=O+1;var C=l.age,x=C+l.ageHeader,w=Math.min(x-l.partTarget,l.targetduration*1.5);if(w>0){if(a&&w>a.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+a.tuneInGoal+" to: "+w+" with playlist age: "+l.age),w=0;else{var j=Math.floor(w/l.targetduration);if(D+=j,A!==void 0){var W=Math.round(w%l.targetduration/l.partTarget);A+=W}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+w+" skip sn "+j+" to part "+A)}l.tuneInGoal=w}if(i=this.getDeliveryDirectives(l,c.deliveryDirectives,D,A),S||!h){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(l,c.deliveryDirectives,D,A);var T=Object(F.computeReloadInterval)(l,u);D!==void 0&&l.canBlockReload&&(T-=l.partTarget||1),this.log("reload live playlist "+b+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout(function(){return p.loadPlaylist(i)},T)}else this.clearTimer()},E.getDeliveryDirectives=function(b,c,a,p){var l=Object(P.getSkipValue)(b,a);return c!=null&&c.skip&&b.deltaUpdateFailed&&(a=c.msn,p=c.part,l=P.HlsSkip.No),new P.HlsUrlParameters(a,p,l)},E.retryLoadingOrFail=function(b){var c=this,a=this.hls.config,p=this.retryCount-1&&(l=b.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+b.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+b.details+'"')}}else this.warn('cannot recover from error "'+b.details+'"'),this.clearTimer(),b.fatal=!0;return p},I}()},"./src/controller/base-stream-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"State",function(){return O}),N.d(Y,"default",function(){return g});var z=N("./src/polyfills/number.ts"),P=N("./src/task-loop.ts"),F=N("./src/controller/fragment-tracker.ts"),G=N("./src/utils/buffer-helper.ts"),K=N("./src/utils/logger.ts"),n=N("./src/events.ts"),I=N("./src/errors.ts"),E=N("./src/types/transmuxer.ts"),f=N("./src/utils/mp4-tools.ts"),b=N("./src/utils/discontinuities.ts"),c=N("./src/controller/fragment-finders.ts"),a=N("./src/controller/level-helper.ts"),p=N("./src/loader/fragment-loader.ts"),l=N("./src/crypt/decrypter.ts"),u=N("./src/utils/time-ranges.ts"),s=N("./src/types/loader.ts");function i(_,h){for(var d=0;dX;(M0&&M&&M.key&&M.iv&&M.method==="AES-128"){var m=self.performance.now();return w.decrypter.webCryptoDecrypt(new Uint8Array(T),M.key.buffer,M.iv.buffer).then(function(v){var H=self.performance.now();return W.trigger(n.Events.FRAG_DECRYPTED,{frag:x,payload:v,stats:{tstart:m,tdecrypt:H}}),j.payload=v,j})}return j}).then(function(j){var W=w.fragCurrent,T=w.hls,M=w.levels;if(!M)throw new Error("init load aborted, missing levels");var m=M[x.level].details;console.assert(m,"Level details are defined when init segment is loaded");var v=x.stats;w.state=O.IDLE,w.fragLoadError=0,x.data=new Uint8Array(j.payload),v.parsing.start=v.buffering.start=self.performance.now(),v.parsing.end=v.buffering.end=self.performance.now(),j.frag===W&&T.trigger(n.Events.FRAG_BUFFERED,{stats:v,frag:W,part:null,id:x.type}),w.tick()}).catch(function(j){w.warn(j),w.resetFragmentLoading(x)})},d.fragContextChanged=function(x){var w=this.fragCurrent;return!x||!w||x.level!==w.level||x.sn!==w.sn||x.urlId!==w.urlId},d.fragBufferedComplete=function(x,w){var j=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+x.type+" sn: "+x.sn+(w?" part: "+w.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level+" "+u.default.toString(G.BufferHelper.getBuffered(j))),this.state=O.IDLE,this.tick()},d._handleFragmentLoadComplete=function(x){var w=this.transmuxer;if(!w)return;var j=x.frag,W=x.part,T=x.partsLoaded,M=!T||T.length===0||T.some(function(v){return!v}),m=new E.ChunkMetadata(j.level,j.sn,j.stats.chunkCount+1,0,W?W.index:-1,!M);w.flush(m)},d._handleFragmentLoadProgress=function(x){},d._doFragLoad=function(x,w,j,W){var T=this;if(j===void 0&&(j=null),!this.levels)throw new Error("frag load aborted, missing levels");if(j=Math.max(x.start,j||0),this.config.lowLatencyMode&&w){var M=w.partList;if(M&&W){j>x.end&&w.fragmentHint&&(x=w.fragmentHint);var m=this.getNextPart(M,x,j);if(m>-1){var v=M[m];return this.log("Loading part sn: "+x.sn+" p: "+v.index+" cc: "+x.cc+" of playlist ["+w.startSN+"-"+w.endSN+"] parts [0-"+m+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(j.toFixed(3))),this.nextLoadPosition=v.start+v.duration,this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,part:M[m],targetBufferTime:j}),this.doFragPartsLoad(x,M,m,W).catch(function(H){return T.handleFragLoadError(H)})}else if(!x.url||this.loadedEndOfParts(M,j))return Promise.resolve(null)}}return this.log("Loading fragment "+x.sn+" cc: "+x.cc+" "+(w?"of ["+w.startSN+"-"+w.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(j.toFixed(3))),Object(z.isFiniteNumber)(x.sn)&&!this.bitrateTest&&(this.nextLoadPosition=x.start+x.duration),this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,targetBufferTime:j}),this.fragmentLoader.load(x,W).catch(function(H){return T.handleFragLoadError(H)})},d.doFragPartsLoad=function(x,w,j,W){var T=this;return new Promise(function(M,m){var v=[],H=function X(q){var re=w[q];T.fragmentLoader.loadPart(x,re,W).then(function(ye){v[re.index]=ye;var pe=ye.part;T.hls.trigger(n.Events.FRAG_LOADED,ye);var ue=w[q+1];if(ue&&ue.fragment===x)X(q+1);else return M({frag:x,part:pe,partsLoaded:v})}).catch(m)};H(j)})},d.handleFragLoadError=function(x){var w=x.data;return w&&w.details===I.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(w.frag,w.part):this.hls.trigger(n.Events.ERROR,w),null},d._handleTransmuxerFlush=function(x){var w=this.getCurrentContext(x);if(!w||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var j=w.frag,W=w.part,T=w.level,M=self.performance.now();j.stats.parsing.end=M,W&&(W.stats.parsing.end=M),this.updateLevelTiming(j,W,T,x.partial)},d.getCurrentContext=function(x){var w=this.levels,j=x.level,W=x.sn,T=x.part;if(!w||!w[j])return this.warn("Levels object was unset while buffering fragment "+W+" of level "+j+". The current chunk will not be buffered."),null;var M=w[j],m=T>-1?Object(a.getPartWith)(M,W,T):null,v=m?m.fragment:Object(a.getFragmentWithSN)(M,W,this.fragCurrent);return v?{frag:v,part:m,level:M}:null},d.bufferFragmentData=function(x,w,j,W){if(!x||this.state!==O.PARSING)return;var T=x.data1,M=x.data2,m=T;if(T&&M&&(m=Object(f.appendUint8Array)(T,M)),!m||!m.length)return;var v={type:x.type,frag:w,part:j,chunkMeta:W,parent:w.type,data:m};this.hls.trigger(n.Events.BUFFER_APPENDING,v),x.dropped&&x.independent&&!j&&this.flushBufferGap(w)},d.flushBufferGap=function(x){var w=this.media;if(!w)return;if(!G.BufferHelper.isBuffered(w,w.currentTime)){this.flushMainBuffer(0,x.start);return}var j=w.currentTime,W=G.BufferHelper.bufferInfo(w,j,0),T=x.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,T*.25),m=Math.max(Math.min(x.start-M,W.end-M),j+M);x.start-m>M&&this.flushMainBuffer(m,x.start)},d.getFwdBufferInfo=function(x,w){var j=this.config,W=this.getLoadPosition();if(!Object(z.isFiniteNumber)(W))return null;var T=G.BufferHelper.bufferInfo(x,W,j.maxBufferHole);if(T.len===0&&T.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(W,w);if(M&&T.nextStart=j?(w.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+w.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(x,w){var j,W,T=w.fragments,M=T.length;if(!M)return null;var m=this.config,v=T[0].start,H;if(w.live){var X=m.initialLiveManifestSize;if(M-1&&jj.start&&j.loaded},d.getInitialLiveFragment=function(x,w){var j=this.fragPrevious,W=null;if(j){if(x.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+j.programDateTime),W=Object(c.findFragmentByPDT)(w,j.endProgramDateTime,this.config.maxFragLookUpTolerance)),!W){var T=j.sn+1;if(T>=x.startSN&&T<=x.endSN){var M=w[T-x.startSN];j.cc===M.cc&&(W=M,this.log("Live playlist, switching playlist, load frag with next SN: "+W.sn))}W||(W=Object(c.findFragWithCC)(w,j.cc),W&&this.log("Live playlist, switching playlist, load frag with same CC: "+W.sn))}}else{var m=this.hls.liveSyncPosition;m!==null&&(W=this.getFragmentAtPosition(m,this.bitrateTest?x.fragmentEnd:x.edge,x))}return W},d.getFragmentAtPosition=function(x,w,j){var W=this.config,T=this.fragPrevious,M=j.fragments,m=j.endSN,v=j.fragmentHint,H=W.maxFragLookUpTolerance,X=!!(W.lowLatencyMode&&j.partList&&v);X&&v&&!this.bitrateTest&&(M=M.concat(v),m=v.sn);var q;if(xw-H?0:H;q=Object(c.findFragmentByPTS)(T,M,x,re)}else q=M[M.length-1];if(q){var ye=q.sn-j.startSN,pe=T&&q.level===T.level,ue=M[ye+1],fe=this.fragmentTracker.getState(q);if(fe===F.FragmentState.BACKTRACKED){q=null;for(var be=ye;M[be]&&this.fragmentTracker.getState(M[be])===F.FragmentState.BACKTRACKED;)T?q=M[be--]:q=M[--be];q||(q=ue)}else T&&q.sn===T.sn&&!X&&(pe&&(q.sn=M-w.maxFragLookUpTolerance&&T<=m;if(W!==null&&j.duration>W&&(T"+x.startSN+" prev-sn: "+(T?T.sn:"na")+" fragments: "+m),q}return v},d.waitForCdnTuneIn=function(x){var w=3;return x.live&&x.canBlockReload&&x.tuneInGoal>Math.max(x.partHoldBack,x.partTarget*w)},d.setStartPosition=function(x,w){var j=this.startPosition;if(j"+x))}}]),h}(P.default)},"./src/controller/buffer-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return c});var z=N("./src/polyfills/number.ts"),P=N("./src/events.ts"),F=N("./src/utils/logger.ts"),G=N("./src/errors.ts"),K=N("./src/utils/buffer-helper.ts"),n=N("./src/utils/mediasource-helper.ts"),I=N("./src/loader/fragment.ts"),E=N("./src/controller/buffer-operation-queue.ts"),f=Object(n.getMediaSource)(),b=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function a(l){var u=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=u.hls,i=u.media,D=u.mediaSource;F.logger.log("[buffer-controller]: Media source opened"),i&&(u.updateMediaElementDuration(),s.trigger(P.Events.MEDIA_ATTACHED,{media:i})),D&&D.removeEventListener("sourceopen",u._onMediaSourceOpen),u.checkPendingTracks()},this._onMediaSourceClose=function(){F.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){F.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var p=a.prototype;return p.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},p.destroy=function(){this.unregisterListeners(),this.details=null},p.registerListeners=function(){var u=this.hls;u.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(P.Events.BUFFER_RESET,this.onBufferReset,this),u.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(P.Events.BUFFER_EOS,this.onBufferEos,this),u.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(P.Events.FRAG_PARSED,this.onFragParsed,this),u.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},p.unregisterListeners=function(){var u=this.hls;u.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(P.Events.BUFFER_RESET,this.onBufferReset,this),u.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(P.Events.BUFFER_EOS,this.onBufferEos,this),u.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(P.Events.FRAG_PARSED,this.onFragParsed,this),u.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},p._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new E.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},p.onManifestParsed=function(u,s){var i=2;(s.audio&&!s.video||!s.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,F.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},p.onMediaAttaching=function(u,s){var i=this.media=s.media;if(i&&f){var D=this.mediaSource=new f;D.addEventListener("sourceopen",this._onMediaSourceOpen),D.addEventListener("sourceended",this._onMediaSourceEnded),D.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(D),this._objectUrl=i.src}},p.onMediaDetaching=function(){var u=this.media,s=this.mediaSource,i=this._objectUrl;if(s){if(F.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(D){F.logger.warn("[buffer-controller]: onMediaDetaching: "+D.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(i&&self.URL.revokeObjectURL(i),u.src===i?(u.removeAttribute("src"),u.load()):F.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},p.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(s){var i=u.sourceBuffer[s];try{i&&(u.removeBufferListeners(s),u.mediaSource&&u.mediaSource.removeSourceBuffer(i),u.sourceBuffer[s]=void 0)}catch(D){F.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",D)}}),this._initSourceBuffer()},p.onBufferCodecs=function(u,s){var i=this,D=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(A){if(D){var S=i.tracks[A];if(S&&typeof S.buffer.changeType=="function"){var R=s[A],O=R.codec,g=R.levelCodec,_=R.container,h=(S.levelCodec||S.codec).replace(b,"$1"),d=(g||O).replace(b,"$1");if(h!==d){var C=_+";codecs="+(g||O);i.appendChangeType(A,C)}}}else i.pendingTracks[A]=s[A]}),D)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},p.appendChangeType=function(u,s){var i=this,D=this.operationQueue,A={execute:function(){var R=i.sourceBuffer[u];R&&(F.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+s),R.changeType(s)),D.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(R){F.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",R)}};D.append(A,u)},p.onBufferAppending=function(u,s){var i=this,D=this.hls,A=this.operationQueue,S=this.tracks,R=s.data,O=s.type,g=s.frag,_=s.part,h=s.chunkMeta,d=h.buffering[O],C=self.performance.now();d.start=C;var x=g.stats.buffering,w=_?_.stats.buffering:null;x.start===0&&(x.start=C),w&&w.start===0&&(w.start=C);var j=S.audio,W=O==="audio"&&h.id===1&&(j==null?void 0:j.container)==="audio/mpeg",T={execute:function(){if(d.executeStart=self.performance.now(),W){var m=i.sourceBuffer[O];if(m){var v=g.start-m.timestampOffset;Math.abs(v)>=.1&&(F.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+v+") sn: "+g.sn+")"),m.timestampOffset=g.start)}}i.appendExecutor(R,O)},onStart:function(){},onComplete:function(){var m=self.performance.now();d.executeEnd=d.end=m,x.first===0&&(x.first=m),w&&w.first===0&&(w.first=m);var v=i.sourceBuffer,H={};for(var X in v)H[X]=K.BufferHelper.getBuffered(v[X]);i.appendError=0,i.hls.trigger(P.Events.BUFFER_APPENDED,{type:O,frag:g,part:_,chunkMeta:h,parent:g.type,timeRanges:H})},onError:function(m){F.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",m);var v={type:G.ErrorTypes.MEDIA_ERROR,parent:g.type,details:G.ErrorDetails.BUFFER_APPEND_ERROR,err:m,fatal:!1};m.code===DOMException.QUOTA_EXCEEDED_ERR?v.details=G.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,v.details=G.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>D.config.appendErrorMaxRetry&&(F.logger.error("[buffer-controller]: Failed "+D.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),v.fatal=!0)),D.trigger(P.Events.ERROR,v)}};A.append(T,O)},p.onBufferFlushing=function(u,s){var i=this,D=this.operationQueue,A=function(R){return{execute:i.removeExecutor.bind(i,R,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(P.Events.BUFFER_FLUSHED,{type:R})},onError:function(g){F.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",g)}}};s.type?D.append(A(s.type),s.type):this.getSourceBufferTypes().forEach(function(S){D.append(A(S),S)})},p.onFragParsed=function(u,s){var i=this,D=s.frag,A=s.part,S=[],R=A?A.elementaryStreams:D.elementaryStreams;R[I.ElementaryStreamTypes.AUDIOVIDEO]?S.push("audiovideo"):(R[I.ElementaryStreamTypes.AUDIO]&&S.push("audio"),R[I.ElementaryStreamTypes.VIDEO]&&S.push("video"));var O=function(){var _=self.performance.now();D.stats.buffering.end=_,A&&(A.stats.buffering.end=_);var h=A?A.stats:D.stats;i.hls.trigger(P.Events.FRAG_BUFFERED,{frag:D,part:A,stats:h,id:D.type})};S.length===0&&F.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+D.type+" level: "+D.level+" sn: "+D.sn),this.blockBuffers(O,S)},p.onFragChanged=function(u,s){this.flushBackBuffer()},p.onBufferEos=function(u,s){var i=this,D=this.getSourceBufferTypes().reduce(function(A,S){var R=i.sourceBuffer[S];return(!s.type||s.type===S)&&(R&&!R.ended&&(R.ended=!0,F.logger.log("[buffer-controller]: "+S+" sourceBuffer now EOS"))),A&&!!(!R||R.ended)},!0);D&&this.blockBuffers(function(){var A=i.mediaSource;if(!A||A.readyState!=="open")return;A.endOfStream()})},p.onLevelUpdated=function(u,s){var i=s.details;if(!i.fragments.length)return;this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},p.flushBackBuffer=function(){var u=this.hls,s=this.details,i=this.media,D=this.sourceBuffer;if(!i||s===null)return;var A=this.getSourceBufferTypes();if(!A.length)return;var S=s.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(z.isFiniteNumber)(S)||S<0)return;var R=i.currentTime,O=s.levelTargetDuration,g=Math.max(S,O),_=Math.floor(R/O)*O-g;A.forEach(function(h){var d=D[h];if(d){var C=K.BufferHelper.getBuffered(d);C.length>0&&_>C.start(0)&&(u.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:_}),s.live&&u.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:_}),u.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:_,type:h}))}})},p.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,s=this.hls,i=this.media,D=this.mediaSource,A=u.fragments[0].start+u.totalduration,S=i.duration,R=Object(z.isFiniteNumber)(D.duration)?D.duration:0;u.live&&s.config.liveDurationInfinity?(F.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),D.duration=Infinity,this.updateSeekableRange(u)):(A>R&&A>S||!Object(z.isFiniteNumber)(S))&&(F.logger.log("[buffer-controller]: Updating Media Source duration to "+A.toFixed(3)),D.duration=A)},p.updateSeekableRange=function(u){var s=this.mediaSource,i=u.fragments,D=i.length;if(D&&u.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var A=Math.max(0,i[0].start),S=Math.max(A,A+u.totalduration);s.setLiveSeekableRange(A,S)}},p.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,s=this.operationQueue,i=this.pendingTracks,D=Object.keys(i).length;if(D&&!u||D===2){this.createSourceBuffers(i),this.pendingTracks={};var A=this.getSourceBufferTypes();if(A.length===0){this.hls.trigger(P.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}A.forEach(function(S){s.executeNext(S)})}},p.createSourceBuffers=function(u){var s=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var D=0;for(var A in u)if(!s[A]){var S=u[A];if(!S)throw Error("source buffer exists for track "+A+", however track does not");var R=S.levelCodec||S.codec,O=S.container+";codecs="+R;F.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var g=s[A]=i.addSourceBuffer(O),_=A;this.addBufferListener(_,"updatestart",this._onSBUpdateStart),this.addBufferListener(_,"updateend",this._onSBUpdateEnd),this.addBufferListener(_,"error",this._onSBUpdateError),this.tracks[A]={buffer:g,codec:R,container:S.container,levelCodec:S.levelCodec,id:S.id},D++}catch(h){F.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+h.message),this.hls.trigger(P.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:h,mimeType:O})}}D&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},p._onSBUpdateStart=function(u){var s=this.operationQueue,i=s.current(u);i.onStart()},p._onSBUpdateEnd=function(u){var s=this.operationQueue,i=s.current(u);i.onComplete(),s.shiftAndExecuteNext(u)},p._onSBUpdateError=function(u,s){F.logger.error("[buffer-controller]: "+u+" SourceBuffer error",s),this.hls.trigger(P.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(u);i&&i.onError(s)},p.removeExecutor=function(u,s,i){var D=this.media,A=this.mediaSource,S=this.operationQueue,R=this.sourceBuffer,O=R[u];if(!D||!A||!O){F.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),S.shiftAndExecuteNext(u);return}var g=Object(z.isFiniteNumber)(D.duration)?D.duration:Infinity,_=Object(z.isFiniteNumber)(A.duration)?A.duration:Infinity,h=Math.max(0,s),d=Math.min(i,g,_);d>h?(F.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+u+" SourceBuffer"),console.assert(!O.updating,u+" sourceBuffer must not be updating"),O.remove(h,d)):S.shiftAndExecuteNext(u)},p.appendExecutor=function(u,s){var i=this.operationQueue,D=this.sourceBuffer,A=D[s];if(!A){F.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(s);return}A.ended=!1,console.assert(!A.updating,s+" sourceBuffer must not be updating"),A.appendBuffer(u)},p.blockBuffers=function(u,s){var i=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){F.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var D=this.operationQueue,A=s.map(function(S){return D.appendBlocker(S)});Promise.all(A).then(function(){u(),s.forEach(function(S){var R=i.sourceBuffer[S];(!R||!R.updating)&&D.shiftAndExecuteNext(S)})})},p.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},p.addBufferListener=function(u,s,i){var D=this.sourceBuffer[u];if(!D)return;var A=i.bind(this,u);this.listeners[u].push({event:s,listener:A}),D.addEventListener(s,A)},p.removeBufferListeners=function(u){var s=this.sourceBuffer[u];if(!s)return;this.listeners[u].forEach(function(i){s.removeEventListener(i.event,i.listener)})},a}()},"./src/controller/buffer-operation-queue.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return P});var z=N("./src/utils/logger.ts"),P=function(){function F(K){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=K}var G=F.prototype;return G.append=function(n,I){var E=this.queues[I];E.push(n),E.length===1&&this.buffers[I]&&this.executeNext(I)},G.insertAbort=function(n,I){var E=this.queues[I];E.unshift(n),this.executeNext(I)},G.appendBlocker=function(n){var I,E=new Promise(function(b){I=b}),f={execute:I,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,n),E},G.executeNext=function(n){var I=this.buffers,E=this.queues,f=I[n],b=E[n];if(b.length){var c=b[0];try{c.execute()}catch(a){z.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(a),(!f||!f.updating)&&(b.shift(),this.executeNext(n))}}},G.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},G.current=function(n){return this.queues[n][0]},F}()},"./src/controller/cap-level-controller.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/events.ts");function P(K,n){for(var I=0;I0&&this.mediaWidth>0){var E=this.hls.levels;if(E.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(E.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},n.getMaxLevel=function(E){var f=this,b=this.hls.levels;if(!b.length)return-1;var c=b.filter(function(a,p){return K.isLevelAllowed(p,f.restrictedLevels)&&p<=E});return this.clientRect=null,K.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},n.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var E=this.media,f={width:0,height:0};if(E){var b=E.getBoundingClientRect();f.width=b.width,f.height=b.height,!f.width&&!f.height&&(f.width=b.right-b.left||E.width||0,f.height=b.bottom-b.top||E.height||0)}return this.clientRect=f,f},K.isLevelAllowed=function(E,f){return f===void 0&&(f=[]),f.indexOf(E)===-1},K.getMaxLevelByMediaSize=function(E,f,b){if(!E||!E.length)return-1;for(var c=function(s,i){return i?s.width!==i.width||s.height!==i.height:!0},a=E.length-1,p=0;p=f||l.height>=b)&&c(l,E[p+1])){a=p;break}}return a},F(K,[{key:"mediaWidth",get:function(){return this.getDimensions().width*K.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*K.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var E=1;try{E=self.devicePixelRatio}catch(f){}return E}}]),K}();Y.default=G},"./src/controller/cmcd-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return c});var z=N("./src/events.ts"),P=N("./src/types/cmcd.ts"),F=N("./src/utils/buffer-helper.ts"),G=N("./src/utils/logger.ts");function K(a,p){for(var l=0;l=a.length?{done:!0}:{done:!1,value:a[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(a,p){if(!a)return;if(typeof a=="string")return f(a,p);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return f(a,p)}function f(a,p){(p==null||p>a.length)&&(p=a.length);for(var l=0,u=new Array(p);ls&&(s=S.bitrate)}return s>0?s:NaN},p.getBufferLength=function(u){var s=this.hls.media,i=u===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!s)return NaN;var D=F.BufferHelper.bufferInfo(i,s.currentTime,this.config.maxBufferHole);return D.len*1e3},p.createPlaylistLoader=function(){var u=this.config.pLoader,s=this.applyPlaylistData,i=u||this.config.loader;return function(){function D(S){this.loader=void 0,this.loader=new i(S)}var A=D.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(R,O,g){s(R),this.loader.load(R,O,g)},n(D,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),D}()},p.createFragmentLoader=function(){var u=this.config.fLoader,s=this.applyFragmentData,i=u||this.config.loader;return function(){function D(S){this.loader=void 0,this.loader=new i(S)}var A=D.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(R,O,g){s(R),this.loader.load(R,O,g)},n(D,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),D}()},a.uuid=function(){var u=URL.createObjectURL(new Blob),s=u.toString();return URL.revokeObjectURL(u),s.substr(s.lastIndexOf("/")+1)},a.serialize=function(u){for(var s=[],i=function(W){return!Number.isNaN(W)&&W!=null&&W!==""&&W!==!1},D=function(W){return Math.round(W)},A=function(W){return D(W/100)*100},S=function(W){return encodeURIComponent(W)},R={br:D,d:D,bl:A,dl:A,mtp:A,nor:S,rtp:A,tb:D},O=Object.keys(u||{}).sort(),g=I(O),_;!(_=g()).done;){var h=_.value,d=u[h];if(!i(d))continue;if(h==="v"&&d===1)continue;if(h=="pr"&&d===1)continue;var C=R[h];C&&(d=C(d));var x=typeof d,w=void 0;h==="ot"||h==="sf"||h==="st"?w=h+"="+d:x==="boolean"?w=h:x==="number"?w=h+"="+d:w=h+"="+JSON.stringify(d),s.push(w)}return s.join(",")},a.toHeaders=function(u){for(var s=Object.keys(u),i={},D=["Object","Request","Session","Status"],A=[{},{},{},{}],S={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,O=s;RI){this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var S=I-this._requestLicenseFailureCount+1;F.logger.warn("Retrying license request, "+S+" attempts left"),this._requestLicense(s,i)}break}},a._generateLicenseRequestChallenge=function(l,u){switch(l.mediaKeySystemDomain){case G.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},a._requestLicense=function(l,u){F.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){F.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var i=this.getLicenseServerUrl(s.mediaKeySystemDomain),D=this._createLicenseXhr(i,l,u);F.logger.log("Sending license request to URL: "+i);var A=this._generateLicenseRequestChallenge(s,l);D.send(A)}catch(S){F.logger.error("Failure requesting DRM license: "+S),this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(l,u){if(!this._emeEnabled)return;var s=u.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},a.onMediaDetached=function(){var l=this._media,u=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},a.onManifestParsed=function(l,u){if(!this._emeEnabled)return;var s=u.levels.map(function(D){return D.audioCodec}).filter(function(D){return!!D}),i=u.levels.map(function(D){return D.videoCodec}).filter(function(D){return!!D});this._attemptKeySystemAccess(G.KeySystems.WIDEVINE,s,i)},n(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();Y.default=b},"./src/controller/fps-controller.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/events.ts"),P=N("./src/utils/logger.ts"),F=function(){function G(n){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=n,this.registerListeners()}var K=G.prototype;return K.setStreamController=function(I){this.streamController=I},K.registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},K.unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching)},K.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},K.onMediaAttaching=function(I,E){var f=this.hls.config;if(f.capLevelOnFPSDrop){var b=E.media instanceof self.HTMLVideoElement?E.media:null;this.media=b,b&&typeof b.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},K.checkFPS=function(I,E,f){var b=performance.now();if(E){if(this.lastTime){var c=b-this.lastTime,a=f-this.lastDroppedFrames,p=E-this.lastDecodedFrames,l=1e3*a/c,u=this.hls;if(u.trigger(z.Events.FPS_DROP,{currentDropped:a,currentDecoded:p,totalDroppedFrames:f}),l>0&&a>u.config.fpsDroppedMonitoringThreshold*p){var s=u.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=s)&&(s=s-1,u.trigger(z.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:u.currentLevel}),u.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=b,this.lastDroppedFrames=f,this.lastDecodedFrames=E}},K.checkFPSInterval=function(){var I=this.media;if(I)if(this.isVideoPlaybackQualityAvailable){var E=I.getVideoPlaybackQuality();this.checkFPS(I,E.totalVideoFrames,E.droppedVideoFrames)}else this.checkFPS(I,I.webkitDecodedFrameCount,I.webkitDroppedFrameCount)},G}();Y.default=F},"./src/controller/fragment-finders.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"findFragmentByPDT",function(){return F}),N.d(Y,"findFragmentByPTS",function(){return G}),N.d(Y,"fragmentWithinToleranceTest",function(){return K}),N.d(Y,"pdtWithinToleranceTest",function(){return n}),N.d(Y,"findFragWithCC",function(){return I});var z=N("./src/polyfills/number.ts"),P=N("./src/utils/binary-search.ts");function F(E,f,b){if(f===null||!Array.isArray(E)||!E.length||!Object(z.isFiniteNumber)(f))return null;var c=E[0].programDateTime;if(f<(c||0))return null;var a=E[E.length-1].endProgramDateTime;if(f>=(a||0))return null;b=b||0;for(var p=0;pE&&b.start?-1:0}function n(E,f,b){var c=Math.min(f,b.duration+(b.deltaPTS?b.deltaPTS:0))*1e3,a=b.endProgramDateTime||0;return a-c>E}function I(E,f){return P.default.search(E,function(b){return b.ccf?-1:0})}},"./src/controller/fragment-tracker.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"FragmentState",function(){return F}),N.d(Y,"FragmentTracker",function(){return G});var z=N("./src/events.ts"),P=N("./src/types/loader.ts"),F;(function(I){I.NOT_LOADED="NOT_LOADED",I.BACKTRACKED="BACKTRACKED",I.APPENDING="APPENDING",I.PARTIAL="PARTIAL",I.OK="OK"})(F||(F={}));var G=function(){function I(f){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=f,this._registerListeners()}var E=I.prototype;return E._registerListeners=function(){var b=this.hls;b.on(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),b.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.on(z.Events.FRAG_LOADED,this.onFragLoaded,this)},E._unregisterListeners=function(){var b=this.hls;b.off(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),b.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.off(z.Events.FRAG_LOADED,this.onFragLoaded,this)},E.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},E.getAppendedFrag=function(b,c){if(c===P.PlaylistLevelType.MAIN){var a=this.activeFragment,p=this.activeParts;if(!a)return null;if(p)for(var l=p.length;l--;){var u=p[l],s=u?u.end:a.appendedPTS;if(u.start<=b&&s!==void 0&&b<=s)return l>9&&(this.activeParts=p.slice(l-9)),u}else if(a.start<=b&&a.appendedPTS!==void 0&&b<=a.appendedPTS)return a}return this.getBufferedFrag(b,c)},E.getBufferedFrag=function(b,c){for(var a=this.fragments,p=Object.keys(a),l=p.length;l--;){var u=a[p[l]];if((u==null?void 0:u.body.type)===c&&u.buffered){var s=u.body;if(s.start<=b&&b<=s.end)return s}}return null},E.detectEvictedFragments=function(b,c,a){var p=this;Object.keys(this.fragments).forEach(function(l){var u=p.fragments[l];if(!u)return;if(!u.buffered){u.body.type===a&&p.removeFragment(u.body);return}var s=u.range[b];if(!s)return;s.time.some(function(i){var D=!p.isTimeBuffered(i.startPTS,i.endPTS,c);return D&&p.removeFragment(u.body),D})})},E.detectPartialFragments=function(b){var c=this,a=this.timeRanges,p=b.frag,l=b.part;if(!a||p.sn==="initSegment")return;var u=n(p),s=this.fragments[u];if(!s)return;Object.keys(a).forEach(function(i){var D=p.elementaryStreams[i];if(!D)return;var A=a[i],S=l!==null||D.partial===!0;s.range[i]=c.getBufferedTimes(p,l,S,A)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},E.fragBuffered=function(b){var c=n(b),a=this.fragments[c];a&&(a.backtrack=a.loaded=null,a.buffered=!0)},E.getBufferedTimes=function(b,c,a,p){for(var l={time:[],partial:a},u=c?c.start:b.start,s=c?c.end:b.end,i=b.minEndPTS||s,D=b.maxStartPTS||u,A=0;A=S&&i<=R){l.time.push({startPTS:Math.max(u,p.start(A)),endPTS:Math.min(s,p.end(A))});break}else if(uS)l.partial=!0,l.time.push({startPTS:Math.max(u,p.start(A)),endPTS:Math.min(s,p.end(A))});else if(s<=S)break}return l},E.getPartialFragment=function(b){var c=null,a,p,l,u=0,s=this.bufferPadding,i=this.fragments;return Object.keys(i).forEach(function(D){var A=i[D];if(!A)return;K(A)&&(p=A.body.start-s,l=A.body.end+s,b>=p&&b<=l&&(a=Math.min(b-p,l-b),u<=a&&(c=A.body,u=a)))}),c},E.getState=function(b){var c=n(b),a=this.fragments[c];return a?a.buffered?K(a)?F.PARTIAL:F.OK:a.backtrack?F.BACKTRACKED:F.APPENDING:F.NOT_LOADED},E.backtrack=function(b,c){var a=n(b),p=this.fragments[a];if(!p||p.backtrack)return null;var l=p.backtrack=c||p.loaded;return p.loaded=null,l},E.getBacktrackData=function(b){var c=n(b),a=this.fragments[c];if(a){var p,l=a.backtrack;if(l!=null&&(p=l.payload)!==null&&p!==void 0&&p.byteLength)return l;this.removeFragment(b)}return null},E.isTimeBuffered=function(b,c,a){for(var p,l,u=0;u=p&&c<=l)return!0;if(c<=p)return!1}return!1},E.onFragLoaded=function(b,c){var a=c.frag,p=c.part;if(a.sn==="initSegment"||a.bitrateTest||p)return;var l=n(a);this.fragments[l]={body:a,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},E.onBufferAppended=function(b,c){var a=this,p=c.frag,l=c.part,u=c.timeRanges;if(p.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=p,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(i){var D=u[i];if(a.detectEvictedFragments(i,D),!l)for(var A=0;Ab&&p.removeFragment(s)}})},E.removeFragment=function(b){var c=n(b);b.stats.loaded=0,b.clearElementaryStreamInfo(),delete this.fragments[c]},E.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},I}();function K(I){var E,f;return I.buffered&&(((E=I.range.video)===null||E===void 0?void 0:E.partial)||((f=I.range.audio)===null||f===void 0?void 0:f.partial))}function n(I){return I.type+"_"+I.level+"_"+I.urlId+"_"+I.sn}},"./src/controller/gap-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"STALL_MINIMUM_DURATION_MS",function(){return K}),N.d(Y,"MAX_START_GAP_JUMP",function(){return n}),N.d(Y,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return I}),N.d(Y,"SKIP_BUFFER_RANGE_START",function(){return E}),N.d(Y,"default",function(){return f});var z=N("./src/utils/buffer-helper.ts"),P=N("./src/errors.ts"),F=N("./src/events.ts"),G=N("./src/utils/logger.ts"),K=250,n=2,I=.1,E=.05,f=function(){function b(a,p,l,u){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=a,this.media=p,this.fragmentTracker=l,this.hls=u}var c=b.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(p){var l=this.config,u=this.media,s=this.stalled,i=u.currentTime,D=u.seeking,A=this.seeking&&!D,S=!this.seeking&&D;if(this.seeking=D,i!==p){if(this.moved=!0,s!==null){if(this.stallReported){var R=self.performance.now()-s;G.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((S||A)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!z.BufferHelper.getBuffered(u).length)return;var O=z.BufferHelper.bufferInfo(u,i,0),g=O.len>0,_=O.nextStart||0;if(!g&&!_)return;if(D){var h=O.len>n,d=!_||_-i>n&&!this.fragmentTracker.getPartialFragment(i);if(h||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,x=Math.max(_,O.start||0)-i,w=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,j=w==null||((C=w.details)===null||C===void 0)?void 0:C.live,W=j?w.details.targetduration*2:n;if(x>0&&x<=W){this._trySkipBufferHole(null);return}}var T=self.performance.now();if(s===null){this.stalled=T;return}var M=T-s;!D&&M>=K&&this._reportStall(O.len);var m=z.BufferHelper.bufferInfo(u,i,l.maxBufferHole);this._tryFixBufferStall(m,M)},c._tryFixBufferStall=function(p,l){var u=this.config,s=this.fragmentTracker,i=this.media,D=i.currentTime,A=s.getPartialFragment(D);if(A){var S=this._trySkipBufferHole(A);if(S)return}p.len>u.maxBufferHole&&l>u.highBufferWatchdogPeriod*1e3&&(G.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(p){var l=this.hls,u=this.media,s=this.stallReported;s||(this.stallReported=!0,G.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+p+")"),l.trigger(F.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}))},c._trySkipBufferHole=function(p){for(var l=this.config,u=this.hls,s=this.media,i=s.currentTime,D=0,A=z.BufferHelper.getBuffered(s),S=0;S=D&&i.05&&this.forwardBufferLength>1){var S=Math.min(2,Math.max(1,u)),R=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;b.playbackRate=Math.min(S,Math.max(1,R))}else b.playbackRate!==1&&b.playbackRate!==0&&(b.playbackRate=1)},E.estimateLiveEdge=function(){var b=this.levelDetails;return b===null?null:b.edge+b.age},E.computeLatency=function(){var b=this.estimateLiveEdge();return b===null?null:b-this.currentTime},K(I,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var b=this.config,c=this.levelDetails;return b.liveMaxLatencyDuration!==void 0?b.liveMaxLatencyDuration:c?b.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var b=this.levelDetails;if(b===null)return null;var c=b.holdBack,a=b.partHoldBack,p=b.targetduration,l=this.config,u=l.liveSyncDuration,s=l.liveSyncDurationCount,i=l.lowLatencyMode,D=this.hls.userConfig,A=i&&a||c;(D.liveSyncDuration||D.liveSyncDurationCount||A===0)&&(A=u!==void 0?u:s*p);var S=p,R=1;return A+Math.min(this.stallCount*R,S)}},{key:"liveSyncPosition",get:function(){var b=this.estimateLiveEdge(),c=this.targetLatency,a=this.levelDetails;if(b===null||c===null||a===null)return null;var p=a.edge,l=b-c-this.edgeStalled,u=p-a.totalduration,s=p-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(u,l),s)}},{key:"drift",get:function(){var b=this.levelDetails;return b===null?1:b.drift}},{key:"edgeStalled",get:function(){var b=this.levelDetails;if(b===null)return 0;var c=(this.config.lowLatencyMode&&b.partTarget||b.targetduration)*3;return Math.max(b.age-c,0)}},{key:"forwardBufferLength",get:function(){var b=this.media,c=this.levelDetails;if(!b||!c)return 0;var a=b.buffered.length;return a?b.buffered.end(a-1):c.edge-this.currentTime}}]),I}()},"./src/controller/level-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return l});var z=N("./src/types/level.ts"),P=N("./src/events.ts"),F=N("./src/errors.ts"),G=N("./src/utils/codecs.ts"),K=N("./src/controller/level-helper.ts"),n=N("./src/controller/base-playlist-controller.ts"),I=N("./src/types/loader.ts");function E(){return E=Object.assign||function(u){for(var s=1;s0){_=R[0].bitrate,R.sort(function(M,m){return M.bitrate-m.bitrate}),this._levels=R;for(var j=0;jthis.hls.config.fragLoadingMaxRetry&&(h=S.frag.level)):h=S.frag.level}break;case F.ErrorDetails.LEVEL_LOAD_ERROR:case F.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(_=!1),h=R.level),g=!0;break;case F.ErrorDetails.REMUX_ALLOC_ERROR:h=S.level,g=!0;break}h!==void 0&&this.recoverLevel(S,h,g,_)},i.recoverLevel=function(A,S,R,O){var g=A.details,_=this._levels[S];if(_.loadError++,R){var h=this.retryLoadingOrFail(A);if(h)A.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var d=_.url.length;if(d>1&&_.loadError1){var O=(S.urlId+1)%R;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(g){g.urlId=O}),this.level=A}},i.onFragLoaded=function(A,S){var R=S.frag;if(R!==void 0&&R.type===I.PlaylistLevelType.MAIN){var O=this._levels[R.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},i.onLevelLoaded=function(A,S){var R,O=S.level,g=S.details,_=this._levels[O];if(!_){var h;this.warn("Invalid level index "+O),(h=S.deliveryDirectives)!==null&&h!==void 0&&h.skip&&(g.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(_.fragmentError===0&&(_.loadError=0,this.retryCount=0),this.playlistLoaded(O,S,_.details)):(R=S.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(g.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(A,S){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var O=-1,g=this.hls.audioTracks[S.id].groupId,_=0;_0){var O=R.urlId,g=R.url[O];if(A)try{g=A.addDirectives(g)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Attempt loading level index "+S+(A?" at sn "+A.msn+" part "+A.part:"")+" with URL-id "+O+" "+g),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:g,level:S,id:O,deliveryDirectives:A||null})}},i.removeLevel=function(A,S){var R=function(_,h){return h!==S},O=this._levels.filter(function(g,_){return _!==A?!0:g.url.length>1&&S!==void 0?(g.url=g.url.filter(R),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(R)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(R)),g.urlId=0,!0):!1}).map(function(g,_){var h=g.details;return h!=null&&h.fragments&&h.fragments.forEach(function(d){d.level=_}),g});this._levels=O,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:O})},b(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(A){var S,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===A&&(S=R[A])!==null&&S!==void 0&&S.details)return;if(A<0||A>=R.length){var O=A<0;if(this.hls.trigger(P.Events.ERROR,{type:F.ErrorTypes.OTHER_ERROR,details:F.ErrorDetails.LEVEL_SWITCH_ERROR,level:A,fatal:O,reason:"invalid level idx"}),O)return;A=Math.min(A,R.length-1)}this.clearTimer();var g=this.currentLevelIndex,_=R[g],h=R[A];this.log("switching to level "+A+" from "+g),this.currentLevelIndex=A;var d=E({},h,{level:A,maxBitrate:h.maxBitrate,uri:h.uri,urlId:h.urlId});delete d._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,d);var C=h.details;if(!C||C.live){var x=this.switchParams(h.uri,_==null?void 0:_.details);this.loadPlaylist(x)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(A){this.manualLevelIndex=A,this._startLevel===void 0&&(this._startLevel=A),A!==-1&&(this.level=A)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(A){this._firstLevel=A}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var A=this.hls.config.startLevel;return A!==void 0?A:this._firstLevel}else return this._startLevel},set:function(A){this._startLevel=A}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(A){this.level=A,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=A)}}]),s}(n.default)},"./src/controller/level-helper.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"addGroupId",function(){return F}),N.d(Y,"assignTrackIdsByGroup",function(){return G}),N.d(Y,"updatePTS",function(){return K}),N.d(Y,"updateFragPTSDTS",function(){return I}),N.d(Y,"mergeDetails",function(){return E}),N.d(Y,"mapPartIntersection",function(){return f}),N.d(Y,"mapFragmentIntersection",function(){return b}),N.d(Y,"adjustSliding",function(){return c}),N.d(Y,"addSliding",function(){return a}),N.d(Y,"computeReloadInterval",function(){return p}),N.d(Y,"getFragmentWithSN",function(){return l}),N.d(Y,"getPartWith",function(){return u});var z=N("./src/polyfills/number.ts"),P=N("./src/utils/logger.ts");function F(s,i,D){switch(i){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(D);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(D);break}}function G(s){var i={};s.forEach(function(D){var A=D.groupId||"";D.id=i[A]=i[A]||0,i[A]++})}function K(s,i,D){var A=s[i],S=s[D];n(A,S)}function n(s,i){var D=i.startPTS;if(Object(z.isFiniteNumber)(D)){var A=0,S;i.sn>s.sn?(A=D-s.start,S=s):(A=s.start-D,S=i),S.duration!==A&&(S.duration=A)}else if(i.sn>s.sn){var R=s.cc===i.cc;R&&s.minEndPTS?i.start=s.start+(s.minEndPTS-s.start):i.start=s.start+s.duration}else i.start=Math.max(s.start-i.duration,0)}function I(s,i,D,A,S,R){var O=A-D;O<=0&&(P.logger.warn("Fragment should have a positive duration",i),A=D+i.duration,R=S+i.duration);var g=D,_=A,h=i.startPTS,d=i.endPTS;if(Object(z.isFiniteNumber)(h)){var C=Math.abs(h-D);Object(z.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(C,i.deltaPTS):i.deltaPTS=C,g=Math.max(D,h),D=Math.min(D,h),S=Math.min(S,i.startDTS),_=Math.min(A,d),A=Math.max(A,d),R=Math.max(R,i.endDTS)}i.duration=A-D;var x=D-i.start;i.appendedPTS=A,i.start=i.startPTS=D,i.maxStartPTS=g,i.startDTS=S,i.endPTS=A,i.minEndPTS=_,i.endDTS=R;var w=i.sn;if(!s||ws.endSN)return 0;var j,W=w-s.startSN,T=s.fragments;for(T[W]=i,j=W;j>0;j--)n(T[j],T[j-1]);for(j=W;j=0;S--){var R=A[S].initSegment;if(R){D=R;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var O=0,g;if(b(s,i,function(j,W){j.relurl&&(O=j.cc-W.cc),Object(z.isFiniteNumber)(j.startPTS)&&Object(z.isFiniteNumber)(j.endPTS)&&(W.start=W.startPTS=j.startPTS,W.startDTS=j.startDTS,W.appendedPTS=j.appendedPTS,W.maxStartPTS=j.maxStartPTS,W.endPTS=j.endPTS,W.endDTS=j.endDTS,W.minEndPTS=j.minEndPTS,W.duration=j.endPTS-j.startPTS,W.duration&&(g=W),i.PTSKnown=i.alignedSliding=!0),W.elementaryStreams=j.elementaryStreams,W.loader=j.loader,W.stats=j.stats,W.urlId=j.urlId,j.initSegment&&(W.initSegment=j.initSegment,D=j.initSegment)}),D){var _=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;_.forEach(function(j){var W;(!j.initSegment||j.initSegment.relurl===((W=D)===null||W===void 0?void 0:W.relurl))&&(j.initSegment=D)})}if(i.skippedSegments&&(i.deltaUpdateFailed=i.fragments.some(function(j){return!j}),i.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var h=i.skippedSegments;h--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}var d=i.fragments;if(O){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C=A.length)return;a(i,A[D].start)}function a(s,i){if(i){for(var D=s.fragments,A=s.skippedSegments;A0&&S0&&_===-1&&(this.log("Override startPosition with lastCurrentTime @"+h.toFixed(3)),_=h),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=_,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,S.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var _,h=this.levels,d=this.level,C=h==null||((_=h[d])===null||_===void 0)?void 0:_.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var x,w=self.performance.now(),j=this.retryDate;(!j||w>=j||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){S.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var _,h,d=this.hls,C=this.levelLastLoaded,x=this.levels,w=this.media,j=d.config,W=d.nextLoadLevel;if(C===null||!w&&(this.startFragRequested||!j.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!x||!x[W])return;var T=x[W];this.level=d.nextLoadLevel=W;var M=T.details;if(!M||this.state===P.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==W){this.state=P.State.WAITING_LEVEL;return}var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:w,I.PlaylistLevelType.MAIN);if(m===null)return;var v=m.len,H=this.getMaxBufferLength(T.maxBitrate);if(v>=H)return;if(this._streamEnded(m,M)){var X={};this.altAudio&&(X.type="video"),this.hls.trigger(G.Events.BUFFER_EOS,X),this.state=P.State.ENDED;return}var q=m.end,re=this.getNextFragment(q,M);if(this.couldBacktrack&&!this.fragPrevious&&re&&re.sn!=="initSegment"){var ye=re.sn-M.startSN;ye>1&&(re=M.fragments[ye-1],this.fragmentTracker.removeFragment(re))}if(re&&this.fragmentTracker.getState(re)===n.FragmentState.OK&&this.nextLoadPosition>q){var pe=this.audioOnly&&!this.altAudio?E.ElementaryStreamTypes.AUDIO:E.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(w,pe,I.PlaylistLevelType.MAIN),re=this.getNextFragment(this.nextLoadPosition,M)}if(!re)return;re.initSegment&&!re.initSegment.data&&!this.bitrateTest&&(re=re.initSegment),((_=re.decryptdata)===null||_===void 0?void 0:_.keyFormat)==="identity"&&!((h=re.decryptdata)!==null&&h!==void 0&&h.key)?this.loadKey(re,M):this.loadFragment(re,M,q)},O.loadFragment=function(_,h,d){var C,x=this.fragmentTracker.getState(_);if(this.fragCurrent=_,x===n.FragmentState.BACKTRACKED){var w=this.fragmentTracker.getBacktrackData(_);if(w){this._handleFragmentLoadProgress(w),this._handleFragmentLoadComplete(w);return}else x=n.FragmentState.NOT_LOADED}x===n.FragmentState.NOT_LOADED||x===n.FragmentState.PARTIAL?_.sn==="initSegment"?this._loadInitSegment(_):this.bitrateTest?(_.bitrateTest=!0,this.log("Fragment "+_.sn+" of level "+_.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(_)):(this.startFragRequested=!0,S.prototype.loadFragment.call(this,_,h,d)):x===n.FragmentState.APPENDING?this.reduceMaxBufferLength(_.duration)&&this.fragmentTracker.removeFragment(_):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(_){var h=this.fragmentTracker.getAppendedFrag(_,I.PlaylistLevelType.MAIN);return h&&"fragment"in h?h.fragment:h},O.getBufferedFrag=function(_){return this.fragmentTracker.getBufferedFrag(_,I.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(_){return _?this.getBufferedFrag(_.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var _=this.levels,h=this.media;if(h!=null&&h.readyState){var d,C=this.getAppendedFrag(h.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!h.paused&&_){var x=this.hls.nextLoadLevel,w=_[x],j=this.fragLastKbps;j&&this.fragCurrent?d=this.fragCurrent.duration*w.maxBitrate/(1e3*j)+1:d=0}else d=0;var W=this.getBufferedFrag(h.currentTime+d);if(W){var T=this.followingBufferedFrag(W);if(T){this.abortCurrentFrag();var M=T.maxStartPTS?T.maxStartPTS:T.start,m=T.duration,v=Math.max(W.end,M+Math.min(Math.max(m-this.config.maxFragLookUpTolerance,m*.5),m*.75));this.flushMainBuffer(v,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var _=this.fragCurrent;this.fragCurrent=null,_!=null&&_.loader&&_.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(_,h){S.prototype.flushMainBuffer.call(this,_,h,this.altAudio?"video":null)},O.onMediaAttached=function(_,h){S.prototype.onMediaAttached.call(this,_,h);var d=h.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,d,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var _=this.media;_&&(_.removeEventListener("playing",this.onvplaying),_.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),S.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var _=this.media,h=_?_.currentTime:null;Object(z.isFiniteNumber)(h)&&this.log("Media seeked to "+h.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(G.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(_,h){var d=!1,C=!1,x;h.levels.forEach(function(w){x=w.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(d=!0),x.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=d&&C&&!Object(F.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=h.levels,this.startFragRequested=!1},O.onLevelLoading=function(_,h){var d=this.levels;if(!d||this.state!==P.State.IDLE)return;var C=d[h.level];(!C.details||C.details.live&&this.levelLastLoaded!==h.level||this.waitForCdnTuneIn(C.details))&&(this.state=P.State.WAITING_LEVEL)},O.onLevelLoaded=function(_,h){var d,C=this.levels,x=h.level,w=h.details,j=w.totalduration;if(!C){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+w.startSN+","+w.endSN+"], cc ["+w.startCC+", "+w.endCC+"] duration:"+j);var W=this.fragCurrent;W&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(W.level!==h.level&&W.loader&&(this.state=P.State.IDLE,W.loader.abort()));var T=C[x],M=0;if(w.live||(d=T.details)!==null&&d!==void 0&&d.live){if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed)return;M=this.alignPlaylists(w,T.details)}if(T.details=w,this.levelLastLoaded=x,this.hls.trigger(G.Events.LEVEL_UPDATED,{details:w,level:x}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(w))return;this.state=P.State.IDLE}this.startFragRequested?w.live&&this.synchronizeToLiveEdge(w):this.setStartPosition(w,M),this.tick()},O._handleFragmentLoadProgress=function(_){var h,d=_.frag,C=_.part,x=_.payload,w=this.levels;if(!w){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var j=w[d.level],W=j.details;if(!W){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var T=j.videoCodec,M=W.PTSKnown||!W.live,m=(h=d.initSegment)===null||h===void 0?void 0:h.data,v=this._getAudioCodec(j),H=this.transmuxer=this.transmuxer||new f.default(this.hls,I.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),X=C?C.index:-1,q=X!==-1,re=new b.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,x.byteLength,X,q),ye=this.initPTS[d.cc];H.push(x,m,v,T,d,C,W.totalduration,M,re,ye)},O.onAudioTrackSwitching=function(_,h){var d=this.altAudio,C=!!h.url,x=h.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var w=this.fragCurrent;w!=null&&w.loader&&(this.log("Switching to main audio track, cancel main fragment load"),w.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var j=this.hls;d&&j.trigger(G.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),j.trigger(G.Events.AUDIO_TRACK_SWITCHED,{id:x})}},O.onAudioTrackSwitched=function(_,h){var d=h.id,C=!!this.hls.audioTracks[d].url;if(C){var x=this.videoBuffer;x&&this.mediaBuffer!==x&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=x)}this.altAudio=C,this.tick()},O.onBufferCreated=function(_,h){var d=h.tracks,C,x,w=!1;for(var j in d){var W=d[j];if(W.id==="main"){if(x=j,C=W,j==="video"){var T=d[j];T&&(this.videoBuffer=T.buffer)}}else w=!0}w&&C?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(_,h){var d=h.frag,C=h.part;if(d&&d.type!==I.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(C?" p: "+C.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var x=C?C.stats:d.stats;this.fragLastKbps=Math.round(8*x.total/(x.buffering.end-x.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,C)},O.onError=function(_,h){switch(h.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.MAIN,h);break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(h.fatal?(this.warn(""+h.details),this.state=P.State.ERROR):!h.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if(h.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var d=!0,C=this.getFwdBufferInfo(this.media,I.PlaylistLevelType.MAIN);C&&C.len>.5&&(d=!this.reduceMaxBufferLength(C.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var _=this.media,h=this.gapController;if(!_||!h||!_.readyState)return;var d=K.BufferHelper.getBuffered(_);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):h.poll(this.lastCurrentTime),this.lastCurrentTime=_.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(_,h){var d=h.type;if(d!==E.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(d===E.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,d,I.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(_,h){this.levels=h.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var _=this.media,h=_.currentTime,d=this.startPosition;if(d>=0&&h0&&(w1&&_.seeking===!1){var d=_.currentTime;if(K.BufferHelper.isBuffered(_,d)?h=this.getAppendedFrag(d):K.BufferHelper.isBuffered(_,d+.1)&&(h=this.getAppendedFrag(d+.1)),h){var C=this.fragPlaying,x=h.level;(!C||h.sn!==C.sn||C.level!==x||h.urlId!==C.urlId)&&(this.hls.trigger(G.Events.FRAG_CHANGED,{frag:h}),(!C||C.level!==x)&&this.hls.trigger(G.Events.LEVEL_SWITCHED,{level:x}),this.fragPlaying=h)}}},u(R,[{key:"nextLevel",get:function(){var _=this.nextBufferedFrag;return _?_.level:-1}},{key:"currentLevel",get:function(){var _=this.media;if(_){var h=this.getAppendedFrag(_.currentTime);if(h)return h.level}return-1}},{key:"nextBufferedFrag",get:function(){var _=this.media;if(_){var h=this.getAppendedFrag(_.currentTime);return this.followingBufferedFrag(h)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"SubtitleStreamController",function(){return s});var z=N("./src/events.ts"),P=N("./src/utils/logger.ts"),F=N("./src/utils/buffer-helper.ts"),G=N("./src/controller/fragment-finders.ts"),K=N("./src/utils/discontinuities.ts"),n=N("./src/controller/level-helper.ts"),I=N("./src/controller/fragment-tracker.ts"),E=N("./src/controller/base-stream-controller.ts"),f=N("./src/types/loader.ts"),b=N("./src/types/level.ts");function c(i,D){for(var A=0;A=h[x].start&&C<=h[x].end){d=h[x];break}var w=g.start+g.duration;d?d.end=w:(d={start:C,end:w},h.push(d)),this.fragmentTracker.fragBuffered(g)},A.onBufferFlushing=function(R,O){var g=O.startOffset,_=O.endOffset;if(g===0&&_!==Number.POSITIVE_INFINITY){var h=this.currentTrackId,d=this.levels;if(!d.length||!d[h]||!d[h].details)return;var C=d[h].details,x=C.targetduration,w=_-x;if(w<=0)return;O.endOffsetSubtitles=Math.max(0,w),this.tracksBuffered.forEach(function(j){for(var W=0;W=C.length||h!==d||!x)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,_.live||(g=x.details)!==null&&g!==void 0&&g.live){var w=this.mainDetails;if(_.deltaUpdateFailed||!w)return;var j=w.fragments[0];if(!x.details)_.hasProgramDateTime&&w.hasProgramDateTime?Object(K.alignMediaPlaylistByPDT)(_,w):j&&Object(n.addSliding)(_,j.start);else{var W=this.alignPlaylists(_,x.details);W===0&&j&&Object(n.addSliding)(_,j.start)}}if(x.details=_,this.levelLastLoaded=h,this.tick(),_.live&&!this.fragCurrent&&this.media&&this.state===E.State.IDLE){var T=Object(G.findFragmentByPTS)(null,_.fragments,this.media.currentTime,0);T||(this.warn("Subtitle playlist not aligned with playback"),x.details=void 0)}},A._handleFragmentLoadComplete=function(R){var O=R.frag,g=R.payload,_=O.decryptdata,h=this.hls;if(this.fragContextChanged(O))return;if(g&&g.byteLength>0&&_&&_.key&&_.iv&&_.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),_.key.buffer,_.iv.buffer).then(function(C){var x=performance.now();h.trigger(z.Events.FRAG_DECRYPTED,{frag:O,payload:C,stats:{tstart:d,tdecrypt:x}})})}},A.doTick=function(){if(!this.media){this.state=E.State.IDLE;return}if(this.state===E.State.IDLE){var R,O=this.currentTrackId,g=this.levels;if(!g.length||!g[O]||!g[O].details)return;var _=g[O].details,h=_.targetduration,d=this.config,C=this.media,x=F.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-h,d.maxBufferHole),w=x.end,j=x.len,W=this.getMaxBufferLength()+h;if(j>W)return;console.assert(_,"Subtitle track details are defined on idle subtitle stream controller tick");var T=_.fragments,M=T.length,m=_.edge,v,H=this.fragPrevious;if(w-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},p.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},p.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var u=b(this.media.textTracks);u.forEach(function(s){Object(P.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},p.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},p.onManifestParsed=function(u,s){this.tracks=s.subtitleTracks},p.onSubtitleTrackLoaded=function(u,s){var i=s.id,D=s.details,A=this.trackId,S=this.tracksInGroup[A];if(!S){this.warn("Invalid subtitle track id "+i);return}var R=S.details;S.details=s.details,this.log("subtitle track "+i+" loaded ["+D.startSN+"-"+D.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,s,R))},p.onLevelLoading=function(u,s){this.switchLevel(s.level)},p.onLevelSwitching=function(u,s){this.switchLevel(s.level)},p.switchLevel=function(u){var s=this.hls.levels[u];if(!(s!=null&&s.textGroupIds))return;var i=s.textGroupIds[s.urlId];if(this.groupId!==i){var D=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(O){return!i||O.groupId===i});this.tracksInGroup=A;var S=this.findTrackId(D==null?void 0:D.name)||this.findTrackId();this.groupId=i;var R={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(z.Events.SUBTITLE_TRACKS_UPDATED,R),S!==-1&&this.setSubtitleTrack(S,D)}},p.findTrackId=function(u){for(var s=this.tracksInGroup,i=0;i=D.length)return;this.clearTimer();var A=D[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,A){var S=A.id,R=A.groupId,O=R===void 0?"":R,g=A.name,_=A.type,h=A.url;this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:S,groupId:O,name:g,type:_,url:h});var d=this.switchParams(A.url,s==null?void 0:s.details);this.loadPlaylist(d)}else this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:u})},p.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,s=b(this.media.textTracks),i=0;i=0&&(_[0]=Math.min(_[0],D),_[1]=Math.max(_[1],A),O=!0,h/(A-D)>.5))return}if(O||R.push([D,A]),this.config.renderTextTracksNatively){var d=this.captionsTracks[i];this.Cues.newCue(d,D,A,S)}else{var C=this.Cues.newCue(null,D,A,S);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:C,track:i})}},u.onInitPtsFound=function(i,D){var A=this,S=D.frag,R=D.id,O=D.initPTS,g=D.timescale,_=this.unparsedVttFrags;R==="main"&&(this.initPTS[S.cc]=O,this.timescale[S.cc]=g),_.length&&(this.unparsedVttFrags=[],_.forEach(function(h){A.onFragLoaded(P.Events.FRAG_LOADED,h)}))},u.getExistingTrack=function(i){var D=this.media;if(D)for(var A=0;A>>8^g&255^99,I[S]=g,E[g]=S;var _=A[S],h=A[_],d=A[h],C=A[g]*257^g*16843008;b[S]=C<<24|C>>>8,c[S]=C<<16|C>>>16,a[S]=C<<8|C>>>24,p[S]=C,C=d*16843009^h*65537^_*257^S*16843008,u[g]=C<<24|C>>>8,s[g]=C<<16|C>>>16,i[g]=C<<8|C>>>24,D[g]=C,S?(S=_^A[A[A[d^_]]],R^=A[A[R]]):S=R=1}},K.expandKey=function(I){for(var E=this.uint8ArrayToUint32Array_(I),f=!0,b=0;b>>6)+1;var C=(i[D+2]&60)>>>2;if(C>d.length-1){s.trigger(F.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return O=(i[D+2]&1)<<2,O|=(i[D+3]&192)>>>6,z.logger.log("manifest codec:"+A+", ADTS type:"+S+", samplingIndex:"+C),/firefox/i.test(_)?C>=6?(S=5,g=new Array(4),R=C-3):(S=2,g=new Array(2),R=C):_.indexOf("android")!==-1?(S=2,g=new Array(2),R=C):(S=5,g=new Array(4),A&&(A.indexOf("mp4a.40.29")!==-1||A.indexOf("mp4a.40.5")!==-1)||!A&&C>=6?R=C-3:((A&&A.indexOf("mp4a.40.2")!==-1&&(C>=6&&O===1||/vivaldi/i.test(_))||!A&&O===1)&&(S=2,g=new Array(2)),R=C)),g[0]=S<<3,g[0]|=(C&14)>>1,g[1]|=(C&1)<<7,g[1]|=O<<3,S===5&&(g[1]|=(R&14)>>1,g[2]=(R&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:d[C],channelCount:O,codec:"mp4a.40."+S,manifestCodec:h}}function K(s,i){return s[i]===255&&(s[i+1]&246)===240}function n(s,i){return s[i+1]&1?7:9}function I(s,i){return(s[i+3]&3)<<11|s[i+4]<<3|(s[i+5]&224)>>>5}function E(s,i){return i+5=s.length)return!1;var A=I(s,i);if(A<=D)return!1;var S=i+A;return S===s.length||f(s,S)}return!1}function a(s,i,D,A,S){if(!s.samplerate){var R=G(i,D,A,S);if(!R)return;s.config=R.config,s.samplerate=R.samplerate,s.channelCount=R.channelCount,s.codec=R.codec,s.manifestCodec=R.manifestCodec,z.logger.log("parsed codec:"+s.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function p(s){return 1024*9e4/s}function l(s,i,D,A,S){var R=n(s,i),O=I(s,i);if(O-=R,O>0){var g=D+A*S;return{headerLength:R,frameLength:O,stamp:g}}}function u(s,i,D,A,S){var R=p(s.samplerate),O=l(i,D,A,S,R);if(O){var g=O.frameLength,_=O.headerLength,h=O.stamp,d=_+g,C=Math.max(0,D+d-i.length),x;C?(x=new Uint8Array(d-_),x.set(i.subarray(D+_,i.length),0)):x=i.subarray(D+_,D+d);var w={unit:x,pts:h};return C||s.samples.push(w),{sample:w,length:d,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"initPTSFn",function(){return I});var z=N("./src/polyfills/number.ts"),P=N("./src/demux/id3.ts"),F=N("./src/demux/dummy-demuxed-track.ts"),G=N("./src/utils/mp4-tools.ts"),K=N("./src/utils/typed-array.ts"),n=function(){function E(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=E.prototype;return f.resetInitSegment=function(c,a,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(c,a){return!1},f.appendFrame=function(c,a,p){},f.demux=function(c,a){this.cachedData&&(c=Object(G.appendUint8Array)(this.cachedData,c),this.cachedData=null);var p=P.getID3Data(c,0),l=p?p.length:0,u,s,i=this._audioTrack,D=this._id3Track,A=p?P.getTimeStamp(p):void 0,S=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=I(A,a)),p&&p.length>0&&D.samples.push({pts:this.initPTS,dts:this.initPTS,data:p}),s=this.initPTS;ln?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,I=n>>3,n-=I>>3,this.bytesAvailable-=I,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},G.readBits=function(n){var I=Math.min(this.bitsAvailable,n),E=this.word>>>32-I;return n>32&&z.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=I,this.bitsAvailable>0?this.word<<=I:this.bytesAvailable>0&&this.loadWord(),I=n-I,I>0&&this.bitsAvailable?E<>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},G.skipUEG=function(){this.skipBits(1+this.skipLZ())},G.skipEG=function(){this.skipBits(1+this.skipLZ())},G.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},G.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},G.readBoolean=function(){return this.readBits(1)===1},G.readUByte=function(){return this.readBits(8)},G.readUShort=function(){return this.readBits(16)},G.readUInt=function(){return this.readBits(32)},G.skipScalingList=function(n){for(var I=8,E=8,f,b=0;b0?S.subarray(O,O+g):void 0},G=function(S,R){var O=0;return O=(S[R]&127)<<21,O|=(S[R+1]&127)<<14,O|=(S[R+2]&127)<<7,O|=S[R+3]&127,O},K=function(S,R){return z(S,R)&&G(S,R+6)+10<=S.length-R},n=function(S){for(var R=f(S),O=0;O>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:w+=String.fromCharCode(d);break;case 12:case 13:C=S[j++],w+=String.fromCharCode((d&31)<<6|C&63);break;case 14:C=S[j++],x=S[j++],w+=String.fromCharCode((d&15)<<12|(C&63)<<6|(x&63)<<0);break;default:}}return w},s={decodeTextFrame:a},i;function D(){return!i&&typeof self.TextDecoder!="undefined"&&(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/demux/base-audio-demuxer.ts"),P=N("./src/demux/id3.ts"),F=N("./src/utils/logger.ts"),G=N("./src/demux/mpegaudio.ts");function K(E,f){E.prototype=Object.create(f.prototype),E.prototype.constructor=E,n(E,f)}function n(E,f){return n=Object.setPrototypeOf||function(c,a){return c.__proto__=a,c},n(E,f)}var I=function(E){K(f,E);function f(){return E.apply(this,arguments)||this}var b=f.prototype;return b.resetInitSegment=function(a,p,l){E.prototype.resetInitSegment.call(this,a,p,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:a,duration:l,inputTimeScale:9e4,dropped:0}},f.probe=function(a){if(!a)return!1;for(var p=P.getID3Data(a,0)||[],l=p.length,u=a.length;l0},K.demux=function(I){var E=I,f=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(E=Object(z.appendUint8Array)(this.remainderData,I));var b=Object(z.segmentValidRange)(E);this.remainderData=b.remainder,f.samples=b.valid||new Uint8Array}else f.samples=E;return{audioTrack:Object(P.dummyTrack)(),avcTrack:f,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},K.flush=function(){var I=Object(P.dummyTrack)();return I.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:I,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},K.demuxSampleAes=function(I,E,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},K.destroy=function(){},G}();F.minProbeByteLength=1024,Y.default=F},"./src/demux/mpegaudio.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"appendFrame",function(){return n}),N.d(Y,"parseHeader",function(){return I}),N.d(Y,"isHeaderPattern",function(){return E}),N.d(Y,"isHeader",function(){return f}),N.d(Y,"canParse",function(){return b}),N.d(Y,"probe",function(){return c});var z=null,P=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],F=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],G=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],K=[0,1,1,4];function n(a,p,l,u,s){if(l+24>p.length)return;var i=I(p,l);if(i&&l+i.frameLength<=p.length){var D=i.samplesPerFrame*9e4/i.sampleRate,A=u+s*D,S={unit:p.subarray(l,l+i.frameLength),pts:A,dts:A};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(S),{sample:S,length:i.frameLength,missing:0}}}function I(a,p){var l=a[p+1]>>3&3,u=a[p+1]>>1&3,s=a[p+2]>>4&15,i=a[p+2]>>2&3;if(l!==1&&s!==0&&s!==15&&i!==3){var D=a[p+2]>>1&1,A=a[p+3]>>6,S=l===3?3-u:u===3?3:4,R=P[S*14+s-1]*1e3,O=l===3?0:l===2?1:2,g=F[O*3+i],_=A===3?1:2,h=G[l][u],d=K[u],C=h*8*d,x=Math.floor(h*R/g+D)*d;if(z===null){var w=navigator.userAgent||"",j=w.match(/Chrome\/(\d+)/i);z=j?parseInt(j[1]):0}var W=!!z&&z<=87;return W&&u===2&&R>=224e3&&A===0&&(a[p+3]=a[p+3]|128),{sampleRate:g,channelCount:_,frameLength:x,samplesPerFrame:C}}}function E(a,p){return a[p]===255&&(a[p+1]&224)===224&&(a[p+1]&6)!==0}function f(a,p){return p+1=I.length){f();return}if(I[E].unit.length<32)continue;var b=this.decrypter.isSync();if(this.decryptAacSample(I,E,f,b),!b)return}},K.getAvcEncryptedData=function(I){for(var E=Math.floor((I.length-48)/160)*16+16,f=new Int8Array(E),b=0,c=32;c<=I.length-16;c+=160,b+=16)f.set(I.subarray(c,c+16),b);return f},K.getAvcDecryptedUnit=function(I,E){for(var f=new Uint8Array(E),b=0,c=32;c<=I.length-16;c+=160,b+=16)I.set(f.subarray(b,b+16),c);return I},K.decryptAvcSample=function(I,E,f,b,c,a){var p=Object(P.discardEPB)(c.data),l=this.getAvcEncryptedData(p),u=this;this.decryptBuffer(l.buffer,function(s){c.data=u.getAvcDecryptedUnit(p,s),a||u.decryptAvcSamples(I,E,f+1,b)})},K.decryptAvcSamples=function(I,E,f,b){if(I instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;E++,f=0){if(E>=I.length){b();return}for(var c=I[E].units;!(f>=c.length);f++){var a=c[f];if(a.data.length<=48||a.type!==1&&a.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(I,E,f,b,a,p),!p)return}}},G}();Y.default=F},"./src/demux/transmuxer-interface.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return c});var z=N("./node_modules/webworkify-webpack/index.js"),P=N.n(z),F=N("./src/events.ts"),G=N("./src/demux/transmuxer.ts"),K=N("./src/utils/logger.ts"),n=N("./src/errors.ts"),I=N("./src/utils/mediasource-helper.ts"),E=N("./node_modules/eventemitter3/index.js"),f=N.n(E),b=Object(I.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function a(l,u,s,i){var D=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=l,this.id=u,this.onTransmuxComplete=s,this.onFlush=i;var A=l.config,S=function(h,d){d=d||{},d.frag=D.frag,d.id=D.id,l.trigger(h,d)};this.observer=new E.EventEmitter,this.observer.on(F.Events.FRAG_DECRYPTED,S),this.observer.on(F.Events.ERROR,S);var R={mp4:b.isTypeSupported("video/mp4"),mpeg:b.isTypeSupported("audio/mpeg"),mp3:b.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(A.enableWorker&&typeof Worker!="undefined"){K.logger.log("demuxing in webworker");var g;try{g=this.worker=z("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(_){l.trigger(F.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(_.message+" ("+_.filename+":"+_.lineno+")")})},g.postMessage({cmd:"init",typeSupported:R,vendor:O,id:u,config:JSON.stringify(A)})}catch(_){K.logger.warn("Error in worker:",_),K.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new G.default(this.observer,R,A,O,u),this.worker=null}}else this.transmuxer=new G.default(this.observer,R,A,O,u)}var p=a.prototype;return p.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},p.push=function(u,s,i,D,A,S,R,O,g,_){var h=this;g.transmuxing.start=self.performance.now();var d=this.transmuxer,C=this.worker,x=S?S.start:A.start,w=A.decryptdata,j=this.frag,W=!(j&&A.cc===j.cc),T=!(j&&g.level===j.level),M=j?g.sn-j.sn:-1,m=this.part?g.part-this.part.index:1,v=!T&&(M===1||M===0&&m===1),H=self.performance.now();(T||M||A.stats.parsing.start===0)&&(A.stats.parsing.start=H),S&&(m||!v)&&(S.stats.parsing.start=H);var X=new G.TransmuxState(W,v,O,T,x);if(!v||W){K.logger.log("[transmuxer-interface, "+A.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+` discontinuity: `+W+` trackSwitch: `+T+` contiguous: `+v+` accurateTimeOffset: `+O+` timeOffset: `+x);var q=new G.TransmuxConfig(i,D,s,R,_);this.configureTransmuxer(q)}if(this.frag=A,this.part=S,C)C.postMessage({cmd:"demux",data:u,decryptdata:w,chunkMeta:g,state:X},u instanceof ArrayBuffer?[u]:[]);else if(d){var re=d.push(u,w,g,X);Object(G.isPromise)(re)?re.then(function(ye){h.handleTransmuxComplete(ye)}):this.handleTransmuxComplete(re)}},p.flush=function(u){var s=this;u.transmuxing.start=self.performance.now();var i=this.transmuxer,D=this.worker;if(D)D.postMessage({cmd:"flush",chunkMeta:u});else if(i){var A=i.flush(u);Object(G.isPromise)(A)?A.then(function(S){s.handleFlushResult(S,u)}):this.handleFlushResult(A,u)}},p.handleFlushResult=function(u,s){var i=this;u.forEach(function(D){i.handleTransmuxComplete(D)}),this.onFlush(s)},p.onWorkerMessage=function(u){var s=u.data,i=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,i.trigger(s.event,s.data);break}}},p.configureTransmuxer=function(u){var s=this.worker,i=this.transmuxer;s?s.postMessage({cmd:"configure",config:u}):i&&i.configure(u)},p.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},a}()},"./src/demux/transmuxer-worker.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return n});var z=N("./src/demux/transmuxer.ts"),P=N("./src/events.ts"),F=N("./src/utils/logger.ts"),G=N("./node_modules/eventemitter3/index.js"),K=N.n(G);function n(c){var a=new G.EventEmitter,p=function(u,s){c.postMessage({event:u,data:s})};a.on(P.Events.FRAG_DECRYPTED,p),a.on(P.Events.ERROR,p),c.addEventListener("message",function(l){var u=l.data;switch(u.cmd){case"init":{var s=JSON.parse(u.config);c.transmuxer=new z.default(a,u.typeSupported,s,u.vendor,u.id),Object(F.enableLogs)(s.debug),p("init",null);break}case"configure":{c.transmuxer.configure(u.config);break}case"demux":{var i=c.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(z.isPromise)(i)?i.then(function(S){I(c,S)}):I(c,i);break}case"flush":{var D=u.chunkMeta,A=c.transmuxer.flush(D);Object(z.isPromise)(A)?A.then(function(S){f(c,S,D)}):f(c,A,D);break}default:break}})}function I(c,a){if(b(a.remuxResult))return;var p=[],l=a.remuxResult,u=l.audio,s=l.video;u&&E(p,u),s&&E(p,s),c.postMessage({event:"transmuxComplete",data:a},p)}function E(c,a){a.data1&&c.push(a.data1.buffer),a.data2&&c.push(a.data2.buffer)}function f(c,a,p){a.forEach(function(l){I(c,l)}),c.postMessage({event:"flush",data:p})}function b(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return s}),N.d(Y,"isPromise",function(){return A}),N.d(Y,"TransmuxConfig",function(){return S}),N.d(Y,"TransmuxState",function(){return R});var z=N("./src/events.ts"),P=N("./src/errors.ts"),F=N("./src/crypt/decrypter.ts"),G=N("./src/demux/aacdemuxer.ts"),K=N("./src/demux/mp4demuxer.ts"),n=N("./src/demux/tsdemuxer.ts"),I=N("./src/demux/mp3demuxer.ts"),E=N("./src/remux/mp4-remuxer.ts"),f=N("./src/remux/passthrough-remuxer.ts"),b=N("./src/demux/chunk-cache.ts"),c=N("./src/utils/mp4-tools.ts"),a=N("./src/utils/logger.ts"),p;try{p=self.performance.now.bind(self.performance)}catch(O){a.logger.debug("Unable to use Performance API on this environment"),p=self.Date.now}var l=[{demux:n.default,remux:E.default},{demux:K.default,remux:f.default},{demux:G.default,remux:E.default},{demux:I.default,remux:E.default}],u=1024;l.forEach(function(O){var g=O.demux;u=Math.max(u,g.minProbeByteLength)});var s=function(){function O(_,h,d,C,x){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new b.default,this.observer=_,this.typeSupported=h,this.config=d,this.vendor=C,this.id=x}var g=O.prototype;return g.configure=function(h){this.transmuxConfig=h,this.decrypter&&this.decrypter.reset()},g.push=function(h,d,C,x){var w=this,j=C.transmuxing;j.executeStart=p();var W=new Uint8Array(h),T=this.cache,M=this.config,m=this.currentTransmuxState,v=this.transmuxConfig;x&&(this.currentTransmuxState=x);var H=i(W,d);if(H&&H.method==="AES-128"){var X=this.getDecrypter();if(M.enableSoftwareAES){var q=X.softwareDecrypt(W,H.key.buffer,H.iv.buffer);if(!q)return j.executeEnd=p(),D(C);W=new Uint8Array(q)}else return this.decryptionPromise=X.webCryptoDecrypt(W,H.key.buffer,H.iv.buffer).then(function(Ke){var nt=w.push(Ke,null,C);return w.decryptionPromise=null,nt}),this.decryptionPromise}var re=x||m,ye=re.contiguous,pe=re.discontinuity,ue=re.trackSwitch,fe=re.accurateTimeOffset,be=re.timeOffset,se=v.audioCodec,ae=v.videoCodec,Ce=v.defaultInitPts,ze=v.duration,Ye=v.initSegmentData;if((pe||ue)&&this.resetInitSegment(Ye,se,ae,ze),pe&&this.resetInitialTimestamp(Ce),ye||this.resetContiguity(),this.needsProbing(W,pe,ue)){if(T.dataLength){var He=T.flush();W=Object(c.appendUint8Array)(He,W)}this.configureTransmuxer(W,v)}var Ve=this.transmux(W,H,be,fe,C),Fe=this.currentTransmuxState;return Fe.contiguous=!0,Fe.discontinuity=!1,Fe.trackSwitch=!1,j.executeEnd=p(),Ve},g.flush=function(h){var d=this,C=h.transmuxing;C.executeStart=p();var x=this.decrypter,w=this.cache,j=this.currentTransmuxState,W=this.decryptionPromise;if(W)return W.then(function(){return d.flush(h)});var T=[],M=j.timeOffset;if(x){var m=x.flush();m&&T.push(this.push(m,null,h))}var v=w.dataLength;w.reset();var H=this.demuxer,X=this.remuxer;if(!H||!X)return v>=u&&this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=p(),[D(h)];var q=H.flush(M);return A(q)?q.then(function(re){return d.flushRemux(T,re,h),T}):(this.flushRemux(T,q,h),T)},g.flushRemux=function(h,d,C){var x=d.audioTrack,w=d.avcTrack,j=d.id3Track,W=d.textTrack,T=this.currentTransmuxState,M=T.accurateTimeOffset,m=T.timeOffset;a.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var v=this.remuxer.remux(x,w,j,W,m,M,!0,this.id);h.push({remuxResult:v,chunkMeta:C}),C.transmuxing.executeEnd=p()},g.resetInitialTimestamp=function(h){var d=this.demuxer,C=this.remuxer;if(!d||!C)return;d.resetTimeStamp(h),C.resetTimeStamp(h)},g.resetContiguity=function(){var h=this.demuxer,d=this.remuxer;if(!h||!d)return;h.resetContiguity(),d.resetNextTimestamp()},g.resetInitSegment=function(h,d,C,x){var w=this.demuxer,j=this.remuxer;if(!w||!j)return;w.resetInitSegment(d,C,x),j.resetInitSegment(h,d,C)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(h,d,C,x,w){var j;return d&&d.method==="SAMPLE-AES"?j=this.transmuxSampleAes(h,d,C,x,w):j=this.transmuxUnencrypted(h,C,x,w),j},g.transmuxUnencrypted=function(h,d,C,x){var w=this.demuxer.demux(h,d,!1,!this.config.progressive),j=w.audioTrack,W=w.avcTrack,T=w.id3Track,M=w.textTrack,m=this.remuxer.remux(j,W,T,M,d,C,!1,this.id);return{remuxResult:m,chunkMeta:x}},g.transmuxSampleAes=function(h,d,C,x,w){var j=this;return this.demuxer.demuxSampleAes(h,d,C).then(function(W){var T=j.remuxer.remux(W.audioTrack,W.avcTrack,W.id3Track,W.textTrack,C,x,!1,j.id);return{remuxResult:T,chunkMeta:w}})},g.configureTransmuxer=function(h,d){for(var C=this.config,x=this.observer,w=this.typeSupported,j=this.vendor,W=d.audioCodec,T=d.defaultInitPts,M=d.duration,m=d.initSegmentData,v=d.videoCodec,H,X=0,q=l.length;X0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(_=g),_}var D=function(g){return{remuxResult:{},chunkMeta:g}};function A(O){return"then"in O&&O.then instanceof Function}var S=function(g,_,h,d,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=_,this.initSegmentData=h,this.duration=d,this.defaultInitPts=C},R=function(g,_,h,d,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=_,this.accurateTimeOffset=h,this.trackSwitch=d,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"discardEPB",function(){return D});var z=N("./src/demux/adts.ts"),P=N("./src/demux/mpegaudio.ts"),F=N("./src/demux/exp-golomb.ts"),G=N("./src/demux/id3.ts"),K=N("./src/demux/sample-aes.ts"),n=N("./src/events.ts"),I=N("./src/utils/mp4-tools.ts"),E=N("./src/utils/logger.ts"),f=N("./src/errors.ts"),b={video:1,audio:2,id3:3,text:4},c=function(){function A(R,O,g){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=O,this.typeSupported=g}A.probe=function(O){var g=A.syncOffset(O);return g<0?!1:(g&&E.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},A.syncOffset=function(O){for(var g=Math.min(1e3,O.length-3*188),_=0;_>4,se=void 0;if(be>1){if(se=pe+5+O[pe+4],se===pe+188)continue}else se=pe+4;switch(fe){case j:ue&&(W&&(d=u(W))&&this.parseAVCPES(d,!1),W={data:[],size:0}),W&&(W.data.push(O.subarray(se,pe+188)),W.size+=pe+188-se);break;case T:ue&&(m&&(d=u(m))&&(x.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),m={data:[],size:0}),m&&(m.data.push(O.subarray(se,pe+188)),m.size+=pe+188-se);break;case M:ue&&(v&&(d=u(v))&&this.parseID3PES(d),v={data:[],size:0}),v&&(v.data.push(O.subarray(se,pe+188)),v.size+=pe+188-se);break;case 0:ue&&(se+=O[se]+1),q=this._pmtId=p(O,se);break;case q:{ue&&(se+=O[se]+1);var ae=l(O,se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,_);j=ae.avc,j>0&&(C.pid=j),T=ae.audio,T>0&&(x.pid=T,x.isAAC=ae.isAAC),M=ae.id3,M>0&&(w.pid=M),H&&!X&&(E.logger.log("reparse from beginning"),H=!1,pe=ye-188),X=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=W,x.pesData=m,w.pesData=v;var Ce={audioTrack:x,avcTrack:C,id3Track:w,textTrack:this._txtTrack};return h&&this.extractRemainingSamples(Ce),Ce},S.flush=function(){var O=this.remainderData;this.remainderData=null;var g;return O?g=this.demux(O,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},S.extractRemainingSamples=function(O){var g=O.audioTrack,_=O.avcTrack,h=O.id3Track,d=_.pesData,C=g.pesData,x=h.pesData,w;d&&(w=u(d))?(this.parseAVCPES(w,!0),_.pesData=null):_.pesData=d,C&&(w=u(C))?(g.isAAC?this.parseAACPES(w):this.parseMPEGPES(w),g.pesData=null):(C!=null&&C.size&&E.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=C),x&&(w=u(x))?(this.parseID3PES(w),h.pesData=null):h.pesData=x},S.demuxSampleAes=function(O,g,_){var h=this.demux(O,_,!0,!this.config.progressive),d=this.sampleAes=new K.default(this.observer,this.config,g);return this.decrypt(h,d)},S.decrypt=function(O,g){return new Promise(function(_){var h=O.audioTrack,d=O.avcTrack;h.samples&&h.isAAC?g.decryptAacSamples(h.samples,0,function(){d.samples?g.decryptAvcSamples(d.samples,0,0,function(){_(O)}):_(O)}):d.samples&&g.decryptAvcSamples(d.samples,0,0,function(){_(O)})})},S.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},S.parseAVCPES=function(O,g){var _=this,h=this._avcTrack,d=this.parseAVCNALu(O.data),C=!1,x=this.avcSample,w,j=!1;O.data=null,x&&d.length&&!h.audFound&&(s(x,h),x=this.avcSample=a(!1,O.pts,O.dts,"")),d.forEach(function(W){switch(W.type){case 1:{w=!0,x||(x=_.avcSample=a(!0,O.pts,O.dts,"")),C&&(x.debug+="NDR "),x.frame=!0;var T=W.data;if(j&&T.length>4){var M=new F.default(T).readSliceType();(M===2||M===4||M===7||M===9)&&(x.key=!0)}break}case 5:w=!0,x||(x=_.avcSample=a(!0,O.pts,O.dts,"")),C&&(x.debug+="IDR "),x.key=!0,x.frame=!0;break;case 6:{w=!0,C&&x&&(x.debug+="SEI ");var m=new F.default(D(W.data));m.readUByte();for(var v=0,H=0,X=!1,q=0;!X&&m.bytesAvailable>1;){v=0;do q=m.readUByte(),v+=q;while(q===255);H=0;do q=m.readUByte(),H+=q;while(q===255);if(v===4&&m.bytesAvailable!==0){X=!0;var re=m.readUByte();if(re===181){var ye=m.readUShort();if(ye===49){var pe=m.readUInt();if(pe===1195456820){var ue=m.readUByte();if(ue===3){for(var fe=m.readUByte(),be=m.readUByte(),se=31&fe,ae=[fe,be],Ce=0;Ce16){for(var ze=[],Ye=0;Ye<16;Ye++)ze.push(m.readUByte().toString(16)),(Ye===3||Ye===5||Ye===7||Ye===9)&&ze.push("-");for(var He=H-16,Ve=new Uint8Array(He),Fe=0;Fe=0){var m={data:O.subarray(T,x-h-1),type:M};C.push(m)}else{var v=this.getLastNalUnit();if(v&&(d&&x<=4-d&&(v.state&&(v.data=v.data.subarray(0,v.data.byteLength-d))),j=x-h-1,j>0)){var H=new Uint8Array(v.data.byteLength+j);H.set(v.data,0),H.set(O.subarray(0,j),v.data.byteLength),v.data=H,v.state=0}}x=0&&h>=0){var X={data:O.subarray(T,g),type:M,state:h};C.push(X)}if(C.length===0){var q=this.getLastNalUnit();if(q){var re=new Uint8Array(q.data.byteLength+O.byteLength);re.set(q.data,0),re.set(O,q.data.byteLength),q.data=re}}return _.naluState=h,C},S.parseAACPES=function(O){var g=0,_=this._audioTrack,h=this.aacOverFlow,d=O.data;if(h){this.aacOverFlow=null;var C=h.sample.unit.byteLength,x=Math.min(h.missing,C),w=C-x;h.sample.unit.set(d.subarray(0,x),w),_.samples.push(h.sample),g=h.missing}var j,W;for(j=g,W=d.length;j1;){var C=new Uint8Array(d[0].length+d[1].length);C.set(d[0]),C.set(d[1],d[0].length),d[0]=C,d.splice(1,1)}R=d[0];var x=(R[0]<<16)+(R[1]<<8)+R[2];if(x===1){if(O=(R[4]<<8)+R[5],O&&O>A.size-6)return null;var w=R[7];w&192&&(_=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,w&64?(h=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,_-h>60*9e4&&(E.logger.warn(Math.round((_-h)/9e4)+"s delta between PTS and DTS, align them"),_=h)):h=_),g=R[8];var j=g+9;if(A.size<=j)return null;A.size-=j;for(var W=new Uint8Array(A.size),T=0,M=d.length;Tm){j-=m;continue}else R=R.subarray(j),m-=j,j=0;W.set(R,S),S+=m}return O&&(O-=g+3),{data:W,pts:_,dts:h,len:O}}return null}function s(A,S){if(A.units.length&&A.frame){if(A.pts===void 0){var R=S.samples,O=R.length;if(O){var g=R[O-1];A.pts=g.pts,A.dts=g.dts}else{S.dropped++;return}}S.samples.push(A)}A.debug.length&&E.logger.log(A.pts+"/"+A.dts+":"+A.debug)}function i(A,S){var R=A.length;if(R>0){if(S.pts>=A[R-1].pts)A.push(S);else for(var O=R-1;O>=0;O--)if(S.pts_)return d;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,_=this.autoLevelCapping,h;return _===-1&&g&&g.length?h=g.length-1:h=_,h}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var _=this.audioTrackController;_&&(_.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var _=this.subtitleTrackController;_&&(_.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var _=this.subtitleTrackController;_&&(_.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return u.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:a.hlsDefaultConfig},set:function(g){S.defaultConfig=g}}]),S}();A.defaultConfig=void 0},"./src/is-supported.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"isSupported",function(){return F}),N.d(Y,"changeTypeSupported",function(){return G});var z=N("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function F(){var K=Object(z.getMediaSource)();if(!K)return!1;var n=P(),I=K&&typeof K.isTypeSupported=="function"&&K.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),E=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!I&&!!E}function G(){var K,n=P();return typeof(n==null||((K=n.prototype)===null||K===void 0)?void 0:K.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return c}),N.d(Y,"LoadError",function(){return p});var z=N("./src/polyfills/number.ts"),P=N("./src/errors.ts");function F(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,E(l,u)}function G(l){var u=typeof Map=="function"?new Map:void 0;return G=function(i){if(i===null||!I(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(i))return u.get(i);u.set(i,D)}function D(){return K(i,arguments,f(this).constructor)}return D.prototype=Object.create(i.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),E(D,i)},G(l)}function K(l,u,s){return n()?K=Reflect.construct:K=function(D,A,S){var R=[null];R.push.apply(R,A);var O=Function.bind.apply(D,R),g=new O;return S&&E(g,S.prototype),g},K.apply(null,arguments)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function I(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function E(l,u){return E=Object.setPrototypeOf||function(i,D){return i.__proto__=D,i},E(l,u)}function f(l){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},f(l)}var b=Math.pow(2,17),c=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var u=l.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(i,D){var A=this,S=i.url;if(!S)return Promise.reject(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,networkDetails:null},"Fragment does not have a "+(S?"part list":"url")));this.abort();var R=this.config,O=R.fLoader,g=R.loader;return new Promise(function(_,h){A.loader&&A.loader.destroy();var d=A.loader=i.loader=O?new O(R):new g(R),C=a(i),x={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:b};i.stats=d.stats,d.load(C,x,{onSuccess:function(j,W,T,M){A.resetLoader(i,d),_({frag:i,part:null,payload:j.data,networkDetails:M})},onError:function(j,W,T){A.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:j,networkDetails:T}))},onAbort:function(j,W,T){A.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,networkDetails:T}))},onTimeout:function(j,W,T){A.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,networkDetails:T}))},onProgress:function(j,W,T,M){D&&D({frag:i,part:null,payload:T,networkDetails:M})}})})},u.loadPart=function(i,D,A){var S=this;this.abort();var R=this.config,O=R.fLoader,g=R.loader;return new Promise(function(_,h){S.loader&&S.loader.destroy();var d=S.loader=i.loader=O?new O(R):new g(R),C=a(i,D),x={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:b};D.stats=d.stats,d.load(C,x,{onSuccess:function(j,W,T,M){S.resetLoader(i,d),S.updateStatsFromPart(i,D);var m={frag:i,part:D,payload:j.data,networkDetails:M};A(m),_(m)},onError:function(j,W,T){S.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:D,response:j,networkDetails:T}))},onAbort:function(j,W,T){i.stats.aborted=D.stats.aborted,S.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,part:D,networkDetails:T}))},onTimeout:function(j,W,T){S.resetLoader(i,d),h(new p({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:D,networkDetails:T}))}})})},u.updateStatsFromPart=function(i,D){var A=i.stats,S=D.stats,R=S.total;if(A.loaded+=S.loaded,R){var O=Math.round(i.duration/D.duration),g=Math.min(Math.round(A.loaded/R),O),_=O-g,h=_*Math.round(A.loaded/g);A.total=A.loaded+h}else A.total=Math.max(A.loaded,A.total);var d=A.loading,C=S.loading;d.start?d.first+=C.first-C.start:(d.start=C.start,d.first=C.first),d.end=C.end},u.resetLoader=function(i,D){i.loader=null,this.loader===D&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),D.destroy()},l}();function a(l,u){u===void 0&&(u=null);var s=u||l,i={frag:l,part:u,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},D=s.byteRangeStartOffset,A=s.byteRangeEndOffset;return Object(z.isFiniteNumber)(D)&&Object(z.isFiniteNumber)(A)&&(i.rangeStart=D,i.rangeEnd=A),i}var p=function(l){F(u,l);function u(s){for(var i,D=arguments.length,A=new Array(D>1?D-1:0),S=1;S>8*(15-R)&255;return S},i.setDecryptDataFromLevelKey=function(A,S){var R=A;return(A==null?void 0:A.method)==="AES-128"&&A.uri&&!A.iv&&(R=K.LevelKey.fromURI(A.uri),R.method=A.method,R.iv=this.createInitializationVector(S),R.keyFormat="identity"),R},i.setElementaryStreamInfo=function(A,S,R,O,g,_){_===void 0&&(_=!1);var h=this.elementaryStreams,d=h[A];if(!d){h[A]={startPTS:S,endPTS:R,startDTS:O,endDTS:g,partial:_};return}d.startPTS=Math.min(d.startPTS,S),d.endPTS=Math.max(d.endPTS,R),d.startDTS=Math.min(d.startDTS,O),d.endDTS=Math.max(d.endDTS,g)},i.clearElementaryStreamInfo=function(){var A=this.elementaryStreams;A[c.AUDIO]=null,A[c.VIDEO]=null,A[c.AUDIOVIDEO]=null},b(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var A=this.sn;typeof A!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&G.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),A=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,A)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(z.isFiniteNumber)(this.programDateTime))return null;var A=Object(z.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+A*1e3}},{key:"encrypted",get:function(){var A;return!!((A=this.decryptdata)!==null&&A!==void 0&&A.keyFormat&&this.decryptdata.uri)}}]),s}(a),l=function(u){I(s,u);function s(i,D,A,S,R){var O;O=u.call(this,A)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new n.LoadStats,O.duration=i.decimalFloatingPoint("DURATION"),O.gap=i.bool("GAP"),O.independent=i.bool("INDEPENDENT"),O.relurl=i.enumeratedString("URI"),O.fragment=D,O.index=S;var g=i.enumeratedString("BYTERANGE");return g&&O.setByteRange(g,R),R&&(O.fragOffset=R.fragOffset+R.duration),O}return b(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var D=this.elementaryStreams;return!!(D.audio||D.video||D.audiovideo)}}]),s}(a)},"./src/loader/key-loader.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return G});var z=N("./src/events.ts"),P=N("./src/errors.ts"),F=N("./src/utils/logger.ts"),G=function(){function K(I){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=I,this._registerListeners()}var n=K.prototype;return n._registerListeners=function(){this.hls.on(z.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(z.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var E in this.loaders){var f=this.loaders[E];f&&f.destroy()}this.loaders={}},n.onKeyLoading=function(E,f){var b=f.frag,c=b.type,a=this.loaders[c];if(!b.decryptdata){F.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var p=b.decryptdata.uri;if(p!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(a&&(F.logger.warn("abort previous key loader for type:"+c),a.abort()),!p){F.logger.warn("key uri is falsy");return}var u=l.loader,s=b.loader=this.loaders[c]=new u(l);this.decrypturl=p,this.decryptkey=null;var i={url:p,frag:b,responseType:"arraybuffer"},D={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(i,D,A)}else this.decryptkey&&(b.decryptdata.key=this.decryptkey,this.hls.trigger(z.Events.KEY_LOADED,{frag:b}))},n.loadsuccess=function(E,f,b){var c=b.frag;if(!c.decryptdata){F.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(E.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(z.Events.KEY_LOADED,{frag:c})},n.loaderror=function(E,f){var b=f.frag,c=b.loader;c&&c.abort(),delete this.loaders[b.type],this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:b,response:E})},n.loadtimeout=function(E,f){var b=f.frag,c=b.loader;c&&c.abort(),delete this.loaders[b.type],this.hls.trigger(z.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:b})},K}()},"./src/loader/level-details.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"LevelDetails",function(){return K});var z=N("./src/polyfills/number.ts");function P(n,I){for(var E=0;Ef.endSN||b>0||b===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},F(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(z.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var b=this.driftEnd-this.driftStart;return b*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"LevelKey",function(){return K});var z=N("./node_modules/url-toolkit/src/url-toolkit.js"),P=N.n(z);function F(n,I){for(var E=0;E2){var h=_.shift()+".";return h+=parseInt(_.shift()).toString(16),h+=("000"+parseInt(_.shift()).toString(16)).substr(-4),h}return g},R.resolve=function(g,_){return P.buildAbsoluteURL(_,g,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(g,_){var h=[],d={},C=!1;b.lastIndex=0;for(var x;(x=b.exec(g))!=null;)if(x[1]){var w=new I.AttrList(x[1]),j={attrs:w,bitrate:w.decimalInteger("AVERAGE-BANDWIDTH")||w.decimalInteger("BANDWIDTH"),name:w.NAME,url:R.resolve(x[2],_)},W=w.decimalResolution("RESOLUTION");W&&(j.width=W.width,j.height=W.height),i((w.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),j),j.videoCodec&&j.videoCodec.indexOf("avc1")!==-1&&(j.videoCodec=R.convertAVC1ToAVCOTI(j.videoCodec)),h.push(j)}else if(x[3]){var T=new I.AttrList(x[3]);T["DATA-ID"]&&(C=!0,d[T["DATA-ID"]]=T)}return{levels:h,sessionData:C?d:null}},R.parseMasterPlaylistMedia=function(g,_,h,d){d===void 0&&(d=[]);var C,x=[],w=0;for(c.lastIndex=0;(C=c.exec(g))!==null;){var j=new I.AttrList(C[1]);if(j.TYPE===h){var W={attrs:j,bitrate:0,id:w++,groupId:j["GROUP-ID"],instreamId:j["INSTREAM-ID"],name:j.NAME||j.LANGUAGE||"",type:h,default:j.bool("DEFAULT"),autoselect:j.bool("AUTOSELECT"),forced:j.bool("FORCED"),lang:j.LANGUAGE,url:j.URI?R.resolve(j.URI,_):""};if(d.length){var T=R.findGroup(d,W.groupId)||d[0];D(W,T,"audioCodec"),D(W,T,"textCodec")}x.push(W)}}return x},R.parseLevelPlaylist=function(g,_,h,d,C){var x=new K.LevelDetails(_),w=x.fragments,j=null,W=0,T=0,M=0,m=0,v=null,H=new G.Fragment(d,_),X,q,re,ye=-1,pe=!1;for(a.lastIndex=0,x.m3u8=g;(X=a.exec(g))!==null;){pe&&(pe=!1,H=new G.Fragment(d,_),H.start=M,H.sn=W,H.cc=m,H.level=h,j&&(H.initSegment=j,H.rawProgramDateTime=j.rawProgramDateTime));var ue=X[1];if(ue){H.duration=parseFloat(ue);var fe=(" "+X[2]).slice(1);H.title=fe||null,H.tagList.push(fe?["INF",ue,fe]:["INF",ue])}else if(X[3])Object(z.isFiniteNumber)(H.duration)&&(H.start=M,re&&(H.levelkey=re),H.sn=W,H.level=h,H.cc=m,H.urlId=C,w.push(H),H.relurl=(" "+X[3]).slice(1),S(H,v),v=H,M+=H.duration,W++,T=0,pe=!0);else if(X[4]){var be=(" "+X[4]).slice(1);v?H.setByteRange(be,v):H.setByteRange(be)}else if(X[5])H.rawProgramDateTime=(" "+X[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),ye===-1&&(ye=w.length);else{if(X=X[0].match(p),!X){E.logger.warn("No matches on slow regex match for level playlist!");continue}for(q=1;q-1){E.logger.warn("Keyformat "+rt+" is not supported from the manifest");continue}else if(rt!=="identity")continue;nt&&(re=n.LevelKey.fromURL(_,de),de&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(nt)>=0&&(re.method=nt,re.keyFormat=rt,Ue&&(re.keyID=Ue),Ne&&(re.keyFormatVersions=Ne),re.iv=De));break}case"START":{var ft=new I.AttrList(ae),at=ft.decimalFloatingPoint("TIME-OFFSET");Object(z.isFiniteNumber)(at)&&(x.startTimeOffset=at);break}case"MAP":{var _t=new I.AttrList(ae);H.relurl=_t.URI,_t.BYTERANGE&&H.setByteRange(_t.BYTERANGE),H.level=h,H.sn="initSegment",re&&(H.levelkey=re),H.initSegment=null,j=H,pe=!0;break}case"SERVER-CONTROL":{var gt=new I.AttrList(ae);x.canBlockReload=gt.bool("CAN-BLOCK-RELOAD"),x.canSkipUntil=gt.optionalFloat("CAN-SKIP-UNTIL",0),x.canSkipDateRanges=x.canSkipUntil>0&>.bool("CAN-SKIP-DATERANGES"),x.partHoldBack=gt.optionalFloat("PART-HOLD-BACK",0),x.holdBack=gt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var xt=new I.AttrList(ae);x.partTarget=xt.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ze=x.partList;Ze||(Ze=x.partList=[]);var kt=T>0?Ze[Ze.length-1]:void 0,Ot=T++,qe=new G.Part(new I.AttrList(ae),H,_,Ot,kt);Ze.push(qe),H.duration+=qe.duration;break}case"PRELOAD-HINT":{var st=new I.AttrList(ae);x.preloadHint=st;break}case"RENDITION-REPORT":{var xe=new I.AttrList(ae);x.renditionReports=x.renditionReports||[],x.renditionReports.push(xe);break}default:E.logger.warn("line parsed but not handled: "+X);break}}}v&&!v.relurl?(w.pop(),M-=v.duration,x.partList&&(x.fragmentHint=v)):x.partList&&(S(H,v),H.cc=m,x.fragmentHint=H);var we=w.length,me=w[0],ce=w[we-1];if(M+=x.skippedSegments*x.targetduration,M>0&&we&&ce){x.averagetargetduration=M/we;var he=ce.sn;x.endSN=he!=="initSegment"?he:0,me&&(x.startCC=me.cc,me.initSegment||x.fragments.every(function(Te){return Te.relurl&&u(Te.relurl)})&&(E.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new G.Fragment(d,_),H.relurl=ce.relurl,H.level=h,H.sn="initSegment",me.initSegment=H,x.needSidxRanges=!0))}else x.endSN=0,x.startCC=0;return x.fragmentHint&&(M+=x.fragmentHint.duration),x.totalduration=M,x.endCC=m,ye>0&&A(w,ye),x},R}();function i(R,O){["video","audio","text"].forEach(function(g){var _=R.filter(function(d){return Object(f.isCodecType)(d,g)});if(_.length){var h=_.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});O[g+"Codec"]=h.length>0?h[0]:_[0],R=R.filter(function(d){return _.indexOf(d)===-1})}}),O.unknownCodecs=R}function D(R,O,g){var _=O[g];_&&(R[g]=_)}function A(R,O){for(var g=R[O],_=O;_--;){var h=R[_];if(!h)return;h.programDateTime=g.programDateTime-h.duration*1e3,g=h}}function S(R,O){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):O!=null&&O.programDateTime&&(R.programDateTime=O.endProgramDateTime),Object(z.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/polyfills/number.ts"),P=N("./src/events.ts"),F=N("./src/errors.ts"),G=N("./src/utils/logger.ts"),K=N("./src/utils/mp4-tools.ts"),n=N("./src/loader/m3u8-parser.ts"),I=N("./src/types/loader.ts"),E=N("./src/utils/attr-list.ts");function f(a){var p=a.type;switch(p){case I.PlaylistContextType.AUDIO_TRACK:return I.PlaylistLevelType.AUDIO;case I.PlaylistContextType.SUBTITLE_TRACK:return I.PlaylistLevelType.SUBTITLE;default:return I.PlaylistLevelType.MAIN}}function b(a,p){var l=a.url;return(l===void 0||l.indexOf("data:")===0)&&(l=p.url),l}var c=function(){function a(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var p=a.prototype;return p.registerListeners=function(){var u=this.hls;u.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.unregisterListeners=function(){var u=this.hls;u.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.createInternalLoader=function(u){var s=this.hls.config,i=s.pLoader,D=s.loader,A=i||D,S=new A(s);return u.loader=S,this.loaders[u.type]=S,S},p.getInternalLoader=function(u){return this.loaders[u.type]},p.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},p.destroyInternalLoaders=function(){for(var u in this.loaders){var s=this.loaders[u];s&&s.destroy(),this.resetInternalLoader(u)}},p.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},p.onManifestLoading=function(u,s){var i=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:I.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},p.onLevelLoading=function(u,s){var i=s.id,D=s.level,A=s.url,S=s.deliveryDirectives;this.load({id:i,groupId:null,level:D,responseType:"text",type:I.PlaylistContextType.LEVEL,url:A,deliveryDirectives:S})},p.onAudioTrackLoading=function(u,s){var i=s.id,D=s.groupId,A=s.url,S=s.deliveryDirectives;this.load({id:i,groupId:D,level:null,responseType:"text",type:I.PlaylistContextType.AUDIO_TRACK,url:A,deliveryDirectives:S})},p.onSubtitleTrackLoading=function(u,s){var i=s.id,D=s.groupId,A=s.url,S=s.deliveryDirectives;this.load({id:i,groupId:D,level:null,responseType:"text",type:I.PlaylistContextType.SUBTITLE_TRACK,url:A,deliveryDirectives:S})},p.load=function(u){var s,i=this.hls.config,D=this.getInternalLoader(u);if(D){var A=D.context;if(A&&A.url===u.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),D.abort()}var S,R,O,g;switch(u.type){case I.PlaylistContextType.MANIFEST:S=i.manifestLoadingMaxRetry,R=i.manifestLoadingTimeOut,O=i.manifestLoadingRetryDelay,g=i.manifestLoadingMaxRetryTimeout;break;case I.PlaylistContextType.LEVEL:case I.PlaylistContextType.AUDIO_TRACK:case I.PlaylistContextType.SUBTITLE_TRACK:S=0,R=i.levelLoadingTimeOut;break;default:S=i.levelLoadingMaxRetry,R=i.levelLoadingTimeOut,O=i.levelLoadingRetryDelay,g=i.levelLoadingMaxRetryTimeout;break}if(D=this.createInternalLoader(u),(s=u.deliveryDirectives)!==null&&s!==void 0&&s.part){var _;if(u.type===I.PlaylistContextType.LEVEL&&u.level!==null?_=this.hls.levels[u.level].details:u.type===I.PlaylistContextType.AUDIO_TRACK&&u.id!==null?_=this.hls.audioTracks[u.id].details:u.type===I.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(_=this.hls.subtitleTracks[u.id].details),_){var h=_.partTarget,d=_.targetduration;h&&d&&(R=Math.min(Math.max(h*3,d*.8)*1e3,R))}}var C={timeout:R,maxRetry:S,retryDelay:O,maxRetryDelay:g,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};D.load(u,C,x)},p.loadsuccess=function(u,s,i,D){if(D===void 0&&(D=null),i.isSidxRequest){this.handleSidxRequest(u,i),this.handlePlaylistLoaded(u,s,i,D);return}this.resetInternalLoader(i.type);var A=u.data;if(A.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,i,"no EXTM3U delimiter",D);return}s.parsing.start=performance.now(),A.indexOf("#EXTINF:")>0||A.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,s,i,D):this.handleMasterPlaylist(u,s,i,D)},p.loaderror=function(u,s,i){i===void 0&&(i=null),this.handleNetworkError(s,i,!1,u)},p.loadtimeout=function(u,s,i){i===void 0&&(i=null),this.handleNetworkError(s,i,!0)},p.handleMasterPlaylist=function(u,s,i,D){var A=this.hls,S=u.data,R=b(u,i),O=n.default.parseMasterPlaylist(S,R),g=O.levels,_=O.sessionData;if(!g.length){this.handleManifestParsingError(u,i,"no level found in manifest",D);return}var h=g.map(function(W){return{id:W.attrs.AUDIO,audioCodec:W.audioCodec}}),d=g.map(function(W){return{id:W.attrs.SUBTITLES,textCodec:W.textCodec}}),C=n.default.parseMasterPlaylistMedia(S,R,"AUDIO",h),x=n.default.parseMasterPlaylistMedia(S,R,"SUBTITLES",d),w=n.default.parseMasterPlaylistMedia(S,R,"CLOSED-CAPTIONS");if(C.length){var j=C.some(function(W){return!W.url});!j&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(G.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new E.AttrList({}),bitrate:0,url:""}))}A.trigger(P.Events.MANIFEST_LOADED,{levels:g,audioTracks:C,subtitles:x,captions:w,url:R,stats:s,networkDetails:D,sessionData:_})},p.handleTrackOrLevelPlaylist=function(u,s,i,D){var A=this.hls,S=i.id,R=i.level,O=i.type,g=b(u,i),_=Object(z.isFiniteNumber)(S)?S:0,h=Object(z.isFiniteNumber)(R)?R:_,d=f(i),C=n.default.parseLevelPlaylist(u.data,g,h,d,_);if(!C.fragments.length){A.trigger(P.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof i.level=="number"?i.level:void 0});return}if(O===I.PlaylistContextType.MANIFEST){var x={attrs:new E.AttrList({}),bitrate:0,details:C,name:"",url:g};A.trigger(P.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:s,networkDetails:D,sessionData:null})}if(s.parsing.end=performance.now(),C.needSidxRanges){var w,j=(w=C.fragments[0].initSegment)===null||w===void 0?void 0:w.url;this.load({url:j,isSidxRequest:!0,type:O,level:R,levelDetails:C,id:S,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}i.levelDetails=C,this.handlePlaylistLoaded(u,s,i,D)},p.handleSidxRequest=function(u,s){var i=Object(K.parseSegmentIndex)(new Uint8Array(u.data));if(!i)return;var D=i.references,A=s.levelDetails;D.forEach(function(S,R){var O=S.info,g=A.fragments[R];g.byteRange.length===0&&g.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),g.initSegment&&g.initSegment.setByteRange(String(i.moovEndOffset)+"@0")})},p.handleManifestParsingError=function(u,s,i,D){this.hls.trigger(P.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===I.PlaylistContextType.MANIFEST,url:u.url,reason:i,response:u,context:s,networkDetails:D})},p.handleNetworkError=function(u,s,i,D){i===void 0&&(i=!1),G.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var A=F.ErrorDetails.UNKNOWN,S=!1,R=this.getInternalLoader(u);switch(u.type){case I.PlaylistContextType.MANIFEST:A=i?F.ErrorDetails.MANIFEST_LOAD_TIMEOUT:F.ErrorDetails.MANIFEST_LOAD_ERROR,S=!0;break;case I.PlaylistContextType.LEVEL:A=i?F.ErrorDetails.LEVEL_LOAD_TIMEOUT:F.ErrorDetails.LEVEL_LOAD_ERROR,S=!1;break;case I.PlaylistContextType.AUDIO_TRACK:A=i?F.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:F.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,S=!1;break;case I.PlaylistContextType.SUBTITLE_TRACK:A=i?F.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:F.ErrorDetails.SUBTITLE_LOAD_ERROR,S=!1;break}R&&this.resetInternalLoader(u.type);var O={type:F.ErrorTypes.NETWORK_ERROR,details:A,fatal:S,url:u.url,loader:R,context:u,networkDetails:s};D&&(O.response=D),this.hls.trigger(P.Events.ERROR,O)},p.handlePlaylistLoaded=function(u,s,i,D){var A=i.type,S=i.level,R=i.id,O=i.groupId,g=i.loader,_=i.levelDetails,h=i.deliveryDirectives;if(!(_!=null&&_.targetduration)){this.handleManifestParsingError(u,i,"invalid target duration",D);return}if(!g)return;_.live&&(g.getCacheAge&&(_.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(_.ageHeader))&&(_.ageHeader=0));switch(A){case I.PlaylistContextType.MANIFEST:case I.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:_,level:S||0,id:R||0,stats:s,networkDetails:D,deliveryDirectives:h});break;case I.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:_,id:R||0,groupId:O||"",stats:s,networkDetails:D,deliveryDirectives:h});break;case I.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:_,id:R||0,groupId:O||"",stats:s,networkDetails:D,deliveryDirectives:h});break}},a}();Y.default=c},"./src/polyfills/number.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"isFiniteNumber",function(){return z}),N.d(Y,"MAX_SAFE_INTEGER",function(){return P});var z=Number.isFinite||function(F){return typeof F=="number"&&isFinite(F)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(te,Y,N){"use strict";N.r(Y);var z=function(){function P(){}return P.getSilentFrame=function(G,K){switch(G){case"mp4a.40.2":if(K===1)return new Uint8Array([0,200,0,128,35,128]);if(K===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(K===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(K===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(K===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(K===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(K===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(K===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(K===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},P}();Y.default=z},"./src/remux/mp4-generator.ts":function(te,Y,N){"use strict";N.r(Y);var z=Math.pow(2,32)-1,P=function(){function F(){}return F.init=function(){F.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var K;for(K in F.types)F.types.hasOwnProperty(K)&&(F.types[K]=[K.charCodeAt(0),K.charCodeAt(1),K.charCodeAt(2),K.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);F.HDLR_TYPES={video:n,audio:I};var E=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);F.STTS=F.STSC=F.STCO=f,F.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),F.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),F.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),F.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);F.FTYP=F.box(F.types.ftyp,b,a,b,c),F.DINF=F.box(F.types.dinf,F.box(F.types.dref,E))},F.box=function(K){for(var n=8,I=arguments.length,E=new Array(I>1?I-1:0),f=1;f>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=n&255,a.set(K,4),b=0,n=8;b>24&255,K>>16&255,K>>8&255,K&255,I>>24,I>>16&255,I>>8&255,I&255,E>>24,E>>16&255,E>>8&255,E&255,85,196,0,0]))},F.mdia=function(K){return F.box(F.types.mdia,F.mdhd(K.timescale,K.duration),F.hdlr(K.type),F.minf(K))},F.mfhd=function(K){return F.box(F.types.mfhd,new Uint8Array([0,0,0,0,K>>24,K>>16&255,K>>8&255,K&255]))},F.minf=function(K){return K.type==="audio"?F.box(F.types.minf,F.box(F.types.smhd,F.SMHD),F.DINF,F.stbl(K)):F.box(F.types.minf,F.box(F.types.vmhd,F.VMHD),F.DINF,F.stbl(K))},F.moof=function(K,n,I){return F.box(F.types.moof,F.mfhd(K),F.traf(I,n))},F.moov=function(K){for(var n=K.length,I=[];n--;)I[n]=F.trak(K[n]);return F.box.apply(null,[F.types.moov,F.mvhd(K[0].timescale,K[0].duration)].concat(I).concat(F.mvex(K)))},F.mvex=function(K){for(var n=K.length,I=[];n--;)I[n]=F.trex(K[n]);return F.box.apply(null,[F.types.mvex].concat(I))},F.mvhd=function(K,n){n*=K;var I=Math.floor(n/(z+1)),E=Math.floor(n%(z+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,K>>24&255,K>>16&255,K>>8&255,K&255,I>>24,I>>16&255,I>>8&255,I&255,E>>24,E>>16&255,E>>8&255,E&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return F.box(F.types.mvhd,f)},F.sdtp=function(K){var n=K.samples||[],I=new Uint8Array(4+n.length),E,f;for(E=0;E>>8&255),n.push(b&255),n=n.concat(Array.prototype.slice.call(f));for(E=0;E>>8&255),I.push(b&255),I=I.concat(Array.prototype.slice.call(f));var c=F.box(F.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|K.sps.length].concat(n).concat([K.pps.length]).concat(I))),a=K.width,p=K.height,l=K.pixelRatio[0],u=K.pixelRatio[1];return F.box(F.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,a&255,p>>8&255,p&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,F.box(F.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),F.box(F.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,u>>24,u>>16&255,u>>8&255,u&255])))},F.esds=function(K){var n=K.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(K.config).concat([6,1,2]))},F.mp4a=function(K){var n=K.samplerate;return F.box(F.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,K.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),F.box(F.types.esds,F.esds(K)))},F.mp3=function(K){var n=K.samplerate;return F.box(F.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,K.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},F.stsd=function(K){return K.type==="audio"?!K.isAAC&&K.codec==="mp3"?F.box(F.types.stsd,F.STSD,F.mp3(K)):F.box(F.types.stsd,F.STSD,F.mp4a(K)):F.box(F.types.stsd,F.STSD,F.avc1(K))},F.tkhd=function(K){var n=K.id,I=K.duration*K.timescale,E=K.width,f=K.height,b=Math.floor(I/(z+1)),c=Math.floor(I%(z+1));return F.box(F.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,E>>8&255,E&255,0,0,f>>8&255,f&255,0,0]))},F.traf=function(K,n){var I=F.sdtp(K),E=K.id,f=Math.floor(n/(z+1)),b=Math.floor(n%(z+1));return F.box(F.types.traf,F.box(F.types.tfhd,new Uint8Array([0,0,0,0,E>>24,E>>16&255,E>>8&255,E&255])),F.box(F.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,b>>24,b>>16&255,b>>8&255,b&255])),F.trun(K,I.length+16+20+8+16+8+8),I)},F.trak=function(K){return K.duration=K.duration||4294967295,F.box(F.types.trak,F.tkhd(K),F.mdia(K))},F.trex=function(K){var n=K.id;return F.box(F.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},F.trun=function(K,n){var I=K.samples||[],E=I.length,f=12+16*E,b=new Uint8Array(f),c,a,p,l,u,s;for(n+=8+f,b.set([0,0,15,1,E>>>24&255,E>>>16&255,E>>>8&255,E&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),c=0;c>>24&255,p>>>16&255,p>>>8&255,p&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*c);return F.box(F.types.trun,b)},F.initSegment=function(K){F.types||F.init();var n=F.moov(K),I=new Uint8Array(F.FTYP.byteLength+n.byteLength);return I.set(F.FTYP),I.set(n,F.FTYP.byteLength),I},F}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,Y.default=P},"./src/remux/mp4-remuxer.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return s}),N.d(Y,"normalizePts",function(){return i});var z=N("./src/polyfills/number.ts"),P=N("./src/remux/aac-helper.ts"),F=N("./src/remux/mp4-generator.ts"),G=N("./src/events.ts"),K=N("./src/errors.ts"),n=N("./src/utils/logger.ts"),I=N("./src/types/loader.ts"),E=N("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(R){for(var O=1;O0?C:x.pts},_[0].pts);return h&&n.logger.debug("PTS rollover detected"),d},O.remux=function(_,h,d,C,x,w,j,W){var T,M,m,v,H,X,q=x,re=x,ye=_.pid>-1,pe=h.pid>-1,ue=h.samples.length,fe=_.samples.length>0,be=ue>1,se=(!ye||fe)&&(!pe||be)||this.ISGenerated||j;if(se){this.ISGenerated||(m=this.generateIS(_,h,x));var ae=this.isVideoContiguous,Ce=-1;if(be&&(Ce=D(h.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(X=!0,Ce>0){n.logger.warn("[mp4-remuxer]: Dropped "+Ce+" out of "+ue+" video samples due to a missing keyframe");var ze=this.getVideoStartPts(h.samples);h.samples=h.samples.slice(Ce),h.dropped+=Ce,re+=(h.samples[0].pts-ze)/(h.timescale||9e4)}else Ce===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+ue+" video samples"),X=!1);if(this.ISGenerated){if(fe&&be){var Ye=this.getVideoStartPts(h.samples),He=i(_.samples[0].pts,Ye)-Ye,Ve=He/h.inputTimeScale;q+=Math.max(0,Ve),re+=Math.max(0,-Ve)}if(fe){if(_.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),m=this.generateIS(_,h,x)),M=this.remuxAudio(_,q,this.isAudioContiguous,w,pe||be||W===I.PlaylistLevelType.AUDIO?re:void 0),be){var Fe=M?M.endPTS-M.startPTS:0;h.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),m=this.generateIS(_,h,x)),T=this.remuxVideo(h,re,ae,Fe)}}else be&&(T=this.remuxVideo(h,re,ae,0));T&&(T.firstKeyFrame=Ce,T.independent=Ce!==-1)}}return this.ISGenerated&&(d.samples.length&&(H=this.remuxID3(d,x)),C.samples.length&&(v=this.remuxText(C,x))),{audio:M,video:T,initSegment:m,independent:X,text:v,id3:H}},O.generateIS=function(_,h,d){var C=_.samples,x=h.samples,w=this.typeSupported,j={},W=!Object(z.isFiniteNumber)(this._initPTS),T="audio/mp4",M,m,v;if(W&&(M=m=Infinity),_.config&&C.length&&(_.timescale=_.samplerate,_.isAAC||(w.mpeg?(T="audio/mpeg",_.codec=""):w.mp3&&(_.codec="mp3")),j.audio={id:"audio",container:T,codec:_.codec,initSegment:!_.isAAC&&w.mpeg?new Uint8Array(0):F.default.initSegment([_]),metadata:{channelCount:_.channelCount}},W&&(v=_.inputTimeScale,M=m=C[0].pts-Math.round(v*d))),h.sps&&h.pps&&x.length&&(h.timescale=h.inputTimeScale,j.video={id:"main",container:"video/mp4",codec:h.codec,initSegment:F.default.initSegment([h]),metadata:{width:h.width,height:h.height}},W)){v=h.inputTimeScale;var H=this.getVideoStartPts(x),X=Math.round(v*d);m=Math.min(m,i(x[0].dts,H)-X),M=Math.min(M,H-X)}if(Object.keys(j).length)return this.ISGenerated=!0,W&&(this._initPTS=M,this._initDTS=m),{tracks:j,initPTS:M,timescale:v}},O.remuxVideo=function(_,h,d,C){var x=_.inputTimeScale,w=_.samples,j=[],W=w.length,T=this._initPTS,M=this.nextAvcDts,m=8,v,H,X,q=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY,ye=0,pe=!1;if(!d||M===null){var ue=h*x,fe=w[0].pts-i(w[0].dts,w[0].pts);M=ue-fe}for(var be=0;bese.pts){var ae=9e4*.2;ye=Math.max(Math.min(ye,se.pts-se.dts),-1*ae)}se.dts0?be-1:be].dts&&(pe=!0)}pe&&w.sort(function(mn,En){var $t=mn.dts-En.dts,rr=mn.pts-En.pts;return $t||rr}),H=w[0].dts,X=w[w.length-1].dts;var Ce=Math.round((X-H)/(W-1));if(ye<0){if(yeCe,Ke=Ve<-1;if(Fe||Ke){Fe?n.logger.warn("AVC: "+Object(E.toMsFromMpegTsClock)(Ve,!0)+" ms ("+Ve+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(E.toMsFromMpegTsClock)(-Ve,!0)+" ms ("+Ve+"dts) overlapping between fragments detected"),H=M;var nt=w[0].pts-Ve;w[0].dts=H,w[0].pts=nt,n.logger.log("Video: First PTS/DTS adjusted: "+Object(E.toMsFromMpegTsClock)(nt,!0)+"/"+Object(E.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(E.toMsFromMpegTsClock)(Ve,!0)+" ms")}}u&&(H=Math.max(0,H));for(var de=0,De=0,Ne=0;Ne0?Ze-1:Ze].dts;if(he.stretchShortVideoTrack&&this.nextAudioPts!==null){var Re=Math.floor(he.maxBufferHole*x),Me=(C?q+C*x:this.nextAudioPts)-kt.pts;Me>Re?(v=Me-Te,v<0&&(v=Te),n.logger.log("[mp4-remuxer]: It is approximately "+Me/90+" ms to the next segment; using duration "+v/90+" ms for the last video frame.")):v=Te}else v=Te}var et=Math.round(kt.pts-kt.dts);j.push(new A(kt.key,v,qe,et))}if(j.length&&p&&p<70){var ht=j[0].flags;ht.dependsOn=2,ht.isNonSync=0}console.assert(v!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=X+v,this.isVideoContiguous=!0;var Ut=F.default.moof(_.sequenceNumber++,H,f({},_,{samples:j})),nn="video",en={data1:Ut,data2:gt,startPTS:q/x,endPTS:(re+v)/x,startDTS:H/x,endDTS:M/x,type:nn,hasAudio:!1,hasVideo:!0,nb:j.length,dropped:_.dropped};return _.samples=[],_.dropped=0,console.assert(gt.length,"MDAT length must not be zero"),en},O.remuxAudio=function(_,h,d,C,x){var w=_.inputTimeScale,j=_.samplerate?_.samplerate:w,W=w/j,T=_.isAAC?c:a,M=T*W,m=this._initPTS,v=!_.isAAC&&this.typeSupported.mpeg,H=[],X=_.samples,q=v?0:8,re=this.nextAudioPts||-1,ye=h*w;if(this.isAudioContiguous=d=d||X.length&&re>0&&(C&&Math.abs(ye-re)<9e3||Math.abs(i(X[0].pts-m,ye)-re)<20*M),X.forEach(function(me){me.pts=i(me.pts-m,ye)}),!d||re<0){if(X=X.filter(function(me){return me.pts>=0}),!X.length)return;x===0?re=0:C?re=Math.max(0,ye):re=X[0].pts}if(_.isAAC)for(var pe=x!==void 0,ue=this.config.maxAudioFramesDrift,fe=0,be=re;fe=ue*M&&ze0){De+=q;try{de=new Uint8Array(De)}catch(me){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:K.ErrorTypes.MUX_ERROR,details:K.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:De,reason:"fail allocating audio mdat "+De});return}if(!v){var gt=new DataView(de.buffer);gt.setUint32(0,De),de.set(F.default.types.mdat,4)}}else return;de.set(ft,q);var xt=ft.byteLength;q+=xt,H.push(new A(!0,T,xt,0)),nt=at}var Ze=H.length;if(!Ze)return;var kt=H[H.length-1];this.nextAudioPts=re=nt+W*kt.duration;var Ot=v?new Uint8Array(0):F.default.moof(_.sequenceNumber++,Ke/W,f({},_,{samples:H}));_.samples=[];var qe=Ke/w,st=re/w,xe="audio",we={data1:Ot,data2:de,startPTS:qe,endPTS:st,startDTS:qe,endDTS:st,type:xe,hasAudio:!0,hasVideo:!1,nb:Ze};return this.isAudioContiguous=!0,console.assert(de.length,"MDAT length must not be zero"),we},O.remuxEmptyAudio=function(_,h,d,C){var x=_.inputTimeScale,w=_.samplerate?_.samplerate:x,j=x/w,W=this.nextAudioPts,T=(W!==null?W:C.startDTS*x)+this._initDTS,M=C.endDTS*x+this._initDTS,m=j*c,v=Math.ceil((M-T)/m),H=P.default.getSilentFrame(_.manifestCodec||_.codec,_.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var X=[],q=0;q4294967296;)R+=g;return R}function D(R){for(var O=0;O0?this.lastEndDTS=_:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var h=!!R.audio,d=!!R.video,C="";h&&(C+="audio"),d&&(C+="video");var x={data1:A,startPTS:g,startDTS:g,endPTS:_,endDTS:_,type:C,hasAudio:h,hasVideo:d,nb:1,dropped:0};return D.audio=x.type==="audio"?x:void 0,D.video=x.type!=="audio"?x:void 0,D.text=l,D.id3=p,D.initSegment=S,D},E}(),n=function(f,b,c){return Object(P.getStartDTS)(f,b)-c};function I(E,f){var b=E==null?void 0:E.codec;return b&&b.length>4?b:b==="hvc1"?"hvc1.1.c.L120.90":b==="av01"?"av01.0.04M.08":b==="avc1"||f===F.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Y.default=K},"./src/task-loop.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"default",function(){return z});var z=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var F=P.prototype;return F.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},F.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},F.onHandlerDestroyed=function(){},F.hasInterval=function(){return!!this._tickInterval},F.hasNextTick=function(){return!!this._tickTimer},F.setInterval=function(K){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,K),!0)},F.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},F.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},F.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},F.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},F.doTick=function(){},P}()},"./src/types/cmcd.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"CMCDVersion",function(){return z}),N.d(Y,"CMCDObjectType",function(){return P}),N.d(Y,"CMCDStreamingFormat",function(){return F}),N.d(Y,"CMCDStreamType",function(){return G});var z=1,P;(function(K){K.MANIFEST="m",K.AUDIO="a",K.VIDEO="v",K.MUXED="av",K.INIT="i",K.CAPTION="c",K.TIMED_TEXT="tt",K.KEY="k",K.OTHER="o"})(P||(P={}));var F;(function(K){K.DASH="d",K.HLS="h",K.SMOOTH="s",K.OTHER="o"})(F||(F={}));var G;(function(K){K.VOD="v",K.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"HlsSkip",function(){return F}),N.d(Y,"getSkipValue",function(){return G}),N.d(Y,"HlsUrlParameters",function(){return K}),N.d(Y,"Level",function(){return n});function z(I,E){for(var f=0;fNumber.MAX_SAFE_INTEGER?Infinity:E},K.hexadecimalInteger=function(I){if(this[I]){var E=(this[I]||"0x").slice(2);E=(E.length&1?"0":"")+E;for(var f=new Uint8Array(E.length/2),b=0;bNumber.MAX_SAFE_INTEGER?Infinity:E},K.decimalFloatingPoint=function(I){return parseFloat(this[I])},K.optionalFloat=function(I,E){var f=this[I];return f?parseFloat(f):E},K.enumeratedString=function(I){return this[I]},K.bool=function(I){return this[I]==="YES"},K.decimalResolution=function(I){var E=z.exec(this[I]);return E===null?void 0:{width:parseInt(E[1],10),height:parseInt(E[2],10)}},G.parseAttrList=function(I){var E,f={},b='"';for(P.lastIndex=0;(E=P.exec(I))!==null;){var c=E[2];c.indexOf(b)===0&&c.lastIndexOf(b)===c.length-1&&(c=c.slice(1,-1)),f[E[1]]=c}return f},G}()},"./src/utils/binary-search.ts":function(te,Y,N){"use strict";N.r(Y);var z={search:function(F,G){for(var K=0,n=F.length-1,I=null,E=null;K<=n;){I=(K+n)/2|0,E=F[I];var f=G(E);if(f>0)K=I+1;else if(f<0)n=I-1;else return E}return null}};Y.default=z},"./src/utils/buffer-helper.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"BufferHelper",function(){return F});var z=N("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},F=function(){function G(){}return G.isBuffered=function(n,I){try{if(n){for(var E=G.getBuffered(n),f=0;f=E.start(f)&&I<=E.end(f))return!0}}catch(b){}return!1},G.bufferInfo=function(n,I,E){try{if(n){var f=G.getBuffered(n),b=[],c;for(c=0;ca&&(f[c-1].end=n[b].end):f.push(n[b])}else f.push(n[b])}else f=n;for(var p=0,l,u=I,s=I,i=0;i=D&&I=d&&z.logger.log(this.time+" ["+d+"] "+C)},g}(),p=function(_){for(var h=[],d=0;d<_.length;d++)h.push(_[d].toString(16));return h},l=function(){function g(h,d,C,x,w){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=h||"white",this.underline=d||!1,this.italics=C||!1,this.background=x||"black",this.flash=w||!1}var _=g.prototype;return _.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},_.setStyles=function(d){for(var C=["foreground","underline","italics","background","flash"],x=0;xK&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=K)},_.moveCursor=function(d){var C=this.pos+d;if(d>1)for(var x=this.pos+1;x=144&&this.backSpace();var C=F(d);if(this.pos>=K){this.logger.log(c.ERROR,"Cannot insert "+d.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},_.clearFromPos=function(d){var C;for(C=d;C0&&(d?x="["+C.join(" | ")+"]":x=C.join(` `)),x},_.getTextAndFormat=function(){return this.rows},g}(),D=function(){function g(h,d,C){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=h,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new i(C),this.nonDisplayedMemory=new i(C),this.lastOutputScreen=new i(C),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var _=g.prototype;return _.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},_.getHandler=function(){return this.outputFilter},_.setHandler=function(d){this.outputFilter=d},_.setPAC=function(d){this.writeScreen.setPAC(d)},_.setBkgData=function(d){this.writeScreen.setBkgData(d)},_.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(c.INFO,"MODE="+d),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=d},_.insertChars=function(d){for(var C=0;C=46,C.italics)C.foreground="white";else{var x=Math.floor(d/2)-16,w=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=w[x]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},_.outputDataUpdate=function(d){d===void 0&&(d=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},_.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},g}(),A=function(){function g(h,d,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new a;this.channels=[null,new D(h,d,x),new D(h+1,C,x)],this.cmdHistory=O(),this.logger=x}var _=g.prototype;return _.getHandler=function(d){return this.channels[d].getHandler()},_.setHandler=function(d,C){this.channels[d].setHandler(C)},_.addData=function(d,C){var x,w,j,W=!1;this.logger.time=d;for(var T=0;T ("+p([w,j])+")"),x=this.parseCmd(w,j),x||(x=this.parseMidrow(w,j)),x||(x=this.parsePAC(w,j)),x||(x=this.parseBackgroundAttributes(w,j)),!x&&(W=this.parseChars(w,j),W)){var M=this.currentChannel;if(M&&M>0){var m=this.channels[M];m.insertChars(W)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!x&&!W&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+p([w,j])+" orig: "+p([C[T],C[T+1]]))}},_.parseCmd=function(d,C){var x=this.cmdHistory,w=(d===20||d===28||d===21||d===29)&&C>=32&&C<=47,j=(d===23||d===31)&&C>=33&&C<=35;if(!(w||j))return!1;if(R(d,C,x))return S(null,null,x),this.logger.log(c.DEBUG,"Repeated command ("+p([d,C])+") is dropped"),!0;var W=d===20||d===21||d===23?1:2,T=this.channels[W];return d===20||d===21||d===28||d===29?C===32?T.ccRCL():C===33?T.ccBS():C===34?T.ccAOF():C===35?T.ccAON():C===36?T.ccDER():C===37?T.ccRU(2):C===38?T.ccRU(3):C===39?T.ccRU(4):C===40?T.ccFON():C===41?T.ccRDC():C===42?T.ccTR():C===43?T.ccRTD():C===44?T.ccEDM():C===45?T.ccCR():C===46?T.ccENM():C===47&&T.ccEOC():T.ccTO(C-32),S(d,C,x),this.currentChannel=W,!0},_.parseMidrow=function(d,C){var x=0;if((d===17||d===25)&&C>=32&&C<=47){if(d===17?x=1:x=2,x!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var w=this.channels[x];return w?(w.ccMIDROW(C),this.logger.log(c.DEBUG,"MIDROW ("+p([d,C])+")"),!0):!1}return!1},_.parsePAC=function(d,C){var x,w=this.cmdHistory,j=(d>=17&&d<=23||d>=25&&d<=31)&&C>=64&&C<=127,W=(d===16||d===24)&&C>=64&&C<=95;if(!(j||W))return!1;if(R(d,C,w))return S(null,null,w),!0;var T=d<=23?1:2;C>=64&&C<=95?x=T===1?n[d]:E[d]:x=T===1?I[d]:f[d];var M=this.channels[T];return M?(M.setPAC(this.interpretPAC(x,C)),S(d,C,w),this.currentChannel=T,!0):!1},_.interpretPAC=function(d,C){var x,w={color:null,italics:!1,indent:null,underline:!1,row:d};return C>95?x=C-96:x=C-64,w.underline=(x&1)===1,x<=13?w.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(w.italics=!0,w.color="white"):w.indent=Math.floor((x-16)/2)*4,w},_.parseChars=function(d,C){var x,w=null,j=null;if(d>=25?(x=2,j=d-8):(x=1,j=d),j>=17&&j<=19){var W;j===17?W=C+80:j===18?W=C+112:W=C+144,this.logger.log(c.INFO,"Special char '"+F(W)+"' in channel "+x),w=[W]}else d>=32&&d<=127&&(w=C===0?[d]:[d,C]);if(w){var T=p(w);this.logger.log(c.DEBUG,"Char codes = "+T.join(",")),S(d,C,this.cmdHistory)}return w},_.parseBackgroundAttributes=function(d,C){var x=(d===16||d===24)&&C>=32&&C<=47,w=(d===23||d===31)&&C>=45&&C<=47;if(!(x||w))return!1;var j,W={};d===16||d===24?(j=Math.floor((C-32)/2),W.background=b[j],C%2===1&&(W.background=W.background+"_semi")):C===45?W.background="transparent":(W.foreground="black",C===47&&(W.underline=!0));var T=d<=23?1:2,M=this.channels[T];return M.setBkgData(W),S(d,C,this.cmdHistory),!0},_.reset=function(){for(var d=0;d=16?u--:u++;var S=Object(z.fixLineBreaks)(s.trim()),R=Object(P.generateCueId)(E,f,S);(!I||!I.cues||!I.cues.getCueById(R))&&(p=new i(E,f,S),p.id=R,p.line=D+1,p.align="left",p.position=10+Math.min(80,Math.floor(u*8/32)*10),c.push(p))}return I&&c.length&&(c.sort(function(O,g){return O.line==="auto"||g.line==="auto"?0:O.line>8&&g.line>8?g.line-O.line:O.line-g.line}),c.forEach(function(O){return Object(F.addCueToTrack)(I,O)})),c}};Y.default=K},"./src/utils/discontinuities.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"findFirstFragWithCC",function(){return G}),N.d(Y,"shouldAlignOnDiscontinuities",function(){return K}),N.d(Y,"findDiscontinuousReferenceFrag",function(){return n}),N.d(Y,"adjustSlidingStart",function(){return E}),N.d(Y,"alignStream",function(){return f}),N.d(Y,"alignPDT",function(){return c}),N.d(Y,"alignFragmentByPDTDelta",function(){return a}),N.d(Y,"alignMediaPlaylistByPDT",function(){return p});var z=N("./src/polyfills/number.ts"),P=N("./src/utils/logger.ts"),F=N("./src/controller/level-helper.ts");function G(l,u){for(var s=null,i=0,D=l.length;is.startCC||l&&l.cc=this.minWeight_},G.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},G.destroy=function(){},F}();Y.default=P},"./src/utils/ewma.ts":function(te,Y,N){"use strict";N.r(Y);var z=function(){function P(G,K,n){K===void 0&&(K=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=G,this.alpha_=G?Math.exp(Math.log(.5)/G):0,this.estimate_=K,this.totalWeight_=n}var F=P.prototype;return F.sample=function(K,n){var I=Math.pow(this.alpha_,K);this.estimate_=n*(1-I)+I*this.estimate_,this.totalWeight_+=K},F.getTotalWeight=function(){return this.totalWeight_},F.getEstimate=function(){if(this.alpha_){var K=1-Math.pow(this.alpha_,this.totalWeight_);if(K)return this.estimate_/K}return this.estimate_},P}();Y.default=z},"./src/utils/fetch-loader.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"fetchSupported",function(){return a});var z=N("./src/polyfills/number.ts"),P=N("./src/loader/load-stats.ts"),F=N("./src/demux/chunk-cache.ts");function G(i,D){i.prototype=Object.create(D.prototype),i.prototype.constructor=i,f(i,D)}function K(i){var D=typeof Map=="function"?new Map:void 0;return K=function(S){if(S===null||!E(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof D!="undefined"){if(D.has(S))return D.get(S);D.set(S,R)}function R(){return n(S,arguments,b(this).constructor)}return R.prototype=Object.create(S.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),f(R,S)},K(i)}function n(i,D,A){return I()?n=Reflect.construct:n=function(R,O,g){var _=[null];_.push.apply(_,O);var h=Function.bind.apply(R,_),d=new h;return g&&f(d,g.prototype),d},n.apply(null,arguments)}function I(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function E(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function f(i,D){return f=Object.setPrototypeOf||function(S,R){return S.__proto__=R,S},f(i,D)}function b(i){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},b(i)}function c(){return c=Object.assign||function(i){for(var D=1;D=g&&_(R,O,h.flush(),S)):_(R,O,j,S),x()}).catch(function(){return Promise.reject()})};return C()},i}();function l(i,D){var A={method:"GET",mode:"cors",credentials:"same-origin",signal:D,headers:new self.Headers(c({},i.headers))};return i.rangeEnd&&A.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),A}function u(i,D){return new self.Request(i.url,D)}var s=function(i){G(D,i);function D(A,S,R){var O;return O=i.call(this,A)||this,O.code=void 0,O.details=void 0,O.code=S,O.details=R,O}return D}(K(Error));Y.default=p},"./src/utils/imsc1-ttml-parser.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"IMSC1_CODEC",function(){return E}),N.d(Y,"parseIMSC1",function(){return a});var z=N("./src/utils/mp4-tools.ts"),P=N("./src/utils/vttparser.ts"),F=N("./src/utils/vttcue.ts"),G=N("./src/demux/id3.ts"),K=N("./src/utils/timescale-conversion.ts"),n=N("./src/utils/webvtt-parser.ts");function I(){return I=Object.assign||function(g){for(var _=1;_"):z}function K(E){for(var f=arguments.length,b=new Array(f>1?f-1:0),c=1;c>24,D[A+1]=S>>16&255,D[A+2]=S>>8&255,D[A+3]=S&255}function f(D,A){var S=[];if(!A.length)return S;var R,O,g;"data"in D?(R=D.data,O=D.start,g=D.end):(R=D,O=0,g=R.byteLength);for(var _=O;_1?_+h:g;if(d===A[0])if(A.length===1)S.push({data:R,start:_+8,end:C});else{var x=f({data:R,start:_+8,end:C},A.slice(1));x.length&&G.apply(S,x)}_=C}return S}function b(D){var A=f(D,["moov"]),S=A[0],R=S?S.end:null,O=f(D,["sidx"]);if(!O||!O[0])return null;var g=[],_=O[0],h=_.data[0],d=h===0?8:16,C=I(_,d);d+=4;var x=0,w=0;h===0?d+=8:d+=16,d+=2;var j=_.end+w,W=n(_,d);d+=2;for(var T=0;T>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var X=I(_,M);M+=4,g.push({referenceSize:v,subsegmentDuration:X,info:{duration:X/C,start:j,end:j+v-1}}),j+=v,M+=4,d=M}return{earliestPresentationTime:x,timescale:C,version:h,referencesCount:W,references:g,moovEndOffset:R}}function c(D){for(var A=[],S=f(D,["moov","trak"]),R=0;RK)&&(this.startTime=K),this.endTime=n,this.screen=I,this.timelineController.createCaptionsTrack(this.trackName)},F.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"sendAddTrackEvent",function(){return P}),N.d(Y,"addCueToTrack",function(){return F}),N.d(Y,"clearCurrentCues",function(){return G}),N.d(Y,"removeCuesInRange",function(){return K}),N.d(Y,"getCuesInRange",function(){return I});var z=N("./src/utils/logger.ts");function P(E,f){var b;try{b=new Event("addtrack")}catch(c){b=document.createEvent("Event"),b.initEvent("addtrack",!1,!1)}b.track=E,f.dispatchEvent(b)}function F(E,f){var b=E.mode;if(b==="disabled"&&(E.mode="hidden"),E.cues&&!E.cues.getCueById(f.id))try{if(E.addCue(f),!E.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(a){z.logger.debug("[texttrack-utils]: "+a);var c=new self.TextTrackCue(f.startTime,f.endTime,f.text);c.id=f.id,E.addCue(c)}b==="disabled"&&(E.mode=b)}function G(E){var f=E.mode;if(f==="disabled"&&(E.mode="hidden"),E.cues)for(var b=E.cues.length;b--;)E.removeCue(E.cues[b]);f==="disabled"&&(E.mode=f)}function K(E,f,b){var c=E.mode;if(c==="disabled"&&(E.mode="hidden"),E.cues&&E.cues.length>0)for(var a=I(E.cues,f,b),p=0;pE[b].endTime)return-1;for(var c=0,a=b;c<=a;){var p=Math.floor((a+c)/2);if(fE[p].startTime&&c-1)for(var p=a,l=E.length;p=f&&u.endTime<=b)c.push(u);else if(u.startTime>b)return c}return c}},"./src/utils/time-ranges.ts":function(te,Y,N){"use strict";N.r(Y);var z={toString:function(F){for(var G="",K=F.length,n=0;n1?f-1:0),c=1;c100)throw new Error("Position must be between 0 and 100.");g=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",n({},a,{get:function(){return _},set:function(x){var w=K(x);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");_=w,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",n({},a,{get:function(){return h},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");h=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",n({},a,{get:function(){return d},set:function(x){var w=K(x);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");d=w,this.hasBeenReset=!0}})),c.displayState=void 0}return I.prototype.getCueAsHTML=function(){var E=self.WebVTT;return E.convertCueToDOMTree(self,this.text)},I}()},"./src/utils/vttparser.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"parseTimeStamp",function(){return F}),N.d(Y,"fixLineBreaks",function(){return f}),N.d(Y,"VTTParser",function(){return b});var z=N("./src/utils/vttcue.ts"),P=function(){function c(){}var a=c.prototype;return a.decode=function(l,u){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},c}();function F(c){function a(l,u,s,i){return(l|0)*3600+(u|0)*60+(s|0)+parseFloat(i||0)}var p=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return p?parseFloat(p[2])>59?a(p[2],p[3],0,p[4]):a(p[1],p[2],p[3],p[4]):null}var G=function(){function c(){this.values=Object.create(null)}var a=c.prototype;return a.set=function(l,u){!this.get(l)&&u!==""&&(this.values[l]=u)},a.get=function(l,u,s){return s?this.has(l)?this.values[l]:u[s]:this.has(l)?this.values[l]:u},a.has=function(l){return l in this.values},a.alt=function(l,u,s){for(var i=0;i=0&&s<=100)return this.set(l,s),!0}return!1},c}();function K(c,a,p,l){var u=l?c.split(l):[c];for(var s in u){if(typeof u[s]!="string")continue;var i=u[s].split(p);if(i.length!==2)continue;var D=i[0],A=i[1];a(D,A)}}var n=new z.default(0,0,""),I=n.align==="middle"?"middle":"center";function E(c,a,p){var l=c;function u(){var D=F(c);if(D===null)throw new Error("Malformed timestamp: "+l);return c=c.replace(/^[^\sa-zA-Z-]+/,""),D}function s(D,A){var S=new G;K(D,function(g,_){var h;switch(g){case"region":for(var d=p.length-1;d>=0;d--)if(p[d].id===_){S.set(g,p[d].region);break}break;case"vertical":S.alt(g,_,["rl","lr"]);break;case"line":h=_.split(","),S.integer(g,h[0]),S.percent(g,h[0])&&S.set("snapToLines",!1),S.alt(g,h[0],["auto"]),h.length===2&&S.alt("lineAlign",h[1],["start",I,"end"]);break;case"position":h=_.split(","),S.percent(g,h[0]),h.length===2&&S.alt("positionAlign",h[1],["start",I,"end","line-left","line-right","auto"]);break;case"size":S.percent(g,_);break;case"align":S.alt(g,_,["start",I,"end","left","right"]);break}},/:/,/\s/),A.region=S.get("region",null),A.vertical=S.get("vertical","");var R=S.get("line","auto");R==="auto"&&n.line===-1&&(R=-1),A.line=R,A.lineAlign=S.get("lineAlign","start"),A.snapToLines=S.get("snapToLines",!0),A.size=S.get("size",100),A.align=S.get("align",I);var O=S.get("position","auto");O==="auto"&&n.position===50&&(O=A.align==="start"||A.align==="left"?0:A.align==="end"||A.align==="right"?100:50),A.position=O}function i(){c=c.replace(/^\s+/,"")}if(i(),a.startTime=u(),i(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);c=c.substr(3),i(),a.endTime=u(),i(),s(c,a)}function f(c){return c.replace(//gi,` `)}var b=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var a=c.prototype;return a.parse=function(l){var u=this;l&&(u.buffer+=u.decoder.decode(l,{stream:!0}));function s(){var O=u.buffer,g=0;for(O=f(O);g")===-1){u.cue.id=D;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{E(D,u.cue,u.regionList)}catch(O){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var R=D.indexOf("-->")!==-1;if(!D||R&&(S=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=` `),u.cue.text+=D}continue;case"BADCUE":D||(u.state="ID")}}}catch(O){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},a.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=` `,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){l.onparsingerror&&l.onparsingerror(u)}return l.onflush&&l.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(te,Y,N){"use strict";N.r(Y),N.d(Y,"generateCueId",function(){return b}),N.d(Y,"parseWebVTT",function(){return a});var z=N("./src/polyfills/number.ts"),P=N("./src/utils/vttparser.ts"),F=N("./src/demux/id3.ts"),G=N("./src/utils/timescale-conversion.ts"),K=N("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,I=function(l,u,s){return s===void 0&&(s=0),l.substr(s,u.length)===u},E=function(l){var u=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),i=parseInt(l.substr(-9,2)),D=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(z.isFiniteNumber)(u)||!Object(z.isFiniteNumber)(s)||!Object(z.isFiniteNumber)(i)||!Object(z.isFiniteNumber)(D))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return u+=1e3*s,u+=60*1e3*i,u+=60*60*1e3*D,u},f=function(l){for(var u=5381,s=l.length;s;)u=u*33^l.charCodeAt(--s);return(u>>>0).toString()};function b(p,l,u){return f(p.toString())+f(l.toString())+f(u)}var c=function(l,u,s){var i=l[u],D=l[i.prevCC];if(!D||!D.new&&i.new){l.ccOffset=l.presentationOffset=i.start,i.new=!1;return}for(;(A=D)!==null&&A!==void 0&&A.new;){var A;l.ccOffset+=i.start-D.start,i.new=!1,i=D,D=l[i.prevCC]}l.presentationOffset=s};function a(p,l,u,s,i,D,A,S){var R=new P.VTTParser,O=Object(F.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(n,` `).split(` `),g=[],_=Object(G.toMpegTsClockFromTimescale)(l,u),h="00:00.000",d=0,C=0,x,w=!0,j=!1;R.oncue=function(W){var T=s[i],M=s.ccOffset,m=(d-_)/9e4;if(T!=null&&T.new&&(C!==void 0?M=s.ccOffset=T.start:c(s,i,m)),m&&(M=m-s.presentationOffset),j){var v=W.endTime-W.startTime,H=Object(K.normalizePts)((W.startTime+M-C)*9e4,D*9e4)/9e4;W.startTime=H,W.endTime=H+v}var X=W.text.trim();W.text=decodeURIComponent(encodeURIComponent(X)),W.id||(W.id=b(W.startTime,W.endTime,X)),W.endTime>0&&g.push(W)},R.onparsingerror=function(W){x=W},R.onflush=function(){if(x){S(x);return}A(g)},O.forEach(function(W){if(w)if(I(W,"X-TIMESTAMP-MAP=")){w=!1,j=!0,W.substr(16).split(",").forEach(function(T){I(T,"LOCAL:")?h=T.substr(6):I(T,"MPEGTS:")&&(d=parseInt(T.substr(7)))});try{C=E(h)/1e3}catch(T){j=!1,x=T}return}else W===""&&(w=!1);R.parse(W+` `)}),R.flush()}},"./src/utils/xhr-loader.ts":function(te,Y,N){"use strict";N.r(Y);var z=N("./src/utils/logger.ts"),P=N("./src/loader/load-stats.ts"),F=/^age:\s*[\d.]+\s*$/m,G=function(){function K(I){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=I?I.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var n=K.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var E=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),E&&(E.onreadystatechange=null,E.onprogress=null,E.readyState!==4&&(this.stats.aborted=!0,E.abort()))},n.abort=function(){var E;this.abortInternal(),(E=this.callbacks)!==null&&E!==void 0&&E.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(E,f,b){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=E,this.config=f,this.callbacks=b,this.retryDelay=f.retryDelay,this.loadInternal()},n.loadInternal=function(){var E=this.config,f=this.context;if(!E)return;var b=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var a=this.xhrSetup;try{if(a)try{a(b,f.url)}catch(u){b.open("GET",f.url,!0),a(b,f.url)}b.readyState||b.open("GET",f.url,!0);var p=this.context.headers;if(p)for(var l in p)b.setRequestHeader(l,p[l])}catch(u){this.callbacks.onError({code:b.status,text:u.message},f,b);return}f.rangeEnd&&b.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),b.onreadystatechange=this.readystatechange.bind(this),b.onprogress=this.loadprogress.bind(this),b.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),E.timeout),b.send()},n.readystatechange=function(){var E=this.context,f=this.loader,b=this.stats;if(!E||!f)return;var c=f.readyState,a=this.config;if(b.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),b.loading.first===0&&(b.loading.first=Math.max(self.performance.now(),b.loading.start)),c===4){f.onreadystatechange=null,f.onprogress=null;var p=f.status;if(p>=200&&p<300){b.loading.end=Math.max(self.performance.now(),b.loading.first);var l,u;if(E.responseType==="arraybuffer"?(l=f.response,u=l.byteLength):(l=f.responseText,u=l.length),b.loaded=b.total=u,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(b,E,l,f),!this.callbacks)return;var i={url:f.responseURL,data:l};this.callbacks.onSuccess(i,b,E,f)}else b.retry>=a.maxRetry||p>=400&&p<499?(z.logger.error(p+" while loading "+E.url),this.callbacks.onError({code:p,text:f.statusText},E,f)):(z.logger.warn(p+" while loading "+E.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),b.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)},n.loadtimeout=function(){z.logger.warn("timeout while loading "+this.context.url);var E=this.callbacks;E&&(this.abortInternal(),E.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(E){var f=this.stats;f.loaded=E.loaded,E.lengthComputable&&(f.total=E.total)},n.getCacheAge=function(){var E=null;if(this.loader&&F.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");E=f?parseFloat(f):null}return E},K}();Y.default=G}}).default})},vHTk:function(ct,ge,U){ct.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vkP9:function(ct,ge,U){"use strict";var te=U("+L6B"),Y=U("2/Rp"),N=U("5NDa"),z=U("5rEg"),P=U("y8nQ"),F=U("Vl3Y"),G=U("tJVT"),K=U("q1tI"),n=U.n(K),I=U("a+yL"),E=U.n(I),f=function(c){var a=c.value,p=c.onChange,l=F.a.useForm(),u=Object(G.a)(l,1),s=u[0];Object(K.useEffect)(function(){a&&s.setFieldsValue(a)},a);var i=function(A){p(A)};return n.a.createElement("div",{className:E.a.search},n.a.createElement(F.a,{className:E.a.formWrap,colon:!1,form:s,size:"large",layout:"inline",onFinish:i},n.a.createElement(F.a.Item,{label:"\u5B9E\u8BAD\u4FE1\u606F",name:"keyword",initialValue:""},n.a.createElement(z.a,{style:{width:280,height:40}})),n.a.createElement(F.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"schools",initialValue:"",style:{margin:"0 40px"}},n.a.createElement(z.a,{style:{width:280,height:40}})),n.a.createElement(F.a.Item,{label:"\u521B\u5EFA\u8005",name:"creator",initialValue:""},n.a.createElement(z.a,{style:{width:200,height:40}})),n.a.createElement(Y.a,{className:E.a.btn,type:"primary",htmlType:"submit"},"\u641C\u7D22")))};ge.a=f},wNkr:function(ct,ge){ct.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAYAAACFFRgXAAAAAXNSR0IArs4c6QAABIdJREFUWEftWGtMm1UYfg5taScYNhbt5qAFioMRE6aRkGiQP8vEJcZFZ5YYr9Fd3NTID/3hdS5xXoKZZpvrNsBtJotZlkxHyOIIZjLnLiSGxUWHQKXQsoGAjmAp7dcecw609Lt5GN/XTLOdP6f9Lud73ud93ve85yWUUgv+w4MQEkuFR24CNtlbNx7DvmCshtKYFxR5lAKEAGxmI/GbzYYHQYAQy0ZPnrXZkIZ7ApFeBtYwIAAUFASEz9zg6d9sZoOCBu50OfKNAe6flNjS2oN9mN2bAiD/pwY0G6OLXXbZx645S/SkAFZKgFIKQgjYPC2SFNhaJighJ4xNYKQodjnMAKzNjYZLZS5XwZs2jhnJzVEZDHMA631AyY8yCpWAEt7QXY8QePINSsIXYBrWUbAia6gZncooySyiFvmM8DnjZjGsG3KKqFe4XPWaADCLWo9RDftY0M02zyoBKfOGIHEzCRW75hkLOl9/WEr6VLlzCDSgygHKIFOnHXjmCrhgZ2V1SJp45+ya89UziT0162rp5N99rk5i6o2k8kjF9xZYtlyp7TjJNxdRtZYACqCavXBuTbv+zqRgTJQFknuMjsQYMZVHKhJMcOBCwAvO23Wzwmx2KrOfuQnYbEZVcSzSsJ4kOsovoW/Sn1xvs28d9noOYH3PM+iP9OHzogY0jR7FybFWfOTejqWOUuRYc9AwuAf1Q14cLP4KC223IUanFPdxcBtWLXgYh0cOoePvn3TtnrMkLpR3ovxCiWzhlTkPYdOiV/DlH19gde5jeKp7Ld5Y8i4P0g+CW2GBBV+XHseLvuexx7Mf67qfxkA0mFxjd1Ej9g/tw7nxM+YD/v2eK9hxeTtfOBQPwTu4g//+rGA3Vsx/EFUXKzAqjaCl7BQ2+V5AV7hTBqJ5WSvax89iTBrj1xuH9mKbuw4HhurTA/jScj/W+57lH4vGIzgzfppXZk2lLXDanHiu+wlcnPgZJ8ra8LJvAzrDv/Jnc60LMRkP43DJMTQMejEsDfPrDPwnBTvTB1hLEq8ufg2325w4NHwQuwr3YeUvD6D2jtdhJ3a8F3gL2RnZOFF2Cmt/Ww2vp1ElCab7tDHcdlc7/pJGk25m8tjg3Iwnux5HmIbx0qJaTMRDXM9b8t/H3Vn3wpHhQN3Ah2j+8xvsKqyHy+4GRZyvwZ4rmbcM991aBYlG+bVPL9fhu6stMinNOejSnb701hcCzj2dFaY2yXq9AKZ+l0StkhCws2nxm9HcsbevN2gOdiR7qxCwktneYEhKVGti1q/xFK0o31g9XJiXZawengKsPYTHeg1AqadsrUOsYcD+YGj2BbzIBRoFu7KVVLDkFmMM+wdC0nSfZKZ6n2kjyCt6dYUuqvjlKYwQuI0C7uq9KmXabCLu+H0VgbK+kNjeyGQUS4vmG2O49YcOyZ1XiMxMm0YrSnZKTx7pk40g8RtJkyKRKPqCfqyoWm4M8NHjbb3UpGagyE2EIPDoqmpjzcBj3/5YE4tL3nSDZmAtGdaNj9Tcb6zdKmLF7Ps3XgfebAZF6/3vGf4HhYa6OsTsTGoAAAAASUVORK5CYII="},xTzM:function(ct,ge){ct.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAAsSAAALEgHS3X78AAAAAXNSR0IArs4c6QAAAqRJREFUWEfNmE1o02AYx/9JzJaltHatZRVR5hSRXHYYbCpMmTIRexAsDD0L8+Rphx10DIQddvDowbugCB68iWOKDqeb7tKD+MGKA8vo3Nzch7ZLlsibJjPrkjRvE8hySUiej9/7/PO+b54wmqZx2IMH4wqWv3kIS19HIcTOgVUP1uRX2XmUVl+DxX10vHpX097FwBmMQC3kP4JtSFElYPiKefnLGJrSd+sFdAb70PMQm8o1KiirMR8D5FXv7pzwE5wyjuSJQbQ9KDiDvWwrgIu2eI8ckOXWWhGtvZ3OYONHlYBS0YeJtT52BnueVMAYMTVAvyZnu8N85mS/67kGMAygGQHNa/PcEC+6gCUqFUueBaQRgD9AP3IaD3kR+HQbWHqje9UG63wE7GumSVG/rbIMTF+nAKs/Fb2nd7An9MH9eEz3eaxY11O39dmYEUHNEgBTWY9gp575GT+97/srFrDl0QGo6h1Ai9JH8lFQNQXwJ3cG2Aab7T+CaPNcoEBUwY4Bje3/PSYvGRUjYGIkPDAmDjRdNsBUYBuMfI9968tBbJGoBhqksXgV4Iy3aPKi5R37nB1CJDUcZC6qWEIHIJ6puEx0W8EyEoR0Tt+7nPYwqkyGsdd4wn4gesMGjNwicrKN4cmZ7Af4RFXFCBiRk+PDkzN+oSLnDil1sIwERsjVo1ggPmIKSNyyATPl3PwbnpyHh6qWC3PIRE55Izw501lgZtBmryRylkvhyjn7wmETJ7NzvRienL/m9O5q9xcskXNjPhw5VRlQSsDvgh1YRsLaQnhybpWBP+sOzchU+1toWlfNnaB6ZaddN6zdEfE14ynymH0zMtNzGivfJ8CH1FpGjnc7d0lkhi7m76H8o5e2EL7sGW4E51eG3f/2+Mrgz3nPgv0D9Cc+LoUg84gAAAAASUVORK5CYII="},xlxt:function(ct,ge,U){ct.exports={flex_box_center:"flex_box_center___1qaRn",flex_space_between:"flex_space_between___3tOTR",flex_box_vertical_center:"flex_box_vertical_center___2XsRs",flex_box_center_end:"flex_box_center_end___3O9De",flex_box_column:"flex_box_column___3bx6a",exportModal:"exportModal___29rdj"}},"yTi+":function(ct,ge,U){ct.exports=U.p+"static/AssistantCode3.fdd8db3c.jpeg"}}]);