You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Shixu...

457 lines
1.7 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[112,3,5,7,8,9,16],{"+NIl":function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){"use strict";X.defineMode("stex",function(B,I){"use strict";function F(a,o){a.cmdState.push(o)}function S(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function C(a){var o=a.cmdState.pop();o&&o.closeBracket()}function P(a){for(var o=a.cmdState,h=o.length-1;h>=0;h--){var l=o[h];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function y(a,o,h){return function(){this.name=a,this.bracketNo=0,this.style=o,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=y("importmodule","tag",["string","builtin"]),t.documentclass=y("documentclass","tag",["","atom"]),t.usepackage=y("usepackage","tag",["atom"]),t.begin=y("begin","tag",["atom"]),t.end=y("end","tag",["atom"]),t.label=y("label","tag",["atom"]),t.ref=y("ref","tag",["atom"]),t.eqref=y("eqref","tag",["atom"]),t.cite=y("cite","tag",["atom"]),t.bibitem=y("bibitem","tag",["atom"]),t.Bibitem=y("Bibitem","tag",["atom"]),t.RBibitem=y("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function b(a,o){a.f=o}function i(a,o){var h;if(a.match(/^\\[a-zA-Z@]+/)){var l=a.current().slice(1);return h=t.hasOwnProperty(l)?t[l]:t.DEFAULT,h=new h,F(o,h),b(o,p),h.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/\\]/))return"tag";if(a.match("\\["))return b(o,function(s,d){return u(s,d,"\\]")}),"keyword";if(a.match("\\("))return b(o,function(s,d){return u(s,d,"\\)")}),"keyword";if(a.match("$$"))return b(o,function(s,d){return u(s,d,"$$")}),"keyword";if(a.match("$"))return b(o,function(s,d){return u(s,d,"$")}),"keyword";var n=a.next();if(n=="%")return a.skipToEnd(),"comment";if(n=="}"||n=="]"){if(h=S(o),h)h.closeBracket(n),b(o,p);else return"error";return"bracket"}else return n=="{"||n=="["?(h=t.DEFAULT,h=new h,F(o,h),"bracket"):/\d/.test(n)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w\-_]/),h=P(o),h.name=="begin"&&(h.argument=a.current()),h.styleIdentifier())}function u(a,o,h){if(a.eatSpace())return null;if(h&&a.match(h))return b(o,i),"keyword";if(a.match(/^\\[a-zA-Z@]+/))return"tag";if(a.match(/^[a-zA-Z]+/))return"variable-2";if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";if(a.match(/^[\^_&]/))return"tag";if(a.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(a.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=a.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(a.skipToEnd(),"comment"):"error"}function p(a,o){var h=a.peek(),l;return h=="{"||h=="["?(l=S(o),l.openBracket(h),a.eat(h),b(o,i),"bracket"):/[ \t\r]/.test(h)?(a.eat(h),null):(b(o,i),C(o),i(a,o))}return{startState:function(){var a=I.inMathMode?function(o,h){return u(o,h)}:i;return{cmdState:[],f:a}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,o){return o.f(a,o)},blankLine:function(a){a.f=i,a.cmdState.length=0},lineComment:"%"}}),X.defineMIME("text/x-stex","stex"),X.defineMIME("text/x-latex","stex")})},"+ua5":function(ze,ee,M){},"/cxE":function(ze,ee,M){"use strict";M.d(ee,"f",function(){return I}),M.d(ee,"g",function(){return F}),M.d(ee,"h",function(){return S}),M.d(ee,"e",function(){return P}),M.d(ee,"b",function(){return y}),M.d(ee,"c",function(){return t}),M.d(ee,"d",function(){return b}),M.d(ee,"a",function(){return i});class X{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(u){setTimeout(()=>{throw u.stack?new Error(u.message+`
`+u.stack):u},0)}}emit(u){this.listeners.forEach(p=>{p(u)})}onUnexpectedError(u){this.unexpectedErrorHandler(u),this.emit(u)}onUnexpectedExternalError(u){this.unexpectedErrorHandler(u)}}const B=new X;function I(u){P(u)||B.onUnexpectedError(u);return}function F(u){P(u)||B.onUnexpectedExternalError(u);return}function S(u){if(u instanceof Error){let{name:p,message:a}=u;const o=u.stacktrace||u.stack;return{$isError:!0,name:p,message:a,stack:o}}return u}const C="Canceled";function P(u){return u instanceof Error&&u.name===C&&u.message===C}function y(){const u=new Error(C);return u.name=u.message,u}function t(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}function b(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}class i extends Error{constructor(u){super("NotSupported");u&&(this.message=u)}}},"06Qe":function(ze,ee,M){var X=M("ItGF"),B="urn:schemas-microsoft-com:vml",I=typeof window=="undefined"?null:window,F=!1,S=I&&I.document;function C(t){return P(t)}var P;if(S&&!X.canvasSupported)try{!S.namespaces.zrvml&&S.namespaces.add("zrvml",B),P=function(t){return S.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){P=function(b){return S.createElement("<"+b+' xmlns="'+B+'" class="zrvml">')}}function y(){if(F||!S)return;F=!0;var t=S.styleSheets;t.length<31?S.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}ee.doc=S,ee.createNode=C,ee.initVML=y},"0s+r":function(ze,ee,M){var X=M("bYtY"),B=M("QBsz"),I=M("y23F"),F=M("H6uX"),S=M("YH21"),C=M("C0SR"),P="silent";function y(h,l,n){return{type:h,event:n,target:l.target,topTarget:l.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:t}}function t(){S.stop(this.event)}function b(){}b.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],u=function(h,l,n,s){F.call(this),this.storage=h,this.painter=l,this.painterRoot=s,n=n||new b,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,I.call(this),this.setHandlerProxy(n)};u.prototype={constructor:u,setHandlerProxy:function(h){this.proxy&&this.proxy.dispose(),h&&(X.each(i,function(l){h.on&&h.on(l,this[l],this)},this),h.handler=this),this.proxy=h},mousemove:function(h){var l=h.zrX,n=h.zrY,s=a(this,l,n),d=this._hovered,E=d.target;E&&!E.__zr&&(d=this.findHover(d.x,d.y),E=d.target);var D=this._hovered=s?{x:l,y:n}:this.findHover(l,n),T=D.target,k=this.proxy;k.setCursor&&k.setCursor(T?T.cursor:"default"),E&&T!==E&&this.dispatchToElement(d,"mouseout",h),this.dispatchToElement(D,"mousemove",h),T&&T!==E&&this.dispatchToElement(D,"mouseover",h)},mouseout:function(h){var l=h.zrEventControl,n=h.zrIsToLocalDOM;l!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",h),l!=="no_globalout"&&(!n&&this.trigger("globalout",{type:"globalout",event:h}))},resize:function(h){this._hovered={}},dispatch:function(h,l){var n=this[h];n&&n.call(this,l)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(h){var l=this.proxy;l.setCursor&&l.setCursor(h)},dispatchToElement:function(h,l,n){h=h||{};var s=h.target;if(s&&s.silent)return;for(var d="on"+l,E=y(l,h,n);s&&!(s[d]&&(E.cancelBubble=s[d].call(s,E)),s.trigger(l,E),s=s.parent,E.cancelBubble););E.cancelBubble||(this.trigger(l,E),this.painter&&this.painter.eachOtherLayer(function(D){typeof D[d]=="function"&&D[d].call(D,E),D.trigger&&D.trigger(l,E)}))},findHover:function(h,l,n){for(var s=this.storage.getDisplayList(),d={x:h,y:l},E=s.length-1;E>=0;E--){var D;if(s[E]!==n&&!s[E].ignore&&(D=p(s[E],h,l))&&(!d.topTarget&&(d.topTarget=s[E]),D!==P)){d.target=s[E];break}}return d},processGesture:function(h,l){this._gestureMgr||(this._gestureMgr=new C);var n=this._gestureMgr;l==="start"&&n.clear();var s=n.recognize(h,this.findHover(h.zrX,h.zrY,null).target,this.proxy.dom);if(l==="end"&&n.clear(),s){var d=s.type;h.gestureEvent=d,this.dispatchToElement({target:s.target},d,s.event)}}},X.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(h){u.prototype[h]=function(l){var n=l.zrX,s=l.zrY,d=a(this,n,s),E,D;if((h!=="mouseup"||!d)&&(E=this.findHover(n,s),D=E.target),h==="mousedown")this._downEl=D,this._downPoint=[l.zrX,l.zrY],this._upEl=D;else if(h==="mouseup")this._upEl=D;else if(h==="click"){if(this._downEl!==this._upEl||!this._downPoint||B.dist(this._downPoint,[l.zrX,l.zrY])>4)return;this._downPoint=null}this.dispatchToElement(E,h,l)}});function p(h,l,n){if(h[h.rectHover?"rectContain":"contain"](l,n)){for(var s=h,d;s;){if(s.clipPath&&!s.clipPath.contain(l,n))return!1;s.silent&&(d=!0),s=s.parent}return d?P:!0}return!1}function a(h,l,n){var s=h.painter;return l<0||l>s.getWidth()||n<0||n>s.getHeight()}X.mixin(u,F),X.mixin(u,I);var o=u;ze.exports=o},"19Vz":function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){X.defineOption("placeholder","",function(y,t,b){var i=b&&b!=X.Init;if(t&&!i)y.on("blur",S),y.on("change",C),y.on("swapDoc",C),X.on(y.getInputField(),"compositionupdate",y.state.placeholderCompose=function(){F(y)}),C(y);else if(!t&&i){y.off("blur",S),y.off("change",C),y.off("swapDoc",C),X.off(y.getInputField(),"compositionupdate",y.state.placeholderCompose),B(y);var u=y.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}t&&!y.hasFocus()&&S(y)});function B(y){y.state.placeholder&&(y.state.placeholder.parentNode.removeChild(y.state.placeholder),y.state.placeholder=null)}function I(y){B(y);var t=y.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=y.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var b=y.getOption("placeholder");typeof b=="string"&&(b=document.createTextNode(b)),t.appendChild(b),y.display.lineSpace.insertBefore(t,y.display.lineSpace.firstChild)}function F(y){setTimeout(function(){var t=!1,b=y.getInputField();b.nodeName=="TEXTAREA"?t=!b.value:y.lineCount()==1&&(t=!/[^\u200b]/.test(b.querySelector(".CodeMirror-line").textContent)),t?I(y):B(y)},20)}function S(y){P(y)&&I(y)}function C(y){var t=y.getWrapperElement(),b=P(y);t.className=t.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":""),b?I(y):B(y)}function P(y){return y.lineCount()===1&&y.getLine(0)===""}})},"1Jh7":function(ze,ee,M){var X=M("y+Vt"),B=M("T6xi"),I=X.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(F,S){B.buildPath(F,S,!1)}});ze.exports=I},"1MYJ":function(ze,ee,M){var X=M("y+Vt"),B=X.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var I=this.__dirtyPath,F=this.shape.paths,S=0;S<F.length;S++)I=I||F[S].__dirtyPath;this.__dirtyPath=I,this.__dirty=this.__dirty||I},beforeBrush:function(){this._updatePathDirty();for(var I=this.shape.paths||[],F=this.getGlobalScale(),S=0;S<I.length;S++)I[S].path||I[S].createPathProxy(),I[S].path.setScale(F[0],F[1],I[S].segmentIgnoreThreshold)},buildPath:function(I,F){for(var S=F.paths||[],C=0;C<S.length;C++)S[C].buildPath(I,S[C].shape,!0)},afterBrush:function(){for(var I=this.shape.paths||[],F=0;F<I.length;F++)I[F].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),X.prototype.getBoundingRect.call(this)}});ze.exports=B},"1RvN":function(ze,ee){var M=function(){this.head=null,this.tail=null,this._len=0},X=M.prototype;X.insert=function(C){var P=new B(C);return this.insertEntry(P),P},X.insertEntry=function(C){this.head?(this.tail.next=C,C.prev=this.tail,C.next=null,this.tail=C):this.head=this.tail=C,this._len++},X.remove=function(C){var P=C.prev,y=C.next;P?P.next=y:this.head=y,y?y.prev=P:this.tail=P,C.next=C.prev=null,this._len--},X.len=function(){return this._len},X.clear=function(){this.head=this.tail=null,this._len=0};var B=function(C){this.value=C,this.next,this.prev},I=function(C){this._list=new M,this._map={},this._maxSize=C||10,this._lastRemovedEntry=null},F=I.prototype;F.put=function(C,P){var y=this._list,t=this._map,b=null;if(t[C]==null){var i=y.len(),u=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var p=y.head;y.remove(p),delete t[p.key],b=p.value,this._lastRemovedEntry=p}u?u.value=P:u=new B(P),u.key=C,y.insertEntry(u),t[C]=u}return b},F.get=function(C){var P=this._map[C],y=this._list;if(P!=null)return P!==y.tail&&(y.remove(P),y.insertEntry(P)),P.value},F.clear=function(){this._list.clear(),this._map={}};var S=I;ze.exports=S},"1bdT":function(ze,ee,M){var X=M("3gBT"),B=M("H6uX"),I=M("DN4a"),F=M("vWvF"),S=M("bYtY"),C=function(y){I.call(this,y),B.call(this,y),F.call(this,y),this.id=y.id||X()};C.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(y,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":y=0;break}var b=this.transform;b||(b=this.transform=[1,0,0,1,0,0]),b[4]+=y,b[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(y,t){},attrKV:function(y,t){if(y==="position"||y==="scale"||y==="origin"){if(t){var b=this[y];b||(b=this[y]=[]),b[0]=t[0],b[1]=t[1]}}else this[y]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(y,t){if(typeof y=="string")this.attrKV(y,t);else if(S.isObject(y))for(var b in y)y.hasOwnProperty(b)&&this.attrKV(b,y[b]);return this.dirty(!1),this},setClipPath:function(y){var t=this.__zr;t&&y.addSelfToZr(t),this.clipPath&&this.clipPath!==y&&this.removeClipPath(),this.clipPath=y,y.__zr=t,y.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var y=this.clipPath;y&&(y.__zr&&y.removeSelfFromZr(y.__zr),y.__zr=null,y.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(y){this.__zr=y;var t=this.animators;if(t)for(var b=0;b<t.length;b++)y.animation.addAnimator(t[b]);this.clipPath&&this.clipPath.addSelfToZr(y)},removeSelfFromZr:function(y){this.__zr=null;var t=this.animators;if(t)for(var b=0;b<t.length;b++)y.animation.removeAnimator(t[b]);this.clipPath&&this.clipPath.removeSelfFromZr(y)}},S.mixin(C,F),S.mixin(C,I),S.mixin(C,B);var P=C;ze.exports=P},"1eCo":function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){"use strict";var B={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},I={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};X.defineMode("xml",function(F,S){var C=F.indentUnit,P={},y=S.htmlMode?B:I;for(var t in y)P[t]=y[t];for(var t in S)P[t]=S[t];var b,i;function u(m,_){function x(U){return _.tokenize=U,U(m,_)}var g=m.next();if(g=="<")return m.eat("!")?m.eat("[")?m.match("CDATA[")?x(o("atom","]]>")):null:m.match("--")?x(o("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),x(h(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),_.tokenize=o("meta","?>"),"meta"):(b=m.eat("/")?"closeTag":"openTag",_.tokenize=p,"tag bracket");if(g=="&"){var j;return m.eat("#")?m.eat("x")?j=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):j=m.eatWhile(/[\d]/)&&m.eat(";"):j=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),j?"atom":"error"}else return m.eatWhile(/[^&<]/),null}u.isInText=!0;function p(m,_){var x=m.next();if(x==">"||x=="/"&&m.eat(">"))return _.tokenize=u,b=x==">"?"endTag":"selfcloseTag","tag bracket";if(x=="=")return b="equals",null;if(x=="<"){_.tokenize=u,_.state=d,_.tagName=_.tagStart=null;var g=_.tokenize(m,_);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(x)?(_.tokenize=a(x),_.stringStartCol=m.column(),_.tokenize(m,_)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(m){var _=function(x,g){for(;!x.eol();)if(x.next()==m){g.tokenize=p;break}return"string"};return _.isInAttribute=!0,_}function o(m,_){return function(x,g){for(;!x.eol();){if(x.match(_)){g.tokenize=u;break}x.next()}return m}}function h(m){return function(_,x){for(var g;(g=_.next())!=null;){if(g=="<")return x.tokenize=h(m+1),x.tokenize(_,x);if(g==">")if(m==1){x.tokenize=u;break}else return x.tokenize=h(m-1),x.tokenize(_,x)}return"meta"}}function l(m,_,x){this.prev=m.context,this.tagName=_,this.indent=m.indented,this.startOfLine=x,(P.doNotIndent.hasOwnProperty(_)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function n(m){m.context&&(m.context=m.context.prev)}function s(m,_){for(var x;;){if(!m.context)return;if(x=m.context.tagName,!P.contextGrabbers.hasOwnProperty(x)||!P.contextGrabbers[x].hasOwnProperty(_))return;n(m)}}function d(m,_,x){return m=="openTag"?(x.tagStart=_.column(),E):m=="closeTag"?D:d}function E(m,_,x){return m=="word"?(x.tagName=_.current(),i="tag",w):P.allowMissingTagName&&m=="endTag"?(i="tag bracket",w(m,_,x)):(i="error",E)}function D(m,_,x){if(m=="word"){var g=_.current();return x.context&&x.context.tagName!=g&&P.implicitlyClosed.hasOwnProperty(x.context.tagName)&&n(x),x.context&&x.context.tagName==g||P.matchClosing===!1?(i="tag",T):(i="tag error",k)}else return P.allowMissingTagName&&m=="endTag"?(i="tag bracket",T(m,_,x)):(i="error",k)}function T(m,_,x){return m!="endTag"?(i="error",T):(n(x),d)}function k(m,_,x){return i="error",T(m,_,x)}function w(m,_,x){if(m=="word")return i="attribute",v;if(m=="endTag"||m=="selfcloseTag"){var g=x.tagName,j=x.tagStart;return x.tagName=x.tagStart=null,m=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(g)?s(x,g):(s(x,g),x.context=new l(x,g,j==x.indented)),d}return i="error",w}function v(m,_,x){return m=="equals"?c:(P.allowMissing||(i="error"),w(m,_,x))}function c(m,_,x){return m=="string"?f:m=="word"&&P.allowUnquoted?(i="string",w):(i="error",w(m,_,x))}function f(m,_,x){return m=="string"?f:w(m,_,x)}return{startState:function(m){var _={tokenize:u,state:d,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(_.baseIndent=m),_},token:function(m,_){if(!_.tagName&&m.sol()&&(_.indented=m.indentation()),m.eatSpace())return null;b=null;var x=_.tokenize(m,_);return(x||b)&&x!="comment"&&(i=null,_.state=_.state(b||x,m,_),i&&(x=i=="error"?x+" error":i)),x},indent:function(m,_,x){var g=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+C;if(g&&g.noIndent)return X.Pass;if(m.tokenize!=p&&m.tokenize!=u)return x?x.match(/^(\s*)/)[0].length:0;if(m.tagName)return P.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+C*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/<!\[CDATA\[/.test(_))return 0;var j=_&&/^<(\/)?([\w_:\.-]*)/.exec(_);if(j&&j[1])for(;g;)if(g.tagName==j[2]){g=g.prev;break}else if(P.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(j)for(;g;){var U=P.contextGrabbers[g.tagName];if(U&&U.hasOwnProperty(j[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+C:m.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(m){m.state==c&&(m.state=w)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var _=[],x=m.context;x;x=x.prev)x.tagName&&_.push(x.tagName);return _.reverse()}}}),X.defineMIME("text/xml","xml"),X.defineMIME("application/xml","xml"),X.mimeModes.hasOwnProperty("text/html")||X.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(ze,ee,M){"use strict";M.d(ee,"d",function(){return et}),M.d(ee,"b",function(){return Ae}),M.d(ee,"c",function(){return rt}),M.d(ee,"a",function(){return Xt});var X=M("VTBJ"),B=M("1OyB"),I=M("vuIU"),F=M("JX7q"),S=M("Ji7U"),C=M("LK+K"),P=M("q1tI"),y=M("I8Z2"),t=M("BGR+"),b=M("wx14"),i=M("rePB"),u=M("4IlW"),p=M("2GS6"),a=M("Gytx"),o=M.n(a),h=M("TSYQ"),l=M.n(h),n=M("U8pU"),s=M("ODXe"),d=/iPhone/i,E=/iPod/i,D=/iPad/i,T=/\bAndroid(?:.+)Mobile\b/i,k=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,v=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,c=/Windows Phone/i,f=/\bWindows(?:.+)ARM\b/i,m=/BlackBerry/i,_=/BB10/i,x=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function U(zt,mt){return zt.test(mt)}function R(zt){var mt=zt||(typeof navigator!="undefined"?navigator.userAgent:""),_t=mt.split("[FBAN");if(typeof _t[1]!="undefined"){var ot=_t,Se=Object(s.a)(ot,1);mt=Se[0]}if(_t=mt.split("Twitter"),typeof _t[1]!="undefined"){var Ue=_t,At=Object(s.a)(Ue,1);mt=At[0]}var pt={apple:{phone:U(d,mt)&&!U(c,mt),ipod:U(E,mt),tablet:!U(d,mt)&&U(D,mt)&&!U(c,mt),device:(U(d,mt)||U(E,mt)||U(D,mt))&&!U(c,mt)},amazon:{phone:U(w,mt),tablet:!U(w,mt)&&U(v,mt),device:U(w,mt)||U(v,mt)},android:{phone:!U(c,mt)&&U(w,mt)||!U(c,mt)&&U(T,mt),tablet:!U(c,mt)&&!U(w,mt)&&!U(T,mt)&&(U(v,mt)||U(k,mt)),device:!U(c,mt)&&(U(w,mt)||U(v,mt)||U(T,mt)||U(k,mt))||U(/\bokhttp\b/i,mt)},windows:{phone:U(c,mt),tablet:U(f,mt),device:U(c,mt)||U(f,mt)},other:{blackberry:U(m,mt),blackberry10:U(_,mt),opera:U(x,mt),firefox:U(j,mt),chrome:U(g,mt),device:U(m,mt)||U(_,mt)||U(x,mt)||U(j,mt)||U(g,mt)},any:null,phone:null,tablet:null};return pt.any=pt.apple.device||pt.android.device||pt.windows.device||pt.other.device,pt.phone=pt.apple.phone||pt.android.phone||pt.windows.phone,pt.tablet=pt.apple.tablet||pt.android.tablet||pt.windows.tablet,pt}var W=Object(X.a)(Object(X.a)({},R()),{},{isMobile:R}),H=W;function L(){}function G(zt,mt,_t){var ot=mt||"";return zt.key||"".concat(ot,"item_").concat(_t)}function z(zt){return"".concat(zt,"-menu-")}function J(zt,mt){var _t=-1;P.Children.forEach(zt,function(ot){_t+=1,ot&&ot.type&&ot.type.isMenuItemGroup?P.Children.forEach(ot.props.children,function(Se){_t+=1,mt(Se,_t)}):mt(ot,_t)})}function te(zt,mt,_t){if(!zt||_t.find)return;P.Children.forEach(zt,function(ot){if(ot){var Se=ot.type;if(!Se||!(Se.isSubMenu||Se.isMenuItem||Se.isMenuItemGroup))return;mt.indexOf(ot.key)!==-1?_t.find=!0:ot.props.children&&te(ot.props.children,mt,_t)}})}var _e=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ce=function(mt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=mt&&typeof mt.getBoundingClientRect=="function"&&mt.getBoundingClientRect().width;if(ot){if(_t){var Se=getComputedStyle(mt),Ue=Se.marginLeft,At=Se.marginRight;ot+=+Ue.replace("px","")+ +At.replace("px","")}ot=+ot.toFixed(6)}return ot||0},xe=function(mt,_t,ot){mt&&Object(n.a)(mt.style)==="object"&&(mt.style[_t]=ot)},Te=function(){return H.any},je=M("KQm4"),Ce=M("Ff2n"),Z=M("i8i4"),K=M("bdgK"),V=M("uciX"),$=M("8XRh"),q={adjustX:1,adjustY:1},Q={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},ge={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},Oe=Q,Ye=0,le={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ee=function(mt,_t,ot){var Se=z(_t),Ue=mt.getState();mt.setState({defaultActiveFirst:Object(X.a)(Object(X.a)({},Ue.defaultActiveFirst),{},Object(i.a)({},Se,ot))})},Re=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(ot){var Se;Object(B.a)(this,_t),Se=mt.call(this,ot),Se.onDestroy=function(Ze){Se.props.onDestroy(Ze)},Se.onKeyDown=function(Ze){var at=Ze.keyCode,Tt=Se.menuInstance,Ht=Se.props,Jt=Ht.isOpen,on=Ht.store;if(at===u.a.ENTER)return Se.onTitleClick(Ze),Ee(on,Se.props.eventKey,!0),!0;if(at===u.a.RIGHT)return Jt?Tt.onKeyDown(Ze):(Se.triggerOpenChange(!0),Ee(on,Se.props.eventKey,!0)),!0;if(at===u.a.LEFT){var Qn;if(Jt)Qn=Tt.onKeyDown(Ze);else return;return Qn||(Se.triggerOpenChange(!1),Qn=!0),Qn}return Jt&&(at===u.a.UP||at===u.a.DOWN)?Tt.onKeyDown(Ze):void 0},Se.onOpenChange=function(Ze){Se.props.onOpenChange(Ze)},Se.onPopupVisibleChange=function(Ze){Se.triggerOpenChange(Ze,Ze?"mouseenter":"mouseleave")},Se.onMouseEnter=function(Ze){var at=Se.props,Tt=at.eventKey,Ht=at.onMouseEnter,Jt=at.store;Ee(Jt,Se.props.eventKey,!1),Ht({key:Tt,domEvent:Ze})},Se.onMouseLeave=function(Ze){var at=Se.props,Tt=at.parentMenu,Ht=at.eventKey,Jt=at.onMouseLeave;Tt.subMenuInstance=Object(F.a)(Se),Jt({key:Ht,domEvent:Ze})},Se.onTitleMouseEnter=function(Ze){var at=Se.props,Tt=at.eventKey,Ht=at.onItemHover,Jt=at.onTitleMouseEnter;Ht({key:Tt,hover:!0}),Jt({key:Tt,domEvent:Ze})},Se.onTitleMouseLeave=function(Ze){var at=Se.props,Tt=at.parentMenu,Ht=at.eventKey,Jt=at.onItemHover,on=at.onTitleMouseLeave;Tt.subMenuInstance=Object(F.a)(Se),Jt({key:Ht,hover:!1}),on({key:Ht,domEvent:Ze})},Se.onTitleClick=function(Ze){var at=Object(F.a)(Se),Tt=at.props;if(Tt.onTitleClick({key:Tt.eventKey,domEvent:Ze}),Tt.triggerSubMenuAction==="hover")return;Se.triggerOpenChange(!Tt.isOpen,"click"),Ee(Tt.store,Se.props.eventKey,!1)},Se.onSubMenuClick=function(Ze){typeof Se.props.onClick=="function"&&Se.props.onClick(Se.addKeyPath(Ze))},Se.onSelect=function(Ze){Se.props.onSelect(Ze)},Se.onDeselect=function(Ze){Se.props.onDeselect(Ze)},Se.getPrefixCls=function(){return"".concat(Se.props.rootPrefixCls,"-submenu")},Se.getActiveClassName=function(){return"".concat(Se.getPrefixCls(),"-active")},Se.getDisabledClassName=function(){return"".concat(Se.getPrefixCls(),"-disabled")},Se.getSelectedClassName=function(){return"".concat(Se.getPrefixCls(),"-selected")},Se.getOpenClassName=function(){return"".concat(Se.props.rootPrefixCls,"-submenu-open")},Se.saveMenuInstance=function(Ze){Se.menuInstance=Ze},Se.addKeyPath=function(Ze){return Object(X.a)(Object(X.a)({},Ze),{},{keyPath:(Ze.keyPath||[]).concat(Se.props.eventKey)})},Se.triggerOpenChange=function(Ze,at){var Tt=Se.props.eventKey,Ht=function(){Se.onOpenChange({key:Tt,item:Object(F.a)(Se),trigger:at,open:Ze})};at==="mouseenter"?Se.mouseenterTimeout=setTimeout(function(){Ht()},0):Ht()},Se.isChildrenSelected=function(){var Ze={find:!1};return te(Se.props.children,Se.props.selectedKeys,Ze),Ze.find},Se.isOpen=function(){return Se.props.openKeys.indexOf(Se.props.eventKey)!==-1},Se.adjustWidth=function(){if(!Se.subMenuTitle||!Se.menuInstance)return;var Ze=Z.findDOMNode(Se.menuInstance);if(Ze.offsetWidth>=Se.subMenuTitle.offsetWidth)return;Ze.style.minWidth="".concat(Se.subMenuTitle.offsetWidth,"px")},Se.saveSubMenuTitle=function(Ze){Se.subMenuTitle=Ze},Se.getBaseProps=function(){var Ze=Object(F.a)(Se),at=Ze.props;return{mode:at.mode==="horizontal"?"vertical":at.mode,visible:Se.props.isOpen,level:at.level+1,inlineIndent:at.inlineIndent,focusable:!1,onClick:Se.onSubMenuClick,onSelect:Se.onSelect,onDeselect:Se.onDeselect,onDestroy:Se.onDestroy,selectedKeys:at.selectedKeys,eventKey:"".concat(at.eventKey,"-menu-"),openKeys:at.openKeys,motion:at.motion,onOpenChange:Se.onOpenChange,subMenuOpenDelay:at.subMenuOpenDelay,parentMenu:Object(F.a)(Se),subMenuCloseDelay:at.subMenuCloseDelay,forceSubMenuRender:at.forceSubMenuRender,triggerSubMenuAction:at.triggerSubMenuAction,builtinPlacements:at.builtinPlacements,defaultActiveFirst:at.store.getState().defaultActiveFirst[z(at.eventKey)],multiple:at.multiple,prefixCls:at.rootPrefixCls,id:Se.internalMenuId,manualRef:Se.saveMenuInstance,itemIcon:at.itemIcon,expandIcon:at.expandIcon,direction:at.direction}},Se.getMotion=function(Ze,at){var Tt=Object(F.a)(Se),Ht=Tt.haveRendered,Jt=Se.props,on=Jt.motion,Qn=Jt.rootPrefixCls,Hn=Object(X.a)(Object(X.a)({},on),{},{leavedClassName:"".concat(Qn,"-hidden"),removeOnLeave:!1,motionAppear:Ht||!at||Ze!=="inline"});return Hn};var Ue=ot.store,At=ot.eventKey,pt=Ue.getState(),jt=pt.defaultActiveFirst;Se.isRootMenu=!1;var Gt=!1;return jt&&(Gt=jt[At]),Ee(Ue,At,Gt),Se}return Object(I.a)(_t,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Se=this,Ue=this.props,At=Ue.mode,pt=Ue.parentMenu,jt=Ue.manualRef;if(jt&&jt(this),At!=="horizontal"||!pt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Se.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Se=this.props,Ue=Se.onDestroy,At=Se.eventKey;Ue&&Ue(At),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Se){var Ue=this,At=this.getBaseProps(),pt=this.getMotion(At.mode,At.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||At.visible||At.forceSubMenuRender,!this.haveOpened)return P.createElement("div",null);var jt=At.direction;return P.createElement($.default,Object.assign({visible:At.visible},pt),function(Gt){var Ze=Gt.className,at=Gt.style,Tt=l()("".concat(At.prefixCls,"-sub"),Ze,Object(i.a)({},"".concat(At.prefixCls,"-rtl"),jt==="rtl"));return P.createElement(se,Object.assign({},At,{id:Ue.internalMenuId,className:Tt,style:at}),Se)})}},{key:"render",value:function(){var Se,Ue=Object(X.a)({},this.props),At=Ue.isOpen,pt=this.getPrefixCls(),jt=Ue.mode==="inline",Gt=l()(pt,"".concat(pt,"-").concat(Ue.mode),(Se={},Object(i.a)(Se,Ue.className,!!Ue.className),Object(i.a)(Se,this.getOpenClassName(),At),Object(i.a)(Se,this.getActiveClassName(),Ue.active||At&&!jt),Object(i.a)(Se,this.getDisabledClassName(),Ue.disabled),Object(i.a)(Se,this.getSelectedClassName(),this.isChildrenSelected()),Se));this.internalMenuId||(Ue.eventKey?this.internalMenuId="".concat(Ue.eventKey,"$Menu"):(Ye+=1,this.internalMenuId="$__$".concat(Ye,"$Menu")));var Ze={},at={},Tt={};Ue.disabled||(Ze={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},at={onClick:this.onTitleClick},Tt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ht={},Jt=Ue.direction;jt&&(Jt==="rtl"?Ht.paddingRight=Ue.inlineIndent*Ue.level:Ht.paddingLeft=Ue.inlineIndent*Ue.level);var on={};this.props.isOpen&&(on={"aria-owns":this.internalMenuId});var Qn=null;Ue.mode!=="horizontal"&&(Qn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Qn=P.createElement(this.props.expandIcon,Object(X.a)({},this.props))));var Hn=P.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Ht,className:"".concat(pt,"-title"),role:"button"},Tt,at,{"aria-expanded":At},on,{"aria-haspopup":"true",title:typeof Ue.title=="string"?Ue.title:void 0}),Ue.title,Qn||P.createElement("i",{className:"".concat(pt,"-arrow")})),nn=this.renderChildren(Ue.children),Un=Ue.parentMenu.isRootMenu?Ue.parentMenu.props.getPopupContainer:function($r){return $r.parentNode},ar=le[Ue.mode],xn=Ue.popupOffset?{offset:Ue.popupOffset}:{},zn=Ue.mode==="inline"?"":Ue.popupClassName;zn+=Jt==="rtl"?" ".concat(pt,"-rtl"):"";var nr=Ue.disabled,Lr=Ue.triggerSubMenuAction,Cr=Ue.subMenuOpenDelay,en=Ue.forceSubMenuRender,Yn=Ue.subMenuCloseDelay,na=Ue.builtinPlacements;_e.forEach(function($r){return delete Ue[$r]}),delete Ue.onClick;var Ea=Jt==="rtl"?Object.assign({},ge,na):Object.assign({},Q,na);return delete Ue.direction,P.createElement("li",Object.assign({},Ue,Ze,{className:Gt,role:"menuitem"}),jt&&Hn,jt&&nn,!jt&&P.createElement(V.a,{prefixCls:pt,popupClassName:l()("".concat(pt,"-popup"),zn),getPopupContainer:Un,builtinPlacements:Ea,popupPlacement:ar,popupVisible:At,popupAlign:xn,popup:nn,action:nr?[]:[Lr],mouseEnterDelay:Cr,mouseLeaveDelay:Yn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:en},Hn))}}]),_t}(P.Component);Re.defaultProps={onMouseEnter:L,onMouseLeave:L,onTitleMouseEnter:L,onTitleMouseLeave:L,onTitleClick:L,manualRef:L,mode:"vertical",title:""};var He=Object(y.b)(function(zt,mt){var _t=zt.openKeys,ot=zt.activeKey,Se=zt.selectedKeys,Ue=mt.eventKey,At=mt.subMenuKey;return{isOpen:_t.indexOf(Ue)>-1,active:ot[At]===Ue,selectedKeys:Se}})(Re);He.isSubMenu=!0;var et=He,ut="menuitem-overflowed",Dt=.5,We=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(){var ot;return Object(B.a)(this,_t),ot=mt.apply(this,arguments),ot.resizeObserver=null,ot.mutationObserver=null,ot.originalTotalWidth=0,ot.overflowedItems=[],ot.menuItemSizes=[],ot.cancelFrameId=null,ot.state={lastVisibleIndex:void 0},ot.getMenuItemNodes=function(){var Se=ot.props.prefixCls,Ue=Z.findDOMNode(Object(F.a)(ot));return Ue?[].slice.call(Ue.children).filter(function(At){return At.className.split(" ").indexOf("".concat(Se,"-overflowed-submenu"))<0}):[]},ot.getOverflowedSubMenuItem=function(Se,Ue,At){var pt=ot.props,jt=pt.overflowedIndicator,Gt=pt.level,Ze=pt.mode,at=pt.prefixCls,Tt=pt.theme;if(Gt!==1||Ze!=="horizontal")return null;var Ht=ot.props.children[0],Jt=Ht.props,on=Jt.children,Qn=Jt.title,Hn=Jt.style,nn=Object(Ce.a)(Jt,["children","title","style"]),Un=Object(X.a)({},Hn),ar="".concat(Se,"-overflowed-indicator"),xn="".concat(Se,"-overflowed-indicator");Ue.length===0&&At!==!0?Un=Object(X.a)(Object(X.a)({},Un),{},{display:"none"}):At&&(Un=Object(X.a)(Object(X.a)({},Un),{},{visibility:"hidden",position:"absolute"}),ar="".concat(ar,"-placeholder"),xn="".concat(xn,"-placeholder"));var zn=Tt?"".concat(at,"-").concat(Tt):"",nr={};return _e.forEach(function(Lr){nn[Lr]!==void 0&&(nr[Lr]=nn[Lr])}),P.createElement(et,Object.assign({title:jt,className:"".concat(at,"-overflowed-submenu"),popupClassName:zn},nr,{key:ar,eventKey:xn,disabled:!1,style:Un}),Ue)},ot.setChildrenWidthAndResize=function(){if(ot.props.mode!=="horizontal")return;var Se=Z.findDOMNode(Object(F.a)(ot));if(!Se)return;var Ue=Se.children;if(!Ue||Ue.length===0)return;var At=Se.children[Ue.length-1];xe(At,"display","inline-block");var pt=ot.getMenuItemNodes(),jt=pt.filter(function(Gt){return Gt.className.split(" ").indexOf(ut)>=0});jt.forEach(function(Gt){xe(Gt,"display","inline-block")}),ot.menuItemSizes=pt.map(function(Gt){return ce(Gt,!0)}),jt.forEach(function(Gt){xe(Gt,"display","none")}),ot.overflowedIndicatorWidth=ce(Se.children[Se.children.length-1],!0),ot.originalTotalWidth=ot.menuItemSizes.reduce(function(Gt,Ze){return Gt+Ze},0),ot.handleResize(),xe(At,"display","none")},ot.handleResize=function(){if(ot.props.mode!=="horizontal")return;var Se=Z.findDOMNode(Object(F.a)(ot));if(!Se)return;var Ue=ce(Se);ot.overflowedItems=[];var At=0,pt;ot.originalTotalWidth>Ue+Dt&&(pt=-1,ot.menuItemSizes.forEach(function(jt){At+=jt,At+ot.overflowedIndicatorWidth<=Ue&&(pt+=1)})),ot.setState({lastVisibleIndex:pt})},ot}return Object(I.a)(_t,[{key:"componentDidMount",value:function(){var Se=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ue=Z.findDOMNode(this);if(!Ue)return;this.resizeObserver=new K.default(function(At){At.forEach(function(){var pt=Se.cancelFrameId;cancelAnimationFrame(pt),Se.cancelFrameId=requestAnimationFrame(Se.setChildrenWidthAndResize)})}),[].slice.call(Ue.children).concat(Ue).forEach(function(At){Se.resizeObserver.observe(At)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Se.resizeObserver.disconnect(),[].slice.call(Ue.children).concat(Ue).forEach(function(At){Se.resizeObserver.observe(At)}),Se.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ue,{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(Se){var Ue=this,At=this.state.lastVisibleIndex;return(Se||[]).reduce(function(pt,jt,Gt){var Ze=jt;if(Ue.props.mode==="horizontal"){var at=Ue.getOverflowedSubMenuItem(jt.props.eventKey,[]);At!==void 0&&Ue.props.className.indexOf("".concat(Ue.props.prefixCls,"-root"))!==-1&&(Gt>At&&(Ze=P.cloneElement(jt,{style:{display:"none"},eventKey:"".concat(jt.props.eventKey,"-hidden"),className:"".concat(ut)})),Gt===At+1&&(Ue.overflowedItems=Se.slice(At+1).map(function(Ht){return P.cloneElement(Ht,{key:Ht.props.eventKey,mode:"vertical-left"})}),at=Ue.getOverflowedSubMenuItem(jt.props.eventKey,Ue.overflowedItems)));var Tt=[].concat(Object(je.a)(pt),[at,Ze]);return Gt===Se.length-1&&Tt.push(Ue.getOverflowedSubMenuItem(jt.props.eventKey,[],!0)),Tt}return[].concat(Object(je.a)(pt),[Ze])},[])}},{key:"render",value:function(){var Se=this.props,Ue=Se.visible,At=Se.prefixCls,pt=Se.overflowedIndicator,jt=Se.mode,Gt=Se.level,Ze=Se.tag,at=Se.children,Tt=Se.theme,Ht=Object(Ce.a)(Se,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Jt=Ze;return P.createElement(Jt,Object.assign({},Ht),this.renderChildren(at))}}]),_t}(P.Component);We.defaultProps={tag:"div",className:""};var Mt=We;function Wt(zt){return zt.length?zt.every(function(mt){return!!mt.props.disabled}):!0}function Ne(zt,mt,_t){var ot=zt.getState();zt.setState({activeKey:Object(X.a)(Object(X.a)({},ot.activeKey),{},Object(i.a)({},mt,_t))})}function Pe(zt){return zt.eventKey||"0-menu-"}function it(zt,mt){var _t=mt,ot=zt.children,Se=zt.eventKey;if(_t){var Ue;if(J(ot,function(At,pt){At&&At.props&&!At.props.disabled&&_t===G(At,Se,pt)&&(Ue=!0)}),Ue)return _t}return _t=null,zt.defaultActiveFirst&&J(ot,function(At,pt){!_t&&At&&!At.props.disabled&&(_t=G(At,Se,pt))}),_t}function gt(zt){if(zt){var mt=this.instanceArray.indexOf(zt);mt!==-1?this.instanceArray[mt]=zt:this.instanceArray.push(zt)}}var fe=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(ot){var Se;return Object(B.a)(this,_t),Se=mt.call(this,ot),Se.onKeyDown=function(Ue,At){var pt=Ue.keyCode,jt;if(Se.getFlatInstanceArray().forEach(function(Ze){Ze&&Ze.props.active&&Ze.onKeyDown&&(jt=Ze.onKeyDown(Ue))}),jt)return 1;var Gt=null;return(pt===u.a.UP||pt===u.a.DOWN)&&(Gt=Se.step(pt===u.a.UP?-1:1)),Gt?(Ue.preventDefault(),Ne(Se.props.store,Pe(Se.props),Gt.props.eventKey),typeof At=="function"&&At(Gt),1):void 0},Se.onItemHover=function(Ue){var At=Ue.key,pt=Ue.hover;Ne(Se.props.store,Pe(Se.props),pt?At:null)},Se.onDeselect=function(Ue){Se.props.onDeselect(Ue)},Se.onSelect=function(Ue){Se.props.onSelect(Ue)},Se.onClick=function(Ue){Se.props.onClick(Ue)},Se.onOpenChange=function(Ue){Se.props.onOpenChange(Ue)},Se.onDestroy=function(Ue){Se.props.onDestroy(Ue)},Se.getFlatInstanceArray=function(){return Se.instanceArray},Se.step=function(Ue){var At=Se.getFlatInstanceArray(),pt=Se.props.store.getState().activeKey[Pe(Se.props)],jt=At.length;if(!jt)return null;Ue<0&&(At=At.concat().reverse());var Gt=-1;if(At.every(function(Ht,Jt){return Ht&&Ht.props.eventKey===pt?(Gt=Jt,!1):!0}),!Se.props.defaultActiveFirst&&Gt!==-1&&Wt(At.slice(Gt,jt-1)))return;var Ze=(Gt+1)%jt,at=Ze;do{var Tt=At[at];if(!Tt||Tt.props.disabled)at=(at+1)%jt;else return Tt}while(at!==Ze);return null},Se.renderCommonMenuItem=function(Ue,At,pt){var jt=Se.props.store.getState(),Gt=Object(F.a)(Se),Ze=Gt.props,at=G(Ue,Ze.eventKey,At),Tt=Ue.props;if(!Tt||typeof Ue.type=="string")return Ue;var Ht=at===jt.activeKey,Jt=Object(X.a)(Object(X.a)({mode:Tt.mode||Ze.mode,level:Ze.level,inlineIndent:Ze.inlineIndent,renderMenuItem:Se.renderMenuItem,rootPrefixCls:Ze.prefixCls,index:At,parentMenu:Ze.parentMenu,manualRef:Tt.disabled?void 0:Object(p.a)(Ue.ref,gt.bind(Object(F.a)(Se))),eventKey:at,active:!Tt.disabled&&Ht,multiple:Ze.multiple,onClick:function(Qn){(Tt.onClick||L)(Qn),Se.onClick(Qn)},onItemHover:Se.onItemHover,motion:Ze.motion,subMenuOpenDelay:Ze.subMenuOpenDelay,subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,onOpenChange:Se.onOpenChange,onDeselect:Se.onDeselect,onSelect:Se.onSelect,builtinPlacements:Ze.builtinPlacements,itemIcon:Tt.itemIcon||Se.props.itemIcon,expandIcon:Tt.expandIcon||Se.props.expandIcon},pt),{},{direction:Ze.direction});return(Ze.mode==="inline"||Te())&&(Jt.triggerSubMenuAction="click"),P.cloneElement(Ue,Jt)},Se.renderMenuItem=function(Ue,At,pt){if(!Ue)return null;var jt=Se.props.store.getState(),Gt={openKeys:jt.openKeys,selectedKeys:jt.selectedKeys,triggerSubMenuAction:Se.props.triggerSubMenuAction,subMenuKey:pt};return Se.renderCommonMenuItem(Ue,At,Gt)},ot.store.setState({activeKey:Object(X.a)(Object(X.a)({},ot.store.getState().activeKey),{},Object(i.a)({},ot.eventKey,it(ot,ot.activeKey)))}),Se.instanceArray=[],Se}return Object(I.a)(_t,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Se){return this.props.visible||Se.visible||this.props.className!==Se.className||!o()(this.props.style,Se.style)}},{key:"componentDidUpdate",value:function(Se){var Ue=this.props,At="activeKey"in Ue?Ue.activeKey:Ue.store.getState().activeKey[Pe(Ue)],pt=it(Ue,At);if(pt!==At)Ne(Ue.store,Pe(Ue),pt);else if("activeKey"in Se){var jt=it(Se,Se.activeKey);pt!==jt&&Ne(Ue.store,Pe(Ue),pt)}}},{key:"render",value:function(){var Se=this,Ue=Object(b.a)({},this.props);this.instanceArray=[];var At=l()(Ue.prefixCls,Ue.className,"".concat(Ue.prefixCls,"-").concat(Ue.mode)),pt={className:At,role:Ue.role||"menu"};Ue.id&&(pt.id=Ue.id),Ue.focusable&&(pt.tabIndex=0,pt.onKeyDown=this.onKeyDown);var jt=Ue.prefixCls,Gt=Ue.eventKey,Ze=Ue.visible,at=Ue.level,Tt=Ue.mode,Ht=Ue.overflowedIndicator,Jt=Ue.theme;return _e.forEach(function(on){return delete Ue[on]}),delete Ue.onClick,P.createElement(Mt,Object.assign({},Ue,{prefixCls:jt,mode:Tt,tag:"ul",level:at,theme:Jt,visible:Ze,overflowedIndicator:Ht},pt),P.Children.map(Ue.children,function(on,Qn){return Se.renderMenuItem(on,Qn,Gt||"0-menu-")}))}}]),_t}(P.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:L};var ae=Object(y.b)()(fe),se=ae,de=M("Kwbf");function ve(zt,mt,_t){var ot=zt.prefixCls,Se=zt.motion,Ue=zt.defaultMotions,At=Ue===void 0?{}:Ue,pt=zt.openAnimation,jt=zt.openTransitionName,Gt=mt.switchingModeFromInline;if(Se)return Se;if(Object(n.a)(pt)==="object"&&pt)Object(de.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof pt=="string")return{motionName:"".concat(ot,"-open-").concat(pt)};if(jt)return{motionName:jt};var Ze=At[_t];return Ze||(Gt?null:At.other)}var ie=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(ot){var Se;Object(B.a)(this,_t),Se=mt.call(this,ot),Se.inlineOpenKeys=[],Se.onSelect=function(pt){var jt=Object(F.a)(Se),Gt=jt.props;if(Gt.selectable){var Ze=Se.store.getState(),at=Ze.selectedKeys,Tt=pt.key;Gt.multiple?at=at.concat([Tt]):at=[Tt],"selectedKeys"in Gt||Se.store.setState({selectedKeys:at}),Gt.onSelect(Object(X.a)(Object(X.a)({},pt),{},{selectedKeys:at}))}},Se.onClick=function(pt){var jt=Se.getRealMenuMode(),Gt=Object(F.a)(Se),Ze=Gt.store,at=Gt.props.onOpenChange;jt!=="inline"&&!("openKeys"in Se.props)&&(Ze.setState({openKeys:[]}),at([])),Se.props.onClick(pt)},Se.onKeyDown=function(pt,jt){Se.innerMenu.getWrappedInstance().onKeyDown(pt,jt)},Se.onOpenChange=function(pt){var jt=Object(F.a)(Se),Gt=jt.props,Ze=Se.store.getState().openKeys.concat(),at=!1,Tt=function(Jt){var on=!1;if(Jt.open)on=Ze.indexOf(Jt.key)===-1,on&&Ze.push(Jt.key);else{var Qn=Ze.indexOf(Jt.key);on=Qn!==-1,on&&Ze.splice(Qn,1)}at=at||on};Array.isArray(pt)?pt.forEach(Tt):Tt(pt),at&&("openKeys"in Se.props||Se.store.setState({openKeys:Ze}),Gt.onOpenChange(Ze))},Se.onDeselect=function(pt){var jt=Object(F.a)(Se),Gt=jt.props;if(Gt.selectable){var Ze=Se.store.getState().selectedKeys.concat(),at=pt.key,Tt=Ze.indexOf(at);Tt!==-1&&Ze.splice(Tt,1),"selectedKeys"in Gt||Se.store.setState({selectedKeys:Ze}),Gt.onDeselect(Object(X.a)(Object(X.a)({},pt),{},{selectedKeys:Ze}))}},Se.onMouseEnter=function(pt){Se.restoreModeVerticalFromInline();var jt=Se.props.onMouseEnter;jt&&jt(pt)},Se.onTransitionEnd=function(pt){var jt=pt.propertyName==="width"&&pt.target===pt.currentTarget,Gt=pt.target.className,Ze=Object.prototype.toString.call(Gt)==="[object SVGAnimatedString]"?Gt.animVal:Gt,at=pt.propertyName==="font-size"&&Ze.indexOf("anticon")>=0;(jt||at)&&Se.restoreModeVerticalFromInline()},Se.setInnerMenu=function(pt){Se.innerMenu=pt},Se.isRootMenu=!0;var Ue=ot.defaultSelectedKeys,At=ot.defaultOpenKeys;return"selectedKeys"in ot&&(Ue=ot.selectedKeys||[]),"openKeys"in ot&&(At=ot.openKeys||[]),Se.store=Object(y.c)({selectedKeys:Ue,openKeys:At,activeKey:{"0-menu-":it(ot,ot.activeKey)}}),Se.state={switchingModeFromInline:!1},Se}return Object(I.a)(_t,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Se){this.updateOpentKeysWhenSwitchMode(Se),this.updateMiniStore();var Ue=this.props,At=Ue.siderCollapsed,pt=Ue.inlineCollapsed,jt=Ue.onOpenChange;(!Se.inlineCollapsed&&pt||!Se.siderCollapsed&&At)&&jt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Se){var Ue=this.props,At=this.store,pt=this.inlineOpenKeys,jt=At.getState(),Gt={};Se.mode==="inline"&&Ue.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ue||((Ue.inlineCollapsed&&!Se.inlineCollapsed||Ue.siderCollapsed&&!Se.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=jt.openKeys.concat(),Gt.openKeys=[]),(!Ue.inlineCollapsed&&Se.inlineCollapsed||!Ue.siderCollapsed&&Se.siderCollapsed)&&(Gt.openKeys=pt,this.inlineOpenKeys=[])),Object.keys(Gt).length&&At.setState(Gt)}},{key:"updateMenuDisplay",value:function(){var Se=this.props.collapsedWidth,Ue=this.store,At=this.prevOpenKeys,pt=this.getInlineCollapsed()&&(Se===0||Se==="0"||Se==="0px");pt?(this.prevOpenKeys=Ue.getState().openKeys.concat(),this.store.setState({openKeys:[]})):At&&(this.store.setState({openKeys:At}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Se=this.props.mode,Ue=this.state.switchingModeFromInline,At=this.getInlineCollapsed();return Ue&&At?"inline":At?"vertical":Se}},{key:"getInlineCollapsed",value:function(){var Se=this.props,Ue=Se.inlineCollapsed,At=Se.siderCollapsed;return At!==void 0?At:Ue}},{key:"restoreModeVerticalFromInline",value:function(){var Se=this.state.switchingModeFromInline;Se&&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 Se=Object(X.a)({},Object(t.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ue=this.getRealMenuMode();return Se.className+=" ".concat(Se.prefixCls,"-root"),Se.direction==="rtl"&&(Se.className+=" ".concat(Se.prefixCls,"-rtl")),Se=Object(X.a)(Object(X.a)({},Se),{},{mode:Ue,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ve(this.props,this.state,Ue)}),delete Se.openAnimation,delete Se.openTransitionName,P.createElement(y.a,{store:this.store},P.createElement(se,Object.assign({},Se,{ref:this.setInnerMenu}),this.props.children))}}]),_t}(P.Component);ie.defaultProps={selectable:!0,onClick:L,onSelect:L,onOpenChange:L,onDeselect:L,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 oe=ie,pe=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(){var ot;return Object(B.a)(this,_t),ot=mt.apply(this,arguments),ot.onKeyDown=function(Se){var Ue=Se.keyCode;return Ue===u.a.ENTER?(ot.onClick(Se),!0):void 0},ot.onMouseLeave=function(Se){var Ue=ot.props,At=Ue.eventKey,pt=Ue.onItemHover,jt=Ue.onMouseLeave;pt({key:At,hover:!1}),jt({key:At,domEvent:Se})},ot.onMouseEnter=function(Se){var Ue=ot.props,At=Ue.eventKey,pt=Ue.onItemHover,jt=Ue.onMouseEnter;pt({key:At,hover:!0}),jt({key:At,domEvent:Se})},ot.onClick=function(Se){var Ue=ot.props,At=Ue.eventKey,pt=Ue.multiple,jt=Ue.onClick,Gt=Ue.onSelect,Ze=Ue.onDeselect,at=Ue.isSelected,Tt={key:At,keyPath:[At],item:Object(F.a)(ot),domEvent:Se};jt(Tt),pt?at?Ze(Tt):Gt(Tt):at||Gt(Tt)},ot.saveNode=function(Se){ot.node=Se},ot}return Object(I.a)(_t,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Se=this.props;Se.onDestroy&&Se.onDestroy(Se.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 Se,Ue=Object(X.a)({},this.props),At=l()(this.getPrefixCls(),Ue.className,(Se={},Object(i.a)(Se,this.getActiveClassName(),!Ue.disabled&&Ue.active),Object(i.a)(Se,this.getSelectedClassName(),Ue.isSelected),Object(i.a)(Se,this.getDisabledClassName(),Ue.disabled),Se)),pt=Object(X.a)(Object(X.a)({},Ue.attribute),{},{title:typeof Ue.title=="string"?Ue.title:void 0,className:At,role:Ue.role||"menuitem","aria-disabled":Ue.disabled});Ue.role==="option"?pt=Object(X.a)(Object(X.a)({},pt),{},{role:"option","aria-selected":Ue.isSelected}):(Ue.role===null||Ue.role==="none")&&(pt.role="none");var jt={onClick:Ue.disabled?null:this.onClick,onMouseLeave:Ue.disabled?null:this.onMouseLeave,onMouseEnter:Ue.disabled?null:this.onMouseEnter},Gt=Object(X.a)({},Ue.style);Ue.mode==="inline"&&(Ue.direction==="rtl"?Gt.paddingRight=Ue.inlineIndent*Ue.level:Gt.paddingLeft=Ue.inlineIndent*Ue.level),_e.forEach(function(at){return delete Ue[at]}),delete Ue.direction;var Ze=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ze=P.createElement(this.props.itemIcon,this.props)),P.createElement("li",Object.assign({},Object(t.default)(Ue,["onClick","onMouseEnter","onMouseLeave","onSelect"]),pt,jt,{style:Gt,ref:this.saveNode}),Ue.children,Ze)}}]),_t}(P.Component);pe.isMenuItem=!0,pe.defaultProps={onSelect:L,onMouseEnter:L,onMouseLeave:L,manualRef:L};var we=Object(y.b)(function(zt,mt){var _t=zt.activeKey,ot=zt.selectedKeys,Se=mt.eventKey,Ue=mt.subMenuKey;return{active:_t[Ue]===Se,isSelected:ot.indexOf(Se)!==-1}})(pe),Ae=we,Me=function(zt){Object(S.a)(_t,zt);var mt=Object(C.a)(_t);function _t(){var ot;return Object(B.a)(this,_t),ot=mt.apply(this,arguments),ot.renderInnerMenuItem=function(Se){var Ue=ot.props,At=Ue.renderMenuItem,pt=Ue.index;return At(Se,pt,ot.props.subMenuKey)},ot}return Object(I.a)(_t,[{key:"render",value:function(){var Se=Object(b.a)({},this.props),Ue=Se.className,At=Ue===void 0?"":Ue,pt=Se.rootPrefixCls,jt="".concat(pt,"-item-group-title"),Gt="".concat(pt,"-item-group-list"),Ze=Se.title,at=Se.children;return _e.forEach(function(Tt){return delete Se[Tt]}),delete Se.onClick,delete Se.direction,P.createElement("li",Object.assign({},Se,{className:"".concat(At," ").concat(pt,"-item-group")}),P.createElement("div",{className:jt,title:typeof Ze=="string"?Ze:void 0},Ze),P.createElement("ul",{className:Gt},P.Children.map(at,this.renderInnerMenuItem)))}}]),_t}(P.Component);Me.isMenuItemGroup=!0,Me.defaultProps={disabled:!0};var rt=Me,Pt=function(mt){var _t=mt.className,ot=mt.rootPrefixCls,Se=mt.style;return P.createElement("li",{className:"".concat(_t," ").concat(ot,"-item-divider"),style:Se})};Pt.defaultProps={disabled:!0,className:"",style:{}};var Xt=Pt,lt=ee.e=oe},"24YM":function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.SensorTabIndex=ee.SensorClassName=ee.SizeSensorId=void 0;var X="size-sensor-id";ee.SizeSensorId=X;var B="size-sensor-object";ee.SensorClassName=B;var I="-1";ee.SensorTabIndex=I},"24hK":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return B});class X{constructor(I){this.element=I,this.next=X.Undefined,this.prev=X.Undefined}}X.Undefined=new X(void 0);class B{constructor(){this._first=X.Undefined,this._last=X.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===X.Undefined}clear(){let I=this._first;for(;I!==X.Undefined;){const F=I.next;I.prev=X.Undefined,I.next=X.Undefined,I=F}this._first=X.Undefined,this._last=X.Undefined,this._size=0}unshift(I){return this._insert(I,!1)}push(I){return this._insert(I,!0)}_insert(I,F){const S=new X(I);if(this._first===X.Undefined)this._first=S,this._last=S;else if(F){const P=this._last;this._last=S,S.prev=P,P.next=S}else{const P=this._first;this._first=S,S.next=P,P.prev=S}this._size+=1;let C=!1;return()=>{C||(C=!0,this._remove(S))}}shift(){if(this._first===X.Undefined)return;{const I=this._first.element;return this._remove(this._first),I}}pop(){if(this._last===X.Undefined)return;{const I=this._last.element;return this._remove(this._last),I}}_remove(I){if(I.prev!==X.Undefined&&I.next!==X.Undefined){const F=I.prev;F.next=I.next,I.next.prev=F}else I.prev===X.Undefined&&I.next===X.Undefined?(this._first=X.Undefined,this._last=X.Undefined):I.next===X.Undefined?(this._last=this._last.prev,this._last.next=X.Undefined):I.prev===X.Undefined&&(this._first=this._first.next,this._first.prev=X.Undefined);this._size-=1}*[Symbol.iterator](){let I=this._first;for(;I!==X.Undefined;)yield I.element,I=I.next}}},"2DNl":function(ze,ee,M){var X=M("IMiH"),B=M("loD1"),I=M("59Ip"),F=M("aKvl"),S=M("n1HI"),C=M("hX1E"),P=C.normalizeRadian,y=M("Sj9i"),t=M("hyiK"),b=X.CMD,i=Math.PI*2,u=1e-4;function p(T,k){return Math.abs(T-k)<u}var a=[-1,-1,-1],o=[-1,-1];function h(){var T=o[0];o[0]=o[1],o[1]=T}function l(T,k,w,v,c,f,m,_,x,g){if(g>k&&g>v&&g>f&&g>_||g<k&&g<v&&g<f&&g<_)return 0;var j=y.cubicRootAt(k,v,f,_,g,a);if(j===0)return 0;for(var U=0,R=-1,W,H,L=0;L<j;L++){var G=a[L],z=G===0||G===1?.5:1,J=y.cubicAt(T,w,c,m,G);if(J<x)continue;R<0&&(R=y.cubicExtrema(k,v,f,_,o),o[1]<o[0]&&R>1&&h(),W=y.cubicAt(k,v,f,_,o[0]),R>1&&(H=y.cubicAt(k,v,f,_,o[1]))),R===2?G<o[0]?U+=W<k?z:-z:G<o[1]?U+=H<W?z:-z:U+=_<H?z:-z:G<o[0]?U+=W<k?z:-z:U+=_<W?z:-z}return U}function n(T,k,w,v,c,f,m,_){if(_>k&&_>v&&_>f||_<k&&_<v&&_<f)return 0;var x=y.quadraticRootAt(k,v,f,_,a);if(x===0)return 0;var g=y.quadraticExtremum(k,v,f);if(g>=0&&g<=1){for(var j=0,U=y.quadraticAt(k,v,f,g),R=0;R<x;R++){var W=a[R]===0||a[R]===1?.5:1,H=y.quadraticAt(T,w,c,a[R]);if(H<m)continue;a[R]<g?j+=U<k?W:-W:j+=f<U?W:-W}return j}else{var W=a[0]===0||a[0]===1?.5:1,H=y.quadraticAt(T,w,c,a[0]);return H<m?0:f<k?W:-W}}function s(T,k,w,v,c,f,m,_){if(_-=k,_>w||_<-w)return 0;var x=Math.sqrt(w*w-_*_);a[0]=-x,a[1]=x;var g=Math.abs(v-c);if(g<1e-4)return 0;if(g%i<1e-4){v=0,c=i;var j=f?1:-1;return m>=a[0]+T&&m<=a[1]+T?j:0}if(f){var x=v;v=P(c),c=P(x)}else v=P(v),c=P(c);v>c&&(c+=i);for(var U=0,R=0;R<2;R++){var W=a[R];if(W+T>m){var H=Math.atan2(_,W),j=f?1:-1;H<0&&(H=i+H),(H>=v&&H<=c||H+i>=v&&H+i<=c)&&(H>Math.PI/2&&H<Math.PI*1.5&&(j=-j),U+=j)}}return U}function d(T,k,w,v,c){for(var f=0,m=0,_=0,x=0,g=0,j=0;j<T.length;){var U=T[j++];U===b.M&&j>1&&(w||(f+=t(m,_,x,g,v,c))),j===1&&(m=T[j],_=T[j+1],x=m,g=_);switch(U){case b.M:x=T[j++],g=T[j++],m=x,_=g;break;case b.L:if(w){if(B.containStroke(m,_,T[j],T[j+1],k,v,c))return!0}else f+=t(m,_,T[j],T[j+1],v,c)||0;m=T[j++],_=T[j++];break;case b.C:if(w){if(I.containStroke(m,_,T[j++],T[j++],T[j++],T[j++],T[j],T[j+1],k,v,c))return!0}else f+=l(m,_,T[j++],T[j++],T[j++],T[j++],T[j],T[j+1],v,c)||0;m=T[j++],_=T[j++];break;case b.Q:if(w){if(F.containStroke(m,_,T[j++],T[j++],T[j],T[j+1],k,v,c))return!0}else f+=n(m,_,T[j++],T[j++],T[j],T[j+1],v,c)||0;m=T[j++],_=T[j++];break;case b.A:var R=T[j++],W=T[j++],H=T[j++],L=T[j++],G=T[j++],z=T[j++];j+=1;var J=1-T[j++],te=Math.cos(G)*H+R,_e=Math.sin(G)*L+W;j>1?f+=t(m,_,te,_e,v,c):(x=te,g=_e);var ce=(v-R)*L/H+R;if(w){if(S.containStroke(R,W,L,G,G+z,J,k,ce,c))return!0}else f+=s(R,W,L,G,G+z,J,ce,c);m=Math.cos(G+z)*H+R,_=Math.sin(G+z)*L+W;break;case b.R:x=m=T[j++],g=_=T[j++];var xe=T[j++],Te=T[j++],te=x+xe,_e=g+Te;if(w){if(B.containStroke(x,g,te,g,k,v,c)||B.containStroke(te,g,te,_e,k,v,c)||B.containStroke(te,_e,x,_e,k,v,c)||B.containStroke(x,_e,x,g,k,v,c))return!0}else f+=t(te,g,te,_e,v,c),f+=t(x,_e,x,g,v,c);break;case b.Z:if(w){if(B.containStroke(m,_,x,g,k,v,c))return!0}else f+=t(m,_,x,g,v,c);m=x,_=g;break}}return!w&&!p(_,g)&&(f+=t(m,_,x,g,v,c)||0),f!==0}function E(T,k,w){return d(T,0,!1,k,w)}function D(T,k,w,v){return d(T,k,!0,w,v)}ee.contain=E,ee.containStroke=D},"2fw6":function(ze,ee,M){var X=M("y+Vt"),B=X.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(I,F,S){S&&I.moveTo(F.cx+F.r,F.cy),I.arc(F.cx,F.cy,F.r,0,Math.PI*2,!0)}});ze.exports=B},"3/fG":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return B});function X(I,F){let S;return F.length===0?S=I:S=I.replace(/\{(\d+)\}/g,function(C,P){const y=P[0];return typeof F[y]!="undefined"?F[y]:C}),S}function B(I,F,...S){return X(F,S)}},"3C/r":function(ze,ee){var M=function(B,I){this.image=B,this.repeat=I,this.type="pattern"};M.prototype.getCanvasPattern=function(B){return B.createPattern(this.image,this.repeat||"repeat")};var X=M;ze.exports=X},"3CBa":function(ze,ee,M){var X=M("hydK"),B=X.createElement,I=M("bYtY"),F=M("SUKs"),S=M("y+Vt"),C=M("Dagg"),P=M("dqUG"),y=M("DBLp"),t=M("sW+o"),b=M("n6Mw"),i=M("vKoX"),u=M("P47w"),p=u.path,a=u.image,o=u.text;function h(c){return parseInt(c,10)}function l(c){return c instanceof S?p:c instanceof C?a:c instanceof P?o:p}function n(c,f){return f&&c&&f.parentNode!==c}function s(c,f,m){if(n(c,f)&&m){var _=m.nextSibling;_?c.insertBefore(f,_):c.appendChild(f)}}function d(c,f){if(n(c,f)){var m=c.firstChild;m?c.insertBefore(f,m):c.appendChild(f)}}function E(c,f){f&&c&&f.parentNode===c&&c.removeChild(f)}function D(c){return c.__textSvgEl}function T(c){return c.__svgEl}var k=function(c,f,m,_){this.root=c,this.storage=f,this._opts=m=I.extend({},m||{});var x=B("svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("version","1.1"),x.setAttribute("baseProfile","full"),x.style.cssText="user-select:none;position:absolute;left:0;top:0;";var g=B("g");x.appendChild(g);var j=B("g");x.appendChild(j),this.gradientManager=new t(_,j),this.clipPathManager=new b(_,j),this.shadowManager=new i(_,j);var U=document.createElement("div");U.style.cssText="overflow:hidden;position:relative",this._svgDom=x,this._svgRoot=j,this._backgroundRoot=g,this._viewport=U,c.appendChild(U),U.appendChild(x),this.resize(m.width,m.height),this._visibleList=[]};k.prototype={constructor:k,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var c=this.getViewportRoot();if(c)return{offsetLeft:c.offsetLeft||0,offsetTop:c.offsetTop||0}},refresh:function(){var c=this.storage.getDisplayList(!0);this._paintList(c)},setBackgroundColor:function(c){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var f=B("rect");f.setAttribute("width",this.getWidth()),f.setAttribute("height",this.getHeight()),f.setAttribute("x",0),f.setAttribute("y",0),f.setAttribute("id",0),f.style.fill=c,this._backgroundRoot.appendChild(f),this._backgroundNode=f},_paintList:function(c){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var f=this._svgRoot,m=this._visibleList,_=c.length,x=[],g;for(g=0;g<_;g++){var j=c[g],U=l(j),R=T(j)||D(j);j.invisible||(j.__dirty&&(U&&U.brush(j),this.clipPathManager.update(j),j.style&&(this.gradientManager.update(j.style.fill),this.gradientManager.update(j.style.stroke),this.shadowManager.update(R,j)),j.__dirty=!1),x.push(j))}var W=y(m,x),H;for(g=0;g<W.length;g++){var L=W[g];if(L.removed)for(var G=0;G<L.count;G++){var j=m[L.indices[G]],R=T(j),z=D(j);E(f,R),E(f,z)}}for(g=0;g<W.length;g++){var L=W[g];if(L.added)for(var G=0;G<L.count;G++){var j=x[L.indices[G]],R=T(j),z=D(j);H?s(f,R,H):d(f,R),R?s(f,z,R):H?s(f,z,H):d(f,z),s(f,z,R),H=z||R||H,this.gradientManager.addWithoutUpdate(R||z,j),this.shadowManager.addWithoutUpdate(R||z,j),this.clipPathManager.markUsed(j)}else if(!L.removed)for(var G=0;G<L.count;G++){var j=x[L.indices[G]],R=T(j),z=D(j),R=T(j),z=D(j);this.gradientManager.markUsed(j),this.gradientManager.addWithoutUpdate(R||z,j),this.shadowManager.markUsed(j),this.shadowManager.addWithoutUpdate(R||z,j),this.clipPathManager.markUsed(j),z&&s(f,z,R),H=R||z||H}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=x},_getDefs:function(c){var f=this._svgDom,m=f.getElementsByTagName("defs");if(m.length===0)if(c){var m=f.insertBefore(B("defs"),f.firstChild);return m.contains||(m.contains=function(x){var g=m.children;if(!g)return!1;for(var j=g.length-1;j>=0;--j)if(g[j]===x)return!0;return!1}),m}else return null;else return m[0]},resize:function(c,f){var m=this._viewport;m.style.display="none";var _=this._opts;if(c!=null&&(_.width=c),f!=null&&(_.height=f),c=this._getSize(0),f=this._getSize(1),m.style.display="",this._width!==c||this._height!==f){this._width=c,this._height=f;var x=m.style;x.width=c+"px",x.height=f+"px";var g=this._svgDom;g.setAttribute("width",c),g.setAttribute("height",f)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",c),this._backgroundNode.setAttribute("height",f))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(c){var f=this._opts,m=["width","height"][c],_=["clientWidth","clientHeight"][c],x=["paddingLeft","paddingTop"][c],g=["paddingRight","paddingBottom"][c];if(f[m]!=null&&f[m]!=="auto")return parseFloat(f[m]);var j=this.root,U=document.defaultView.getComputedStyle(j);return(j[_]||h(U[m])||h(j.style[m]))-(h(U[x])||0)-(h(U[g])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var c=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+c}};function w(c){return function(){F('In SVG mode painter not support method "'+c+'"')}}I.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(c){k.prototype[c]=w(c)});var v=k;ze.exports=v},"3e3G":function(ze,ee,M){var X=M("bYtY"),B=M("QuXc"),I=function(S,C,P,y,t){this.x=S==null?.5:S,this.y=C==null?.5:C,this.r=P==null?.5:P,this.type="radial",this.global=t||!1,B.call(this,y)};I.prototype={constructor:I},X.inherits(I,B);var F=I;ze.exports=F},"3gBT":function(ze,ee){var M=2311;function X(){return M++}ze.exports=X},"4fz+":function(ze,ee,M){var X=M("bYtY"),B=M("1bdT"),I=M("mFDi"),F=function(C){C=C||{},B.call(this,C);for(var P in C)C.hasOwnProperty(P)&&(this[P]=C[P]);this._children=[],this.__storage=null,this.__dirty=!0};F.prototype={constructor:F,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(C){return this._children[C]},childOfName:function(C){for(var P=this._children,y=0;y<P.length;y++)if(P[y].name===C)return P[y]},childCount:function(){return this._children.length},add:function(C){return C&&C!==this&&C.parent!==this&&(this._children.push(C),this._doAdd(C)),this},addBefore:function(C,P){if(C&&C!==this&&C.parent!==this&&P&&P.parent===this){var y=this._children,t=y.indexOf(P);t>=0&&(y.splice(t,0,C),this._doAdd(C))}return this},_doAdd:function(C){C.parent&&C.parent.remove(C),C.parent=this;var P=this.__storage,y=this.__zr;P&&P!==C.__storage&&(P.addToStorage(C),C instanceof F&&C.addChildrenToStorage(P)),y&&y.refresh()},remove:function(C){var P=this.__zr,y=this.__storage,t=this._children,b=X.indexOf(t,C);return b<0?this:(t.splice(b,1),C.parent=null,y&&(y.delFromStorage(C),C instanceof F&&C.delChildrenFromStorage(y)),P&&P.refresh(),this)},removeAll:function(){var C=this._children,P=this.__storage,y,t;for(t=0;t<C.length;t++)y=C[t],P&&(P.delFromStorage(y),y instanceof F&&y.delChildrenFromStorage(P)),y.parent=null;return C.length=0,this},eachChild:function(C,P){for(var y=this._children,t=0;t<y.length;t++){var b=y[t];C.call(P,b,t)}return this},traverse:function(C,P){for(var y=0;y<this._children.length;y++){var t=this._children[y];C.call(P,t),t.type==="group"&&t.traverse(C,P)}return this},addChildrenToStorage:function(C){for(var P=0;P<this._children.length;P++){var y=this._children[P];C.addToStorage(y),y instanceof F&&y.addChildrenToStorage(C)}},delChildrenFromStorage:function(C){for(var P=0;P<this._children.length;P++){var y=this._children[P];C.delFromStorage(y),y instanceof F&&y.delChildrenFromStorage(C)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(C){for(var P=null,y=new I(0,0,0,0),t=C||this._children,b=[],i=0;i<t.length;i++){var u=t[i];if(u.ignore||u.invisible)continue;var p=u.getBoundingRect(),a=u.getLocalTransform(b);a?(y.copy(p),y.applyTransform(a),P=P||y.clone(),P.union(y)):(P=P||p.clone(),P.union(p))}return P||y}},X.inherits(F,B);var S=F;ze.exports=S},"4mN7":function(ze,ee,M){var X=M("QBsz"),B=M("Sj9i"),I=Math.min,F=Math.max,S=Math.sin,C=Math.cos,P=Math.PI*2,y=X.create(),t=X.create(),b=X.create();function i(n,s,d){if(n.length===0)return;var E=n[0],D=E[0],T=E[0],k=E[1],w=E[1],v;for(v=1;v<n.length;v++)E=n[v],D=I(D,E[0]),T=F(T,E[0]),k=I(k,E[1]),w=F(w,E[1]);s[0]=D,s[1]=k,d[0]=T,d[1]=w}function u(n,s,d,E,D,T){D[0]=I(n,d),D[1]=I(s,E),T[0]=F(n,d),T[1]=F(s,E)}var p=[],a=[];function o(n,s,d,E,D,T,k,w,v,c){var f=B.cubicExtrema,m=B.cubicAt,_,x=f(n,d,D,k,p);for(v[0]=Infinity,v[1]=Infinity,c[0]=-Infinity,c[1]=-Infinity,_=0;_<x;_++){var g=m(n,d,D,k,p[_]);v[0]=I(g,v[0]),c[0]=F(g,c[0])}for(x=f(s,E,T,w,a),_=0;_<x;_++){var j=m(s,E,T,w,a[_]);v[1]=I(j,v[1]),c[1]=F(j,c[1])}v[0]=I(n,v[0]),c[0]=F(n,c[0]),v[0]=I(k,v[0]),c[0]=F(k,c[0]),v[1]=I(s,v[1]),c[1]=F(s,c[1]),v[1]=I(w,v[1]),c[1]=F(w,c[1])}function h(n,s,d,E,D,T,k,w){var v=B.quadraticExtremum,c=B.quadraticAt,f=F(I(v(n,d,D),1),0),m=F(I(v(s,E,T),1),0),_=c(n,d,D,f),x=c(s,E,T,m);k[0]=I(n,D,_),k[1]=I(s,T,x),w[0]=F(n,D,_),w[1]=F(s,T,x)}function l(n,s,d,E,D,T,k,w,v){var c=X.min,f=X.max,m=Math.abs(D-T);if(m%P<1e-4&&m>1e-4){w[0]=n-d,w[1]=s-E,v[0]=n+d,v[1]=s+E;return}if(y[0]=C(D)*d+n,y[1]=S(D)*E+s,t[0]=C(T)*d+n,t[1]=S(T)*E+s,c(w,y,t),f(v,y,t),D=D%P,D<0&&(D=D+P),T=T%P,T<0&&(T=T+P),D>T&&!k?T+=P:D<T&&k&&(D+=P),k){var _=T;T=D,D=_}for(var x=0;x<T;x+=Math.PI/2)x>D&&(b[0]=C(x)*d+n,b[1]=S(x)*E+s,c(w,b,w),f(v,b,v))}ee.fromPoints=i,ee.fromLine=u,ee.fromCubic=o,ee.fromQuadratic=h,ee.fromArc=l},"4wi7":function(ze,ee,M){"use strict";var X=M("14J3"),B=M("BMrR"),I=M("sRBo"),F=M("kaz8"),S=M("5NDa"),C=M("5rEg"),P=M("9og8"),y=M("tJVT"),t=M("WmNS"),b=M.n(t),i=M("q1tI"),u=M.n(i),p=M("oOBs"),a=M.n(p),o=M("xOL1"),h=M.n(o),l=M("BdwD"),n=function(d){var E=d.data,D=d.value,T=D===void 0?[]:D,k=d.handleChangePage,w=d.setSelectedRowKeys,v=d.selectedRowKeys,c=d.onChange,f=c===void 0?function(){}:c,m=Object(i.useState)([]),_=Object(y.a)(m,2),x=_[0],g=_[1],j=Object(i.useState)([]),U=Object(y.a)(j,2),R=U[0],W=U[1],H=Object(i.useState)([]),L=Object(y.a)(H,2),G=L[0],z=L[1],J=Object(i.useState)(1),te=Object(y.a)(J,2),_e=te[0],ce=te[1],xe=Object(i.useState)(),Te=Object(y.a)(xe,2),je=Te[0],Ce=Te[1];return Object(i.useEffect)(function(){g(E),W([]),z([])},[E]),Object(i.useEffect)(function(){w&&(W(v),z(v))},[v]),u.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},u.a.createElement("div",{className:a.a.leftdiv},u.a.createElement(C.a.Search,{size:"large",onChange:function(){var Z=Object(P.a)(b.a.mark(function K(V){return b.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:g(E.filter(function(Q){var ge;return Q==null||((ge=Q.name)===null||ge===void 0)?void 0:ge.includes(V.target.value)}));case 1:case"end":return q.stop()}},K)}));return function(K){return Z.apply(this,arguments)}}(),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),x.length===0&&u.a.createElement(l.a,{styles:{margin:"70px auto"},customText:"\u6682\u65E0\u5206\u73ED"}),u.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},u.a.createElement(F.a.Group,{value:R.map(function(Z){return"".concat(Z.id)}),onChange:function(K){w(x.filter(function(V){return K.includes("".concat(V.id))}))},style:{marginTop:"10px"}},x.map(function(Z,K){return u.a.createElement(B.a,{key:Z.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},u.a.createElement(F.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:Z.is_published,value:"".concat(Z.id)},u.a.createElement("div",{className:a.a.listClass},u.a.createElement("span",{className:a.a.spantitle,style:{width:Z.is_published?"108px":"170px"}},Z.name),Z.is_published&&u.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03"))))})))),u.a.createElement("div",{className:a.a.rightdiv},u.a.createElement(C.a.Search,{onChange:function(K){z(R.filter(function(V){return V.name.includes(K.target.value)}))},size:"large",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),G.length===0&&u.a.createElement(l.a,{styles:{margin:"70px auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),G.length>0&&u.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},u.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},G.map(function(Z,K){return u.a.createElement(B.a,{justify:"space-between",style:{marginTop:"10px"},key:Z.id},u.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},Z.name),u.a.createElement("img",{src:h.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){w(R.filter(function($){return"".concat($.id)!="".concat(Z.id)}))}}))})))))};ee.a=n},"55Ip":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return s});var X=M("Ty5D"),B=M("dI71"),I=M("q1tI"),F=M.n(I),S=M("YS25"),C=M("17x9"),P=M.n(C),y=M("wx14"),t=M("zLVn"),b=M("9R94"),i=function(c){Object(B.a)(f,c);function f(){for(var _,x=arguments.length,g=new Array(x),j=0;j<x;j++)g[j]=arguments[j];return _=c.call.apply(c,[this].concat(g))||this,_.history=Object(S.a)(_.props),_}var m=f.prototype;return m.render=function(){return F.a.createElement(X.c,{history:this.history,children:this.props.children})},f}(F.a.Component),u=function(c){Object(B.a)(f,c);function f(){for(var _,x=arguments.length,g=new Array(x),j=0;j<x;j++)g[j]=arguments[j];return _=c.call.apply(c,[this].concat(g))||this,_.history=Object(S.b)(_.props),_}var m=f.prototype;return m.render=function(){return F.a.createElement(X.c,{history:this.history,children:this.props.children})},f}(F.a.Component),p=function(f,m){return typeof f=="function"?f(m):f},a=function(f,m){return typeof f=="string"?Object(S.c)(f,null,null,m):f},o=function(f){return f},h=F.a.forwardRef;typeof h=="undefined"&&(h=o);function l(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}var n=h(function(c,f){var m=c.innerRef,_=c.navigate,x=c.onClick,g=Object(t.a)(c,["innerRef","navigate","onClick"]),j=g.target,U=Object(y.a)({},g,{onClick:function(W){try{x&&x(W)}catch(H){throw W.preventDefault(),H}!W.defaultPrevented&&W.button===0&&(!j||j==="_self")&&!l(W)&&(W.preventDefault(),_())}});return o!==h?U.ref=f||m:U.ref=m,F.a.createElement("a",U)}),s=h(function(c,f){var m=c.component,_=m===void 0?n:m,x=c.replace,g=c.to,j=c.innerRef,U=Object(t.a)(c,["component","replace","to","innerRef"]);return F.a.createElement(X.e.Consumer,null,function(R){R||Object(b.a)(!1);var W=R.history,H=a(p(g,R.location),R.location),L=H?W.createHref(H):"",G=Object(y.a)({},U,{href:L,navigate:function(){var J=p(g,R.location),te=x?W.replace:W.push;te(J)}});return o!==h?G.ref=f||j:G.innerRef=j,F.a.createElement(_,G)})});if(!1)var d,E;var D=function(f){return f},T=F.a.forwardRef;typeof T=="undefined"&&(T=D);function k(){for(var c=arguments.length,f=new Array(c),m=0;m<c;m++)f[m]=arguments[m];return f.filter(function(_){return _}).join(" ")}var w=T(function(c,f){var m=c["aria-current"],_=m===void 0?"page":m,x=c.activeClassName,g=x===void 0?"active":x,j=c.activeStyle,U=c.className,R=c.exact,W=c.isActive,H=c.location,L=c.sensitive,G=c.strict,z=c.style,J=c.to,te=c.innerRef,_e=Object(t.a)(c,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return F.a.createElement(X.e.Consumer,null,function(ce){ce||Object(b.a)(!1);var xe=H||ce.location,Te=a(p(J,xe),xe),je=Te.pathname,Ce=je&&je.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Z=Ce?Object(X.f)(xe.pathname,{path:Ce,exact:R,sensitive:L,strict:G}):null,K=!!(W?W(Z,xe):Z),V=K?k(U,g):U,$=K?Object(y.a)({},z,{},j):z,q=Object(y.a)({"aria-current":K&&_||null,className:V,style:$,to:Te},_e);return D!==T?q.ref=f||te:q.innerRef=te,F.a.createElement(s,q)})});if(!1)var v},"59Ip":function(ze,ee,M){var X=M("Sj9i");function B(I,F,S,C,P,y,t,b,i,u,p){if(i===0)return!1;var a=i;if(p>F+a&&p>C+a&&p>y+a&&p>b+a||p<F-a&&p<C-a&&p<y-a&&p<b-a||u>I+a&&u>S+a&&u>P+a&&u>t+a||u<I-a&&u<S-a&&u<P-a&&u<t-a)return!1;var o=X.cubicProjectPoint(I,F,S,C,P,y,t,b,u,p,null);return o<=a/2}ee.containStroke=B},"5VLF":function(ze,ee,M){"use strict";var X,B;function I(F,S,C){var P=function(y,t){return F.js_beautify(y,t)};return P.js=F.js_beautify,P.css=S.css_beautify,P.html=C.html_beautify,P.js_beautify=F.js_beautify,P.css_beautify=S.css_beautify,P.html_beautify=C.html_beautify,P}!(X=[M("6UM0"),M("TXwP"),M("psGv")],B=function(F,S,C){return I(F,S,C)}.apply(ee,X),B!==void 0&&(ze.exports=B))},"5Y4S":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return I});var X=M("MNsG");const B=X.b.performance&&typeof X.b.performance.now=="function";class I{constructor(F){this._highResolution=B&&F,this._startTime=this._now(),this._stopTime=-1}static create(F=!0){return new I(F)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?X.b.performance.now():Date.now()}}},"6+eU":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return T});var X=M("wx14"),B=M("rePB"),I=M("VTBJ"),F=M("1OyB"),S=M("vuIU"),C=M("Ji7U"),P=M("LK+K"),y=M("q1tI"),t=M.n(y),b=M("TSYQ"),i=M.n(b),u=function(w){var v,c="".concat(w.rootPrefixCls,"-item"),f=i()(c,"".concat(c,"-").concat(w.page),(v={},Object(B.a)(v,"".concat(c,"-active"),w.active),Object(B.a)(v,w.className,!!w.className),Object(B.a)(v,"".concat(c,"-disabled"),!w.page),v)),m=function(){w.onClick(w.page)},_=function(g){w.onKeyPress(g,w.onClick,w.page)};return t.a.createElement("li",{title:w.showTitle?w.page:null,className:f,onClick:m,onKeyPress:_,tabIndex:"0"},w.itemRender(w.page,"page",t.a.createElement("a",{rel:"nofollow"},w.page)))},p=u,a={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(k){Object(C.a)(v,k);var w=Object(P.a)(v);function v(){var c;Object(F.a)(this,v);for(var f=arguments.length,m=new Array(f),_=0;_<f;_++)m[_]=arguments[_];return c=w.call.apply(w,[this].concat(m)),c.state={goInputText:""},c.buildOptionText=function(x){return"".concat(x," ").concat(c.props.locale.items_per_page)},c.changeSize=function(x){c.props.changeSize(Number(x))},c.handleChange=function(x){c.setState({goInputText:x.target.value})},c.handleBlur=function(x){var g=c.props,j=g.goButton,U=g.quickGo,R=g.rootPrefixCls,W=c.state.goInputText;if(j||W==="")return;if(x.relatedTarget&&(x.relatedTarget.className.indexOf("".concat(R,"-prev"))>=0||x.relatedTarget.className.indexOf("".concat(R,"-next"))>=0))return;c.setState({goInputText:""}),U(c.getValidValue())},c.go=function(x){var g=c.state.goInputText;if(g==="")return;(x.keyCode===a.ENTER||x.type==="click")&&(c.setState({goInputText:""}),c.props.quickGo(c.getValidValue()))},c}return Object(S.a)(v,[{key:"getValidValue",value:function(){var f=this.state,m=f.goInputText,_=f.current;return!m||isNaN(m)?_:Number(m)}},{key:"getPageSizeOptions",value:function(){var f=this.props,m=f.pageSize,_=f.pageSizeOptions;return _.some(function(x){return x.toString()===m.toString()})?_:_.concat([m.toString()]).sort(function(x,g){var j=isNaN(Number(x))?0:Number(x),U=isNaN(Number(g))?0:Number(g);return j-U})}},{key:"render",value:function(){var f=this,m=this.props,_=m.pageSize,x=m.locale,g=m.rootPrefixCls,j=m.changeSize,U=m.quickGo,R=m.goButton,W=m.selectComponentClass,H=m.buildOptionText,L=m.selectPrefixCls,G=m.disabled,z=this.state.goInputText,J="".concat(g,"-options"),te=W,_e=null,ce=null,xe=null;if(!j&&!U)return null;var Te=this.getPageSizeOptions();if(j&&te){var je=Te.map(function(Ce,Z){return t.a.createElement(te.Option,{key:Z,value:Ce.toString()},(H||f.buildOptionText)(Ce))});_e=t.a.createElement(te,{disabled:G,prefixCls:L,showSearch:!1,className:"".concat(J,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(_||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Z){return Z.parentNode}},je)}return U&&(R&&(xe=typeof R=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(J,"-quick-jumper-button")},x.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},R)),ce=t.a.createElement("div",{className:"".concat(J,"-quick-jumper")},x.jump_to,t.a.createElement("input",{disabled:G,type:"text",value:z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),x.page,xe)),t.a.createElement("li",{className:"".concat(J)},_e,ce)}}]),v}(t.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=o,l=M("N2Kk");function n(){}function s(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function d(k,w,v){return v}function E(k,w,v){var c=typeof k=="undefined"?w.pageSize:k;return Math.floor((v.total-1)/c)+1}var D=function(k){Object(C.a)(v,k);var w=Object(P.a)(v);function v(c){var f;Object(F.a)(this,v),f=w.call(this,c),f.getJumpPrevPage=function(){return Math.max(1,f.state.current-(f.props.showLessItems?3:5))},f.getJumpNextPage=function(){return Math.min(E(void 0,f.state,f.props),f.state.current+(f.props.showLessItems?3:5))},f.getItemIcon=function(j,U){var R=f.props.prefixCls,W=j||t.a.createElement("button",{type:"button","aria-label":U,className:"".concat(R,"-item-link")});return typeof j=="function"&&(W=t.a.createElement(j,Object(I.a)({},f.props))),W},f.savePaginationNode=function(j){f.paginationNode=j},f.isValid=function(j){return s(j)&&j!==f.state.current},f.shouldDisplayQuickJumper=function(){var j=f.props,U=j.showQuickJumper,R=j.pageSize,W=j.total;return W<=R?!1:U},f.handleKeyDown=function(j){(j.keyCode===a.ARROW_UP||j.keyCode===a.ARROW_DOWN)&&j.preventDefault()},f.handleKeyUp=function(j){var U=f.getValidValue(j),R=f.state.currentInputValue;U!==R&&f.setState({currentInputValue:U}),j.keyCode===a.ENTER?f.handleChange(U):j.keyCode===a.ARROW_UP?f.handleChange(U-1):j.keyCode===a.ARROW_DOWN&&f.handleChange(U+1)},f.changePageSize=function(j){var U=f.state.current,R=E(j,f.state,f.props);U=U>R?R:U,R===0&&(U=f.state.current),typeof j=="number"&&("pageSize"in f.props||f.setState({pageSize:j}),"current"in f.props||f.setState({current:U,currentInputValue:U})),f.props.onShowSizeChange(U,j),"onChange"in f.props&&f.props.onChange&&f.props.onChange(U,j)},f.handleChange=function(j){var U=f.props.disabled,R=j;if(f.isValid(R)&&!U){var W=E(void 0,f.state,f.props);R>W?R=W:R<1&&(R=1),"current"in f.props||f.setState({current:R,currentInputValue:R});var H=f.state.pageSize;return f.props.onChange(R,H),R}return f.state.current},f.prev=function(){f.hasPrev()&&f.handleChange(f.state.current-1)},f.next=function(){f.hasNext()&&f.handleChange(f.state.current+1)},f.jumpPrev=function(){f.handleChange(f.getJumpPrevPage())},f.jumpNext=function(){f.handleChange(f.getJumpNextPage())},f.hasPrev=function(){return f.state.current>1},f.hasNext=function(){return f.state.current<E(void 0,f.state,f.props)},f.runIfEnter=function(j,U){if(j.key==="Enter"||j.charCode===13){for(var R=arguments.length,W=new Array(R>2?R-2:0),H=2;H<R;H++)W[H-2]=arguments[H];U.apply(void 0,W)}},f.runIfEnterPrev=function(j){f.runIfEnter(j,f.prev)},f.runIfEnterNext=function(j){f.runIfEnter(j,f.next)},f.runIfEnterJumpPrev=function(j){f.runIfEnter(j,f.jumpPrev)},f.runIfEnterJumpNext=function(j){f.runIfEnter(j,f.jumpNext)},f.handleGoTO=function(j){(j.keyCode===a.ENTER||j.type==="click")&&f.handleChange(f.state.currentInputValue)};var m=c.onChange!==n,_="current"in c;_&&!m&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var x=c.defaultCurrent;"current"in c&&(x=c.current);var g=c.defaultPageSize;return"pageSize"in c&&(g=c.pageSize),x=Math.min(x,E(g,void 0,c)),f.state={current:x,currentInputValue:x,pageSize:g},f}return Object(S.a)(v,[{key:"componentDidUpdate",value:function(f,m){var _=this.props.prefixCls;if(m.current!==this.state.current&&this.paginationNode){var x=this.paginationNode.querySelector(".".concat(_,"-item-").concat(m.current));x&&document.activeElement===x&&x.blur()}}},{key:"getValidValue",value:function(f){var m=f.target.value,_=E(void 0,this.state,this.props),x=this.state.currentInputValue,g;return m===""?g=m:isNaN(Number(m))?g=x:m>=_?g=_:g=Number(m),g}},{key:"getShowSizeChanger",value:function(){var f=this.props,m=f.showSizeChanger,_=f.total,x=f.totalBoundaryShowSizeChanger;return typeof m!="undefined"?m:_>x}},{key:"renderPrev",value:function(f){var m=this.props,_=m.prevIcon,x=m.itemRender,g=x(f,"prev",this.getItemIcon(_,"prev page")),j=!this.hasPrev();return Object(y.isValidElement)(g)?Object(y.cloneElement)(g,{disabled:j}):g}},{key:"renderNext",value:function(f){var m=this.props,_=m.nextIcon,x=m.itemRender,g=x(f,"next",this.getItemIcon(_,"next page")),j=!this.hasNext();return Object(y.isValidElement)(g)?Object(y.cloneElement)(g,{disabled:j}):g}},{key:"render",value:function(){var f=this,m=this.props,_=m.prefixCls,x=m.className,g=m.style,j=m.disabled,U=m.hideOnSinglePage,R=m.total,W=m.locale,H=m.showQuickJumper,L=m.showLessItems,G=m.showTitle,z=m.showTotal,J=m.simple,te=m.itemRender,_e=m.showPrevNextJumpers,ce=m.jumpPrevIcon,xe=m.jumpNextIcon,Te=m.selectComponentClass,je=m.selectPrefixCls,Ce=m.pageSizeOptions,Z=this.state,K=Z.current,V=Z.pageSize,$=Z.currentInputValue;if(U===!0&&R<=V)return null;var q=E(void 0,this.state,this.props),Q=[],ge=null,Oe=null,Ye=null,le=null,Ee=null,Re=H&&H.goButton,He=L?1:2,et=K-1>0?K-1:0,ut=K+1<q?K+1:q,Dt=Object.keys(this.props).reduce(function(ie,oe){return(oe.substr(0,5)==="data-"||oe.substr(0,5)==="aria-"||oe==="role")&&(ie[oe]=f.props[oe]),ie},{});if(J)return Re&&(typeof Re=="boolean"?Ee=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},W.jump_to_confirm):Ee=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Re),Ee=t.a.createElement("li",{title:G?"".concat(W.jump_to).concat(K,"/").concat(q):null,className:"".concat(_,"-simple-pager")},Ee)),t.a.createElement("ul",Object(X.a)({className:i()(_,"".concat(_,"-simple"),Object(B.a)({},"".concat(_,"-disabled"),j),x),style:g,ref:this.savePaginationNode},Dt),t.a.createElement("li",{title:G?W.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(et)),t.a.createElement("li",{title:G?"".concat(K,"/").concat(q):null,className:"".concat(_,"-simple-pager")},t.a.createElement("input",{type:"text",value:$,disabled:j,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(_,"-slash")},"/"),q),t.a.createElement("li",{title:G?W.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ut)),Ee);if(q<=3+He*2){var We={locale:W,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:te};q||Q.push(t.a.createElement(p,Object(X.a)({},We,{key:"noPager",page:q,className:"".concat(_,"-disabled")})));for(var Mt=1;Mt<=q;Mt+=1){var Wt=K===Mt;Q.push(t.a.createElement(p,Object(X.a)({},We,{key:Mt,page:Mt,active:Wt})))}}else{var Ne=L?W.prev_3:W.prev_5,Pe=L?W.next_3:W.next_5;_e&&(ge=t.a.createElement("li",{title:G?Ne:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(_,"-jump-prev"),Object(B.a)({},"".concat(_,"-jump-prev-custom-icon"),!!ce))},te(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ce,"prev page"))),Oe=t.a.createElement("li",{title:G?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(_,"-jump-next"),Object(B.a)({},"".concat(_,"-jump-next-custom-icon"),!!xe))},te(this.getJumpNextPage(),"jump-next",this.getItemIcon(xe,"next page")))),le=t.a.createElement(p,{locale:W,last:!0,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:q,page:q,active:!1,showTitle:G,itemRender:te}),Ye=t.a.createElement(p,{locale:W,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:te});var it=Math.max(1,K-He),gt=Math.min(K+He,q);K-1<=He&&(gt=1+He*2),q-K<=He&&(it=q-He*2);for(var fe=it;fe<=gt;fe+=1){var ae=K===fe;Q.push(t.a.createElement(p,{locale:W,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:fe,page:fe,active:ae,showTitle:G,itemRender:te}))}K-1>=He*2&&K!==1+2&&(Q[0]=Object(y.cloneElement)(Q[0],{className:"".concat(_,"-item-after-jump-prev")}),Q.unshift(ge)),q-K>=He*2&&K!==q-2&&(Q[Q.length-1]=Object(y.cloneElement)(Q[Q.length-1],{className:"".concat(_,"-item-before-jump-next")}),Q.push(Oe)),it!==1&&Q.unshift(Ye),gt!==q&&Q.push(le)}var se=null;z&&(se=t.a.createElement("li",{className:"".concat(_,"-total-text")},z(R,[R===0?0:(K-1)*V+1,K*V>R?R:K*V])));var de=!this.hasPrev()||!q,ve=!this.hasNext()||!q;return t.a.createElement("ul",Object(X.a)({className:i()(_,x,Object(B.a)({},"".concat(_,"-disabled"),j)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},Dt),se,t.a.createElement("li",{title:G?W.prev_page:null,onClick:this.prev,tabIndex:de?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),de)),"aria-disabled":de},this.renderPrev(et)),Q,t.a.createElement("li",{title:G?W.next_page:null,onClick:this.next,tabIndex:ve?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),ve)),"aria-disabled":ve},this.renderNext(ut)),t.a.createElement(h,{disabled:j,locale:W,rootPrefixCls:_,selectComponentClass:Te,selectPrefixCls:je,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:K,pageSize:V,pageSizeOptions:Ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Re}))}}],[{key:"getDerivedStateFromProps",value:function(f,m){var _={};if("current"in f&&(_.current=f.current,f.current!==m.current&&(_.currentInputValue=_.current)),"pageSize"in f&&f.pageSize!==m.pageSize){var x=m.current,g=E(f.pageSize,m,f);x=x>g?g:x,"current"in f||(_.current=x,_.currentInputValue=x),_.pageSize=f.pageSize}return _}}]),v}(t.a.Component);D.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:l.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var T=D},"6GrX":function(ze,ee,M){var X=M("mFDi"),B=M("Xnb7"),I=M("bYtY"),F=I.getContext,S=I.extend,C=I.retrieve2,P=I.retrieve3,y=I.trim,t={},b=0,i=5e3,u=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p="12px sans-serif",a={};function o(U,R){a[U]=R}function h(U,R){R=R||p;var W=U+":"+R;if(t[W])return t[W];for(var H=(U+"").split(`
`),L=0,G=0,z=H.length;G<z;G++)L=Math.max(m(H[G],R).width,L);return b>i&&(b=0,t={}),b++,t[W]=L,L}function l(U,R,W,H,L,G,z,J){return z?s(U,R,W,H,L,G,z,J):n(U,R,W,H,L,G,J)}function n(U,R,W,H,L,G,z){var J=_(U,R,L,G,z),te=h(U,R);L&&(te+=L[1]+L[3]);var _e=J.outerHeight,ce=d(0,te,W),xe=E(0,_e,H),Te=new X(ce,xe,te,_e);return Te.lineHeight=J.lineHeight,Te}function s(U,R,W,H,L,G,z,J){var te=x(U,{rich:z,truncate:J,font:R,textAlign:W,textPadding:L,textLineHeight:G}),_e=te.outerWidth,ce=te.outerHeight,xe=d(0,_e,W),Te=E(0,ce,H);return new X(xe,Te,_e,ce)}function d(U,R,W){return W==="right"?U-=R:W==="center"&&(U-=R/2),U}function E(U,R,W){return W==="middle"?U-=R/2:W==="bottom"&&(U-=R),U}function D(U,R,W){var H=R.textPosition,L=R.textDistance,G=W.x,z=W.y;L=L||0;var J=W.height,te=W.width,_e=J/2,ce="left",xe="top";switch(H){case"left":G-=L,z+=_e,ce="right",xe="middle";break;case"right":G+=L+te,z+=_e,xe="middle";break;case"top":G+=te/2,z-=L,ce="center",xe="bottom";break;case"bottom":G+=te/2,z+=J+L,ce="center";break;case"inside":G+=te/2,z+=_e,ce="center",xe="middle";break;case"insideLeft":G+=L,z+=_e,xe="middle";break;case"insideRight":G+=te-L,z+=_e,ce="right",xe="middle";break;case"insideTop":G+=te/2,z+=L,ce="center";break;case"insideBottom":G+=te/2,z+=J-L,ce="center",xe="bottom";break;case"insideTopLeft":G+=L,z+=L;break;case"insideTopRight":G+=te-L,z+=L,ce="right";break;case"insideBottomLeft":G+=L,z+=J-L,xe="bottom";break;case"insideBottomRight":G+=te-L,z+=J-L,ce="right",xe="bottom";break}return U=U||{},U.x=G,U.y=z,U.textAlign=ce,U.textVerticalAlign=xe,U}function T(U,R,W){var H={textPosition:U,textDistance:W};return D({},H,R)}function k(U,R,W,H,L){if(!R)return"";var G=(U+"").split(`
`);L=w(R,W,H,L);for(var z=0,J=G.length;z<J;z++)G[z]=v(G[z],L);return G.join(`
`)}function w(U,R,W,H){H=S({},H),H.font=R;var W=C(W,"...");H.maxIterations=C(H.maxIterations,2);var L=H.minChar=C(H.minChar,0);H.cnCharWidth=h("\u56FD",R);var G=H.ascCharWidth=h("a",R);H.placeholder=C(H.placeholder,"");for(var z=U=Math.max(0,U-1),J=0;J<L&&z>=G;J++)z-=G;var te=h(W,R);return te>z&&(W="",te=0),z=U-te,H.ellipsis=W,H.ellipsisWidth=te,H.contentWidth=z,H.containerWidth=U,H}function v(U,R){var W=R.containerWidth,H=R.font,L=R.contentWidth;if(!W)return"";var G=h(U,H);if(G<=W)return U;for(var z=0;;z++){if(G<=L||z>=R.maxIterations){U+=R.ellipsis;break}var J=z===0?c(U,L,R.ascCharWidth,R.cnCharWidth):G>0?Math.floor(U.length*L/G):0;U=U.substr(0,J),G=h(U,H)}return U===""&&(U=R.placeholder),U}function c(U,R,W,H){for(var L=0,G=0,z=U.length;G<z&&L<R;G++){var J=U.charCodeAt(G);L+=0<=J&&J<=127?W:H}return G}function f(U){return h("\u56FD",U)}function m(U,R){return a.measureText(U,R)}a.measureText=function(U,R){var W=F();return W.font=R||p,W.measureText(U)};function _(U,R,W,H,L){U!=null&&(U+="");var G=C(H,f(R)),z=U?U.split(`
`):[],J=z.length*G,te=J,_e=!0;if(W&&(te+=W[0]+W[2]),U&&L){_e=!1;var ce=L.outerHeight,xe=L.outerWidth;if(ce!=null&&te>ce)U="",z=[];else if(xe!=null)for(var Te=w(xe-(W?W[1]+W[3]:0),R,L.ellipsis,{minChar:L.minChar,placeholder:L.placeholder}),je=0,Ce=z.length;je<Ce;je++)z[je]=v(z[je],Te)}return{lines:z,height:J,outerHeight:te,lineHeight:G,canCacheByTextString:_e}}function x(U,R){var W={lines:[],width:0,height:0};if(U!=null&&(U+=""),!U)return W;for(var H=u.lastIndex=0,L;(L=u.exec(U))!=null;){var G=L.index;G>H&&g(W,U.substring(H,G)),g(W,L[2],L[1]),H=u.lastIndex}H<U.length&&g(W,U.substring(H,U.length));var z=W.lines,J=0,te=0,_e=[],ce=R.textPadding,xe=R.truncate,Te=xe&&xe.outerWidth,je=xe&&xe.outerHeight;ce&&(Te!=null&&(Te-=ce[1]+ce[3]),je!=null&&(je-=ce[0]+ce[2]));for(var Ce=0;Ce<z.length;Ce++){for(var Z=z[Ce],K=0,V=0,$=0;$<Z.tokens.length;$++){var q=Z.tokens[$],Q=q.styleName&&R.rich[q.styleName]||{},ge=q.textPadding=Q.textPadding,Oe=q.font=Q.font||R.font,Ye=q.textHeight=C(Q.textHeight,f(Oe));if(ge&&(Ye+=ge[0]+ge[2]),q.height=Ye,q.lineHeight=P(Q.textLineHeight,R.textLineHeight,Ye),q.textAlign=Q&&Q.textAlign||R.textAlign,q.textVerticalAlign=Q&&Q.textVerticalAlign||"middle",je!=null&&J+q.lineHeight>je)return{lines:[],width:0,height:0};q.textWidth=h(q.text,Oe);var le=Q.textWidth,Ee=le==null||le==="auto";if(typeof le=="string"&&le.charAt(le.length-1)==="%")q.percentWidth=le,_e.push(q),le=0;else{if(Ee){le=q.textWidth;var Re=Q.textBackgroundColor,He=Re&&Re.image;He&&(He=B.findExistImage(He),B.isImageReady(He)&&(le=Math.max(le,He.width*Ye/He.height)))}var et=ge?ge[1]+ge[3]:0;le+=et;var ut=Te!=null?Te-V:null;ut!=null&&ut<le&&(!Ee||ut<et?(q.text="",q.textWidth=le=0):(q.text=k(q.text,ut-et,Oe,xe.ellipsis,{minChar:xe.minChar}),q.textWidth=h(q.text,Oe),le=q.textWidth+et))}V+=q.width=le,Q&&(K=Math.max(K,q.lineHeight))}Z.width=V,Z.lineHeight=K,J+=K,te=Math.max(te,V)}W.outerWidth=W.width=C(R.textWidth,te),W.outerHeight=W.height=C(R.textHeight,J),ce&&(W.outerWidth+=ce[1]+ce[3],W.outerHeight+=ce[0]+ce[2]);for(var Ce=0;Ce<_e.length;Ce++){var q=_e[Ce],Dt=q.percentWidth;q.width=parseInt(Dt,10)/100*te}return W}function g(U,R,W){for(var H=R==="",L=R.split(`
`),G=U.lines,z=0;z<L.length;z++){var J=L[z],te={styleName:W,text:J,isLineHolder:!J&&!H};if(z)G.push({tokens:[te]});else{var _e=(G[G.length-1]||(G[0]={tokens:[]})).tokens,ce=_e.length;ce===1&&_e[0].isLineHolder?_e[0]=te:(J||!ce||H)&&_e.push(te)}}}function j(U){var R=(U.fontSize||U.fontFamily)&&[U.fontStyle,U.fontWeight,(U.fontSize||12)+"px",U.fontFamily||"sans-serif"].join(" ");return R&&y(R)||U.textFont||U.font}ee.DEFAULT_FONT=p,ee.$override=o,ee.getWidth=h,ee.getBoundingRect=l,ee.adjustTextX=d,ee.adjustTextY=E,ee.calculateTextPosition=D,ee.adjustTextPositionOnRect=T,ee.truncateText=k,ee.getLineHeight=f,ee.measureText=m,ee.parsePlainText=_,ee.parseRichText=x,ee.makeFont=j},"6RRn":function(ze,ee,M){"use strict";var X=M("wCXF"),B=M("n6Qo");M.d(ee,"b",function(){return B.a});var I=M("IBYe"),F=M("6eGT"),S=M("hW8S");M.d(ee,"a",function(){return S.a}),ee.c=X.b},"6UM0":function(ze,ee,M){var X,B;(function(){var I;(function(){"use strict";var S=[function(t,b,i){var u=i(1).Beautifier,p=i(5).Options;function a(o,h){var l=new u(o,h);return l.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new p}},function(t,b,i){var u=i(2).Output,p=i(3).Token,a=i(4),o=i(5).Options,h=i(7).Tokenizer,l=i(7).line_starters,n=i(7).positionable_operators,s=i(7).TOKEN;function d(L,G){return G.indexOf(L)!==-1}function E(L){return L.replace(/^\s+/g,"")}function D(L){for(var G={},z=0;z<L.length;z++)G[L[z].replace(/-/g,"_")]=L[z];return G}function T(L,G){return L&&L.type===s.RESERVED&&L.text===G}function k(L,G){return L&&L.type===s.RESERVED&&d(L.text,G)}var w=["case","return","do","if","throw","else","await","break","continue","async"],v=["before-newline","after-newline","preserve-newline"],c=D(v),f=[c.before_newline,c.preserve_newline],m={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _(L,G){if(G.multiline_frame||G.mode===m.ForInitializer||G.mode===m.Conditional)return;L.remove_indent(G.start_line_index)}function x(L){L=L.replace(a.allLineBreaks,`
`);for(var G=[],z=L.indexOf(`
`);z!==-1;)G.push(L.substring(0,z)),L=L.substring(z+1),z=L.indexOf(`
`);return L.length&&G.push(L),G}function g(L){return L===m.ArrayLiteral}function j(L){return d(L,[m.Expression,m.ForInitializer,m.Conditional])}function U(L,G){for(var z=0;z<L.length;z++){var J=L[z].trim();if(J.charAt(0)!==G)return!1}return!0}function R(L,G){for(var z=0,J=L.length,te;z<J;z++)if(te=L[z],te&&te.indexOf(G)!==0)return!1;return!0}function W(L,G){G=G||{},this._source_text=L||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(G)}W.prototype.create_flags=function(L,G){var z=0;L&&(z=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>z&&(z=L.line_indent_level));var J={mode:G,parent:L,last_token:L?L.last_token:new p(s.START_BLOCK,""),last_word:L?L.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:z,alignment:0,line_indent_level:L?L.line_indent_level:z,start_line_index:this._output.get_line_number(),ternary_depth:0};return J},W.prototype._reset=function(L){var G=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new u(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m.BlockStatement);var z=new h(L,this._options);return this._tokens=z.tokenize(),L},W.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,G=this._reset(this._source_text),z=this._options.eol;this._options.eol==="auto"&&(z=`
`,G&&a.lineBreak.test(G||"")&&(z=G.match(a.lineBreak)[0]));for(var J=this._tokens.next();J;)this.handle_token(J),this._last_last_text=this._flags.last_token.text,this._flags.last_token=J,J=this._tokens.next();return L=this._output.get_code(z),L},W.prototype.handle_token=function(L,G){L.type===s.START_EXPR?this.handle_start_expr(L):L.type===s.END_EXPR?this.handle_end_expr(L):L.type===s.START_BLOCK?this.handle_start_block(L):L.type===s.END_BLOCK?this.handle_end_block(L):L.type===s.WORD?this.handle_word(L):L.type===s.RESERVED?this.handle_word(L):L.type===s.SEMICOLON?this.handle_semicolon(L):L.type===s.STRING?this.handle_string(L):L.type===s.EQUALS?this.handle_equals(L):L.type===s.OPERATOR?this.handle_operator(L):L.type===s.COMMA?this.handle_comma(L):L.type===s.BLOCK_COMMENT?this.handle_block_comment(L,G):L.type===s.COMMENT?this.handle_comment(L,G):L.type===s.DOT?this.handle_dot(L):L.type===s.EOF?this.handle_eof(L):L.type===s.UNKNOWN?this.handle_unknown(L,G):this.handle_unknown(L,G)},W.prototype.handle_whitespace_and_comments=function(L,G){var z=L.newlines,J=this._options.keep_array_indentation&&g(this._flags.mode);if(L.comments_before)for(var te=L.comments_before.next();te;)this.handle_whitespace_and_comments(te,G),this.handle_token(te,G),te=L.comments_before.next();if(J)for(var _e=0;_e<z;_e+=1)this.print_newline(_e>0,G);else if(this._options.max_preserve_newlines&&z>this._options.max_preserve_newlines&&(z=this._options.max_preserve_newlines),this._options.preserve_newlines&&z>1){this.print_newline(!1,G);for(var ce=1;ce<z;ce+=1)this.print_newline(!0,G)}};var H=["async","break","continue","return","throw","yield"];W.prototype.allow_wrap_or_preserved_newline=function(L,G){if(G=G===void 0?!1:G,this._output.just_added_newline())return;var z=this._options.preserve_newlines&&L.newlines||G,J=d(this._flags.last_token.text,n)||d(L.text,n);if(J){var te=d(this._flags.last_token.text,n)&&d(this._options.operator_position,f)||d(L.text,n);z=z&&te}if(z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(k(this._flags.last_token,H))return;this._output.set_wrap_point()}},W.prototype.print_newline=function(L,G){if(!G&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var z=this._tokens.peek();this._flags.mode===m.Statement&&!(this._flags.if_block&&T(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},W.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},W.prototype.print_token=function(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},W.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.prototype.deindent=function(){this._flags.indentation_level>0&&(!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))},W.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m.Statement&&_(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},W.prototype.start_of_object_property=function(){return this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||k(this._flags.last_token,["get","set"]))},W.prototype.start_of_statement=function(L){var G=!1;return G=G||k(this._flags.last_token,["var","let","const"])&&L.type===s.WORD,G=G||T(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement)&&k(this._flags.last_token,H)&&!L.newlines,G=G||T(this._flags.last_token,"else")&&!(T(L,"if")&&!L.comments_before),G=G||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===m.ForInitializer||this._previous_flags.mode===m.Conditional),G=G||this._flags.last_token.type===s.WORD&&this._flags.mode===m.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==s.WORD&&L.type!==s.RESERVED,G=G||this._flags.mode===m.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||k(this._flags.last_token,["get","set"])),G?(this.set_mode(m.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,k(L,["do","for","if","while"])),!0):!1},W.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var G=m.Expression;if(L.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){k(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=m.ArrayLiteral,g(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())),d(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,G=m.ForInitializer):d(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=m.Conditional):d(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(d(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(L);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var z=this._tokens.peek(-3);if(this._options.space_after_named_function&&z){var J=this._tokens.peek(-4);k(z,["async","function"])||z.text==="*"&&k(J,["async","function"])?this._output.space_before_token=!0:this._flags.mode===m.ObjectLiteral?(z.text==="{"||z.text===","||z.text==="*"&&(J.text==="{"||J.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(L);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&d(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(L,L.newlines),this.print_token(L),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},W.prototype.handle_end_expr=function(L){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&g(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(L),this.restore_mode(),_(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===m.Conditional&&(this._previous_flags.mode=m.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},W.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var G=this._tokens.peek(),z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(m.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m.BlockStatement):z&&(d(z.text,[":",","])&&d(G.type,[s.STRING,s.WORD,s.RESERVED])||d(G.text,["get","set","..."])&&d(z.type,[s.WORD,s.RESERVED]))?d(this._last_last_text,["class","interface"])&&!d(z.text,[":",","])?this.set_mode(m.BlockStatement):this.set_mode(m.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(m.BlockStatement):d(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||k(this._flags.last_token,["return","throw","import","default"])?this.set_mode(m.ObjectLiteral):this.set_mode(m.BlockStatement),this._flags.last_token&&(k(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var J=!G.comments_before&&G.text==="}",te=J&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,ce=null;this._flags.inline_frame=!0;do if(_e+=1,ce=this._tokens.peek(_e-1),ce.newlines){this._flags.inline_frame=!1;break}while(ce.type!==s.EOF&&!(ce.type===s.END_BLOCK&&ce.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(te||this._flags.last_token.type===s.EQUALS||k(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(g(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(L),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(L),this.indent(),!J&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},W.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===m.Statement;)this.restore_mode();var G=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(g(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(L)},W.prototype.handle_word=function(L){if(L.type===s.RESERVED){if(d(L.text,["set","get"])&&this._flags.mode!==m.ObjectLiteral)L.type=s.WORD;else if(L.text==="import"&&d(this._tokens.peek().text,["(","."]))L.type=s.WORD;else if(d(L.text,["as","from"])&&!this._flags.import_block)L.type=s.WORD;else if(this._flags.mode===m.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(L.type=s.WORD)}}if(this.start_of_statement(L)?k(this._flags.last_token,["var","let","const"])&&L.type===s.WORD&&(this._flags.declaration_statement=!0):L.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||!k(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(T(L,"while")){this._output.space_before_token=!0,this.print_token(L),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&&T(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&k(L,["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(L),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(L)),T(L,"function")){(d(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(d(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?k(this._flags.last_token,["get","set","new","export"])||k(this._flags.last_token,H)?this._output.space_before_token=!0:T(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)||g(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var z="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?z="SPACE":k(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?z="NEWLINE":(z="SPACE",this._output.space_before_token=!0):z="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===m.BlockStatement?z="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&j(this._flags.mode)?z="SPACE":this._flags.last_token.type===s.STRING?z="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&d(this._last_last_text,["{",","]))?z="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?z="SPACE":z="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,z="NEWLINE"),k(L,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?z="SPACE":z="NEWLINE"),k(L,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===m.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var J=this._output.current_line;J.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else z==="NEWLINE"?k(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&k(L,["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||!k(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(L,"if")&&T(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):k(L,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&g(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():z==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===s.WORD||L.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===s.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(L,"from")&&(this._flags.import_block=!1))},W.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var G=this._tokens.peek();this._flags.mode===m.Statement&&!(this._flags.if_block&&T(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},W.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),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(L):L.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},W.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},W.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),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(L)):this._flags.mode===m.ObjectLiteral||this._flags.mode===m.Statement&&this._flags.parent.mode===m.ObjectLiteral?(this._flags.mode===m.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},W.prototype.handle_operator=function(L){var G=L.text==="*"&&(k(this._flags.last_token,["function","yield"])||d(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),z=d(L.text,["-","+"])&&(d(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||d(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var J=!G;this.handle_whitespace_and_comments(L,J)}if(L.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===s.OPERATOR&&d(this._options.operator_position,f)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),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 te=!0,_e=!0,ce=!1;if(L.text===":"?this._flags.ternary_depth===0?te=!1:(this._flags.ternary_depth-=1,ce=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!z&&!G&&this._options.preserve_newlines&&d(L.text,n)){var xe=L.text===":",Te=xe&&ce,je=xe&&!ce;switch(this._options.operator_position){case c.before_newline:this._output.space_before_token=!je,this.print_token(L),(!xe||Te)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case c.after_newline:this._output.space_before_token=!0,!xe||Te?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case c.preserve_newline:je||this.allow_wrap_or_preserved_newline(L),te=!(this._output.just_added_newline()||je),this._output.space_before_token=te,this.print_token(L),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(L),te=!1;var Ce=this._tokens.peek();_e=Ce&&d(Ce.type,[s.WORD,s.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),te=this._flags.last_token.type===s.START_BLOCK,_e=!1;else if(d(L.text,["--","++","!","~"])||z){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),te=!1,_e=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var Z=k(this._flags.last_token,w)&&L.newlines;Z&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Z,!0)}this._flags.last_token.text===";"&&j(this._flags.mode)&&(te=!0),this._flags.last_token.type===s.RESERVED?te=!0:this._flags.last_token.type===s.END_EXPR?te=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===s.OPERATOR&&(te=d(L.text,["--","-","++","+"])&&d(this._flags.last_token.text,["--","-","++","+"]),d(L.text,["+","-"])&&d(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===m.BlockStatement&&!this._flags.inline_frame||this._flags.mode===m.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||te,this.print_token(L),this._output.space_before_token=_e},W.prototype.handle_block_comment=function(L,G){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,G),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,G)},W.prototype.print_block_commment=function(L,G){var z=x(L.text),J,te=!1,_e=!1,ce=L.whitespace_before,xe=ce.length;if(this.print_newline(!1,G),this.print_token_line_indentation(L),this._output.add_token(z[0]),this.print_newline(!1,G),z.length>1){for(z=z.slice(1),te=U(z,"*"),_e=R(z,ce),te&&(this._flags.alignment=1),J=0;J<z.length;J++)te?(this.print_token_line_indentation(L),this._output.add_token(E(z[J]))):_e&&z[J]?(this.print_token_line_indentation(L),this._output.add_token(z[J].substring(xe))):(this._output.current_line.set_indent(-1),this._output.add_token(z[J])),this.print_newline(!1,G);this._flags.alignment=0}},W.prototype.handle_comment=function(L,G){L.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,G)},W.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),k(this._flags.last_token,w)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(L)},W.prototype.handle_unknown=function(L,G){this.print_token(L),L.text[L.text.length-1]===`
`&&this.print_newline(!1,G)},W.prototype.handle_eof=function(L){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},t.exports.Beautifier=W},function(t){function b(p){this.__parent=p,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=[]}b.prototype.clone_empty=function(){var p=new b(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},b.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},b.prototype.has_match=function(p){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(p))return!0;return!1},b.prototype.set_indent=function(p,a){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(p){this.__items.push(p);var a=p.lastIndexOf(`
`);a!==-1?this.__character_count=p.length-a:this.__character_count+=p.length},b.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function i(p,a){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),a=a||"",p.indent_level>0&&(a=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}i.prototype.get_indent_size=function(p,a){var o=this.__base_string_length;return a=a||0,p<0&&(o=0),o+=p*this.__indent_size,o+=a,o},i.prototype.get_indent_string=function(p,a){var o=this.__base_string;return a=a||0,p<0&&(p=0,o=""),a+=p*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},i.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var p=this.__cache.length,a=0,o="";this.__indent_size&&p>=this.__indent_size&&(a=Math.floor(p/this.__indent_size),p-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),p&&(o+=new Array(p+1).join(" ")),this.__cache.push(o)};function u(p,a){this.__indent_cache=new i(p,a),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(p,a){return this.__indent_cache.get_indent_string(p,a)},u.prototype.get_indent_size=function(p,a){return this.__indent_cache.get_indent_size(p,a)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(p){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return p!==`
`&&(o=o.replace(/[\n]/g,p)),o},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(p,a){return p=p||0,a=a||0,this.next_line.set_indent(p,a),this.__lines.length>1?(this.current_line.set_indent(p,a),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(p){for(var a=0;a<p.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(p){for(var a=this.__lines.length;p<a;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&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},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(p,a){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(p)!==0&&h.item(-1)!==a){this.__lines.splice(o+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=u},function(t){function b(i,u,p,a){this.type=i,this.text=u,this.comments_before=null,this.newlines=p||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=b},function(t,b){var i="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\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",a="\\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",o="(?:\\\\u[0-9a-fA-F]{4}|["+i+p+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+u+p+a+"])*";b.identifier=new RegExp(o+h,"g"),b.identifierStart=new RegExp(o),b.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+u+p+a+"])+");var l=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;b.newline=/[\n\r\u2028\u2029]/,b.lineBreak=new RegExp(`\r
|`+b.newline.source),b.allLineBreaks=new RegExp(b.lineBreak.source,"g")},function(t,b,i){var u=i(6).Options,p=["before-newline","after-newline","preserve-newline"];function a(o){u.call(this,o,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="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 n=0;n<l.length;n++)l[n]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=l[n];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",p),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new u,t.exports.Options=a},function(t){function b(p,a){this.raw_options=i(p,a),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"])}b.prototype._get_array=function(p,a){var o=this.raw_options[p],h=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},b.prototype._get_boolean=function(p,a){var o=this.raw_options[p],h=o===void 0?!!a:!!o;return h},b.prototype._get_characters=function(p,a){var o=this.raw_options[p],h=a||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},b.prototype._get_number=function(p,a){var o=this.raw_options[p];a=parseInt(a,10),isNaN(a)&&(a=0);var h=parseInt(o,10);return isNaN(h)&&(h=a),h},b.prototype._get_selection=function(p,a,o){var h=this._get_selection_list(p,a,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[p]+"'");return h[0]},b.prototype._get_selection_list=function(p,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var h=this._get_array(p,o);if(!this._is_valid_selection(h,a))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[p]+"'");return h},b.prototype._is_valid_selection=function(p,a){return p.length&&a.length&&!p.some(function(o){return a.indexOf(o)===-1})};function i(p,a){var o={};p=u(p);var h;for(h in p)h!==a&&(o[h]=p[h]);if(a&&p[a])for(h in p[a])o[h]=p[a][h];return o}function u(p){var a={},o;for(o in p){var h=o.replace(/-/g,"_");a[h]=p[o]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=i},function(t,b,i){var u=i(8).InputScanner,p=i(9).Tokenizer,a=i(9).TOKEN,o=i(13).Directives,h=i(4),l=i(12).Pattern,n=i(14).TemplatablePattern;function s(U,R){return R.indexOf(U)!==-1}var d={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},E=new o(/\/\*/,/\*\//),D=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,T=/[0-9]/,k=/[^\d\.]/,w=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var c=new RegExp(v),f="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),m=f.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_=new RegExp("^(?:"+m.join("|")+")$"),x,g=function(U,R){p.call(this,U,R),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var W=new l(this._input),H=new n(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(h.identifier).matching(h.identifierMatch),number:W.matching(D),punct:W.matching(c),comment:W.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:W.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:W.matching(/<!--/),html_comment_end:W.matching(/-->/),include:W.starting_with(/#include/).until_after(h.lineBreak),shebang:W.starting_with(/#!/).until_after(h.lineBreak),xml:W.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:H.until(/['\\\n\r\u2028\u2029]/),double_quote:H.until(/["\\\n\r\u2028\u2029]/),template_text:H.until(/[`\\$]/),template_expression:H.until(/[`}\\]/)}};g.prototype=new p,g.prototype._is_comment=function(U){return U.type===d.COMMENT||U.type===d.BLOCK_COMMENT||U.type===d.UNKNOWN},g.prototype._is_opening=function(U){return U.type===d.START_BLOCK||U.type===d.START_EXPR},g.prototype._is_closing=function(U,R){return(U.type===d.END_BLOCK||U.type===d.END_EXPR)&&R&&(U.text==="]"&&R.text==="["||U.text===")"&&R.text==="("||U.text==="}"&&R.text==="{")},g.prototype._reset=function(){x=!1},g.prototype._get_next_token=function(U,R){var W=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(d.EOF,""):(W=W||this._read_non_javascript(H),W=W||this._read_string(H),W=W||this._read_word(U),W=W||this._read_singles(H),W=W||this._read_comment(H),W=W||this._read_regexp(H,U),W=W||this._read_xml(H,U),W=W||this._read_punctuation(),W=W||this._create_token(d.UNKNOWN,this._input.next()),W)},g.prototype._read_word=function(U){var R;if(R=this.__patterns.identifier.read(),R!=="")return R=R.replace(h.allLineBreaks,`
`),!(U.type===d.DOT||U.type===d.RESERVED&&(U.text==="set"||U.text==="get"))&&_.test(R)?(R==="in"||R==="of")&&(U.type===d.WORD||U.type===d.STRING)?this._create_token(d.OPERATOR,R):this._create_token(d.RESERVED,R):this._create_token(d.WORD,R);if(R=this.__patterns.number.read(),R!=="")return this._create_token(d.WORD,R)},g.prototype._read_singles=function(U){var R=null;return U==="("||U==="["?R=this._create_token(d.START_EXPR,U):U===")"||U==="]"?R=this._create_token(d.END_EXPR,U):U==="{"?R=this._create_token(d.START_BLOCK,U):U==="}"?R=this._create_token(d.END_BLOCK,U):U===";"?R=this._create_token(d.SEMICOLON,U):U==="."&&k.test(this._input.peek(1))?R=this._create_token(d.DOT,U):U===","&&(R=this._create_token(d.COMMA,U)),R&&this._input.next(),R},g.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(d.EQUALS,U):U==="?."?this._create_token(d.DOT,U):this._create_token(d.OPERATOR,U)},g.prototype._read_non_javascript=function(U){var R="";if(U==="#"){if(this._is_first_token()&&(R=this.__patterns.shebang.read(),R))return this._create_token(d.UNKNOWN,R.trim()+`
`);if(R=this.__patterns.include.read(),R)return this._create_token(d.UNKNOWN,R.trim()+`
`);U=this._input.next();var W="#";if(this._input.hasNext()&&this._input.testChar(T)){do U=this._input.next(),W+=U;while(this._input.hasNext()&&U!=="#"&&U!=="=");return U==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(W+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(W+="{}",this._input.next(),this._input.next())),this._create_token(d.WORD,W)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(R=this.__patterns.html_comment_start.read(),R){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)R+=this._input.next();return x=!0,this._create_token(d.COMMENT,R)}}else if(x&&U==="-"&&(R=this.__patterns.html_comment_end.read(),R))return x=!1,this._create_token(d.COMMENT,R);return null},g.prototype._read_comment=function(U){var R=null;if(U==="/"){var W="";if(this._input.peek(1)==="*"){W=this.__patterns.block_comment.read();var H=E.get_directives(W);H&&H.ignore==="start"&&(W+=E.readIgnored(this._input)),W=W.replace(h.allLineBreaks,`
`),R=this._create_token(d.BLOCK_COMMENT,W),R.directives=H}else this._input.peek(1)==="/"&&(W=this.__patterns.comment.read(),R=this._create_token(d.COMMENT,W))}return R},g.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var R=this._input.next();return this.has_char_escapes=!1,U==="`"?R+=this._read_string_recursive("`",!0,"${"):R+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(R=j(R)),this._input.peek()===U&&(R+=this._input.next()),R=R.replace(h.allLineBreaks,`
`),this._create_token(d.STRING,R)}return null},g.prototype._allow_regexp_or_xml=function(U){return U.type===d.RESERVED&&s(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===d.END_EXPR&&U.text===")"&&U.opened.previous.type===d.RESERVED&&s(U.opened.previous.text,["if","while","for"])||s(U.type,[d.COMMENT,d.START_EXPR,d.START_BLOCK,d.START,d.END_BLOCK,d.OPERATOR,d.EQUALS,d.EOF,d.SEMICOLON,d.COMMA])},g.prototype._read_regexp=function(U,R){if(U==="/"&&this._allow_regexp_or_xml(R)){for(var W=this._input.next(),H=!1,L=!1;this._input.hasNext()&&(H||L||this._input.peek()!==U)&&!this._input.testChar(h.newline);)W+=this._input.peek(),H?H=!1:(H=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===U&&(W+=this._input.next(),W+=this._input.read(h.identifier)),this._create_token(d.STRING,W)}return null},g.prototype._read_xml=function(U,R){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(R)){var W="",H=this.__patterns.xml.read_match();if(H){for(var L=H[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=L.indexOf("{")===0,z=0;H;){var J=!!H[1],te=H[2],_e=!!H[H.length-1]||te.slice(0,8)==="![CDATA[";if(!_e&&(te===L||G&&te.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(J?--z:++z),W+=H[0],z<=0)break;H=this.__patterns.xml.read_match()}return H||(W+=this._input.match(/[\s\S]*/g)[0]),W=W.replace(h.allLineBreaks,`
`),this._create_token(d.STRING,W)}}return null};function j(U){for(var R="",W=0,H=new u(U),L=null;H.hasNext();)if(L=H.match(/([\s]|[^\\]|\\\\)+/g),L&&(R+=L[0]),H.peek()==="\\"){if(H.next(),H.peek()==="x")L=H.match(/x([0-9A-Fa-f]{2})/g);else if(H.peek()==="u")L=H.match(/u([0-9A-Fa-f]{4})/g);else{R+="\\",H.hasNext()&&(R+=H.next());continue}if(!L)return U;if(W=parseInt(L[1],16),W>126&&W<=255&&L[0].indexOf("x")===0)return U;if(W>=0&&W<32){R+="\\"+L[0];continue}else W===34||W===39||W===92?R+="\\"+String.fromCharCode(W):R+=String.fromCharCode(W)}return R}g.prototype._read_string_recursive=function(U,R,W){var H,L;U==="'"?L=this.__patterns.single_quote:U==='"'?L=this.__patterns.double_quote:U==="`"?L=this.__patterns.template_text:U==="}"&&(L=this.__patterns.template_expression);for(var G=L.read(),z="";this._input.hasNext();){if(z=this._input.next(),z===U||!R&&h.newline.test(z)){this._input.back();break}else z==="\\"&&this._input.hasNext()?(H=this._input.peek(),H==="x"||H==="u"?this.has_char_escapes=!0:H==="\r"&&this._input.peek(1)===`
`&&this._input.next(),z+=this._input.next()):W&&(W==="${"&&z==="$"&&this._input.peek()==="{"&&(z+=this._input.next()),W===z&&(U==="`"?z+=this._read_string_recursive("}",R,"`"):z+=this._read_string_recursive("`",R,"${"),this._input.hasNext()&&(z+=this._input.next())));z+=L.read(),G+=z}return G},t.exports.Tokenizer=g,t.exports.TOKEN=d,t.exports.positionable_operators=w.slice(),t.exports.line_starters=f.slice()},function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function i(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},i.prototype.peek=function(u){var p=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(p=this.__input.charAt(u)),p},i.prototype.__match=function(u,p){u.lastIndex=p;var a=u.exec(this.__input);return a&&!(b&&u.sticky)&&(a.index!==p&&(a=null)),a},i.prototype.test=function(u,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(u,p):!1},i.prototype.testChar=function(u,p){var a=this.peek(p);return u.lastIndex=0,a!==null&&u.test(a)},i.prototype.match=function(u){var p=this.__match(u,this.__position);return p?this.__position+=p[0].length:p=null,p},i.prototype.read=function(u,p,a){var o="",h;return u&&(h=this.match(u),h&&(o+=h[0])),p&&(h||!u)&&(o+=this.readUntil(p,a)),o},i.prototype.readUntil=function(u,p){var a="",o=this.__position;u.lastIndex=this.__position;var h=u.exec(this.__input);return h?(o=h.index,p&&(o+=h[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},i.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},i.prototype.get_regexp=function(u,p){var a=null,o="g";return p&&b&&(o="y"),typeof u=="string"&&u!==""?a=new RegExp(u,o):u&&(a=new RegExp(u.source,o)),a},i.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(u){var p=this.__position,a=this.readUntilAfter(u);return this.__position=p,a},i.prototype.lookBack=function(u){var p=this.__position-1;return p>=u.length&&this.__input.substring(p-u.length,p).toLowerCase()===u},t.exports.InputScanner=i},function(t,b,i){var u=i(8).InputScanner,p=i(3).Token,a=i(10).TokenStream,o=i(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(n,s){this._input=new u(n),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var n,s=new p(h.START,""),d=null,E=[],D=new a;s.type!==h.EOF;){for(n=this._get_next_token(s,d);this._is_comment(n);)D.add(n),n=this._get_next_token(s,d);D.isEmpty()||(n.comments_before=D,D=new a),n.parent=d,this._is_opening(n)?(E.push(d),d=n):d&&this._is_closing(n,d)&&(n.opened=d,d.closed=n,d=E.pop(),n.parent=d),n.previous=s,s.next=n,this.__tokens.add(n),s=n}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(n,s){this._readWhitespace();var d=this._input.read(/.+/g);return d?this._create_token(h.RAW,d):this._create_token(h.EOF,"")},l.prototype._is_comment=function(n){return!1},l.prototype._is_opening=function(n){return!1},l.prototype._is_closing=function(n,s){return!1},l.prototype._create_token=function(n,s){var d=new p(n,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return d},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=h},function(t){function b(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},b.prototype.peek=function(i){var u=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(u=this.__tokens[i]),u},b.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},t.exports.TokenStream=b},function(t,b,i){var u=i(12).Pattern;function p(a,o){u.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new u,p.prototype.__set_whitespace_patterns=function(a,o){a+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var o=this.__split(this._newline_regexp,a);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return a},p.prototype.matching=function(a,o){var h=this._create();return h.__set_whitespace_patterns(a,o),h._update(),h},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(a,o){a.lastIndex=0;for(var h=0,l=[],n=a.exec(o);n;)l.push(o.substring(h,n.index)),h=n.index+n[0].length,n=a.exec(o);return h<o.length?l.push(o.substring(h,o.length)):l.push(""),l},t.exports.WhitespacePattern=p},function(t){function b(i,u){this._input=i,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,u&&(this._starting_pattern=this._input.get_regexp(u._starting_pattern,!0),this._match_pattern=this._input.get_regexp(u._match_pattern,!0),this._until_pattern=this._input.get_regexp(u._until_pattern),this._until_after=u._until_after)}b.prototype.read=function(){var i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(i){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(i),u._update(),u},b.prototype.until=function(i){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(i),u._update(),u},b.prototype.starting_with=function(i){var u=this._create();return u._starting_pattern=this._input.get_regexp(i,!0),u._update(),u},b.prototype.matching=function(i){var u=this._create();return u._match_pattern=this._input.get_regexp(i,!0),u._update(),u},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},t.exports.Pattern=b},function(t){function b(i,u){i=typeof i=="string"?i:i.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(i);p;)u[p[1]]=p[2],p=this.__directive_pattern.exec(i);return u},b.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},function(t,b,i){var u=i(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(o,h){u.call(this,o,h),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var l=new u(o);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),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}/)}}a.prototype=new u,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},a.prototype.read_options=function(o){var h=this._create();for(var l in p)h._disabled[l]=o.templating.indexOf(l)===-1;return h._update(),h},a.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},a.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},a.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},a.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},t.exports.TemplatablePattern=a}],C={};function P(t){var b=C[t];if(b!==void 0)return b.exports;var i=C[t]={exports:{}};return S[t](i,i.exports,P),i.exports}var y=P(0);I=y})();var F=I;!(X=[],B=function(){return{js_beautify:F}}.apply(ee,X),B!==void 0&&(ze.exports=B))})()},"6eGT":function(ze,ee,M){"use strict";function X(B){return null}ee.a=X},"6fms":function(ze,ee,M){var X=M("SUKs"),B=M("06Qe"),I=M("bYtY"),F=I.each;function S(t){return parseInt(t,10)}function C(t,b){B.initVML(),this.root=t,this.storage=b;var i=document.createElement("div"),u=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",u.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=u,this._vmlViewport=i,this.resize();var p=b.delFromStorage,a=b.addToStorage;b.delFromStorage=function(o){p.call(b,o),o&&(o.onRemove&&o.onRemove(u))},b.addToStorage=function(o){o.onAdd&&o.onAdd(u),a.call(b,o)},this._firstPaint=!0}C.prototype={constructor:C,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var b=this._vmlRoot,i=0;i<t.length;i++){var u=t[i];u.invisible||u.ignore?(u.__alreadyNotVisible||u.onRemove(b),u.__alreadyNotVisible=!0):(u.__alreadyNotVisible&&u.onAdd(b),u.__alreadyNotVisible=!1,u.__dirty&&(u.beforeBrush&&u.beforeBrush(),(u.brushVML||u.brush).call(u,b),u.afterBrush&&u.afterBrush())),u.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(b),this._firstPaint=!1)},resize:function(t,b){var t=t==null?this._getWidth():t,b=b==null?this._getHeight():b;if(this._width!==t||this._height!==b){this._width=t,this._height=b;var i=this._vmlViewport.style;i.width=t+"px",i.height=b+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,b=t.currentStyle;return(t.clientWidth||S(b.width))-S(b.paddingLeft)-S(b.paddingRight)|0},_getHeight:function(){var t=this.root,b=t.currentStyle;return(t.clientHeight||S(b.height))-S(b.paddingTop)-S(b.paddingBottom)|0}};function P(t){return function(){X('In IE8.0 VML mode painter not support method "'+t+'"')}}F(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){C.prototype[t]=P(t)});var y=C;ze.exports=y},"746U":function(ze,ee,M){"use strict";M.d(ee,"f",function(){return X}),M.d(ee,"l",function(){return B}),M.d(ee,"k",function(){return I}),M.d(ee,"j",function(){return F}),M.d(ee,"g",function(){return S}),M.d(ee,"m",function(){return C}),M.d(ee,"h",function(){return P}),M.d(ee,"n",function(){return y}),M.d(ee,"c",function(){return t}),M.d(ee,"a",function(){return b}),M.d(ee,"i",function(){return i}),M.d(ee,"o",function(){return u}),M.d(ee,"e",function(){return o}),M.d(ee,"d",function(){return h}),M.d(ee,"p",function(){return l}),M.d(ee,"b",function(){return n});function X(s){return Array.isArray(s)}function B(s){return typeof s=="string"}function I(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function F(s){return typeof s=="number"&&!isNaN(s)}function S(s){return s===!0||s===!1}function C(s){return typeof s=="undefined"}function P(s){return!y(s)}function y(s){return C(s)||s===null}function t(s,d){if(!s)throw new Error(d?`Unexpected type, expected '${d}'`:"Unexpected type")}function b(s){if(y(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function i(s){return typeof s=="function"}function u(s,d){const E=Math.min(s.length,d.length);for(let D=0;D<E;D++)p(s[D],d[D])}function p(s,d){if(B(d)){if(typeof s!==d)throw new Error(`argument does not match constraint: typeof ${d}`)}else if(i(d)){try{if(s instanceof d)return}catch(E){}if(!y(s)&&s.constructor===d)return;if(d.length===1&&d.call(void 0,s)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(s){let d=[],E=Object.getPrototypeOf(s);for(;Object.prototype!==E;)d=d.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return d}function o(s){const d=[];for(const E of a(s))typeof s[E]=="function"&&d.push(E);return d}function h(s,d){const E=T=>function(){const k=Array.prototype.slice.call(arguments,0);return d(T,k)};let D={};for(const T of s)D[T]=E(T);return D}function l(s){return s===null?void 0:s}function n(s,d="Unreachable"){throw new Error(d)}},"7Cbv":function(ze,ee,M){"use strict";var X=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),B=new Uint8Array(16);function I(){if(!X)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(B)}var F=/^(?:[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 S(p){return typeof p=="string"&&F.test(p)}for(var C=S,P=[],y=0;y<256;++y)P.push((y+256).toString(16).substr(1));function t(p){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(P[p[a+0]]+P[p[a+1]]+P[p[a+2]]+P[p[a+3]]+"-"+P[p[a+4]]+P[p[a+5]]+"-"+P[p[a+6]]+P[p[a+7]]+"-"+P[p[a+8]]+P[p[a+9]]+"-"+P[p[a+10]]+P[p[a+11]]+P[p[a+12]]+P[p[a+13]]+P[p[a+14]]+P[p[a+15]]).toLowerCase();if(!C(o))throw TypeError("Stringified UUID is invalid");return o}var b=t;function i(p,a,o){p=p||{};var h=p.random||(p.rng||I)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,a){o=o||0;for(var l=0;l<16;++l)a[o+l]=h[l];return a}return b(h)}var u=ee.a=i},"7SHv":function(ze,ee,M){var X=M("LPTA"),B=X.devicePixelRatio,I=M("bYtY"),F=M("SUKs"),S=M("mFDi"),C=M("BPZU"),P=M("Xmg4"),y=M("mLcG"),t=M("Dagg"),b=M("ItGF"),i=1e5,u=314159,p=.01,a=.001;function o(w){return parseInt(w,10)}function h(w){return w?w.__builtin__?!0:!(typeof w.resize!="function"||typeof w.refresh!="function"):!1}var l=new S(0,0,0,0),n=new S(0,0,0,0);function s(w,v,c){return l.copy(w.getBoundingRect()),w.transform&&l.applyTransform(w.transform),n.width=v,n.height=c,!l.intersect(n)}function d(w,v){if(w===v)return!1;if(!w||!v||w.length!==v.length)return!0;for(var c=0;c<w.length;c++)if(w[c]!==v[c])return!0;return!1}function E(w,v){for(var c=0;c<w.length;c++){var f=w[c];f.setTransform(v),v.beginPath(),f.buildPath(v,f.shape),v.clip(),f.restoreTransform(v)}}function D(w,v){var c=document.createElement("div");return c.style.cssText=["position:relative","width:"+w+"px","height:"+v+"px","padding:0","margin:0","border-width:0"].join(";")+";",c}var T=function(w,v,c){this.type="canvas";var f=!w.nodeName||w.nodeName.toUpperCase()==="CANVAS";this._opts=c=I.extend({},c||{}),this.dpr=c.devicePixelRatio||B,this._singleCanvas=f,this.root=w;var m=w.style;m&&(m["-webkit-tap-highlight-color"]="transparent",m["-webkit-user-select"]=m["user-select"]=m["-webkit-touch-callout"]="none",w.innerHTML=""),this.storage=v;var _=this._zlevelList=[],x=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,f){var j=w.width,U=w.height;c.width!=null&&(j=c.width),c.height!=null&&(U=c.height),this.dpr=c.devicePixelRatio||1,w.width=j*this.dpr,w.height=U*this.dpr,this._width=j,this._height=U;var R=new P(w,this,this.dpr);R.__builtin__=!0,R.initContext(),x[u]=R,R.zlevel=u,_.push(u),this._domRoot=w}else{this._width=this._getSize(0),this._height=this._getSize(1);var g=this._domRoot=D(this._width,this._height);w.appendChild(g)}this._hoverlayer=null,this._hoverElements=[]};T.prototype={constructor:T,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var w=this.getViewportRoot();if(w)return{offsetLeft:w.offsetLeft||0,offsetTop:w.offsetTop||0}},refresh:function(w){var v=this.storage.getDisplayList(!0),c=this._zlevelList;this._redrawId=Math.random(),this._paintList(v,w,this._redrawId);for(var f=0;f<c.length;f++){var m=c[f],_=this._layers[m];if(!_.__builtin__&&_.refresh){var x=f===0?this._backgroundColor:null;_.refresh(x)}}return this.refreshHover(),this},addHover:function(w,v){if(w.__hoverMir)return;var c=new w.constructor({style:w.style,shape:w.shape,z:w.z,z2:w.z2,silent:w.silent});return c.__from=w,w.__hoverMir=c,v&&c.setStyle(v),this._hoverElements.push(c),c},removeHover:function(w){var v=w.__hoverMir,c=this._hoverElements,f=I.indexOf(c,v);f>=0&&c.splice(f,1),w.__hoverMir=null},clearHover:function(w){for(var v=this._hoverElements,c=0;c<v.length;c++){var f=v[c].__from;f&&(f.__hoverMir=null)}v.length=0},refreshHover:function(){var w=this._hoverElements,v=w.length,c=this._hoverlayer;if(c&&c.clear(),!v)return;C(w,this.storage.displayableSortFunc),c||(c=this._hoverlayer=this.getLayer(i));var f={};c.ctx.save();for(var m=0;m<v;){var _=w[m],x=_.__from;if(!(x&&x.__zr)){w.splice(m,1),x.__hoverMir=null,v--;continue}m++,x.invisible||(_.transform=x.transform,_.invTransform=x.invTransform,_.__clipPaths=x.__clipPaths,this._doPaintEl(_,c,!0,f))}c.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(w,v,c){if(this._redrawId!==c)return;v=v||!1,this._updateLayerStatus(w);var f=this._doPaintList(w,v);if(this._needsManuallyCompositing&&this._compositeManually(),!f){var m=this;y(function(){m._paintList(w,v,c)})}},_compositeManually:function(){var w=this.getLayer(u).ctx,v=this._domRoot.width,c=this._domRoot.height;w.clearRect(0,0,v,c),this.eachBuiltinLayer(function(f){f.virtual&&w.drawImage(f.dom,0,0,v,c)})},_doPaintList:function(w,v){for(var c=[],f=0;f<this._zlevelList.length;f++){var m=this._zlevelList[f],_=this._layers[m];_.__builtin__&&_!==this._hoverlayer&&(_.__dirty||v)&&c.push(_)}for(var x=!0,g=0;g<c.length;g++){var _=c[g],j=_.ctx,U={};j.save();var R=v?_.__startIndex:_.__drawIndex,W=!v&&_.incremental&&Date.now,H=W&&Date.now(),L=_.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(_.__startIndex===_.__endIndex)_.clear(!1,L);else if(R===_.__startIndex){var G=w[R];(!G.incremental||!G.notClear||v)&&_.clear(!1,L)}R===-1&&(console.error("For some unknown reason. drawIndex is -1"),R=_.__startIndex);for(var z=R;z<_.__endIndex;z++){var J=w[z];if(this._doPaintEl(J,_,v,U),J.__dirty=J.__dirtyText=!1,W){var te=Date.now()-H;if(te>15)break}}_.__drawIndex=z,_.__drawIndex<_.__endIndex&&(x=!1),U.prevElClipPaths&&j.restore(),j.restore()}return b.wxa&&I.each(this._layers,function(_e){_e&&_e.ctx&&_e.ctx.draw&&_e.ctx.draw()}),x},_doPaintEl:function(w,v,c,f){var m=v.ctx,_=w.transform;if((v.__dirty||c)&&!w.invisible&&w.style.opacity!==0&&!(_&&!_[0]&&!_[3])&&!(w.culling&&s(w,this._width,this._height))){var x=w.__clipPaths,g=f.prevElClipPaths;(!g||d(x,g))&&(g&&(m.restore(),f.prevElClipPaths=null,f.prevEl=null),x&&(m.save(),E(x,m),f.prevElClipPaths=x)),w.beforeBrush&&w.beforeBrush(m),w.brush(m,f.prevEl||null),f.prevEl=w,w.afterBrush&&w.afterBrush(m)}},getLayer:function(w,v){this._singleCanvas&&!this._needsManuallyCompositing&&(w=u);var c=this._layers[w];return c||(c=new P("zr_"+w,this,this.dpr),c.zlevel=w,c.__builtin__=!0,this._layerConfig[w]?I.merge(c,this._layerConfig[w],!0):this._layerConfig[w-p]&&I.merge(c,this._layerConfig[w-p],!0),v&&(c.virtual=v),this.insertLayer(w,c),c.initContext()),c},insertLayer:function(w,v){var c=this._layers,f=this._zlevelList,m=f.length,_=null,x=-1,g=this._domRoot;if(c[w]){F("ZLevel "+w+" has been used already");return}if(!h(v)){F("Layer of zlevel "+w+" is not valid");return}if(m>0&&w>f[0]){for(x=0;x<m-1&&!(f[x]<w&&f[x+1]>w);x++);_=c[f[x]]}if(f.splice(x+1,0,w),c[w]=v,!v.virtual)if(_){var j=_.dom;j.nextSibling?g.insertBefore(v.dom,j.nextSibling):g.appendChild(v.dom)}else g.firstChild?g.insertBefore(v.dom,g.firstChild):g.appendChild(v.dom)},eachLayer:function(w,v){var c=this._zlevelList,f,m;for(m=0;m<c.length;m++)f=c[m],w.call(v,this._layers[f],f)},eachBuiltinLayer:function(w,v){var c=this._zlevelList,f,m,_;for(_=0;_<c.length;_++)m=c[_],f=this._layers[m],f.__builtin__&&w.call(v,f,m)},eachOtherLayer:function(w,v){var c=this._zlevelList,f,m,_;for(_=0;_<c.length;_++)m=c[_],f=this._layers[m],f.__builtin__||w.call(v,f,m)},getLayers:function(){return this._layers},_updateLayerStatus:function(w){this.eachBuiltinLayer(function(U,R){U.__dirty=U.__used=!1});function v(U){m&&(m.__endIndex!==U&&(m.__dirty=!0),m.__endIndex=U)}if(this._singleCanvas)for(var c=1;c<w.length;c++){var f=w[c];if(f.zlevel!==w[c-1].zlevel||f.incremental){this._needsManuallyCompositing=!0;break}}for(var m=null,_=0,x,c=0;c<w.length;c++){var f=w[c],g=f.zlevel,j;x!==g&&(x=g,_=0),f.incremental?(j=this.getLayer(g+a,this._needsManuallyCompositing),j.incremental=!0,_=1):j=this.getLayer(g+(_>0?p:0),this._needsManuallyCompositing),j.__builtin__||F("ZLevel "+g+" has been used by unkown layer "+j.id),j!==m&&(j.__used=!0,j.__startIndex!==c&&(j.__dirty=!0),j.__startIndex=c,j.incremental?j.__drawIndex=-1:j.__drawIndex=c,v(c),m=j),f.__dirty&&(j.__dirty=!0,j.incremental&&j.__drawIndex<0&&(j.__drawIndex=c))}v(c),this.eachBuiltinLayer(function(U,R){!U.__used&&U.getElementCount()>0&&(U.__dirty=!0,U.__startIndex=U.__endIndex=U.__drawIndex=0),U.__dirty&&U.__drawIndex<0&&(U.__drawIndex=U.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(w){w.clear()},setBackgroundColor:function(w){this._backgroundColor=w},configLayer:function(w,v){if(v){var c=this._layerConfig;c[w]?I.merge(c[w],v,!0):c[w]=v;for(var f=0;f<this._zlevelList.length;f++){var m=this._zlevelList[f];if(m===w||m===w+p){var _=this._layers[m];I.merge(_,c[w],!0)}}}},delLayer:function(w){var v=this._layers,c=this._zlevelList,f=v[w];if(!f)return;f.dom.parentNode.removeChild(f.dom),delete v[w],c.splice(I.indexOf(c,w),1)},resize:function(w,v){if(this._domRoot.style){var c=this._domRoot;c.style.display="none";var f=this._opts;if(w!=null&&(f.width=w),v!=null&&(f.height=v),w=this._getSize(0),v=this._getSize(1),c.style.display="",this._width!==w||v!==this._height){c.style.width=w+"px",c.style.height=v+"px";for(var m in this._layers)this._layers.hasOwnProperty(m)&&this._layers[m].resize(w,v);I.each(this._progressiveLayers,function(_){_.resize(w,v)}),this.refresh(!0)}this._width=w,this._height=v}else{if(w==null||v==null)return;this._width=w,this._height=v,this.getLayer(u).resize(w,v)}return this},clearLayer:function(w){var v=this._layers[w];v&&v.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(w){if(w=w||{},this._singleCanvas&&!this._compositeManually)return this._layers[u].dom;var v=new P("image",this,w.pixelRatio||this.dpr);if(v.initContext(),v.clear(!1,w.backgroundColor||this._backgroundColor),w.pixelRatio<=this.dpr){this.refresh();var c=v.dom.width,f=v.dom.height,m=v.ctx;this.eachLayer(function(U){U.__builtin__?m.drawImage(U.dom,0,0,c,f):U.renderToCanvas&&(v.ctx.save(),U.renderToCanvas(v.ctx),v.ctx.restore())})}else for(var _={},x=this.storage.getDisplayList(!0),g=0;g<x.length;g++){var j=x[g];this._doPaintEl(j,v,!0,_)}return v.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(w){var v=this._opts,c=["width","height"][w],f=["clientWidth","clientHeight"][w],m=["paddingLeft","paddingTop"][w],_=["paddingRight","paddingBottom"][w];if(v[c]!=null&&v[c]!=="auto")return parseFloat(v[c]);var x=this.root,g=document.defaultView.getComputedStyle(x);return(x[f]||o(g[c])||o(x.style[c]))-(o(g[m])||0)-(o(g[_])||0)|0},pathToImage:function(w,v){v=v||this.dpr;var c=document.createElement("canvas"),f=c.getContext("2d"),m=w.getBoundingRect(),_=w.style,x=_.shadowBlur*v,g=_.shadowOffsetX*v,j=_.shadowOffsetY*v,U=_.hasStroke()?_.lineWidth:0,R=Math.max(U/2,-g+x),W=Math.max(U/2,g+x),H=Math.max(U/2,-j+x),L=Math.max(U/2,j+x),G=m.width+R+W,z=m.height+H+L;c.width=G*v,c.height=z*v,f.scale(v,v),f.clearRect(0,0,G,z),f.dpr=v;var J={position:w.position,rotation:w.rotation,scale:w.scale};w.position=[R-m.x,H-m.y],w.rotation=0,w.scale=[1,1],w.updateTransform(),w&&w.brush(f);var te=t,_e=new te({style:{x:0,y:0,image:c}});return J.position!=null&&(_e.position=w.position=J.position),J.rotation!=null&&(_e.rotation=w.rotation=J.rotation),J.scale!=null&&(_e.scale=w.scale=J.scale),_e}};var k=T;ze.exports=k},"7ahc":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return E});var X=M("k1fw"),B=M("0Owb"),I=M("+L6B"),F=M("2/Rp"),S=M("y8nQ"),C=M("Vl3Y"),P=M("tJVT"),y=M("OaEy"),t=M("2fM7"),b=M("q1tI"),i=M.n(b),u=M("VrN/"),p=M.n(u),a=M("p77/"),o=M.n(a),h=M("c5Ni"),l=M.n(h),n=t.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},d={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"]};ee.b=function(D){var T=D.callback,k=D.onCancel,w=Object(b.useState)("python"),v=Object(P.a)(w,2),c=v[0],f=v[1];function m(x){f(d[x][1])}function _(x){T(x)}return i.a.createElement(C.a,Object(B.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_}),i.a.createElement(C.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(t.a,{onChange:m},Object.keys(d).map(function(x){return i.a.createElement(n,{key:x,value:x},d[x][0])}))),i.a.createElement(C.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(E,{mode:c})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(F.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(F.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function E(D){var T=D.value,k=D.onChange,w=D.mode,v=D.options,c=v===void 0?{}:v,f=Object(b.useRef)(),m=Object(b.useState)(),_=Object(P.a)(m,2),x=_[0],g=_[1];return Object(b.useEffect)(function(){if(x){function j(U){var R=U.getValue();k&&k(R)}return x.on("change",j),function(){x.off("change",j)}}},[x,k]),Object(b.useEffect)(function(){x&&x.setOption("mode",w)},[x,w]),Object(b.useEffect)(function(){x&&((T!==x.getValue()||T==="")&&setTimeout(function(){x.setValue(T||" ")},300))},[x,T]),Object(b.useEffect)(function(){if(f.current&&!x){var j=p.a.fromTextArea(f.current,Object(X.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));g(j)}},[f.current,x]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:f}))}},"7ixt":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return I});var X={adjustX:1,adjustY:1},B=[0,0],I={left:{points:["cr","cl"],overflow:X,offset:[-4,0],targetOffset:B},right:{points:["cl","cr"],overflow:X,offset:[4,0],targetOffset:B},top:{points:["bc","tc"],overflow:X,offset:[0,-4],targetOffset:B},bottom:{points:["tc","bc"],overflow:X,offset:[0,4],targetOffset:B},topLeft:{points:["bl","tl"],overflow:X,offset:[0,-4],targetOffset:B},leftTop:{points:["tr","tl"],overflow:X,offset:[-4,0],targetOffset:B},topRight:{points:["br","tr"],overflow:X,offset:[0,-4],targetOffset:B},rightTop:{points:["tl","tr"],overflow:X,offset:[4,0],targetOffset:B},bottomRight:{points:["tr","br"],overflow:X,offset:[0,4],targetOffset:B},rightBottom:{points:["bl","br"],overflow:X,offset:[4,0],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:X,offset:[0,4],targetOffset:B},leftBottom:{points:["br","bl"],overflow:X,offset:[-4,0],targetOffset:B}},F=I},"7oTu":function(ze,ee,M){var X=M("IMiH"),B=M("QBsz"),I=B.applyTransform,F=X.CMD,S=[[],[],[]],C=Math.sqrt,P=Math.atan2;function y(t,b){var i=t.data,u,p,a,o,h,l,n=F.M,s=F.C,d=F.L,E=F.R,D=F.A,T=F.Q;for(a=0,o=0;a<i.length;){u=i[a++],o=a,p=0;switch(u){case n:p=1;break;case d:p=1;break;case s:p=3;break;case T:p=2;break;case D:var k=b[4],w=b[5],v=C(b[0]*b[0]+b[1]*b[1]),c=C(b[2]*b[2]+b[3]*b[3]),f=P(-b[1]/c,b[0]/v);i[a]*=v,i[a++]+=k,i[a]*=c,i[a++]+=w,i[a++]*=v,i[a++]*=c,i[a++]+=f,i[a++]+=f,a+=2,o=a;break;case E:l[0]=i[a++],l[1]=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1],l[0]+=i[a++],l[1]+=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1]}for(h=0;h<p;h++){var l=S[h];l[0]=i[a++],l[1]=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1]}}}ze.exports=y},"815F":function(ze,ee,M){"use strict";M.d(ee,"e",function(){return P}),M.d(ee,"c",function(){return t}),M.d(ee,"d",function(){return b}),M.d(ee,"a",function(){return u}),M.d(ee,"f",function(){return p}),M.d(ee,"b",function(){return a});var X=M("KQm4"),B=M("VTBJ"),I=M("Ff2n"),F=M("Zm9Q"),S=M("Kwbf"),C=M("OZM5");function P(o,h){return o!=null?o:h}function y(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function l(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(d){var E=d.key,D=d.children;Object(S.a)(E!=null,"Tree node must have a certain key: [".concat(s).concat(E,"]"));var T=String(E);Object(S.a)(!h.has(T)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(T)),h.set(T,!0),l(D,"".concat(s).concat(T," > "))})}l(o)}function t(o){function h(l){var n=Object(F.a)(l);return n.map(function(s){if(!Object(C.i)(s))return Object(S.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var d=s.key,E=s.props,D=E.children,T=Object(I.a)(E,["children"]),k=Object(B.a)({key:d},T),w=h(D);return w.length&&(k.children=w),k}).filter(function(s){return s})}return h(o)}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(h===!0?[]:h),n=[];function s(d){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(D,T){var k=Object(C.h)(E?E.pos:"0",T),w=P(D.key,k),v=Object(B.a)(Object(B.a)({},D),{},{parent:E,pos:k,children:null,data:D,isStart:[].concat(Object(X.a)(E?E.isStart:[]),[T===0]),isEnd:[].concat(Object(X.a)(E?E.isEnd:[]),[T===d.length-1])});return n.push(v),h===!0||l.has(w)?v.children=s(D.children||[],v):v.children=[],v})}return s(o),n}function i(o,h,l){var n;l?typeof l=="string"?n=function(E){return E[l]}:typeof l=="function"&&(n=function(E){return l(E)}):n=function(E,D){return P(E.key,D)};function s(d,E,D){var T=d?d.children:o,k=d?Object(C.h)(D.pos,E):"0";if(d){var w=n(d,k),v={node:d,index:E,pos:k,key:w,parentPos:D.node?D.pos:null,level:D.level+1};h(v)}T&&T.forEach(function(c,f){s(c,f,{node:d,pos:k,level:D?D.level+1:-1})})}s(null)}function u(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=h.initWrapper,n=h.processEntity,s=h.onProcessFinished,d=arguments.length>2?arguments[2]:void 0,E={},D={},T={posEntities:E,keyEntities:D};return l&&(T=l(T)||T),i(o,function(k){var w=k.node,v=k.index,c=k.pos,f=k.key,m=k.parentPos,_=k.level,x={node:w,index:v,key:f,pos:c,level:_},g=P(f,c);E[c]=x,D[g]=x,x.parent=E[m],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),n&&n(x,T)},d),s&&s(T),T}function p(o,h){var l=h.expandedKeys,n=h.selectedKeys,s=h.loadedKeys,d=h.loadingKeys,E=h.checkedKeys,D=h.halfCheckedKeys,T=h.dragOverNodeKey,k=h.dropPosition,w=h.keyEntities,v=w[o],c={eventKey:o,expanded:l.indexOf(o)!==-1,selected:n.indexOf(o)!==-1,loaded:s.indexOf(o)!==-1,loading:d.indexOf(o)!==-1,checked:E.indexOf(o)!==-1,halfChecked:D.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:T===o&&k===0,dragOverGapTop:T===o&&k===-1,dragOverGapBottom:T===o&&k===1};return c}function a(o){var h=o.data,l=o.expanded,n=o.selected,s=o.checked,d=o.loaded,E=o.loading,D=o.halfChecked,T=o.dragOver,k=o.dragOverGapTop,w=o.dragOverGapBottom,v=o.pos,c=o.active,f=Object(B.a)(Object(B.a)({},h),{},{expanded:l,selected:n,checked:s,loaded:d,loading:E,halfChecked:D,dragOver:T,dragOverGapTop:k,dragOverGapBottom:w,pos:v,active:c});return"props"in f||Object.defineProperty(f,"props",{get:function(){return Object(S.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),f}},"8EBN":function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){"use strict";X.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 B=0;B<X.modeInfo.length;B++){var I=X.modeInfo[B];I.mimes&&(I.mime=I.mimes[0])}X.findModeByMIME=function(F){F=F.toLowerCase();for(var S=0;S<X.modeInfo.length;S++){var C=X.modeInfo[S];if(C.mime==F)return C;if(C.mimes){for(var P=0;P<C.mimes.length;P++)if(C.mimes[P]==F)return C}}if(/\+xml$/.test(F))return X.findModeByMIME("application/xml");if(/\+json$/.test(F))return X.findModeByMIME("application/json")},X.findModeByExtension=function(F){F=F.toLowerCase();for(var S=0;S<X.modeInfo.length;S++){var C=X.modeInfo[S];if(C.ext){for(var P=0;P<C.ext.length;P++)if(C.ext[P]==F)return C}}},X.findModeByFileName=function(F){for(var S=0;S<X.modeInfo.length;S++){var C=X.modeInfo[S];if(C.file&&C.file.test(F))return C}var P=F.lastIndexOf("."),y=P>-1&&F.substring(P+1,F.length);if(y)return X.findModeByExtension(y)},X.findModeByName=function(F){F=F.toLowerCase();for(var S=0;S<X.modeInfo.length;S++){var C=X.modeInfo[S];if(C.name.toLowerCase()==F)return C;if(C.alias){for(var P=0;P<C.alias.length;P++)if(C.alias[P].toLowerCase()==F)return C}}}})},"8HAY":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return S}),M.d(ee,"b",function(){return C}),M.d(ee,"d",function(){return P}),M.d(ee,"e",function(){return y}),M.d(ee,"c",function(){return t});var X=M("MI8n"),B=M("pmY6"),I=M("3/fG"),F=function(b,i,u,p){function a(o){return o instanceof u?o:new u(function(h){h(o)})}return new(u||(u=Promise))(function(o,h){function l(d){try{s(p.next(d))}catch(E){h(E)}}function n(d){try{s(p.throw(d))}catch(E){h(E)}}function s(d){d.done?o(d.value):a(d.value).then(l,n)}s((p=p.apply(b,i||[])).next())})};class S extends B.a{constructor(b,i="",u="",p=!0,a){super();this._onDidChange=this._register(new X.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=b,this._label=i,this._cssClass=u,this._enabled=p,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(b){this._setLabel(b)}_setLabel(b){this._label!==b&&(this._label=b,this._onDidChange.fire({label:b}))}get tooltip(){return this._tooltip||""}set tooltip(b){this._setTooltip(b)}_setTooltip(b){this._tooltip!==b&&(this._tooltip=b,this._onDidChange.fire({tooltip:b}))}get class(){return this._cssClass}set class(b){this._setClass(b)}_setClass(b){this._cssClass!==b&&(this._cssClass=b,this._onDidChange.fire({class:b}))}get enabled(){return this._enabled}set enabled(b){this._setEnabled(b)}_setEnabled(b){this._enabled!==b&&(this._enabled=b,this._onDidChange.fire({enabled:b}))}get checked(){return this._checked}set checked(b){this._setChecked(b)}_setChecked(b){this._checked!==b&&(this._checked=b,this._onDidChange.fire({checked:b}))}run(b,i){return F(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(b))})}}class C extends B.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new X.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new X.b),this.onDidRun=this._onDidRun.event}run(b,i){return F(this,void 0,void 0,function*(){if(!b.enabled)return;this._onBeforeRun.fire({action:b});let u;try{yield this.runAction(b,i)}catch(p){u=p}this._onDidRun.fire({action:b,error:u})})}runAction(b,i){return F(this,void 0,void 0,function*(){yield b.run(i)})}}class P extends S{constructor(b){super(P.ID,b,b?"separator text":"separator");this.checked=!1,this.enabled=!1}}P.ID="vs.actions.separator";class y{constructor(b,i,u,p){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=b,this.label=i,this.class=p,this._actions=u}get actions(){return this._actions}dispose(){}run(){return F(this,void 0,void 0,function*(){})}}class t extends S{constructor(){super(t.ID,I.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8XDt":function(ze,ee,M){M("qH13");var X=M("aX58"),B=X.registerPainter,I=M("6fms");B("vml",I)},"8hTe":function(ze,ee,M){ze.exports={button:"button___1wy9m"}},"942q":function(ze,ee,M){ze.exports={flex_box_center:"flex_box_center___6uNR7",flex_space_between:"flex_space_between___1vpXN",flex_box_vertical_center:"flex_box_vertical_center___1P9h2",flex_box_center_end:"flex_box_center_end___2guA4",flex_box_column:"flex_box_column___1w5Zf",top:"top___2UvUE",desc:"desc___2mFum",liked:"liked___12VnN",likedActive:"likedActive___3ixY7",reply:"reply___29ShJ",replyList:"replyList___1F2kY",comment:"comment___2ZnmY"}},"9Bee":function(ze,ee,M){"use strict";var X=M("DYRE"),B=M("zeV3"),I=M("+L6B"),F=M("2/Rp"),S=M("k1fw"),C=M("9og8"),P=M("tJVT"),y=M("WmNS"),t=M.n(y),b=M("q1tI"),i=M.n(b),u=M("vg9a"),p=M("DlQD"),a=M.n(p),o=M("rUJ1");function h(fe,ae){var se=fe.match(/^(\s+)(?:```)/);if(se===null)return ae;var de=se[1];return ae.split(`
`).map(function(ve){var ie=ve.match(/^\s+/);if(ie===null)return ve;var oe=Object(P.a)(ie,1),pe=oe[0];return pe.length>=de.length?ve.slice(de.length):ve}).join(`
`)}var l=[],n=["<ul>"],s=new a.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){l.length=0,n=["<ul>"]}var D={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(fe,ae,se,de){if(ae>=fe.length||fe[ae].level<=se)return ae;var ve=fe[ae];de.push("<li><a href='#"+ve.anchor+"'>"+ve.text+"</a>"),ae++;var ie=[];return ae=T(fe,ae,ve.level,ie),ie.length>0&&(de.push("<ul>"),ie.forEach(function(oe){de.push(oe)}),de.push("</ul>")),de.push("</li>"),ae=T(fe,ae,se,de),ae}function k(){return T(l,0,0,n),n.push("</ul>"),n.join("")}var w={heading:function(ae){var se=d.exec(ae);if(se)return{type:"heading",raw:se[0],depth:se[1].length,text:se[2]}},fences:function(ae){var se=this.rules.block.fences.exec(ae);if(se){var de=se[0],ve=h(de,se[3]||""),ie=se[2]?se[2].trim():se[2];if(["latex","katex","math"].indexOf(ie)>=0){var oe=f(),pe=ve;ve=oe,m[oe]={type:"block",expression:pe}}return{type:"code",raw:de,lang:ie,text:ve}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,f=function(){return"__special_katext_id_".concat(c++,"__")},m={};function _(){return m}function x(){c=0,m={}}function g(fe){return fe=fe.replace(v,function(ae,se){var de=f();return m[de]={type:"inline",expression:se},de}),fe}var j=s.listitem;s.listitem=function(fe){return j(g(fe))};var U=s.paragraph;s.paragraph=function(fe){return U(g(fe))};var R=s.tablecell;s.tablecell=function(fe,ae){return R(g(fe),ae)},s.code=function(fe,ae,se){var de=(ae||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?"<p class='editormd-tex'>".concat(fe,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ae,'">').concat(se?fe:Object(o.escape)(fe,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(se?fe:Object(o.escape)(fe,!0))+"</code></pre>"},s.heading=function(fe,ae,se){var de=this.options.headerPrefix+se.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:de,level:ae,text:fe}),"<h"+ae+' id="'+de+'">'+fe+"</h"+ae+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:w,renderer:s});var W=a.a,H=M("SJMd"),L=M("ulZh"),G=M.n(L),z=M("m3rI"),J=M("Oy/b"),te=M("p5ED"),_e=M("ErOA"),ce=M("STEk");/* **********************************
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 xe=function(fe,ae){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,de){se.__proto__=de}||function(se,de){for(var ve in de)Object.prototype.hasOwnProperty.call(de,ve)&&(se[ve]=de[ve])})(fe,ae)};function Te(fe,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Class extends value "+String(ae)+" is not a constructor or null");function se(){this.constructor=fe}xe(fe,ae),fe.prototype=ae===null?Object.create(ae):(se.prototype=ae.prototype,new se)}function je(fe,ae,se,de){return new(se||(se=Promise))(function(ve,ie){function oe(Ae){try{we(de.next(Ae))}catch(Me){ie(Me)}}function pe(Ae){try{we(de.throw(Ae))}catch(Me){ie(Me)}}function we(Ae){var Me;Ae.done?ve(Ae.value):(Me=Ae.value,Me instanceof se?Me:new se(function(rt){rt(Me)})).then(oe,pe)}we((de=de.apply(fe,ae||[])).next())})}function Ce(fe,ae){var se,de,ve,ie,oe={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return ie={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function pe(we){return function(Ae){return function(Me){if(se)throw new TypeError("Generator is already executing.");for(;oe;)try{if(se=1,de&&(ve=2&Me[0]?de.return:Me[0]?de.throw||((ve=de.return)&&ve.call(de),0):de.next)&&!(ve=ve.call(de,Me[1])).done)return ve;switch(de=0,ve&&(Me=[2&Me[0],ve.value]),Me[0]){case 0:case 1:ve=Me;break;case 4:return oe.label++,{value:Me[1],done:!1};case 5:oe.label++,de=Me[1],Me=[0];continue;case 7:Me=oe.ops.pop(),oe.trys.pop();continue;default:if(!(ve=oe.trys,(ve=ve.length>0&&ve[ve.length-1])||Me[0]!==6&&Me[0]!==2)){oe=0;continue}if(Me[0]===3&&(!ve||Me[1]>ve[0]&&Me[1]<ve[3])){oe.label=Me[1];break}if(Me[0]===6&&oe.label<ve[1]){oe.label=ve[1],ve=Me;break}if(ve&&oe.label<ve[2]){oe.label=ve[2],oe.ops.push(Me);break}ve[2]&&oe.ops.pop(),oe.trys.pop();continue}Me=ae.call(fe,oe)}catch(rt){Me=[6,rt],de=0}finally{se=ve=0}if(5&Me[0])throw Me[1];return{value:Me[0]?Me[1]:void 0,done:!0}}([we,Ae])}}}var Z=function(){function fe(){}return fe.addKey=function(ae){fe.key=ae},Object.defineProperty(fe,"isLicensed",{get:function(){return!!fe.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(fe.key)},enumerable:!1,configurable:!0}),fe}(),K=function(){function fe(){}return fe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},fe.setAttributes=function(ae,se){for(var de=0,ve=se;de<ve.length;de++){var ie=ve[de],oe=ie[0],pe=ie[1];ae.setAttribute(oe,pe)}},fe.createRect=function(ae,se,de){var ve=document.createElementNS("http://www.w3.org/2000/svg","rect");return ve.setAttribute("width",ae.toString()),ve.setAttribute("height",se.toString()),de&&fe.setAttributes(ve,de),ve},fe.createLine=function(ae,se,de,ve,ie){var oe=document.createElementNS("http://www.w3.org/2000/svg","line");return oe.setAttribute("x1",ae.toString()),oe.setAttribute("y1",se.toString()),oe.setAttribute("x2",de.toString()),oe.setAttribute("y2",ve.toString()),ie&&fe.setAttributes(oe,ie),oe},fe.createPolygon=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg","polygon");return de.setAttribute("points",ae),se&&fe.setAttributes(de,se),de},fe.createCircle=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg","circle");return de.setAttribute("cx",(ae/2).toString()),de.setAttribute("cy",(ae/2).toString()),de.setAttribute("r",ae.toString()),se&&fe.setAttributes(de,se),de},fe.createEllipse=function(ae,se,de){var ve=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ve.setAttribute("cx",(ae/2).toString()),ve.setAttribute("cy",(se/2).toString()),ve.setAttribute("rx",(ae/2).toString()),ve.setAttribute("ry",(se/2).toString()),de&&fe.setAttributes(ve,de),ve},fe.createGroup=function(ae){var se=document.createElementNS("http://www.w3.org/2000/svg","g");return ae&&fe.setAttributes(se,ae),se},fe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},fe.createMarker=function(ae,se,de,ve,ie,oe,pe){var we=document.createElementNS("http://www.w3.org/2000/svg","marker");return fe.setAttributes(we,[["id",ae],["orient",se],["markerWidth",de.toString()],["markerHeight",ve.toString()],["refX",ie.toString()],["refY",oe.toString()]]),we.appendChild(pe),we},fe.createText=function(ae){var se=document.createElementNS("http://www.w3.org/2000/svg","text");return se.setAttribute("x","0"),se.setAttribute("y","0"),ae&&fe.setAttributes(se,ae),se},fe.createTSpan=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg","tspan");return de.textContent=ae,se&&fe.setAttributes(de,se),de},fe.createImage=function(ae){var se=document.createElementNS("http://www.w3.org/2000/svg","image");return ae&&fe.setAttributes(se,ae),se},fe.createPoint=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return de.x=ae,de.y=se,de},fe.createPath=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg","path");return de.setAttribute("d",ae),se&&fe.setAttributes(de,se),de},fe.createElement=function(ae,se){var de=document.createElementNS("http://www.w3.org/2000/svg",ae);return se&&fe.setAttributes(de,se),de},fe.getHollowRectanglePath=function(ae,se,de,ve,ie,oe,pe,we){return"M"+ae+","+se+"V"+(se+ve)+"H"+(ae+de)+"V"+se+"H"+ie+"V"+oe+"H"+(ie+pe)+"V"+(oe+we)+"H"+ie+"V"+se+"Z"},fe}(),V=function(){function fe(ae){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ae+"_"}return Object.defineProperty(fe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),fe.prototype.addClass=function(ae){return this.styleSheet===void 0&&this.addStyleSheet(),ae.name=""+this.classNamePrefix+ae.localName,this.classes.push(ae),this.styleSheet.sheet.insertRule("."+ae.name+" {"+ae.style+"}",this.styleSheet.sheet.cssRules.length),ae},fe.prototype.addRule=function(ae){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ae),this.styleSheet.sheet.insertRule(ae.selector+" {"+ae.style+"}",this.styleSheet.sheet.cssRules.length)},fe.prototype.addStyleSheet=function(){var ae;this.styleSheet=document.createElement("style"),((ae=this.styleSheetRoot)!==null&&ae!==void 0?ae:document.head).appendChild(this.styleSheet),this.addRule(new $("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new $("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new $("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new q("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new q("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},fe.prototype.removeStyleSheet=function(){var ae;this.styleSheet&&(((ae=this.styleSheetRoot)!==null&&ae!==void 0?ae:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},fe}(),$=function(fe,ae){this.selector=fe,this.style=ae},q=function(fe,ae){this.localName=fe,this.style=ae},Q=function(){function fe(){this.blocks=[],this.display=""}return fe.prototype.addButtonBlock=function(ae){ae.className=this.blockClassName,ae.buttonClassName=this.buttonClassName,ae.buttonColorsClassName=this.buttonColorsClassName,ae.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ae)},fe.prototype.addElementBlock=function(ae){ae.className===void 0&&(ae.className=this.blockClassName),this.blocks.push(ae)},fe.prototype.getUI=function(){var ae=document.createElement("div");return ae.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ae.style.display=this.display,this.blocks.forEach(function(se){return ae.appendChild(se.getUI())}),ae},fe}(),ge=function(){function fe(){}return fe.prototype.getUI=function(){var ae=document.createElement("div");if(ae.className=this.className,this.minWidth!==void 0&&(ae.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ae.style.justifyContent="flex-start";break;case"center":ae.style.justifyContent="center";break;case"end":ae.style.justifyContent="flex-end"}return ae.style.whiteSpace="nowrap",ae},fe}(),Oe=function(fe){function ae(){var se=fe!==null&&fe.apply(this,arguments)||this;return se.buttons=[],se}return Te(ae,fe),ae.prototype.addButton=function(se){se.className=this.buttonClassName,se.colorsClassName=this.buttonColorsClassName,se.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(se)},ae.prototype.getUI=function(){var se=fe.prototype.getUI.call(this);return this.buttons.forEach(function(de){return se.appendChild(de.getUI())}),se},ae}(ge),Ye=function(){function fe(ae,se){this._isActive=!1,this._isHidden=!1,this._icon=ae,this.title=se,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(fe.prototype,"icon",{get:function(){return this._icon},set:function(ae){this._icon=ae,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isActive",{get:function(){return this._isActive},set:function(ae){this._isActive=ae,this.adjustClassName()},enumerable:!1,configurable:!0}),fe.prototype.getUI=function(){var ae=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return ae.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},fe.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},fe.prototype.hide=function(){this._isHidden=!0},fe}(),le=function(fe){function ae(){var se=fe!==null&&fe.apply(this,arguments)||this;return se.elements=[],se}return Te(ae,fe),ae.prototype.addElement=function(se){this.elements.push(se)},ae.prototype.getUI=function(){var se=fe.prototype.getUI.call(this);return this.elements.forEach(function(de){return se.appendChild(de)}),se},ae}(ge),Ee=function(){function fe(ae,se){this.horizontal=ae,this.vertical=se}return Object.defineProperty(fe.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),fe.prototype.getVerticalLength=function(ae){return ae/this.ratio},fe.prototype.getHorizontalLength=function(ae){return ae*this.ratio},fe}(),Re=function(){function fe(){}return fe.getIcon=function(ae,se){if(ae>0&&se>0){var de=new Ee(ae,se),ve=de.ratio>=1?20:de.getHorizontalLength(20),ie=de.ratio<1?20:de.getVerticalLength(20),oe=document.createElementNS("http://www.w3.org/2000/svg","svg");oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),oe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(oe);var pe=K.createDefs();oe.appendChild(pe);var we=K.createElement("clipPath",[["id","text-bg-clip"]]);pe.appendChild(we);var Ae=K.createPath(K.getHollowRectanglePath((24-ve)/2,(24-ie)/2,ve,ie,(24-ve)/2+2,(24-ie)/2+2,ve-4,ie-4));oe.appendChild(Ae);var Me=K.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Me.appendChild(K.createTSpan(ae+":"+se)),oe.appendChild(Me);var rt=Me.getBBox();K.setAttributes(Me,[["x",((24-rt.width)/2).toString()],["y",((24-rt.height)/2-rt.y).toString()]]);var Pt=K.createPath(K.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(rt.width))/2,(24-Math.ceil(rt.height))/2,Math.ceil(rt.width),Math.ceil(rt.height)));return we.appendChild(Pt),K.setAttributes(Ae,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(oe),oe.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},fe}(),He=function(fe){function ae(se,de,ve){var ie=fe.call(this,se,de)||this;return ie.isDropdownOpen=!1,ie.onClick=ie.dropdownButtonClicked,ie.dropdownButtons=ve,ie}return Te(ae,fe),ae.prototype.setupDropdown=function(){var se=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(de){de.className=se.className,de.colorsClassName=se.colorsClassName,se.dropdownBlock.appendChild(de.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ae.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ae.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ae.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ae.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ae.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ae}(Ye),et=function(){function fe(ae,se){this.GRIP_SIZE=10,this.color=ae,this.fillColor=se,this.visual=K.createGroup(),this.visual.appendChild(K.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(K.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return fe.prototype.ownsTarget=function(ae){return ae===this.visual||ae===this.visual.childNodes[0]||ae===this.visual.childNodes[1]},fe.prototype.setCenter=function(ae,se){this.visual.childNodes.forEach(function(de){return K.setAttributes(de,[["cx",ae.toString()],["cy",se.toString()]])})},fe}(),ut=function(){function fe(ae,se,de,ve){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ae,this.canvasHeight=se,this.margin=de,this.container=ve,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(fe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ae){this._aspectRatio=ae,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ae){this._isGridVisible=ae,this.gridContainer&&K.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ae){this._zoomFactor=ae,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),fe.prototype.open=function(){var ae=this;this.cropShadeElement=K.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=K.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var se=0;se<this.numberOfGridLines;se++)this.horizontalGridLines.push(K.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(K.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(de){return ae.gridContainer.appendChild(de)}),this.verticalGridLines.forEach(function(de){return ae.gridContainer.appendChild(de)}),this.cropRectElement=K.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new et(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new et(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new et(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new et(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},fe.prototype.setCropRectangle=function(ae){this.cropRect=ae;var se=Object.assign({},this.cropRect);this.zoomFactor!==1&&(se.width=this.cropRect.width*this.zoomFactor,se.height=this.cropRect.height*this.zoomFactor,se.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-se.width/2,se.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-se.height/2),K.setAttributes(this.cropRectElement,[["x",se.x.toString()],["y",se.y.toString()],["width",se.width.toString()],["height",se.height.toString()]]);var de=se.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ie,oe){var pe=se.y+de*(oe+1);K.setAttributes(ie,[["x1",""+se.x],["y1",""+pe],["x2",""+(se.x+se.width)],["y2",""+pe]])});var ve=se.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ie,oe){var pe=se.x+ve*(oe+1);K.setAttributes(ie,[["x1",""+pe],["y1",""+se.y],["x2",""+pe],["y2",""+(se.y+se.height)]])}),K.setAttributes(this.cropShadeElement,[["d",K.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,se.x,se.y,se.width,se.height)]]),this.topLeftGrip.setCenter(se.x,se.y),this.topRightGrip.setCenter(se.x+se.width,se.y),this.bottomLeftGrip.setCenter(se.x,se.y+se.height),this.bottomRightGrip.setCenter(se.x+se.width,se.y+se.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},fe.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)},fe.prototype.clientToLocalCoordinates=function(ae,se){var de=this.container.getBoundingClientRect();return{x:ae-de.left+this.margin,y:se-de.top+this.margin}},fe.prototype.onPointerDown=function(ae){this.container.setPointerCapture(ae.pointerId),this.previousPoint=this.clientToLocalCoordinates(ae.clientX,ae.clientY),this.cropRectElement===ae.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ae.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ae.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ae.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ae.target)&&(this.activeGrip=this.bottomRightGrip)},fe.prototype.onPointerMove=function(ae){if(this.isMoving)this.move(this.clientToLocalCoordinates(ae.clientX,ae.clientY));else if(this.activeGrip){var se=this.clientToLocalCoordinates(ae.clientX,ae.clientY);this.resize(se)}ae.preventDefault()},fe.prototype.onPointerUp=function(ae){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ae.pointerId)},fe.prototype.move=function(ae){var se=ae.x-this.previousPoint.x,de=ae.y-this.previousPoint.y;this.zoomFactor!==1&&(se=-se/this.zoomFactor,de=-de/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+se),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+de),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ae},fe.prototype.resize=function(ae){var se=Object.assign({},this.cropRect),de=ae.x-this.previousPoint.x,ve=ae.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:se.x+de<this.margin&&(de=this.margin-se.x),se.x+=de,se.width=this.cropRect.x+this.cropRect.width-se.x;break;case this.bottomRightGrip:case this.topRightGrip:se.width+de>this.canvasWidth*this.zoomFactor&&(de=this.canvasWidth*this.zoomFactor-se.width),se.width+=de}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(se.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(de),se.height=this.aspectRatio.getVerticalLength(se.width)):(se.y+=ve,se.height=this.cropRect.y+this.cropRect.height-se.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?se.height=this.aspectRatio.getVerticalLength(se.width):se.height+=ve}se.width<10&&(se.x=this.cropRect.x,se.width=10),se.height<10&&(se.y=this.cropRect.y,se.height=10),this.previousPoint=ae,se.x>=this.margin&&se.y>=this.margin&&se.x-this.margin+se.width<=this.canvasWidth&&se.y-this.margin+se.height<=this.canvasHeight&&(this.cropRect=se,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},fe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ae=this.cropRect.x+this.cropRect.width/2,se=this.cropRect.y+this.cropRect.height/2,de=this.aspectRatio.getHorizontalLength(this.cropRect.height),ve=this.aspectRatio.getVerticalLength(this.cropRect.width);de/this.canvasWidth<ve/this.canvasHeight?this.cropRect.width=de:this.cropRect.height=ve,this.cropRect.width>this.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=ae-this.cropRect.width/2,this.cropRect.y=se-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)}},fe.prototype.getRescaledRect=function(ae,se,de,ve,ie,oe){var pe=de/ae,we=ve/se;return{x:(ie.x-oe)*pe+oe,y:(ie.y-oe)*we+oe,width:ie.width*pe,height:ie.height*we}},fe.prototype.scaleCanvas=function(ae,se){var de=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ae,se,this.cropRect,this.margin);this.canvasWidth=ae,this.canvasHeight=se,this.onCropChange&&this.onCropChange(de),this.setCropRectangle(de)},fe}(),Dt=function(){function fe(ae){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ae,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(fe.prototype,"angle",{get:function(){return this._angle},set:function(ae){this._angle=ae,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),fe.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},fe.prototype.onPointerDown=function(ae){this.controlContainer.setPointerCapture(ae.pointerId),this.isDragging=!0,this.previousPoint={x:ae.clientX,y:ae.clientY}},fe.prototype.onPointerMove=function(ae){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ae.clientX-this.previousPoint.x)/5),this.previousPoint.x=ae.clientX)},fe.prototype.onPointerUp=function(ae){this.isDragging&&this.onAngleChange&&this.onAngleChange((ae.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ae.pointerId)},fe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ae=this.angleLabelText.getBBox();K.setAttributes(this.angleLabelElement,[["x",((this.width-ae.width)/2).toString()],["y",(this.height/2).toString()]])}},fe.prototype.positionScaleShape=function(){if(this.scaleShape){var ae=this.scaleShape.transform.baseVal.getItem(0);ae.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ae,0)}},fe.prototype.getVisual=function(){var ae=document.createElementNS("http://www.w3.org/2000/svg","svg");ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),ae.setAttribute("width",this.width+"px"),ae.setAttribute("height",this.height+"px"),ae.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ae.style.flexShrink="0",document.body.appendChild(ae);for(var se="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,de=1;de<=this.width/5+10;de++){var ve=de%5==0?this.height/3:this.height/6;se+="h4v"+-ve+"h1v"+ve}se+="v1H0Z",this.scaleShape=K.createPath(se);var ie=K.createTransform();this.scaleShape.transform.baseVal.appendItem(ie),ae.appendChild(this.scaleShape),this.angleLabelElement=K.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=K.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var oe=K.createTSpan("");return oe.innerHTML="&deg;",this.angleLabelElement.appendChild(oe),ae.appendChild(this.angleLabelElement),document.body.removeChild(ae),ae},fe}(),We=function(){function fe(){this.naturalSize=!1,this.imageType="image/png"}return fe.prototype.rasterize=function(ae,se,de,ve,ie,oe,pe){var we=this;return new Promise(function(Ae){var Me=document.createElement("canvas");Me.width=ae.width.baseVal.value-2*ve,Me.height=ae.height.baseVal.value-2*ve;var rt=1,Pt=1;we.naturalSize===!0?(rt=se.naturalWidth/(ae.width.baseVal.value-2*ve)/oe,Pt=se.naturalHeight/(ae.height.baseVal.value-2*ve)/pe,Me.width=se.naturalWidth/oe,Me.height=se.naturalHeight/pe):we.width!==void 0&&we.height!==void 0&&(rt=we.width/de.width,Pt=we.height/de.height,Me.width*=rt,Me.height*=Pt);var Xt=Me.getContext("2d");Xt.translate(Me.width/2,Me.height/2),Xt.rotate(ie*Math.PI/180),Xt.scale(oe,pe),Xt.translate(-Me.width/2,-Me.height/2),Xt.drawImage(se,0,0,Me.width,Me.height);var lt=document.createElement("canvas");lt.width=de.width*rt,lt.height=de.height*Pt,lt.getContext("2d").putImageData(Xt.getImageData((de.x-ve)*rt,(de.y-ve)*Pt,de.width*rt,de.height*Pt),0,0),Ae(lt.toDataURL(we.imageType,we.imageQuality))})},fe}(),Mt=function(){function fe(ae){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=fe.instanceCounter++,this.styles=new V(this.instanceNo),this.target=ae,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(fe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ae){this._zoomToCropEnabled=ae,ae?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ae){this._isGridVisible=ae,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ae){this._gridLines=ae,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ae){this._rotationAngle=ae,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"aspectRatio",{get:function(){var ae;return(ae=this._aspectRatio)!==null&&ae!==void 0?ae:this.aspectRatios[0]},set:function(ae){this._aspectRatio=ae},enumerable:!1,configurable:!0}),fe.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},fe.prototype.show=function(){this.showUI(),this.open()},fe.prototype.close=function(ae){ae===void 0&&(ae=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ae||this.closeEventListeners.forEach(function(se){return se()}),this._isOpen=!1)},fe.prototype.addRenderEventListener=function(ae){this.renderEventListeners.push(ae)},fe.prototype.removeRenderEventListener=function(ae){this.renderEventListeners.indexOf(ae)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ae),1)},fe.prototype.addCloseEventListener=function(ae){this.closeEventListeners.push(ae)},fe.prototype.removeCloseEventListener=function(ae){this.closeEventListeners.indexOf(ae)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ae),1)},fe.prototype.setupResizeObserver=function(){var ae=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ae.resize(ae.target.clientWidth,ae.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))},fe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ae=1*this.target.clientWidth/this.target.clientHeight,se=this.contentDiv.clientWidth/ae>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ae:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,de=se+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ae;this.resize(se,de)}},fe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},fe.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",K.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},fe.prototype.resize=function(ae,se){this.imageWidth=Math.round(ae),this.imageHeight=Math.round(se),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},fe.prototype.setEditingTarget=function(){var ae=document.createElement("canvas");ae.width=this.target.naturalWidth,ae.height=this.target.naturalHeight,ae.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var se=ae.toDataURL();K.setAttributes(this.editingTarget,[["href",se]]),this.setEditingTargetSize()},fe.prototype.setTopLeft=function(){var ae=this.target.getBoundingClientRect(),se=this.editorCanvas.getBoundingClientRect();this.left=ae.left-se.left-this.CANVAS_MARGIN,this.top=ae.top-se.top-this.CANVAS_MARGIN},fe.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=K.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=K.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=K.createGroup(),this.editingTargetRotationScaleContainer=K.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ae=K.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ae);var se=K.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(se),this.editingTargetContainer=K.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},fe.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},fe.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=K.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new ut(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},fe.prototype.zoomToCrop=function(){if(this.cropRect){var ae=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,se=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=ae+"px "+se+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ae+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-se+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},fe.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},fe.prototype.cropRectChanged=function(ae){this.cropRect=ae,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},fe.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},fe.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"},fe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},fe.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var ae=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,se=this.target.offsetTop>ae+this.CANVAS_MARGIN?this.target.offsetTop-(ae+this.CANVAS_MARGIN):0;this.coverDiv.style.top=se+"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},fe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},fe.prototype.addTopToolbar=function(){var ae=this;this.topToolbar=new Q,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 se=new Oe;se.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(se);var de=[];this.aspectRatios.forEach(function(Pt){var Xt=new Ye(Re.getIcon(Pt.horizontal,Pt.vertical),Pt.horizontal===0&&Pt.vertical===0?"FREE":Pt.horizontal+":"+Pt.vertical);Xt.onClick=function(){return ae.ratioButtonClicked(Pt)},de.push(Xt)}),this.aspectRatioButton=new He(Re.getIcon(0,0),"Aspect ratio",de),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,se.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ve=new Ye('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ve.isActive=this.isGridVisible,ve.onClick=function(){ae.isGridVisible=!ae.isGridVisible,ve.isActive=ae.isGridVisible},se.addButton(ve);var ie=new Ye('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(ie.isActive=this.zoomToCropEnabled,ie.onClick=function(){ae.zoomToCropEnabled=!ae.zoomToCropEnabled,ie.isActive=ae.zoomToCropEnabled},se.addButton(ie),!Z.isLicensed){var oe=new le;this.topToolbar.addElementBlock(oe);var pe=document.createElement("div");pe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var we=document.createElement("a");we.style.color="currentColor",we.href="https://markerjs.com/products/cropro",we.target="_blank",we.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',pe.appendChild(we),oe.addElement(pe)}var Ae=new Oe;Ae.minWidth=3*this.toolbarHeight+"px",Ae.contentAlign="end",this.topToolbar.addButtonBlock(Ae);var Me=new Ye('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Me.onClick=this.startRenderAndClose,Ae.addButton(Me),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Me.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var rt=new Ye('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");rt.onClick=this.close,Ae.addButton(rt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(rt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},fe.prototype.addBottomToolbar=function(){var ae=this;this.bottomToolbar=new Q,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 se=new Oe;se.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(se);var de=new Ye('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");de.onClick=this.rotateLeftButtonClicked,se.addButton(de);var ve=new Ye('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ve.onClick=this.rotateRightButtonClicked,se.addButton(ve);var ie=new le;ie.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ie),this.straightener=new Dt("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(Ae){ae.rotateBy(Ae),ae.straightener.angle=ae.rotationAngle},ie.addElement(this.straightener.getUI());var oe=new Oe;oe.minWidth=2*this.toolbarHeight+"px",oe.contentAlign="end",this.bottomToolbar.addButtonBlock(oe);var pe=new Ye('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");pe.onClick=this.flipHorizontallyButtonClicked,oe.addButton(pe);var we=new Ye('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");we.onClick=this.flipVerticallyButtonClicked,oe.addButton(we)},fe.prototype.ratioButtonClicked=function(ae){this.aspectRatio=ae,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},fe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Re.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},fe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ee(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},fe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},fe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},fe.prototype.restoreState=function(ae){if(ae){var se=this.cropLayer.getRescaledRect(ae.width,ae.height,this.imageWidth,this.imageHeight,ae.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(se),this.cropRectChanged(se),this.flippedHorizontally=ae.flippedHorizontally,this.flippedVertically=ae.flippedVertically,this.applyFlip(),this.rotationAngle=ae.rotationAngle,this.applyRotation()}},fe.prototype.clientToLocalCoordinates=function(ae,se){var de=this.cropImage.getBoundingClientRect();return{x:ae-de.left,y:se-de.top}},fe.prototype.onWindowResize=function(){this.positionUI()},fe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ae=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ae+"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()},fe.prototype.rotateLeftButtonClicked=function(){var ae=this.rotationAngle-90;this.rotationAngle%90!=0&&(ae+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ae)},fe.prototype.rotateRightButtonClicked=function(){var ae=this.rotationAngle+90;this.rotationAngle%90!=0&&(ae-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ae)},fe.prototype.rotateTo=function(ae){ae=(ae=ae>180?ae-360:ae)<=-180?ae+360:ae,this.rotationAngle=ae,this.applyRotation()},fe.prototype.rotateBy=function(ae){this.rotateTo((this.rotationAngle+ae)%360)},fe.prototype.applyRotation=function(){var ae=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var se=this.editingTargetRotationContainer.transform.baseVal.getItem(0);se.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(se,0);var de=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/de.width,this.imageHeight/de.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ae},fe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},fe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},fe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},fe.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,function(){var ae,se;return Ce(this,function(de){switch(de.label){case 0:return[4,this.render()];case 1:return ae=de.sent(),se=this.getState(),this.renderEventListeners.forEach(function(ve){return ve(ae,se)}),this.close(!0),[2]}})})},fe.prototype.render=function(){return je(this,void 0,void 0,function(){var ae;return Ce(this,function(se){switch(se.label){case 0:return(ae=new We).naturalSize=this.renderAtNaturalSize,ae.imageType=this.renderImageType,ae.imageQuality=this.renderImageQuality,ae.width=this.renderWidth,ae.height=this.renderHeight,this.unzoomFromCrop(),K.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ae.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 se.sent(),[4,ae.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,se.sent()]}})})},fe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("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 q("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var ae=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*ae)+`px;
height: `+(this.toolbarHeight-2*ae)+`px;
padding: `+ae+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new $("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new $("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new q("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 q("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new q("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 q("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*ae)+`px;
padding: `+ae+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new q("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},fe.instanceCounter=0,fe}(),Wt=M("8hTe"),Ne=M.n(Wt),Pe=/<pre[^>]*>/g;function it(fe){var ae=document.createElement("div");return ae.innerHTML=fe,ae.childNodes.length===0?"":ae.childNodes[0].nodeValue}var gt=ee.a=function(fe){var ae=fe.value,se=ae===void 0?"":ae,de=fe.edit,ve=de===void 0?!1:de,ie=fe.className,oe=fe.showTextOnly,pe=fe.showLines,we=fe.replaces,Ae=fe.zoomImg,Me=fe.hasMask,rt=fe.style,Pt=rt===void 0?{}:rt,Xt=fe.stylesPrev,lt=Xt===void 0?{}:Xt,zt=String(se),mt=Object(b.useRef)(),_t=Object(b.useRef)(),ot=Object(b.useState)(""),Se=Object(P.a)(ot,2),Ue=Se[0],At=Se[1],pt=Object(b.useState)("office"),jt=Object(P.a)(pt,2),Gt=jt[0],Ze=jt[1],at=function(){var Un=new Mt(_t.current);Un.displayMode="popup",Un.addRenderEventListener(function(){var ar=Object(C.a)(t.a.mark(function xn(zn){var nr;return t.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return mt.current.style.display="none",Cr.next=3,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zn}});case 3:nr=Cr.sent,nr!=null&&nr.id&&we(_t.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(nr==null?void 0:nr.id,"?type=").concat(nr.content_type));case 5:case"end":return Cr.stop()}},xn)}));return function(xn){return ar.apply(this,arguments)}}()),Un.show()},Tt=function(){var Un=new ce.a(_t.current);Un.settings.displayMode="popup",Un.addEventListener("render",function(){var ar=Object(C.a)(t.a.mark(function xn(zn){var nr;return t.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:if(mt.current.style.display="none",!_t.current){Cr.next=6;break}return Cr.next=4,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zn.dataUrl}});case 4:nr=Cr.sent,nr!=null&&nr.id&&we(_t.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(nr==null?void 0:nr.id,"?type=").concat(nr.content_type));case 6:case"end":return Cr.stop()}},xn)}));return function(xn){return ar.apply(this,arguments)}}()),Un.show(),window.markerArea=Un},Ht=Object(b.useMemo)(function(){mt.current&&(mt.current.style.zIndex=-1);try{var nn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ar=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;zt=zt.replace(nn,"("+z.a.API_SERVER+"/api/attachments/").replace(Un,'"'+z.a.API_SERVER+"/api/attachments/").replace(ar,'"'+z.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(Lr){}var xn=W(zt),zn=_();if(zt.match(/\[TOC\]/)&&(xn=xn.replace("<p>[TOC]</p>",k()),E()),xn=xn.replace(/(__special_katext_id_\d+__)/g,function(Lr,Cr){var en=zn[Cr],Yn=en.type,na=en.expression;return Object(J.renderToString)(it(na)||"",{displayMode:Yn==="block",throwOnError:!1,output:"html"})}),xn=xn.replace(/▁/g,"\u2581\u2581\u2581"),x(),oe){var nr=document.createElement("div");return nr.innerHTML=xn,nr.innerText}return setTimeout(function(){return Qn()},500),xn},[zt]),Jt=Object(b.useRef)();D.WebkitLineClamp=pe,pe&&(Pt=Object(S.a)(Object(S.a)({},Pt),D));function on(nn){var Un=nn.target;if(Un.tagName.toUpperCase()==="IMG"){if(Ae){var ar=Un.getAttribute("src");At(ar),Ze("image")}}else if(Un.tagName.toUpperCase()==="A"){var xn=Un.getAttribute("href");if(xn.indexOf("office")>-1)nn.preventDefault(),At(xn),Ze("office");else if(xn.indexOf("application/pdf")>-1)nn.preventDefault(),At(xn),Ze("pdf");else if(xn.indexOf("text/html")>-1)nn.preventDefault(),At(xn),Ze("html");else if(xn.startsWith("#")){nn.preventDefault();var zn=document.getElementById(xn.replace("#",""));zn&&zn.scrollIntoView(!0)}}}var Qn=function(){var Un,ar=(Un=Jt.current)===null||Un===void 0?void 0:Un.querySelectorAll("video");ar==null||ar.forEach(function(xn){if(xn.oncontextmenu=function(){return!1},xn.src.indexOf(".m3u8")>-1&&!xn.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var zn=new G.a;zn.loadSource(xn.src),zn.attachMedia(xn)}}})};Object(b.useEffect)(function(){if(Jt.current&&Ht&&(Ht.match(Pe)&&window.PR.prettyPrint()),Jt.current)return Jt.current.addEventListener("click",on),function(){Jt.current.removeEventListener("click",on),x(),E()}},[Ht,Jt.current,on]);var Hn=function(Un){if(!ve)return;Un.target.nodeName==="IMG"?(mt.current.style.zIndex=1,mt.current.style.display="flex",mt.current.style.width=Un.target.clientWidth+"px",mt.current.style.height=Un.target.clientHeight+"px",mt.current.style.top=Un.target.offsetTop+"px",mt.current.style.left=Un.target.offsetLeft+"px",_t.current.src=Un.target.getAttribute("src")):mt.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:Jt,style:Object(S.a)({},Pt),className:"".concat(ie||""," markdown-body ").concat(Ne.a.mdBody),onMouseOver:Hn,dangerouslySetInnerHTML:{__html:Ht}}),i.a.createElement("div",{ref:mt,className:Ne.a.button},i.a.createElement(B.a,null,i.a.createElement(F.a,{onClick:function(){return at()}},"\u88C1\u526A"),i.a.createElement(F.a,{onClick:function(){return Tt()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:_t,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(te.a,{close:!0,data:Ue,type:Ue!=null&&Ue.length?Gt:"",style:Object(S.a)({},lt),onClose:function(){return At("")}}))}},"9VGf":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return I});var X=M("q1tI"),B=M.n(X);function I(F,S){var C=Object(X.useRef)();Object(X.useEffect)(function(){C.current=F}),Object(X.useEffect)(function(){function P(){C.current()}if(S!==null){var y=setInterval(P,S);return function(){return clearInterval(y)}}},[S])}},AHFd:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return y});var X=M("giR+"),B=M("fyUT"),I=M("OaEy"),F=M("2fM7"),S=M("tJVT"),C=M("q1tI"),P=M.n(C),y;(function(b){b[b.Number=1]="Number",b[b.Percent=2]="Percent"})(y||(y={}));var t=function(i){var u=i.value,p=i.onChange,a=i.disabled,o=i.hidePercentOption,h=o===void 0?!1:o,l=Object(C.useMemo)(function(){return h?y.Number:y.Percent},[h]),n=Object(C.useState)(l),s=Object(S.a)(n,2),d=s[0],E=s[1],D=Object(C.useCallback)(function(k){return d===y.Number?"".concat(k,"\u5206"):"".concat(k,"%")},[d]),T=Object(C.useCallback)(function(k){if(d===y.Number){var w=k.replace("\u5206","");return isNaN(parseInt(w,10))?0:w}else{var v=k.replace("%","");return v}},[d]);return Object(C.useEffect)(function(){E(u.type)},[u]),P.a.createElement("div",{style:{display:"inline-block"}},P.a.createElement(F.a,{onChange:function(w){E(w),p({type:w,inputValue:w===y.Number?5:20})},value:d||l,style:{width:100},options:h?[{label:"\u5206\u503C",value:y.Number}]:[{label:"\u767E\u5206\u6BD4",value:y.Percent},{label:"\u5206\u503C",value:y.Number}],disabled:a}),P.a.createElement(B.a,{disabled:a,value:u.inputValue,formatter:D,parser:T,max:d===y.Percent?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:function(w){p({type:d,inputValue:w})}}))};ee.b=t},Aocz:function(ze,ee,M){ze.exports={flex_box_center:"flex_box_center___7n5J9",flex_space_between:"flex_space_between___1vC-V",flex_box_vertical_center:"flex_box_vertical_center___3gkLb",flex_box_center_end:"flex_box_center_end___26SUk",flex_box_column:"flex_box_column___2iv36",title:"title___ooa1w",menuTabs:"menuTabs___3mPq2",rightMenu:"rightMenu___2Vjbz",shixunDetail:"shixunDetail___2EXcB"}},BPZU:function(ze,ee){var M=32,X=7,B=256;function I(i){for(var u=0;i>=M;)u|=i&1,i>>=1;return i+u}function F(i,u,p,a){var o=u+1;if(o===p)return 1;if(a(i[o++],i[u])<0){for(;o<p&&a(i[o],i[o-1])<0;)o++;S(i,u,o)}else for(;o<p&&a(i[o],i[o-1])>=0;)o++;return o-u}function S(i,u,p){for(p--;u<p;){var a=i[u];i[u++]=i[p],i[p--]=a}}function C(i,u,p,a,o){for(a===u&&a++;a<p;a++){for(var h=i[a],l=u,n=a,s;l<n;)s=l+n>>>1,o(h,i[s])<0?n=s:l=s+1;var d=a-l;switch(d){case 3:i[l+3]=i[l+2];case 2:i[l+2]=i[l+1];case 1:i[l+1]=i[l];break;default:for(;d>0;)i[l+d]=i[l+d-1],d--}i[l]=h}}function P(i,u,p,a,o,h){var l=0,n=0,s=1;if(h(i,u[p+o])>0){for(n=a-o;s<n&&h(i,u[p+o+s])>0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),l+=o,s+=o}else{for(n=o+1;s<n&&h(i,u[p+o-s])<=0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var d=l;l=o-s,s=o-d}for(l++;l<s;){var E=l+(s-l>>>1);h(i,u[p+E])>0?l=E+1:s=E}return s}function y(i,u,p,a,o,h){var l=0,n=0,s=1;if(h(i,u[p+o])<0){for(n=o+1;s<n&&h(i,u[p+o-s])<0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var d=l;l=o-s,s=o-d}else{for(n=a-o;s<n&&h(i,u[p+o+s])>=0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),l+=o,s+=o}for(l++;l<s;){var E=l+(s-l>>>1);h(i,u[p+E])<0?s=E:l=E+1}return s}function t(i,u){var p=X,a=0,o=B,h=0,l,n,s=0;a=i.length,a<2*B&&(o=a>>>1);var d=[];h=a<120?5:a<1542?10:a<119151?19:40,l=[],n=[];function E(c,f){l[s]=c,n[s]=f,s+=1}function D(){for(;s>1;){var c=s-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]<n[c+1]&&c--;else if(n[c]>n[c+1])break;k(c)}}function T(){for(;s>1;){var c=s-2;c>0&&n[c-1]<n[c+1]&&c--,k(c)}}function k(c){var f=l[c],m=n[c],_=l[c+1],x=n[c+1];n[c]=m+x,c===s-3&&(l[c+1]=l[c+2],n[c+1]=n[c+2]),s--;var g=y(i[_],i,f,m,0,u);if(f+=g,m-=g,m===0)return;if(x=P(i[f+m-1],i,_,x,x-1,u),x===0)return;m<=x?w(f,m,_,x):v(f,m,_,x)}function w(c,f,m,_){var x=0;for(x=0;x<f;x++)d[x]=i[c+x];var g=0,j=m,U=c;if(i[U++]=i[j++],--_===0){for(x=0;x<f;x++)i[U+x]=d[g+x];return}if(f===1){for(x=0;x<_;x++)i[U+x]=i[j+x];i[U+_]=d[g];return}for(var R=p,W,H,L;;){W=0,H=0,L=!1;do if(u(i[j],d[g])<0){if(i[U++]=i[j++],H++,W=0,--_===0){L=!0;break}}else if(i[U++]=d[g++],W++,H=0,--f===1){L=!0;break}while((W|H)<R);if(L)break;do{if(W=y(i[j],d,g,f,0,u),W!==0){for(x=0;x<W;x++)i[U+x]=d[g+x];if(U+=W,g+=W,f-=W,f<=1){L=!0;break}}if(i[U++]=i[j++],--_===0){L=!0;break}if(H=P(d[g],i,j,_,0,u),H!==0){for(x=0;x<H;x++)i[U+x]=i[j+x];if(U+=H,j+=H,_-=H,_===0){L=!0;break}}if(i[U++]=d[g++],--f===1){L=!0;break}R--}while(W>=X||H>=X);if(L)break;R<0&&(R=0),R+=2}if(p=R,p<1&&(p=1),f===1){for(x=0;x<_;x++)i[U+x]=i[j+x];i[U+_]=d[g]}else{if(f===0)throw new Error;for(x=0;x<f;x++)i[U+x]=d[g+x]}}function v(c,f,m,_){var x=0;for(x=0;x<_;x++)d[x]=i[m+x];var g=c+f-1,j=_-1,U=m+_-1,R=0,W=0;if(i[U--]=i[g--],--f===0){for(R=U-(_-1),x=0;x<_;x++)i[R+x]=d[x];return}if(_===1){for(U-=f,g-=f,W=U+1,R=g+1,x=f-1;x>=0;x--)i[W+x]=i[R+x];i[U]=d[j];return}for(var H=p;;){var L=0,G=0,z=!1;do if(u(d[j],i[g])<0){if(i[U--]=i[g--],L++,G=0,--f===0){z=!0;break}}else if(i[U--]=d[j--],G++,L=0,--_===1){z=!0;break}while((L|G)<H);if(z)break;do{if(L=f-y(d[j],i,c,f,f-1,u),L!==0){for(U-=L,g-=L,f-=L,W=U+1,R=g+1,x=L-1;x>=0;x--)i[W+x]=i[R+x];if(f===0){z=!0;break}}if(i[U--]=d[j--],--_===1){z=!0;break}if(G=_-P(i[g],d,0,_,_-1,u),G!==0){for(U-=G,j-=G,_-=G,W=U+1,R=j+1,x=0;x<G;x++)i[W+x]=d[R+x];if(_<=1){z=!0;break}}if(i[U--]=i[g--],--f===0){z=!0;break}H--}while(L>=X||G>=X);if(z)break;H<0&&(H=0),H+=2}if(p=H,p<1&&(p=1),_===1){for(U-=f,g-=f,W=U+1,R=g+1,x=f-1;x>=0;x--)i[W+x]=i[R+x];i[U]=d[j]}else{if(_===0)throw new Error;for(R=U-(_-1),x=0;x<_;x++)i[R+x]=d[x]}}this.mergeRuns=D,this.forceMergeRuns=T,this.pushRun=E}function b(i,u,p,a){p||(p=0),a||(a=i.length);var o=a-p;if(o<2)return;var h=0;if(o<M){h=F(i,p,a,u),C(i,p,a,p+h,u);return}var l=new t(i,u),n=I(o);do{if(h=F(i,p,a,u),h<n){var s=o;s>n&&(s=n),C(i,p,p+s,p+h,u),h=s}l.pushRun(p,h),l.mergeRuns(),o-=h,p+=h}while(o!==0);l.forceMergeRuns()}ze.exports=b},BU3w:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return C});var X=M("MNnm"),B="rc-util-key";function I(P){if(P.attachTo)return P.attachTo;var y=document.querySelector("head");return y||document.body}function F(P){var y,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(X.a)())return null;var b=document.createElement("style");if((y=t.csp)===null||y===void 0?void 0:y.nonce){var i;b.nonce=(i=t.csp)===null||i===void 0?void 0:i.nonce}b.innerHTML=P;var u=I(t),p=u.firstChild;return t.prepend&&u.prepend?u.prepend(b):t.prepend&&p?u.insertBefore(b,p):u.appendChild(b),b}var S=new Map;function C(P,y){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=I(t);if(!S.has(b)){var i=F("",t),u=i.parentNode;S.set(b,u),u.removeChild(i)}var p=Array.from(S.get(b).children).find(function(n){return n.tagName==="STYLE"&&n[B]===y});if(p){var a,o;if(((a=t.csp)===null||a===void 0?void 0:a.nonce)&&p.nonce!==((o=t.csp)===null||o===void 0?void 0:o.nonce)){var h;p.nonce=(h=t.csp)===null||h===void 0?void 0:h.nonce}return p.innerHTML!==P&&(p.innerHTML=P),p}var l=F(P,t);return l[B]=y,l}},Bd2K:function(ze,ee,M){(function(X){X(M("VrN/"),M("osHv"))})(function(X){X.defineOption("autoCloseTags",!1,function(t,b,i){if(i!=X.Init&&i&&t.removeKeyMap("autoCloseTags"),!b)return;var u={name:"autoCloseTags"};(typeof b!="object"||b.whenClosing!==!1)&&(u["'/'"]=function(p){return C(p)}),(typeof b!="object"||b.whenOpening!==!1)&&(u["'>'"]=function(p){return F(p)}),t.addKeyMap(u)});var B=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],I=["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 F(t){if(t.getOption("disableInput"))return X.Pass;for(var b=t.listSelections(),i=[],u=t.getOption("autoCloseTags"),p=0;p<b.length;p++){if(!b[p].empty())return X.Pass;var a=b[p].head,o=t.getTokenAt(a),h=X.innerMode(t.getMode(),o.state),l=h.state,n=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(l),s=n&&n.name;if(!s)return X.Pass;var d=h.mode.configuration=="html",E=typeof u=="object"&&u.dontCloseTags||d&&B,D=typeof u=="object"&&u.indentTags||d&&I;o.end>a.ch&&(s=s.slice(0,s.length-o.end+a.ch));var T=s.toLowerCase();if(!s||o.type=="string"&&(o.end!=a.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&n.close||o.string.indexOf("/")==a.ch-o.start-1||E&&P(E,T)>-1||y(t,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(l)||[],s,a,!0))return X.Pass;var k=typeof u=="object"&&u.emptyTags;if(k&&P(k,s)>-1){i[p]={text:"/>",newPos:X.Pos(a.line,a.ch+2)};continue}var w=D&&P(D,T)>-1;i[p]={indent:w,text:">"+(w?`
`:"")+"</"+s+">",newPos:w?X.Pos(a.line+1,0):X.Pos(a.line,a.ch+1)}}for(var v=typeof u=="object"&&u.dontIndentOnAutoClose,p=b.length-1;p>=0;p--){var c=i[p];t.replaceRange(c.text,b[p].head,b[p].anchor,"+insert");var f=t.listSelections().slice(0);f[p]={head:c.newPos,anchor:c.newPos},t.setSelections(f),!v&&c.indent&&(t.indentLine(c.newPos.line,null,!0),t.indentLine(c.newPos.line+1,null,!0))}}function S(t,b){for(var i=t.listSelections(),u=[],p=b?"/":"</",a=t.getOption("autoCloseTags"),o=typeof a=="object"&&a.dontIndentOnSlash,h=0;h<i.length;h++){if(!i[h].empty())return X.Pass;var l=i[h].head,n=t.getTokenAt(l),s=X.innerMode(t.getMode(),n.state),d=s.state;if(b&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=l.ch-1))return X.Pass;var E,D=s.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(D&&s.mode.name=="javascript")E=p+"script";else if(D&&s.mode.name=="css")E=p+"style";else{var T=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(d);if(!T||T.length&&y(t,T,T[T.length-1],l))return X.Pass;E=p+T[T.length-1]}t.getLine(l.line).charAt(n.end)!=">"&&(E+=">"),u[h]=E}if(t.replaceSelections(u),i=t.listSelections(),!o)for(var h=0;h<i.length;h++)(h==i.length-1||i[h].head.line<i[h+1].head.line)&&t.indentLine(i[h].head.line)}function C(t){return t.getOption("disableInput")?X.Pass:S(t,!0)}X.commands.closeTag=function(t){return S(t)};function P(t,b){if(t.indexOf)return t.indexOf(b);for(var i=0,u=t.length;i<u;++i)if(t[i]==b)return i;return-1}function y(t,b,i,u,p){if(!X.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,u.line+500),o=X.scanForClosingTag(t,u,null,a);if(!o||o.tag!=i)return!1;for(var h=p?1:0,l=b.length-1;l>=0&&b[l]==i;l--)++h;u=o.to;for(var l=1;l<h;l++){var n=X.scanForClosingTag(t,u,null,a);if(!n||n.tag!=i)return!1;u=n.to}return!0}})},BdwD:function(ze,ee,M){"use strict";var X=M("+L6B"),B=M("2/Rp"),I=M("0Owb"),F=M("k1fw"),S=M("q1tI"),C=M.n(S),P=M("FOrL"),y=M.n(P),t=function(i){var u=i.buttonProps,p=u===void 0?{}:u,a=i.styles,o=a===void 0?{}:a,h=i.imgStyles,l=h===void 0?{}:h,n=i.customText,s=i.ButtonText,d=i.ButtonClick,E=i.Buttonclass,D=i.ButtonTwo;return C.a.createElement("section",{className:"tc animated fadeIn",style:Object(F.a)(Object(F.a)({},{color:"#999",margin:"0 auto",padding:"100px 0"}),o)},C.a.createElement("img",{src:y.a,style:Object(F.a)(Object(F.a)({},{width:"200px",height:"150px"}),l)}),C.a.createElement("p",{className:"mt10 font14"},n||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&C.a.createElement(B.a,Object(I.a)({className:E,onClick:d},p),s),D&&D)};ee.a=t},BjJ7:function(ze,ee,M){"use strict";M.d(ee,"d",function(){return B}),M.d(ee,"c",function(){return I}),M.d(ee,"e",function(){return F}),M.d(ee,"b",function(){return S}),M.d(ee,"a",function(){return P});var X=M("m3rI");function B(y){var t=!0;if(y.length>0){for(var b=0;b<y.length;b++)if(y[b].compile_success==0||!y[b].compile_success){t=!1;break}}else t=!1;return t}function I(y){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",b=[],i=0;i<y.length;i++){var u=y[i],p=t?"".concat(t,"/").concat(u.name):"".concat(u.name);b.push({title:u.name,isLeaf:!(u.type==="tree"),key:p})}return b}function F(y,t,b){for(var i=0;i<y.length;i++){var u=y[i];if(u.key===t){u.children=b;break}u.children&&F(u.children,t,b)}return y}function S(y,t,b){var i;return function(){var u=this,p=arguments,a=function(){i=null,b||y.apply(u,p)},o=b&&!i;clearTimeout(i),i=setTimeout(a,t),o&&y.apply(u,p)}}var C=!0,P=X.a.API_SERVER},BlVb:function(ze,ee,M){var X=M("hyiK"),B=1e-8;function I(S,C){return Math.abs(S-C)<B}function F(S,C,P){var y=0,t=S[0];if(!t)return!1;for(var b=1;b<S.length;b++){var i=S[b];y+=X(t[0],t[1],i[0],i[1],C,P),t=i}var u=S[0];return(!I(t[0],u[0])||!I(t[1],u[1]))&&(y+=X(t[0],t[1],u[0],u[1],C,P)),y!==0}ee.contain=F},BoW6:function(ze,ee,M){ze.exports={wrap:"wrap___1GPjg",maxWidth70:"maxWidth70___1Dk6g",maxWidth80:"maxWidth80___3b9PP",maxWidth100:"maxWidth100___3VHJ2",maxWidth110:"maxWidth110___35RUD",maxWidth120:"maxWidth120___1rOLr",reviewStatusTooltip:"reviewStatusTooltip___3i2cP",color32C:"color32C___2YC8o",MdEditor:"MdEditor___241c9",tr1:"tr1___3HOPl"}},Bq2U:function(ze,ee,M){var X=M("RDYZ"),B=M("Qe9p"),I=M("bYtY"),F=I.isArrayLike,S=Array.prototype.slice;function C(E,D){return E[D]}function P(E,D,T){E[D]=T}function y(E,D,T){return(D-E)*T+E}function t(E,D,T){return T>.5?D:E}function b(E,D,T,k,w){var v=E.length;if(w===1)for(var c=0;c<v;c++)k[c]=y(E[c],D[c],T);else for(var f=v&&E[0].length,c=0;c<v;c++)for(var m=0;m<f;m++)k[c][m]=y(E[c][m],D[c][m],T)}function i(E,D,T){var k=E.length,w=D.length;if(k!==w){var v=k>w;if(v)E.length=w;else for(var c=k;c<w;c++)E.push(T===1?D[c]:S.call(D[c]))}for(var f=E[0]&&E[0].length,c=0;c<E.length;c++)if(T===1)isNaN(E[c])&&(E[c]=D[c]);else for(var m=0;m<f;m++)isNaN(E[c][m])&&(E[c][m]=D[c][m])}function u(E,D,T){if(E===D)return!0;var k=E.length;if(k!==D.length)return!1;if(T===1){for(var w=0;w<k;w++)if(E[w]!==D[w])return!1}else for(var v=E[0].length,w=0;w<k;w++)for(var c=0;c<v;c++)if(E[w][c]!==D[w][c])return!1;return!0}function p(E,D,T,k,w,v,c,f,m){var _=E.length;if(m===1)for(var x=0;x<_;x++)f[x]=a(E[x],D[x],T[x],k[x],w,v,c);else for(var g=E[0].length,x=0;x<_;x++)for(var j=0;j<g;j++)f[x][j]=a(E[x][j],D[x][j],T[x][j],k[x][j],w,v,c)}function a(E,D,T,k,w,v,c){var f=(T-E)*.5,m=(k-D)*.5;return(2*(D-T)+f+m)*c+(-3*(D-T)-2*f-m)*v+f*w+D}function o(E){if(F(E)){var D=E.length;if(F(E[0])){for(var T=[],k=0;k<D;k++)T.push(S.call(E[k]));return T}return S.call(E)}return E}function h(E){return E[0]=Math.floor(E[0]),E[1]=Math.floor(E[1]),E[2]=Math.floor(E[2]),"rgba("+E.join(",")+")"}function l(E){var D=E[E.length-1].value;return F(D&&D[0])?2:1}function n(E,D,T,k,w,v){var c=E._getter,f=E._setter,m=D==="spline",_=k.length;if(!_)return;var x=k[0].value,g=F(x),j=!1,U=!1,R=g?l(k):0,W;k.sort(function(Oe,Ye){return Oe.time-Ye.time}),W=k[_-1].time;for(var H=[],L=[],G=k[0].value,z=!0,J=0;J<_;J++){H.push(k[J].time/W);var te=k[J].value;if(g&&u(te,G,R)||!g&&te===G||(z=!1),G=te,typeof te=="string"){var _e=B.parse(te);_e?(te=_e,j=!0):U=!0}L.push(te)}if(!v&&z)return;for(var ce=L[_-1],J=0;J<_-1;J++)g?i(L[J],ce,R):isNaN(L[J])&&!isNaN(ce)&&!U&&!j&&(L[J]=ce);g&&i(c(E._target,w),ce,R);var xe=0,Te=0,je,Ce,Z,K,V,$;if(j)var q=[0,0,0,0];var Q=function(Oe,Ye){var le;if(Ye<0)le=0;else if(Ye<Te){for(je=Math.min(xe+1,_-1),le=je;le>=0&&!(H[le]<=Ye);le--);le=Math.min(le,_-2)}else{for(le=xe;le<_&&!(H[le]>Ye);le++);le=Math.min(le-1,_-2)}xe=le,Te=Ye;var Ee=H[le+1]-H[le];if(Ee===0)return;if(Ce=(Ye-H[le])/Ee,m)if(K=L[le],Z=L[le===0?le:le-1],V=L[le>_-2?_-1:le+1],$=L[le>_-3?_-1:le+2],g)p(Z,K,V,$,Ce,Ce*Ce,Ce*Ce*Ce,c(Oe,w),R);else{var Re;if(j)Re=p(Z,K,V,$,Ce,Ce*Ce,Ce*Ce*Ce,q,1),Re=h(q);else{if(U)return t(K,V,Ce);Re=a(Z,K,V,$,Ce,Ce*Ce,Ce*Ce*Ce)}f(Oe,w,Re)}else if(g)b(L[le],L[le+1],Ce,c(Oe,w),R);else{var Re;if(j)b(L[le],L[le+1],Ce,q,1),Re=h(q);else{if(U)return t(L[le],L[le+1],Ce);Re=y(L[le],L[le+1],Ce)}f(Oe,w,Re)}},ge=new X({target:E._target,life:W,loop:E._loop,delay:E._delay,onframe:Q,ondestroy:T});return D&&D!=="spline"&&(ge.easing=D),ge}var s=function(E,D,T,k){this._tracks={},this._target=E,this._loop=D||!1,this._getter=T||C,this._setter=k||P,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};s.prototype={when:function(E,D){var T=this._tracks;for(var k in D){if(!D.hasOwnProperty(k))continue;if(!T[k]){T[k]=[];var w=this._getter(this._target,k);if(w==null)continue;E!==0&&T[k].push({time:0,value:o(w)})}T[k].push({time:E,value:D[k]})}return this},during:function(E){return this._onframeList.push(E),this},pause:function(){for(var E=0;E<this._clipList.length;E++)this._clipList[E].pause();this._paused=!0},resume:function(){for(var E=0;E<this._clipList.length;E++)this._clipList[E].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var E=this._doneList,D=E.length,T=0;T<D;T++)E[T].call(this)},start:function(E,D){var T=this,k=0,w=function(){k--,k||T._doneCallback()},v;for(var c in this._tracks){if(!this._tracks.hasOwnProperty(c))continue;var f=n(this,E,w,this._tracks[c],c,D);f&&(this._clipList.push(f),k++,this.animation&&this.animation.addClip(f),v=f)}if(v){var m=v.onframe;v.onframe=function(_,x){m(_,x);for(var g=0;g<T._onframeList.length;g++)T._onframeList[g](_,x)}}return k||this._doneCallback(),this},stop:function(E){for(var D=this._clipList,T=this.animation,k=0;k<D.length;k++){var w=D[k];E&&w.onframe(this._target,1),T&&T.removeClip(w)}D.length=0},delay:function(E){return this._delay=E,this},done:function(E){return E&&this._doneList.push(E),this},getClips:function(){return this._clipList}};var d=s;ze.exports=d},"C+DQ":function(ze,ee,M){},"C/vA":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return X});function X(B){const I=this;let F=!1,S;return function(){return F||(F=!0,S=B.apply(I,arguments)),S}}},C0SR:function(ze,ee,M){var X=M("YH21"),B=function(){this._track=[]};B.prototype={constructor:B,recognize:function(P,y,t){return this._doTrack(P,y,t),this._recognize(P)},clear:function(){return this._track.length=0,this},_doTrack:function(P,y,t){var b=P.touches;if(!b)return;for(var i={points:[],touches:[],target:y,event:P},u=0,p=b.length;u<p;u++){var a=b[u],o=X.clientToLocal(t,a,{});i.points.push([o.zrX,o.zrY]),i.touches.push(a)}this._track.push(i)},_recognize:function(P){for(var y in S)if(S.hasOwnProperty(y)){var t=S[y](this._track,P);if(t)return t}}};function I(P){var y=P[1][0]-P[0][0],t=P[1][1]-P[0][1];return Math.sqrt(y*y+t*t)}function F(P){return[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2]}var S={pinch:function(P,y){var t=P.length;if(!t)return;var b=(P[t-1]||{}).points,i=(P[t-2]||{}).points||b;if(i&&i.length>1&&b&&b.length>1){var u=I(b)/I(i);!isFinite(u)&&(u=1),y.pinchScale=u;var p=F(b);return y.pinchX=p[0],y.pinchY=p[1],{type:"pinch",target:P[0].target,event:y}}}},C=B;ze.exports=C},"Cg/j":function(ze,ee,M){"use strict";M.d(ee,"b",function(){return X}),M.d(ee,"a",function(){return B}),M.d(ee,"c",function(){return F}),M.d(ee,"d",function(){return S});var X;(function(C){C.serviceIds=new Map,C.DI_TARGET="$di$target",C.DI_DEPENDENCIES="$di$dependencies";function P(y){return y[C.DI_DEPENDENCIES]||[]}C.getServiceDependencies=P})(X||(X={}));const B=F("instantiationService");function I(C,P,y,t){P[X.DI_TARGET]===P?P[X.DI_DEPENDENCIES].push({id:C,index:y,optional:t}):(P[X.DI_DEPENDENCIES]=[{id:C,index:y,optional:t}],P[X.DI_TARGET]=P)}function F(C){if(X.serviceIds.has(C))return X.serviceIds.get(C);const P=function(y,t,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(P,y,b,!1)};return P.toString=()=>C,X.serviceIds.set(C,P),P}function S(C){return function(P,y,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");I(C,P,t,!0)}}},DBLp:function(ze,ee){function M(){}M.prototype={diff:function(S,C,P){P||(P=function(s,d){return s===d}),this.equals=P;var y=this;S=S.slice(),C=C.slice();var t=C.length,b=S.length,i=1,u=t+b,p=[{newPos:-1,components:[]}],a=this.extractCommon(p[0],C,S,0);if(p[0].newPos+1>=t&&a+1>=b){for(var o=[],h=0;h<C.length;h++)o.push(h);return[{indices:o,count:C.length}]}function l(){for(var s=-1*i;s<=i;s+=2){var d,E=p[s-1],D=p[s+1],T=(D?D.newPos:0)-s;E&&(p[s-1]=void 0);var k=E&&E.newPos+1<t,w=D&&0<=T&&T<b;if(!k&&!w){p[s]=void 0;continue}if(!k||w&&E.newPos<D.newPos?(d=B(D),y.pushComponent(d.components,void 0,!0)):(d=E,d.newPos++,y.pushComponent(d.components,!0,void 0)),T=y.extractCommon(d,C,S,s),d.newPos+1>=t&&T+1>=b)return X(y,d.components,C,S);p[s]=d}i++}for(;i<=u;){var n=l();if(n)return n}},pushComponent:function(S,C,P){var y=S[S.length-1];y&&y.added===C&&y.removed===P?S[S.length-1]={count:y.count+1,added:C,removed:P}:S.push({count:1,added:C,removed:P})},extractCommon:function(S,C,P,y){for(var t=C.length,b=P.length,i=S.newPos,u=i-y,p=0;i+1<t&&u+1<b&&this.equals(C[i+1],P[u+1]);)i++,u++,p++;return p&&S.components.push({count:p}),S.newPos=i,u},tokenize:function(S){return S.slice()},join:function(S){return S.slice()}};function X(S,C,P,y){for(var t=0,b=C.length,i=0,u=0;t<b;t++){var p=C[t];if(p.removed){for(var a=[],o=u;o<u+p.count;o++)a.push(o);p.indices=a,u+=p.count}else{for(var a=[],o=i;o<i+p.count;o++)a.push(o);p.indices=a,i+=p.count,p.added||(u+=p.count)}}return C}function B(S){return{newPos:S.newPos,components:S.components.slice(0)}}var I=new M;function F(S,C,P){return I.diff(S,C,P)}ze.exports=F},DN4a:function(ze,ee,M){var X=M("Fofx"),B=M("QBsz"),I=X.identity,F=5e-5;function S(u){return u>F||u<-F}var C=function(u){u=u||{},u.position||(this.position=[0,0]),u.rotation==null&&(this.rotation=0),u.scale||(this.scale=[1,1]),this.origin=this.origin||null},P=C.prototype;P.transform=null,P.needLocalTransform=function(){return S(this.rotation)||S(this.position[0])||S(this.position[1])||S(this.scale[0]-1)||S(this.scale[1]-1)};var y=[];P.updateTransform=function(){var u=this.parent,p=u&&u.transform,a=this.needLocalTransform(),o=this.transform;if(!(a||p)){o&&I(o);return}o=o||X.create(),a?this.getLocalTransform(o):I(o),p&&(a?X.mul(o,u.transform,o):X.copy(o,u.transform)),this.transform=o;var h=this.globalScaleRatio;if(h!=null&&h!==1){this.getGlobalScale(y);var l=y[0]<0?-1:1,n=y[1]<0?-1:1,s=((y[0]-l)*h+l)/y[0]||0,d=((y[1]-n)*h+n)/y[1]||0;o[0]*=s,o[1]*=s,o[2]*=d,o[3]*=d}this.invTransform=this.invTransform||X.create(),X.invert(this.invTransform,o)},P.getLocalTransform=function(u){return C.getLocalTransform(this,u)},P.setTransform=function(u){var p=this.transform,a=u.dpr||1;p?u.setTransform(a*p[0],a*p[1],a*p[2],a*p[3],a*p[4],a*p[5]):u.setTransform(a,0,0,a,0,0)},P.restoreTransform=function(u){var p=u.dpr||1;u.setTransform(p,0,0,p,0,0)};var t=[],b=X.create();P.setLocalTransform=function(u){if(!u)return;var p=u[0]*u[0]+u[1]*u[1],a=u[2]*u[2]+u[3]*u[3],o=this.position,h=this.scale;S(p-1)&&(p=Math.sqrt(p)),S(a-1)&&(a=Math.sqrt(a)),u[0]<0&&(p=-p),u[3]<0&&(a=-a),o[0]=u[4],o[1]=u[5],h[0]=p,h[1]=a,this.rotation=Math.atan2(-u[1]/a,u[0]/p)},P.decomposeTransform=function(){if(!this.transform)return;var u=this.parent,p=this.transform;u&&u.transform&&(X.mul(t,u.invTransform,p),p=t);var a=this.origin;a&&(a[0]||a[1])&&(b[4]=a[0],b[5]=a[1],X.mul(t,p,b),t[4]-=a[0],t[5]-=a[1],p=t),this.setLocalTransform(p)},P.getGlobalScale=function(u){var p=this.transform;return u=u||[],p?(u[0]=Math.sqrt(p[0]*p[0]+p[1]*p[1]),u[1]=Math.sqrt(p[2]*p[2]+p[3]*p[3]),p[0]<0&&(u[0]=-u[0]),p[3]<0&&(u[1]=-u[1]),u):(u[0]=1,u[1]=1,u)},P.transformCoordToLocal=function(u,p){var a=[u,p],o=this.invTransform;return o&&B.applyTransform(a,a,o),a},P.transformCoordToGlobal=function(u,p){var a=[u,p],o=this.transform;return o&&B.applyTransform(a,a,o),a},C.getLocalTransform=function(u,p){p=p||[],I(p);var a=u.origin,o=u.scale||[1,1],h=u.rotation||0,l=u.position||[0,0];return a&&(p[4]-=a[0],p[5]-=a[1]),X.scale(p,p,o),h&&X.rotate(p,p,h),a&&(p[4]+=a[0],p[5]+=a[1]),p[4]+=l[0],p[5]+=l[1],p};var i=C;ze.exports=i},Dagg:function(ze,ee,M){var X=M("Gev7"),B=M("mFDi"),I=M("bYtY"),F=M("Xnb7");function S(P){X.call(this,P)}S.prototype={constructor:S,type:"image",brush:function(P,y){var t=this.style,b=t.image;t.bind(P,this,y);var i=this._image=F.createOrUpdateImage(b,this._image,this,this.onload);if(!i||!F.isImageReady(i))return;var u=t.x||0,p=t.y||0,a=t.width,o=t.height,h=i.width/i.height;if(a==null&&o!=null?a=o*h:o==null&&a!=null?o=a/h:a==null&&o==null&&(a=i.width,o=i.height),this.setTransform(P),t.sWidth&&t.sHeight){var l=t.sx||0,n=t.sy||0;P.drawImage(i,l,n,t.sWidth,t.sHeight,u,p,a,o)}else if(t.sx&&t.sy){var l=t.sx,n=t.sy,s=a-l,d=o-n;P.drawImage(i,l,n,s,d,u,p,a,o)}else P.drawImage(i,u,p,a,o);t.text!=null&&(this.restoreTransform(P),this.drawRectText(P,this.getBoundingRect()))},getBoundingRect:function(){var P=this.style;return this._rect||(this._rect=new B(P.x||0,P.y||0,P.width||0,P.height||0)),this._rect}},I.inherits(S,X);var C=S;ze.exports=C},DlQD:function(ze,ee,M){(function(X,B){ze.exports=B()})(this,function(){"use strict";function X(se,de){for(var ve=0;ve<de.length;ve++){var ie=de[ve];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(se,ie.key,ie)}}function B(se,de,ve){return de&&X(se.prototype,de),ve&&X(se,ve),se}function I(se,de){if(!se)return;if(typeof se=="string")return F(se,de);var ve=Object.prototype.toString.call(se).slice(8,-1);if(ve==="Object"&&se.constructor&&(ve=se.constructor.name),ve==="Map"||ve==="Set")return Array.from(se);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return F(se,de)}function F(se,de){(de==null||de>se.length)&&(de=se.length);for(var ve=0,ie=new Array(de);ve<de;ve++)ie[ve]=se[ve];return ie}function S(se,de){var ve;if(typeof Symbol=="undefined"||se[Symbol.iterator]==null){if(Array.isArray(se)||(ve=I(se))||de&&se&&typeof se.length=="number"){ve&&(se=ve);var ie=0;return function(){return ie>=se.length?{done:!0}:{done:!1,value:se[ie++]}}}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 ve=se[Symbol.iterator](),ve.next.bind(ve)}function C(se,de){return de={exports:{}},se(de,de.exports),de.exports}var P=C(function(se){function de(){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 ve(ie){se.exports.defaults=ie}se.exports={defaults:de(),getDefaults:de,changeDefaults:ve}}),y=P.defaults,t=P.getDefaults,b=P.changeDefaults,i=/[&<>"']/,u=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(de){return o[de]};function l(se,de){if(de){if(i.test(se))return se.replace(u,h)}else if(p.test(se))return se.replace(a,h);return se}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(se){return se.replace(n,function(de,ve){return ve=ve.toLowerCase(),ve==="colon"?":":ve.charAt(0)==="#"?ve.charAt(1)==="x"?String.fromCharCode(parseInt(ve.substring(2),16)):String.fromCharCode(+ve.substring(1)):""})}var d=/(^|[^\[])\^/g;function E(se,de){se=se.source||se,de=de||"";var ve={replace:function(oe,pe){return pe=pe.source||pe,pe=pe.replace(d,"$1"),se=se.replace(oe,pe),ve},getRegex:function(){return new RegExp(se,de)}};return ve}var D=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(se,de,ve){if(se){var ie;try{ie=decodeURIComponent(s(ve)).replace(D,"").toLowerCase()}catch(oe){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}de&&!T.test(ve)&&(ve=m(de,ve));try{ve=encodeURI(ve).replace(/%25/g,"%")}catch(oe){return null}return ve}var w={},v=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(se,de){w[" "+se]||(v.test(se)?w[" "+se]=se+"/":w[" "+se]=j(se,"/",!0)),se=w[" "+se];var ve=se.indexOf(":")===-1;return de.substring(0,2)==="//"?ve?de:se.replace(c,"$1")+de:de.charAt(0)==="/"?ve?de:se.replace(f,"$1")+de:se+de}var _={exec:function(){}};function x(se){for(var de=1,ve,ie;de<arguments.length;de++){ve=arguments[de];for(ie in ve)Object.prototype.hasOwnProperty.call(ve,ie)&&(se[ie]=ve[ie])}return se}function g(se,de){var ve=se.replace(/\|/g,function(pe,we,Ae){for(var Me=!1,rt=we;--rt>=0&&Ae[rt]==="\\";)Me=!Me;return Me?"|":" |"}),ie=ve.split(/ \|/),oe=0;if(ie.length>de)ie.splice(de);else for(;ie.length<de;)ie.push("");for(;oe<ie.length;oe++)ie[oe]=ie[oe].trim().replace(/\\\|/g,"|");return ie}function j(se,de,ve){var ie=se.length;if(ie===0)return"";for(var oe=0;oe<ie;){var pe=se.charAt(ie-oe-1);if(pe===de&&!ve)oe++;else if(pe!==de&&ve)oe++;else break}return se.substr(0,ie-oe)}function U(se,de){if(se.indexOf(de[1])===-1)return-1;for(var ve=se.length,ie=0,oe=0;oe<ve;oe++)if(se[oe]==="\\")oe++;else if(se[oe]===de[0])ie++;else if(se[oe]===de[1]&&(ie--,ie<0))return oe;return-1}function R(se){se&&se.sanitize&&!se.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var W={escape:l,unescape:s,edit:E,cleanUrl:k,resolveUrl:m,noopTest:_,merge:x,splitCells:g,rtrim:j,findClosingBracket:U,checkSanitizeDeprecation:R},H=P.defaults,L=W.rtrim,G=W.splitCells,z=W.escape,J=W.findClosingBracket;function te(se,de,ve){var ie=de.href,oe=de.title?z(de.title):null,pe=se[1].replace(/\\([\[\]])/g,"$1");return se[0].charAt(0)!=="!"?{type:"link",raw:ve,href:ie,title:oe,text:pe}:{type:"image",raw:ve,href:ie,title:oe,text:z(pe)}}function _e(se,de){var ve=se.match(/^(\s+)(?:```)/);if(ve===null)return de;var ie=ve[1];return de.split(`
`).map(function(oe){var pe=oe.match(/^\s+/);if(pe===null)return oe;var we=pe[0];return we.length>=ie.length?oe.slice(ie.length):oe}).join(`
`)}var ce=function(){function se(ve){this.options=ve||H}var de=se.prototype;return de.space=function(ie){var oe=this.rules.block.newline.exec(ie);if(oe)return oe[0].length>1?{type:"space",raw:oe[0]}:{raw:`
`}},de.code=function(ie,oe){var pe=this.rules.block.code.exec(ie);if(pe){var we=oe[oe.length-1];if(we&&we.type==="paragraph")return{raw:pe[0],text:pe[0].trimRight()};var Ae=pe[0].replace(/^ {4}/gm,"");return{type:"code",raw:pe[0],codeBlockStyle:"indented",text:this.options.pedantic?Ae:L(Ae,`
`)}}},de.fences=function(ie){var oe=this.rules.block.fences.exec(ie);if(oe){var pe=oe[0],we=_e(pe,oe[3]||"");return{type:"code",raw:pe,lang:oe[2]?oe[2].trim():oe[2],text:we}}},de.heading=function(ie){var oe=this.rules.block.heading.exec(ie);if(oe)return{type:"heading",raw:oe[0],depth:oe[1].length,text:oe[2]}},de.nptable=function(ie){var oe=this.rules.block.nptable.exec(ie);if(oe){var pe={type:"table",header:G(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
`):[],raw:oe[0]};if(pe.header.length===pe.align.length){var we=pe.align.length,Ae;for(Ae=0;Ae<we;Ae++)/^ *-+: *$/.test(pe.align[Ae])?pe.align[Ae]="right":/^ *:-+: *$/.test(pe.align[Ae])?pe.align[Ae]="center":/^ *:-+ *$/.test(pe.align[Ae])?pe.align[Ae]="left":pe.align[Ae]=null;for(we=pe.cells.length,Ae=0;Ae<we;Ae++)pe.cells[Ae]=G(pe.cells[Ae],pe.header.length);return pe}}},de.hr=function(ie){var oe=this.rules.block.hr.exec(ie);if(oe)return{type:"hr",raw:oe[0]}},de.blockquote=function(ie){var oe=this.rules.block.blockquote.exec(ie);if(oe){var pe=oe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:oe[0],text:pe}}},de.list=function(ie){var oe=this.rules.block.list.exec(ie);if(oe){for(var pe=oe[0],we=oe[2],Ae=we.length>1,Me=we[we.length-1]===")",rt={type:"list",raw:pe,ordered:Ae,start:Ae?+we.slice(0,-1):"",loose:!1,items:[]},Pt=oe[0].match(this.rules.block.item),Xt=!1,lt,zt,mt,_t,ot,Se,Ue,At=Pt.length,pt=0;pt<At;pt++)lt=Pt[pt],pe=lt,zt=lt.length,lt=lt.replace(/^ *([*+-]|\d+[.)]) */,""),~lt.indexOf(`
`)&&(zt-=lt.length,lt=this.options.pedantic?lt.replace(/^ {1,4}/gm,""):lt.replace(new RegExp("^ {1,"+zt+"}","gm"),"")),pt!==At-1&&(mt=this.rules.block.bullet.exec(Pt[pt+1])[0],(Ae?mt.length===1||!Me&&mt[mt.length-1]===")":mt.length>1||this.options.smartLists&&mt!==we)&&(_t=Pt.slice(pt+1).join(`
`),rt.raw=rt.raw.substring(0,rt.raw.length-_t.length),pt=At-1)),ot=Xt||/\n\n(?!\s*$)/.test(lt),pt!==At-1&&(Xt=lt.charAt(lt.length-1)===`
`,ot||(ot=Xt)),ot&&(rt.loose=!0),Se=/^\[[ xX]\] /.test(lt),Ue=void 0,Se&&(Ue=lt[1]!==" ",lt=lt.replace(/^\[[ xX]\] +/,"")),rt.items.push({type:"list_item",raw:pe,task:Se,checked:Ue,loose:ot,text:lt});return rt}},de.html=function(ie){var oe=this.rules.block.html.exec(ie);if(oe)return{type:this.options.sanitize?"paragraph":"html",raw:oe[0],pre:!this.options.sanitizer&&(oe[1]==="pre"||oe[1]==="script"||oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):z(oe[0]):oe[0]}},de.def=function(ie){var oe=this.rules.block.def.exec(ie);if(oe){oe[3]&&(oe[3]=oe[3].substring(1,oe[3].length-1));var pe=oe[1].toLowerCase().replace(/\s+/g," ");return{tag:pe,raw:oe[0],href:oe[2],title:oe[3]}}},de.table=function(ie){var oe=this.rules.block.table.exec(ie);if(oe){var pe={type:"table",header:G(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
`):[]};if(pe.header.length===pe.align.length){pe.raw=oe[0];var we=pe.align.length,Ae;for(Ae=0;Ae<we;Ae++)/^ *-+: *$/.test(pe.align[Ae])?pe.align[Ae]="right":/^ *:-+: *$/.test(pe.align[Ae])?pe.align[Ae]="center":/^ *:-+ *$/.test(pe.align[Ae])?pe.align[Ae]="left":pe.align[Ae]=null;for(we=pe.cells.length,Ae=0;Ae<we;Ae++)pe.cells[Ae]=G(pe.cells[Ae].replace(/^ *\| *| *\| *$/g,""),pe.header.length);return pe}}},de.lheading=function(ie){var oe=this.rules.block.lheading.exec(ie);if(oe)return{type:"heading",raw:oe[0],depth:oe[2].charAt(0)==="="?1:2,text:oe[1]}},de.paragraph=function(ie){var oe=this.rules.block.paragraph.exec(ie);if(oe)return{type:"paragraph",raw:oe[0],text:oe[1].charAt(oe[1].length-1)===`
`?oe[1].slice(0,-1):oe[1]}},de.text=function(ie,oe){var pe=this.rules.block.text.exec(ie);if(pe){var we=oe[oe.length-1];return we&&we.type==="text"?{raw:pe[0],text:pe[0]}:{type:"text",raw:pe[0],text:pe[0]}}},de.escape=function(ie){var oe=this.rules.inline.escape.exec(ie);if(oe)return{type:"escape",raw:oe[0],text:z(oe[1])}},de.tag=function(ie,oe,pe){var we=this.rules.inline.tag.exec(ie);if(we)return!oe&&/^<a /i.test(we[0])?oe=!0:oe&&/^<\/a>/i.test(we[0])&&(oe=!1),!pe&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?pe=!0:pe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(pe=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:oe,inRawBlock:pe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):z(we[0]):we[0]}},de.link=function(ie){var oe=this.rules.inline.link.exec(ie);if(oe){var pe=J(oe[2],"()");if(pe>-1){var we=oe[0].indexOf("!")===0?5:4,Ae=we+oe[1].length+pe;oe[2]=oe[2].substring(0,pe),oe[0]=oe[0].substring(0,Ae).trim(),oe[3]=""}var Me=oe[2],rt="";if(this.options.pedantic){var Pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Me);Pt?(Me=Pt[1],rt=Pt[3]):rt=""}else rt=oe[3]?oe[3].slice(1,-1):"";Me=Me.trim().replace(/^<([\s\S]*)>$/,"$1");var Xt=te(oe,{href:Me&&Me.replace(this.rules.inline._escapes,"$1"),title:rt&&rt.replace(this.rules.inline._escapes,"$1")},oe[0]);return Xt}},de.reflink=function(ie,oe){var pe;if((pe=this.rules.inline.reflink.exec(ie))||(pe=this.rules.inline.nolink.exec(ie))){var we=(pe[2]||pe[1]).replace(/\s+/g," ");if(we=oe[we.toLowerCase()],!we||!we.href){var Ae=pe[0].charAt(0);return{type:"text",raw:Ae,text:Ae}}var Me=te(pe,we,pe[0]);return Me}},de.strong=function(ie,oe,pe){pe===void 0&&(pe="");var we=this.rules.inline.strong.start.exec(ie);if(we&&(!we[1]||we[1]&&(pe===""||this.rules.inline.punctuation.exec(pe)))){oe=oe.slice(-1*ie.length);var Ae=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ae.lastIndex=0;for(var Me;(we=Ae.exec(oe))!=null;)if(Me=this.rules.inline.strong.middle.exec(oe.slice(0,we.index+3)),Me)return{type:"strong",raw:ie.slice(0,Me[0].length),text:ie.slice(2,Me[0].length-2)}}},de.em=function(ie,oe,pe){pe===void 0&&(pe="");var we=this.rules.inline.em.start.exec(ie);if(we&&(!we[1]||we[1]&&(pe===""||this.rules.inline.punctuation.exec(pe)))){oe=oe.slice(-1*ie.length);var Ae=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ae.lastIndex=0;for(var Me;(we=Ae.exec(oe))!=null;)if(Me=this.rules.inline.em.middle.exec(oe.slice(0,we.index+2)),Me)return{type:"em",raw:ie.slice(0,Me[0].length),text:ie.slice(1,Me[0].length-1)}}},de.codespan=function(ie){var oe=this.rules.inline.code.exec(ie);if(oe){var pe=oe[2].replace(/\n/g," "),we=/[^ ]/.test(pe),Ae=pe.startsWith(" ")&&pe.endsWith(" ");return we&&Ae&&(pe=pe.substring(1,pe.length-1)),pe=z(pe,!0),{type:"codespan",raw:oe[0],text:pe}}},de.br=function(ie){var oe=this.rules.inline.br.exec(ie);if(oe)return{type:"br",raw:oe[0]}},de.del=function(ie){var oe=this.rules.inline.del.exec(ie);if(oe)return{type:"del",raw:oe[0],text:oe[1]}},de.autolink=function(ie,oe){var pe=this.rules.inline.autolink.exec(ie);if(pe){var we,Ae;return pe[2]==="@"?(we=z(this.options.mangle?oe(pe[1]):pe[1]),Ae="mailto:"+we):(we=z(pe[1]),Ae=we),{type:"link",raw:pe[0],text:we,href:Ae,tokens:[{type:"text",raw:we,text:we}]}}},de.url=function(ie,oe){var pe;if(pe=this.rules.inline.url.exec(ie)){var we,Ae;if(pe[2]==="@")we=z(this.options.mangle?oe(pe[0]):pe[0]),Ae="mailto:"+we;else{var Me;do Me=pe[0],pe[0]=this.rules.inline._backpedal.exec(pe[0])[0];while(Me!==pe[0]);we=z(pe[0]),pe[1]==="www."?Ae="http://"+we:Ae=we}return{type:"link",raw:pe[0],text:we,href:Ae,tokens:[{type:"text",raw:we,text:we}]}}},de.inlineText=function(ie,oe,pe){var we=this.rules.inline.text.exec(ie);if(we){var Ae;return oe?Ae=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):z(we[0]):we[0]:Ae=z(this.options.smartypants?pe(we[0]):we[0]),{type:"text",raw:we[0],text:Ae}}},se}(),xe=W.noopTest,Te=W.edit,je=W.merge,Ce={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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:xe,table:xe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ce.def=Te(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex(),Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ce.item=Te(Ce.item,"gm").replace(/bull/g,Ce.bullet).getRegex(),Ce.list=Te(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex(),Ce._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",Ce._comment=/<!--(?!-?>)[\s\S]*?-->/,Ce.html=Te(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce.paragraph=Te(Ce._paragraph).replace("hr",Ce.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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ce._tag).getRegex(),Ce.blockquote=Te(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex(),Ce.normal=je({},Ce),Ce.gfm=je({},Ce.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*|$)"}),Ce.gfm.nptable=Te(Ce.gfm.nptable).replace("hr",Ce.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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ce._tag).getRegex(),Ce.gfm.table=Te(Ce.gfm.table).replace("hr",Ce.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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ce._tag).getRegex(),Ce.pedantic=je({},Ce.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:xe,paragraph:Te(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Z.punctuation=Te(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex(),Z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Z.em.start=Te(Z.em.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.middle=Te(Z.em.middle).replace(/punctuation/g,Z._punctuation).replace(/overlapSkip/g,Z._overlapSkip).getRegex(),Z.em.endAst=Te(Z.em.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.endUnd=Te(Z.em.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.start=Te(Z.strong.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.middle=Te(Z.strong.middle).replace(/punctuation/g,Z._punctuation).replace(/blockSkip/g,Z._blockSkip).getRegex(),Z.strong.endAst=Te(Z.strong.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.endUnd=Te(Z.strong.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.blockSkip=Te(Z._blockSkip,"g").getRegex(),Z.overlapSkip=Te(Z._overlapSkip,"g").getRegex(),Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Z._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])?)+(?![-_])/,Z.autolink=Te(Z.autolink).replace("scheme",Z._scheme).replace("email",Z._email).getRegex(),Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Z.tag=Te(Z.tag).replace("comment",Ce._comment).replace("attribute",Z._attribute).getRegex(),Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Z.link=Te(Z.link).replace("label",Z._label).replace("href",Z._href).replace("title",Z._title).getRegex(),Z.reflink=Te(Z.reflink).replace("label",Z._label).getRegex(),Z.reflinkSearch=Te(Z.reflinkSearch,"g").replace("reflink",Z.reflink).replace("nolink",Z.nolink).getRegex(),Z.normal=je({},Z),Z.pedantic=je({},Z.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:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",Z._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z._label).getRegex()}),Z.gfm=je({},Z.normal,{escape:Te(Z.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Z.gfm.url=Te(Z.gfm.url,"i").replace("email",Z.gfm._extended_email).getRegex(),Z.breaks=je({},Z.gfm,{br:Te(Z.br).replace("{2,}","*").getRegex(),text:Te(Z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var K={block:Ce,inline:Z},V=P.defaults,$=K.block,q=K.inline;function Q(se){return se.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ge(se){var de="",ve,ie,oe=se.length;for(ve=0;ve<oe;ve++)ie=se.charCodeAt(ve),Math.random()>.5&&(ie="x"+ie.toString(16)),de+="&#"+ie+";";return de}var Oe=function(){function se(ve){this.tokens=[],this.tokens.links=Object.create(null),this.options=ve||V,this.options.tokenizer=this.options.tokenizer||new ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:$.normal,inline:q.normal};this.options.pedantic?(ie.block=$.pedantic,ie.inline=q.pedantic):this.options.gfm&&(ie.block=$.gfm,this.options.breaks?ie.inline=q.breaks:ie.inline=q.gfm),this.tokenizer.rules=ie}se.lex=function(ie,oe){var pe=new se(oe);return pe.lex(ie)};var de=se.prototype;return de.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},de.blockTokens=function(ie,oe,pe){oe===void 0&&(oe=[]),pe===void 0&&(pe=!0),ie=ie.replace(/^ +$/gm,"");for(var we,Ae,Me,rt;ie;){if(we=this.tokenizer.space(ie)){ie=ie.substring(we.raw.length),we.type&&oe.push(we);continue}if(we=this.tokenizer.code(ie,oe)){ie=ie.substring(we.raw.length),we.type?oe.push(we):(rt=oe[oe.length-1],rt.raw+=`
`+we.raw,rt.text+=`
`+we.text);continue}if(we=this.tokenizer.fences(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.heading(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.nptable(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.hr(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.blockquote(ie)){ie=ie.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],pe),oe.push(we);continue}if(we=this.tokenizer.list(ie)){for(ie=ie.substring(we.raw.length),Me=we.items.length,Ae=0;Ae<Me;Ae++)we.items[Ae].tokens=this.blockTokens(we.items[Ae].text,[],!1);oe.push(we);continue}if(we=this.tokenizer.html(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(pe&&(we=this.tokenizer.def(ie))){ie=ie.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.lheading(ie)){ie=ie.substring(we.raw.length),oe.push(we);continue}if(pe&&(we=this.tokenizer.paragraph(ie))){ie=ie.substring(we.raw.length),oe.push(we);continue}if(we=this.tokenizer.text(ie,oe)){ie=ie.substring(we.raw.length),we.type?oe.push(we):(rt=oe[oe.length-1],rt.raw+=`
`+we.raw,rt.text+=`
`+we.text);continue}if(ie){var Pt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(Pt);break}else throw new Error(Pt)}}return oe},de.inline=function(ie){var oe,pe,we,Ae,Me,rt,Pt=ie.length;for(oe=0;oe<Pt;oe++){rt=ie[oe];switch(rt.type){case"paragraph":case"text":case"heading":{rt.tokens=[],this.inlineTokens(rt.text,rt.tokens);break}case"table":{for(rt.tokens={header:[],cells:[]},Ae=rt.header.length,pe=0;pe<Ae;pe++)rt.tokens.header[pe]=[],this.inlineTokens(rt.header[pe],rt.tokens.header[pe]);for(Ae=rt.cells.length,pe=0;pe<Ae;pe++)for(Me=rt.cells[pe],rt.tokens.cells[pe]=[],we=0;we<Me.length;we++)rt.tokens.cells[pe][we]=[],this.inlineTokens(Me[we],rt.tokens.cells[pe][we]);break}case"blockquote":{this.inline(rt.tokens);break}case"list":{for(Ae=rt.items.length,pe=0;pe<Ae;pe++)this.inline(rt.items[pe].tokens);break}}}return ie},de.inlineTokens=function(ie,oe,pe,we,Ae){oe===void 0&&(oe=[]),pe===void 0&&(pe=!1),we===void 0&&(we=!1),Ae===void 0&&(Ae="");var Me,rt=ie,Pt;if(this.tokens.links){var Xt=Object.keys(this.tokens.links);if(Xt.length>0)for(;(Pt=this.tokenizer.rules.inline.reflinkSearch.exec(rt))!=null;)Xt.includes(Pt[0].slice(Pt[0].lastIndexOf("[")+1,-1))&&(rt=rt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Pt=this.tokenizer.rules.inline.blockSkip.exec(rt))!=null;)rt=rt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(Me=this.tokenizer.escape(ie)){ie=ie.substring(Me.raw.length),oe.push(Me);continue}if(Me=this.tokenizer.tag(ie,pe,we)){ie=ie.substring(Me.raw.length),pe=Me.inLink,we=Me.inRawBlock,oe.push(Me);continue}if(Me=this.tokenizer.link(ie)){ie=ie.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,we)),oe.push(Me);continue}if(Me=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,we)),oe.push(Me);continue}if(Me=this.tokenizer.strong(ie,rt,Ae)){ie=ie.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],pe,we),oe.push(Me);continue}if(Me=this.tokenizer.em(ie,rt,Ae)){ie=ie.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],pe,we),oe.push(Me);continue}if(Me=this.tokenizer.codespan(ie)){ie=ie.substring(Me.raw.length),oe.push(Me);continue}if(Me=this.tokenizer.br(ie)){ie=ie.substring(Me.raw.length),oe.push(Me);continue}if(Me=this.tokenizer.del(ie)){ie=ie.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],pe,we),oe.push(Me);continue}if(Me=this.tokenizer.autolink(ie,ge)){ie=ie.substring(Me.raw.length),oe.push(Me);continue}if(!pe&&(Me=this.tokenizer.url(ie,ge))){ie=ie.substring(Me.raw.length),oe.push(Me);continue}if(Me=this.tokenizer.inlineText(ie,we,Q)){ie=ie.substring(Me.raw.length),Ae=Me.raw.slice(-1),oe.push(Me);continue}if(ie){var lt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return oe},B(se,null,[{key:"rules",get:function(){return{block:$,inline:q}}}]),se}(),Ye=P.defaults,le=W.cleanUrl,Ee=W.escape,Re=function(){function se(ve){this.options=ve||Ye}var de=se.prototype;return de.code=function(ie,oe,pe){var we=(oe||"").match(/\S*/)[0];if(this.options.highlight){var Ae=this.options.highlight(ie,we);Ae!=null&&Ae!==ie&&(pe=!0,ie=Ae)}return we?'<pre><code class="'+this.options.langPrefix+Ee(we,!0)+'">'+(pe?ie:Ee(ie,!0))+`</code></pre>
`:"<pre><code>"+(pe?ie:Ee(ie,!0))+`</code></pre>
`},de.blockquote=function(ie){return`<blockquote>
`+ie+`</blockquote>
`},de.html=function(ie){return ie},de.heading=function(ie,oe,pe,we){return this.options.headerIds?"<h"+oe+' id="'+this.options.headerPrefix+we.slug(pe)+'">'+ie+"</h"+oe+`>
`:"<h"+oe+">"+ie+"</h"+oe+`>
`},de.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},de.list=function(ie,oe,pe){var we=oe?"ol":"ul",Ae=oe&&pe!==1?' start="'+pe+'"':"";return"<"+we+Ae+`>
`+ie+"</"+we+`>
`},de.listitem=function(ie){return"<li>"+ie+`</li>
`},de.checkbox=function(ie){return"<input "+(ie?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},de.paragraph=function(ie){return"<p>"+ie+`</p>
`},de.table=function(ie,oe){return oe&&(oe="<tbody>"+oe+"</tbody>"),`<table>
<thead>
`+ie+`</thead>
`+oe+`</table>
`},de.tablerow=function(ie){return`<tr>
`+ie+`</tr>
`},de.tablecell=function(ie,oe){var pe=oe.header?"th":"td",we=oe.align?"<"+pe+' align="'+oe.align+'">':"<"+pe+">";return we+ie+"</"+pe+`>
`},de.strong=function(ie){return"<strong>"+ie+"</strong>"},de.em=function(ie){return"<em>"+ie+"</em>"},de.codespan=function(ie){return"<code>"+ie+"</code>"},de.br=function(){return this.options.xhtml?"<br/>":"<br>"},de.del=function(ie){return"<del>"+ie+"</del>"},de.link=function(ie,oe,pe){if(ie=le(this.options.sanitize,this.options.baseUrl,ie),ie===null)return pe;var we='<a href="'+Ee(ie)+'"';return oe&&(we+=' title="'+oe+'"'),we+=">"+pe+"</a>",we},de.image=function(ie,oe,pe){if(ie=le(this.options.sanitize,this.options.baseUrl,ie),ie===null)return pe;var we='<img src="'+ie+'" alt="'+pe+'"';return oe&&(we+=' title="'+oe+'"'),we+=this.options.xhtml?"/>":">",we},de.text=function(ie){return ie},se}(),He=function(){function se(){}var de=se.prototype;return de.strong=function(ie){return ie},de.em=function(ie){return ie},de.codespan=function(ie){return ie},de.del=function(ie){return ie},de.html=function(ie){return ie},de.text=function(ie){return ie},de.link=function(ie,oe,pe){return""+pe},de.image=function(ie,oe,pe){return""+pe},de.br=function(){return""},se}(),et=function(){function se(){this.seen={}}var de=se.prototype;return de.slug=function(ie){var oe=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(oe)){var pe=oe;do this.seen[pe]++,oe=pe+"-"+this.seen[pe];while(this.seen.hasOwnProperty(oe))}return this.seen[oe]=0,oe},se}(),ut=P.defaults,Dt=W.unescape,We=function(){function se(ve){this.options=ve||ut,this.options.renderer=this.options.renderer||new Re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He,this.slugger=new et}se.parse=function(ie,oe){var pe=new se(oe);return pe.parse(ie)};var de=se.prototype;return de.parse=function(ie,oe){oe===void 0&&(oe=!0);var pe="",we,Ae,Me,rt,Pt,Xt,lt,zt,mt,_t,ot,Se,Ue,At,pt,jt,Gt,Ze,at=ie.length;for(we=0;we<at;we++){_t=ie[we];switch(_t.type){case"space":continue;case"hr":{pe+=this.renderer.hr();continue}case"heading":{pe+=this.renderer.heading(this.parseInline(_t.tokens),_t.depth,Dt(this.parseInline(_t.tokens,this.textRenderer)),this.slugger);continue}case"code":{pe+=this.renderer.code(_t.text,_t.lang,_t.escaped);continue}case"table":{for(zt="",lt="",rt=_t.header.length,Ae=0;Ae<rt;Ae++)lt+=this.renderer.tablecell(this.parseInline(_t.tokens.header[Ae]),{header:!0,align:_t.align[Ae]});for(zt+=this.renderer.tablerow(lt),mt="",rt=_t.cells.length,Ae=0;Ae<rt;Ae++){for(Xt=_t.tokens.cells[Ae],lt="",Pt=Xt.length,Me=0;Me<Pt;Me++)lt+=this.renderer.tablecell(this.parseInline(Xt[Me]),{header:!1,align:_t.align[Me]});mt+=this.renderer.tablerow(lt)}pe+=this.renderer.table(zt,mt);continue}case"blockquote":{mt=this.parse(_t.tokens),pe+=this.renderer.blockquote(mt);continue}case"list":{for(ot=_t.ordered,Se=_t.start,Ue=_t.loose,rt=_t.items.length,mt="",Ae=0;Ae<rt;Ae++)pt=_t.items[Ae],jt=pt.checked,Gt=pt.task,At="",pt.task&&(Ze=this.renderer.checkbox(jt),Ue?pt.tokens.length>0&&pt.tokens[0].type==="text"?(pt.tokens[0].text=Ze+" "+pt.tokens[0].text,pt.tokens[0].tokens&&pt.tokens[0].tokens.length>0&&pt.tokens[0].tokens[0].type==="text"&&(pt.tokens[0].tokens[0].text=Ze+" "+pt.tokens[0].tokens[0].text)):pt.tokens.unshift({type:"text",text:Ze}):At+=Ze),At+=this.parse(pt.tokens,Ue),mt+=this.renderer.listitem(At,Gt,jt);pe+=this.renderer.list(mt,ot,Se);continue}case"html":{pe+=this.renderer.html(_t.text);continue}case"paragraph":{pe+=this.renderer.paragraph(this.parseInline(_t.tokens));continue}case"text":{for(mt=_t.tokens?this.parseInline(_t.tokens):_t.text;we+1<at&&ie[we+1].type==="text";)_t=ie[++we],mt+=`
`+(_t.tokens?this.parseInline(_t.tokens):_t.text);pe+=oe?this.renderer.paragraph(mt):mt;continue}default:{var Tt='Token with "'+_t.type+'" type was not found.';if(this.options.silent){console.error(Tt);return}else throw new Error(Tt)}}}return pe},de.parseInline=function(ie,oe){oe=oe||this.renderer;var pe="",we,Ae,Me=ie.length;for(we=0;we<Me;we++){Ae=ie[we];switch(Ae.type){case"escape":{pe+=oe.text(Ae.text);break}case"html":{pe+=oe.html(Ae.text);break}case"link":{pe+=oe.link(Ae.href,Ae.title,this.parseInline(Ae.tokens,oe));break}case"image":{pe+=oe.image(Ae.href,Ae.title,Ae.text);break}case"strong":{pe+=oe.strong(this.parseInline(Ae.tokens,oe));break}case"em":{pe+=oe.em(this.parseInline(Ae.tokens,oe));break}case"codespan":{pe+=oe.codespan(Ae.text);break}case"br":{pe+=oe.br();break}case"del":{pe+=oe.del(this.parseInline(Ae.tokens,oe));break}case"text":{pe+=oe.text(Ae.text);break}default:{var rt='Token with "'+Ae.type+'" type was not found.';if(this.options.silent){console.error(rt);return}else throw new Error(rt)}}}return pe},se}(),Mt=W.merge,Wt=W.checkSanitizeDeprecation,Ne=W.escape,Pe=P.getDefaults,it=P.changeDefaults,gt=P.defaults;function fe(se,de,ve){if(typeof se=="undefined"||se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(se)+", string expected");if(typeof de=="function"&&(ve=de,de=null),de=Mt({},fe.defaults,de||{}),Wt(de),ve){var ie=de.highlight,oe;try{oe=Oe.lex(se,de)}catch(Me){return ve(Me)}var pe=function(rt){var Pt;if(!rt)try{Pt=We.parse(oe,de)}catch(Xt){rt=Xt}return de.highlight=ie,rt?ve(rt):ve(null,Pt)};if(!ie||ie.length<3)return pe();if(delete de.highlight,!oe.length)return pe();var we=0;fe.walkTokens(oe,function(Me){Me.type==="code"&&(we++,setTimeout(function(){ie(Me.text,Me.lang,function(rt,Pt){if(rt)return pe(rt);Pt!=null&&Pt!==Me.text&&(Me.text=Pt,Me.escaped=!0),we--,we===0&&pe()})},0))}),we===0&&pe();return}try{var Ae=Oe.lex(se,de);return de.walkTokens&&fe.walkTokens(Ae,de.walkTokens),We.parse(Ae,de)}catch(Me){if(Me.message+=`
Please report this to https://github.com/markedjs/marked.`,de.silent)return"<p>An error occurred:</p><pre>"+Ne(Me.message+"",!0)+"</pre>";throw Me}}fe.options=fe.setOptions=function(se){return Mt(fe.defaults,se),it(fe.defaults),fe},fe.getDefaults=Pe,fe.defaults=gt,fe.use=function(se){var de=Mt({},se);if(se.renderer&&function(){var ie=fe.defaults.renderer||new Re,oe=function(Ae){var Me=ie[Ae];ie[Ae]=function(){for(var rt=arguments.length,Pt=new Array(rt),Xt=0;Xt<rt;Xt++)Pt[Xt]=arguments[Xt];var lt=se.renderer[Ae].apply(ie,Pt);return lt===!1&&(lt=Me.apply(ie,Pt)),lt}};for(var pe in se.renderer)oe(pe);de.renderer=ie}(),se.tokenizer&&function(){var ie=fe.defaults.tokenizer||new ce,oe=function(Ae){var Me=ie[Ae];ie[Ae]=function(){for(var rt=arguments.length,Pt=new Array(rt),Xt=0;Xt<rt;Xt++)Pt[Xt]=arguments[Xt];var lt=se.tokenizer[Ae].apply(ie,Pt);return lt===!1&&(lt=Me.apply(ie,Pt)),lt}};for(var pe in se.tokenizer)oe(pe);de.tokenizer=ie}(),se.walkTokens){var ve=fe.defaults.walkTokens;de.walkTokens=function(ie){se.walkTokens(ie),ve&&ve(ie)}}fe.setOptions(de)},fe.walkTokens=function(se,de){for(var ve=S(se),ie;!(ie=ve()).done;){var oe=ie.value;de(oe);switch(oe.type){case"table":{for(var pe=S(oe.tokens.header),we;!(we=pe()).done;){var Ae=we.value;fe.walkTokens(Ae,de)}for(var Me=S(oe.tokens.cells),rt;!(rt=Me()).done;)for(var Pt=rt.value,Xt=S(Pt),lt;!(lt=Xt()).done;){var zt=lt.value;fe.walkTokens(zt,de)}break}case"list":{fe.walkTokens(oe.items,de);break}default:oe.tokens&&fe.walkTokens(oe.tokens,de)}}},fe.Parser=We,fe.parser=We.parse,fe.Renderer=Re,fe.TextRenderer=He,fe.Lexer=Oe,fe.lexer=Oe.lex,fe.Tokenizer=ce,fe.Slugger=et,fe.parse=fe;var ae=fe;return ae})},ELLl:function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){var B={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},I=X.Pos;X.defineOption("autoCloseBrackets",!1,function(o,h,l){l&&l!=X.Init&&(o.removeKeyMap(S),o.state.closeBrackets=null),h&&(C(F(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(S))});function F(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:B[h]}var S={Backspace:t,Enter:b};function C(o){for(var h=0;h<o.length;h++){var l=o.charAt(h),n="'"+l+"'";S[n]||(S[n]=P(l))}}C(B.pairs+"`");function P(o){return function(h){return u(h,o)}}function y(o){var h=o.state.closeBrackets;if(!h||h.override)return h;var l=o.getModeAt(o.getCursor());return l.closeBrackets||h}function t(o){var h=y(o);if(!h||o.getOption("disableInput"))return X.Pass;for(var l=F(h,"pairs"),n=o.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return X.Pass;var d=p(o,n[s].head);if(!d||l.indexOf(d)%2!=0)return X.Pass}for(var s=n.length-1;s>=0;s--){var E=n[s].head;o.replaceRange("",I(E.line,E.ch-1),I(E.line,E.ch+1),"+delete")}}function b(o){var h=y(o),l=h&&F(h,"explode");if(!l||o.getOption("disableInput"))return X.Pass;for(var n=o.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return X.Pass;var d=p(o,n[s].head);if(!d||l.indexOf(d)%2!=0)return X.Pass}o.operation(function(){var E=o.lineSeparator()||`
`;o.replaceSelection(E+E,null),o.execCommand("goCharLeft"),n=o.listSelections();for(var D=0;D<n.length;D++){var T=n[D].head.line;o.indentLine(T,null,!0),o.indentLine(T+1,null,!0)}})}function i(o){var h=X.cmpPos(o.anchor,o.head)>0;return{anchor:new I(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new I(o.head.line,o.head.ch+(h?1:-1))}}function u(o,h){var l=y(o);if(!l||o.getOption("disableInput"))return X.Pass;var n=F(l,"pairs"),s=n.indexOf(h);if(s==-1)return X.Pass;for(var d=F(l,"closeBefore"),E=F(l,"triples"),D=n.charAt(s+1)==h,T=o.listSelections(),k=s%2==0,w,v=0;v<T.length;v++){var c=T[v],f=c.head,m,_=o.getRange(f,I(f.line,f.ch+1));if(k&&!c.empty())m="surround";else if((D||!k)&&_==h)D&&a(o,f)?m="both":E.indexOf(h)>=0&&o.getRange(f,I(f.line,f.ch+3))==h+h+h?m="skipThree":m="skip";else if(D&&f.ch>1&&E.indexOf(h)>=0&&o.getRange(I(f.line,f.ch-2),f)==h+h){if(f.ch>2&&/\bstring/.test(o.getTokenTypeAt(I(f.line,f.ch-2))))return X.Pass;m="addFour"}else if(D){var x=f.ch==0?" ":o.getRange(I(f.line,f.ch-1),f);if(!X.isWordChar(_)&&x!=h&&!X.isWordChar(x))m="both";else return X.Pass}else if(k&&(_.length===0||/\s/.test(_)||d.indexOf(_)>-1))m="both";else return X.Pass;if(!w)w=m;else if(w!=m)return X.Pass}var g=s%2?n.charAt(s-1):h,j=s%2?h:n.charAt(s+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var U=0;U<3;U++)o.execCommand("goCharRight");else if(w=="surround"){for(var R=o.getSelections(),U=0;U<R.length;U++)R[U]=g+R[U]+j;o.replaceSelections(R,"around"),R=o.listSelections().slice();for(var U=0;U<R.length;U++)R[U]=i(R[U]);o.setSelections(R)}else w=="both"?(o.replaceSelection(g+j,null),o.triggerElectric(g+j),o.execCommand("goCharLeft")):w=="addFour"&&(o.replaceSelection(g+g+g+g,"before"),o.execCommand("goCharRight"))})}function p(o,h){var l=o.getRange(I(h.line,h.ch-1),I(h.line,h.ch+1));return l.length==2?l:null}function a(o,h){var l=o.getTokenAt(I(h.line,h.ch+1));return/\bstring/.test(l.type)&&l.start==h.ch&&(h.ch==0||!/\bstring/.test(o.getTokenTypeAt(h)))}})},FOrL:function(ze,ee,M){ze.exports=M.p+"static/nodata.a6b3f948.png"},FWmy:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return X});function X(B,I){if(!B)throw new Error(I?`Assertion failed (${I})`:"Assertion Failed")}},Fofx:function(ze,ee){var M=typeof Float32Array=="undefined"?Array:Float32Array;function X(){var b=new M(6);return B(b),b}function B(b){return b[0]=1,b[1]=0,b[2]=0,b[3]=1,b[4]=0,b[5]=0,b}function I(b,i){return b[0]=i[0],b[1]=i[1],b[2]=i[2],b[3]=i[3],b[4]=i[4],b[5]=i[5],b}function F(b,i,u){var p=i[0]*u[0]+i[2]*u[1],a=i[1]*u[0]+i[3]*u[1],o=i[0]*u[2]+i[2]*u[3],h=i[1]*u[2]+i[3]*u[3],l=i[0]*u[4]+i[2]*u[5]+i[4],n=i[1]*u[4]+i[3]*u[5]+i[5];return b[0]=p,b[1]=a,b[2]=o,b[3]=h,b[4]=l,b[5]=n,b}function S(b,i,u){return b[0]=i[0],b[1]=i[1],b[2]=i[2],b[3]=i[3],b[4]=i[4]+u[0],b[5]=i[5]+u[1],b}function C(b,i,u){var p=i[0],a=i[2],o=i[4],h=i[1],l=i[3],n=i[5],s=Math.sin(u),d=Math.cos(u);return b[0]=p*d+h*s,b[1]=-p*s+h*d,b[2]=a*d+l*s,b[3]=-a*s+d*l,b[4]=d*o+s*n,b[5]=d*n-s*o,b}function P(b,i,u){var p=u[0],a=u[1];return b[0]=i[0]*p,b[1]=i[1]*a,b[2]=i[2]*p,b[3]=i[3]*a,b[4]=i[4]*p,b[5]=i[5]*a,b}function y(b,i){var u=i[0],p=i[2],a=i[4],o=i[1],h=i[3],l=i[5],n=u*h-o*p;return n?(n=1/n,b[0]=h*n,b[1]=-o*n,b[2]=-p*n,b[3]=u*n,b[4]=(p*l-h*a)*n,b[5]=(o*a-u*l)*n,b):null}function t(b){var i=X();return I(i,b),i}ee.create=X,ee.identity=B,ee.copy=I,ee.mul=F,ee.translate=S,ee.rotate=C,ee.scale=P,ee.invert=y,ee.clone=t},FxDU:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.createSensor=void 0;var X=M("QO+J"),B=M("j5sG"),I=typeof ResizeObserver!="undefined"?B.createSensor:X.createSensor;ee.createSensor=I},Gev7:function(ze,ee,M){var X=M("bYtY"),B=M("K2GJ"),I=M("1bdT"),F=M("ni6a");function S(P){P=P||{},I.call(this,P);for(var y in P)P.hasOwnProperty(y)&&y!=="style"&&(this[y]=P[y]);this.style=new B(P.style,this),this._rect=null,this.__clipPaths=null}S.prototype={constructor:S,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(P){},afterBrush:function(P){},brush:function(P,y){},getBoundingRect:function(){},contain:function(P,y){return this.rectContain(P,y)},traverse:function(P,y){P.call(y,this)},rectContain:function(P,y){var t=this.transformCoordToLocal(P,y),b=this.getBoundingRect();return b.contain(t[0],t[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(P){return this.animate("style",P)},attrKV:function(P,y){P!=="style"?I.prototype.attrKV.call(this,P,y):this.style.set(y)},setStyle:function(P,y){return this.style.set(P,y),this.dirty(!1),this},useStyle:function(P){return this.style=new B(P,this),this.dirty(!1),this},calculateTextPosition:null},X.inherits(S,I),X.mixin(S,F);var C=S;ze.exports=C},Gytx:function(ze,ee){ze.exports=function(X,B,I,F){var S=I?I.call(F,X,B):void 0;if(S!==void 0)return!!S;if(X===B)return!0;if(typeof X!="object"||!X||typeof B!="object"||!B)return!1;var C=Object.keys(X),P=Object.keys(B);if(C.length!==P.length)return!1;for(var y=Object.prototype.hasOwnProperty.bind(B),t=0;t<C.length;t++){var b=C[t];if(!y(b))return!1;var i=X[b],u=B[b];if(S=I?I.call(F,i,u,b):void 0,S===!1||S===void 0&&i!==u)return!1}return!0}},H6uX:function(ze,ee){var M=Array.prototype.slice,X=function(S){this._$handlers={},this._$eventProcessor=S};X.prototype={constructor:X,one:function(S,C,P,y){return I(this,S,C,P,y,!0)},on:function(S,C,P,y){return I(this,S,C,P,y,!1)},isSilent:function(S){var C=this._$handlers;return!C[S]||!C[S].length},off:function(S,C){var P=this._$handlers;if(!S)return this._$handlers={},this;if(C){if(P[S]){for(var y=[],t=0,b=P[S].length;t<b;t++)P[S][t].h!==C&&y.push(P[S][t]);P[S]=y}P[S]&&P[S].length===0&&delete P[S]}else delete P[S];return this},trigger:function(S){var C=this._$handlers[S],P=this._$eventProcessor;if(C){var y=arguments,t=y.length;t>3&&(y=M.call(y,1));for(var b=C.length,i=0;i<b;){var u=C[i];if(P&&P.filter&&u.query!=null&&!P.filter(S,u.query)){i++;continue}switch(t){case 1:u.h.call(u.ctx);break;case 2:u.h.call(u.ctx,y[1]);break;case 3:u.h.call(u.ctx,y[1],y[2]);break;default:u.h.apply(u.ctx,y);break}u.one?(C.splice(i,1),b--):i++}}return P&&P.afterTrigger&&P.afterTrigger(S),this},triggerWithContext:function(S){var C=this._$handlers[S],P=this._$eventProcessor;if(C){var y=arguments,t=y.length;t>4&&(y=M.call(y,1,y.length-1));for(var b=y[y.length-1],i=C.length,u=0;u<i;){var p=C[u];if(P&&P.filter&&p.query!=null&&!P.filter(S,p.query)){u++;continue}switch(t){case 1:p.h.call(b);break;case 2:p.h.call(b,y[1]);break;case 3:p.h.call(b,y[1],y[2]);break;default:p.h.apply(b,y);break}p.one?(C.splice(u,1),i--):u++}}return P&&P.afterTrigger&&P.afterTrigger(S),this}};function B(S,C){var P=S._$eventProcessor;return C!=null&&P&&P.normalizeQuery&&(C=P.normalizeQuery(C)),C}function I(S,C,P,y,t,b){var i=S._$handlers;if(typeof P=="function"&&(t=y,y=P,P=null),!y||!C)return S;P=B(S,P),i[C]||(i[C]=[]);for(var u=0;u<i[C].length;u++)if(i[C][u].h===y)return S;var p={h:y,one:b,query:P,ctx:t||S,callAtLast:y.zrEventfulCallAtLast},a=i[C].length-1,o=i[C][a];return o&&o.callAtLast?i[C].splice(a,0,p):i[C].push(p),S}var F=X;ze.exports=F},HmJG:function(ze,ee,M){},I8Z2:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return F}),M.d(ee,"b",function(){return p}),M.d(ee,"c",function(){return o});var X=M("q1tI"),B=function(){var h=function(l,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,d){s.__proto__=d}||function(s,d){for(var E in d)d.hasOwnProperty(E)&&(s[E]=d[E])},h(l,n)};return function(l,n){h(l,n);function s(){this.constructor=l}l.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),I=X.createContext(null),F=function(h){B(l,h);function l(){return h!==null&&h.apply(this,arguments)||this}return l.prototype.render=function(){return X.createElement(I.Provider,{value:this.props.store},this.props.children)},l}(X.Component),S=M("Gytx"),C=M.n(S),P=M("2mql"),y=M.n(P),t=function(){var h=function(l,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,d){s.__proto__=d}||function(s,d){for(var E in d)d.hasOwnProperty(E)&&(s[E]=d[E])},h(l,n)};return function(l,n){h(l,n);function s(){this.constructor=l}l.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),b=function(){return b=Object.assign||function(h){for(var l,n=1,s=arguments.length;n<s;n++){l=arguments[n];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(h[d]=l[d])}return h},b.apply(this,arguments)};function i(h){return h.displayName||h.name||"Component"}var u=function(){return{}};function p(h,l){l===void 0&&(l={});var n=!!h,s=h||u;return function(E){var D=function(k){t(w,k);function w(v,c){var f=k.call(this,v,c)||this;return f.unsubscribe=null,f.handleChange=function(){if(!f.unsubscribe)return;var m=s(f.store.getState(),f.props);f.setState({subscribed:m})},f.store=f.context,f.state={subscribed:s(f.store.getState(),v),store:f.store,props:v},f}return w.getDerivedStateFromProps=function(v,c){return h&&h.length===2&&v!==c.props?{subscribed:s(c.store.getState(),v),props:v}:{props:v}},w.prototype.componentDidMount=function(){this.trySubscribe()},w.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},w.prototype.shouldComponentUpdate=function(v,c){return!C()(this.props,v)||!C()(this.state.subscribed,c.subscribed)},w.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},w.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},w.prototype.render=function(){var v=b(b(b({},this.props),this.state.subscribed),{store:this.store});return X.createElement(E,b({},v,{ref:this.props.miniStoreForwardedRef}))},w.displayName="Connect("+i(E)+")",w.contextType=I,w}(X.Component);if(l.forwardRef){var T=X.forwardRef(function(k,w){return X.createElement(D,b({},k,{miniStoreForwardedRef:w}))});return y()(T,E)}return y()(D,E)}}var a=function(){return a=Object.assign||function(h){for(var l,n=1,s=arguments.length;n<s;n++){l=arguments[n];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(h[d]=l[d])}return h},a.apply(this,arguments)};function o(h){var l=h,n=[];function s(D){l=a(a({},l),D);for(var T=0;T<n.length;T++)n[T]()}function d(){return l}function E(D){return n.push(D),function(){var k=n.indexOf(D);n.splice(k,1)}}return{setState:s,getState:d,subscribe:E}}},IBYe:function(ze,ee,M){"use strict";function X(B){return null}ee.a=X},IMiH:function(ze,ee,M){var X=M("Sj9i"),B=M("QBsz"),I=M("4mN7"),F=M("mFDi"),S=M("LPTA"),C=S.devicePixelRatio,P={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},y=[],t=[],b=[],i=[],u=Math.min,p=Math.max,a=Math.cos,o=Math.sin,h=Math.sqrt,l=Math.abs,n=typeof Float32Array!="undefined",s=function(E){this._saveData=!(E||!1),this._saveData&&(this.data=[]),this._ctx=null};s.prototype={constructor:s,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(E,D,T){T=T||0,this._ux=l(T/C/E)||0,this._uy=l(T/C/D)||0},getContext:function(){return this._ctx},beginPath:function(E){return this._ctx=E,E&&E.beginPath(),E&&(this.dpr=E.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(E,D){return this.addData(P.M,E,D),this._ctx&&this._ctx.moveTo(E,D),this._x0=E,this._y0=D,this._xi=E,this._yi=D,this},lineTo:function(E,D){var T=l(E-this._xi)>this._ux||l(D-this._yi)>this._uy||this._len<5;return this.addData(P.L,E,D),this._ctx&&T&&(this._needsDash()?this._dashedLineTo(E,D):this._ctx.lineTo(E,D)),T&&(this._xi=E,this._yi=D),this},bezierCurveTo:function(E,D,T,k,w,v){return this.addData(P.C,E,D,T,k,w,v),this._ctx&&(this._needsDash()?this._dashedBezierTo(E,D,T,k,w,v):this._ctx.bezierCurveTo(E,D,T,k,w,v)),this._xi=w,this._yi=v,this},quadraticCurveTo:function(E,D,T,k){return this.addData(P.Q,E,D,T,k),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(E,D,T,k):this._ctx.quadraticCurveTo(E,D,T,k)),this._xi=T,this._yi=k,this},arc:function(E,D,T,k,w,v){return this.addData(P.A,E,D,T,T,k,w-k,0,v?0:1),this._ctx&&this._ctx.arc(E,D,T,k,w,v),this._xi=a(w)*T+E,this._yi=o(w)*T+D,this},arcTo:function(E,D,T,k,w){return this._ctx&&this._ctx.arcTo(E,D,T,k,w),this},rect:function(E,D,T,k){return this._ctx&&this._ctx.rect(E,D,T,k),this.addData(P.R,E,D,T,k),this},closePath:function(){this.addData(P.Z);var E=this._ctx,D=this._x0,T=this._y0;return E&&(this._needsDash()&&this._dashedLineTo(D,T),E.closePath()),this._xi=D,this._yi=T,this},fill:function(E){E&&E.fill(),this.toStatic()},stroke:function(E){E&&E.stroke(),this.toStatic()},setLineDash:function(E){if(E instanceof Array){this._lineDash=E,this._dashIdx=0;for(var D=0,T=0;T<E.length;T++)D+=E[T];this._dashSum=D}return this},setLineDashOffset:function(E){return this._dashOffset=E,this},len:function(){return this._len},setData:function(E){var D=E.length;!(this.data&&this.data.length===D)&&n&&(this.data=new Float32Array(D));for(var T=0;T<D;T++)this.data[T]=E[T];this._len=D},appendPath:function(E){E instanceof Array||(E=[E]);for(var D=E.length,T=0,k=this._len,w=0;w<D;w++)T+=E[w].len();n&&this.data instanceof Float32Array&&(this.data=new Float32Array(k+T));for(var w=0;w<D;w++)for(var v=E[w].data,c=0;c<v.length;c++)this.data[k++]=v[c];this._len=k},addData:function(E){if(!this._saveData)return;var D=this.data;this._len+arguments.length>D.length&&(this._expandData(),D=this.data);for(var T=0;T<arguments.length;T++)D[this._len++]=arguments[T];this._prevCmd=E},_expandData:function(){if(!(this.data instanceof Array)){for(var E=[],D=0;D<this._len;D++)E[D]=this.data[D];this.data=E}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(E,D){var T=this._dashSum,k=this._dashOffset,w=this._lineDash,v=this._ctx,c=this._xi,f=this._yi,m=E-c,_=D-f,x=h(m*m+_*_),g=c,j=f,U,R=w.length,W;for(m/=x,_/=x,k<0&&(k=T+k),k%=T,g-=k*m,j-=k*_;m>0&&g<=E||m<0&&g>=E||m===0&&(_>0&&j<=D||_<0&&j>=D);){if(W=this._dashIdx,U=w[W],g+=m*U,j+=_*U,this._dashIdx=(W+1)%R,m>0&&g<c||m<0&&g>c||_>0&&j<f||_<0&&j>f)continue;v[W%2?"moveTo":"lineTo"](m>=0?u(g,E):p(g,E),_>=0?u(j,D):p(j,D))}m=g-E,_=j-D,this._dashOffset=-h(m*m+_*_)},_dashedBezierTo:function(E,D,T,k,w,v){var c=this._dashSum,f=this._dashOffset,m=this._lineDash,_=this._ctx,x=this._xi,g=this._yi,j,U,R,W=X.cubicAt,H=0,L=this._dashIdx,G=m.length,z,J,te=0;for(f<0&&(f=c+f),f%=c,j=0;j<1;j+=.1)U=W(x,E,T,w,j+.1)-W(x,E,T,w,j),R=W(g,D,k,v,j+.1)-W(g,D,k,v,j),H+=h(U*U+R*R);for(;L<G&&!(te+=m[L],te>f);L++);for(j=(te-f)/H;j<=1;)z=W(x,E,T,w,j),J=W(g,D,k,v,j),L%2?_.moveTo(z,J):_.lineTo(z,J),j+=m[L]/H,L=(L+1)%G;L%2!==0&&_.lineTo(w,v),U=w-z,R=v-J,this._dashOffset=-h(U*U+R*R)},_dashedQuadraticTo:function(E,D,T,k){var w=T,v=k;T=(T+2*E)/3,k=(k+2*D)/3,E=(this._xi+2*E)/3,D=(this._yi+2*D)/3,this._dashedBezierTo(E,D,T,k,w,v)},toStatic:function(){var E=this.data;E instanceof Array&&(E.length=this._len,n&&(this.data=new Float32Array(E)))},getBoundingRect:function(){y[0]=y[1]=b[0]=b[1]=Number.MAX_VALUE,t[0]=t[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var E=this.data,D=0,T=0,k=0,w=0,v=0;v<E.length;){var c=E[v++];v===1&&(D=E[v],T=E[v+1],k=D,w=T);switch(c){case P.M:k=E[v++],w=E[v++],D=k,T=w,b[0]=k,b[1]=w,i[0]=k,i[1]=w;break;case P.L:I.fromLine(D,T,E[v],E[v+1],b,i),D=E[v++],T=E[v++];break;case P.C:I.fromCubic(D,T,E[v++],E[v++],E[v++],E[v++],E[v],E[v+1],b,i),D=E[v++],T=E[v++];break;case P.Q:I.fromQuadratic(D,T,E[v++],E[v++],E[v],E[v+1],b,i),D=E[v++],T=E[v++];break;case P.A:var f=E[v++],m=E[v++],_=E[v++],x=E[v++],g=E[v++],j=E[v++]+g;v+=1;var U=1-E[v++];v===1&&(k=a(g)*_+f,w=o(g)*x+m),I.fromArc(f,m,_,x,g,j,U,b,i),D=a(j)*_+f,T=o(j)*x+m;break;case P.R:k=D=E[v++],w=T=E[v++];var R=E[v++],W=E[v++];I.fromLine(k,w,k+R,w+W,b,i);break;case P.Z:D=k,T=w;break}B.min(y,y,b),B.max(t,t,i)}return v===0&&(y[0]=y[1]=t[0]=t[1]=0),new F(y[0],y[1],t[0]-y[0],t[1]-y[1])},rebuildPath:function(E){for(var D=this.data,T,k,w,v,c,f,m=this._ux,_=this._uy,x=this._len,g=0;g<x;){var j=D[g++];g===1&&(w=D[g],v=D[g+1],T=w,k=v);switch(j){case P.M:T=w=D[g++],k=v=D[g++],E.moveTo(w,v);break;case P.L:c=D[g++],f=D[g++],(l(c-w)>m||l(f-v)>_||g===x-1)&&(E.lineTo(c,f),w=c,v=f);break;case P.C:E.bezierCurveTo(D[g++],D[g++],D[g++],D[g++],D[g++],D[g++]),w=D[g-2],v=D[g-1];break;case P.Q:E.quadraticCurveTo(D[g++],D[g++],D[g++],D[g++]),w=D[g-2],v=D[g-1];break;case P.A:var U=D[g++],R=D[g++],W=D[g++],H=D[g++],L=D[g++],G=D[g++],z=D[g++],J=D[g++],te=W>H?W:H,_e=W>H?1:W/H,ce=W>H?H/W:1,xe=Math.abs(W-H)>.001,Te=L+G;xe?(E.translate(U,R),E.rotate(z),E.scale(_e,ce),E.arc(0,0,te,L,Te,1-J),E.scale(1/_e,1/ce),E.rotate(-z),E.translate(-U,-R)):E.arc(U,R,te,L,Te,1-J),g===1&&(T=a(L)*W+U,k=o(L)*H+R),w=a(Te)*W+U,v=o(Te)*H+R;break;case P.R:T=w=D[g],k=v=D[g+1],E.rect(D[g++],D[g++],D[g++],D[g++]);break;case P.Z:E.closePath(),w=T,v=k}}}},s.CMD=P;var d=s;ze.exports=d},ItGF:function(ze,ee){var M={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?M={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?M={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?M={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:M=B(navigator.userAgent);var X=M;function B(I){var F={},S={},C=I.match(/Firefox\/([\d.]+)/),P=I.match(/MSIE\s([\d.]+)/)||I.match(/Trident\/.+?rv:(([\d.]+))/),y=I.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(I);return C&&(S.firefox=!0,S.version=C[1]),P&&(S.ie=!0,S.version=P[1]),y&&(S.edge=!0,S.version=y[1]),t&&(S.weChat=!0),{browser:S,os:F,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!S.ie&&!S.edge,pointerEventsSupported:"onpointerdown"in window&&(S.edge||S.ie&&S.version>=11),domSupported:typeof document!="undefined"}}ze.exports=X},JYp7:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return X});var X;(function(B){function I(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}B.is=I;const F=Object.freeze([]);function S(){return F}B.empty=S;function*C(d){yield d}B.single=C;function P(d){return d||F}B.from=P;function y(d){return!d||d[Symbol.iterator]().next().done===!0}B.isEmpty=y;function t(d){return d[Symbol.iterator]().next().value}B.first=t;function b(d,E){for(const D of d)if(E(D))return!0;return!1}B.some=b;function i(d,E){for(const D of d)if(E(D))return D;return}B.find=i;function*u(d,E){for(const D of d)E(D)&&(yield D)}B.filter=u;function*p(d,E){let D=0;for(const T of d)yield E(T,D++)}B.map=p;function*a(...d){for(const E of d)for(const D of E)yield D}B.concat=a;function*o(d){for(const E of d)for(const D of E)yield D}B.concatNested=o;function h(d,E,D){let T=D;for(const k of d)T=E(T,k);return T}B.reduce=h;function*l(d,E,D=d.length){for(E<0&&(E+=d.length),D<0?D+=d.length:D>d.length&&(D=d.length);E<D;E++)yield d[E]}B.slice=l;function n(d,E=Number.POSITIVE_INFINITY){const D=[];if(E===0)return[D,d];const T=d[Symbol.iterator]();for(let k=0;k<E;k++){const w=T.next();if(w.done)return[D,B.empty()];D.push(w.value)}return[D,{[Symbol.iterator](){return T}}]}B.consume=n;function s(d,E,D=(T,k)=>T===k){const T=d[Symbol.iterator](),k=E[Symbol.iterator]();for(;;){const w=T.next(),v=k.next();if(w.done!==v.done)return!1;if(w.done)return!0;if(!D(w.value,v.value))return!1}}B.equals=s})(X||(X={}))},K2GJ:function(ze,ee,M){var X=M("fW2E"),B=M("gut8"),I=B.ContextCachedBy,F=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],S=function(u){this.extendFrom(u,!1)};function C(u,p,a){var o=p.x==null?0:p.x,h=p.x2==null?1:p.x2,l=p.y==null?0:p.y,n=p.y2==null?0:p.y2;p.global||(o=o*a.width+a.x,h=h*a.width+a.x,l=l*a.height+a.y,n=n*a.height+a.y),o=isNaN(o)?0:o,h=isNaN(h)?1:h,l=isNaN(l)?0:l,n=isNaN(n)?0:n;var s=u.createLinearGradient(o,l,h,n);return s}function P(u,p,a){var o=a.width,h=a.height,l=Math.min(o,h),n=p.x==null?.5:p.x,s=p.y==null?.5:p.y,d=p.r==null?.5:p.r;p.global||(n=n*o+a.x,s=s*h+a.y,d=d*l);var E=u.createRadialGradient(n,s,0,n,s,d);return E}S.prototype={constructor:S,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(u,p,a){var o=this,h=a&&a.style,l=!h||u.__attrCachedBy!==I.STYLE_BIND;u.__attrCachedBy=I.STYLE_BIND;for(var n=0;n<F.length;n++){var s=F[n],d=s[0];(l||o[d]!==h[d])&&(u[d]=X(u,d,o[d]||s[1]))}if((l||o.fill!==h.fill)&&(u.fillStyle=o.fill),(l||o.stroke!==h.stroke)&&(u.strokeStyle=o.stroke),(l||o.opacity!==h.opacity)&&(u.globalAlpha=o.opacity==null?1:o.opacity),(l||o.blend!==h.blend)&&(u.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()){var E=o.lineWidth;u.lineWidth=E/(this.strokeNoScale&&p&&p.getLineScale?p.getLineScale():1)}},hasFill:function(){var u=this.fill;return u!=null&&u!=="none"},hasStroke:function(){var u=this.stroke;return u!=null&&u!=="none"&&this.lineWidth>0},extendFrom:function(u,p){if(u)for(var a in u)u.hasOwnProperty(a)&&(p===!0||(p===!1?!this.hasOwnProperty(a):u[a]!=null))&&(this[a]=u[a])},set:function(u,p){typeof u=="string"?this[u]=p:this.extendFrom(u,!0)},clone:function(){var u=new this.constructor;return u.extendFrom(this,!0),u},getGradient:function(u,p,a){for(var o=p.type==="radial"?P:C,h=o(u,p,a),l=p.colorStops,n=0;n<l.length;n++)h.addColorStop(l[n].offset,l[n].color);return h}};for(var y=S.prototype,t=0;t<F.length;t++){var b=F[t];b[0]in y||(y[b[0]]=b[1])}S.getGradient=y.getGradient;var i=S;ze.exports=i},LPTA:function(ze,ee){var M=1;typeof window!="undefined"&&(M=Math.max(window.devicePixelRatio||1,1));var X=0,B=M;ee.debugMode=X,ee.devicePixelRatio=B},LSTS:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0});var X=function(){function u(p,a){for(var o=0;o<a.length;o++){var h=a[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(p,h.key,h)}}return function(p,a,o){return a&&u(p.prototype,a),o&&u(p,o),p}}(),B=M("q1tI"),I=C(B),F=M("17x9"),S=C(F);function C(u){return u&&u.__esModule?u:{default:u}}function P(u,p){var a={};for(var o in u){if(p.indexOf(o)>=0)continue;if(!Object.prototype.hasOwnProperty.call(u,o))continue;a[o]=u[o]}return a}function y(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}function t(u,p){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:u}function b(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(u,p):u.__proto__=p)}var i=function(u){b(p,u);function p(a){y(this,p);var o=t(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,a));return o.scrollListener=o.scrollListener.bind(o),o.eventListenerOptions=o.eventListenerOptions.bind(o),o.mousewheelListener=o.mousewheelListener.bind(o),o}return X(p,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var o=this.getParentElement(this.scrollComponent);o.scrollTop=o.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var o=!1,h={get passive(){o=!0}};try{document.addEventListener("test",null,h),document.removeEventListener("test",null,h)}catch(l){}return o}},{key:"eventListenerOptions",value:function(){var o=this.props.useCapture;return this.isPassiveSupported()&&(o={useCapture:this.props.useCapture,passive:!0}),o}},{key:"setDefaultLoader",value:function(o){this.defaultLoader=o}},{key:"detachMousewheelListener",value:function(){var o=window;this.props.useWindow===!1&&(o=this.scrollComponent.parentNode),o.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var o=window;this.props.useWindow===!1&&(o=this.getParentElement(this.scrollComponent)),o.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),o.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(o){var h=this.props.getScrollParent&&this.props.getScrollParent();return h!=null?h:o&&o.parentNode}},{key:"filterProps",value:function(o){return o}},{key:"attachScrollListener",value:function(){var o=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!o)return;var h=window;this.props.useWindow===!1&&(h=o),h.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),h.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),h.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}},{key:"mousewheelListener",value:function(o){o.deltaY===1&&!this.isPassiveSupported()&&o.preventDefault()}},{key:"scrollListener",value:function(){var o=this.scrollComponent,h=window,l=this.getParentElement(o),n=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,d=h.pageYOffset!==void 0?h.pageYOffset:s.scrollTop;this.props.isReverse?n=d:n=this.calculateOffset(o,d)}else this.props.isReverse?n=l.scrollTop:n=o.scrollHeight-l.scrollTop-l.clientHeight;n<Number(this.props.threshold)&&o&&o.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=l.scrollHeight,this.beforeScrollTop=l.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(o,h){return o?this.calculateTopPosition(o)+(o.offsetHeight-h-window.innerHeight):0}},{key:"calculateTopPosition",value:function(o){return o?o.offsetTop+this.calculateTopPosition(o.offsetParent):0}},{key:"render",value:function(){var o=this,h=this.filterProps(this.props),l=h.children,n=h.element,s=h.hasMore,d=h.initialLoad,E=h.isReverse,D=h.loader,T=h.loadMore,k=h.pageStart,w=h.ref,v=h.threshold,c=h.useCapture,f=h.useWindow,m=h.getScrollParent,_=P(h,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);_.ref=function(g){o.scrollComponent=g,w&&w(g)};var x=[l];return s&&(D?E?x.unshift(D):x.push(D):this.defaultLoader&&(E?x.unshift(this.defaultLoader):x.push(this.defaultLoader))),I.default.createElement(n,_,x)}}]),p}(B.Component);i.propTypes={children:S.default.node.isRequired,element:S.default.node,hasMore:S.default.bool,initialLoad:S.default.bool,isReverse:S.default.bool,loader:S.default.node,loadMore:S.default.func.isRequired,pageStart:S.default.number,ref:S.default.func,getScrollParent:S.default.func,threshold:S.default.number,useCapture:S.default.bool,useWindow:S.default.bool},i.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},ee.default=i,ze.exports=ee.default},LdHM:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return d}),M.d(ee,"a",function(){return D});var X=M("1OyB"),B=M("vuIU"),I=M("Ji7U"),F=M("LK+K"),S=M("q1tI"),C=M("rePB"),P=M("Ff2n"),y=M("ODXe"),t=M("4IlW"),b=M("bX4T"),i=M("YrtM"),u=M("TSYQ"),p=M.n(u),a=M("+nKL"),o=M("8OUc"),h=function(G,z){var J=G.prefixCls,te=G.id,_e=G.flattenOptions,ce=G.childrenAsData,xe=G.values,Te=G.searchValue,je=G.multiple,Ce=G.defaultActiveFirstOption,Z=G.height,K=G.itemHeight,V=G.notFoundContent,$=G.open,q=G.menuItemSelectedIcon,Q=G.virtual,ge=G.onSelect,Oe=G.onToggleOpen,Ye=G.onActiveValue,le=G.onScroll,Ee=G.onMouseEnter,Re="".concat(J,"-item"),He=Object(i.a)(function(){return _e},[$,_e],function(ae,se){return se[0]&&ae[1]!==se[1]}),et=S.useRef(null),ut=function(se){se.preventDefault()},Dt=function(se){et.current&&et.current.scrollTo({index:se})},We=function(se){for(var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ve=He.length,ie=0;ie<ve;ie+=1){var oe=(se+ie*de+ve)%ve,pe=He[oe],we=pe.group,Ae=pe.data;if(!we&&!Ae.disabled)return oe}return-1},Mt=S.useState(function(){return We(0)}),Wt=Object(y.a)(Mt,2),Ne=Wt[0],Pe=Wt[1],it=function(se){Pe(se);var de=He[se];if(!de){Ye(null,-1);return}Ye(de.data.value,se)};S.useEffect(function(){it(Ce!==!1?We(0):-1)},[He.length,Te]),S.useEffect(function(){var ae=setTimeout(function(){if(!je&&$&&xe.size===1){var se=Array.from(xe)[0],de=He.findIndex(function(ve){var ie=ve.data;return ie.value===se});it(de),Dt(de)}});return function(){return clearTimeout(ae)}},[$]);var gt=function(se){se!==void 0&&ge(se,{selected:!xe.has(se)}),je||Oe(!1)};if(S.useImperativeHandle(z,function(){return{onKeyDown:function(se){var de=se.which;switch(de){case t.a.UP:case t.a.DOWN:{var ve=0;if(de===t.a.UP?ve=-1:de===t.a.DOWN&&(ve=1),ve!==0){var ie=We(Ne+ve,ve);Dt(ie),it(ie)}break}case t.a.ENTER:{var oe=He[Ne];oe&&!oe.data.disabled?gt(oe.data.value):gt(void 0),$&&se.preventDefault();break}case t.a.ESC:Oe(!1)}},onKeyUp:function(){},scrollTo:function(se){Dt(se)}}}),He.length===0)return S.createElement("div",{role:"listbox",id:"".concat(te,"_list"),className:"".concat(Re,"-empty"),onMouseDown:ut},V);function fe(ae){var se=He[ae];if(!se)return null;var de=se.data||{},ve=de.value,ie=de.label,oe=de.children,pe=Object(b.a)(de,!0),we=ce?oe:ie;return se?S.createElement("div",Object.assign({"aria-label":typeof we=="string"?we:null},pe,{key:ae,role:"option",id:"".concat(te,"_list_").concat(ae),"aria-selected":xe.has(ve)}),ve):null}return S.createElement(S.Fragment,null,S.createElement("div",{role:"listbox",id:"".concat(te,"_list"),style:{height:0,width:0,overflow:"hidden"}},fe(Ne-1),fe(Ne),fe(Ne+1)),S.createElement(a.a,{itemKey:"key",ref:et,data:He,height:Z,itemHeight:K,fullHeight:!1,onMouseDown:ut,onScroll:le,virtual:Q,onMouseEnter:Ee},function(ae,se){var de,ve=ae.group,ie=ae.groupOption,oe=ae.data,pe=oe.label,we=oe.key;if(ve)return S.createElement("div",{className:p()(Re,"".concat(Re,"-group"))},pe!==void 0?pe:we);var Ae=oe.disabled,Me=oe.value,rt=oe.title,Pt=oe.children,Xt=oe.style,lt=oe.className,zt=Object(P.a)(oe,["disabled","value","title","children","style","className"]),mt=xe.has(Me),_t="".concat(Re,"-option"),ot=p()(Re,_t,lt,(de={},Object(C.a)(de,"".concat(_t,"-grouped"),ie),Object(C.a)(de,"".concat(_t,"-active"),Ne===se&&!Ae),Object(C.a)(de,"".concat(_t,"-disabled"),Ae),Object(C.a)(de,"".concat(_t,"-selected"),mt),de)),Se=ce?Pt:pe,Ue=!q||typeof q=="function"||mt;return S.createElement("div",Object.assign({},zt,{"aria-selected":mt,className:ot,title:rt,onMouseMove:function(){if(Ne===se||Ae)return;it(se)},onClick:function(){Ae||gt(Me)},style:Xt}),S.createElement("div",{className:"".concat(_t,"-content")},Se||Me),S.isValidElement(q)||mt,Ue&&S.createElement(o.a,{className:"".concat(Re,"-option-state"),customizeIcon:q,customizeIconProps:{isSelected:mt}},mt?"\u2713":null))}))},l=S.forwardRef(h);l.displayName="OptionList";var n=l,s=function(){return null};s.isSelectOption=!0;var d=s,E=function(){return null};E.isSelectOptGroup=!0;var D=E,T=M("VTBJ"),k=M("Zm9Q");function w(L){var G=L.key,z=L.props,J=z.children,te=z.value,_e=Object(P.a)(z,["children","value"]);return Object(T.a)({key:G,value:te!==void 0?te:G,children:J},_e)}function v(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(L).map(function(z,J){if(!S.isValidElement(z)||!z.type)return null;var te=z.type.isSelectOptGroup,_e=z.key,ce=z.props,xe=ce.children,Te=Object(P.a)(ce,["children"]);return G||!te?w(z):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(_e===null?J:_e,"__"),label:_e},Te),{},{options:v(xe)})}).filter(function(z){return z})}var c=M("2Qr1"),f=M("qNPg"),m=M("U8pU"),_=M("Kwbf"),x=M("WKfj");function g(L){var G=L.mode,z=L.options,J=L.children,te=L.backfill,_e=L.allowClear,ce=L.placeholder,xe=L.getInputElement,Te=L.showSearch,je=L.onSearch,Ce=L.defaultOpen,Z=L.autoFocus,K=L.labelInValue,V=L.value,$=L.inputValue,q=L.optionLabelProp,Q=G==="multiple"||G==="tags",ge=Te!==void 0?Te:Q||G==="combobox",Oe=z||v(J);if(Object(_.a)(G!=="tags"||Oe.every(function(Re){return!Re.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var Ye=Oe.some(function(Re){return Re.options?Re.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in Re?Re.value:Re.key)=="number"});Object(_.a)(!Ye,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(_.a)(G!=="combobox"||!q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(_.a)(G==="combobox"||!te,"`backfill` only works with `combobox` mode."),Object(_.a)(G==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(_.b)(G!=="combobox"||!xe||!_e||!ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),je&&!ge&&G!=="combobox"&&G!=="tags"&&Object(_.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(_.b)(!Ce||Z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),V!=null){var le=Object(x.d)(V);Object(_.a)(!K||le.every(function(Re){return Object(m.a)(Re)==="object"&&("key"in Re||"value"in Re)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(_.a)(!Q||Array.isArray(V),"`value` should be array when `mode` is `multiple` or `tags`")}if(J){var Ee=null;Object(k.a)(J).some(function(Re){if(!S.isValidElement(Re)||!Re.type)return!1;var He=Re.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var et=Object(k.a)(Re.props.children).every(function(ut){return!S.isValidElement(ut)||!Re.type||ut.type.isSelectOption?!0:(Ee=ut.type,!1)});return!et}return Ee=He,!0}),Ee&&Object(_.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(_.a)($===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var j=g,U=Object(f.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:v,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:j,fillOptionsWithMissingValue:c.a}),R=function(L){Object(I.a)(z,L);var G=Object(F.a)(z);function z(){var J;return Object(X.a)(this,z),J=G.apply(this,arguments),J.selectRef=S.createRef(),J.focus=function(){J.selectRef.current.focus()},J.blur=function(){J.selectRef.current.blur()},J}return Object(B.a)(z,[{key:"render",value:function(){return S.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),z}(S.Component);R.Option=d,R.OptGroup=D;var W=R,H=ee.c=W},M8RZ:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return t});var X=M("fWQN"),B=M("mtLc"),I=M("yKVA"),F=M("879j"),S=M("q1tI"),C=M.n(S),P=M("i8i4"),y=M.n(P),t=function(b){Object(I.a)(u,b);var i=Object(F.a)(u);function u(p){var a;Object(X.a)(this,u),a=i.call(this,p);var o=window.document;return a.node=o.createElement("div"),o.body.appendChild(a.node),a}return Object(B.a)(u,[{key:"render",value:function(){var a=this.props.children;return Object(P.createPortal)(a,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(C.a.Component)},MEGo:function(ze,ee,M){var X=M("4fz+"),B=M("Dagg"),I=M("dqUG"),F=M("2fw6"),S=M("x6Kt"),C=M("rmlV"),P=M("yxFR"),y=M("y+Vt"),t=M("h7HQ"),b=M("1Jh7"),i=M("SKnc"),u=M("K2GJ"),p=M("Fofx"),a=M("NC18"),o=a.createFromString,h=M("bYtY"),l=h.isString,n=h.extend,s=h.defaults,d=h.trim,E=h.each,D=/[\s,]+/;function T(z){if(l(z)){var J=new DOMParser;z=J.parseFromString(z,"text/xml")}for(z.nodeType===9&&(z=z.firstChild);z.nodeName.toLowerCase()!=="svg"||z.nodeType!==1;)z=z.nextSibling;return z}function k(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}k.prototype.parse=function(z,J){J=J||{};var te=T(z);if(!te)throw new Error("Illegal svg");var _e=new X;this._root=_e;var ce=te.getAttribute("viewBox")||"",xe=parseFloat(te.getAttribute("width")||J.width),Te=parseFloat(te.getAttribute("height")||J.height);isNaN(xe)&&(xe=null),isNaN(Te)&&(Te=null),x(te,_e,null,!0);for(var je=te.firstChild;je;)this._parseNode(je,_e),je=je.nextSibling;var Ce,Z;if(ce){var K=d(ce).split(D);K.length>=4&&(Ce={x:parseFloat(K[0]||0),y:parseFloat(K[1]||0),width:parseFloat(K[2]),height:parseFloat(K[3])})}if(Ce&&xe!=null&&Te!=null&&(Z=L(Ce,xe,Te),!J.ignoreViewBox)){var V=_e;_e=new X,_e.add(V),V.scale=Z.scale.slice(),V.position=Z.position.slice()}return!J.ignoreRootClip&&xe!=null&&Te!=null&&_e.setClipPath(new S({shape:{x:0,y:0,width:xe,height:Te}})),{root:_e,width:xe,height:Te,viewBoxRect:Ce,viewBoxTransform:Z}},k.prototype._parseNode=function(z,J){var te=z.nodeName.toLowerCase();te==="defs"?this._isDefine=!0:te==="text"&&(this._isText=!0);var _e;if(this._isDefine){var ce=v[te];if(ce){var xe=ce.call(this,z),Te=z.getAttribute("id");Te&&(this._defs[Te]=xe)}}else{var ce=w[te];ce&&(_e=ce.call(this,z,J),J.add(_e))}for(var je=z.firstChild;je;)je.nodeType===1&&this._parseNode(je,_e),je.nodeType===3&&this._isText&&this._parseText(je,_e),je=je.nextSibling;te==="defs"?this._isDefine=!1:te==="text"&&(this._isText=!1)},k.prototype._parseText=function(z,J){if(z.nodeType===1){var te=z.getAttribute("dx")||0,_e=z.getAttribute("dy")||0;this._textX+=parseFloat(te),this._textY+=parseFloat(_e)}var ce=new I({style:{text:z.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});f(J,ce),x(z,ce,this._defs);var xe=ce.style.fontSize;xe&&xe<9&&(ce.style.fontSize=9,ce.scale=ce.scale||[1,1],ce.scale[0]*=xe/9,ce.scale[1]*=xe/9);var Te=ce.getBoundingRect();return this._textX+=Te.width,J.add(ce),ce};var w={g:function(z,J){var te=new X;return f(J,te),x(z,te,this._defs),te},rect:function(z,J){var te=new S;return f(J,te),x(z,te,this._defs),te.setShape({x:parseFloat(z.getAttribute("x")||0),y:parseFloat(z.getAttribute("y")||0),width:parseFloat(z.getAttribute("width")||0),height:parseFloat(z.getAttribute("height")||0)}),te},circle:function(z,J){var te=new F;return f(J,te),x(z,te,this._defs),te.setShape({cx:parseFloat(z.getAttribute("cx")||0),cy:parseFloat(z.getAttribute("cy")||0),r:parseFloat(z.getAttribute("r")||0)}),te},line:function(z,J){var te=new P;return f(J,te),x(z,te,this._defs),te.setShape({x1:parseFloat(z.getAttribute("x1")||0),y1:parseFloat(z.getAttribute("y1")||0),x2:parseFloat(z.getAttribute("x2")||0),y2:parseFloat(z.getAttribute("y2")||0)}),te},ellipse:function(z,J){var te=new C;return f(J,te),x(z,te,this._defs),te.setShape({cx:parseFloat(z.getAttribute("cx")||0),cy:parseFloat(z.getAttribute("cy")||0),rx:parseFloat(z.getAttribute("rx")||0),ry:parseFloat(z.getAttribute("ry")||0)}),te},polygon:function(z,J){var te=z.getAttribute("points");te&&(te=m(te));var _e=new t({shape:{points:te||[]}});return f(J,_e),x(z,_e,this._defs),_e},polyline:function(z,J){var te=new y;f(J,te),x(z,te,this._defs);var _e=z.getAttribute("points");_e&&(_e=m(_e));var ce=new b({shape:{points:_e||[]}});return ce},image:function(z,J){var te=new B;return f(J,te),x(z,te,this._defs),te.setStyle({image:z.getAttribute("xlink:href"),x:z.getAttribute("x"),y:z.getAttribute("y"),width:z.getAttribute("width"),height:z.getAttribute("height")}),te},text:function(z,J){var te=z.getAttribute("x")||0,_e=z.getAttribute("y")||0,ce=z.getAttribute("dx")||0,xe=z.getAttribute("dy")||0;this._textX=parseFloat(te)+parseFloat(ce),this._textY=parseFloat(_e)+parseFloat(xe);var Te=new X;return f(J,Te),x(z,Te,this._defs),Te},tspan:function(z,J){var te=z.getAttribute("x"),_e=z.getAttribute("y");te!=null&&(this._textX=parseFloat(te)),_e!=null&&(this._textY=parseFloat(_e));var ce=z.getAttribute("dx")||0,xe=z.getAttribute("dy")||0,Te=new X;return f(J,Te),x(z,Te,this._defs),this._textX+=ce,this._textY+=xe,Te},path:function(z,J){var te=z.getAttribute("d")||"",_e=o(te);return f(J,_e),x(z,_e,this._defs),_e}},v={lineargradient:function(z){var J=parseInt(z.getAttribute("x1")||0,10),te=parseInt(z.getAttribute("y1")||0,10),_e=parseInt(z.getAttribute("x2")||10,10),ce=parseInt(z.getAttribute("y2")||0,10),xe=new i(J,te,_e,ce);return c(z,xe),xe},radialgradient:function(z){}};function c(z,J){for(var te=z.firstChild;te;){if(te.nodeType===1){var _e=te.getAttribute("offset");_e.indexOf("%")>0?_e=parseInt(_e,10)/100:_e?_e=parseFloat(_e):_e=0;var ce=te.getAttribute("stop-color")||"#000000";J.addColorStop(_e,ce)}te=te.nextSibling}}function f(z,J){z&&z.__inheritedStyle&&(J.__inheritedStyle||(J.__inheritedStyle={}),s(J.__inheritedStyle,z.__inheritedStyle))}function m(z){for(var J=d(z).split(D),te=[],_e=0;_e<J.length;_e+=2){var ce=parseFloat(J[_e]),xe=parseFloat(J[_e+1]);te.push([ce,xe])}return te}var _={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function x(z,J,te,_e){var ce=J.__inheritedStyle||{},xe=J.type==="text";if(z.nodeType===1&&(R(z,J),n(ce,H(z)),!_e)){for(var Te in _)if(_.hasOwnProperty(Te)){var je=z.getAttribute(Te);je!=null&&(ce[_[Te]]=je)}}var Ce=xe?"textFill":"fill",Z=xe?"textStroke":"stroke";J.style=J.style||new u;var K=J.style;ce.fill!=null&&K.set(Ce,j(ce.fill,te)),ce.stroke!=null&&K.set(Z,j(ce.stroke,te)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(V){var $=V==="lineWidth"&&xe?"textStrokeWidth":V;ce[V]!=null&&K.set($,parseFloat(ce[V]))}),(!ce.textBaseline||ce.textBaseline==="auto")&&(ce.textBaseline="alphabetic"),ce.textBaseline==="alphabetic"&&(ce.textBaseline="bottom"),ce.textAlign==="start"&&(ce.textAlign="left"),ce.textAlign==="end"&&(ce.textAlign="right"),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(V){ce[V]!=null&&K.set(V,ce[V])}),ce.lineDash&&(J.style.lineDash=d(ce.lineDash).split(D)),K[Z]&&K[Z]!=="none"&&(J[Z]=!0),J.__inheritedStyle=ce}var g=/url\(\s*#(.*?)\)/;function j(z,J){var te=J&&z&&z.match(g);if(te){var _e=d(te[1]),ce=J[_e];return ce}return z}var U=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function R(z,J){var te=z.getAttribute("transform");if(te){te=te.replace(/,/g," ");var _e=null,ce=[];te.replace(U,function(Ce,Z,K){ce.push(Z,K)});for(var xe=ce.length-1;xe>0;xe-=2){var Te=ce[xe],je=ce[xe-1];_e=_e||p.create();switch(je){case"translate":Te=d(Te).split(D),p.translate(_e,_e,[parseFloat(Te[0]),parseFloat(Te[1]||0)]);break;case"scale":Te=d(Te).split(D),p.scale(_e,_e,[parseFloat(Te[0]),parseFloat(Te[1]||Te[0])]);break;case"rotate":Te=d(Te).split(D),p.rotate(_e,_e,parseFloat(Te[0]));break;case"skew":Te=d(Te).split(D),console.warn("Skew transform is not supported yet");break;case"matrix":var Te=d(Te).split(D);_e[0]=parseFloat(Te[0]),_e[1]=parseFloat(Te[1]),_e[2]=parseFloat(Te[2]),_e[3]=parseFloat(Te[3]),_e[4]=parseFloat(Te[4]),_e[5]=parseFloat(Te[5]);break}}J.setLocalTransform(_e)}}var W=/([^\s:;]+)\s*:\s*([^:;]+)/g;function H(z){var J=z.getAttribute("style"),te={};if(!J)return te;var _e={};W.lastIndex=0;for(var ce;(ce=W.exec(J))!=null;)_e[ce[1]]=ce[2];for(var xe in _)_.hasOwnProperty(xe)&&_e[xe]!=null&&(te[_[xe]]=_e[xe]);return te}function L(z,J,te){var _e=J/z.width,ce=te/z.height,xe=Math.min(_e,ce),Te=[xe,xe],je=[-(z.x+z.width/2)*xe+J/2,-(z.y+z.height/2)*xe+te/2];return{scale:Te,position:je}}function G(z,J){var te=new k;return te.parse(z,J)}ee.parseXML=T,ee.makeViewBoxTransform=L,ee.parseSVG=G},MI8n:function(ze,ee,M){"use strict";M.d(ee,"c",function(){return S}),M.d(ee,"b",function(){return t}),M.d(ee,"e",function(){return b}),M.d(ee,"a",function(){return i}),M.d(ee,"d",function(){return u}),M.d(ee,"f",function(){return p});var X=M("/cxE"),B=M("pmY6"),I=M("24hK"),F=M("5Y4S"),S;(function(a){a.None=()=>B.a.None;function o(g){return(j,U=null,R)=>{let W=!1,H;return H=g(L=>W?void 0:(H?H.dispose():W=!0,j.call(U,L)),null,R),W&&H.dispose(),H}}a.once=o;function h(g,j){return D((U,R=null,W)=>g(H=>U.call(R,j(H)),null,W))}a.map=h;function l(g,j){return D((U,R=null,W)=>g(H=>{j(H),U.call(R,H)},null,W))}a.forEach=l;function n(g,j){return D((U,R=null,W)=>g(H=>j(H)&&U.call(R,H),null,W))}a.filter=n;function s(g){return g}a.signal=s;function d(...g){return(j,U=null,R)=>Object(B.e)(...g.map(W=>W(H=>j.call(U,H),null,R)))}a.any=d;function E(g,j,U){let R=U;return h(g,W=>(R=j(R,W),R))}a.reduce=E;function D(g){let j;const U=new t({onFirstListenerAdd(){j=g(U.fire,U)},onLastListenerRemove(){j.dispose()}});return U.event}function T(g,j,U=100,R=!1,W){let H,L,G,z=0;const J=new t({leakWarningThreshold:W,onFirstListenerAdd(){H=g(te=>{z++,L=j(L,te),R&&!G&&(J.fire(L),L=void 0),clearTimeout(G),G=setTimeout(()=>{const _e=L;L=void 0,G=void 0,(!R||z>1)&&J.fire(_e),z=0},U)})},onLastListenerRemove(){H.dispose()}});return J.event}a.debounce=T;function k(g,j=(U,R)=>U===R){let U=!0,R;return n(g,W=>{const H=U||!j(W,R);return U=!1,R=W,H})}a.latch=k;function w(g,j){return[a.filter(g,j),a.filter(g,U=>!j(U))]}a.split=w;function v(g,j=!1,U=[]){let R=U.slice(),W=g(G=>{R?R.push(G):L.fire(G)});const H=()=>{R&&R.forEach(G=>L.fire(G)),R=null},L=new t({onFirstListenerAdd(){W||(W=g(G=>L.fire(G)))},onFirstListenerDidAdd(){R&&(j?setTimeout(H):H())},onLastListenerRemove(){W&&W.dispose(),W=null}});return L.event}a.buffer=v;class c{constructor(g){this.event=g}map(g){return new c(h(this.event,g))}forEach(g){return new c(l(this.event,g))}filter(g){return new c(n(this.event,g))}reduce(g,j){return new c(E(this.event,g,j))}latch(){return new c(k(this.event))}debounce(g,j=100,U=!1,R){return new c(T(this.event,g,j,U,R))}on(g,j,U){return this.event(g,j,U)}once(g,j,U){return o(this.event)(g,j,U)}}function f(g){return new c(g)}a.chain=f;function m(g,j,U=R=>R){const R=(...G)=>L.fire(U(...G)),W=()=>g.on(j,R),H=()=>g.removeListener(j,R),L=new t({onFirstListenerAdd:W,onLastListenerRemove:H});return L.event}a.fromNodeEventEmitter=m;function _(g,j,U=R=>R){const R=(...G)=>L.fire(U(...G)),W=()=>g.addEventListener(j,R),H=()=>g.removeEventListener(j,R),L=new t({onFirstListenerAdd:W,onLastListenerRemove:H});return L.event}a.fromDOMEventEmitter=_;function x(g){return new Promise(j=>o(g)(j))}a.toPromise=x})(S||(S={}));class C{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${C._idPool++}`}start(a){this._stopWatch=new F.a(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}C._idPool=0;let P=-1;class y{constructor(a,o=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let o=P;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||a<o)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
`).slice(3).join(`
`),l=this._stacks.get(h)||0;if(this._stacks.set(h,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let n,s=0;for(const[d,E]of this._stacks)(!n||s<E)&&(n=d,s=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${s}):`),console.warn(n)}return()=>{const n=this._stacks.get(h)||0;this._stacks.set(h,n-1)}}}class t{constructor(a){var o;this._disposed=!1,this._options=a,this._leakageMon=P>0?new y(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(a,o,h)=>{var l;this._listeners||(this._listeners=new I.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(o?[a,o]:a);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,o);const d=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),E=Object(B.i)(()=>{if(d&&d(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const D=this._listeners&&!this._listeners.isEmpty();D||this._options.onLastListenerRemove(this)}});return h instanceof B.b?h.add(E):Array.isArray(h)&&h.push(E),E}),this._event}fire(a){var o,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new I.a);for(let l of this._listeners)this._deliveryQueue.push([l,a]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,n]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,n):l[0].call(l[1],n)}catch(s){Object(X.f)(s)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var a,o,h,l,n;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(l=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||l===void 0||l.call(h),(n=this._leakageMon)===null||n===void 0||n.dispose())}}class b extends t{constructor(a){super(a);this._isPaused=0,this._eventQueue=new I.a,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}class i extends b{constructor(a){var o;super(a);this._delay=(o=a.delay)!==null&&o!==void 0?o:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class u{constructor(){this.buffers=[]}wrapEvent(a){return(o,h,l)=>a(n=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>o.call(h,n)):o.call(h,n)},void 0,l)}bufferEvents(a){const o=[];this.buffers.push(o);const h=a();return this.buffers.pop(),o.forEach(l=>l()),h}}class p{constructor(){this.listening=!1,this.inputEvent=S.None,this.inputEventListener=B.a.None,this.emitter=new t({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(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MKOG:function(ze,ee,M){var X=M("bYtY"),B=M("YH21"),I=B.Dispatcher,F=M("mLcG"),S=M("Bq2U"),C=function(y){y=y||{},this.stage=y.stage||{},this.onframe=y.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,I.call(this)};C.prototype={constructor:C,addClip:function(y){this._clips.push(y)},addAnimator:function(y){y.animation=this;for(var t=y.getClips(),b=0;b<t.length;b++)this.addClip(t[b])},removeClip:function(y){var t=X.indexOf(this._clips,y);t>=0&&this._clips.splice(t,1)},removeAnimator:function(y){for(var t=y.getClips(),b=0;b<t.length;b++)this.removeClip(t[b]);y.animation=null},_update:function(){for(var y=new Date().getTime()-this._pausedTime,t=y-this._time,b=this._clips,i=b.length,u=[],p=[],a=0;a<i;a++){var o=b[a],h=o.step(y,t);h&&(u.push(h),p.push(o))}for(var a=0;a<i;)b[a]._needsRemove?(b[a]=b[i-1],b.pop(),i--):a++;i=u.length;for(var a=0;a<i;a++)p[a].fire(u[a]);this._time=y,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var y=this;this._running=!0;function t(){y._running&&(F(t),!y._paused&&y._update())}F(t)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(y,t){t=t||{};var b=new S(y,t.loop,t.getter,t.setter);return this.addAnimator(b),b}},X.mixin(C,I);var P=C;ze.exports=P},MNsG:function(ze,ee,M){"use strict";(function(X,B){M.d(ee,"b",function(){return h}),M.d(ee,"i",function(){return d}),M.d(ee,"f",function(){return E}),M.d(ee,"d",function(){return D}),M.d(ee,"g",function(){return T}),M.d(ee,"h",function(){return k}),M.d(ee,"c",function(){return w}),M.d(ee,"k",function(){return v}),M.d(ee,"j",function(){return c}),M.d(ee,"a",function(){return f}),M.d(ee,"e",function(){return x});var I;const F="en";let S=!1,C=!1,P=!1,y=!1,t=!1,b=!1,i=!1,u,p=F,a,o;const h=typeof self=="object"?self:typeof X=="object"?X:{};let l;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?l=h.vscode.process:typeof B!="undefined"&&(l=B);const n=typeof((I=l==null?void 0:l.versions)===null||I===void 0?void 0:I.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!n)o=navigator.userAgent,S=o.indexOf("Windows")>=0,C=o.indexOf("Macintosh")>=0,i=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,P=o.indexOf("Linux")>=0,b=!0,u=navigator.language,p=u;else if(typeof l=="object"){S=l.platform==="win32",C=l.platform==="darwin",P=l.platform==="linux",y=P&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,u=F,p=F;const g=l.env.VSCODE_NLS_CONFIG;if(g)try{const j=JSON.parse(g),U=j.availableLanguages["*"];u=j.locale,p=U||F,a=j._translationsConfigFile}catch(j){}t=!0}else console.error("Unable to resolve platform.");let s=0;C?s=1:S?s=3:P&&(s=2);const d=S,E=C,D=P,T=t,k=b,w=i,v=o,c=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let U=[];h.addEventListener("message",W=>{if(W.data&&W.data.vscodeSetImmediateId)for(let H=0,L=U.length;H<L;H++){const G=U[H];if(G.id===W.data.vscodeSetImmediateId){U.splice(H,1),G.callback();return}}});let R=0;return W=>{const H=++R;U.push({id:H,callback:W}),h.postMessage({vscodeSetImmediateId:H},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const j=Promise.resolve();return U=>j.then(U)}(),f=C||i?2:S?1:3;let m=!0,_=!1;function x(){if(!_){_=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const j=new Uint16Array(g.buffer);m=j[0]===(2<<8)+1}return m}}).call(this,M("IyRk"),M("Q2Ig"))},N0LK:function(ze,ee,M){"use strict";M.d(ee,"C",function(){return X}),M.d(ee,"v",function(){return I}),M.d(ee,"s",function(){return F}),M.d(ee,"t",function(){return S}),M.d(ee,"U",function(){return C}),M.d(ee,"J",function(){return P}),M.d(ee,"O",function(){return y}),M.d(ee,"p",function(){return t}),M.d(ee,"T",function(){return b}),M.d(ee,"q",function(){return i}),M.d(ee,"N",function(){return u}),M.d(ee,"M",function(){return p}),M.d(ee,"Q",function(){return a}),M.d(ee,"u",function(){return o}),M.d(ee,"x",function(){return h}),M.d(ee,"I",function(){return l}),M.d(ee,"f",function(){return n}),M.d(ee,"h",function(){return s}),M.d(ee,"g",function(){return d}),M.d(ee,"i",function(){return E}),M.d(ee,"G",function(){return D}),M.d(ee,"H",function(){return T}),M.d(ee,"r",function(){return k}),M.d(ee,"R",function(){return w}),M.d(ee,"d",function(){return v}),M.d(ee,"e",function(){return c}),M.d(ee,"E",function(){return f}),M.d(ee,"F",function(){return m}),M.d(ee,"j",function(){return _}),M.d(ee,"z",function(){return x}),M.d(ee,"K",function(){return j}),M.d(ee,"L",function(){return U}),M.d(ee,"m",function(){return W}),M.d(ee,"k",function(){return L}),M.d(ee,"A",function(){return z}),M.d(ee,"a",function(){return J}),M.d(ee,"n",function(){return te}),M.d(ee,"l",function(){return _e}),M.d(ee,"D",function(){return ce}),M.d(ee,"B",function(){return xe}),M.d(ee,"b",function(){return Te}),M.d(ee,"S",function(){return je}),M.d(ee,"o",function(){return Ce}),M.d(ee,"P",function(){return Z}),M.d(ee,"w",function(){return K}),M.d(ee,"c",function(){return V}),M.d(ee,"y",function(){return Q});function X(le){return!le||typeof le!="string"?!0:le.trim().length===0}const B=/{(\d+)}/g;function I(le,...Ee){return Ee.length===0?le:le.replace(B,function(Re,He){const et=parseInt(He,10);return isNaN(et)||et<0||et>=Ee.length?Re:Ee[et]})}function F(le){return le.replace(/[<>&]/g,function(Ee){switch(Ee){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return Ee}})}function S(le){return le.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function C(le,Ee=" "){const Re=P(le,Ee);return y(Re,Ee)}function P(le,Ee){if(!le||!Ee)return le;const Re=Ee.length;if(Re===0||le.length===0)return le;let He=0;for(;le.indexOf(Ee,He)===He;)He=He+Re;return le.substring(He)}function y(le,Ee){if(!le||!Ee)return le;const Re=Ee.length,He=le.length;if(Re===0||He===0)return le;let et=He,ut=-1;for(;!(ut=le.lastIndexOf(Ee,et-1),ut===-1||ut+Re!==et);){if(ut===0)return"";et=ut}return le.substring(0,et)}function t(le){return le.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function b(le){return le.replace(/\*/g,"")}function i(le,Ee,Re={}){if(!le)throw new Error("Cannot create regex from empty string");Ee||(le=S(le)),Re.wholeWord&&(/\B/.test(le.charAt(0))||(le="\\b"+le),/\B/.test(le.charAt(le.length-1))||(le=le+"\\b"));let He="";return Re.global&&(He+="g"),Re.matchCase||(He+="i"),Re.multiline&&(He+="m"),Re.unicode&&(He+="u"),new RegExp(le,He)}function u(le){if(le.source==="^"||le.source==="^$"||le.source==="$"||le.source==="^\\s*$")return!1;const Ee=le.exec("");return!!(Ee&&le.lastIndex===0)}function p(le){return(le.global?"g":"")+(le.ignoreCase?"i":"")+(le.multiline?"m":"")+(le.unicode?"u":"")}function a(le){return le.split(/\r\n|\r|\n/)}function o(le){for(let Ee=0,Re=le.length;Ee<Re;Ee++){const He=le.charCodeAt(Ee);if(He!==32&&He!==9)return Ee}return-1}function h(le,Ee=0,Re=le.length){for(let He=Ee;He<Re;He++){const et=le.charCodeAt(He);if(et!==32&&et!==9)return le.substring(Ee,He)}return le.substring(Ee,Re)}function l(le,Ee=le.length-1){for(let Re=Ee;Re>=0;Re--){const He=le.charCodeAt(Re);if(He!==32&&He!==9)return Re}return-1}function n(le,Ee){return le<Ee?-1:le>Ee?1:0}function s(le,Ee,Re=0,He=le.length,et=0,ut=Ee.length){for(;Re<He&&et<ut;Re++,et++){let Mt=le.charCodeAt(Re),Wt=Ee.charCodeAt(et);if(Mt<Wt)return-1;if(Mt>Wt)return 1}const Dt=He-Re,We=ut-et;return Dt<We?-1:Dt>We?1:0}function d(le,Ee){return E(le,Ee,0,le.length,0,Ee.length)}function E(le,Ee,Re=0,He=le.length,et=0,ut=Ee.length){for(;Re<He&&et<ut;Re++,et++){let Mt=le.charCodeAt(Re),Wt=Ee.charCodeAt(et);if(Mt===Wt)continue;if(Mt>=128||Wt>=128)return s(le.toLowerCase(),Ee.toLowerCase(),Re,He,et,ut);D(Mt)&&(Mt-=32),D(Wt)&&(Wt-=32);const Ne=Mt-Wt;if(Ne===0)continue;return Ne}const Dt=He-Re,We=ut-et;return Dt<We?-1:Dt>We?1:0}function D(le){return le>=97&&le<=122}function T(le){return le>=65&&le<=90}function k(le,Ee){return le.length===Ee.length&&E(le,Ee)===0}function w(le,Ee){const Re=Ee.length;return Ee.length>le.length?!1:E(le,Ee,0,Re)===0}function v(le,Ee){let Re,He=Math.min(le.length,Ee.length);for(Re=0;Re<He;Re++)if(le.charCodeAt(Re)!==Ee.charCodeAt(Re))return Re;return He}function c(le,Ee){let Re,He=Math.min(le.length,Ee.length);const et=le.length-1,ut=Ee.length-1;for(Re=0;Re<He;Re++)if(le.charCodeAt(et-Re)!==Ee.charCodeAt(ut-Re))return Re;return He}function f(le){return 55296<=le&&le<=56319}function m(le){return 56320<=le&&le<=57343}function _(le,Ee){return(le-55296<<10)+(Ee-56320)+65536}function x(le,Ee,Re){const He=le.charCodeAt(Re);if(f(He)&&Re+1<Ee){const et=le.charCodeAt(Re+1);if(m(et))return _(He,et)}return He}function g(le,Ee){const Re=le.charCodeAt(Ee-1);if(m(Re)&&Ee>1){const He=le.charCodeAt(Ee-2);if(f(He))return _(He,Re)}return Re}function j(le,Ee){const Re=$.getInstance(),He=Ee,et=le.length,ut=x(le,et,Ee);Ee+=ut>=65536?2:1;let Dt=Re.getGraphemeBreakType(ut);for(;Ee<et;){const We=x(le,et,Ee),Mt=Re.getGraphemeBreakType(We);if(V(Dt,Mt))break;Ee+=We>=65536?2:1,Dt=Mt}return Ee-He}function U(le,Ee){const Re=$.getInstance(),He=Ee,et=g(le,Ee);Ee-=et>=65536?2:1;let ut=Re.getGraphemeBreakType(et);for(;Ee>0;){const Dt=g(le,Ee),We=Re.getGraphemeBreakType(Dt);if(V(We,ut))break;Ee-=Dt>=65536?2:1,ut=We}return He-Ee}const R=/(?:[\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 W(le){return R.test(le)}const H=/(?:[\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 L(le){return H.test(le)}const G=/^[\t\n\r\x20-\x7E]*$/;function z(le){return G.test(le)}const J=/[\u2028\u2029]/;function te(le){return J.test(le)}function _e(le){for(let Ee=0,Re=le.length;Ee<Re;Ee++)if(ce(le.charCodeAt(Ee)))return!0;return!1}function ce(le){return le=+le,le>=11904&&le<=55215||le>=63744&&le<=64255||le>=65281&&le<=65374}function xe(le){return le>=127462&&le<=127487||le===8986||le===8987||le===9200||le===9203||le>=9728&&le<=10175||le===11088||le===11093||le>=127744&&le<=128591||le>=128640&&le<=128764||le>=128992&&le<=129003||le>=129280&&le<=129535||le>=129648&&le<=129750}const Te=String.fromCharCode(65279);function je(le){return!!(le&&le.length>0&&le.charCodeAt(0)===65279)}function Ce(le,Ee=!1){return le?(Ee&&(le=le.replace(/\\./g,"")),le.toLowerCase()!==le):!1}function Z(le){const Ee=90-65+1;return le=le%(2*Ee),le<Ee?String.fromCharCode(97+le):String.fromCharCode(65+le-Ee)}function K(le){const Ee=$.getInstance();return Ee.getGraphemeBreakType(le)}function V(le,Ee){return le===0?Ee!==5&&Ee!==7:le===2&&Ee===3?!1:le===4||le===2||le===3||(Ee===4||Ee===2||Ee===3)?!0:le===8&&(Ee===8||Ee===9||Ee===11||Ee===12)||((le===11||le===9)&&(Ee===9||Ee===10)||((le===12||le===10)&&Ee===10||(Ee===5||Ee===13||(Ee===7||(le===1||le===13&&Ee===14)))))?!1:!(le===6&&Ee===6)}class ${constructor(){this._data=q()}static getInstance(){return $._INSTANCE||($._INSTANCE=new $),$._INSTANCE}getGraphemeBreakType(le){if(le<32)return le===10?3:le===13?2:4;if(le<127)return 0;const Ee=this._data,Re=Ee.length/3;let He=1;for(;He<=Re;)if(le<Ee[3*He])He=2*He;else if(le>Ee[3*He+1])He=2*He+1;else return Ee[3*He+2];return 0}}$._INSTANCE=null;function q(){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 Q(le,Ee){if(le===0)return 0;const Re=ge(le,Ee);if(Re!==void 0)return Re;const He=g(Ee,le);return le-=Oe(He),le}function ge(le,Ee){let Re=g(Ee,le);for(le-=Oe(Re);Ye(Re)||Re===65039||Re===8419;){if(le===0)return;Re=g(Ee,le),le-=Oe(Re)}if(!xe(Re))return;if(le>=0){const He=g(Ee,le);He===8205&&(le-=Oe(He))}return le}function Oe(le){return le>=65536?2:1}function Ye(le){return 127995<=le&&le<=127999}},NC18:function(ze,ee,M){var X=M("y+Vt"),B=M("IMiH"),I=M("7oTu"),F=Math.sqrt,S=Math.sin,C=Math.cos,P=Math.PI,y=function(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])},t=function(s,d){return(s[0]*d[0]+s[1]*d[1])/(y(s)*y(d))},b=function(s,d){return(s[0]*d[1]<s[1]*d[0]?-1:1)*Math.acos(t(s,d))};function i(s,d,E,D,T,k,w,v,c,f,m){var _=c*(P/180),x=C(_)*(s-E)/2+S(_)*(d-D)/2,g=-1*S(_)*(s-E)/2+C(_)*(d-D)/2,j=x*x/(w*w)+g*g/(v*v);j>1&&(w*=F(j),v*=F(j));var U=(T===k?-1:1)*F((w*w*(v*v)-w*w*(g*g)-v*v*(x*x))/(w*w*(g*g)+v*v*(x*x)))||0,R=U*w*g/v,W=U*-v*x/w,H=(s+E)/2+C(_)*R-S(_)*W,L=(d+D)/2+S(_)*R+C(_)*W,G=b([1,0],[(x-R)/w,(g-W)/v]),z=[(x-R)/w,(g-W)/v],J=[(-1*x-R)/w,(-1*g-W)/v],te=b(z,J);t(z,J)<=-1&&(te=P),t(z,J)>=1&&(te=0),k===0&&te>0&&(te=te-2*P),k===1&&te<0&&(te=te+2*P),m.addData(f,H,L,w,v,G,te,_,k)}var u=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,p=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function a(s){if(!s)return new B;for(var d=0,E=0,D=d,T=E,k,w=new B,v=B.CMD,c=s.match(u),f=0;f<c.length;f++){for(var m=c[f],_=m.charAt(0),x,g=m.match(p)||[],j=g.length,U=0;U<j;U++)g[U]=parseFloat(g[U]);for(var R=0;R<j;){var W,H,L,G,z,J,te,_e=d,ce=E;switch(_){case"l":d+=g[R++],E+=g[R++],x=v.L,w.addData(x,d,E);break;case"L":d=g[R++],E=g[R++],x=v.L,w.addData(x,d,E);break;case"m":d+=g[R++],E+=g[R++],x=v.M,w.addData(x,d,E),D=d,T=E,_="l";break;case"M":d=g[R++],E=g[R++],x=v.M,w.addData(x,d,E),D=d,T=E,_="L";break;case"h":d+=g[R++],x=v.L,w.addData(x,d,E);break;case"H":d=g[R++],x=v.L,w.addData(x,d,E);break;case"v":E+=g[R++],x=v.L,w.addData(x,d,E);break;case"V":E=g[R++],x=v.L,w.addData(x,d,E);break;case"C":x=v.C,w.addData(x,g[R++],g[R++],g[R++],g[R++],g[R++],g[R++]),d=g[R-2],E=g[R-1];break;case"c":x=v.C,w.addData(x,g[R++]+d,g[R++]+E,g[R++]+d,g[R++]+E,g[R++]+d,g[R++]+E),d+=g[R-2],E+=g[R-1];break;case"S":W=d,H=E;var xe=w.len(),Te=w.data;k===v.C&&(W+=d-Te[xe-4],H+=E-Te[xe-3]),x=v.C,_e=g[R++],ce=g[R++],d=g[R++],E=g[R++],w.addData(x,W,H,_e,ce,d,E);break;case"s":W=d,H=E;var xe=w.len(),Te=w.data;k===v.C&&(W+=d-Te[xe-4],H+=E-Te[xe-3]),x=v.C,_e=d+g[R++],ce=E+g[R++],d+=g[R++],E+=g[R++],w.addData(x,W,H,_e,ce,d,E);break;case"Q":_e=g[R++],ce=g[R++],d=g[R++],E=g[R++],x=v.Q,w.addData(x,_e,ce,d,E);break;case"q":_e=g[R++]+d,ce=g[R++]+E,d+=g[R++],E+=g[R++],x=v.Q,w.addData(x,_e,ce,d,E);break;case"T":W=d,H=E;var xe=w.len(),Te=w.data;k===v.Q&&(W+=d-Te[xe-4],H+=E-Te[xe-3]),d=g[R++],E=g[R++],x=v.Q,w.addData(x,W,H,d,E);break;case"t":W=d,H=E;var xe=w.len(),Te=w.data;k===v.Q&&(W+=d-Te[xe-4],H+=E-Te[xe-3]),d+=g[R++],E+=g[R++],x=v.Q,w.addData(x,W,H,d,E);break;case"A":L=g[R++],G=g[R++],z=g[R++],J=g[R++],te=g[R++],_e=d,ce=E,d=g[R++],E=g[R++],x=v.A,i(_e,ce,d,E,J,te,L,G,z,x,w);break;case"a":L=g[R++],G=g[R++],z=g[R++],J=g[R++],te=g[R++],_e=d,ce=E,d+=g[R++],E+=g[R++],x=v.A,i(_e,ce,d,E,J,te,L,G,z,x,w);break}}(_==="z"||_==="Z")&&(x=v.Z,w.addData(x),d=D,E=T),k=x}return w.toStatic(),w}function o(s,d){var E=a(s);return d=d||{},d.buildPath=function(D){if(D.setData){D.setData(E.data);var T=D.getContext();T&&D.rebuildPath(T)}else{var T=D;E.rebuildPath(T)}},d.applyTransform=function(D){I(E,D),this.dirty(!0)},d}function h(s,d){return new X(o(s,d))}function l(s,d){return X.extend(o(s,d))}function n(s,d){for(var E=[],D=s.length,T=0;T<D;T++){var k=s[T];k.path||k.createPathProxy(),k.__dirtyPath&&k.buildPath(k.path,k.shape,!0),E.push(k.path)}var w=new X(d);return w.createPathProxy(),w.buildPath=function(v){v.appendPath(E);var c=v.getContext();c&&v.rebuildPath(c)},w}ee.createFromString=h,ee.extendFromString=l,ee.mergePath=n},NLgs:function(ze,ee,M){"use strict";M.d(ee,"e",function(){return l}),M.d(ee,"f",function(){return n}),M.d(ee,"d",function(){return d}),M.d(ee,"c",function(){return E}),M.d(ee,"a",function(){return D}),M.d(ee,"b",function(){return T});var X=M("miYZ"),B=M("tsqr"),I=M("9og8"),F=M("2qtc"),S=M("kLXV"),C=M("WmNS"),P=M.n(C),y=M("q1tI"),t=M.n(y),b=M("9kvl"),i=M("xKgJ"),u=M("1vsH"),p=M("RCxd"),a=M("yTi+"),o=M.n(a),h=M("m3rI"),l=function(w){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(n(w)&&s(v))},n=function(w){return Object(i.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},s=function(){var w,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,c=Object(b.c)()._store.getState(),f=c.user;return(w=f.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(S.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:v?"\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(){b.d.push("/account/profile/edit")}}),!1)},d=function(){var w,v=Object(b.c)()._store.getState(),c=v.user;return(w=c.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(S.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.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(u.S)("/account/certification")}}),!1)},E=function(){var w;if(Object(i.a)())return!0;var v=Object(b.c)()._store.getState(),c=v.user,f=v.globalSetting;return S.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:h.a.IMG_SERVER+(f==null||((w=f.setting)===null||w===void 0)?void 0:w.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},D=function(w,v){var c;if(w)return!0;var f=Object(b.c)()._store.getState(),m=f.user,_=f.globalSetting;return S.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,v||"\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"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:h.a.IMG_SERVER+(_==null||((c=_.setting)===null||c===void 0)?void 0:c.authority_qrcode_url),width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(u.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},T=function(w){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",c=Object(b.c)()._store.getState(),f=c.shixunsDetail.detail;return(f==null?void 0:f.public)===2||(f==null?void 0:f.public)===1||(f==null?void 0:f.shixun_status)===3?(S.a.info({centered:!0,icon:t.a.createElement(p.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(f==null?void 0:f.public)===2?"\u5DF2\u516C\u5F00":(f==null?void 0:f.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",v,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:o.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(f==null?void 0:f.shixun_status)===2?(S.a.confirm({centered:!0,icon:t.a.createElement(p.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",v,"\u3002"),t.a.createElement("br",null),t.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(){S.a.confirm({width:440,centered:!0,icon:t.a.createElement(p.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 _=Object(I.a)(P.a.mark(function g(){var j;return P.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:f==null?void 0:f.identifier}});case 2:j=R.sent,j.status!==401&&(B.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:f==null?void 0:f.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:f==null?void 0:f.identifier}}));case 4:case"end":return R.stop()}},g)}));function x(){return _.apply(this,arguments)}return x}()})}}),!0):!1}},NohK:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=void 0;var X=function(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,S=null;return function(){for(var C=this,P=arguments.length,y=new Array(P),t=0;t<P;t++)y[t]=arguments[t];clearTimeout(S),S=setTimeout(function(){I.apply(C,y)},F)}};ee.default=X},NvD2:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return C});var X=M("Kwbf");function B(P,y){var t=new Set;return P.forEach(function(b){y.has(b)||t.add(b)}),t}function I(P){var y=P||{},t=y.disabled,b=y.disableCheckbox,i=y.checkable;return!!(t||b)||i===!1}function F(P,y,t,b){for(var i=new Set(P),u=new Set,p=0;p<=t;p+=1){var a=y.get(p)||new Set;a.forEach(function(n){var s=n.key,d=n.node,E=n.children,D=E===void 0?[]:E;i.has(s)&&!b(d)&&D.filter(function(T){return!b(T.node)}).forEach(function(T){i.add(T.key)})})}for(var o=new Set,h=t;h>=0;h-=1){var l=y.get(h)||new Set;l.forEach(function(n){var s=n.parent,d=n.node;if(b(d)||!n.parent||o.has(n.parent.key))return;if(b(n.parent.node)){o.add(s.key);return}var E=!0,D=!1;(s.children||[]).filter(function(T){return!b(T.node)}).forEach(function(T){var k=T.key,w=i.has(k);E&&!w&&(E=!1),!D&&(w||u.has(k))&&(D=!0)}),E&&i.add(s.key),D&&u.add(s.key),o.add(s.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(B(u,i))}}function S(P,y,t,b,i){for(var u=new Set(P),p=new Set(y),a=0;a<=b;a+=1){var o=t.get(a)||new Set;o.forEach(function(s){var d=s.key,E=s.node,D=s.children,T=D===void 0?[]:D;!u.has(d)&&!p.has(d)&&!i(E)&&T.filter(function(k){return!i(k.node)}).forEach(function(k){u.delete(k.key)})})}p=new Set;for(var h=new Set,l=b;l>=0;l-=1){var n=t.get(l)||new Set;n.forEach(function(s){var d=s.parent,E=s.node;if(i(E)||!s.parent||h.has(s.parent.key))return;if(i(s.parent.node)){h.add(d.key);return}var D=!0,T=!1;(d.children||[]).filter(function(k){return!i(k.node)}).forEach(function(k){var w=k.key,v=u.has(w);D&&!v&&(D=!1),!T&&(v||p.has(w))&&(T=!0)}),D||u.delete(d.key),T&&p.add(d.key),h.add(d.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(B(p,u))}}function C(P,y,t,b){var i=[],u;b?u=b:u=I;var p=new Set(P.filter(function(l){var n=!!t[l];return n||i.push(l),n})),a=new Map,o=0;Object.keys(t).forEach(function(l){var n=t[l],s=n.level,d=a.get(s);d||(d=new Set,a.set(s,d)),d.add(n),o=Math.max(o,s)}),Object(X.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var h;return y===!0?h=F(p,a,o,u):h=S(p,y.halfCheckedKeys,a,o,u),h}},OLES:function(ze,ee,M){"use strict";var X=M("U8pU"),B=M("VTBJ"),I=M("Ff2n"),F=M("q1tI"),S=M("uciX"),C=M("7ixt"),P=function(p){var a=p.overlay,o=p.prefixCls,h=p.id,l=p.overlayInnerStyle;return F.createElement("div",{className:"".concat(o,"-inner"),id:h,role:"tooltip",style:l},typeof a=="function"?a():a)},y=P,t=function(p,a){var o=p.overlayClassName,h=p.trigger,l=h===void 0?["hover"]:h,n=p.mouseEnterDelay,s=n===void 0?0:n,d=p.mouseLeaveDelay,E=d===void 0?.1:d,D=p.overlayStyle,T=p.prefixCls,k=T===void 0?"rc-tooltip":T,w=p.children,v=p.onVisibleChange,c=p.afterVisibleChange,f=p.transitionName,m=p.animation,_=p.placement,x=_===void 0?"right":_,g=p.align,j=g===void 0?{}:g,U=p.destroyTooltipOnHide,R=U===void 0?!1:U,W=p.defaultVisible,H=p.getTooltipContainer,L=p.overlayInnerStyle,G=Object(I.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),z=Object(F.useRef)(null);Object(F.useImperativeHandle)(a,function(){return z.current});var J=Object(B.a)({},G);"visible"in p&&(J.popupVisible=p.visible);var te=function(){var je=p.arrowContent,Ce=je===void 0?null:je,Z=p.overlay,K=p.id;return[F.createElement("div",{className:"".concat(k,"-arrow"),key:"arrow"},Ce),F.createElement(y,{key:"content",prefixCls:k,id:K,overlay:Z,overlayInnerStyle:L})]},_e=!1,ce=!1;if(typeof R=="boolean")_e=R;else if(R&&Object(X.a)(R)==="object"){var xe=R.keepParent;_e=xe===!0,ce=xe===!1}return F.createElement(S.a,Object.assign({popupClassName:o,prefixCls:k,popup:te,action:l,builtinPlacements:C.a,popupPlacement:x,ref:z,popupAlign:j,getPopupContainer:H,onPopupVisibleChange:v,afterPopupVisibleChange:c,popupTransitionName:f,popupAnimation:m,defaultPopupVisible:W,destroyPopupOnHide:_e,autoDestroy:ce,mouseLeaveDelay:E,popupStyle:D,mouseEnterDelay:s},J),w)},b=Object(F.forwardRef)(t),i=ee.a=b},OS9S:function(ze,ee,M){var X=M("bYtY"),B=X.inherits,I=M("Gev7"),F=M("mFDi");function S(y){I.call(this,y),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}S.prototype.incremental=!0,S.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},S.prototype.addDisplayable=function(y,t){t?this._temporaryDisplayables.push(y):this._displayables.push(y),this.dirty()},S.prototype.addDisplayables=function(y,t){t=t||!1;for(var b=0;b<y.length;b++)this.addDisplayable(y[b],t)},S.prototype.eachPendingDisplayable=function(y){for(var t=this._cursor;t<this._displayables.length;t++)y&&y(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)y&&y(this._temporaryDisplayables[t])},S.prototype.update=function(){this.updateTransform();for(var y=this._cursor;y<this._displayables.length;y++){var t=this._displayables[y];t.parent=this,t.update(),t.parent=null}for(var y=0;y<this._temporaryDisplayables.length;y++){var t=this._temporaryDisplayables[y];t.parent=this,t.update(),t.parent=null}},S.prototype.brush=function(y,t){for(var b=this._cursor;b<this._displayables.length;b++){var i=this._displayables[b];i.beforeBrush&&i.beforeBrush(y),i.brush(y,b===this._cursor?null:this._displayables[b-1]),i.afterBrush&&i.afterBrush(y)}this._cursor=b;for(var b=0;b<this._temporaryDisplayables.length;b++){var i=this._temporaryDisplayables[b];i.beforeBrush&&i.beforeBrush(y),i.brush(y,b===0?null:this._temporaryDisplayables[b-1]),i.afterBrush&&i.afterBrush(y)}this._temporaryDisplayables=[],this.notClear=!0};var C=[];S.prototype.getBoundingRect=function(){if(!this._rect){for(var y=new F(Infinity,Infinity,-Infinity,-Infinity),t=0;t<this._displayables.length;t++){var b=this._displayables[t],i=b.getBoundingRect().clone();b.needLocalTransform()&&i.applyTransform(b.getLocalTransform(C)),y.union(i)}this._rect=y}return this._rect},S.prototype.contain=function(y,t){var b=this.transformCoordToLocal(y,t),i=this.getBoundingRect();if(i.contain(b[0],b[1]))for(var u=0;u<this._displayables.length;u++){var p=this._displayables[u];if(p.contain(y,t))return!0}return!1},B(S,I);var P=S;ze.exports=P},OZM5:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return b}),M.d(ee,"a",function(){return i}),M.d(ee,"k",function(){return u}),M.d(ee,"h",function(){return p}),M.d(ee,"i",function(){return a}),M.d(ee,"g",function(){return o}),M.d(ee,"c",function(){return h}),M.d(ee,"d",function(){return l}),M.d(ee,"j",function(){return d}),M.d(ee,"e",function(){return E}),M.d(ee,"f",function(){return D});var X=M("KQm4"),B=M("U8pU"),I=M("Ff2n"),F=M("q1tI"),S=M.n(F),C=M("Kwbf"),P=M("WaYH"),y=.25,t=2;function b(T,k){var w=T.slice(),v=w.indexOf(k);return v>=0&&w.splice(v,1),w}function i(T,k){var w=T.slice();return w.indexOf(k)===-1&&w.push(k),w}function u(T){return T.split("-")}function p(T,k){return"".concat(T,"-").concat(k)}function a(T){return T&&T.type&&T.type.isTreeNode}function o(T,k){var w=[T],v=k[T];function c(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];f.forEach(function(m){var _=m.key,x=m.children;w.push(_),c(x)})}return c(v.children),w}function h(T,k){var w=T.clientY,v=k.selectHandle.getBoundingClientRect(),c=v.top,f=v.bottom,m=v.height,_=Math.max(m*y,t);return w<=c+_?-1:w>=f-_?1:0}function l(T,k){if(!T)return;var w=k.multiple;return w?T.slice():T.length?[T[0]]:T}var n=function(k){return k};function s(T,k){if(!T)return[];var w=k||{},v=w.processProps,c=v===void 0?n:v,f=Array.isArray(T)?T:[T];return f.map(function(m){var _=m.children,x=Object(I.a)(m,["children"]),g=s(_,k);return S.a.createElement(P.a,Object.assign({},c(x)),g)})}function d(T){if(!T)return null;var k;if(Array.isArray(T))k={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(B.a)(T)==="object")k={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(C.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function E(T,k){var w=new Set;function v(c){if(w.has(c))return;var f=k[c];if(!f)return;w.add(c);var m=f.parent,_=f.node;if(_.disabled)return;m&&v(m.key)}return(T||[]).forEach(function(c){v(c)}),Object(X.a)(w)}function D(T){var k={};return Object.keys(T).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(k[w]=T[w])}),k}},Ot1p:function(ze,ee,M){"use strict";var X=M("2qtc"),B=M("kLXV"),I=M("rAM+"),F=M("miYZ"),S=M("tsqr"),C=M("9og8"),P=M("tJVT"),y=M("jrin"),t=M("WmNS"),b=M.n(t),i=M("q1tI"),u=M.n(i),p=M("VrN/"),a=M.n(p),o=M("bdgK"),h=M("p77/"),l=M("Bd2K"),n=M("ELLl"),s=M("19Vz"),d=M("lZu9"),E=M("+NIl"),D=M("kSUc"),T=M("9Bee"),k=function(Ae){var Me=Ae.value,rt=Me===void 0?"":Me,Pt=Ae.className,Xt=Ae.showTextOnly,lt=Ae.showLines,zt=Ae.style,mt=zt===void 0?{}:zt,_t=Object(i.useMemo)(function(){return""},[rt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:_t}}))},w=M("0Owb"),v=M("dejd"),c=M("C+DQ"),f=M("1vsH"),m=M("m3rI"),_=[{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(Ae){var Me=Ae.onActionCallback,rt=Ae.title,Pt=Ae.icon,Xt=Ae.actionName,lt=Ae.className,zt=lt===void 0?"":lt,mt=Ae.children;function _t(){Me(Xt)}return u.a.createElement("a",{title:rt,className:zt,onClick:_t},u.a.createElement("i",{className:"md-iconfont ".concat(Pt)}),mt)}var g=function(Ae){var Me=Ae.watch,rt=Ae.showNullButton,Pt=Ae.onActionCallback,Xt=Ae.fullScreen,lt=Ae.insertTemp,zt=Ae.hidetoolBar,mt=Ae.uuid,_t=Ae.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(f.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(f.F)("_educoder_session"),"&key=").concat(mt,"&api=").concat(encodeURIComponent(m.a.PROXY_SERVER)));var ot=[].concat(_,[{title:"".concat(Me?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Me?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!zt&&ot.map(function(Se,Ue){return u.a.createElement("li",{key:Ue},Se.actionName?u.a.createElement(x,Object(w.a)({},Se,{onActionCallback:Pt})):u.a.createElement("span",{className:"v-line"}))}),rt?u.a.createElement("li",null,u.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Pt},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,lt&&u.a.createElement("li",null,u.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(lt),onActionCallback:Pt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(x,{icon:"".concat(Xt?"icon-shrink":"icon-enlarge"),title:Xt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Pt})))},j=M("M8RZ"),U=M("+L6B"),R=M("2/Rp"),W=M("y8nQ"),H=M("Vl3Y"),L=M("5NDa"),G=M("5rEg"),z={labelCol:{span:4},wrapperCol:{span:20}},J=function(Ae){var Me=Ae.callback,rt=Ae.onCancel;function Pt(Xt){Me(Xt)}return u.a.createElement(H.a,Object(w.a)({},z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Pt}),u.a.createElement(H.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(G.a,null)),u.a.createElement(H.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(G.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(R.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},te=M("7ahc"),_e=M("HmJG"),ce=M("BjJ7"),xe=H.a.useForm,Te={width:280,marginRight:10},je={labelCol:{span:5},wrapperCol:{span:19}},Ce=function(Ae){var Me=Ae.callback,rt=Ae.onCancel,Pt=xe(),Xt=Object(P.a)(Pt,1),lt=Xt[0];function zt(ot){Me(ot)}function mt(ot,Se){if(ot.status===-1){S.b.error(ot.message);return}lt.setFieldsValue({src:"/api/attachments/".concat(ot.id),type:Se.type})}function _t(ot){var Se=ot.target.files[0];K(Se,mt)}return u.a.createElement(H.a,Object(w.a)({form:lt},je,{className:"upload-image-panel",onFinish:zt}),u.a.createElement(H.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(H.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},u.a.createElement(G.a,{style:Te})),u.a.createElement(Z,{onFileChange:_t}))),u.a.createElement(H.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(G.a,{style:{width:264}})),u.a.createElement(H.a.Item,{style:{textAlign:"right"}},u.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(R.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))};function Z(Ae){var Me=Ae.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:Me}))}function K(Ae,Me){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");var rt=new FormData;rt.append("editormd-image-file",Ae),rt.append("file_param_name","editormd-image-file"),rt.append("byxhr","true");var Pt=new window.XMLHttpRequest;Pt.withCredentials=!0,Pt.addEventListener("load",function(Xt){Me(JSON.parse(Xt.target.responseText),Ae)},!1),Pt.addEventListener("error",function(Xt){console.error(Xt)},!1),Pt.open("POST","".concat(ce.a,"/api/attachments.json")),Pt.send(rt)}var V=M("giR+"),$=M("fyUT"),q=M("7Kak"),Q=M("9yH6"),ge=Q.a.Group,Oe={margin:"0 8px"},Ye=function(Ae){var Me=Ae.callback,rt=Ae.onCancel;function Pt(Xt){Me(Xt)}return u.a.createElement(H.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Pt},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:Oe},"\u884C\u6570"),u.a.createElement(H.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement($.a,null)),u.a.createElement("span",{style:Oe},"\u5217\u6570"),u.a.createElement(H.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement($.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(H.a.Item,{name:"align"},u.a.createElement(ge,null,u.a.createElement(Q.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(Q.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(Q.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(Q.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(R.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},le=M("ErOA"),Ee=M("7Cbv"),Re="link",He="upload-image",et="code-block",ut="add-table",Dt="------------",We={default:Dt,left:":".concat(Dt),center:":".concat(Dt,":"),right:"".concat(Dt,":")},Mt=M("9VGf"),Wt,Ne;function Pe(){}var it=0,gt=1e4,fe="\u2581",ae=`
**\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 se(Ae){return/^\d+$/.test(Ae)?"".concat(Ae,"px"):Ae}var de=navigator.platform.toUpperCase().indexOf("MAC")>=0,ve=de?"Cmd":"Ctrl",ie=["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"],oe=(Wt={},Object(y.a)(Wt,ve+"-B","bold"),Object(y.a)(Wt,ve+"-I","italic"),Wt),pe=(Ne={},Object(y.a)(Ne,Re,"\u6DFB\u52A0\u94FE\u63A5"),Object(y.a)(Ne,et,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(y.a)(Ne,He,"\u6DFB\u52A0\u6587\u4EF6"),Object(y.a)(Ne,ut,"\u6DFB\u52A0\u8868\u683C"),Ne),we=ee.a=function(Ae){var Me=Ae.defaultValue,rt=Me===void 0?"":Me,Pt=Ae.onChange,Xt=Ae.width,lt=Xt===void 0?"100%":Xt,zt=Ae.height,mt=zt===void 0?400:zt,_t=Ae.miniToolbar,ot=_t===void 0?!1:_t,Se=Ae.isFocus,Ue=Se===void 0?!1:Se,At=Ae.watch,pt=Ae.insertTemp,jt=Ae.mode,Gt=jt===void 0?"markdown":jt,Ze=Ae.id,at=Ze===void 0?"markdown-editor-id":Ze,Tt=Ae.showResizeBar,Ht=Tt===void 0?!1:Tt,Jt=Ae.noStorage,on=Jt===void 0?!1:Jt,Qn=Ae.showNullButton,Hn=Qn===void 0?!1:Qn,nn=Ae.hidetoolBar,Un=nn===void 0?!1:nn,ar=Ae.fullScreen,xn=ar===void 0?!1:ar,zn=Ae.onBlur,nr=Ae.onCMBeforeChange,Lr=Ae.onFullScreen,Cr=Ae.className,en=Cr===void 0?"":Cr,Yn=Ae.disablePaste,na=Yn===void 0?!1:Yn,Ea=Ae.placeholder,$r=Ea===void 0?"":Ea,Qr=Ae.values,Jr=Qr===void 0?"":Qr,$n=Object(i.useState)(null),ma=Object(P.a)($n,2),sn=ma[0],oa=ma[1],Xr=Object(i.useState)(rt),Ua=Object(P.a)(Xr,2),xa=Ua[0],ga=Ua[1],Ya=Object(i.useState)(At),Ka=Object(P.a)(Ya,2),da=Ka[0],Sn=Ka[1],hn=Object(i.useState)(xn),pn=Object(P.a)(hn,2),kn=pn[0],cr=pn[1],qn=Object(i.useState)(""),Xn=Object(P.a)(qn,2),Dn=Xn[0],hr=Xn[1],jn=Object(i.useState)(0),Jn=Object(P.a)(jn,2),rr=Jn[0],wn=Jn[1],Er=Object(i.useState)(mt),Sr=Object(P.a)(Er,2),gr=Sr[0],sr=Sr[1],re=Object(i.useState)(!1),Le=Object(P.a)(re,2),Xe=Le[0],ke=Le[1],dt=Object(i.useRef)(Object(Ee.a)()),tt=Object(i.useRef)(!1),ht=Object(i.useRef)(),xt=Object(i.useRef)(),Rt=Object(i.useRef)(),st=Object(i.useRef)(),Kt=Object(i.useRef)(),Zt=function(){var vt=Object(C.a)(b.a.mark(function St(){var Ot,yt;return b.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(le.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:dt.current}});case 2:yt=gn.sent,yt!=null&&(Ot=yt.attachments)!==null&&Ot!==void 0&&Ot.length&&(console.log("cm:",sn,xt),yt.attachments.map(function(Bt){Bt.content_type.indexOf("image")>-1?sn.replaceSelection("![,](/api/attachments/".concat(Bt.id,"?type=").concat(Bt.content_type,")")):Bt.content_type.indexOf("video")>-1?sn.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Bt.content_type.indexOf("pdf")>-1?sn.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Bt.content_type,'&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):sn.replaceSelection("[".concat(Bt.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Bt.id,"?type=").concat(Bt.content_type,")"))}));case 4:case"end":return gn.stop()}},St)}));return function(){return vt.apply(this,arguments)}}();Object(i.useEffect)(function(){ga(Jr),sn==null||sn.setValue(Jr)},[Jr]),Object(i.useEffect)(function(){Lr==null||Lr(kn)},[kn]),Object(i.useEffect)(function(){if(xt.current){var vt=a.a.fromTextArea(xt.current,{mode:Gt,lineNumbers:!ot,lineWrapping:!0,value:rt,autoCloseTags:!0,autoCloseBrackets:!0});Ue&&vt.focus();function St(Ot,yt){if(na){yt.preventDefault();return}var ft=yt.clipboardData;if(ft){var gn=ft.types.toString(),Bt=ft.items;if(gn==="Files"||ft.types.indexOf("Files")>-1){if(yt.preventDefault(),Gt=="stex")return;try{var vn,qt=Bt[1];((vn=Bt[0])===null||vn===void 0?void 0:vn.kind)==="file"&&(qt=Bt[0]);var Ut=qt.getAsFile(),fn=Ut.name.split(".").pop();K(Ut,function(In){if(In.id){var ur,Ln,Tr;(Ut==null||((ur=Ut.type)===null||ur===void 0)?void 0:ur.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(In.id,"?type=").concat(In.content_type,")")):(Ut==null||((Ln=Ut.type)===null||Ln===void 0)?void 0:Ln.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,'"></video>')):(Ut==null||((Tr=Ut.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,"?type=").concat(Ut.type,'&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):ie.includes(fn)?vt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,'?type=office&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):vt.replaceSelection("[".concat(Ut.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,"?type=").concat(In.content_type,")"))}else(In==null?void 0:In.status)===401&&(document.location.href="/user/login")})}catch(In){S.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",St),vt.on("dragleave",function(Ot,yt){Rt.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(Ot,yt){Rt.current.classList.add("mouse-hover-md")}),vt.on("drop",function(Ot,yt){Rt.current.classList.add("mouse-hover-md");var ft;if(ft=yt.dataTransfer.files,ft.length>0){yt.preventDefault(),yt.stopPropagation();for(var gn=function(qt){var Ut=ft[qt],fn=Ut.name.split(".").pop();K(Ut,function(In){if(In.id){var ur,Ln,Tr;(Ut==null||((ur=Ut.type)===null||ur===void 0)?void 0:ur.indexOf("image"))>-1?vt.replaceSelection("![,](/api/attachments/".concat(In.id,"?type=").concat(In.content_type,")")):(Ut==null||((Ln=Ut.type)===null||Ln===void 0)?void 0:Ln.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,'"></video>')):(Ut==null||((Tr=Ut.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,"?type=").concat(Ut.type,'&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):ie.includes(fn)?vt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,'?type=office&disposition=inline" target="_blank">').concat(Ut.name,"</a>")):vt.replaceSelection("[".concat(Ut.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(In.id,"?type=").concat(In.content_type,")"))}else(In==null?void 0:In.status)===401&&(document.location.href="/user/login")})},Bt=0;Bt<ft.length;Bt++)gn(Bt)}}),oa(vt),function(){vt.off("paste",St)}}},[]);var Et=Object(i.useCallback)(function(){if(Rt.current)try{}catch(vt){console.log(vt,"---- to set md editor body height")}},[gr,Rt,kn]);Object(i.useEffect)(function(){function vt(){var Ot=new o.default(function(yt){var ft=Object(I.a)(yt),gn;try{for(ft.s();!(gn=ft.n()).done;){var Bt=gn.value;(Bt.target.offsetHeight>0||Bt.target.offsetWidth>0)&&(Et(),sn.setSize("100%","100%"),sn.refresh())}}catch(vn){ft.e(vn)}finally{ft.f()}});return Ot.observe(xt.current.parentElement),Ot}if(sn){var St=vt();return function(){St.unobserve(xt.current.parentElement)}}},[sn,Et]),Object(i.useEffect)(function(){if(sn){for(var vt=[],St=function(){var Bt=yt[Ot];ft=Object(P.a)(Bt,2);var vn=ft[0],qt=ft[1],Ut=Object(y.a)({},vn,function(){Vt(qt)});vt.push(Ut),sn.addKeyMap(Ut)},Ot=0,yt=Object.entries(oe);Ot<yt.length;Ot++){var ft;St()}return ht.current=setInterval(function(){tt.current&&Zt()},4e3),function(){clearInterval(ht.current);var gn=Object(I.a)(vt),Bt;try{for(gn.s();!(Bt=gn.n()).done;){var vn=Bt.value;sn.removeKeyMap(vn)}}catch(qt){gn.e(qt)}finally{gn.f()}}}},[sn]),Object(i.useEffect)(function(){xn!==kn&&cr(xn)},[xn]),Object(Mt.a)(function(){if(!on&&rr>0){var vt=new Date().getTime(),St=window.sessionStorage.getItem(at);vt>=rr+gt&&(!St||St!==xa)&&(window.sessionStorage.setItem(at,xa),ke(!0))}},gt),Object(i.useEffect)(function(){Sn(At)},[sn,At]),Object(i.useEffect)(function(){sn&&(Ue&&sn.focus())},[sn,Ue]),Object(i.useEffect)(function(){if(da&&sn){var vt=sn.getScrollerElement();function St(Ot){var yt=Ot.target;if(Kt.current){var ft=yt.scrollTop/yt.scrollHeight;Kt.current.scrollTop=Kt.current.scrollHeight*ft}}return vt.addEventListener("scroll",St),function(){vt.removeEventListener("scroll",St)}}},[sn,da]),Object(i.useEffect)(function(){if(sn&&nr){function vt(St,Ot){nr(St,Ot)}return sn.on("beforeChange",vt),function(){sn.off("beforeChange",vt)}}},[sn,nr]),Object(i.useEffect)(function(){if(sn&&zn){function vt(){zn(sn.getValue())}return sn.on("blur",vt),function(){sn.off("blur",vt)}}},[sn,zn]),Object(i.useEffect)(function(){if(sn){function vt(St){var Ot=St.getValue();ga(Ot),wn(new Date().getTime()),St.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Pt&&Pt(Ot)}return sn.on("change",vt),function(){sn.off("change",vt)}}},[sn,Pt]),Object(i.useEffect)(function(){sn&&(rt==null?(sn.setValue(""),ga("")):rt!==sn.getValue()&&(sn.setValue(rt),ga(rt),sn.setCursor(sn.lineCount(),0)))},[sn,rt]);var Vt=Object(i.useCallback)(function(vt){var St=sn.getCursor(),Ot=sn.getSelection(),yt=Ot.split(`
`);switch(vt){case"bold":return sn.replaceSelection("**"+Ot+"**"),Ot===""&&sn.setCursor(St.line,St.ch+2),sn.focus();case"italic":return sn.replaceSelection("*"+Ot+"*"),Ot===""&&sn.setCursor(St.line,St.ch+1),sn.focus();case"code":return sn.replaceSelection("`"+Ot+"`"),Ot===""&&sn.setCursor(St.line,St.ch+1),sn.focus();case"inline-latex":return sn.replaceSelection("`$$"+Ot+"$$`"),Ot===""&&sn.setCursor(St.line,St.ch+3),sn.focus();case"latex":return sn.replaceSelection("```latex\n"+Ot+"\n```"),sn.setCursor(St.line+1,Ot.length+1),sn.focus();case"line-break":return sn.replaceSelection(`<br/>
`),sn.focus();case"list-ul":return Ot===""?sn.replaceSelection("- "+Ot):sn.replaceSelection(yt.map(function(ft){return ft===""?"":"- ".concat(ft)}).join(`
`)),sn.focus();case"list-ol":return Ot===""?sn.replaceSelection("1. "+Ot):sn.replaceSelection(yt.map(function(ft,gn){return ft===""?"":"".concat(gn+1,". ").concat(ft)}).join(`
`)),sn.focus();case"add-null-ch":return Ot===""&&sn.setCursor(St.line,St.ch+1),sn.replaceSelection(fe),sn.focus();case"inster-template-1":return Ot===""&&sn.setCursor(St.line,St.ch),sn.replaceSelection(ae),sn.focus();case"eraser":return sn.setValue(""),sn.focus();case"trigger-watch":return Sn(!da),sn.focus();case"trigger-full-screen":return cr(!kn),sn.focus();case Re:hr(Re);return;case et:hr(et);return;case He:hr(He);return;case ut:hr(ut);return;default:throw new Error}},[sn,da,kn]),$e=Object(i.useCallback)(function(vt){hr("");switch(Dn){case Re:var St=vt.title,Ot=vt.link;return sn.replaceSelection("[".concat(St,"](").concat(Ot,")")),sn.focus();case et:var yt=vt.language,ft=vt.content;return sn.replaceSelection(["```"+yt,ft,"```"].join(`
`)),sn.focus();case He:var gn=vt.src,Bt=vt.alt;return Bt?sn.replaceSelection("![ ".concat(Bt," ]( ").concat(gn,' "').concat(Bt,'" )')):sn.replaceSelection("![,](".concat(gn,")")),sn.focus();case ut:for(var vn=vt.row,qt=vt.col,Ut=vt.align,fn=`
`,In=0;In<vn;In++){for(var ur=[],Ln=[],Tr=0;Tr<qt;Tr++)In===1&&Ln.push(We[Ut]),ur.push(" ");In===1&&(fn+="| ".concat(Ln.join(" | "),` |
`)),fn+="| ".concat(ur.join(qt===1?"":" | "),` |
`)}return sn.replaceSelection(fn+`
`),sn.focus();default:throw new Error}},[sn,Dn]),Yt=Object(i.useMemo)(function(){switch(Dn){case Re:return u.a.createElement(J,{callback:$e,onCancel:Nt});case et:return u.a.createElement(te.b,{callback:$e,onCancel:Nt});case He:return u.a.createElement(Ce,{callback:$e,onCancel:Nt});case ut:return u.a.createElement(Ye,{callback:$e,onCancel:Nt});default:return null}},[Dn]);function Nt(){hr("")}Object(i.useEffect)(function(){if(st.current){var vt=st.current,St=!1,Ot=0;function yt(Bt){St=!0,Ot=Bt.pageY}function ft(){St=!1}function gn(Bt){if(St){var vn=Bt.pageY-Ot;vn<0&&(vn=0),vn>300&&(vn=300);var qt=mt+vn+"px";sr(qt)}}return vt.addEventListener("mousedown",yt),document.addEventListener("mousemove",gn),document.addEventListener("mouseup",ft),function(){vt.removeEventListener("mousedown",yt),document.removeEventListener("mousemove",gn),document.removeEventListener("mouseup",ft)}}},[sn,st]),Object(i.useEffect)(function(){sr(mt)},[mt]);var un=se(lt),yn=se(gr),Cn={width:un,height:yn},wt=Object(i.useMemo)(function(){if(rr){var vt=new Date(rr),St=vt.getHours(),Ot=vt.getMinutes(),yt=vt.getSeconds();return St=St<10?"0"+St:St,Ot=Ot<10?"0"+Ot:Ot,yt=yt<10?"0"+yt:yt,"".concat(St,":").concat(Ot,":").concat(yt)}return 0},[rr]);function kt(){window.sessionStorage.removeItem(at),ke(!1),wn(0)}function mn(){ke(!1),wn(0),sn.setValue(window.sessionStorage.getItem(at))}function dn(vt,St){var Ot=sn.getValue();Ot=Ot.replace(vt,St),ga(Ot),sn==null||sn.setValue(Ot)}return u.a.createElement(i.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:Rt},u.a.createElement("div",{className:"markdown-editor-container ".concat(en," ").concat(da?"on-preview":""," ").concat(ot?"mini":""," ").concat(kn?"full-screen":""),style:Cn},u.a.createElement(g,{insertTemp:pt,watch:da,fullScreen:kn,showNullButton:Hn,onActionCallback:Vt,hidetoolBar:Un,uuid:dt.current,setOpenPhones:function(){tt.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:xt,placeholder:$r})),da?u.a.createElement("div",{ref:Kt,className:"preview-container"},Gt==="stex"&&u.a.createElement(k,{value:xa}),Gt!=="stex"&&u.a.createElement(T.a,{edit:!0,value:xa,replaces:dn})):null))),Ht?u.a.createElement("a",{ref:st,className:"editor-resize"}):null,u.a.createElement(j.a,null,pe[Dn]?u.a.createElement(B.a,{centered:!0,title:pe[Dn],visible:!0,onCancel:Nt,footer:null,className:"markdown-popup-form"},Yt):null))}},P47w:function(ze,ee,M){var X=M("hydK"),B=X.createElement,I=M("IMiH"),F=M("mFDi"),S=M("Fofx"),C=M("6GrX"),P=M("pzxd"),y=M("dqUG"),t=I.CMD,b=Array.prototype.join,i="none",u=Math.round,p=Math.sin,a=Math.cos,o=Math.PI,h=Math.PI*2,l=180/o,n=1e-4;function s(z){return u(z*1e4)/1e4}function d(z){return z<n&&z>-n}function E(z,J){var te=J?z.textFill:z.fill;return te!=null&&te!==i}function D(z,J){var te=J?z.textStroke:z.stroke;return te!=null&&te!==i}function T(z,J){J&&k(z,"transform","matrix("+b.call(J,",")+")")}function k(z,J,te){(!te||te.type!=="linear"&&te.type!=="radial")&&z.setAttribute(J,te)}function w(z,J,te){z.setAttributeNS("http://www.w3.org/1999/xlink",J,te)}function v(z,J,te,_e){if(E(J,te)){var ce=te?J.textFill:J.fill;ce=ce==="transparent"?i:ce,k(z,"fill",ce),k(z,"fill-opacity",J.fillOpacity!=null?J.fillOpacity*J.opacity:J.opacity)}else k(z,"fill",i);if(D(J,te)){var xe=te?J.textStroke:J.stroke;xe=xe==="transparent"?i:xe,k(z,"stroke",xe);var Te=te?J.textStrokeWidth:J.lineWidth,je=!te&&J.strokeNoScale?_e.getLineScale():1;k(z,"stroke-width",Te/je),k(z,"paint-order",te?"stroke":"fill"),k(z,"stroke-opacity",J.strokeOpacity!=null?J.strokeOpacity:J.opacity);var Ce=J.lineDash;Ce?(k(z,"stroke-dasharray",J.lineDash.join(",")),k(z,"stroke-dashoffset",u(J.lineDashOffset||0))):k(z,"stroke-dasharray",""),J.lineCap&&k(z,"stroke-linecap",J.lineCap),J.lineJoin&&k(z,"stroke-linejoin",J.lineJoin),J.miterLimit&&k(z,"stroke-miterlimit",J.miterLimit)}else k(z,"stroke",i)}function c(z){for(var J=[],te=z.data,_e=z.len(),ce=0;ce<_e;){var xe=te[ce++],Te="",je=0;switch(xe){case t.M:Te="M",je=2;break;case t.L:Te="L",je=2;break;case t.Q:Te="Q",je=4;break;case t.C:Te="C",je=6;break;case t.A:var Ce=te[ce++],Z=te[ce++],K=te[ce++],V=te[ce++],$=te[ce++],q=te[ce++],Q=te[ce++],ge=te[ce++],Oe=Math.abs(q),Ye=d(Oe-h)||(ge?q>=h:-q>=h),le=q>0?q%h:q%h+h,Ee=!1;Ye?Ee=!0:d(Oe)?Ee=!1:Ee=le>=o===!!ge;var Re=s(Ce+K*a($)),He=s(Z+V*p($));Ye&&(ge?q=h-1e-4:q=-h+1e-4,Ee=!0,ce===9&&J.push("M",Re,He));var et=s(Ce+K*a($+q)),ut=s(Z+V*p($+q));J.push("A",s(K),s(V),u(Q*l),+Ee,+ge,et,ut);break;case t.Z:Te="Z";break;case t.R:var et=s(te[ce++]),ut=s(te[ce++]),Dt=s(te[ce++]),We=s(te[ce++]);J.push("M",et,ut,"L",et+Dt,ut,"L",et+Dt,ut+We,"L",et,ut+We,"L",et,ut);break}Te&&J.push(Te);for(var Mt=0;Mt<je;Mt++)J.push(s(te[ce++]))}return J.join(" ")}var f={};f.brush=function(z){var J=z.style,te=z.__svgEl;te||(te=B("path"),z.__svgEl=te),z.path||z.createPathProxy();var _e=z.path;if(z.__dirtyPath){_e.beginPath(),_e.subPixelOptimize=!1,z.buildPath(_e,z.shape),z.__dirtyPath=!1;var ce=c(_e);ce.indexOf("NaN")<0&&k(te,"d",ce)}v(te,J,!1,z),T(te,z.transform),J.text!=null?R(z,z.getBoundingRect()):G(z)};var m={};m.brush=function(z){var J=z.style,te=J.image;if(te instanceof HTMLImageElement){var _e=te.src;te=_e}if(!te)return;var ce=J.x||0,xe=J.y||0,Te=J.width,je=J.height,Ce=z.__svgEl;Ce||(Ce=B("image"),z.__svgEl=Ce),te!==z.__imageSrc&&(w(Ce,"href",te),z.__imageSrc=te),k(Ce,"width",Te),k(Ce,"height",je),k(Ce,"x",ce),k(Ce,"y",xe),T(Ce,z.transform),J.text!=null?R(z,z.getBoundingRect()):G(z)};var _={},x=new F,g={},j=[],U={left:"start",right:"end",center:"middle",middle:"middle"},R=function(z,J){var te=z.style,_e=z.transform,ce=z instanceof y||te.transformText;z.__dirty&&P.normalizeTextStyle(te,!0);var xe=te.text;if(xe!=null&&(xe+=""),!P.needDrawText(xe,te))return;xe==null&&(xe=""),!ce&&_e&&(x.copy(J),x.applyTransform(_e),J=x);var Te=z.__textSvgEl;Te||(Te=B("text"),z.__textSvgEl=Te);var je=Te.style,Ce=te.font||C.DEFAULT_FONT,Z=Te.__computedFont;Ce!==Te.__styleFont&&(je.font=Te.__styleFont=Ce,Z=Te.__computedFont=je.font);var K=te.textPadding,V=te.textLineHeight,$=z.__textCotentBlock;(!$||z.__dirtyText)&&($=z.__textCotentBlock=C.parsePlainText(xe,Z,K,V,te.truncate));var q=$.outerHeight,Q=$.lineHeight;P.getBoxPosition(g,z,te,J);var ge=g.baseX,Oe=g.baseY,Ye=g.textAlign||"left",le=g.textVerticalAlign;W(Te,ce,_e,te,J,ge,Oe);var Ee=C.adjustTextY(Oe,q,le),Re=ge,He=Ee;K&&(Re=H(ge,Ye,K),He+=K[0]),He+=Q/2,v(Te,te,!0,z);var et=$.canCacheByTextString,ut=z.__tspanList||(z.__tspanList=[]),Dt=ut.length;if(et&&z.__canCacheByTextString&&z.__text===xe){if(z.__dirtyText&&Dt)for(var We=0;We<Dt;++We)L(ut[We],Ye,Re,He+We*Q)}else{z.__text=xe,z.__canCacheByTextString=et;for(var Mt=$.lines,Wt=Mt.length,We=0;We<Wt;We++){var Ne=ut[We],Pe=Mt[We];Ne?Ne.__zrText!==Pe&&(Ne.innerHTML="",Ne.appendChild(document.createTextNode(Pe))):(Ne=ut[We]=B("tspan"),Te.appendChild(Ne),Ne.appendChild(document.createTextNode(Pe))),L(Ne,Ye,Re,He+We*Q)}if(Dt>Wt){for(;We<Dt;We++)Te.removeChild(ut[We]);ut.length=Wt}}};function W(z,J,te,_e,ce,xe,Te){S.identity(j),J&&te&&S.copy(j,te);var je=_e.textRotation;if(ce&&je){var Ce=_e.textOrigin;Ce==="center"?(xe=ce.width/2+ce.x,Te=ce.height/2+ce.y):Ce&&(xe=Ce[0]+ce.x,Te=Ce[1]+ce.y),j[4]-=xe,j[5]-=Te,S.rotate(j,j,je),j[4]+=xe,j[5]+=Te}T(z,j)}function H(z,J,te){return J==="right"?z-te[1]:J==="center"?z+te[3]/2-te[1]/2:z+te[3]}function L(z,J,te,_e){k(z,"dominant-baseline","middle"),k(z,"text-anchor",U[J]),k(z,"x",te),k(z,"y",_e)}function G(z){z&&z.__textSvgEl&&(z.__textSvgEl.parentNode&&z.__textSvgEl.parentNode.removeChild(z.__textSvgEl),z.__textSvgEl=null,z.__tspanList=[],z.__text=null)}_.drawRectText=R,_.brush=function(z){var J=z.style;J.text!=null?R(z,!1):G(z)},ee.path=f,ee.image=m,ee.text=_},P4Qj:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.removeSensor=ee.getSensor=void 0;var X=F(M("chpo")),B=M("FxDU"),I=M("24YM");function F(y){return y&&y.__esModule?y:{default:y}}var S={},C=function(t){var b=t.getAttribute(I.SizeSensorId);if(b&&S[b])return S[b];var i=(0,X.default)();t.setAttribute(I.SizeSensorId,i);var u=(0,B.createSensor)(t);return S[i]=u,u};ee.getSensor=C;var P=function(t){var b=t.element.getAttribute(I.SizeSensorId);t.element.removeAttribute(I.SizeSensorId),t.destroy(),b&&S[b]&&delete S[b]};ee.removeSensor=P},QBsz:function(ze,ee){var M=typeof Float32Array=="undefined"?Array:Float32Array;function X(v,c){var f=new M(2);return v==null&&(v=0),c==null&&(c=0),f[0]=v,f[1]=c,f}function B(v,c){return v[0]=c[0],v[1]=c[1],v}function I(v){var c=new M(2);return c[0]=v[0],c[1]=v[1],c}function F(v,c,f){return v[0]=c,v[1]=f,v}function S(v,c,f){return v[0]=c[0]+f[0],v[1]=c[1]+f[1],v}function C(v,c,f,m){return v[0]=c[0]+f[0]*m,v[1]=c[1]+f[1]*m,v}function P(v,c,f){return v[0]=c[0]-f[0],v[1]=c[1]-f[1],v}function y(v){return Math.sqrt(b(v))}var t=y;function b(v){return v[0]*v[0]+v[1]*v[1]}var i=b;function u(v,c,f){return v[0]=c[0]*f[0],v[1]=c[1]*f[1],v}function p(v,c,f){return v[0]=c[0]/f[0],v[1]=c[1]/f[1],v}function a(v,c){return v[0]*c[0]+v[1]*c[1]}function o(v,c,f){return v[0]=c[0]*f,v[1]=c[1]*f,v}function h(v,c){var f=y(c);return f===0?(v[0]=0,v[1]=0):(v[0]=c[0]/f,v[1]=c[1]/f),v}function l(v,c){return Math.sqrt((v[0]-c[0])*(v[0]-c[0])+(v[1]-c[1])*(v[1]-c[1]))}var n=l;function s(v,c){return(v[0]-c[0])*(v[0]-c[0])+(v[1]-c[1])*(v[1]-c[1])}var d=s;function E(v,c){return v[0]=-c[0],v[1]=-c[1],v}function D(v,c,f,m){return v[0]=c[0]+m*(f[0]-c[0]),v[1]=c[1]+m*(f[1]-c[1]),v}function T(v,c,f){var m=c[0],_=c[1];return v[0]=f[0]*m+f[2]*_+f[4],v[1]=f[1]*m+f[3]*_+f[5],v}function k(v,c,f){return v[0]=Math.min(c[0],f[0]),v[1]=Math.min(c[1],f[1]),v}function w(v,c,f){return v[0]=Math.max(c[0],f[0]),v[1]=Math.max(c[1],f[1]),v}ee.create=X,ee.copy=B,ee.clone=I,ee.set=F,ee.add=S,ee.scaleAndAdd=C,ee.sub=P,ee.len=y,ee.length=t,ee.lenSquare=b,ee.lengthSquare=i,ee.mul=u,ee.div=p,ee.dot=a,ee.scale=o,ee.normalize=h,ee.distance=l,ee.dist=n,ee.distanceSquare=s,ee.distSquare=d,ee.negate=E,ee.lerp=D,ee.applyTransform=T,ee.min=k,ee.max=w},"QO+J":function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.createSensor=void 0;var X=I(M("NohK")),B=M("24YM");function I(S){return S&&S.__esModule?S:{default:S}}var F=function(C){var P=void 0,y=[],t=function(){getComputedStyle(C).position==="static"&&(C.style.position="relative");var o=document.createElement("object");return o.onload=function(){o.contentDocument.defaultView.addEventListener("resize",b),b()},o.style.display="block",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.height="100%",o.style.width="100%",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.opacity="0",o.setAttribute("class",B.SensorClassName),o.setAttribute("tabindex",B.SensorTabIndex),o.type="text/html",C.appendChild(o),o.data="about:blank",o},b=(0,X.default)(function(){y.forEach(function(a){a(C)})}),i=function(o){P||(P=t()),y.indexOf(o)===-1&&y.push(o)},u=function(){P&&P.parentNode&&(P.contentDocument&&P.contentDocument.defaultView.removeEventListener("resize",b),P.parentNode.removeChild(P),P=void 0,y=[])},p=function(o){var h=y.indexOf(o);h!==-1&&y.splice(h,1),y.length===0&&P&&u()};return{element:C,bind:i,destroy:u,unbind:p}};ee.createSensor=F},Qe9p:function(ze,ee,M){var X=M("1RvN"),B={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function I(c){return c=Math.round(c),c<0?0:c>255?255:c}function F(c){return c=Math.round(c),c<0?0:c>360?360:c}function S(c){return c<0?0:c>1?1:c}function C(c){return c.length&&c.charAt(c.length-1)==="%"?I(parseFloat(c)/100*255):I(parseInt(c,10))}function P(c){return c.length&&c.charAt(c.length-1)==="%"?S(parseFloat(c)/100):S(parseFloat(c))}function y(c,f,m){return m<0?m+=1:m>1&&(m-=1),m*6<1?c+(f-c)*m*6:m*2<1?f:m*3<2?c+(f-c)*(2/3-m)*6:c}function t(c,f,m){return c+(f-c)*m}function b(c,f,m,_,x){return c[0]=f,c[1]=m,c[2]=_,c[3]=x,c}function i(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c}var u=new X(20),p=null;function a(c,f){p&&i(p,f),p=u.put(c,p||f.slice())}function o(c,f){if(!c)return;f=f||[];var m=u.get(c);if(m)return i(f,m);c=c+"";var _=c.replace(/ /g,"").toLowerCase();if(_ in B)return i(f,B[_]),a(c,f),f;if(_.charAt(0)==="#"){if(_.length===4){var x=parseInt(_.substr(1),16);if(!(x>=0&&x<=4095)){b(f,0,0,0,1);return}return b(f,(x&3840)>>4|(x&3840)>>8,x&240|(x&240)>>4,x&15|(x&15)<<4,1),a(c,f),f}else if(_.length===7){var x=parseInt(_.substr(1),16);if(!(x>=0&&x<=16777215)){b(f,0,0,0,1);return}return b(f,(x&16711680)>>16,(x&65280)>>8,x&255,1),a(c,f),f}return}var g=_.indexOf("("),j=_.indexOf(")");if(g!==-1&&j+1===_.length){var U=_.substr(0,g),R=_.substr(g+1,j-(g+1)).split(","),W=1;switch(U){case"rgba":if(R.length!==4){b(f,0,0,0,1);return}W=P(R.pop());case"rgb":if(R.length!==3){b(f,0,0,0,1);return}return b(f,C(R[0]),C(R[1]),C(R[2]),W),a(c,f),f;case"hsla":if(R.length!==4){b(f,0,0,0,1);return}return R[3]=P(R[3]),h(R,f),a(c,f),f;case"hsl":if(R.length!==3){b(f,0,0,0,1);return}return h(R,f),a(c,f),f;default:return}}b(f,0,0,0,1);return}function h(c,f){var m=(parseFloat(c[0])%360+360)%360/360,_=P(c[1]),x=P(c[2]),g=x<=.5?x*(_+1):x+_-x*_,j=x*2-g;return f=f||[],b(f,I(y(j,g,m+1/3)*255),I(y(j,g,m)*255),I(y(j,g,m-1/3)*255),1),c.length===4&&(f[3]=c[3]),f}function l(c){if(!c)return;var f=c[0]/255,m=c[1]/255,_=c[2]/255,x=Math.min(f,m,_),g=Math.max(f,m,_),j=g-x,U=(g+x)/2,R,W;if(j===0)R=0,W=0;else{U<.5?W=j/(g+x):W=j/(2-g-x);var H=((g-f)/6+j/2)/j,L=((g-m)/6+j/2)/j,G=((g-_)/6+j/2)/j;f===g?R=G-L:m===g?R=1/3+H-G:_===g&&(R=2/3+L-H),R<0&&(R+=1),R>1&&(R-=1)}var z=[R*360,W,U];return c[3]!=null&&z.push(c[3]),z}function n(c,f){var m=o(c);if(m){for(var _=0;_<3;_++)f<0?m[_]=m[_]*(1-f)|0:m[_]=(255-m[_])*f+m[_]|0,m[_]>255?m[_]=255:c[_]<0&&(m[_]=0);return v(m,m.length===4?"rgba":"rgb")}}function s(c){var f=o(c);if(f)return((1<<24)+(f[0]<<16)+(f[1]<<8)+ +f[2]).toString(16).slice(1)}function d(c,f,m){if(!(f&&f.length)||!(c>=0&&c<=1))return;m=m||[];var _=c*(f.length-1),x=Math.floor(_),g=Math.ceil(_),j=f[x],U=f[g],R=_-x;return m[0]=I(t(j[0],U[0],R)),m[1]=I(t(j[1],U[1],R)),m[2]=I(t(j[2],U[2],R)),m[3]=S(t(j[3],U[3],R)),m}var E=d;function D(c,f,m){if(!(f&&f.length)||!(c>=0&&c<=1))return;var _=c*(f.length-1),x=Math.floor(_),g=Math.ceil(_),j=o(f[x]),U=o(f[g]),R=_-x,W=v([I(t(j[0],U[0],R)),I(t(j[1],U[1],R)),I(t(j[2],U[2],R)),S(t(j[3],U[3],R))],"rgba");return m?{color:W,leftIndex:x,rightIndex:g,value:_}:W}var T=D;function k(c,f,m,_){if(c=o(c),c)return c=l(c),f!=null&&(c[0]=F(f)),m!=null&&(c[1]=P(m)),_!=null&&(c[2]=P(_)),v(h(c),"rgba")}function w(c,f){if(c=o(c),c&&f!=null)return c[3]=S(f),v(c,"rgba")}function v(c,f){if(!c||!c.length)return;var m=c[0]+","+c[1]+","+c[2];return(f==="rgba"||f==="hsva"||f==="hsla")&&(m+=","+c[3]),f+"("+m+")"}ee.parse=o,ee.lift=n,ee.toHex=s,ee.fastLerp=d,ee.fastMapToColor=E,ee.lerp=D,ee.mapToColor=T,ee.modifyHSL=k,ee.modifyAlpha=w,ee.stringify=v},QuXc:function(ze,ee){var M=function(B){this.colorStops=B||[]};M.prototype={constructor:M,addColorStop:function(B,I){this.colorStops.push({offset:B,color:I})}};var X=M;ze.exports=X},R5GN:function(ze,ee,M){"use strict";var X=M("2qtc"),B=M("kLXV"),I=M("g9YV"),F=M("wCAj"),S=M("5NDa"),C=M("5rEg"),P=M("14J3"),y=M("BMrR"),t=M("iQDF"),b=M("+eQT"),i=M("miYZ"),u=M("tsqr"),p=M("jrin"),a=M("oBTY"),o=M("k1fw"),h=M("9og8"),l=M("y8nQ"),n=M("Vl3Y"),s=M("tJVT"),d=M("WmNS"),E=M.n(d),D=M("q1tI"),T=M.n(D),k=M("wd/R"),w=M.n(k),v=M("ErOA"),c=M("1vsH"),f=M("Ty5D"),m=M("9kvl"),_=M("eozf"),x=M("oUNq"),g=M("xKgJ"),j=function(R){var W=R.classroomList,H=R.dispatch,L=R.courseEndTime,G=Object(f.i)(),z=n.a.useForm(),J=Object(s.a)(z,1),te=J[0],_e=Object(D.useState)(1),ce=Object(s.a)(_e,2),xe=ce[0],Te=ce[1],je=Object(D.useState)([]),Ce=Object(s.a)(je,2),Z=Ce[0],K=Ce[1],V=Object(D.useState)(0),$=Object(s.a)(V,2),q=$[0],Q=$[1],ge=Object(D.useState)(2e4),Oe=Object(s.a)(ge,2),Ye=Oe[0],le=Oe[1],Ee=Object(D.useState)(!0),Re=Object(s.a)(Ee,2),He=Re[0],et=Re[1],ut=Object(D.useState)([]),Dt=Object(s.a)(ut,2),We=Dt[0],Mt=Dt[1],Wt=Object(D.useState)(),Ne=Object(s.a)(Wt,2),Pe=Ne[0],it=Ne[1];Object(D.useEffect)(function(){W.actionTabs.key==="\u7ACB\u5373\u622A\u6B62"?gt():(Mt([]),K([]))},[W.actionTabs.key]);var gt=function(){var ie=Object(h.a)(E.a.mark(function oe(pe){var we,Ae,Me;return E.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return et(!0),Pt.next=3,Object(x.D)(Object(o.a)(Object(o.a)({},G),{},{page:pe||xe,limit:Ye,homework_id:W.actionTabs.type===1?"":W.actionTabs.selectArrs[0],end_homework_action:!0}));case 3:we=Pt.sent,we==null||we.course_groups.map(function(Xt,lt){Xt.key=Xt.id}),we&&(K([].concat(Object(a.a)(Z),Object(a.a)(we==null?void 0:we.course_groups))),Q(we==null?void 0:we.course_groups_count),it(we==null?void 0:we.course_groups),et(!1),pe||te.setFieldsValue((Me={},Object(p.a)(Me,"group_ids",we==null||((Ae=we.course_groups)===null||Ae===void 0)?void 0:Ae.map(function(Xt){return String(Xt.id)})),Object(p.a)(Me,"end_time",w()(w()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),Me)));case 6:case"end":return Pt.stop()}},oe)}));return function(pe){return ie.apply(this,arguments)}}(),fe=function(oe){Te(oe),gt(oe)},ae=function(){var ie=Object(h.a)(E.a.mark(function oe(){var pe,we;return E.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(pe=Object(o.a)({},te.getFieldsValue()),!(Pe!=null&&Pe.length&&!(We!=null&&We.length))){Me.next=4;break}return u.b.warning("\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u73ED\u7EA7"),Me.abrupt("return");case 4:return Me.next=6,Object(v.a)("/api/courses/".concat(G.coursesId,"/homework_commons/end_with_homework_list_position.json"),{method:"post",body:{homework_ids:Object(a.a)(W.actionTabs.selectArrs),group_ids:(We==null?void 0:We.length)>0?We:[],unified_setting:!(Z!=null&&Z.length),end_time:w()(pe.end_time).format("YYYY-MM-DD HH:mm")}});case 6:we=Me.sent,we.status===0&&(se(),Object(c.db)(["\u6559\u5B66\u8BFE\u5802","\u8BFE\u7A0B\u5B9E\u9A8C","\u7ACB\u5373\u622A\u6B62"]),u.b.success("\u64CD\u4F5C\u6210\u529F"),H({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}),Object(g.c)()?W.actionTabs.detail?(H({type:"classroomList/setActionTabs",payload:{}}),H({type:"shixunHomeworks/getWorkList",payload:Object(o.a)({},G)}),H({type:"shixunHomeworks/getWorkSetting",payload:Object(o.a)({},G)})):H({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(o.a)(Object(o.a)({},W.actionTabs.params),{},{type:4})}):H({type:"classroomList/getClassroomShixunsList",payload:Object(o.a)({},W.actionTabs.params)}));case 8:case"end":return Me.stop()}},oe)}));return function(){return ie.apply(this,arguments)}}(),se=function(){Te(1),K([])},de=q>xe*Ye,ve=W.detailShixunsList;return T.a.createElement(B.a,{centered:!0,title:"\u622A\u6B62\u4F5C\u4E1A",visible:W.actionTabs.key==="\u7ACB\u5373\u622A\u6B62",okText:"\u622A\u6B62\u4F5C\u4E1A",cancelText:"\u6682\u4E0D\u622A\u6B62",onOk:ae,onCancel:function(){se(),H({type:"classroomList/setActionTabs",payload:{}})}},T.a.createElement("p",{className:"tc"},"\u5B66\u751F\u5C06\u4E0D\u80FD\u518D\u63D0\u4EA4\u4F5C\u4E1A",T.a.createElement("br",null),'\u672C\u64CD\u4F5C\u53EA\u5BF9"\u63D0\u4EA4\u4E2D" \u201C\u8865\u4EA4\u4E2D\u201D\u7684\u4F5C\u4E1A\u6709\u6548'),Z&&T.a.createElement(n.a,{form:te},T.a.createElement(y.a,null,T.a.createElement("span",{className:"mr5"},"\u622A\u6B62\u65F6\u95F4:"),T.a.createElement(n.a.Item,{name:"end_time"},T.a.createElement(b.a,{style:{width:170},getPopupContainer:function(oe){return oe.parentNode},disabledDate:function(oe){return Object(_.b)(oe,L)},disabledTime:function(oe){return Object(_.c)(oe)},placeholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:w()(Object(c.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),(Pe==null?void 0:Pe.length)>0&&T.a.createElement(y.a,null,T.a.createElement("span",{className:"mr5"},"\u9009\u62E9\u73ED\u7EA7:"),T.a.createElement(C.a.Search,{style:{width:"300px"},onChange:function(oe){K(Pe.filter(function(pe){return pe.name.indexOf(oe.target.value)>-1}))}})),(Z==null?void 0:Z.length)>0&&W.actionTabs.type===1&&T.a.createElement(F.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(oe,pe){Mt(oe)}},pagination:!1,dataSource:Z,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"}]}),(Z==null?void 0:Z.length)>0&&W.actionTabs.type===2&&T.a.createElement(F.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(oe,pe){Mt(oe)}},pagination:!1,dataSource:Z,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time",key:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time",key:"end_time"}]})))};ee.a=Object(m.a)(function(U){var R=U.classroomList;return{classroomList:R}})(j)},RDYZ:function(ze,ee,M){var X=M("dMvE");function B(F){this._target=F.target,this._life=F.life||1e3,this._delay=F.delay||0,this._initialized=!1,this.loop=F.loop==null?!1:F.loop,this.gap=F.gap||0,this.easing=F.easing||"Linear",this.onframe=F.onframe,this.ondestroy=F.ondestroy,this.onrestart=F.onrestart,this._pausedTime=0,this._paused=!1}B.prototype={constructor:B,step:function(F,S){if(this._initialized||(this._startTime=F+this._delay,this._initialized=!0),this._paused){this._pausedTime+=S;return}var C=(F-this._startTime-this._pausedTime)/this._life;if(C<0)return;C=Math.min(C,1);var P=this.easing,y=typeof P=="string"?X[P]:P,t=typeof y=="function"?y(C):C;return this.fire("frame",t),C===1?this.loop?(this.restart(F),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(F){var S=(F-this._startTime-this._pausedTime)%this._life;this._startTime=F-S+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(F,S){F="on"+F,this[F]&&this[F](this._target,S)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var I=B;ze.exports=I},RXMa:function(ze,ee,M){var X=M("y+Vt"),B=X.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(I,F){var S=F.cx,C=F.cy,P=Math.PI*2;I.moveTo(S+F.r,C),I.arc(S,C,F.r,0,P,!1),I.moveTo(S+F.r0,C),I.arc(S,C,F.r0,0,P,!0)}});ze.exports=B},RotF:function(ze,ee,M){ze.exports=M("LSTS")},"SA+Z":function(ze,ee,M){var X=M("wTVA"),B=M("EbDI"),I=M("ZhPi"),F=M("wkBT");function S(C){return X(C)||B(C)||I(C)||F()}ze.exports=S,ze.exports.__esModule=!0,ze.exports.default=ze.exports},SJMd:function(ze,ee){/**
* @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 M,X,B,I=!1,F,S;window.PR_SHOULD_USE_CONTINUATION=!0;var C,P;(function(){var y=window,t=["break,continue,do,else,for,if,return,while"],b=[t,"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"],i=[b,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[i,"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"],p=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[i,"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"],o="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",h=[i,"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",n=[t,"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=[t,"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"],d=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[u,a,p,h,l,n,s,d],D=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",k="kwd",w="com",v="typ",c="lit",f="pun",m="pln",_="tag",x="dec",g="src",j="atn",U="atv",R="nocode",W="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(ge){for(var Oe=0,Ye=!1,le=!1,Ee=0,Re=ge.length;Ee<Re;++Ee){var He=ge[Ee];if(He.ignoreCase)le=!0;else if(/[a-z]/i.test(He.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ye=!0,le=!1;break}}var et={b:8,t:9,n:10,v:11,f:12,r:13};function ut(Ne){var Pe=Ne.charCodeAt(0);if(Pe!==92)return Pe;var it=Ne.charAt(1);return Pe=et[it],Pe||("0"<=it&&it<="7"?parseInt(Ne.substring(1),8):it==="u"||it==="x"?parseInt(Ne.substring(2),16):Ne.charCodeAt(1))}function Dt(Ne){if(Ne<32)return(Ne<16?"\\x0":"\\x")+Ne.toString(16);var Pe=String.fromCharCode(Ne);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function We(Ne){var Pe=Ne.substring(1,Ne.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),it=[],gt=Pe[0]==="^",fe=["["];gt&&fe.push("^");for(var ae=gt?1:0,se=Pe.length;ae<se;++ae){var de=Pe[ae];if(/\\[bdsw]/i.test(de))fe.push(de);else{var ve=ut(de),ie;ae+2<se&&Pe[ae+1]==="-"?(ie=ut(Pe[ae+2]),ae+=2):ie=ve,it.push([ve,ie]),ie<65||ve>122||(ie<65||ve>90||it.push([Math.max(65,ve)|32,Math.min(ie,90)|32]),ie<97||ve>122||it.push([Math.max(97,ve)&~32,Math.min(ie,122)&~32]))}}it.sort(function(Ae,Me){return Ae[0]-Me[0]||Me[1]-Ae[1]});for(var oe=[],pe=[],ae=0;ae<it.length;++ae){var we=it[ae];we[0]<=pe[1]+1?pe[1]=Math.max(pe[1],we[1]):oe.push(pe=we)}for(var ae=0;ae<oe.length;++ae){var we=oe[ae];fe.push(Dt(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&fe.push("-"),fe.push(Dt(we[1])))}return fe.push("]"),fe.join("")}function Mt(Ne){for(var Pe=Ne.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")),it=Pe.length,gt=[],fe=0,ae=0;fe<it;++fe){var se=Pe[fe];if(se==="(")++ae;else if(se.charAt(0)==="\\"){var de=+se.substring(1);de&&(de<=ae?gt[de]=-1:Pe[fe]=Dt(de))}}for(var fe=1;fe<gt.length;++fe)gt[fe]===-1&&(gt[fe]=++Oe);for(var fe=0,ae=0;fe<it;++fe){var se=Pe[fe];if(se==="(")++ae,gt[ae]||(Pe[fe]="(?:");else if(se.charAt(0)==="\\"){var de=+se.substring(1);de&&de<=ae&&(Pe[fe]="\\"+gt[de])}}for(var fe=0;fe<it;++fe)Pe[fe]==="^"&&Pe[fe+1]!=="^"&&(Pe[fe]="");if(Ne.ignoreCase&&Ye)for(var fe=0;fe<it;++fe){var se=Pe[fe],ve=se.charAt(0);se.length>=2&&ve==="["?Pe[fe]=We(se):ve!=="\\"&&(Pe[fe]=se.replace(/[a-zA-Z]/g,function(pe){var we=pe.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return Pe.join("")}for(var Wt=[],Ee=0,Re=ge.length;Ee<Re;++Ee){var He=ge[Ee];if(He.global||He.multiline)throw new Error(""+He);Wt.push("(?:"+Mt(He)+")")}return new RegExp(Wt.join("|"),le?"gi":"g")}function L(ge,Oe){var Ye=/(?:^|\s)nocode(?:\s|$)/,le=[],Ee=0,Re=[],He=0;function et(ut){var Dt=ut.nodeType;if(Dt==1){if(Ye.test(ut.className))return;for(var We=ut.firstChild;We;We=We.nextSibling)et(We);var Mt=ut.nodeName.toLowerCase();(Mt==="br"||Mt==="li")&&(le[He]=`
`,Re[He<<1]=Ee++,Re[He++<<1|1]=ut)}else if(Dt==3||Dt==4){var Wt=ut.nodeValue;Wt.length&&(Oe?Wt=Wt.replace(/\r\n?/g,`
`):Wt=Wt.replace(/[ \t\r\n]+/g," "),le[He]=Wt,Re[He<<1]=Ee,Ee+=Wt.length,Re[He++<<1|1]=ut)}}return et(ge),{sourceCode:le.join("").replace(/\n$/,""),spans:Re}}function G(ge,Oe,Ye,le,Ee){if(!Ye)return;var Re={sourceNode:ge,pre:1,langExtension:null,numberLines:null,sourceCode:Ye,spans:null,basePos:Oe,decorations:null};le(Re),Ee.push.apply(Ee,Re.decorations)}var z=/\S/;function J(ge){for(var Oe=void 0,Ye=ge.firstChild;Ye;Ye=Ye.nextSibling){var le=Ye.nodeType;Oe=le===1?Oe?ge:Ye:le===3&&z.test(Ye.nodeValue)?ge:Oe}return Oe===ge?void 0:Oe}function te(ge,Oe){var Ye={},le;(function(){for(var He=ge.concat(Oe),et=[],ut={},Dt=0,We=He.length;Dt<We;++Dt){var Mt=He[Dt],Wt=Mt[3];if(Wt)for(var Ne=Wt.length;--Ne>=0;)Ye[Wt.charAt(Ne)]=Mt;var Pe=Mt[1],it=""+Pe;ut.hasOwnProperty(it)||(et.push(Pe),ut[it]=null)}et.push(/[\0-\uffff]/),le=H(et)})();var Ee=Oe.length,Re=function(He){for(var et=He.sourceCode,ut=He.basePos,Dt=He.sourceNode,We=[ut,m],Mt=0,Wt=et.match(le)||[],Ne={},Pe=0,it=Wt.length;Pe<it;++Pe){var gt=Wt[Pe],fe=Ne[gt],ae=void 0,se;if(typeof fe=="string")se=!1;else{var de=Ye[gt.charAt(0)];if(de)ae=gt.match(de[1]),fe=de[0];else{for(var ve=0;ve<Ee;++ve)if(de=Oe[ve],ae=gt.match(de[1]),ae){fe=de[0];break}ae||(fe=m)}se=fe.length>=5&&fe.substring(0,5)==="lang-",se&&!(ae&&typeof ae[1]=="string")&&(se=!1,fe=g),se||(Ne[gt]=fe)}var ie=Mt;if(Mt+=gt.length,!se)We.push(ut+ie,fe);else{var oe=ae[1],pe=gt.indexOf(oe),we=pe+oe.length;ae[2]&&(we=gt.length-ae[2].length,pe=we-oe.length);var Ae=fe.substring(5);G(Dt,ut+ie,gt.substring(0,pe),Re,We),G(Dt,ut+ie+pe,oe,Z(Ae,oe),We),G(Dt,ut+ie+we,gt.substring(we),Re,We)}}He.decorations=We};return Re}function _e(ge){var Oe=[],Ye=[];ge.tripleQuotedStrings?Oe.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ge.multiLineStrings?Oe.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Oe.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ge.verbatimStrings&&Ye.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var le=ge.hashComments;le&&(ge.cStyleComments?(le>1?Oe.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Oe.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ye.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Oe.push([w,/^#[^\r\n]*/,null,"#"])),ge.cStyleComments&&(Ye.push([w,/^\/\/[^\r\n]*/,null]),Ye.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ee=ge.regexLiterals;if(Ee){var Re=Ee>1?"":`
\r`,He=Re?".":"[\\S\\s]",et="/(?=[^/*"+Re+"])(?:[^/\\x5B\\x5C"+Re+"]|\\x5C"+He+"|\\x5B(?:[^\\x5C\\x5D"+Re+"]|\\x5C"+He+")*(?:\\x5D|$))+/";Ye.push(["lang-regex",RegExp("^"+W+"("+et+")")])}var ut=ge.types;ut&&Ye.push([v,ut]);var Dt=(""+ge.keywords).replace(/^ | $/g,"");Dt.length&&Ye.push([k,new RegExp("^(?:"+Dt.replace(/[\s,]+/g,"|")+")\\b"),null]),Oe.push([m,/^\s+/,null,` \r
\xA0`]);var We="^.[^\\s\\w.$@'\"`/\\\\]*";return ge.regexLiterals&&(We+="(?!s*/)"),Ye.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[m,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[m,/^\\[\s\S]?/,null],[f,new RegExp(We),null]),te(Oe,Ye)}var ce=_e({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(ge,Oe,Ye){for(var le=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,Re=ge.ownerDocument,He=Re.createElement("li");ge.firstChild;)He.appendChild(ge.firstChild);var et=[He];function ut(Pe){var it=Pe.nodeType;if(it==1&&!le.test(Pe.className))if(Pe.nodeName==="br")Dt(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var gt=Pe.firstChild;gt;gt=gt.nextSibling)ut(gt);else if((it==3||it==4)&&Ye){var fe=Pe.nodeValue,ae=fe.match(Ee);if(ae){var se=fe.substring(0,ae.index);Pe.nodeValue=se;var de=fe.substring(ae.index+ae[0].length);if(de){var ve=Pe.parentNode;ve.insertBefore(Re.createTextNode(de),Pe.nextSibling)}Dt(Pe),se||Pe.parentNode.removeChild(Pe)}}}function Dt(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function it(ae,se){var de=se?ae.cloneNode(!1):ae,ve=ae.parentNode;if(ve){var ie=it(ve,1),oe=ae.nextSibling;ie.appendChild(de);for(var pe=oe;pe;pe=oe)oe=pe.nextSibling,ie.appendChild(pe)}return de}for(var gt=it(Pe.nextSibling,0),fe;(fe=gt.parentNode)&&fe.nodeType===1;)gt=fe;et.push(gt)}for(var We=0;We<et.length;++We)ut(et[We]);Oe===(Oe|0)&&et[0].setAttribute("value",Oe);var Mt=Re.createElement("ol");Mt.className="linenums";for(var Wt=Math.max(0,Oe-1|0)||0,We=0,Ne=et.length;We<Ne;++We)He=et[We],He.className="L"+(We+Wt)%10,He.firstChild||He.appendChild(Re.createTextNode("\xA0")),Mt.appendChild(He);ge.appendChild(Mt)}function Te(ge){var Oe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Oe=Oe&&+Oe[1]<=8;var Ye=/\n/g,le=ge.sourceCode,Ee=le.length,Re=0,He=ge.spans,et=He.length,ut=0,Dt=ge.decorations,We=Dt.length,Mt=0;Dt[We]=Ee;var Wt,Ne;for(Ne=Wt=0;Ne<We;)Dt[Ne]!==Dt[Ne+2]?(Dt[Wt++]=Dt[Ne++],Dt[Wt++]=Dt[Ne++]):Ne+=2;for(We=Wt,Ne=Wt=0;Ne<We;){for(var Pe=Dt[Ne],it=Dt[Ne+1],gt=Ne+2;gt+2<=We&&Dt[gt+1]===it;)gt+=2;Dt[Wt++]=Pe,Dt[Wt++]=it,Ne=gt}We=Dt.length=Wt;var fe=ge.sourceNode,ae="";fe&&(ae=fe.style.display,fe.style.display="none");try{for(var se=null;ut<et;){var de=He[ut],ve=He[ut+2]||Ee,ie=Dt[Mt+2]||Ee,gt=Math.min(ve,ie),oe=He[ut+1],pe;if(oe.nodeType!==1&&(pe=le.substring(Re,gt))){Oe&&(pe=pe.replace(Ye,"\r")),oe.nodeValue=pe;var we=oe.ownerDocument,Ae=we.createElement("span");Ae.className=Dt[Mt+1];var Me=oe.parentNode;Me.replaceChild(Ae,oe),Ae.appendChild(oe),Re<ve&&(He[ut+1]=oe=we.createTextNode(le.substring(gt,ve)),Me.insertBefore(oe,Ae.nextSibling))}Re=gt,Re>=ve&&(ut+=2),Re>=ie&&(Mt+=2)}}finally{fe&&(fe.style.display=ae)}}var je={};function Ce(ge,Oe){for(var Ye=Oe.length;--Ye>=0;){var le=Oe[Ye];je.hasOwnProperty(le)?y.console&&console.warn("cannot override language handler %s",le):je[le]=ge}}function Z(ge,Oe){return ge&&je.hasOwnProperty(ge)||(ge=/^\s*</.test(Oe)?"default-markup":"default-code"),je[ge]}Ce(ce,["default-code"]),Ce(te([],[[m,/^[^<?]+/],[x,/^<!\w[^>]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[f,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Ce(te([[m,/^[\s]+/,null,` \r
`],[U,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[_,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[j,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[f,/^[=<>\/]+/],["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"]),Ce(te([],[[U,/^[\s\S]+/]]),["uq.val"]),Ce(_e({keywords:u,hashComments:!0,cStyleComments:!0,types:D}),["c","cc","cpp","cxx","cyc","m"]),Ce(_e({keywords:"null,true,false"}),["json"]),Ce(_e({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:D}),["cs"]),Ce(_e({keywords:p,cStyleComments:!0}),["java"]),Ce(_e({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ce(_e({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ce(_e({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ce(_e({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ce(_e({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ce(_e({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ce(te([],[[T,/^[\s\S]+/]]),["regex"]);function K(ge){var Oe=ge.langExtension;try{var Ye=L(ge.sourceNode,ge.pre),le=Ye.sourceCode;ge.sourceCode=le,ge.spans=Ye.spans,ge.basePos=0,Z(Oe,le)(ge),Te(ge)}catch(Ee){y.console&&console.log(Ee&&Ee.stack||Ee)}}function V(ge,Oe,Ye){var le=Ye||!1,Ee=Oe||null,Re=document.createElement("div");Re.innerHTML="<pre>"+ge+"</pre>",Re=Re.firstChild,le&&xe(Re,le,!0);var He={langExtension:Ee,numberLines:le,sourceNode:Re,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return K(He),Re.innerHTML}function $(ge,Oe){var Ye=Oe||document.body,le=Ye.ownerDocument||document;function Ee(de){return Ye.getElementsByTagName(de)}for(var Re=[Ee("pre"),Ee("code"),Ee("xmp")],He=[],et=0;et<Re.length;++et)for(var ut=0,Dt=Re[et].length;ut<Dt;++ut)He.push(Re[et][ut]);Re=null;var We=Date;We.now||(We={now:function(){return+new Date}});var Mt=0,Wt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ne=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,it=/pre|xmp/i,gt=/^code$/i,fe=/^(?:pre|code|xmp)$/i,ae={};function se(){for(var de=y.PR_SHOULD_USE_CONTINUATION?We.now()+250:Infinity;Mt<He.length&&We.now()<de;Mt++){for(var ve=He[Mt],ie=ae,oe=ve;oe=oe.previousSibling;){var pe=oe.nodeType,we=(pe===7||pe===8)&&oe.nodeValue;if(we?!/^\??prettify\b/.test(we):pe!==3||/\S/.test(oe.nodeValue))break;if(we){ie={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(At,pt,jt){ie[pt]=jt});break}}var Ae=ve.className;if((ie!==ae||Ne.test(Ae))&&!Pe.test(Ae)){for(var Me=!1,rt=ve.parentNode;rt;rt=rt.parentNode){var Pt=rt.tagName;if(fe.test(Pt)&&rt.className&&Ne.test(rt.className)){Me=!0;break}}if(!Me){ve.className+=" prettyprinted";var Xt=ie.lang;if(!Xt){Xt=Ae.match(Wt);var lt;!Xt&&(lt=J(ve))&&gt.test(lt.tagName)&&(Xt=lt.className.match(Wt)),Xt&&(Xt=Xt[1])}var zt;if(it.test(ve.tagName))zt=1;else{var mt=ve.currentStyle,_t=le.defaultView,ot=mt?mt.whiteSpace:_t&&_t.getComputedStyle?_t.getComputedStyle(ve,null).getPropertyValue("white-space"):0;zt=ot&&ot.substring(0,3)==="pre"}var Se=ie.linenums;(Se=Se==="true"||+Se)||(Se=Ae.match(/\blinenums\b(?::(\d+))?/),Se=Se?Se[1]&&Se[1].length?+Se[1]:!0:!1),Se&&xe(ve,Se,zt);var Ue={langExtension:Xt,sourceNode:ve,numberLines:Se,pre:zt,sourceCode:null,basePos:null,spans:null,decorations:null};K(Ue)}}}Mt<He.length?y.setTimeout(se,250):typeof ge=="function"&&ge()}se()}var q=y.PR={createSimpleLexer:te,registerLangHandler:Ce,sourceDecorator:_e,PR_ATTRIB_NAME:j,PR_ATTRIB_VALUE:U,PR_COMMENT:w,PR_DECLARATION:x,PR_KEYWORD:k,PR_LITERAL:c,PR_NOCODE:R,PR_PLAIN:m,PR_PUNCTUATION:f,PR_SOURCE:g,PR_STRING:T,PR_TAG:_,PR_TYPE:v,prettyPrintOne:I?y.prettyPrintOne=V:C=V,prettyPrint:P=I?y.prettyPrint=$:P=$},Q=y.define;typeof Q=="function"&&Q.amd&&Q("google-code-prettify",[],function(){return q})})()},SKnc:function(ze,ee,M){var X=M("bYtY"),B=M("QuXc"),I=function(S,C,P,y,t,b){this.x=S==null?0:S,this.y=C==null?0:C,this.x2=P==null?1:P,this.y2=y==null?0:y,this.type="linear",this.global=b||!1,B.call(this,t)};I.prototype={constructor:I},X.inherits(I,B);var F=I;ze.exports=F},STEk:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return Ce});/*! *****************************************************************************
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 X=function(Z,K){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,$){V.__proto__=$}||function(V,$){for(var q in $)Object.prototype.hasOwnProperty.call($,q)&&(V[q]=$[q])})(Z,K)};function B(Z,K){function V(){this.constructor=Z}X(Z,K),Z.prototype=K===null?Object.create(K):(V.prototype=K.prototype,new V)}function I(Z,K,V,$){return new(V||(V=Promise))(function(q,Q){function ge(le){try{Ye($.next(le))}catch(Ee){Q(Ee)}}function Oe(le){try{Ye($.throw(le))}catch(Ee){Q(Ee)}}function Ye(le){var Ee;le.done?q(le.value):(Ee=le.value,Ee instanceof V?Ee:new V(function(Re){Re(Ee)})).then(ge,Oe)}Ye(($=$.apply(Z,K||[])).next())})}function F(Z,K){var V,$,q,Q,ge={label:0,sent:function(){if(1&q[0])throw q[1];return q[1]},trys:[],ops:[]};return Q={next:Oe(0),throw:Oe(1),return:Oe(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Oe(Ye){return function(le){return function(Ee){if(V)throw new TypeError("Generator is already executing.");for(;ge;)try{if(V=1,$&&(q=2&Ee[0]?$.return:Ee[0]?$.throw||((q=$.return)&&q.call($),0):$.next)&&!(q=q.call($,Ee[1])).done)return q;switch($=0,q&&(Ee=[2&Ee[0],q.value]),Ee[0]){case 0:case 1:q=Ee;break;case 4:return ge.label++,{value:Ee[1],done:!1};case 5:ge.label++,$=Ee[1],Ee=[0];continue;case 7:Ee=ge.ops.pop(),ge.trys.pop();continue;default:if(!(q=ge.trys,(q=q.length>0&&q[q.length-1])||Ee[0]!==6&&Ee[0]!==2)){ge=0;continue}if(Ee[0]===3&&(!q||Ee[1]>q[0]&&Ee[1]<q[3])){ge.label=Ee[1];break}if(Ee[0]===6&&ge.label<q[1]){ge.label=q[1],q=Ee;break}if(q&&ge.label<q[2]){ge.label=q[2],ge.ops.push(Ee);break}q[2]&&ge.ops.pop(),ge.trys.pop();continue}Ee=K.call(Z,ge)}catch(Re){Ee=[6,Re],$=0}finally{V=q=0}if(5&Ee[0])throw Ee[1];return{value:Ee[0]?Ee[1]:void 0,done:!0}}([Ye,le])}}}function S(){for(var Z=0,K=0,V=arguments.length;K<V;K++)Z+=arguments[K].length;var $=Array(Z),q=0;for(K=0;K<V;K++)for(var Q=arguments[K],ge=0,Oe=Q.length;ge<Oe;ge++,q++)$[q]=Q[ge];return $}var C=function(){function Z(){}return Z.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Z.setAttributes=function(K,V){for(var $=0,q=V;$<q.length;$++){var Q=q[$],ge=Q[0],Oe=Q[1];K.setAttribute(ge,Oe)}},Z.createRect=function(K,V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","rect");return q.setAttribute("width",K.toString()),q.setAttribute("height",V.toString()),$&&Z.setAttributes(q,$),q},Z.createLine=function(K,V,$,q,Q){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",K.toString()),ge.setAttribute("y1",V.toString()),ge.setAttribute("x2",$.toString()),ge.setAttribute("y2",q.toString()),Q&&Z.setAttributes(ge,Q),ge},Z.createPolygon=function(K,V){var $=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $.setAttribute("points",K),V&&Z.setAttributes($,V),$},Z.createCircle=function(K,V){var $=document.createElementNS("http://www.w3.org/2000/svg","circle");return $.setAttribute("cx",(K/2).toString()),$.setAttribute("cy",(K/2).toString()),$.setAttribute("r",K.toString()),V&&Z.setAttributes($,V),$},Z.createEllipse=function(K,V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return q.setAttribute("cx",(K/2).toString()),q.setAttribute("cy",(V/2).toString()),q.setAttribute("rx",(K/2).toString()),q.setAttribute("ry",(V/2).toString()),$&&Z.setAttributes(q,$),q},Z.createGroup=function(K){var V=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&Z.setAttributes(V,K),V},Z.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Z.createMarker=function(K,V,$,q,Q,ge,Oe){var Ye=document.createElementNS("http://www.w3.org/2000/svg","marker");return Z.setAttributes(Ye,[["id",K],["orient",V],["markerWidth",$.toString()],["markerHeight",q.toString()],["refX",Q.toString()],["refY",ge.toString()]]),Ye.appendChild(Oe),Ye},Z.createText=function(K){var V=document.createElementNS("http://www.w3.org/2000/svg","text");return V.setAttribute("x","0"),V.setAttribute("y","0"),K&&Z.setAttributes(V,K),V},Z.createTSpan=function(K,V){var $=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $.textContent=K,V&&Z.setAttributes($,V),$},Z.createImage=function(K){var V=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&Z.setAttributes(V,K),V},Z.createPoint=function(K,V){var $=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $.x=K,$.y=V,$},Z.createPath=function(K,V){var $=document.createElementNS("http://www.w3.org/2000/svg","path");return $.setAttribute("d",K),V&&Z.setAttributes($,V),$},Z}(),P=function(){function Z(){}return Z.addKey=function(K){Z.key=K},Object.defineProperty(Z,"isLicensed",{get:function(){return!!Z.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Z.key)},enumerable:!1,configurable:!0}),Z}(),y=function(){function Z(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Z.prototype.rasterize=function(K,V,$){var q=this;return new Promise(function(Q){var ge=$!==void 0?$:document.createElement("canvas");K===null&&(q.markersOnly=!0,q.naturalSize=!1);var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg");Oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Oe.setAttribute("width",V.width.baseVal.valueAsString),Oe.setAttribute("height",V.height.baseVal.valueAsString),Oe.setAttribute("viewBox","0 0 "+V.viewBox.baseVal.width.toString()+" "+V.viewBox.baseVal.height.toString()),Oe.innerHTML=V.innerHTML,q.naturalSize===!0?(Oe.width.baseVal.value=K.naturalWidth,Oe.height.baseVal.value=K.naturalHeight):q.width!==void 0&&q.height!==void 0&&(Oe.width.baseVal.value=q.width,Oe.height.baseVal.value=q.height),ge.width=Oe.width.baseVal.value,ge.height=Oe.height.baseVal.value;var Ye=Oe.outerHTML,le=ge.getContext("2d");q.markersOnly!==!0&&le.drawImage(K,0,0,ge.width,ge.height);var Ee=window.URL,Re=new Image(ge.width,ge.height);Re.setAttribute("crossOrigin","anonymous");var He=new Blob([Ye],{type:"image/svg+xml"}),et=Ee.createObjectURL(He);Re.onload=function(){le.drawImage(Re,0,0),Ee.revokeObjectURL(et);var ut=ge.toDataURL(q.imageType,q.imageQuality);Q(ut)},Re.src=et})},Z}(),t=function(){},b=function(){function Z(K){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(Z.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Z.prototype.addClass=function(K){return this.styleSheet===void 0&&this.addStyleSheet(),K.name=""+this.classNamePrefix+K.localName,this.classes.push(K),this.styleSheet.sheet.insertRule("."+K.name+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length),K},Z.prototype.addRule=function(K){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(K),this.styleSheet.sheet.insertRule(K.selector+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length)},Z.prototype.addStyleSheet=function(){var K;this.styleSheet=document.createElement("style"),((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).appendChild(this.styleSheet),this.addRule(new i("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new i("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new i("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new u("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new u("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Z.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Z}(),i=function(Z,K){this.selector=Z,this.style=K},u=function(Z,K){this.localName=Z,this.style=K},p=function(){function Z(K,V,$,q,Q){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=K,this.displayMode=V,this.markerItems=$,this.uiStyleSettings=q,this.styles=Q,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Z.prototype.show=function(K){var V=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var $=document.createElement("div");$.className=this.toolbarBlockStyleClass.name,$.style.whiteSpace="nowrap",this.uiContainer.appendChild($),this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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 ge=document.createElement("div");ge.className=""+V.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",Q.typeName),ge.innerHTML=Q.icon,ge.addEventListener("click",function(){V.markerToolbarButtonClicked(ge,Q)}),V.buttons.push(ge),V.markerButtons.push(ge)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var q=document.createElement("div");q.className=this.toolbarBlockStyleClass.name,q.style.whiteSpace="nowrap",q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(q),this.addActionButton(q,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(q,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Z.prototype.addButtonClickListener=function(K){this.buttonClickListeners.push(K)},Z.prototype.removeButtonClickListener=function(K){this.buttonClickListeners.indexOf(K)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(K),1)},Z.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Z.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var K=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var V=0;V<this.markerButtons.length;V++)V<K||V===K&&this.markerButtons.length-1===K?this.markerButtonBlock.appendChild(this.markerButtons[V]):(V===K&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[V]))}},Z.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Z.prototype.resetButtonStyles=function(){var K=this;this.buttons.forEach(function(V){V.className=V.className.replace(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name,"").trim(),V.className=V.className.replace(K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?K.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:K.toolbarActiveButtonStyleColorsClass.name,"").trim(),V.className+=" "+(K.uiStyleSettings.toolbarButtonStyleColorsClassName?K.uiStyleSettings.toolbarButtonStyleColorsClassName:K.toolbarButtonStyleColorsClass.name)})},Z.prototype.addActionButton=function(K,V,$){var q=this,Q=document.createElement("div");switch(Q.className=""+this.toolbarButtonStyleClass.name,Q.innerHTML=V,Q.setAttribute("data-action",$),Q.addEventListener("click",function(){q.actionToolbarButtonClicked(Q,$)}),$){case"select":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Q.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Q.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Q.style.fill=this.uiStyleSettings.closeButtonColor}K.appendChild(Q),this.buttons.push(Q)},Z.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new u("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new u("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new u("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new u("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new u("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var K=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new u("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new u("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new u("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new i("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new i("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Z.prototype.markerToolbarButtonClicked=function(K,V){this.setActiveButton(K),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("marker",V)}),this.markerButtonOverflowBlock.style.display="none"},Z.prototype.actionToolbarButtonClicked=function(K,V){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("action",V)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Z.prototype.setActiveButton=function(K){this.resetButtonStyles(),K.className=K.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),K.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Z.prototype.setActiveMarkerButton=function(K){var V=this.markerButtons.find(function($){return $.getAttribute("data-type-name")===K});V&&this.setActiveButton(V)},Z.prototype.setCurrentMarker=function(K){var V=this;this.currentMarker=K,this.buttons.filter(function($){return/delete|notes/.test($.getAttribute("data-action"))}).forEach(function($){V.currentMarker===void 0?($.style.fillOpacity="0.4",$.style.pointerEvents="none"):($.style.fillOpacity="1",$.style.pointerEvents="all")})},Z}(),a=function(){function Z(K,V,$,q){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=V,this.uiStyleSettings=$,this.styles=q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Z.prototype.addStyles=function(){var K;this.toolboxStyleClass=this.styles.addClass(new u("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 u("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new u("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new u("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new u("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 u("toolbox-panel-row_colors",`
background-color: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new u("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
padding: `+V+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new u("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new u("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new i("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new i("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Z.prototype.show=function(K){var V;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+((V=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Z.prototype.setPanelButtons=function(K){var V,$,q=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var ge;Q.uiStyleSettings=q.uiStyleSettings;var Oe=document.createElement("div");Oe.className=q.toolboxButtonStyleClass.name+" "+((ge=q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:q.toolboxButtonStyleColorsClass.name),Oe.innerHTML=Q.icon,Oe.title=Q.title,Oe.addEventListener("click",function(){q.panelButtonClick(Q)}),q.panelButtons.push(Oe),q.buttonRow.appendChild(Oe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Z.prototype.panelButtonClick=function(K){var V=this,$=-1;if(K!==this.activePanel){$=this.panels.indexOf(K),this.panelRow.innerHTML="";var q=K.getUi();q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(q),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=K}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){V.displayMode==="inline"?V.panelRow.style.display="none":V.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,ge){var Oe,Ye;Q.className=V.toolboxButtonStyleClass.name+" "+(ge===$?""+((Oe=V.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:V.toolboxActiveButtonStyleColorsClass.name):""+((Ye=V.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:V.toolboxButtonStyleColorsClass.name))})},Z}(),o=function(Z,K){this.title=Z,this.icon=K},h=function(Z){function K(V,$,q,Q){var ge=Z.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=$,ge.currentColor=q,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.whiteSpace="nowrap",this.colors.forEach(function(q){var Q=V.getColorBox(q);$.appendChild(Q),V.colorBoxes.push(Q)}),$},K.prototype.getColorBox=function(V){var $=this,q=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-q,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=Q-2+"px",ge.style.height=Q-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(Q+2)/2+"px",ge.style.borderColor=V===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){$.setCurrentColor(V,ge)});var Oe=document.createElement("div");return Oe.style.display="inline-block",Oe.style.width=Q-2+"px",Oe.style.height=Q-2+"px",Oe.style.backgroundColor=V,Oe.style.borderRadius=Q/2+"px",V==="transparent"&&(Oe.style.fill=this.uiStyleSettings.toolboxAccentColor,Oe.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),ge.appendChild(Oe),ge},K.prototype.setCurrentColor=function(V,$){var q=this;this.currentColor=V,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(V)},K}(o),l=function(){function Z(K,V,$){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=V,this.globalSettings=$,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(K){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(K,V){},Z.prototype.dblClick=function(K,V){},Z.prototype.manipulate=function(K){},Z.prototype.pointerUp=function(K){this.stateChanged()},Z.prototype.dispose=function(){},Z.prototype.addMarkerVisualToContainer=function(K){this.container.childNodes.length>0?this.container.insertBefore(K,this.container.childNodes[0]):this.container.appendChild(K)},Z.prototype.getState=function(){return{typeName:Z.typeName,state:this.state,notes:this.notes}},Z.prototype.restoreState=function(K){this._state=K.state,this.notes=K.notes},Z.prototype.scale=function(K,V){},Z.prototype.colorChanged=function(K){this.onColorChanged&&this.onColorChanged(K),this.stateChanged()},Z.prototype.fillColorChanged=function(K){this.onFillColorChanged&&this.onFillColorChanged(K),this.stateChanged()},Z.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var K=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),K.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(K)&&this.onStateChanged(this)}},Z.typeName="MarkerBase",Z}(),n=function(){function Z(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Z.prototype.findGripByVisual=function(K){return this.topLeft.ownsTarget(K)?this.topLeft:this.topCenter.ownsTarget(K)?this.topCenter:this.topRight.ownsTarget(K)?this.topRight:this.centerLeft.ownsTarget(K)?this.centerLeft:this.centerRight.ownsTarget(K)?this.centerRight:this.bottomLeft.ownsTarget(K)?this.bottomLeft:this.bottomCenter.ownsTarget(K)?this.bottomCenter:this.bottomRight.ownsTarget(K)?this.bottomRight:void 0},Z}(),s=function(){function Z(){this.GRIP_SIZE=10,this.visual=C.createGroup(),this.visual.appendChild(C.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(C.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Z.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},Z}(),d=function(){function Z(){}return Z.toITransformMatrix=function(K){return{a:K.a,b:K.b,c:K.c,d:K.d,e:K.e,f:K.f}},Z.toSVGMatrix=function(K,V){return K.a=V.a,K.b=V.b,K.c=V.c,K.d=V.d,K.e=V.e,K.f=V.f,K},Z}(),E=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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(C.createTransform()),Q.setupControlBox(),Q}return B(K,Z),Object.defineProperty(K.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visual",{get:function(){return this._visual},set:function(V){this._visual=V;var $=C.createTransform();this._visual.transform.baseVal.appendItem($)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(V){return!!Z.prototype.ownsTarget.call(this,V)||!!(this.controlGrips.findGripByVisual(V)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V))},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="new"&&(this.left=V.x,this.top=V.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var q=this.unrotatePoint(V);if(this.manipulationStartX=q.x,this.manipulationStartY=q.y,this.offsetX=q.x-this.left,this.offsetY=q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($)){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 ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},K.prototype.pointerUp=function(V){var $=this.state;Z.prototype.pointerUp.call(this,V),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(V),this._state="select",$==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function(V){this.visual.style.transform="translate("+V.x+"px, "+V.y+"px)"},K.prototype.manipulate=function(V){var $=this.unrotatePoint(V);this.state==="creating"?this.resize(V):this.state==="move"?(this.left=this.manipulationStartLeft+($.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($):this.state==="rotate"&&this.rotate(V)},K.prototype.resize=function(V){var $=this.manipulationStartLeft,q=this.manipulationStartWidth,Q=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$=this.manipulationStartLeft+V.x-this.manipulationStartX,q=this.manipulationStartWidth+this.manipulationStartLeft-$;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:q=this.manipulationStartWidth+V.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+V.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+V.y-this.manipulationStartY}q>=0?(this.left=$,this.width=q):(this.left=$+q,this.width=-q),ge>=0?(this.top=Q,this.height=ge):(this.top=Q+ge,this.height=-ge),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function(V){if(Math.abs(V.x-this.centerX)>.1){var $=Math.sign(V.x-this.centerX);this.rotationAngle=180*Math.atan((V.y-this.centerY)/(V.x-this.centerX))/Math.PI+90*$,this.applyRotation()}},K.prototype.applyRotation=function(){var V=this.container.transform.baseVal.getItem(0);V.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(V,0)},K.prototype.rotatePoint=function(V){if(this.rotationAngle===0)return V;var $=this.container.getCTM(),q=C.createPoint(V.x,V.y);return{x:(q=q.matrixTransform($)).x,y:q.y}},K.prototype.unrotatePoint=function(V){if(this.rotationAngle===0)return V;var $=this.container.getCTM();$=$.inverse();var q=C.createPoint(V.x,V.y);return{x:(q=q.matrixTransform($)).x,y:q.y}},K.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=C.createGroup();var V=C.createTransform();V.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(V),this.container.appendChild(this.controlBox),this.controlRect=C.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=C.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 n,this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){var V=this.controlBox.transform.baseVal.getItem(0);V.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(V,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()},K.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()},K.prototype.createGrip=function(){var V=new s;return V.visual.transform.baseVal.appendItem(C.createTransform()),this.controlBox.appendChild(V.visual),V},K.prototype.positionGrips=function(){var V=this.controlGrips.topLeft.GRIP_SIZE,$=-V/2,q=$,Q=(this.width+this.CB_DISTANCE)/2-V/2,ge=(this.height+this.CB_DISTANCE)/2-V/2,Oe=this.height+this.CB_DISTANCE-V/2,Ye=this.width+this.CB_DISTANCE-V/2;this.positionGrip(this.controlGrips.topLeft.visual,$,q),this.positionGrip(this.controlGrips.topCenter.visual,Q,q),this.positionGrip(this.controlGrips.topRight.visual,Ye,q),this.positionGrip(this.controlGrips.centerLeft.visual,$,ge),this.positionGrip(this.controlGrips.centerRight.visual,Ye,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,$,Oe),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,Oe),this.positionGrip(this.controlGrips.bottomRight.visual,Ye,Oe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,q-3*this.CB_DISTANCE)},K.prototype.positionGrip=function(V,$,q){var Q=V.transform.baseVal.getItem(0);Q.setTranslate($,q),V.transform.baseVal.replaceItem(Q,0)},K.prototype.hideControlBox=function(){this.controlBox.style.display="none"},K.prototype.showControlBox=function(){this.controlBox.style.display=""},K.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:d.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:d.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Z.prototype.getState.call(this))},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V);var $=V;this.left=$.left,this.top=$.top,this.width=$.width,this.height=$.height,this.rotationAngle=$.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(d.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(d.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$.containerTransformMatrix))},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$);var q=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:q.x*V,y:q.y*$});this.left=Q.x,this.top=Q.y,this.width=this.width*V,this.height=this.height*$,this.adjustControlBox()},K}(l),D=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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 B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.visual)},K.prototype.createVisual=function(){this.visual=C.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)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},K.prototype.manipulate=function(V){Z.prototype.manipulate.call(this,V)},K.prototype.resize=function(V){Z.prototype.resize.call(this,V),this.setSize()},K.prototype.setSize=function(){Z.prototype.setSize.call(this),C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(V){Z.prototype.pointerUp.call(this,V),this.setSize()},K.prototype.setStrokeColor=function(V){this.strokeColor=V,this.visual&&C.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(V),this.stateChanged()},K.prototype.setFillColor=function(V){this.fillColor=V,this.visual&&C.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.visual&&C.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.visual&&C.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.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))},K.prototype.restoreState=function(V){var $=V;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),Z.prototype.restoreState.call(this,V),this.setSize()},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.setSize()},K.title="Rectangle marker",K}(E),T=function(Z){function K(V,$,q,Q){var ge=Z.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=$,ge.currentWidth=q,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.widths.forEach(function(q){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=q===V.currentWidth?V.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){V.setCurrentWidth(q,Q)}),$.appendChild(Q);var ge=document.createElement("div");ge.innerText=q.toString(),ge.style.marginRight="5px",Q.appendChild(ge);var Oe=document.createElement("div");Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.display="flex",Oe.style.alignItems="center";var Ye=document.createElement("hr");Ye.style.minWidth="20px",Ye.style.border="0px",Ye.style.borderTop=q+"px solid "+V.uiStyleSettings.toolboxColor,Ye.style.flexGrow="2",Oe.appendChild(Ye),Q.appendChild(Oe),V.widthBoxes.push(Q)}),$},K.prototype.setCurrentWidth=function(V,$){var q=this;this.currentWidth=V,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(o),k=function(Z){function K(V,$,q,Q){var ge=Z.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=$,ge.currentStyle=q,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.styles.forEach(function(q){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/V.styles.length-5+"%",Q.style.borderColor=q===V.currentStyle?V.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){V.setCurrentStyle(q,Q)}),$.appendChild(Q);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var Oe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+V.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(q!==""?'stroke-dasharray="'+q+'"':"")+` />
</svg>`;ge.innerHTML=Oe,Q.appendChild(ge),V.styleBoxes.push(Q)}),$},K.prototype.setCurrentStyle=function(V,$){var q=this;this.currentStyle=V,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(o),w=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.strokeColor=q.defaultColor,Q.strokeWidth=q.defaultStrokeWidth,Q.strokeDasharray=q.defaultStrokeDasharray,Q.strokePanel=new h("Line color",q.defaultColorSet,q.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new T("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new k("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return B(K,Z),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Z.prototype.getState.call(this);return V.typeName=K.typeName,V},K.typeName="FrameMarker",K.title="Frame marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',K}(D),v=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},c=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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 B(K,Z),K.prototype.ownsTarget=function(V){return!!Z.prototype.ownsTarget.call(this,V)||!(!this.grip1.ownsTarget(V)&&!this.grip2.ownsTarget(V))},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.manipulationStartX=V.x,this.manipulationStartY=V.y,this.state==="new"&&(this.x1=V.x,this.y1=V.y,this.x2=V.x,this.y2=V.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($)?this.activeGrip=this.grip1:this.grip2.ownsTarget($)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},K.prototype.pointerUp=function(V){var $=this.state;Z.prototype.pointerUp.call(this,V),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(V),this._state="select",$==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function(V){this.state==="creating"?this.resize(V):this.state==="move"?(this.x1=this.manipulationStartX1+V.x-this.manipulationStartX,this.y1=this.manipulationStartY1+V.y-this.manipulationStartY,this.x2=this.manipulationStartX2+V.x-this.manipulationStartX,this.y2=this.manipulationStartY2+V.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(V)},K.prototype.resize=function(V){switch(this.activeGrip){case this.grip1:this.x1=V.x,this.y1=V.y;break;case this.grip2:case void 0:this.x2=V.x,this.y2=V.y}this.adjustVisual(),this.adjustControlBox()},K.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=C.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){this.positionGrips()},K.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},K.prototype.createGrip=function(){var V=new s;return V.visual.transform.baseVal.appendItem(C.createTransform()),this.controlBox.appendChild(V.visual),V},K.prototype.positionGrips=function(){var V=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-V/2,this.y1-V/2),this.positionGrip(this.grip2.visual,this.x2-V/2,this.y2-V/2)},K.prototype.positionGrip=function(V,$,q){var Q=V.transform.baseVal.getItem(0);Q.setTranslate($,q),V.transform.baseVal.replaceItem(Q,0)},K.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Z.prototype.getState.call(this))},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V);var $=V;this.x1=$.x1,this.y1=$.y1,this.x2=$.x2,this.y2=$.y2},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.x1=this.x1*V,this.y1=this.y1*$,this.x2=this.x2*V,this.y2=this.y2*$,this.adjustVisual(),this.adjustControlBox()},K}(l),f=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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=q.defaultColor,Q.strokeWidth=q.defaultStrokeWidth,Q.strokeDasharray=q.defaultStrokeDasharray,Q.strokePanel=new h("Line color",q.defaultColorSet,q.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new T("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new k("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorLine&&V!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=C.createGroup(),this.selectorLine=C.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=C.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)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},K.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()),C.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),C.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),C.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},K.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},K.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V);var $=V;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.createVisual(),this.adjustVisual()},K.typeName="LineMarker",K.title="Line marker",K.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',K}(c),m=function(Z){function K(V,$,q,Q){var ge=Z.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=$,ge.currentFont=q,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.flexGrow="2",this.fonts.forEach(function(q){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/V.fonts.length-5+"%",Q.style.borderColor=q===V.currentFont?V.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){V.setCurrentFont(q,Q)}),$.appendChild(Q);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=q,ge.style.overflow="hidden";var Oe=document.createElement("div");Oe.style.whiteSpace="nowrap",Oe.style.overflow="hidden",Oe.style.textOverflow="ellipsis",Oe.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(Oe),Q.appendChild(ge),V.fontBoxes.push(Q)}),$},K.prototype.setCurrentFont=function(V,$){var q=this;this.currentFont=V,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(o),_=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=q.defaultColor,Q.fontFamily=q.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 h("Color",q.defaultColorSet,q.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new m("Font",q.defaultFontFamilies,q.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return B(K,Z),K.prototype.ownsTarget=function(V){if(Z.prototype.ownsTarget.call(this,V)||V===this.visual||V===this.textElement||V===this.bgRectangle)return!0;var $=!1;return this.textElement.childNodes.forEach(function(q){q===V&&($=!0)}),$},K.prototype.createVisual=function(){this.visual=C.createGroup(),this.bgRectangle=C.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=C.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(C.createTransform()),this.textElement.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.isMoved=!1,this.pointerDownPoint=V,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},K.prototype.renderText=function(){var V=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.textElement.appendChild(C.createTSpan($.trim()===""?" ":$.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var V=this.textElement.getBBox(),$=1;if(V.width>0&&V.height>0){var q=(1*this.width-this.width*this.padding*2/100)/V.width,Q=(1*this.height-this.height*this.padding*2/100)/V.height;$=Math.min(q,Q)}return $},K.prototype.getTextPosition=function(V){var $=this.textElement.getBBox(),q=0,Q=0;return $.width>0&&$.height>0&&(q=(this.width-$.width*V)/2,Q=this.height/2-$.height*V/2),{x:q,y:Q}},K.prototype.sizeText=function(){var V=this.textElement.getBBox(),$=this.getTextScale(),q=this.getTextPosition($);q.y-=V.y*$,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+q.x+"px, "+q.y+"px) scale("+$+", "+$+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(q.x,q.y),this.textElement.transform.baseVal.getItem(1).setScale($,$))},K.prototype.manipulate=function(V){Z.prototype.manipulate.call(this,V),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(V.x-this.pointerDownPoint.x)>5||Math.abs(V.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function(V){Z.prototype.resize.call(this,V),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){Z.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function(V){var $=this.state;$==="creating"&&(this._suppressMarkerCreateEvent=!0),Z.prototype.pointerUp.call(this,V),this.setSize(),($==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var V=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($){$.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $=Number.parseFloat(V.textEditor.style.fontSize);V.textEditor.clientWidth>=Number.parseInt(V.textEditor.style.maxWidth)&&$>.9;)$-=.1,V.textEditor.style.fontSize=Math.max($,.9)+"em"}),this.textEditor.addEventListener("keyup",function($){$.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($){if($.clipboardData){var q=$.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(q)),$.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){V.textEditDivClicked(V.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},K.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var V=this.getTextScale(),$=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),q=this.textElement.getBBox(),Q={x:q.width*V,y:q.height*V};$.x-=Q.x/2,$.y-=Q.y/2,this.textEditor.style.top=$.y+"px",this.textEditor.style.left=$.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$.x+"px",this.textEditor.style.fontSize=Math.max(16*V,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function(V){this.text=V.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},K.prototype.select=function(){Z.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},K.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Z.prototype.deselect.call(this)},K.prototype.dblClick=function(V,$){Z.prototype.dblClick.call(this,V,$),this.showTextEditor()},K.prototype.setColor=function(V){this.textElement&&C.setAttributes(this.textElement,[["fill",V]]),this.color=V,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(V)},K.prototype.setFont=function(V){this.textElement&&C.setAttributes(this.textElement,[["font-family",V]]),this.fontFamily=V,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},K.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},K.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){var $=V;this.color=$.color,this.fontFamily=$.fontFamily,this.padding=$.padding,this.text=$.text,this.createVisual(),Z.prototype.restoreState.call(this,V),this.setSize()},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.setSize(),this.sizeText(),this.positionTextEditor()},K.typeName="TextMarker",K.title="Text marker",K.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',K}(E),x=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=q.defaultColor,Q.lineWidth=q.defaultStrokeWidth,Q.pixelRatio=q.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 h("Color",q.defaultColorSet,q.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new T("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=C.createGroup(),this.drawingImage=C.createImage(),this.visual.appendChild(this.drawingImage);var V=C.createTransform();this.visual.transform.baseVal.appendItem(V),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(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(V.x,V.y),this.drawing=!0):Z.prototype.pointerDown.call(this,V,$)},K.prototype.manipulate=function(V){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(V.x,V.y),this.canvasContext.stroke()):Z.prototype.manipulate.call(this,V)},K.prototype.resize=function(V){Z.prototype.resize.call(this,V),C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(V){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Z.prototype.pointerUp.call(this,V)},K.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)},K.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.select.call(this)},K.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.deselect.call(this)},K.prototype.finishCreation=function(){for(var V=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],q=$[0],Q=$[1],ge=$[2],Oe=$[3],Ye=!1,le=0;le<this.canvasElement.height;le++)for(var Ee=0;Ee<this.canvasElement.width;Ee++)V.data[le*this.canvasElement.width*4+4*Ee+3]>0&&(Ye=!0,le<Q&&(Q=le),Ee<q&&(q=Ee),le>Oe&&(Oe=le),Ee>ge&&(ge=Ee));if(Ye){this.left=q/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(ge-q)/this.pixelRatio,this.height=(Oe-Q)/this.pixelRatio;var Re=document.createElement("canvas");Re.width=ge-q,Re.height=Oe-Q,Re.getContext("2d").putImageData(this.canvasContext.getImageData(q,Q,ge-q,Oe-Q),0,0),this.drawingImgUrl=Re.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){C.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function(V){this.color=V,this.colorChanged(V)},K.prototype.setLineWidth=function(V){this.lineWidth=V},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({drawingImgUrl:this.drawingImgUrl},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){this.createVisual(),Z.prototype.restoreState.call(this,V),this.drawingImgUrl=V.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.setDrawingImage()},K.typeName="FreehandMarker",K.title="Freehand marker",K.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',K}(E),g=function(Z){function K(V,$,q){var Q=Z.call(this,V,q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Q.typeBoxes=[],Q.currentType=$,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");$.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2";for(var q=function(Oe){var Ye="both";switch(Oe){case 0:Ye="both";break;case 1:Ye="start";break;case 2:Ye="end";break;case 3:Ye="none"}var le=document.createElement("div");if(le.style.display="flex",le.style.flexGrow="2",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=Ye===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){V.setCurrentType(Ye,le)}),$.appendChild(le),Ye==="both"||Ye==="start"){var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.alignItems="center",Ee.style.minHeight="20px",Ee.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ee.style.marginLeft="5px",le.appendChild(Ee)}var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.style.flexGrow="2";var He=document.createElement("hr");if(He.style.minWidth="20px",He.style.border="0px",He.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),He.style.flexGrow="2",Re.appendChild(He),le.appendChild(Re),Ye==="both"||Ye==="end"){var et=document.createElement("div");et.style.display="flex",et.style.alignItems="center",et.style.minHeight="20px",et.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,et.style.marginRight="5px",le.appendChild(et)}Q.typeBoxes.push(le)},Q=this,ge=0;ge<4;ge++)q(ge);return $},K.prototype.setCurrentType=function(V,$){var q=this;this.currentType=V,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(o),j=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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 g("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.arrow1&&V!==this.arrow2)},K.prototype.getArrowPoints=function(V,$){var q=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return V-q/2+","+($+Q/2)+" "+V+","+($-Q/2)+" "+(V+q/2)+","+($+Q/2)},K.prototype.createTips=function(){this.arrow1=C.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=C.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="creating"&&this.createTips()},K.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",C.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),C.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.arrow1.transform.baseVal.getItem(0);$.setRotate(V,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($,0);var q=this.arrow2.transform.baseVal.getItem(0);q.setRotate(V+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(q,0)}},K.prototype.setArrowType=function(V){this.arrowType=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({arrowType:this.arrowType},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V);var $=V;this.arrowType=$.arrowType,this.createTips(),this.adjustVisual()},K.typeName="ArrowMarker",K.title="Arrow marker",K.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',K}(f),U=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.fillColor=q.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new h("Color",q.defaultColorSet,q.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return B(K,Z),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Z.prototype.getState.call(this);return V.typeName=K.typeName,V},K.typeName="CoverMarker",K.title="Cover marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',K}(D),R=function(Z){function K(V,$,q,Q){var ge=Z.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=$,ge.currentOpacity=q,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return B(K,Z),K.prototype.getUi=function(){var V=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",$.style.justifyContent="space-between",this.opacities.forEach(function(q){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=q===V.currentOpacity?V.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){V.setCurrentOpacity(q,Q)}),$.appendChild(Q);var ge=document.createElement("div");ge.innerText=100*q+"%",Q.appendChild(ge),V.opacityBoxes.push(Q)}),$},K.prototype.setCurrentOpacity=function(V,$){var q=this;this.currentOpacity=V,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===$?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(o),W=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=q.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=q.defaultHighlightOpacity,Q.fillPanel=new h("Color",q.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new R("Opacity",q.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return B(K,Z),K.prototype.setOpacity=function(V){this.opacity=V,this.visual&&C.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Z.prototype.getState.call(this);return V.typeName=K.typeName,V},K.typeName="HighlightMarker",K.title="Highlight marker",K.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',K}(U),H='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',L=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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=q.defaultStrokeColor,Q.bgColor=q.defaultFillColor,Q.fontFamily=q.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 h("Text color",q.defaultColorSet,Q.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new h("Fill color",q.defaultColorSet,Q.bgColor,H),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new m("Font",q.defaultFontFamilies,q.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new s,Q.tipGrip.visual.transform.baseVal.appendItem(C.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return B(K,Z),K.prototype.ownsTarget=function(V){return Z.prototype.ownsTarget.call(this,V)||this.tipGrip.ownsTarget(V)||this.tip===V},K.prototype.createTip=function(){C.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=C.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function(V,$){this.state==="new"&&Z.prototype.pointerDown.call(this,V,$),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Z.prototype.pointerDown.call(this,V,$)},K.prototype.pointerUp=function(V){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Z.prototype.pointerUp.call(this,V);else{var $=this.state==="creating";Z.prototype.pointerUp.call(this,V),this.setTipPoints($),this.positionTip()}},K.prototype.manipulate=function(V){if(this.tipMoving){var $=this.unrotatePoint(V);this.tipPosition={x:$.x-this.manipulationStartLeft,y:$.y-this.manipulationStartTop},this.positionTip()}else Z.prototype.manipulate.call(this,V)},K.prototype.setBgColor=function(V){this.bgRectangle&&this.tip&&(C.setAttributes(this.bgRectangle,[["fill",V]]),C.setAttributes(this.tip,[["fill",V]])),this.bgColor=V,this.fillColorChanged(V)},K.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},K.prototype.setTipPoints=function(V){V===void 0&&(V=!1);var $=Math.min(this.height/2,15),q=this.height/5;V&&(this.tipPosition={x:$+q/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.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(q=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:0},this.tipBase2Position={x:$+q,y:0}):(this.tipBase1Position={x:0,y:$},this.tipBase2Position={x:0,y:$+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(q=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-q,y:0},this.tipBase2Position={x:this.width-$,y:0}):(this.tipBase1Position={x:this.width,y:$},this.tipBase2Position={x:this.width,y:$+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Q<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(q=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-q,y:this.height},this.tipBase2Position={x:this.width-$,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$-q},this.tipBase2Position={x:this.width,y:this.height-$}):Q<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(q=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:this.height},this.tipBase2Position={x:$+q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$},this.tipBase2Position={x:0,y:this.height-$-q})},K.prototype.resize=function(V){Z.prototype.resize.call(this,V),this.positionTip()},K.prototype.positionTip=function(){C.setAttributes(this.tip,[["points",this.getTipPoints()]]);var V=this.tipGrip.visual.transform.baseVal.getItem(0);V.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(V,0)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.select=function(){this.positionTip(),Z.prototype.select.call(this)},K.prototype.getState=function(){var V=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){var $=V;this.bgColor=$.bgColor,this.tipPosition=$.tipPosition,Z.prototype.restoreState.call(this,V),this.createTip(),this.setTipPoints()},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.tipPosition={x:this.tipPosition.x*V,y:this.tipPosition.y*$},this.positionTip()},K.typeName="CalloutMarker",K.title="Callout marker",K.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',K}(_),G=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.strokeColor=q.defaultColor,Q.strokeWidth=q.defaultStrokeWidth,Q.strokeDasharray=q.defaultStrokeDasharray,Q.fillColor=q.defaultFillColor,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.setOpacity=Q.setOpacity.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q.strokePanel=new h("Line color",S(q.defaultColorSet,["transparent"]),q.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.fillPanel=new h("Fill color",S(q.defaultColorSet,["transparent"]),Q.fillColor,H),Q.fillPanel.onColorChanged=Q.setFillColor,Q.strokeWidthPanel=new T("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new k("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q.opacityPanel=new R("Opacity",q.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.visual)},K.prototype.createVisual=function(){this.visual=C.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},K.prototype.manipulate=function(V){Z.prototype.manipulate.call(this,V)},K.prototype.resize=function(V){Z.prototype.resize.call(this,V),this.setSize()},K.prototype.setSize=function(){Z.prototype.setSize.call(this),C.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},K.prototype.pointerUp=function(V){Z.prototype.pointerUp.call(this,V),this.setSize()},K.prototype.setStrokeColor=function(V){this.strokeColor=V,this.visual&&C.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(V),this.stateChanged()},K.prototype.setFillColor=function(V){this.fillColor=V,this.visual&&C.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(V),this.stateChanged()},K.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.visual&&C.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.visual&&C.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.setOpacity=function(V){this.opacity=V,this.visual&&C.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){var $=V;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),Z.prototype.restoreState.call(this,V),this.setSize()},K.prototype.scale=function(V,$){Z.prototype.scale.call(this,V,$),this.setSize()},K.typeName="EllipseMarker",K.title="Ellipse marker",K.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',K}(E),z=function(Z){function K(V,$,q){return Z.call(this,V,$,q)||this}return B(K,Z),Object.defineProperty(K.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.tip1&&V!==this.tip2)},K.prototype.createTips=function(){this.tip1=C.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.tip1),this.tip2=C.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.tip2)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(Z.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(C.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),C.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.tip1.transform.baseVal.getItem(0);$.setRotate(V,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($,0);var q=this.tip2.transform.baseVal.getItem(0);q.setRotate(V+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(q,0)}},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Z.prototype.getState.call(this);return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V),this.createTips(),this.adjustVisual()},K.typeName="MeasurementMarker",K.title="Measurement marker",K.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',K}(f),J=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||this;return Q.strokePanel.colors=q.defaultColorSet,Q.fillColor="transparent",Q}return B(K,Z),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Z.prototype.getState.call(this);return V.typeName=K.typeName,V},K.typeName="EllipseFrameMarker",K.title="Ellipse frame marker",K.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',K}(G),te=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(K){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(K)||(this.undoStack.push(K),JSON.stringify(this.lastRedoStep)!==JSON.stringify(K)&&this.redoStack.splice(0,this.redoStack.length))},Z.prototype.replaceLastUndoStep=function(K){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=K)},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 K=this.undoStack.pop();return K!==void 0&&this.redoStack.push(K),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}(),_e=function(Z){function K(V,$,q){var Q=Z.call(this,V,$,q)||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=q.defaultColor,Q.strokeWidth=q.defaultStrokeWidth,Q.strokeDasharray=q.defaultStrokeDasharray,Q.strokePanel=new h("Line color",q.defaultColorSet,q.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new T("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new k("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return B(K,Z),K.prototype.ownsTarget=function(V){return!(!Z.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorCurve&&V!==this.visibleCurve&&!this.curveGrip.ownsTarget(V))},K.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},K.prototype.createVisual=function(){this.visual=C.createGroup(),this.selectorCurve=C.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=C.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)},K.prototype.pointerDown=function(V,$){Z.prototype.pointerDown.call(this,V,$),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=V.x,this.curveY=V.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($)&&(this.activeGrip=this.curveGrip,this._state="resize")},K.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),C.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),C.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),C.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){Z.prototype.setupControlBox.call(this),this.curveControlLine1=C.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=C.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)},K.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Z.prototype.addControlGrips.call(this)},K.prototype.positionGrips=function(){Z.prototype.positionGrips.call(this);var V=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-V/2,this.curveY-V/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()))},K.prototype.manipulate=function(V){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+V.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+V.y-this.manipulationStartY),Z.prototype.manipulate.call(this,V)},K.prototype.resize=function(V){this.activeGrip===this.curveGrip&&(this.curveX=V.x,this.curveY=V.y),Z.prototype.resize.call(this,V),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},K.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},K.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},K.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual()},K.prototype.scale=function(V,$){this.curveX=this.curveX*V,this.curveY=this.curveY*$,Z.prototype.scale.call(this,V,$)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Z.prototype.getState.call(this));return V.typeName=K.typeName,V},K.prototype.restoreState=function(V){Z.prototype.restoreState.call(this,V);var $=V;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.curveX=$.curveX,this.curveY=$.curveY,this.createVisual(),this.adjustVisual()},K.typeName="CurveMarker",K.title="Curve marker",K.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',K}(c),ce=function(){function Z(K,V){V===void 0&&(V=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=V}return Object.defineProperty(Z.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Z.prototype.preventDefault=function(){this._defaultPrevented=!0},Z}(),xe=function(Z){function K(V,$,q){var Q=Z.call(this,V,!1)||this;return Q.dataUrl=$,Q.state=q,Q}return B(K,Z),K}(ce),Te=function(Z){function K(V,$,q){q===void 0&&(q=!1);var Q=Z.call(this,V,q)||this;return Q.marker=$,Q}return B(K,Z),K}(ce),je=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(K,V){this[K].push(V)},Z.prototype.removeEventListener=function(K,V){var $=this[K].indexOf(V);$>-1&&this[K].splice($,1)},Z}(),Ce=function(){function Z(K){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new v,this._isOpen=!1,this.undoRedoManager=new te,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 je,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Z.instanceCounter++,this.styles=new b(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=K,this.targetRoot=document.body,this.width=K.clientWidth,this.height=K.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[w,x,j,_,J,G,W,L,z,U,f,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[w,x,j,_,G,W,L]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"BASIC_MARKER_TYPES",{get:function(){return[w,x,j,_,W]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var V=this;this._availableMarkerTypes.splice(0),K.forEach(function($){if(typeof $=="string"){var q=V.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===$});q!==void 0&&V._availableMarkerTypes.push(q)}else V._availableMarkerTypes.push($)})},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(K){this._zoomLevel=K,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(),P.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Z.prototype.show=function(){var K=this;this.styles.styleSheetRoot===void 0&&t.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=t.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(V){return V(new ce(K))})},Z.prototype.render=function(){return I(this,void 0,void 0,function(){var K;return F(this,function(V){switch(V.label){case 0:return this.setCurrentMarker(),(K=new y).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.markersOnly=this.renderMarkersOnly,K.width=this.renderWidth,K.height=this.renderHeight,[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return V.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,V.sent()]}})})},Z.prototype.close=function(K){var V=this;if(K===void 0&&(K=!1),this.isOpen){var $=!1;K||this.eventListeners.beforeclose.forEach(function(q){var Q=new ce(V,!0);q(Q),Q.defaultPrevented&&($=!0)}),$||(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(q){return q(new ce(V))}),this.detachEvents(),this._isOpen=!1)}},Z.prototype.addMarkersToToolbar=function(){for(var K,V=[],$=0;$<arguments.length;$++)V[$]=arguments[$];(K=this._availableMarkerTypes).push.apply(K,V)},Z.prototype.addRenderEventListener=function(K){this.addEventListener("render",function(V){K(V.dataUrl,V.state)})},Z.prototype.removeRenderEventListener=function(K){},Z.prototype.addCloseEventListener=function(K){this.addEventListener("close",function(){K()})},Z.prototype.removeCloseEventListener=function(K){},Z.prototype.setupResizeObserver=function(){var K=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return K.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Z.prototype.onPopupTargetResize=function(){var K=1*this.target.clientWidth/this.target.clientHeight,V=this.editorCanvas.clientWidth/K>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,$=V<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/K;this.resize(V,$)},Z.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Z.prototype.resize=function(K,V){this._isResizing=!0;var $=K/this.imageWidth,q=V/this.imageHeight;this.imageWidth=Math.round(K),this.imageHeight=Math.round(V),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers($,q),this._isResizing=!1},Z.prototype.scaleMarkers=function(K,V){var $,q=this;this._currentMarker&&this._currentMarker instanceof _?this._currentMarker.scale(K,V):($=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Q){Q!==q._currentMarker&&Q.scale(K,V)}),$!==void 0&&this.setCurrentMarker($)},Z.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Z.prototype.setTopLeft=function(){var K=this.editingTarget.getBoundingClientRect(),V=this.editorCanvas.getBoundingClientRect();this.left=K.left-V.left,this.top=K.top-V.top},Z.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Z.prototype.addDefs=function(){for(var K,V=[],$=0;$<arguments.length;$++)V[$]=arguments[$];this.defs=C.createDefs(),this.addDefsToImage(),(K=this.defs).append.apply(K,V)},Z.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Z.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Z.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Z.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Z.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Z.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Z.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Z.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var K=document.createElement("a");K.href="https://markerjs.com/",K.target="_blank",K.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',K.title="Powered by marker.js",K.style.display="grid",K.style.alignItems="center",K.style.justifyItems="center",K.style.padding="3px",K.style.width="20px",K.style.height="20px",this.logoUI.appendChild(K),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 K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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 p(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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new a(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Z.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Z.prototype.removeMarker=function(K){this.markerImage.removeChild(K.container),this.markers.indexOf(K)>-1&&this.markers.splice(this.markers.indexOf(K),1),K.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(K,V){if(K==="marker"&&V!==void 0)this.createNewMarker(V);else if(K==="action")switch(V){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 K=this;if(this._currentMarker!==void 0){var V=!1;if(this.eventListeners.markerbeforedelete.forEach(function(q){var Q=new Te(K,K._currentMarker,!0);q(Q),Q.defaultPrevented&&(V=!0)}),!V){var $=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(q){return q(new Te(K,$))})}}},Z.prototype.clear=function(){var K=this,V=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var Oe=new Te(K,void 0,!0);ge(Oe),Oe.defaultPrevented&&(V=!0)}),!V)){this.setCurrentMarker();for(var $=function(ge){var Oe=q.markers[ge];q.setCurrentMarker(q.markers[ge]),q._currentMarker.dispose(),q.markerImage.removeChild(q._currentMarker.container),q.markers.splice(q.markers.indexOf(q._currentMarker),1),q.eventListeners.markerdelete.forEach(function(Ye){return Ye(new Te(K,Oe))})},q=this,Q=this.markers.length-1;Q>=0;Q--)$(Q);this.addUndoStep()}},Object.defineProperty(Z.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Z.prototype.showNotesEditor=function(){var K;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=(K=this._currentMarker.notes)!==null&&K!==void 0?K:"",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 K=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var V=this.getState(),$=this.undoRedoManager.getLastUndoStep();if(!$||$.width===V.width&&$.height===V.height){var q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(V),q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Q){return Q(new ce(K))})}else this.undoRedoManager.replaceLastUndoStep(V),this.eventListeners.statechange.forEach(function(Q){return Q(new ce(K))})}},Z.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Z.prototype.undoStep=function(){var K=this,V=this.undoRedoManager.undo();V!==void 0&&(this.restoreState(V),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new ce(K))}))},Z.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Z.prototype.redoStep=function(){var K=this,V=this.undoRedoManager.redo();V!==void 0&&(this.restoreState(V),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new ce(K))}))},Z.prototype.stepZoom=function(){var K=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=K<this.zoomSteps.length-1?this.zoomSteps[K+1]:this.zoomSteps[0]},Z.prototype.panTo=function(K){this.contentDiv.scrollBy({left:this.prevPanPoint.x-K.x,top:this.prevPanPoint.y-K.y}),this.prevPanPoint=K},Z.prototype.startRenderAndClose=function(){return I(this,void 0,void 0,function(){var K,V,$=this;return F(this,function(q){switch(q.label){case 0:return[4,this.render()];case 1:return K=q.sent(),V=this.getState(),this.eventListeners.render.forEach(function(Q){return Q(new xe($,K,V))}),this.close(!0),[2]}})})},Z.prototype.getState=function(K){K===!0&&this.setCurrentMarker();var V={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($){return V.markers.push($.getState())}),V},Z.prototype.restoreState=function(K){var V=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);K.markers.forEach(function($){var q=V._availableMarkerTypes.find(function(ge){return ge.typeName===$.typeName});if(q!==void 0){var Q=V.addNewMarker(q);Q.restoreState($),V.markers.push(Q)}}),K.width&&K.height&&(K.width!==this.imageWidth||K.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/K.width,this.imageHeight/K.height),this.eventListeners.restorestate.forEach(function($){return $(new ce(V))})},Z.prototype.addNewMarker=function(K){var V=C.createGroup();return this.markerImage.appendChild(V),new K(V,this.overlayContainer,this.settings)},Z.prototype.createNewMarker=function(K){var V,$=this;(V=typeof K=="string"?this._availableMarkerTypes.find(function(q){return q.typeName===K}):K)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(V),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(V.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(q){return q(new Te($,$._currentMarker))}))},Z.prototype.markerCreated=function(K){var V=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(K),this.setCurrentMarker(K),K instanceof x&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(x):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($){return $(new Te(V,V._currentMarker))})},Z.prototype.colorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=K,this.settings.defaultStrokeColor=K)},Z.prototype.fillColorChanged=function(K){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=K)},Z.prototype.markerStateChanged=function(K){var V=this;this.eventListeners.markerchange.forEach(function($){return $(new Te(V,K))})},Z.prototype.setCurrentMarker=function(K){var V=this;this._currentMarker!==K&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($){return $(new Te(V,V._currentMarker))})),this._currentMarker=K,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function($){return $(new Te(V,V._currentMarker))}))},Z.prototype.onPointerDown=function(K){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||K.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var V=this.markers.find(function($){return $.ownsTarget(K.target)});V!==void 0?(this.setCurrentMarker(V),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(K.clientX,K.clientY),K.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:K.clientX,y:K.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(K.clientX,K.clientY))},Z.prototype.onDblClick=function(K){if(this._isFocused||this.focus(),this.mode==="select"){var V=this.markers.find(function($){return $.ownsTarget(K.target)});V!==void 0&&V!==this._currentMarker&&this.setCurrentMarker(V),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(K.clientX,K.clientY),K.target):this.setCurrentMarker()}},Z.prototype.onPointerMove=function(K){this.touchPoints!==1&&K.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||K.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(K.clientX,K.clientY)):this.zoomLevel>1&&this.panTo({x:K.clientX,y:K.clientY}))},Z.prototype.onPointerUp=function(K){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(K.clientX,K.clientY)),this.isDragging=!1,this.addUndoStep()},Z.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Z.prototype.onKeyUp=function(K){this._currentMarker===void 0||this.notesArea!==void 0||K.key!=="Delete"&&K.key!=="Backspace"||this.deleteSelectedMarker()},Z.prototype.clientToLocalCoordinates=function(K,V){var $=this.markerImage.getBoundingClientRect();return{x:(K-$.left)/this.zoomLevel,y:(V-$.top)/this.zoomLevel}},Z.prototype.onWindowResize=function(){this.positionUI()},Z.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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(K){P.addKey(K)},Z.prototype.addEventListener=function(K,V){this.eventListeners.addEventListener(K,V)},Z.prototype.removeEventListener=function(K,V){this.eventListeners.removeEventListener(K,V)},Z.prototype.renderState=function(K){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(K),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Z.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Z.prototype.focus=function(){var K=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(V){return V(new ce(K))}))},Z.prototype.blur=function(){var K=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(V){return V(new ce(K))}))},Z.instanceCounter=0,Z}()},SUKs:function(ze,ee,M){var X=M("LPTA"),B=X.debugMode,I=function(){};B===1&&(I=console.error);var F=I;ze.exports=F},Sj9i:function(ze,ee,M){var X=M("QBsz"),B=X.create,I=X.distSquare,F=Math.pow,S=Math.sqrt,C=1e-8,P=1e-4,y=S(3),t=1/3,b=B(),i=B(),u=B();function p(c){return c>-C&&c<C}function a(c){return c>C||c<-C}function o(c,f,m,_,x){var g=1-x;return g*g*(g*c+3*x*f)+x*x*(x*_+3*g*m)}function h(c,f,m,_,x){var g=1-x;return 3*(((f-c)*g+2*(m-f)*x)*g+(_-m)*x*x)}function l(c,f,m,_,x,g){var j=_+3*(f-m)-c,U=3*(m-f*2+c),R=3*(f-c),W=c-x,H=U*U-3*j*R,L=U*R-9*j*W,G=R*R-3*U*W,z=0;if(p(H)&&p(L))if(p(U))g[0]=0;else{var J=-R/U;J>=0&&J<=1&&(g[z++]=J)}else{var te=L*L-4*H*G;if(p(te)){var _e=L/H,J=-U/j+_e,ce=-_e/2;J>=0&&J<=1&&(g[z++]=J),ce>=0&&ce<=1&&(g[z++]=ce)}else if(te>0){var xe=S(te),Te=H*U+1.5*j*(-L+xe),je=H*U+1.5*j*(-L-xe);Te<0?Te=-F(-Te,t):Te=F(Te,t),je<0?je=-F(-je,t):je=F(je,t);var J=(-U-(Te+je))/(3*j);J>=0&&J<=1&&(g[z++]=J)}else{var Ce=(2*H*U-3*j*L)/(2*S(H*H*H)),Z=Math.acos(Ce)/3,K=S(H),V=Math.cos(Z),J=(-U-2*K*V)/(3*j),ce=(-U+K*(V+y*Math.sin(Z)))/(3*j),$=(-U+K*(V-y*Math.sin(Z)))/(3*j);J>=0&&J<=1&&(g[z++]=J),ce>=0&&ce<=1&&(g[z++]=ce),$>=0&&$<=1&&(g[z++]=$)}}return z}function n(c,f,m,_,x){var g=6*m-12*f+6*c,j=9*f+3*_-3*c-9*m,U=3*f-3*c,R=0;if(p(j)){if(a(g)){var W=-U/g;W>=0&&W<=1&&(x[R++]=W)}}else{var H=g*g-4*j*U;if(p(H))x[0]=-g/(2*j);else if(H>0){var L=S(H),W=(-g+L)/(2*j),G=(-g-L)/(2*j);W>=0&&W<=1&&(x[R++]=W),G>=0&&G<=1&&(x[R++]=G)}}return R}function s(c,f,m,_,x,g){var j=(f-c)*x+c,U=(m-f)*x+f,R=(_-m)*x+m,W=(U-j)*x+j,H=(R-U)*x+U,L=(H-W)*x+W;g[0]=c,g[1]=j,g[2]=W,g[3]=L,g[4]=L,g[5]=H,g[6]=R,g[7]=_}function d(c,f,m,_,x,g,j,U,R,W,H){var L,G=.005,z=Infinity,J,te,_e,ce;b[0]=R,b[1]=W;for(var xe=0;xe<1;xe+=.05)i[0]=o(c,m,x,j,xe),i[1]=o(f,_,g,U,xe),_e=I(b,i),_e<z&&(L=xe,z=_e);z=Infinity;for(var Te=0;Te<32&&!(G<P);Te++)J=L-G,te=L+G,i[0]=o(c,m,x,j,J),i[1]=o(f,_,g,U,J),_e=I(i,b),J>=0&&_e<z?(L=J,z=_e):(u[0]=o(c,m,x,j,te),u[1]=o(f,_,g,U,te),ce=I(u,b),te<=1&&ce<z?(L=te,z=ce):G*=.5);return H&&(H[0]=o(c,m,x,j,L),H[1]=o(f,_,g,U,L)),S(z)}function E(c,f,m,_){var x=1-_;return x*(x*c+2*_*f)+_*_*m}function D(c,f,m,_){return 2*((1-_)*(f-c)+_*(m-f))}function T(c,f,m,_,x){var g=c-2*f+m,j=2*(f-c),U=c-_,R=0;if(p(g)){if(a(j)){var W=-U/j;W>=0&&W<=1&&(x[R++]=W)}}else{var H=j*j-4*g*U;if(p(H)){var W=-j/(2*g);W>=0&&W<=1&&(x[R++]=W)}else if(H>0){var L=S(H),W=(-j+L)/(2*g),G=(-j-L)/(2*g);W>=0&&W<=1&&(x[R++]=W),G>=0&&G<=1&&(x[R++]=G)}}return R}function k(c,f,m){var _=c+m-2*f;return _===0?.5:(c-f)/_}function w(c,f,m,_,x){var g=(f-c)*_+c,j=(m-f)*_+f,U=(j-g)*_+g;x[0]=c,x[1]=g,x[2]=U,x[3]=U,x[4]=j,x[5]=m}function v(c,f,m,_,x,g,j,U,R){var W,H=.005,L=Infinity;b[0]=j,b[1]=U;for(var G=0;G<1;G+=.05){i[0]=E(c,m,x,G),i[1]=E(f,_,g,G);var z=I(b,i);z<L&&(W=G,L=z)}L=Infinity;for(var J=0;J<32&&!(H<P);J++){var te=W-H,_e=W+H;i[0]=E(c,m,x,te),i[1]=E(f,_,g,te);var z=I(i,b);if(te>=0&&z<L)W=te,L=z;else{u[0]=E(c,m,x,_e),u[1]=E(f,_,g,_e);var ce=I(u,b);_e<=1&&ce<L?(W=_e,L=ce):H*=.5}}return R&&(R[0]=E(c,m,x,W),R[1]=E(f,_,g,W)),S(L)}ee.cubicAt=o,ee.cubicDerivativeAt=h,ee.cubicRootAt=l,ee.cubicExtrema=n,ee.cubicSubdivide=s,ee.cubicProjectPoint=d,ee.quadraticAt=E,ee.quadraticDerivativeAt=D,ee.quadraticRootAt=T,ee.quadraticExtremum=k,ee.quadraticSubdivide=w,ee.quadraticProjectPoint=v},SqI9:function(ze,ee,M){var X=M("y+Vt"),B=M("iXp4"),I=X.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:B(X.prototype.brush),buildPath:function(F,S){var C=S.cx,P=S.cy,y=Math.max(S.r0||0,0),t=Math.max(S.r,0),b=S.startAngle,i=S.endAngle,u=S.clockwise,p=Math.cos(b),a=Math.sin(b);F.moveTo(p*y+C,a*y+P),F.lineTo(p*t+C,a*t+P),F.arc(C,P,t,b,i,!u),F.lineTo(Math.cos(i)*y+C,Math.sin(i)*y+P),y!==0&&F.arc(C,P,y,i,b,u),F.closePath()}});ze.exports=I},SrGk:function(ze,ee,M){var X=M("hydK"),B=X.createElement,I=M("bYtY"),F=M("y+Vt"),S=M("Dagg"),C=M("dqUG"),P=M("P47w"),y=P.path,t=P.image,b=P.text,i="0",u="1";function p(o,h,l,n,s){this._zrId=o,this._svgRoot=h,this._tagNames=typeof l=="string"?[l]:l,this._markLabel=n,this._domName=s||"_dom",this.nextId=0}p.prototype.createElement=B,p.prototype.getDefs=function(o){var h=this._svgRoot,l=this._svgRoot.getElementsByTagName("defs");return l.length===0?o?(l=h.insertBefore(this.createElement("defs"),h.firstChild),l.contains||(l.contains=function(n){var s=l.children;if(!s)return!1;for(var d=s.length-1;d>=0;--d)if(s[d]===n)return!0;return!1}),l):null:l[0]},p.prototype.update=function(o,h){if(!o)return;var l=this.getDefs(!1);if(o[this._domName]&&l.contains(o[this._domName]))typeof h=="function"&&h(o);else{var n=this.add(o);n&&(o[this._domName]=n)}},p.prototype.addDom=function(o){var h=this.getDefs(!0);h.appendChild(o)},p.prototype.removeDom=function(o){var h=this.getDefs(!1);h&&o[this._domName]&&(h.removeChild(o[this._domName]),o[this._domName]=null)},p.prototype.getDoms=function(){var o=this.getDefs(!1);if(!o)return[];var h=[];return I.each(this._tagNames,function(l){var n=o.getElementsByTagName(l);h=h.concat([].slice.call(n))}),h},p.prototype.markAllUnused=function(){var o=this.getDoms(),h=this;I.each(o,function(l){l[h._markLabel]=i})},p.prototype.markUsed=function(o){o&&(o[this._markLabel]=u)},p.prototype.removeUnused=function(){var o=this.getDefs(!1);if(!o)return;var h=this.getDoms(),l=this;I.each(h,function(n){n[l._markLabel]!==u&&o.removeChild(n)})},p.prototype.getSvgProxy=function(o){return o instanceof F?y:o instanceof S?t:o instanceof C?b:y},p.prototype.getTextSvgElement=function(o){return o.__textSvgEl},p.prototype.getSvgElement=function(o){return o.__svgEl};var a=p;ze.exports=a},T6xi:function(ze,ee,M){var X=M("YgsL"),B=M("nCxF");function I(F,S,C){var P=S.points,y=S.smooth;if(P&&P.length>=2){if(y&&y!=="spline"){var t=B(P,y,C,S.smoothConstraint);F.moveTo(P[0][0],P[0][1]);for(var b=P.length,i=0;i<(C?b:b-1);i++){var u=t[i*2],p=t[i*2+1],a=P[(i+1)%b];F.bezierCurveTo(u[0],u[1],p[0],p[1],a[0],a[1])}}else{y==="spline"&&(P=X(P,C)),F.moveTo(P[0][0],P[0][1]);for(var i=1,o=P.length;i<o;i++)F.lineTo(P[i][0],P[i][1])}C&&F.closePath()}}ee.buildPath=I},T8No:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return P}),M.d(ee,"e",function(){return y}),M.d(ee,"c",function(){return f}),M.d(ee,"b",function(){return m}),M.d(ee,"d",function(){return _}),M.d(ee,"f",function(){return j});var X=M("MNsG"),B=M("N0LK"),I=M("Cg/j");let F=X.k||"";const S=new Map;S.set("false",!1),S.set("true",!0),S.set("isMac",X.f),S.set("isLinux",X.d),S.set("isWindows",X.i),S.set("isWeb",X.h),S.set("isMacNative",X.f&&!X.h),S.set("isEdge",F.indexOf("Edg/")>=0),S.set("isFirefox",F.indexOf("Firefox")>=0),S.set("isChrome",F.indexOf("Chrome")>=0),S.set("isSafari",F.indexOf("Safari")>=0);const C=Object.prototype.hasOwnProperty;class P{static has(R){return u.create(R)}static equals(R,W){return p.create(R,W)}static regex(R,W){return T.create(R,W)}static not(R){return l.create(R)}static and(...R){return v.create(R,null)}static or(...R){return c.create(R,null,!0)}static deserialize(R,W=!1){return R?this._deserializeOrExpression(R,W):void 0}static _deserializeOrExpression(R,W){let H=R.split("||");return c.create(H.map(L=>this._deserializeAndExpression(L,W)),null,!0)}static _deserializeAndExpression(R,W){let H=R.split("&&");return v.create(H.map(L=>this._deserializeOne(L,W)),null)}static _deserializeOne(R,W){if(R=R.trim(),R.indexOf("!=")>=0){let H=R.split("!=");return h.create(H[0].trim(),this._deserializeValue(H[1],W))}if(R.indexOf("==")>=0){let H=R.split("==");return p.create(H[0].trim(),this._deserializeValue(H[1],W))}if(R.indexOf("=~")>=0){let H=R.split("=~");return T.create(H[0].trim(),this._deserializeRegexValue(H[1],W))}if(R.indexOf(" in ")>=0){let H=R.split(" in ");return a.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(R)){const H=R.split(">=");return d.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(R)){const H=R.split(">");return s.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(R)){const H=R.split("<=");return D.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(R)){const H=R.split("<");return E.create(H[0].trim(),H[1].trim())}return/^\!\s*/.test(R)?l.create(R.substr(1).trim()):u.create(R)}static _deserializeValue(R,W){if(R=R.trim(),R==="true")return!0;if(R==="false")return!1;let H=/^'([^']*)'$/.exec(R);return H?H[1].trim():R}static _deserializeRegexValue(R,W){if(Object(B.C)(R)){if(W)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let H=R.indexOf("/"),L=R.lastIndexOf("/");if(H===L||H<0){if(W)throw new Error(`bad regexp-value '${R}', missing /-enclosure`);return console.warn(`bad regexp-value '${R}', missing /-enclosure`),null}let G=R.slice(H+1,L),z=R[L+1]==="i"?"i":"";try{return new RegExp(G,z)}catch(J){if(W)throw new Error(`bad regexp-value '${R}', parse error: ${J}`);return console.warn(`bad regexp-value '${R}', parse error: ${J}`),null}}}function y(R,W){const H=R?R.substituteConstants():void 0,L=W?W.substituteConstants():void 0;return!H&&!L?!0:!H||!L?!1:H.equals(L)}function t(R,W){return R.cmp(W)}class b{constructor(){this.type=0}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!1}serialize(){return"false"}keys(){return[]}negate(){return i.INSTANCE}}b.INSTANCE=new b;class i{constructor(){this.type=1}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!0}serialize(){return"true"}keys(){return[]}negate(){return b.INSTANCE}}i.INSTANCE=new i;class u{constructor(R,W){this.key=R,this.negated=W,this.type=2}static create(R,W=null){const H=S.get(R);return typeof H=="boolean"?H?i.INSTANCE:b.INSTANCE:new u(R,W)}cmp(R){return R.type!==this.type?this.type-R.type:x(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=S.get(this.key);return typeof R=="boolean"?R?i.INSTANCE:b.INSTANCE:this}evaluate(R){return!!R.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 p{constructor(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=4}static create(R,W,H=null){if(typeof W=="boolean")return W?u.create(R,H):l.create(R,H);const L=S.get(R);if(typeof L=="boolean"){const G=L?"true":"false";return W===G?i.INSTANCE:b.INSTANCE}return new p(R,W,H)}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=S.get(this.key);if(typeof R=="boolean"){const W=R?"true":"false";return this.value===W?i.INSTANCE:b.INSTANCE}return this}evaluate(R){return R.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class a{constructor(R,W){this.key=R,this.valueKey=W,this.type=10,this.negated=null}static create(R,W){return new a(R,W)}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.valueKey,R.key,R.valueKey)}equals(R){return R.type===this.type?this.key===R.key&&this.valueKey===R.valueKey:!1}substituteConstants(){return this}evaluate(R){const W=R.getValue(this.valueKey),H=R.getValue(this.key);return Array.isArray(W)?W.indexOf(H)>=0:typeof H=="string"&&typeof W=="object"&&W!==null?C.call(W,H):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=o.create(this)),this.negated}}class o{constructor(R){this._actual=R,this.type=11}static create(R){return new o(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class h{constructor(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=5}static create(R,W,H=null){if(typeof W=="boolean")return W?l.create(R,H):u.create(R,H);const L=S.get(R);if(typeof L=="boolean"){const G=L?"true":"false";return W===G?b.INSTANCE:i.INSTANCE}return new h(R,W,H)}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=S.get(this.key);if(typeof R=="boolean"){const W=R?"true":"false";return this.value===W?b.INSTANCE:i.INSTANCE}return this}evaluate(R){return R.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 l{constructor(R,W){this.key=R,this.negated=W,this.type=3}static create(R,W=null){const H=S.get(R);return typeof H=="boolean"?H?b.INSTANCE:i.INSTANCE:new l(R,W)}cmp(R){return R.type!==this.type?this.type-R.type:x(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=S.get(this.key);return typeof R=="boolean"?R?b.INSTANCE:i.INSTANCE:this}evaluate(R){return!R.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this)),this.negated}}function n(R,W){if(typeof R=="string"){const H=parseFloat(R);isNaN(H)||(R=H)}return typeof R=="string"||typeof R=="number"?W(R):b.INSTANCE}class s{constructor(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=12}static create(R,W,H=null){return n(W,L=>new s(R,L,H))}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.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(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=13}static create(R,W,H=null){return n(W,L=>new d(R,L,H))}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=14}static create(R,W,H=null){return n(W,L=>new E(R,L,H))}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.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(R,W,H){this.key=R,this.value=W,this.negated=H,this.type=15}static create(R,W,H=null){return n(W,L=>new D(R,L,H))}cmp(R){return R.type!==this.type?this.type-R.type:g(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.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 T{constructor(R,W){this.key=R,this.regexp=W,this.type=7,this.negated=null}static create(R,W){return new T(R,W)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.key<R.key)return-1;if(this.key>R.key)return 1;const W=this.regexp?this.regexp.source:"",H=R.regexp?R.regexp.source:"";return W<H?-1:W>H?1:0}equals(R){if(R.type===this.type){const W=this.regexp?this.regexp.source:"",H=R.regexp?R.regexp.source:"";return this.key===R.key&&W===H}return!1}substituteConstants(){return this}evaluate(R){let W=R.getValue(this.key);return this.regexp?this.regexp.test(W):!1}serialize(){const R=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${R}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(R){this._actual=R,this.type=8}static create(R){return new k(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function w(R){let W=null;for(let H=0,L=R.length;H<L;H++){const G=R[H].substituteConstants();if(R[H]!==G&&W===null){W=[];for(let z=0;z<H;z++)W[z]=R[z]}W!==null&&(W[H]=G)}return W===null?R:W}class v{constructor(R,W){this.expr=R,this.negated=W,this.type=6}static create(R,W){return v._normalizeArr(R,W)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let W=0,H=this.expr.length;W<H;W++){const L=t(this.expr[W],R.expr[W]);if(L!==0)return L}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let W=0,H=this.expr.length;W<H;W++)if(!this.expr[W].equals(R.expr[W]))return!1;return!0}return!1}substituteConstants(){const R=w(this.expr);return R===this.expr?this:v.create(R,this.negated)}evaluate(R){for(let W=0,H=this.expr.length;W<H;W++)if(!this.expr[W].evaluate(R))return!1;return!0}static _normalizeArr(R,W){const H=[];let L=!1;for(const G of R){if(!G)continue;if(G.type===1){L=!0;continue}if(G.type===0)return b.INSTANCE;if(G.type===6){H.push(...G.expr);continue}H.push(G)}if(H.length===0&&L)return i.INSTANCE;if(H.length===0)return;if(H.length===1)return H[0];H.sort(t);for(let G=1;G<H.length;G++)H[G-1].equals(H[G])&&(H.splice(G,1),G--);if(H.length===1)return H[0];for(;H.length>1;){const G=H[H.length-1];if(G.type!==9)break;H.pop();const z=H.pop(),J=H.length===0,te=c.create(G.expr.map(_e=>v.create([_e,z],null)),null,J);te&&(H.push(te),H.sort(t))}return H.length===1?H[0]:new v(H,W)}serialize(){return this.expr.map(R=>R.serialize()).join(" && ")}keys(){const R=[];for(let W of this.expr)R.push(...W.keys());return R}negate(){if(!this.negated){const R=[];for(let W of this.expr)R.push(W.negate());this.negated=c.create(R,this,!0)}return this.negated}}class c{constructor(R,W){this.expr=R,this.negated=W,this.type=9}static create(R,W,H){return c._normalizeArr(R,W,H)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let W=0,H=this.expr.length;W<H;W++){const L=t(this.expr[W],R.expr[W]);if(L!==0)return L}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let W=0,H=this.expr.length;W<H;W++)if(!this.expr[W].equals(R.expr[W]))return!1;return!0}return!1}substituteConstants(){const R=w(this.expr);return R===this.expr?this:c.create(R,this.negated,!1)}evaluate(R){for(let W=0,H=this.expr.length;W<H;W++)if(this.expr[W].evaluate(R))return!0;return!1}static _normalizeArr(R,W,H){let L=[],G=!1;if(R){for(let z=0,J=R.length;z<J;z++){const te=R[z];if(!te)continue;if(te.type===0){G=!0;continue}if(te.type===1)return i.INSTANCE;if(te.type===9){L=L.concat(te.expr);continue}L.push(te)}if(L.length===0&&G)return b.INSTANCE;L.sort(t)}if(L.length===0)return;if(L.length===1)return L[0];for(let z=1;z<L.length;z++)L[z-1].equals(L[z])&&(L.splice(z,1),z--);if(L.length===1)return L[0];if(H){for(let z=0;z<L.length;z++)for(let J=z+1;J<L.length;J++)j(L[z],L[J])&&(L.splice(J,1),J--);if(L.length===1)return L[0]}return new c(L,W)}serialize(){return this.expr.map(R=>R.serialize()).join(" || ")}keys(){const R=[];for(let W of this.expr)R.push(...W.keys());return R}negate(){if(!this.negated){let R=[];for(let W of this.expr)R.push(W.negate());for(;R.length>1;){const W=R.shift(),H=R.shift(),L=[];for(const z of U(W))for(const J of U(H))L.push(v.create([z,J],null));const G=R.length===0;R.unshift(c.create(L,null,G))}this.negated=R[0]}return this.negated}}class f extends u{constructor(R,W,H){super(R,null);this._defaultValue=W,typeof H=="object"?f._info.push(Object.assign(Object.assign({},H),{key:R})):H!==!0&&f._info.push({key:R,description:H,type:W!=null?typeof W:void 0})}static all(){return f._info.values()}bindTo(R){return R.createKey(this.key,this._defaultValue)}getValue(R){return R.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(R){return p.create(this.key,R)}}f._info=[];const m=Object(I.c)("contextKeyService"),_="setContext";function x(R,W){return R<W?-1:R>W?1:0}function g(R,W,H,L){return R<H?-1:R>H?1:W<L?-1:W>L?1:0}function j(R,W){if(W.type===6&&R.type!==9&&R.type!==6){for(const G of W.expr)if(R.equals(G))return!0}const H=R.negate(),L=U(H).concat(U(W));L.sort(t);for(let G=0;G<L.length;G++){const z=L[G],J=z.negate();for(let te=G+1;te<L.length;te++){const _e=L[te];if(J.equals(_e))return!0}}return!1}function U(R){return R.type===9?R.expr:[R]}},"TS7/":function(ze,ee,M){"use strict";M.r(ee);var X=M("g9YV"),B=M("wCAj"),I=M("Znn+"),F=M("ZTPi"),S=M("5Dmo"),C=M("3S7+"),P=M("sPJy"),y=M("bE4q"),t=M("miYZ"),b=M("tsqr"),i=M("9og8"),u=M("2qtc"),p=M("kLXV"),a=M("tJVT"),o=M("WmNS"),h=M.n(o),l=M("q1tI"),n=M.n(l),s=M("Ty5D"),d=M("55Ip"),E=M("9kvl"),D=M("jhfD"),T=M("1vsH"),k=M("DjyN"),w=M("NUBc"),v=M("oBTY"),c=M("5NDa"),f=M("5rEg"),m=M("14J3"),_=M("BMrR"),x=M("jCWc"),g=M("kPKH"),j=M("+L6B"),U=M("2/Rp"),R=M("k1fw"),W=M("ErOA"),H=M("Ot1p"),L=M("m3rI"),G=M("9Bee"),z=function(hn){var pn=hn.shixunHomeworks,kn=hn.dispatch,cr=Object(s.i)();return n.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:pn.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(h.a.mark(function qn(){var Xn;return h.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,kn({type:"shixunHomeworks/deleteReply",payload:{object_id:pn.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:Xn=hr.sent,Xn.status===0&&(b.b.success("\u5220\u9664\u6210\u529F"),kn({type:"shixunHomeworks/setActionTabs",payload:{}}),kn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},pn.actionTabs.params)}));case 4:case"end":return hr.stop()}},qn)})),onCancel:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))},J=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks;return{shixunHomeworks:hn}})(z),te=M("XYT7"),_e=M("wd/R"),ce=M.n(_e),xe=M("/MfK"),Te=M("BtR2"),je=M("942q"),Ce=M.n(je),Z=M("xKgJ"),K=M("gMzb");ce.a.lang("ZH-cn");var V=function(hn){var pn=hn.shixunHomeworks,kn=hn.classroomList,cr=hn.globalSetting,qn=hn.user,Xn=hn.loading,Dn=hn.dispatch,hr=Object(l.useState)(Object(R.a)(Object(R.a)({},Object(s.i)()),{},{limit:10})),jn=Object(a.a)(hr,2),Jn=jn[0],rr=jn[1],wn=Object(l.useState)(!1),Er=Object(a.a)(wn,2),Sr=Er[0],gr=Er[1],sr=Object(l.useState)(-1),re=Object(a.a)(sr,2),Le=re[0],Xe=re[1],ke=Object(l.useState)(""),dt=Object(a.a)(ke,2),tt=dt[0],ht=dt[1],xt=Object(l.useState)(""),Rt=Object(a.a)(xt,2),st=Rt[0],Kt=Rt[1],Zt=kn.detailLeftMenus,Et=Object(l.useState)({}),Vt=Object(a.a)(Et,2),$e=Vt[0],Yt=Vt[1],Nt=pn.workDetail,un=pn.workList,yn=Object(l.useState)({}),Cn=Object(a.a)(yn,2),wt=Cn[0],kt=Cn[1];Jn.page_size=10,Object(l.useEffect)(function(){Dn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},Jn)}),Dn({type:"shixunHomeworks/getWorkDetail",payload:Object(R.a)({},Jn)}),Zt.course_modules||Dn({type:"classroomList/getClassroomLeftMenus",payload:Object(R.a)({},Jn)})},[Jn.categoryId]),Object(l.useEffect)(function(){pn!=null&&pn.replyList&&Yt(pn.replyList)},[pn]);function mn(vt){return dn.apply(this,arguments)}function dn(){return dn=Object(i.a)(h.a.mark(function vt(St){var Ot;return h.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(wt!=null&&wt.ec_point_ids){ft.next=2;break}return ft.abrupt("return");case 2:return ft.next=4,Object(W.a)("/api/ec_courses/".concat(wt==null?void 0:wt.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:Object(R.a)({homework_common_id:St},wt)});case 4:Ot=ft.sent;case 5:case"end":return ft.stop()}},vt)})),dn.apply(this,arguments)}return n.a.createElement("section",{className:Ce.a.bg},n.a.createElement("section",{className:" edu-container"},n.a.createElement("aside",{className:[Ce.a.desc,"c-black","font14","bg-white"].join(" ")},pn.actionTabs.key!=="\u7F16\u8F91\u4F5C\u4E1A"&&n.a.createElement(G.a,{value:(Nt==null?void 0:Nt.explanation)||"\u6682\u65E0\uFF5E"}),pn.actionTabs.key==="\u7F16\u8F91\u4F5C\u4E1A"&&n.a.createElement("aside",{className:["bg-white"].join(" ")},n.a.createElement(H.a,{onChange:function(St){ht(St)},defaultValue:(Nt==null?void 0:Nt.explanation)||"",height:200,isFocus:!0,watch:!0}),n.a.createElement(K.a,{setitem:function(St){return kt(Object(R.a)({},St))},homework_common_id:Jn.categoryId}),n.a.createElement(_.a,null,n.a.createElement(g.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"default",size:"large",onClick:Object(i.a)(h.a.mark(function vt(){return h.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:Dn({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return Ot.stop()}},vt)}))},"\u53D6\u6D88"),n.a.createElement(U.a,{type:"primary",size:"large",className:"ml20",onClick:Object(i.a)(h.a.mark(function vt(){var St;return h.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!(tt==="")){yt.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),yt.next=9;break;case 4:return yt.next=6,Dn({type:"shixunHomeworks/updateWork",payload:{explanation:tt,categoryId:Jn.categoryId}});case 6:St=yt.sent,mn(Jn.categoryId),St.status===0&&(b.b.success("\u64CD\u4F5C\u6210\u529F"),Dn({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),Dn({type:"shixunHomeworks/getWorkDetail",payload:Object(R.a)({},Jn)}));case 9:case"end":return yt.stop()}},vt)}))},"\u4FDD\u5B58"))))),n.a.createElement("aside",{className:[Ce.a.reply,"bg-white","mt20"].join(" ")},Sr&&n.a.createElement(H.a,{onChange:function(St){ht(St)},height:200,isFocus:!0,watch:!0}),n.a.createElement(_.a,{onClick:function(){gr(!0)}},n.a.createElement(g.a,{flex:"1"},!Sr&&n.a.createElement(f.a,{size:"large",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),n.a.createElement(g.a,null,n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(i.a)(h.a.mark(function vt(){var St;return h.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!(tt==="")){yt.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),yt.next=8;break;case 4:return yt.next=6,Dn({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:Jn.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:tt}}});case 6:St=yt.sent,St.status===0&&(b.b.success("\u53D1\u5E03\u6210\u529F"),Dn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},Jn)}),gr(!1),ht(""));case 8:case"end":return yt.stop()}},vt)}))},"\u53D1\u8868")))),($e==null?void 0:$e.comments)&&$e.comments!=""&&n.a.createElement("aside",{className:[Ce.a.replyList,"bg-white"].join(" ")},$e==null?void 0:$e.comments.map(function(vt,St){var Ot,yt,ft,gn;return n.a.createElement(_.a,{gutter:[12,12],key:St},n.a.createElement(g.a,{flex:"40px"},n.a.createElement("img",{width:"40",src:"".concat(L.a.IMG_SERVER,"/images/").concat(vt==null||((Ot=vt.author)===null||Ot===void 0)?void 0:Ot.image_url)})),n.a.createElement(g.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,{span:20},n.a.createElement("span",{className:"c-light-black"},vt==null||((yt=vt.author)===null||yt===void 0)?void 0:yt.name),n.a.createElement("span",{className:"c-light-black ml10"},vt.time," \u53D1\u5E03")),n.a.createElement(g.a,{span:4},n.a.createElement("div",{className:"tr"},(Object(Z.c)()||(qn==null||((ft=qn.userInfo)===null||ft===void 0)?void 0:ft.login)===(vt==null||((gn=vt.author)===null||gn===void 0)?void 0:gn.login))&&n.a.createElement(xe.a,{className:"current",onClick:function(){Dn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5220\u9664",params:Jn,selectArr:vt,object_type:"message"}})}}))),n.a.createElement(g.a,{span:24},n.a.createElement(G.a,{value:vt.content})),vt.children&&n.a.createElement("aside",{className:Ce.a.comment},vt.children.map(function(Bt,vn){var qt,Ut;return n.a.createElement(_.a,{key:vn},n.a.createElement(g.a,{span:24},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},Bt.author.name,n.a.createElement("span",{className:"c-light-black ml10"},ce()(Bt==null?void 0:Bt.created_on).fromNow())),n.a.createElement(g.a,null,(Object(Z.c)()||(qn==null||((qt=qn.userInfo)===null||qt===void 0)?void 0:qt.login)===(Bt==null||((Ut=Bt.author)===null||Ut===void 0)?void 0:Ut.login))&&n.a.createElement(C.a,{title:"\u5220\u9664"},n.a.createElement(xe.a,{className:"current",onClick:function(){Dn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5220\u9664",params:Jn,selectArr:Bt}})}}))))),n.a.createElement(g.a,null,n.a.createElement(G.a,{value:Bt.content})))})),n.a.createElement("div",{className:"tc w100 mt10"},n.a.createElement(w.a,{defaultCurrent:1,total:vt==null?void 0:vt.child_message_count,hideOnSinglePage:!0,pageSize:5,current:vt.page||1,onChange:function(){var Bt=Object(i.a)(h.a.mark(function vn(qt){var Ut,fn;return h.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.next=2,Object(te.H)(Object(R.a)(Object(R.a)({},Jn),{},{parent_id:vt.id,page:qt,limit:5}));case 2:fn=ur.sent,fn!=null&&(Ut=fn.comments)!==null&&Ut!==void 0&&Ut.length&&($e.comments[St].page=qt,$e.comments[St].children=Object(v.a)(fn==null?void 0:fn.comments),Yt(Object(R.a)({},$e)));case 4:case"end":return ur.stop()}},vn)}));return function(vn){return Bt.apply(this,arguments)}}()})),n.a.createElement(g.a,{span:24,className:"mt5 c-light-black"},Le===St&&n.a.createElement("aside",null,n.a.createElement(H.a,{onChange:function(vn){Kt(vn)},height:150,isFocus:!0}),n.a.createElement(_.a,null,n.a.createElement(g.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(i.a)(h.a.mark(function Bt(){var vn,qt;return h.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(!(st==="")){fn.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),fn.next=12;break;case 4:return fn.next=6,Dn({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:Jn.categoryId,jour_type:"HomeworkCommon",m_parent_id:vt.id,reply_id:1,notes:st}}});case 6:return fn.next=8,Object(te.H)(Object(R.a)(Object(R.a)({},Jn),{},{parent_id:vt.id,limit:5}));case 8:qt=fn.sent,qt!=null&&(vn=qt.comments)!==null&&vn!==void 0&&vn.length&&(++$e.comments[St].child_message_count,$e.comments[St].children=Object(v.a)(qt==null?void 0:qt.comments),$e.comments[St].page=1,Yt($e)),b.b.success("\u53D1\u5E03\u6210\u529F"),Xe(-1);case 12:case"end":return fn.stop()}},Bt)}))},"\u53D1\u8868")))),Le!==St&&n.a.createElement("div",{className:"tr"},n.a.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return Xe(St)}}),vt.child_message_count||0,!!(vt!=null&&vt.user_praise)&&n.a.createElement("span",{className:"c-orange"},n.a.createElement(Te.a,{className:"mr5 ml30",onClick:Object(i.a)(h.a.mark(function Bt(){return h.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Dn({type:"shixunHomeworks/replyUnLike",payload:{object_id:vt.id,object_type:"journals_for_message"}});case 2:Dn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},Jn)});case 3:case"end":return qt.stop()}},Bt)}))}),vt==null?void 0:vt.praise_count),!vt.user_praise&&n.a.createElement("span",null,n.a.createElement(Te.a,{className:"mr5 ml30",onClick:Object(i.a)(h.a.mark(function Bt(){return h.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Dn({type:"shixunHomeworks/replyLike",payload:{object_id:vt.id,object_type:"journals_for_message"}});case 2:Dn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},Jn)});case 3:case"end":return qt.stop()}},Bt)}))}),vt.praise_count))))))}))),n.a.createElement("aside",{className:"tc mt30 pb30"},n.a.createElement(w.a,{defaultCurrent:1,total:$e==null?void 0:$e.parent_messages_count,hideOnSinglePage:!0,current:Jn.page||1,pageSize:10,onChange:function(St){Jn.page=St,Dn({type:"shixunHomeworks/getReplyList",payload:Object(R.a)({},Jn)})}})),n.a.createElement(J,null))},$=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.classroomList,kn=Sn.loading,cr=Sn.user,qn=Sn.globalSetting;return{shixunHomeworks:hn,globalSetting:qn,classroomList:pn,user:cr,loading:kn.effects}})(V),q=M("giR+"),Q=M("fyUT"),ge=M("7Kak"),Oe=M("9yH6"),Ye=M("qVdP"),le=M("jsC+"),Ee=M("sRBo"),Re=M("kaz8"),He=M("lUTK"),et=M("BvKs"),ut=M("jrin"),Dt=M("y8nQ"),We=M("Vl3Y"),Mt=M("8Skl"),Wt=M("y3Kf"),Ne=M("CTES"),Pe=M("Llu2"),it=M("0NbB"),gt=M("BdwD"),fe=M("Xm8N"),ae=M("PpiC"),se=M("IMoZ"),de=function(hn){var pn=hn.shixunHomeworks,kn=hn.dispatch,cr=Object(ae.a)(hn,["shixunHomeworks","dispatch"]),qn=Object(s.i)(),Xn=Object(l.useState)(!0),Dn=Object(a.a)(Xn,2),hr=Dn[0],jn=Dn[1],Jn=Object(l.useState)(!1),rr=Object(a.a)(Jn,2),wn=rr[0],Er=rr[1],Sr=We.a.useForm(),gr=Object(a.a)(Sr,1),sr=gr[0],re=function(){var Le=Object(i.a)(h.a.mark(function Xe(){var ke,dt;return h.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return ke=sr.getFieldValue(),ht.next=3,Object(W.a)("/api/homework_commons/".concat(qn.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:Object(v.a)(pn.actionTabs.selectArrs),cover_all:hr,hidden_comment:ke.hidden_comment,comment:ke.comment}});case 3:dt=ht.sent,dt.status===0&&(b.b.success("\u8BC4\u9605\u6210\u529F"),sr.resetFields(),kn({type:"shixunHomeworks/setActionTabs",payload:{}}),kn({type:"shixunHomeworks/getWorkList",payload:Object(R.a)({},pn.actionTabs.params)}));case 5:case"end":return ht.stop()}},Xe)}));return function(){return Le.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(p.a,{centered:!0,title:"\u4E00\u952E\u70B9\u8BC4",visible:pn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(h.a.mark(function Le(){var Xe;return h.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:Xe=sr.getFieldValue(),JSON.stringify(Xe)==="{}"||Xe.hidden_comment===""&&Xe.comment===""?Er(!0):pn.workList.partial_comment?kn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",selectArrs:pn.actionTabs.selectArrs,params:pn.actionTabs.params}}):re();case 2:case"end":return dt.stop()}},Le)})),onCancel:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(We.a,{form:sr,onChange:function(){wn&&Er(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"comment"},n.a.createElement(f.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"hidden_comment"},n.a.createElement(f.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),wn&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")),n.a.createElement(p.a,{centered:!0,title:n.a.createElement("span",null,n.a.createElement(se.a,{className:"c-orange mr20"}),"\u63D0\u793A"),visible:pn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",okText:"\u786E\u5B9A\u70B9\u8BC4",cancelText:"\u653E\u5F03\u70B9\u8BC4",onOk:function(){re()},onCancel:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{}})},width:400},n.a.createElement("div",{className:"tc"},n.a.createElement("p",null,"\u90E8\u5206\u5B66\u751F\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF0C\u662F\u5426\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF1F"),n.a.createElement("p",null,n.a.createElement(Oe.a.Group,{onChange:function(Xe){jn(Xe.target.value)},value:hr},n.a.createElement(Oe.a,{value:!0},"\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4"),n.a.createElement(Oe.a,{value:!1},"\u8DF3\u8FC7\u5DF2\u6709\u70B9\u8BC4"))))))},ve=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks;return{shixunHomeworks:hn}})(de),ie=M("BoW6"),oe=M.n(ie),pe=function(hn){var pn,kn,cr,qn,Xn=hn.shixunHomeworks,Dn=hn.dispatch,hr=Object(ae.a)(hn,["shixunHomeworks","dispatch"]),jn=Object(s.i)(),Jn=Object(l.useState)(!1),rr=Object(a.a)(Jn,2),wn=rr[0],Er=rr[1],Sr=Object(l.useState)((pn=Xn.actionTabs.selectArrs)===null||pn===void 0||((kn=pn.data)===null||kn===void 0)?void 0:kn.name),gr=Object(a.a)(Sr,2),sr=gr[0],re=gr[1],Le=We.a.useForm(),Xe=Object(a.a)(Le,1),ke=Xe[0];Object(l.useEffect)(function(){var tt,ht,xt,Rt,st,Kt;Xn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&ke.setFieldsValue({comment:(tt=Xn.actionTabs.selectArrs)===null||tt===void 0||((ht=tt.data)===null||ht===void 0)?void 0:ht.work_comment,hidden_comment:(xt=Xn.actionTabs.selectArrs)===null||xt===void 0||((Rt=xt.data)===null||Rt===void 0)?void 0:Rt.work_comment_hidden}),re((st=Xn.actionTabs.selectArrs)===null||st===void 0||((Kt=st.data)===null||Kt===void 0)?void 0:Kt.name)},[Xn.actionTabs.key]);var dt=function(){var tt=Object(i.a)(h.a.mark(function ht(){var xt,Rt,st,Kt;return h.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return st=ke.getFieldValue(),Et.next=3,Object(W.a)("/api/student_works/".concat((xt=Xn.actionTabs.selectArrs)===null||xt===void 0||((Rt=xt.data)===null||Rt===void 0)?void 0:Rt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:st.hidden_comment,comment:st.comment}});case 3:if(Kt=Et.sent,!(Kt.status===0)){Et.next=9;break}return b.b.success("\u8BC4\u9605\u6210\u529F"),ke.resetFields(),Dn({type:"shixunHomeworks/setActionTabs",payload:{}}),Et.abrupt("return",Dn({type:"shixunHomeworks/getWorkList",payload:jn}));case 9:case"end":return Et.stop()}},ht)}));return function(){return tt.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(p.a,{centered:!0,title:(cr=Xn.actionTabs.selectArrs)!==null&&cr!==void 0&&(qn=cr.data)!==null&&qn!==void 0&&qn.work_comment_hidden?"\u66F4\u6539"+sr+"\u70B9\u8BC4":sr+"\u70B9\u8BC4",visible:Xn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(h.a.mark(function tt(){var ht;return h.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:ht=ke.getFieldValue(),JSON.stringify(ht)==="{}"||ht.hidden_comment===""&&ht.comment===""?Er(!0):dt();case 2:case"end":return Rt.stop()}},tt)})),onCancel:function(){Dn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(We.a,{form:ke,onChange:function(){wn&&Er(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"comment"},n.a.createElement(f.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"hidden_comment"},n.a.createElement(f.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),wn&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},we=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks;return{shixunHomeworks:hn}})(pe),Ae=function(hn){var pn=hn.shixunHomeworks,kn=hn.dispatch,cr=Object(ae.a)(hn,["shixunHomeworks","dispatch"]),qn=Object(s.i)(),Xn=Object(l.useState)([]),Dn=Object(a.a)(Xn,2),hr=Dn[0],jn=Dn[1],Jn=Object(l.useState)([]),rr=Object(a.a)(Jn,2),wn=rr[0],Er=rr[1];Object(l.useEffect)(function(){pn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B"&&Sr()},[pn.actionTabs.key]);function Sr(){return gr.apply(this,arguments)}function gr(){return gr=Object(i.a)(h.a.mark(function re(){var Le;return h.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ke.next=2,Object(W.a)("/api/homework_commons/".concat(qn.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:Le=ke.sent,jn(Le);case 4:case"end":return ke.stop()}},re)})),gr.apply(this,arguments)}var sr=[{title:"\u5206\u73ED\u60C5\u51B5",dataIndex:"name"},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u68C0\u6D4B\u8FDB\u5EA6",dataIndex:"status"},{title:"\u4E0A\u6B21\u8BC4\u5206\u65F6\u95F4",dataIndex:"last_analysis_time"}];return n.a.createElement(n.a.Fragment,null,n.a.createElement(p.a,{centered:!0,title:"\u4EE3\u7801\u8D28\u91CF\u8BC4\u5206",visible:pn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B",width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(h.a.mark(function re(){var Le;return h.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ke.next=2,Object(W.a)("/api/homework_commons/".concat(qn.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:wn}});case 2:Le=ke.sent,(Le==null?void 0:Le.status)===0&&(E.d.replace("/classrooms/".concat(qn.coursesId,"/shixun_homework/").concat(qn.categoryId,"/detail?tabs=4")),window.location.reload(),kn({type:"shixunHomeworks/setActionTabs",payload:{}}),Er([]));case 4:case"end":return ke.stop()}},re)})),onCancel:function(){Er([]),kn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(B.a,{rowSelection:{type:"checkbox",onChange:function(Le,Xe){Er(Object(v.a)(Le))},selectedRowKeys:wn,getCheckboxProps:function(Le){return{disabled:Le.status==="\u8FDB\u884C\u4E2D"||Le.works_count===0}}},rowKey:function(Le){return Le.key||Le.id},scroll:{y:300},pagination:!1,columns:sr,dataSource:hr==null?void 0:hr.group_list})))},Me=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks;return{shixunHomeworks:hn}})(Ae),rt=M("mgmH"),Pt=function(hn){var pn,kn,cr,qn,Xn,Dn,hr,jn,Jn,rr,wn,Er,Sr,gr,sr,re=hn.shixunHomeworks,Le=hn.loading,Xe=hn.dispatch,ke=hn.globalSetting,dt=hn.setExportParams,tt=hn.user,ht=Object(s.i)(),xt=Object(l.useState)(Object(R.a)(Object(R.a)({},{page:1,limit:20,order:"work_score",b_order:"desc"}),ht)),Rt=Object(a.a)(xt,2),st=Rt[0],Kt=Rt[1],Zt=We.a.useForm(),Et=Object(a.a)(Zt,1),Vt=Et[0],$e=Object(l.useState)(),Yt=Object(a.a)($e,2),Nt=Yt[0],un=Yt[1],yn=Object(l.useState)({}),Cn=Object(a.a)(yn,2),wt=Cn[0],kt=Cn[1],mn=Object(l.useState)([]),dn=Object(a.a)(mn,2),vt=dn[0],St=dn[1],Ot=Object(l.useState)(!1),yt=Object(a.a)(Ot,2),ft=yt[0],gn=yt[1],Bt=Object(l.useState)([]),vn=Object(a.a)(Bt,2),qt=vn[0],Ut=vn[1],fn=Object(l.useState)(!1),In=Object(a.a)(fn,2),ur=In[0],Ln=In[1],Tr=Object(l.useState)(),Ur=Object(a.a)(Tr,2),Mn=Ur[0],Nn=Ur[1],Kn=Object(l.useState)(1),vr=Object(a.a)(Kn,2),Rr=vr[0],Br=vr[1],sa=Object(l.useState)(),la=Object(a.a)(sa,2),ca=la[0],Ga=la[1],Ra=Object(l.useState)(),$a=Object(a.a)(Ra,2),Yr=$a[0],Aa=$a[1],oi=Object(l.useState)(),Da=Object(a.a)(oi,2),zr=Da[0],va=Da[1],wa=Object(l.useState)(),Ie=Object(a.a)(wa,2),Qe=Ie[0],qe=Ie[1],Fe=Object(l.useState)(),me=Object(a.a)(Fe,2),De=me[0],be=me[1],Be=Object(l.useState)(!1),Ke=Object(a.a)(Be,2),nt=Ke[0],Ve=Ke[1];Object(l.useEffect)(function(){return ct(!0),function(){kt([]),St([])}},[st.coursesId]),Object(l.useEffect)(function(){var rn,Lt=JSON.parse(JSON.stringify(re.workList));!(Lt!=null&&(rn=Lt.student_works)!==null&&rn!==void 0&&rn.length)&&Lt!==null&&Lt!==void 0&&Lt.id?(Lt.student_works=[Object(R.a)({},Lt)],kt(Lt)):(Lt!=null&&Lt.id&&St([Object(R.a)(Object(R.a)({},Lt),{number:"\u6211"})]),kt(Object(R.a)({},Lt)))},[re.workList]);var ct=function(Lt){dt(Object(R.a)({},st));var Ft=Xe({type:"shixunHomeworks/getWorkList",payload:st});return Lt&&Ft.then(function(Tn){var cn,Gn,pr;(Tn!=null&&(cn=Tn.homework_status)!==null&&cn!==void 0&&cn.includes("\u8FDB\u884C\u4E2D")||Tn!=null&&(Gn=Tn.homework_status)!==null&&Gn!==void 0&&Gn.includes("\u8865\u4EA4\u4E2D")||Tn!=null&&(pr=Tn.homework_status)!==null&&pr!==void 0&&pr.includes("\u63D0\u4EA4\u4E2D"))&&!Object(Z.t)()&&$t()}),Ft};Object(l.useEffect)(function(){It()},[]);var It=function(){var rn=Object(i.a)(h.a.mark(function Lt(){var Ft;return h.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return cn.next=2,Object(te.I)({categoryId:ht.categoryId});case 2:Ft=cn.sent,un(Ft==null?void 0:Ft.update_score);case 4:case"end":return cn.stop()}},Lt)}));return function(){return rn.apply(this,arguments)}}(),$t=function(){var rn=Object(i.a)(h.a.mark(function Lt(){var Ft;return h.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Xe({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6210\u7EE9\u8BA1\u7B97\u4E2D\uFF0C\u8BF7\u7A0D\u5019..."}}),cn.next=3,Object(te.Z)({categoryId:ht.categoryId});case 3:Ft=cn.sent,Xe({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),(Ft==null?void 0:Ft.status)===0&&(b.b.success(Ft==null?void 0:Ft.message),ct());case 6:case"end":return cn.stop()}},Lt)}));return function(){return rn.apply(this,arguments)}}(),tn=function(){st.page=1;var Lt=Object.assign({},Vt.getFieldValue());delete st.course_group,delete st.teacher_comment,Object.keys(Lt).map(function(Ft){switch(Ft){case"task_status":Lt[Ft].includes("all")||!Lt[Ft].length?(delete st.work_status,Vt.setFieldsValue(Object(ut.a)({},"task_status","all"))):(st.work_status=Lt[Ft],Vt.setFieldsValue(Object(ut.a)({},"task_status",st.work_status)));break;case"course_group_info":Lt[Ft].includes("all")||!Lt[Ft].length?(delete st.course_group,Vt.setFieldsValue(Object(ut.a)({},"course_group_info","all"))):(st.course_group=Lt[Ft],Vt.setFieldsValue(Object(ut.a)({},"course_group_info",st.course_group)));break;case"teacher_comment":if(Lt[Ft].includes("all")||!Lt[Ft].length)delete st.teacher_comment,Vt.setFieldsValue(Object(ut.a)({},"teacher_comment","all"));else{var Tn;st.teacher_comment=((Tn=Lt[Ft])===null||Tn===void 0?void 0:Tn.length)===1?Number(Lt[Ft][0]):"",Vt.setFieldsValue(Object(ut.a)({},"teacher_comment",Lt[Ft]))}break}}),ct()};Object(l.useEffect)(function(){if(document.getElementById("divhe")){var rn=document.getElementById("divhe").scrollHeight;rn>47&&(be(47),Ve(!0))}},[document.getElementById("divhe")]);var bn=function(Lt,Ft){st.page=Lt,st.limit=20,ct()};function Pn(){Br(1),Ga(""),Aa(""),va(""),qe(""),Ut([])}var er=[{title:"\u5E8F\u53F7",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:{showTitle:!1},render:function(Lt,Ft,Tn){return st.limit*(st.page-1)+Tn+1}},{title:"\u59D3\u540D",dataIndex:"user_name",align:"center",width:110,fixed:"left",ellipsis:{showTitle:!1},render:function(Lt){return n.a.createElement(C.a,{placement:"bottomLeft",title:Lt},n.a.createElement("span",{className:"current"},Lt))}},!(wt!=null&&wt.is_excellent)&&!Object(Z.r)()&&{title:"\u5B66\u53F7",dataIndex:"student_id",align:"center",sorter:!0,width:110,showSorterTooltip:!1,ellipsis:{showTitle:!1},sortOrder:st.order==="student_id"?st.b_order==="desc"?"descend":"ascend":null,render:function(Lt){return n.a.createElement(C.a,{placement:"bottomLeft",title:Lt||"--"},n.a.createElement("span",{className:"current"},Lt||"--"))}},{title:"\u5206\u73ED",dataIndex:"group_name",align:"center",width:180,ellipsis:{showTitle:!1},render:function(Lt,Ft){return Lt?n.a.createElement(C.a,{placement:"bottom",title:Lt},n.a.createElement("span",{className:"current"},Lt)):"--"}},{title:"\u4F5C\u4E1A\u72B6\u6001",dataIndex:"work_status",align:"center",width:80,sorter:!0,ellipsis:{showTitle:!1},showSorterTooltip:!1,sortOrder:st.order==="work_status"?st.b_order==="desc"?"descend":"ascend":null,render:function(Lt){return n.a.createElement(T.h,{status:Lt})}},{title:n.a.createElement("span",null,"\u5B8C\u6210\u65F6\u95F4"),dataIndex:"finished_time",align:"center",width:130,ellipsis:{showTitle:!1},showSorterTooltip:!1,sorter:!0,sortOrder:st.order==="finished_time"?st.b_order==="desc"?"descend":"ascend":null,render:function(Lt,Ft){return Lt?n.a.createElement(C.a,{placement:"bottomLeft",title:Lt},Lt):"--"}},{title:n.a.createElement("span",null,"\u5B9E\u8BAD\u603B\u8017\u65F6"),dataIndex:"cost_time",align:"center",width:130,ellipsis:{showTitle:!1},showSorterTooltip:!1,sorter:!0,sortOrder:st.order==="cost_time"?st.b_order==="desc"?"descend":"ascend":null,render:function(Lt,Ft){return Lt?n.a.createElement(C.a,{placement:"bottomLeft",title:Lt},Lt):"--"}},{title:"\u901A\u5173\u60C5\u51B5",align:"center",dataIndex:"complete_count",ellipsis:{showTitle:!1},render:function(Lt,Ft){return n.a.createElement("span",null,Lt||0,"/",wt.challenges_count)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"sum_evaluate_count",align:"center",ellipsis:{showTitle:!1},sorter:!0,sortOrder:st.order==="sum_evaluate_count"?st.b_order==="desc"?"descend":"ascend":null,render:function(Lt,Ft){return Lt&&Lt!="--"?n.a.createElement(C.a,{placement:"bottom",title:Lt},n.a.createElement("span",{className:"current"},Lt)):"--"}},!Object(Z.r)()&&{title:n.a.createElement("span",null,"\u6700\u7EC8\u6210\u7EE9",n.a.createElement(C.a,{placement:"top",title:n.a.createElement("pre",null,"\u9F20\u6807\u505C\u7559\u5177\u4F53\u5206\u503C\u4E0A\u53EF\u67E5",n.a.createElement("br",null),"\u770B\u5F97\u5206\u660E\u7EC6",n.a.createElement("br",null))},n.a.createElement("img",{src:"".concat(L.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),dataIndex:"work_score",sorter:!0,align:"center",showSorterTooltip:!1,sortOrder:st.order==="work_score"?st.b_order==="desc"?"descend":"ascend":null,ellipsis:{showTitle:!1},render:function(Lt,Ft){var Tn,cn;return Lt>=0&&Lt<=60?cn=n.a.createElement("span",{className:"c-red"},Lt):Lt===100?cn=n.a.createElement("span",{className:"c-green"},Lt):Lt>60?cn=n.a.createElement("span",{className:"c-orange"},Lt):cn="--",n.a.createElement(C.a,{placement:"bottom",title:Ft.ultimate_score?n.a.createElement("div",null,cn==="--"?"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A0\u5206":"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A".concat(Ft.work_score,"\u5206")):n.a.createElement("div",null,n.a.createElement("div",null,Ft.final_score?"\u5173\u5361\u5F97\u5206\uFF1A".concat(Ft.final_score,"\u5206"):"\u5173\u5361\u5F97\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Ft.eff_score?"\u6548\u7387\u8BC4\u5206\uFF1A".concat(Ft.eff_score,"\u5206"):"\u6548\u7387\u8BC4\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Ft.late_penalty?"\u8FDF\u4EA4\u6263\u5206\uFF1A".concat(Ft.late_penalty,"\u5206"):"\u8FDF\u4EA4\u6263\u5206\uFF1A0\u5206"),!((Tn=re.workList)!==null&&Tn!==void 0&&Tn.answer_open_evaluation)&&n.a.createElement("div",null,"\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF1A",Ft.view_answer_count,"\u5173"),n.a.createElement("div",null,Ft.work_score?"\u6700\u7EC8\u6210\u7EE9\uFF1A".concat(Ft.work_score,"\u5206"):"\u6700\u7EC8\u6210\u7EE9\uFF1A0\u5206"))},cn)}},{title:"\u6253\u56DE\u6B21\u6570",dataIndex:"redo_count",align:"center",render:function(Lt){return Lt||"- -"}},{title:n.a.createElement("span",null,"\u8BC4\u9605\u72B6\u6001",n.a.createElement(C.a,{overlayClassName:oe.a.reviewStatusTooltip,placement:"top",title:n.a.createElement("pre",null,"\u4EE5\u4E0B\u60C5\u5F62\u51FA\u73B0\u4E00\u79CD\uFF0C\u8BC4\u9605\u72B6\u6001\u81EA\u52A8\u53D8\u4E3A\u5DF2\u8BC4\u9605\uFF1A",n.a.createElement("br",null),"1.\u5B66\u751F\u5F00\u542F\u4F5C\u4E1A\uFF0C\u7CFB\u7EDF\u5BF9\u5B66\u751F\u8FDB\u884C\u4E86\u81EA\u52A8\u6253\u5206\uFF1B",n.a.createElement("br",null),"2.\u8001\u5E08\u5BF9\u5B66\u751F\u4F5C\u4E1A\u8FDB\u884C\u5173\u5361\u8C03\u5206\u6216\u8005\u8FFD\u52A0\u70B9\u8BC4\uFF1B",n.a.createElement("br",null),"3.\u6574\u4E2A\u4F5C\u4E1A\u622A\u6B62/\u8865\u4EA4\u7ED3\u675F\u540E\uFF0C\u6240\u6709\u5B66\u751F\u4F5C\u4E1A\u72B6\u6001\u5C06\u81EA\u52A8\u53D8\u4E3A\u5DF2\u8BC4\u9605\u3002",n.a.createElement("br",null))},n.a.createElement("img",{src:"".concat(L.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),align:"center",dataIndex:"has_comment",width:90,ellipsis:!0,render:function(Lt){return Lt?"\u5DF2\u8BC4\u9605":"\u672A\u8BC4\u9605"}},{title:"\u64CD\u4F5C",dataInex:"action",align:"center",width:70,fixed:"right",ellipsis:!0,className:"workListTable",render:function(Lt,Ft){var Tn,cn,Gn;return Object(Z.t)()?n.a.createElement("div",null,Object(T.B)(Ft==null?void 0:Ft.work_status)==="\u672A\u5F00\u542F"?n.a.createElement("span",null,"--"):n.a.createElement(d.a,{target:"_blank",onClick:function(Wn){Wn.stopPropagation()},to:"/classrooms/".concat(st.coursesId,"/shixun_homework/").concat(st.categoryId,"/").concat(Ft.id,"/comment")},"\u67E5\u770B")):n.a.createElement("div",null,n.a.createElement("span",{style:{color:"#0152d9"},onClick:function(Wn){Wn.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:"",data:{name:Ft==null?void 0:Ft.user_name,homeworkId:Ft==null?void 0:Ft.id,work_comment:Ft==null?void 0:Ft.work_comment,work_comment_hidden:Ft==null?void 0:Ft.work_comment_hidden}}}})}},Ft.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u8FFD\u52A0\u70B9\u8BC4"),(Ft==null||((Tn=Ft.shixun_detail)===null||Tn===void 0||((cn=Tn[0])===null||cn===void 0))?void 0:cn.game_identifier)&&[1,2,3,4].includes(Ft==null?void 0:Ft.work_status)&&[n.a.createElement("br",null),n.a.createElement("a",{target:"_blank",onClick:function(Wn){var an;if(Wn.stopPropagation(),Object(Z.w)()){var _n,lr;Object(T.S)("/tasks/".concat(Ft==null||((_n=Ft.shixun_detail)===null||_n===void 0||((lr=_n[0])===null||lr===void 0))?void 0:lr.game_identifier,"?homework_common_id=").concat(ht.categoryId));return}if((an=tt.userInfo)!==null&&an!==void 0&&an.professional_certification){var mr,Fn;Object(T.S)("/tasks/".concat(Ft==null||((mr=Ft.shixun_detail)===null||mr===void 0||((Fn=mr[0])===null||Fn===void 0))?void 0:Fn.game_identifier,"?homework_common_id=").concat(ht.categoryId))}else return 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(T.S)("/account/certification")}}),!1}},"\u67E5\u770B\u5B9E\u8BAD")],(wt==null||((Gn=wt.homework_status)===null||Gn===void 0)?void 0:Gn[0])!=="\u5DF2\u622A\u6B62"&&!!Ft.myshixun_id&&[n.a.createElement("br",null),n.a.createElement("span",{className:oe.a.color32C,onClick:function(Wn){Wn.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:Ft,params:st}})}},"\u6253\u56DE\u91CD\u505A")])}}].filter(function(rn){return!!rn}),tr=function(){var Lt,Ft;return n.a.createElement(et.a,null,n.a.createElement(et.a.Item,{onClick:function(){Object(rt.h)(JSON.parse(sessionStorage.all_student_works_params),"shixun_work_list")},key:"1"},"\u5B66\u751F\u6210\u7EE9"),Object(Z.c)()&&(wt==null?void 0:wt.student_works.length)>0&&n.a.createElement(et.a.Item,{key:"3"},n.a.createElement(d.a,{onClick:function(cn){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A",type:2}})},to:"/classrooms/".concat(st.coursesId,"/shixun_homework/").concat(st.categoryId,"/").concat(wt==null||((Lt=wt.student_works)===null||Lt===void 0||((Ft=Lt[0])===null||Ft===void 0))?void 0:Ft.id,"/comment")},"\u5B9E\u8BAD\u62A5\u544A")),n.a.createElement(et.a.Item,{key:"2"},n.a.createElement(d.a,{to:"/classrooms/".concat(st.coursesId,"/exportlist/shixun_work_list")},"\u5386\u53F2\u5BFC\u51FA")))};return n.a.createElement(n.a.Fragment,null,n.a.createElement("section",{className:"".concat(oe.a.wrap," minH500 bg-white pl30 pr30 pt30")},((pn=wt.homework_status)===null||pn===void 0?void 0:pn.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(gt.a,null),!!vt.length&&n.a.createElement(B.a,{className:"mb10",dataSource:vt,columns:er,pagination:!1,showHeader:!1,loading:!1}),!((kn=wt.homework_status)!==null&&kn!==void 0&&kn.includes("\u672A\u53D1\u5E03"))&&n.a.createElement("aside",null,!Object(Z.c)()&&n.a.createElement("div",{className:"c-light-black font12"},n.a.createElement("span",null,"\u5DF2\u5F00\u59CB\u505A\u9898 ",(wt==null?void 0:wt.commit_count)||0," \u4EBA"),n.a.createElement("span",{className:"ml5"},"\u672A\u5F00\u59CB\u505A\u9898 ",(wt==null?void 0:wt.uncommit_count)||0," \u4EBA"),(wt==null?void 0:wt.left_time)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("span",{className:"ml20 c-black"},wt==null||((cr=wt.left_time)===null||cr===void 0)?void 0:cr.status),n.a.createElement("span",{className:"ml20 c-orange-ff9"},wt==null||((qn=wt.left_time)===null||qn===void 0)?void 0:qn.time))),Object(Z.c)()&&n.a.createElement(n.a.Fragment,null,n.a.createElement(We.a,{form:Vt,onChange:tn,initialValues:(Xn={},Object(ut.a)(Xn,"task_status","all"),Object(ut.a)(Xn,"course_group_info","all"),Object(ut.a)(Xn,"teacher_comment","all"),Xn)},((Dn=wt.task_status)===null||Dn===void 0?void 0:Dn.length)>0&&n.a.createElement(We.a.Item,{name:"task_status"},n.a.createElement(Re.a.Group,{value:[],style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u4F5C\u4E1A\u72B6\u6001:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(Re.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},wt.task_status&&wt.task_status.map(function(rn,Lt){return n.a.createElement(Re.a,{name:"task_status",value:rn.id},rn.name,"(",rn.count,")",rn.name==="\u622A\u6B62\u540E\u901A\u5173"?n.a.createElement(C.a,{title:"\u5728\u89C4\u5B9A\u65F6\u95F4\u5916\u5B8C\u6210\u7684\u4F5C\u4E1A"},n.a.createElement("i",{className:"font13 ml5 iconfont icon-tishixiaowenhao"})):null)}))))),((hr=wt.course_group_info)===null||hr===void 0?void 0:hr.length)>0&&n.a.createElement(We.a.Item,{name:"course_group_info"},n.a.createElement(Re.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(Re.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1",id:"divhe",style:{height:De+"px",overflow:"hidden"}},(jn=wt.course_group_info)===null||jn===void 0?void 0:jn.map(function(rn,Lt){return n.a.createElement(Re.a,{value:rn.course_group_id},rn.group_group_name,"(",rn.count,")")})),nt&&n.a.createElement("span",{onClick:function(){var Lt=document.getElementById("divhe").scrollHeight;De>47?be(47):be(Lt)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},De===47?"\u5C55\u5F00":"\u6536\u8D77",De===47?n.a.createElement(Mt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):n.a.createElement(Wt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}))))),((Jn=wt.teacher_comment)===null||Jn===void 0?void 0:Jn.length)>0&&n.a.createElement(We.a.Item,{name:"teacher_comment"},n.a.createElement(Re.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u8FFD\u52A0\u70B9\u8BC4:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(Re.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},wt.teacher_comment&&wt.teacher_comment.map(function(rn,Lt){return n.a.createElement(Re.a,{value:String(rn.id)},rn.name,"(",rn.count,")")})))))),n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,null,n.a.createElement(f.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Lt){st.search=Lt,st.page=1,ct()},style:{width:240}})),n.a.createElement(g.a,null,n.a.createElement("span",{className:"ml5"},n.a.createElement("span",{className:"c-red"},wt.work_count),"\u4E2A\u68C0\u7D22\u7ED3\u679C\uFF08",wt.work_count,"\u4E2A\u5B66\u751F\uFF09")))),n.a.createElement(g.a,null,Object(Z.c)()&&wt.code_review&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",selectArrs:wt.student_works.map(function(Lt){return Lt.id}),params:st}})}},n.a.createElement("span",{className:"".concat(oe.a.tr1," iconfont icon-daimachazhong")}),"\u4EE3\u7801\u67E5\u91CD"),Object(Z.c)()&&Nt&&n.a.createElement(U.a,{className:"ml10",onClick:$t},n.a.createElement("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"\u66F4\u65B0\u6210\u7EE9"),(wt==null||((rr=wt.homework_status)===null||rr===void 0)?void 0:rr.includes("\u5DF2\u622A\u6B62"))&&!(ke!=null&&ke.setting.hide_quality_analysis)&&Object(Z.c)()&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8D28\u91CF\u68C0\u6D4B",selectArrs:wt.student_works.map(function(Lt){return Lt.id}),params:st}})}},n.a.createElement("i",{className:"iconfont icon-a-08zhiliang-xianxing font14 pr5"}),"\u8D28\u91CF\u8BC4\u5206"),n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4",selectArrs:wt.student_works.map(function(Lt){return Lt.id}),params:st}})}},n.a.createElement(Ne.a,{className:"mr5"}),"\u4E00\u952E\u70B9\u8BC4"),((wt==null||((wn=wt.homework_status)===null||wn===void 0)?void 0:wn.includes("\u63D0\u4EA4\u4E2D"))||(wt==null||((Er=wt.homework_status)===null||Er===void 0)?void 0:Er.includes("\u8865\u4EA4\u4E2D"))||(wt==null||((Sr=wt.homework_status)===null||Sr===void 0)?void 0:Sr.includes("\u8FDB\u884C\u4E2D")))&&n.a.createElement(U.a,{className:"ml10",onClick:function(){gn(!0)}},"\u4E00\u952E\u6253\u56DE"),Object(Z.c)()&&n.a.createElement(le.a,{overlay:tr,className:"ml10"},n.a.createElement(U.a,null,n.a.createElement(Pe.a,null),"\u5BFC\u51FA",n.a.createElement(it.a,null)))))),n.a.createElement(_.a,{style:{justifyContent:"end",marginTop:"5px"}},Object(Z.c)()&&Nt&&n.a.createElement("span",null,n.a.createElement("span",{style:{color:"red"}},"*"),"\u5217\u8868\u4E2D\u4F5C\u4E1A\u8BB0\u5F55\u5B58\u5728\u5DEE\u5F02\uFF0C\u8BF7\u70B9\u51FB\u201C\u66F4\u65B0\u6210\u7EE9\u201D\u6309\u94AE")),n.a.createElement(B.a,{className:"mt30",loading:Le["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(Lt){return{onClick:function(Tn){window.open("/classrooms/".concat(st.coursesId,"/shixun_homework/").concat(st.categoryId,"/").concat(Lt.id,"/comment"),"_blank")}}},scroll:{x:1500},dataSource:wt.student_works,columns:er,onChange:function(Lt,Ft,Tn){Tn.field&&(st.order=Tn.field),Tn.order||(st.b_order="asc"),Tn.order==="ascend"&&(st.b_order="asc"),Tn.order==="descend"&&(st.b_order="desc"),Tn.order||(st.b_order="asc"),ct()}}),n.a.createElement(ve,null),n.a.createElement(we,null),n.a.createElement(fe.a,null)),n.a.createElement(p.a,{title:"\u4E00\u952E\u6253\u56DE\u91CD\u505A",visible:ft,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(i.a)(h.a.mark(function rn(){var Lt,Ft;return h.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(!(Rr===2)){cn.next=13;break}if(!(qt.length<=0)){cn.next=4;break}return b.b.info("\u8BF7\u9009\u62E9\u4F5C\u4E1A\u72B6\u6001"),cn.abrupt("return");case 4:if(Qe){cn.next=7;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),cn.abrupt("return");case 7:return cn.next=9,Object(W.a)("/api/homework_commons/".concat(st.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:Qe,status:qt}});case 9:Lt=cn.sent,Lt.status===0&&(Nn(Lt),gn(!1),Ln(!0)),cn.next=32;break;case 13:if(!(zr===0||Yr===0)){cn.next=16;break}cn.next=22;break;case 16:if(zr){cn.next=19;break}return b.b.info("\u6700\u4F4E\u5206\u4E0D\u80FD\u4E3A\u7A7A"),cn.abrupt("return");case 19:if(Yr){cn.next=22;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u4E3A\u7A7A"),cn.abrupt("return");case 22:if(!(zr>Yr)){cn.next=25;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u5927\u4E8E\u6700\u4F4E\u5206"),cn.abrupt("return");case 25:if(Qe){cn.next=28;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),cn.abrupt("return");case 28:return cn.next=30,Object(W.a)("/api/homework_commons/".concat(st.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:Qe,min_score:zr,max_score:Yr}});case 30:Ft=cn.sent,Ft.status===0&&(Nn(Ft),gn(!1),Ln(!0));case 32:case"end":return cn.stop()}},rn)})),onCancel:function(){gn(!1),Pn()}},n.a.createElement("div",{style:{padding:"32px"}},n.a.createElement("div",null,n.a.createElement("div",null,n.a.createElement("span",{style:{width:"80px"}},"\u6253\u56DE\u65B9\u5F0F\uFF1A"),n.a.createElement(Oe.a.Group,{value:Rr,onChange:function(Lt){Br(Lt.target.value)}},n.a.createElement(Oe.a,{value:1},"\u6309\u6210\u7EE9\u6253\u56DE"),n.a.createElement(Oe.a,{value:2},"\u6309\u4F5C\u4E1A\u72B6\u6001\u6253\u56DE"))),Rr===1&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u4F4E\u5206\uFF1A"),n.a.createElement(Q.a,{min:0,max:100,value:zr,onChange:function(Lt){return va(Lt)},style:{width:"100px"}}),n.a.createElement("span",{style:{width:"80px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u9AD8\u5206\uFF1A"),n.a.createElement(Q.a,{min:0,max:100,value:Yr,onChange:function(Lt){return Aa(Lt)},style:{width:"100px"}})),Rr===2&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"80px"}},"\u4F5C\u4E1A\u72B6\u6001\uFF1A"),n.a.createElement(Re.a.Group,{onChange:function(Lt){Ut(Object(v.a)(Lt))},style:{width:"100%"}},(gr=wt.task_status)===null||gr===void 0?void 0:gr.map(function(rn,Lt){return n.a.createElement(Re.a,{name:"task_status",value:rn.id},rn.name,"(",rn.count,")")}))),n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*")," \u8BC4\u8BED\uFF1A"),n.a.createElement(H.a,{className:oe.a.MdEditor,onChange:function(Lt){return qe(Lt)},placeholder:"\u8BF7\u586B\u5199\u8BC4\u8BED"}))))),n.a.createElement(p.a,{visible:ur,title:"\u6253\u56DE\u786E\u8BA4",onOk:Object(i.a)(h.a.mark(function rn(){var Lt,Ft;return h.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(!(Rr===2)){cn.next=7;break}return cn.next=3,Object(W.a)("/api/homework_commons/".concat(st.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:Qe,status:qt}});case 3:Lt=cn.sent,Lt.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),Pn(),ct(),Ln(!1)),cn.next=11;break;case 7:return cn.next=9,Object(W.a)("/api/homework_commons/".concat(st.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:Qe,min_score:zr,max_score:Yr}});case 9:Ft=cn.sent,Ft.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),Pn(),ct(),Ln(!1));case 11:case"end":return cn.stop()}},rn)})),onCancel:function(){Pn(),Ln(!1)}},n.a.createElement("div",{style:{padding:"32px"}},Rr===1&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u6210\u7EE9\u5728",zr,"-",Yr,"\u7684\u5B66\u751F\u8FDB\u884C\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),Rr===2&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u4F5C\u4E1A\u72B6\u6001\u4E3A",((sr=wt.task_status)===null||sr===void 0?void 0:sr.filter(function(rn){return qt==null?void 0:qt.includes(rn.id)}).map(function(rn){return rn.name}).toString())+",","\u7684\u5B66\u751F\u8FDB\u884C\u4F5C\u4E1A\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u8BE5\u6761\u4EF6\u4E0B\u5171\u6709",Mn==null?void 0:Mn.count,"\u540D\u5B66\u751F")))),n.a.createElement(Me,null),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(w.a,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:bn,current:st.page||1,defaultPageSize:20,total:wt.work_count})))},Xt=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading,kn=Sn.user,cr=Sn.globalSetting;return{shixunHomeworks:hn,loading:pn.effects,globalSetting:cr,user:kn}})(Pt),lt=M("fOrg"),zt=M("+KLJ"),mt=function(hn){var pn,kn=hn.shixunHomeworks,cr=hn.loading,qn=hn.dispatch,Xn=Object(s.i)(),Dn=Object(l.useState)(Object(R.a)(Object(R.a)({},{page:1,limit:20,group_ids:[]}),Xn)),hr=Object(a.a)(Dn,2),jn=hr[0],Jn=hr[1],rr=Object(s.h)(),wn=kn.codeReview,Er=Object(l.useState)({}),Sr=Object(a.a)(Er,2),gr=Sr[0],sr=Sr[1],re=We.a.useForm(),Le=Object(a.a)(re,1),Xe=Le[0];jn.order="code_rate",jn.sort="desc",jn.category=jn.categoryId,Object(l.useEffect)(function(){ke(),console.log("params",jn)},[jn]),Object(l.useEffect)(function(){kn.actionTabs.key==="\u6267\u884C\u4EE3\u7801\u67E5\u91CD"&&ke()},[kn.actionTabs.key]);var ke=function(){var xt=Object(i.a)(h.a.mark(function Rt(){var st;return h.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,qn({type:"shixunHomeworks/getCodeReview",payload:Object(R.a)({},jn)});case 2:st=Zt.sent,st.status===-2&&setTimeout(function(){return ke()},1500);case 4:case"end":return Zt.stop()}},Rt)}));return function(){return xt.apply(this,arguments)}}(),dt=function(){},tt=function(Rt,st){jn.page=Rt,jn.limit=20,qn({type:"shixunHomeworks/getCodeReview",payload:Object(R.a)({},jn)})},ht=[{title:"\u5E8F\u53F7",dataIndex:"number",render:function(Rt,st,Kt){return jn.limit*(jn.page-1)+Kt+1}},{title:"\u59D3\u540D",dataIndex:"username"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u76F8\u4F3C\u5EA6",dataIndex:"code_rate",render:function(Rt){return n.a.createElement("span",{className:"c-orange"},Rt)}},{title:"\u64CD\u4F5C",dataInex:"action",render:function(Rt,st){return n.a.createElement("div",null,n.a.createElement(d.a,{target:"_blank",to:"/classrooms/".concat(jn.coursesId,"/shixun_homework/").concat(jn.categoryId,"/review_detail/").concat(st.user_id)},"\u67E5\u770B"),n.a.createElement("br",null))}}];return n.a.createElement("section",{className:"minH500 bg-white pl30 pr30 pt10"},(wn==null?void 0:wn.status)===-2&&n.a.createElement(zt.a,{message:"\u67E5\u91CD\u8FDB\u884C\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u2026\u2026",className:"mb10 font14",type:"error"}),n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("p",{className:"mt10"},"\u67E5\u91CD\u65F6\u95F4\uFF1A",wn.last_review_time,n.a.createElement(U.a,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){qn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",params:jn}})}},"\u4EE3\u7801\u67E5\u91CD"))),n.a.createElement(g.a,null,n.a.createElement(f.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Rt){jn.search=Rt,qn({type:"shixunHomeworks/getCodeReview",payload:jn})},style:{width:200}}),n.a.createElement("span",{className:"ml5 c-red"}))),((pn=wn.group_info)===null||pn===void 0?void 0:pn.length)>0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"80px",className:"font14"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(Re.a,{checked:jn.group_ids=="",value:"all",onChange:function(Rt){delete jn.group_ids,jn.group_ids=[],jn.page=1,Jn(Object(R.a)({},jn))}},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},wn.group_info&&wn.group_info.map(function(xt,Rt){return n.a.createElement(Re.a,{value:xt.id,checked:jn.group_ids.includes(xt.id),onChange:function(Kt){Kt.target.checked?jn.group_ids.push(xt.id):jn.group_ids.splice(jn.group_ids.indexOf(xt.id),1),jn.page=1,Jn(Object(R.a)({},jn))}},xt.name,"(",xt.members_count,")")}))),n.a.createElement(_.a,{className:"font14 c-red mt5"},n.a.createElement(g.a,null,"\u672C\u9875\u4EC5\u663E\u793A\u5168\u90E8\u5DF2\u67E5\u91CD\u5206\u73ED"))),n.a.createElement("p",{className:"mt10"},n.a.createElement("span",{className:"c-red"},wn.copy_reviews_count),"\u4E2A\u7591\u4F3C\u6284\u88AD\u4F5C\u54C1\uFF08",wn.all_reviews_count,"\u4F5C\u54C1\uFF09"),n.a.createElement(B.a,{className:"mt30",loading:cr["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:wn.users_reviews,columns:ht,onChange:function(Rt,st,Kt){Kt.order==="ascend"&&(jn.b_order="asc"),Kt.order==="descend"&&(jn.b_order="desc"),Kt.order||delete jn.b_order,qn({type:"shixunHomeworks/getCodeReview",payload:Object(R.a)({},jn)})}}),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(w.a,{showSizeChanger:!1,onChange:tt,defaultCurrent:jn.page||1,current:jn.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:wn.copy_reviews_count})))},_t=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(mt),ot=M("OaEy"),Se=M("2fM7"),Ue=M("iQDF"),At=M("+eQT"),pt=M("zetH"),jt=M.n(pt),Gt=M("eozf"),Ze=M("LvDl"),at=At.a.RangePicker,Tt=Se.a.Option,Ht=function(hn){var pn=hn.shixunHomeworks,kn=hn.loading,cr=hn.dispatch,qn=Object(s.i)(),Xn=Object(s.h)(),Dn=pn.workSetting,hr=pn.workList,jn=pn.changeData,Jn=Object(l.useState)(!0),rr=Object(a.a)(Jn,2),wn=rr[0],Er=rr[1],Sr=Object(l.useState)({}),gr=Object(a.a)(Sr,2),sr=gr[0],re=gr[1],Le=Object(l.useState)(!1),Xe=Object(a.a)(Le,2),ke=Xe[0],dt=Xe[1],tt=We.a.useForm(),ht=Object(a.a)(tt,1),xt=ht[0],Rt=Object(l.useState)([]),st=Object(a.a)(Rt,2),Kt=st[0],Zt=st[1],Et=Object(l.useState)([]),Vt=Object(a.a)(Et,2),$e=Vt[0],Yt=Vt[1],Nt=Object(l.useState)(!1),un=Object(a.a)(Nt,2),yn=un[0],Cn=un[1],wt=Object(l.useState)([]),kt=Object(a.a)(wt,2),mn=kt[0],dn=kt[1],vt=Object(l.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,forbid_copy_answers:!1,public_after_abort:!1,public_after_over:!1}),St=Object(a.a)(vt,2),Ot=St[0],yt=St[1];Object(l.useEffect)(function(){return ft(),function(){Zt([].concat())}},[]);var ft=function(){cr({type:"shixunHomeworks/getWorkSetting",payload:Object(R.a)({},qn)})};Object(l.useEffect)(function(){if(!(Dn!=null&&Dn.course_id))return;Object.keys(Ot).map(function(qt){Ot[qt]=Dn[qt]}),(!Ot.allow_late||!Ot.unified_late)&&(Ot.late_penalty=5),Kt=JSON.parse(JSON.stringify(Dn.group_settings.map(function(qt){return Object(R.a)(Object(R.a)({},qt),{},{group_name:[qt.group_name]})}).filter(function(qt){return qt.publish_time!==null}))),$e=JSON.parse(JSON.stringify(Dn.allow_late_settings.map(function(qt){return Object(R.a)(Object(R.a)({},qt),{},{group_name:[qt.group_name]})}).filter(function(qt){return qt.late_time!==null}))),yt(Object(R.a)({},Ot)),Zt(Object(v.a)(Kt)),Yt(Object(v.a)($e))},[Dn]);var gn=function(){var Ut,fn,In=JSON.parse(JSON.stringify(Ot));if(In.challenge_settings.filter(function(Ln){return!Ln.hide}),In.categoryId=qn.categoryId,(Ut=In.challenge_settings)!==null&&Ut!==void 0&&Ut.every(function(Ln){return!Ln.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(Ot.unified_setting||(Kt=(fn=Kt)===null||fn===void 0?void 0:fn.map(function(Ln){var Tr;if(!Ln.publish_time||!Ln.end_time)throw b.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Ln.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Ln.group_name=typeof(Ln==null?void 0:Ln.group_name)=="string"?[Ln==null?void 0:Ln.group_name]:Ln==null?void 0:Ln.group_name,Ln.group_id=(Tr=Dn.group_settings)===null||Tr===void 0?void 0:Tr.filter(function(Ur){var Mn;return Ln==null||((Mn=Ln.group_name)===null||Mn===void 0)?void 0:Mn.includes(Ur.group_name)}).map(function(Ur){return Ur.group_id||Ur.id}).toString().split(","),Ln})),In.group_settings=Kt,Ot.allow_late)if(Ot.unified_late){if(Ot.late_penalty===null||Ot.late_penalty===void 0||Ot.late_penalty<0||Ot.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Ot.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var ur;$e=(ur=$e)===null||ur===void 0?void 0:ur.map(function(Ln){var Tr,Ur;if(Ln.late_penalty===null||Ln.late_penalty===void 0||Ln.late_penalty<0||Ln.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Ln.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Ln.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Ln.group_name=typeof(Ln==null?void 0:Ln.group_name)=="string"?[Ln==null?void 0:Ln.group_name]:Ln==null?void 0:Ln.group_name,Ln.group_id=Ln==null||((Tr=Ln.group_name)===null||Tr===void 0||((Ur=Tr.map(function(Mn){var Nn,Kn,vr=(Nn=Dn.group_settings)===null||Nn===void 0||((Kn=Nn.filter(function(Rr){return(Rr==null?void 0:Rr.group_name)===Mn}))===null||Kn===void 0)?void 0:Kn[0];return vr==null?void 0:vr.group_id}))===null||Ur===void 0))?void 0:Ur.toString().split(","),Ln}),In.allow_late_settings=$e}Bt(In)},Bt=function(Ut){var fn,In;if(console.log(Ut.total_score,Ut.eff_score),Ut.total_score===null){b.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Ut!=null&&Ut.work_efficiency&&Ut.eff_score===null){b.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var ur=Ut.challenge_settings.reduce(function(Ur,Mn){return Ur+Number(Mn.challenge_score)},0);if((ur==null?void 0:ur.toFixed(10))!==((fn=Ut.total_score-Ut.eff_score)===null||fn===void 0?void 0:fn.toFixed(10))){b.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(Ut.total_score,"\u5206"));return}var Ln={shixun_evaluation:Ut.shixun_evaluation,challenge_settings:Ut.challenge_settings},Tr=function(){var Ur=Object(i.a)(h.a.mark(function Mn(){var Nn;return h.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return dt(!0),vr.next=3,Object(W.a)("/api/homework_commons/".concat(qn.categoryId,"/public_setting.json"),{method:"post",body:Object(R.a)({},Ut)});case 3:Nn=vr.sent,Nn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),Er(!0),ft(),cr({type:"shixunHomeworks/getWorkList",payload:Object(R.a)({},qn)})),dt(!1);case 6:case"end":return vr.stop()}},Mn)}));return function(){return Ur.apply(this,arguments)}}();!Object(Ze.isEqual)(jn,Ln)&&!(hr!=null&&(In=hr.homework_status)!==null&&In!==void 0&&In.includes("\u672A\u53D1\u5E03"))?p.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Tr}):Tr()},vn=Object(l.useMemo)(function(){return Ot.public_after_abort?"public_after_abort":Ot.public_after_over?"public_after_over":"immediately"},[Ot]);return n.a.createElement("section",{className:[jt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u516C\u5F00\u8BBE\u7F6E")),n.a.createElement(g.a,null,(Dn==null?void 0:Dn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Er(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(Re.a,{checked:Ot.score_open,disabled:wn,onChange:function(Ut){Ot.score_open=Ut.target.checked,yt(Object.assign({},Ot))}},n.a.createElement("strong",null,"\u516C\u5F00\u6210\u7EE9")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5728\u4F5C\u4E1A\u622A\u6B62/\u8865\u4EA4\u7ED3\u675F\u65F6\u95F4\u4E4B\u540E\uFF0C\u5DF2\u63D0\u4EA4\u4F5C\u54C1\u7684\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u5176\u5B83\u5B66\u751F\u7684\u6210\u7EE9\uFF0C\u5426\u5219\u53EA\u80FD\u67E5\u770B\u81EA\u5DF1\u7684\u6210\u7EE9)")),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(Re.a,{checked:Ot.answer_public,disabled:wn,onChange:function(Ut){Ut.target.checked?yt(function(fn){return Object(R.a)(Object(R.a)({},fn),{},{answer_public:Ut.target.checked})}):yt(function(fn){return Object(R.a)(Object(R.a)({},fn),{},{answer_public:Ut.target.checked,public_after_abort:!1,public_after_over:!1})})}},n.a.createElement("strong",null,"\u516C\u5F00\u7B54\u6848")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u5B9E\u8BAD\u53C2\u8003\u7B54\u6848\uFF0C\u5426\u5219\u7981\u6B62\u67E5\u770B\u7B54\u6848)")),Ot.answer_public&&n.a.createElement(g.a,{span:24,className:"mt10 pl30"},n.a.createElement(Oe.a.Group,{style:{marginLeft:22},onChange:function(Ut){Ut.target.value==="public_after_abort"?yt(function(fn){return Object(R.a)(Object(R.a)({},fn),{},{public_after_abort:!0,public_after_over:!1})}):Ut.target.value==="public_after_over"?yt(function(fn){return Object(R.a)(Object(R.a)({},fn),{},{public_after_abort:!1,public_after_over:!0})}):yt(function(fn){return Object(R.a)(Object(R.a)({},fn),{},{public_after_abort:!1,public_after_over:!1})})},value:vn,disabled:wn},n.a.createElement(Oe.a,{value:"immediately"},"\u7ACB\u5373\u516C\u5F00"),n.a.createElement(Oe.a,{value:"public_after_abort"},"\u4F5C\u4E1A\u622A\u6B62\u540E\u516C\u5F00"),n.a.createElement(Oe.a,{value:"public_after_over"},"\u8BFE\u5802\u7ED3\u675F\u540E\u516C\u5F00"))),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(Re.a,{checked:Ot.forbid_copy_answers,disabled:wn,onChange:function(Ut){Ot.forbid_copy_answers=Ut.target.checked,yt(Object.assign({},Ot))}},n.a.createElement("strong",null,"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u7981\u6B62\u5B66\u751F\u590D\u5236\u53C2\u8003\u7B54\u6848\uFF0C\u5426\u5219\u5B66\u751F\u53EF\u4EE5\u590D\u5236\u53C2\u8003\u7B54\u6848)")),n.a.createElement(g.a,{span:24,className:"mt15 pl30 pb40"},n.a.createElement(Re.a,{checked:Ot.comment_public,disabled:wn,onChange:function(Ut){Ot.comment_public=Ut.target.checked,yt(Object.assign({},Ot))}},n.a.createElement("strong",null,"\u516C\u5F00\u8BC4\u8BBA")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u8BFE\u7A0B\u5B9E\u9A8C\u7684\u8BC4\u8BBA\uFF0C\u5426\u5219\u7981\u6B62\u67E5\u770B)")),!wn&&n.a.createElement(g.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",loading:ke,onClick:function(){return gn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Er(!0),ft()}},"\u53D6\u6D88"))),n.a.createElement(p.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:yn,onCancel:function(){return Cn(!1)}},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(f.a.Search,{onChange:function(Ut){}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Ut,fn){dn(Ut)}},pagination:!1,dataSource:[{name:"1"}],columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time",key:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time",key:"end_time"}]}))))},Jt=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(Ht),on=function(hn){var pn=hn.shixunHomeworks,kn=hn.loading,cr=hn.dispatch,qn=Object(s.i)(),Xn=pn.workSetting,Dn=pn.workList,hr=pn.changeData,jn=Object(l.useState)(!0),Jn=Object(a.a)(jn,2),rr=Jn[0],wn=Jn[1],Er=Object(l.useState)(!1),Sr=Object(a.a)(Er,2),gr=Sr[0],sr=Sr[1],re=Object(l.useState)(!1),Le=Object(a.a)(re,2),Xe=Le[0],ke=Le[1],dt=Object(l.useState)([]),tt=Object(a.a)(dt,2),ht=tt[0],xt=tt[1],Rt=Object(l.useState)([]),st=Object(a.a)(Rt,2),Kt=st[0],Zt=st[1],Et=Object(l.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1,difficulty_level_sort:"asc"}),Vt=Object(a.a)(Et,2),$e=Vt[0],Yt=Vt[1];Object(l.useEffect)(function(){return Nt(),function(){xt([].concat())}},[]);var Nt=function(){cr({type:"shixunHomeworks/getWorkSetting",payload:Object(R.a)({},qn)})};Object(l.useEffect)(function(){if(!(Xn!=null&&Xn.course_id))return;Object.keys($e).map(function(wt){$e[wt]=Xn[wt]}),(!$e.allow_late||!$e.unified_late)&&($e.late_penalty=5),ht=JSON.parse(JSON.stringify(Xn.group_settings.map(function(wt){return Object(R.a)(Object(R.a)({},wt),{},{group_name:[wt.group_name]})}).filter(function(wt){return wt.publish_time!==null}))),Kt=JSON.parse(JSON.stringify(Xn.allow_late_settings.map(function(wt){return Object(R.a)(Object(R.a)({},wt),{},{group_name:[wt.group_name]})}).filter(function(wt){return wt.late_time!==null}))),Yt(Object(R.a)(Object(R.a)({},$e),{},{difficulty_level_sort:$e.difficulty_level_sort||"asc"})),xt(Object(v.a)(ht)),Zt(Object(v.a)(Kt))},[Xn]);var un=function(){var kt,mn,dn=JSON.parse(JSON.stringify($e));if(dn.challenge_settings.filter(function(St){return!St.hide}),dn.categoryId=qn.categoryId,(kt=dn.challenge_settings)!==null&&kt!==void 0&&kt.every(function(St){return!St.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if($e.unified_setting||(ht=(mn=ht)===null||mn===void 0?void 0:mn.map(function(St){var Ot;if(!St.publish_time||!St.end_time)throw b.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!St.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return St.group_name=typeof(St==null?void 0:St.group_name)=="string"?[St==null?void 0:St.group_name]:St==null?void 0:St.group_name,St.group_id=(Ot=Xn.group_settings)===null||Ot===void 0?void 0:Ot.filter(function(yt){var ft;return St==null||((ft=St.group_name)===null||ft===void 0)?void 0:ft.includes(yt.group_name)}).map(function(yt){return yt.group_id||yt.id}).toString().split(","),St})),dn.group_settings=ht,$e.allow_late)if($e.unified_late){if($e.late_penalty===null||$e.late_penalty===void 0||$e.late_penalty<0||$e.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!$e.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var vt;Kt=(vt=Kt)===null||vt===void 0?void 0:vt.map(function(St){var Ot,yt;if(St.late_penalty===null||St.late_penalty===void 0||St.late_penalty<0||St.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!St.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!St.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return St.group_name=typeof(St==null?void 0:St.group_name)=="string"?[St==null?void 0:St.group_name]:St==null?void 0:St.group_name,St.group_id=St==null||((Ot=St.group_name)===null||Ot===void 0||((yt=Ot.map(function(ft){var gn,Bt,vn=(gn=Xn.group_settings)===null||gn===void 0||((Bt=gn.filter(function(qt){return(qt==null?void 0:qt.group_name)===ft}))===null||Bt===void 0)?void 0:Bt[0];return vn==null?void 0:vn.group_id}))===null||yt===void 0))?void 0:yt.toString().split(","),St}),dn.allow_late_settings=Kt}yn(dn)},yn=function(kt){var mn,dn;if(kt.total_score===null){b.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(kt!=null&&kt.work_efficiency&&kt.eff_score===null){b.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var vt=kt.challenge_settings.reduce(function(yt,ft){return yt+Number(ft.challenge_score)},0);if((vt==null?void 0:vt.toFixed(10))!==((mn=kt.total_score-kt.eff_score)===null||mn===void 0?void 0:mn.toFixed(10))){b.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(kt.total_score,"\u5206"));return}var St={shixun_evaluation:kt.shixun_evaluation,challenge_settings:kt.challenge_settings},Ot=function(){var yt=Object(i.a)(h.a.mark(function ft(){var gn;return h.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return sr(!0),vn.next=3,Object(W.a)("/api/homework_commons/".concat(qn.categoryId,"/score_setting.json"),{method:"post",body:Object(R.a)({},kt)});case 3:gn=vn.sent,gn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),wn(!0),Nt(),cr({type:"shixunHomeworks/getWorkList",payload:Object(R.a)({},qn)})),sr(!1);case 6:case"end":return vn.stop()}},ft)}));return function(){return yt.apply(this,arguments)}}();!Object(Ze.isEqual)(hr,St)&&!(Dn!=null&&(dn=Dn.homework_status)!==null&&dn!==void 0&&dn.includes("\u672A\u53D1\u5E03"))?p.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Ot}):Ot()},Cn=function(){var kt,mn=$e.eff_score,dn=$e.total_score,vt=$e.difficulty_level_sort,St=dn-mn,Ot=(kt=$e.challenge_settings)===null||kt===void 0?void 0:kt.filter(function(fn){return fn.checked}).length;if(!Ot){$e.challenge_settings.map(function(fn,In){fn.challenge_score=0});return}var yt=$e.challenge_settings.filter(function(fn){return fn.checked}).map(function(fn){return vt==="desc"?fn.challenge_exp_desc:fn.challenge_exp}).reduce(function(fn,In){return fn+In}),ft=St/yt,gn=0,Bt=0,vn;switch($e.shixun_evaluation){case 0:var qt=parseFloat((St/Ot).toFixed(1));$e.challenge_settings.map(function(fn,In){fn.checked?(gn=In,fn.challenge_score=qt>0?qt:0):fn.challenge_score=0}),vn=(St-qt*(Ot-1)).toFixed(1),$e.challenge_settings[gn].challenge_score=vn>0?vn:0;break;case 1:$e.challenge_settings.map(function(fn,In){fn.checked?(gn=In,Bt+=Number((Math.round((vt==="desc"?fn.challenge_exp_desc:fn.challenge_exp)*ft*10)/10).toFixed(1)),fn.challenge_score=(Math.round((vt==="desc"?fn.challenge_exp_desc:fn.challenge_exp)*ft*10)/10).toFixed(1)):fn.challenge_score=0});var Ut=$e.challenge_settings[gn].challenge_score;vn=(St-Bt+Number(Ut)).toFixed(1),$e.challenge_settings[gn].challenge_score=vn>0?vn:0;break}};return n.a.createElement("section",{className:[jt.a.form," bg-white pl30 pr30 pt10 mb20 pb10"].join(" ")},n.a.createElement(_.a,{className:"mt25"},n.a.createElement(g.a,{flex:"1"}),n.a.createElement(g.a,null,(Xn==null?void 0:Xn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return wn(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(g.a,{span:24,className:"pl30 mt10"},n.a.createElement("strong",null,"\u603B\u5206\u503C\uFF1A"),n.a.createElement(Q.a,{min:0,value:$e.total_score,disabled:rr,onChange:function(kt){$e.total_score=kt,Yt(Object.assign({},$e)),Cn()}}),"\xA0\u5206"),n.a.createElement(g.a,{span:24,style:{paddingLeft:60,marginTop:20}},n.a.createElement("strong",null,"\u5173\u5361\u4EFB\u52A1\u7684\u9009\u62E9\u548C\u5206\u503C\u8BBE\u7F6E"),n.a.createElement("span",{className:"c-orange"},"\xA0(\u603B\u5206\u503C = \u6548\u7387\u5206+ \u5173\u5361\u4EFB\u52A1\u603B\u5206)"))),n.a.createElement(_.a,{style:{paddingLeft:85,marginTop:30}},n.a.createElement(g.a,{flex:"1"},n.a.createElement(Re.a,{disabled:rr,checked:$e.work_efficiency,onChange:function(kt){$e.work_efficiency=kt.target.checked,$e.work_efficiency?$e.eff_score=20:$e.eff_score=0,Yt(Object.assign({},$e)),Cn()}},n.a.createElement("strong",null,"\u6548\u7387\u5206")),n.a.createElement("span",{className:"c-orange font12",style:{marginLeft:-4}},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u6700\u7EC8\u6210\u7EE9\u5305\u542B\u6548\u7387\u5206\u3002\u6548\u7387\u5206\u5728\u4F5C\u4E1A\u622A\u6B62\u6216\u8005\u8865\u4EA4\u7ED3\u675F\u540E\u7531\u7CFB\u7EDF\u81EA\u52A8\u751F\u6210)")),n.a.createElement(g.a,{className:jt.a.efficiency},"\uFF08\u5B66\u751F\u5B66\u4E60\u6548\u7387= log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)",n.a.createElement("br",null),"\uFF08\u5B66\u751F\u6548\u7387\u5206 = \u5B66\u751F\u5B66\u4E60\u6548\u7387 / \u8BFE\u5802\u5B66\u751F\u6700\u9AD8\u5B66\u4E60\u6548\u7387 * \u5206\u503C\uFF09",n.a.createElement("br",null),n.a.createElement("span",{style:{marginLeft:10}},"\u53E6\uFF1A\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B66\u751F\u6548\u7387\u5206\u8BB0 0 \u5206"))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:105}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"mr5"},"\u6548\u7387\u5206"),n.a.createElement(Q.a,{min:0,disabled:rr||!$e.work_efficiency,value:$e.eff_score,step:.1,onChange:function(kt){$e.eff_score=kt,Yt(Object.assign({},$e)),Cn()}}),n.a.createElement("span",null,"\xA0\u5206"))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:105,marginTop:"20px"}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"mr5"},"\u5B9E\u8BAD\u8017\u65F6\u89C4\u5219\uFF1A"),n.a.createElement(Oe.a.Group,{disabled:rr,value:$e.training_time_rules,onChange:function(kt){$e.training_time_rules=kt.target.value,Yt(Object.assign({},$e)),Cn()}},n.a.createElement(Oe.a,{value:1},"\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement(Oe.a,{value:2},"\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement(Oe.a,{value:3},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F",n.a.createElement("i",{onClick:function(kt){kt.stopPropagation(),kt.preventDefault(),ke(!0)},style:{marginLeft:10,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"}))))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:85,marginTop:35}},n.a.createElement(g.a,null,n.a.createElement("strong",null,"\u5173\u5361\u4EFB\u52A1\u5206\u503C\u8BBE\u7F6E\u89C4\u5219")),n.a.createElement(g.a,{flex:"1"},n.a.createElement("div",{className:"ml5"},n.a.createElement(Oe.a.Group,{disabled:rr,value:$e.shixun_evaluation,onChange:function(kt){$e.shixun_evaluation=kt.target.value,kt.target.value!==1&&($e.difficulty_level_sort="asc"),Yt(Object.assign({},$e)),Cn()}},n.a.createElement(Oe.a,{value:0},"\u5747\u5206\u6BD4\u4F8B"),n.a.createElement(Oe.a,{value:1},"\u96BE\u6613\u5EA6"),n.a.createElement(Oe.a,{value:2},"\u81EA\u5B9A\u4E49\u5206\u503C"))))),n.a.createElement(_.a,{style:{paddingLeft:343,marginTop:5,display:$e.shixun_evaluation===1?"flex":"none"}},n.a.createElement(Oe.a.Group,{disabled:rr,value:$e.difficulty_level_sort||"asc",onChange:function(kt){$e.difficulty_level_sort=kt.target.value,Yt(Object.assign({},$e)),Cn()}},n.a.createElement(Oe.a,{value:"asc"},"\u6B63\u5E8F\u8D4B\u5206"),n.a.createElement(Oe.a,{value:"desc"},"\u53CD\u5E8F\u8D4B\u5206"))),n.a.createElement(_.a,null,n.a.createElement(g.a,{style:{marginLeft:145,marginTop:15}},n.a.createElement("span",{className:"font16"},"\u5173\u5361\u540D\u79F0"),n.a.createElement("span",{className:"font14 ml5 c-orange"},Xn!=null&&Xn.task_pass?"(\u8BF7\u9009\u4E2D\u9700\u8981\u5B66\u751F\u5B8C\u6210\u7684\u5173\u5361\uFF0C\u8BE5\u5B9E\u8BAD\u652F\u6301\u8DF3\u5173\u5B66\u4E60)":"(\u8BE5\u5B9E\u8BAD\u4E0D\u652F\u6301\u8DF3\u5173\u5B66\u4E60)"))),$e.challenge_settings&&$e.challenge_settings.map(function(wt,kt){return n.a.createElement(_.a,{key:kt,align:"middle",style:{paddingLeft:275,marginTop:20}},n.a.createElement(g.a,{flex:"1"},n.a.createElement(Re.a,{disabled:rr||!(Xn!=null&&Xn.task_pass),checked:wt.checked,onChange:function(dn){var vt=Object(Ze.cloneDeep)($e.challenge_settings);if(vt[kt].checked=dn.target.checked,vt!=null&&vt.every(function(St){return!St.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}$e.challenge_settings[kt].checked=dn.target.checked,$e.challenge_settings[kt].hide=dn.target.checked,$e.shixun_evaluation===2&&!dn.target.checked&&($e.challenge_settings[kt].challenge_score=0),Yt(Object(R.a)({},$e)),Cn()}},n.a.createElement("strong",null,wt.challenge_name))),n.a.createElement(g.a,null,!wt.checked&&n.a.createElement("span",{className:"tag-style-border-small bg-orange border-raduis-50 c-white mr10"},"\u53EF\u4E0D\u505A")),n.a.createElement(g.a,{flex:"150px"},n.a.createElement(Q.a,{min:0,step:.1,value:wt.challenge_score,disabled:rr||$e.shixun_evaluation!==2||!wt.checked,onChange:function(dn){$e.challenge_settings[kt].challenge_score=dn,Yt(Object(R.a)({},$e))}}),n.a.createElement("span",{className:"ml10"},"\u5206")),n.a.createElement(g.a,{flex:"300px"},n.a.createElement("span",{className:"tag-style-border-small bg-green c-white mr10"},wt.difficulty),"\u91D1\u5E01\u5956\u52B1\u6570\uFF1A ",wt.challenge_exp))}),n.a.createElement(_.a,{className:"mt30",style:{paddingLeft:65}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"font16 c-black"},"\u67E5\u770B\u53C2\u8003\u7B54\u6848\u624D\u901A\u8FC7\u8BC4\u6D4B\u7684\u5173\u5361\u6263\u5206\u89C4\u5219"),n.a.createElement("span",{className:"font12 c-grey-c"},"\xA0(\u5B66\u751F\u901A\u8FC7\u8BC4\u6D4B\u540E\u518D\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF0C\u4E0D\u5BF9\u6210\u7EE9\u4EA7\u751F\u5F71\u54CD)"))),n.a.createElement(_.a,{style:{paddingLeft:65}},n.a.createElement(Oe.a.Group,{disabled:rr,value:$e.answer_open_evaluation,onChange:function(kt){$e.answer_open_evaluation=kt.target.value,Yt(Object(R.a)({},$e))}},n.a.createElement(Oe.a,{value:!1,style:{marginTop:15}},n.a.createElement("strong",null,"\u6309\u67E5\u770B\u7B54\u6848\u7EA7\u522B\u6263\u5206"),n.a.createElement("span",{className:"c-grey-c"},"(\u6839\u636E\u5B66\u5458\u9009\u62E9\u67E5\u770B\u7684\u5B9E\u8BAD\u7B54\u6848\u7EA7\u522B(\u89E3\u9898\u601D\u8DEF\u3001\u5B8C\u6574\u7B54\u6848)\uFF0C\u6263\u51CF\u76F8\u5E94\u7684\u5206\u503C)")),n.a.createElement("br",null),n.a.createElement(Oe.a,{value:!0,style:{marginTop:15}},n.a.createElement("strong",null,"\u4E0D\u6263\u5206")))),!rr&&n.a.createElement(g.a,{className:"mb50",style:{marginTop:"10px"}},n.a.createElement(U.a,{type:"primary",size:"large",loading:gr,onClick:function(){return un()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){wn(!0),Nt()}},"\u53D6\u6D88")),n.a.createElement(p.a,{visible:Xe,width:860,onCancel:function(){ke(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},n.a.createElement("div",{style:{color:"#333333",fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null," ","\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002"," "),n.a.createElement("br",null),n.a.createElement("span",null," ","\u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))))},Qn=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(on),Hn=function(hn){var pn,kn,cr=hn.shixunHomeworks,qn=hn.loading,Xn=hn.dispatch,Dn=Object(l.useState)(!0),hr=Object(a.a)(Dn,2),jn=hr[0],Jn=hr[1],rr=Object(l.useState)(!1),wn=Object(a.a)(rr,2),Er=wn[0],Sr=wn[1],gr=Object(l.useState)([]),sr=Object(a.a)(gr,2),re=sr[0],Le=sr[1],Xe=Object(l.useState)([]),ke=Object(a.a)(Xe,2),dt=ke[0],tt=ke[1],ht=Object(l.useState)([]),xt=Object(a.a)(ht,2),Rt=xt[0],st=xt[1],Kt=Object(l.useState)([]),Zt=Object(a.a)(Kt,2),Et=Zt[0],Vt=Zt[1],$e=Object(s.i)();function Yt(){return Nt.apply(this,arguments)}function Nt(){return Nt=Object(i.a)(h.a.mark(function wt(){var kt;return h.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(W.a)("/api/homework_commons/".concat($e.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:kt=dn.sent,tt(kt);case 4:case"end":return dn.stop()}},wt)})),Nt.apply(this,arguments)}function un(){return yn.apply(this,arguments)}function yn(){return yn=Object(i.a)(h.a.mark(function wt(){var kt;return h.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(W.a)("/api/courses/".concat($e==null?void 0:$e.coursesId,"/teachers"),{method:"get",params:{homework_id:$e.categoryId}});case 2:kt=dn.sent,kt==null||kt.teacher_list.map(function(vt){vt.key=vt.user_id}),st(kt==null?void 0:kt.teacher_list),Vt(kt==null?void 0:kt.teacher_list);case 6:case"end":return dn.stop()}},wt)})),yn.apply(this,arguments)}Object(l.useEffect)(function(){Yt(),un()},[$e]);var Cn=function(){};return n.a.createElement("section",{className:[jt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u534F\u4F5C\u8BBE\u7F6E"),(dt==null?void 0:dt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){Sr(!0)}},"+\u6DFB\u52A0\u534F\u4F5C\u8005"))),n.a.createElement(_.a,{style:{marginTop:"20px",marginBottom:"20px"}},(dt==null||((pn=dt.data)===null||pn===void 0)?void 0:pn.length)<=0&&n.a.createElement(gt.a,{customText:"\u8BE5\u4F5C\u4E1A\u6682\u65E0\u534F\u4F5C\u8005"}),dt==null||((kn=dt.data)===null||kn===void 0)?void 0:kn.map(function(wt){return n.a.createElement("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"}},n.a.createElement("span",{style:{flex:"1"}},wt==null?void 0:wt.real_name),(dt==null?void 0:dt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(i.a)(h.a.mark(function kt(){var mn;return h.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.next=2,Object(W.a)("/api/homework_commons/".concat($e.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:wt.id}});case 2:mn=vt.sent,mn.status===0&&(b.b.info("\u5220\u9664\u6210\u529F"),Yt(),un());case 4:case"end":return vt.stop()}},kt)}))},"X"))})),n.a.createElement(_.a,null,!jn&&n.a.createElement(g.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:function(){return Cn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Jn(!0)}},"\u53D6\u6D88"))),n.a.createElement(p.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:Er,onCancel:function(){return Sr(!1)},onOk:Object(i.a)(h.a.mark(function wt(){var kt;return h.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(!(re.length===0)){dn.next=3;break}return b.b.info("\u8BF7\u9009\u62E9\u534F\u4F5C\u8001\u5E08"),dn.abrupt("return");case 3:return dn.next=5,Object(W.a)("/api/homework_commons/".concat($e.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:re}});case 5:kt=dn.sent,kt.status===0&&(b.b.info("\u6DFB\u52A0\u6210\u529F"),Le([]),Yt(),un(),Sr(!1));case 7:case"end":return dn.stop()}},wt)}))},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(f.a.Search,{onChange:function(kt){st(Et.filter(function(mn){return mn.name.indexOf(kt.target.value)>-1}))}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(kt,mn){Le(kt)},selectedRowKeys:re,getCheckboxProps:function(kt){return{disabled:kt.is_collaborator}}},pagination:!1,dataSource:Rt,columns:[{title:"\u59D3\u540D",dataIndex:"name",key:"name"},{title:"\u89D2\u8272",dataIndex:"role",key:"role"}]}))))},nn=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(Hn),Un=At.a.RangePicker,ar=Se.a.Option,xn=function(hn){var pn=hn.shixunHomeworks,kn=hn.loading,cr=hn.dispatch;return n.a.createElement("section",{className:[jt.a.form," bg-white pl30 pt10"].join(" ")},n.a.createElement(F.a,null,n.a.createElement(F.a.TabPane,{tab:"\u53D1\u5E03\u8BBE\u7F6E",key:1},n.a.createElement(Gt.a,null)),n.a.createElement(F.a.TabPane,{tab:"\u8BC4\u5206\u8BBE\u7F6E",key:2},n.a.createElement(Qn,null)),n.a.createElement(F.a.TabPane,{tab:"\u516C\u5F00\u8BBE\u7F6E",key:3},n.a.createElement(Jt,null)),n.a.createElement(F.a.TabPane,{tab:"\u534F\u4F5C\u8BBE\u7F6E",key:4},n.a.createElement(nn,null))))},zn=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(xn),nr=M("lO7E"),Lr=M.n(nr),Cr=M("cVA7"),en=M.n(Cr),Yn=function(){var hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return console.log("---",hn,pn,kn),{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:["\u7B49\u7EA7A","\u7B49\u7EA7B","\u7B49\u7EA7C","\u7B49\u7EA7D","\u7B49\u7EA7E"]}],yAxis:[{type:"value"}],series:[{name:"\u7F3A\u9677",type:"bar",stack:"Ad",color:["#5c9ef7"],emphasis:{focus:"series"},data:kn},{name:"\u6F0F\u6D1E",type:"bar",stack:"Ad",color:["#75c87c"],emphasis:{focus:"series"},data:pn},{name:"\u4EE3\u7801\u89C4\u8303\u6027",type:"bar",stack:"Ad",color:["#f3d460"],emphasis:{focus:"series"},data:hn}]}},na=function(){var hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{dataset:[{source:hn}],tooltip:{show:!0,formatter:function(kn){return kn.value[2]+":"+kn.value[1]+"\u5206"}},xAxis:{splitLine:{lineStyle:{type:"dashed"}},show:!1},yAxis:{splitLine:{lineStyle:{type:"dashed"}}},series:[{name:"scatter",type:"scatter",datasetIndex:0},{name:"line",type:"line",smooth:!0,datasetIndex:1,symbolSize:.1,symbol:"circle",label:{show:!0,fontSize:16},labelLayout:{dx:-20},encode:{label:2,tooltip:1}}]}},Ea=function(hn){var pn,kn,cr,qn,Xn=hn.shixunHomeworks,Dn=hn.loading,hr=hn.dispatch,jn=Object(s.i)(),Jn=Object(l.useState)(Object(R.a)(Object(R.a)({},{sort_by:"student_id",sort_direction:"desc"}),jn)),rr=Object(a.a)(Jn,2),wn=rr[0],Er=rr[1],Sr=Object(l.useState)(),gr=Object(a.a)(Sr,2),sr=gr[0],re=gr[1],Le=Object(l.useState)([]),Xe=Object(a.a)(Le,2),ke=Xe[0],dt=Xe[1],tt=Object(l.useRef)(),ht=Object(l.useState)(1),xt=Object(a.a)(ht,2),Rt=xt[0],st=xt[1],Kt=Object(l.useState)(!1),Zt=Object(a.a)(Kt,2),Et=Zt[0],Vt=Zt[1],$e=Object(l.useState)(10),Yt=Object(a.a)($e,2),Nt=Yt[0],un=Yt[1],yn=Object(l.useState)([]),Cn=Object(a.a)(yn,2),wt=Cn[0],kt=Cn[1];Object(l.useEffect)(function(){dn()},[]);var mn=[{title:"\u5B66\u53F7",dataIndex:"student_number",sorter:!0,showSorterTooltip:!1,sortOrder:wn.sort_by==="student_number"?wn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u5206\u73ED",dataIndex:"group_course_name"},{title:"\u59D3\u540D",dataIndex:"user_name"},{title:"\u7F3A\u9677",children:[{title:"\u963B\u65AD",dataIndex:"bug",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.blocker)}},{title:"\u4E25\u91CD",dataIndex:"bug",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.critical)}},{title:"\u4E3B\u8981",dataIndex:"bug",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.major)}},{title:"\u6B21\u8981",dataIndex:"bug",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.minor)}},{title:"\u7B49\u7EA7",dataIndex:"bug",sorter:!1,showSorterTooltip:!1,sortOrder:wn.sort_by==="bug"?wn.sort_direction==="desc"?"descend":"ascend":null,render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.grade)}}]},{title:"\u6F0F\u6D1E",children:[{title:"\u963B\u65AD",dataIndex:"vulnerability",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.blocker)}},{title:"\u4E25\u91CD",dataIndex:"vulnerability",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.critical)}},{title:"\u4E3B\u8981",dataIndex:"vulnerability",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.major)}},{title:"\u6B21\u8981",dataIndex:"vulnerability",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.minor)}},{title:"\u7B49\u7EA7",dataIndex:"vulnerability",sorter:!1,showSorterTooltip:!1,sortOrder:wn.sort_by==="vulnerability"?wn.sort_direction==="desc"?"descend":"ascend":null,render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.grade)}}]},{title:"\u4EE3\u7801\u89C4\u8303\u6027",children:[{title:"\u963B\u65AD",dataIndex:"specification",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.blocker)}},{title:"\u4E25\u91CD",dataIndex:"specification",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.critical)}},{title:"\u4E3B\u8981",dataIndex:"specification",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.major)}},{title:"\u6B21\u8981",dataIndex:"specification",render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.minor)}},{title:"\u7B49\u7EA7",dataIndex:"specification",sorter:!1,showSorterTooltip:!1,sortOrder:wn.sort_by==="specification"?wn.sort_direction==="desc"?"descend":"ascend":null,render:function(ft){return n.a.createElement("span",{className:"current"},ft==null?void 0:ft.grade)}}]},{title:"\u590D\u6742\u4EE3\u7801",dataIndex:"complexity",sorter:!0,showSorterTooltip:!1,sortOrder:wn.sort_by==="complexity"?wn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u4EE3\u7801\u884C\u6570",dataIndex:"total_row_number",sorter:!0,showSorterTooltip:!1,sortOrder:wn.sort_by==="total_row_number"?wn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u8D28\u91CF\u8BC4\u5206",dataIndex:"quality_score",sorter:!0,showSorterTooltip:!1,sortOrder:wn.sort_by==="quality_score"?wn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u64CD\u4F5C",dataIndex:"action",align:"center",render:function(ft,gn){return n.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(jn.coursesId,"/shixun_homework/").concat(jn.categoryId,"/analysis/").concat(gn.id),className:"current c-light-primary"},"\u8BE6\u7EC6\u5206\u6790")}}];Object(l.useEffect)(function(){return sr===2&&(tt.current=setInterval(function(){dn()},6e4)),function(){clearTimeout(tt.current)}},[sr]);function dn(){return vt.apply(this,arguments)}function vt(){return vt=Object(i.a)(h.a.mark(function yt(){var ft;return h.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return Bt.next=2,Object(W.a)("/api/homework_commons/".concat(wn.categoryId,"/code_quality_analyses/check_status.json"),{method:"GET"});case 2:ft=Bt.sent,re(ft.status),ft.status!=2&&ft.status!=-1&&(St({page:1,limit:10}),clearTimeout(tt.current));case 5:case"end":return Bt.stop()}},yt)})),vt.apply(this,arguments)}function St(yt){return Ot.apply(this,arguments)}function Ot(){return Ot=Object(i.a)(h.a.mark(function yt(ft){var gn;return h.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return st(ft==null?void 0:ft.page),un(ft==null?void 0:ft.limit),vn.next=4,Object(W.a)("/api/homework_commons/".concat(wn.categoryId,"/code_quality_analyses.json"),{method:"GET",params:Object(R.a)({},ft)});case 4:gn=vn.sent,dt(gn);case 6:case"end":return vn.stop()}},yt)})),Ot.apply(this,arguments)}return console.log("-------",sr),n.a.createElement("section",{style:{paddingBottom:"10px"},className:"minH500 bg-white pl30 pr30 pt10"},(sr===0||sr===1)&&n.a.createElement("div",null,n.a.createElement("p",{style:{display:"flex"}},n.a.createElement("span",{style:{flex:"1"}},n.a.createElement("label",null,"\u68C0\u6D4B\u65F6\u95F4\uFF1A",ke==null?void 0:ke.created_at)),n.a.createElement(U.a,{onClick:function(){hr({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8D28\u91CF\u68C0\u6D4B"}})}},"\u91CD\u65B0\u68C0\u6D4B")),n.a.createElement("p",{style:{display:"flex"}},n.a.createElement(_.a,{style:{width:"100%"}},n.a.createElement(g.a,{flex:"80px"},n.a.createElement("label",null,"\u5206\u73ED\u60C5\u51B5:")),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(Re.a,{checked:(wt==null?void 0:wt.length)===0,onChange:function(ft){ft.target.checked&&(kt([]),St({page:Rt,limit:Nt}))},style:{fontSize:"14px"},value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},n.a.createElement(Re.a.Group,{value:wt,onChange:function(){var yt=Object(i.a)(h.a.mark(function ft(gn){return h.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:kt(Object(v.a)(gn)),St({page:Rt,limit:Nt,group_course_ids:gn});case 2:case"end":return vn.stop()}},ft)}));return function(ft){return yt.apply(this,arguments)}}(),style:{width:"100%",fontSize:"14px"}},ke==null||((pn=ke.course_groups)===null||pn===void 0)?void 0:pn.map(function(yt,ft){return n.a.createElement(Re.a,{style:{fontSize:"14px"},value:yt==null?void 0:yt.id},yt==null?void 0:yt.name,"(",yt==null?void 0:yt.count,")")}))))),n.a.createElement("p",{style:{display:"flex"}},n.a.createElement("span",null,n.a.createElement("label",{style:{color:"red"}},"\u6CE8\u610F\uFF1A")),"\u672C\u9875\u4EC5\u663E\u793A\u5168\u90E8\u5DF2\u5B8C\u6210\u68C0\u6D4B\u7684\u5206\u73ED"),n.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},n.a.createElement("div",null,n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"\u4EE3\u7801\u7B49\u7EA7\u5206\u6790"),(ke==null?void 0:ke.grade_statistics)&&n.a.createElement(en.a,{option:Yn(ke==null||((kn=ke.grade_statistics)===null||kn===void 0)?void 0:kn.map(function(yt){return yt.specification_count}),ke==null||((cr=ke.grade_statistics)===null||cr===void 0)?void 0:cr.map(function(yt){return yt.vulnerability_count}),ke==null||((qn=ke.grade_statistics)===null||qn===void 0)?void 0:qn.map(function(yt){return yt.bug_count})),style:{height:400,width:600},opts:{renderer:"svg"}})),n.a.createElement("div",null,n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"\u4EE3\u7801\u8D28\u91CF\u5206\u5E03"),(ke==null?void 0:ke.quality_scores)&&n.a.createElement(en.a,{option:na(ke==null?void 0:ke.quality_scores.map(function(yt,ft){return[ft+1,yt==null?void 0:yt.quality_score,yt==null?void 0:yt.user_name]})),style:{height:400,width:600},opts:{renderer:"svg"}}))),n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500,flex:"1"}},"\u8BE6\u7EC6\u5217\u8868"),n.a.createElement(f.a.Search,{size:"large",onSearch:function(ft){St({page:1,limit:Nt,search:ft})},style:{width:"300px"},enterButton:"\u641C\u7D22"})),n.a.createElement(B.a,{columns:mn,dataSource:ke==null?void 0:ke.analysis,bordered:!0,scroll:{x:"calc(800px + 50%)"},pagination:!1,onChange:function(ft,gn,Bt){Bt.field&&(wn.sort_by=Bt.field),Bt.order||(wn.sort_direction="asc"),Bt.order==="ascend"&&(wn.sort_direction="asc"),Bt.order==="descend"&&(wn.sort_direction="desc"),Bt.order||(wn.sort_direction="asc"),St(Object(R.a)({page:1,limit:Nt},wn))}}),n.a.createElement(w.a,{current:Rt,total:ke==null?void 0:ke.total_count,pageSizeOptions:["10","20","50","100","200"],pageSize:Nt,style:{textAlign:"center",marginTop:"20px",marginBottom:"20px"},onChange:function(ft,gn){st(ft),un(gn),St({page:ft,limit:gn,group_course_ids:wt})}}))),sr===2&&n.a.createElement("div",{style:{textAlign:"center",margin:"100px 0px",paddingBottom:"100px"}},n.a.createElement("img",{src:Lr.a}),n.a.createElement("br",null),n.a.createElement(U.a,{type:"primary",style:{width:"120px",height:"40px"},onClick:function(){dn()}},"\u5237\u65B0\u9875\u9762")),n.a.createElement(Me,null),n.a.createElement(p.a,{centered:!0,width:1200,title:"\u8BE6\u7EC6\u5206\u6790",destroyOnClose:!0,visible:!!Et,footer:null,onCancel:function(){return Vt(!1)}},n.a.createElement("div",{style:{height:500,overflow:"hidden"}},!!Et&&n.a.createElement("iframe",{style:{height:"100%",width:"100%"},src:"https://sonar.educoder.net/project/issues?id=".concat(jn==null?void 0:jn.categoryId,"-").concat(Et==null?void 0:Et.student_number,"&resolved=false"),frameBorder:"0"}))))},$r=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn.effects}})(Ea),Qr=M("RotF"),Jr=M.n(Qr),$n=function(hn){var pn,kn=hn.shixunHomeworks,cr=hn.loading,qn=hn.dispatch,Xn=Object(s.i)(),Dn=Object(s.h)(),hr=Object(l.useState)([]),jn=Object(a.a)(hr,2),Jn=jn[0],rr=jn[1],wn=Object(l.useState)([]),Er=Object(a.a)(wn,2),Sr=Er[0],gr=Er[1],sr=Object(l.useState)(!0),re=Object(a.a)(sr,2),Le=re[0],Xe=re[1],ke=Object(l.useState)(!1),dt=Object(a.a)(ke,2),tt=dt[0],ht=dt[1],xt=Object(l.useState)(1),Rt=Object(a.a)(xt,2),st=Rt[0],Kt=Rt[1],Zt=Object(l.useState)([]),Et=Object(a.a)(Zt,2),Vt=Et[0],$e=Et[1],Yt=Object(l.useState)(!1),Nt=Object(a.a)(Yt,2),un=Nt[0],yn=Nt[1],Cn=Object(l.useState)(!1),wt=Object(a.a)(Cn,2),kt=wt[0],mn=wt[1];Object(l.useEffect)(function(){kn.actionTabs.key==="\u4EE3\u7801\u67E5\u91CD"?(St.resetFields(),rr([]),yn(!0),yt()):yn(!1)},[kn.actionTabs.key]);var dn=We.a.useForm(),vt=Object(a.a)(dn,1),St=vt[0],Ot=[],yt=function(){var Bt=Object(i.a)(h.a.mark(function vn(){var qt,Ut,fn;return h.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(!(Le&&!tt)){ur.next=11;break}return ht(!0),Kt(st+1),ur.next=5,Object(te.x)(Object(R.a)(Object(R.a)({},Xn),{},{page:st}));case 5:Ut=ur.sent,fn=Object(v.a)(Ut.group_list),Ut!=null&&Ut.ungroup_list&&fn.push({id:Ut==null?void 0:Ut.ungroup_list.id,name:Ut==null?void 0:Ut.ungroup_list.name,works_count:Ut==null?void 0:Ut.ungroup_list.work_count,last_review_time:Ut==null?void 0:Ut.ungroup_list.last_review_time}),rr([].concat(Object(v.a)(Jn),Object(v.a)(fn))),ht(!1),((qt=Ut.group_list)===null||qt===void 0?void 0:qt.length)<10&&Xe(!1);case 11:case"end":return ur.stop()}},vn)}));return function(){return Bt.apply(this,arguments)}}(),ft=function(){qn({type:"shixunHomeworks/setActionTabs",payload:{}}),mn(!1),Xe(!0),ht(!1),Kt(1),rr([]),St.resetFields()},gn=[{title:"",dataIndex:"id",width:280,render:function(vn,qt){return n.a.createElement(Re.a,{disabled:!(qt.works_count>1),value:String(qt.id)},qt.name)}},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u4E0A\u6B21\u67E5\u91CD\u65F6\u95F4",dataIndex:"last_review_time",width:130}];return n.a.createElement(p.a,{centered:!0,title:"\u4EE3\u7801\u67E5\u91CD",keyboard:!1,maskClosable:!1,visible:un,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",width:820,bodyStyle:{minHeight:200},onOk:Object(i.a)(h.a.mark(function Bt(){var vn,qt;return h.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return vn=St.getFieldValue(),fn.next=3,Object(W.a)("/api/homework_commons/".concat(Xn.categoryId,"/homework_code_repeat.json"),{method:"post",body:{group_ids:Object(v.a)(vn.group_ids)}});case 3:if(qt=fn.sent,!(qt.status===0)){fn.next=11;break}return ft(),b.b.success("\u64CD\u4F5C\u6210\u529F"),fn.next=9,qn({type:"shixunHomeworks/getWorkList",payload:kn.actionTabs.params});case 9:E.d.push("/classrooms/".concat(Xn.coursesId,"/shixun_homework/").concat(Xn.categoryId,"/detail?tabs=2")),qn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6267\u884C\u4EE3\u7801\u67E5\u91CD"}});case 11:case"end":return fn.stop()}},Bt)})),onCancel:ft},kn.codeReviewCourse&&n.a.createElement(We.a,{form:St,onChange:function(vn){$e(Object(R.a)({},St.getFieldValue()))},initialValues:(pn={},Object(ut.a)(pn,"group_ids",Ot),Object(ut.a)(pn,"end_time",ce()(ce()().add(7,"days").format("YYYY-MM-DD HH:mm"))),pn)},n.a.createElement("div",{className:"flexd-table-header mt20"},n.a.createElement(B.a,{pagination:!1,dataSource:[],columns:gn})),n.a.createElement(We.a.Item,{name:"group_ids"},n.a.createElement(Re.a.Group,{className:"w100"},n.a.createElement("div",{style:{width:"100%",maxHeight:260,overflow:"auto"}},n.a.createElement(Jr.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(vn){yt()},hasMore:Le,useWindow:!1},n.a.createElement(B.a,{loading:cr.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:gn,dataSource:Jn,pagination:!1})))))),n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"ml10"},n.a.createElement(Re.a,{checked:kt,onChange:function(vn){mn(vn.target.checked);var qt=[];vn.target.checked&&(qt=Jn.filter(function(Ut){return Ut.works_count>1}).map(function(Ut){return Ut.id+""})),St.setFieldsValue(Object(ut.a)({},"group_ids",qt))}},"\u5168\u9009"))))},ma=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading;return{shixunHomeworks:hn,loading:pn}})($n),sn=M("R5GN"),oa=M("rhHp"),Xr=M("Aocz"),Ua=M.n(Xr),xa=M("HBuW"),ga=M("NLgs"),Ya=[{live:"A",gz:"0\u4E2A\u9519\u8BEF",ld:"0\u4E2A\u6F0F\u6D1E",gf:"0 - 5%"},{live:"B",gz:"\u81F3\u5C111\u4E2A\u6B21\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u6B21\u8981\u6F0F\u6D1E",gf:"6% - 10%"},{live:"C",gz:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u6F0F\u6D1E",gf:"11% - 20%"},{live:"D",gz:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u6F0F\u6D1E",gf:"21% - 50%"},{live:"E",gz:"\u81F3\u5C111\u4E2A\u963B\u65AD\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u963B\u65AD\u6F0F\u6D1E",gf:"\u8D85\u8FC750%"}],Ka=function(hn){var pn,kn,cr,qn,Xn,Dn,hr,jn,Jn,rr,wn=hn.shixunHomeworks,Er=hn.globalSetting,Sr=hn.loading,gr=hn.dispatch,sr=Object(s.i)(),re=Object(s.h)(),Le=Object(s.g)(),Xe=Object(l.useState)([]),ke=Object(a.a)(Xe,2),dt=ke[0],tt=ke[1],ht=Object(l.useState)(re.query.tabs||"0"),xt=Object(a.a)(ht,2),Rt=xt[0],st=xt[1],Kt=Object(l.useState)({}),Zt=Object(a.a)(Kt,2),Et=Zt[0],Vt=Zt[1],$e=wn.workList,Yt=Object(l.useState)(!1),Nt=Object(a.a)(Yt,2),un=Nt[0],yn=Nt[1],Cn;sr.category=re.query.category_id,sr.order="work_score",sr.b_order="desc";var wt=function(yt){st(yt),yt==="0"&&gr({type:"shixunHomeworks/getWorkList",payload:Et})},kt=function(){p.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u4F60\u5728\u8BE5\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A\uFF0C\u65E0\u6CD5\u6062\u590D",n.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u91CD\u505A\uFF1F"),onOk:function(){var yt=Object(i.a)(h.a.mark(function gn(){var Bt,vn,qt;return h.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return vn=(Bt=wn.workList)===null||Bt===void 0?void 0:Bt.myshixun_identifier,fn.next=3,Object(te.X)({id:vn});case 3:qt=fn.sent,qt&&(b.b.info(`\u5DF2\u6E05\u7A7A\u672C\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55
\u8BF7\u70B9\u51FB\u201C\u5F00\u542F\u6311\u6218\u201D\u91CD\u505A\u8BFE\u7A0B\u5B9E\u9A8C`),gr({type:"shixunHomeworks/getWorkList",payload:Et}));case 5:case"end":return fn.stop()}},gn)}));function ft(){return yt.apply(this,arguments)}return ft}()})},mn=function Ot(yt){var ft;yt=(ft=yt)!==null&&ft!==void 0&&ft.includes(".json")?yt:"".concat(yt,".json"),p.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var gn=Object(i.a)(h.a.mark(function vn(){var qt,Ut;return h.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(xa.Cb)({url:yt});case 2:if(qt=In.sent,qt){In.next=5;break}return In.abrupt("return");case 5:return b.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),In.next=8,Object(xa.E)({id:qt.shixun_identifier});case 8:if(Ut=In.sent,!(Ut!=null&&Ut.game_identifier)){In.next=12;break}return Object(T.S)("/tasks/".concat(Ut.game_identifier,"?coursesId=").concat(sr.coursesId)),In.abrupt("return");case 12:(Ut==null?void 0:Ut.status)===2?Ot(Ut==null?void 0:Ut.message):(Ut==null?void 0:Ut.status)===3&&dn(Ut==null?void 0:Ut.message);case 13:case"end":return In.stop()}},vn)}));function Bt(){return gn.apply(this,arguments)}return Bt}()})},dn=function(yt){p.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",yt,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},vt=function(){var Ot=Object(i.a)(h.a.mark(function yt(ft){var gn,Bt;return h.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return ft=(gn=ft)!==null&&gn!==void 0&&gn.includes(".json")?ft:"".concat(ft,".json"),qt.next=3,Object(xa.Cb)({url:ft});case 3:if(Bt=qt.sent,console.log(Bt,"execRes"),!(Bt!=null&&Bt.game_identifier)){qt.next=8;break}return Object(T.S)("/tasks/".concat(Bt.game_identifier,"?coursesId=").concat(sr.coursesId)),qt.abrupt("return");case 8:(Bt==null?void 0:Bt.status)===-3?Object(T.q)():(Bt==null?void 0:Bt.status)===2?mn(Bt==null?void 0:Bt.message):(Bt==null?void 0:Bt.status)===3&&dn(Bt==null?void 0:Bt.message);case 9:case"end":return qt.stop()}},yt)}));return function(ft){return Ot.apply(this,arguments)}}(),St=[{name:"\u4F5C\u4E1A\u5217\u8868",id:"0",compontent:n.a.createElement(Xt,{setExportParams:Vt}),forceRender:!0},{name:"\u4F5C\u4E1A\u63CF\u8FF0",id:"1",compontent:n.a.createElement($,null)},{name:"\u4EE3\u7801\u67E5\u91CD",id:"2",compontent:n.a.createElement(_t,null)},{name:"\u8D28\u91CF\u68C0\u6D4B",id:"4",compontent:n.a.createElement($r,null)},{name:Object(Z.c)()?"\u8BBE\u7F6E":"\u5F97\u5206\u89C4\u5219",id:"3",compontent:n.a.createElement(zn,null)}].filter(function(Ot){var yt;if(Object(Z.t)())return Ot.name!=="\u4EE3\u7801\u67E5\u91CD";if(Object(Z.t)()||($e==null||((yt=$e.homework_status)===null||yt===void 0)?void 0:yt[0])!=="\u5DF2\u622A\u6B62")return Ot.name!=="\u8D28\u91CF\u68C0\u6D4B";var ft;return!$e.code_review&&($e==null||((ft=$e.homework_status)===null||ft===void 0)?void 0:ft[0])!=="\u672A\u53D1\u5E03"?!0:Ot.name!=="\u4EE3\u7801\u67E5\u91CD"}).filter(function(Ot){return $e.open_code_quality_analysis?!0:Ot.name!=="\u8D28\u91CF\u68C0\u6D4B"});return n.a.createElement("section",null,n.a.createElement("div",{className:"edu-container"},$e.homework_name&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},$e.category&&n.a.createElement(y.a,{separator:">"},n.a.createElement(y.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework")},$e.course_name)),n.a.createElement(y.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework/").concat($e.category.main?"":$e.category.category_id)},$e.category.category_name)),n.a.createElement(y.a.Item,null,"\u4F5C\u4E1A\u8BE6\u60C5"))),n.a.createElement("aside",{className:[Ua.a.title,"mt20"].join(" ")},n.a.createElement(d.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework/").concat($e.category.main?"":$e.category.category_id)},n.a.createElement(D.a,{className:"font16 c-black"})),n.a.createElement(C.a,{title:$e.homework_name,placement:"bottom"},n.a.createElement("strong",{className:"font20 ml5"},$e.homework_name)),n.a.createElement(T.m,{temporary:!0,status:$e.homework_status}),Rt==="4"&&n.a.createElement("span",{className:"iconfont icon-a-wenhaobeifen2",onClick:function(){yn(!0)},style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"}},"\u89C4\u5219\u8BF4\u660E"))),n.a.createElement("aside",{className:"mt30 relative"},n.a.createElement("aside",{className:Ua.a.rightMenu},Object(Z.t)()&&((pn=wn.workList)===null||pn===void 0?void 0:pn.redo_work)&&n.a.createElement("p",{onClick:kt},n.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x"}),"\u91CD\u505A"),((kn=wn.workList)===null||kn===void 0?void 0:kn.shixun_status)>1&&((cr=wn.workList)===null||cr===void 0?void 0:cr.time_status)<5&&Object(Z.t)()&&n.a.createElement("p",{onClick:function(){var yt,ft,gn,Bt,vn,qt,Ut;if(!Object(ga.e)(gr,!0))return;(yt=wn.workList)!==null&&yt!==void 0&&(ft=yt.task_operation)!==null&&ft!==void 0&&(gn=ft[1])!==null&&gn!==void 0&&gn.includes("/")?vt((Bt=wn.workList)===null||Bt===void 0||((vn=Bt.task_operation)===null||vn===void 0)?void 0:vn[1]):Object(T.S)("/tasks/".concat((qt=wn.workList)===null||qt===void 0||((Ut=qt.task_operation)===null||Ut===void 0)?void 0:Ut[1]))}},n.a.createElement("span",{className:"iconfont icon-kaiqizhong"}),(qn=wn.workList)===null||qn===void 0||((Xn=qn.task_operation)===null||Xn===void 0)?void 0:Xn[0]),((Dn=wn.workList)===null||Dn===void 0?void 0:Dn.commit_des)&&n.a.createElement("p",{onClick:function(){var yt;Object(T.S)("/classrooms/".concat(sr.coursesId,"/shixun_homework/").concat(sr.categoryId,"/").concat((yt=wn.workList)===null||yt===void 0?void 0:yt.id,"/commitsummary"))}},n.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),(hr=wn.workList)===null||hr===void 0?void 0:hr.commit_des),Rt=="1"&&Object(Z.c)()&&n.a.createElement("p",{onClick:function(){gr({type:"shixunHomeworks/setActionTabs",payload:{key:"\u7F16\u8F91\u4F5C\u4E1A"}})}},n.a.createElement("span",{className:"iconfont icon-bianjishijuan3x translateY1"}),"\u7F16\u8F91\u4F5C\u4E1A"),Object(Z.c)()&&$e.publish_immediately&&n.a.createElement("p",{onClick:function(){gr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u53D1\u5E03",selectArrs:[sr.categoryId],selectArrsAll:[$e],params:sr,detail:!0,type:2}})}},n.a.createElement("span",{className:"iconfont icon-yishezhifabushijian1 translateY1"}),"\u7ACB\u5373\u53D1\u5E03"),!((jn=Er.setting)!==null&&jn!==void 0&&jn.hide_quality_analysis)&&((Jn=wn.workList)===null||Jn===void 0?void 0:Jn.show_analysis_detail)&&n.a.createElement("p",{onClick:function(){var yt;Object(T.S)("/classrooms/".concat(sr.coursesId,"/shixun_homework/").concat(sr.categoryId,"/analysis/").concat((yt=wn.workList)===null||yt===void 0?void 0:yt.analysis_id))}},n.a.createElement("span",{className:"iconfont icon-a-08zhiliang-xianxing font14 pr5"}),"\u8D28\u91CF\u8BC4\u5206"),((rr=wn.workList)===null||rr===void 0?void 0:rr.is_enter_shixun)&&n.a.createElement("p",{onClick:function(){Object(T.S)("/shixuns/".concat($e.shixun_identifier,"/challenges"))}},n.a.createElement("span",{className:"iconfont icon-shixun3 translateY1"}),"\u8FDB\u5165\u5B9E\u8BAD"),Object(Z.c)()&&$e.end_immediately&&n.a.createElement("p",{style:{background:"#0152d9",color:"#fff"},onClick:function(){gr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u622A\u6B62",params:sr,type:2,detail:!0,selectArrs:[sr.categoryId]}})}},n.a.createElement("span",{style:{color:"#fff"},className:"iconfont icon-jiezhishiyan"}),"\u7ACB\u5373\u622A\u6B62")),n.a.createElement(F.a,{defaultActiveKey:Rt,activeKey:Rt,onChange:wt,className:Ua.a.menuTabs},St.map(function(Ot,yt){return n.a.createElement(F.a.TabPane,{tab:Ot.name,key:Ot.id,forceRender:Ot.forceRender},Ot.compontent)})))),n.a.createElement(ma,null),n.a.createElement(sn.a,{courseEndTime:$e==null?void 0:$e.course_end_date}),n.a.createElement(oa.a,{courseEndTime:$e==null?void 0:$e.course_end_date}),n.a.createElement(p.a,{visible:un,title:"\u89C4\u5219\u8BF4\u660E",width:800,footer:null,onCancel:function(){yn(!1)}},n.a.createElement("p",null,"\u4E00\u3001\u7B49\u7EA7\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"1. \u7F3A\u9677\u7B49\u7EA7"),n.a.createElement("p",{style:{marginLeft:"10px"}},n.a.createElement(B.a,{dataSource:Ya,columns:[{title:"\u7B49\u7EA7",dataIndex:"live"},{title:"\u7F3A\u9677\u8BC4\u4F30\u89C4\u5219",dataIndex:"gz"},{title:"\u6F0F\u6D1E\u8BC4\u4F30\u89C4\u5219",dataIndex:"ld"},{title:"\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219",dataIndex:"gf"}],pagination:!1})),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219\u4E2D\u6570\u503C\u6765\u6E90\u4E3A\u8BA1\u7B97\u6280\u672F\u503A\u52A1\u65F6\u95F4\u5360\u5F00\u53D1\u6240\u6709\u4EE3\u7801\u6240\u9700\u8981\u7684\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF08Technical Debt Ratio\uFF09"),n.a.createElement("p",{style:{marginLeft:"20px"}},"Technical Debt Ratio = \u6280\u672F\u503A\u52A1\u65F6\u95F4 / \u5F00\u53D1\u65F6\u95F4"),n.a.createElement("p",{style:{marginLeft:"20px"}},"\u6280\u672F\u503A\u52A1\u65F6\u95F4\u4E3A\u4FEE\u590D\u6240\u6709\u95EE\u9898\u6240\u9700\u8981\u7684\u65F6\u95F4\u3002"),n.a.createElement("p",null,"\u4E8C\u3001\u590D\u6742\u5EA6\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6839\u636E\u4EE3\u7801\u8DEF\u5F84\u6570\u8BA1\u7B97\u7684\u6570\u503C\uFF0C\u6BCF\u5F53\u4E00\u4E2A\u51FD\u6570\u7684\u63A7\u5236\u6D41\u5206\u53C9\u65F6\uFF0C\u590D\u6742\u5EA6\u8BA1\u6570\u5668\u5C31\u4F1A\u81EA\u589E\u4E00\u3002"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6BCF\u4E2A\u7A0B\u5E8F\u8BED\u8A00\u7684\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u590D\u6742\u5EA6\u6570\u636E\u4E0D\u540C\uFF0C\u4F46\u6BCF\u4E2A\u51FD\u6570\u7684\u6700\u5C0F\u590D\u6742\u5EA6\u4E3A1\u3002\uFF08\u7279\u5B9A\u8BED\u8A00\u7684\u8BE6\u7EC6\u6570\u636E\u7565\uFF09"),n.a.createElement("p",null,"\u4E09\u3001\u4EE3\u7801\u8D28\u91CF\u5206\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u4EE3\u7801\u8D28\u91CF\u5206 = 0.5*\u7F3A\u9677\u5206\u6570 + 0.3*\u6F0F\u6D1E\u5206\u6570 + 0.2*\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u5176\u4E2D\uFF1A"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u7F3A\u9677/\u6F0F\u6D1E/\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570\u8BA1\u7B97\u89C4\u5219\u4E3A\uFF1A100 - 100 *((100*\u963B\u65AD\u6570 + 5*\u4E25\u91CD\u6570 + 3*\u4E3B\u8981\u6570 + 1*\u6B21\u6570\uFF09/ \u4EE3\u7801\u884C\u6570\uFF09"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u5206\u6570\u4E3A\u7A7A\u7684\u4EE3\u8868\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F\u3002")))},da=ee.default=Object(E.a)(function(Sn){var hn=Sn.shixunHomeworks,pn=Sn.loading,kn=Sn.globalSetting;return{shixunHomeworks:hn,globalSetting:kn,loading:pn.effects}})(Ka)},TXwP:function(ze,ee,M){var X,B;(function(){var I;(function(){"use strict";var S=[,,function(t){function b(p){this.__parent=p,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=[]}b.prototype.clone_empty=function(){var p=new b(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},b.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},b.prototype.has_match=function(p){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(p))return!0;return!1},b.prototype.set_indent=function(p,a){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(p){this.__items.push(p);var a=p.lastIndexOf(`
`);a!==-1?this.__character_count=p.length-a:this.__character_count+=p.length},b.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function i(p,a){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),a=a||"",p.indent_level>0&&(a=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}i.prototype.get_indent_size=function(p,a){var o=this.__base_string_length;return a=a||0,p<0&&(o=0),o+=p*this.__indent_size,o+=a,o},i.prototype.get_indent_string=function(p,a){var o=this.__base_string;return a=a||0,p<0&&(p=0,o=""),a+=p*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},i.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var p=this.__cache.length,a=0,o="";this.__indent_size&&p>=this.__indent_size&&(a=Math.floor(p/this.__indent_size),p-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),p&&(o+=new Array(p+1).join(" ")),this.__cache.push(o)};function u(p,a){this.__indent_cache=new i(p,a),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(p,a){return this.__indent_cache.get_indent_string(p,a)},u.prototype.get_indent_size=function(p,a){return this.__indent_cache.get_indent_size(p,a)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(p){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return p!==`
`&&(o=o.replace(/[\n]/g,p)),o},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(p,a){return p=p||0,a=a||0,this.next_line.set_indent(p,a),this.__lines.length>1?(this.current_line.set_indent(p,a),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(p){for(var a=0;a<p.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(p){for(var a=this.__lines.length;p<a;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&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},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(p,a){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(p)!==0&&h.item(-1)!==a){this.__lines.splice(o+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=u},,,,function(t){function b(p,a){this.raw_options=i(p,a),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"])}b.prototype._get_array=function(p,a){var o=this.raw_options[p],h=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},b.prototype._get_boolean=function(p,a){var o=this.raw_options[p],h=o===void 0?!!a:!!o;return h},b.prototype._get_characters=function(p,a){var o=this.raw_options[p],h=a||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},b.prototype._get_number=function(p,a){var o=this.raw_options[p];a=parseInt(a,10),isNaN(a)&&(a=0);var h=parseInt(o,10);return isNaN(h)&&(h=a),h},b.prototype._get_selection=function(p,a,o){var h=this._get_selection_list(p,a,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[p]+"'");return h[0]},b.prototype._get_selection_list=function(p,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var h=this._get_array(p,o);if(!this._is_valid_selection(h,a))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[p]+"'");return h},b.prototype._is_valid_selection=function(p,a){return p.length&&a.length&&!p.some(function(o){return a.indexOf(o)===-1})};function i(p,a){var o={};p=u(p);var h;for(h in p)h!==a&&(o[h]=p[h]);if(a&&p[a])for(h in p[a])o[h]=p[a][h];return o}function u(p){var a={},o;for(o in p){var h=o.replace(/-/g,"_");a[h]=p[o]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=i},,function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function i(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},i.prototype.peek=function(u){var p=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(p=this.__input.charAt(u)),p},i.prototype.__match=function(u,p){u.lastIndex=p;var a=u.exec(this.__input);return a&&!(b&&u.sticky)&&(a.index!==p&&(a=null)),a},i.prototype.test=function(u,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(u,p):!1},i.prototype.testChar=function(u,p){var a=this.peek(p);return u.lastIndex=0,a!==null&&u.test(a)},i.prototype.match=function(u){var p=this.__match(u,this.__position);return p?this.__position+=p[0].length:p=null,p},i.prototype.read=function(u,p,a){var o="",h;return u&&(h=this.match(u),h&&(o+=h[0])),p&&(h||!u)&&(o+=this.readUntil(p,a)),o},i.prototype.readUntil=function(u,p){var a="",o=this.__position;u.lastIndex=this.__position;var h=u.exec(this.__input);return h?(o=h.index,p&&(o+=h[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},i.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},i.prototype.get_regexp=function(u,p){var a=null,o="g";return p&&b&&(o="y"),typeof u=="string"&&u!==""?a=new RegExp(u,o):u&&(a=new RegExp(u.source,o)),a},i.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(u){var p=this.__position,a=this.readUntilAfter(u);return this.__position=p,a},i.prototype.lookBack=function(u){var p=this.__position-1;return p>=u.length&&this.__input.substring(p-u.length,p).toLowerCase()===u},t.exports.InputScanner=i},,,,,function(t){function b(i,u){i=typeof i=="string"?i:i.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(i);p;)u[p[1]]=p[2],p=this.__directive_pattern.exec(i);return u},b.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},,function(t,b,i){var u=i(16).Beautifier,p=i(17).Options;function a(o,h){var l=new u(o,h);return l.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new p}},function(t,b,i){var u=i(17).Options,p=i(2).Output,a=i(8).InputScanner,o=i(13).Directives,h=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,s=/\s/,d=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,D=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function T(k,w){this._source_text=k||"",this._options=new u(w),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"]}T.prototype.eatString=function(k){var w="";for(this._ch=this._input.next();this._ch;){if(w+=this._ch,this._ch==="\\")w+=this._input.next();else if(k.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return w},T.prototype.eatWhitespace=function(k){for(var w=s.test(this._input.peek()),v=0;s.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===`
`&&((v===0||v<this._options.max_preserve_newlines)&&(v++,this._output.add_new_line(!0)));return w},T.prototype.foundNestedPseudoClass=function(){for(var k=0,w=1,v=this._input.peek(w);v;){if(v==="{")return!0;if(v==="(")k+=1;else if(v===")"){if(k===0)return!1;k-=1}else if(v===";"||v==="}")return!1;w++,v=this._input.peek(w)}return!1},T.prototype.print_string=function(k){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(k)},T.prototype.preserveSingleSpace=function(k){k&&(this._output.space_before_token=!0)},T.prototype.indent=function(){this._indentLevel++},T.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,w=this._options.eol;w==="auto"&&(w=`
`,k&&l.test(k||"")&&(w=k.match(l)[0])),k=k.replace(n,`
`);var v=k.match(/^[\t ]*/)[0];this._output=new p(this._options,v),this._input=new a(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var c=0,f=!1,m=!1,_=!1,x=!1,g=!1,j=!1,U=this._ch,R=!1,W,H,L;W=this._input.read(d),H=W!=="",L=U,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),U=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(E),z=h.get_directives(G);z&&z.ignore==="start"&&(G+=h.readIgnored(this._input)),this.print_string(G),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(D)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(H),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var J=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);J.match(/[ :]$/)&&(J=this.eatString(": ").replace(/\s$/,""),this.print_string(J),this._output.space_before_token=!0),J=J.replace(/\s$/,""),J==="extend"?x=!0:J==="import"&&(g=!0),J in this.NESTED_AT_RULE?(this._nestedLevel+=1,J in this.CONDITIONAL_GROUP_RULE&&(_=!0)):!f&&c===0&&J.indexOf(":")!==-1&&(m=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")m&&(m=!1,this.outdent()),_?(_=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&(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)):(L==="("?this._output.space_before_token=!1:L!==","&&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(),L==="{"&&this._output.trim(!0),g=!1,x=!1,m&&(this.outdent(),m=!1),this.print_string(this._ch),f=!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 te=0;te<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;te++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[te])){R=!0;break}(f||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!x&&c===0?(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var _e=L==='"'||L==="'";this.preserveSingleSpace(_e||H),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")R=!1,c===0?(m&&(this.outdent(),m=!1),x=!1,g=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),c++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),c&&(c--,this.outdent()));else{var ce=!1;this._input.lookBack("with")&&(ce=!0),this.preserveSingleSpace(H||ce),this.print_string(this._ch),m&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),j=!0):(this.eatWhitespace(),c++,this.indent())}else if(this._ch===")")c&&(c--,this.outdent()),j&&this._input.peek()===";"&&this._options.selector_separator_newline&&(j=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!m||j)&&c===0&&!g&&!x?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!m&&c===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(H),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 xe=L==='"'||L==="'";this.preserveSingleSpace(xe||H),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&R&&this._output.add_new_line()}var Te=this._output.get_code(w);return Te},t.exports.Beautifier=T},function(t,b,i){var u=i(6).Options;function p(a){u.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l<h.length;l++)h[l]!=="expand"?this.brace_style="collapse":this.brace_style=h[l]}p.prototype=new u,t.exports.Options=p}],C={};function P(t){var b=C[t];if(b!==void 0)return b.exports;var i=C[t]={exports:{}};return S[t](i,i.exports,P),i.exports}var y=P(15);I=y})();var F=I;!(X=[],B=function(){return{css_beautify:F}}.apply(ee,X),B!==void 0&&(ze.exports=B))})()},Vhoy:function(ze,ee,M){"use strict";M.d(ee,"d",function(){return F}),M.d(ee,"e",function(){return S}),M.d(ee,"c",function(){return C}),M.d(ee,"b",function(){return P}),M.d(ee,"a",function(){return y});var X=M("MI8n");class B{constructor(){this._icons=new Map,this._onDidRegister=new X.b}add(t){const b=this._icons.get(t.id);b?t.description?b.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const I=new B,F=I;function S(t,b){return new P(t,b)}function C(t){return t?t.replace(/\$\((.*?)\)/g,(b,i)=>` ${i} `).trim():""}class P{constructor(t,b,i){this.id=t,this.definition=b,this.description=i,I.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var y;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const b=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function i(a){if(a instanceof P)return["codicon","codicon-"+a.id];const o=b.exec(a.id);if(!o)return i(P.error);let[,h,l]=o;const n=["codicon","codicon-"+h];return l&&n.push("codicon-modifier-"+l.substr(1)),n}t.asClassNameArray=i;function u(a){return i(a).join(" ")}t.asClassName=u;function p(a){return"."+i(a).join(".")}t.asCSSSelector=p})(y||(y={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(P||(P={}))},VpOo:function(ze,ee){function M(X,B){var I=B.x,F=B.y,S=B.width,C=B.height,P=B.r,y,t,b,i;S<0&&(I=I+S,S=-S),C<0&&(F=F+C,C=-C),typeof P=="number"?y=t=b=i=P:P instanceof Array?P.length===1?y=t=b=i=P[0]:P.length===2?(y=b=P[0],t=i=P[1]):P.length===3?(y=P[0],t=i=P[1],b=P[2]):(y=P[0],t=P[1],b=P[2],i=P[3]):y=t=b=i=0;var u;y+t>S&&(u=y+t,y*=S/u,t*=S/u),b+i>S&&(u=b+i,b*=S/u,i*=S/u),t+b>C&&(u=t+b,t*=C/u,b*=C/u),y+i>C&&(u=y+i,y*=C/u,i*=C/u),X.moveTo(I+y,F),X.lineTo(I+S-t,F),t!==0&&X.arc(I+S-t,F+t,t,-Math.PI/2,0),X.lineTo(I+S,F+C-b),b!==0&&X.arc(I+S-b,F+C-b,b,0,Math.PI/2),X.lineTo(I+i,F+C),i!==0&&X.arc(I+i,F+C-i,i,Math.PI/2,Math.PI),X.lineTo(I,F+y),y!==0&&X.arc(I+y,F+y,y,Math.PI,Math.PI*1.5)}ee.buildPath=M},"VrN/":function(ze,ee,M){(function(X,B){ze.exports=B()})(this,function(){"use strict";var X=navigator.userAgent,B=navigator.platform,I=/gecko\/\d/i.test(X),F=/MSIE \d/.test(X),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(X),C=/Edge\/(\d+)/.exec(X),P=F||S||C,y=P&&(F?document.documentMode||6:+(C||S)[1]),t=!C&&/WebKit\//.test(X),b=t&&/Qt\/\d+\.\d+/.test(X),i=!C&&/Chrome\//.test(X),u=/Opera\//.test(X),p=/Apple Computer/.test(navigator.vendor),a=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(X),o=/PhantomJS/.test(X),h=!C&&/AppleWebKit/.test(X)&&/Mobile\/\w+/.test(X),l=/Android/.test(X),n=h||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(X),s=h||/Mac/.test(B),d=/\bCrOS\b/.test(X),E=/win/i.test(B),D=u&&X.match(/Version\/(\d*\.\d*)/);D&&(D=Number(D[1])),D&&D>=15&&(u=!1,t=!0);var T=s&&(b||u&&(D==null||D<12.11)),k=I||P&&y>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var v=function(e,r){var A=e.className,O=w(r).exec(A);if(O){var N=A.slice(O.index+O[0].length);e.className=A.slice(0,O.index)+(N?O[1]+N:"")}};function c(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function f(e,r){return c(e).appendChild(r)}function m(e,r,A,O){var N=document.createElement(e);if(A&&(N.className=A),O&&(N.style.cssText=O),typeof r=="string")N.appendChild(document.createTextNode(r));else if(r)for(var Y=0;Y<r.length;++Y)N.appendChild(r[Y]);return N}function _(e,r,A,O){var N=m(e,r,A,O);return N.setAttribute("role","presentation"),N}var x;document.createRange?x=function(e,r,A,O){var N=document.createRange();return N.setEnd(O||e,A),N.setStart(e,r),N}:x=function(e,r,A){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(N){return O}return O.collapse(!0),O.moveEnd("character",A),O.moveStart("character",r),O};function g(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function j(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function U(e,r){var A=e.className;w(r).test(A)||(e.className+=(A?" ":"")+r)}function R(e,r){for(var A=e.split(" "),O=0;O<A.length;O++)A[O]&&!w(A[O]).test(r)&&(r+=" "+A[O]);return r}var W=function(e){e.select()};h?W=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:P&&(W=function(e){try{e.select()}catch(r){}});function H(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function L(e,r,A){r||(r={});for(var O in e)e.hasOwnProperty(O)&&(A!==!1||!r.hasOwnProperty(O))&&(r[O]=e[O]);return r}function G(e,r,A,O,N){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var Y=O||0,ne=N||0;;){var ue=e.indexOf(" ",Y);if(ue<0||ue>=r)return ne+(r-Y);ne+=ue-Y,ne+=A-ne%A,Y=ue+1}}var z=function(){this.id=null,this.f=null,this.time=0,this.handler=H(this.onTimeout,this)};z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,r){this.f=r;var A=+new Date+e;(!this.id||A<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=A)};function J(e,r){for(var A=0;A<e.length;++A)if(e[A]==r)return A;return-1}var te=50,_e={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},xe={origin:"*mouse"},Te={origin:"+move"};function je(e,r,A){for(var O=0,N=0;;){var Y=e.indexOf(" ",O);Y==-1&&(Y=e.length);var ne=Y-O;if(Y==e.length||N+ne>=r)return O+Math.min(ne,r-N);if(N+=Y-O,N+=A-N%A,O=Y+1,N>=r)return O}}var Ce=[""];function Z(e){for(;Ce.length<=e;)Ce.push(K(Ce)+" ");return Ce[e]}function K(e){return e[e.length-1]}function V(e,r){for(var A=[],O=0;O<e.length;O++)A[O]=r(e[O],O);return A}function $(e,r,A){for(var O=0,N=A(r);O<e.length&&A(e[O])<=N;)O++;e.splice(O,0,r)}function q(){}function Q(e,r){var A;return Object.create?A=Object.create(e):(q.prototype=e,A=new q),r&&L(r,A),A}var ge=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Oe(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ge.test(e))}function Ye(e,r){return r?r.source.indexOf("\\w")>-1&&Oe(e)?!0:r.test(e):Oe(e)}function le(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Ee=/[\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 Re(e){return e.charCodeAt(0)>=768&&Ee.test(e)}function He(e,r,A){for(;(A<0?r>0:r<e.length)&&Re(e.charAt(r));)r+=A;return r}function et(e,r,A){for(var O=r>A?-1:1;;){if(r==A)return r;var N=(r+A)/2,Y=O<0?Math.ceil(N):Math.floor(N);if(Y==r)return e(Y)?r:A;e(Y)?A=Y:r=Y+O}}function ut(e,r,A,O){if(!e)return O(r,A,"ltr",0);for(var N=!1,Y=0;Y<e.length;++Y){var ne=e[Y];(ne.from<A&&ne.to>r||r==A&&ne.to==r)&&(O(Math.max(ne.from,r),Math.min(ne.to,A),ne.level==1?"rtl":"ltr",Y),N=!0)}N||O(r,A,"ltr")}var Dt=null;function We(e,r,A){var O;Dt=null;for(var N=0;N<e.length;++N){var Y=e[N];if(Y.from<r&&Y.to>r)return N;Y.to==r&&(Y.from!=Y.to&&A=="before"?O=N:Dt=N),Y.from==r&&(Y.from!=Y.to&&A!="before"?O=N:Dt=N)}return O!=null?O:Dt}var Mt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function A(ye){return ye<=247?e.charAt(ye):1424<=ye&&ye<=1524?"R":1536<=ye&&ye<=1785?r.charAt(ye-1536):1774<=ye&&ye<=2220?"r":8192<=ye&&ye<=8203?"w":ye==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,N=/[stwN]/,Y=/[LRr]/,ne=/[Lb1n]/,ue=/[1n]/;function he(ye,Ge,Je){this.level=ye,this.from=Ge,this.to=Je}return function(ye,Ge){var Je=Ge=="ltr"?"L":"R";if(ye.length==0||Ge=="ltr"&&!O.test(ye))return!1;for(var Ct=ye.length,bt=[],Qt=0;Qt<Ct;++Qt)bt.push(A(ye.charCodeAt(Qt)));for(var ln=0,En=Je;ln<Ct;++ln){var On=bt[ln];On=="m"?bt[ln]=En:En=On}for(var Bn=0,Rn=Je;Bn<Ct;++Bn){var Vn=bt[Bn];Vn=="1"&&Rn=="r"?bt[Bn]="n":Y.test(Vn)&&(Rn=Vn,Vn=="r"&&(bt[Bn]="R"))}for(var dr=1,or=bt[0];dr<Ct-1;++dr){var wr=bt[dr];wr=="+"&&or=="1"&&bt[dr+1]=="1"?bt[dr]="1":wr==","&&or==bt[dr+1]&&(or=="1"||or=="n")&&(bt[dr]=or),or=wr}for(var qr=0;qr<Ct;++qr){var Na=bt[qr];if(Na==",")bt[qr]="N";else if(Na=="%"){var ua=void 0;for(ua=qr+1;ua<Ct&&bt[ua]=="%";++ua);for(var ii=qr&&bt[qr-1]=="!"||ua<Ct&&bt[ua]=="1"?"1":"N",ti=qr;ti<ua;++ti)bt[ti]=ii;qr=ua-1}}for(var Sa=0,ni=Je;Sa<Ct;++Sa){var Ha=bt[Sa];ni=="L"&&Ha=="1"?bt[Sa]="L":Y.test(Ha)&&(ni=Ha)}for(var La=0;La<Ct;++La)if(N.test(bt[La])){var Oa=void 0;for(Oa=La+1;Oa<Ct&&N.test(bt[Oa]);++Oa);for(var pa=(La?bt[La-1]:Je)=="L",ri=(Oa<Ct?bt[Oa]:Je)=="L",So=pa==ri?pa?"L":"R":Je,to=La;to<Oa;++to)bt[to]=So;La=Oa-1}for(var za=[],Li,ja=0;ja<Ct;)if(ne.test(bt[ja])){var ms=ja;for(++ja;ja<Ct&&ne.test(bt[ja]);++ja);za.push(new he(0,ms,ja))}else{var Ki=ja,lo=za.length,uo=Ge=="rtl"?1:0;for(++ja;ja<Ct&&bt[ja]!="L";++ja);for(var Xa=Ki;Xa<ja;)if(ue.test(bt[Xa])){Ki<Xa&&(za.splice(lo,0,new he(1,Ki,Xa)),lo+=uo);var Oo=Xa;for(++Xa;Xa<ja&&ue.test(bt[Xa]);++Xa);za.splice(lo,0,new he(2,Oo,Xa)),lo+=uo,Ki=Xa}else++Xa;Ki<ja&&za.splice(lo,0,new he(1,Ki,ja))}return Ge=="ltr"&&(za[0].level==1&&(Li=ye.match(/^\s+/))&&(za[0].from=Li[0].length,za.unshift(new he(0,0,Li[0].length))),K(za).level==1&&(Li=ye.match(/\s+$/))&&(K(za).to-=Li[0].length,za.push(new he(0,Ct-Li[0].length,Ct)))),Ge=="rtl"?za.reverse():za}}();function Wt(e,r){var A=e.order;return A==null&&(A=e.order=Mt(e.text,r)),A}var Ne=[],Pe=function(e,r,A){if(e.addEventListener)e.addEventListener(r,A,!1);else if(e.attachEvent)e.attachEvent("on"+r,A);else{var O=e._handlers||(e._handlers={});O[r]=(O[r]||Ne).concat(A)}};function it(e,r){return e._handlers&&e._handlers[r]||Ne}function gt(e,r,A){if(e.removeEventListener)e.removeEventListener(r,A,!1);else if(e.detachEvent)e.detachEvent("on"+r,A);else{var O=e._handlers,N=O&&O[r];if(N){var Y=J(N,A);Y>-1&&(O[r]=N.slice(0,Y).concat(N.slice(Y+1)))}}}function fe(e,r){var A=it(e,r);if(!A.length)return;for(var O=Array.prototype.slice.call(arguments,2),N=0;N<A.length;++N)A[N].apply(null,O)}function ae(e,r,A){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),fe(e,A||r.type,e,r),pe(r)||r.codemirrorIgnore}function se(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var A=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<r.length;++O)J(A,r[O])==-1&&A.push(r[O])}function de(e,r){return it(e,r).length>0}function ve(e){e.prototype.on=function(r,A){Pe(this,r,A)},e.prototype.off=function(r,A){gt(this,r,A)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function oe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function pe(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function we(e){ie(e),oe(e)}function Ae(e){return e.target||e.srcElement}function Me(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),s&&e.ctrlKey&&r==1&&(r=3),r}var rt=function(){if(P&&y<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),Pt;function Xt(e){if(Pt==null){var r=m("span","\u200B");f(e,m("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Pt=r.offsetWidth<=1&&r.offsetHeight>2&&!(P&&y<8))}var A=Pt?m("span","\u200B"):m("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return A.setAttribute("cm-text",""),A}var lt;function zt(e){if(lt!=null)return lt;var r=f(e,document.createTextNode("A\u062EA")),A=x(r,0,1).getBoundingClientRect(),O=x(r,1,2).getBoundingClientRect();return c(e),!A||A.left==A.right?!1:lt=O.right-A.right<3}var mt=`
b`.split(/\n/).length!=3?function(e){for(var r=0,A=[],O=e.length;r<=O;){var N=e.indexOf(`
`,r);N==-1&&(N=e.length);var Y=e.slice(r,e.charAt(N-1)=="\r"?N-1:N),ne=Y.indexOf("\r");ne!=-1?(A.push(Y.slice(0,ne)),r+=ne+1):(A.push(Y),r=N+1)}return A}:function(e){return e.split(/\r\n?|\n/)},_t=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(A){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},ot=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Se=null;function Ue(e){if(Se!=null)return Se;var r=f(e,m("span","x")),A=r.getBoundingClientRect(),O=x(r,0,1).getBoundingClientRect();return Se=Math.abs(A.left-O.left)>1}var At={},pt={};function jt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),At[e]=r}function Gt(e,r){pt[e]=r}function Ze(e){if(typeof e=="string"&&pt.hasOwnProperty(e))e=pt[e];else if(e&&typeof e.name=="string"&&pt.hasOwnProperty(e.name)){var r=pt[e.name];typeof r=="string"&&(r={name:r}),e=Q(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ze("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ze("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function at(e,r){r=Ze(r);var A=At[r.name];if(!A)return at(e,"text/plain");var O=A(e,r);if(Tt.hasOwnProperty(r.name)){var N=Tt[r.name];for(var Y in N){if(!N.hasOwnProperty(Y))continue;O.hasOwnProperty(Y)&&(O["_"+Y]=O[Y]),O[Y]=N[Y]}}if(O.name=r.name,r.helperType&&(O.helperType=r.helperType),r.modeProps)for(var ne in r.modeProps)O[ne]=r.modeProps[ne];return O}var Tt={};function Ht(e,r){var A=Tt.hasOwnProperty(e)?Tt[e]:Tt[e]={};L(r,A)}function Jt(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var A={};for(var O in r){var N=r[O];N instanceof Array&&(N=N.concat([])),A[O]=N}return A}function on(e,r){for(var A;e.innerMode&&!(A=e.innerMode(r),!A||A.mode==e);)r=A.state,e=A.mode;return A||{mode:e,state:r}}function Qn(e,r,A){return e.startState?e.startState(r,A):!0}var Hn=function(e,r,A){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=A};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.pos<this.string.length)return this.string.charAt(this.pos++)},Hn.prototype.eat=function(e){var r=this.string.charAt(this.pos),A;if(typeof e=="string"?A=r==e:A=r&&(e.test?e.test(r):e(r)),A)return++this.pos,r},Hn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},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 r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},Hn.prototype.backUp=function(e){this.pos-=e},Hn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Hn.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Hn.prototype.match=function(e,r,A){if(typeof e=="string"){var O=function(ne){return A?ne.toLowerCase():ne},N=this.string.substr(this.pos,e.length);if(O(N)==O(e))return r!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?null:(Y&&r!==!1&&(this.pos+=Y[0].length),Y)}},Hn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Hn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},Hn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},Hn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function nn(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var A=e;!A.lines;)for(var O=0;;++O){var N=A.children[O],Y=N.chunkSize();if(r<Y){A=N;break}r-=Y}return A.lines[r]}function Un(e,r,A){var O=[],N=r.line;return e.iter(r.line,A.line+1,function(Y){var ne=Y.text;N==A.line&&(ne=ne.slice(0,A.ch)),N==r.line&&(ne=ne.slice(r.ch)),O.push(ne),++N}),O}function ar(e,r,A){var O=[];return e.iter(r,A,function(N){O.push(N.text)}),O}function xn(e,r){var A=r-e.height;if(A)for(var O=e;O;O=O.parent)O.height+=A}function zn(e){if(e.parent==null)return null;for(var r=e.parent,A=J(r.lines,e),O=r.parent;O;r=O,O=O.parent)for(var N=0;!(O.children[N]==r);++N)A+=O.children[N].chunkSize();return A+r.first}function nr(e,r){var A=e.first;e:do{for(var O=0;O<e.children.length;++O){var N=e.children[O],Y=N.height;if(r<Y){e=N;continue e}r-=Y,A+=N.chunkSize()}return A}while(!e.lines);for(var ne=0;ne<e.lines.length;++ne){var ue=e.lines[ne],he=ue.height;if(r<he)break;r-=he}return A+ne}function Lr(e,r){return r>=e.first&&r<e.first+e.size}function Cr(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function en(e,r,A){if(A===void 0&&(A=null),!(this instanceof en))return new en(e,r,A);this.line=e,this.ch=r,this.sticky=A}function Yn(e,r){return e.line-r.line||e.ch-r.ch}function na(e,r){return e.sticky==r.sticky&&Yn(e,r)==0}function Ea(e){return en(e.line,e.ch)}function $r(e,r){return Yn(e,r)<0?r:e}function Qr(e,r){return Yn(e,r)<0?e:r}function Jr(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function $n(e,r){if(r.line<e.first)return en(e.first,0);var A=e.first+e.size-1;return r.line>A?en(A,nn(e,A).text.length):ma(r,nn(e,r.line).text.length)}function ma(e,r){var A=e.ch;return A==null||A>r?en(e.line,r):A<0?en(e.line,0):e}function sn(e,r){for(var A=[],O=0;O<r.length;O++)A[O]=$n(e,r[O]);return A}var oa=function(e,r){this.state=e,this.lookAhead=r},Xr=function(e,r,A,O){this.state=r,this.doc=e,this.line=A,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};Xr.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Xr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xr.fromSaved=function(e,r,A){return r instanceof oa?new Xr(e,Jt(e.mode,r.state),A,r.lookAhead):new Xr(e,Jt(e.mode,r),A)},Xr.prototype.save=function(e){var r=e!==!1?Jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new oa(r,this.maxLookAhead):r};function Ua(e,r,A,O){var N=[e.state.modeGen],Y={};kn(e,r.text,e.doc.mode,A,function(ye,Ge){return N.push(ye,Ge)},Y,O);for(var ne=A.state,ue=function(ye){A.baseTokens=N;var Ge=e.state.overlays[ye],Je=1,Ct=0;A.state=!0,kn(e,r.text,Ge.mode,A,function(bt,Qt){for(var ln=Je;Ct<bt;){var En=N[Je];En>bt&&N.splice(Je,1,bt,N[Je+1],En),Je+=2,Ct=Math.min(bt,En)}if(!Qt)return;if(Ge.opaque)N.splice(ln,Je-ln,bt,"overlay "+Qt),Je=ln+2;else for(;ln<Je;ln+=2){var On=N[ln+1];N[ln+1]=(On?On+" ":"")+"overlay "+Qt}},Y),A.state=ne,A.baseTokens=null,A.baseTokenPos=1},he=0;he<e.state.overlays.length;++he)ue(he);return{styles:N,classes:Y.bgClass||Y.textClass?Y:null}}function xa(e,r,A){if(!r.styles||r.styles[0]!=e.state.modeGen){var O=ga(e,zn(r)),N=r.text.length>e.options.maxHighlightLength&&Jt(e.doc.mode,O.state),Y=Ua(e,r,O);N&&(O.state=N),r.stateAfter=O.save(!N),r.styles=Y.styles,Y.classes?r.styleClasses=Y.classes:r.styleClasses&&(r.styleClasses=null),A===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function ga(e,r,A){var O=e.doc,N=e.display;if(!O.mode.startState)return new Xr(O,!0,r);var Y=cr(e,r,A),ne=Y>O.first&&nn(O,Y-1).stateAfter,ue=ne?Xr.fromSaved(O,ne,Y):new Xr(O,Qn(O.mode),Y);return O.iter(Y,r,function(he){Ya(e,he.text,ue);var ye=ue.line;he.stateAfter=ye==r-1||ye%5==0||ye>=N.viewFrom&&ye<N.viewTo?ue.save():null,ue.nextLine()}),A&&(O.modeFrontier=ue.line),ue}function Ya(e,r,A,O){var N=e.doc.mode,Y=new Hn(r,e.options.tabSize,A);for(Y.start=Y.pos=O||0,r==""&&Ka(N,A.state);!Y.eol();)da(N,Y,A.state),Y.start=Y.pos}function Ka(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var A=on(e,r);if(A.mode.blankLine)return A.mode.blankLine(A.state)}function da(e,r,A,O){for(var N=0;N<10;N++){O&&(O[0]=on(e,A).mode);var Y=e.token(r,A);if(r.pos>r.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var Sn=function(e,r,A){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=A};function hn(e,r,A,O){var N=e.doc,Y=N.mode,ne;r=$n(N,r);var ue=nn(N,r.line),he=ga(e,r.line,A),ye=new Hn(ue.text,e.options.tabSize,he),Ge;for(O&&(Ge=[]);(O||ye.pos<r.ch)&&!ye.eol();)ye.start=ye.pos,ne=da(Y,ye,he.state),O&&Ge.push(new Sn(ye,ne,Jt(N.mode,he.state)));return O?Ge:new Sn(ye,ne,he.state)}function pn(e,r){if(e)for(;;){var A=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!A)break;e=e.slice(0,A.index)+e.slice(A.index+A[0].length);var O=A[1]?"bgClass":"textClass";r[O]==null?r[O]=A[2]:new RegExp("(?:^|\\s)"+A[2]+"(?:$|\\s)").test(r[O])||(r[O]+=" "+A[2])}return e}function kn(e,r,A,O,N,Y,ne){var ue=A.flattenSpans;ue==null&&(ue=e.options.flattenSpans);var he=0,ye=null,Ge=new Hn(r,e.options.tabSize,O),Je,Ct=e.options.addModeClass&&[null];for(r==""&&pn(Ka(A,O.state),Y);!Ge.eol();){if(Ge.pos>e.options.maxHighlightLength?(ue=!1,ne&&Ya(e,r,O,Ge.pos),Ge.pos=r.length,Je=null):Je=pn(da(A,Ge,O.state,Ct),Y),Ct){var bt=Ct[0].name;bt&&(Je="m-"+(Je?bt+" "+Je:bt))}if(!ue||ye!=Je){for(;he<Ge.start;)he=Math.min(Ge.start,he+5e3),N(he,ye);ye=Je}Ge.start=Ge.pos}for(;he<Ge.pos;){var Qt=Math.min(Ge.pos,he+5e3);N(Qt,ye),he=Qt}}function cr(e,r,A){for(var O,N,Y=e.doc,ne=A?-1:r-(e.doc.mode.innerMode?1e3:100),ue=r;ue>ne;--ue){if(ue<=Y.first)return Y.first;var he=nn(Y,ue-1),ye=he.stateAfter;if(ye&&(!A||ue+(ye instanceof oa?ye.lookAhead:0)<=Y.modeFrontier))return ue;var Ge=G(he.text,null,e.options.tabSize);(N==null||O>Ge)&&(N=ue-1,O=Ge)}return N}function qn(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var A=e.first,O=r-1;O>A;O--){var N=nn(e,O).stateAfter;if(N&&(!(N instanceof oa)||O+N.lookAhead<r)){A=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,A)}var Xn=!1,Dn=!1;function hr(){Xn=!0}function jn(){Dn=!0}function Jn(e,r,A){this.marker=e,this.from=r,this.to=A}function rr(e,r){if(e)for(var A=0;A<e.length;++A){var O=e[A];if(O.marker==r)return O}}function wn(e,r){for(var A,O=0;O<e.length;++O)e[O]!=r&&(A||(A=[])).push(e[O]);return A}function Er(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Sr(e,r,A){var O;if(e)for(var N=0;N<e.length;++N){var Y=e[N],ne=Y.marker,ue=Y.from==null||(ne.inclusiveLeft?Y.from<=r:Y.from<r);if(ue||Y.from==r&&ne.type=="bookmark"&&(!A||!Y.marker.insertLeft)){var he=Y.to==null||(ne.inclusiveRight?Y.to>=r:Y.to>r);(O||(O=[])).push(new Jn(ne,Y.from,he?null:Y.to))}}return O}function gr(e,r,A){var O;if(e)for(var N=0;N<e.length;++N){var Y=e[N],ne=Y.marker,ue=Y.to==null||(ne.inclusiveRight?Y.to>=r:Y.to>r);if(ue||Y.from==r&&ne.type=="bookmark"&&(!A||Y.marker.insertLeft)){var he=Y.from==null||(ne.inclusiveLeft?Y.from<=r:Y.from<r);(O||(O=[])).push(new Jn(ne,he?null:Y.from-r,Y.to==null?null:Y.to-r))}}return O}function sr(e,r){if(r.full)return null;var A=Lr(e,r.from.line)&&nn(e,r.from.line).markedSpans,O=Lr(e,r.to.line)&&nn(e,r.to.line).markedSpans;if(!A&&!O)return null;var N=r.from.ch,Y=r.to.ch,ne=Yn(r.from,r.to)==0,ue=Sr(A,N,ne),he=gr(O,Y,ne),ye=r.text.length==1,Ge=K(r.text).length+(ye?N:0);if(ue)for(var Je=0;Je<ue.length;++Je){var Ct=ue[Je];if(Ct.to==null){var bt=rr(he,Ct.marker);bt?ye&&(Ct.to=bt.to==null?null:bt.to+Ge):Ct.to=N}}if(he)for(var Qt=0;Qt<he.length;++Qt){var ln=he[Qt];if(ln.to!=null&&(ln.to+=Ge),ln.from==null){var En=rr(ue,ln.marker);En||(ln.from=Ge,ye&&(ue||(ue=[])).push(ln))}else ln.from+=Ge,ye&&(ue||(ue=[])).push(ln)}ue&&(ue=re(ue)),he&&he!=ue&&(he=re(he));var On=[ue];if(!ye){var Bn=r.text.length-2,Rn;if(Bn>0&&ue)for(var Vn=0;Vn<ue.length;++Vn)ue[Vn].to==null&&(Rn||(Rn=[])).push(new Jn(ue[Vn].marker,null,null));for(var dr=0;dr<Bn;++dr)On.push(Rn);On.push(he)}return On}function re(e){for(var r=0;r<e.length;++r){var A=e[r];A.from!=null&&A.from==A.to&&A.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Le(e,r,A){var O=null;if(e.iter(r.line,A.line+1,function(bt){if(bt.markedSpans)for(var Qt=0;Qt<bt.markedSpans.length;++Qt){var ln=bt.markedSpans[Qt].marker;ln.readOnly&&(!O||J(O,ln)==-1)&&(O||(O=[])).push(ln)}}),!O)return null;for(var N=[{from:r,to:A}],Y=0;Y<O.length;++Y)for(var ne=O[Y],ue=ne.find(0),he=0;he<N.length;++he){var ye=N[he];if(Yn(ye.to,ue.from)<0||Yn(ye.from,ue.to)>0)continue;var Ge=[he,1],Je=Yn(ye.from,ue.from),Ct=Yn(ye.to,ue.to);(Je<0||!ne.inclusiveLeft&&!Je)&&Ge.push({from:ye.from,to:ue.from}),(Ct>0||!ne.inclusiveRight&&!Ct)&&Ge.push({from:ue.to,to:ye.to}),N.splice.apply(N,Ge),he+=Ge.length-3}return N}function Xe(e){var r=e.markedSpans;if(!r)return;for(var A=0;A<r.length;++A)r[A].marker.detachLine(e);e.markedSpans=null}function ke(e,r){if(!r)return;for(var A=0;A<r.length;++A)r[A].marker.attachLine(e);e.markedSpans=r}function dt(e){return e.inclusiveLeft?-1:0}function tt(e){return e.inclusiveRight?1:0}function ht(e,r){var A=e.lines.length-r.lines.length;if(A!=0)return A;var O=e.find(),N=r.find(),Y=Yn(O.from,N.from)||dt(e)-dt(r);if(Y)return-Y;var ne=Yn(O.to,N.to)||tt(e)-tt(r);return ne||r.id-e.id}function xt(e,r){var A=Dn&&e.markedSpans,O;if(A)for(var N=void 0,Y=0;Y<A.length;++Y)N=A[Y],N.marker.collapsed&&(r?N.from:N.to)==null&&(!O||ht(O,N.marker)<0)&&(O=N.marker);return O}function Rt(e){return xt(e,!0)}function st(e){return xt(e,!1)}function Kt(e,r){var A=Dn&&e.markedSpans,O;if(A)for(var N=0;N<A.length;++N){var Y=A[N];Y.marker.collapsed&&(Y.from==null||Y.from<r)&&(Y.to==null||Y.to>r)&&(!O||ht(O,Y.marker)<0)&&(O=Y.marker)}return O}function Zt(e,r,A,O,N){var Y=nn(e,r),ne=Dn&&Y.markedSpans;if(ne)for(var ue=0;ue<ne.length;++ue){var he=ne[ue];if(!he.marker.collapsed)continue;var ye=he.marker.find(0),Ge=Yn(ye.from,A)||dt(he.marker)-dt(N),Je=Yn(ye.to,O)||tt(he.marker)-tt(N);if(Ge>=0&&Je<=0||Ge<=0&&Je>=0)continue;if(Ge<=0&&(he.marker.inclusiveRight&&N.inclusiveLeft?Yn(ye.to,A)>=0:Yn(ye.to,A)>0)||Ge>=0&&(he.marker.inclusiveRight&&N.inclusiveLeft?Yn(ye.from,O)<=0:Yn(ye.from,O)<0))return!0}}function Et(e){for(var r;r=Rt(e);)e=r.find(-1,!0).line;return e}function Vt(e){for(var r;r=st(e);)e=r.find(1,!0).line;return e}function $e(e){for(var r,A;r=st(e);)e=r.find(1,!0).line,(A||(A=[])).push(e);return A}function Yt(e,r){var A=nn(e,r),O=Et(A);return A==O?r:zn(O)}function Nt(e,r){if(r>e.lastLine())return r;var A=nn(e,r),O;if(!un(e,A))return r;for(;O=st(A);)A=O.find(1,!0).line;return zn(A)+1}function un(e,r){var A=Dn&&r.markedSpans;if(A)for(var O=void 0,N=0;N<A.length;++N){if(O=A[N],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&yn(e,r,O))return!0}}function yn(e,r,A){if(A.to==null){var O=A.marker.find(1,!0);return yn(e,O.line,rr(O.line.markedSpans,A.marker))}if(A.marker.inclusiveRight&&A.to==r.text.length)return!0;for(var N=void 0,Y=0;Y<r.markedSpans.length;++Y)if(N=r.markedSpans[Y],N.marker.collapsed&&!N.marker.widgetNode&&N.from==A.to&&(N.to==null||N.to!=A.from)&&(N.marker.inclusiveLeft||A.marker.inclusiveRight)&&yn(e,r,N))return!0}function Cn(e){e=Et(e);for(var r=0,A=e.parent,O=0;O<A.lines.length;++O){var N=A.lines[O];if(N==e)break;r+=N.height}for(var Y=A.parent;Y;A=Y,Y=A.parent)for(var ne=0;ne<Y.children.length;++ne){var ue=Y.children[ne];if(ue==A)break;r+=ue.height}return r}function wt(e){if(e.height==0)return 0;for(var r=e.text.length,A,O=e;A=Rt(O);){var N=A.find(0,!0);O=N.from.line,r+=N.from.ch-N.to.ch}for(O=e;A=st(O);){var Y=A.find(0,!0);r-=O.text.length-Y.from.ch,O=Y.to.line,r+=O.text.length-Y.to.ch}return r}function kt(e){var r=e.display,A=e.doc;r.maxLine=nn(A,A.first),r.maxLineLength=wt(r.maxLine),r.maxLineChanged=!0,A.iter(function(O){var N=wt(O);N>r.maxLineLength&&(r.maxLineLength=N,r.maxLine=O)})}var mn=function(e,r,A){this.text=e,ke(this,r),this.height=A?A(this):1};mn.prototype.lineNo=function(){return zn(this)},ve(mn);function dn(e,r,A,O){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xe(e),ke(e,A);var N=O?O(e):1;N!=e.height&&xn(e,N)}function vt(e){e.parent=null,Xe(e)}var St={},Ot={};function yt(e,r){if(!e||/^\s*$/.test(e))return null;var A=r.addModeClass?Ot:St;return A[e]||(A[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,r){var A=_("span",null,null,t?"padding-right: .1px":null),O={pre:_("pre",[A],"CodeMirror-line"),content:A,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var N=0;N<=(r.rest?r.rest.length:0);N++){var Y=N?r.rest[N-1]:r.line,ne=void 0;O.pos=0,O.addToken=Bt,zt(e.display.measure)&&(ne=Wt(Y,e.doc.direction))&&(O.addToken=qt(O.addToken,ne)),O.map=[];var ue=r!=e.display.externalMeasured&&zn(Y);fn(Y,O,xa(e,Y,ue)),Y.styleClasses&&(Y.styleClasses.bgClass&&(O.bgClass=R(Y.styleClasses.bgClass,O.bgClass||"")),Y.styleClasses.textClass&&(O.textClass=R(Y.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(Xt(e.display.measure))),N==0?(r.measure.map=O.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(O.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(t){var he=O.content.lastChild;(/\bcm-tab\b/.test(he.className)||he.querySelector&&he.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return fe(e,"renderLine",e,r.line,O.pre),O.pre.className&&(O.textClass=R(O.pre.className,O.textClass||"")),O}function gn(e){var r=m("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Bt(e,r,A,O,N,Y,ne){if(!r)return;var ue=e.splitSpaces?vn(r,e.trailingSpace):r,he=e.cm.state.specialChars,ye=!1,Ge;if(!he.test(r))e.col+=r.length,Ge=document.createTextNode(ue),e.map.push(e.pos,e.pos+r.length,Ge),P&&y<9&&(ye=!0),e.pos+=r.length;else{Ge=document.createDocumentFragment();for(var Je=0;;){he.lastIndex=Je;var Ct=he.exec(r),bt=Ct?Ct.index-Je:r.length-Je;if(bt){var Qt=document.createTextNode(ue.slice(Je,Je+bt));P&&y<9?Ge.appendChild(m("span",[Qt])):Ge.appendChild(Qt),e.map.push(e.pos,e.pos+bt,Qt),e.col+=bt,e.pos+=bt}if(!Ct)break;Je+=bt+1;var ln=void 0;if(Ct[0]==" "){var En=e.cm.options.tabSize,On=En-e.col%En;ln=Ge.appendChild(m("span",Z(On),"cm-tab")),ln.setAttribute("role","presentation"),ln.setAttribute("cm-text"," "),e.col+=On}else Ct[0]=="\r"||Ct[0]==`
`?(ln=Ge.appendChild(m("span",Ct[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ln.setAttribute("cm-text",Ct[0]),e.col+=1):(ln=e.cm.options.specialCharPlaceholder(Ct[0]),ln.setAttribute("cm-text",Ct[0]),P&&y<9?Ge.appendChild(m("span",[ln])):Ge.appendChild(ln),e.col+=1);e.map.push(e.pos,e.pos+1,ln),e.pos++}}if(e.trailingSpace=ue.charCodeAt(r.length-1)==32,A||O||N||ye||Y||ne){var Bn=A||"";O&&(Bn+=O),N&&(Bn+=N);var Rn=m("span",[Ge],Bn,Y);if(ne)for(var Vn in ne)ne.hasOwnProperty(Vn)&&Vn!="style"&&Vn!="class"&&Rn.setAttribute(Vn,ne[Vn]);return e.content.appendChild(Rn)}e.content.appendChild(Ge)}function vn(e,r){if(e.length>1&&!/ /.test(e))return e;for(var A=r,O="",N=0;N<e.length;N++){var Y=e.charAt(N);Y==" "&&A&&(N==e.length-1||e.charCodeAt(N+1)==32)&&(Y="\xA0"),O+=Y,A=Y==" "}return O}function qt(e,r){return function(A,O,N,Y,ne,ue,he){N=N?N+" cm-force-border":"cm-force-border";for(var ye=A.pos,Ge=ye+O.length;;){for(var Je=void 0,Ct=0;Ct<r.length&&!(Je=r[Ct],Je.to>ye&&Je.from<=ye);Ct++);if(Je.to>=Ge)return e(A,O,N,Y,ne,ue,he);e(A,O.slice(0,Je.to-ye),N,Y,null,ue,he),Y=null,O=O.slice(Je.to-ye),ye=Je.to}}}function Ut(e,r,A,O){var N=!O&&A.widgetNode;N&&e.map.push(e.pos,e.pos+r,N),!O&&e.cm.display.input.needsContentAttribute&&(N||(N=e.content.appendChild(document.createElement("span"))),N.setAttribute("cm-marker",A.id)),N&&(e.cm.display.input.setUneditable(N),e.content.appendChild(N)),e.pos+=r,e.trailingSpace=!1}function fn(e,r,A){var O=e.markedSpans,N=e.text,Y=0;if(!O){for(var ne=1;ne<A.length;ne+=2)r.addToken(r,N.slice(Y,Y=A[ne]),yt(A[ne+1],r.cm.options));return}for(var ue=N.length,he=0,ye=1,Ge="",Je,Ct,bt=0,Qt,ln,En,On,Bn;;){if(bt==he){Qt=ln=En=Ct="",Bn=null,On=null,bt=Infinity;for(var Rn=[],Vn=void 0,dr=0;dr<O.length;++dr){var or=O[dr],wr=or.marker;if(wr.type=="bookmark"&&or.from==he&&wr.widgetNode)Rn.push(wr);else if(or.from<=he&&(or.to==null||or.to>he||wr.collapsed&&or.to==he&&or.from==he)){if(or.to!=null&&or.to!=he&&bt>or.to&&(bt=or.to,ln=""),wr.className&&(Qt+=" "+wr.className),wr.css&&(Ct=(Ct?Ct+";":"")+wr.css),wr.startStyle&&or.from==he&&(En+=" "+wr.startStyle),wr.endStyle&&or.to==bt&&(Vn||(Vn=[])).push(wr.endStyle,or.to),wr.title&&((Bn||(Bn={})).title=wr.title),wr.attributes)for(var qr in wr.attributes)(Bn||(Bn={}))[qr]=wr.attributes[qr];wr.collapsed&&(!On||ht(On.marker,wr)<0)&&(On=or)}else or.from>he&&bt>or.from&&(bt=or.from)}if(Vn)for(var Na=0;Na<Vn.length;Na+=2)Vn[Na+1]==bt&&(ln+=" "+Vn[Na]);if(!On||On.from==he)for(var ua=0;ua<Rn.length;++ua)Ut(r,0,Rn[ua]);if(On&&(On.from||0)==he){if(Ut(r,(On.to==null?ue+1:On.to)-he,On.marker,On.from==null),On.to==null)return;On.to==he&&(On=!1)}}if(he>=ue)break;for(var ii=Math.min(ue,bt);;){if(Ge){var ti=he+Ge.length;if(!On){var Sa=ti>ii?Ge.slice(0,ii-he):Ge;r.addToken(r,Sa,Je?Je+Qt:Qt,En,he+Sa.length==bt?ln:"",Ct,Bn)}if(ti>=ii){Ge=Ge.slice(ii-he),he=ii;break}he=ti,En=""}Ge=N.slice(Y,Y=A[ye++]),Je=yt(A[ye++],r.cm.options)}}}function In(e,r,A){this.line=r,this.rest=$e(r),this.size=this.rest?zn(K(this.rest))-A+1:1,this.node=this.text=null,this.hidden=un(e,r)}function ur(e,r,A){for(var O=[],N,Y=r;Y<A;Y=N){var ne=new In(e.doc,nn(e.doc,Y),Y);N=Y+ne.size,O.push(ne)}return O}var Ln=null;function Tr(e){Ln?Ln.ops.push(e):e.ownsGroup=Ln={ops:[e],delayedCallbacks:[]}}function Ur(e){var r=e.delayedCallbacks,A=0;do{for(;A<r.length;A++)r[A].call(null);for(var O=0;O<e.ops.length;O++){var N=e.ops[O];if(N.cursorActivityHandlers)for(;N.cursorActivityCalled<N.cursorActivityHandlers.length;)N.cursorActivityHandlers[N.cursorActivityCalled++].call(null,N.cm)}}while(A<r.length)}function Mn(e,r){var A=e.ownsGroup;if(!A)return;try{Ur(A)}finally{Ln=null,r(A)}}var Nn=null;function Kn(e,r){var A=it(e,r);if(!A.length)return;var O=Array.prototype.slice.call(arguments,2),N;Ln?N=Ln.delayedCallbacks:Nn?N=Nn:(N=Nn=[],setTimeout(vr,0));for(var Y=function(ue){N.push(function(){return A[ue].apply(null,O)})},ne=0;ne<A.length;++ne)Y(ne)}function vr(){var e=Nn;Nn=null;for(var r=0;r<e.length;++r)e[r]()}function Rr(e,r,A,O){for(var N=0;N<r.changes.length;N++){var Y=r.changes[N];Y=="text"?ca(e,r):Y=="gutter"?Ra(e,r,A,O):Y=="class"?Ga(e,r):Y=="widget"&&$a(e,r,O)}r.changes=null}function Br(e){return e.node==e.text&&(e.node=m("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),P&&y<8&&(e.node.style.zIndex=2)),e.node}function sa(e,r){var A=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(A&&(A+=" CodeMirror-linebackground"),r.background)A?r.background.className=A:(r.background.parentNode.removeChild(r.background),r.background=null);else if(A){var O=Br(r);r.background=O.insertBefore(m("div",null,A),O.firstChild),e.display.input.setUneditable(r.background)}}function la(e,r){var A=e.display.externalMeasured;return A&&A.line==r.line?(e.display.externalMeasured=null,r.measure=A.measure,A.built):ft(e,r)}function ca(e,r){var A=r.text.className,O=la(e,r);r.text==r.node&&(r.node=O.pre),r.text.parentNode.replaceChild(O.pre,r.text),r.text=O.pre,O.bgClass!=r.bgClass||O.textClass!=r.textClass?(r.bgClass=O.bgClass,r.textClass=O.textClass,Ga(e,r)):A&&(r.text.className=A)}function Ga(e,r){sa(e,r),r.line.wrapClass?Br(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var A=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=A||""}function Ra(e,r,A,O){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var N=Br(r);r.gutterBackground=m("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px; width: "+O.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),N.insertBefore(r.gutterBackground,r.text)}var Y=r.line.gutterMarkers;if(e.options.lineNumbers||Y){var ne=Br(r),ue=r.gutter=m("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ue),ne.insertBefore(ue,r.text),r.line.gutterClass&&(ue.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(r.lineNumber=ue.appendChild(m("div",Cr(e.options,A),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var he=0;he<e.display.gutterSpecs.length;++he){var ye=e.display.gutterSpecs[he].className,Ge=Y.hasOwnProperty(ye)&&Y[ye];Ge&&ue.appendChild(m("div",[Ge],"CodeMirror-gutter-elt","left: "+O.gutterLeft[ye]+"px; width: "+O.gutterWidth[ye]+"px"))}}}function $a(e,r,A){r.alignable&&(r.alignable=null);for(var O=w("CodeMirror-linewidget"),N=r.node.firstChild,Y=void 0;N;N=Y)Y=N.nextSibling,O.test(N.className)&&r.node.removeChild(N);Aa(e,r,A)}function Yr(e,r,A,O){var N=la(e,r);return r.text=r.node=N.pre,N.bgClass&&(r.bgClass=N.bgClass),N.textClass&&(r.textClass=N.textClass),Ga(e,r),Ra(e,r,A,O),Aa(e,r,O),r.node}function Aa(e,r,A){if(oi(e,r.line,r,A,!0),r.rest)for(var O=0;O<r.rest.length;O++)oi(e,r.rest[O],r,A,!1)}function oi(e,r,A,O,N){if(!r.widgets)return;for(var Y=Br(A),ne=0,ue=r.widgets;ne<ue.length;++ne){var he=ue[ne],ye=m("div",[he.node],"CodeMirror-linewidget"+(he.className?" "+he.className:""));he.handleMouseEvents||ye.setAttribute("cm-ignore-events","true"),Da(he,ye,A,O),e.display.input.setUneditable(ye),N&&he.above?Y.insertBefore(ye,A.gutter||A.text):Y.appendChild(ye),Kn(he,"redraw")}}function Da(e,r,A,O){if(e.noHScroll){(A.alignable||(A.alignable=[])).push(r);var N=O.wrapperWidth;r.style.left=O.fixedPos+"px",e.coverGutter||(N-=O.gutterTotalWidth,r.style.paddingLeft=O.gutterTotalWidth+"px"),r.style.width=N+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-O.gutterTotalWidth+"px"))}function zr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!g(document.body,e.node)){var A="position: relative;";e.coverGutter&&(A+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(A+="width: "+r.display.wrapper.clientWidth+"px;"),f(r.display.measure,m("div",[e.node],null,A))}return e.height=e.node.parentNode.offsetHeight}function va(e,r){for(var A=Ae(r);A!=e.wrapper;A=A.parentNode)if(!A||A.nodeType==1&&A.getAttribute("cm-ignore-events")=="true"||A.parentNode==e.sizer&&A!=e.mover)return!0}function wa(e){return e.lineSpace.offsetTop}function Ie(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Qe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=f(e.measure,m("pre","x","CodeMirror-line-like")),A=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,O={left:parseInt(A.paddingLeft),right:parseInt(A.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function qe(e){return te-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-qe(e)-e.display.barWidth}function me(e){return e.display.scroller.clientHeight-qe(e)-e.display.barHeight}function De(e,r,A){var O=e.options.lineWrapping,N=O&&Fe(e);if(!r.measure.heights||O&&r.measure.width!=N){var Y=r.measure.heights=[];if(O){r.measure.width=N;for(var ne=r.text.firstChild.getClientRects(),ue=0;ue<ne.length-1;ue++){var he=ne[ue],ye=ne[ue+1];Math.abs(he.bottom-ye.bottom)>2&&Y.push((he.bottom+ye.top)/2-A.top)}}Y.push(A.bottom-A.top)}}function be(e,r,A){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var O=0;O<e.rest.length;O++)if(e.rest[O]==r)return{map:e.measure.maps[O],cache:e.measure.caches[O]};for(var N=0;N<e.rest.length;N++)if(zn(e.rest[N])>A)return{map:e.measure.maps[N],cache:e.measure.caches[N],before:!0}}function Be(e,r){r=Et(r);var A=zn(r),O=e.display.externalMeasured=new In(e.doc,r,A);O.lineN=A;var N=O.built=ft(e,O);return O.text=N.pre,f(e.display.lineMeasure,N.pre),O}function Ke(e,r,A,O){return ct(e,Ve(e,r),A,O)}function nt(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Kr(e,r)];var A=e.display.externalMeasured;if(A&&r>=A.lineN&&r<A.lineN+A.size)return A}function Ve(e,r){var A=zn(r),O=nt(e,A);O&&!O.text?O=null:O&&O.changes&&(Rr(e,O,A,ir(e)),e.curOp.forceUpdate=!0),O||(O=Be(e,r));var N=be(O,r,A);return{line:r,view:O,rect:null,map:N.map,cache:N.cache,before:N.before,hasHeights:!1}}function ct(e,r,A,O,N){r.before&&(A=-1);var Y=A+(O||""),ne;return r.cache.hasOwnProperty(Y)?ne=r.cache[Y]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(De(e,r.view,r.rect),r.hasHeights=!0),ne=bn(e,r,A,O),ne.bogus||(r.cache[Y]=ne)),{left:ne.left,right:ne.right,top:N?ne.rtop:ne.top,bottom:N?ne.rbottom:ne.bottom}}var It={left:0,right:0,top:0,bottom:0};function $t(e,r,A){for(var O,N,Y,ne,ue,he,ye=0;ye<e.length;ye+=3)if(ue=e[ye],he=e[ye+1],r<ue?(N=0,Y=1,ne="left"):r<he?(N=r-ue,Y=N+1):(ye==e.length-3||r==he&&e[ye+3]>r)&&(Y=he-ue,N=Y-1,r>=he&&(ne="right")),N!=null){if(O=e[ye+2],ue==he&&A==(O.insertLeft?"left":"right")&&(ne=A),A=="left"&&N==0)for(;ye&&e[ye-2]==e[ye-3]&&e[ye-1].insertLeft;)O=e[(ye-=3)+2],ne="left";if(A=="right"&&N==he-ue)for(;ye<e.length-3&&e[ye+3]==e[ye+4]&&!e[ye+5].insertLeft;)O=e[(ye+=3)+2],ne="right";break}return{node:O,start:N,end:Y,collapse:ne,coverStart:ue,coverEnd:he}}function tn(e,r){var A=It;if(r=="left")for(var O=0;O<e.length&&!((A=e[O]).left!=A.right);O++);else for(var N=e.length-1;N>=0&&!((A=e[N]).left!=A.right);N--);return A}function bn(e,r,A,O){var N=$t(r.map,A,O),Y=N.node,ne=N.start,ue=N.end,he=N.collapse,ye;if(Y.nodeType==3){for(var Ge=0;Ge<4;Ge++){for(;ne&&Re(r.line.text.charAt(N.coverStart+ne));)--ne;for(;N.coverStart+ue<N.coverEnd&&Re(r.line.text.charAt(N.coverStart+ue));)++ue;if(P&&y<9&&ne==0&&ue==N.coverEnd-N.coverStart?ye=Y.parentNode.getBoundingClientRect():ye=tn(x(Y,ne,ue).getClientRects(),O),ye.left||ye.right||ne==0)break;ue=ne,ne=ne-1,he="right"}P&&y<11&&(ye=Pn(e.display.measure,ye))}else{ne>0&&(he=O="right");var Je;e.options.lineWrapping&&(Je=Y.getClientRects()).length>1?ye=Je[O=="right"?Je.length-1:0]:ye=Y.getBoundingClientRect()}if(P&&y<9&&!ne&&(!ye||!ye.left&&!ye.right)){var Ct=Y.parentNode.getClientRects()[0];Ct?ye={left:Ct.left,right:Ct.left+Or(e.display),top:Ct.top,bottom:Ct.bottom}:ye=It}for(var bt=ye.top-r.rect.top,Qt=ye.bottom-r.rect.top,ln=(bt+Qt)/2,En=r.view.measure.heights,On=0;On<En.length-1&&!(ln<En[On]);On++);var Bn=On?En[On-1]:0,Rn=En[On],Vn={left:(he=="right"?ye.right:ye.left)-r.rect.left,right:(he=="left"?ye.left:ye.right)-r.rect.left,top:Bn,bottom:Rn};return!ye.left&&!ye.right&&(Vn.bogus=!0),e.options.singleCursorHeightPerLine||(Vn.rtop=bt,Vn.rbottom=Qt),Vn}function Pn(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ue(e))return r;var A=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*A,right:r.right*A,top:r.top*O,bottom:r.bottom*O}}function er(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function tr(e){e.display.externalMeasure=null,c(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)er(e.display.view[r])}function rn(e){tr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Lt(){return i&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ft(){return i&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Tn(e){var r=0;if(e.widgets)for(var A=0;A<e.widgets.length;++A)e.widgets[A].above&&(r+=zr(e.widgets[A]));return r}function cn(e,r,A,O,N){if(!N){var Y=Tn(r);A.top+=Y,A.bottom+=Y}if(O=="line")return A;O||(O="local");var ne=Cn(r);if(O=="local"?ne+=wa(e.display):ne-=e.display.viewOffset,O=="page"||O=="window"){var ue=e.display.lineSpace.getBoundingClientRect();ne+=ue.top+(O=="window"?0:Ft());var he=ue.left+(O=="window"?0:Lt());A.left+=he,A.right+=he}return A.top+=ne,A.bottom+=ne,A}function Gn(e,r,A){if(A=="div")return r;var O=r.left,N=r.top;if(A=="page")O-=Lt(),N-=Ft();else if(A=="local"||!A){var Y=e.display.sizer.getBoundingClientRect();O+=Y.left,N+=Y.top}var ne=e.display.lineSpace.getBoundingClientRect();return{left:O-ne.left,top:N-ne.top}}function pr(e,r,A,O,N){return O||(O=nn(e.doc,r.line)),cn(e,O,Ke(e,O,r.ch,N),A)}function Wn(e,r,A,O,N,Y){O=O||nn(e.doc,r.line),N||(N=Ve(e,O));function ne(Qt,ln){var En=ct(e,N,Qt,ln?"right":"left",Y);return ln?En.left=En.right:En.right=En.left,cn(e,O,En,A)}var ue=Wt(O,e.doc.direction),he=r.ch,ye=r.sticky;if(he>=O.text.length?(he=O.text.length,ye="before"):he<=0&&(he=0,ye="after"),!ue)return ne(ye=="before"?he-1:he,ye=="before");function Ge(Qt,ln,En){var On=ue[ln],Bn=On.level==1;return ne(En?Qt-1:Qt,Bn!=En)}var Je=We(ue,he,ye),Ct=Dt,bt=Ge(he,Je,ye=="before");return Ct!=null&&(bt.other=Ge(he,Ct,ye!="before")),bt}function an(e,r){var A=0;r=$n(e.doc,r),e.options.lineWrapping||(A=Or(e.display)*r.ch);var O=nn(e.doc,r.line),N=Cn(O)+wa(e.display);return{left:A,right:A,top:N,bottom:N+O.height}}function _n(e,r,A,O,N){var Y=en(e,r,A);return Y.xRel=N,O&&(Y.outside=O),Y}function lr(e,r,A){var O=e.doc;if(A+=e.display.viewOffset,A<0)return _n(O.first,0,null,-1,-1);var N=nr(O,A),Y=O.first+O.size-1;if(N>Y)return _n(O.first+O.size-1,nn(O,Y).text.length,null,1,1);r<0&&(r=0);for(var ne=nn(O,N);;){var ue=Hr(e,ne,N,r,A),he=Kt(ne,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!he)return ue;var ye=he.find(1);if(ye.line==N)return ye;ne=nn(O,N=ye.line)}}function mr(e,r,A,O){O-=Tn(r);var N=r.text.length,Y=et(function(ne){return ct(e,A,ne-1).bottom<=O},N,0);return N=et(function(ne){return ct(e,A,ne).top>O},Y,N),{begin:Y,end:N}}function Fn(e,r,A,O){A||(A=Ve(e,r));var N=cn(e,r,ct(e,A,O),"line").top;return mr(e,r,A,N)}function br(e,r,A,O){return e.bottom<=A?!1:e.top>A?!0:(O?e.left:e.right)>r}function Hr(e,r,A,O,N){N-=Cn(r);var Y=Ve(e,r),ne=Tn(r),ue=0,he=r.text.length,ye=!0,Ge=Wt(r,e.doc.direction);if(Ge){var Je=(e.options.lineWrapping?Pr:xr)(e,r,A,Y,Ge,O,N);ye=Je.level!=1,ue=ye?Je.from:Je.to-1,he=ye?Je.to:Je.from-1}var Ct=null,bt=null,Qt=et(function(dr){var or=ct(e,Y,dr);return or.top+=ne,or.bottom+=ne,br(or,O,N,!1)?(or.top<=N&&or.left<=O&&(Ct=dr,bt=or),!0):!1},ue,he),ln,En,On=!1;if(bt){var Bn=O-bt.left<bt.right-O,Rn=Bn==ye;Qt=Ct+(Rn?0:1),En=Rn?"after":"before",ln=Bn?bt.left:bt.right}else{!ye&&(Qt==he||Qt==ue)&&Qt++,En=Qt==0?"after":Qt==r.text.length?"before":ct(e,Y,Qt-(ye?1:0)).bottom+ne<=N==ye?"after":"before";var Vn=Wn(e,en(A,Qt,En),"line",r,Y);ln=Vn.left,On=N<Vn.top?-1:N>=Vn.bottom?1:0}return Qt=He(r.text,Qt,1),_n(A,Qt,En,On,O-ln)}function xr(e,r,A,O,N,Y,ne){var ue=et(function(Je){var Ct=N[Je],bt=Ct.level!=1;return br(Wn(e,en(A,bt?Ct.to:Ct.from,bt?"before":"after"),"line",r,O),Y,ne,!0)},0,N.length-1),he=N[ue];if(ue>0){var ye=he.level!=1,Ge=Wn(e,en(A,ye?he.from:he.to,ye?"after":"before"),"line",r,O);br(Ge,Y,ne,!0)&&Ge.top>ne&&(he=N[ue-1])}return he}function Pr(e,r,A,O,N,Y,ne){var ue=mr(e,r,O,ne),he=ue.begin,ye=ue.end;/\s/.test(r.text.charAt(ye-1))&&ye--;for(var Ge=null,Je=null,Ct=0;Ct<N.length;Ct++){var bt=N[Ct];if(bt.from>=ye||bt.to<=he)continue;var Qt=bt.level!=1,ln=ct(e,O,Qt?Math.min(ye,bt.to)-1:Math.max(he,bt.from)).right,En=ln<Y?Y-ln+1e9:ln-Y;(!Ge||Je>En)&&(Ge=bt,Je=En)}return Ge||(Ge=N[N.length-1]),Ge.from<he&&(Ge={from:he,to:Ge.to,level:Ge.level}),Ge.to>ye&&(Ge={from:Ge.from,to:ye,level:Ge.level}),Ge}var Dr;function Ar(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Dr==null){Dr=m("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Dr.appendChild(document.createTextNode("x")),Dr.appendChild(m("br"));Dr.appendChild(document.createTextNode("x"))}f(e.measure,Dr);var A=Dr.offsetHeight/50;return A>3&&(e.cachedTextHeight=A),c(e.measure),A||1}function Or(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=m("span","xxxxxxxxxx"),A=m("pre",[r],"CodeMirror-line-like");f(e.measure,A);var O=r.getBoundingClientRect(),N=(O.right-O.left)/10;return N>2&&(e.cachedCharWidth=N),N||10}function ir(e){for(var r=e.display,A={},O={},N=r.gutters.clientLeft,Y=r.gutters.firstChild,ne=0;Y;Y=Y.nextSibling,++ne){var ue=e.display.gutterSpecs[ne].className;A[ue]=Y.offsetLeft+Y.clientLeft+N,O[ue]=Y.clientWidth}return{fixedPos:ta(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:A,gutterWidth:O,wrapperWidth:r.wrapper.clientWidth}}function ta(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Qa(e){var r=Ar(e.display),A=e.options.lineWrapping,O=A&&Math.max(5,e.display.scroller.clientWidth/Or(e.display)-3);return function(N){if(un(e.doc,N))return 0;var Y=0;if(N.widgets)for(var ne=0;ne<N.widgets.length;ne++)N.widgets[ne].height&&(Y+=N.widgets[ne].height);return A?Y+(Math.ceil(N.text.length/O)||1)*r:Y+r}}function Pa(e){var r=e.doc,A=Qa(e);r.iter(function(O){var N=A(O);N!=O.height&&xn(O,N)})}function ya(e,r,A,O){var N=e.display;if(!A&&Ae(r).getAttribute("cm-not-content")=="true")return null;var Y,ne,ue=N.lineSpace.getBoundingClientRect();try{Y=r.clientX-ue.left,ne=r.clientY-ue.top}catch(Je){return null}var he=lr(e,Y,ne),ye;if(O&&he.xRel>0&&(ye=nn(e.doc,he.line).text).length==he.ch){var Ge=G(ye,ye.length,e.options.tabSize)-ye.length;he=en(he.line,Math.max(0,Math.round((Y-Qe(e.display).left)/Or(e.display))-Ge))}return he}function Kr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var A=e.display.view,O=0;O<A.length;O++)if(r-=A[O].size,r<0)return O}function Nr(e,r,A,O){r==null&&(r=e.doc.first),A==null&&(A=e.doc.first+e.doc.size),O||(O=0);var N=e.display;if(O&&A<N.viewTo&&(N.updateLineNumbers==null||N.updateLineNumbers>r)&&(N.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=N.viewTo)Dn&&Yt(e.doc,r)<N.viewTo&&Gr(e);else if(A<=N.viewFrom)Dn&&Nt(e.doc,A+O)>N.viewFrom?Gr(e):(N.viewFrom+=O,N.viewTo+=O);else if(r<=N.viewFrom&&A>=N.viewTo)Gr(e);else if(r<=N.viewFrom){var Y=Ia(e,A,A+O,1);Y?(N.view=N.view.slice(Y.index),N.viewFrom=Y.lineN,N.viewTo+=O):Gr(e)}else if(A>=N.viewTo){var ne=Ia(e,r,r,-1);ne?(N.view=N.view.slice(0,ne.index),N.viewTo=ne.lineN):Gr(e)}else{var ue=Ia(e,r,r,-1),he=Ia(e,A,A+O,1);ue&&he?(N.view=N.view.slice(0,ue.index).concat(ur(e,ue.lineN,he.lineN)).concat(N.view.slice(he.index)),N.viewTo+=O):Gr(e)}var ye=N.externalMeasured;ye&&(A<ye.lineN?ye.lineN+=O:r<ye.lineN+ye.size&&(N.externalMeasured=null))}function Fr(e,r,A){e.curOp.viewChanged=!0;var O=e.display,N=e.display.externalMeasured;if(N&&r>=N.lineN&&r<N.lineN+N.size&&(O.externalMeasured=null),r<O.viewFrom||r>=O.viewTo)return;var Y=O.view[Kr(e,r)];if(Y.node==null)return;var ne=Y.changes||(Y.changes=[]);J(ne,A)==-1&&ne.push(A)}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ia(e,r,A,O){var N=Kr(e,r),Y,ne=e.display.view;if(!Dn||A==e.doc.first+e.doc.size)return{index:N,lineN:A};for(var ue=e.display.viewFrom,he=0;he<N;he++)ue+=ne[he].size;if(ue!=r){if(O>0){if(N==ne.length-1)return null;Y=ue+ne[N].size-r,N++}else Y=ue-r;r+=Y,A+=Y}for(;Yt(e.doc,A)!=A;){if(N==(O<0?0:ne.length-1))return null;A+=O*ne[N-(O<0?1:0)].size,N+=O}return{index:N,lineN:A}}function hi(e,r,A){var O=e.display,N=O.view;N.length==0||r>=O.viewTo||A<=O.viewFrom?(O.view=ur(e,r,A),O.viewFrom=r):(O.viewFrom>r?O.view=ur(e,r,O.viewFrom).concat(O.view):O.viewFrom<r&&(O.view=O.view.slice(Kr(e,r))),O.viewFrom=r,O.viewTo<A?O.view=O.view.concat(ur(e,O.viewTo,A)):O.viewTo>A&&(O.view=O.view.slice(0,Kr(e,A)))),O.viewTo=A}function si(e){for(var r=e.display.view,A=0,O=0;O<r.length;O++){var N=r[O];!N.hidden&&(!N.node||N.changes)&&++A}return A}function jr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ja(e,r){r===void 0&&(r=!0);for(var A=e.doc,O={},N=O.cursors=document.createDocumentFragment(),Y=O.selection=document.createDocumentFragment(),ne=0;ne<A.sel.ranges.length;ne++){if(!r&&ne==A.sel.primIndex)continue;var ue=A.sel.ranges[ne];if(ue.from().line>=e.display.viewTo||ue.to().line<e.display.viewFrom)continue;var he=ue.empty();(he||e.options.showCursorWhenSelecting)&&Za(e,ue.head,N),he||kr(e,ue,Y)}return O}function Za(e,r,A){var O=Wn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),N=A.appendChild(m("div","\xA0","CodeMirror-cursor"));if(N.style.left=O.left+"px",N.style.top=O.top+"px",N.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var Y=A.appendChild(m("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=O.other.left+"px",Y.style.top=O.other.top+"px",Y.style.height=(O.other.bottom-O.other.top)*.85+"px"}}function Wr(e,r){return e.top-r.top||e.left-r.left}function kr(e,r,A){var O=e.display,N=e.doc,Y=document.createDocumentFragment(),ne=Qe(e.display),ue=ne.left,he=Math.max(O.sizerWidth,Fe(e)-O.sizer.offsetLeft)-ne.right,ye=N.direction=="ltr";function Ge(Rn,Vn,dr,or){Vn<0&&(Vn=0),Vn=Math.round(Vn),or=Math.round(or),Y.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+Rn+`px;
top: `+Vn+"px; width: "+(dr==null?he-Rn:dr)+`px;
height: `+(or-Vn)+"px"))}function Je(Rn,Vn,dr){var or=nn(N,Rn),wr=or.text.length,qr,Na;function ua(Sa,ni){return pr(e,en(Rn,Sa),"div",or,ni)}function ii(Sa,ni,Ha){var La=Fn(e,or,null,Sa),Oa=ni=="ltr"==(Ha=="after")?"left":"right",pa=Ha=="after"?La.begin:La.end-(/\s/.test(or.text.charAt(La.end-1))?2:1);return ua(pa,Oa)[Oa]}var ti=Wt(or,N.direction);return ut(ti,Vn||0,dr==null?wr:dr,function(Sa,ni,Ha,La){var Oa=Ha=="ltr",pa=ua(Sa,Oa?"left":"right"),ri=ua(ni-1,Oa?"right":"left"),So=Vn==null&&Sa==0,to=dr==null&&ni==wr,za=La==0,Li=!ti||La==ti.length-1;if(ri.top-pa.top<=3){var ja=(ye?So:to)&&za,ms=(ye?to:So)&&Li,Ki=ja?ue:(Oa?pa:ri).left,lo=ms?he:(Oa?ri:pa).right;Ge(Ki,pa.top,lo-Ki,pa.bottom)}else{var uo,Xa,Oo,gs;Oa?(uo=ye&&So&&za?ue:pa.left,Xa=ye?he:ii(Sa,Ha,"before"),Oo=ye?ue:ii(ni,Ha,"after"),gs=ye&&to&&Li?he:ri.right):(uo=ye?ii(Sa,Ha,"before"):ue,Xa=!ye&&So&&za?he:pa.right,Oo=!ye&&to&&Li?ue:ri.left,gs=ye?ii(ni,Ha,"after"):he),Ge(uo,pa.top,Xa-uo,pa.bottom),pa.bottom<ri.top&&Ge(ue,pa.bottom,null,ri.top),Ge(Oo,ri.top,gs-Oo,ri.bottom)}(!qr||Wr(pa,qr)<0)&&(qr=pa),Wr(ri,qr)<0&&(qr=ri),(!Na||Wr(pa,Na)<0)&&(Na=pa),Wr(ri,Na)<0&&(Na=ri)}),{start:qr,end:Na}}var Ct=r.from(),bt=r.to();if(Ct.line==bt.line)Je(Ct.line,Ct.ch,bt.ch);else{var Qt=nn(N,Ct.line),ln=nn(N,bt.line),En=Et(Qt)==Et(ln),On=Je(Ct.line,Ct.ch,En?Qt.text.length+1:null).end,Bn=Je(bt.line,En?0:null,bt.ch).start;En&&(On.top<Bn.top-2?(Ge(On.right,On.top,null,On.bottom),Ge(ue,Bn.top,Bn.left,Bn.bottom)):Ge(On.right,On.top,Bn.left-On.right,On.bottom)),On.bottom<Bn.top&&Ge(ue,On.bottom,null,Bn.top)}A.appendChild(Y)}function ha(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var A=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Ci(e),r.cursorDiv.style.visibility=(A=!A)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Pi(e){e.state.focused||(e.display.input.focus(),li(e))}function no(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ci(e))},100)}function li(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(fe(e,"focus",e,r),e.state.focused=!0,U(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),t&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ha(e)}function Ci(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(fe(e,"blur",e,r),e.state.focused=!1,v(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ti(e){for(var r=e.display,A=r.lineDiv.offsetTop,O=0;O<r.view.length;O++){var N=r.view[O],Y=e.options.lineWrapping,ne=void 0,ue=0;if(N.hidden)continue;if(P&&y<8){var he=N.node.offsetTop+N.node.offsetHeight;ne=he-A,A=he}else{var ye=N.node.getBoundingClientRect();ne=ye.bottom-ye.top,!Y&&N.text.firstChild&&(ue=N.text.firstChild.getBoundingClientRect().right-ye.left-1)}var Ge=N.line.height-ne;if((Ge>.005||Ge<-.005)&&(xn(N.line,ne),Si(N.line),N.rest))for(var Je=0;Je<N.rest.length;Je++)Si(N.rest[Je]);if(ue>e.display.sizerWidth){var Ct=Math.ceil(ue/Or(e.display));Ct>e.display.maxLineLength&&(e.display.maxLineLength=Ct,e.display.maxLine=N.line,e.display.maxLineChanged=!0)}}}function Si(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var A=e.widgets[r],O=A.node.parentNode;O&&(A.height=O.offsetHeight)}}function Ii(e,r,A){var O=A&&A.top!=null?Math.max(0,A.top):e.scroller.scrollTop;O=Math.floor(O-wa(e));var N=A&&A.bottom!=null?A.bottom:O+e.wrapper.clientHeight,Y=nr(r,O),ne=nr(r,N);if(A&&A.ensure){var ue=A.ensure.from.line,he=A.ensure.to.line;ue<Y?(Y=ue,ne=nr(r,Cn(nn(r,ue))+e.wrapper.clientHeight)):Math.min(he,r.lastLine())>=ne&&(Y=nr(r,Cn(nn(r,he))-e.wrapper.clientHeight),ne=he)}return{from:Y,to:Math.max(ne,Y+1)}}function co(e,r){if(ae(e,"scrollCursorIntoView"))return;var A=e.display,O=A.sizer.getBoundingClientRect(),N=null;if(r.top+O.top<0?N=!0:r.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(N=!1),N!=null&&!o){var Y=m("div","\u200B",null,`position: absolute;
top: `+(r.top-A.viewOffset-wa(e.display))+`px;
height: `+(r.bottom-r.top+qe(e)+A.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(N),e.display.lineSpace.removeChild(Y)}}function Ro(e,r,A,O){O==null&&(O=0);var N;!e.options.lineWrapping&&r==A&&(r=r.ch?en(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,A=r.sticky=="before"?en(r.line,r.ch+1,"before"):r);for(var Y=0;Y<5;Y++){var ne=!1,ue=Wn(e,r),he=!A||A==r?ue:Wn(e,A);N={left:Math.min(ue.left,he.left),top:Math.min(ue.top,he.top)-O,right:Math.max(ue.left,he.left),bottom:Math.max(ue.bottom,he.bottom)+O};var ye=Oi(e,N),Ge=e.doc.scrollTop,Je=e.doc.scrollLeft;if(ye.scrollTop!=null&&(Di(e,ye.scrollTop),Math.abs(e.doc.scrollTop-Ge)>1&&(ne=!0)),ye.scrollLeft!=null&&(Ma(e,ye.scrollLeft),Math.abs(e.doc.scrollLeft-Je)>1&&(ne=!0)),!ne)break}return N}function Gi(e,r){var A=Oi(e,r);A.scrollTop!=null&&Di(e,A.scrollTop),A.scrollLeft!=null&&Ma(e,A.scrollLeft)}function Oi(e,r){var A=e.display,O=Ar(e.display);r.top<0&&(r.top=0);var N=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:A.scroller.scrollTop,Y=me(e),ne={};r.bottom-r.top>Y&&(r.bottom=r.top+Y);var ue=e.doc.height+Ie(A),he=r.top<O,ye=r.bottom>ue-O;if(r.top<N)ne.scrollTop=he?0:r.top;else if(r.bottom>N+Y){var Ge=Math.min(r.top,(ye?ue:r.bottom)-Y);Ge!=N&&(ne.scrollTop=Ge)}var Je=e.options.fixedGutter?0:A.gutters.offsetWidth,Ct=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:A.scroller.scrollLeft-Je,bt=Fe(e)-A.gutters.offsetWidth,Qt=r.right-r.left>bt;return Qt&&(r.right=r.left+bt),r.left<10?ne.scrollLeft=0:r.left<Ct?ne.scrollLeft=Math.max(0,r.left+Je-(Qt?0:10)):r.right>bt+Ct-3&&(ne.scrollLeft=r.right+(Qt?0:10)-bt),ne}function Vi(e,r){if(r==null)return;Xi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function yi(e){Xi(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ri(e,r,A){(r!=null||A!=null)&&Xi(e),r!=null&&(e.curOp.scrollLeft=r),A!=null&&(e.curOp.scrollTop=A)}function ho(e,r){Xi(e),e.curOp.scrollToPos=r}function Xi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var A=an(e,r.from),O=an(e,r.to);Ai(e,A,O,r.margin)}}function Ai(e,r,A,O){var N=Oi(e,{left:Math.min(r.left,A.left),top:Math.min(r.top,A.top)-O,right:Math.max(r.right,A.right),bottom:Math.max(r.bottom,A.bottom)+O});Ri(e,N.scrollLeft,N.scrollTop)}function Di(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;I||ji(e,{top:r}),bi(e,r,!0),I&&ji(e),Ni(e,100)}function bi(e,r,A){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!A)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function Ma(e,r,A,O){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(A?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!O)return;e.doc.scrollLeft=r,_r(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function fi(e){var r=e.display,A=r.gutters.offsetWidth,O=Math.round(e.doc.height+Ie(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?A:0,docHeight:O,scrollHeight:O+qe(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:A}}var pi=function(e,r,A){this.cm=A;var O=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),N=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=N.tabIndex=-1,e(O),e(N),Pe(O,"scroll",function(){O.clientHeight&&r(O.scrollTop,"vertical")}),Pe(N,"scroll",function(){N.clientWidth&&r(N.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,A=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(A){this.vert.style.display="block",this.vert.style.bottom=r?O+"px":"0";var N=e.viewHeight-(r?O:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+N)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=A?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(A?O:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(O==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:A?O:0,bottom:r?O:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=s&&!a?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},pi.prototype.enableZeroWidthBar=function(e,r,A){e.style.pointerEvents="auto";function O(){var N=e.getBoundingClientRect(),Y=A=="vert"?document.elementFromPoint(N.right-1,(N.top+N.bottom)/2):document.elementFromPoint((N.right+N.left)/2,N.bottom-1);Y!=e?e.style.pointerEvents="none":r.set(1e3,O)}r.set(1e3,O)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _i=function(){};_i.prototype.update=function(){return{bottom:0,right:0}},_i.prototype.setScrollLeft=function(){},_i.prototype.setScrollTop=function(){},_i.prototype.clear=function(){};function mi(e,r){r||(r=fi(e));var A=e.display.barWidth,O=e.display.barHeight;Yi(e,r);for(var N=0;N<4&&A!=e.display.barWidth||O!=e.display.barHeight;N++)A!=e.display.barWidth&&e.options.lineWrapping&&Ti(e),Yi(e,fi(e)),A=e.display.barWidth,O=e.display.barHeight}function Yi(e,r){var A=e.display,O=A.scrollbars.update(r);A.sizer.style.paddingRight=(A.barWidth=O.right)+"px",A.sizer.style.paddingBottom=(A.barHeight=O.bottom)+"px",A.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(A.scrollbarFiller.style.display="block",A.scrollbarFiller.style.height=O.bottom+"px",A.scrollbarFiller.style.width=O.right+"px"):A.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(A.gutterFiller.style.display="block",A.gutterFiller.style.height=O.bottom+"px",A.gutterFiller.style.width=r.gutterWidth+"px"):A.gutterFiller.style.display=""}var $i={native:pi,null:_i};function Qi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&v(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $i[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Pe(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,A){A=="horizontal"?Ma(e,r):Di(e,r)},e),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)}var ki=0;function ui(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:++ki},Tr(e.curOp)}function Ei(e){var r=e.curOp;r&&Mn(r,function(A){for(var O=0;O<A.ops.length;O++)A.ops[O].cm.curOp=null;ro(A)})}function ro(e){for(var r=e.ops,A=0;A<r.length;A++)Ao(r[A]);for(var O=0;O<r.length;O++)Do(r[O]);for(var N=0;N<r.length;N++)fo(r[N]);for(var Y=0;Y<r.length;Y++)ao(r[Y]);for(var ne=0;ne<r.length;ne++)po(r[ne])}function Ao(e){var r=e.cm,A=r.display;io(r),e.updateMaxLine&&kt(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<A.viewFrom||e.scrollToPos.to.line>=A.viewTo)||A.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new qa(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Do(e){e.updatedDisplay=e.mustUpdate&&xi(e.cm,e.update)}function fo(e){var r=e.cm,A=r.display;e.updatedDisplay&&Ti(r),e.barMeasure=fi(r),A.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ke(r,A.maxLine,A.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(A.scroller.clientWidth,A.sizer.offsetLeft+e.adjustWidthTo+qe(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,A.sizer.offsetLeft+e.adjustWidthTo-Fe(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=A.input.prepareSelection())}function ao(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&Ma(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var A=e.focus&&e.focus==j();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,A),(e.updatedDisplay||e.startHeight!=r.doc.height)&&mi(r,e.barMeasure),e.updatedDisplay&&Ir(r,e.barMeasure),e.selectionChanged&&ha(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),A&&Pi(e.cm)}function po(e){var r=e.cm,A=r.display,O=r.doc;if(e.updatedDisplay&&Ji(r,e.update),A.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(A.wheelStartX=A.wheelStartY=null),e.scrollTop!=null&&bi(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ma(r,e.scrollLeft,!0,!0),e.scrollToPos){var N=Ro(r,$n(O,e.scrollToPos.from),$n(O,e.scrollToPos.to),e.scrollToPos.margin);co(r,N)}var Y=e.maybeHiddenMarkers,ne=e.maybeUnhiddenMarkers;if(Y)for(var ue=0;ue<Y.length;++ue)Y[ue].lines.length||fe(Y[ue],"hide");if(ne)for(var he=0;he<ne.length;++he)ne[he].lines.length&&fe(ne[he],"unhide");A.wrapper.offsetHeight&&(O.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&fe(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Fa(e,r){if(e.curOp)return r();ui(e);try{return r()}finally{Ei(e)}}function ra(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ui(e);try{return r.apply(e,arguments)}finally{Ei(e)}}}function Ca(e){return function(){if(this.curOp)return e.apply(this,arguments);ui(this);try{return e.apply(this,arguments)}finally{Ei(this)}}}function aa(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ui(r);try{return e.apply(this,arguments)}finally{Ei(r)}}}function Ni(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,H(mo,e))}function mo(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var A=+new Date+e.options.workTime,O=ga(e,r.highlightFrontier),N=[];r.iter(O.line,Math.min(r.first+r.size,e.display.viewTo+500),function(Y){if(O.line>=e.display.viewFrom){var ne=Y.styles,ue=Y.text.length>e.options.maxHighlightLength?Jt(r.mode,O.state):null,he=Ua(e,Y,O,!0);ue&&(O.state=ue),Y.styles=he.styles;var ye=Y.styleClasses,Ge=he.classes;Ge?Y.styleClasses=Ge:ye&&(Y.styleClasses=null);for(var Je=!ne||ne.length!=Y.styles.length||ye!=Ge&&(!ye||!Ge||ye.bgClass!=Ge.bgClass||ye.textClass!=Ge.textClass),Ct=0;!Je&&Ct<ne.length;++Ct)Je=ne[Ct]!=Y.styles[Ct];Je&&N.push(O.line),Y.stateAfter=O.save(),O.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&Ya(e,Y.text,O),Y.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>A)return Ni(e,e.options.workDelay),!0}),r.highlightFrontier=O.line,r.modeFrontier=Math.max(r.modeFrontier,O.line),N.length&&Fa(e,function(){for(var Y=0;Y<N.length;Y++)Fr(e,N[Y],"text")})}var qa=function(e,r,A){var O=e.display;this.viewport=r,this.visible=Ii(O,e.doc,r),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=A,this.dims=ir(e),this.events=[]};qa.prototype.signal=function(e,r){de(e,r)&&this.events.push(arguments)},qa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)fe.apply(null,this.events[e])};function io(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=qe(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=qe(e)+"px",r.scrollbarsClipped=!0)}function oo(e){if(e.hasFocus())return null;var r=j();if(!r||!g(e.display.lineDiv,r))return null;var A={activeElt:r};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&g(e.display.lineDiv,O.anchorNode)&&(A.anchorNode=O.anchorNode,A.anchorOffset=O.anchorOffset,A.focusNode=O.focusNode,A.focusOffset=O.focusOffset)}return A}function so(e){if(!e||!e.activeElt||e.activeElt==j())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode)){var r=window.getSelection(),A=document.createRange();A.setEnd(e.anchorNode,e.anchorOffset),A.collapse(!1),r.removeAllRanges(),r.addRange(A),r.extend(e.focusNode,e.focusOffset)}}function xi(e,r){var A=e.display,O=e.doc;if(r.editorIsHidden)return Gr(e),!1;if(!r.force&&r.visible.from>=A.viewFrom&&r.visible.to<=A.viewTo&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo)&&A.renderedView==A.view&&si(e)==0)return!1;ea(e)&&(Gr(e),r.dims=ir(e));var N=O.first+O.size,Y=Math.max(r.visible.from-e.options.viewportMargin,O.first),ne=Math.min(N,r.visible.to+e.options.viewportMargin);A.viewFrom<Y&&Y-A.viewFrom<20&&(Y=Math.max(O.first,A.viewFrom)),A.viewTo>ne&&A.viewTo-ne<20&&(ne=Math.min(N,A.viewTo)),Dn&&(Y=Yt(e.doc,Y),ne=Nt(e.doc,ne));var ue=Y!=A.viewFrom||ne!=A.viewTo||A.lastWrapHeight!=r.wrapperHeight||A.lastWrapWidth!=r.wrapperWidth;hi(e,Y,ne),A.viewOffset=Cn(nn(e.doc,A.viewFrom)),e.display.mover.style.top=A.viewOffset+"px";var he=si(e);if(!ue&&he==0&&!r.force&&A.renderedView==A.view&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo))return!1;var ye=oo(e);return he>4&&(A.lineDiv.style.display="none"),go(e,A.updateLineNumbers,r.dims),he>4&&(A.lineDiv.style.display=""),A.renderedView=A.view,so(ye),c(A.cursorDiv),c(A.selectionDiv),A.gutters.style.height=A.sizer.style.minHeight=0,ue&&(A.lastWrapHeight=r.wrapperHeight,A.lastWrapWidth=r.wrapperWidth,Ni(e,400)),A.updateLineNumbers=null,!0}function Ji(e,r){for(var A=r.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||r.oldDisplayWidth==Fe(e)){if(A&&A.top!=null&&(A={top:Math.min(e.doc.height+Ie(e.display)-me(e),A.top)}),r.visible=Ii(e.display,e.doc,A),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else O&&(r.visible=Ii(e.display,e.doc,A));if(!xi(e,r))break;Ti(e);var N=fi(e);jr(e),mi(e,N),Ir(e,N),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ji(e,r){var A=new qa(e,r);if(xi(e,A)){Ti(e),Ji(e,A);var O=fi(e);jr(e),mi(e,O),Ir(e,O),A.finish()}}function go(e,r,A){var O=e.display,N=e.options.lineNumbers,Y=O.lineDiv,ne=Y.firstChild;function ue(Qt){var ln=Qt.nextSibling;return t&&s&&e.display.currentWheelTarget==Qt?Qt.style.display="none":Qt.parentNode.removeChild(Qt),ln}for(var he=O.view,ye=O.viewFrom,Ge=0;Ge<he.length;Ge++){var Je=he[Ge];if(!Je.hidden)if(!Je.node||Je.node.parentNode!=Y){var Ct=Yr(e,Je,ye,A);Y.insertBefore(Ct,ne)}else{for(;ne!=Je.node;)ne=ue(ne);var bt=N&&r!=null&&r<=ye&&Je.lineNumber;Je.changes&&(J(Je.changes,"gutter")>-1&&(bt=!1),Rr(e,Je,ye,A)),bt&&(c(Je.lineNumber),Je.lineNumber.appendChild(document.createTextNode(Cr(e.options,ye)))),ne=Je.node.nextSibling}ye+=Je.size}for(;ne;)ne=ue(ne)}function Zi(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ir(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+qe(e)+"px"}function _r(e){var r=e.display,A=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var O=ta(r)-r.scroller.scrollLeft+e.doc.scrollLeft,N=r.gutters.offsetWidth,Y=O+"px",ne=0;ne<A.length;ne++)if(!A[ne].hidden){e.options.fixedGutter&&(A[ne].gutter&&(A[ne].gutter.style.left=Y),A[ne].gutterBackground&&(A[ne].gutterBackground.style.left=Y));var ue=A[ne].alignable;if(ue)for(var he=0;he<ue.length;he++)ue[he].style.left=Y}e.options.fixedGutter&&(r.gutters.style.left=O+N+"px")}function ea(e){if(!e.options.lineNumbers)return!1;var r=e.doc,A=Cr(e.options,r.first+r.size-1),O=e.display;if(A.length!=O.lineNumChars){var N=O.measure.appendChild(m("div",[m("div",A)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=N.firstChild.offsetWidth,ne=N.offsetWidth-Y;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(Y,O.lineGutter.offsetWidth-ne)+1,O.lineNumWidth=O.lineNumInnerWidth+ne,O.lineNumChars=O.lineNumInnerWidth?A.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",Zi(e.display),!0}return!1}function ka(e,r){for(var A=[],O=!1,N=0;N<e.length;N++){var Y=e[N],ne=null;if(typeof Y!="string"&&(ne=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(r)O=!0;else continue;A.push({className:Y,style:ne})}return r&&!O&&A.push({className:"CodeMirror-linenumbers",style:null}),A}function Mi(e){var r=e.gutters,A=e.gutterSpecs;c(r),e.lineGutter=null;for(var O=0;O<A.length;++O){var N=A[O],Y=N.className,ne=N.style,ue=r.appendChild(m("div",null,"CodeMirror-gutter "+Y));ne&&(ue.style.cssText=ne),Y=="CodeMirror-linenumbers"&&(e.lineGutter=ue,ue.style.width=(e.lineNumWidth||1)+"px")}r.style.display=A.length?"":"none",Zi(e)}function di(e){Mi(e.display),Nr(e),_r(e)}function Ui(e,r,A,O){var N=this;this.input=A,N.scrollbarFiller=m("div",null,"CodeMirror-scrollbar-filler"),N.scrollbarFiller.setAttribute("cm-not-content","true"),N.gutterFiller=m("div",null,"CodeMirror-gutter-filler"),N.gutterFiller.setAttribute("cm-not-content","true"),N.lineDiv=_("div",null,"CodeMirror-code"),N.selectionDiv=m("div",null,null,"position: relative; z-index: 1"),N.cursorDiv=m("div",null,"CodeMirror-cursors"),N.measure=m("div",null,"CodeMirror-measure"),N.lineMeasure=m("div",null,"CodeMirror-measure"),N.lineSpace=_("div",[N.measure,N.lineMeasure,N.selectionDiv,N.cursorDiv,N.lineDiv],null,"position: relative; outline: none");var Y=_("div",[N.lineSpace],"CodeMirror-lines");N.mover=m("div",[Y],null,"position: relative"),N.sizer=m("div",[N.mover],"CodeMirror-sizer"),N.sizerWidth=null,N.heightForcer=m("div",null,null,"position: absolute; height: "+te+"px; width: 1px;"),N.gutters=m("div",null,"CodeMirror-gutters"),N.lineGutter=null,N.scroller=m("div",[N.sizer,N.heightForcer,N.gutters],"CodeMirror-scroll"),N.scroller.setAttribute("tabIndex","-1"),N.wrapper=m("div",[N.scrollbarFiller,N.gutterFiller,N.scroller],"CodeMirror"),P&&y<8&&(N.gutters.style.zIndex=-1,N.scroller.style.paddingRight=0),!t&&!(I&&n)&&(N.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(N.wrapper):e(N.wrapper)),N.viewFrom=N.viewTo=r.first,N.reportedViewFrom=N.reportedViewTo=r.first,N.view=[],N.renderedView=null,N.externalMeasured=null,N.viewOffset=0,N.lastWrapHeight=N.lastWrapWidth=0,N.updateLineNumbers=null,N.nativeBarWidth=N.barHeight=N.barWidth=0,N.scrollbarsClipped=!1,N.lineNumWidth=N.lineNumInnerWidth=N.lineNumChars=null,N.alignWidgets=!1,N.cachedCharWidth=N.cachedTextHeight=N.cachedPaddingH=null,N.maxLine=null,N.maxLineLength=0,N.maxLineChanged=!1,N.wheelDX=N.wheelDY=N.wheelStartX=N.wheelStartY=null,N.shift=!1,N.selForContextMenu=null,N.activeTouch=null,N.gutterSpecs=ka(O.gutters,O.lineNumbers),Mi(N),A.init(N)}var ci=0,fa=null;P?fa=-.53:I?fa=15:i?fa=-.7:p&&(fa=-1/3);function Fi(e){var r=e.wheelDeltaX,A=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),A==null&&e.detail&&e.axis==e.VERTICAL_AXIS?A=e.detail:A==null&&(A=e.wheelDelta),{x:r,y:A}}function Bi(e){var r=Fi(e);return r.x*=fa,r.y*=fa,r}function Hi(e,r){var A=Fi(r),O=A.x,N=A.y,Y=e.display,ne=Y.scroller,ue=ne.scrollWidth>ne.clientWidth,he=ne.scrollHeight>ne.clientHeight;if(!(O&&ue||N&&he))return;if(N&&s&&t){e:for(var ye=r.target,Ge=Y.view;ye!=ne;ye=ye.parentNode)for(var Je=0;Je<Ge.length;Je++)if(Ge[Je].node==ye){e.display.currentWheelTarget=ye;break e}}if(O&&!I&&!u&&fa!=null){N&&he&&Di(e,Math.max(0,ne.scrollTop+N*fa)),Ma(e,Math.max(0,ne.scrollLeft+O*fa)),(!N||N&&he)&&ie(r),Y.wheelStartX=null;return}if(N&&fa!=null){var Ct=N*fa,bt=e.doc.scrollTop,Qt=bt+Y.wrapper.clientHeight;Ct<0?bt=Math.max(0,bt+Ct-50):Qt=Math.min(e.doc.height,Qt+Ct+50),ji(e,{top:bt,bottom:Qt})}ci<20&&(Y.wheelStartX==null?(Y.wheelStartX=ne.scrollLeft,Y.wheelStartY=ne.scrollTop,Y.wheelDX=O,Y.wheelDY=N,setTimeout(function(){if(Y.wheelStartX==null)return;var ln=ne.scrollLeft-Y.wheelStartX,En=ne.scrollTop-Y.wheelStartY,On=En&&Y.wheelDY&&En/Y.wheelDY||ln&&Y.wheelDX&&ln/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!On)return;fa=(fa*ci+On)/(ci+1),++ci},200)):(Y.wheelDX+=O,Y.wheelDY+=N))}var Ba=function(e,r){this.ranges=e,this.primIndex=r};Ba.prototype.primary=function(){return this.ranges[this.primIndex]},Ba.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var A=this.ranges[r],O=e.ranges[r];if(!na(A.anchor,O.anchor)||!na(A.head,O.head))return!1}return!0},Ba.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Mr(Ea(this.ranges[r].anchor),Ea(this.ranges[r].head));return new Ba(e,this.primIndex)},Ba.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ba.prototype.contains=function(e,r){r||(r=e);for(var A=0;A<this.ranges.length;A++){var O=this.ranges[A];if(Yn(r,O.from())>=0&&Yn(e,O.to())<=0)return A}return-1};var Mr=function(e,r){this.anchor=e,this.head=r};Mr.prototype.from=function(){return Qr(this.anchor,this.head)},Mr.prototype.to=function(){return $r(this.anchor,this.head)},Mr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fr(e,r,A){var O=e&&e.options.selectionsMayTouch,N=r[A];r.sort(function(Ct,bt){return Yn(Ct.from(),bt.from())}),A=J(r,N);for(var Y=1;Y<r.length;Y++){var ne=r[Y],ue=r[Y-1],he=Yn(ue.to(),ne.from());if(O&&!ne.empty()?he>0:he>=0){var ye=Qr(ue.from(),ne.from()),Ge=$r(ue.to(),ne.to()),Je=ue.empty()?ne.from()==ne.head:ue.from()==ue.head;Y<=A&&--A,r.splice(--Y,2,new Mr(Je?Ge:ye,Je?ye:Ge))}}return new Ba(r,A)}function An(e,r){return new Ba([new Mr(e,r||e)],0)}function Zn(e){return e.text?en(e.from.line+e.text.length-1,K(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function yr(e,r){if(Yn(e,r.from)<0)return e;if(Yn(e,r.to)<=0)return Zn(r);var A=e.line+r.text.length-(r.to.line-r.from.line)-1,O=e.ch;return e.line==r.to.line&&(O+=Zn(r).ch-r.to.ch),en(A,O)}function Zr(e,r){for(var A=[],O=0;O<e.sel.ranges.length;O++){var N=e.sel.ranges[O];A.push(new Mr(yr(N.anchor,r),yr(N.head,r)))}return fr(e.cm,A,e.sel.primIndex)}function gi(e,r,A){return e.line==r.line?en(A.line,e.ch-r.ch+A.ch):en(A.line+(e.line-r.line),e.ch)}function ai(e,r,A){for(var O=[],N=en(e.first,0),Y=N,ne=0;ne<r.length;ne++){var ue=r[ne],he=gi(ue.from,N,Y),ye=gi(Zn(ue),N,Y);if(N=ue.to,Y=ye,A=="around"){var Ge=e.sel.ranges[ne],Je=Yn(Ge.head,Ge.anchor)<0;O[ne]=new Mr(Je?ye:he,Je?he:ye)}else O[ne]=new Mr(he,he)}return new Ba(O,e.sel.primIndex)}function Ta(e){e.doc.mode=at(e.options,e.doc.modeOption),Va(e)}function Va(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ni(e,100),e.state.modeGen++,e.curOp&&Nr(e)}function vi(e,r){return r.from.ch==0&&r.to.ch==0&&K(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wi(e,r,A,O){function N(Bn){return A?A[Bn]:null}function Y(Bn,Rn,Vn){dn(Bn,Rn,Vn,O),Kn(Bn,"change",Bn,r)}function ne(Bn,Rn){for(var Vn=[],dr=Bn;dr<Rn;++dr)Vn.push(new mn(ye[dr],N(dr),O));return Vn}var ue=r.from,he=r.to,ye=r.text,Ge=nn(e,ue.line),Je=nn(e,he.line),Ct=K(ye),bt=N(ye.length-1),Qt=he.line-ue.line;if(r.full)e.insert(0,ne(0,ye.length)),e.remove(ye.length,e.size-ye.length);else if(vi(e,r)){var ln=ne(0,ye.length-1);Y(Je,Je.text,bt),Qt&&e.remove(ue.line,Qt),ln.length&&e.insert(ue.line,ln)}else if(Ge==Je)if(ye.length==1)Y(Ge,Ge.text.slice(0,ue.ch)+Ct+Ge.text.slice(he.ch),bt);else{var En=ne(1,ye.length-1);En.push(new mn(Ct+Ge.text.slice(he.ch),bt,O)),Y(Ge,Ge.text.slice(0,ue.ch)+ye[0],N(0)),e.insert(ue.line+1,En)}else if(ye.length==1)Y(Ge,Ge.text.slice(0,ue.ch)+ye[0]+Je.text.slice(he.ch),N(0)),e.remove(ue.line+1,Qt);else{Y(Ge,Ge.text.slice(0,ue.ch)+ye[0],N(0)),Y(Je,Ct+Je.text.slice(he.ch),bt);var On=ne(1,ye.length-1);Qt>1&&e.remove(ue.line+1,Qt-1),e.insert(ue.line+1,On)}Kn(e,"change",e,r)}function ba(e,r,A){function O(N,Y,ne){if(N.linked)for(var ue=0;ue<N.linked.length;++ue){var he=N.linked[ue];if(he.doc==Y)continue;var ye=ne&&he.sharedHist;if(A&&!ye)continue;r(he.doc,ye),O(he.doc,N,ye)}}O(e,null,!0)}function vs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Pa(e),Ta(e),ys(e),e.options.lineWrapping||kt(e),e.options.mode=r.modeOption,Nr(e)}function ys(e){(e.doc.direction=="rtl"?U:v)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Fa(e,function(){ys(e),Nr(e)})}function Ko(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,r){var A={from:Ea(r.from),to:Zn(r),text:Un(e,r.from,r.to)};return Es(e,A,r.from.line,r.to.line+1),ba(e,function(O){return Es(O,A,r.from.line,r.to.line+1)},!0),A}function bs(e){for(;e.length;){var r=K(e);if(r.ranges)e.pop();else break}}function pl(e,r){if(r)return bs(e.done),K(e.done);if(e.done.length&&!K(e.done).ranges)return K(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),K(e.done)}function _s(e,r,A,O){var N=e.history;N.undone.length=0;var Y=+new Date,ne,ue;if((N.lastOp==O||N.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&N.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ne=pl(N,N.lastOp==O)))ue=K(ne.changes),Yn(r.from,r.to)==0&&Yn(r.from,ue.to)==0?ue.to=Zn(r):ne.changes.push(rs(e,r));else{var he=K(N.done);for((!he||!he.ranges)&&Go(e.sel,N.done),ne={changes:[rs(e,r)],generation:N.generation},N.done.push(ne);N.done.length>N.undoDepth;)N.done.shift(),N.done[0].ranges||N.done.shift()}N.done.push(A),N.generation=++N.maxGeneration,N.lastModTime=N.lastSelTime=Y,N.lastOp=N.lastSelOp=O,N.lastOrigin=N.lastSelOrigin=r.origin,ue||fe(e,"historyAdded")}function ml(e,r,A,O){var N=r.charAt(0);return N=="*"||N=="+"&&A.ranges.length==O.ranges.length&&A.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,A,O){var N=e.history,Y=O&&O.origin;A==N.lastSelOp||Y&&N.lastSelOrigin==Y&&(N.lastModTime==N.lastSelTime&&N.lastOrigin==Y||ml(e,Y,K(N.done),r))?N.done[N.done.length-1]=r:Go(r,N.done),N.lastSelTime=+new Date,N.lastSelOrigin=Y,N.lastSelOp=A,O&&O.clearRedo!==!1&&bs(N.undone)}function Go(e,r){var A=K(r);A&&A.ranges&&A.equals(e)||r.push(e)}function Es(e,r,A,O){var N=r["spans_"+e.id],Y=0;e.iter(Math.max(e.first,A),Math.min(e.first+e.size,O),function(ne){ne.markedSpans&&((N||(N=r["spans_"+e.id]={}))[Y]=ne.markedSpans),++Y})}function vl(e){if(!e)return null;for(var r,A=0;A<e.length;++A)e[A].marker.explicitlyCleared?r||(r=e.slice(0,A)):r&&r.push(e[A]);return r?r.length?r:null:e}function yl(e,r){var A=r["spans_"+e.id];if(!A)return null;for(var O=[],N=0;N<r.text.length;++N)O.push(vl(A[N]));return O}function xs(e,r){var A=yl(e,r),O=sr(e,r);if(!A)return O;if(!O)return A;for(var N=0;N<A.length;++N){var Y=A[N],ne=O[N];if(Y&&ne){e:for(var ue=0;ue<ne.length;++ue){for(var he=ne[ue],ye=0;ye<Y.length;++ye)if(Y[ye].marker==he.marker)continue e;Y.push(he)}}else ne&&(A[N]=ne)}return A}function vo(e,r,A){for(var O=[],N=0;N<e.length;++N){var Y=e[N];if(Y.ranges){O.push(A?Ba.prototype.deepCopy.call(Y):Y);continue}var ne=Y.changes,ue=[];O.push({changes:ue});for(var he=0;he<ne.length;++he){var ye=ne[he],Ge=void 0;if(ue.push({from:ye.from,to:ye.to,text:ye.text}),r)for(var Je in ye)(Ge=Je.match(/^spans_(\d+)$/))&&(J(r,Number(Ge[1]))>-1&&(K(ue)[Je]=ye[Je],delete ye[Je]))}}return O}function as(e,r,A,O){if(O){var N=e.anchor;if(A){var Y=Yn(r,N)<0;Y!=Yn(A,N)<0?(N=r,r=A):Y!=Yn(r,A)<0&&(r=A)}return new Mr(N,r)}else return new Mr(A||r,r)}function Vo(e,r,A,O,N){N==null&&(N=e.cm&&(e.cm.display.shift||e.extend)),Wa(e,new Ba([as(e.sel.primary(),r,A,N)],0),O)}function ws(e,r,A){for(var O=[],N=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y<e.sel.ranges.length;Y++)O[Y]=as(e.sel.ranges[Y],r[Y],null,N);var ne=fr(e.cm,O,e.sel.primIndex);Wa(e,ne,A)}function is(e,r,A,O){var N=e.sel.ranges.slice(0);N[r]=A,Wa(e,fr(e.cm,N,e.sel.primIndex),O)}function Cs(e,r,A,O){Wa(e,An(r,A),O)}function bl(e,r,A){var O={ranges:r.ranges,update:function(N){this.ranges=[];for(var Y=0;Y<N.length;Y++)this.ranges[Y]=new Mr($n(e,N[Y].anchor),$n(e,N[Y].head))},origin:A&&A.origin};return fe(e,"beforeSelectionChange",e,O),e.cm&&fe(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=r.ranges?fr(e.cm,O.ranges,O.ranges.length-1):r}function Ts(e,r,A){var O=e.history.done,N=K(O);N&&N.ranges?(O[O.length-1]=r,Xo(e,r,A)):Wa(e,r,A)}function Wa(e,r,A){Xo(e,r,A),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,A)}function Xo(e,r,A){(de(e,"beforeSelectionChange")||e.cm&&de(e.cm,"beforeSelectionChange"))&&(r=bl(e,r,A));var O=A&&A.bias||(Yn(r.primary().head,e.sel.primary().head)<0?-1:1);Ss(e,Rs(e,r,O,!0)),!(A&&A.scroll===!1)&&e.cm&&yi(e.cm)}function Ss(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,se(e.cm)),Kn(e,"cursorActivity",e)}function Os(e){Ss(e,Rs(e,e.sel,null,!1))}function Rs(e,r,A,O){for(var N,Y=0;Y<r.ranges.length;Y++){var ne=r.ranges[Y],ue=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],he=Yo(e,ne.anchor,ue&&ue.anchor,A,O),ye=Yo(e,ne.head,ue&&ue.head,A,O);(N||he!=ne.anchor||ye!=ne.head)&&(N||(N=r.ranges.slice(0,Y)),N[Y]=new Mr(he,ye))}return N?fr(e.cm,N,r.primIndex):r}function yo(e,r,A,O,N){var Y=nn(e,r.line);if(Y.markedSpans)for(var ne=0;ne<Y.markedSpans.length;++ne){var ue=Y.markedSpans[ne],he=ue.marker,ye="selectLeft"in he?!he.selectLeft:he.inclusiveLeft,Ge="selectRight"in he?!he.selectRight:he.inclusiveRight;if((ue.from==null||(ye?ue.from<=r.ch:ue.from<r.ch))&&(ue.to==null||(Ge?ue.to>=r.ch:ue.to>r.ch))){if(N&&(fe(he,"beforeCursorEnter"),he.explicitlyCleared))if(Y.markedSpans){--ne;continue}else break;if(!he.atomic)continue;if(A){var Je=he.find(O<0?1:-1),Ct=void 0;if((O<0?Ge:ye)&&(Je=As(e,Je,-O,Je&&Je.line==r.line?Y:null)),Je&&Je.line==r.line&&(Ct=Yn(Je,A))&&(O<0?Ct<0:Ct>0))return yo(e,Je,r,O,N)}var bt=he.find(O<0?-1:1);return(O<0?ye:Ge)&&(bt=As(e,bt,O,bt.line==r.line?Y:null)),bt?yo(e,bt,r,O,N):null}}return r}function Yo(e,r,A,O,N){var Y=O||1,ne=yo(e,r,A,Y,N)||!N&&yo(e,r,A,Y,!0)||yo(e,r,A,-Y,N)||!N&&yo(e,r,A,-Y,!0);return ne||(e.cantEdit=!0,en(e.first,0))}function As(e,r,A,O){return A<0&&r.ch==0?r.line>e.first?$n(e,en(r.line-1)):null:A>0&&r.ch==(O||nn(e,r.line)).text.length?r.line<e.first+e.size-1?en(r.line+1,0):null:new en(r.line,r.ch+A)}function Ds(e){e.setSelection(en(e.firstLine(),0),en(e.lastLine()),ce)}function Ms(e,r,A){var O={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return O.canceled=!0}};return A&&(O.update=function(N,Y,ne,ue){N&&(O.from=$n(e,N)),Y&&(O.to=$n(e,Y)),ne&&(O.text=ne),ue!==void 0&&(O.origin=ue)}),fe(e,"beforeChange",e,O),e.cm&&fe(e.cm,"beforeChange",e.cm,O),O.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:O.from,to:O.to,text:O.text,origin:O.origin}}function bo(e,r,A){if(e.cm){if(!e.cm.curOp)return ra(e.cm,bo)(e,r,A);if(e.cm.state.suppressEdits)return}if((de(e,"beforeChange")||e.cm&&de(e.cm,"beforeChange"))&&(r=Ms(e,r,!0),!r))return;var O=Xn&&!A&&Le(e,r.from,r.to);if(O)for(var N=O.length-1;N>=0;--N)Ls(e,{from:O[N].from,to:O[N].to,text:N?[""]:r.text,origin:r.origin});else Ls(e,r)}function Ls(e,r){if(r.text.length==1&&r.text[0]==""&&Yn(r.from,r.to)==0)return;var A=Zr(e,r);_s(e,r,A,e.cm?e.cm.curOp.id:NaN),Mo(e,r,A,sr(e,r));var O=[];ba(e,function(N,Y){!Y&&J(O,N.history)==-1&&(Ns(N.history,r),O.push(N.history)),Mo(N,r,null,sr(N,r))})}function $o(e,r,A){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!A)return;for(var N=e.history,Y,ne=e.sel,ue=r=="undo"?N.done:N.undone,he=r=="undo"?N.undone:N.done,ye=0;ye<ue.length&&!(Y=ue[ye],A?Y.ranges&&!Y.equals(e.sel):!Y.ranges);ye++);if(ye==ue.length)return;for(N.lastOrigin=N.lastSelOrigin=null;;)if(Y=ue.pop(),Y.ranges){if(Go(Y,he),A&&!Y.equals(e.sel)){Wa(e,Y,{clearRedo:!1});return}ne=Y}else if(O){ue.push(Y);return}else break;var Ge=[];Go(ne,he),he.push({changes:Ge,generation:N.generation}),N.generation=Y.generation||++N.maxGeneration;for(var Je=de(e,"beforeChange")||e.cm&&de(e.cm,"beforeChange"),Ct=function(ln){var En=Y.changes[ln];if(En.origin=r,Je&&!Ms(e,En,!1))return ue.length=0,{};Ge.push(rs(e,En));var On=ln?Zr(e,En):K(ue);Mo(e,En,On,xs(e,En)),!ln&&e.cm&&e.cm.scrollIntoView({from:En.from,to:Zn(En)});var Bn=[];ba(e,function(Rn,Vn){!Vn&&J(Bn,Rn.history)==-1&&(Ns(Rn.history,En),Bn.push(Rn.history)),Mo(Rn,En,null,xs(Rn,En))})},bt=Y.changes.length-1;bt>=0;--bt){var Qt=Ct(bt);if(Qt)return Qt.v}}function Ps(e,r){if(r==0)return;if(e.first+=r,e.sel=new Ba(V(e.sel.ranges,function(N){return new Mr(en(N.anchor.line+r,N.anchor.ch),en(N.head.line+r,N.head.ch))}),e.sel.primIndex),e.cm){Nr(e.cm,e.first,e.first-r,r);for(var A=e.cm.display,O=A.viewFrom;O<A.viewTo;O++)Fr(e.cm,O,"gutter")}}function Mo(e,r,A,O){if(e.cm&&!e.cm.curOp)return ra(e.cm,Mo)(e,r,A,O);if(r.to.line<e.first){Ps(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var N=r.text.length-1-(e.first-r.from.line);Ps(e,N),r={from:en(e.first,0),to:en(r.to.line+N,r.to.ch),text:[K(r.text)],origin:r.origin}}var Y=e.lastLine();r.to.line>Y&&(r={from:r.from,to:en(Y,nn(e,Y).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Un(e,r.from,r.to),A||(A=Zr(e,r)),e.cm?_l(e.cm,r,O):Wi(e,r,O),Xo(e,A,ce),e.cantEdit&&Yo(e,en(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,r,A){var O=e.doc,N=e.display,Y=r.from,ne=r.to,ue=!1,he=Y.line;e.options.lineWrapping||(he=zn(Et(nn(O,Y.line))),O.iter(he,ne.line+1,function(bt){if(bt==N.maxLine)return ue=!0,!0})),O.sel.contains(r.from,r.to)>-1&&se(e),Wi(O,r,A,Qa(e)),e.options.lineWrapping||(O.iter(he,Y.line+r.text.length,function(bt){var Qt=wt(bt);Qt>N.maxLineLength&&(N.maxLine=bt,N.maxLineLength=Qt,N.maxLineChanged=!0,ue=!1)}),ue&&(e.curOp.updateMaxLine=!0)),qn(O,Y.line),Ni(e,400);var ye=r.text.length-(ne.line-Y.line)-1;r.full?Nr(e):Y.line==ne.line&&r.text.length==1&&!vi(e.doc,r)?Fr(e,Y.line,"text"):Nr(e,Y.line,ne.line+1,ye);var Ge=de(e,"changes"),Je=de(e,"change");if(Je||Ge){var Ct={from:Y,to:ne,text:r.text,removed:r.removed,origin:r.origin};Je&&Kn(e,"change",e,Ct),Ge&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ct)}e.display.selForContextMenu=null}function _o(e,r,A,O,N){var Y;O||(O=A),Yn(O,A)<0&&(Y=[O,A],A=Y[0],O=Y[1]),typeof r=="string"&&(r=e.splitLines(r)),bo(e,{from:A,to:O,text:r,origin:N})}function Is(e,r,A,O){A<e.line?e.line+=O:r<e.line&&(e.line=r,e.ch=0)}function ks(e,r,A,O){for(var N=0;N<e.length;++N){var Y=e[N],ne=!0;if(Y.ranges){Y.copied||(Y=e[N]=Y.deepCopy(),Y.copied=!0);for(var ue=0;ue<Y.ranges.length;ue++)Is(Y.ranges[ue].anchor,r,A,O),Is(Y.ranges[ue].head,r,A,O);continue}for(var he=0;he<Y.changes.length;++he){var ye=Y.changes[he];if(A<ye.from.line)ye.from=en(ye.from.line+O,ye.from.ch),ye.to=en(ye.to.line+O,ye.to.ch);else if(r<=ye.to.line){ne=!1;break}}ne||(e.splice(0,N+1),N=0)}}function Ns(e,r){var A=r.from.line,O=r.to.line,N=r.text.length-(O-A)-1;ks(e.done,A,O,N),ks(e.undone,A,O,N)}function Lo(e,r,A,O){var N=r,Y=r;return typeof r=="number"?Y=nn(e,Jr(e,r)):N=zn(r),N==null?null:(O(Y,N)&&e.cm&&Fr(e.cm,N,A),Y)}function Po(e){this.lines=e,this.parent=null;for(var r=0,A=0;A<e.length;++A)e[A].parent=this,r+=e[A].height;this.height=r}Po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var A=e,O=e+r;A<O;++A){var N=this.lines[A];this.height-=N.height,vt(N),Kn(N,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,A){this.height+=A,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var O=0;O<r.length;++O)r[O].parent=this},iterN:function(e,r,A){for(var O=e+r;e<O;++e)if(A(this.lines[e]))return!0}};function Io(e){this.children=e;for(var r=0,A=0,O=0;O<e.length;++O){var N=e[O];r+=N.chunkSize(),A+=N.height,N.parent=this}this.size=r,this.height=A,this.parent=null}Io.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var A=0;A<this.children.length;++A){var O=this.children[A],N=O.chunkSize();if(e<N){var Y=Math.min(r,N-e),ne=O.height;if(O.removeInner(e,Y),this.height-=ne-O.height,N==Y&&(this.children.splice(A--,1),O.parent=null),(r-=Y)==0)break;e=0}else e-=N}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Po))){var ue=[];this.collapse(ue),this.children=[new Po(ue)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,A){this.size+=r.length,this.height+=A;for(var O=0;O<this.children.length;++O){var N=this.children[O],Y=N.chunkSize();if(e<=Y){if(N.insertInner(e,r,A),N.lines&&N.lines.length>50){for(var ne=N.lines.length%25+25,ue=ne;ue<N.lines.length;){var he=new Po(N.lines.slice(ue,ue+=25));N.height-=he.height,this.children.splice(++O,0,he),he.parent=this}N.lines=N.lines.slice(0,ne),this.maybeSpill()}break}e-=Y}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),A=new Io(r);if(e.parent){e.size-=A.size,e.height-=A.height;var N=J(e.parent.children,e);e.parent.children.splice(N+1,0,A)}else{var O=new Io(e.children);O.parent=e,e.children=[O,A],e=O}A.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,A){for(var O=0;O<this.children.length;++O){var N=this.children[O],Y=N.chunkSize();if(e<Y){var ne=Math.min(r,Y-e);if(N.iterN(e,ne,A))return!0;if((r-=ne)==0)break;e=0}else e-=Y}}};var ko=function(e,r,A){if(A)for(var O in A)A.hasOwnProperty(O)&&(this[O]=A[O]);this.doc=e,this.node=r};ko.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,A=this.line,O=zn(A);if(O==null||!r)return;for(var N=0;N<r.length;++N)r[N]==this&&r.splice(N--,1);r.length||(A.widgets=null);var Y=zr(this);xn(A,Math.max(0,A.height-Y)),e&&(Fa(e,function(){js(e,A,-Y),Fr(e,O,"widget")}),Kn(e,"lineWidgetCleared",e,this,O))},ko.prototype.changed=function(){var e=this,r=this.height,A=this.doc.cm,O=this.line;this.height=null;var N=zr(this)-r;if(!N)return;un(this.doc,O)||xn(O,O.height+N),A&&Fa(A,function(){A.curOp.forceUpdate=!0,js(A,O,N),Kn(A,"lineWidgetChanged",A,e,zn(O))})},ve(ko);function js(e,r,A){Cn(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Vi(e,A)}function El(e,r,A,O){var N=new ko(e,A,O),Y=e.cm;return Y&&N.noHScroll&&(Y.display.alignWidgets=!0),Lo(e,r,"widget",function(ne){var ue=ne.widgets||(ne.widgets=[]);if(N.insertAt==null?ue.push(N):ue.splice(Math.min(ue.length-1,Math.max(0,N.insertAt)),0,N),N.line=ne,Y&&!un(e,ne)){var he=Cn(ne)<e.scrollTop;xn(ne,ne.height+zr(N)),he&&Vi(Y,N.height),Y.curOp.forceUpdate=!0}return!0}),Y&&Kn(Y,"lineWidgetAdded",Y,N,typeof r=="number"?r:zn(r)),N}var Us=0,qi=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Us};qi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ui(e),de(this,"clear")){var A=this.find();A&&Kn(this,"clear",A.from,A.to)}for(var O=null,N=null,Y=0;Y<this.lines.length;++Y){var ne=this.lines[Y],ue=rr(ne.markedSpans,this);e&&!this.collapsed?Fr(e,zn(ne),"text"):e&&(ue.to!=null&&(N=zn(ne)),ue.from!=null&&(O=zn(ne))),ne.markedSpans=wn(ne.markedSpans,ue),ue.from==null&&this.collapsed&&!un(this.doc,ne)&&e&&xn(ne,Ar(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var he=0;he<this.lines.length;++he){var ye=Et(this.lines[he]),Ge=wt(ye);Ge>e.display.maxLineLength&&(e.display.maxLine=ye,e.display.maxLineLength=Ge,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Nr(e,O,N+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Kn(e,"markerCleared",e,this,O,N),r&&Ei(e),this.parent&&this.parent.clear()},qi.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var A,O,N=0;N<this.lines.length;++N){var Y=this.lines[N],ne=rr(Y.markedSpans,this);if(ne.from!=null&&(A=en(r?Y:zn(Y),ne.from),e==-1))return A;if(ne.to!=null&&(O=en(r?Y:zn(Y),ne.to),e==1))return O}return A&&{from:A,to:O}},qi.prototype.changed=function(){var e=this,r=this.find(-1,!0),A=this,O=this.doc.cm;if(!r||!O)return;Fa(O,function(){var N=r.line,Y=zn(r.line),ne=nt(O,Y);if(ne&&(er(ne),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!un(A.doc,N)&&A.height!=null){var ue=A.height;A.height=null;var he=zr(A)-ue;he&&xn(N,N.height+he)}Kn(O,"markerChanged",O,e)})},qi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||J(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},qi.prototype.detachLine=function(e){if(this.lines.splice(J(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},ve(qi);function Eo(e,r,A,O,N){if(O&&O.shared)return xl(e,r,A,O,N);if(e.cm&&!e.cm.curOp)return ra(e.cm,Eo)(e,r,A,O,N);var Y=new qi(e,N),ne=Yn(r,A);if(O&&L(O,Y,!1),ne>0||ne==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=_("span",[Y.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(Zt(e,r.line,r,A,Y)||r.line!=A.line&&Zt(e,A.line,r,A,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");jn()}Y.addToHistory&&_s(e,{from:r,to:A,origin:"markText"},e.sel,NaN);var ue=r.line,he=e.cm,ye;if(e.iter(ue,A.line+1,function(Je){he&&Y.collapsed&&!he.options.lineWrapping&&Et(Je)==he.display.maxLine&&(ye=!0),Y.collapsed&&ue!=r.line&&xn(Je,0),Er(Je,new Jn(Y,ue==r.line?r.ch:null,ue==A.line?A.ch:null)),++ue}),Y.collapsed&&e.iter(r.line,A.line+1,function(Je){un(e,Je)&&xn(Je,0)}),Y.clearOnEnter&&Pe(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(hr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Us,Y.atomic=!0),he){if(ye&&(he.curOp.updateMaxLine=!0),Y.collapsed)Nr(he,r.line,A.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var Ge=r.line;Ge<=A.line;Ge++)Fr(he,Ge,"text");Y.atomic&&Os(he.doc),Kn(he,"markerAdded",he,Y)}return Y}var No=function(e,r){this.markers=e,this.primary=r;for(var A=0;A<e.length;++A)e[A].parent=this};No.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Kn(this,"clear")},No.prototype.find=function(e,r){return this.primary.find(e,r)},ve(No);function xl(e,r,A,O,N){O=L(O),O.shared=!1;var Y=[Eo(e,r,A,O,N)],ne=Y[0],ue=O.widgetNode;return ba(e,function(he){ue&&(O.widgetNode=ue.cloneNode(!0)),Y.push(Eo(he,$n(he,r),$n(he,A),O,N));for(var ye=0;ye<he.linked.length;++ye)if(he.linked[ye].isParent)return;ne=K(Y)}),new No(Y,ne)}function Fs(e){return e.findMarks(en(e.first,0),e.clipPos(en(e.lastLine())),function(r){return r.parent})}function wl(e,r){for(var A=0;A<r.length;A++){var O=r[A],N=O.find(),Y=e.clipPos(N.from),ne=e.clipPos(N.to);if(Yn(Y,ne)){var ue=Eo(e,Y,ne,O.primary,O.primary.type);O.markers.push(ue),ue.parent=O}}}function Cl(e){for(var r=function(O){var N=e[O],Y=[N.primary.doc];ba(N.primary.doc,function(he){return Y.push(he)});for(var ne=0;ne<N.markers.length;ne++){var ue=N.markers[ne];J(Y,ue.doc)==-1&&(ue.parent=null,N.markers.splice(ne--,1))}},A=0;A<e.length;A++)r(A)}var Tl=0,ei=function(e,r,A,O,N){if(!(this instanceof ei))return new ei(e,r,A,O,N);A==null&&(A=0),Io.call(this,[new Po([new mn("",null)])]),this.first=A,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=A;var Y=en(A,0);this.sel=An(Y),this.history=new Ko(null),this.id=++Tl,this.modeOption=r,this.lineSep=O,this.direction=N=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Wi(this,{from:Y,to:Y,text:e}),Wa(this,An(Y),ce)};ei.prototype=Q(Io.prototype,{constructor:ei,iter:function(e,r,A){A?this.iterN(e-this.first,r-e,A):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var A=0,O=0;O<r.length;++O)A+=r[O].height;this.insertInner(e-this.first,r,A)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=ar(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:aa(function(e){var r=en(this.first,0),A=this.first+this.size-1;bo(this,{from:r,to:en(A,nn(this,A).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ri(this.cm,0,0),Wa(this,An(r),ce)}),replaceRange:function(e,r,A,O){r=$n(this,r),A=A?$n(this,A):r,_o(this,e,r,A,O)},getRange:function(e,r,A){var O=Un(this,$n(this,e),$n(this,r));return A===!1?O:O.join(A||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(Lr(this,e))return nn(this,e)},getLineNumber:function(e){return zn(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=nn(this,e)),Et(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return $n(this,e)},getCursor:function(e){var r=this.sel.primary(),A;return e==null||e=="head"?A=r.head:e=="anchor"?A=r.anchor:e=="end"||e=="to"||e===!1?A=r.to():A=r.from(),A},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:aa(function(e,r,A){Cs(this,$n(this,typeof e=="number"?en(e,r||0):e),null,A)}),setSelection:aa(function(e,r,A){Cs(this,$n(this,e),$n(this,r||e),A)}),extendSelection:aa(function(e,r,A){Vo(this,$n(this,e),r&&$n(this,r),A)}),extendSelections:aa(function(e,r){ws(this,sn(this,e),r)}),extendSelectionsBy:aa(function(e,r){var A=V(this.sel.ranges,e);ws(this,sn(this,A),r)}),setSelections:aa(function(e,r,A){if(!e.length)return;for(var O=[],N=0;N<e.length;N++)O[N]=new Mr($n(this,e[N].anchor),$n(this,e[N].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Wa(this,fr(this.cm,O,r),A)}),addSelection:aa(function(e,r,A){var O=this.sel.ranges.slice(0);O.push(new Mr($n(this,e),$n(this,r||e))),Wa(this,fr(this.cm,O,O.length-1),A)}),getSelection:function(e){for(var r=this.sel.ranges,A,O=0;O<r.length;O++){var N=Un(this,r[O].from(),r[O].to());A=A?A.concat(N):N}return e===!1?A:A.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],A=this.sel.ranges,O=0;O<A.length;O++){var N=Un(this,A[O].from(),A[O].to());e!==!1&&(N=N.join(e||this.lineSeparator())),r[O]=N}return r},replaceSelection:function(e,r,A){for(var O=[],N=0;N<this.sel.ranges.length;N++)O[N]=e;this.replaceSelections(O,r,A||"+input")},replaceSelections:aa(function(e,r,A){for(var O=[],N=this.sel,Y=0;Y<N.ranges.length;Y++){var ne=N.ranges[Y];O[Y]={from:ne.from(),to:ne.to(),text:this.splitLines(e[Y]),origin:A}}for(var ue=r&&r!="end"&&ai(this,O,r),he=O.length-1;he>=0;he--)bo(this,O[he]);ue?Ts(this,ue):this.cm&&yi(this.cm)}),undo:aa(function(){$o(this,"undo")}),redo:aa(function(){$o(this,"redo")}),undoSelection:aa(function(){$o(this,"undo",!0)}),redoSelection:aa(function(){$o(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,A=0,O=0;O<e.done.length;O++)e.done[O].ranges||++r;for(var N=0;N<e.undone.length;N++)e.undone[N].ranges||++A;return{undo:r,redo:A}},clearHistory:function(){var e=this;this.history=new Ko(this.history.maxGeneration),ba(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:vo(this.history.done),undone:vo(this.history.undone)}},setHistory:function(e){var r=this.history=new Ko(this.history.maxGeneration);r.done=vo(e.done.slice(0),null,!0),r.undone=vo(e.undone.slice(0),null,!0)},setGutterMarker:aa(function(e,r,A){return Lo(this,e,"gutter",function(O){var N=O.gutterMarkers||(O.gutterMarkers={});return N[r]=A,!A&&le(N)&&(O.gutterMarkers=null),!0})}),clearGutter:aa(function(e){var r=this;this.iter(function(A){A.gutterMarkers&&A.gutterMarkers[e]&&Lo(r,A,"gutter",function(){return A.gutterMarkers[e]=null,le(A.gutterMarkers)&&(A.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!Lr(this,e))return null;if(r=e,e=nn(this,e),!e)return null}else if(r=zn(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:aa(function(e,r,A){return Lo(this,e,r=="gutter"?"gutter":"class",function(O){var N=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!O[N])O[N]=A;else{if(w(A).test(O[N]))return!1;O[N]+=" "+A}return!0})}),removeLineClass:aa(function(e,r,A){return Lo(this,e,r=="gutter"?"gutter":"class",function(O){var N=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",Y=O[N];if(Y)if(A==null)O[N]=null;else{var ne=Y.match(w(A));if(!ne)return!1;var ue=ne.index+ne[0].length;O[N]=Y.slice(0,ne.index)+(!ne.index||ue==Y.length?"":" ")+Y.slice(ue)||null}else return!1;return!0})}),addLineWidget:aa(function(e,r,A){return El(this,e,r,A)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,A){return Eo(this,$n(this,e),$n(this,r),A,A&&A.type||"range")},setBookmark:function(e,r){var A={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=$n(this,e),Eo(this,e,e,A,"bookmark")},findMarksAt:function(e){e=$n(this,e);var r=[],A=nn(this,e.line).markedSpans;if(A)for(var O=0;O<A.length;++O){var N=A[O];(N.from==null||N.from<=e.ch)&&(N.to==null||N.to>=e.ch)&&r.push(N.marker.parent||N.marker)}return r},findMarks:function(e,r,A){e=$n(this,e),r=$n(this,r);var O=[],N=e.line;return this.iter(e.line,r.line+1,function(Y){var ne=Y.markedSpans;if(ne)for(var ue=0;ue<ne.length;ue++){var he=ne[ue];!(he.to!=null&&N==e.line&&e.ch>=he.to||he.from==null&&N!=e.line||he.from!=null&&N==r.line&&he.from>=r.ch)&&(!A||A(he.marker))&&O.push(he.marker.parent||he.marker)}++N}),O},getAllMarks:function(){var e=[];return this.iter(function(r){var A=r.markedSpans;if(A)for(var O=0;O<A.length;++O)A[O].from!=null&&e.push(A[O].marker)}),e},posFromIndex:function(e){var r,A=this.first,O=this.lineSeparator().length;return this.iter(function(N){var Y=N.text.length+O;if(Y>e)return r=e,!0;e-=Y,++A}),$n(this,en(A,r))},indexFromPos:function(e){e=$n(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var A=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){r+=O.text.length+A}),r},copy:function(e){var r=new ei(ar(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,A=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<A&&(A=e.to);var O=new ei(ar(this,r,A),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(O.history=this.history),(this.linked||(this.linked=[])).push({doc:O,sharedHist:e.sharedHist}),O.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(O,Fs(this)),O},unlinkDoc:function(e){if(e instanceof ia&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var A=this.linked[r];if(A.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var O=[e.id];ba(e,function(N){return O.push(N.id)},!0),e.history=new Ko(null),e.history.done=vo(this.history.done,O),e.history.undone=vo(this.history.undone,O)}},iterLinkedDocs:function(e){ba(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:aa(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&fl(this.cm)})}),ei.prototype.eachLine=ei.prototype.iter;var Bs=0;function Sl(e){var r=this;if(Hs(r),ae(r,e)||va(r.display,e))return;ie(e),P&&(Bs=+new Date);var A=ya(r,e,!0),O=e.dataTransfer.files;if(!A||r.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var N=O.length,Y=Array(N),ne=0,ue=function(){++ne==N&&ra(r,function(){A=$n(r.doc,A);var bt={from:A,to:A,text:r.doc.splitLines(Y.filter(function(Qt){return Qt!=null}).join(r.doc.lineSeparator())),origin:"paste"};bo(r.doc,bt),Ts(r.doc,An($n(r.doc,A),$n(r.doc,Zn(bt))))})()},he=function(bt,Qt){if(r.options.allowDropFileTypes&&J(r.options.allowDropFileTypes,bt.type)==-1){ue();return}var ln=new FileReader;ln.onerror=function(){return ue()},ln.onload=function(){var En=ln.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(En)){ue();return}Y[Qt]=En,ue()},ln.readAsText(bt)},ye=0;ye<O.length;ye++)he(O[ye],ye);else{if(r.state.draggingText&&r.doc.sel.contains(A)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Ge=e.dataTransfer.getData("Text");if(Ge){var Je;if(r.state.draggingText&&!r.state.draggingText.copy&&(Je=r.listSelections()),Xo(r.doc,An(A,A)),Je)for(var Ct=0;Ct<Je.length;++Ct)_o(r.doc,"",Je[Ct].anchor,Je[Ct].head,"drag");r.replaceSelection(Ge,"around","paste"),r.display.input.focus()}}catch(bt){}}}function Ol(e,r){if(P&&(!e.state.draggingText||+new Date-Bs<100)){we(r);return}if(ae(e,r)||va(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!p){var A=m("img",null,null,"position: fixed; left: 0; top: 0;");A.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(A.width=A.height=1,e.display.wrapper.appendChild(A),A._top=A.offsetTop),r.dataTransfer.setDragImage(A,0,0),u&&A.parentNode.removeChild(A)}}function Rl(e,r){var A=ya(e,r);if(!A)return;var O=document.createDocumentFragment();Za(e,A,O),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),f(e.display.dragCursor,O)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),A=[],O=0;O<r.length;O++){var N=r[O].CodeMirror;N&&A.push(N)}A.length&&A[0].operation(function(){for(var Y=0;Y<A.length;Y++)e(A[Y])})}var zs=!1;function Al(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ml)},100))}),Pe(window,"blur",function(){return Ws(Ci)})}function Ml(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var eo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},jo=0;jo<10;jo++)eo[jo+48]=eo[jo+96]=String(jo);for(var Qo=65;Qo<=90;Qo++)eo[Qo]=String.fromCharCode(Qo);for(var Uo=1;Uo<=12;Uo++)eo[Uo+111]=eo[Uo+63235]="F"+Uo;var zi={};zi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zi.default=s?zi.macDefault:zi.pcDefault;function Ll(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var A,O,N,Y,ne=0;ne<r.length-1;ne++){var ue=r[ne];if(/^(cmd|meta|m)$/i.test(ue))Y=!0;else if(/^a(lt)?$/i.test(ue))A=!0;else if(/^(c|ctrl|control)$/i.test(ue))O=!0;else if(/^s(hift)?$/i.test(ue))N=!0;else throw new Error("Unrecognized modifier name: "+ue)}return A&&(e="Alt-"+e),O&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),N&&(e="Shift-"+e),e}function Pl(e){var r={};for(var A in e)if(e.hasOwnProperty(A)){var O=e[A];if(/^(name|fallthrough|(de|at)tach)$/.test(A))continue;if(O=="..."){delete e[A];continue}for(var N=V(A.split(" "),Ll),Y=0;Y<N.length;Y++){var ne=void 0,ue=void 0;Y==N.length-1?(ue=N.join(" "),ne=O):(ue=N.slice(0,Y+1).join(" "),ne="...");var he=r[ue];if(!he)r[ue]=ne;else if(he!=ne)throw new Error("Inconsistent bindings for "+ue)}delete e[A]}for(var ye in r)e[ye]=r[ye];return e}function xo(e,r,A,O){r=Jo(r);var N=r.call?r.call(e,O):r[e];if(N===!1)return"nothing";if(N==="...")return"multi";if(N!=null&&A(N))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return xo(e,r.fallthrough,A,O);for(var Y=0;Y<r.fallthrough.length;Y++){var ne=xo(e,r.fallthrough[Y],A,O);if(ne)return ne}}}function Ks(e){var r=typeof e=="string"?e:eo[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Gs(e,r,A){var O=e;return r.altKey&&O!="Alt"&&(e="Alt-"+e),(T?r.metaKey:r.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(T?r.ctrlKey:r.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!A&&r.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function Vs(e,r){if(u&&e.keyCode==34&&e.char)return!1;var A=eo[e.keyCode];return A==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(A=e.code),Gs(A,e,r))}function Jo(e){return typeof e=="string"?zi[e]:e}function wo(e,r){for(var A=e.doc.sel.ranges,O=[],N=0;N<A.length;N++){for(var Y=r(A[N]);O.length&&Yn(Y.from,K(O).to)<=0;){var ne=O.pop();if(Yn(ne.from,Y.from)<0){Y.from=ne.from;break}}O.push(Y)}Fa(e,function(){for(var ue=O.length-1;ue>=0;ue--)_o(e.doc,"",O[ue].from,O[ue].to,"+delete");yi(e)})}function os(e,r,A){var O=He(e.text,r+A,A);return O<0||O>e.text.length?null:O}function ss(e,r,A){var O=os(e,r.ch,A);return O==null?null:new en(r.line,O,A<0?"after":"before")}function ls(e,r,A,O,N){if(e){r.doc.direction=="rtl"&&(N=-N);var Y=Wt(A,r.doc.direction);if(Y){var ne=N<0?K(Y):Y[0],ue=N<0==(ne.level==1),he=ue?"after":"before",ye;if(ne.level>0||r.doc.direction=="rtl"){var Ge=Ve(r,A);ye=N<0?A.text.length-1:0;var Je=ct(r,Ge,ye).top;ye=et(function(Ct){return ct(r,Ge,Ct).top==Je},N<0==(ne.level==1)?ne.from:ne.to-1,ye),he=="before"&&(ye=os(A,ye,1))}else ye=N<0?ne.to:ne.from;return new en(O,ye,he)}}return new en(O,N<0?A.text.length:0,N<0?"before":"after")}function Il(e,r,A,O){var N=Wt(r,e.doc.direction);if(!N)return ss(r,A,O);A.ch>=r.text.length?(A.ch=r.text.length,A.sticky="before"):A.ch<=0&&(A.ch=0,A.sticky="after");var Y=We(N,A.ch,A.sticky),ne=N[Y];if(e.doc.direction=="ltr"&&ne.level%2==0&&(O>0?ne.to>A.ch:ne.from<A.ch))return ss(r,A,O);var ue=function(On,Bn){return os(r,On instanceof en?On.ch:On,Bn)},he,ye=function(On){return e.options.lineWrapping?(he=he||Ve(e,r),Fn(e,r,he,On)):{begin:0,end:r.text.length}},Ge=ye(A.sticky=="before"?ue(A,-1):A.ch);if(e.doc.direction=="rtl"||ne.level==1){var Je=ne.level==1==O<0,Ct=ue(A,Je?1:-1);if(Ct!=null&&(Je?Ct<=ne.to&&Ct<=Ge.end:Ct>=ne.from&&Ct>=Ge.begin)){var bt=Je?"before":"after";return new en(A.line,Ct,bt)}}var Qt=function(On,Bn,Rn){for(var Vn=function(qr,Na){return Na?new en(A.line,ue(qr,1),"before"):new en(A.line,qr,"after")};On>=0&&On<N.length;On+=Bn){var dr=N[On],or=Bn>0==(dr.level!=1),wr=or?Rn.begin:ue(Rn.end,-1);if(dr.from<=wr&&wr<dr.to)return Vn(wr,or);if(wr=or?dr.from:ue(dr.to,-1),Rn.begin<=wr&&wr<Rn.end)return Vn(wr,or)}},ln=Qt(Y+O,O,Ge);if(ln)return ln;var En=O>0?Ge.end:ue(Ge.begin,-1);return En!=null&&!(O>0&&En==r.text.length)&&(ln=Qt(O>0?0:N.length-1,O,ye(En)),ln)?ln:null}var Fo={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ce)},killLine:function(e){return wo(e,function(r){if(r.empty()){var A=nn(e.doc,r.head.line).text.length;return r.head.ch==A&&r.head.line<e.lastLine()?{from:r.head,to:en(r.head.line+1,0)}:{from:r.head,to:en(r.head.line,A)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return wo(e,function(r){return{from:en(r.from().line,0),to:$n(e.doc,en(r.to().line+1,0))}})},delLineLeft:function(e){return wo(e,function(r){return{from:en(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return wo(e,function(r){var A=e.charCoords(r.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return{from:O,to:r.from()}})},delWrappedLineRight:function(e){return wo(e,function(r){var A=e.charCoords(r.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"div");return{from:r.from(),to:O}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(en(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(en(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Xs(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Ys(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return kl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var A=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"div")},Te)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var A=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:A},"div")},Te)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var A=e.cursorCoords(r.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return O.ch<e.getLine(O.line).search(/\S/)?Ys(e,r.head):O},Te)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],A=e.listSelections(),O=e.options.tabSize,N=0;N<A.length;N++){var Y=A[N].from(),ne=G(e.getLine(Y.line),Y.ch,O);r.push(Z(O-ne%O))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Fa(e,function(){for(var r=e.listSelections(),A=[],O=0;O<r.length;O++){if(!r[O].empty())continue;var N=r[O].head,Y=nn(e.doc,N.line).text;if(Y){if(N.ch==Y.length&&(N=new en(N.line,N.ch-1)),N.ch>0)N=new en(N.line,N.ch+1),e.replaceRange(Y.charAt(N.ch-1)+Y.charAt(N.ch-2),en(N.line,N.ch-2),N,"+transpose");else if(N.line>e.doc.first){var ne=nn(e.doc,N.line-1).text;ne&&(N=new en(N.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+ne.charAt(ne.length-1),en(N.line-1,ne.length-1),N,"+transpose"))}}A.push(new Mr(N,N))}e.setSelections(A)})},newlineAndIndent:function(e){return Fa(e,function(){for(var r=e.listSelections(),A=r.length-1;A>=0;A--)e.replaceRange(e.doc.lineSeparator(),r[A].anchor,r[A].head,"+input");r=e.listSelections();for(var O=0;O<r.length;O++)e.indentLine(r[O].from().line,null,!0);yi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,r){var A=nn(e.doc,r),O=Et(A);return O!=A&&(r=zn(O)),ls(!0,e,O,r,1)}function kl(e,r){var A=nn(e.doc,r),O=Vt(A);return O!=A&&(r=zn(O)),ls(!0,e,A,r,-1)}function Ys(e,r){var A=Xs(e,r.line),O=nn(e.doc,A.line),N=Wt(O,e.doc.direction);if(!N||N[0].level==0){var Y=Math.max(A.ch,O.text.search(/\S/)),ne=r.line==A.line&&r.ch<=Y&&r.ch;return en(A.line,ne?0:Y,A.sticky)}return A}function Zo(e,r,A){if(typeof r=="string"&&(r=Fo[r],!r))return!1;e.display.input.ensurePolled();var O=e.display.shift,N=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),A&&(e.display.shift=!1),N=r(e)!=_e}finally{e.display.shift=O,e.state.suppressEdits=!1}return N}function Nl(e,r,A){for(var O=0;O<e.state.keyMaps.length;O++){var N=xo(r,e.state.keyMaps[O],A,e);if(N)return N}return e.options.extraKeys&&xo(r,e.options.extraKeys,A,e)||xo(r,e.options.keyMap,A,e)}var jl=new z;function Bo(e,r,A,O){var N=e.state.keySeq;if(N){if(Ks(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==N&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,N+" "+r,A,O))return!0}return $s(e,r,A,O)}function $s(e,r,A,O){var N=Nl(e,r,O);return N=="multi"&&(e.state.keySeq=r),N=="handled"&&Kn(e,"keyHandled",e,r,A),(N=="handled"||N=="multi")&&(ie(A),ha(e)),!!N}function Qs(e,r){var A=Vs(r,!0);return A?r.shiftKey&&!e.state.keySeq?Bo(e,"Shift-"+A,r,function(O){return Zo(e,O,!0)})||Bo(e,A,r,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return Zo(e,O)}):Bo(e,A,r,function(O){return Zo(e,O)}):!1}function Ul(e,r,A){return Bo(e,"'"+A+"'",r,function(O){return Zo(e,O,!0)})}var us=null;function Js(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=j(),ae(r,e))return;P&&y<11&&e.keyCode==27&&(e.returnValue=!1);var A=e.keyCode;r.display.shift=A==16||e.shiftKey;var O=Qs(r,e);u&&(us=O?A:null,!O&&A==88&&!ot&&(s?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),I&&!s&&!O&&A==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),A==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Fl(r)}function Fl(e){var r=e.display.lineDiv;U(r,"CodeMirror-crosshair");function A(O){(O.keyCode==18||!O.altKey)&&(v(r,"CodeMirror-crosshair"),gt(document,"keyup",A),gt(document,"mouseover",A))}Pe(document,"keyup",A),Pe(document,"mouseover",A)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),ae(this,e)}function qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(va(r.display,e)||ae(r,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var A=e.keyCode,O=e.charCode;if(u&&A==us){us=null,ie(e);return}if(u&&(!e.which||e.which<10)&&Qs(r,e))return;var N=String.fromCharCode(O==null?A:O);if(N=="\b")return;if(Ul(r,e,N))return;r.display.input.onKeyPress(e)}var Bl=400,ds=function(e,r,A){this.time=e,this.pos=r,this.button=A};ds.prototype.compare=function(e,r,A){return this.time+Bl>e&&Yn(r,this.pos)==0&&A==this.button};var Ho,Wo;function Hl(e,r){var A=+new Date;return Wo&&Wo.compare(A,e,r)?(Ho=Wo=null,"triple"):Ho&&Ho.compare(A,e,r)?(Wo=new ds(A,e,r),Ho=null,"double"):(Ho=new ds(A,e,r),Wo=null,"single")}function el(e){var r=this,A=r.display;if(ae(r,e)||A.activeTouch&&A.input.supportsTouch())return;if(A.input.ensurePolled(),A.shift=e.shiftKey,va(A,e)){t||(A.scroller.draggable=!1,setTimeout(function(){return A.scroller.draggable=!0},100));return}if(cs(r,e))return;var O=ya(r,e),N=Me(e),Y=O?Hl(O,N):"single";if(window.focus(),N==1&&r.state.selectingText&&r.state.selectingText(e),O&&Wl(r,N,O,Y,e))return;N==1?O?Kl(r,O,Y,e):Ae(e)==A.scroller&&ie(e):N==2?(O&&Vo(r.doc,O),setTimeout(function(){return A.input.focus()},20)):N==3&&(k?r.display.input.onContextMenu(e):no(r))}function Wl(e,r,A,O,N){var Y="Click";return O=="double"?Y="Double"+Y:O=="triple"&&(Y="Triple"+Y),Y=(r==1?"Left":r==2?"Middle":"Right")+Y,Bo(e,Gs(Y,N),N,function(ne){if(typeof ne=="string"&&(ne=Fo[ne]),!ne)return!1;var ue=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ue=ne(e,A)!=_e}finally{e.state.suppressEdits=!1}return ue})}function zl(e,r,A){var O=e.getOption("configureMouse"),N=O?O(e,r,A):{};if(N.unit==null){var Y=d?A.shiftKey&&A.metaKey:A.altKey;N.unit=Y?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(N.extend==null||e.doc.extend)&&(N.extend=e.doc.extend||A.shiftKey),N.addNew==null&&(N.addNew=s?A.metaKey:A.ctrlKey),N.moveOnDrag==null&&(N.moveOnDrag=!(s?A.altKey:A.ctrlKey)),N}function Kl(e,r,A,O){P?setTimeout(H(Pi,e),0):e.curOp.focus=j();var N=zl(e,A,O),Y=e.doc.sel,ne;e.options.dragDrop&&rt&&!e.isReadOnly()&&A=="single"&&(ne=Y.contains(r))>-1&&(Yn((ne=Y.ranges[ne]).from(),r)<0||r.xRel>0)&&(Yn(ne.to(),r)>0||r.xRel<0)?Gl(e,O,r,N):Vl(e,O,r,N)}function Gl(e,r,A,O){var N=e.display,Y=!1,ne=ra(e,function(ye){t&&(N.scroller.draggable=!1),e.state.draggingText=!1,gt(N.wrapper.ownerDocument,"mouseup",ne),gt(N.wrapper.ownerDocument,"mousemove",ue),gt(N.scroller,"dragstart",he),gt(N.scroller,"drop",ne),Y||(ie(ye),O.addNew||Vo(e.doc,A,null,null,O.extend),t&&!p||P&&y==9?setTimeout(function(){N.wrapper.ownerDocument.body.focus({preventScroll:!0}),N.input.focus()},20):N.input.focus())}),ue=function(ye){Y=Y||Math.abs(r.clientX-ye.clientX)+Math.abs(r.clientY-ye.clientY)>=10},he=function(){return Y=!0};t&&(N.scroller.draggable=!0),e.state.draggingText=ne,ne.copy=!O.moveOnDrag,N.scroller.dragDrop&&N.scroller.dragDrop(),Pe(N.wrapper.ownerDocument,"mouseup",ne),Pe(N.wrapper.ownerDocument,"mousemove",ue),Pe(N.scroller,"dragstart",he),Pe(N.scroller,"drop",ne),no(e),setTimeout(function(){return N.input.focus()},20)}function tl(e,r,A){if(A=="char")return new Mr(r,r);if(A=="word")return e.findWordAt(r);if(A=="line")return new Mr(en(r.line,0),$n(e.doc,en(r.line+1,0)));var O=A(e,r);return new Mr(O.from,O.to)}function Vl(e,r,A,O){var N=e.display,Y=e.doc;ie(r);var ne,ue,he=Y.sel,ye=he.ranges;if(O.addNew&&!O.extend?(ue=Y.sel.contains(A),ue>-1?ne=ye[ue]:ne=new Mr(A,A)):(ne=Y.sel.primary(),ue=Y.sel.primIndex),O.unit=="rectangle")O.addNew||(ne=new Mr(A,A)),A=ya(e,r,!0,!0),ue=-1;else{var Ge=tl(e,A,O.unit);O.extend?ne=as(ne,Ge.anchor,Ge.head,O.extend):ne=Ge}O.addNew?ue==-1?(ue=ye.length,Wa(Y,fr(e,ye.concat([ne]),ue),{scroll:!1,origin:"*mouse"})):ye.length>1&&ye[ue].empty()&&O.unit=="char"&&!O.extend?(Wa(Y,fr(e,ye.slice(0,ue).concat(ye.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),he=Y.sel):is(Y,ue,ne,xe):(ue=0,Wa(Y,new Ba([ne],0),xe),he=Y.sel);var Je=A;function Ct(Rn){if(Yn(Je,Rn)==0)return;if(Je=Rn,O.unit=="rectangle"){for(var Vn=[],dr=e.options.tabSize,or=G(nn(Y,A.line).text,A.ch,dr),wr=G(nn(Y,Rn.line).text,Rn.ch,dr),qr=Math.min(or,wr),Na=Math.max(or,wr),ua=Math.min(A.line,Rn.line),ii=Math.min(e.lastLine(),Math.max(A.line,Rn.line));ua<=ii;ua++){var ti=nn(Y,ua).text,Sa=je(ti,qr,dr);qr==Na?Vn.push(new Mr(en(ua,Sa),en(ua,Sa))):ti.length>Sa&&Vn.push(new Mr(en(ua,Sa),en(ua,je(ti,Na,dr))))}Vn.length||Vn.push(new Mr(A,A)),Wa(Y,fr(e,he.ranges.slice(0,ue).concat(Vn),ue),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Rn)}else{var ni=ne,Ha=tl(e,Rn,O.unit),La=ni.anchor,Oa;Yn(Ha.anchor,La)>0?(Oa=Ha.head,La=Qr(ni.from(),Ha.anchor)):(Oa=Ha.anchor,La=$r(ni.to(),Ha.head));var pa=he.ranges.slice(0);pa[ue]=Xl(e,new Mr($n(Y,La),Oa)),Wa(Y,fr(e,pa,ue),xe)}}var bt=N.wrapper.getBoundingClientRect(),Qt=0;function ln(Rn){var Vn=++Qt,dr=ya(e,Rn,!0,O.unit=="rectangle");if(!dr)return;if(Yn(dr,Je)!=0){e.curOp.focus=j(),Ct(dr);var or=Ii(N,Y);(dr.line>=or.to||dr.line<or.from)&&setTimeout(ra(e,function(){Qt==Vn&&ln(Rn)}),150)}else{var wr=Rn.clientY<bt.top?-20:Rn.clientY>bt.bottom?20:0;wr&&setTimeout(ra(e,function(){if(Qt!=Vn)return;N.scroller.scrollTop+=wr,ln(Rn)}),50)}}function En(Rn){e.state.selectingText=!1,Qt=Infinity,Rn&&(ie(Rn),N.input.focus()),gt(N.wrapper.ownerDocument,"mousemove",On),gt(N.wrapper.ownerDocument,"mouseup",Bn),Y.history.lastSelOrigin=null}var On=ra(e,function(Rn){Rn.buttons===0||!Me(Rn)?En(Rn):ln(Rn)}),Bn=ra(e,En);e.state.selectingText=Bn,Pe(N.wrapper.ownerDocument,"mousemove",On),Pe(N.wrapper.ownerDocument,"mouseup",Bn)}function Xl(e,r){var A=r.anchor,O=r.head,N=nn(e.doc,A.line);if(Yn(A,O)==0&&A.sticky==O.sticky)return r;var Y=Wt(N);if(!Y)return r;var ne=We(Y,A.ch,A.sticky),ue=Y[ne];if(ue.from!=A.ch&&ue.to!=A.ch)return r;var he=ne+(ue.from==A.ch==(ue.level!=1)?0:1);if(he==0||he==Y.length)return r;var ye;if(O.line!=A.line)ye=(O.line-A.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ge=We(Y,O.ch,O.sticky),Je=Ge-ne||(O.ch-A.ch)*(ue.level==1?-1:1);Ge==he-1||Ge==he?ye=Je<0:ye=Je>0}var Ct=Y[he+(ye?-1:0)],bt=ye==(Ct.level==1),Qt=bt?Ct.from:Ct.to,ln=bt?"after":"before";return A.ch==Qt&&A.sticky==ln?r:new Mr(new en(A.line,Qt,ln),O)}function nl(e,r,A,O){var N,Y;if(r.touches)N=r.touches[0].clientX,Y=r.touches[0].clientY;else try{N=r.clientX,Y=r.clientY}catch(Ct){return!1}if(N>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&ie(r);var ne=e.display,ue=ne.lineDiv.getBoundingClientRect();if(Y>ue.bottom||!de(e,A))return pe(r);Y-=ue.top-ne.viewOffset;for(var he=0;he<e.display.gutterSpecs.length;++he){var ye=ne.gutters.childNodes[he];if(ye&&ye.getBoundingClientRect().right>=N){var Ge=nr(e.doc,Y),Je=e.display.gutterSpecs[he];return fe(e,A,e,Ge,Je.className,r),pe(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function rl(e,r){if(va(e.display,r)||Yl(e,r))return;if(ae(e,r,"contextmenu"))return;k||e.display.input.onContextMenu(r)}function Yl(e,r){return de(e,"gutterContextMenu")?nl(e,r,"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-"),rn(e)}var Co={toString:function(){return"CodeMirror.Init"}},il={},qo={};function $l(e){var r=e.optionHandlers;function A(O,N,Y,ne){e.defaults[O]=N,Y&&(r[O]=ne?function(ue,he,ye){ye!=Co&&Y(ue,he,ye)}:Y)}e.defineOption=A,e.Init=Co,A("value","",function(O,N){return O.setValue(N)},!0),A("mode",null,function(O,N){O.doc.modeOption=N,Ta(O)},!0),A("indentUnit",2,Ta,!0),A("indentWithTabs",!1),A("smartIndent",!0),A("tabSize",4,function(O){Va(O),rn(O),Nr(O)},!0),A("lineSeparator",null,function(O,N){if(O.doc.lineSep=N,!N)return;var Y=[],ne=O.doc.first;O.doc.iter(function(he){for(var ye=0;;){var Ge=he.text.indexOf(N,ye);if(Ge==-1)break;ye=Ge+N.length,Y.push(en(ne,Ge))}ne++});for(var ue=Y.length-1;ue>=0;ue--)_o(O.doc,N,Y[ue],en(Y[ue].line,Y[ue].ch+N.length))}),A("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,N,Y){O.state.specialChars=new RegExp(N.source+(N.test(" ")?"":"| "),"g"),Y!=Co&&O.refresh()}),A("specialCharPlaceholder",gn,function(O){return O.refresh()},!0),A("electricChars",!0),A("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),A("spellcheck",!1,function(O,N){return O.getInputField().spellcheck=N},!0),A("autocorrect",!1,function(O,N){return O.getInputField().autocorrect=N},!0),A("autocapitalize",!1,function(O,N){return O.getInputField().autocapitalize=N},!0),A("rtlMoveVisually",!E),A("wholeLineUpdateBefore",!0),A("theme","default",function(O){al(O),di(O)},!0),A("keyMap","default",function(O,N,Y){var ne=Jo(N),ue=Y!=Co&&Jo(Y);ue&&ue.detach&&ue.detach(O,ne),ne.attach&&ne.attach(O,ue||null)}),A("extraKeys",null),A("configureMouse",null),A("lineWrapping",!1,Jl,!0),A("gutters",[],function(O,N){O.display.gutterSpecs=ka(N,O.options.lineNumbers),di(O)},!0),A("fixedGutter",!0,function(O,N){O.display.gutters.style.left=N?ta(O.display)+"px":"0",O.refresh()},!0),A("coverGutterNextToScrollbar",!1,function(O){return mi(O)},!0),A("scrollbarStyle","native",function(O){Qi(O),mi(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),A("lineNumbers",!1,function(O,N){O.display.gutterSpecs=ka(O.options.gutters,N),di(O)},!0),A("firstLineNumber",1,di,!0),A("lineNumberFormatter",function(O){return O},di,!0),A("showCursorWhenSelecting",!1,jr,!0),A("resetSelectionOnContextMenu",!0),A("lineWiseCopyCut",!0),A("pasteLinesPerSelection",!0),A("selectionsMayTouch",!1),A("readOnly",!1,function(O,N){N=="nocursor"&&(Ci(O),O.display.input.blur()),O.display.input.readOnlyChanged(N)}),A("screenReaderLabel",null,function(O,N){N=N===""?null:N,O.display.input.screenReaderLabelChanged(N)}),A("disableInput",!1,function(O,N){N||O.display.input.reset()},!0),A("dragDrop",!0,Ql),A("allowDropFileTypes",null),A("cursorBlinkRate",530),A("cursorScrollMargin",0),A("cursorHeight",1,jr,!0),A("singleCursorHeightPerLine",!0,jr,!0),A("workTime",100),A("workDelay",100),A("flattenSpans",!0,Va,!0),A("addModeClass",!1,Va,!0),A("pollInterval",100),A("undoDepth",200,function(O,N){return O.doc.history.undoDepth=N}),A("historyEventDelay",1250),A("viewportMargin",10,function(O){return O.refresh()},!0),A("maxHighlightLength",1e4,Va,!0),A("moveInputWithCursor",!0,function(O,N){N||O.display.input.resetPosition()}),A("tabindex",null,function(O,N){return O.display.input.getField().tabIndex=N||""}),A("autofocus",null),A("direction","ltr",function(O,N){return O.doc.setDirection(N)},!0),A("phrases",null)}function Ql(e,r,A){var O=A&&A!=Co;if(!r!=!O){var N=e.display.dragFunctions,Y=r?Pe:gt;Y(e.display.scroller,"dragstart",N.start),Y(e.display.scroller,"dragenter",N.enter),Y(e.display.scroller,"dragover",N.over),Y(e.display.scroller,"dragleave",N.leave),Y(e.display.scroller,"drop",N.drop)}}function Jl(e){e.options.lineWrapping?(U(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(v(e.display.wrapper,"CodeMirror-wrap"),kt(e)),Pa(e),Nr(e),rn(e),setTimeout(function(){return mi(e)},100)}function ia(e,r){var A=this;if(!(this instanceof ia))return new ia(e,r);this.options=r=r?L(r):{},L(il,r,!1);var O=r.value;typeof O=="string"?O=new ei(O,r.mode,null,r.lineSeparator,r.direction):r.mode&&(O.modeOption=r.mode),this.doc=O;var N=new ia.inputStyles[r.inputStyle](this),Y=this.display=new Ui(e,O,N,r);Y.wrapper.CodeMirror=this,al(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Qi(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 z,keySeq:null,specialChars:null},r.autofocus&&!n&&Y.input.focus(),P&&y<11&&setTimeout(function(){return A.display.input.reset(!0)},20),Zl(this),Al(),ui(this),this.curOp.forceUpdate=!0,vs(this,O),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){A.hasFocus()&&!A.state.focused&&li(A)},20):Ci(this);for(var ne in qo)qo.hasOwnProperty(ne)&&qo[ne](this,r[ne],Co);ea(this),r.finishInit&&r.finishInit(this);for(var ue=0;ue<hs.length;++ue)hs[ue](this);Ei(this),t&&r.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}ia.defaults=il,ia.optionHandlers=qo;function Zl(e){var r=e.display;Pe(r.scroller,"mousedown",ra(e,el)),P&&y<11?Pe(r.scroller,"dblclick",ra(e,function(he){if(ae(e,he))return;var ye=ya(e,he);if(!ye||cs(e,he)||va(e.display,he))return;ie(he);var Ge=e.findWordAt(ye);Vo(e.doc,Ge.anchor,Ge.head)})):Pe(r.scroller,"dblclick",function(he){return ae(e,he)||ie(he)}),Pe(r.scroller,"contextmenu",function(he){return rl(e,he)}),Pe(r.input.getField(),"contextmenu",function(he){r.scroller.contains(he.target)||rl(e,he)});var A,O={end:0};function N(){r.activeTouch&&(A=setTimeout(function(){return r.activeTouch=null},1e3),O=r.activeTouch,O.end=+new Date)}function Y(he){if(he.touches.length!=1)return!1;var ye=he.touches[0];return ye.radiusX<=1&&ye.radiusY<=1}function ne(he,ye){if(ye.left==null)return!0;var Ge=ye.left-he.left,Je=ye.top-he.top;return Ge*Ge+Je*Je>20*20}Pe(r.scroller,"touchstart",function(he){if(!ae(e,he)&&!Y(he)&&!cs(e,he)){r.input.ensurePolled(),clearTimeout(A);var ye=+new Date;r.activeTouch={start:ye,moved:!1,prev:ye-O.end<=300?O:null},he.touches.length==1&&(r.activeTouch.left=he.touches[0].pageX,r.activeTouch.top=he.touches[0].pageY)}}),Pe(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Pe(r.scroller,"touchend",function(he){var ye=r.activeTouch;if(ye&&!va(r,he)&&ye.left!=null&&!ye.moved&&new Date-ye.start<300){var Ge=e.coordsChar(r.activeTouch,"page"),Je;!ye.prev||ne(ye,ye.prev)?Je=new Mr(Ge,Ge):!ye.prev.prev||ne(ye,ye.prev.prev)?Je=e.findWordAt(Ge):Je=new Mr(en(Ge.line,0),$n(e.doc,en(Ge.line+1,0))),e.setSelection(Je.anchor,Je.head),e.focus(),ie(he)}N()}),Pe(r.scroller,"touchcancel",N),Pe(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Di(e,r.scroller.scrollTop),Ma(e,r.scroller.scrollLeft,!0),fe(e,"scroll",e))}),Pe(r.scroller,"mousewheel",function(he){return Hi(e,he)}),Pe(r.scroller,"DOMMouseScroll",function(he){return Hi(e,he)}),Pe(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(he){ae(e,he)||we(he)},over:function(he){ae(e,he)||(Rl(e,he),we(he))},start:function(he){return Ol(e,he)},drop:ra(e,Sl),leave:function(he){ae(e,he)||Hs(e)}};var ue=r.input.getField();Pe(ue,"keyup",function(he){return Zs.call(e,he)}),Pe(ue,"keydown",ra(e,Js)),Pe(ue,"keypress",ra(e,qs)),Pe(ue,"focus",function(he){return li(e,he)}),Pe(ue,"blur",function(he){return Ci(e,he)})}var hs=[];ia.defineInitHook=function(e){return hs.push(e)};function zo(e,r,A,O){var N=e.doc,Y;A==null&&(A="add"),A=="smart"&&(N.mode.indent?Y=ga(e,r).state:A="prev");var ne=e.options.tabSize,ue=nn(N,r),he=G(ue.text,null,ne);ue.stateAfter&&(ue.stateAfter=null);var ye=ue.text.match(/^\s*/)[0],Ge;if(!O&&!/\S/.test(ue.text))Ge=0,A="not";else if(A=="smart"&&(Ge=N.mode.indent(Y,ue.text.slice(ye.length),ue.text),Ge==_e||Ge>150)){if(!O)return;A="prev"}A=="prev"?r>N.first?Ge=G(nn(N,r-1).text,null,ne):Ge=0:A=="add"?Ge=he+e.options.indentUnit:A=="subtract"?Ge=he-e.options.indentUnit:typeof A=="number"&&(Ge=he+A),Ge=Math.max(0,Ge);var Je="",Ct=0;if(e.options.indentWithTabs)for(var bt=Math.floor(Ge/ne);bt;--bt)Ct+=ne,Je+=" ";if(Ct<Ge&&(Je+=Z(Ge-Ct)),Je!=ye)return _o(N,Je,en(r,0),en(r,ye.length),"+input"),ue.stateAfter=null,!0;for(var Qt=0;Qt<N.sel.ranges.length;Qt++){var ln=N.sel.ranges[Qt];if(ln.head.line==r&&ln.head.ch<ye.length){var En=en(r,ye.length);is(N,Qt,new Mr(En,En));break}}}var wi=null;function es(e){wi=e}function fs(e,r,A,O,N){var Y=e.doc;e.display.shift=!1,O||(O=Y.sel);var ne=+new Date-200,ue=N=="paste"||e.state.pasteIncoming>ne,he=mt(r),ye=null;if(ue&&O.ranges.length>1)if(wi&&wi.text.join(`
`)==r){if(O.ranges.length%wi.text.length==0){ye=[];for(var Ge=0;Ge<wi.text.length;Ge++)ye.push(Y.splitLines(wi.text[Ge]))}}else he.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(ye=V(he,function(On){return[On]}));for(var Je=e.curOp.updateInput,Ct=O.ranges.length-1;Ct>=0;Ct--){var bt=O.ranges[Ct],Qt=bt.from(),ln=bt.to();bt.empty()&&(A&&A>0?Qt=en(Qt.line,Qt.ch-A):e.state.overwrite&&!ue?ln=en(ln.line,Math.min(nn(Y,ln.line).text.length,ln.ch+K(he).length)):ue&&wi&&wi.lineWise&&wi.text.join(`
`)==he.join(`
`)&&(Qt=ln=en(Qt.line,0)));var En={from:Qt,to:ln,text:ye?ye[Ct%ye.length]:he,origin:N||(ue?"paste":e.state.cutIncoming>ne?"cut":"+input")};bo(e.doc,En),Kn(e,"inputRead",e,En)}r&&!ue&&sl(e,r),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Je),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ol(e,r){var A=e.clipboardData&&e.clipboardData.getData("Text");if(A)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Fa(r,function(){return fs(r,A,0,null,"paste")}),!0}function sl(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var A=e.doc.sel,O=A.ranges.length-1;O>=0;O--){var N=A.ranges[O];if(N.head.ch>100||O&&A.ranges[O-1].head.line==N.head.line)continue;var Y=e.getModeAt(N.head),ne=!1;if(Y.electricChars){for(var ue=0;ue<Y.electricChars.length;ue++)if(r.indexOf(Y.electricChars.charAt(ue))>-1){ne=zo(e,N.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(nn(e.doc,N.head.line).text.slice(0,N.head.ch))&&(ne=zo(e,N.head.line,"smart")));ne&&Kn(e,"electricInput",e,N.head.line)}}function ll(e){for(var r=[],A=[],O=0;O<e.doc.sel.ranges.length;O++){var N=e.doc.sel.ranges[O].head.line,Y={anchor:en(N,0),head:en(N+1,0)};A.push(Y),r.push(e.getRange(Y.anchor,Y.head))}return{text:r,ranges:A}}function ul(e,r,A,O){e.setAttribute("autocorrect",A?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=m("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=m("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),ul(e),r}function ql(e){var r=e.optionHandlers,A=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,N){var Y=this.options,ne=Y[O];if(Y[O]==N&&O!="mode")return;Y[O]=N,r.hasOwnProperty(O)&&ra(this,r[O])(this,N,ne),fe(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,N){this.state.keyMaps[N?"push":"unshift"](Jo(O))},removeKeyMap:function(O){for(var N=this.state.keyMaps,Y=0;Y<N.length;++Y)if(N[Y]==O||N[Y].name==O)return N.splice(Y,1),!0},addOverlay:Ca(function(O,N){var Y=O.token?O:e.getMode(this.options,O);if(Y.startState)throw new Error("Overlays may not be stateful.");$(this.state.overlays,{mode:Y,modeSpec:O,opaque:N&&N.opaque,priority:N&&N.priority||0},function(ne){return ne.priority}),this.state.modeGen++,Nr(this)}),removeOverlay:Ca(function(O){for(var N=this.state.overlays,Y=0;Y<N.length;++Y){var ne=N[Y].modeSpec;if(ne==O||typeof O=="string"&&ne.name==O){N.splice(Y,1),this.state.modeGen++,Nr(this);return}}}),indentLine:Ca(function(O,N,Y){typeof N!="string"&&typeof N!="number"&&(N==null?N=this.options.smartIndent?"smart":"prev":N=N?"add":"subtract"),Lr(this.doc,O)&&zo(this,O,N,Y)}),indentSelection:Ca(function(O){for(var N=this.doc.sel.ranges,Y=-1,ne=0;ne<N.length;ne++){var ue=N[ne];if(ue.empty())ue.head.line>Y&&(zo(this,ue.head.line,O,!0),Y=ue.head.line,ne==this.doc.sel.primIndex&&yi(this));else{var he=ue.from(),ye=ue.to(),Ge=Math.max(Y,he.line);Y=Math.min(this.lastLine(),ye.line-(ye.ch?0:1))+1;for(var Je=Ge;Je<Y;++Je)zo(this,Je,O);var Ct=this.doc.sel.ranges;he.ch==0&&N.length==Ct.length&&Ct[ne].from().ch>0&&is(this.doc,ne,new Mr(he,Ct[ne].to()),ce)}}}),getTokenAt:function(O,N){return hn(this,O,N)},getLineTokens:function(O,N){return hn(this,en(O),N,!0)},getTokenTypeAt:function(O){O=$n(this.doc,O);var N=xa(this,nn(this.doc,O.line)),Y=0,ne=(N.length-1)/2,ue=O.ch,he;if(ue==0)he=N[2];else for(;;){var ye=Y+ne>>1;if((ye?N[ye*2-1]:0)>=ue)ne=ye;else if(N[ye*2+1]<ue)Y=ye+1;else{he=N[ye*2+2];break}}var Ge=he?he.indexOf("overlay "):-1;return Ge<0?he:Ge==0?null:he.slice(0,Ge-1)},getModeAt:function(O){var N=this.doc.mode;return N.innerMode?e.innerMode(N,this.getTokenAt(O).state).mode:N},getHelper:function(O,N){return this.getHelpers(O,N)[0]},getHelpers:function(O,N){var Y=[];if(!A.hasOwnProperty(N))return Y;var ne=A[N],ue=this.getModeAt(O);if(typeof ue[N]=="string")ne[ue[N]]&&Y.push(ne[ue[N]]);else if(ue[N])for(var he=0;he<ue[N].length;he++){var ye=ne[ue[N][he]];ye&&Y.push(ye)}else ue.helperType&&ne[ue.helperType]?Y.push(ne[ue.helperType]):ne[ue.name]&&Y.push(ne[ue.name]);for(var Ge=0;Ge<ne._global.length;Ge++){var Je=ne._global[Ge];Je.pred(ue,this)&&J(Y,Je.val)==-1&&Y.push(Je.val)}return Y},getStateAfter:function(O,N){var Y=this.doc;return O=Jr(Y,O==null?Y.first+Y.size-1:O),ga(this,O+1,N).state},cursorCoords:function(O,N){var Y,ne=this.doc.sel.primary();return O==null?Y=ne.head:typeof O=="object"?Y=$n(this.doc,O):Y=O?ne.from():ne.to(),Wn(this,Y,N||"page")},charCoords:function(O,N){return pr(this,$n(this.doc,O),N||"page")},coordsChar:function(O,N){return O=Gn(this,O,N||"page"),lr(this,O.left,O.top)},lineAtHeight:function(O,N){return O=Gn(this,{top:O,left:0},N||"page").top,nr(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,N,Y){var ne=!1,ue;if(typeof O=="number"){var he=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>he&&(O=he,ne=!0),ue=nn(this.doc,O)}else ue=O;return cn(this,ue,{top:0,left:0},N||"page",Y||ne).top+(ne?this.doc.height-Cn(ue):0)},defaultTextHeight:function(){return Ar(this.display)},defaultCharWidth:function(){return Or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,N,Y,ne,ue){var he=this.display;O=Wn(this,$n(this.doc,O));var ye=O.bottom,Ge=O.left;if(N.style.position="absolute",N.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(N),he.sizer.appendChild(N),ne=="over")ye=O.top;else if(ne=="above"||ne=="near"){var Je=Math.max(he.wrapper.clientHeight,this.doc.height),Ct=Math.max(he.sizer.clientWidth,he.lineSpace.clientWidth);(ne=="above"||O.bottom+N.offsetHeight>Je)&&O.top>N.offsetHeight?ye=O.top-N.offsetHeight:O.bottom+N.offsetHeight<=Je&&(ye=O.bottom),Ge+N.offsetWidth>Ct&&(Ge=Ct-N.offsetWidth)}N.style.top=ye+"px",N.style.left=N.style.right="",ue=="right"?(Ge=he.sizer.clientWidth-N.offsetWidth,N.style.right="0px"):(ue=="left"?Ge=0:ue=="middle"&&(Ge=(he.sizer.clientWidth-N.offsetWidth)/2),N.style.left=Ge+"px"),Y&&Gi(this,{left:Ge,top:ye,right:Ge+N.offsetWidth,bottom:ye+N.offsetHeight})},triggerOnKeyDown:Ca(Js),triggerOnKeyPress:Ca(qs),triggerOnKeyUp:Zs,triggerOnMouseDown:Ca(el),execCommand:function(O){if(Fo.hasOwnProperty(O))return Fo[O].call(null,this)},triggerElectric:Ca(function(O){sl(this,O)}),findPosH:function(O,N,Y,ne){var ue=1;N<0&&(ue=-1,N=-N);for(var he=$n(this.doc,O),ye=0;ye<N&&!(he=ps(this.doc,he,ue,Y,ne),he.hitSide);++ye);return he},moveH:Ca(function(O,N){var Y=this;this.extendSelectionsBy(function(ne){return Y.display.shift||Y.doc.extend||ne.empty()?ps(Y.doc,ne.head,O,N,Y.options.rtlMoveVisually):O<0?ne.from():ne.to()},Te)}),deleteH:Ca(function(O,N){var Y=this.doc.sel,ne=this.doc;Y.somethingSelected()?ne.replaceSelection("",null,"+delete"):wo(this,function(ue){var he=ps(ne,ue.head,O,N,!1);return O<0?{from:he,to:ue.head}:{from:ue.head,to:he}})}),findPosV:function(O,N,Y,ne){var ue=1,he=ne;N<0&&(ue=-1,N=-N);for(var ye=$n(this.doc,O),Ge=0;Ge<N;++Ge){var Je=Wn(this,ye,"div");if(he==null?he=Je.left:Je.left=he,ye=cl(this,Je,ue,Y),ye.hitSide)break}return ye},moveV:Ca(function(O,N){var Y=this,ne=this.doc,ue=[],he=!this.display.shift&&!ne.extend&&ne.sel.somethingSelected();if(ne.extendSelectionsBy(function(Ge){if(he)return O<0?Ge.from():Ge.to();var Je=Wn(Y,Ge.head,"div");Ge.goalColumn!=null&&(Je.left=Ge.goalColumn),ue.push(Je.left);var Ct=cl(Y,Je,O,N);return N=="page"&&Ge==ne.sel.primary()&&Vi(Y,pr(Y,Ct,"div").top-Je.top),Ct},Te),ue.length)for(var ye=0;ye<ne.sel.ranges.length;ye++)ne.sel.ranges[ye].goalColumn=ue[ye]}),findWordAt:function(O){var N=this.doc,Y=nn(N,O.line).text,ne=O.ch,ue=O.ch;if(Y){var he=this.getHelper(O,"wordChars");(O.sticky=="before"||ue==Y.length)&&ne?--ne:++ue;for(var ye=Y.charAt(ne),Ge=Ye(ye,he)?function(Je){return Ye(Je,he)}:/\s/.test(ye)?function(Je){return/\s/.test(Je)}:function(Je){return!/\s/.test(Je)&&!Ye(Je)};ne>0&&Ge(Y.charAt(ne-1));)--ne;for(;ue<Y.length&&Ge(Y.charAt(ue));)++ue}return new Mr(en(O.line,ne),en(O.line,ue))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?U(this.display.cursorDiv,"CodeMirror-overwrite"):v(this.display.cursorDiv,"CodeMirror-overwrite"),fe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==j()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ca(function(O,N){Ri(this,O,N)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-qe(this)-this.display.barHeight,width:O.scrollWidth-qe(this)-this.display.barWidth,clientHeight:me(this),clientWidth:Fe(this)}},scrollIntoView:Ca(function(O,N){O==null?(O={from:this.doc.sel.primary().head,to:null},N==null&&(N=this.options.cursorScrollMargin)):typeof O=="number"?O={from:en(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=N||0,O.from.line!=null?ho(this,O):Ai(this,O.from,O.to,O.margin)}),setSize:Ca(function(O,N){var Y=this,ne=function(he){return typeof he=="number"||/^\d+$/.test(String(he))?he+"px":he};O!=null&&(this.display.wrapper.style.width=ne(O)),N!=null&&(this.display.wrapper.style.height=ne(N)),this.options.lineWrapping&&tr(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(he){if(he.widgets){for(var ye=0;ye<he.widgets.length;ye++)if(he.widgets[ye].noHScroll){Fr(Y,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,fe(this,"refresh",this)}),operation:function(O){return Fa(this,O)},startOperation:function(){return ui(this)},endOperation:function(){return Ei(this)},refresh:Ca(function(){var O=this.display.cachedTextHeight;Nr(this),this.curOp.forceUpdate=!0,rn(this),Ri(this,this.doc.scrollLeft,this.doc.scrollTop),Zi(this.display),(O==null||Math.abs(O-Ar(this.display))>.5||this.options.lineWrapping)&&Pa(this),fe(this,"refresh",this)}),swapDoc:Ca(function(O){var N=this.doc;return N.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),rn(this),this.display.input.reset(),Ri(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,Kn(this,"swapDoc",this,N),N}),phrase:function(O){var N=this.options.phrases;return N&&Object.prototype.hasOwnProperty.call(N,O)?N[O]:O},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}},ve(e),e.registerHelper=function(O,N,Y){A.hasOwnProperty(O)||(A[O]=e[O]={_global:[]}),A[O][N]=Y},e.registerGlobalHelper=function(O,N,Y,ne){e.registerHelper(O,N,ne),A[O]._global.push({pred:Y,val:ne})}}function ps(e,r,A,O,N){var Y=r,ne=A,ue=nn(e,r.line),he=N&&e.direction=="rtl"?-A:A;function ye(){var Bn=r.line+he;return Bn<e.first||Bn>=e.first+e.size?!1:(r=new en(Bn,r.ch,r.sticky),ue=nn(e,Bn))}function Ge(Bn){var Rn;if(O=="codepoint"){var Vn=ue.text.charCodeAt(r.ch+(O>0?0:-1));isNaN(Vn)?Rn=null:Rn=new en(r.line,Math.max(0,Math.min(ue.text.length,r.ch+A*(Vn>=55296&&Vn<56320?2:1))),-A)}else N?Rn=Il(e.cm,ue,r,A):Rn=ss(ue,r,A);if(Rn==null)if(!Bn&&ye())r=ls(N,e.cm,ue,r.line,he);else return!1;else r=Rn;return!0}if(O=="char"||O=="codepoint")Ge();else if(O=="column")Ge(!0);else if(O=="word"||O=="group")for(var Je=null,Ct=O=="group",bt=e.cm&&e.cm.getHelper(r,"wordChars"),Qt=!0;!(A<0&&!Ge(!Qt));Qt=!1){var ln=ue.text.charAt(r.ch)||`
`,En=Ye(ln,bt)?"w":Ct&&ln==`
`?"n":!Ct||/\s/.test(ln)?null:"p";if(Ct&&!Qt&&!En&&(En="s"),Je&&Je!=En){A<0&&(A=1,Ge(),r.sticky="after");break}if(En&&(Je=En),A>0&&!Ge(!Qt))break}var On=Yo(e,r,Y,ne,!0);return na(Y,On)&&(On.hitSide=!0),On}function cl(e,r,A,O){var N=e.doc,Y=r.left,ne;if(O=="page"){var ue=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),he=Math.max(ue-.5*Ar(e.display),3);ne=(A>0?r.bottom:r.top)+A*he}else O=="line"&&(ne=A>0?r.bottom+3:r.top-3);for(var ye;!(ye=lr(e,Y,ne),!ye.outside);){if(A<0?ne<=0:ne>=N.height){ye.hitSide=!0;break}ne+=A*5}return ye}var Vr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vr.prototype.init=function(e){var r=this,A=this,O=A.cm,N=A.div=e.lineDiv;ul(N,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function Y(ue){for(var he=ue.target;he;he=he.parentNode){if(he==N)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(he.className))break}return!1}Pe(N,"paste",function(ue){if(!Y(ue)||ae(O,ue)||ol(ue,O))return;y<=11&&setTimeout(ra(O,function(){return r.updateFromDOM()}),20)}),Pe(N,"compositionstart",function(ue){r.composing={data:ue.data,done:!1}}),Pe(N,"compositionupdate",function(ue){r.composing||(r.composing={data:ue.data,done:!1})}),Pe(N,"compositionend",function(ue){r.composing&&(ue.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Pe(N,"touchstart",function(){return A.forceCompositionEnd()}),Pe(N,"input",function(){r.composing||r.readFromDOMSoon()});function ne(ue){if(!Y(ue)||ae(O,ue))return;if(O.somethingSelected())es({lineWise:!1,text:O.getSelections()}),ue.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var he=ll(O);es({lineWise:!0,text:he.text}),ue.type=="cut"&&O.operation(function(){O.setSelections(he.ranges,0,ce),O.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var ye=wi.text.join(`
`);if(ue.clipboardData.setData("Text",ye),ue.clipboardData.getData("Text")==ye){ue.preventDefault();return}}var Ge=dl(),Je=Ge.firstChild;O.display.lineSpace.insertBefore(Ge,O.display.lineSpace.firstChild),Je.value=wi.text.join(`
`);var Ct=document.activeElement;W(Je),setTimeout(function(){O.display.lineSpace.removeChild(Ge),Ct.focus(),Ct==N&&A.showPrimarySelection()},50)}Pe(N,"copy",ne),Pe(N,"cut",ne)},Vr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Vr.prototype.prepareSelection=function(){var e=Ja(this.cm,!1);return e.focus=document.activeElement==this.div,e},Vr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Vr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vr.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,A=r.doc.sel.primary(),O=A.from(),N=A.to();if(r.display.viewTo==r.display.viewFrom||O.line>=r.display.viewTo||N.line<r.display.viewFrom){e.removeAllRanges();return}var Y=ts(r,e.anchorNode,e.anchorOffset),ne=ts(r,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&ne&&!ne.bad&&Yn(Qr(Y,ne),O)==0&&Yn($r(Y,ne),N)==0)return;var ue=r.display.view,he=O.line>=r.display.viewFrom&&hl(r,O)||{node:ue[0].measure.map[2],offset:0},ye=N.line<r.display.viewTo&&hl(r,N);if(!ye){var Ge=ue[ue.length-1].measure,Je=Ge.maps?Ge.maps[Ge.maps.length-1]:Ge.map;ye={node:Je[Je.length-1],offset:Je[Je.length-2]-Je[Je.length-3]}}if(!he||!ye){e.removeAllRanges();return}var Ct=e.rangeCount&&e.getRangeAt(0),bt;try{bt=x(he.node,he.offset,ye.offset,ye.node)}catch(Qt){}bt&&(!I&&r.state.focused?(e.collapse(he.node,he.offset),bt.collapsed||(e.removeAllRanges(),e.addRange(bt))):(e.removeAllRanges(),e.addRange(bt)),Ct&&e.anchorNode==null?e.addRange(Ct):I&&this.startGracePeriod()),this.rememberSelection()},Vr.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Vr.prototype.showMultipleSelections=function(e){f(this.cm.display.cursorDiv,e.cursors),f(this.cm.display.selectionDiv,e.selection)},Vr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Vr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return g(this.div,r)},Vr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vr.prototype.blur=function(){this.div.blur()},Vr.prototype.getField=function(){return this.div},Vr.prototype.supportsTouch=function(){return!0},Vr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Fa(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},Vr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Vr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(l&&i&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var A=ts(r,e.anchorNode,e.anchorOffset),O=ts(r,e.focusNode,e.focusOffset);A&&O&&Fa(r,function(){Wa(r.doc,An(A,O),ce),(A.bad||O.bad)&&(r.curOp.selectionChanged=!0)})},Vr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,A=e.doc.sel.primary(),O=A.from(),N=A.to();if(O.ch==0&&O.line>e.firstLine()&&(O=en(O.line-1,nn(e.doc,O.line-1).length)),N.ch==nn(e.doc,N.line).text.length&&N.line<e.lastLine()&&(N=en(N.line+1,0)),O.line<r.viewFrom||N.line>r.viewTo-1)return!1;var Y,ne,ue;O.line==r.viewFrom||(Y=Kr(e,O.line))==0?(ne=zn(r.view[0].line),ue=r.view[0].node):(ne=zn(r.view[Y].line),ue=r.view[Y-1].node.nextSibling);var he=Kr(e,N.line),ye,Ge;if(he==r.view.length-1?(ye=r.viewTo-1,Ge=r.lineDiv.lastChild):(ye=zn(r.view[he+1].line)-1,Ge=r.view[he+1].node.previousSibling),!ue)return!1;for(var Je=e.doc.splitLines(tu(e,ue,Ge,ne,ye)),Ct=Un(e.doc,en(ne,0),en(ye,nn(e.doc,ye).text.length));Je.length>1&&Ct.length>1;)if(K(Je)==K(Ct))Je.pop(),Ct.pop(),ye--;else if(Je[0]==Ct[0])Je.shift(),Ct.shift(),ne++;else break;for(var bt=0,Qt=0,ln=Je[0],En=Ct[0],On=Math.min(ln.length,En.length);bt<On&&ln.charCodeAt(bt)==En.charCodeAt(bt);)++bt;for(var Bn=K(Je),Rn=K(Ct),Vn=Math.min(Bn.length-(Je.length==1?bt:0),Rn.length-(Ct.length==1?bt:0));Qt<Vn&&Bn.charCodeAt(Bn.length-Qt-1)==Rn.charCodeAt(Rn.length-Qt-1);)++Qt;if(Je.length==1&&Ct.length==1&&ne==O.line)for(;bt&&bt>O.ch&&Bn.charCodeAt(Bn.length-Qt-1)==Rn.charCodeAt(Rn.length-Qt-1);)bt--,Qt++;Je[Je.length-1]=Bn.slice(0,Bn.length-Qt).replace(/^\u200b+/,""),Je[0]=Je[0].slice(bt).replace(/\u200b+$/,"");var dr=en(ne,bt),or=en(ye,Ct.length?K(Ct).length-Qt:0);if(Je.length>1||Je[0]||Yn(dr,or))return _o(e.doc,Je,dr,or,"+input"),!0},Vr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vr.prototype.reset=function(){this.forceCompositionEnd()},Vr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Vr.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)},Vr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Fa(this.cm,function(){return Nr(e.cm)})},Vr.prototype.setUneditable=function(e){e.contentEditable="false"},Vr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ra(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Vr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Vr.prototype.onContextMenu=function(){},Vr.prototype.resetPosition=function(){},Vr.prototype.needsContentAttribute=!0;function hl(e,r){var A=nt(e,r.line);if(!A||A.hidden)return null;var O=nn(e.doc,r.line),N=be(A,O,r.line),Y=Wt(O,e.doc.direction),ne="left";if(Y){var ue=We(Y,r.ch);ne=ue%2?"right":"left"}var he=$t(N.map,r.ch,ne);return he.offset=he.collapse=="right"?he.end:he.start,he}function eu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function To(e,r){return r&&(e.bad=!0),e}function tu(e,r,A,O,N){var Y="",ne=!1,ue=e.doc.lineSeparator(),he=!1;function ye(bt){return function(Qt){return Qt.id==bt}}function Ge(){ne&&(Y+=ue,he&&(Y+=ue),ne=he=!1)}function Je(bt){bt&&(Ge(),Y+=bt)}function Ct(bt){if(bt.nodeType==1){var Qt=bt.getAttribute("cm-text");if(Qt){Je(Qt);return}var ln=bt.getAttribute("cm-marker"),En;if(ln){var On=e.findMarks(en(O,0),en(N+1,0),ye(+ln));On.length&&(En=On[0].find(0))&&Je(Un(e.doc,En.from,En.to).join(ue));return}if(bt.getAttribute("contenteditable")=="false")return;var Bn=/^(pre|div|p|li|table|br)$/i.test(bt.nodeName);if(!/^br$/i.test(bt.nodeName)&&bt.textContent.length==0)return;Bn&&Ge();for(var Rn=0;Rn<bt.childNodes.length;Rn++)Ct(bt.childNodes[Rn]);/^(pre|p)$/i.test(bt.nodeName)&&(he=!0),Bn&&(ne=!0)}else bt.nodeType==3&&Je(bt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ct(r),r==A);)r=r.nextSibling,he=!1;return Y}function ts(e,r,A){var O;if(r==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[A],!O)return To(e.clipPos(en(e.display.viewTo-1)),!0);r=null,A=0}else for(O=r;;O=O.parentNode){if(!O||O==e.display.lineDiv)return null;if(O.parentNode&&O.parentNode==e.display.lineDiv)break}for(var N=0;N<e.display.view.length;N++){var Y=e.display.view[N];if(Y.node==O)return nu(Y,r,A)}}function nu(e,r,A){var O=e.text.firstChild,N=!1;if(!r||!g(O,r))return To(en(zn(e.line),0),!0);if(r==O&&(N=!0,r=O.childNodes[A],A=0,!r)){var Y=e.rest?K(e.rest):e.line;return To(en(zn(Y),Y.text.length),N)}var ne=r.nodeType==3?r:null,ue=r;for(!ne&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(ne=r.firstChild,A&&(A=ne.nodeValue.length));ue.parentNode!=O;)ue=ue.parentNode;var he=e.measure,ye=he.maps;function Ge(En,On,Bn){for(var Rn=-1;Rn<(ye?ye.length:0);Rn++)for(var Vn=Rn<0?he.map:ye[Rn],dr=0;dr<Vn.length;dr+=3){var or=Vn[dr+2];if(or==En||or==On){var wr=zn(Rn<0?e.line:e.rest[Rn]),qr=Vn[dr]+Bn;return(Bn<0||or!=En)&&(qr=Vn[dr+(Bn?1:0)]),en(wr,qr)}}}var Je=Ge(ne,ue,A);if(Je)return To(Je,N);for(var Ct=ue.nextSibling,bt=ne?ne.nodeValue.length-A:0;Ct;Ct=Ct.nextSibling){if(Je=Ge(Ct,Ct.firstChild,0),Je)return To(en(Je.line,Je.ch-bt),N);bt+=Ct.textContent.length}for(var Qt=ue.previousSibling,ln=A;Qt;Qt=Qt.previousSibling){if(Je=Ge(Qt,Qt.firstChild,-1),Je)return To(en(Je.line,Je.ch+ln),N);ln+=Qt.textContent.length}}var _a=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};_a.prototype.init=function(e){var r=this,A=this,O=this.cm;this.createField(e);var N=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(N.style.width="0px"),Pe(N,"input",function(){P&&y>=9&&r.hasSelection&&(r.hasSelection=null),A.poll()}),Pe(N,"paste",function(ne){if(ae(O,ne)||ol(ne,O))return;O.state.pasteIncoming=+new Date,A.fastPoll()});function Y(ne){if(ae(O,ne))return;if(O.somethingSelected())es({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var ue=ll(O);es({lineWise:!0,text:ue.text}),ne.type=="cut"?O.setSelections(ue.ranges,null,ce):(A.prevInput="",N.value=ue.text.join(`
`),W(N))}else return;ne.type=="cut"&&(O.state.cutIncoming=+new Date)}Pe(N,"cut",Y),Pe(N,"copy",Y),Pe(e.scroller,"paste",function(ne){if(va(e,ne)||ae(O,ne))return;if(!N.dispatchEvent){O.state.pasteIncoming=+new Date,A.focus();return}var ue=new Event("paste");ue.clipboardData=ne.clipboardData,N.dispatchEvent(ue)}),Pe(e.lineSpace,"selectstart",function(ne){va(e,ne)||ie(ne)}),Pe(N,"compositionstart",function(){var ne=O.getCursor("from");A.composing&&A.composing.range.clear(),A.composing={start:ne,range:O.markText(ne,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(N,"compositionend",function(){A.composing&&(A.poll(),A.composing.range.clear(),A.composing=null)})},_a.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},_a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},_a.prototype.prepareSelection=function(){var e=this.cm,r=e.display,A=e.doc,O=Ja(e);if(e.options.moveInputWithCursor){var N=Wn(e,A.sel.primary().head,"div"),Y=r.wrapper.getBoundingClientRect(),ne=r.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,N.top+ne.top-Y.top)),O.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,N.left+ne.left-Y.left))}return O},_a.prototype.showSelection=function(e){var r=this.cm,A=r.display;f(A.cursorDiv,e.cursors),f(A.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},_a.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var A=r.getSelection();this.textarea.value=A,r.state.focused&&W(this.textarea),P&&y>=9&&(this.hasSelection=A)}else e||(this.prevInput=this.textarea.value="",P&&y>=9&&(this.hasSelection=null))},_a.prototype.getField=function(){return this.textarea},_a.prototype.supportsTouch=function(){return!1},_a.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},_a.prototype.blur=function(){this.textarea.blur()},_a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},_a.prototype.receivedFocus=function(){this.slowPoll()},_a.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()})},_a.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function A(){var O=r.poll();!O&&!e?(e=!0,r.polling.set(60,A)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,A)},_a.prototype.poll=function(){var e=this,r=this.cm,A=this.textarea,O=this.prevInput;if(this.contextMenuPending||!r.state.focused||_t(A)&&!O&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var N=A.value;if(N==O&&!r.somethingSelected())return!1;if(P&&y>=9&&this.hasSelection===N||s&&/[\uf700-\uf7ff]/.test(N))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var Y=N.charCodeAt(0);if(Y==8203&&!O&&(O="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var ne=0,ue=Math.min(O.length,N.length);ne<ue&&O.charCodeAt(ne)==N.charCodeAt(ne);)++ne;return Fa(r,function(){fs(r,N.slice(ne),O.length-ne,null,e.composing?"*compose":null),N.length>1e3||N.indexOf(`
`)>-1?A.value=e.prevInput="":e.prevInput=N,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},_a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_a.prototype.onKeyPress=function(){P&&y>=9&&(this.hasSelection=null),this.fastPoll()},_a.prototype.onContextMenu=function(e){var r=this,A=r.cm,O=A.display,N=r.textarea;r.contextMenuPending&&r.contextMenuPending();var Y=ya(A,e),ne=O.scroller.scrollTop;if(!Y||u)return;var ue=A.options.resetSelectionOnContextMenu;ue&&A.doc.sel.contains(Y)==-1&&ra(A,Wa)(A.doc,An(Y),ce);var he=N.style.cssText,ye=r.wrapper.style.cssText,Ge=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",N.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ge.top-5)+"px; left: "+(e.clientX-Ge.left-5)+`px;
z-index: 1000; background: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Je;t&&(Je=window.scrollY),O.input.focus(),t&&window.scrollTo(null,Je),O.input.reset(),A.somethingSelected()||(N.value=r.prevInput=" "),r.contextMenuPending=bt,O.selForContextMenu=A.doc.sel,clearTimeout(O.detectingSelectAll);function Ct(){if(N.selectionStart!=null){var ln=A.somethingSelected(),En="\u200B"+(ln?N.value:"");N.value="\u21DA",N.value=En,r.prevInput=ln?"":"\u200B",N.selectionStart=1,N.selectionEnd=En.length,O.selForContextMenu=A.doc.sel}}function bt(){if(r.contextMenuPending!=bt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ye,N.style.cssText=he,P&&y<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=ne),N.selectionStart!=null){(!P||P&&y<9)&&Ct();var ln=0,En=function(){O.selForContextMenu==A.doc.sel&&N.selectionStart==0&&N.selectionEnd>0&&r.prevInput=="\u200B"?ra(A,Ds)(A):ln++<10?O.detectingSelectAll=setTimeout(En,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(En,200)}}if(P&&y>=9&&Ct(),k){we(e);var Qt=function(){gt(window,"mouseup",Qt),setTimeout(bt,20)};Pe(window,"mouseup",Qt)}else setTimeout(bt,50)},_a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_a.prototype.setUneditable=function(){},_a.prototype.needsContentAttribute=!1;function ru(e,r){if(r=r?L(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var A=j();r.autofocus=A==e||e.getAttribute("autofocus")!=null&&A==document.body}function O(){e.value=ue.getValue()}var N;if(e.form&&(Pe(e.form,"submit",O),!r.leaveSubmitMethodAlone)){var Y=e.form;N=Y.submit;try{var ne=Y.submit=function(){O(),Y.submit=N,Y.submit(),Y.submit=ne}}catch(he){}}r.finishInit=function(he){he.save=O,he.getTextArea=function(){return e},he.toTextArea=function(){he.toTextArea=isNaN,O(),e.parentNode.removeChild(he.getWrapperElement()),e.style.display="",e.form&&(gt(e.form,"submit",O),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=N))}},e.style.display="none";var ue=ia(function(he){return e.parentNode.insertBefore(he,e.nextSibling)},r);return ue}function au(e){e.off=gt,e.on=Pe,e.wheelEventPixels=Bi,e.Doc=ei,e.splitLines=mt,e.countColumn=G,e.findColumn=je,e.isWordChar=Oe,e.Pass=_e,e.signal=fe,e.Line=mn,e.changeEnd=Zn,e.scrollbarModel=$i,e.Pos=en,e.cmpPos=Yn,e.modes=At,e.mimeModes=pt,e.resolveMode=Ze,e.getMode=at,e.modeExtensions=Tt,e.extendMode=Ht,e.copyState=Jt,e.startState=Qn,e.innerMode=on,e.commands=Fo,e.keyMap=zi,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=xo,e.normalizeKeyMap=Pl,e.StringStream=Hn,e.SharedTextMarker=No,e.TextMarker=qi,e.LineWidget=ko,e.e_preventDefault=ie,e.e_stopPropagation=oe,e.e_stop=we,e.addClass=U,e.contains=g,e.rmClass=v,e.keyNames=eo}$l(ia),ql(ia);var iu="iter insert remove copy getEditor constructor".split(" ");for(var ns in ei.prototype)ei.prototype.hasOwnProperty(ns)&&J(iu,ns)<0&&(ia.prototype[ns]=function(e){return function(){return e.apply(this.doc,arguments)}}(ei.prototype[ns]));return ve(ei),ia.inputStyles={textarea:_a,contenteditable:Vr},ia.defineMode=function(e){!ia.defaults.mode&&e!="null"&&(ia.defaults.mode=e),jt.apply(this,arguments)},ia.defineMIME=Gt,ia.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ia.defineMIME("text/plain","null"),ia.defineExtension=function(e,r){ia.prototype[e]=r},ia.defineDocExtension=function(e,r){ei.prototype[e]=r},ia.fromTextArea=ru,au(ia),ia.version="5.58.2",ia})},WaYH:function(ze,ee,M){"use strict";var X=M("rePB"),B=M("Ff2n"),I=M("VTBJ"),F=M("1OyB"),S=M("vuIU"),C=M("JX7q"),P=M("Ji7U"),y=M("LK+K"),t=M("q1tI"),b=M("TSYQ"),i=M.n(b),u=M("sboe"),p=M("OZM5"),a=function(k){var w=k.prefixCls,v=k.level,c=k.isStart,f=k.isEnd;if(!v)return null;for(var m="".concat(w,"-indent-unit"),_=[],x=0;x<v;x+=1){var g;_.push(t.createElement("span",{key:x,className:i()(m,(g={},Object(X.a)(g,"".concat(m,"-start"),c[x+1]),Object(X.a)(g,"".concat(m,"-end"),f[x+1]),Object(X.a)(g,"".concat(m,"-end-first-level"),!x&&f[0]),g))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(w,"-indent")},_)},o=a,h=M("815F"),l="open",n="close",s="---",d=function(T){Object(P.a)(w,T);var k=Object(y.a)(w);function w(){var v;return Object(F.a)(this,w),v=k.apply(this,arguments),v.state={dragNodeHighlight:!1},v.onSelectorClick=function(c){var f=v.props.context.onNodeClick;f(c,Object(h.b)(v.props)),v.isSelectable()?v.onSelect(c):v.onCheck(c)},v.onSelectorDoubleClick=function(c){var f=v.props.context.onNodeDoubleClick;f(c,Object(h.b)(v.props))},v.onSelect=function(c){if(v.isDisabled())return;var f=v.props.context.onNodeSelect;c.preventDefault(),f(c,Object(h.b)(v.props))},v.onCheck=function(c){if(v.isDisabled())return;var f=v.props,m=f.disableCheckbox,_=f.checked,x=v.props.context.onNodeCheck;if(!v.isCheckable()||m)return;c.preventDefault();var g=!_;x(c,Object(h.b)(v.props),g)},v.onMouseEnter=function(c){var f=v.props.context.onNodeMouseEnter;f(c,Object(h.b)(v.props))},v.onMouseLeave=function(c){var f=v.props.context.onNodeMouseLeave;f(c,Object(h.b)(v.props))},v.onContextMenu=function(c){var f=v.props.context.onNodeContextMenu;f(c,Object(h.b)(v.props))},v.onDragStart=function(c){var f=v.props.context.onNodeDragStart;c.stopPropagation(),v.setState({dragNodeHighlight:!0}),f(c,Object(C.a)(v));try{c.dataTransfer.setData("text/plain","")}catch(m){}},v.onDragEnter=function(c){var f=v.props.context.onNodeDragEnter;c.preventDefault(),c.stopPropagation(),f(c,Object(C.a)(v))},v.onDragOver=function(c){var f=v.props.context.onNodeDragOver;c.preventDefault(),c.stopPropagation(),f(c,Object(C.a)(v))},v.onDragLeave=function(c){var f=v.props.context.onNodeDragLeave;c.stopPropagation(),f(c,Object(C.a)(v))},v.onDragEnd=function(c){var f=v.props.context.onNodeDragEnd;c.stopPropagation(),v.setState({dragNodeHighlight:!1}),f(c,Object(C.a)(v))},v.onDrop=function(c){var f=v.props.context.onNodeDrop;c.preventDefault(),c.stopPropagation(),v.setState({dragNodeHighlight:!1}),f(c,Object(C.a)(v))},v.onExpand=function(c){var f=v.props.context.onNodeExpand;f(c,Object(h.b)(v.props))},v.setSelectHandle=function(c){v.selectHandle=c},v.getNodeState=function(){var c=v.props.expanded;return v.isLeaf()?null:c?l:n},v.hasChildren=function(){var c=v.props.eventKey,f=v.props.context.keyEntities,m=f[c]||{},_=m.children;return!!(_||[]).length},v.isLeaf=function(){var c=v.props,f=c.isLeaf,m=c.loaded,_=v.props.context.loadData,x=v.hasChildren();return f===!1?!1:f||!_&&!x||_&&m&&!x},v.isDisabled=function(){var c=v.props.disabled,f=v.props.context.disabled;return!!(f||c)},v.isCheckable=function(){var c=v.props.checkable,f=v.props.context.checkable;return!f||c===!1?!1:f},v.syncLoadData=function(c){var f=c.expanded,m=c.loading,_=c.loaded,x=v.props.context,g=x.loadData,j=x.onNodeLoad;if(m)return;g&&f&&!v.isLeaf()&&(!v.hasChildren()&&!_&&j(Object(h.b)(v.props)))},v.renderSwitcher=function(){var c=v.props,f=c.expanded,m=c.switcherIcon,_=v.props.context,x=_.prefixCls,g=_.switcherIcon,j=m||g;if(v.isLeaf())return t.createElement("span",{className:i()("".concat(x,"-switcher"),"".concat(x,"-switcher-noop"))},typeof j=="function"?j(Object(I.a)(Object(I.a)({},v.props),{},{isLeaf:!0})):j);var U=i()("".concat(x,"-switcher"),"".concat(x,"-switcher_").concat(f?l:n));return t.createElement("span",{onClick:v.onExpand,className:U},typeof j=="function"?j(Object(I.a)(Object(I.a)({},v.props),{},{isLeaf:!1})):j)},v.renderCheckbox=function(){var c=v.props,f=c.checked,m=c.halfChecked,_=c.disableCheckbox,x=v.props.context.prefixCls,g=v.isDisabled(),j=v.isCheckable();if(!j)return null;var U=typeof j!="boolean"?j:null;return t.createElement("span",{className:i()("".concat(x,"-checkbox"),f&&"".concat(x,"-checkbox-checked"),!f&&m&&"".concat(x,"-checkbox-indeterminate"),(g||_)&&"".concat(x,"-checkbox-disabled")),onClick:v.onCheck},U)},v.renderIcon=function(){var c=v.props.loading,f=v.props.context.prefixCls;return t.createElement("span",{className:i()("".concat(f,"-iconEle"),"".concat(f,"-icon__").concat(v.getNodeState()||"docu"),c&&"".concat(f,"-icon_loading"))})},v.renderSelector=function(){var c=v.state.dragNodeHighlight,f=v.props,m=f.title,_=f.selected,x=f.icon,g=f.loading,j=f.data,U=v.props.context,R=U.prefixCls,W=U.showIcon,H=U.icon,L=U.draggable,G=U.loadData,z=U.titleRender,J=v.isDisabled(),te="".concat(R,"-node-content-wrapper"),_e;if(W){var ce=x||H;_e=ce?t.createElement("span",{className:i()("".concat(R,"-iconEle"),"".concat(R,"-icon__customize"))},typeof ce=="function"?ce(v.props):ce):v.renderIcon()}else G&&g&&(_e=v.renderIcon());var xe;typeof m=="function"?xe=m(j):z?xe=z(j):xe=m;var Te=t.createElement("span",{className:"".concat(R,"-title")},xe);return t.createElement("span",{ref:v.setSelectHandle,title:typeof m=="string"?m:"",className:i()("".concat(te),"".concat(te,"-").concat(v.getNodeState()||"normal"),!J&&(_||c)&&"".concat(R,"-node-selected"),!J&&L&&"draggable"),draggable:!J&&L||void 0,"aria-grabbed":!J&&L||void 0,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,onContextMenu:v.onContextMenu,onClick:v.onSelectorClick,onDoubleClick:v.onSelectorDoubleClick,onDragStart:L?v.onDragStart:void 0},_e,Te)},v}return Object(S.a)(w,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var c=this.props.selectable,f=this.props.context.selectable;return typeof c=="boolean"?c:f}},{key:"render",value:function(){var c,f=this.props,m=f.eventKey,_=f.className,x=f.style,g=f.dragOver,j=f.dragOverGapTop,U=f.dragOverGapBottom,R=f.isLeaf,W=f.isStart,H=f.isEnd,L=f.expanded,G=f.selected,z=f.checked,J=f.halfChecked,te=f.loading,_e=f.domRef,ce=f.active,xe=f.onMouseMove,Te=Object(B.a)(f,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),je=this.props.context,Ce=je.prefixCls,Z=je.filterTreeNode,K=je.draggable,V=je.keyEntities,$=this.isDisabled(),q=Object(p.f)(Te),Q=V[m]||{},ge=Q.level,Oe=H[H.length-1];return t.createElement("div",Object.assign({ref:_e,className:i()(_,"".concat(Ce,"-treenode"),(c={},Object(X.a)(c,"".concat(Ce,"-treenode-disabled"),$),Object(X.a)(c,"".concat(Ce,"-treenode-switcher-").concat(L?"open":"close"),!R),Object(X.a)(c,"".concat(Ce,"-treenode-checkbox-checked"),z),Object(X.a)(c,"".concat(Ce,"-treenode-checkbox-indeterminate"),J),Object(X.a)(c,"".concat(Ce,"-treenode-selected"),G),Object(X.a)(c,"".concat(Ce,"-treenode-loading"),te),Object(X.a)(c,"".concat(Ce,"-treenode-active"),ce),Object(X.a)(c,"".concat(Ce,"-treenode-leaf-last"),Oe),Object(X.a)(c,"drag-over",!$&&g),Object(X.a)(c,"drag-over-gap-top",!$&&j),Object(X.a)(c,"drag-over-gap-bottom",!$&&U),Object(X.a)(c,"filter-node",Z&&Z(Object(h.b)(this.props))),c)),style:x,onDragEnter:K?this.onDragEnter:void 0,onDragOver:K?this.onDragOver:void 0,onDragLeave:K?this.onDragLeave:void 0,onDrop:K?this.onDrop:void 0,onDragEnd:K?this.onDragEnd:void 0,onMouseMove:xe},q),t.createElement(o,{prefixCls:Ce,level:ge,isStart:W,isEnd:H}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),w}(t.Component),E=function(k){return t.createElement(u.a.Consumer,null,function(w){return t.createElement(d,Object.assign({},k,{context:w}))})};E.displayName="TreeNode",E.defaultProps={title:s},E.isTreeNode=1;var D=ee.a=E},Xm8N:function(ze,ee,M){"use strict";var X=M("2qtc"),B=M("kLXV"),I=M("miYZ"),F=M("tsqr"),S=M("9og8"),C=M("WmNS"),P=M.n(C),y=M("q1tI"),t=M.n(y),b=M("ErOA"),i=M("Ty5D"),u=M("9kvl"),p=function(o){var h=o.shixunHomeworks,l=o.dispatch,n=Object(i.i)();return t.a.createElement(B.a,{centered:!0,title:"\u63D0\u793A",visible:h.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(S.a)(P.a.mark(function s(){var d,E,D,T;return P.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(b.a)("/api/myshixuns/".concat(h.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:n.coursesId}});case 2:d=w.sent,d.shixun_identifier&&(F.b.success("\u64CD\u4F5C\u6210\u529F"),l({type:"shixunHomeworks/setActionTabs",payload:{}}),T=d==null||((E=d.new_works)===null||E===void 0||((D=E.find(function(v){return"".concat(v.homework_common_id)===n.categoryId}))===null||D===void 0))?void 0:D.id,u.d.replace("/classrooms/".concat(n.coursesId,"/shixun_homework/").concat(n.categoryId,"/").concat(T,"/comment")));case 4:case"end":return w.stop()}},s)})),onCancel:function(){l({type:"shixunHomeworks/setActionTabs",payload:{}})}},t.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),t.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};ee.a=Object(u.a)(function(a){var o=a.shixunHomeworks;return{shixunHomeworks:o}})(p)},Xmg4:function(ze,ee,M){var X=M("bYtY"),B=M("LPTA"),I=B.devicePixelRatio,F=M("K2GJ"),S=M("3C/r");function C(){return!1}function P(b,i,u){var p=X.createCanvas(),a=i.getWidth(),o=i.getHeight(),h=p.style;return h&&(h.position="absolute",h.left=0,h.top=0,h.width=a+"px",h.height=o+"px",p.setAttribute("data-zr-dom-id",b)),p.width=a*u,p.height=o*u,p}var y=function(b,i,u){var p;u=u||I,typeof b=="string"?p=P(b,i,u):X.isObject(b)&&(p=b,b=p.id),this.id=b,this.dom=p;var a=p.style;a&&(p.onselectstart=C,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=i,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=u};y.prototype={constructor:y,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var b=this.dpr;this.domBack=P("back-"+this.id,this.painter,b),this.ctxBack=this.domBack.getContext("2d"),b!==1&&this.ctxBack.scale(b,b)},resize:function(b,i){var u=this.dpr,p=this.dom,a=p.style,o=this.domBack;a&&(a.width=b+"px",a.height=i+"px"),p.width=b*u,p.height=i*u,o&&(o.width=b*u,o.height=i*u,u!==1&&this.ctxBack.scale(u,u))},clear:function(b,i){var u=this.dom,p=this.ctx,a=u.width,o=u.height,i=i||this.clearColor,h=this.motionBlur&&!b,l=this.lastFrameAlpha,n=this.dpr;if(h&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(u,0,0,a/n,o/n)),p.clearRect(0,0,a,o),i&&i!=="transparent"){var s;i.colorStops?(s=i.__canvasGradient||F.getGradient(p,i,{x:0,y:0,width:a,height:o}),i.__canvasGradient=s):i.image&&(s=S.prototype.getCanvasPattern.call(i,p)),p.save(),p.fillStyle=s||i,p.fillRect(0,0,a,o),p.restore()}if(h){var d=this.domBack;p.save(),p.globalAlpha=l,p.drawImage(d,0,0,a,o),p.restore()}}};var t=y;ze.exports=t},Xnb7:function(ze,ee,M){var X=M("1RvN"),B=new X(50);function I(P){if(typeof P=="string"){var y=B.get(P);return y&&y.image}else return P}function F(P,y,t,b,i){if(P)if(typeof P=="string"){if(y&&y.__zrImageSrc===P||!t)return y;var u=B.get(P),p={hostEl:t,cb:b,cbPayload:i};return u?(y=u.image,!C(y)&&u.pending.push(p)):(y=new Image,y.onload=y.onerror=S,B.put(P,y.__cachedImgObj={image:y,pending:[p]}),y.src=y.__zrImageSrc=P),y}else return P;else return y}function S(){var P=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var y=0;y<P.pending.length;y++){var t=P.pending[y],b=t.cb;b&&b(this,t.cbPayload),t.hostEl.dirty()}P.pending.length=0}function C(P){return P&&P.width&&P.height}ee.findExistImage=I,ee.createOrUpdateImage=F,ee.isImageReady=C},Y1PL:function(ze,ee,M){"use strict";M.r(ee),M.d(ee,"ResizableTextArea",function(){return J});var X=M("wx14"),B=M("1OyB"),I=M("vuIU"),F=M("Ji7U"),S=M("LK+K"),C=M("q1tI"),P=M("VTBJ"),y=M("rePB"),t=M("Zm9Q"),b=M("Kwbf"),i=M("c+Xe"),u=M("m+aA"),p=M("bdgK"),a=new Map;function o(ce){ce.forEach(function(xe){var Te,je=xe.target;(Te=a.get(je))===null||Te===void 0||Te.forEach(function(Ce){return Ce(je)})})}var h=new p.default(o),l=null,n=null;function s(ce,xe){a.has(ce)||(a.set(ce,new Set),h.observe(ce)),a.get(ce).add(xe)}function d(ce,xe){a.has(ce)&&(a.get(ce).delete(xe),a.get(ce).size||(h.unobserve(ce),a.delete(ce)))}var E=function(ce){Object(F.a)(Te,ce);var xe=Object(S.a)(Te);function Te(){return Object(B.a)(this,Te),xe.apply(this,arguments)}return Object(I.a)(Te,[{key:"render",value:function(){return this.props.children}}]),Te}(C.Component),D=C.createContext(null);function T(ce){var xe=ce.children,Te=ce.onBatchResize,je=C.useRef(0),Ce=C.useRef([]),Z=C.useContext(D),K=C.useCallback(function(V,$,q){je.current+=1;var Q=je.current;Ce.current.push({size:V,element:$,data:q}),Promise.resolve().then(function(){Q===je.current&&(Te==null||Te(Ce.current),Ce.current=[])}),Z==null||Z(V,$,q)},[Te,Z]);return C.createElement(D.Provider,{value:K},xe)}function k(ce){var xe=ce.children,Te=ce.disabled,je=C.useRef(null),Ce=C.useRef(null),Z=C.useContext(D),K=C.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),V=C.isValidElement(xe)&&Object(i.c)(xe),$=V?xe.ref:null,q=C.useMemo(function(){return Object(i.a)($,je)},[$,je]),Q=C.useRef(ce);Q.current=ce;var ge=C.useCallback(function(Oe){var Ye=Q.current,le=Ye.onResize,Ee=Ye.data,Re=Oe.getBoundingClientRect(),He=Re.width,et=Re.height,ut=Oe.offsetWidth,Dt=Oe.offsetHeight,We=Math.floor(He),Mt=Math.floor(et);if(K.current.width!==We||K.current.height!==Mt||K.current.offsetWidth!==ut||K.current.offsetHeight!==Dt){var Wt={width:We,height:Mt,offsetWidth:ut,offsetHeight:Dt};K.current=Wt;var Ne=ut===Math.round(He)?He:ut,Pe=Dt===Math.round(et)?et:Dt,it=Object(P.a)(Object(P.a)({},Wt),{},{offsetWidth:Ne,offsetHeight:Pe});Z==null||Z(it,Oe,Ee),le&&Promise.resolve().then(function(){le(it,Oe)})}},[]);return C.useEffect(function(){var Oe=Object(u.a)(je.current)||Object(u.a)(Ce.current);return Oe&&!Te&&s(Oe,ge),function(){return d(Oe,ge)}},[je.current,Te]),C.createElement(E,{ref:Ce},V?C.cloneElement(xe,{ref:q}):xe)}var w="rc-observer-key";function v(ce){var xe=ce.children,Te=Object(t.a)(xe);return Te.map(function(je,Ce){var Z=(je==null?void 0:je.key)||"".concat(w,"-").concat(Ce);return C.createElement(k,Object(X.a)({},ce,{key:Z}),je)})}v.Collection=T;var c=v,f=M("bT9E"),m=M("TSYQ"),_=M.n(m),x=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,g=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],j={},U;function R(ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=ce.getAttribute("id")||ce.getAttribute("data-reactid")||ce.getAttribute("name");if(xe&&j[Te])return j[Te];var je=window.getComputedStyle(ce),Ce=je.getPropertyValue("box-sizing")||je.getPropertyValue("-moz-box-sizing")||je.getPropertyValue("-webkit-box-sizing"),Z=parseFloat(je.getPropertyValue("padding-bottom"))+parseFloat(je.getPropertyValue("padding-top")),K=parseFloat(je.getPropertyValue("border-bottom-width"))+parseFloat(je.getPropertyValue("border-top-width")),V=g.map(function(q){return"".concat(q,":").concat(je.getPropertyValue(q))}).join(";"),$={sizingStyle:V,paddingSize:Z,borderSize:K,boxSizing:Ce};return xe&&Te&&(j[Te]=$),$}function W(ce){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,je=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;U||(U=document.createElement("textarea"),U.setAttribute("tab-index","-1"),U.setAttribute("aria-hidden","true"),document.body.appendChild(U)),ce.getAttribute("wrap")?U.setAttribute("wrap",ce.getAttribute("wrap")):U.removeAttribute("wrap");var Ce=R(ce,xe),Z=Ce.paddingSize,K=Ce.borderSize,V=Ce.boxSizing,$=Ce.sizingStyle;U.setAttribute("style","".concat($,";").concat(x)),U.value=ce.value||ce.placeholder||"";var q=Number.MIN_SAFE_INTEGER,Q=Number.MAX_SAFE_INTEGER,ge=U.scrollHeight,Oe;if(V==="border-box"?ge+=K:V==="content-box"&&(ge-=Z),Te!==null||je!==null){U.value=" ";var Ye=U.scrollHeight-Z;Te!==null&&(q=Ye*Te,V==="border-box"&&(q=q+Z+K),ge=Math.max(q,ge)),je!==null&&(Q=Ye*je,V==="border-box"&&(Q=Q+Z+K),Oe=ge>Q?"":"hidden",ge=Math.min(Q,ge))}return{height:ge,minHeight:q,maxHeight:Q,overflowY:Oe,resize:"none"}}var H=M("Gytx"),L=M.n(H),G;(function(ce){ce[ce.NONE=0]="NONE",ce[ce.RESIZING=1]="RESIZING",ce[ce.RESIZED=2]="RESIZED"})(G||(G={}));var z=function(ce){Object(F.a)(Te,ce);var xe=Object(S.a)(Te);function Te(je){var Ce;return Object(B.a)(this,Te),Ce=xe.call(this,je),Ce.nextFrameActionId=void 0,Ce.resizeFrameId=void 0,Ce.textArea=void 0,Ce.saveTextArea=function(Z){Ce.textArea=Z},Ce.handleResize=function(Z){var K=Ce.state.resizeStatus,V=Ce.props,$=V.autoSize,q=V.onResize;if(K!==G.NONE)return;typeof q=="function"&&q(Z),$&&Ce.resizeOnNextFrame()},Ce.resizeOnNextFrame=function(){cancelAnimationFrame(Ce.nextFrameActionId),Ce.nextFrameActionId=requestAnimationFrame(Ce.resizeTextarea)},Ce.resizeTextarea=function(){var Z=Ce.props.autoSize;if(!Z||!Ce.textArea)return;var K=Z.minRows,V=Z.maxRows,$=W(Ce.textArea,!1,K,V);Ce.setState({textareaStyles:$,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(Ce.resizeFrameId),Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:G.RESIZED},function(){Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:G.NONE}),Ce.fixFirefoxAutoScroll()})})})})},Ce.renderTextArea=function(){var Z=Ce.props,K=Z.prefixCls,V=K===void 0?"rc-textarea":K,$=Z.autoSize,q=Z.onResize,Q=Z.className,ge=Z.disabled,Oe=Ce.state,Ye=Oe.textareaStyles,le=Oe.resizeStatus,Ee=Object(f.a)(Ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Re=_()(V,Q,Object(y.a)({},"".concat(V,"-disabled"),ge));"value"in Ee&&(Ee.value=Ee.value||"");var He=Object(P.a)(Object(P.a)(Object(P.a)({},Ce.props.style),Ye),le===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return C.createElement(c,{onResize:Ce.handleResize,disabled:!($||q)},C.createElement("textarea",Object(X.a)({},Ee,{className:Re,style:He,ref:Ce.saveTextArea})))},Ce.state={textareaStyles:{},resizeStatus:G.NONE},Ce}return Object(I.a)(Te,[{key:"componentDidUpdate",value:function(Ce){(Ce.value!==this.props.value||!L()(Ce.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 Ce=this.textArea.selectionStart,Z=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ce,Z)}}catch(K){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Te}(C.Component),J=z,te=function(ce){Object(F.a)(Te,ce);var xe=Object(S.a)(Te);function Te(je){var Ce;Object(B.a)(this,Te),Ce=xe.call(this,je),Ce.resizableTextArea=void 0,Ce.focus=function(){Ce.resizableTextArea.textArea.focus()},Ce.saveTextArea=function(K){Ce.resizableTextArea=K},Ce.handleChange=function(K){var V=Ce.props.onChange;Ce.setValue(K.target.value,function(){Ce.resizableTextArea.resizeTextarea()}),V&&V(K)},Ce.handleKeyDown=function(K){var V=Ce.props,$=V.onPressEnter,q=V.onKeyDown;K.keyCode===13&&$&&$(K),q&&q(K)};var Z=typeof je.value=="undefined"||je.value===null?je.defaultValue:je.value;return Ce.state={value:Z},Ce}return Object(I.a)(Te,[{key:"setValue",value:function(Ce,Z){"value"in this.props||this.setState({value:Ce},Z)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return C.createElement(J,Object(X.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ce){return"value"in Ce?{value:Ce.value}:null}}]),Te}(C.Component),_e=ee.default=te},YH21:function(ze,ee,M){var X=M("H6uX");ee.Dispatcher=X;var B=M("ItGF"),I=M("Ze12"),F=I.isCanvasEl,S=I.transformCoordWithViewport,C=typeof window!="undefined"&&!!window.addEventListener,P=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,y=[];function t(n,s,d,E){return d=d||{},E||!B.canvasSupported?b(n,s,d):B.browser.firefox&&s.layerX!=null&&s.layerX!==s.offsetX?(d.zrX=s.layerX,d.zrY=s.layerY):s.offsetX!=null?(d.zrX=s.offsetX,d.zrY=s.offsetY):b(n,s,d),d}function b(n,s,d){if(B.domSupported&&n.getBoundingClientRect){var E=s.clientX,D=s.clientY;if(F(n)){var T=n.getBoundingClientRect();d.zrX=E-T.left,d.zrY=D-T.top;return}else if(S(y,n,E,D)){d.zrX=y[0],d.zrY=y[1];return}}d.zrX=d.zrY=0}function i(n){return n||window.event}function u(n,s,d){if(s=i(s),s.zrX!=null)return s;var E=s.type,D=E&&E.indexOf("touch")>=0;if(!D)t(n,s,s,d),s.zrDelta=s.wheelDelta?s.wheelDelta/120:-(s.detail||0)/3;else{var T=E!=="touchend"?s.targetTouches[0]:s.changedTouches[0];T&&t(n,T,s,d)}var k=s.button;return s.which==null&&k!==void 0&&P.test(s.type)&&(s.which=k&1?1:k&2?3:k&4?2:0),s}function p(n,s,d,E){C?n.addEventListener(s,d,E):n.attachEvent("on"+s,d)}function a(n,s,d,E){C?n.removeEventListener(s,d,E):n.detachEvent("on"+s,d)}var o=C?function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0}:function(n){n.returnValue=!1,n.cancelBubble=!0};function h(n){return n.which===2||n.which===3}function l(n){return n.which>1}ee.clientToLocal=t,ee.getNativeEvent=i,ee.normalizeEvent=u,ee.addEventListener=p,ee.removeEventListener=a,ee.stop=o,ee.isMiddleOrRightButtonOnMouseUpDown=h,ee.notLeftMouse=l},YgsL:function(ze,ee,M){var X=M("QBsz"),B=X.distance;function I(S,C,P,y,t,b,i){var u=(P-S)*.5,p=(y-C)*.5;return(2*(C-P)+u+p)*i+(-3*(C-P)-2*u-p)*b+u*t+C}function F(S,C){for(var P=S.length,y=[],t=0,b=1;b<P;b++)t+=B(S[b-1],S[b]);var i=t/2;i=i<P?P:i;for(var b=0;b<i;b++){var u=b/(i-1)*(C?P:P-1),p=Math.floor(u),a=u-p,o,h=S[p%P],l,n;C?(o=S[(p-1+P)%P],l=S[(p+1)%P],n=S[(p+2)%P]):(o=S[p===0?p:p-1],l=S[p>P-2?P-1:p+1],n=S[p>P-3?P-1:p+2]);var s=a*a,d=a*s;y.push([I(o[0],h[0],l[0],n[0],a,s,d),I(o[1],h[1],l[1],n[1],a,s,d)])}return y}ze.exports=F},ZW9T:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return H});var X=M("k1fw"),B=M("oBTY"),I=M("miYZ"),F=M("tsqr"),S=M("rAM+"),C=M("tJVT"),P=M("PpiC"),y=M("q1tI"),t=M.n(y),b=M("bdgK"),i=M("9og8"),u=M("WmNS"),p=M.n(u),a={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"]},o={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"]},h={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 <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].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(`
`)}]},n=M("5VLF"),s=M.n(n),d={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"]}},E=function(G,z){return z.map(function(J){return{label:J,kind:G.languages.CompletionItemKind.Keyword,insertText:J}})},D=function(G){return Object.keys(d.tables).map(function(z){return{label:z,kind:G.languages.CompletionItemKind.Variable,insertText:z}})},T=function(G,z){var J=d.tables[G];return J?J.map(function(te){return{label:te,kind:z.languages.CompletionItemKind.Field,insertText:te}}):[]};function k(L,G,z,J,te){var _e=G.getWordUntilPosition(z),ce={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},xe=J.map(function(Te){return{label:Te,kind:L.languages.CompletionItemKind.Keyword,insertText:Te,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}});return te.map(function(Te){xe.push(Object(X.a)(Object(X.a)({},Te),{},{range:ce}))}),xe}var w=function(L){d.languages.map(function(te){return L.languages.registerDocumentFormattingEditProvider(te,{provideDocumentFormattingEdits:function(ce,xe,Te){return Object(i.a)(p.a.mark(function je(){var Ce;return p.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return Ce=s()(ce.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}),K.abrupt("return",[{range:ce.getFullModelRange(),text:Ce}]);case 2:case"end":return K.stop()}},je)}))()}}),te});var G=h.quickKey.map(function(te){return{label:te.label,kind:L.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),z=l.quickKey.map(function(te){return{label:te.label,kind:L.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),J=o.quickKey.map(function(te){return{label:te.label,kind:L.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(_e,ce){var xe=_e.getWordUntilPosition(ce),Te={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},je=_e.getLineContent(ce.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(B.a)(h.keywords.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})),Object(B.a)(h.quickKey.map(function(Ce){return{label:Ce.label,kind:L.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:je.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(_e,ce){var xe=_e.getWordUntilPosition(ce),Te={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn};return{suggestions:Object(B.a)(a.keywords.map(function(je){return{label:je,kind:L.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(_e,ce){var xe=_e.getWordUntilPosition(ce),Te={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},je=_e.getLineContent(ce.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(B.a)(o.keywords.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})),Object(B.a)(o.quickKey.map(function(Ce){return{label:Ce.label,kind:L.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:je.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(_e,ce){var xe=_e.getWordUntilPosition(ce),Te={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},je=_e.getLineContent(ce.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(B.a)(l.keywords.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})),Object(B.a)(l.quickKey.map(function(Ce){return{label:Ce.label,kind:L.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:je.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}})))}}})},v="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",c=M("fjLI"),f=M("LvDl"),m=M("+ua5");function _(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function x(){}var g=!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 U(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=L;if(Array.isArray(L)){for(var z=0;z<L.length;z++){var J=j[L[z]];if(J)return J}return G[0]}return j[G]||G}var R=null,W=ee.b=function(L){var G=L.width,z=G===void 0?"100%":G,J=L.height,te=J===void 0?"100%":J,_e=L.value,ce=L.language,xe=ce===void 0?"javascript":ce,Te=L.style,je=Te===void 0?{}:Te,Ce=L.options,Z=Ce===void 0?{}:Ce,K=L.overrideServices,V=K===void 0?{}:K,$=L.theme,q=$===void 0?"vs-dark":$,Q=L.onEditBlur,ge=L.onSave,Oe=L.autoHeight,Ye=Oe===void 0?!1:Oe,le=L.forbidCopy,Ee=le===void 0?!1:le,Re=L.onChange,He=Re===void 0?x:Re,et=L.editorDidMount,ut=et===void 0?x:et,Dt=L.onFocus,We=Dt===void 0?x:Dt,Mt=L.filename,Wt=Mt===void 0?"educoder.txt":Mt,Ne=L.errorLine,Pe=L.errorContent,it=Pe===void 0?"":Pe,gt=Object(P.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),fe=Object(y.useRef)(),ae=Object(y.useRef)({}),se=Object(y.useRef)(),de=Object(y.useRef)(),ve=Object(y.useRef)(!1),ie=Object(y.useRef)(),oe=Object(y.useState)(!1),pe=Object(C.a)(oe,2),we=pe[0],Ae=pe[1];function Me(){var Tt;return fe.current&&(Tt=new b.default(function(Ht){var Jt=Object(S.a)(Ht),on;try{for(Jt.s();!(on=Jt.n()).done;){var Qn=on.value;(Qn.target.offsetHeight>0||Qn.target.offsetWidth>0)&&ae.current.instance.layout()}}catch(Hn){Jt.e(Hn)}finally{Jt.f()}}),Tt.observe(fe.current)),Tt}function rt(){F.b.warn(decodeURIComponent(v))}var Pt=function(){var Ht=ae.current.instance;if(_e!=null&&Ht&&we){var Jt=Ht.getModel();Jt&&_e!==Jt.getValue()&&(g=!0,Jt.setValue(_e),Ht.layout(),g=!1)}};Object(y.useEffect)(function(){de.current&&clearTimeout(de.current),de.current=setTimeout(function(){Pt()},500)},[_e,we,ae.current]),Object(y.useEffect)(function(){if(Ne&&ae.current&&ae.current.instance){var Tt=ae.current.instance;Tt.changeViewZones(function(Jt){var on=document.createElement("div");on.style.padding="10px 20px",on.style.width="calc(100% - 20px)",on.className="my-error-line-wrp",on.innerHTML=it,Jt.addZone({afterLineNumber:Ne||11,heightInLines:3,domNode:on})});var Ht={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}};Tt.addOverlayWidget(Ht),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[Ne,ae.current,we]);function Xt(){var Tt=ae.current.instance;if(Tt){var Ht=Tt.getSelection(),Jt=ae.current.pastePos||{},on=new R.Range(Jt.startLineNumber||Ht.endLineNumber,Jt.startColumn||Ht.endColumn,Jt.endLineNumber||Ht.endLineNumber,Jt.endColumn||Ht.endColumn);setTimeout(function(){Tt.executeEdits("",[{range:on,text:""}])},300)}}function lt(Tt){(window.navigator.platform.match("Mac")?Tt.metaKey:Tt.ctrlKey)&&Tt.keyCode==83&&(Tt.preventDefault(),ge())}var zt=function(){if(Ye&&ae.current.instance){var Ht=ae.current.instance.getContentHeight();Ze(Ht<te?te:Ht)}else Ze(te)};function mt(Tt){var Ht=document.createEvent("MouseEvents");Ht.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Tt.dispatchEvent(Ht)}function _t(Tt,Ht){var Jt=window.URL||window.webkitURL||window,on=new Blob([Ht]),Qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qn.href=Jt.createObjectURL(on),Qn.download=Tt,mt(Qn)}Object(y.useEffect)(function(){zt()},[zt]),Object(y.useEffect)(function(){fe.current&&!we&&Promise.all([M.e(18),M.e(29)]).then(M.t.bind(null,"M/lh",7)).then(function(Tt){try{R=Tt,ae.current.instance=R.editor.create(fe.current,{value:_e,language:U(xe),theme:q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},V);var Ht=ae.current.instance,Jt=c.d._menuItems,on=Object(B.a)(Jt).find(function(ar){return ar[0]._debugName=="EditorContext"}),Qn=on[1],Hn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],nn=function(xn,zn){var nr=xn._first;do{var Lr,Cr,en=zn.includes((Lr=nr.element)===null||Lr===void 0||((Cr=Lr.command)===null||Cr===void 0)?void 0:Cr.id);en&&xn._remove(nr)}while(nr=nr.next)};if(ut(Ht,R),setTimeout(function(){zt(),ae.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){_t(Wt||"educoder.txt",Ht.getValue())}}),Ht.getDomNode().addEventListener("input",function(){se.current.autoFormat&&Ht.getAction("editor.action.formatDocument").run()})},500),ae.current.subscription=Ht.onDidChangeModelContent(function(ar){ve.current?clearTimeout(ie.current):(zt(),He(Ht.getValue(),ar)),ie.current=setTimeout(function(){ve.current=!1},500)}),window.Monaco||w(R,U(xe)),Ee&&(nn(Qn,Hn),fe.current.classList.add("noCopyPaste"),Ht.onKeyDown(function(ar){var xn=ar.keyCode,zn=ar.ctrlKey,nr=ar.metaKey;(xn===33||xn===52)&&(nr||zn)&&(rt(),ar.preventDefault())})),window.Monaco=R,Q&&Ht.onDidBlurEditorWidget(function(){Q(Ht.getValue())}),We&&Ht.onDidFocusEditorText(function(){We(Ht.getValue())}),Ee){Ht.addCommand(R.KeyMod.CtrlCmd|R.KeyCode.KEY_V,function(){return rt(),null}),Ht.onDidPaste(function(ar){ae.current.pastePos=ar});try{window.addEventListener("paste",Xt)}catch(ar){}}var Un=Me();return Ae(!0),function(){var ar=ae.current.instance;ar.dispose();var xn=ar.getModel();xn&&xn.dispose(),ae.current.subscription&&ae.current.subscription.dispose(),Ee&&window.removeEventListener("paste",Xt),Un.unobserve(fe.current)}}catch(ar){}})},[]),Object(y.useEffect)(function(){var Tt=ae.current.instance;if(Tt&&we)return document.addEventListener("keydown",lt,!1),function(){document.removeEventListener("keydown",lt)}},[ge,we]),Object(y.useEffect)(function(){var Tt=ae.current.instance;if(Tt&&we){var Ht=U(xe);R.editor.setModelLanguage(Tt.getModel(),Ht),console.log("language:",xe,Tt.getModel(),Ht)}},[xe,we]),Object(y.useEffect)(function(){var Tt=ae.current.instance;Tt&&we&&R.editor.setTheme(q)},[q,we]),Object(y.useEffect)(function(){var Tt=ae.current.instance;se.current=Z,Tt&&we&&(Tt.updateOptions(Object(X.a)({},Z)),setTimeout(function(){Tt.getModel().updateOptions(Object(X.a)({},Z))},200))},[JSON.stringify(Z),we]),Object(y.useEffect)(function(){var Tt=ae.current.instance;Tt&&we&&Tt.layout()},[z,te,we]);var ot=Object(y.useState)(_(z)),Se=Object(C.a)(ot,2),Ue=Se[0],At=Se[1],pt=Object(y.useState)(_(te)),jt=Object(C.a)(pt,2),Gt=jt[0],Ze=jt[1],at=Object(X.a)(Object(X.a)({},je),{},{width:Ue,height:Gt});return t.a.createElement("div",{className:"my-monaco-editor",ref:fe,style:at})};function H(L){var G=L.width,z=G===void 0?"100%":G,J=L.height,te=J===void 0?"100%":J,_e=L.original,ce=L.modified,xe=L.language,Te=L.options,je=Te===void 0?{}:Te,Ce=Object(y.useRef)(),Z=Object(y.useState)(null),K=Object(C.a)(Z,2),V=K[0],$=K[1];function q(Ye){var le;return Ce.current&&(le=new b.default(function(Ee){var Re=Object(S.a)(Ee),He;try{for(Re.s();!(He=Re.n()).done;){var et=He.value;(et.target.offsetHeight>0||et.target.offsetWidth>0)&&Ye.layout()}}catch(ut){Re.e(ut)}finally{Re.f()}}),le.observe(Ce.current)),le}Object(y.useEffect)(function(){Ce.current&&Promise.all([M.e(18),M.e(29)]).then(M.t.bind(null,"M/lh",7)).then(function(Ye){R=Ye;var le=R.editor.createDiffEditor(Ce.current,Object(X.a)(Object(X.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},je),{},{wordWrap:!0}));$(le);var Ee=q(le);return function(){le.dispose();var Re=le.getModel();Re&&Re.dispose(),Ee.unobserve(Ce.current)}})},[]),Object(y.useEffect)(function(){V&&V.setModel({original:R.editor.createModel(_e,xe),modified:R.editor.createModel(ce,xe)})},[_e,ce,xe,V]);var Q=_(z),ge=_(te),Oe={width:Q,height:ge};return t.a.createElement("div",{className:"my-diff-editor",ref:Ce,style:Oe})}},Ze12:function(ze,ee,M){var X=M("ItGF"),B=M("hOwI"),I=B.buildTransformer,F="___zrEVENTSAVED",S=[];function C(i,u,p,a,o){return P(S,u,a,o,!0)&&P(i,p,S[0],S[1])}function P(i,u,p,a,o){if(u.getBoundingClientRect&&X.domSupported&&!b(u)){var h=u[F]||(u[F]={}),l=y(u,h),n=t(l,h,o);if(n)return n(i,p,a),!0}return!1}function y(i,u){var p=u.markers;if(p)return p;p=u.markers=[];for(var a=["left","right"],o=["top","bottom"],h=0;h<4;h++){var l=document.createElement("div"),n=l.style,s=h%2,d=(h>>1)%2;n.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[s]+":0",o[d]+":0",a[1-s]+":auto",o[1-d]+":auto",""].join("!important;"),i.appendChild(l),p.push(l)}return p}function t(i,u,p){for(var a=p?"invTrans":"trans",o=u[a],h=u.srcCoords,l=!0,n=[],s=[],d=0;d<4;d++){var E=i[d].getBoundingClientRect(),D=2*d,T=E.left,k=E.top;n.push(T,k),l=l&&h&&T===h[D]&&k===h[D+1],s.push(i[d].offsetLeft,i[d].offsetTop)}return l&&o?o:(u.srcCoords=n,u[a]=p?I(s,n):I(n,s))}function b(i){return i.nodeName.toUpperCase()==="CANVAS"}ee.transformLocalCoord=C,ee.transformCoordWithViewport=P,ee.isCanvasEl=b},aKvl:function(ze,ee,M){var X=M("Sj9i"),B=X.quadraticProjectPoint;function I(F,S,C,P,y,t,b,i,u){if(b===0)return!1;var p=b;if(u>S+p&&u>P+p&&u>t+p||u<S-p&&u<P-p&&u<t-p||i>F+p&&i>C+p&&i>y+p||i<F-p&&i<C-p&&i<y-p)return!1;var a=B(F,S,C,P,y,t,i,u,null);return a<=p/2}ee.containStroke=I},aX58:function(ze,ee,M){var X=M("3gBT"),B=M("ItGF"),I=M("bYtY"),F=M("0s+r"),S=M("r6Bn"),C=M("7SHv"),P=M("MKOG"),y=M("zarK");/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var t=!B.canvasSupported,b={canvas:C},i={},u="4.3.1";function p(s,d){var E=new n(X(),s,d);return i[E.id]=E,E}function a(s){if(s)s.dispose();else{for(var d in i)i.hasOwnProperty(d)&&i[d].dispose();i={}}return this}function o(s){return i[s]}function h(s,d){b[s]=d}function l(s){delete i[s]}var n=function(s,d,E){E=E||{},this.dom=d,this.id=s;var D=this,T=new S,k=E.renderer;if(t){if(!b.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");k="vml"}else(!k||!b[k])&&(k="canvas");var w=new b[k](d,T,E,s);this.storage=T,this.painter=w;var v=!B.node&&!B.worker?new y(w.getViewportRoot(),w.root):null;this.handler=new F(T,w,v,w.root),this.animation=new P({stage:{update:I.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var c=T.delFromStorage,f=T.addToStorage;T.delFromStorage=function(m){c.call(T,m),m&&m.removeSelfFromZr(D)},T.addToStorage=function(m){f.call(T,m),m.addSelfToZr(D)}};n.prototype={constructor:n,getId:function(){return this.id},add:function(s){this.storage.addRoot(s),this._needsRefresh=!0},remove:function(s){this.storage.delRoot(s),this._needsRefresh=!0},configLayer:function(s,d){this.painter.configLayer&&this.painter.configLayer(s,d),this._needsRefresh=!0},setBackgroundColor:function(s){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(s),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var s;this._needsRefresh&&(s=!0,this.refreshImmediately()),this._needsRefreshHover&&(s=!0,this.refreshHoverImmediately()),s&&this.trigger("rendered")},addHover:function(s,d){if(this.painter.addHover){var E=this.painter.addHover(s,d);return this.refreshHover(),E}},removeHover:function(s){this.painter.removeHover&&(this.painter.removeHover(s),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(s){s=s||{},this.painter.resize(s.width,s.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(s,d){return this.painter.pathToImage(s,d)},setCursorStyle:function(s){this.handler.setCursorStyle(s)},findHover:function(s,d){return this.handler.findHover(s,d)},on:function(s,d,E){this.handler.on(s,d,E)},off:function(s,d){this.handler.off(s,d)},trigger:function(s,d){this.handler.trigger(s,d)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,l(this.id)}},ee.version=u,ee.init=p,ee.dispose=a,ee.getInstance=o,ee.registerPainter=h},bT9E:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return B});var X=M("VTBJ");function B(I,F){var S=Object(X.a)({},I);return Array.isArray(F)&&F.forEach(function(C){delete S[C]}),S}},bYtY:function(ze,ee){var M={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},X={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},B=Object.prototype.toString,I=Array.prototype,F=I.forEach,S=I.filter,C=I.slice,P=I.map,y=I.reduce,t={};function b($,q){$==="createCanvas"&&(l=null),t[$]=q}function i($){if($==null||typeof $!="object")return $;var q=$,Q=B.call($);if(Q==="[object Array]"){if(!je($)){q=[];for(var ge=0,Oe=$.length;ge<Oe;ge++)q[ge]=i($[ge])}}else if(X[Q]){if(!je($)){var Ye=$.constructor;if($.constructor.from)q=Ye.from($);else{q=new Ye($.length);for(var ge=0,Oe=$.length;ge<Oe;ge++)q[ge]=i($[ge])}}}else if(!M[Q]&&!je($)&&!W($)){q={};for(var le in $)$.hasOwnProperty(le)&&(q[le]=i($[le]))}return q}function u($,q,Q){if(!j(q)||!j($))return Q?i(q):$;for(var ge in q)if(q.hasOwnProperty(ge)){var Oe=$[ge],Ye=q[ge];j(Ye)&&j(Oe)&&!_(Ye)&&!_(Oe)&&!W(Ye)&&!W(Oe)&&!U(Ye)&&!U(Oe)&&!je(Ye)&&!je(Oe)?u(Oe,Ye,Q):(Q||!(ge in $))&&($[ge]=i(q[ge],!0))}return $}function p($,q){for(var Q=$[0],ge=1,Oe=$.length;ge<Oe;ge++)Q=u(Q,$[ge],q);return Q}function a($,q){for(var Q in q)q.hasOwnProperty(Q)&&($[Q]=q[Q]);return $}function o($,q,Q){for(var ge in q)q.hasOwnProperty(ge)&&(Q?q[ge]!=null:$[ge]==null)&&($[ge]=q[ge]);return $}var h=function(){return t.createCanvas()};t.createCanvas=function(){return document.createElement("canvas")};var l;function n(){return l||(l=h().getContext("2d")),l}function s($,q){if($){if($.indexOf)return $.indexOf(q);for(var Q=0,ge=$.length;Q<ge;Q++)if($[Q]===q)return Q}return-1}function d($,q){var Q=$.prototype;function ge(){}ge.prototype=q.prototype,$.prototype=new ge;for(var Oe in Q)Q.hasOwnProperty(Oe)&&($.prototype[Oe]=Q[Oe]);$.prototype.constructor=$,$.superClass=q}function E($,q,Q){$="prototype"in $?$.prototype:$,q="prototype"in q?q.prototype:q,o($,q,Q)}function D($){return $?typeof $=="string"?!1:typeof $.length=="number":void 0}function T($,q,Q){if(!($&&q))return;if($.forEach&&$.forEach===F)$.forEach(q,Q);else if($.length===+$.length)for(var ge=0,Oe=$.length;ge<Oe;ge++)q.call(Q,$[ge],ge,$);else for(var Ye in $)$.hasOwnProperty(Ye)&&q.call(Q,$[Ye],Ye,$)}function k($,q,Q){if(!($&&q))return;if($.map&&$.map===P)return $.map(q,Q);for(var ge=[],Oe=0,Ye=$.length;Oe<Ye;Oe++)ge.push(q.call(Q,$[Oe],Oe,$));return ge}function w($,q,Q,ge){if(!($&&q))return;if($.reduce&&$.reduce===y)return $.reduce(q,Q,ge);for(var Oe=0,Ye=$.length;Oe<Ye;Oe++)Q=q.call(ge,Q,$[Oe],Oe,$);return Q}function v($,q,Q){if(!($&&q))return;if($.filter&&$.filter===S)return $.filter(q,Q);for(var ge=[],Oe=0,Ye=$.length;Oe<Ye;Oe++)q.call(Q,$[Oe],Oe,$)&&ge.push($[Oe]);return ge}function c($,q,Q){if(!($&&q))return;for(var ge=0,Oe=$.length;ge<Oe;ge++)if(q.call(Q,$[ge],ge,$))return $[ge]}function f($,q){var Q=C.call(arguments,2);return function(){return $.apply(q,Q.concat(C.call(arguments)))}}function m($){var q=C.call(arguments,1);return function(){return $.apply(this,q.concat(C.call(arguments)))}}function _($){return B.call($)==="[object Array]"}function x($){return typeof $=="function"}function g($){return B.call($)==="[object String]"}function j($){var q=typeof $;return q==="function"||!!$&&q==="object"}function U($){return!!M[B.call($)]}function R($){return!!X[B.call($)]}function W($){return typeof $=="object"&&typeof $.nodeType=="number"&&typeof $.ownerDocument=="object"}function H($){return $!==$}function L($){for(var q=0,Q=arguments.length;q<Q;q++)if(arguments[q]!=null)return arguments[q]}function G($,q){return $!=null?$:q}function z($,q,Q){return $!=null?$:q!=null?q:Q}function J(){return Function.call.apply(C,arguments)}function te($){if(typeof $=="number")return[$,$,$,$];var q=$.length;return q===2?[$[0],$[1],$[0],$[1]]:q===3?[$[0],$[1],$[2],$[1]]:$}function _e($,q){if(!$)throw new Error(q)}function ce($){return $==null?null:typeof $.trim=="function"?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var xe="__ec_primitive__";function Te($){$[xe]=!0}function je($){return $[xe]}function Ce($){var q=_($);this.data={};var Q=this;$ instanceof Ce?$.each(ge):$&&T($,ge);function ge(Oe,Ye){q?Q.set(Oe,Ye):Q.set(Ye,Oe)}}Ce.prototype={constructor:Ce,get:function($){return this.data.hasOwnProperty($)?this.data[$]:null},set:function($,q){return this.data[$]=q},each:function($,q){q!==void 0&&($=f($,q));for(var Q in this.data)this.data.hasOwnProperty(Q)&&$(this.data[Q],Q)},removeKey:function($){delete this.data[$]}};function Z($){return new Ce($)}function K($,q){for(var Q=new $.constructor($.length+q.length),ge=0;ge<$.length;ge++)Q[ge]=$[ge];var Oe=$.length;for(ge=0;ge<q.length;ge++)Q[ge+Oe]=q[ge];return Q}function V(){}ee.$override=b,ee.clone=i,ee.merge=u,ee.mergeAll=p,ee.extend=a,ee.defaults=o,ee.createCanvas=h,ee.getContext=n,ee.indexOf=s,ee.inherits=d,ee.mixin=E,ee.isArrayLike=D,ee.each=T,ee.map=k,ee.reduce=w,ee.filter=v,ee.find=c,ee.bind=f,ee.curry=m,ee.isArray=_,ee.isFunction=x,ee.isString=g,ee.isObject=j,ee.isBuiltInObject=U,ee.isTypedArray=R,ee.isDom=W,ee.eqNaN=H,ee.retrieve=L,ee.retrieve2=G,ee.retrieve3=z,ee.slice=J,ee.normalizeCssArray=te,ee.assert=_e,ee.trim=ce,ee.setAsPrimitive=Te,ee.isPrimitive=je,ee.createHashMap=Z,ee.concatArray=K,ee.noop=V},biw7:function(ze,ee,M){"use strict";var X=M("q1tI"),B=M.n(X),I=X.createContext(null);ee.a=I},c5Ni:function(ze,ee,M){},chpo:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=void 0;var X=1,B=function(){return"".concat(X++)};ee.default=B},dMvE:function(ze,ee){var M={linear:function(B){return B},quadraticIn:function(B){return B*B},quadraticOut:function(B){return B*(2-B)},quadraticInOut:function(B){return(B*=2)<1?.5*B*B:-.5*(--B*(B-2)-1)},cubicIn:function(B){return B*B*B},cubicOut:function(B){return--B*B*B+1},cubicInOut:function(B){return(B*=2)<1?.5*B*B*B:.5*((B-=2)*B*B+2)},quarticIn:function(B){return B*B*B*B},quarticOut:function(B){return 1- --B*B*B*B},quarticInOut:function(B){return(B*=2)<1?.5*B*B*B*B:-.5*((B-=2)*B*B*B-2)},quinticIn:function(B){return B*B*B*B*B},quinticOut:function(B){return--B*B*B*B*B+1},quinticInOut:function(B){return(B*=2)<1?.5*B*B*B*B*B:.5*((B-=2)*B*B*B*B+2)},sinusoidalIn:function(B){return 1-Math.cos(B*Math.PI/2)},sinusoidalOut:function(B){return Math.sin(B*Math.PI/2)},sinusoidalInOut:function(B){return .5*(1-Math.cos(Math.PI*B))},exponentialIn:function(B){return B===0?0:Math.pow(1024,B-1)},exponentialOut:function(B){return B===1?1:1-Math.pow(2,-10*B)},exponentialInOut:function(B){return B===0?0:B===1?1:(B*=2)<1?.5*Math.pow(1024,B-1):.5*(-Math.pow(2,-10*(B-1))+2)},circularIn:function(B){return 1-Math.sqrt(1-B*B)},circularOut:function(B){return Math.sqrt(1- --B*B)},circularInOut:function(B){return(B*=2)<1?-.5*(Math.sqrt(1-B*B)-1):.5*(Math.sqrt(1-(B-=2)*B)+1)},elasticIn:function(B){var I,F=.1,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*Math.asin(1/F)/(2*Math.PI),-(F*Math.pow(2,10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/S)))},elasticOut:function(B){var I,F=.1,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*Math.asin(1/F)/(2*Math.PI),F*Math.pow(2,-10*B)*Math.sin((B-I)*(2*Math.PI)/S)+1)},elasticInOut:function(B){var I,F=.1,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*Math.asin(1/F)/(2*Math.PI),(B*=2)<1?-.5*(F*Math.pow(2,10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/S)):F*Math.pow(2,-10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/S)*.5+1)},backIn:function(B){var I=1.70158;return B*B*((I+1)*B-I)},backOut:function(B){var I=1.70158;return--B*B*((I+1)*B+I)+1},backInOut:function(B){var I=1.70158*1.525;return(B*=2)<1?.5*(B*B*((I+1)*B-I)):.5*((B-=2)*B*((I+1)*B+I)+2)},bounceIn:function(B){return 1-M.bounceOut(1-B)},bounceOut:function(B){return B<1/2.75?7.5625*B*B:B<2/2.75?7.5625*(B-=1.5/2.75)*B+.75:B<2.5/2.75?7.5625*(B-=2.25/2.75)*B+.9375:7.5625*(B-=2.625/2.75)*B+.984375},bounceInOut:function(B){return B<.5?M.bounceIn(B*2)*.5:M.bounceOut(B*2-1)*.5+.5}},X=M;ze.exports=X},dejd:function(ze,ee,M){},dmUQ:function(ze,ee,M){"use strict";var X=M("Ff2n"),B=M("rePB"),I=M("1OyB"),F=M("vuIU"),S=M("Ji7U"),C=M("md7G"),P=M("foSv"),y=M("q1tI"),t=M.n(y),b=M("TSYQ"),i=M.n(b),u=M("4IlW");function p(f,m){var _=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);m&&(x=x.filter(function(g){return Object.getOwnPropertyDescriptor(f,g).enumerable})),_.push.apply(_,x)}return _}function a(f){for(var m=1;m<arguments.length;m++){var _=arguments[m]!=null?arguments[m]:{};m%2?p(Object(_),!0).forEach(function(x){Object(B.a)(f,x,_[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(_)):p(Object(_)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(_,x))})}return f}function o(f){var m=h();return function(){var x=Object(P.a)(f),g;if(m){var j=Object(P.a)(this).constructor;g=Reflect.construct(x,arguments,j)}else g=x.apply(this,arguments);return Object(C.a)(this,g)}}function h(){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(f){return!1}}function l(){}function n(f){f.preventDefault()}var s=function(m){return m.replace(/[^\w.-]+/g,"")},d=200,E=600,D=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,T=function(m){return m!=null},k=function(m,_){return _===m||typeof _=="number"&&typeof m=="number"&&isNaN(_)&&isNaN(m)},w=function(f){Object(S.a)(_,f);var m=o(_);function _(x){var g;Object(I.a)(this,_),g=m.call(this,x),g.onKeyDown=function(R){var W=g.props,H=W.onKeyDown,L=W.onPressEnter;if(R.keyCode===u.a.UP){var G=g.getRatio(R);g.up(R,G,null),g.stop()}else if(R.keyCode===u.a.DOWN){var z=g.getRatio(R);g.down(R,z,null),g.stop()}else R.keyCode===u.a.ENTER&&L&&L(R);if(g.recordCursorPosition(),g.lastKeyCode=R.keyCode,H){for(var J=arguments.length,te=new Array(J>1?J-1:0),_e=1;_e<J;_e++)te[_e-1]=arguments[_e];H.apply(void 0,[R].concat(te))}},g.onKeyUp=function(R){var W=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),W){for(var H=arguments.length,L=new Array(H>1?H-1:0),G=1;G<H;G++)L[G-1]=arguments[G];W.apply(void 0,[R].concat(L))}},g.onChange=function(R){var W=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(R)),g.setState({inputValue:g.rawInput}),W(g.toNumber(g.rawInput))},g.onMouseUp=function(){var R=g.props.onMouseUp;g.recordCursorPosition(),R&&R.apply(void 0,arguments)},g.onFocus=function(){var R;g.setState({focused:!0}),(R=g.props).onFocus.apply(R,arguments)},g.onBlur=function(){var R=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var W=g.getCurrentValidValue(g.state.inputValue),H=g.setValue(W,l);if(R){var L=g.input.value,G=g.getInputDisplayValue({focus:!1,value:H});g.input.value=G&&Number(G),R.apply(void 0,arguments),g.input.value=L}},g.getRatio=function(R){var W=1;return R.metaKey||R.ctrlKey?W=.1:R.shiftKey&&(W=10),W},g.getFullNum=function(R){return isNaN(R)?R:/e/i.test(String(R))?Number(R).toFixed(18).replace(/\.?0+$/,""):R},g.getPrecision=function(R){if(T(g.props.precision))return g.props.precision;var W=String(R);if(W.indexOf("e-")>=0)return parseInt(W.slice(W.indexOf("e-")+2),10);var H=0;return W.indexOf(".")>=0&&(H=W.length-W.indexOf(".")-1),H},g.getInputDisplayValue=function(R){var W=R||g.state,H=W.focused,L=W.inputValue,G=W.value,z;H?z=L:z=g.toPrecisionAsStep(G),z==null&&(z="");var J=g.formatWrapper(z);return T(g.props.decimalSeparator)&&(J=J.toString().replace(".",g.props.decimalSeparator)),J},g.recordCursorPosition=function(){try{g.cursorStart=g.input.selectionStart,g.cursorEnd=g.input.selectionEnd,g.currentValue=g.input.value,g.cursorBefore=g.input.value.substring(0,g.cursorStart),g.cursorAfter=g.input.value.substring(g.cursorEnd)}catch(R){}},g.restoreByAfter=function(R){if(R===void 0)return!1;var W=g.input.value,H=W.lastIndexOf(R);if(H===-1)return!1;var L=g.cursorBefore.length;return g.lastKeyCode===u.a.DELETE&&g.cursorBefore.charAt(L-1)===R[0]?(g.fixCaret(L,L),!0):H+R.length===W.length?(g.fixCaret(H,H),!0):!1},g.partRestoreByAfter=function(R){return R===void 0?!1:Array.prototype.some.call(R,function(W,H){var L=R.substring(H);return g.restoreByAfter(L)})},g.isNotCompleteNumber=function(R){return isNaN(R)||R===""||R===null||R&&R.toString().indexOf(".")===R.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(R,W,H){g.pressingUpOrDown=!0,g.step("down",R,W,H)},g.up=function(R,W,H){g.pressingUpOrDown=!0,g.step("up",R,W,H)},g.saveInput=function(R){g.input=R};var j=x.value;j===void 0&&(j=x.defaultValue),g.state={focused:x.autoFocus};var U=g.getValidValue(g.toNumber(j));return g.state=a(a({},g.state),{},{inputValue:g.toPrecisionAsStep(U),value:U}),g}return Object(F.a)(_,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var j=this.props,U=j.value,R=j.onChange,W=j.max,H=j.min,L=this.state.focused;if(g){if(!k(g.value,U)||!k(g.max,W)||!k(g.min,H)){var G=L?U:this.getValidValue(U),z;this.pressingUpOrDown?z=G:this.inputting?z=this.rawInput:z=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:z})}var J="value"in this.props?U:this.state.value;"max"in this.props&&g.max!==W&&typeof J=="number"&&J>W&&R&&R(W),"min"in this.props&&g.min!==H&&typeof J=="number"&&J<H&&R&&R(H)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var te=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?te=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(te=this.cursorStart):te=this.input.value.length,this.fixCaret(te,te)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(_e){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(g){var j=g;return j===""?j="":this.isNotCompleteNumber(parseFloat(j))?j=this.state.value:j=this.getValidValue(j),this.toNumber(j)}},{key:"getValueFromEvent",value:function(g){var j=g.target.value.trim().replace(/。/g,".");return T(this.props.decimalSeparator)&&(j=j.replace(this.props.decimalSeparator,".")),j}},{key:"getValidValue",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,R=parseFloat(g);return isNaN(R)?g:(R<j&&(R=j),R>U&&(R=U),R)}},{key:"setValue",value:function(g,j){var U=this.props.precision,R=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),W=this.state.value,H=W===void 0?null:W,L=this.state.inputValue,G=L===void 0?null:L,z=typeof R=="number"?R.toFixed(U):"".concat(R),J=R!==H||z!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},j)):this.setState({value:R,inputValue:this.toPrecisionAsStep(g)},j),J&&this.props.onChange(R),R}},{key:"getMaxPrecision",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.props,R=U.precision,W=U.step;if(T(R))return R;var H=this.getPrecision(j),L=this.getPrecision(W),G=this.getPrecision(g);return g?Math.max(G,H+L):H+L}},{key:"getPrecisionFactor",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.getMaxPrecision(g,j);return Math.pow(10,U)}},{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(g){return this.props.formatter?this.props.formatter(g):g}},{key:"toPrecisionAsStep",value:function(g){if(this.isNotCompleteNumber(g)||g==="")return g;var j=Math.abs(this.getMaxPrecision(g));return isNaN(j)?g.toString():Number(g).toFixed(j)}},{key:"toNumber",value:function(g){var j=this.props.precision,U=this.state.focused,R=g&&g.length>16&&U;return this.isNotCompleteNumber(g)||R?g:T(j)?Math.round(g*Math.pow(10,j))/Math.pow(10,j):Number(g)}},{key:"upStep",value:function(g,j){var U=this.props.step,R=this.getPrecisionFactor(g,j),W=Math.abs(this.getMaxPrecision(g,j)),H=((R*g+R*U*j)/R).toFixed(W);return this.toNumber(H)}},{key:"downStep",value:function(g,j){var U=this.props.step,R=this.getPrecisionFactor(g,j),W=Math.abs(this.getMaxPrecision(g,j)),H=((R*g-R*U*j)/R).toFixed(W);return this.toNumber(H)}},{key:"step",value:function(g,j){var U=this,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,W=arguments.length>3?arguments[3]:void 0;this.stop(),j&&(j.persist(),j.preventDefault());var H=this.props;if(H.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var G=this["".concat(g,"Step")](L,R),z=G>H.max||G<H.min;if(G>H.max?G=H.max:G<H.min&&(G=H.min),this.setValue(G,null),this.setState({focused:!0},function(){U.pressingUpOrDown=!1}),z)return;this.autoStepTimer=setTimeout(function(){U[g](j,R,!0)},W?d:E)}},{key:"fixCaret",value:function(g,j){if(g===void 0||j===void 0||!this.input||!this.input.value)return;try{var U=this.input.selectionStart,R=this.input.selectionEnd;(g!==U||j!==R)&&this.input.setSelectionRange(g,j)}catch(W){}}},{key:"render",value:function(){var g,j=this.props,U=j.prefixCls,R=j.disabled,W=j.readOnly,H=j.useTouch,L=j.autoComplete,G=j.upHandler,z=j.downHandler,J=j.className,te=j.max,_e=j.min,ce=j.style,xe=j.title,Te=j.onMouseEnter,je=j.onMouseLeave,Ce=j.onMouseOver,Z=j.onMouseOut,K=j.required,V=j.onClick,$=j.tabIndex,q=j.type,Q=j.placeholder,ge=j.id,Oe=j.inputMode,Ye=j.pattern,le=j.step,Ee=j.maxLength,Re=j.autoFocus,He=j.name,et=j.onPaste,ut=j.onInput,Dt=Object(X.a)(j,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),We=this.state,Mt=We.value,Wt=We.focused,Ne=i()(U,(g={},Object(B.a)(g,J,!!J),Object(B.a)(g,"".concat(U,"-disabled"),R),Object(B.a)(g,"".concat(U,"-focused"),Wt),g)),Pe={};Object.keys(Dt).forEach(function(we){(we.substr(0,5)==="data-"||we.substr(0,5)==="aria-"||we==="role")&&(Pe[we]=Dt[we])});var it=!W&&!R,gt=this.getInputDisplayValue(null),fe=(Mt||Mt===0)&&(isNaN(Mt)||Number(Mt)>=te),ae=(Mt||Mt===0)&&(isNaN(Mt)||Number(Mt)<=_e),se=fe||R||W,de=ae||R||W,ve=i()("".concat(U,"-handler"),"".concat(U,"-handler-up"),Object(B.a)({},"".concat(U,"-handler-up-disabled"),se)),ie=i()("".concat(U,"-handler"),"".concat(U,"-handler-down"),Object(B.a)({},"".concat(U,"-handler-down-disabled"),de)),oe=H?{onTouchStart:se?l:this.up,onTouchEnd:this.stop}:{onMouseDown:se?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},pe=H?{onTouchStart:de?l:this.down,onTouchEnd:this.stop}:{onMouseDown:de?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Ne,style:ce,title:xe,onMouseEnter:Te,onMouseLeave:je,onMouseOver:Ce,onMouseOut:Z,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(U,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},oe,{role:"button","aria-label":"Increase Value","aria-disabled":se,className:ve}),G||t.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-up-inner"),onClick:n})),t.a.createElement("span",Object.assign({unselectable:"on"},pe,{role:"button","aria-label":"Decrease Value","aria-disabled":de,className:ie}),z||t.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-down-inner"),onClick:n}))),t.a.createElement("div",{className:"".concat(U,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":_e,"aria-valuemax":te,"aria-valuenow":Mt,required:K,type:q,placeholder:Q,onPaste:et,onClick:V,onMouseUp:this.onMouseUp,className:"".concat(U,"-input"),tabIndex:$,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:it?this.onKeyDown:l,onKeyUp:it?this.onKeyUp:l,autoFocus:Re,maxLength:Ee,readOnly:W,disabled:R,max:te,min:_e,step:le,name:He,title:xe,id:ge,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(gt),pattern:Ye,inputMode:Oe,onInput:ut},Pe))))}}]),_}(t.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:D,min:-D,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var v=w,c=ee.a=v},dqUG:function(ze,ee,M){var X=M("Gev7"),B=M("bYtY"),I=M("6GrX"),F=M("pzxd"),S=M("gut8"),C=S.ContextCachedBy,P=function(t){X.call(this,t)};P.prototype={constructor:P,type:"text",brush:function(t,b){var i=this.style;this.__dirty&&F.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var u=i.text;if(u!=null&&(u+=""),!F.needDrawText(u,i)){t.__attrCachedBy=C.NONE;return}this.setTransform(t),F.renderText(this,t,u,i,null,b),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&F.normalizeTextStyle(t,!0),!this._rect){var b=t.text;b!=null?b+="":b="";var i=I.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,F.getStroke(t.textStroke,t.textStrokeWidth)){var u=t.textStrokeWidth;i.x-=u/2,i.y-=u/2,i.width+=u,i.height+=u}this._rect=i}return this._rect}},B.inherits(P,X);var y=P;ze.exports=y},eozf:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return je}),M.d(ee,"c",function(){return Ce});var X=M("sRBo"),B=M("kaz8"),I=M("5Dmo"),F=M("3S7+"),S=M("/zsF"),C=M("PArb"),P=M("7Kak"),y=M("9yH6"),t=M("14J3"),b=M("BMrR"),i=M("+L6B"),u=M("2/Rp"),p=M("jCWc"),a=M("kPKH"),o=M("2qtc"),h=M("kLXV"),l=M("9og8"),n=M("miYZ"),s=M("tsqr"),d=M("oBTY"),E=M("k1fw"),D=M("tJVT"),T=M("OaEy"),k=M("2fM7"),w=M("iQDF"),v=M("+eQT"),c=M("WmNS"),f=M.n(c),m=M("q1tI"),_=M.n(m),x=M("/MfK"),g=M("w5pM"),j=M("Lyp1"),U=M("wd/R"),R=M.n(U),W=M("xKgJ"),H=M("ErOA"),L=M("LvDl"),G=M.n(L),z=M("1vsH"),J=M("zetH"),te=M.n(J),_e=M("Ty5D"),ce=M("9kvl"),xe=M("AHFd");function Te($,q){for(var Q=[],ge=$;ge<q;ge++)Q.push(ge);return Q}var je=function(q,Q,ge){var Oe=q<R()().startOf("day"),Ye=q>R()(Q).endOf("day"),le=q<R()(ge).startOf("day");return Q?ge?R()()<=R()(ge)?le||Ye:Oe||Ye:q&&Oe||Ye:ge&&R()()<=R()(ge)?le:Oe},Ce=function(q,Q){var ge=parseInt(R()(q).format("HH")),Oe=parseInt(R()().format("HH")),Ye=parseInt(R()().format("mm"));if(!q)return{disabledHours:function(){return Te(0,Oe)},disabledMinutes:function(){return Te(0,Ye)}};if(Q){var le=parseInt(R()(Q).format("HH")),Ee=parseInt(R()(Q).format("mm"));return R()(q).isSame(R()(Q),"day")?{disabledHours:function(){return Te(0,le)},disabledMinutes:function(){return ge<=le?Te(0,Ee):[]}}:void 0}return R()(q).isSame(R()(),"day")?{disabledHours:function(){return Te(0,Oe)},disabledMinutes:function(){return R()(q).isSame(R()(),"hour")&&ge<=Oe?Te(0,Ye):[]}}:void 0},Z=v.a.RangePicker,K=k.a.Option,V=function(q){var Q,ge,Oe,Ye,le,Ee,Re,He=q.shixunHomeworks,et=q.loading,ut=q.dispatch,Dt=Object(_e.i)(),We=He.workSetting,Mt=He.workList,Wt=He.changeData,Ne=Object(m.useState)(!0),Pe=Object(D.a)(Ne,2),it=Pe[0],gt=Pe[1],fe=Object(m.useState)(!1),ae=Object(D.a)(fe,2),se=ae[0],de=ae[1],ve=Object(m.useState)([]),ie=Object(D.a)(ve,2),oe=ie[0],pe=ie[1],we=Object(m.useState)([]),Ae=Object(D.a)(we,2),Me=Ae[0],rt=Ae[1],Pt=Object(m.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:xe.a.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0}),Xt=Object(D.a)(Pt,2),lt=Xt[0],zt=Xt[1];Object(m.useEffect)(function(){return mt(),function(){pe([].concat())}},[]);var mt=function(){ut({type:"shixunHomeworks/getWorkSetting",payload:Object(E.a)({},Dt)})};Object(m.useEffect)(function(){var Ze;if(!(We!=null&&We.course_id))return;Object.keys(lt).map(function(at){lt[at]=We[at]}),(!lt.allow_late||!lt.unified_late)&&(lt.late_penalty=20,lt.penalty_type=xe.a.Percent),lt.unified_setting||(lt.unified_late=!1,lt.unified_anonymous_comment=!1,lt.unified_anonymous_appeal=!1),oe=JSON.parse(JSON.stringify(We.group_settings.map(function(at){return Object(E.a)(Object(E.a)({},at),{},{group_name:[at.group_name]})}).filter(function(at){return at.publish_time!==null}))),Me=JSON.parse(JSON.stringify(We.allow_late_settings.map(function(at){return Object(E.a)(Object(E.a)({},at),{},{group_name:[at.group_name]})}).filter(function(at){return at.late_time!==null}))),zt(Object(E.a)({},lt)),pe(Object(d.a)(oe)),((Ze=Me)===null||Ze===void 0?void 0:Ze.length)<=0?rt([{penalty_type:xe.a.Percent,late_penalty:20}]):rt(Object(d.a)(Me))},[We]);var _t=function(){var at,Tt,Ht=JSON.parse(JSON.stringify(lt));if(Ht.challenge_settings.filter(function(on){return!on.hide}),Ht.categoryId=Dt.categoryId,(at=Ht.challenge_settings)!==null&&at!==void 0&&at.every(function(on){return!on.checked})){s.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(lt.unified_setting||(oe=(Tt=oe)===null||Tt===void 0?void 0:Tt.map(function(on){var Qn;if(!on.publish_time||!on.end_time)throw s.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!on.group_name)throw s.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return on.group_name=typeof(on==null?void 0:on.group_name)=="string"?[on==null?void 0:on.group_name]:on==null?void 0:on.group_name,on.group_id=(Qn=We.group_settings)===null||Qn===void 0?void 0:Qn.filter(function(Hn){var nn;return on==null||((nn=on.group_name)===null||nn===void 0)?void 0:nn.includes(Hn.group_name)}).map(function(Hn){return Hn.group_id||Hn.id}).toString().split(","),on})),Ht.group_settings=oe,lt.allow_late)if(lt.unified_late){if(lt.late_penalty===null||lt.late_penalty===void 0||lt.late_penalty<0||lt.late_penalty>100)throw s.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!lt.late_time)throw s.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var Jt;Me=(Jt=Me)===null||Jt===void 0?void 0:Jt.map(function(on){var Qn,Hn;if(on.late_penalty===null||on.late_penalty===void 0||on.late_penalty<0||on.late_penalty>100)throw s.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!on.late_time)throw s.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!on.group_name)throw s.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return on.group_name=typeof(on==null?void 0:on.group_name)=="string"?[on==null?void 0:on.group_name]:on==null?void 0:on.group_name,on.group_id=on==null||((Qn=on.group_name)===null||Qn===void 0||((Hn=Qn.map(function(nn){var Un,ar,xn=(Un=We.group_settings)===null||Un===void 0||((ar=Un.filter(function(zn){return(zn==null?void 0:zn.group_name)===nn}))===null||ar===void 0)?void 0:ar[0];return xn==null?void 0:xn.group_id}))===null||Hn===void 0))?void 0:Hn.toString().split(","),on}),Ht.allow_late_settings=Me}ot(Ht)},ot=function(at){var Tt,Ht;if(at.total_score===null){s.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(at!=null&&at.work_efficiency&&at.eff_score===null){s.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var Jt=at.challenge_settings.reduce(function(Hn,nn){return Hn+Number(nn.challenge_score)},0);if((Jt==null?void 0:Jt.toFixed(10))!==((Tt=at.total_score-at.eff_score)===null||Tt===void 0?void 0:Tt.toFixed(10))){s.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(at.total_score,"\u5206"));return}var on={shixun_evaluation:at.shixun_evaluation,challenge_settings:at.challenge_settings},Qn=function(){var Hn=Object(l.a)(f.a.mark(function nn(){var Un;return f.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return de(!0),xn.next=3,Object(H.a)("/api/homework_commons/".concat(Dt.categoryId,"/publish_setting.json"),{method:"post",body:Object(E.a)({},at)});case 3:Un=xn.sent,Un.status===0&&(s.b.success("\u66F4\u65B0\u6210\u529F"),gt(!0),mt(),ut({type:"shixunHomeworks/getWorkList",payload:Object(E.a)({},Dt)})),de(!1);case 6:case"end":return xn.stop()}},nn)}));return function(){return Hn.apply(this,arguments)}}();!Object(L.isEqual)(Wt,on)&&!(Mt!=null&&(Ht=Mt.homework_status)!==null&&Ht!==void 0&&Ht.includes("\u672A\u53D1\u5E03"))?h.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Qn}):Qn()},Se=function(at,Tt){var Ht,Jt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"group_id";return Tt?Tt.find(function(on){return on[Jt]===at}):We==null||((Ht=We.group_settings)===null||Ht===void 0)?void 0:Ht.find(function(on){return on.group_id[0]===at})},Ue=(We==null?void 0:We.allow_late)||(We==null?void 0:We.anonymous_comment),At=function(at){var Tt=Se(at,We==null?void 0:We.allow_late_settings,"id"),Ht=Se(at,We==null?void 0:We.anonymous_comment_settings);return(We==null?void 0:We.allow_late)&&Tt&&(Tt==null?void 0:Tt.late_time)!==null||(We==null?void 0:We.anonymous_comment)&&Ht&&(Ht==null?void 0:Ht.evaluation_start)!==null},pt=Object(m.useMemo)(function(){var Ze;if(We!=null&&We.unified_setting){var at;return!(Mt!=null&&(at=Mt.homework_status)!==null&&at!==void 0&&at.includes("\u5DF2\u622A\u6B62"))||(We==null?void 0:We.allow_late)||(We==null?void 0:We.anonymous_comment)}var Tt=We==null||((Ze=We.group_settings)===null||Ze===void 0)?void 0:Ze.some(function(Ht){return R()(Ht.end_time)<=R()()});return!Tt||(We==null?void 0:We.allow_late)||(We==null?void 0:We.all_group_late)},[We,Mt]),jt=We==null?void 0:We.anonymous_comment,Gt=function(at){if(!at)return!1;var Tt=Se(at,We==null?void 0:We.anonymous_comment_settings);return(We==null?void 0:We.anonymous_comment)&&Tt&&(Tt==null?void 0:Tt.evaluation_start)!==null};return _.a.createElement("section",{className:[te.a.form," bg-white pl30 pr30 pt10"].join(" ")},_.a.createElement(b.a,null,_.a.createElement(a.a,{span:24},_.a.createElement(b.a,{align:"middle"},_.a.createElement(a.a,{flex:"1"}),_.a.createElement(a.a,null,Object(W.c)()&&it&&_.a.createElement(u.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return gt(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")))),_.a.createElement("div",null,_.a.createElement("label",null,"\u53D1\u5E03\u65B9\u5F0F\uFF1A")," ",_.a.createElement(y.a.Group,{disabled:it||!(Mt!=null&&(Q=Mt.homework_status)!==null&&Q!==void 0&&Q.includes("\u672A\u53D1\u5E03")),value:lt.unified_setting,onChange:function(at){var Tt;if(!(Mt!=null&&(Tt=Mt.homework_status)!==null&&Tt!==void 0&&Tt.includes("\u672A\u53D1\u5E03"))){s.b.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(lt.unified_setting=!lt.unified_setting,lt.unified_setting||(lt.unified_late=!1),zt(Object.assign({},lt)),lt.unified_setting===!1&&oe==""){pe(oe.concat({}));return}lt.unified_setting&&(pe([]),rt([{late_penalty:5}]))}},_.a.createElement(y.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),_.a.createElement(y.a,{disabled:(We==null||((ge=We.group_settings)===null||ge===void 0)?void 0:ge.length)===0,value:!1},"\u5206\u73ED\u53D1\u5E03")),(We==null||((Oe=We.group_settings)===null||Oe===void 0)?void 0:Oe.length)===0&&_.a.createElement("p",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09"))),lt.unified_setting&&_.a.createElement("div",null,_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u53D1\u5E03\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(v.a,{disabled:it||!(Mt!=null&&(Ye=Mt.homework_status)!==null&&Ye!==void 0&&Ye.includes("\u672A\u53D1\u5E03")||Mt!=null&&(le=Mt.homework_status)!==null&&le!==void 0&&le.includes("\u672A\u5F00\u59CB")),style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:function(at){return je(at,We==null?void 0:We.course_end_date)},disabledTime:function(at){return Ce(at)},value:lt.publish_time?R()(lt.publish_time):"",onChange:function(at,Tt){lt.publish_time=Tt,(lt.end_time==""||!lt.end_time)&&lt.unified_setting&&(lt.end_time=R()(at).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),zt(Object.assign({},lt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u7684\u65F6\u95F4)"))),_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u622A\u6B62\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(v.a,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:R()(Object(z.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:it||Ue,disabledDate:function(at){return je(at,We==null?void 0:We.course_end_date,lt.publish_time)},disabledTime:function(at){return Ce(at,lt.publish_time)},value:lt.end_time?R()(lt.end_time):"",onChange:function(at,Tt){lt.end_time=Tt,zt(Object.assign({},lt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))),!lt.unified_setting&&((Ee=oe)===null||Ee===void 0?void 0:Ee.length)>0&&_.a.createElement(b.a,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"}},_.a.createElement(a.a,{span:24},_.a.createElement(b.a,null,_.a.createElement(a.a,{span:10}),_.a.createElement(a.a,{span:10},_.a.createElement(b.a,{className:"c-grey-c ml30"},_.a.createElement(a.a,{flex:"1"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4)"),_.a.createElement(a.a,{flex:"1"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9)"))),_.a.createElement(a.a,{span:4}))),oe&&oe.map(function(Ze,at){var Tt,Ht,Jt,on,Qn;return _.a.createElement(a.a,{span:24,key:at},_.a.createElement(b.a,{gutter:[8,16]},_.a.createElement(a.a,{span:10},_.a.createElement(b.a,{gutter:[8,16]},_.a.createElement(a.a,null,"\u53D1\u5E03\u89C4\u5219 ",at+1),_.a.createElement(a.a,{flex:"1",style:{maxWidth:300}},_.a.createElement(k.a,{disabled:it||!(Mt!=null&&(Tt=Mt.homework_status)!==null&&Tt!==void 0&&Tt.includes("\u672A\u53D1\u5E03"))&&Ze.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:Ze.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(nn){oe[at].group_name=nn,oe[at].group_id=Ze.group_id;var Un=Object(L.flattenDeep)(oe.map(function(xn){return xn.group_name})),ar=Me.map(function(xn){var zn=(xn==null?void 0:xn.group_name)||[];return Object(E.a)(Object(E.a)({},xn),{},{group_name:Object(L.remove)(zn,function(nr){return Un.includes(nr)})})});rt(ar),pe(oe.slice())}},We.group_settings&&We.group_settings.map(function(Hn){var nn=oe.map(function(Un){return Un.group_name}).flat();if(!nn.includes(Hn.group_name))return _.a.createElement(K,{value:Hn.group_name,key:Hn.id},Hn.group_name)}))))),_.a.createElement(a.a,{span:10},_.a.createElement("div",{className:"ml30"},_.a.createElement(Z,{ranges:{\u6B64\u523B:[Ze.publish_time?R()(Ze.publish_time):R()(),R()()]},allowClear:!1,disabled:it||(R()()<=R()((Ht=Se((Jt=Ze.group_id)===null||Jt===void 0?void 0:Jt[0]))===null||Ht===void 0?void 0:Ht.publish_time)?!1:[!0,At((on=Ze.group_id)===null||on===void 0?void 0:on[0])]),style:{width:400},placeholder:["\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4","\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4"],disabledDate:function(nn){return je(nn,We==null?void 0:We.course_end_date)},disabledTime:function(nn){return Ce(nn)},showTime:{showNow:!0,format:"HH:mm",defaultValue:[R()(Object(z.d)(),"HH:mm"),R()(Object(z.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:Ze.publish_time&&[R()(Ze.publish_time),Ze.end_time?R()(Ze.end_time):void 0],onChange:function(nn,Un){oe[at].publish_time=Un[0],oe[at].end_time=Un[1],pe(Object(d.a)(oe))}}))),!it&&_.a.createElement(a.a,{span:4},at>0&&!Ze.id&&_.a.createElement(x.a,{onClick:function(){oe=oe.filter(function(nn,Un){return at!==Un}),pe(oe.slice()),setTimeout(function(){return pe(oe.slice())},10)}}),oe.length<(We==null||((Qn=We.group_settings)===null||Qn===void 0)?void 0:Qn.length)&&_.a.createElement(g.a,{className:"c-green ml20",onClick:function(){pe(oe.concat({}))}}))))})),_.a.createElement(C.a,null),_.a.createElement(b.a,null,_.a.createElement(a.a,null,_.a.createElement("strong",null,"\u8865\u4EA4\u8BBE\u7F6E"),_.a.createElement(F.a,{placement:"right",title:"\u4F5C\u4E1A\u622A\u6B62\u540E\u624D\u53EF\u5F00\u542F\u8865\u4EA4\uFF0C\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"},_.a.createElement(j.a,{style:{marginLeft:4,cursor:"pointer"}}))),_.a.createElement(a.a,{span:24,className:"mt15 pl30"},_.a.createElement(B.a,{checked:lt.allow_late,disabled:it||pt,onChange:function(){lt.allow_late=!lt.allow_late,Me==""&&rt([{late_penalty:5}]),zt(Object.assign({},lt))}},_.a.createElement("strong",null,"\u5F00\u542F\u8865\u4EA4")),_.a.createElement(F.a,{overlayStyle:{width:380,maxWidth:380},title:_.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},_.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219\u8BF4\u660E"),_.a.createElement("span",null,"\u5F00\u542F\u8865\u4EA4\uFF0C\u5B66\u751F\u53EA\u5728\u8865\u4EA4\u65F6\u95F4\u5185\u624D\u901A\u5173\u5219\u6263\u9664\u5206\u503C\uFF0C\u672A\u901A\u5173\u4E0D\u6263\u5206\uFF1B"),_.a.createElement("span",null,"\u5B66\u751F\u5728\u6B63\u5E38\u4F5C\u4E1A\u89C4\u5B9A\u65F6\u95F4\u5185\u901A\u5173\uFF0C\u5728\u8865\u4EA4\u9636\u6BB5\u518D\u6B21\u901A\u5173\u4E0D\u6263\u5206\u3002"))},_.a.createElement(j.a,null)))),(lt==null?void 0:lt.allow_late)&&_.a.createElement("div",{style:{marginLeft:22}},_.a.createElement("div",{className:"ml30 mt20"},_.a.createElement("span",null,"\u8865\u4EA4\u65B9\u5F0F\uFF1A"),_.a.createElement(y.a.Group,{disabled:it||(We==null?void 0:We.anonymous_comment)||(We==null?void 0:We.allow_late),value:lt.unified_late,onChange:function(at){lt.unified_late=at.target.value,Me==""&&!at.target.value&&rt([{penalty_type:xe.a.Percent,late_penalty:20}]),zt(Object(E.a)({},lt))}},(lt==null?void 0:lt.unified_setting)&&_.a.createElement(y.a,{value:!0}," \u7EDF\u4E00\u8865\u4EA4 "),(We==null||((Re=We.group_settings)===null||Re===void 0)?void 0:Re.length)>0&&_.a.createElement(y.a,{value:!1}," \u5206\u73ED\u8865\u4EA4 "))),lt!=null&&lt.unified_late?_.a.createElement(_.a.Fragment,null,_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u8865\u4EA4\u6263\u5206:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(xe.b,{disabled:it||jt,value:{type:lt.penalty_type,inputValue:lt.late_penalty},onChange:function(at){zt(Object(E.a)(Object(E.a)({},lt),{},{late_penalty:at.inputValue,penalty_type:at.type}))}})),_.a.createElement(a.a,{flex:"1",className:"ml5"},_.a.createElement("span",{className:"c-grey-c ml10"},lt.penalty_type===xe.a.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6210\u7EE9\u5C06\u6263\u9664\u8865\u4EA4\u5173\u5361\u5206\u503C\u7684\u767E\u5206\u6BD4)"))),_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(v.a,{allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:R()(Object(z.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:it||jt,value:lt.late_time?R()(lt.late_time):"",disabledDate:function(at){return je(at,We==null?void 0:We.course_end_date)},onChange:function(at,Tt){lt.late_time=Tt,zt(Object.assign({},lt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u5EF6\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))):Me.map(function(Ze,at){var Tt;return _.a.createElement(a.a,{span:24,key:at},_.a.createElement(b.a,{className:"mt25"},_.a.createElement(a.a,{style:{marginLeft:30}},_.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219",at+1,"\uFF1A"),_.a.createElement(k.a,{disabled:it||!(Mt!=null&&(Tt=Mt.homework_status)!==null&&Tt!==void 0&&Tt.includes("\u672A\u53D1\u5E03"))&&Ze.id||(We==null?void 0:We.anonymous_comment),mode:"multiple",style:{width:306},value:typeof Ze.group_name=="string"?[Ze.group_name]:Ze.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(Jt){Me[at].group_name=Jt,Me[at].group_id=Ze.group_id,rt(Me.slice())}},We.group_settings&&We.group_settings.map(function(Ht){var Jt=Me.map(function(Qn){return Qn.group_name}).flat(),on=oe.map(function(Qn){return Qn.group_name}).flat();if(lt!=null&&lt.unified_setting){if(!Jt.includes(Ht.group_name))return _.a.createElement(K,{value:Ht.group_name,key:Ht.id},Ht.group_name)}else if(on.includes(Ht.group_name)&&(!Jt.includes(Ht.group_name)&&R()(Ht.end_time)<=R()()))return _.a.createElement(K,{value:Ht.group_name,key:Ht.id},Ht.group_name)}))),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u6263\u5206\uFF1A"),_.a.createElement(xe.b,{disabled:it||Gt(Ze.id),value:{type:Ze.penalty_type,inputValue:Ze.late_penalty},onChange:function(Jt){Me[at].late_penalty=Jt.inputValue,Me[at].penalty_type=Jt.type,rt(Object(d.a)(Me))}})),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\uFF1A"),_.a.createElement(v.a,{disabled:it||Gt(Ze.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:R()(Object(z.d)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:function(Jt){return je(Jt,We==null?void 0:We.course_end_date)},format:"YYYY-MM-DD HH:mm",value:Ze!=null&&Ze.late_time?R()(Ze.late_time):void 0,onChange:function(Jt,on){Me[at].late_time=on,rt(Object(d.a)(Me))}})),!it&&_.a.createElement(a.a,{className:"ml20"},at>0&&!Ze.id&&_.a.createElement(x.a,{onClick:function(){Me=Me.filter(function(Jt,on){return at!==on}),rt(Me.slice()),setTimeout(function(){return rt(Me.slice())},10)}}),_.a.createElement(g.a,{className:"c-green ml20",onClick:function(){rt(Me.concat({penalty_type:xe.a.Percent,late_minus_score:20}))}}))))})),_.a.createElement(C.a,null),!it&&_.a.createElement(a.a,{className:"mb50"},_.a.createElement(u.a,{type:"primary",size:"large",style:{marginTop:"40px"},loading:se,onClick:function(){return _t()}},"\u63D0\u4EA4"),_.a.createElement(u.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){gt(!0),mt()}},"\u53D6\u6D88")))};ee.a=Object(ce.a)(function($){var q=$.shixunHomeworks,Q=$.loading;return{shixunHomeworks:q,loading:Q.effects}})(V)},fW2E:function(ze,ee){var M={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function X(B,I,F){return M.hasOwnProperty(I)?F*=B.dpr:F}ze.exports=X},fjLI:function(ze,ee,M){"use strict";M.d(ee,"f",function(){return p}),M.d(ee,"b",function(){return a}),M.d(ee,"a",function(){return o}),M.d(ee,"d",function(){return h}),M.d(ee,"e",function(){return l}),M.d(ee,"c",function(){return n});var X=M("8HAY"),B=M("Vhoy"),I=M("MI8n"),F=M("JYp7"),S=M("pmY6"),C=M("24hK"),P=M("nnTU"),y=M("T8No"),t=M("Cg/j"),b=M("t9D7"),i=function(s,d,E,D){var T=arguments.length,k=T<3?d:D===null?D=Object.getOwnPropertyDescriptor(d,E):D,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(s,d,E,D);else for(var v=s.length-1;v>=0;v--)(w=s[v])&&(k=(T<3?w(k):T>3?w(d,E,k):w(d,E))||k);return T>3&&k&&Object.defineProperty(d,E,k),k},u=function(s,d){return function(E,D){d(E,D,s)}};function p(s){return s.command!==void 0}class a{constructor(s){this.id=a._idPool++,this._debugName=s}}a._idPool=0,a.CommandPalette=new a("CommandPalette"),a.EditorContext=new a("EditorContext"),a.SimpleEditorContext=new a("SimpleEditorContext"),a.EditorContextCopy=new a("EditorContextCopy"),a.EditorContextPeek=new a("EditorContextPeek"),a.MenubarEditMenu=new a("MenubarEditMenu"),a.MenubarCopy=new a("MenubarCopy"),a.MenubarGoMenu=new a("MenubarGoMenu"),a.MenubarSelectionMenu=new a("MenubarSelectionMenu"),a.InlineCompletionsActions=new a("InlineCompletionsActions");const o=Object(t.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new I.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===a.CommandPalette}}addCommand(s){return this.addCommands(F.a.single(s))}addCommands(s){for(const d of s)this._commands.set(d.id,d);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(S.i)(()=>{let d=!1;for(const E of s)d=this._commands.delete(E.id)||d;d&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((d,E)=>s.set(E,d)),s}appendMenuItem(s,d){return this.appendMenuItems(F.a.single({id:s,item:d}))}appendMenuItems(s){const d=new Set,E=new C.a;for(const{id:D,item:T}of s){let k=this._menuItems.get(D);k||(k=new C.a,this._menuItems.set(D,k)),E.push(k.push(T)),d.add(D)}return this._onDidChangeMenu.fire(d),Object(S.i)(()=>{if(E.size>0){for(let D of E)D();this._onDidChangeMenu.fire(d),E.clear()}})}getMenuItems(s){let d;return this._menuItems.has(s)?d=[...this._menuItems.get(s)]:d=[],s===a.CommandPalette&&this._appendImplicitItems(d),d}_appendImplicitItems(s){const d=new Set;for(const E of s)p(E)&&(d.add(E.command.id),E.alt&&d.add(E.alt.id));this._commands.forEach((E,D)=>{d.has(D)||s.push({command:E})})}};class l extends X.e{constructor(s,d,E,D){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=d,this._contextKeyService=E,this._options=D}get actions(){const s=[],d=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=d.getActions(this._options);d.dispose();for(const[,D]of E)D.length>0&&(s.push(...D),s.push(new X.d));return s.length&&s.pop(),s}}let n=class s{constructor(d,E,D,T,k){var w,v;if(this._commandService=k,this.id=d.id,this.label=(D==null?void 0:D.renderShortTitle)&&d.shortTitle?typeof d.shortTitle=="string"?d.shortTitle:d.shortTitle.value:typeof d.title=="string"?d.title:d.title.value,this.tooltip=(v=typeof d.tooltip=="string"?d.tooltip:(w=d.tooltip)===null||w===void 0?void 0:w.value)!==null&&v!==void 0?v:"",this.enabled=!d.precondition||T.contextMatchesRules(d.precondition),this.checked=void 0,d.toggled){const c=d.toggled.condition?d.toggled:{condition:d.toggled};this.checked=T.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}this.item=d,this.alt=E?new s(E,void 0,D,T,k):void 0,this._options=D,b.d.isThemeIcon(d.icon)&&(this.class=B.a.asClassName(d.icon))}dispose(){}run(...d){var E,D;let T=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(T=[...T,this._options.arg]),((D=this._options)===null||D===void 0?void 0:D.shouldForwardArgs)&&(T=[...T,...d]),this._commandService.executeCommand(this.id,...T)}};n=i([u(3,y.b),u(4,P.b)],n)},fyJ8:function(ze,ee,M){"use strict";var X=M("rePB"),B=M("VTBJ"),I=M("Ff2n"),F=M("U8pU"),S=M("q1tI"),C=M.n(S),P=M("TSYQ"),y=M.n(P),t=M("c+Xe"),b=M("sR1s");function i(h){return h&&Object(F.a)(h)==="object"&&!Array.isArray(h)&&!S.isValidElement(h)}function u(h){return typeof h=="string"?!0:Object(t.c)(h)}function p(h,l){var n,s=h.prefixCls,d=h.className,E=h.record,D=h.index,T=h.dataIndex,k=h.render,w=h.children,v=h.component,c=v===void 0?"td":v,f=h.colSpan,m=h.rowSpan,_=h.fixLeft,x=h.fixRight,g=h.firstFixLeft,j=h.lastFixLeft,U=h.firstFixRight,R=h.lastFixRight,W=h.appendNode,H=h.additionalProps,L=H===void 0?{}:H,G=h.ellipsis,z=h.align,J=h.rowType,te=h.isSticky,_e="".concat(s,"-cell"),ce,xe;if(w)xe=w;else{var Te=Object(b.b)(E,T);if(xe=Te,k){var je=k(Te,E,D);i(je)?(xe=je.children,ce=je.props):xe=je}}Object(F.a)(xe)==="object"&&!Array.isArray(xe)&&!S.isValidElement(xe)&&(xe=null),G&&(j||U)&&(xe=S.createElement("span",{className:"".concat(_e,"-content")},xe));var Ce=ce||{},Z=Ce.colSpan,K=Ce.rowSpan,V=Ce.style,$=Ce.className,q=Object(I.a)(Ce,["colSpan","rowSpan","style","className"]),Q=Z!==void 0?Z:f,ge=K!==void 0?K:m;if(Q===0||ge===0)return null;var Oe={},Ye=typeof _=="number",le=typeof x=="number";Ye&&(Oe.position="sticky",Oe.left=_),le&&(Oe.position="sticky",Oe.right=x);var Ee={};z&&(Ee.textAlign=z);var Re,He=G===!0?{showTitle:!0}:G;He&&(He.showTitle||J==="header")&&(typeof xe=="string"||typeof xe=="number"?Re=xe.toString():S.isValidElement(xe)&&typeof xe.props.children=="string"&&(Re=xe.props.children));var et=Object(B.a)(Object(B.a)(Object(B.a)({title:Re},q),L),{},{colSpan:Q&&Q!==1?Q:null,rowSpan:ge&&ge!==1?ge:null,className:y()(_e,d,(n={},Object(X.a)(n,"".concat(_e,"-fix-left"),Ye),Object(X.a)(n,"".concat(_e,"-fix-left-first"),g),Object(X.a)(n,"".concat(_e,"-fix-left-last"),j),Object(X.a)(n,"".concat(_e,"-fix-right"),le),Object(X.a)(n,"".concat(_e,"-fix-right-first"),U),Object(X.a)(n,"".concat(_e,"-fix-right-last"),R),Object(X.a)(n,"".concat(_e,"-ellipsis"),G),Object(X.a)(n,"".concat(_e,"-with-append"),W),Object(X.a)(n,"".concat(_e,"-fix-sticky"),(Ye||le)&&te),n),L.className,$),style:Object(B.a)(Object(B.a)(Object(B.a)(Object(B.a)({},L.style),Ee),Oe),V),ref:u(c)?l:null});return S.createElement(c,Object.assign({},et),W,xe)}var a=S.forwardRef(p);a.displayName="Cell";var o=S.memo(a,function(h,l){return l.shouldCellUpdate?!l.shouldCellUpdate(l.record,h.record):!1});ee.a=o},gMzb:function(ze,ee,M){"use strict";var X=M("k1fw"),B=M("oBTY"),I=M("9og8"),F=M("tJVT"),S=M("sRBo"),C=M("kaz8"),P=M("WmNS"),y=M.n(P),t=M("q1tI"),b=M.n(t),i=M("9kvl"),u=M("wlus"),p=M("w5pM"),a=M("ErOA"),o=M("OaEy"),h=M("2fM7"),l=M("y8nQ"),n=M("Vl3Y"),s=M("Ty5D"),d=M("yQHh"),E=M.n(d),D=C.a.Group,T=function(m){var _,x,g,j,U,R,W,H,L=m.classroomList,G=m.loading,z=m.user,J=m.exercise_id,te=J===void 0?null:J,_e=m.homework_common_id,ce=_e===void 0?null:_e,xe=m.setitem,Te=m.item,je=m.type,Ce=m.rz,Z=m.dispatch,K=Object(t.useState)([]),V=Object(F.a)(K,2),$=V[0],q=V[1],Q=Object(t.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20}),ge=Object(F.a)(Q,2),Oe=ge[0],Ye=ge[1],le=Object(s.i)(),Ee=Object(t.useState)(!1),Re=Object(F.a)(Ee,2),He=Re[0],et=Re[1],ut=Object(t.useState)(!1),Dt=Object(F.a)(ut,2),We=Dt[0],Mt=Dt[1],Wt=n.a.useForm(),Ne=Object(F.a)(Wt,1),Pe=Ne[0];Object(t.useEffect)(function(){Ce&&(Oe.zydatas=Ce,Ye(Object(X.a)({},Oe)),Te!=null&&Te.ec_course_id&&it())},[Te,Ce]);function it(){return gt.apply(this,arguments)}function gt(){return gt=Object(I.a)(y.a.mark(function ie(){return y.a.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return console.log("----",Te),pe.next=3,fe(Te==null?void 0:Te.ec_major_school_id);case 3:return pe.next=5,se(Te==null?void 0:Te.ec_year_id);case 5:return pe.next=7,ve(Te==null?void 0:Te.ec_course_id);case 7:Pe.setFieldsValue({ec_course_id:Te==null?void 0:Te.ec_course_id,ec_major_school_id:Te==null?void 0:Te.ec_major_school_id,ec_point_ids:Te==null?void 0:Te.ec_point_ids,ec_year_id:Te==null?void 0:Te.ec_year_id});case 8:case"end":return pe.stop()}},ie)})),gt.apply(this,arguments)}function fe(ie){return ae.apply(this,arguments)}function ae(){return ae=Object(I.a)(y.a.mark(function ie(oe){var pe;return y.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.next=2,Object(a.a)("/api/ec_major_schools/".concat(oe,"/ec_years/get_year_list.json"),{method:"get"});case 2:pe=Ae.sent,Oe.jbdatas=pe==null?void 0:pe.data,Ye(Object(X.a)({},Oe)),Pe.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]});case 6:case"end":return Ae.stop()}},ie)})),ae.apply(this,arguments)}function se(ie){return de.apply(this,arguments)}function de(){return de=Object(I.a)(y.a.mark(function ie(oe){var pe;return y.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.next=2,Object(a.a)("/api/ec_years/".concat(oe,"/ec_courses/get_courses.json"),{method:"get"});case 2:pe=Ae.sent,Oe.kcdatas=pe==null?void 0:pe.data,Ye(Object(X.a)({},Oe)),Pe.setFieldsValue({ec_course_id:"",ec_point_ids:[]});case 6:case"end":return Ae.stop()}},ie)})),de.apply(this,arguments)}var ve=function(){var ie=Object(I.a)(y.a.mark(function oe(pe){var we;return y.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,Object(a.a)("/api/ec_courses/".concat(pe,"/ec_points.json"),{method:"get",params:{ec_course_id:pe}});case 2:we=Me.sent,Oe.zsdatas=we==null?void 0:we.data,Ye(Object(X.a)({},Oe));case 5:case"end":return Me.stop()}},oe)}));return function(pe){return ie.apply(this,arguments)}}();return b.a.createElement("div",{className:E.a.from},b.a.createElement(n.a,{form:Pe,layout:"inline",onValuesChange:function(oe){console.log("----",oe),oe.ec_major_school_id&&(Oe.jbdatas=[],Oe.kcdatas=[],Oe.zsdatas=[],Ye(Object(X.a)({},Oe)),fe(oe.ec_major_school_id)),oe.ec_year_id&&(Oe.kcdatas=[],Oe.zsdatas=[],Ye(Object(X.a)({},Oe)),se(oe.ec_year_id)),oe.ec_course_id&&(Oe.zsdatas=[],Ye(Object(X.a)({},Oe)),ve(oe.ec_course_id))},onFinish:function(){var ie=Object(I.a)(y.a.mark(function oe(pe){return y.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:xe(pe);case 1:case"end":return Ae.stop()}},oe)}));return function(oe){return ie.apply(this,arguments)}}()},b.a.createElement(n.a.Item,{label:"\u8BA4\u8BC1\u4E13\u4E1A",name:"ec_major_school_id"},b.a.createElement(h.a,{style:{width:150},disabled:((_=Oe.zydatas)===null||_===void 0?void 0:_.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},Oe==null||((x=Oe.zydatas)===null||x===void 0)?void 0:x.map(function(ie,oe){return b.a.createElement(h.a.Option,{key:oe,value:ie==null?void 0:ie.ec_major_school_id},ie==null?void 0:ie.name)}))),b.a.createElement(n.a.Item,{label:"\u8BA4\u8BC1\u5C4A\u522B",name:"ec_year_id"},b.a.createElement(h.a,{style:{width:150},disabled:((g=Oe.jbdatas)===null||g===void 0?void 0:g.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B"},Oe==null||((j=Oe.jbdatas)===null||j===void 0)?void 0:j.map(function(ie,oe){return b.a.createElement(h.a.Option,{key:oe,value:ie==null?void 0:ie.ec_year_id},ie==null?void 0:ie.year)}))),b.a.createElement(n.a.Item,{label:"\u8BFE\u7A0B",name:"ec_course_id"},b.a.createElement(h.a,{style:{width:150},disabled:((U=Oe.kcdatas)===null||U===void 0?void 0:U.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"},Oe==null||((R=Oe.kcdatas)===null||R===void 0)?void 0:R.map(function(ie,oe){return b.a.createElement(h.a.Option,{key:oe,value:ie==null?void 0:ie.id},ie==null?void 0:ie.name)}))),b.a.createElement(n.a.Item,{label:"\u77E5\u8BC6\u70B9",name:"ec_point_ids"},b.a.createElement(h.a,{onChange:function(){Pe.submit()},style:{width:150},mode:"multiple",disabled:((W=Oe.zsdatas)===null||W===void 0?void 0:W.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"},Oe==null||((H=Oe.zsdatas)===null||H===void 0)?void 0:H.map(function(ie,oe){return b.a.createElement(h.a.Option,{key:oe,value:ie==null?void 0:ie.id},ie==null?void 0:ie.name)})))))},k=Object(i.a)(function(f){var m=f.classroomList,_=f.loading,x=f.globalSetting,g=f.user;return{classroomList:m,globalSetting:x,loading:_.effects,user:g}})(T),w=C.a.Group,v=function(m){var _,x,g,j=m.classroomList,U=m.loading,R=m.user,W=m.exercise_id,H=W===void 0?null:W,L=m.homework_common_id,G=L===void 0?null:L,z=m.setitem,J=m.type,te=m.dispatch,_e=Object(t.useState)([{}]),ce=Object(F.a)(_e,2),xe=ce[0],Te=ce[1],je=Object(t.useState)([]),Ce=Object(F.a)(je,2),Z=Ce[0],K=Ce[1];function V(){return $.apply(this,arguments)}function $(){return $=Object(I.a)(y.a.mark(function ge(){var Oe,Ye,le,Ee,Re;return y.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.next=2,Object(a.a)("/api/ec_courses/".concat(0,"/ec_points/get_work_points.json"),{method:"get",params:{exercise_id:H,homework_common_id:G}});case 2:Ye=et.sent,(Ye==null||((Oe=Ye.data)===null||Oe===void 0)?void 0:Oe.length)>0&&(Re=[],Ye==null||((le=Ye.data)===null||le===void 0)||le.map(function(ut){var Dt;ut==null||((Dt=ut.ec_point_ids)===null||Dt===void 0)||Dt.map(function(We){Re.push(We)})}),z(Object(X.a)(Object(X.a)({},Ye==null||((Ee=Ye.data)===null||Ee===void 0)?void 0:Ee[0]),{},{ec_point_ids:Re})),Te(Ye==null?void 0:Ye.data));case 4:case"end":return et.stop()}},ge)})),$.apply(this,arguments)}Object(t.useEffect)(function(){var ge,Oe;R!=null&&(ge=R.userInfo)!==null&&ge!==void 0&&(Oe=ge.course)!==null&&Oe!==void 0&&Oe.course_school_id&&q()},[R==null||((_=R.userInfo)===null||_===void 0||((x=_.course)===null||x===void 0))?void 0:x.course_school_id]);function q(){return Q.apply(this,arguments)}function Q(){return Q=Object(I.a)(y.a.mark(function ge(){var Oe,Ye,le;return y.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Re.next=2,Object(a.a)("/api/schools/".concat(R==null||((Oe=R.userInfo)===null||Oe===void 0||((Ye=Oe.course)===null||Ye===void 0))?void 0:Ye.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:le=Re.sent,K(le==null?void 0:le.data),(G||H)&&V();case 5:case"end":return Re.stop()}},ge)})),Q.apply(this,arguments)}return console.log(xe),b.a.createElement("div",{style:{display:(g=R.userInfo.course)!==null&&g!==void 0&&g.is_openengineering?"":"none"}},b.a.createElement("p",{style:{fontSize:"16px",fontWeight:400}},"\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"),xe==null?void 0:xe.map(function(ge,Oe){return b.a.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"}},b.a.createElement(k,{rz:Z,item:ge,type:Oe,setitem:function(le){xe.splice(Oe,1,le),Te(Object(B.a)(xe));var Ee=[];xe==null||xe.map(function(Re){var He;Re==null||((He=Re.ec_point_ids)===null||He===void 0)||He.map(function(et){Ee.push(et)})}),z(Object(X.a)(Object(X.a)({},le),{},{ec_point_ids:Ee}))}}),Oe!=0&&b.a.createElement(u.a,{onClick:function(){xe.splice(Oe,1),Te(Object(B.a)(xe))},style:{marginLeft:10,fontSize:"20px"}}),b.a.createElement(p.a,{onClick:function(){xe.push({}),Te(Object(B.a)(xe))},style:{marginLeft:10,fontSize:"20px"}}))}))},c=ee.a=Object(i.a)(function(f){var m=f.classroomList,_=f.loading,x=f.globalSetting,g=f.user;return{classroomList:m,globalSetting:x,loading:_.effects,user:g}})(v)},gut8:function(ze,ee){var M={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},X=9;ee.ContextCachedBy=M,ee.WILL_BE_RESTORED=X},h7HQ:function(ze,ee,M){var X=M("y+Vt"),B=M("T6xi"),I=X.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(F,S){B.buildPath(F,S,!0)}});ze.exports=I},hOwI:function(ze,ee){var M=Math.log(2);function X(I,F,S,C,P,y){var t=C+"-"+P,b=I.length;if(y.hasOwnProperty(t))return y[t];if(F===1){var i=Math.round(Math.log((1<<b)-1&~P)/M);return I[S][i]}for(var u=C|1<<S,p=S+1;C&1<<p;)p++;for(var a=0,o=0,h=0;o<b;o++){var l=1<<o;l&P||(a+=(h%2?-1:1)*I[S][o]*X(I,F-1,p,u,P|l,y),h++)}return y[t]=a,a}function B(I,F){var S=[[I[0],I[1],1,0,0,0,-F[0]*I[0],-F[0]*I[1]],[0,0,0,I[0],I[1],1,-F[1]*I[0],-F[1]*I[1]],[I[2],I[3],1,0,0,0,-F[2]*I[2],-F[2]*I[3]],[0,0,0,I[2],I[3],1,-F[3]*I[2],-F[3]*I[3]],[I[4],I[5],1,0,0,0,-F[4]*I[4],-F[4]*I[5]],[0,0,0,I[4],I[5],1,-F[5]*I[4],-F[5]*I[5]],[I[6],I[7],1,0,0,0,-F[6]*I[6],-F[6]*I[7]],[0,0,0,I[6],I[7],1,-F[7]*I[6],-F[7]*I[7]]],C={},P=X(S,8,0,0,0,C);if(P===0)return;for(var y=[],t=0;t<8;t++)for(var b=0;b<8;b++)y[b]==null&&(y[b]=0),y[b]+=((t+b)%2?-1:1)*X(S,7,t===0?1:0,1<<t,1<<b,C)/P*F[t];return function(i,u,p){var a=u*y[6]+p*y[7]+1;i[0]=(u*y[0]+p*y[1]+y[2])/a,i[1]=(u*y[3]+p*y[4]+y[5])/a}}ee.buildTransformer=B},hW8S:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return F}),M.d(ee,"c",function(){return S}),M.d(ee,"b",function(){return C});var X=M("VTBJ"),B=M("Ff2n"),I=M("Kwbf"),F="RC_TABLE_INTERNAL_COL_DEFINE";function S(P){var y=P.expandable,t=Object(B.a)(P,["expandable"]);return"expandable"in P?Object(X.a)(Object(X.a)({},t),y):t}function C(P){return Object.keys(P).reduce(function(y,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(y[t]=P[t]),y},{})}},hX1E:function(ze,ee){var M=Math.PI*2;function X(B){return B%=M,B<0&&(B+=M),B}ee.normalizeRadian=X},hydK:function(ze,ee){var M="http://www.w3.org/2000/svg";function X(B){return document.createElementNS(M,B)}ee.createElement=X},hyiK:function(ze,ee){function M(X,B,I,F,S,C){if(C>B&&C>F||C<B&&C<F)return 0;if(F===B)return 0;var P=F<B?1:-1,y=(C-B)/(F-B);(y===1||y===0)&&(P=F<B?.5:-.5);var t=y*(I-X)+X;return t===S?Infinity:t>S?P:0}ze.exports=M},iXp4:function(ze,ee,M){var X=M("ItGF"),B=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function I(F){return X.browser.ie&&X.browser.version>=11?function(){var S=this.__clipPaths,C=this.style,P;if(S)for(var y=0;y<S.length;y++){var t=S[y],b=t&&t.shape,i=t&&t.type;if(b&&(i==="sector"&&b.startAngle===b.endAngle||i==="rect"&&(!b.width||!b.height))){for(var u=0;u<B.length;u++)B[u][2]=C[B[u][0]],C[B[u][0]]=B[u][1];P=!0;break}}if(F.apply(this,arguments),P)for(var u=0;u<B.length;u++)C[B[u][0]]=B[u][2]}:F}ze.exports=I},ic2d:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return F});var X=M("FWmy"),B=M("746U");class I{constructor(){this.data=new Map}add(S,C){X.a(B.l(S)),X.a(B.k(C)),X.a(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,C)}as(S){return this.data.get(S)||null}}const F=new I},j5sG:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.createSensor=void 0;var X=B(M("NohK"));function B(F){return F&&F.__esModule?F:{default:F}}var I=function(S){var C=void 0,P=[],y=(0,X.default)(function(){P.forEach(function(p){p(S)})}),t=function(){var a=new ResizeObserver(y);return a.observe(S),y(),a},b=function(a){C||(C=t()),P.indexOf(a)===-1&&P.push(a)},i=function(){C.disconnect(),P=[],C=void 0},u=function(a){var o=P.indexOf(a);o!==-1&&P.splice(o,1),P.length===0&&C&&i()};return{element:S,bind:b,destroy:i,unbind:u}};ee.createSensor=I},jTL6:function(ze,ee,M){var X=M("y+Vt"),B=X.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(I,F){var S=F.cx,C=F.cy,P=Math.max(F.r,0),y=F.startAngle,t=F.endAngle,b=F.clockwise,i=Math.cos(y),u=Math.sin(y);I.moveTo(i*P+S,u*P+C),I.arc(S,C,P,y,t,!b)}});ze.exports=B},juDX:function(ze,ee,M){M("P47w");var X=M("aX58"),B=X.registerPainter,I=M("3CBa");B("svg",I)},k3GJ:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return Yr});var X=M("rePB"),B=M("ODXe"),I=M("Ff2n"),F=M("VTBJ"),S=M("q1tI"),C=M("TSYQ"),P=M.n(C),y=M("Zm9Q"),t=M("6cGi"),b=M("KQm4"),i=M("xEkU"),u=M.n(i),p=M("t23M");function a(Ie){var Qe=Object(S.useRef)(),qe=Object(S.useRef)(!1);function Fe(){for(var me=arguments.length,De=new Array(me),be=0;be<me;be++)De[be]=arguments[be];qe.current||(u.a.cancel(Qe.current),Qe.current=u()(function(){Ie.apply(void 0,De)}))}return Object(S.useEffect)(function(){return function(){qe.current=!0,u.a.cancel(Qe.current)}},[]),Fe}function o(Ie){var Qe=Object(S.useRef)([]),qe=Object(S.useState)({}),Fe=Object(B.a)(qe,2),me=Fe[1],De=Object(S.useRef)(typeof Ie=="function"?Ie():Ie),be=a(function(){var Ke=De.current;Qe.current.forEach(function(nt){Ke=nt(Ke)}),Qe.current=[],De.current=Ke,me({})});function Be(Ke){Qe.current.push(Ke),be()}return[De.current,Be]}var h=M("4IlW");function l(Ie,Qe){var qe,Fe=Ie.prefixCls,me=Ie.id,De=Ie.active,be=Ie.rtl,Be=Ie.tab,Ke=Be.key,nt=Be.tab,Ve=Be.disabled,ct=Be.closeIcon,It=Ie.tabBarGutter,$t=Ie.tabPosition,tn=Ie.closable,bn=Ie.renderWrapper,Pn=Ie.removeAriaLabel,er=Ie.editable,tr=Ie.onClick,rn=Ie.onRemove,Lt=Ie.onFocus,Ft="".concat(Fe,"-tab");S.useEffect(function(){return rn},[]);var Tn={};$t==="top"||$t==="bottom"?Tn[be?"marginLeft":"marginRight"]=It:Tn.marginBottom=It;var cn=er&&tn!==!1&&!Ve;function Gn(an){if(Ve)return;tr(an)}function pr(an){an.preventDefault(),an.stopPropagation(),er.onEdit("remove",{key:Ke,event:an})}var Wn=S.createElement("div",{key:Ke,ref:Qe,className:P()(Ft,(qe={},Object(X.a)(qe,"".concat(Ft,"-with-remove"),cn),Object(X.a)(qe,"".concat(Ft,"-active"),De),Object(X.a)(qe,"".concat(Ft,"-disabled"),Ve),qe)),style:Tn,onClick:Gn},S.createElement("div",{role:"tab","aria-selected":De,id:me&&"".concat(me,"-tab-").concat(Ke),className:"".concat(Ft,"-btn"),"aria-controls":me&&"".concat(me,"-panel-").concat(Ke),"aria-disabled":Ve,tabIndex:Ve?null:0,onClick:function(_n){_n.stopPropagation(),Gn(_n)},onKeyDown:function(_n){[h.a.SPACE,h.a.ENTER].includes(_n.which)&&(_n.preventDefault(),Gn(_n))},onFocus:Lt},nt),cn&&S.createElement("button",{type:"button","aria-label":Pn||"remove",tabIndex:0,className:"".concat(Ft,"-remove"),onClick:function(_n){_n.stopPropagation(),pr(_n)}},ct||er.removeIcon||"\xD7"));return bn&&(Wn=bn(Wn)),Wn}var n=S.forwardRef(l),s={width:0,height:0,left:0,top:0};function d(Ie,Qe,qe){return Object(S.useMemo)(function(){for(var Fe,me=new Map,De=Qe.get((Fe=Ie[0])===null||Fe===void 0?void 0:Fe.key)||s,be=De.left+De.width,Be=0;Be<Ie.length;Be+=1){var Ke=Ie[Be].key,nt=Qe.get(Ke);if(!nt){var Ve;nt=Qe.get((Ve=Ie[Be-1])===null||Ve===void 0?void 0:Ve.key)||s}var ct=me.get(Ke)||Object(F.a)({},nt);ct.right=be-ct.left-ct.width,me.set(Ke,ct)}return me},[Ie.map(function(Fe){return Fe.key}).join("_"),Qe,qe])}var E={width:0,height:0,left:0,top:0,right:0};function D(Ie,Qe,qe,Fe,me){var De=me.tabs,be=me.tabPosition,Be=me.rtl,Ke,nt,Ve;["top","bottom"].includes(be)?(Ke="width",nt=Be?"right":"left",Ve=Math.abs(Qe.left)):(Ke="height",nt="top",Ve=-Qe.top);var ct=Qe[Ke],It=qe[Ke],$t=Fe[Ke],tn=ct;return It+$t>ct&&(tn=ct-$t),Object(S.useMemo)(function(){if(!De.length)return[0,0];for(var bn=De.length,Pn=bn,er=0;er<bn;er+=1){var tr=Ie.get(De[er].key)||E;if(tr[nt]+tr[Ke]>Ve+tn){Pn=er-1;break}}for(var rn=0,Lt=bn-1;Lt>=0;Lt-=1){var Ft=Ie.get(De[Lt].key)||E;if(Ft[nt]<Ve){rn=Lt+1;break}}return[rn,Pn]},[Ie,Ve,tn,be,De.map(function(bn){return bn.key}).join("_"),Be])}var T=M("wx14"),k=M("1OyB"),w=M("vuIU"),v=M("JX7q"),c=M("Ji7U"),f=M("LK+K"),m=M("I8Z2"),_=M("bT9E"),x=M("2GS6"),g=M("Gytx"),j=M.n(g),U=M("U8pU"),R=/iPhone/i,W=/iPod/i,H=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,z=/\bAndroid(?:.+)SD4930UR\b/i,J=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,te=/Windows Phone/i,_e=/\bWindows(?:.+)ARM\b/i,ce=/BlackBerry/i,xe=/BB10/i,Te=/Opera Mini/i,je=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ce=/Mobile(?:.+)Firefox\b/i;function Z(Ie,Qe){return Ie.test(Qe)}function K(Ie){var Qe=Ie||(typeof navigator!="undefined"?navigator.userAgent:""),qe=(Qe||"").split("[FBAN");if(typeof qe[1]!="undefined"){var Fe=qe,me=Object(B.a)(Fe,1);Qe=me[0]}if(qe=Qe.split("Twitter"),typeof qe[1]!="undefined"){var De=qe,be=Object(B.a)(De,1);Qe=be[0]}var Be={apple:{phone:Z(R,Qe)&&!Z(te,Qe),ipod:Z(W,Qe),tablet:!Z(R,Qe)&&Z(H,Qe)&&!Z(te,Qe),device:(Z(R,Qe)||Z(W,Qe)||Z(H,Qe))&&!Z(te,Qe)},amazon:{phone:Z(z,Qe),tablet:!Z(z,Qe)&&Z(J,Qe),device:Z(z,Qe)||Z(J,Qe)},android:{phone:!Z(te,Qe)&&Z(z,Qe)||!Z(te,Qe)&&Z(L,Qe),tablet:!Z(te,Qe)&&!Z(z,Qe)&&!Z(L,Qe)&&(Z(J,Qe)||Z(G,Qe)),device:!Z(te,Qe)&&(Z(z,Qe)||Z(J,Qe)||Z(L,Qe)||Z(G,Qe))||Z(/\bokhttp\b/i,Qe)},windows:{phone:Z(te,Qe),tablet:Z(_e,Qe),device:Z(te,Qe)||Z(_e,Qe)},other:{blackberry:Z(ce,Qe),blackberry10:Z(xe,Qe),opera:Z(Te,Qe),firefox:Z(Ce,Qe),chrome:Z(je,Qe),device:Z(ce,Qe)||Z(xe,Qe)||Z(Te,Qe)||Z(Ce,Qe)||Z(je,Qe)},any:null,phone:null,tablet:null};return Be.any=Be.apple.device||Be.android.device||Be.windows.device||Be.other.device,Be.phone=Be.apple.phone||Be.android.phone||Be.windows.phone,Be.tablet=Be.apple.tablet||Be.android.tablet||Be.windows.tablet,Be}var V=Object(F.a)(Object(F.a)({},K()),{},{isMobile:K}),$=V;function q(){}function Q(Ie,Qe,qe){var Fe=Qe||"";return Ie.key||"".concat(Fe,"item_").concat(qe)}function ge(Ie){return"".concat(Ie,"-menu-")}function Oe(Ie,Qe){var qe=-1;S.Children.forEach(Ie,function(Fe){qe+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?S.Children.forEach(Fe.props.children,function(me){qe+=1,Qe(me,qe)}):Qe(Fe,qe)})}function Ye(Ie,Qe,qe){if(!Ie||qe.find)return;S.Children.forEach(Ie,function(Fe){if(Fe){var me=Fe.type;if(!me||!(me.isSubMenu||me.isMenuItem||me.isMenuItemGroup))return;Qe.indexOf(Fe.key)!==-1?qe.find=!0:Fe.props.children&&Ye(Fe.props.children,Qe,qe)}})}var le=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],Ee=function(Qe){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Qe&&typeof Qe.getBoundingClientRect=="function"&&Qe.getBoundingClientRect().width;if(Fe){if(qe){var me=getComputedStyle(Qe),De=me.marginLeft,be=me.marginRight;Fe+=+De.replace("px","")+ +be.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},Re=function(Qe,qe,Fe){Qe&&Object(U.a)(Qe.style)==="object"&&(Qe.style[qe]=Fe)},He=function(){return $.any},et=M("bdgK"),ut=M("i8i4"),Dt=M.n(ut),We=M("wgJM"),Mt=M("l4aY"),Wt=M("m+aA"),Ne=M("c+Xe"),Pe=M("zT1h"),it=M("QC+M");function gt(Ie,Qe,qe){return qe?Ie[0]===Qe[0]:Ie[0]===Qe[0]&&Ie[1]===Qe[1]}function fe(Ie,Qe,qe){var Fe=Ie[Qe]||{};return Object(F.a)(Object(F.a)({},Fe),qe)}function ae(Ie,Qe,qe,Fe){for(var me=qe.points,De=Object.keys(Ie),be=0;be<De.length;be+=1){var Be=De[be];if(gt(Ie[Be].points,me,Fe))return"".concat(Qe,"-placement-").concat(Be)}return""}var se=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ie=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Ie)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Ie==null?void 0:Ie.substr(0,4)))},de=M("MNnm");function ve(Ie,Qe){var qe={};return qe[Ie.toLowerCase()]=Qe.toLowerCase(),qe["Webkit".concat(Ie)]="webkit".concat(Qe),qe["Moz".concat(Ie)]="moz".concat(Qe),qe["ms".concat(Ie)]="MS".concat(Qe),qe["O".concat(Ie)]="o".concat(Qe.toLowerCase()),qe}function ie(Ie,Qe){var qe={animationend:ve("Animation","AnimationEnd"),transitionend:ve("Transition","TransitionEnd")};return Ie&&("AnimationEvent"in Qe||delete qe.animationend.animation,"TransitionEvent"in Qe||delete qe.transitionend.transition),qe}var oe=ie(Object(de.a)(),typeof window!="undefined"?window:{}),pe={};if(Object(de.a)()){var we=document.createElement("div");pe=we.style}var Ae={};function Me(Ie){if(Ae[Ie])return Ae[Ie];var Qe=oe[Ie];if(Qe)for(var qe=Object.keys(Qe),Fe=qe.length,me=0;me<Fe;me+=1){var De=qe[me];if(Object.prototype.hasOwnProperty.call(Qe,De)&&De in pe)return Ae[Ie]=Qe[De],Ae[Ie]}return""}var rt=Me("animationend"),Pt=Me("transitionend"),Xt=!!(rt&&Pt),lt=rt||"animationend",zt=Pt||"transitionend";function mt(Ie,Qe){if(!Ie)return null;if(Object(U.a)(Ie)==="object"){var qe=Qe.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return Ie[qe]}return"".concat(Ie,"-").concat(Qe)}var _t="none",ot="appear",Se="enter",Ue="leave",At="none",pt="prepare",jt="start",Gt="active",Ze="end";function at(Ie){var Qe=Object(S.useRef)(!1),qe=Object(S.useState)(Ie),Fe=Object(B.a)(qe,2),me=Fe[0],De=Fe[1];function be(Be){Qe.current||De(Be)}return Object(S.useEffect)(function(){return function(){Qe.current=!0}},[]),[me,be]}var Tt=Object(de.a)()?S.useLayoutEffect:S.useEffect,Ht=Tt,Jt=function(){var Ie=S.useRef(null);function Qe(){We.a.cancel(Ie.current)}function qe(Fe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Qe();var De=Object(We.a)(function(){me<=1?Fe({isCanceled:function(){return De!==Ie.current}}):qe(Fe,me-1)});Ie.current=De}return S.useEffect(function(){return function(){Qe()}},[]),[qe,Qe]},on=[pt,jt,Gt,Ze],Qn=!1,Hn=!0;function nn(Ie){return Ie===Gt||Ie===Ze}var Un=function(Ie,Qe){var qe=S.useState(At),Fe=Object(B.a)(qe,2),me=Fe[0],De=Fe[1],be=Jt(),Be=Object(B.a)(be,2),Ke=Be[0],nt=Be[1];function Ve(){De(pt)}return Ht(function(){if(me!==At&&me!==Ze){var ct=on.indexOf(me),It=on[ct+1],$t=Qe(me);$t===Qn?De(It):Ke(function(tn){function bn(){if(tn.isCanceled())return;De(It)}$t===!0?bn():Promise.resolve($t).then(bn)})}},[Ie,me]),S.useEffect(function(){return function(){nt()}},[]),[Ve,me]},ar=function(Ie){var Qe=Object(S.useRef)(),qe=Object(S.useRef)(Ie);qe.current=Ie;var Fe=S.useCallback(function(be){qe.current(be)},[]);function me(be){be&&(be.removeEventListener(zt,Fe),be.removeEventListener(lt,Fe))}function De(be){Qe.current&&Qe.current!==be&&me(Qe.current),be&&be!==Qe.current&&(be.addEventListener(zt,Fe),be.addEventListener(lt,Fe),Qe.current=be)}return S.useEffect(function(){return function(){me(Qe.current)}},[]),[De,me]};function xn(Ie,Qe,qe,Fe){var me=Fe.motionEnter,De=me===void 0?!0:me,be=Fe.motionAppear,Be=be===void 0?!0:be,Ke=Fe.motionLeave,nt=Ke===void 0?!0:Ke,Ve=Fe.motionDeadline,ct=Fe.motionLeaveImmediately,It=Fe.onAppearPrepare,$t=Fe.onEnterPrepare,tn=Fe.onLeavePrepare,bn=Fe.onAppearStart,Pn=Fe.onEnterStart,er=Fe.onLeaveStart,tr=Fe.onAppearActive,rn=Fe.onEnterActive,Lt=Fe.onLeaveActive,Ft=Fe.onAppearEnd,Tn=Fe.onEnterEnd,cn=Fe.onLeaveEnd,Gn=Fe.onVisibleChanged,pr=at(),Wn=Object(B.a)(pr,2),an=Wn[0],_n=Wn[1],lr=at(_t),mr=Object(B.a)(lr,2),Fn=mr[0],br=mr[1],Hr=at(null),xr=Object(B.a)(Hr,2),Pr=xr[0],Dr=xr[1],Ar=Object(S.useRef)(!1),Or=Object(S.useRef)(null),ir=Object(S.useRef)(!1),ta=Object(S.useRef)(null);function Qa(){var Wr=qe();return Wr||ta.current}var Pa=Object(S.useRef)(!1);function ya(Wr){var kr=Qa();if(Wr&&!Wr.deadline&&Wr.target!==kr)return;var ha;Fn===ot&&Pa.current?ha=Ft==null?void 0:Ft(kr,Wr):Fn===Se&&Pa.current?ha=Tn==null?void 0:Tn(kr,Wr):Fn===Ue&&Pa.current&&(ha=cn==null?void 0:cn(kr,Wr)),ha!==!1&&!ir.current&&(br(_t),Dr(null))}var Kr=ar(ya),Nr=Object(B.a)(Kr,1),Fr=Nr[0],Gr=S.useMemo(function(){var Wr,kr,ha;switch(Fn){case"appear":return Wr={},Object(X.a)(Wr,pt,It),Object(X.a)(Wr,jt,bn),Object(X.a)(Wr,Gt,tr),Wr;case"enter":return kr={},Object(X.a)(kr,pt,$t),Object(X.a)(kr,jt,Pn),Object(X.a)(kr,Gt,rn),kr;case"leave":return ha={},Object(X.a)(ha,pt,tn),Object(X.a)(ha,jt,er),Object(X.a)(ha,Gt,Lt),ha;default:return{}}},[Fn]),Ia=Un(Fn,function(Wr){if(Wr===pt){var kr=Gr[pt];return kr?kr(Qa()):Qn}if(jr in Gr){var ha;Dr(((ha=Gr[jr])===null||ha===void 0?void 0:ha.call(Gr,Qa(),null))||null)}return jr===Gt&&(Fr(Qa()),Ve>0&&(clearTimeout(Or.current),Or.current=setTimeout(function(){ya({deadline:!0})},Ve))),Hn}),hi=Object(B.a)(Ia,2),si=hi[0],jr=hi[1],Ja=nn(jr);Pa.current=Ja,Ht(function(){_n(Qe);var Wr=Ar.current;if(Ar.current=!0,!Ie)return;var kr;!Wr&&Qe&&Be&&(kr=ot),Wr&&Qe&&De&&(kr=Se),(Wr&&!Qe&&nt||!Wr&&ct&&!Qe&&nt)&&(kr=Ue),kr&&(br(kr),si())},[Qe]),Object(S.useEffect)(function(){(Fn===ot&&!Be||Fn===Se&&!De||Fn===Ue&&!nt)&&br(_t)},[Be,De,nt]),Object(S.useEffect)(function(){return function(){clearTimeout(Or.current),ir.current=!0}},[]),Object(S.useEffect)(function(){an!==void 0&&Fn===_t&&(Gn==null||Gn(an))},[an,Fn]);var Za=Pr;return Gr[pt]&&jr===jt&&(Za=Object(F.a)({transition:"none"},Za)),[Fn,jr,Za,an!=null?an:Qe]}var zn=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(){return Object(k.a)(this,qe),Qe.apply(this,arguments)}return Object(w.a)(qe,[{key:"render",value:function(){return this.props.children}}]),qe}(S.Component),nr=zn;function Lr(Ie){var Qe=Ie;Object(U.a)(Ie)==="object"&&(Qe=Ie.transitionSupport);function qe(me){return!!(me.motionName&&Qe)}var Fe=S.forwardRef(function(me,De){var be=me.visible,Be=be===void 0?!0:be,Ke=me.removeOnLeave,nt=Ke===void 0?!0:Ke,Ve=me.forceRender,ct=me.children,It=me.motionName,$t=me.leavedClassName,tn=me.eventProps,bn=qe(me),Pn=Object(S.useRef)(),er=Object(S.useRef)();function tr(){try{return Object(Wt.a)(Pn.current||er.current)}catch(br){return null}}var rn=xn(bn,Be,tr,me),Lt=Object(B.a)(rn,4),Ft=Lt[0],Tn=Lt[1],cn=Lt[2],Gn=Lt[3],pr=S.useRef(Gn);Gn&&(pr.current=!0);var Wn=Object(S.useRef)(De);Wn.current=De;var an=S.useCallback(function(br){Pn.current=br,Object(Ne.b)(Wn.current,br)},[]),_n,lr=Object(F.a)(Object(F.a)({},tn),{},{visible:Be});if(!ct)_n=null;else if(Ft===_t||!qe(me))Gn?_n=ct(Object(F.a)({},lr),an):!nt&&pr.current?_n=ct(Object(F.a)(Object(F.a)({},lr),{},{className:$t}),an):Ve?_n=ct(Object(F.a)(Object(F.a)({},lr),{},{style:{display:"none"}}),an):_n=null;else{var mr,Fn;Tn===pt?Fn="prepare":nn(Tn)?Fn="active":Tn===jt&&(Fn="start"),_n=ct(Object(F.a)(Object(F.a)({},lr),{},{className:P()(mt(It,Ft),(mr={},Object(X.a)(mr,mt(It,"".concat(Ft,"-").concat(Fn)),Fn),Object(X.a)(mr,It,typeof It=="string"),mr)),style:cn}),an)}return S.createElement(nr,{ref:er},_n)});return Fe.displayName="CSSMotion",Fe}var Cr=Lr(Xt),en="add",Yn="keep",na="remove",Ea="removed";function $r(Ie){var Qe;return Ie&&Object(U.a)(Ie)==="object"&&"key"in Ie?Qe=Ie:Qe={key:Ie},Object(F.a)(Object(F.a)({},Qe),{},{key:String(Qe.key)})}function Qr(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ie.map($r)}function Jr(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],qe=[],Fe=0,me=Qe.length,De=Qr(Ie),be=Qr(Qe);De.forEach(function(nt){for(var Ve=!1,ct=Fe;ct<me;ct+=1){var It=be[ct];if(It.key===nt.key){Fe<ct&&(qe=qe.concat(be.slice(Fe,ct).map(function($t){return Object(F.a)(Object(F.a)({},$t),{},{status:en})})),Fe=ct),qe.push(Object(F.a)(Object(F.a)({},It),{},{status:Yn})),Fe+=1,Ve=!0;break}}Ve||qe.push(Object(F.a)(Object(F.a)({},nt),{},{status:na}))}),Fe<me&&(qe=qe.concat(be.slice(Fe).map(function(nt){return Object(F.a)(Object(F.a)({},nt),{},{status:en})})));var Be={};qe.forEach(function(nt){var Ve=nt.key;Be[Ve]=(Be[Ve]||0)+1});var Ke=Object.keys(Be).filter(function(nt){return Be[nt]>1});return Ke.forEach(function(nt){qe=qe.filter(function(Ve){var ct=Ve.key,It=Ve.status;return ct!==nt||It!==na}),qe.forEach(function(Ve){Ve.key===nt&&(Ve.status=Yn)})}),qe}var $n=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ma(Ie){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cr,qe=function(Fe){Object(c.a)(De,Fe);var me=Object(f.a)(De);function De(){var be;return Object(k.a)(this,De),be=me.apply(this,arguments),be.state={keyEntities:[]},be.removeKey=function(Be){be.setState(function(Ke){var nt=Ke.keyEntities;return{keyEntities:nt.map(function(Ve){return Ve.key!==Be?Ve:Object(F.a)(Object(F.a)({},Ve),{},{status:Ea})})}})},be}return Object(w.a)(De,[{key:"render",value:function(){var Be=this,Ke=this.state.keyEntities,nt=this.props,Ve=nt.component,ct=nt.children,It=nt.onVisibleChanged,$t=Object(I.a)(nt,["component","children","onVisibleChanged"]),tn=Ve||S.Fragment,bn={};return $n.forEach(function(Pn){bn[Pn]=$t[Pn],delete $t[Pn]}),delete $t.keys,S.createElement(tn,$t,Ke.map(function(Pn){var er=Pn.status,tr=Object(I.a)(Pn,["status"]),rn=er===en||er===Yn;return S.createElement(Qe,Object(T.a)({},bn,{key:tr.key,visible:rn,eventProps:tr,onVisibleChanged:function(Ft){It==null||It(Ft,{key:tr.key}),Ft||Be.removeKey(tr.key)}}),ct)}))}}],[{key:"getDerivedStateFromProps",value:function(Be,Ke){var nt=Be.keys,Ve=Ke.keyEntities,ct=Qr(nt),It=Jr(Ve,ct);return{keyEntities:It.filter(function($t){var tn=Ve.find(function(bn){var Pn=bn.key;return $t.key===Pn});return!(tn&&tn.status===Ea&&$t.status===na)})}}}]),De}(S.Component);return qe.defaultProps={component:"div"},qe}var sn=ma(Xt),oa=Cr;function Xr(Ie){var Qe=Ie.prefixCls,qe=Ie.motion,Fe=Ie.animation,me=Ie.transitionName;return qe||(Fe?{motionName:"".concat(Qe,"-").concat(Fe)}:me?{motionName:me}:null)}function Ua(Ie){var Qe=Ie.prefixCls,qe=Ie.visible,Fe=Ie.zIndex,me=Ie.mask,De=Ie.maskMotion,be=Ie.maskAnimation,Be=Ie.maskTransitionName;if(!me)return null;var Ke={};return(De||Be||be)&&(Ke=Object(F.a)({motionAppear:!0},Xr({motion:De,prefixCls:Qe,transitionName:Be,animation:be}))),S.createElement(oa,Object(T.a)({},Ke,{visible:qe,removeOnLeave:!0}),function(nt){var Ve=nt.className;return S.createElement("div",{style:{zIndex:Fe},className:P()("".concat(Qe,"-mask"),Ve)})})}var xa=M("9mu1"),ga=M("o0o1"),Ya=M.n(ga),Ka=M("HaE+"),da=["measure","align",null,"motion"],Sn=function(Ie,Qe){var qe=Object(S.useState)(null),Fe=Object(B.a)(qe,2),me=Fe[0],De=Fe[1],be=Object(S.useRef)(),Be=Object(S.useRef)(!1);function Ke(ct){Be.current||De(ct)}function nt(){We.a.cancel(be.current)}function Ve(ct){nt(),be.current=Object(We.a)(function(){Ke(function(It){switch(me){case"align":return"motion";case"motion":return"stable";default:}return It}),ct==null||ct()})}return Object(S.useEffect)(function(){Ke("measure")},[Ie]),Object(S.useEffect)(function(){switch(me){case"measure":Qe();break;default:}me&&(be.current=Object(We.a)(Object(Ka.a)(Ya.a.mark(function ct(){var It,$t;return Ya.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:It=da.indexOf(me),$t=da[It+1],$t&&It!==-1&&Ke($t);case 3:case"end":return bn.stop()}},ct)}))))},[me]),Object(S.useEffect)(function(){return function(){Be.current=!0,nt()}},[]),[me,Ve]},hn=function(Ie){var Qe=S.useState({width:0,height:0}),qe=Object(B.a)(Qe,2),Fe=qe[0],me=qe[1];function De(Be){me({width:Be.offsetWidth,height:Be.offsetHeight})}var be=S.useMemo(function(){var Be={};if(Ie){var Ke=Fe.width,nt=Fe.height;Ie.indexOf("height")!==-1&&nt?Be.height=nt:Ie.indexOf("minHeight")!==-1&&nt&&(Be.minHeight=nt),Ie.indexOf("width")!==-1&&Ke?Be.width=Ke:Ie.indexOf("minWidth")!==-1&&Ke&&(Be.minWidth=Ke)}return Be},[Ie,Fe]);return[be,De]},pn=S.forwardRef(function(Ie,Qe){var qe=Ie.visible,Fe=Ie.prefixCls,me=Ie.className,De=Ie.style,be=Ie.children,Be=Ie.zIndex,Ke=Ie.stretch,nt=Ie.destroyPopupOnHide,Ve=Ie.forceRender,ct=Ie.align,It=Ie.point,$t=Ie.getRootDomNode,tn=Ie.getClassNameFromAlign,bn=Ie.onAlign,Pn=Ie.onMouseEnter,er=Ie.onMouseLeave,tr=Ie.onMouseDown,rn=Ie.onTouchStart,Lt=Object(S.useRef)(),Ft=Object(S.useRef)(),Tn=Object(S.useState)(),cn=Object(B.a)(Tn,2),Gn=cn[0],pr=cn[1],Wn=hn(Ke),an=Object(B.a)(Wn,2),_n=an[0],lr=an[1];function mr(){Ke&&lr($t())}var Fn=Sn(qe,mr),br=Object(B.a)(Fn,2),Hr=br[0],xr=br[1],Pr=Object(S.useRef)();function Dr(){return It||$t}function Ar(){var Kr;(Kr=Lt.current)===null||Kr===void 0||Kr.forceAlign()}function Or(Kr,Nr){var Fr=tn(Nr);Gn!==Fr&&pr(Fr),Hr==="align"&&(Gn!==Fr?Promise.resolve().then(function(){Ar()}):xr(function(){var Gr;(Gr=Pr.current)===null||Gr===void 0||Gr.call(Pr)}),bn==null||bn(Kr,Nr))}var ir=Object(F.a)({},Xr(Ie));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Kr){var Nr=ir[Kr];ir[Kr]=function(Fr,Gr){return xr(),Nr==null?void 0:Nr(Fr,Gr)}});function ta(){return new Promise(function(Kr){Pr.current=Kr})}S.useEffect(function(){!ir.motionName&&Hr==="motion"&&xr()},[ir.motionName,Hr]),S.useImperativeHandle(Qe,function(){return{forceAlign:Ar,getElement:function(){return Ft.current}}});var Qa=Object(F.a)(Object(F.a)({},_n),{},{zIndex:Be,opacity:Hr==="motion"||Hr==="stable"||!qe?void 0:0,pointerEvents:Hr==="stable"?void 0:"none"},De),Pa=!0;(ct==null?void 0:ct.points)&&(Hr==="align"||Hr==="stable")&&(Pa=!1);var ya=be;return S.Children.count(be)>1&&(ya=S.createElement("div",{className:"".concat(Fe,"-content")},be)),S.createElement(oa,Object(T.a)({visible:qe,ref:Ft,leavedClassName:"".concat(Fe,"-hidden")},ir,{onAppearPrepare:ta,onEnterPrepare:ta,removeOnLeave:nt,forceRender:Ve}),function(Kr,Nr){var Fr=Kr.className,Gr=Kr.style,Ia=P()(Fe,me,Gn,Fr);return S.createElement(xa.a,{target:Dr(),key:"popup",ref:Lt,monitorWindowResize:!0,disabled:Pa,align:ct,onAlign:Or},S.createElement("div",{ref:Nr,className:Ia,onMouseEnter:Pn,onMouseLeave:er,onMouseDownCapture:tr,onTouchStartCapture:rn,style:Object(F.a)(Object(F.a)({},Gr),Qa)},ya))})});pn.displayName="PopupInner";var kn=pn,cr=S.forwardRef(function(Ie,Qe){var qe=Ie.prefixCls,Fe=Ie.visible,me=Ie.zIndex,De=Ie.children,be=Ie.mobile;be=be===void 0?{}:be;var Be=be.popupClassName,Ke=be.popupStyle,nt=be.popupMotion,Ve=nt===void 0?{}:nt,ct=be.popupRender,It=S.useRef();S.useImperativeHandle(Qe,function(){return{forceAlign:function(){},getElement:function(){return It.current}}});var $t=Object(F.a)({zIndex:me},Ke),tn=De;return S.Children.count(De)>1&&(tn=S.createElement("div",{className:"".concat(qe,"-content")},De)),ct&&(tn=ct(tn)),S.createElement(oa,Object(T.a)({visible:Fe,ref:It,removeOnLeave:!0},Ve),function(bn,Pn){var er=bn.className,tr=bn.style,rn=P()(qe,Be,er);return S.createElement("div",{ref:Pn,className:rn,style:Object(F.a)(Object(F.a)({},tr),$t)},tn)})});cr.displayName="MobilePopupInner";var qn=cr,Xn=["visible","mobile"],Dn=S.forwardRef(function(Ie,Qe){var qe=Ie.visible,Fe=Ie.mobile,me=Object(I.a)(Ie,Xn),De=Object(S.useState)(qe),be=Object(B.a)(De,2),Be=be[0],Ke=be[1],nt=Object(S.useState)(!1),Ve=Object(B.a)(nt,2),ct=Ve[0],It=Ve[1],$t=Object(F.a)(Object(F.a)({},me),{},{visible:Be});Object(S.useEffect)(function(){Ke(qe),qe&&Fe&&It(se())},[qe,Fe]);var tn=ct?S.createElement(qn,Object(T.a)({},$t,{mobile:Fe,ref:Qe})):S.createElement(kn,Object(T.a)({},$t,{ref:Qe}));return S.createElement("div",null,S.createElement(Ua,$t),tn)});Dn.displayName="Popup";var hr=Dn,jn=S.createContext(null),Jn=jn;function rr(){}function wn(){return""}function Er(Ie){return Ie?Ie.ownerDocument:window.document}var Sr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function gr(Ie){var Qe=function(qe){Object(c.a)(me,qe);var Fe=Object(f.a)(me);function me(De){var be;Object(k.a)(this,me),be=Fe.call(this,De),be.popupRef=S.createRef(),be.triggerRef=S.createRef(),be.attachId=void 0,be.clickOutsideHandler=void 0,be.touchOutsideHandler=void 0,be.contextMenuOutsideHandler1=void 0,be.contextMenuOutsideHandler2=void 0,be.mouseDownTimeout=void 0,be.focusTime=void 0,be.preClickTime=void 0,be.preTouchTime=void 0,be.delayTimer=void 0,be.hasPopupMouseDown=void 0,be.onMouseEnter=function(Ke){var nt=be.props.mouseEnterDelay;be.fireEvents("onMouseEnter",Ke),be.delaySetPopupVisible(!0,nt,nt?null:Ke)},be.onMouseMove=function(Ke){be.fireEvents("onMouseMove",Ke),be.setPoint(Ke)},be.onMouseLeave=function(Ke){be.fireEvents("onMouseLeave",Ke),be.delaySetPopupVisible(!1,be.props.mouseLeaveDelay)},be.onPopupMouseEnter=function(){be.clearDelayTimer()},be.onPopupMouseLeave=function(Ke){var nt;if(Ke.relatedTarget&&!Ke.relatedTarget.setTimeout&&Object(Mt.a)((nt=be.popupRef.current)===null||nt===void 0?void 0:nt.getElement(),Ke.relatedTarget))return;be.delaySetPopupVisible(!1,be.props.mouseLeaveDelay)},be.onFocus=function(Ke){be.fireEvents("onFocus",Ke),be.clearDelayTimer(),be.isFocusToShow()&&(be.focusTime=Date.now(),be.delaySetPopupVisible(!0,be.props.focusDelay))},be.onMouseDown=function(Ke){be.fireEvents("onMouseDown",Ke),be.preClickTime=Date.now()},be.onTouchStart=function(Ke){be.fireEvents("onTouchStart",Ke),be.preTouchTime=Date.now()},be.onBlur=function(Ke){be.fireEvents("onBlur",Ke),be.clearDelayTimer(),be.isBlurToHide()&&be.delaySetPopupVisible(!1,be.props.blurDelay)},be.onContextMenu=function(Ke){Ke.preventDefault(),be.fireEvents("onContextMenu",Ke),be.setPopupVisible(!0,Ke)},be.onContextMenuClose=function(){be.isContextMenuToShow()&&be.close()},be.onClick=function(Ke){if(be.fireEvents("onClick",Ke),be.focusTime){var nt;if(be.preClickTime&&be.preTouchTime?nt=Math.min(be.preClickTime,be.preTouchTime):be.preClickTime?nt=be.preClickTime:be.preTouchTime&&(nt=be.preTouchTime),Math.abs(nt-be.focusTime)<20)return;be.focusTime=0}be.preClickTime=0,be.preTouchTime=0,be.isClickToShow()&&(be.isClickToHide()||be.isBlurToHide())&&Ke&&Ke.preventDefault&&Ke.preventDefault();var Ve=!be.state.popupVisible;(be.isClickToHide()&&!Ve||Ve&&be.isClickToShow())&&be.setPopupVisible(!be.state.popupVisible,Ke)},be.onPopupMouseDown=function(){if(be.hasPopupMouseDown=!0,clearTimeout(be.mouseDownTimeout),be.mouseDownTimeout=window.setTimeout(function(){be.hasPopupMouseDown=!1},0),be.context){var Ke;(Ke=be.context).onPopupMouseDown.apply(Ke,arguments)}},be.onDocumentClick=function(Ke){if(be.props.mask&&!be.props.maskClosable)return;var nt=Ke.target,Ve=be.getRootDomNode(),ct=be.getPopupDomNode();(!Object(Mt.a)(Ve,nt)||be.isContextMenuOnly())&&!Object(Mt.a)(ct,nt)&&!be.hasPopupMouseDown&&be.close()},be.getRootDomNode=function(){var Ke=be.props.getTriggerDOMNode;if(Ke)return Ke(be.triggerRef.current);try{var nt=Object(Wt.a)(be.triggerRef.current);if(nt)return nt}catch(Ve){}return Dt.a.findDOMNode(Object(v.a)(be))},be.getPopupClassNameFromAlign=function(Ke){var nt=[],Ve=be.props,ct=Ve.popupPlacement,It=Ve.builtinPlacements,$t=Ve.prefixCls,tn=Ve.alignPoint,bn=Ve.getPopupClassNameFromAlign;return ct&&It&&nt.push(ae(It,$t,Ke,tn)),bn&&nt.push(bn(Ke)),nt.join(" ")},be.getComponent=function(){var Ke=be.props,nt=Ke.prefixCls,Ve=Ke.destroyPopupOnHide,ct=Ke.popupClassName,It=Ke.onPopupAlign,$t=Ke.popupMotion,tn=Ke.popupAnimation,bn=Ke.popupTransitionName,Pn=Ke.popupStyle,er=Ke.mask,tr=Ke.maskAnimation,rn=Ke.maskTransitionName,Lt=Ke.maskMotion,Ft=Ke.zIndex,Tn=Ke.popup,cn=Ke.stretch,Gn=Ke.alignPoint,pr=Ke.mobile,Wn=Ke.forceRender,an=be.state,_n=an.popupVisible,lr=an.point,mr=be.getPopupAlign(),Fn={};return be.isMouseEnterToShow()&&(Fn.onMouseEnter=be.onPopupMouseEnter),be.isMouseLeaveToHide()&&(Fn.onMouseLeave=be.onPopupMouseLeave),Fn.onMouseDown=be.onPopupMouseDown,Fn.onTouchStart=be.onPopupMouseDown,S.createElement(hr,Object(T.a)({prefixCls:nt,destroyPopupOnHide:Ve,visible:_n,point:Gn&&lr,className:ct,align:mr,onAlign:It,animation:tn,getClassNameFromAlign:be.getPopupClassNameFromAlign},Fn,{stretch:cn,getRootDomNode:be.getRootDomNode,style:Pn,mask:er,zIndex:Ft,transitionName:bn,maskAnimation:tr,maskTransitionName:rn,maskMotion:Lt,ref:be.popupRef,motion:$t,mobile:pr,forceRender:Wn}),typeof Tn=="function"?Tn():Tn)},be.attachParent=function(Ke){We.a.cancel(be.attachId);var nt=be.props,Ve=nt.getPopupContainer,ct=nt.getDocument,It=be.getRootDomNode(),$t;Ve?(It||Ve.length===0)&&($t=Ve(It)):$t=ct(be.getRootDomNode()).body,$t?$t.appendChild(Ke):be.attachId=Object(We.a)(function(){be.attachParent(Ke)})},be.getContainer=function(){var Ke=be.props.getDocument,nt=Ke(be.getRootDomNode()).createElement("div");return nt.style.position="absolute",nt.style.top="0",nt.style.left="0",nt.style.width="100%",be.attachParent(nt),nt},be.setPoint=function(Ke){var nt=be.props.alignPoint;if(!nt||!Ke)return;be.setState({point:{pageX:Ke.pageX,pageY:Ke.pageY}})},be.handlePortalUpdate=function(){be.state.prevPopupVisible!==be.state.popupVisible&&be.props.afterPopupVisibleChange(be.state.popupVisible)},be.triggerContextValue={onPopupMouseDown:be.onPopupMouseDown};var Be;return"popupVisible"in De?Be=!!De.popupVisible:Be=!!De.defaultPopupVisible,be.state={prevPopupVisible:Be,popupVisible:Be},Sr.forEach(function(Ke){be["fire".concat(Ke)]=function(nt){be.fireEvents(Ke,nt)}}),be}return Object(w.a)(me,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this.props,Be=this.state;if(Be.popupVisible){var Ke;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ke=be.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Pe.a)(Ke,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ke=Ke||be.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Pe.a)(Ke,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ke=Ke||be.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Pe.a)(Ke,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Pe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),We.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var be;return((be=this.popupRef.current)===null||be===void 0?void 0:be.getElement())||null}},{key:"getPopupAlign",value:function(){var be=this.props,Be=be.popupPlacement,Ke=be.popupAlign,nt=be.builtinPlacements;return Be&&nt?fe(nt,Be,Ke):Ke}},{key:"setPopupVisible",value:function(be,Be){var Ke=this.props.alignPoint,nt=this.state.popupVisible;this.clearDelayTimer(),nt!==be&&("popupVisible"in this.props||this.setState({popupVisible:be,prevPopupVisible:nt}),this.props.onPopupVisibleChange(be)),Ke&&Be&&be&&this.setPoint(Be)}},{key:"delaySetPopupVisible",value:function(be,Be,Ke){var nt=this,Ve=Be*1e3;if(this.clearDelayTimer(),Ve){var ct=Ke?{pageX:Ke.pageX,pageY:Ke.pageY}:null;this.delayTimer=window.setTimeout(function(){nt.setPopupVisible(be,ct),nt.clearDelayTimer()},Ve)}else this.setPopupVisible(be,Ke)}},{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(be){var Be=this.props.children.props,Ke=this.props;return Be[be]&&Ke[be]?this["fire".concat(be)]:Be[be]||Ke[be]}},{key:"isClickToShow",value:function(){var be=this.props,Be=be.action,Ke=be.showAction;return Be.indexOf("click")!==-1||Ke.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var be=this.props.action;return be==="contextMenu"||be.length===1&&be[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var be=this.props,Be=be.action,Ke=be.showAction;return Be.indexOf("contextMenu")!==-1||Ke.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var be=this.props,Be=be.action,Ke=be.hideAction;return Be.indexOf("click")!==-1||Ke.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var be=this.props,Be=be.action,Ke=be.showAction;return Be.indexOf("hover")!==-1||Ke.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var be=this.props,Be=be.action,Ke=be.hideAction;return Be.indexOf("hover")!==-1||Ke.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var be=this.props,Be=be.action,Ke=be.showAction;return Be.indexOf("focus")!==-1||Ke.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var be=this.props,Be=be.action,Ke=be.hideAction;return Be.indexOf("focus")!==-1||Ke.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var be;(be=this.popupRef.current)===null||be===void 0||be.forceAlign()}}},{key:"fireEvents",value:function(be,Be){var Ke=this.props.children.props[be];Ke&&Ke(Be);var nt=this.props[be];nt&&nt(Be)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var be=this.state.popupVisible,Be=this.props,Ke=Be.children,nt=Be.forceRender,Ve=Be.alignPoint,ct=Be.className,It=Be.autoDestroy,$t=S.Children.only(Ke),tn={key:"trigger"};this.isContextMenuToShow()?tn.onContextMenu=this.onContextMenu:tn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(tn.onClick=this.onClick,tn.onMouseDown=this.onMouseDown,tn.onTouchStart=this.onTouchStart):(tn.onClick=this.createTwoChains("onClick"),tn.onMouseDown=this.createTwoChains("onMouseDown"),tn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(tn.onMouseEnter=this.onMouseEnter,Ve&&(tn.onMouseMove=this.onMouseMove)):tn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?tn.onMouseLeave=this.onMouseLeave:tn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(tn.onFocus=this.onFocus,tn.onBlur=this.onBlur):(tn.onFocus=this.createTwoChains("onFocus"),tn.onBlur=this.createTwoChains("onBlur"));var bn=P()($t&&$t.props&&$t.props.className,ct);bn&&(tn.className=bn);var Pn=Object(F.a)({},tn);Object(Ne.c)($t)&&(Pn.ref=Object(Ne.a)(this.triggerRef,$t.ref));var er=S.cloneElement($t,Pn),tr;return(be||this.popupRef.current||nt)&&(tr=S.createElement(Ie,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!be&&It&&(tr=null),S.createElement(Jn.Provider,{value:this.triggerContextValue},er,tr)}}],[{key:"getDerivedStateFromProps",value:function(be,Be){var Ke=be.popupVisible,nt={};return Ke!==void 0&&Be.popupVisible!==Ke&&(nt.popupVisible=Ke,nt.prevPopupVisible=Be.popupVisible),nt}}]),me}(S.Component);return Qe.contextType=Jn,Qe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wn,getDocument:Er,onPopupVisibleChange:rr,afterPopupVisibleChange:rr,onPopupAlign:rr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Qe}var sr=gr(it.a),re={adjustX:1,adjustY:1},Le={topLeft:{points:["bl","tl"],overflow:re,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:re,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:re,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:re,offset:[4,0]}},Xe={topLeft:{points:["bl","tl"],overflow:re,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:re,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:re,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:re,offset:[4,0]}},ke=Le,dt=0,tt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ht=function(Qe,qe,Fe){var me=ge(qe),De=Qe.getState();Qe.setState({defaultActiveFirst:Object(F.a)(Object(F.a)({},De.defaultActiveFirst),{},Object(X.a)({},me,Fe))})},xt=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(Fe){var me;Object(k.a)(this,qe),me=Qe.call(this,Fe),me.onDestroy=function(Ve){me.props.onDestroy(Ve)},me.onKeyDown=function(Ve){var ct=Ve.keyCode,It=me.menuInstance,$t=me.props.store,tn=me.getVisible();if(ct===h.a.ENTER)return me.onTitleClick(Ve),ht($t,me.props.eventKey,!0),!0;if(ct===h.a.RIGHT)return tn?It.onKeyDown(Ve):(me.triggerOpenChange(!0),ht($t,me.props.eventKey,!0)),!0;if(ct===h.a.LEFT){var bn;if(tn)bn=It.onKeyDown(Ve);else return;return bn||(me.triggerOpenChange(!1),bn=!0),bn}return tn&&(ct===h.a.UP||ct===h.a.DOWN)?It.onKeyDown(Ve):void 0},me.onOpenChange=function(Ve){me.props.onOpenChange(Ve)},me.onPopupVisibleChange=function(Ve){me.triggerOpenChange(Ve,Ve?"mouseenter":"mouseleave")},me.onMouseEnter=function(Ve){var ct=me.props,It=ct.eventKey,$t=ct.onMouseEnter,tn=ct.store;ht(tn,me.props.eventKey,!1),$t({key:It,domEvent:Ve})},me.onMouseLeave=function(Ve){var ct=me.props,It=ct.parentMenu,$t=ct.eventKey,tn=ct.onMouseLeave;It.subMenuInstance=Object(v.a)(me),tn({key:$t,domEvent:Ve})},me.onTitleMouseEnter=function(Ve){var ct=me.props,It=ct.eventKey,$t=ct.onItemHover,tn=ct.onTitleMouseEnter;$t({key:It,hover:!0}),tn({key:It,domEvent:Ve})},me.onTitleMouseLeave=function(Ve){var ct=me.props,It=ct.parentMenu,$t=ct.eventKey,tn=ct.onItemHover,bn=ct.onTitleMouseLeave;It.subMenuInstance=Object(v.a)(me),tn({key:$t,hover:!1}),bn({key:$t,domEvent:Ve})},me.onTitleClick=function(Ve){var ct=Object(v.a)(me),It=ct.props;if(It.onTitleClick({key:It.eventKey,domEvent:Ve}),It.triggerSubMenuAction==="hover")return;me.triggerOpenChange(!me.getVisible(),"click"),ht(It.store,me.props.eventKey,!1)},me.onSubMenuClick=function(Ve){typeof me.props.onClick=="function"&&me.props.onClick(me.addKeyPath(Ve))},me.onSelect=function(Ve){me.props.onSelect(Ve)},me.onDeselect=function(Ve){me.props.onDeselect(Ve)},me.getPrefixCls=function(){return"".concat(me.props.rootPrefixCls,"-submenu")},me.getActiveClassName=function(){return"".concat(me.getPrefixCls(),"-active")},me.getDisabledClassName=function(){return"".concat(me.getPrefixCls(),"-disabled")},me.getSelectedClassName=function(){return"".concat(me.getPrefixCls(),"-selected")},me.getOpenClassName=function(){return"".concat(me.props.rootPrefixCls,"-submenu-open")},me.getVisible=function(){return me.state.isOpen},me.getMode=function(){return me.state.mode},me.saveMenuInstance=function(Ve){me.menuInstance=Ve},me.addKeyPath=function(Ve){return Object(F.a)(Object(F.a)({},Ve),{},{keyPath:(Ve.keyPath||[]).concat(me.props.eventKey)})},me.triggerOpenChange=function(Ve,ct){var It=me.props.eventKey,$t=function(){me.onOpenChange({key:It,item:Object(v.a)(me),trigger:ct,open:Ve})};ct==="mouseenter"?me.mouseenterTimeout=setTimeout(function(){$t()},0):$t()},me.isChildrenSelected=function(){var Ve={find:!1};return Ye(me.props.children,me.props.selectedKeys,Ve),Ve.find},me.isInlineMode=function(){return me.getMode()==="inline"},me.adjustWidth=function(){if(!me.subMenuTitle||!me.menuInstance)return;var Ve=ut.findDOMNode(me.menuInstance);if(Ve.offsetWidth>=me.subMenuTitle.offsetWidth)return;Ve.style.minWidth="".concat(me.subMenuTitle.offsetWidth,"px")},me.saveSubMenuTitle=function(Ve){me.subMenuTitle=Ve},me.getBaseProps=function(){var Ve=Object(v.a)(me),ct=Ve.props,It=me.getMode();return{mode:It==="horizontal"?"vertical":It,visible:me.getVisible(),level:ct.level+1,inlineIndent:ct.inlineIndent,focusable:!1,onClick:me.onSubMenuClick,onSelect:me.onSelect,onDeselect:me.onDeselect,onDestroy:me.onDestroy,selectedKeys:ct.selectedKeys,eventKey:"".concat(ct.eventKey,"-menu-"),openKeys:ct.openKeys,motion:ct.motion,onOpenChange:me.onOpenChange,subMenuOpenDelay:ct.subMenuOpenDelay,parentMenu:Object(v.a)(me),subMenuCloseDelay:ct.subMenuCloseDelay,forceSubMenuRender:ct.forceSubMenuRender,triggerSubMenuAction:ct.triggerSubMenuAction,builtinPlacements:ct.builtinPlacements,defaultActiveFirst:ct.store.getState().defaultActiveFirst[ge(ct.eventKey)],multiple:ct.multiple,prefixCls:ct.rootPrefixCls,id:me.internalMenuId,manualRef:me.saveMenuInstance,itemIcon:ct.itemIcon,expandIcon:ct.expandIcon,direction:ct.direction}},me.getMotion=function(Ve,ct){var It=Object(v.a)(me),$t=It.haveRendered,tn=me.props,bn=tn.motion,Pn=tn.rootPrefixCls,er=Object(F.a)(Object(F.a)({},bn),{},{leavedClassName:"".concat(Pn,"-hidden"),removeOnLeave:!1,motionAppear:$t||!ct||Ve!=="inline"});return er};var De=Fe.store,be=Fe.eventKey,Be=De.getState(),Ke=Be.defaultActiveFirst;me.isRootMenu=!1;var nt=!1;return Ke&&(nt=Ke[be]),ht(De,be,nt),me.state={mode:Fe.mode,isOpen:Fe.isOpen},me}return Object(w.a)(qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var me=this,De=this.props,be=De.mode,Be=De.parentMenu,Ke=De.manualRef,nt=De.isOpen,Ve=function(){me.setState({mode:be,isOpen:nt})},ct=nt!==this.state.isOpen,It=be!==this.state.mode;if((It||ct)&&(We.a.cancel(this.updateStateRaf),It?this.updateStateRaf=Object(We.a)(Ve):Ve()),Ke&&Ke(this),be!=="horizontal"||!(Be==null?void 0:Be.isRootMenu)||!nt)return;this.minWidthTimeout=setTimeout(function(){return me.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var me=this.props,De=me.onDestroy,be=me.eventKey;De&&De(be),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),We.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(me,De){var be=this.getBaseProps();return S.createElement(kt,Object(T.a)({},be,{id:this.internalMenuId,className:me,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var me=this,De=this.getBaseProps(),be=De.mode,Be=De.visible,Ke=De.forceSubMenuRender,nt=De.direction,Ve=this.getMotion(be,Be);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Be||Ke,!this.haveOpened)return S.createElement("div",null);var ct=P()("".concat(De.prefixCls,"-sub"),Object(X.a)({},"".concat(De.prefixCls,"-rtl"),nt==="rtl"));return this.isInlineMode()?S.createElement(oa,Object(T.a)({visible:De.visible,forceRender:Ke},Ve),function(It){var $t=It.className,tn=It.style,bn=P()(ct,$t);return me.renderPopupMenu(bn,tn)}):this.renderPopupMenu(ct)}},{key:"render",value:function(){var me,De,be,Be=Object(F.a)({},this.props),Ke=this.getVisible(),nt=this.getPrefixCls(),Ve=this.isInlineMode(),ct=this.getMode(),It=P()(nt,"".concat(nt,"-").concat(ct),(me={},Object(X.a)(me,Be.className,!!Be.className),Object(X.a)(me,this.getOpenClassName(),Ke),Object(X.a)(me,this.getActiveClassName(),Be.active||Ke&&!Ve),Object(X.a)(me,this.getDisabledClassName(),Be.disabled),Object(X.a)(me,this.getSelectedClassName(),this.isChildrenSelected()),me));this.internalMenuId||(Be.eventKey?this.internalMenuId="".concat(Be.eventKey,"$Menu"):(dt+=1,this.internalMenuId="$__$".concat(dt,"$Menu")));var $t={},tn={},bn={};Be.disabled||($t={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},tn={onClick:this.onTitleClick},bn={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pn={},er=Be.direction,tr=er==="rtl";Ve&&(tr?Pn.paddingRight=Be.inlineIndent*Be.level:Pn.paddingLeft=Be.inlineIndent*Be.level);var rn={};this.getVisible()&&(rn={"aria-owns":this.internalMenuId});var Lt=null;ct!=="horizontal"&&(Lt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Lt=S.createElement(this.props.expandIcon,Object(F.a)({},this.props))));var Ft=S.createElement("div",Object(T.a)({ref:this.saveSubMenuTitle,style:Pn,className:"".concat(nt,"-title"),role:"button"},bn,tn,{"aria-expanded":Ke},rn,{"aria-haspopup":"true",title:typeof Be.title=="string"?Be.title:void 0}),Be.title,Lt||S.createElement("i",{className:"".concat(nt,"-arrow")})),Tn=this.renderChildren(),cn=((De=Be.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?Be.parentMenu.props.getPopupContainer:function(Dr){return Dr.parentNode},Gn=tt[ct],pr=Be.popupOffset?{offset:Be.popupOffset}:{},Wn=P()((be={},Object(X.a)(be,Be.popupClassName,Be.popupClassName&&!Ve),Object(X.a)(be,"".concat(nt,"-rtl"),tr),be)),an=Be.disabled,_n=Be.triggerSubMenuAction,lr=Be.subMenuOpenDelay,mr=Be.forceSubMenuRender,Fn=Be.subMenuCloseDelay,br=Be.builtinPlacements;le.forEach(function(Dr){return delete Be[Dr]}),delete Be.onClick;var Hr=tr?Object(F.a)(Object(F.a)({},Xe),br):Object(F.a)(Object(F.a)({},Le),br);delete Be.direction;var xr=this.getBaseProps(),Pr=Ve?null:this.getMotion(xr.mode,xr.visible);return S.createElement("li",Object(T.a)({},Be,$t,{className:It,role:"menuitem"}),S.createElement(sr,{prefixCls:nt,popupClassName:P()("".concat(nt,"-popup"),Wn),getPopupContainer:cn,builtinPlacements:Hr,popupPlacement:Gn,popupVisible:Ve?!1:Ke,popupAlign:pr,popup:Ve?null:Tn,action:an||Ve?[]:[_n],mouseEnterDelay:lr,mouseLeaveDelay:Fn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:mr,popupMotion:Pr},Ft),Ve?Tn:null)}}]),qe}(S.Component);xt.defaultProps={onMouseEnter:q,onMouseLeave:q,onTitleMouseEnter:q,onTitleMouseLeave:q,onTitleClick:q,manualRef:q,mode:"vertical",title:""};var Rt=Object(m.b)(function(Ie,Qe){var qe=Ie.openKeys,Fe=Ie.activeKey,me=Ie.selectedKeys,De=Qe.eventKey,be=Qe.subMenuKey;return{isOpen:qe.indexOf(De)>-1,active:Fe[be]===De,selectedKeys:me}})(xt);Rt.isSubMenu=!0;var st=Rt,Kt="menuitem-overflowed",Zt=.5,Et=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(){var Fe;return Object(k.a)(this,qe),Fe=Qe.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=S.createRef(),Fe.getMenuItemNodes=function(){var me=Fe.props.prefixCls,De=Fe.childRef.current;return De?[].slice.call(De.children).filter(function(be){return be.className.split(" ").indexOf("".concat(me,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(me,De,be){var Be=Fe.props,Ke=Be.overflowedIndicator,nt=Be.level,Ve=Be.mode,ct=Be.prefixCls,It=Be.theme;if(nt!==1||Ve!=="horizontal")return null;var $t=Fe.props.children[0],tn=$t.props,bn=tn.children,Pn=tn.title,er=tn.style,tr=Object(I.a)(tn,["children","title","style"]),rn=Object(F.a)({},er),Lt="".concat(me,"-overflowed-indicator"),Ft="".concat(me,"-overflowed-indicator");De.length===0&&be!==!0?rn=Object(F.a)(Object(F.a)({},rn),{},{display:"none"}):be&&(rn=Object(F.a)(Object(F.a)({},rn),{},{visibility:"hidden",position:"absolute"}),Lt="".concat(Lt,"-placeholder"),Ft="".concat(Ft,"-placeholder"));var Tn=It?"".concat(ct,"-").concat(It):"",cn={};return le.forEach(function(Gn){tr[Gn]!==void 0&&(cn[Gn]=tr[Gn])}),S.createElement(st,Object(T.a)({title:Ke,className:"".concat(ct,"-overflowed-submenu"),popupClassName:Tn},cn,{key:Lt,eventKey:Ft,disabled:!1,style:rn}),De)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var me=Fe.childRef.current;if(!me)return;var De=me.children;if(!De||De.length===0)return;var be=me.children[De.length-1];Re(be,"display","inline-block");var Be=Fe.getMenuItemNodes(),Ke=Be.filter(function(nt){return nt.className.split(" ").indexOf(Kt)>=0});Ke.forEach(function(nt){Re(nt,"display","inline-block")}),Fe.menuItemSizes=Be.map(function(nt){return Ee(nt,!0)}),Ke.forEach(function(nt){Re(nt,"display","none")}),Fe.overflowedIndicatorWidth=Ee(me.children[me.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(nt,Ve){return nt+Ve},0),Fe.handleResize(),Re(be,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var me=Fe.childRef.current;if(!me)return;var De=Ee(me);Fe.overflowedItems=[];var be=0,Be;Fe.originalTotalWidth>De+Zt&&(Be=-1,Fe.menuItemSizes.forEach(function(Ke){be+=Ke,be+Fe.overflowedIndicatorWidth<=De&&(Be+=1)})),Fe.setState({lastVisibleIndex:Be})},Fe}return Object(w.a)(qe,[{key:"componentDidMount",value:function(){var me=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new et.default(function(be){be.forEach(function(){var Be=me.cancelFrameId;cancelAnimationFrame(Be),me.cancelFrameId=requestAnimationFrame(me.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(be){me.resizeObserver.observe(be)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){me.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(be){me.resizeObserver.observe(be)}),me.setChildrenWidthAndResize()}),this.mutationObserver.observe(De,{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(me){var De=this,be=this.state.lastVisibleIndex;return(me||[]).reduce(function(Be,Ke,nt){var Ve=Ke;if(De.props.mode==="horizontal"){var ct=De.getOverflowedSubMenuItem(Ke.props.eventKey,[]);be!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&(nt>be&&(Ve=S.cloneElement(Ke,{style:{display:"none"},eventKey:"".concat(Ke.props.eventKey,"-hidden"),className:"".concat(Kt)})),nt===be+1&&(De.overflowedItems=me.slice(be+1).map(function($t){return S.cloneElement($t,{key:$t.props.eventKey,mode:"vertical-left"})}),ct=De.getOverflowedSubMenuItem(Ke.props.eventKey,De.overflowedItems)));var It=[].concat(Object(b.a)(Be),[ct,Ve]);return nt===me.length-1&&It.push(De.getOverflowedSubMenuItem(Ke.props.eventKey,[],!0)),It}return[].concat(Object(b.a)(Be),[Ve])},[])}},{key:"render",value:function(){var me=this.props,De=me.visible,be=me.prefixCls,Be=me.overflowedIndicator,Ke=me.mode,nt=me.level,Ve=me.tag,ct=me.children,It=me.theme,$t=Object(I.a)(me,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),tn=Ve;return S.createElement(tn,Object(T.a)({ref:this.childRef},$t),this.renderChildren(ct))}}]),qe}(S.Component);Et.defaultProps={tag:"div",className:""};var Vt=Et;function $e(Ie){return Ie.length?Ie.every(function(Qe){return!!Qe.props.disabled}):!0}function Yt(Ie,Qe,qe){var Fe=Ie.getState();Ie.setState({activeKey:Object(F.a)(Object(F.a)({},Fe.activeKey),{},Object(X.a)({},Qe,qe))})}function Nt(Ie){return Ie.eventKey||"0-menu-"}function un(Ie,Qe){var qe=Qe,Fe=Ie.children,me=Ie.eventKey;if(qe){var De;if(Oe(Fe,function(be,Be){be&&be.props&&!be.props.disabled&&qe===Q(be,me,Be)&&(De=!0)}),De)return qe}return qe=null,Ie.defaultActiveFirst&&Oe(Fe,function(be,Be){!qe&&be&&!be.props.disabled&&(qe=Q(be,me,Be))}),qe}function yn(Ie){if(!Ie)return;var Qe=this.instanceArray.indexOf(Ie);Qe!==-1?this.instanceArray[Qe]=Ie:this.instanceArray.push(Ie)}var Cn=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(Fe){var me;return Object(k.a)(this,qe),me=Qe.call(this,Fe),me.onKeyDown=function(De,be){var Be=De.keyCode,Ke;if(me.getFlatInstanceArray().forEach(function(Ve){Ve&&Ve.props.active&&Ve.onKeyDown&&(Ke=Ve.onKeyDown(De))}),Ke)return 1;var nt=null;return(Be===h.a.UP||Be===h.a.DOWN)&&(nt=me.step(Be===h.a.UP?-1:1)),nt?(De.preventDefault(),Yt(me.props.store,Nt(me.props),nt.props.eventKey),typeof be=="function"&&be(nt),1):void 0},me.onItemHover=function(De){var be=De.key,Be=De.hover;Yt(me.props.store,Nt(me.props),Be?be:null)},me.onDeselect=function(De){me.props.onDeselect(De)},me.onSelect=function(De){me.props.onSelect(De)},me.onClick=function(De){me.props.onClick(De)},me.onOpenChange=function(De){me.props.onOpenChange(De)},me.onDestroy=function(De){me.props.onDestroy(De)},me.getFlatInstanceArray=function(){return me.instanceArray},me.step=function(De){var be=me.getFlatInstanceArray(),Be=me.props.store.getState().activeKey[Nt(me.props)],Ke=be.length;if(!Ke)return null;De<0&&(be=be.concat().reverse());var nt=-1;if(be.every(function($t,tn){return $t&&$t.props.eventKey===Be?(nt=tn,!1):!0}),!me.props.defaultActiveFirst&&nt!==-1&&$e(be.slice(nt,Ke-1)))return;var Ve=(nt+1)%Ke,ct=Ve;do{var It=be[ct];if(!It||It.props.disabled)ct=(ct+1)%Ke;else return It}while(ct!==Ve);return null},me.renderCommonMenuItem=function(De,be,Be){var Ke=me.props.store.getState(),nt=Object(v.a)(me),Ve=nt.props,ct=Q(De,Ve.eventKey,be),It=De.props;if(!It||typeof De.type=="string")return De;var $t=ct===Ke.activeKey,tn=Object(F.a)(Object(F.a)({mode:It.mode||Ve.mode,level:Ve.level,inlineIndent:Ve.inlineIndent,renderMenuItem:me.renderMenuItem,rootPrefixCls:Ve.prefixCls,index:be,parentMenu:Ve.parentMenu,manualRef:It.disabled?void 0:Object(x.a)(De.ref,yn.bind(Object(v.a)(me))),eventKey:ct,active:!It.disabled&&$t,multiple:Ve.multiple,onClick:function(Pn){(It.onClick||q)(Pn),me.onClick(Pn)},onItemHover:me.onItemHover,motion:Ve.motion,subMenuOpenDelay:Ve.subMenuOpenDelay,subMenuCloseDelay:Ve.subMenuCloseDelay,forceSubMenuRender:Ve.forceSubMenuRender,onOpenChange:me.onOpenChange,onDeselect:me.onDeselect,onSelect:me.onSelect,builtinPlacements:Ve.builtinPlacements,itemIcon:It.itemIcon||me.props.itemIcon,expandIcon:It.expandIcon||me.props.expandIcon},Be),{},{direction:Ve.direction});return(Ve.mode==="inline"||He())&&(tn.triggerSubMenuAction="click"),S.cloneElement(De,Object(F.a)(Object(F.a)({},tn),{},{key:ct||be}))},me.renderMenuItem=function(De,be,Be){if(!De)return null;var Ke=me.props.store.getState(),nt={openKeys:Ke.openKeys,selectedKeys:Ke.selectedKeys,triggerSubMenuAction:me.props.triggerSubMenuAction,subMenuKey:Be};return me.renderCommonMenuItem(De,be,nt)},Fe.store.setState({activeKey:Object(F.a)(Object(F.a)({},Fe.store.getState().activeKey),{},Object(X.a)({},Fe.eventKey,un(Fe,Fe.activeKey)))}),me.instanceArray=[],me}return Object(w.a)(qe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(me){return this.props.visible||me.visible||this.props.className!==me.className||!j()(this.props.style,me.style)}},{key:"componentDidUpdate",value:function(me){var De=this.props,be="activeKey"in De?De.activeKey:De.store.getState().activeKey[Nt(De)],Be=un(De,be);if(Be!==be)Yt(De.store,Nt(De),Be);else if("activeKey"in me){var Ke=un(me,me.activeKey);Be!==Ke&&Yt(De.store,Nt(De),Be)}}},{key:"render",value:function(){var me=this,De=Object(T.a)({},this.props);this.instanceArray=[];var be=P()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),Be={className:be,role:De.role||"menu"};De.id&&(Be.id=De.id),De.focusable&&(Be.tabIndex=0,Be.onKeyDown=this.onKeyDown);var Ke=De.prefixCls,nt=De.eventKey,Ve=De.visible,ct=De.level,It=De.mode,$t=De.overflowedIndicator,tn=De.theme;return le.forEach(function(bn){return delete De[bn]}),delete De.onClick,S.createElement(Vt,Object(T.a)({},De,{prefixCls:Ke,mode:It,tag:"ul",level:ct,theme:tn,visible:Ve,overflowedIndicator:$t},Be),Object(y.a)(De.children).map(function(bn,Pn){return me.renderMenuItem(bn,Pn,nt||"0-menu-")}))}}]),qe}(S.Component);Cn.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:q};var wt=Object(m.b)()(Cn),kt=wt,mn=M("Kwbf");function dn(Ie,Qe,qe){var Fe=Ie.prefixCls,me=Ie.motion,De=Ie.defaultMotions,be=De===void 0?{}:De,Be=Ie.openAnimation,Ke=Ie.openTransitionName,nt=Qe.switchingModeFromInline;if(me)return me;if(Object(U.a)(Be)==="object"&&Be)Object(mn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Be=="string")return{motionName:"".concat(Fe,"-open-").concat(Be)};if(Ke)return{motionName:Ke};var Ve=be[qe];return Ve||(nt?null:be.other)}var vt=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(Fe){var me;Object(k.a)(this,qe),me=Qe.call(this,Fe),me.onSelect=function(Be){var Ke=Object(v.a)(me),nt=Ke.props;if(nt.selectable){var Ve=me.store.getState(),ct=Ve.selectedKeys,It=Be.key;nt.multiple?ct=ct.concat([It]):ct=[It],"selectedKeys"in nt||me.store.setState({selectedKeys:ct}),nt.onSelect(Object(F.a)(Object(F.a)({},Be),{},{selectedKeys:ct}))}},me.onClick=function(Be){var Ke=me.getRealMenuMode(),nt=Object(v.a)(me),Ve=nt.store,ct=nt.props.onOpenChange;Ke!=="inline"&&!("openKeys"in me.props)&&(Ve.setState({openKeys:[]}),ct([])),me.props.onClick(Be)},me.onKeyDown=function(Be,Ke){me.innerMenu.getWrappedInstance().onKeyDown(Be,Ke)},me.onOpenChange=function(Be){var Ke=Object(v.a)(me),nt=Ke.props,Ve=me.store.getState().openKeys.concat(),ct=!1,It=function(tn){var bn=!1;if(tn.open)bn=Ve.indexOf(tn.key)===-1,bn&&Ve.push(tn.key);else{var Pn=Ve.indexOf(tn.key);bn=Pn!==-1,bn&&Ve.splice(Pn,1)}ct=ct||bn};Array.isArray(Be)?Be.forEach(It):It(Be),ct&&("openKeys"in me.props||me.store.setState({openKeys:Ve}),nt.onOpenChange(Ve))},me.onDeselect=function(Be){var Ke=Object(v.a)(me),nt=Ke.props;if(nt.selectable){var Ve=me.store.getState().selectedKeys.concat(),ct=Be.key,It=Ve.indexOf(ct);It!==-1&&Ve.splice(It,1),"selectedKeys"in nt||me.store.setState({selectedKeys:Ve}),nt.onDeselect(Object(F.a)(Object(F.a)({},Be),{},{selectedKeys:Ve}))}},me.onMouseEnter=function(Be){me.restoreModeVerticalFromInline();var Ke=me.props.onMouseEnter;Ke&&Ke(Be)},me.onTransitionEnd=function(Be){var Ke=Be.propertyName==="width"&&Be.target===Be.currentTarget,nt=Be.target.className,Ve=Object.prototype.toString.call(nt)==="[object SVGAnimatedString]"?nt.animVal:nt,ct=Be.propertyName==="font-size"&&Ve.indexOf("anticon")>=0;(Ke||ct)&&me.restoreModeVerticalFromInline()},me.setInnerMenu=function(Be){me.innerMenu=Be},me.isRootMenu=!0;var De=Fe.defaultSelectedKeys,be=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(De=Fe.selectedKeys||[]),"openKeys"in Fe&&(be=Fe.openKeys||[]),me.store=Object(m.c)({selectedKeys:De,openKeys:be,activeKey:{"0-menu-":un(Fe,Fe.activeKey)}}),me.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:me.store},me}return Object(w.a)(qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(me){var De=this.props,be=De.siderCollapsed,Be=De.inlineCollapsed,Ke=De.onOpenChange;(!me.inlineCollapsed&&Be||!me.siderCollapsed&&be)&&Ke([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var me=this.props.collapsedWidth,De=this.store,be=this.prevOpenKeys,Be=this.getInlineCollapsed()&&(me===0||me==="0"||me==="0px");Be?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):be&&(this.store.setState({openKeys:be}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var me=this.props.mode,De=this.state.switchingModeFromInline,be=this.getInlineCollapsed();return De&&be?"inline":be?"vertical":me}},{key:"getInlineCollapsed",value:function(){var me=this.props,De=me.inlineCollapsed,be=me.siderCollapsed;return be!==void 0?be:De}},{key:"restoreModeVerticalFromInline",value:function(){var me=this.state.switchingModeFromInline;me&&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 me=Object(F.a)({},Object(_.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return me.className+=" ".concat(me.prefixCls,"-root"),me.direction==="rtl"&&(me.className+=" ".concat(me.prefixCls,"-rtl")),me=Object(F.a)(Object(F.a)({},me),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:dn(this.props,this.state,De)}),delete me.openAnimation,delete me.openTransitionName,S.createElement(m.a,{store:this.store},S.createElement(kt,Object(T.a)({},me,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(me,De){var be=De.prevProps,Be=De.store,Ke=Be.getState(),nt={},Ve={prevProps:me};return be.mode==="inline"&&me.mode!=="inline"&&(Ve.switchingModeFromInline=!0),"openKeys"in me?nt.openKeys=me.openKeys||[]:((me.inlineCollapsed&&!be.inlineCollapsed||me.siderCollapsed&&!be.siderCollapsed)&&(Ve.switchingModeFromInline=!0,Ve.inlineOpenKeys=Ke.openKeys,nt.openKeys=[]),(!me.inlineCollapsed&&be.inlineCollapsed||!me.siderCollapsed&&be.siderCollapsed)&&(nt.openKeys=De.inlineOpenKeys,Ve.inlineOpenKeys=[])),Object.keys(nt).length&&Be.setState(nt),Ve}}]),qe}(S.Component);vt.defaultProps={selectable:!0,onClick:q,onSelect:q,onOpenChange:q,onDeselect:q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:S.createElement("span",null,"\xB7\xB7\xB7")};var St=vt,Ot=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(){var Fe;return Object(k.a)(this,qe),Fe=Qe.apply(this,arguments),Fe.onKeyDown=function(me){var De=me.keyCode;return De===h.a.ENTER?(Fe.onClick(me),!0):void 0},Fe.onMouseLeave=function(me){var De=Fe.props,be=De.eventKey,Be=De.onItemHover,Ke=De.onMouseLeave;Be({key:be,hover:!1}),Ke({key:be,domEvent:me})},Fe.onMouseEnter=function(me){var De=Fe.props,be=De.eventKey,Be=De.onItemHover,Ke=De.onMouseEnter;Be({key:be,hover:!0}),Ke({key:be,domEvent:me})},Fe.onClick=function(me){var De=Fe.props,be=De.eventKey,Be=De.multiple,Ke=De.onClick,nt=De.onSelect,Ve=De.onDeselect,ct=De.isSelected,It={key:be,keyPath:[be],item:Object(v.a)(Fe),domEvent:me};Ke(It),Be?ct?Ve(It):nt(It):ct||nt(It)},Fe.saveNode=function(me){Fe.node=me},Fe}return Object(w.a)(qe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var me=this.props;me.onDestroy&&me.onDestroy(me.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 me,De=Object(F.a)({},this.props),be=P()(this.getPrefixCls(),De.className,(me={},Object(X.a)(me,this.getActiveClassName(),!De.disabled&&De.active),Object(X.a)(me,this.getSelectedClassName(),De.isSelected),Object(X.a)(me,this.getDisabledClassName(),De.disabled),me)),Be=Object(F.a)(Object(F.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:be,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?Be=Object(F.a)(Object(F.a)({},Be),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(Be.role="none");var Ke={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},nt=Object(F.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?nt.paddingRight=De.inlineIndent*De.level:nt.paddingLeft=De.inlineIndent*De.level),le.forEach(function(ct){return delete De[ct]}),delete De.direction;var Ve=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ve=S.createElement(this.props.itemIcon,this.props)),S.createElement("li",Object(T.a)({},Object(_.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Be,Ke,{style:nt,ref:this.saveNode}),De.children,Ve)}}]),qe}(S.Component);Ot.isMenuItem=!0,Ot.defaultProps={onSelect:q,onMouseEnter:q,onMouseLeave:q,manualRef:q};var yt=Object(m.b)(function(Ie,Qe){var qe=Ie.activeKey,Fe=Ie.selectedKeys,me=Qe.eventKey,De=Qe.subMenuKey;return{active:qe[De]===me,isSelected:Array.isArray(Fe)?Fe.indexOf(me)!==-1:Fe===me}})(Ot),ft=yt,gn=function(Ie){Object(c.a)(qe,Ie);var Qe=Object(f.a)(qe);function qe(){var Fe;return Object(k.a)(this,qe),Fe=Qe.apply(this,arguments),Fe.renderInnerMenuItem=function(me){var De=Fe.props,be=De.renderMenuItem,Be=De.index;return be(me,Be,Fe.props.subMenuKey)},Fe}return Object(w.a)(qe,[{key:"render",value:function(){var me=Object(T.a)({},this.props),De=me.className,be=De===void 0?"":De,Be=me.rootPrefixCls,Ke="".concat(Be,"-item-group-title"),nt="".concat(Be,"-item-group-list"),Ve=me.title,ct=me.children;return le.forEach(function(It){return delete me[It]}),delete me.direction,S.createElement("li",Object(T.a)({},me,{onClick:function($t){return $t.stopPropagation()},className:"".concat(be," ").concat(Be,"-item-group")}),S.createElement("div",{className:Ke,title:typeof Ve=="string"?Ve:void 0},Ve),S.createElement("ul",{className:nt},S.Children.map(ct,this.renderInnerMenuItem)))}}]),qe}(S.Component);gn.isMenuItemGroup=!0,gn.defaultProps={disabled:!0};var Bt=gn,vn=function(Qe){var qe=Qe.className,Fe=Qe.rootPrefixCls,me=Qe.style;return S.createElement("li",{className:"".concat(qe," ").concat(Fe,"-item-divider"),style:me})};vn.defaultProps={disabled:!0,className:"",style:{}};var qt=vn,Ut=St,fn=M("eDIo");function In(Ie,Qe){var qe=Ie.prefixCls,Fe=Ie.editable,me=Ie.locale,De=Ie.style;return!Fe||Fe.showAdd===!1?null:S.createElement("button",{ref:Qe,type:"button",className:"".concat(qe,"-nav-add"),style:De,"aria-label":(me==null?void 0:me.addAriaLabel)||"Add tab",onClick:function(Be){Fe.onEdit("add",{event:Be})}},Fe.addIcon||"+")}var ur=S.forwardRef(In);function Ln(Ie,Qe){var qe=Ie.prefixCls,Fe=Ie.id,me=Ie.tabs,De=Ie.locale,be=Ie.mobile,Be=Ie.moreIcon,Ke=Be===void 0?"More":Be,nt=Ie.moreTransitionName,Ve=Ie.style,ct=Ie.className,It=Ie.editable,$t=Ie.tabBarGutter,tn=Ie.rtl,bn=Ie.onTabClick,Pn=Object(S.useState)(!1),er=Object(B.a)(Pn,2),tr=er[0],rn=er[1],Lt=Object(S.useState)(null),Ft=Object(B.a)(Lt,2),Tn=Ft[0],cn=Ft[1],Gn="".concat(Fe,"-more-popup"),pr="".concat(qe,"-dropdown"),Wn=Tn!==null?"".concat(Gn,"-").concat(Tn):null,an=De==null?void 0:De.dropdownAriaLabel,_n=S.createElement(Ut,{onClick:function(Pr){var Dr=Pr.key,Ar=Pr.domEvent;bn(Dr,Ar),rn(!1)},id:Gn,tabIndex:-1,role:"listbox","aria-activedescendant":Wn,selectedKeys:[Tn],"aria-label":an!==void 0?an:"expanded dropdown"},me.map(function(xr){return S.createElement(ft,{key:xr.key,id:"".concat(Gn,"-").concat(xr.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(xr.key),disabled:xr.disabled},xr.tab)}));function lr(xr){for(var Pr=me.filter(function(ta){return!ta.disabled}),Dr=Pr.findIndex(function(ta){return ta.key===Tn})||0,Ar=Pr.length,Or=0;Or<Ar;Or+=1){Dr=(Dr+xr+Ar)%Ar;var ir=Pr[Dr];if(!ir.disabled){cn(ir.key);return}}}function mr(xr){var Pr=xr.which;if(!tr){[h.a.DOWN,h.a.SPACE,h.a.ENTER].includes(Pr)&&(rn(!0),xr.preventDefault());return}switch(Pr){case h.a.UP:lr(-1),xr.preventDefault();break;case h.a.DOWN:lr(1),xr.preventDefault();break;case h.a.ESC:rn(!1);break;case h.a.SPACE:case h.a.ENTER:Tn!==null&&bn(Tn,xr);break}}Object(S.useEffect)(function(){var xr=document.getElementById(Wn);xr&&xr.scrollIntoView&&xr.scrollIntoView(!1)},[Tn]),Object(S.useEffect)(function(){tr||cn(null)},[tr]);var Fn=Object(X.a)({},tn?"marginLeft":"marginRight",$t);me.length||(Fn.visibility="hidden",Fn.order=1);var br=P()(Object(X.a)({},"".concat(pr,"-rtl"),tn)),Hr=be?null:S.createElement(fn.a,{prefixCls:pr,overlay:_n,trigger:["hover"],visible:tr,transitionName:nt,onVisibleChange:rn,overlayClassName:br,mouseEnterDelay:.1,mouseLeaveDelay:.1},S.createElement("button",{type:"button",className:"".concat(qe,"-nav-more"),style:Fn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Gn,id:"".concat(Fe,"-more"),"aria-expanded":tr,onKeyDown:mr},Ke));return S.createElement("div",{className:P()("".concat(qe,"-nav-operations"),ct),style:Ve,ref:Qe},Hr,S.createElement(ur,{prefixCls:qe,locale:De,editable:It}))}var Tr=S.forwardRef(Ln),Ur=Object(S.createContext)(null),Mn=.1,Nn=.01,Kn=20,vr=Math.pow(.995,Kn);function Rr(){var Ie=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Ie)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Ie.substr(0,4)))}function Br(Ie,Qe){var qe=Object(S.useState)(),Fe=Object(B.a)(qe,2),me=Fe[0],De=Fe[1],be=Object(S.useState)(0),Be=Object(B.a)(be,2),Ke=Be[0],nt=Be[1],Ve=Object(S.useState)(0),ct=Object(B.a)(Ve,2),It=ct[0],$t=ct[1],tn=Object(S.useState)(),bn=Object(B.a)(tn,2),Pn=bn[0],er=bn[1],tr=Object(S.useRef)();function rn(an){var _n=an.touches[0],lr=_n.screenX,mr=_n.screenY;De({x:lr,y:mr}),window.clearInterval(tr.current)}function Lt(an){if(!me)return;an.preventDefault();var _n=an.touches[0],lr=_n.screenX,mr=_n.screenY;De({x:lr,y:mr});var Fn=lr-me.x,br=mr-me.y;Qe(Fn,br);var Hr=Date.now();nt(Hr),$t(Hr-Ke),er({x:Fn,y:br})}function Ft(){if(!me)return;if(De(null),er(null),Pn){var an=Pn.x/It,_n=Pn.y/It,lr=Math.abs(an),mr=Math.abs(_n);if(Math.max(lr,mr)<Mn)return;var Fn=an,br=_n;tr.current=window.setInterval(function(){if(Math.abs(Fn)<Nn&&Math.abs(br)<Nn){window.clearInterval(tr.current);return}Fn*=vr,br*=vr,Qe(Fn*Kn,br*Kn)},Kn)}}var Tn=Object(S.useRef)(0),cn=Object(S.useRef)(!1),Gn=Object(S.useRef)();function pr(an){var _n=an.deltaX,lr=an.deltaY,mr=0,Fn=Math.abs(_n),br=Math.abs(lr);Fn===br?mr=Gn.current==="x"?_n:lr:Fn>br?(mr=_n,Gn.current="x"):(mr=lr,Gn.current="y");var Hr=Date.now();Hr-Tn.current>100&&(cn.current=!1),(Qe(-mr,-mr)||cn.current)&&(an.preventDefault(),cn.current=!0),Tn.current=Hr}var Wn=Object(S.useRef)(null);Wn.current={onTouchStart:rn,onTouchMove:Lt,onTouchEnd:Ft,onWheel:pr},S.useEffect(function(){function an(Fn){Wn.current.onTouchStart(Fn)}function _n(Fn){Wn.current.onTouchMove(Fn)}function lr(Fn){Wn.current.onTouchEnd(Fn)}function mr(Fn){Wn.current.onWheel(Fn)}return document.addEventListener("touchmove",_n,{passive:!1}),document.addEventListener("touchend",lr,{passive:!1}),Ie.current.addEventListener("touchstart",an,{passive:!1}),Ie.current.addEventListener("wheel",mr),function(){document.removeEventListener("touchmove",_n),document.removeEventListener("touchend",lr)}},[])}function sa(){var Ie=Object(S.useRef)(new Map);function Qe(Fe){return Ie.current.has(Fe)||Ie.current.set(Fe,S.createRef()),Ie.current.get(Fe)}function qe(Fe){Ie.current.delete(Fe)}return[Qe,qe]}function la(Ie,Qe){var qe=S.useRef(Ie),Fe=S.useState({}),me=Object(B.a)(Fe,2),De=me[1];function be(Be){var Ke=typeof Be=="function"?Be(qe.current):Be;Ke!==qe.current&&Qe(Ke,qe.current),qe.current=Ke,De({})}return[qe.current,be]}var ca=function(Qe){var qe=Qe.position,Fe=Qe.prefixCls,me=Qe.extra;if(!me)return null;var De,be=me;return qe==="right"&&(De=be.right||!be.left&&be||null),qe==="left"&&(De=be.left||null),De?S.createElement("div",{className:"".concat(Fe,"-extra-content")},De):null};function Ga(Ie,Qe){var qe,Fe=S.useContext(Ur),me=Fe.prefixCls,De=Fe.tabs,be=Ie.className,Be=Ie.style,Ke=Ie.id,nt=Ie.animated,Ve=Ie.activeKey,ct=Ie.rtl,It=Ie.extra,$t=Ie.editable,tn=Ie.locale,bn=Ie.tabPosition,Pn=Ie.tabBarGutter,er=Ie.children,tr=Ie.onTabClick,rn=Ie.onTabScroll,Lt=Object(S.useRef)(),Ft=Object(S.useRef)(),Tn=Object(S.useRef)(),cn=Object(S.useRef)(),Gn=sa(),pr=Object(B.a)(Gn,2),Wn=pr[0],an=pr[1],_n=bn==="top"||bn==="bottom",lr=la(0,function(Ir,_r){_n&&rn&&rn({direction:Ir>_r?"left":"right"})}),mr=Object(B.a)(lr,2),Fn=mr[0],br=mr[1],Hr=la(0,function(Ir,_r){!_n&&rn&&rn({direction:Ir>_r?"top":"bottom"})}),xr=Object(B.a)(Hr,2),Pr=xr[0],Dr=xr[1],Ar=Object(S.useState)(0),Or=Object(B.a)(Ar,2),ir=Or[0],ta=Or[1],Qa=Object(S.useState)(0),Pa=Object(B.a)(Qa,2),ya=Pa[0],Kr=Pa[1],Nr=Object(S.useState)(0),Fr=Object(B.a)(Nr,2),Gr=Fr[0],Ia=Fr[1],hi=Object(S.useState)(0),si=Object(B.a)(hi,2),jr=si[0],Ja=si[1],Za=Object(S.useState)(null),Wr=Object(B.a)(Za,2),kr=Wr[0],ha=Wr[1],Pi=Object(S.useState)(null),no=Object(B.a)(Pi,2),li=no[0],Ci=no[1],Ti=Object(S.useState)(0),Si=Object(B.a)(Ti,2),Ii=Si[0],co=Si[1],Ro=Object(S.useState)(0),Gi=Object(B.a)(Ro,2),Oi=Gi[0],Vi=Gi[1],yi=o(new Map),Ri=Object(B.a)(yi,2),ho=Ri[0],Xi=Ri[1],Ai=d(De,ho,ir),Di="".concat(me,"-nav-operations-hidden"),bi=0,Ma=0;_n?ct?(bi=0,Ma=Math.max(0,ir-kr)):(bi=Math.min(0,kr-ir),Ma=0):(bi=Math.min(0,li-ya),Ma=0);function fi(Ir){return Ir<bi?[bi,!1]:Ir>Ma?[Ma,!1]:[Ir,!0]}var pi=Object(S.useRef)(),_i=Object(S.useState)(),mi=Object(B.a)(_i,2),Yi=mi[0],$i=mi[1];function Qi(){$i(Date.now())}function ki(){window.clearTimeout(pi.current)}Br(Lt,function(Ir,_r){var ea=!1;function ka(Mi,di){Mi(function(Ui){var ci=fi(Ui+di),fa=Object(B.a)(ci,2),Fi=fa[0],Bi=fa[1];return ea=Bi,Fi})}if(_n){if(kr>=ir)return ea;ka(br,Ir)}else{if(li>=ya)return ea;ka(Dr,_r)}return ki(),Qi(),ea}),Object(S.useEffect)(function(){return ki(),Yi&&(pi.current=window.setTimeout(function(){$i(0)},100)),ki},[Yi]);function ui(){var Ir=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ve,_r=Ai.get(Ir);if(!_r)return;if(_n){var ea=Fn;ct?_r.right<Fn?ea=_r.right:_r.right+_r.width>Fn+kr&&(ea=_r.right+_r.width-kr):_r.left<-Fn?ea=-_r.left:_r.left+_r.width>-Fn+kr&&(ea=-(_r.left+_r.width-kr)),Dr(0),br(fi(ea)[0])}else{var ka=Pr;_r.top<-Pr?ka=-_r.top:_r.top+_r.height>-Pr+li&&(ka=-(_r.top+_r.height-li)),br(0),Dr(fi(ka)[0])}}var Ei=D(Ai,{width:kr,height:li,left:Fn,top:Pr},{width:Gr,height:jr},{width:Ii,height:Oi},Object(F.a)(Object(F.a)({},Ie),{},{tabs:De})),ro=Object(B.a)(Ei,2),Ao=ro[0],Do=ro[1],fo=De.map(function(Ir){var _r=Ir.key;return S.createElement(n,{id:Ke,prefixCls:me,key:_r,rtl:ct,tab:Ir,closable:Ir.closable,editable:$t,active:_r===Ve,tabPosition:bn,tabBarGutter:Pn,renderWrapper:er,removeAriaLabel:tn==null?void 0:tn.removeAriaLabel,ref:Wn(_r),onClick:function(ka){tr(_r,ka)},onRemove:function(){an(_r)},onFocus:function(){ui(_r),Qi(),ct||(Lt.current.scrollLeft=0),Lt.current.scrollTop=0}})}),ao=a(function(){var Ir,_r,ea,ka,Mi,di,Ui,ci,fa,Fi=((Ir=Lt.current)===null||Ir===void 0?void 0:Ir.offsetWidth)||0,Bi=((_r=Lt.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,Hi=((ea=cn.current)===null||ea===void 0?void 0:ea.offsetWidth)||0,Ba=((ka=cn.current)===null||ka===void 0?void 0:ka.offsetHeight)||0,Mr=((Mi=Tn.current)===null||Mi===void 0?void 0:Mi.offsetWidth)||0,fr=((di=Tn.current)===null||di===void 0?void 0:di.offsetHeight)||0;ha(Fi),Ci(Bi),co(Hi),Vi(Ba);var An=(((Ui=Ft.current)===null||Ui===void 0?void 0:Ui.offsetWidth)||0)-Hi,Zn=(((ci=Ft.current)===null||ci===void 0?void 0:ci.offsetHeight)||0)-Ba;ta(An),Kr(Zn);var yr=(fa=Tn.current)===null||fa===void 0?void 0:fa.className.includes(Di);Ia(An-(yr?0:Mr)),Ja(Zn-(yr?0:fr)),Xi(function(){var Zr=new Map;return De.forEach(function(gi){var ai=gi.key,Ta=Wn(ai).current;Ta&&Zr.set(ai,{width:Ta.offsetWidth,height:Ta.offsetHeight,left:Ta.offsetLeft,top:Ta.offsetTop})}),Zr})}),po=De.slice(0,Ao),Fa=De.slice(Do+1),ra=[].concat(Object(b.a)(po),Object(b.a)(Fa)),Ca=Object(S.useState)(),aa=Object(B.a)(Ca,2),Ni=aa[0],mo=aa[1],qa=Ai.get(Ve),io=Object(S.useRef)();function oo(){u.a.cancel(io.current)}Object(S.useEffect)(function(){var Ir={};return qa&&(_n?(ct?Ir.right=qa.right:Ir.left=qa.left,Ir.width=qa.width):(Ir.top=qa.top,Ir.height=qa.height)),oo(),io.current=u()(function(){mo(Ir)}),oo},[qa,_n,ct]),Object(S.useEffect)(function(){ui()},[Ve,qa,Ai,_n]),Object(S.useEffect)(function(){ao()},[ct,Pn,Ve,De.map(function(Ir){return Ir.key}).join("_")]);var so=!!ra.length,xi="".concat(me,"-nav-wrap"),Ji,ji,go,Zi;return _n?ct?(ji=Fn>0,Ji=Fn+kr<ir):(Ji=Fn<0,ji=-Fn+kr<ir):(go=Pr<0,Zi=-Pr+li<ya),S.createElement("div",{ref:Qe,role:"tablist",className:P()("".concat(me,"-nav"),be),style:Be,onKeyDown:function(){Qi()}},S.createElement(ca,{position:"left",extra:It,prefixCls:me}),S.createElement(p.a,{onResize:ao},S.createElement("div",{className:P()(xi,(qe={},Object(X.a)(qe,"".concat(xi,"-ping-left"),Ji),Object(X.a)(qe,"".concat(xi,"-ping-right"),ji),Object(X.a)(qe,"".concat(xi,"-ping-top"),go),Object(X.a)(qe,"".concat(xi,"-ping-bottom"),Zi),qe)),ref:Lt},S.createElement(p.a,{onResize:ao},S.createElement("div",{ref:Ft,className:"".concat(me,"-nav-list"),style:{transform:"translate(".concat(Fn,"px, ").concat(Pr,"px)"),transition:Yi?"none":void 0}},fo,S.createElement(ur,{ref:cn,prefixCls:me,locale:tn,editable:$t,style:{visibility:so?"hidden":null}}),S.createElement("div",{className:P()("".concat(me,"-ink-bar"),Object(X.a)({},"".concat(me,"-ink-bar-animated"),nt.inkBar)),style:Ni}))))),S.createElement(Tr,Object.assign({},Ie,{ref:Tn,prefixCls:me,tabs:ra,className:!so&&Di})),S.createElement(ca,{position:"right",extra:It,prefixCls:me}))}var Ra=S.forwardRef(Ga);function $a(Ie){var Qe=Ie.id,qe=Ie.activeKey,Fe=Ie.animated,me=Ie.tabPosition,De=Ie.rtl,be=Ie.destroyInactiveTabPane,Be=S.useContext(Ur),Ke=Be.prefixCls,nt=Be.tabs,Ve=Fe.tabPane,ct=nt.findIndex(function(It){return It.key===qe});return S.createElement("div",{className:P()("".concat(Ke,"-content-holder"))},S.createElement("div",{className:P()("".concat(Ke,"-content"),"".concat(Ke,"-content-").concat(me),Object(X.a)({},"".concat(Ke,"-content-animated"),Ve)),style:ct&&Ve?Object(X.a)({},De?"marginRight":"marginLeft","-".concat(ct,"00%")):null},nt.map(function(It){return S.cloneElement(It.node,{key:It.key,prefixCls:Ke,tabKey:It.key,id:Qe,animated:Ve,active:It.key===qe,destroyInactiveTabPane:be})})))}function Yr(Ie){var Qe=Ie.prefixCls,qe=Ie.forceRender,Fe=Ie.className,me=Ie.style,De=Ie.id,be=Ie.active,Be=Ie.animated,Ke=Ie.destroyInactiveTabPane,nt=Ie.tabKey,Ve=Ie.children,ct=S.useState(qe),It=Object(B.a)(ct,2),$t=It[0],tn=It[1];S.useEffect(function(){be?tn(!0):Ke&&tn(!1)},[be,Ke]);var bn={};return be||(Be?(bn.visibility="hidden",bn.height=0,bn.overflowY="hidden"):bn.display="none"),S.createElement("div",{id:De&&"".concat(De,"-panel-").concat(nt),role:"tabpanel",tabIndex:be?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat(nt),"aria-hidden":!be,style:Object(F.a)(Object(F.a)({},bn),me),className:P()("".concat(Qe,"-tabpane"),be&&"".concat(Qe,"-tabpane-active"),Fe)},(be||$t||qe)&&Ve)}var Aa=0;function oi(Ie){return Object(y.a)(Ie).map(function(Qe){if(S.isValidElement(Qe)){var qe=Qe.key!==void 0?String(Qe.key):void 0;return Object(F.a)(Object(F.a)({key:qe},Qe.props),{},{node:Qe})}return null}).filter(function(Qe){return Qe})}function Da(Ie,Qe){var qe,Fe=Ie.id,me=Ie.prefixCls,De=me===void 0?"rc-tabs":me,be=Ie.className,Be=Ie.children,Ke=Ie.direction,nt=Ie.activeKey,Ve=Ie.defaultActiveKey,ct=Ie.editable,It=Ie.animated,$t=Ie.tabPosition,tn=$t===void 0?"top":$t,bn=Ie.tabBarGutter,Pn=Ie.tabBarStyle,er=Ie.tabBarExtraContent,tr=Ie.locale,rn=Ie.moreIcon,Lt=Ie.moreTransitionName,Ft=Ie.destroyInactiveTabPane,Tn=Ie.renderTabBar,cn=Ie.onChange,Gn=Ie.onTabClick,pr=Ie.onTabScroll,Wn=Object(I.a)(Ie,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),an=oi(Be),_n=Ke==="rtl",lr;It===!1?lr={inkBar:!1,tabPane:!1}:lr=Object(F.a)({inkBar:!0,tabPane:!1},It!==!0?It:null);var mr=Object(S.useState)(!1),Fn=Object(B.a)(mr,2),br=Fn[0],Hr=Fn[1];Object(S.useEffect)(function(){Hr(Rr())},[]);var xr=Object(t.a)(function(){var jr;return(jr=an[0])===null||jr===void 0?void 0:jr.key},{value:nt,defaultValue:Ve}),Pr=Object(B.a)(xr,2),Dr=Pr[0],Ar=Pr[1],Or=Object(S.useState)(function(){return an.findIndex(function(jr){return jr.key===Dr})}),ir=Object(B.a)(Or,2),ta=ir[0],Qa=ir[1];Object(S.useEffect)(function(){var jr=an.findIndex(function(Za){return Za.key===Dr});if(jr===-1){var Ja;jr=Math.max(0,Math.min(ta,an.length-1)),Ar((Ja=an[jr])===null||Ja===void 0?void 0:Ja.key)}Qa(jr)},[an.map(function(jr){return jr.key}).join("_"),Dr,ta]);var Pa=Object(t.a)(null,{value:Fe}),ya=Object(B.a)(Pa,2),Kr=ya[0],Nr=ya[1],Fr=tn;br&&!["left","right"].includes(tn)&&(Fr="top"),Object(S.useEffect)(function(){Fe||(Nr("rc-tabs-".concat(Aa)),Aa+=1)},[]);function Gr(jr,Ja){Gn==null||Gn(jr,Ja),Ar(jr),cn==null||cn(jr)}var Ia={id:Kr,activeKey:Dr,animated:lr,tabPosition:Fr,rtl:_n,mobile:br},hi,si=Object(F.a)(Object(F.a)({},Ia),{},{editable:ct,locale:tr,moreIcon:rn,moreTransitionName:Lt,tabBarGutter:bn,onTabClick:Gr,onTabScroll:pr,extra:er,style:Pn,panes:Be});return Tn?hi=Tn(si,Ra):hi=S.createElement(Ra,Object.assign({},si)),S.createElement(Ur.Provider,{value:{tabs:an,prefixCls:De}},S.createElement("div",Object.assign({ref:Qe,id:Fe,className:P()(De,"".concat(De,"-").concat(Fr),(qe={},Object(X.a)(qe,"".concat(De,"-mobile"),br),Object(X.a)(qe,"".concat(De,"-editable"),ct),Object(X.a)(qe,"".concat(De,"-rtl"),_n),qe),be)},Wn),hi,S.createElement($a,Object.assign({destroyInactiveTabPane:Ft},Ia,{animated:lr}))))}var zr=S.forwardRef(Da);zr.TabPane=Yr;var va=zr,wa=ee.b=va},kSUc:function(ze,ee,M){},lO7E:function(ze,ee,M){ze.exports=M.p+"static/zwt.3af2a320.png"},lZu9:function(ze,ee,M){(function(X){X(M("VrN/"),M("1eCo"),M("8EBN"))})(function(X){"use strict";X.defineMode("markdown",function(B,I){var F=X.getMode(B,"text/html"),S=F.name=="null";function C(H){if(X.findModeByName){var L=X.findModeByName(H);L&&(H=L.mime||L.mimes[0])}var G=X.getMode(B,H);return G.name=="null"?null:G}I.highlightFormatting===void 0&&(I.highlightFormatting=!1),I.maxBlockquoteDepth===void 0&&(I.maxBlockquoteDepth=0),I.taskLists===void 0&&(I.taskLists=!1),I.strikethrough===void 0&&(I.strikethrough=!1),I.emoji===void 0&&(I.emoji=!1),I.fencedCodeBlockHighlighting===void 0&&(I.fencedCodeBlockHighlighting=!0),I.fencedCodeBlockDefaultMode===void 0&&(I.fencedCodeBlockDefaultMode="text/plain"),I.xml===void 0&&(I.xml=!0),I.tokenTypeOverrides===void 0&&(I.tokenTypeOverrides={});var P={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var y in P)P.hasOwnProperty(y)&&I.tokenTypeOverrides[y]&&(P[y]=I.tokenTypeOverrides[y]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,b=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,u=I.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,a=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\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]/,n=" ";function s(H,L,G){return L.f=L.inline=G,G(H,L)}function d(H,L,G){return L.f=L.block=G,G(H,L)}function E(H){return!H||!/\S/.test(H.string)}function D(H){if(H.linkTitle=!1,H.linkHref=!1,H.linkText=!1,H.em=!1,H.strong=!1,H.strikethrough=!1,H.quote=0,H.indentedCode=!1,H.f==k){var L=S;if(!L){var G=X.innerMode(F,H.htmlState);L=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}L&&(H.f=f,H.block=T,H.htmlState=null)}return H.trailingSpace=0,H.trailingSpaceNewLine=!1,H.prevLine=H.thisLine,H.thisLine={stream:null},null}function T(H,L){var G=H.column()===L.indentation,z=E(L.prevLine.stream),J=L.indentedCode,te=L.prevLine.hr,_e=L.list!==!1,ce=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var xe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,_e)){for(L.list=null;xe<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=xe-L.listStack[L.listStack.length-1])}var Te=!z&&!te&&!L.prevLine.header&&(!_e||!J)&&!L.prevLine.fencedCodeEnd,je=(L.list===!1||te||z)&&L.indentation<=ce&&H.match(t),Ce=null;if(L.indentationDiff>=4&&(J||L.prevLine.fencedCodeEnd||L.prevLine.header||z))return H.skipToEnd(),L.indentedCode=!0,P.code;if(H.eatSpace())return null;if(G&&L.indentation<=ce&&(Ce=H.match(u))&&Ce[1].length<=6)return L.quote=0,L.header=Ce[1].length,L.thisLine.header=!0,I.highlightFormatting&&(L.formatting="header"),L.f=L.inline,v(L);if(L.indentation<=ce&&H.eat(">"))return L.quote=G?1:L.quote+1,I.highlightFormatting&&(L.formatting="quote"),H.eatSpace(),v(L);if(!je&&!L.setext&&G&&L.indentation<=ce&&(Ce=H.match(b))){var Z=Ce[1]?"ol":"ul";return L.indentation=xe+H.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,I.taskLists&&H.match(i,!1)&&(L.taskList=!0),L.f=L.inline,I.highlightFormatting&&(L.formatting=["list","list-"+Z]),v(L)}else{if(G&&L.indentation<=ce&&(Ce=H.match(o,!0)))return L.quote=0,L.fencedEndRE=new RegExp(Ce[1]+"+ *$"),L.localMode=I.fencedCodeBlockHighlighting&&C(Ce[2]||I.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=X.startState(L.localMode)),L.f=L.block=w,I.highlightFormatting&&(L.formatting="code-block"),L.code=-1,v(L);if(L.setext||(!Te||!_e)&&!L.quote&&L.list===!1&&!L.code&&!je&&!h.test(H.string)&&(Ce=H.lookAhead(1))&&(Ce=Ce.match(p)))return L.setext?(L.header=L.setext,L.setext=0,H.skipToEnd(),I.highlightFormatting&&(L.formatting="header")):(L.header=Ce[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,v(L);if(je)return H.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,P.hr;if(H.peek()==="[")return s(H,L,j)}return s(H,L,L.inline)}function k(H,L){var G=F.token(H,L.htmlState);if(!S){var z=X.innerMode(F,L.htmlState);(z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText||L.md_inside&&H.current().indexOf(">")>-1)&&(L.f=f,L.block=T,L.htmlState=null)}return G}function w(H,L){var G=L.listStack[L.listStack.length-1]||0,z=L.indentation<G,J=G+3;if(L.fencedEndRE&&L.indentation<=J&&(z||H.match(L.fencedEndRE))){I.highlightFormatting&&(L.formatting="code-block");var te;return z||(te=v(L)),L.localMode=L.localState=null,L.block=T,L.f=f,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,z?d(H,L,L.block):te}else return L.localMode?L.localMode.token(H,L.localState):(H.skipToEnd(),P.code)}function v(H){var L=[];if(H.formatting){L.push(P.formatting),typeof H.formatting=="string"&&(H.formatting=[H.formatting]);for(var G=0;G<H.formatting.length;G++)L.push(P.formatting+"-"+H.formatting[G]),H.formatting[G]==="header"&&L.push(P.formatting+"-"+H.formatting[G]+"-"+H.header),H.formatting[G]==="quote"&&(!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=H.quote?L.push(P.formatting+"-"+H.formatting[G]+"-"+H.quote):L.push("error"))}if(H.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(H.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(H.linkHref?L.push(P.linkHref,"url"):(H.strong&&L.push(P.strong),H.em&&L.push(P.em),H.strikethrough&&L.push(P.strikethrough),H.emoji&&L.push(P.emoji),H.linkText&&L.push(P.linkText),H.code&&L.push(P.code),H.image&&L.push(P.image),H.imageAltText&&L.push(P.imageAltText,"link"),H.imageMarker&&L.push(P.imageMarker)),H.header&&L.push(P.header,P.header+"-"+H.header),H.quote&&(L.push(P.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=H.quote?L.push(P.quote+"-"+H.quote):L.push(P.quote+"-"+I.maxBlockquoteDepth)),H.list!==!1){var z=(H.listStack.length-1)%3;z?z===1?L.push(P.list2):L.push(P.list3):L.push(P.list1)}return H.trailingSpaceNewLine?L.push("trailing-space-new-line"):H.trailingSpace&&L.push("trailing-space-"+(H.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function c(H,L){return H.match(a,!0)?v(L):void 0}function f(H,L){var G=L.text(H,L);if(typeof G!="undefined")return G;if(L.list)return L.list=null,v(L);if(L.taskList){var z=H.match(i,!0)[1]===" ";return z?L.taskOpen=!0:L.taskClosed=!0,I.highlightFormatting&&(L.formatting="task"),L.taskList=!1,v(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&H.match(/^#+$/,!0))return I.highlightFormatting&&(L.formatting="header"),v(L);var J=H.next();if(L.linkTitle){L.linkTitle=!1;var te=J;J==="("&&(te=")"),te=(te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var _e="^\\s*(?:[^"+te+"\\\\]+|\\\\\\\\|\\\\.)"+te;if(H.match(new RegExp(_e),!0))return P.linkHref}if(J==="`"){var ce=L.formatting;I.highlightFormatting&&(L.formatting="code"),H.eatWhile("`");var xe=H.current().length;if(L.code==0&&(!L.quote||xe==1))return L.code=xe,v(L);if(xe==L.code){var Te=v(L);return L.code=0,Te}else return L.formatting=ce,v(L)}else if(L.code)return v(L);if(J==="\\"&&(H.next(),I.highlightFormatting)){var je=v(L),Ce=P.formatting+"-escape";return je?je+" "+Ce:Ce}if(J==="!"&&H.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,I.highlightFormatting&&(L.formatting="image"),v(L);if(J==="["&&L.imageMarker&&H.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,I.highlightFormatting&&(L.formatting="image"),v(L);if(J==="]"&&L.imageAltText){I.highlightFormatting&&(L.formatting="image");var je=v(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=_,je}if(J==="["&&!L.image)return L.linkText&&H.match(/^.*?\]/)||(L.linkText=!0,I.highlightFormatting&&(L.formatting="link")),v(L);if(J==="]"&&L.linkText){I.highlightFormatting&&(L.formatting="link");var je=v(L);return L.linkText=!1,L.inline=L.f=H.match(/\(.*?\)| ?\[.*?\]/,!1)?_:f,je}if(J==="<"&&H.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=m,I.highlightFormatting&&(L.formatting="link");var je=v(L);return je?je+=" ":je="",je+P.linkInline}if(J==="<"&&H.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=m,I.highlightFormatting&&(L.formatting="link");var je=v(L);return je?je+=" ":je="",je+P.linkEmail}if(I.xml&&J==="<"&&H.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Z=H.string.indexOf(">",H.pos);if(Z!=-1){var K=H.string.substring(H.start,Z);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(K)&&(L.md_inside=!0)}return H.backUp(1),L.htmlState=X.startState(F),d(H,L,k)}if(I.xml&&J==="<"&&H.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(J==="*"||J==="_"){for(var V=1,$=H.pos==1?" ":H.string.charAt(H.pos-2);V<3&&H.eat(J);)V++;var q=H.peek()||" ",Q=!/\s/.test(q)&&(!l.test(q)||/\s/.test($)||l.test($)),ge=!/\s/.test($)&&(!l.test($)||/\s/.test(q)||l.test(q)),Oe=null,Ye=null;if(V%2&&(!L.em&&Q&&(J==="*"||!ge||l.test($))?Oe=!0:L.em==J&&ge&&(J==="*"||!Q||l.test(q))&&(Oe=!1)),V>1&&(!L.strong&&Q&&(J==="*"||!ge||l.test($))?Ye=!0:L.strong==J&&ge&&(J==="*"||!Q||l.test(q))&&(Ye=!1)),Ye!=null||Oe!=null){I.highlightFormatting&&(L.formatting=Oe==null?"strong":Ye==null?"em":"strong em"),Oe===!0&&(L.em=J),Ye===!0&&(L.strong=J);var Te=v(L);return Oe===!1&&(L.em=!1),Ye===!1&&(L.strong=!1),Te}}else if(J===" "&&(H.eat("*")||H.eat("_"))){if(H.peek()===" ")return v(L);H.backUp(1)}if(I.strikethrough){if(J==="~"&&H.eatWhile(J)){if(L.strikethrough){I.highlightFormatting&&(L.formatting="strikethrough");var Te=v(L);return L.strikethrough=!1,Te}else if(H.match(/^[^\s]/,!1))return L.strikethrough=!0,I.highlightFormatting&&(L.formatting="strikethrough"),v(L)}else if(J===" "&&H.match(/^~~/,!0)){if(H.peek()===" ")return v(L);H.backUp(2)}}if(I.emoji&&J===":"&&H.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,I.highlightFormatting&&(L.formatting="emoji");var le=v(L);return L.emoji=!1,le}return J===" "&&(H.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),v(L)}function m(H,L){var G=H.next();if(G===">"){L.f=L.inline=f,I.highlightFormatting&&(L.formatting="link");var z=v(L);return z?z+=" ":z="",z+P.linkInline}return H.match(/^[^>]+/,!0),P.linkInline}function _(H,L){if(H.eatSpace())return null;var G=H.next();return G==="("||G==="["?(L.f=L.inline=g(G==="("?")":"]"),I.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,v(L)):"error"}var x={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(H){return function(L,G){var z=L.next();if(z===H){G.f=G.inline=f,I.highlightFormatting&&(G.formatting="link-string");var J=v(G);return G.linkHref=!1,J}return L.match(x[H]),G.linkHref=!0,v(G)}}function j(H,L){return H.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=U,H.next(),I.highlightFormatting&&(L.formatting="link"),L.linkText=!0,v(L)):s(H,L,f)}function U(H,L){if(H.match(/^\]:/,!0)){L.f=L.inline=R,I.highlightFormatting&&(L.formatting="link");var G=v(L);return L.linkText=!1,G}return H.match(/^([^\]\\]|\\.)+/,!0),P.linkText}function R(H,L){return H.eatSpace()?null:(H.match(/^[^\s]+/,!0),H.peek()===void 0?L.linkTitle=!0:H.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=f,P.linkHref+" url")}var W={startState:function(){return{f:T,prevLine:{stream:null},thisLine:{stream:null},block:T,htmlState:null,indentation:0,inline:f,text:c,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(H){return{f:H.f,prevLine:H.prevLine,thisLine:H.thisLine,block:H.block,htmlState:H.htmlState&&X.copyState(F,H.htmlState),indentation:H.indentation,localMode:H.localMode,localState:H.localMode?X.copyState(H.localMode,H.localState):null,inline:H.inline,text:H.text,formatting:!1,linkText:H.linkText,linkTitle:H.linkTitle,linkHref:H.linkHref,code:H.code,em:H.em,strong:H.strong,strikethrough:H.strikethrough,emoji:H.emoji,header:H.header,setext:H.setext,hr:H.hr,taskList:H.taskList,list:H.list,listStack:H.listStack.slice(0),quote:H.quote,indentedCode:H.indentedCode,trailingSpace:H.trailingSpace,trailingSpaceNewLine:H.trailingSpaceNewLine,md_inside:H.md_inside,fencedEndRE:H.fencedEndRE}},token:function(H,L){if(L.formatting=!1,H!=L.thisLine.stream){if(L.header=0,L.hr=!1,H.match(/^\s*$/,!0))return D(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:H},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=k)){var G=H.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(L.indentation=G,L.indentationDiff=null,G>0)return null}}return L.f(H,L)},innerMode:function(H){return H.block==k?{state:H.htmlState,mode:F}:H.localState?{state:H.localState,mode:H.localMode}:{state:H,mode:W}},indent:function(H,L,G){return H.block==k&&F.indent?F.indent(H.htmlState,L,G):H.localState&&H.localMode.indent?H.localMode.indent(H.localState,L,G):X.Pass},blankLine:D,getType:v,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return W},"xml"),X.defineMIME("text/markdown","markdown"),X.defineMIME("text/x-markdown","markdown")})},loD1:function(ze,ee){function M(X,B,I,F,S,C,P){if(S===0)return!1;var y=S,t=0,b=X;if(P>B+y&&P>F+y||P<B-y&&P<F-y||C>X+y&&C>I+y||C<X-y&&C<I-y)return!1;if(X!==I)t=(B-F)/(X-I),b=(X*F-I*B)/(X-I);else return Math.abs(C-X)<=y/2;var i=t*C-P+b,u=i*i/(t*t+1);return u<=y/2*y/2}ee.containStroke=M},mFDi:function(ze,ee,M){var X=M("QBsz"),B=M("Fofx"),I=X.applyTransform,F=Math.min,S=Math.max;function C(y,t,b,i){b<0&&(y=y+b,b=-b),i<0&&(t=t+i,i=-i),this.x=y,this.y=t,this.width=b,this.height=i}C.prototype={constructor:C,union:function(y){var t=F(y.x,this.x),b=F(y.y,this.y);this.width=S(y.x+y.width,this.x+this.width)-t,this.height=S(y.y+y.height,this.y+this.height)-b,this.x=t,this.y=b},applyTransform:function(){var y=[],t=[],b=[],i=[];return function(u){if(!u)return;y[0]=b[0]=this.x,y[1]=i[1]=this.y,t[0]=i[0]=this.x+this.width,t[1]=b[1]=this.y+this.height,I(y,y,u),I(t,t,u),I(b,b,u),I(i,i,u),this.x=F(y[0],t[0],b[0],i[0]),this.y=F(y[1],t[1],b[1],i[1]);var p=S(y[0],t[0],b[0],i[0]),a=S(y[1],t[1],b[1],i[1]);this.width=p-this.x,this.height=a-this.y}}(),calculateTransform:function(y){var t=this,b=y.width/t.width,i=y.height/t.height,u=B.create();return B.translate(u,u,[-t.x,-t.y]),B.scale(u,u,[b,i]),B.translate(u,u,[y.x,y.y]),u},intersect:function(y){if(!y)return!1;y instanceof C||(y=C.create(y));var t=this,b=t.x,i=t.x+t.width,u=t.y,p=t.y+t.height,a=y.x,o=y.x+y.width,h=y.y,l=y.y+y.height;return!(i<a||o<b||p<h||l<u)},contain:function(y,t){var b=this;return y>=b.x&&y<=b.x+b.width&&t>=b.y&&t<=b.y+b.height},clone:function(){return new C(this.x,this.y,this.width,this.height)},copy:function(y){this.x=y.x,this.y=y.y,this.width=y.width,this.height=y.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},C.create=function(y){return new C(y.x,y.y,y.width,y.height)};var P=C;ze.exports=P},mLcG:function(ze,ee){var M=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(X){setTimeout(X,16)};ze.exports=M},mgmH:function(ze,ee,M){"use strict";M.d(ee,"d",function(){return p}),M.d(ee,"b",function(){return a}),M.d(ee,"e",function(){return o}),M.d(ee,"c",function(){return h}),M.d(ee,"n",function(){return l}),M.d(ee,"g",function(){return n}),M.d(ee,"h",function(){return s}),M.d(ee,"j",function(){return E}),M.d(ee,"a",function(){return D}),M.d(ee,"l",function(){return T}),M.d(ee,"f",function(){return k}),M.d(ee,"k",function(){return w}),M.d(ee,"m",function(){return v}),M.d(ee,"i",function(){return c}),M.d(ee,"o",function(){return f}),M.d(ee,"t",function(){return m}),M.d(ee,"s",function(){return _}),M.d(ee,"p",function(){return x}),M.d(ee,"q",function(){return g}),M.d(ee,"r",function(){return j}),M.d(ee,"v",function(){return U}),M.d(ee,"u",function(){return R});var X=M("miYZ"),B=M("tsqr"),I=M("k1fw"),F=M("9og8"),S=M("WmNS"),C=M.n(S),P=M("oUNq"),y=M("9kvl"),t=M("1vsH"),b=M("m3rI"),i=function(){Object(y.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},u=function(){Object(y.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return i(),J.next=3,Object(P.t)(Object(I.a)({},L));case 3:if(G=J.sent,!(G.status===0)){J.next=7;break}return J.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(L.coursesId,"/export_couser_info.json"),query:L}));case 7:u();case 8:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),a=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.r)(Object(I.a)({},L));case 2:if(G=J.sent,!(G.status===0)){J.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_member_act_score")),J.next=13;break;case 8:if(!(G.status===-2)){J.next=12;break}return J.abrupt("return",G);case 12:G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),o=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.u)(Object(I.a)({},L));case 2:if(G=J.sent,!(G.status===0)){J.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_score")),J.next=13;break;case 8:if(!(G.status===-2)){J.next=12;break}return J.abrupt("return",G);case 12:G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_score")));case 13:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),h=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.s)(Object(I.a)({},L));case 2:if(G=J.sent,!(G.status===0)){J.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_exercise_and_other")),J.next=13;break;case 8:if(!(G.status===-2)){J.next=12;break}return J.abrupt("return",G);case 12:G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),l=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.z)(Object(I.a)({},L));case 2:if(G=J.sent,!(G.status===0)){J.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_exercise_and_other")),J.next=13;break;case 8:if(!(G.status===-2)){J.next=12;break}return J.abrupt("return",G);case 12:G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),n=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.v)(Object(I.a)({},L));case 2:if(G=J.sent,!(G.status===0)){J.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_homework")),J.next=13;break;case 8:if(!(G.status===-2)){J.next=12;break}return J.abrupt("return",G);case 12:G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),s=function(){var W=Object(F.a)(C.a.mark(function H(L,G){var z;return C.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return te.next=2,Object(P.x)(Object(I.a)({},L));case 2:z=te.sent,z.status===0?(B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/").concat(G))):z.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/").concat(G)));case 4:case"end":return te.stop()}},H)}));return function(L,G){return W.apply(this,arguments)}}(),d=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return i(),J.next=3,Object(P.w)(Object(I.a)({},L));case 3:if(G=J.sent,!(G.status===0)){J.next=7;break}return J.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/homework_commons/".concat(L.categoryId,"/works_list.zip"),query:L}));case 7:u();case 8:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),E=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return i(),J.next=3,Object(P.A)(Object(I.a)({},L));case 3:if(G=J.sent,!(G.status===0)){J.next=7;break}return J.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/polls/".concat(L.categoryId,"/commit_result.xlsx"),query:L}));case 7:u();case 8:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),D=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(L.coursesId,"/attendances/export_xlsx_data.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),T=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(L.coursesId,"/video_study_statics.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),k=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(L.coursesId,"/export_course_students_info.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),w=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/item_banks/export.xlsx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),v=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),c=function(){var W=Object(F.a)(C.a.mark(function H(L){var G;return C.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,Object(P.y)(Object(I.a)({},L));case 2:G=J.sent,G.status===0?(B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/exercise_score"))):G.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.d.push("/classrooms/".concat(L.coursesId,"/exportlist/exercise_score")));case 4:case"end":return J.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),f=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),z.next=3,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/export_records/".concat(L.id,".xlsx"),query:L}));case 3:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),m=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),_=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(L==null?void 0:L.ec_year_id,"/ec_training_objectives.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),x=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)(L==null?void 0:L.name,Object(t.Y)({url:b.a.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),g=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(L==null?void 0:L.ec_year_id,"/ec_courses.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),j=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(L==null?void 0:L.ec_year_id,"/ec_graduation_requirements.xlsx"),query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),U=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/rank_list.xlsx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}(),R=function(){var W=Object(F.a)(C.a.mark(function H(L){return C.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/question_rank_list.xlsx",query:L}));case 2:case"end":return z.stop()}},H)}));return function(L){return W.apply(this,arguments)}}()},n1HI:function(ze,ee,M){var X=M("hX1E"),B=X.normalizeRadian,I=Math.PI*2;function F(S,C,P,y,t,b,i,u,p){if(i===0)return!1;var a=i;u-=S,p-=C;var o=Math.sqrt(u*u+p*p);if(o-a>P||o+a<P)return!1;if(Math.abs(y-t)%I<1e-4)return!0;if(b){var h=y;y=B(t),t=B(h)}else y=B(y),t=B(t);y>t&&(t+=I);var l=Math.atan2(p,u);return l<0&&(l+=I),l>=y&&l<=t||l+I>=y&&l+I<=t}ee.containStroke=F},n6Mw:function(ze,ee,M){var X=M("SrGk"),B=M("bYtY"),I=M("Fofx");function F(C,P){X.call(this,C,P,"clipPath","__clippath_in_use__")}B.inherits(F,X),F.prototype.update=function(C){var P=this.getSvgElement(C);P&&this.updateDom(P,C.__clipPaths,!1);var y=this.getTextSvgElement(C);y&&this.updateDom(y,C.__clipPaths,!0),this.markUsed(C)},F.prototype.updateDom=function(C,P,y){if(P&&P.length>0){var t=this.getDefs(!0),b=P[0],i,u,p=y?"_textDom":"_dom";b[p]?(u=b[p].getAttribute("id"),i=b[p],t.contains(i)||t.appendChild(i)):(u="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",u),t.appendChild(i),b[p]=i);var a=this.getSvgProxy(b);if(b.transform&&b.parent.invTransform&&!y){var o=Array.prototype.slice.call(b.transform);I.mul(b.transform,b.parent.invTransform,b.transform),a.brush(b),b.transform=o}else a.brush(b);var h=this.getSvgElement(b);i.innerHTML="",i.appendChild(h.cloneNode()),C.setAttribute("clip-path","url(#"+u+")"),P.length>1&&this.updateDom(i,P.slice(1),y)}else C&&C.setAttribute("clip-path","none")},F.prototype.markUsed=function(C){var P=this;C.__clipPaths&&B.each(C.__clipPaths,function(y){y._dom&&X.prototype.markUsed.call(P,y._dom),y._textDom&&X.prototype.markUsed.call(P,y._textDom)})};var S=F;ze.exports=S},n6Qo:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return y});var X=M("q1tI"),B=M("biw7"),I=M("fyJ8");function F(t){var b=t.className,i=t.index,u=t.children,p=t.colSpan,a=t.rowSpan,o=X.useContext(B.a),h=o.prefixCls,l=o.fixedInfoList,n=l[i];return X.createElement(I.a,Object.assign({className:b,index:i,component:"td",prefixCls:h,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:p,rowSpan:a}}}},n))}function S(t){return X.createElement("tr",Object.assign({},t))}function C(t){var b=t.children,i=X.useContext(B.a),u=i.prefixCls;return X.createElement("tfoot",{className:"".concat(u,"-summary")},b)}var P=ee.b=C,y={Cell:F,Row:S}},nCxF:function(ze,ee,M){var X=M("QBsz"),B=X.min,I=X.max,F=X.scale,S=X.distance,C=X.add,P=X.clone,y=X.sub;function t(b,i,u,p){var a=[],o=[],h=[],l=[],n,s,d,E;if(p){d=[Infinity,Infinity],E=[-Infinity,-Infinity];for(var D=0,T=b.length;D<T;D++)B(d,d,b[D]),I(E,E,b[D]);B(d,d,p[0]),I(E,E,p[1])}for(var D=0,T=b.length;D<T;D++){var k=b[D];if(u)n=b[D?D-1:T-1],s=b[(D+1)%T];else if(D===0||D===T-1){a.push(P(b[D]));continue}else n=b[D-1],s=b[D+1];y(o,s,n),F(o,o,i);var w=S(k,n),v=S(k,s),c=w+v;c!==0&&(w/=c,v/=c),F(h,o,-w),F(l,o,v);var f=C([],k,h),m=C([],k,l);p&&(I(f,f,d),B(f,f,E),I(m,m,d),B(m,m,E)),a.push(f),a.push(m)}return u&&a.push(a.shift()),a}ze.exports=t},nEHx:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return X});var X;(function(B){B.DARK="dark",B.LIGHT="light",B.HIGH_CONTRAST="hc"})(X||(X={}))},nPnh:function(ze,ee){var M=Math.round;function X(F,S,C){if(!S)return;var P=S.x1,y=S.x2,t=S.y1,b=S.y2;F.x1=P,F.x2=y,F.y1=t,F.y2=b;var i=C&&C.lineWidth;if(!i)return;M(P*2)===M(y*2)&&(F.x1=F.x2=I(P,i,!0)),M(t*2)===M(b*2)&&(F.y1=F.y2=I(t,i,!0))}function B(F,S,C){if(!S)return;var P=S.x,y=S.y,t=S.width,b=S.height;F.x=P,F.y=y,F.width=t,F.height=b;var i=C&&C.lineWidth;if(!i)return;F.x=I(P,i,!0),F.y=I(y,i,!0),F.width=Math.max(I(P+t,i,!1)-F.x,t===0?0:1),F.height=Math.max(I(y+b,i,!1)-F.y,b===0?0:1)}function I(F,S,C){if(!S)return F;var P=M(F*2);return(P+M(S))%2===0?P/2:(P+(C?1:-1))/2}ee.subPixelOptimizeLine=X,ee.subPixelOptimizeRect=B,ee.subPixelOptimize=I},ni6a:function(ze,ee,M){var X=M("pzxd"),B=M("mFDi"),I=M("gut8"),F=I.WILL_BE_RESTORED,S=new B,C=function(){};C.prototype={constructor:C,drawRectText:function(y,t){var b=this.style;t=b.textRect||t,this.__dirty&&X.normalizeTextStyle(b,!0);var i=b.text;if(i!=null&&(i+=""),!X.needDrawText(i,b))return;y.save();var u=this.transform;b.transformText?this.setTransform(y):u&&(S.copy(t),S.applyTransform(u),t=S),X.renderText(this,y,i,b,t,F),y.restore()}};var P=C;ze.exports=P},nnTU:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return P}),M.d(ee,"a",function(){return y});var X=M("MI8n"),B=M("JYp7"),I=M("pmY6"),F=M("24hK"),S=M("746U"),C=M("Cg/j");const P=Object(C.c)("commandService"),y=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new X.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,b){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!b)throw new Error("invalid command");return this.registerCommand({id:t,handler:b})}if(t.description){const o=[];for(let l of t.description.args)o.push(l.constraint);const h=t.handler;t.handler=function(l,...n){return Object(S.o)(n,o),h(l,...n)}}const{id:i}=t;let u=this._commands.get(i);u||(u=new F.a,this._commands.set(i,u));let p=u.unshift(t),a=Object(I.i)(()=>{p();const o=this._commands.get(i);(o==null?void 0:o.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),a}registerCommandAlias(t,b){return y.registerCommand(t,(i,...u)=>i.get(P).executeCommand(b,...u))}getCommand(t){const b=this._commands.get(t);return!b||b.isEmpty()?void 0:B.a.first(b)}getCommands(){const t=new Map;for(const b of this._commands.keys()){const i=this.getCommand(b);i&&t.set(b,i)}return t}};y.registerCommand("noop",()=>{})},oOBs:function(ze,ee,M){ze.exports={leftdiv:"leftdiv___1FhsT",listClass:"listClass___1Y2ac",spantitle:"spantitle___1pL39",rightdiv:"rightdiv___3ZICD"}},ogmK:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return gr});var X=M("1OyB"),B=M("vuIU"),I=M("Ji7U"),F=M("LK+K"),S=M("rePB"),C=M("VTBJ"),P=M("ODXe"),y=M("q1tI"),t=M("TSYQ"),b=M.n(t),i=M("Kwbf"),u=M("6cGi"),p=M("U8pU"),a=M("4IlW"),o=y.createContext({}),h=o,l={visibility:"hidden"};function n(re){var Le=re.prefixCls,Xe=re.prevIcon,ke=Xe===void 0?"\u2039":Xe,dt=re.nextIcon,tt=dt===void 0?"\u203A":dt,ht=re.superPrevIcon,xt=ht===void 0?"\xAB":ht,Rt=re.superNextIcon,st=Rt===void 0?"\xBB":Rt,Kt=re.onSuperPrev,Zt=re.onSuperNext,Et=re.onPrev,Vt=re.onNext,$e=re.children,Yt=y.useContext(h),Nt=Yt.hideNextBtn,un=Yt.hidePrevBtn;return y.createElement("div",{className:Le},Kt&&y.createElement("button",{type:"button",onClick:Kt,tabIndex:-1,className:"".concat(Le,"-super-prev-btn"),style:un?l:{}},xt),Et&&y.createElement("button",{type:"button",onClick:Et,tabIndex:-1,className:"".concat(Le,"-prev-btn"),style:un?l:{}},ke),y.createElement("div",{className:"".concat(Le,"-view")},$e),Vt&&y.createElement("button",{type:"button",onClick:Vt,tabIndex:-1,className:"".concat(Le,"-next-btn"),style:Nt?l:{}},tt),Zt&&y.createElement("button",{type:"button",onClick:Zt,tabIndex:-1,className:"".concat(Le,"-super-next-btn"),style:Nt?l:{}},st))}var s=n;function d(re){var Le=y.useContext(h),Xe=Le.hideHeader;if(Xe)return null;var ke=re.prefixCls,dt=re.generateConfig,tt=re.locale,ht=re.value,xt=re.format,Rt="".concat(ke,"-header");return y.createElement(s,{prefixCls:Rt},ht?dt.locale.format(tt.locale,ht,xt):"\xA0")}var E=d,D=M("YrtM"),T=M("KQm4"),k=new Map;function w(re,Le,Xe){if(k.get(re)&&cancelAnimationFrame(k.get(re)),Xe<=0){k.set(re,requestAnimationFrame(function(){re.scrollTop=Le}));return}var ke=Le-re.scrollTop,dt=ke/Xe*10;k.set(re,requestAnimationFrame(function(){re.scrollTop+=dt,re.scrollTop!==Le&&w(re,Le,Xe-10)}))}function v(re,Le){var Xe=Le.onLeftRight,ke=Le.onCtrlLeftRight,dt=Le.onUpDown,tt=Le.onPageUpDown,ht=Le.onEnter,xt=re.which,Rt=re.ctrlKey,st=re.metaKey;switch(xt){case a.a.LEFT:if(Rt||st){if(ke)return ke(-1),!0}else if(Xe)return Xe(-1),!0;break;case a.a.RIGHT:if(Rt||st){if(ke)return ke(1),!0}else if(Xe)return Xe(1),!0;break;case a.a.UP:if(dt)return dt(-1),!0;break;case a.a.DOWN:if(dt)return dt(1),!0;break;case a.a.PAGE_UP:if(tt)return tt(-1),!0;break;case a.a.PAGE_DOWN:if(tt)return tt(1),!0;break;case a.a.ENTER:if(ht)return ht(),!0;break}return!1}function c(re,Le,Xe,ke){var dt=re;if(!dt)switch(Le){case"time":dt=ke?"hh:mm:ss a":"HH:mm:ss";break;case"week":dt="gggg-wo";break;case"month":dt="YYYY-MM";break;case"quarter":dt="YYYY-[Q]Q";break;case"year":dt="YYYY";break;default:dt=Xe?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return dt}function f(re,Le){var Xe=re==="time"?8:10;return Math.max(Xe,Le.length)+2}var m=null,_=new Set;function x(re){return!m&&typeof window!="undefined"&&window.addEventListener&&(m=function(Xe){Object(T.a)(_).forEach(function(ke){ke(Xe)})},window.addEventListener("mousedown",m)),_.add(re),function(){_.delete(re),_.size===0&&(window.removeEventListener("mousedown",m),m=null)}}var g=function(Le){return Le==="month"||Le==="date"?"year":Le},j=function(Le){return Le==="date"?"month":Le},U=function(Le){return Le==="month"||Le==="date"?"quarter":Le},R=function(Le){return Le==="date"?"week":Le},W={year:g,month:j,quarter:U,week:R,time:null,date:null};function H(re,Le){return re.some(function(Xe){return Xe&&Xe.contains(Le)})}function L(re){var Le=re.prefixCls,Xe=re.units,ke=re.onSelect,dt=re.value,tt=re.active,ht=re.hideDisabledOptions,xt="".concat(Le,"-cell"),Rt=y.useContext(h),st=Rt.open,Kt=y.useRef(null),Zt=y.useRef(new Map);return y.useLayoutEffect(function(){var Et=Zt.current.get(dt);Et&&st!==!1&&w(Kt.current,Et.offsetTop,120)},[dt]),y.useLayoutEffect(function(){if(st){var Et=Zt.current.get(dt);Et&&w(Kt.current,Et.offsetTop,0)}},[st]),y.createElement("ul",{className:b()("".concat(Le,"-column"),Object(S.a)({},"".concat(Le,"-column-active"),tt)),ref:Kt,style:{position:"relative"}},Xe.map(function(Et){var Vt;return ht&&Et.disabled?null:y.createElement("li",{key:Et.value,ref:function(Yt){Zt.current.set(Et.value,Yt)},className:b()(xt,(Vt={},Object(S.a)(Vt,"".concat(xt,"-disabled"),Et.disabled),Object(S.a)(Vt,"".concat(xt,"-selected"),dt===Et.value),Vt)),onClick:function(){if(Et.disabled)return;ke(Et.value)}},y.createElement("div",{className:"".concat(xt,"-inner")},Et.label))}))}var G=L;function z(re,Le){for(var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",ke=String(re);ke.length<Le;)ke="".concat(Xe).concat(re);return ke}var J=function(){for(var Le=arguments.length,Xe=new Array(Le),ke=0;ke<Le;ke++)Xe[ke]=arguments[ke];return Xe};function te(re){return re==null?[]:Array.isArray(re)?re:[re]}function _e(re){var Le={};return Object.keys(re).forEach(function(Xe){(Xe.substr(0,5)==="data-"||Xe.substr(0,5)==="aria-"||Xe==="role"||Xe==="name")&&Xe.substr(0,7)!=="data-__"&&(Le[Xe]=re[Xe])}),Le}function ce(re,Le){return re?re[Le]:null}function xe(re,Le,Xe){var ke=[ce(re,0),ce(re,1)];return ke[Xe]=typeof Le=="function"?Le(ke[Xe]):Le,!ke[0]&&!ke[1]?null:ke}function Te(re,Le,Xe,ke,dt){var tt=re.setHour(Le,Xe);return tt=re.setMinute(tt,ke),tt=re.setSecond(tt,dt),tt}function je(re,Le,Xe,ke,dt,tt){var ht=Math.floor(re/ke)*ke;if(ht<re)return[ht,60-dt,60-tt];var xt=Math.floor(Le/dt)*dt;if(xt<Le)return[ht,xt,60-tt];var Rt=Math.floor(Xe/tt)*tt;return[ht,xt,Rt]}function Ce(re,Le){if(re.length!==Le.length)return!0;for(var Xe=0;Xe<re.length;Xe+=1)if(re[Xe].disabled!==Le[Xe].disabled)return!0;return!1}function Z(re,Le,Xe,ke){for(var dt=[],tt=re;tt<=Le;tt+=Xe)dt.push({label:z(tt,2),value:tt,disabled:(ke||[]).includes(tt)});return dt}function K(re){var Le=re.generateConfig,Xe=re.prefixCls,ke=re.operationRef,dt=re.activeColumnIndex,tt=re.value,ht=re.showHour,xt=re.showMinute,Rt=re.showSecond,st=re.use12Hours,Kt=re.hourStep,Zt=Kt===void 0?1:Kt,Et=re.minuteStep,Vt=Et===void 0?1:Et,$e=re.secondStep,Yt=$e===void 0?1:$e,Nt=re.disabledHours,un=re.disabledMinutes,yn=re.disabledSeconds,Cn=re.hideDisabledOptions,wt=re.onSelect,kt=[],mn="".concat(Xe,"-content"),dn="".concat(Xe,"-time-panel"),vt,St=tt?Le.getHour(tt):-1,Ot=tt?Le.getMinute(tt):-1,yt=tt?Le.getSecond(tt):-1,ft=function(Nn,Kn,vr,Rr){var Br=tt||Le.getNow(),sa=Math.max(0,Kn),la=Math.max(0,vr),ca=Math.max(0,Rr);return Br=Te(Le,Br,!st||!Nn?sa:sa+12,la,ca),Br},gn=Z(0,23,Zt,Nt&&Nt()),Bt=Object(D.a)(function(){return gn},gn,Ce);st&&(vt=St>=12,St%=12);var vn=y.useMemo(function(){if(!st)return[!1,!1];var Mn=[!0,!0];return Bt.forEach(function(Nn){var Kn=Nn.disabled,vr=Nn.value;if(Kn)return;vr>=12?Mn[1]=!1:Mn[0]=!1}),Mn},[st,Bt]),qt=Object(P.a)(vn,2),Ut=qt[0],fn=qt[1],In=y.useMemo(function(){return st?Bt.filter(vt?function(Mn){return Mn.value>=12}:function(Mn){return Mn.value<12}).map(function(Mn){var Nn=Mn.value%12,Kn=Nn===0?"12":z(Nn,2);return Object(C.a)(Object(C.a)({},Mn),{},{label:Kn,value:Nn})}):Bt},[st,Bt]),ur=Z(0,59,Vt,un&&un(St)),Ln=Z(0,59,Yt,yn&&yn(St,Ot));ke.current={onUpDown:function(Nn){var Kn=kt[dt];if(Kn)for(var vr=Kn.units.findIndex(function(la){return la.value===Kn.value}),Rr=Kn.units.length,Br=1;Br<Rr;Br+=1){var sa=Kn.units[(vr+Nn*Br+Rr)%Rr];if(sa.disabled!==!0){Kn.onSelect(sa.value);break}}}};function Tr(Mn,Nn,Kn,vr,Rr){Mn!==!1&&kt.push({node:y.cloneElement(Nn,{prefixCls:dn,value:Kn,active:dt===kt.length,onSelect:Rr,units:vr,hideDisabledOptions:Cn}),onSelect:Rr,value:Kn,units:vr})}Tr(ht,y.createElement(G,{key:"hour"}),St,In,function(Mn){wt(ft(vt,Mn,Ot,yt),"mouse")}),Tr(xt,y.createElement(G,{key:"minute"}),Ot,ur,function(Mn){wt(ft(vt,St,Mn,yt),"mouse")}),Tr(Rt,y.createElement(G,{key:"second"}),yt,Ln,function(Mn){wt(ft(vt,St,Ot,Mn),"mouse")});var Ur=-1;return typeof vt=="boolean"&&(Ur=vt?1:0),Tr(st===!0,y.createElement(G,{key:"12hours"}),Ur,[{label:"AM",value:0,disabled:Ut},{label:"PM",value:1,disabled:fn}],function(Mn){wt(ft(!!Mn,St,Ot,yt),"mouse")}),y.createElement("div",{className:mn},kt.map(function(Mn){var Nn=Mn.node;return Nn}))}var V=K,$=function(Le){return Le.filter(function(Xe){return Xe!==!1}).length};function q(re){var Le=re.generateConfig,Xe=re.format,ke=Xe===void 0?"HH:mm:ss":Xe,dt=re.prefixCls,tt=re.active,ht=re.operationRef,xt=re.showHour,Rt=re.showMinute,st=re.showSecond,Kt=re.use12Hours,Zt=Kt===void 0?!1:Kt,Et=re.onSelect,Vt=re.value,$e="".concat(dt,"-time-panel"),Yt=y.useRef(),Nt=y.useState(-1),un=Object(P.a)(Nt,2),yn=un[0],Cn=un[1],wt=$([xt,Rt,st,Zt]);return ht.current={onKeyDown:function(mn){return v(mn,{onLeftRight:function(vt){Cn((yn+vt+wt)%wt)},onUpDown:function(vt){yn===-1?Cn(0):Yt.current&&Yt.current.onUpDown(vt)},onEnter:function(){Et(Vt||Le.getNow(),"key"),Cn(-1)}})},onBlur:function(){Cn(-1)}},y.createElement("div",{className:b()($e,Object(S.a)({},"".concat($e,"-active"),tt))},y.createElement(E,Object.assign({},re,{format:ke,prefixCls:dt})),y.createElement(V,Object.assign({},re,{prefixCls:dt,activeColumnIndex:yn,operationRef:Yt})))}var Q=q,ge=7;function Oe(re,Le){return!re&&!Le?!0:!re||!Le?!1:void 0}function Ye(re,Le,Xe){var ke=Oe(Le,Xe);if(typeof ke=="boolean")return ke;var dt=Math.floor(re.getYear(Le)/10),tt=Math.floor(re.getYear(Xe)/10);return dt===tt}function le(re,Le,Xe){var ke=Oe(Le,Xe);return typeof ke=="boolean"?ke:re.getYear(Le)===re.getYear(Xe)}function Ee(re,Le){var Xe=Math.floor(re.getMonth(Le)/3);return Xe+1}function Re(re,Le,Xe){var ke=Oe(Le,Xe);return typeof ke=="boolean"?ke:le(re,Le,Xe)&&Ee(re,Le)===Ee(re,Xe)}function He(re,Le,Xe){var ke=Oe(Le,Xe);return typeof ke=="boolean"?ke:le(re,Le,Xe)&&re.getMonth(Le)===re.getMonth(Xe)}function et(re,Le,Xe){var ke=Oe(Le,Xe);return typeof ke=="boolean"?ke:re.getYear(Le)===re.getYear(Xe)&&re.getMonth(Le)===re.getMonth(Xe)&&re.getDate(Le)===re.getDate(Xe)}function ut(re,Le,Xe){var ke=Oe(Le,Xe);return typeof ke=="boolean"?ke:re.getHour(Le)===re.getHour(Xe)&&re.getMinute(Le)===re.getMinute(Xe)&&re.getSecond(Le)===re.getSecond(Xe)}function Dt(re,Le,Xe,ke){var dt=Oe(Xe,ke);return typeof dt=="boolean"?dt:re.locale.getWeek(Le,Xe)===re.locale.getWeek(Le,ke)}function We(re,Le,Xe){return et(re,Le,Xe)&&ut(re,Le,Xe)}function Mt(re,Le,Xe,ke){return!Le||!Xe||!ke?!1:!et(re,Le,ke)&&!et(re,Xe,ke)&&re.isAfter(ke,Le)&&re.isAfter(Xe,ke)}function Wt(re,Le,Xe){var ke=Le.locale.getWeekFirstDay(re),dt=Le.setDate(Xe,1),tt=Le.getWeekDay(dt),ht=Le.addDate(dt,ke-tt);return Le.getMonth(ht)===Le.getMonth(Xe)&&Le.getDate(ht)>1&&(ht=Le.addDate(ht,-7)),ht}function Ne(re,Le,Xe){var ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(Le){case"year":return Xe.addYear(re,ke*10);case"quarter":case"month":return Xe.addYear(re,ke);default:return Xe.addMonth(re,ke)}}var Pe=y.createContext({}),it=Pe;function gt(re){var Le=re.cellPrefixCls,Xe=re.generateConfig,ke=re.rangedValue,dt=re.hoverRangedValue,tt=re.isInView,ht=re.isSameCell,xt=re.offsetCell,Rt=re.today,st=re.value;function Kt(Zt){var Et,Vt=xt(Zt,-1),$e=xt(Zt,1),Yt=ce(ke,0),Nt=ce(ke,1),un=ce(dt,0),yn=ce(dt,1),Cn=Mt(Xe,un,yn,Zt);function wt(Ot){return ht(Yt,Ot)}function kt(Ot){return ht(Nt,Ot)}var mn=ht(un,Zt),dn=ht(yn,Zt),vt=(Cn||dn)&&(!tt(Vt)||kt(Vt)),St=(Cn||mn)&&(!tt($e)||wt($e));return Et={},Object(S.a)(Et,"".concat(Le,"-in-view"),tt(Zt)),Object(S.a)(Et,"".concat(Le,"-in-range"),Mt(Xe,Yt,Nt,Zt)),Object(S.a)(Et,"".concat(Le,"-range-start"),wt(Zt)),Object(S.a)(Et,"".concat(Le,"-range-end"),kt(Zt)),Object(S.a)(Et,"".concat(Le,"-range-start-single"),wt(Zt)&&!Nt),Object(S.a)(Et,"".concat(Le,"-range-end-single"),kt(Zt)&&!Yt),Object(S.a)(Et,"".concat(Le,"-range-start-near-hover"),wt(Zt)&&(ht(Vt,un)||Mt(Xe,un,yn,Vt))),Object(S.a)(Et,"".concat(Le,"-range-end-near-hover"),kt(Zt)&&(ht($e,yn)||Mt(Xe,un,yn,$e))),Object(S.a)(Et,"".concat(Le,"-range-hover"),Cn),Object(S.a)(Et,"".concat(Le,"-range-hover-start"),mn),Object(S.a)(Et,"".concat(Le,"-range-hover-end"),dn),Object(S.a)(Et,"".concat(Le,"-range-hover-edge-start"),vt),Object(S.a)(Et,"".concat(Le,"-range-hover-edge-end"),St),Object(S.a)(Et,"".concat(Le,"-range-hover-edge-start-near-range"),vt&&ht(Vt,Nt)),Object(S.a)(Et,"".concat(Le,"-range-hover-edge-end-near-range"),St&&ht($e,Yt)),Object(S.a)(Et,"".concat(Le,"-today"),ht(Rt,Zt)),Object(S.a)(Et,"".concat(Le,"-selected"),ht(st,Zt)),Et}return Kt}function fe(re){for(var Le=re.prefixCls,Xe=re.disabledDate,ke=re.onSelect,dt=re.rowNum,tt=re.colNum,ht=re.prefixColumn,xt=re.rowClassName,Rt=re.baseDate,st=re.getCellClassName,Kt=re.getCellText,Zt=re.getCellNode,Et=re.getCellDate,Vt=re.titleCell,$e=re.headerCells,Yt=y.useContext(h),Nt=Yt.onDateMouseEnter,un=Yt.onDateMouseLeave,yn="".concat(Le,"-cell"),Cn=[],wt=0;wt<dt;wt+=1){for(var kt=[],mn=void 0,dn=function(Ot){var yt=wt*tt+Ot,ft=Et(Rt,yt),gn=Xe&&Xe(ft);Ot===0&&(mn=ft,ht&&kt.push(ht(mn))),kt.push(y.createElement("td",{key:Ot,title:Vt&&Vt(ft),className:b()(yn,Object(C.a)(Object(S.a)({},"".concat(yn,"-disabled"),gn),st(ft))),onClick:function(){gn||ke(ft)},onMouseEnter:function(){!gn&&Nt&&Nt(ft)},onMouseLeave:function(){!gn&&un&&un(ft)}},Zt?Zt(ft):y.createElement("div",{className:"".concat(yn,"-inner")},Kt(ft))))},vt=0;vt<tt;vt+=1)dn(vt);Cn.push(y.createElement("tr",{key:wt,className:xt&&xt(mn)},kt))}return y.createElement("div",{className:"".concat(Le,"-body")},y.createElement("table",{className:"".concat(Le,"-content")},$e&&y.createElement("thead",null,y.createElement("tr",null,$e)),y.createElement("tbody",null,Cn)))}function ae(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.prefixColumn,dt=re.locale,tt=re.rowCount,ht=re.viewDate,xt=re.value,Rt=re.dateRender,st=y.useContext(it),Kt=st.rangedValue,Zt=st.hoverRangedValue,Et=Wt(dt.locale,Xe,ht),Vt="".concat(Le,"-cell"),$e=Xe.locale.getWeekFirstDay(dt.locale),Yt=Xe.getNow(),Nt=[],un=dt.shortWeekDays||(Xe.locale.getShortWeekDays?Xe.locale.getShortWeekDays(dt.locale):[]);ke&&Nt.push(y.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var yn=0;yn<ge;yn+=1)Nt.push(y.createElement("th",{key:yn},un[(yn+$e)%ge]));var Cn=gt({cellPrefixCls:Vt,today:Yt,value:xt,generateConfig:Xe,rangedValue:ke?null:Kt,hoverRangedValue:ke?null:Zt,isSameCell:function(mn,dn){return et(Xe,mn,dn)},isInView:function(mn){return He(Xe,mn,ht)},offsetCell:function(mn,dn){return Xe.addDate(mn,dn)}}),wt=Rt?function(kt){return Rt(kt,Yt)}:void 0;return y.createElement(fe,Object.assign({},re,{rowNum:tt,colNum:ge,baseDate:Et,getCellNode:wt,getCellText:Xe.getDate,getCellClassName:Cn,getCellDate:Xe.addDate,titleCell:function(mn){return Xe.locale.format(dt.locale,mn,"YYYY-MM-DD")},headerCells:Nt}))}var se=ae;function de(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.locale,dt=re.viewDate,tt=re.onNextMonth,ht=re.onPrevMonth,xt=re.onNextYear,Rt=re.onPrevYear,st=re.onYearClick,Kt=re.onMonthClick,Zt=y.useContext(h),Et=Zt.hideHeader;if(Et)return null;var Vt="".concat(Le,"-header"),$e=ke.shortMonths||(Xe.locale.getShortMonths?Xe.locale.getShortMonths(ke.locale):[]),Yt=Xe.getMonth(dt),Nt=y.createElement("button",{type:"button",key:"year",onClick:st,tabIndex:-1,className:"".concat(Le,"-year-btn")},Xe.locale.format(ke.locale,dt,ke.yearFormat)),un=y.createElement("button",{type:"button",key:"month",onClick:Kt,tabIndex:-1,className:"".concat(Le,"-month-btn")},ke.monthFormat?Xe.locale.format(ke.locale,dt,ke.monthFormat):$e[Yt]),yn=ke.monthBeforeYear?[un,Nt]:[Nt,un];return y.createElement(s,Object.assign({},re,{prefixCls:Vt,onSuperPrev:Rt,onPrev:ht,onNext:tt,onSuperNext:xt}),yn)}var ve=de,ie=6;function oe(re){var Le=re.prefixCls,Xe=re.panelName,ke=Xe===void 0?"date":Xe,dt=re.keyboardConfig,tt=re.active,ht=re.operationRef,xt=re.generateConfig,Rt=re.value,st=re.viewDate,Kt=re.onViewDateChange,Zt=re.onPanelChange,Et=re.onSelect,Vt="".concat(Le,"-").concat(ke,"-panel");ht.current={onKeyDown:function(un){return v(un,Object(C.a)({onLeftRight:function(Cn){Et(xt.addDate(Rt||st,Cn),"key")},onCtrlLeftRight:function(Cn){Et(xt.addYear(Rt||st,Cn),"key")},onUpDown:function(Cn){Et(xt.addDate(Rt||st,Cn*ge),"key")},onPageUpDown:function(Cn){Et(xt.addMonth(Rt||st,Cn),"key")}},dt))}};var $e=function(un){var yn=xt.addYear(st,un);Kt(yn),Zt(null,yn)},Yt=function(un){var yn=xt.addMonth(st,un);Kt(yn),Zt(null,yn)};return y.createElement("div",{className:b()(Vt,Object(S.a)({},"".concat(Vt,"-active"),tt))},y.createElement(ve,Object.assign({},re,{prefixCls:Le,value:Rt,viewDate:st,onPrevYear:function(){$e(-1)},onNextYear:function(){$e(1)},onPrevMonth:function(){Yt(-1)},onNextMonth:function(){Yt(1)},onMonthClick:function(){Zt("month",st)},onYearClick:function(){Zt("year",st)}})),y.createElement(se,Object.assign({},re,{onSelect:function(un){return Et(un,"mouse")},prefixCls:Le,value:Rt,viewDate:st,rowCount:ie})))}var pe=oe;function we(re,Le,Xe){if(!Xe)return Le;var ke=Le;return ke=re.setHour(ke,re.getHour(Xe)),ke=re.setMinute(ke,re.getMinute(Xe)),ke=re.setSecond(ke,re.getSecond(Xe)),ke}var Ae=J("date","time");function Me(re){var Le=re.prefixCls,Xe=re.operationRef,ke=re.generateConfig,dt=re.value,tt=re.defaultValue,ht=re.disabledTime,xt=re.showTime,Rt=re.onSelect,st="".concat(Le,"-datetime-panel"),Kt=y.useState(null),Zt=Object(P.a)(Kt,2),Et=Zt[0],Vt=Zt[1],$e=y.useRef({}),Yt=y.useRef({}),Nt=Object(p.a)(xt)==="object"?Object(C.a)({},xt):{};function un(kt){var mn=Ae.indexOf(Et)+kt,dn=Ae[mn]||null;return dn}var yn=function(mn){Yt.current.onBlur&&Yt.current.onBlur(mn),Vt(null)};Xe.current={onKeyDown:function(mn){if(mn.which===a.a.TAB){var dn=un(mn.shiftKey?-1:1);return Vt(dn),dn&&mn.preventDefault(),!0}if(Et){var vt=Et==="date"?$e:Yt;return vt.current&&vt.current.onKeyDown&&vt.current.onKeyDown(mn),!0}return[a.a.LEFT,a.a.RIGHT,a.a.UP,a.a.DOWN].includes(mn.which)?(Vt("date"),!0):!1},onBlur:yn,onClose:yn};var Cn=function(mn,dn){var vt=mn;dn==="date"&&!dt&&Nt.defaultValue?(vt=ke.setHour(vt,ke.getHour(Nt.defaultValue)),vt=ke.setMinute(vt,ke.getMinute(Nt.defaultValue)),vt=ke.setSecond(vt,ke.getSecond(Nt.defaultValue))):dn==="time"&&!dt&&tt&&(vt=ke.setYear(vt,ke.getYear(tt)),vt=ke.setMonth(vt,ke.getMonth(tt)),vt=ke.setDate(vt,ke.getDate(tt))),Rt&&Rt(vt,"mouse")},wt=ht?ht(dt||null):{};return y.createElement("div",{className:b()(st,Object(S.a)({},"".concat(st,"-active"),Et))},y.createElement(pe,Object.assign({},re,{operationRef:$e,active:Et==="date",onSelect:function(mn){Cn(we(ke,mn,xt&&Object(p.a)(xt)==="object"?xt.defaultValue:null),"date")}})),y.createElement(Q,Object.assign({},re,{format:void 0},Nt,wt,{defaultValue:void 0,operationRef:Yt,active:Et==="time",onSelect:function(mn){Cn(mn,"time")}})))}var rt=Me;function Pt(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.locale,dt=re.value,tt="".concat(Le,"-cell"),ht=function(Kt){return y.createElement("td",{key:"week",className:b()(tt,"".concat(tt,"-week"))},Xe.locale.getWeek(ke.locale,Kt))},xt="".concat(Le,"-week-panel-row"),Rt=function(Kt){return b()(xt,Object(S.a)({},"".concat(xt,"-selected"),Dt(Xe,ke.locale,dt,Kt)))};return y.createElement(pe,Object.assign({},re,{panelName:"week",prefixColumn:ht,rowClassName:Rt,keyboardConfig:{onLeftRight:null}}))}var Xt=Pt;function lt(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.locale,dt=re.viewDate,tt=re.onNextYear,ht=re.onPrevYear,xt=re.onYearClick,Rt=y.useContext(h),st=Rt.hideHeader;if(st)return null;var Kt="".concat(Le,"-header");return y.createElement(s,Object.assign({},re,{prefixCls:Kt,onSuperPrev:ht,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:xt,className:"".concat(Le,"-year-btn")},Xe.locale.format(ke.locale,dt,ke.yearFormat)))}var zt=lt,mt=3,_t=4;function ot(re){var Le=re.prefixCls,Xe=re.locale,ke=re.value,dt=re.viewDate,tt=re.generateConfig,ht=re.monthCellRender,xt=y.useContext(it),Rt=xt.rangedValue,st=xt.hoverRangedValue,Kt="".concat(Le,"-cell"),Zt=gt({cellPrefixCls:Kt,value:ke,generateConfig:tt,rangedValue:Rt,hoverRangedValue:st,isSameCell:function(Nt,un){return He(tt,Nt,un)},isInView:function(){return!0},offsetCell:function(Nt,un){return tt.addMonth(Nt,un)}}),Et=Xe.shortMonths||(tt.locale.getShortMonths?tt.locale.getShortMonths(Xe.locale):[]),Vt=tt.setMonth(dt,0),$e=ht?function(Yt){return ht(Yt,Xe)}:void 0;return y.createElement(fe,Object.assign({},re,{rowNum:_t,colNum:mt,baseDate:Vt,getCellNode:$e,getCellText:function(Nt){return Xe.monthFormat?tt.locale.format(Xe.locale,Nt,Xe.monthFormat):Et[tt.getMonth(Nt)]},getCellClassName:Zt,getCellDate:tt.addMonth,titleCell:function(Nt){return tt.locale.format(Xe.locale,Nt,"YYYY-MM")}}))}var Se=ot;function Ue(re){var Le=re.prefixCls,Xe=re.operationRef,ke=re.onViewDateChange,dt=re.generateConfig,tt=re.value,ht=re.viewDate,xt=re.onPanelChange,Rt=re.onSelect,st="".concat(Le,"-month-panel");Xe.current={onKeyDown:function(Et){return v(Et,{onLeftRight:function($e){Rt(dt.addMonth(tt||ht,$e),"key")},onCtrlLeftRight:function($e){Rt(dt.addYear(tt||ht,$e),"key")},onUpDown:function($e){Rt(dt.addMonth(tt||ht,$e*mt),"key")},onEnter:function(){xt("date",tt||ht)}})}};var Kt=function(Et){var Vt=dt.addYear(ht,Et);ke(Vt),xt(null,Vt)};return y.createElement("div",{className:st},y.createElement(zt,Object.assign({},re,{prefixCls:Le,onPrevYear:function(){Kt(-1)},onNextYear:function(){Kt(1)},onYearClick:function(){xt("year",ht)}})),y.createElement(Se,Object.assign({},re,{prefixCls:Le,onSelect:function(Et){Rt(Et,"mouse"),xt("date",Et)}})))}var At=Ue;function pt(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.locale,dt=re.viewDate,tt=re.onNextYear,ht=re.onPrevYear,xt=re.onYearClick,Rt=y.useContext(h),st=Rt.hideHeader;if(st)return null;var Kt="".concat(Le,"-header");return y.createElement(s,Object.assign({},re,{prefixCls:Kt,onSuperPrev:ht,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:xt,className:"".concat(Le,"-year-btn")},Xe.locale.format(ke.locale,dt,ke.yearFormat)))}var jt=pt,Gt=4,Ze=1;function at(re){var Le=re.prefixCls,Xe=re.locale,ke=re.value,dt=re.viewDate,tt=re.generateConfig,ht=y.useContext(it),xt=ht.rangedValue,Rt=ht.hoverRangedValue,st="".concat(Le,"-cell"),Kt=gt({cellPrefixCls:st,value:ke,generateConfig:tt,rangedValue:xt,hoverRangedValue:Rt,isSameCell:function(Vt,$e){return Re(tt,Vt,$e)},isInView:function(){return!0},offsetCell:function(Vt,$e){return tt.addMonth(Vt,$e*3)}}),Zt=tt.setDate(tt.setMonth(dt,0),1);return y.createElement(fe,Object.assign({},re,{rowNum:Ze,colNum:Gt,baseDate:Zt,getCellText:function(Vt){return tt.locale.format(Xe.locale,Vt,Xe.quarterFormat||"[Q]Q")},getCellClassName:Kt,getCellDate:function(Vt,$e){return tt.addMonth(Vt,$e*3)},titleCell:function(Vt){return tt.locale.format(Xe.locale,Vt,"YYYY-[Q]Q")}}))}var Tt=at;function Ht(re){var Le=re.prefixCls,Xe=re.operationRef,ke=re.onViewDateChange,dt=re.generateConfig,tt=re.value,ht=re.viewDate,xt=re.onPanelChange,Rt=re.onSelect,st="".concat(Le,"-quarter-panel");Xe.current={onKeyDown:function(Et){return v(Et,{onLeftRight:function($e){Rt(dt.addMonth(tt||ht,$e*3),"key")},onCtrlLeftRight:function($e){Rt(dt.addYear(tt||ht,$e),"key")},onUpDown:function($e){Rt(dt.addYear(tt||ht,$e),"key")}})}};var Kt=function(Et){var Vt=dt.addYear(ht,Et);ke(Vt),xt(null,Vt)};return y.createElement("div",{className:st},y.createElement(jt,Object.assign({},re,{prefixCls:Le,onPrevYear:function(){Kt(-1)},onNextYear:function(){Kt(1)},onYearClick:function(){xt("year",ht)}})),y.createElement(Tt,Object.assign({},re,{prefixCls:Le,onSelect:function(Et){Rt(Et,"mouse")}})))}var Jt=Ht;function on(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.viewDate,dt=re.onPrevDecade,tt=re.onNextDecade,ht=re.onDecadeClick,xt=y.useContext(h),Rt=xt.hideHeader;if(Rt)return null;var st="".concat(Le,"-header"),Kt=Xe.getYear(ke),Zt=Math.floor(Kt/xn)*xn,Et=Zt+xn-1;return y.createElement(s,Object.assign({},re,{prefixCls:st,onSuperPrev:dt,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:ht,className:"".concat(Le,"-decade-btn")},Zt,"-",Et))}var Qn=on,Hn=3,nn=4;function Un(re){var Le=re.prefixCls,Xe=re.value,ke=re.viewDate,dt=re.locale,tt=re.generateConfig,ht=y.useContext(it),xt=ht.rangedValue,Rt=ht.hoverRangedValue,st="".concat(Le,"-cell"),Kt=tt.getYear(ke),Zt=Math.floor(Kt/xn)*xn,Et=Zt+xn-1,Vt=tt.setYear(ke,Zt-Math.ceil((Hn*nn-xn)/2)),$e=function(un){var yn=tt.getYear(un);return Zt<=yn&&yn<=Et},Yt=gt({cellPrefixCls:st,value:Xe,generateConfig:tt,rangedValue:xt,hoverRangedValue:Rt,isSameCell:function(un,yn){return le(tt,un,yn)},isInView:$e,offsetCell:function(un,yn){return tt.addYear(un,yn)}});return y.createElement(fe,Object.assign({},re,{rowNum:nn,colNum:Hn,baseDate:Vt,getCellText:tt.getYear,getCellClassName:Yt,getCellDate:tt.addYear,titleCell:function(un){return tt.locale.format(dt.locale,un,"YYYY")}}))}var ar=Un,xn=10;function zn(re){var Le=re.prefixCls,Xe=re.operationRef,ke=re.onViewDateChange,dt=re.generateConfig,tt=re.value,ht=re.viewDate,xt=re.sourceMode,Rt=re.onSelect,st=re.onPanelChange,Kt="".concat(Le,"-year-panel");Xe.current={onKeyDown:function(Vt){return v(Vt,{onLeftRight:function(Yt){Rt(dt.addYear(tt||ht,Yt),"key")},onCtrlLeftRight:function(Yt){Rt(dt.addYear(tt||ht,Yt*xn),"key")},onUpDown:function(Yt){Rt(dt.addYear(tt||ht,Yt*Hn),"key")},onEnter:function(){st(xt==="date"?"date":"month",tt||ht)}})}};var Zt=function(Vt){var $e=dt.addYear(ht,Vt*10);ke($e),st(null,$e)};return y.createElement("div",{className:Kt},y.createElement(Qn,Object.assign({},re,{prefixCls:Le,onPrevDecade:function(){Zt(-1)},onNextDecade:function(){Zt(1)},onDecadeClick:function(){st("decade",ht)}})),y.createElement(ar,Object.assign({},re,{prefixCls:Le,onSelect:function(Vt){st(xt==="date"?"date":"month",Vt),Rt(Vt,"mouse")}})))}var nr=zn;function Lr(re){var Le=re.prefixCls,Xe=re.generateConfig,ke=re.viewDate,dt=re.onPrevDecades,tt=re.onNextDecades,ht=y.useContext(h),xt=ht.hideHeader;if(xt)return null;var Rt="".concat(Le,"-header"),st=Xe.getYear(ke),Kt=Math.floor(st/Qr)*Qr,Zt=Kt+Qr-1;return y.createElement(s,Object.assign({},re,{prefixCls:Rt,onSuperPrev:dt,onSuperNext:tt}),Kt,"-",Zt)}var Cr=Lr,en=3,Yn=4;function na(re){var Le=$r-1,Xe=re.prefixCls,ke=re.viewDate,dt=re.generateConfig,tt=re.disabledDate,ht="".concat(Xe,"-cell"),xt=dt.getYear(ke),Rt=Math.floor(xt/$r)*$r,st=Math.floor(xt/Qr)*Qr,Kt=st+Qr-1,Zt=dt.setYear(ke,st-Math.ceil((en*Yn*$r-Qr)/2)),Et=function($e){var Yt,Nt=tt&&tt($e),un=dt.getYear($e),yn=un+Le;return Yt={},Object(S.a)(Yt,"".concat(ht,"-disabled"),Nt),Object(S.a)(Yt,"".concat(ht,"-in-view"),st<=un&&yn<=Kt),Object(S.a)(Yt,"".concat(ht,"-selected"),un===Rt),Yt};return y.createElement(fe,Object.assign({},re,{rowNum:Yn,colNum:en,baseDate:Zt,getCellText:function($e){var Yt=dt.getYear($e);return"".concat(Yt,"-").concat(Yt+Le)},getCellClassName:Et,getCellDate:function($e,Yt){return dt.addYear($e,Yt*$r)}}))}var Ea=na,$r=10,Qr=$r*10;function Jr(re){var Le=re.prefixCls,Xe=re.onViewDateChange,ke=re.generateConfig,dt=re.viewDate,tt=re.operationRef,ht=re.onSelect,xt=re.onPanelChange,Rt="".concat(Le,"-decade-panel");tt.current={onKeyDown:function(Et){return v(Et,{onLeftRight:function($e){ht(ke.addYear(dt,$e*$r),"key")},onCtrlLeftRight:function($e){ht(ke.addYear(dt,$e*Qr),"key")},onUpDown:function($e){ht(ke.addYear(dt,$e*$r*en),"key")},onEnter:function(){xt("year",dt)}})}};var st=function(Et){var Vt=ke.addYear(dt,Et*Qr);Xe(Vt),xt(null,Vt)},Kt=function(Et){ht(Et,"mouse"),xt("year",Et)};return y.createElement("div",{className:Rt},y.createElement(Cr,Object.assign({},re,{prefixCls:Le,onPrevDecades:function(){st(-1)},onNextDecades:function(){st(1)}})),y.createElement(Ea,Object.assign({},re,{prefixCls:Le,onSelect:Kt})))}var $n=Jr;function ma(re,Le,Xe){return Xe?y.createElement("div",{className:"".concat(re,"-footer-extra")},Xe(Le)):null}function sn(re){var Le=re.prefixCls,Xe=re.rangeList,ke=Xe===void 0?[]:Xe,dt=re.components,tt=dt===void 0?{}:dt,ht=re.needConfirmButton,xt=re.onNow,Rt=re.onOk,st=re.okDisabled,Kt=re.showNow,Zt=re.locale,Et,Vt;if(ke.length){var $e=tt.rangeItem||"span";Et=y.createElement(y.Fragment,null,ke.map(function(Nt){var un=Nt.label,yn=Nt.onClick,Cn=Nt.onMouseEnter,wt=Nt.onMouseLeave;return y.createElement("li",{key:un,className:"".concat(Le,"-preset")},y.createElement($e,{onClick:yn,onMouseEnter:Cn,onMouseLeave:wt},un))}))}if(ht){var Yt=tt.button||"button";xt&&!Et&&Kt!==!1&&(Et=y.createElement("li",{className:"".concat(Le,"-now")},y.createElement("a",{className:"".concat(Le,"-now-btn"),onClick:xt},Zt.now))),Vt=ht&&y.createElement("li",{className:"".concat(Le,"-ok")},y.createElement(Yt,{disabled:st,onClick:Rt},Zt.ok))}return!Et&&!Vt?null:y.createElement("ul",{className:"".concat(Le,"-ranges")},Et,Vt)}function oa(re){var Le,Xe=re.prefixCls,ke=Xe===void 0?"rc-picker":Xe,dt=re.className,tt=re.style,ht=re.locale,xt=re.generateConfig,Rt=re.value,st=re.defaultValue,Kt=re.pickerValue,Zt=re.defaultPickerValue,Et=re.disabledDate,Vt=re.mode,$e=re.picker,Yt=$e===void 0?"date":$e,Nt=re.tabIndex,un=Nt===void 0?0:Nt,yn=re.showNow,Cn=re.showTime,wt=re.showToday,kt=re.renderExtraFooter,mn=re.hideHeader,dn=re.onSelect,vt=re.onChange,St=re.onPanelChange,Ot=re.onMouseDown,yt=re.onPickerValueChange,ft=re.onOk,gn=re.components,Bt=re.direction,vn=re.hourStep,qt=vn===void 0?1:vn,Ut=re.minuteStep,fn=Ut===void 0?1:Ut,In=re.secondStep,ur=In===void 0?1:In,Ln=Yt==="date"&&!!Cn||Yt==="time",Tr=24%qt===0,Ur=60%fn===0,Mn=60%ur===0,Nn=y.useContext(h),Kn=Nn.operationRef,vr=Nn.panelRef,Rr=Nn.onSelect,Br=Nn.hideRanges,sa=Nn.defaultOpenValue,la=y.useContext(it),ca=la.inRange,Ga=la.panelPosition,Ra=la.rangedValue,$a=la.hoverRangedValue,Yr=y.useRef({}),Aa=y.useRef(!0),oi=Object(u.a)(null,{value:Rt,defaultValue:st,postState:function(an){return!an&&sa&&Yt==="time"?sa:an}}),Da=Object(P.a)(oi,2),zr=Da[0],va=Da[1],wa=Object(u.a)(null,{value:Kt,defaultValue:Zt||zr,postState:function(an){return an||xt.getNow()}}),Ie=Object(P.a)(wa,2),Qe=Ie[0],qe=Ie[1],Fe=function(an){qe(an),yt&&yt(an)},me=function(an){var _n=W[Yt];return _n?_n(an):an},De=Object(u.a)(function(){return Yt==="time"?"time":me("date")},{value:Vt}),be=Object(P.a)(De,2),Be=be[0],Ke=be[1];y.useEffect(function(){Ke(Yt)},[Yt]);var nt=y.useState(function(){return Be}),Ve=Object(P.a)(nt,2),ct=Ve[0],It=Ve[1],$t=function(an,_n){var lr=me(an||Be);It(Be),Ke(lr),St&&(Be!==lr||We(xt,Qe,Qe))&&St(_n,lr)},tn=function(an,_n){var lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(Be===Yt||lr)&&(va(an),dn&&dn(an),Rr&&Rr(an,_n),vt&&!We(xt,an,zr)&&vt(an))},bn=function(an){return Yr.current&&Yr.current.onKeyDown?([a.a.LEFT,a.a.RIGHT,a.a.UP,a.a.DOWN,a.a.PAGE_UP,a.a.PAGE_DOWN,a.a.ENTER].includes(an.which)&&an.preventDefault(),Yr.current.onKeyDown(an)):(Object(i.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)},Pn=function(an){Yr.current&&Yr.current.onBlur&&Yr.current.onBlur(an)};Kn&&Ga!=="right"&&(Kn.current={onKeyDown:bn,onClose:function(){Yr.current&&Yr.current.onClose&&Yr.current.onClose()}}),y.useEffect(function(){Rt&&!Aa.current&&qe(Rt)},[Rt]),y.useEffect(function(){Aa.current=!1},[]);var er,tr=Object(C.a)(Object(C.a)({},re),{},{operationRef:Yr,prefixCls:ke,viewDate:Qe,value:zr,onViewDateChange:Fe,sourceMode:ct,onPanelChange:$t,disabledDate:Be!=="decade"?Et:void 0});delete tr.onChange,delete tr.onSelect;switch(Be){case"decade":er=y.createElement($n,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;case"year":er=y.createElement(nr,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;case"month":er=y.createElement(At,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;case"quarter":er=y.createElement(Jt,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;case"week":er=y.createElement(Xt,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;case"time":delete tr.showTime,er=y.createElement(Q,Object.assign({},tr,Object(p.a)(Cn)==="object"?Cn:null,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}));break;default:Cn?er=y.createElement(rt,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}})):er=y.createElement(pe,Object.assign({},tr,{onSelect:function(an,_n){Fe(an),tn(an,_n)}}))}var rn,Lt,Ft=function(){var an=xt.getNow(),_n=je(xt.getHour(an),xt.getMinute(an),xt.getSecond(an),Tr?qt:1,Ur?fn:1,Mn?ur:1),lr=Te(xt,an,_n[0],_n[1],_n[2]);tn(lr,"submit")};Br||(rn=ma(ke,Be,kt),Lt=sn({prefixCls:ke,components:gn,needConfirmButton:Ln,okDisabled:!zr||Et&&Et(zr),locale:ht,showNow:yn,onNow:Ln&&Ft,onOk:function(){zr&&(tn(zr,"submit",!0),ft&&ft(zr))}}));var Tn;if(wt&&Be==="date"&&Yt==="date"&&!Cn){var cn=xt.getNow(),Gn="".concat(ke,"-today-btn"),pr=Et&&Et(cn);Tn=y.createElement("a",{className:b()(Gn,pr&&"".concat(Gn,"-disabled")),"aria-disabled":pr,onClick:function(){pr||tn(cn,"mouse",!0)}},ht.today)}return y.createElement(h.Provider,{value:Object(C.a)(Object(C.a)({},Nn),{},{hideHeader:"hideHeader"in re?mn:Nn.hideHeader,hidePrevBtn:ca&&Ga==="right",hideNextBtn:ca&&Ga==="left"})},y.createElement("div",{tabIndex:un,className:b()("".concat(ke,"-panel"),dt,(Le={},Object(S.a)(Le,"".concat(ke,"-panel-has-range"),Ra&&Ra[0]&&Ra[1]),Object(S.a)(Le,"".concat(ke,"-panel-has-range-hover"),$a&&$a[0]&&$a[1]),Object(S.a)(Le,"".concat(ke,"-panel-rtl"),Bt==="rtl"),Le)),style:tt,onKeyDown:bn,onBlur:Pn,onMouseDown:Ot,ref:vr},er,rn||Lt||Tn?y.createElement("div",{className:"".concat(ke,"-footer")},rn,Lt,Tn):null))}var Xr=oa,Ua=M("uciX"),xa={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function ga(re){var Le,Xe=re.prefixCls,ke=re.popupElement,dt=re.popupStyle,tt=re.visible,ht=re.dropdownClassName,xt=re.dropdownAlign,Rt=re.transitionName,st=re.getPopupContainer,Kt=re.children,Zt=re.range,Et=re.popupPlacement,Vt=re.direction,$e="".concat(Xe,"-dropdown"),Yt=function(){return Et!==void 0?Et:Vt==="rtl"?"bottomRight":"bottomLeft"};return y.createElement(Ua.a,{showAction:[],hideAction:[],popupPlacement:Yt(),builtinPlacements:xa,prefixCls:$e,popupTransitionName:Rt,popup:ke,popupAlign:xt,popupVisible:tt,popupClassName:b()(ht,(Le={},Object(S.a)(Le,"".concat($e,"-range"),Zt),Object(S.a)(Le,"".concat($e,"-rtl"),Vt==="rtl"),Le)),popupStyle:dt,getPopupContainer:st},Kt)}var Ya=ga;function Ka(re){var Le=re.open,Xe=re.value,ke=re.isClickOutside,dt=re.triggerOpen,tt=re.forwardKeyDown,ht=re.blurToCancel,xt=re.onSubmit,Rt=re.onCancel,st=re.onFocus,Kt=re.onBlur,Zt=Object(y.useState)(!1),Et=Object(P.a)(Zt,2),Vt=Et[0],$e=Et[1],Yt=Object(y.useState)(!1),Nt=Object(P.a)(Yt,2),un=Nt[0],yn=Nt[1],Cn=Object(y.useRef)(!1),wt=Object(y.useRef)(!1),kt={onMouseDown:function(){$e(!0),dt(!0)},onKeyDown:function(dn){switch(dn.which){case a.a.ENTER:{Le?xt()!==!1&&$e(!0):dt(!0),dn.preventDefault();return}case a.a.TAB:{Vt&&Le&&!dn.shiftKey?($e(!1),dn.preventDefault()):!Vt&&Le&&(!tt(dn)&&dn.shiftKey&&($e(!0),dn.preventDefault()));return}case a.a.ESC:{$e(!0),Rt();return}}!Le&&![a.a.SHIFT].includes(dn.which)?dt(!0):Vt||tt(dn)},onFocus:function(dn){$e(!0),yn(!0),st&&st(dn)},onBlur:function(dn){if(Cn.current||!ke(document.activeElement)){Cn.current=!1;return}ht?setTimeout(function(){ke(document.activeElement)&&Rt()},0):Le&&(dt(!1),wt.current&&xt()),yn(!1),Kt&&Kt(dn)}};return Object(y.useEffect)(function(){wt.current=!1},[Le]),Object(y.useEffect)(function(){wt.current=!0},[Xe]),Object(y.useEffect)(function(){return x(function(mn){var dn=mn.target;Le&&(ke(dn)?un||dt(!1):(Cn.current=!0,requestAnimationFrame(function(){Cn.current=!1})))})}),[kt,{focused:un,typing:Vt}]}function da(re){var Le=re.valueTexts,Xe=re.onTextChange,ke=y.useState(""),dt=Object(P.a)(ke,2),tt=dt[0],ht=dt[1],xt=y.useRef([]);xt.current=Le;function Rt(Kt){ht(Kt),Xe(Kt)}function st(){ht(xt.current[0])}return y.useEffect(function(){Le.every(function(Kt){return Kt!==tt})&&st()},[Le.join("||")]),[tt,Rt,st]}var Sn=M("Gytx"),hn=M.n(Sn);function pn(re,Le){var Xe=Le.formatList,ke=Le.generateConfig,dt=Le.locale;return Object(D.a)(function(){if(!re)return[[""],""];for(var tt="",ht=[],xt=0;xt<Xe.length;xt+=1){var Rt=Xe[xt],st=ke.locale.format(dt.locale,re,Rt);ht.push(st),xt===0&&(tt=st)}return[ht,tt]},[re,Xe],function(tt,ht){return tt[0]!==ht[0]||!hn()(tt[1],ht[1])})}function kn(re,Le){var Xe=Le.formatList,ke=Le.generateConfig,dt=Le.locale,tt=Object(y.useState)(null),ht=Object(P.a)(tt,2),xt=ht[0],Rt=ht[1],st=Object(y.useRef)(null);function Kt(Nt){var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(st.current),un){Rt(Nt);return}st.current=requestAnimationFrame(function(){Rt(Nt)})}var Zt=pn(xt,{formatList:Xe,generateConfig:ke,locale:dt}),Et=Object(P.a)(Zt,2),Vt=Et[1];function $e(Nt){Kt(Nt)}function Yt(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Kt(null,Nt)}return Object(y.useEffect)(function(){Yt(!0)},[re]),Object(y.useEffect)(function(){return function(){return cancelAnimationFrame(st.current)}},[]),[Vt,$e,Yt]}function cr(re){var Le,Xe=re.prefixCls,ke=Xe===void 0?"rc-picker":Xe,dt=re.id,tt=re.tabIndex,ht=re.style,xt=re.className,Rt=re.dropdownClassName,st=re.dropdownAlign,Kt=re.popupStyle,Zt=re.transitionName,Et=re.generateConfig,Vt=re.locale,$e=re.inputReadOnly,Yt=re.allowClear,Nt=re.autoFocus,un=re.showTime,yn=re.picker,Cn=yn===void 0?"date":yn,wt=re.format,kt=re.use12Hours,mn=re.value,dn=re.defaultValue,vt=re.open,St=re.defaultOpen,Ot=re.defaultOpenValue,yt=re.suffixIcon,ft=re.clearIcon,gn=re.disabled,Bt=re.disabledDate,vn=re.placeholder,qt=re.getPopupContainer,Ut=re.pickerRef,fn=re.panelRender,In=re.onChange,ur=re.onOpenChange,Ln=re.onFocus,Tr=re.onBlur,Ur=re.onMouseDown,Mn=re.onMouseUp,Nn=re.onMouseEnter,Kn=re.onMouseLeave,vr=re.onContextMenu,Rr=re.onClick,Br=re.direction,sa=re.autoComplete,la=sa===void 0?"off":sa,ca=y.useRef(null),Ga=Cn==="date"&&!!un||Cn==="time",Ra=te(c(wt,Cn,un,kt)),$a=y.useRef(null),Yr=y.useRef(null),Aa=Object(u.a)(null,{value:mn,defaultValue:dn}),oi=Object(P.a)(Aa,2),Da=oi[0],zr=oi[1],va=y.useState(Da),wa=Object(P.a)(va,2),Ie=wa[0],Qe=wa[1],qe=y.useRef(null),Fe=Object(u.a)(!1,{value:vt,defaultValue:St,postState:function(ir){return gn?!1:ir},onChange:function(ir){ur&&ur(ir),!ir&&qe.current&&qe.current.onClose&&qe.current.onClose()}}),me=Object(P.a)(Fe,2),De=me[0],be=me[1],Be=pn(Ie,{formatList:Ra,generateConfig:Et,locale:Vt}),Ke=Object(P.a)(Be,2),nt=Ke[0],Ve=Ke[1],ct=da({valueTexts:nt,onTextChange:function(ir){var ta=Et.locale.parse(Vt.locale,ir,Ra);ta&&(!Bt||!Bt(ta))&&Qe(ta)}}),It=Object(P.a)(ct,3),$t=It[0],tn=It[1],bn=It[2],Pn=function(ir){Qe(ir),zr(ir),In&&!We(Et,Da,ir)&&In(ir,ir?Et.locale.format(Vt.locale,ir,Ra[0]):"")},er=function(ir){if(gn&&ir)return;be(ir)},tr=function(ir){return De&&qe.current&&qe.current.onKeyDown?qe.current.onKeyDown(ir):(Object(i.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},rn=function(){Mn&&Mn.apply(void 0,arguments),ca.current&&(ca.current.focus(),er(!0))},Lt=Ka({blurToCancel:Ga,open:De,value:$t,triggerOpen:er,forwardKeyDown:tr,isClickOutside:function(ir){return!H([$a.current,Yr.current],ir)},onSubmit:function(){return Bt&&Bt(Ie)?!1:(Pn(Ie),er(!1),bn(),!0)},onCancel:function(){er(!1),Qe(Da),bn()},onFocus:Ln,onBlur:Tr}),Ft=Object(P.a)(Lt,2),Tn=Ft[0],cn=Ft[1],Gn=cn.focused,pr=cn.typing;y.useEffect(function(){De||(Qe(Da),!nt.length||nt[0]===""?tn(""):Ve!==$t&&bn())},[De,nt]),y.useEffect(function(){De||bn()},[Cn]),y.useEffect(function(){Qe(Da)},[Da]),Ut&&(Ut.current={focus:function(){ca.current&&ca.current.focus()},blur:function(){ca.current&&ca.current.blur()}});var Wn=Object(C.a)(Object(C.a)({},re),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),an=y.createElement(Xr,Object.assign({},Wn,{generateConfig:Et,className:b()(Object(S.a)({},"".concat(ke,"-panel-focused"),!pr)),value:Ie,locale:Vt,tabIndex:-1,onChange:Qe,direction:Br}));fn&&(an=fn(an));var _n=y.createElement("div",{className:"".concat(ke,"-panel-container"),onMouseDown:function(ir){ir.preventDefault()}},an),lr;yt&&(lr=y.createElement("span",{className:"".concat(ke,"-suffix")},yt));var mr;Yt&&Da&&!gn&&(mr=y.createElement("span",{onMouseDown:function(ir){ir.preventDefault(),ir.stopPropagation()},onMouseUp:function(ir){ir.preventDefault(),ir.stopPropagation(),Pn(null),er(!1)},className:"".concat(ke,"-clear")},ft||y.createElement("span",{className:"".concat(ke,"-clear-btn")})));var Fn=function(ir,ta){(ta==="submit"||ta!=="key"&&!Ga)&&(Pn(ir),er(!1))},br=Br==="rtl"?"bottomRight":"bottomLeft",Hr=kn($t,{formatList:Ra,generateConfig:Et,locale:Vt}),xr=Object(P.a)(Hr,3),Pr=xr[0],Dr=xr[1],Ar=xr[2];return y.createElement(h.Provider,{value:{operationRef:qe,hideHeader:Cn==="time",panelRef:$a,onSelect:Fn,open:De,defaultOpenValue:Ot,onDateMouseEnter:Dr,onDateMouseLeave:Ar}},y.createElement(Ya,{visible:De,popupElement:_n,popupStyle:Kt,prefixCls:ke,dropdownClassName:Rt,dropdownAlign:st,getPopupContainer:qt,transitionName:Zt,popupPlacement:br,direction:Br},y.createElement("div",{className:b()(ke,xt,(Le={},Object(S.a)(Le,"".concat(ke,"-disabled"),gn),Object(S.a)(Le,"".concat(ke,"-focused"),Gn),Object(S.a)(Le,"".concat(ke,"-rtl"),Br==="rtl"),Le)),style:ht,onMouseDown:Ur,onMouseUp:rn,onMouseEnter:Nn,onMouseLeave:Kn,onContextMenu:vr,onClick:Rr},y.createElement("div",{className:b()("".concat(ke,"-input"),Object(S.a)({},"".concat(ke,"-input-placeholder"),!!Pr)),ref:Yr},y.createElement("input",Object.assign({id:dt,tabIndex:tt,disabled:gn,readOnly:$e||!pr,value:Pr||$t,onChange:function(ir){tn(ir.target.value)},autoFocus:Nt,placeholder:vn,ref:ca,title:$t},Tn,{size:f(Cn,Ra[0])},_e(re),{autoComplete:la})),lr,mr))))}var qn=function(re){Object(I.a)(Xe,re);var Le=Object(F.a)(Xe);function Xe(){var ke;return Object(X.a)(this,Xe),ke=Le.apply(this,arguments),ke.pickerRef=y.createRef(),ke.focus=function(){ke.pickerRef.current&&ke.pickerRef.current.focus()},ke.blur=function(){ke.pickerRef.current&&ke.pickerRef.current.blur()},ke}return Object(B.a)(Xe,[{key:"render",value:function(){return y.createElement(cr,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(y.Component),Xn=qn;function Dn(re,Le,Xe){var ke=re.picker,dt=re.locale,tt=re.selectedValue,ht=re.disabledDate,xt=re.disabled,Rt=re.generateConfig,st=ce(tt,0),Kt=ce(tt,1);function Zt(Nt){var un=Rt.getYear(Nt),yn=Rt.locale.getWeek(dt.locale,Nt);return un*100+yn}function Et(Nt){var un=Rt.getYear(Nt),yn=Rt.getMonth(Nt);return un*100+yn}function Vt(Nt){var un=Rt.getYear(Nt),yn=Ee(Rt,Nt);return un*10+yn}var $e=y.useCallback(function(Nt){if(ht&&ht(Nt))return!0;if(xt[1]&&Kt)return!et(Rt,Nt,Kt)&&Rt.isAfter(Nt,Kt);if(Le&&Kt)switch(ke){case"quarter":return Vt(Nt)>Vt(Kt);case"month":return Et(Nt)>Et(Kt);case"week":return Zt(Nt)>Zt(Kt);default:return!et(Rt,Nt,Kt)&&Rt.isAfter(Nt,Kt)}return!1},[ht,xt[1],Kt,Le]),Yt=y.useCallback(function(Nt){if(ht&&ht(Nt))return!0;if(xt[0]&&st)return!et(Rt,Nt,Kt)&&Rt.isAfter(st,Nt);if(Xe&&st)switch(ke){case"quarter":return Vt(Nt)<Vt(st);case"month":return Et(Nt)<Et(st);case"week":return Zt(Nt)<Zt(st);default:return!et(Rt,Nt,st)&&Rt.isAfter(st,Nt)}return!1},[ht,xt[0],st,Xe]);return[$e,Yt]}function hr(re,Le,Xe,ke){var dt=Ne(re,Xe,ke,1);function tt(ht){return ht(re,Le)?"same":ht(dt,Le)?"closing":"far"}switch(Xe){case"year":return tt(function(ht,xt){return Ye(ke,ht,xt)});case"quarter":case"month":return tt(function(ht,xt){return le(ke,ht,xt)});default:return tt(function(ht,xt){return He(ke,ht,xt)})}}function jn(re,Le,Xe,ke){var dt=ce(re,0),tt=ce(re,1);if(Le===0)return dt;if(dt&&tt){var ht=hr(dt,tt,Xe,ke);switch(ht){case"same":return dt;case"closing":return dt;default:return Ne(tt,Xe,ke,-1)}}return dt}function Jn(re){var Le=re.values,Xe=re.picker,ke=re.defaultDates,dt=re.generateConfig,tt=y.useState(function(){return[ce(ke,0),ce(ke,1)]}),ht=Object(P.a)(tt,2),xt=ht[0],Rt=ht[1],st=y.useState(null),Kt=Object(P.a)(st,2),Zt=Kt[0],Et=Kt[1],Vt=ce(Le,0),$e=ce(Le,1);function Yt(un){return xt[un]?xt[un]:ce(Zt,un)||jn(Le,un,Xe,dt)||Vt||$e||dt.getNow()}function Nt(un,yn){if(un){var Cn=xe(Zt,un,yn);Rt(xe(xt,null,yn)||[null,null]);var wt=(yn+1)%2;ce(Le,wt)||(Cn=xe(Cn,un,wt)),Et(Cn)}else(Vt||$e)&&Et(null)}return[Yt,Nt]}function rr(re,Le){return re&&re[0]&&re[1]&&Le.isAfter(re[0],re[1])?[re[1],re[0]]:re}function wn(re,Le,Xe,ke){return re||ke&&ke[Le]?!0:!!Xe[(Le+1)%2]}function Er(re){var Le,Xe,ke,dt=re.prefixCls,tt=dt===void 0?"rc-picker":dt,ht=re.id,xt=re.style,Rt=re.className,st=re.popupStyle,Kt=re.dropdownClassName,Zt=re.transitionName,Et=re.dropdownAlign,Vt=re.getPopupContainer,$e=re.generateConfig,Yt=re.locale,Nt=re.placeholder,un=re.autoFocus,yn=re.disabled,Cn=re.format,wt=re.picker,kt=wt===void 0?"date":wt,mn=re.showTime,dn=re.use12Hours,vt=re.separator,St=vt===void 0?"~":vt,Ot=re.value,yt=re.defaultValue,ft=re.defaultPickerValue,gn=re.open,Bt=re.defaultOpen,vn=re.disabledDate,qt=re.disabledTime,Ut=re.dateRender,fn=re.panelRender,In=re.ranges,ur=re.allowEmpty,Ln=re.allowClear,Tr=re.suffixIcon,Ur=re.clearIcon,Mn=re.pickerRef,Nn=re.inputReadOnly,Kn=re.mode,vr=re.renderExtraFooter,Rr=re.onChange,Br=re.onOpenChange,sa=re.onPanelChange,la=re.onCalendarChange,ca=re.onFocus,Ga=re.onBlur,Ra=re.onOk,$a=re.components,Yr=re.order,Aa=re.direction,oi=re.activePickerIndex,Da=re.autoComplete,zr=Da===void 0?"off":Da,va=kt==="date"&&!!mn||kt==="time",wa=Object(y.useRef)({}),Ie=Object(y.useRef)(null),Qe=Object(y.useRef)(null),qe=Object(y.useRef)(null),Fe=Object(y.useRef)(null),me=Object(y.useRef)(null),De=Object(y.useRef)(null),be=Object(y.useRef)(null),Be=te(c(Cn,kt,mn,dn)),Ke=Object(u.a)(0,{value:oi}),nt=Object(P.a)(Ke,2),Ve=nt[0],ct=nt[1],It=Object(y.useRef)(null),$t=y.useMemo(function(){return Array.isArray(yn)?yn:[yn||!1,yn||!1]},[yn]),tn=Object(u.a)(null,{value:Ot,defaultValue:yt,postState:function(An){return kt==="time"&&!Yr?An:rr(An,$e)}}),bn=Object(P.a)(tn,2),Pn=bn[0],er=bn[1],tr=Jn({values:Pn,picker:kt,defaultDates:ft,generateConfig:$e}),rn=Object(P.a)(tr,2),Lt=rn[0],Ft=rn[1],Tn=Object(u.a)(Pn,{postState:function(An){var Zn=An;if($t[0]&&$t[1])return Zn;for(var yr=0;yr<2;yr+=1)$t[yr]&&!ce(Zn,yr)&&!ce(ur,yr)&&(Zn=xe(Zn,$e.getNow(),yr));return Zn}}),cn=Object(P.a)(Tn,2),Gn=cn[0],pr=cn[1],Wn=Object(u.a)([kt,kt],{value:Kn}),an=Object(P.a)(Wn,2),_n=an[0],lr=an[1];Object(y.useEffect)(function(){lr([kt,kt])},[kt]);var mr=function(An,Zn){lr(An),sa&&sa(Zn,An)},Fn=Dn({picker:kt,selectedValue:Gn,locale:Yt,disabled:$t,disabledDate:vn,generateConfig:$e},wa.current[1],wa.current[0]),br=Object(P.a)(Fn,2),Hr=br[0],xr=br[1],Pr=Object(u.a)(!1,{value:gn,defaultValue:Bt,postState:function(An){return $t[Ve]?!1:An},onChange:function(An){Br&&Br(An),!An&&It.current&&It.current.onClose&&It.current.onClose()}}),Dr=Object(P.a)(Pr,2),Ar=Dr[0],Or=Dr[1],ir=Ar&&Ve===0,ta=Ar&&Ve===1,Qa=Object(y.useState)(0),Pa=Object(P.a)(Qa,2),ya=Pa[0],Kr=Pa[1];Object(y.useEffect)(function(){!Ar&&Ie.current&&Kr(Ie.current.offsetWidth)},[Ar]);var Nr=y.useRef();function Fr(fr,An){if(fr)clearTimeout(Nr.current),wa.current[An]=!0,ct(An),Or(fr),Ar||Ft(null,An);else if(Ve===An){Or(fr);var Zn=wa.current;Nr.current=setTimeout(function(){Zn===wa.current&&(wa.current={})})}}function Gr(fr){Fr(!0,fr),setTimeout(function(){var An=[De,be][fr];An.current&&An.current.focus()},0)}function Ia(fr,An){var Zn=fr,yr=ce(Zn,0),Zr=ce(Zn,1);yr&&Zr&&$e.isAfter(yr,Zr)&&(kt==="week"&&!Dt($e,Yt.locale,yr,Zr)||kt==="quarter"&&!Re($e,yr,Zr)||kt!=="week"&&kt!=="quarter"&&kt!=="time"&&!et($e,yr,Zr)?(An===0?(Zn=[yr,null],Zr=null):(yr=null,Zn=[null,Zr]),wa.current=Object(S.a)({},An,!0)):(kt!=="time"||Yr!==!1)&&(Zn=rr(Zn,$e))),pr(Zn);var gi=Zn&&Zn[0]?$e.locale.format(Yt.locale,Zn[0],Be[0]):"",ai=Zn&&Zn[1]?$e.locale.format(Yt.locale,Zn[1],Be[0]):"";if(la){var Ta={range:An===0?"start":"end"};la(Zn,[gi,ai],Ta)}var Va=wn(yr,0,$t,ur),vi=wn(Zr,1,$t,ur),Wi=Zn===null||Va&&vi;Wi&&(er(Zn),Rr&&(!We($e,ce(Pn,0),yr)||!We($e,ce(Pn,1),Zr))&&Rr(Zn,[gi,ai]));var ba=null;An===0&&!$t[1]?ba=1:An===1&&!$t[0]&&(ba=0),ba!==null&&ba!==Ve&&(!wa.current[ba]||!ce(Zn,ba))&&ce(Zn,An)?Gr(ba):Fr(!1,An)}var hi=function(An){return Ar&&It.current&&It.current.onKeyDown?It.current.onKeyDown(An):(Object(i.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},si={formatList:Be,generateConfig:$e,locale:Yt},jr=pn(ce(Gn,0),si),Ja=Object(P.a)(jr,2),Za=Ja[0],Wr=Ja[1],kr=pn(ce(Gn,1),si),ha=Object(P.a)(kr,2),Pi=ha[0],no=ha[1],li=function(An,Zn){var yr=$e.locale.parse(Yt.locale,An,Be),Zr=Zn===0?Hr:xr;yr&&!Zr(yr)&&(pr(xe(Gn,yr,Zn)),Ft(yr,Zn))},Ci=da({valueTexts:Za,onTextChange:function(An){return li(An,0)}}),Ti=Object(P.a)(Ci,3),Si=Ti[0],Ii=Ti[1],co=Ti[2],Ro=da({valueTexts:Pi,onTextChange:function(An){return li(An,1)}}),Gi=Object(P.a)(Ro,3),Oi=Gi[0],Vi=Gi[1],yi=Gi[2],Ri=Object(y.useState)(null),ho=Object(P.a)(Ri,2),Xi=ho[0],Ai=ho[1],Di=Object(y.useState)(null),bi=Object(P.a)(Di,2),Ma=bi[0],fi=bi[1],pi=kn(Si,{formatList:Be,generateConfig:$e,locale:Yt}),_i=Object(P.a)(pi,3),mi=_i[0],Yi=_i[1],$i=_i[2],Qi=kn(Oi,{formatList:Be,generateConfig:$e,locale:Yt}),ki=Object(P.a)(Qi,3),ui=ki[0],Ei=ki[1],ro=ki[2],Ao=function(An){fi(xe(Gn,An,Ve)),Ve===0?Yi(An):Ei(An)},Do=function(){fi(xe(Gn,null,Ve)),Ve===0?$i():ro()},fo=function(An,Zn){return{blurToCancel:va,forwardKeyDown:hi,onBlur:Ga,isClickOutside:function(Zr){return!H([Qe.current,qe.current,Fe.current],Zr)},onFocus:function(Zr){ct(An),ca&&ca(Zr)},triggerOpen:function(Zr){Fr(Zr,An)},onSubmit:function(){Ia(Gn,An),Zn()},onCancel:function(){Fr(!1,An),pr(Pn),Zn()}}},ao=Ka(Object(C.a)(Object(C.a)({},fo(0,co)),{},{open:ir,value:Si})),po=Object(P.a)(ao,2),Fa=po[0],ra=po[1],Ca=ra.focused,aa=ra.typing,Ni=Ka(Object(C.a)(Object(C.a)({},fo(1,yi)),{},{open:ta,value:Oi})),mo=Object(P.a)(Ni,2),qa=mo[0],io=mo[1],oo=io.focused,so=io.typing,xi=function(An){!Ar&&!De.current.contains(An.target)&&!be.current.contains(An.target)&&($t[0]?$t[1]||Gr(1):Gr(0))},Ji=function(An){Ar&&(Ca||oo)&&!De.current.contains(An.target)&&!be.current.contains(An.target)&&An.preventDefault()},ji=Pn&&Pn[0]?$e.locale.format(Yt.locale,Pn[0],"YYYYMMDDHHmmss"):"",go=Pn&&Pn[1]?$e.locale.format(Yt.locale,Pn[1],"YYYYMMDDHHmmss"):"";Object(y.useEffect)(function(){Ar||(pr(Pn),!Za.length||Za[0]===""?Ii(""):Wr!==Si&&co(),!Pi.length||Pi[0]===""?Vi(""):no!==Oi&&yi())},[Ar,Za,Pi]),Object(y.useEffect)(function(){pr(Pn)},[ji,go]),Mn&&(Mn.current={focus:function(){De.current&&De.current.focus()},blur:function(){De.current&&De.current.blur(),be.current&&be.current.blur()}});var Zi=Object.keys(In||{}),Ir=Zi.map(function(fr){var An=In[fr],Zn=typeof An=="function"?An():An;return{label:fr,onClick:function(){Ia(Zn,null),Fr(!1,Ve)},onMouseEnter:function(){Ai(Zn)},onMouseLeave:function(){Ai(null)}}});function _r(){var fr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Zn=null;Ar&&Ma&&Ma[0]&&Ma[1]&&$e.isAfter(Ma[1],Ma[0])&&(Zn=Ma);var yr=mn;if(mn&&Object(p.a)(mn)==="object"&&mn.defaultValue){var Zr=mn.defaultValue;yr=Object(C.a)(Object(C.a)({},mn),{},{defaultValue:ce(Zr,Ve)||void 0})}var gi=null;return Ut&&(gi=function(Ta,Va){return Ut(Ta,Va,{range:Ve?"end":"start"})}),y.createElement(it.Provider,{value:{inRange:!0,panelPosition:fr,rangedValue:Xi||Gn,hoverRangedValue:Zn}},y.createElement(Xr,Object.assign({},re,An,{dateRender:gi,showTime:yr,mode:_n[Ve],generateConfig:$e,style:void 0,direction:Aa,disabledDate:Ve===0?Hr:xr,disabledTime:function(Ta){return qt?qt(Ta,Ve===0?"start":"end"):!1},className:b()(Object(S.a)({},"".concat(tt,"-panel-focused"),Ve===0?!aa:!so)),value:ce(Gn,Ve),locale:Yt,tabIndex:-1,onPanelChange:function(Ta,Va){mr(xe(_n,Va,Ve),xe(Gn,Ta,Ve));var vi=Ta;fr==="right"&&_n[Ve]===Va&&(vi=Ne(vi,Va,$e,-1)),Ft(vi,Ve)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var ea=0,ka=0;Ve&&qe.current&&me.current&&Qe.current&&(ea=qe.current.offsetWidth+me.current.offsetWidth,Qe.current.offsetWidth&&ea>Qe.current.offsetWidth&&(ka=ea));var Mi=Aa==="rtl"?{right:ea}:{left:ea};function di(){var fr,An=ma(tt,_n[Ve],vr),Zn=sn({prefixCls:tt,components:$a,needConfirmButton:va,okDisabled:!ce(Gn,Ve)||vn&&vn(Gn[Ve]),locale:Yt,rangeList:Ir,onOk:function(){ce(Gn,Ve)&&(Ia(Gn,Ve),Ra&&Ra(Gn))}});if(kt!=="time"&&!mn){var yr=Lt(Ve),Zr=Ne(yr,kt,$e),gi=_n[Ve],ai=gi===kt,Ta=_r(ai?"left":!1,{pickerValue:yr,onPickerValueChange:function(ba){Ft(ba,Ve)}}),Va=_r("right",{pickerValue:Zr,onPickerValueChange:function(ba){Ft(Ne(ba,kt,$e,-1),Ve)}});Aa==="rtl"?fr=y.createElement(y.Fragment,null,Va,ai&&Ta):fr=y.createElement(y.Fragment,null,Ta,ai&&Va)}else fr=_r();var vi=y.createElement(y.Fragment,null,y.createElement("div",{className:"".concat(tt,"-panels")},fr),(An||Zn)&&y.createElement("div",{className:"".concat(tt,"-footer")},An,Zn));return fn&&(vi=fn(vi)),y.createElement("div",{className:"".concat(tt,"-panel-container"),style:{marginLeft:ka},ref:Qe,onMouseDown:function(ba){ba.preventDefault()}},vi)}var Ui=y.createElement("div",{className:b()("".concat(tt,"-range-wrapper"),"".concat(tt,"-").concat(kt,"-range-wrapper")),style:{minWidth:ya}},y.createElement("div",{className:"".concat(tt,"-range-arrow"),style:Mi}),di()),ci;Tr&&(ci=y.createElement("span",{className:"".concat(tt,"-suffix")},Tr));var fa;Ln&&(ce(Pn,0)&&!$t[0]||ce(Pn,1)&&!$t[1])&&(fa=y.createElement("span",{onMouseDown:function(An){An.preventDefault(),An.stopPropagation()},onMouseUp:function(An){An.preventDefault(),An.stopPropagation();var Zn=Pn;$t[0]||(Zn=xe(Zn,null,0)),$t[1]||(Zn=xe(Zn,null,1)),Ia(Zn,null),Fr(!1,Ve)},className:"".concat(tt,"-clear")},Ur||y.createElement("span",{className:"".concat(tt,"-clear-btn")})));var Fi={size:f(kt,Be[0])},Bi=0,Hi=0;qe.current&&Fe.current&&me.current&&(Ve===0?Hi=qe.current.offsetWidth:(Bi=ea,Hi=Fe.current.offsetWidth));var Ba=Aa==="rtl"?{right:Bi}:{left:Bi},Mr=function(An,Zn){var yr=xe(Gn,An,Ve);Zn==="submit"||Zn!=="key"&&!va?(Ia(yr,Ve),Ve===0?$i():ro()):pr(yr)};return y.createElement(h.Provider,{value:{operationRef:It,hideHeader:kt==="time",onDateMouseEnter:Ao,onDateMouseLeave:Do,hideRanges:!0,onSelect:Mr,open:Ar}},y.createElement(Ya,{visible:Ar,popupElement:Ui,popupStyle:st,prefixCls:tt,dropdownClassName:Kt,dropdownAlign:Et,getPopupContainer:Vt,transitionName:Zt,range:!0,direction:Aa},y.createElement("div",Object.assign({ref:Ie,className:b()(tt,"".concat(tt,"-range"),Rt,(Le={},Object(S.a)(Le,"".concat(tt,"-disabled"),$t[0]&&$t[1]),Object(S.a)(Le,"".concat(tt,"-focused"),Ve===0?Ca:oo),Object(S.a)(Le,"".concat(tt,"-rtl"),Aa==="rtl"),Le)),style:xt,onClick:xi,onMouseDown:Ji},_e(re)),y.createElement("div",{className:b()("".concat(tt,"-input"),(Xe={},Object(S.a)(Xe,"".concat(tt,"-input-active"),Ve===0),Object(S.a)(Xe,"".concat(tt,"-input-placeholder"),!!mi),Xe)),ref:qe},y.createElement("input",Object.assign({id:ht,disabled:$t[0],readOnly:Nn||!aa,value:mi||Si,onChange:function(An){Ii(An.target.value)},autoFocus:un,placeholder:ce(Nt,0)||"",ref:De},Fa,Fi,{autoComplete:zr}))),y.createElement("div",{className:"".concat(tt,"-range-separator"),ref:me},St),y.createElement("div",{className:b()("".concat(tt,"-input"),(ke={},Object(S.a)(ke,"".concat(tt,"-input-active"),Ve===1),Object(S.a)(ke,"".concat(tt,"-input-placeholder"),!!ui),ke)),ref:Fe},y.createElement("input",Object.assign({disabled:$t[1],readOnly:Nn||!so,value:ui||Oi,onChange:function(An){Vi(An.target.value)},placeholder:ce(Nt,1)||"",ref:be},qa,Fi,{autoComplete:zr}))),y.createElement("div",{className:"".concat(tt,"-active-bar"),style:Object(C.a)(Object(C.a)({},Ba),{},{width:Hi,position:"absolute"})}),ci,fa)))}var Sr=function(re){Object(I.a)(Xe,re);var Le=Object(F.a)(Xe);function Xe(){var ke;return Object(X.a)(this,Xe),ke=Le.apply(this,arguments),ke.pickerRef=y.createRef(),ke.focus=function(){ke.pickerRef.current&&ke.pickerRef.current.focus()},ke.blur=function(){ke.pickerRef.current&&ke.pickerRef.current.blur()},ke}return Object(B.a)(Xe,[{key:"render",value:function(){return y.createElement(Er,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(y.Component),gr=Sr,sr=ee.b=Xn},osHv:function(ze,ee,M){(function(X){X(M("VrN/"))})(function(X){"use strict";var B=X.Pos;function I(l,n){return l.line-n.line||l.ch-n.ch}var F="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",S=F+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",C=new RegExp("<(/?)(["+F+"]["+S+"]*)","g");function P(l,n,s,d){this.line=n,this.ch=s,this.cm=l,this.text=l.getLine(n),this.min=d?Math.max(d.from,l.firstLine()):l.firstLine(),this.max=d?Math.min(d.to-1,l.lastLine()):l.lastLine()}function y(l,n){var s=l.cm.getTokenTypeAt(B(l.line,n));return s&&/\btag\b/.test(s)}function t(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function b(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function i(l){for(;;){var n=l.text.indexOf(">",l.ch);if(n==-1){if(t(l))continue;return}if(!y(l,n+1)){l.ch=n+1;continue}var s=l.text.lastIndexOf("/",n),d=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,d?"selfClose":"regular"}}function u(l){for(;;){var n=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(n==-1){if(b(l))continue;return}if(!y(l,n+1)){l.ch=n;continue}C.lastIndex=n,l.ch=n;var s=C.exec(l.text);if(s&&s.index==n)return s}}function p(l){for(;;){C.lastIndex=l.ch;var n=C.exec(l.text);if(!n){if(t(l))continue;return}if(!y(l,n.index+1)){l.ch=n.index+1;continue}return l.ch=n.index+n[0].length,n}}function a(l){for(;;){var n=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(n==-1){if(b(l))continue;return}if(!y(l,n+1)){l.ch=n;continue}var s=l.text.lastIndexOf("/",n),d=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,d?"selfClose":"regular"}}function o(l,n){for(var s=[];;){var d=p(l),E,D=l.line,T=l.ch-(d?d[0].length:0);if(!d||!(E=i(l)))return;if(E=="selfClose")continue;if(d[1]){for(var k=s.length-1;k>=0;--k)if(s[k]==d[2]){s.length=k;break}if(k<0&&(!n||n==d[2]))return{tag:d[2],from:B(D,T),to:B(l.line,l.ch)}}else s.push(d[2])}}function h(l,n){for(var s=[];;){var d=a(l);if(!d)return;if(d=="selfClose"){u(l);continue}var E=l.line,D=l.ch,T=u(l);if(!T)return;if(T[1])s.push(T[2]);else{for(var k=s.length-1;k>=0;--k)if(s[k]==T[2]){s.length=k;break}if(k<0&&(!n||n==T[2]))return{tag:T[2],from:B(l.line,l.ch),to:B(E,D)}}}}X.registerHelper("fold","xml",function(l,n){for(var s=new P(l,n.line,0);;){var d=p(s);if(!d||s.line!=n.line)return;var E=i(s);if(!E)return;if(!d[1]&&E!="selfClose"){var D=B(s.line,s.ch),T=o(s,d[2]);return T&&I(T.from,D)>0?{from:D,to:T.from}:null}}}),X.findMatchingTag=function(l,n,s){var d=new P(l,n.line,n.ch,s);if(d.text.indexOf(">")==-1&&d.text.indexOf("<")==-1)return;var E=i(d),D=E&&B(d.line,d.ch),T=E&&u(d);if(!E||!T||I(d,n)>0)return;var k={from:B(d.line,d.ch),to:D,tag:T[2]};return E=="selfClose"?{open:k,close:null,at:"open"}:T[1]?{open:h(d,T[2]),close:k,at:"close"}:(d=new P(l,D.line,D.ch,s),{open:k,close:o(d,T[2]),at:"open"})},X.findEnclosingTag=function(l,n,s,d){for(var E=new P(l,n.line,n.ch,s);;){var D=h(E,d);if(!D)break;var T=new P(l,n.line,n.ch,s),k=o(T,D.tag);if(k)return{open:D,close:k}}},X.scanForClosingTag=function(l,n,s,d){var E=new P(l,n.line,n.ch,d?{from:0,to:d}:null);return o(E,s)}})},p5ED:function(ze,ee,M){"use strict";var X=M("+L6B"),B=M("2/Rp"),I=M("5Dmo"),F=M("3S7+"),S=M("k1fw"),C=M("9og8"),P=M("tJVT"),y=M("WmNS"),t=M.n(y),b=M("q1tI"),i=M.n(b),u=M("vHTk"),p=M.n(u),a=M("yEEn"),o=M("ZW9T"),h=M("1vsH"),l=M("V0Rq"),n=M("m3rI");ee.a=function(s){var d,E,D,T,k,w,v,c=s.editOffice,f=c===void 0?"view":c,m=s.data,_=s.theme,x=s.type,g=s.filename,j=s.monacoEditor,U=s.className,R=s.style,W=s.close,H=s.onClose,L=s.hasMask,G=s.disabledDownload,z=Object(b.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),J=Object(P.a)(z,2),te=J[0],_e=J[1],ce=Object(b.useState)(""),xe=Object(P.a)(ce,2),Te=xe[0],je=xe[1],Ce=Object(b.useState)(),Z=Object(P.a)(Ce,2),K=Z[0],V=Z[1],$=window.ENV==="build"?"/react/build":"",q=n.a.PROXY_SERVER||location.origin,Q,ge=1024*1024,Oe=10*ge,Ye=Object(b.useRef)();(d=m)!==null&&d!==void 0&&d.startsWith("/api")&&x!=="txt"&&(m=(n.a.API_SERVER||location.origin)+m),x==="office"&&(Q=Object(h.T)(m).filesize,Q>Oe&&(x="other")),g&&j&&(j.filename=g),Object(b.useEffect)(function(){var He,et,ut=(He=document.cookie)===null||He===void 0||((et=He.replace(/\s/g,""))===null||et===void 0)?void 0:et.split(";");ut==null||ut.map(function(Dt){var We=Dt.split("=");We[0]==="_educoder_session"&&je(We[1])})},[]),Object(b.useEffect)(function(){x==="office"&&le()},[x,m]);var le=function(){var He=Object(C.a)(t.a.mark(function et(){var ut,Dt,We;return t.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return console.log("data:",m),ut=m,m.startsWith("http")||(ut=location.origin+ut),Dt=new URL(ut).pathname.split("/").pop(),Wt.next=6,Object(l.V)({attachment_id:Dt});case 6:We=Wt.sent,V(We);case 8:case"end":return Wt.stop()}},et)}));return function(){return He.apply(this,arguments)}}(),Ee=function(){if(m.startsWith("http")||m.startsWith("blob:")){Re();return}Object(h.z)(g||"educoder",m,g)},Re=function(){Object(h.x)(g||"educoder",decodeURIComponent(m))};return i.a.createElement("div",{style:Object(S.a)({},R||{}),className:"".concat(L&&p.a.bgBlack," ").concat(x?p.a.wrp:"hide")},W&&i.a.createElement("div",{className:p.a.close,ref:Ye},!G&&i.a.createElement(F.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ye.current}},i.a.createElement("span",{onClick:Re},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(F.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ye.current}},i.a.createElement("span",{className:"",onClick:H},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(p.a[U]," ").concat(U," ").concat(p.a.monaco," ").concat(x==="txt"?"show":"hide")},x==="txt"&&i.a.createElement(o.b,j)),x==="audio"&&i.a.createElement("audio",{src:"".concat(((E=m)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((D=m)===null||D===void 0?void 0:D.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(m),autoPlay:!0}),x==="video"&&i.a.createElement(i.a.Fragment,null,((T=m)===null||T===void 0?void 0:T.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(m),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})),x==="office"&&K&&i.a.createElement("iframe",{src:"".concat($,"/office.html?key=").concat(K.key,"&url=").concat(q+K.url,"&callbackUrl=").concat(q+K.callbackUrl,"&fileType=").concat(K.fileType,"&title=").concat(K.title,"&model=").concat(f,"&officeServer=").concat(n.a.OFFICE_SERVER,"&disabledDownload=").concat(!!G)}),x==="html"&&i.a.createElement("iframe",{src:m+"&disposition=inline"}),x==="pdf"&&i.a.createElement("iframe",{src:"".concat($,"/js/pdfview/index.html?url=").concat(m,"&disabledDownload=").concat(!!G)}),x==="image"&&i.a.createElement("img",{src:"".concat(((k=m)===null||k===void 0?void 0:k.indexOf("http://"))>-1||((w=m)===null||w===void 0?void 0:w.indexOf("https://"))>-1||(v=m)!==null&&v!==void 0&&v.startsWith("/api")?"":"data:image/png;base64,").concat(m)}),x==="other"&&i.a.createElement("div",null,i.a.createElement(B.a,{type:"primary",size:"large",onClick:Ee},i.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),x==="download"&&i.a.createElement(B.a,{type:"primary",size:"large",onClick:Ee},i.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ze,ee,M){},pmY6:function(ze,ee,M){"use strict";M.d(ee,"h",function(){return b}),M.d(ee,"g",function(){return u}),M.d(ee,"f",function(){return p}),M.d(ee,"e",function(){return a}),M.d(ee,"i",function(){return o}),M.d(ee,"b",function(){return h}),M.d(ee,"a",function(){return l}),M.d(ee,"d",function(){return n}),M.d(ee,"c",function(){return s});var X=M("C/vA"),B=M("JYp7");const I=!1;let F=null;function S(d){F=d}if(I){const d="__is_disposable_tracked__";S(new class{trackDisposable(E){const D=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[d]||console.log(D)},3e3)}setParent(E,D){if(E&&E!==l.None)try{E[d]=!0}catch(T){}}markAsDisposed(E){if(E&&E!==l.None)try{E[d]=!0}catch(D){}}markAsSingleton(E){}})}function C(d){return F==null||F.trackDisposable(d),d}function P(d){F==null||F.markAsDisposed(d)}function y(d,E){F==null||F.setParent(d,E)}function t(d,E){if(!F)return;for(const D of d)F.setParent(D,E)}function b(d){return F==null||F.markAsSingleton(d),d}class i extends Error{constructor(d){super(`Encountered errors while disposing of store. Errors: [${d.join(", ")}]`);this.errors=d}}function u(d){return typeof d.dispose=="function"&&d.dispose.length===0}function p(d){if(B.a.is(d)){let E=[];for(const D of d)if(D)try{D.dispose()}catch(T){E.push(T)}if(E.length===1)throw E[0];if(E.length>1)throw new i(E);return Array.isArray(d)?[]:d}else if(d)return d.dispose(),d}function a(...d){const E=o(()=>p(d));return t(d,E),E}function o(d){const E=C({dispose:Object(X.a)(()=>{P(E),d()})});return E}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,C(this)}dispose(){if(this._isDisposed)return;P(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(d){if(!d)return d;if(d===this)throw new Error("Cannot register a disposable on itself!");return y(d,this),this._isDisposed?h.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(d),d}}h.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new h,C(this),y(this._store,this)}dispose(){P(this),this._store.dispose()}_register(d){if(d===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(d)}}l.None=Object.freeze({dispose(){}});class n{constructor(){this._isDisposed=!1,C(this)}get value(){return this._isDisposed?void 0:this._value}set value(d){var E;if(this._isDisposed||d===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),d&&y(d,this),this._value=d}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,P(this),(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}clearAndLeak(){const d=this._value;return this._value=void 0,d&&y(d,null),d}}class s{constructor(d){this.object=d}dispose(){}}},psGv:function(ze,ee,M){var X,B;(function(){var I;(function(){"use strict";var P=[,,function(i){function u(o){this.__parent=o,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=[]}u.prototype.clone_empty=function(){var o=new u(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},u.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},u.prototype.has_match=function(o){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(o))return!0;return!1},u.prototype.set_indent=function(o,h){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.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)},u.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},u.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(o){this.__items.push(o);var h=o.lastIndexOf(`
`);h!==-1?this.__character_count=o.length-h:this.__character_count+=o.length},u.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function p(o,h){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),h=h||"",o.indent_level>0&&(h=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}p.prototype.get_indent_size=function(o,h){var l=this.__base_string_length;return h=h||0,o<0&&(l=0),l+=o*this.__indent_size,l+=h,l},p.prototype.get_indent_string=function(o,h){var l=this.__base_string;return h=h||0,o<0&&(o=0,l=""),h+=o*this.__indent_size,this.__ensure_cache(h),l+=this.__cache[h],l},p.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var o=this.__cache.length,h=0,l="";this.__indent_size&&o>=this.__indent_size&&(h=Math.floor(o/this.__indent_size),o-=h*this.__indent_size,l=new Array(h+1).join(this.__indent_string)),o&&(l+=new Array(o+1).join(" ")),this.__cache.push(l)};function a(o,h){this.__indent_cache=new p(o,h),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(o,h){return this.__indent_cache.get_indent_string(o,h)},a.prototype.get_indent_size=function(o,h){return this.__indent_cache.get_indent_size(o,h)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(o){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
`);return o!==`
`&&(l=l.replace(/[\n]/g,o)),l},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(o,h){return o=o||0,h=h||0,this.next_line.set_indent(o,h),this.__lines.length>1?(this.current_line.set_indent(o,h),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(o){for(var h=0;h<o.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},a.prototype.remove_indent=function(o){for(var h=this.__lines.length;o<h;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&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},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(o,h){for(var l=this.__lines.length-2;l>=0;){var n=this.__lines[l];if(n.is_empty())break;if(n.item(0).indexOf(o)!==0&&n.item(-1)!==h){this.__lines.splice(l+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},i.exports.Output=a},function(i){function u(p,a,o,h){this.type=p,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=u},,,function(i){function u(o,h){this.raw_options=p(o,h),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"])}u.prototype._get_array=function(o,h){var l=this.raw_options[o],n=h||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(n=l.concat()):typeof l=="string"&&(n=l.split(/[^a-zA-Z0-9_\/\-]+/)),n},u.prototype._get_boolean=function(o,h){var l=this.raw_options[o],n=l===void 0?!!h:!!l;return n},u.prototype._get_characters=function(o,h){var l=this.raw_options[o],n=h||"";return typeof l=="string"&&(n=l.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),n},u.prototype._get_number=function(o,h){var l=this.raw_options[o];h=parseInt(h,10),isNaN(h)&&(h=0);var n=parseInt(l,10);return isNaN(n)&&(n=h),n},u.prototype._get_selection=function(o,h,l){var n=this._get_selection_list(o,h,l);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+h+`
You passed in: '`+this.raw_options[o]+"'");return n[0]},u.prototype._get_selection_list=function(o,h,l){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[h[0]],!this._is_valid_selection(l,h))throw new Error("Invalid Default Value!");var n=this._get_array(o,l);if(!this._is_valid_selection(n,h))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+h+`
You passed in: '`+this.raw_options[o]+"'");return n},u.prototype._is_valid_selection=function(o,h){return o.length&&h.length&&!o.some(function(l){return h.indexOf(l)===-1})};function p(o,h){var l={};o=a(o);var n;for(n in o)n!==h&&(l[n]=o[n]);if(h&&o[h])for(n in o[h])l[n]=o[h][n];return l}function a(o){var h={},l;for(l in o){var n=l.replace(/-/g,"_");h[n]=o[l]}return h}i.exports.Options=u,i.exports.normalizeOpts=a,i.exports.mergeOpts=p},,function(i){var u=RegExp.prototype.hasOwnProperty("sticky");function p(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position<this.__input_length},p.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},p.prototype.peek=function(a){var o=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(o=this.__input.charAt(a)),o},p.prototype.__match=function(a,o){a.lastIndex=o;var h=a.exec(this.__input);return h&&!(u&&a.sticky)&&(h.index!==o&&(h=null)),h},p.prototype.test=function(a,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(a,o):!1},p.prototype.testChar=function(a,o){var h=this.peek(o);return a.lastIndex=0,h!==null&&a.test(h)},p.prototype.match=function(a){var o=this.__match(a,this.__position);return o?this.__position+=o[0].length:o=null,o},p.prototype.read=function(a,o,h){var l="",n;return a&&(n=this.match(a),n&&(l+=n[0])),o&&(n||!a)&&(l+=this.readUntil(o,h)),l},p.prototype.readUntil=function(a,o){var h="",l=this.__position;a.lastIndex=this.__position;var n=a.exec(this.__input);return n?(l=n.index,o&&(l+=n[0].length)):l=this.__input_length,h=this.__input.substring(this.__position,l),this.__position=l,h},p.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},p.prototype.get_regexp=function(a,o){var h=null,l="g";return o&&u&&(l="y"),typeof a=="string"&&a!==""?h=new RegExp(a,l):a&&(h=new RegExp(a.source,l)),h},p.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},p.prototype.peekUntilAfter=function(a){var o=this.__position,h=this.readUntilAfter(a);return this.__position=o,h},p.prototype.lookBack=function(a){var o=this.__position-1;return o>=a.length&&this.__input.substring(o-a.length,o).toLowerCase()===a},i.exports.InputScanner=p},function(i,u,p){var a=p(8).InputScanner,o=p(3).Token,h=p(10).TokenStream,l=p(11).WhitespacePattern,n={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(d,E){this._input=new a(d),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var d,E=new o(n.START,""),D=null,T=[],k=new h;E.type!==n.EOF;){for(d=this._get_next_token(E,D);this._is_comment(d);)k.add(d),d=this._get_next_token(E,D);k.isEmpty()||(d.comments_before=k,k=new h),d.parent=D,this._is_opening(d)?(T.push(D),D=d):D&&this._is_closing(d,D)&&(d.opened=D,D.closed=d,D=T.pop(),d.parent=D),d.previous=E,E.next=d,this.__tokens.add(d),E=d}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(d,E){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(n.RAW,D):this._create_token(n.EOF,"")},s.prototype._is_comment=function(d){return!1},s.prototype._is_opening=function(d){return!1},s.prototype._is_closing=function(d,E){return!1},s.prototype._create_token=function(d,E){var D=new o(d,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=s,i.exports.TOKEN=n},function(i){function u(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}u.prototype.restart=function(){this.__position=0},u.prototype.isEmpty=function(){return this.__tokens_length===0},u.prototype.hasNext=function(){return this.__position<this.__tokens_length},u.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__tokens[this.__position],this.__position+=1),p},u.prototype.peek=function(p){var a=null;return p=p||0,p+=this.__position,p>=0&&p<this.__tokens_length&&(a=this.__tokens[p]),a},u.prototype.add=function(p){this.__parent_token&&(p.parent=this.__parent_token),this.__tokens.push(p),this.__tokens_length+=1},i.exports.TokenStream=u},function(i,u,p){var a=p(12).Pattern;function o(h,l){a.call(this,h,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new a,o.prototype.__set_whitespace_patterns=function(h,l){h+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var l=this.__split(this._newline_regexp,h);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return h},o.prototype.matching=function(h,l){var n=this._create();return n.__set_whitespace_patterns(h,l),n._update(),n},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(h,l){h.lastIndex=0;for(var n=0,s=[],d=h.exec(l);d;)s.push(l.substring(n,d.index)),n=d.index+d[0].length,d=h.exec(l);return n<l.length?s.push(l.substring(n,l.length)):s.push(""),s},i.exports.WhitespacePattern=o},function(i){function u(p,a){this._input=p,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}u.prototype.read=function(){var p=this._input.read(this._starting_pattern);return(!this._starting_pattern||p)&&(p+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),p},u.prototype.read_match=function(){return this._input.match(this._match_pattern)},u.prototype.until_after=function(p){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(p),a._update(),a},u.prototype.until=function(p){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(p),a._update(),a},u.prototype.starting_with=function(p){var a=this._create();return a._starting_pattern=this._input.get_regexp(p,!0),a._update(),a},u.prototype.matching=function(p){var a=this._create();return a._match_pattern=this._input.get_regexp(p,!0),a._update(),a},u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){},i.exports.Pattern=u},function(i){function u(p,a){p=typeof p=="string"?p:p.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(p+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(p+/\sbeautify\signore:end\s/.source+a,"g")}u.prototype.get_directives=function(p){if(!p.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(p);o;)a[o[1]]=o[2],o=this.__directive_pattern.exec(p);return a},u.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=u},function(i,u,p){var a=p(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(l,n){a.call(this,l,n),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),n&&(this.__template_pattern=this._input.get_regexp(n.__template_pattern),this._excluded=Object.assign(this._excluded,n._excluded),this._disabled=Object.assign(this._disabled,n._disabled));var s=new a(l);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),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}/)}}h.prototype=new a,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(l){var n=this._create();return n._disabled[l]=!0,n._update(),n},h.prototype.read_options=function(l){var n=this._create();for(var s in o)n._disabled[s]=l.templating.indexOf(s)===-1;return n._update(),n},h.prototype.exclude=function(l){var n=this._create();return n._excluded[l]=!0,n._update(),n},h.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 n=this._read_template();n;)this._match_pattern?n+=this._input.read(this._match_pattern):n+=this._input.readUntil(this.__template_pattern),l+=n,n=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},h.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("|")+")")},h.prototype._read_template=function(){var l="",n=this._input.peek();if(n==="<"){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 n==="{"&&(!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},i.exports.TemplatablePattern=h},,,,function(i,u,p){var a=p(19).Beautifier,o=p(20).Options;function h(l,n,s,d){var E=new a(l,n,s,d);return E.beautify()}i.exports=h,i.exports.defaultOptions=function(){return new o}},function(i,u,p){var a=p(20).Options,o=p(2).Output,h=p(21).Tokenizer,l=p(21).TOKEN,n=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,d=function(_,x){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=_.max_preserve_newlines,this.preserve_newlines=_.preserve_newlines,this._output=new o(_,x)};d.prototype.current_line_has_match=function(_){return this._output.current_line.has_match(_)},d.prototype.set_space_before_token=function(_,x){this._output.space_before_token=_,this._output.non_breaking_space=x},d.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},d.prototype.add_raw_token=function(_){this._output.add_raw_token(_)},d.prototype.print_preserved_newlines=function(_){var x=0;_.type!==l.TEXT&&_.previous.type!==l.TEXT&&(x=_.newlines?1:0),this.preserve_newlines&&(x=_.newlines<this.max_preserve_newlines+1?_.newlines:this.max_preserve_newlines+1);for(var g=0;g<x;g++)this.print_newline(g>0);return x!==0},d.prototype.traverse_whitespace=function(_){return _.whitespace_before||_.newlines?(this.print_preserved_newlines(_)||(this._output.space_before_token=!0),!0):!1},d.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},d.prototype.print_newline=function(_){this._output.add_new_line(_)},d.prototype.print_token=function(_){_.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(_.text))},d.prototype.indent=function(){this.indent_level++},d.prototype.get_full_indent=function(_){return _=this.indent_level+(_||0),_<1?"":this._output.get_indent_string(_)};var E=function(_){for(var x=null,g=_.next;g.type!==l.EOF&&_.closed!==g;){if(g.type===l.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===l.EQUALS&&g.next.next&&g.next.next.type===l.VALUE&&(x=g.next.next.text);break}g=g.next}return x},D=function(_,x){var g=null,j=null;return x.closed?(_==="script"?g="text/javascript":_==="style"&&(g="text/css"),g=E(x)||g,g.search("text/css")>-1?j="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?j="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?j="html":g.search(/test\/null/)>-1&&(j="null"),j):null};function T(_,x){return x.indexOf(_)!==-1}function k(_,x,g){this.parent=_||null,this.tag=x?x.tag_name:"",this.indent_level=g||0,this.parser_token=x||null}function w(_){this._printer=_,this._current_frame=null}w.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},w.prototype.record_tag=function(_){var x=new k(this._current_frame,_,this._printer.indent_level);this._current_frame=x},w.prototype._try_pop_frame=function(_){var x=null;return _&&(x=_.parser_token,this._printer.indent_level=_.indent_level,this._current_frame=_.parent),x},w.prototype._get_frame=function(_,x){for(var g=this._current_frame;g&&!(_.indexOf(g.tag)!==-1);){if(x&&x.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},w.prototype.try_pop=function(_,x){var g=this._get_frame([_],x);return this._try_pop_frame(g)},w.prototype.indent_to_tag=function(_){var x=this._get_frame(_);x&&(this._printer.indent_level=x.indent_level)};function v(_,x,g,j){this._source_text=_||"",x=x||{},this._js_beautify=g,this._css_beautify=j,this._tag_stack=null;var U=new a(x,"html");this._options=U,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"}v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,x=this._options.eol;this._options.eol==="auto"&&(x=`
`,_&&n.test(_)&&(x=_.match(n)[0])),_=_.replace(s,`
`);var g=_.match(/^[\t ]*/)[0],j={text:"",type:""},U=new c,R=new d(this._options,g),W=new h(_,this._options).tokenize();this._tag_stack=new w(R);for(var H=null,L=W.next();L.type!==l.EOF;)L.type===l.TAG_OPEN||L.type===l.COMMENT?(H=this._handle_tag_open(R,L,U,j),U=H):L.type===l.ATTRIBUTE||L.type===l.EQUALS||L.type===l.VALUE||L.type===l.TEXT&&!U.tag_complete?H=this._handle_inside_tag(R,L,U,W):L.type===l.TAG_CLOSE?H=this._handle_tag_close(R,L,U):L.type===l.TEXT?H=this._handle_text(R,L,U):R.add_raw_token(L),j=H,L=W.next();var G=R._output.get_code(x);return G},v.prototype._handle_tag_close=function(_,x,g){var j={text:x.text,type:x.type};return _.alignment_size=0,g.tag_complete=!0,_.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),g.is_unformatted?_.add_raw_token(x):(g.tag_start_char==="<"&&(_.set_space_before_token(x.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&_.print_newline(!1)),_.print_token(x)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(_.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&_.set_wrap_point(),j},v.prototype._handle_inside_tag=function(_,x,g,j){var U=g.has_wrapped_attrs,R={text:x.text,type:x.type};if(_.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),g.is_unformatted)_.add_raw_token(x);else if(g.tag_start_char==="{"&&x.type===l.TEXT)_.print_preserved_newlines(x)?(x.newlines=0,_.add_raw_token(x)):_.print_token(x);else{if(x.type===l.ATTRIBUTE?(_.set_space_before_token(!0),g.attr_count+=1):(x.type===l.EQUALS||x.type===l.VALUE&&x.previous.type===l.EQUALS)&&_.set_space_before_token(!1),x.type===l.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(_.traverse_whitespace(x),U=U||x.newlines!==0),this._is_wrap_attributes_force)){var W=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var H=!0,L=0,G;do{if(G=j.peek(L),G.type===l.ATTRIBUTE){H=!1;break}L+=1}while(L<4&&G.type!==l.EOF&&G.type!==l.TAG_CLOSE);W=!H}W&&(_.print_newline(!1),U=!0)}_.print_token(x),U=U||_.previous_token_wrapped(),g.has_wrapped_attrs=U}return R},v.prototype._handle_text=function(_,x,g){var j={text:x.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(_,x,g):g.is_unformatted||g.is_content_unformatted?_.add_raw_token(x):(_.traverse_whitespace(x),_.print_token(x)),j},v.prototype._print_custom_beatifier_text=function(_,x,g){var j=this;if(x.text!==""){var U=x.text,R,W=1,H="",L="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?R=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?R=this._css_beautify:g.custom_beautifier_name==="html"&&(R=function(ce,xe){var Te=new v(ce,xe,j._js_beautify,j._css_beautify);return Te.beautify()}),this._options.indent_scripts==="keep"?W=0:this._options.indent_scripts==="separate"&&(W=-_.indent_level);var G=_.get_full_indent(W);if(U=U.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&U[0]==="<"&&U.match(/^(<!--|<!\[CDATA\[)/)){var z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(U);if(!z){_.add_raw_token(x);return}H=G+z[1]+`
`,U=z[4],z[5]&&(L=G+z[5]),U=U.replace(/\n[ \t]*$/,""),(z[2]||z[3].indexOf(`
`)!==-1)&&(z=z[3].match(/[ \t]+$/),z&&(x.whitespace_before=z[0]))}if(U)if(R){var J=function(){this.eol=`
`};J.prototype=this._options.raw_options;var te=new J;U=R(G+U,te)}else{var _e=x.whitespace_before;_e&&(U=U.replace(new RegExp(`
(`+_e+")?","g"),`
`)),U=G+U.replace(/\n/g,`
`+G)}H&&(U?U=H+U+`
`+L:U=H+L),_.print_newline(!1),U&&(x.text=U,x.whitespace_before="",x.newlines=0,_.add_raw_token(x),_.print_newline(!0))}},v.prototype._handle_tag_open=function(_,x,g,j){var U=this._get_tag_open_token(x);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&x.type===l.TAG_OPEN&&x.text.indexOf("</")===0?(_.add_raw_token(x),U.start_tag_token=this._tag_stack.try_pop(U.tag_name)):(_.traverse_whitespace(x),this._set_tag_position(_,x,U,g,j),U.is_inline_element||_.set_wrap_point(),_.print_token(x)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(U.alignment_size=x.text.length+1),!U.tag_complete&&!U.is_unformatted&&(_.alignment_size=U.alignment_size),U};var c=function(_,x){if(this.parent=_||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!x)this.tag_complete=!0;else{var g;this.tag_start_char=x.text[0],this.text=x.text,this.tag_start_char==="<"?(g=x.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=x.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[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)))}};v.prototype._get_tag_open_token=function(_){var x=new c(this._tag_stack.get_parser_token(),_);return x.alignment_size=this._options.wrap_attributes_indent_size,x.is_end_tag=x.is_end_tag||T(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&&T(x.tag_check,this._options.unformatted),x.is_content_unformatted=!x.is_empty_element&&T(x.tag_check,this._options.content_unformatted),x.is_inline_element=T(x.tag_name,this._options.inline)||x.tag_name.includes("-")||x.tag_start_char==="{",x},v.prototype._set_tag_position=function(_,x,g,j,U){if(g.is_empty_element||(g.is_end_tag?g.start_tag_token=this._tag_stack.try_pop(g.tag_name):(this._do_optional_end_element(g)&&(g.is_inline_element||_.print_newline(!1)),this._tag_stack.record_tag(g),(g.tag_name==="script"||g.tag_name==="style")&&!(g.is_unformatted||g.is_content_unformatted)&&(g.custom_beautifier_name=D(g.tag_check,x)))),T(g.tag_check,this._options.extra_liners)&&(_.print_newline(!1),_._output.just_added_blankline()||_.print_newline(!0)),g.is_empty_element){if(g.tag_start_char==="{"&&g.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),g.indent_content=!0;var R=_.current_line_has_match(/{{#if/);R||_.print_newline(!1)}g.tag_name==="!--"&&U.type===l.TAG_CLOSE&&j.is_end_tag&&g.text.indexOf(`
`)===-1||(g.is_inline_element||g.is_unformatted||_.print_newline(!1),this._calcluate_parent_multiline(_,g))}else if(g.is_end_tag){var W=!1;W=g.start_tag_token&&g.start_tag_token.multiline_content,W=W||!g.is_inline_element&&!(j.is_inline_element||j.is_unformatted)&&!(U.type===l.TAG_CLOSE&&g.start_tag_token===j)&&U.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(W=!1),W&&_.print_newline(!1)}else g.indent_content=!g.custom_beautifier_name,g.tag_start_char==="<"&&(g.tag_name==="html"?g.indent_content=this._options.indent_inner_html:g.tag_name==="head"?g.indent_content=this._options.indent_head_inner_html:g.tag_name==="body"&&(g.indent_content=this._options.indent_body_inner_html)),!(g.is_inline_element||g.is_unformatted)&&(U.type!=="TK_CONTENT"||g.is_content_unformatted)&&_.print_newline(!1),this._calcluate_parent_multiline(_,g)},v.prototype._calcluate_parent_multiline=function(_,x){x.parent&&_._output.just_added_newline()&&!((x.is_inline_element||x.is_unformatted)&&x.parent.is_inline_element)&&(x.parent.multiline_content=!0)};var f=["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"],m=["a","audio","del","ins","map","noscript","video"];v.prototype._do_optional_end_element=function(_){var x=null;if(_.is_empty_element||!_.is_start_tag||!_.parent)return;if(_.tag_name==="body")x=x||this._tag_stack.try_pop("head");else if(_.tag_name==="li")x=x||this._tag_stack.try_pop("li",["ol","ul"]);else if(_.tag_name==="dd"||_.tag_name==="dt")x=x||this._tag_stack.try_pop("dt",["dl"]),x=x||this._tag_stack.try_pop("dd",["dl"]);else if(_.parent.tag_name==="p"&&f.indexOf(_.tag_name)!==-1){var g=_.parent.parent;(!g||m.indexOf(g.tag_name)===-1)&&(x=x||this._tag_stack.try_pop("p"))}else _.tag_name==="rp"||_.tag_name==="rt"?(x=x||this._tag_stack.try_pop("rt",["ruby","rtc"]),x=x||this._tag_stack.try_pop("rp",["ruby","rtc"])):_.tag_name==="optgroup"?x=x||this._tag_stack.try_pop("optgroup",["select"]):_.tag_name==="option"?x=x||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):_.tag_name==="colgroup"?x=x||this._tag_stack.try_pop("caption",["table"]):_.tag_name==="thead"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"])):_.tag_name==="tbody"||_.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"])):_.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"])):(_.tag_name==="th"||_.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 _.parent=this._tag_stack.get_parser_token(),x},i.exports.Beautifier=v},function(i,u,p){var a=p(6).Options;function o(h){a.call(this,h,"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"])}o.prototype=new a,i.exports.Options=o},function(i,u,p){var a=p(9).Tokenizer,o=p(9).TOKEN,h=p(13).Directives,l=p(14).TemplatablePattern,n=p(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:o.START,RAW:o.RAW,EOF:o.EOF},d=new h(/<\!--/,/-->/),E=function(D,T){a.call(this,D,T),this._current_tag_name="";var k=new l(this._input).read_options(this._options),w=new n(this._input);if(this.__patterns={word:k.until(/[\n\r\t <]/),single_quote:k.until_after(/'/),double_quote:k.until_after(/"/),attribute:k.until(/[\n\r\t =>]|\/>/),element_name:k.until(/[\n\r\t >\/]/),handlebars_comment:w.starting_with(/{{!--/).until_after(/--}}/),handlebars:w.starting_with(/{{/).until_after(/}}/),handlebars_open:w.until(/[\n\r\t }]/),handlebars_raw_close:w.until(/}}/),comment:w.starting_with(/<!--/).until_after(/-->/),cdata:w.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:w.starting_with(/<!\[/).until_after(/]>/),processing:w.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 v=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=w.matching(v).until_after(v)}};E.prototype=new a,E.prototype._is_comment=function(D){return!1},E.prototype._is_opening=function(D){return D.type===s.TAG_OPEN},E.prototype._is_closing=function(D,T){return D.type===s.TAG_CLOSE&&T&&((D.text===">"||D.text==="/>")&&T.text[0]==="<"||D.text==="}}"&&T.text[0]==="{"&&T.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(D,T){var k=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(s.EOF,""):(k=k||this._read_open_handlebars(w,T),k=k||this._read_attribute(w,D,T),k=k||this._read_close(w,T),k=k||this._read_raw_content(w,D,T),k=k||this._read_content_word(w),k=k||this._read_comment_or_cdata(w),k=k||this._read_processing(w),k=k||this._read_open(w,T),k=k||this._create_token(s.UNKNOWN,this._input.next()),k)},E.prototype._read_comment_or_cdata=function(D){var T=null,k=null,w=null;if(D==="<"){var v=this._input.peek(1);v==="!"&&(k=this.__patterns.comment.read(),k?(w=d.get_directives(k),w&&w.ignore==="start"&&(k+=d.readIgnored(this._input))):k=this.__patterns.cdata.read()),k&&(T=this._create_token(s.COMMENT,k),T.directives=w)}return T},E.prototype._read_processing=function(D){var T=null,k=null,w=null;if(D==="<"){var v=this._input.peek(1);(v==="!"||v==="?")&&(k=this.__patterns.conditional_comment.read(),k=k||this.__patterns.processing.read()),k&&(T=this._create_token(s.COMMENT,k),T.directives=w)}return T},E.prototype._read_open=function(D,T){var k=null,w=null;return T||D==="<"&&(k=this._input.next(),this._input.peek()==="/"&&(k+=this._input.next()),k+=this.__patterns.element_name.read(),w=this._create_token(s.TAG_OPEN,k)),w},E.prototype._read_open_handlebars=function(D,T){var k=null,w=null;return T||this._options.indent_handlebars&&D==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(k=this.__patterns.handlebars_comment.read(),k=k||this.__patterns.handlebars.read(),w=this._create_token(s.COMMENT,k)):(k=this.__patterns.handlebars_open.read(),w=this._create_token(s.TAG_OPEN,k))),w},E.prototype._read_close=function(D,T){var k=null,w=null;return T&&(T.text[0]==="<"&&(D===">"||D==="/"&&this._input.peek(1)===">")?(k=this._input.next(),D==="/"&&(k+=this._input.next()),w=this._create_token(s.TAG_CLOSE,k)):T.text[0]==="{"&&D==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),w=this._create_token(s.TAG_CLOSE,"}}"))),w},E.prototype._read_attribute=function(D,T,k){var w=null,v="";if(k&&k.text[0]==="<")if(D==="=")w=this._create_token(s.EQUALS,this._input.next());else if(D==='"'||D==="'"){var c=this._input.next();D==='"'?c+=this.__patterns.double_quote.read():c+=this.__patterns.single_quote.read(),w=this._create_token(s.VALUE,c)}else v=this.__patterns.attribute.read(),v&&(T.type===s.EQUALS?w=this._create_token(s.VALUE,v):w=this._create_token(s.ATTRIBUTE,v));return w},E.prototype._is_content_unformatted=function(D){return this._options.void_elements.indexOf(D)===-1&&(this._options.content_unformatted.indexOf(D)!==-1||this._options.unformatted.indexOf(D)!==-1)},E.prototype._read_raw_content=function(D,T,k){var w="";if(k&&k.text[0]==="{")w=this.__patterns.handlebars_raw_close.read();else if(T.type===s.TAG_CLOSE&&T.opened.text[0]==="<"&&T.text[0]!=="/"){var v=T.opened.text.substr(1).toLowerCase();if(v==="script"||v==="style"){var c=this._read_comment_or_cdata(D);if(c)return c.type=s.TEXT,c;w=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(v)&&(w=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig")))}return w?this._create_token(s.TEXT,w):null},E.prototype._read_content_word=function(D){var T="";if(this._options.unformatted_content_delimiter&&(D===this._options.unformatted_content_delimiter[0]&&(T=this.__patterns.unformatted_content_delimiter.read())),T||(T=this.__patterns.word.read()),T)return this._create_token(s.TEXT,T)},i.exports.Tokenizer=E,i.exports.TOKEN=s}],y={};function t(i){var u=y[i];if(u!==void 0)return u.exports;var p=y[i]={exports:{}};return P[i](p,p.exports,t),p.exports}var b=t(18);I=b})();var F=I;if(!0)!(X=[M,M("6UM0"),M("TXwP")],B=function(P){var y=M("6UM0"),t=M("TXwP");return{html_beautify:function(b,i){return F(b,i,y.js_beautify,t.css_beautify)}}}.apply(ee,X),B!==void 0&&(ze.exports=B));else var S,C})()},pzxd:function(ze,ee,M){var X=M("bYtY"),B=X.retrieve2,I=X.retrieve3,F=X.each,S=X.normalizeCssArray,C=X.isString,P=X.isObject,y=M("6GrX"),t=M("VpOo"),b=M("Xnb7"),i=M("fW2E"),u=M("gut8"),p=u.ContextCachedBy,a=u.WILL_BE_RESTORED,o=y.DEFAULT_FONT,h={left:1,right:1,center:1},l={top:1,bottom:1,middle:1},n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],s={},d={};function E(G){return D(G),F(G.rich,D),G}function D(G){if(G){G.font=y.makeFont(G);var z=G.textAlign;z==="middle"&&(z="center"),G.textAlign=z==null||h[z]?z:"left";var J=G.textVerticalAlign||G.textBaseline;J==="center"&&(J="middle"),G.textVerticalAlign=J==null||l[J]?J:"top";var te=G.textPadding;te&&(G.textPadding=S(G.textPadding))}}function T(G,z,J,te,_e,ce){te.rich?w(G,z,J,te,_e,ce):k(G,z,J,te,_e,ce)}function k(G,z,J,te,_e,ce){"use strict";var xe=m(te),Te,je=!1,Ce=z.__attrCachedBy===p.PLAIN_TEXT;ce!==a?(ce&&(Te=ce.style,je=!xe&&Ce&&Te),z.__attrCachedBy=xe?p.NONE:p.PLAIN_TEXT):Ce&&(z.__attrCachedBy=p.NONE);var Z=te.font||o;(!je||Z!==(Te.font||o))&&(z.font=Z);var K=G.__computedFont;G.__styleFont!==Z&&(G.__styleFont=Z,K=G.__computedFont=z.font);var V=te.textPadding,$=te.textLineHeight,q=G.__textCotentBlock;(!q||G.__dirtyText)&&(q=G.__textCotentBlock=y.parsePlainText(J,K,V,$,te.truncate));var Q=q.outerHeight,ge=q.lines,Oe=q.lineHeight,Ye=g(d,G,te,_e),le=Ye.baseX,Ee=Ye.baseY,Re=Ye.textAlign||"left",He=Ye.textVerticalAlign;c(z,te,_e,le,Ee);var et=y.adjustTextY(Ee,Q,He),ut=le,Dt=et;if(xe||V){var We=y.getWidth(J,K),Mt=We;V&&(Mt+=V[1]+V[3]);var Wt=y.adjustTextX(le,Mt,Re);xe&&_(G,z,te,Wt,et,Mt,Q),V&&(ut=H(le,Re,V),Dt+=V[0])}z.textAlign=Re,z.textBaseline="middle",z.globalAlpha=te.opacity||1;for(var Ne=0;Ne<n.length;Ne++){var Pe=n[Ne],it=Pe[0],gt=Pe[1],fe=te[it];(!je||fe!==Te[it])&&(z[gt]=i(z,gt,fe||Pe[2]))}Dt+=Oe/2;var ae=te.textStrokeWidth,se=je?Te.textStrokeWidth:null,de=!je||ae!==se,ve=!je||de||te.textStroke!==Te.textStroke,ie=U(te.textStroke,ae),oe=R(te.textFill);if(ie&&(de&&(z.lineWidth=ae),ve&&(z.strokeStyle=ie)),oe&&((!je||te.textFill!==Te.textFill)&&(z.fillStyle=oe)),ge.length===1)ie&&z.strokeText(ge[0],ut,Dt),oe&&z.fillText(ge[0],ut,Dt);else for(var Ne=0;Ne<ge.length;Ne++)ie&&z.strokeText(ge[Ne],ut,Dt),oe&&z.fillText(ge[Ne],ut,Dt),Dt+=Oe}function w(G,z,J,te,_e,ce){ce!==a&&(z.__attrCachedBy=p.NONE);var xe=G.__textCotentBlock;(!xe||G.__dirtyText)&&(xe=G.__textCotentBlock=y.parseRichText(J,te)),v(G,z,xe,te,_e)}function v(G,z,J,te,_e){var ce=J.width,xe=J.outerWidth,Te=J.outerHeight,je=te.textPadding,Ce=g(d,G,te,_e),Z=Ce.baseX,K=Ce.baseY,V=Ce.textAlign,$=Ce.textVerticalAlign;c(z,te,_e,Z,K);var q=y.adjustTextX(Z,xe,V),Q=y.adjustTextY(K,Te,$),ge=q,Oe=Q;je&&(ge+=je[3],Oe+=je[0]);var Ye=ge+ce;m(te)&&_(G,z,te,q,Q,xe,Te);for(var le=0;le<J.lines.length;le++){for(var Ee=J.lines[le],Re=Ee.tokens,He=Re.length,et=Ee.lineHeight,ut=Ee.width,Dt=0,We=ge,Mt=Ye,Wt=He-1,Ne;Dt<He&&(Ne=Re[Dt],!Ne.textAlign||Ne.textAlign==="left");)f(G,z,Ne,te,et,Oe,We,"left"),ut-=Ne.width,We+=Ne.width,Dt++;for(;Wt>=0&&(Ne=Re[Wt],Ne.textAlign==="right");)f(G,z,Ne,te,et,Oe,Mt,"right"),ut-=Ne.width,Mt-=Ne.width,Wt--;for(We+=(ce-(We-ge)-(Ye-Mt)-ut)/2;Dt<=Wt;)Ne=Re[Dt],f(G,z,Ne,te,et,Oe,We+Ne.width/2,"center"),We+=Ne.width,Dt++;Oe+=et}}function c(G,z,J,te,_e){if(J&&z.textRotation){var ce=z.textOrigin;ce==="center"?(te=J.width/2+J.x,_e=J.height/2+J.y):ce&&(te=ce[0]+J.x,_e=ce[1]+J.y),G.translate(te,_e),G.rotate(-z.textRotation),G.translate(-te,-_e)}}function f(G,z,J,te,_e,ce,xe,Te){var je=te.rich[J.styleName]||{};je.text=J.text;var Ce=J.textVerticalAlign,Z=ce+_e/2;Ce==="top"?Z=ce+J.height/2:Ce==="bottom"&&(Z=ce+_e-J.height/2),!J.isLineHolder&&m(je)&&_(G,z,je,Te==="right"?xe-J.width:Te==="center"?xe-J.width/2:xe,Z-J.height/2,J.width,J.height);var K=J.textPadding;K&&(xe=H(xe,Te,K),Z-=J.height/2-K[2]-J.textHeight/2),j(z,"shadowBlur",I(je.textShadowBlur,te.textShadowBlur,0)),j(z,"shadowColor",je.textShadowColor||te.textShadowColor||"transparent"),j(z,"shadowOffsetX",I(je.textShadowOffsetX,te.textShadowOffsetX,0)),j(z,"shadowOffsetY",I(je.textShadowOffsetY,te.textShadowOffsetY,0)),j(z,"textAlign",Te),j(z,"textBaseline","middle"),j(z,"font",J.font||o);var V=U(je.textStroke||te.textStroke,q),$=R(je.textFill||te.textFill),q=B(je.textStrokeWidth,te.textStrokeWidth);V&&(j(z,"lineWidth",q),j(z,"strokeStyle",V),z.strokeText(J.text,xe,Z)),$&&(j(z,"fillStyle",$),z.fillText(J.text,xe,Z))}function m(G){return!!(G.textBackgroundColor||G.textBorderWidth&&G.textBorderColor)}function _(G,z,J,te,_e,ce,xe){var Te=J.textBackgroundColor,je=J.textBorderWidth,Ce=J.textBorderColor,Z=C(Te);if(j(z,"shadowBlur",J.textBoxShadowBlur||0),j(z,"shadowColor",J.textBoxShadowColor||"transparent"),j(z,"shadowOffsetX",J.textBoxShadowOffsetX||0),j(z,"shadowOffsetY",J.textBoxShadowOffsetY||0),Z||je&&Ce){z.beginPath();var K=J.textBorderRadius;K?t.buildPath(z,{x:te,y:_e,width:ce,height:xe,r:K}):z.rect(te,_e,ce,xe),z.closePath()}if(Z)if(j(z,"fillStyle",Te),J.fillOpacity!=null){var V=z.globalAlpha;z.globalAlpha=J.fillOpacity*J.opacity,z.fill(),z.globalAlpha=V}else z.fill();else if(P(Te)){var $=Te.image;$=b.createOrUpdateImage($,null,G,x,Te),$&&b.isImageReady($)&&z.drawImage($,te,_e,ce,xe)}if(je&&Ce)if(j(z,"lineWidth",je),j(z,"strokeStyle",Ce),J.strokeOpacity!=null){var V=z.globalAlpha;z.globalAlpha=J.strokeOpacity*J.opacity,z.stroke(),z.globalAlpha=V}else z.stroke()}function x(G,z){z.image=G}function g(G,z,J,te){var _e=J.x||0,ce=J.y||0,xe=J.textAlign,Te=J.textVerticalAlign;if(te){var je=J.textPosition;if(je instanceof Array)_e=te.x+W(je[0],te.width),ce=te.y+W(je[1],te.height);else{var Ce=z&&z.calculateTextPosition?z.calculateTextPosition(s,J,te):y.calculateTextPosition(s,J,te);_e=Ce.x,ce=Ce.y,xe=xe||Ce.textAlign,Te=Te||Ce.textVerticalAlign}var Z=J.textOffset;Z&&(_e+=Z[0],ce+=Z[1])}return G=G||{},G.baseX=_e,G.baseY=ce,G.textAlign=xe,G.textVerticalAlign=Te,G}function j(G,z,J){return G[z]=i(G,z,J),G[z]}function U(G,z){return G==null||z<=0||G==="transparent"||G==="none"?null:G.image||G.colorStops?"#000":G}function R(G){return G==null||G==="none"?null:G.image||G.colorStops?"#000":G}function W(G,z){return typeof G=="string"?G.lastIndexOf("%")>=0?parseFloat(G)/100*z:parseFloat(G):G}function H(G,z,J){return z==="right"?G-J[1]:z==="center"?G+J[3]/2-J[1]/2:G+J[3]}function L(G,z){return G!=null&&(G||z.textBackgroundColor||z.textBorderWidth&&z.textBorderColor||z.textPadding)}ee.normalizeTextStyle=E,ee.renderText=T,ee.getBoxPosition=g,ee.getStroke=U,ee.getFill=R,ee.parsePercent=W,ee.needDrawText=L},qH13:function(ze,ee,M){var X=M("ItGF"),B=M("QBsz"),I=B.applyTransform,F=M("mFDi"),S=M("Qe9p"),C=M("6GrX"),P=M("pzxd"),y=M("ni6a"),t=M("Gev7"),b=M("Dagg"),i=M("dqUG"),u=M("y+Vt"),p=M("IMiH"),a=M("QuXc"),o=M("06Qe"),h=p.CMD,l=Math.round,n=Math.sqrt,s=Math.abs,d=Math.cos,E=Math.sin,D=Math.max;if(!X.canvasSupported){var T=",",k="progid:DXImageTransform.Microsoft",w=21600,v=w/2,c=1e5,f=1e3,m=function(le){le.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",le.coordsize=w+","+w,le.coordorigin="0,0"},_=function(le){return String(le).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},x=function(le,Ee,Re){return"rgb("+[le,Ee,Re].join(",")+")"},g=function(le,Ee){Ee&&le&&Ee.parentNode!==le&&le.appendChild(Ee)},j=function(le,Ee){Ee&&le&&Ee.parentNode===le&&le.removeChild(Ee)},U=function(le,Ee,Re){return(parseFloat(le)||0)*c+(parseFloat(Ee)||0)*f+Re},R=P.parsePercent,W=function(le,Ee,Re){var He=S.parse(Ee);Re=+Re,isNaN(Re)&&(Re=1),He&&(le.color=x(He[0],He[1],He[2]),le.opacity=Re*He[3])},H=function(le){var Ee=S.parse(le);return[x(Ee[0],Ee[1],Ee[2]),Ee[3]]},L=function(le,Ee,Re){var He=Ee.fill;if(He!=null)if(He instanceof a){var et,ut=0,Dt=[0,0],We=0,Mt=1,Wt=Re.getBoundingRect(),Ne=Wt.width,Pe=Wt.height;if(He.type==="linear"){et="gradient";var it=Re.transform,gt=[He.x*Ne,He.y*Pe],fe=[He.x2*Ne,He.y2*Pe];it&&(I(gt,gt,it),I(fe,fe,it));var ae=fe[0]-gt[0],se=fe[1]-gt[1];ut=Math.atan2(ae,se)*180/Math.PI,ut<0&&(ut+=360),ut<1e-6&&(ut=0)}else{et="gradientradial";var gt=[He.x*Ne,He.y*Pe],it=Re.transform,de=Re.scale,ve=Ne,ie=Pe;Dt=[(gt[0]-Wt.x)/ve,(gt[1]-Wt.y)/ie],it&&I(gt,gt,it),ve/=de[0]*w,ie/=de[1]*w;var oe=D(ve,ie);We=2*0/oe,Mt=2*He.r/oe-We}var pe=He.colorStops.slice();pe.sort(function(ot,Se){return ot.offset-Se.offset});for(var we=pe.length,Ae=[],Me=[],rt=0;rt<we;rt++){var Pt=pe[rt],Xt=H(Pt.color);Me.push(Pt.offset*Mt+We+" "+Xt[0]),(rt===0||rt===we-1)&&Ae.push(Xt)}if(we>=2){var lt=Ae[0][0],zt=Ae[1][0],mt=Ae[0][1]*Ee.opacity,_t=Ae[1][1]*Ee.opacity;le.type=et,le.method="none",le.focus="100%",le.angle=ut,le.color=lt,le.color2=zt,le.colors=Me.join(","),le.opacity=_t,le.opacity2=mt}et==="radial"&&(le.focusposition=Dt.join(","))}else W(le,He,Ee.opacity)},G=function(le,Ee){Ee.lineDash&&(le.dashstyle=Ee.lineDash.join(" ")),Ee.stroke!=null&&!(Ee.stroke instanceof a)&&W(le,Ee.stroke,Ee.opacity)},z=function(le,Ee,Re,He){var et=Ee==="fill",ut=le.getElementsByTagName(Ee)[0];Re[Ee]!=null&&Re[Ee]!=="none"&&(et||!et&&Re.lineWidth)?(le[et?"filled":"stroked"]="true",Re[Ee]instanceof a&&j(le,ut),ut||(ut=o.createNode(Ee)),et?L(ut,Re,He):G(ut,Re),g(le,ut)):(le[et?"filled":"stroked"]="false",j(le,ut))},J=[[],[],[]],te=function(le,Ee){var Re=h.M,He=h.C,et=h.L,ut=h.A,Dt=h.Q,We=[],Mt,Wt,Ne,Pe,it,gt,fe=le.data,ae=le.len();for(Pe=0;Pe<ae;){Ne=fe[Pe++],Wt="",Mt=0;switch(Ne){case Re:Wt=" m ",Mt=1,it=fe[Pe++],gt=fe[Pe++],J[0][0]=it,J[0][1]=gt;break;case et:Wt=" l ",Mt=1,it=fe[Pe++],gt=fe[Pe++],J[0][0]=it,J[0][1]=gt;break;case Dt:case He:Wt=" c ",Mt=3;var se=fe[Pe++],de=fe[Pe++],ve=fe[Pe++],ie=fe[Pe++],oe,pe;Ne===Dt?(oe=ve,pe=ie,ve=(ve+2*se)/3,ie=(ie+2*de)/3,se=(it+2*se)/3,de=(gt+2*de)/3):(oe=fe[Pe++],pe=fe[Pe++]),J[0][0]=se,J[0][1]=de,J[1][0]=ve,J[1][1]=ie,J[2][0]=oe,J[2][1]=pe,it=oe,gt=pe;break;case ut:var we=0,Ae=0,Me=1,rt=1,Pt=0;Ee&&(we=Ee[4],Ae=Ee[5],Me=n(Ee[0]*Ee[0]+Ee[1]*Ee[1]),rt=n(Ee[2]*Ee[2]+Ee[3]*Ee[3]),Pt=Math.atan2(-Ee[1]/rt,Ee[0]/Me));var Xt=fe[Pe++],lt=fe[Pe++],zt=fe[Pe++],mt=fe[Pe++],_t=fe[Pe++]+Pt,ot=fe[Pe++]+_t+Pt;Pe++;var Se=fe[Pe++],Ue=Xt+d(_t)*zt,At=lt+E(_t)*mt,se=Xt+d(ot)*zt,de=lt+E(ot)*mt,pt=Se?" wa ":" at ";Math.abs(Ue-se)<1e-4&&(Math.abs(ot-_t)>.01?Se&&(Ue+=270/w):Math.abs(At-lt)<1e-4?Se&&Ue<Xt||!Se&&Ue>Xt?de-=270/w:de+=270/w:Se&&At<lt||!Se&&At>lt?se+=270/w:se-=270/w),We.push(pt,l(((Xt-zt)*Me+we)*w-v),T,l(((lt-mt)*rt+Ae)*w-v),T,l(((Xt+zt)*Me+we)*w-v),T,l(((lt+mt)*rt+Ae)*w-v),T,l((Ue*Me+we)*w-v),T,l((At*rt+Ae)*w-v),T,l((se*Me+we)*w-v),T,l((de*rt+Ae)*w-v)),it=se,gt=de;break;case h.R:var jt=J[0],Gt=J[1];jt[0]=fe[Pe++],jt[1]=fe[Pe++],Gt[0]=jt[0]+fe[Pe++],Gt[1]=jt[1]+fe[Pe++],Ee&&(I(jt,jt,Ee),I(Gt,Gt,Ee)),jt[0]=l(jt[0]*w-v),Gt[0]=l(Gt[0]*w-v),jt[1]=l(jt[1]*w-v),Gt[1]=l(Gt[1]*w-v),We.push(" m ",jt[0],T,jt[1]," l ",Gt[0],T,jt[1]," l ",Gt[0],T,Gt[1]," l ",jt[0],T,Gt[1]);break;case h.Z:We.push(" x ")}if(Mt>0){We.push(Wt);for(var Ze=0;Ze<Mt;Ze++){var at=J[Ze];Ee&&I(at,at,Ee),We.push(l(at[0]*w-v),T,l(at[1]*w-v),Ze<Mt-1?T:"")}}}return We.join("")};u.prototype.brushVML=function(le){var Ee=this.style,Re=this._vmlEl;Re||(Re=o.createNode("shape"),m(Re),this._vmlEl=Re),z(Re,"fill",Ee,this),z(Re,"stroke",Ee,this);var He=this.transform,et=He!=null,ut=Re.getElementsByTagName("stroke")[0];if(ut){var Dt=Ee.lineWidth;if(et&&!Ee.strokeNoScale){var We=He[0]*He[3]-He[1]*He[2];Dt*=n(s(We))}ut.weight=Dt+"px"}var Mt=this.path||(this.path=new p);this.__dirtyPath&&(Mt.beginPath(),Mt.subPixelOptimize=!1,this.buildPath(Mt,this.shape),Mt.toStatic(),this.__dirtyPath=!1),Re.path=te(Mt,this.transform),Re.style.zIndex=U(this.zlevel,this.z,this.z2),g(le,Re),Ee.text!=null?this.drawRectText(le,this.getBoundingRect()):this.removeRectText(le)},u.prototype.onRemove=function(le){j(le,this._vmlEl),this.removeRectText(le)},u.prototype.onAdd=function(le){g(le,this._vmlEl),this.appendRectText(le)};var _e=function(le){return typeof le=="object"&&le.tagName&&le.tagName.toUpperCase()==="IMG"};b.prototype.brushVML=function(le){var Ee=this.style,Re=Ee.image,He,et;if(_e(Re)){var ut=Re.src;if(ut===this._imageSrc)He=this._imageWidth,et=this._imageHeight;else{var Dt=Re.runtimeStyle,We=Dt.width,Mt=Dt.height;Dt.width="auto",Dt.height="auto",He=Re.width,et=Re.height,Dt.width=We,Dt.height=Mt,this._imageSrc=ut,this._imageWidth=He,this._imageHeight=et}Re=ut}else Re===this._imageSrc&&(He=this._imageWidth,et=this._imageHeight);if(!Re)return;var Wt=Ee.x||0,Ne=Ee.y||0,Pe=Ee.width,it=Ee.height,gt=Ee.sWidth,fe=Ee.sHeight,ae=Ee.sx||0,se=Ee.sy||0,de=gt&&fe,ve=this._vmlEl;ve||(ve=o.doc.createElement("div"),m(ve),this._vmlEl=ve);var ie=ve.style,oe=!1,pe,we=1,Ae=1;if(this.transform&&(pe=this.transform,we=n(pe[0]*pe[0]+pe[1]*pe[1]),Ae=n(pe[2]*pe[2]+pe[3]*pe[3]),oe=pe[1]||pe[2]),oe){var Me=[Wt,Ne],rt=[Wt+Pe,Ne],Pt=[Wt,Ne+it],Xt=[Wt+Pe,Ne+it];I(Me,Me,pe),I(rt,rt,pe),I(Pt,Pt,pe),I(Xt,Xt,pe);var lt=D(Me[0],rt[0],Pt[0],Xt[0]),zt=D(Me[1],rt[1],Pt[1],Xt[1]),mt=[];mt.push("M11=",pe[0]/we,T,"M12=",pe[2]/Ae,T,"M21=",pe[1]/we,T,"M22=",pe[3]/Ae,T,"Dx=",l(Wt*we+pe[4]),T,"Dy=",l(Ne*Ae+pe[5])),ie.padding="0 "+l(lt)+"px "+l(zt)+"px 0",ie.filter=k+".Matrix("+mt.join("")+", SizingMethod=clip)"}else pe&&(Wt=Wt*we+pe[4],Ne=Ne*Ae+pe[5]),ie.filter="",ie.left=l(Wt)+"px",ie.top=l(Ne)+"px";var _t=this._imageEl,ot=this._cropEl;_t||(_t=o.doc.createElement("div"),this._imageEl=_t);var Se=_t.style;if(de){if(He&&et)Se.width=l(we*He*Pe/gt)+"px",Se.height=l(Ae*et*it/fe)+"px";else{var Ue=new Image,At=this;Ue.onload=function(){Ue.onload=null,He=Ue.width,et=Ue.height,Se.width=l(we*He*Pe/gt)+"px",Se.height=l(Ae*et*it/fe)+"px",At._imageWidth=He,At._imageHeight=et,At._imageSrc=Re},Ue.src=Re}ot||(ot=o.doc.createElement("div"),ot.style.overflow="hidden",this._cropEl=ot);var pt=ot.style;pt.width=l((Pe+ae*Pe/gt)*we),pt.height=l((it+se*it/fe)*Ae),pt.filter=k+".Matrix(Dx="+-ae*Pe/gt*we+",Dy="+-se*it/fe*Ae+")",ot.parentNode||ve.appendChild(ot),_t.parentNode!==ot&&ot.appendChild(_t)}else Se.width=l(we*Pe)+"px",Se.height=l(Ae*it)+"px",ve.appendChild(_t),ot&&ot.parentNode&&(ve.removeChild(ot),this._cropEl=null);var jt="",Gt=Ee.opacity;Gt<1&&(jt+=".Alpha(opacity="+l(Gt*100)+") "),jt+=k+".AlphaImageLoader(src="+Re+", SizingMethod=scale)",Se.filter=jt,ve.style.zIndex=U(this.zlevel,this.z,this.z2),g(le,ve),Ee.text!=null&&this.drawRectText(le,this.getBoundingRect())},b.prototype.onRemove=function(le){j(le,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(le)},b.prototype.onAdd=function(le){g(le,this._vmlEl),this.appendRectText(le)};var ce="normal",xe={},Te=0,je=100,Ce=document.createElement("div"),Z=function(le){var Ee=xe[le];if(!Ee){Te>je&&(Te=0,xe={});var Re=Ce.style,He;try{Re.font=le,He=Re.fontFamily.split(",")[0]}catch(et){}Ee={style:Re.fontStyle||ce,variant:Re.fontVariant||ce,weight:Re.fontWeight||ce,size:parseFloat(Re.fontSize||12)|0,family:He||"Microsoft YaHei"},xe[le]=Ee,Te++}return Ee},K;C.$override("measureText",function(le,Ee){var Re=o.doc;K||(K=Re.createElement("div"),K.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",o.doc.body.appendChild(K));try{K.style.font=Ee}catch(He){}return K.innerHTML="",K.appendChild(Re.createTextNode(le)),{width:K.offsetWidth}});for(var V=new F,$=function(le,Ee,Re,He){var et=this.style;this.__dirty&&P.normalizeTextStyle(et,!0);var ut=et.text;if(ut!=null&&(ut+=""),!ut)return;if(et.rich){var Dt=C.parseRichText(ut,et);ut=[];for(var We=0;We<Dt.lines.length;We++){for(var Mt=Dt.lines[We].tokens,Wt=[],Ne=0;Ne<Mt.length;Ne++)Wt.push(Mt[Ne].text);ut.push(Wt.join(""))}ut=ut.join(`
`)}var Pe,it,gt=et.textAlign,fe=et.textVerticalAlign,ae=Z(et.font),se=ae.style+" "+ae.variant+" "+ae.weight+" "+ae.size+'px "'+ae.family+'"';Re=Re||C.getBoundingRect(ut,se,gt,fe,et.textPadding,et.textLineHeight);var de=this.transform;if(de&&!He&&(V.copy(Ee),V.applyTransform(de),Ee=V),He)Pe=Ee.x,it=Ee.y;else{var ve=et.textPosition;if(ve instanceof Array)Pe=Ee.x+R(ve[0],Ee.width),it=Ee.y+R(ve[1],Ee.height),gt=gt||"left";else{var ie=this.calculateTextPosition?this.calculateTextPosition({},et,Ee):C.calculateTextPosition({},et,Ee);Pe=ie.x,it=ie.y,gt=gt||ie.textAlign,fe=fe||ie.textVerticalAlign}}Pe=C.adjustTextX(Pe,Re.width,gt),it=C.adjustTextY(it,Re.height,fe),it+=Re.height/2;var oe=o.createNode,pe=this._textVmlEl,we,Ae,Me;pe?(Me=pe.firstChild,we=Me.nextSibling,Ae=we.nextSibling):(pe=oe("line"),we=oe("path"),Ae=oe("textpath"),Me=oe("skew"),Ae.style["v-text-align"]="left",m(pe),we.textpathok=!0,Ae.on=!0,pe.from="0 0",pe.to="1000 0.05",g(pe,Me),g(pe,we),g(pe,Ae),this._textVmlEl=pe);var rt=[Pe,it],Pt=pe.style;de&&He?(I(rt,rt,de),Me.on=!0,Me.matrix=de[0].toFixed(3)+T+de[2].toFixed(3)+T+de[1].toFixed(3)+T+de[3].toFixed(3)+",0,0",Me.offset=(l(rt[0])||0)+","+(l(rt[1])||0),Me.origin="0 0",Pt.left="0px",Pt.top="0px"):(Me.on=!1,Pt.left=l(Pe)+"px",Pt.top=l(it)+"px"),Ae.string=_(ut);try{Ae.style.font=se}catch(Xt){}z(pe,"fill",{fill:et.textFill,opacity:et.opacity},this),z(pe,"stroke",{stroke:et.textStroke,opacity:et.opacity,lineDash:et.lineDash||null},this),pe.style.zIndex=U(this.zlevel,this.z,this.z2),g(le,pe)},q=function(le){j(le,this._textVmlEl),this._textVmlEl=null},Q=function(le){g(le,this._textVmlEl)},ge=[y,t,b,u,i],Oe=0;Oe<ge.length;Oe++){var Ye=ge[Oe].prototype;Ye.drawRectText=$,Ye.removeRectText=q,Ye.appendRectText=Q}i.prototype.brushVML=function(le){var Ee=this.style;Ee.text!=null?this.drawRectText(le,{x:Ee.x||0,y:Ee.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(le)},i.prototype.onRemove=function(le){this.removeRectText(le)},i.prototype.onAdd=function(le){this.appendRectText(le)}}},r6Bn:function(ze,ee,M){var X=M("bYtY"),B=M("ItGF"),I=M("4fz+"),F=M("BPZU");function S(y,t){return y.zlevel===t.zlevel?y.z===t.z?y.z2-t.z2:y.z-t.z:y.zlevel-t.zlevel}var C=function(){this._roots=[],this._displayList=[],this._displayListLen=0};C.prototype={constructor:C,traverse:function(y,t){for(var b=0;b<this._roots.length;b++)this._roots[b].traverse(y,t)},getDisplayList:function(y,t){return t=t||!1,y&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(y){this._displayListLen=0;for(var t=this._roots,b=this._displayList,i=0,u=t.length;i<u;i++)this._updateAndAddDisplayable(t[i],null,y);b.length=this._displayListLen,B.canvasSupported&&F(b,S)},_updateAndAddDisplayable:function(y,t,b){if(y.ignore&&!b)return;y.beforeUpdate(),y.__dirty&&y.update(),y.afterUpdate();var i=y.clipPath;if(i){t?t=t.slice():t=[];for(var u=i,p=y;u;)u.parent=p,u.updateTransform(),t.push(u),p=u,u=u.clipPath}if(y.isGroup){for(var a=y._children,o=0;o<a.length;o++){var h=a[o];y.__dirty&&(h.__dirty=!0),this._updateAndAddDisplayable(h,t,b)}y.__dirty=!1}else y.__clipPaths=t,this._displayList[this._displayListLen++]=y},addRoot:function(y){if(y.__storage===this)return;y instanceof I&&y.addChildrenToStorage(this),this.addToStorage(y),this._roots.push(y)},delRoot:function(y){if(y==null){for(var t=0;t<this._roots.length;t++){var b=this._roots[t];b instanceof I&&b.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(y instanceof Array){for(var t=0,i=y.length;t<i;t++)this.delRoot(y[t]);return}var u=X.indexOf(this._roots,y);u>=0&&(this.delFromStorage(y),this._roots.splice(u,1),y instanceof I&&y.delChildrenFromStorage(this))},addToStorage:function(y){return y&&(y.__storage=this,y.dirty(!1)),this},delFromStorage:function(y){return y&&(y.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:S};var P=C;ze.exports=P},rA99:function(ze,ee,M){var X=M("y+Vt"),B=M("QBsz"),I=M("Sj9i"),F=I.quadraticSubdivide,S=I.cubicSubdivide,C=I.quadraticAt,P=I.cubicAt,y=I.quadraticDerivativeAt,t=I.cubicDerivativeAt,b=[];function i(p,a,o){var h=p.cpx2,l=p.cpy2;return h===null||l===null?[(o?t:P)(p.x1,p.cpx1,p.cpx2,p.x2,a),(o?t:P)(p.y1,p.cpy1,p.cpy2,p.y2,a)]:[(o?y:C)(p.x1,p.cpx1,p.x2,a),(o?y:C)(p.y1,p.cpy1,p.y2,a)]}var u=X.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(p,a){var o=a.x1,h=a.y1,l=a.x2,n=a.y2,s=a.cpx1,d=a.cpy1,E=a.cpx2,D=a.cpy2,T=a.percent;if(T===0)return;p.moveTo(o,h),E==null||D==null?(T<1&&(F(o,s,l,T,b),s=b[1],l=b[2],F(h,d,n,T,b),d=b[1],n=b[2]),p.quadraticCurveTo(s,d,l,n)):(T<1&&(S(o,s,E,l,T,b),s=b[1],E=b[2],l=b[3],S(h,d,D,n,T,b),d=b[1],D=b[2],n=b[3]),p.bezierCurveTo(s,d,E,D,l,n))},pointAt:function(p){return i(this.shape,p,!1)},tangentAt:function(p){var a=i(this.shape,p,!0);return B.normalize(a,a)}});ze.exports=u},"rAM+":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return B});var X=M("Qw5x");function B(I,F){var S;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(S=Object(X.a)(I))||F&&I&&typeof I.length=="number"){S&&(I=S);var C=0,P=function(){};return{s:P,n:function(){return C>=I.length?{done:!0}:{done:!1,value:I[C++]}},e:function(u){throw u},f:P}}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 y=!0,t=!1,b;return{s:function(){S=I[Symbol.iterator]()},n:function(){var u=S.next();return y=u.done,u},e:function(u){t=!0,b=u},f:function(){try{!y&&S.return!=null&&S.return()}finally{if(t)throw b}}}}},rUJ1:function(ze,ee){const M=/[&<>"']/,X=/[&<>"']/g,B=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},S=w=>F[w];function C(w,v){if(v){if(M.test(w))return w.replace(X,S)}else if(B.test(w))return w.replace(I,S);return w}const P=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(w){return w.replace(P,(v,c)=>(c=c.toLowerCase(),c==="colon"?":":c.charAt(0)==="#"?c.charAt(1)==="x"?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""))}const t=/(^|[^\[])\^/g;function b(w,v){w=w.source||w,v=v||"";const c={replace:(f,m)=>(m=m.source||m,m=m.replace(t,"$1"),w=w.replace(f,m),c),getRegex:()=>new RegExp(w,v)};return c}const i=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(w,v,c){if(w){let f;try{f=decodeURIComponent(y(c)).replace(i,"").toLowerCase()}catch(m){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}v&&!u.test(c)&&(c=n(v,c));try{c=encodeURI(c).replace(/%25/g,"%")}catch(f){return null}return c}const a={},o=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(w,v){a[" "+w]||(o.test(w)?a[" "+w]=w+"/":a[" "+w]=D(w,"/",!0)),w=a[" "+w];const c=w.indexOf(":")===-1;return v.substring(0,2)==="//"?c?v:w.replace(h,"$1")+v:v.charAt(0)==="/"?c?v:w.replace(l,"$1")+v:w+v}const s={exec:function(){}};function d(w){let v=1,c,f;for(;v<arguments.length;v++){c=arguments[v];for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(w[f]=c[f])}return w}function E(w,v){const c=w.replace(/\|/g,(_,x,g)=>{let j=!1,U=x;for(;--U>=0&&g[U]==="\\";)j=!j;return j?"|":" |"}),f=c.split(/ \|/);let m=0;if(f.length>v)f.splice(v);else for(;f.length<v;)f.push("");for(;m<f.length;m++)f[m]=f[m].trim().replace(/\\\|/g,"|");return f}function D(w,v,c){const f=w.length;if(f===0)return"";let m=0;for(;m<f;){const _=w.charAt(f-m-1);if(_===v&&!c)m++;else if(_!==v&&c)m++;else break}return w.substr(0,f-m)}function T(w,v){if(w.indexOf(v[1])===-1)return-1;const c=w.length;let f=0,m=0;for(;m<c;m++)if(w[m]==="\\")m++;else if(w[m]===v[0])f++;else if(w[m]===v[1]&&(f--,f<0))return m;return-1}function k(w){w&&w.sanitize&&!w.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ze.exports={escape:C,unescape:y,edit:b,cleanUrl:p,resolveUrl:n,noopTest:s,merge:d,splitCells:E,rtrim:D,findClosingBracket:T,checkSanitizeDeprecation:k}},rhHp:function(ze,ee,M){"use strict";var X=M("2qtc"),B=M("kLXV"),I=M("sRBo"),F=M("kaz8"),S=M("7Kak"),C=M("9yH6"),P=M("14J3"),y=M("BMrR"),t=M("jCWc"),b=M("kPKH"),i=M("iQDF"),u=M("+eQT"),p=M("miYZ"),a=M("tsqr"),o=M("jrin"),h=M("oBTY"),l=M("k1fw"),n=M("9og8"),s=M("y8nQ"),d=M("Vl3Y"),E=M("tJVT"),D=M("WmNS"),T=M.n(D),k=M("q1tI"),w=M.n(k),v=M("wd/R"),c=M.n(v),f=M("ErOA"),m=M("1vsH"),_=M("Ty5D"),x=M("9kvl"),g=M("xKgJ"),j=M("oUNq"),U=M("4wi7"),R=M("eozf"),W=function(L){var G=L.classroomList,z=L.dispatch,J=L.courseEndTime,te=Object(_.i)(),_e=d.a.useForm(),ce=Object(E.a)(_e,1),xe=ce[0],Te=Object(k.useState)(1),je=Object(E.a)(Te,2),Ce=je[0],Z=je[1],K=Object(k.useState)([]),V=Object(E.a)(K,2),$=V[0],q=V[1],Q=Object(k.useState)(0),ge=Object(E.a)(Q,2),Oe=ge[0],Ye=ge[1],le=Object(k.useState)(20),Ee=Object(E.a)(le,2),Re=Ee[0],He=Ee[1],et=Object(k.useState)(!0),ut=Object(E.a)(et,2),Dt=ut[0],We=ut[1],Mt=Object(k.useState)([]),Wt=Object(E.a)(Mt,2),Ne=Wt[0],Pe=Wt[1],it=Object(k.useState)(!0),gt=Object(E.a)(it,2),fe=gt[0],ae=gt[1];Object(k.useEffect)(function(){if(G.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03"&&(se(),G.actionTabs.type===2)){var pe=G.actionTabs.selectArrsAll[0];ae(pe.unified_setting)}},[G.actionTabs]);var se=function(){var pe=Object(n.a)(T.a.mark(function we(Ae){var Me,rt;return T.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return We(!0),Xt.next=3,Object(j.D)(Object(l.a)(Object(l.a)({},te),{},{page:Ae||Ce,limit:2e4,homework_id:G.actionTabs.type===1?"":G.actionTabs.selectArrs[0]}));case 3:Me=Xt.sent,Me==null||Me.course_groups.map(function(lt,zt){lt.key=lt.id,lt.title=lt.name,lt.disabled=lt.is_published}),Me&&(q(Object(h.a)(Me==null?void 0:Me.course_groups)),Ye(Me==null?void 0:Me.course_groups_count),We(!1),Ae||xe.setFieldsValue((rt={},Object(o.a)(rt,"publish_time",c()(c()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),Object(o.a)(rt,"end_time",c()(c()(new Date(Object(m.b)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))),rt)));case 6:case"end":return Xt.stop()}},we)}));return function(Ae){return pe.apply(this,arguments)}}(),de=function(){var pe=Object(n.a)(T.a.mark(function we(){var Ae,Me,rt,Pt;return T.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(Me=Object(l.a)({},xe.getFieldsValue()),!(Me.end_time<=Me.publish_time)){lt.next=4;break}return a.b.info("\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u6216\u7B49\u4E8E\u53D1\u5E03\u65F6\u95F4"),lt.abrupt("return");case 4:if(!((Ne==null?void 0:Ne.length)<=0&&!fe&&$.length>0)){lt.next=7;break}return a.b.info("\u53D1\u5E03\u73ED\u7EA7\u4E0D\u80FD\u4E3A\u7A7A"),lt.abrupt("return");case 7:return rt={homework_ids:Object(h.a)(G.actionTabs.selectArrs),group_ids:Ne.length>0?Ne.map(function(zt){return zt.id}):(Ae=G.detailShixunsList)===null||Ae===void 0?void 0:Ae.course_groups,end_time:c()(Me.end_time).format("YYYY-MM-DD HH:mm"),publish_time:c()(Me.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:!Ne.length},lt.next=10,Object(f.a)("/api/courses/".concat(te.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(l.a)({},rt)});case 10:Pt=lt.sent,Pt.status===0&&(ve(),Object(m.db)(["\u6559\u5B66\u8BFE\u5802","\u8BFE\u7A0B\u5B9E\u9A8C","\u7ACB\u5373\u53D1\u5E03"]),a.b.success("\u53D1\u5E03\u6210\u529F"),z({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}),Object(g.c)()?G.actionTabs.detail?(z({type:"shixunHomeworks/setActionTabs",payload:{}}),z({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},te)}),z({type:"shixunHomeworks/getWorkSetting",payload:Object(l.a)({},te)})):z({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(l.a)(Object(l.a)({},G.actionTabs.params),{},{type:4})}):z({type:"classroomList/getClassroomShixunsList",payload:Object(l.a)({},G.actionTabs.params)}),localStorage.getItem("Noviceguide")==="0"||z({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5E95\u90E8\u5F39\u7A97",type:13,text:w.a.createElement("div",null,"\u6700\u540E\uFF0C\u54B1\u4EEC\u7ED9\u6559\u5B66\u8BFE\u5802\u6DFB\u52A0\u4E00\u540D\u5B66\u751F~\u70B9\u51FB\u201C\u6DFB\u52A0\u5B66\u751F\u201D\uFF0C\u5728\u5F39\u7A97\u9875\u9762\u4E2D\u8F93\u5165\u5E76\u641C\u7D22\u5B66\u751F\u59D3\u540D\uFF0C\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u5C31\u53EF\u4EE5\u4E3A\u60A8\u7684\u8BFE\u5802\u6DFB\u52A0\u7B2C\u4E00\u4F4D\u5B66\u751F\u5566~")}}));case 12:case"end":return lt.stop()}},we)}));return function(){return pe.apply(this,arguments)}}(),ve=function(){Z(1),q([]),Pe([])},ie=Oe>Ce*Re,oe=G.detailShixunsList;return w.a.createElement(B.a,{width:600,centered:!0,title:"\u53D1\u5E03\u4F5C\u4E1A",visible:G.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03",okText:"\u53D1\u5E03\u4F5C\u4E1A",cancelText:"\u6682\u4E0D\u53D1\u5E03",onOk:de,onCancel:function(){ve(),z({type:"classroomList/setActionTabs",payload:{}})}},w.a.createElement("p",{className:"tc"},"\u5B66\u751F\u5C06\u7ACB\u5373\u6536\u5230\u4F5C\u4E1A",w.a.createElement("br",null),'\u672C\u64CD\u4F5C\u53EA\u5BF9"\u672A\u53D1\u5E03"\u7684\u4F5C\u4E1A\u6709\u6548'),w.a.createElement(d.a,{form:xe},w.a.createElement("div",{style:{paddingLeft:0}},w.a.createElement(y.a,{className:"mt30",align:"middle"},w.a.createElement(b.a,null,w.a.createElement(d.a.Item,{name:"publish_time",label:"\u53D1\u5E03\u65F6\u95F4"},w.a.createElement(u.a,{style:{width:155,marginRight:"25px"},getPopupContainer:function(we){return we.parentNode},disabledDate:function(we){return Object(R.b)(we,J)},disabledTime:function(we){return Object(R.c)(we)},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:c()(Object(m.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),w.a.createElement(b.a,{className:"ml20"},w.a.createElement(d.a.Item,{name:"end_time",label:"\u622A\u6B62\u65F6\u95F4:"},w.a.createElement(u.a,{style:{width:170},getPopupContainer:function(we){return we.parentNode},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:c()(Object(m.d)(),"HH:mm")},disabledDate:function(we){return Object(R.b)(we,J,xe.getFieldValue("publish_time"))},disabledTime:function(we){return Object(R.c)(we,xe.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})))),G.actionTabs.type===2&&w.a.createElement(y.a,{style:{marginBottom:"10px"}},w.a.createElement("span",{className:"mr5"},"\u53D1\u5E03\u8BBE\u7F6E:"),w.a.createElement(C.a.Group,{value:fe,onChange:function(we){ae(we.target.value),Pe([])}},w.a.createElement(C.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),w.a.createElement(C.a,{className:"ml20",disabled:$.length<=0,value:!1},"\u5206\u73ED\u53D1\u5E03"))),$.length<=0&&G.actionTabs.type===2&&w.a.createElement("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},'\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03"')),(G.actionTabs.type===1||!fe)&&$.length>0&&w.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},w.a.createElement("span",{style:{flex:1}},w.a.createElement(F.a,{checked:Ne.length===$.length,onChange:function(we){Ne.length===$.length?Pe([]):Pe($)}},"\u5168\u9009")),w.a.createElement("span",{style:{width:16}}),w.a.createElement("span",{style:{flex:1}},"\u5DF2\u9009\u62E9",Ne.length||0,"\u4E2A\u5206\u73ED")),(G.actionTabs.type===1||!fe)&&$.length>0&&w.a.createElement(U.a,{data:$,selectedRowKeys:Ne,setSelectedRowKeys:Pe})))};ee.a=Object(x.a)(function(H){var L=H.classroomList;return{classroomList:L}})(W)},rmlV:function(ze,ee,M){var X=M("y+Vt"),B=X.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(I,F){var S=.5522848,C=F.cx,P=F.cy,y=F.rx,t=F.ry,b=y*S,i=t*S;I.moveTo(C-y,P),I.bezierCurveTo(C-y,P-i,C-b,P-t,C,P-t),I.bezierCurveTo(C+b,P-t,C+y,P-i,C+y,P),I.bezierCurveTo(C+y,P+i,C+b,P+t,C,P+t),I.bezierCurveTo(C-b,P+t,C-y,P+i,C-y,P),I.closePath()}});ze.exports=B},sR1s:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return F}),M.d(ee,"a",function(){return S}),M.d(ee,"c",function(){return C}),M.d(ee,"d",function(){return P});var X=M("U8pU"),B="RC_TABLE_KEY";function I(y){return y==null?[]:Array.isArray(y)?y:[y]}function F(y,t){if(!t&&typeof t!="number")return y;for(var b=I(t),i=y,u=0;u<b.length;u+=1){if(!i)return null;var p=b[u];i=i[p]}return i}function S(y){var t=[],b={};return y.forEach(function(i){for(var u=i||{},p=u.key,a=u.dataIndex,o=p||I(a).join("-")||B;b[o];)o="".concat(o,"_next");b[o]=!0,t.push(o)}),t}function C(){var y={};function t(p,a){a&&Object.keys(a).forEach(function(o){var h=a[o];h&&Object(X.a)(h)==="object"?(p[o]=p[o]||{},t(p[o],h)):p[o]=h})}for(var b=arguments.length,i=new Array(b),u=0;u<b;u++)i[u]=arguments[u];return i.forEach(function(p){t(y,p)}),y}function P(y){return y!=null}},"sW+o":function(ze,ee,M){var X=M("SrGk"),B=M("bYtY"),I=M("SUKs"),F=M("Qe9p");function S(P,y){X.call(this,P,y,["linearGradient","radialGradient"],"__gradient_in_use__")}B.inherits(S,X),S.prototype.addWithoutUpdate=function(P,y){if(y&&y.style){var t=this;B.each(["fill","stroke"],function(b){if(y.style[b]&&(y.style[b].type==="linear"||y.style[b].type==="radial")){var i=y.style[b],u=t.getDefs(!0),p;i._dom?(p=i._dom,u.contains(i._dom)||t.addDom(p)):p=t.add(i),t.markUsed(y);var a=p.getAttribute("id");P.setAttribute(b,"url(#"+a+")")}})}},S.prototype.add=function(P){var y;if(P.type==="linear")y=this.createElement("linearGradient");else if(P.type==="radial")y=this.createElement("radialGradient");else return I("Illegal gradient type."),null;return P.id=P.id||this.nextId++,y.setAttribute("id","zr"+this._zrId+"-gradient-"+P.id),this.updateDom(P,y),this.addDom(y),y},S.prototype.update=function(P){var y=this;X.prototype.update.call(this,P,function(){var t=P.type,b=P._dom.tagName;t==="linear"&&b==="linearGradient"||t==="radial"&&b==="radialGradient"?y.updateDom(P,P._dom):(y.removeDom(P),y.add(P))})},S.prototype.updateDom=function(P,y){if(P.type==="linear")y.setAttribute("x1",P.x),y.setAttribute("y1",P.y),y.setAttribute("x2",P.x2),y.setAttribute("y2",P.y2);else if(P.type==="radial")y.setAttribute("cx",P.x),y.setAttribute("cy",P.y),y.setAttribute("r",P.r);else{I("Illegal gradient type.");return}P.global?y.setAttribute("gradientUnits","userSpaceOnUse"):y.setAttribute("gradientUnits","objectBoundingBox"),y.innerHTML="";for(var t=P.colorStops,b=0,i=t.length;b<i;++b){var u=this.createElement("stop");u.setAttribute("offset",t[b].offset*100+"%");var p=t[b].color;if(p.indexOf("rgba">-1)){var a=F.parse(p)[3],o=F.toHex(p);u.setAttribute("stop-color","#"+o),u.setAttribute("stop-opacity",a)}else u.setAttribute("stop-color",t[b].color);y.appendChild(u)}P._dom=y},S.prototype.markUsed=function(P){if(P.style){var y=P.style.fill;y&&y._dom&&X.prototype.markUsed.call(this,y._dom),y=P.style.stroke,y&&y._dom&&X.prototype.markUsed.call(this,y._dom)}};var C=S;ze.exports=C},sboe:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return I});var X=M("q1tI"),B=M.n(X),I=X.createContext(null)},t23M:function(ze,ee,M){"use strict";var X=M("VTBJ"),B=M("1OyB"),I=M("vuIU"),F=M("Ji7U"),S=M("LK+K"),C=M("q1tI"),P=M.n(C),y=M("m+aA"),t=M("Zm9Q"),b=M("Kwbf"),i=M("c+Xe"),u=M("bdgK"),p="rc-observer-key",a=function(o){Object(F.a)(l,o);var h=Object(S.a)(l);function l(){var n;return Object(B.a)(this,l),n=h.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(s){var d=n.props.onResize,E=s[0].target,D=E.getBoundingClientRect(),T=D.width,k=D.height,w=E.offsetWidth,v=E.offsetHeight,c=Math.floor(T),f=Math.floor(k);if(n.state.width!==c||n.state.height!==f||n.state.offsetWidth!==w||n.state.offsetHeight!==v){var m={width:c,height:f,offsetWidth:w,offsetHeight:v};n.setState(m),d&&Promise.resolve().then(function(){d(Object(X.a)(Object(X.a)({},m),{},{offsetWidth:w,offsetHeight:v}))})}},n.setChildNode=function(s){n.childNode=s},n}return Object(I.a)(l,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var d=Object(y.a)(this.childNode||this),E=d!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=d),!this.resizeObserver&&d&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(d))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,d=Object(t.a)(s);if(d.length>1)Object(b.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(d.length===0)return Object(b.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=d[0];if(C.isValidElement(E)&&Object(i.c)(E)){var D=E.ref;d[0]=C.cloneElement(E,{ref:Object(i.a)(D,this.setChildNode)})}return d.length===1?d[0]:d.map(function(T,k){return!C.isValidElement(T)||"key"in T&&T.key!==null?T:C.cloneElement(T,{key:"".concat(p,"-").concat(k)})})}}]),l}(C.Component);a.displayName="ResizeObserver",ee.a=a},t9D7:function(ze,ee,M){"use strict";M.d(ee,"b",function(){return P}),M.d(ee,"g",function(){return t}),M.d(ee,"d",function(){return b}),M.d(ee,"e",function(){return i}),M.d(ee,"a",function(){return u}),M.d(ee,"f",function(){return o}),M.d(ee,"c",function(){return h});var X=M("Vhoy"),B=M("MI8n"),I=M("pmY6"),F=M("Cg/j"),S=M("ic2d"),C=M("nEHx");const P=Object(F.c)("themeService");var y;(function(l){function n(s){return s&&typeof s=="object"&&typeof s.id=="string"}l.isThemeColor=n})(y||(y={}));function t(l){return{id:l}}var b;(function(l){function n(k){return k&&typeof k=="object"&&typeof k.id=="string"&&(typeof k.color=="undefined"||y.isThemeColor(k.color))}l.isThemeIcon=n;const s=new RegExp(`^\\$\\((${X.a.iconNameExpression}(?:${X.a.iconModifierExpression})?)\\)$`);function d(k){const w=s.exec(k);if(!w)return;let[,v]=w;return{id:v}}l.fromString=d;function E(k,w){let v=k.id;const c=v.lastIndexOf("~");return c!==-1&&(v=v.substring(0,c)),w&&(v=`${v}~${w}`),{id:v}}l.modify=E;function D(k,w){var v,c;return k.id===w.id&&((v=k.color)===null||v===void 0?void 0:v.id)===((c=w.color)===null||c===void 0?void 0:c.id)}l.isEqual=D;function T(k,w){return{id:k.id,color:w?t(w):void 0}}l.asThemeIcon=T,l.asClassNameArray=X.a.asClassNameArray,l.asClassName=X.a.asClassName,l.asCSSSelector=X.a.asCSSSelector})(b||(b={}));function i(l){switch(l){case C.a.DARK:return"vs-dark";case C.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const u={ThemingContribution:"base.contributions.theming"};class p{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new B.b}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),Object(I.i)(()=>{const n=this.themingParticipants.indexOf(l);this.themingParticipants.splice(n,1)})}getThemingParticipants(){return this.themingParticipants}}let a=new p;S.a.add(u.ThemingContribution,a);function o(l){return a.onColorThemeChange(l)}class h extends I.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(n=>this.onThemeChange(n)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},u3os:function(ze,ee,M){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ver=ee.clear=ee.bind=void 0;var X=M("P4Qj"),B=function(C,P){var y=(0,X.getSensor)(C);return y.bind(P),function(){y.unbind(P)}};ee.bind=B;var I=function(C){var P=(0,X.getSensor)(C);(0,X.removeSensor)(P)};ee.clear=I;var F="1.0.1";ee.ver=F},ulZh:function(ze,ee,M){typeof window!="undefined"&&function(B,I){ze.exports=I()}(this,function(){return function(X){var B={};function I(F){if(B[F])return B[F].exports;var S=B[F]={i:F,l:!1,exports:{}};return X[F].call(S.exports,S,S.exports,I),S.l=!0,S.exports}return I.m=X,I.c=B,I.d=function(F,S,C){I.o(F,S)||Object.defineProperty(F,S,{enumerable:!0,get:C})},I.r=function(F){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},I.t=function(F,S){if(S&1&&(F=I(F)),S&8)return F;if(S&4&&typeof F=="object"&&F&&F.__esModule)return F;var C=Object.create(null);if(I.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:F}),S&2&&typeof F!="string")for(var P in F)I.d(C,P,function(y){return F[y]}.bind(null,P));return C},I.n=function(F){var S=F&&F.__esModule?function(){return F.default}:function(){return F};return I.d(S,"a",S),S},I.o=function(F,S){return Object.prototype.hasOwnProperty.call(F,S)},I.p="/dist/",I(I.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(X,B,I){"use strict";var F=Object.prototype.hasOwnProperty,S="~";function C(){}Object.create&&(C.prototype=Object.create(null),new C().__proto__||(S=!1));function P(i,u,p){this.fn=i,this.context=u,this.once=p||!1}function y(i,u,p,a,o){if(typeof p!="function")throw new TypeError("The listener must be a function");var h=new P(p,a||i,o),l=S?S+u:u;return i._events[l]?i._events[l].fn?i._events[l]=[i._events[l],h]:i._events[l].push(h):(i._events[l]=h,i._eventsCount++),i}function t(i,u){--i._eventsCount===0?i._events=new C:delete i._events[u]}function b(){this._events=new C,this._eventsCount=0}b.prototype.eventNames=function(){var u=[],p,a;if(this._eventsCount===0)return u;for(a in p=this._events)F.call(p,a)&&u.push(S?a.slice(1):a);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},b.prototype.listeners=function(u){var p=S?S+u:u,a=this._events[p];if(!a)return[];if(a.fn)return[a.fn];for(var o=0,h=a.length,l=new Array(h);o<h;o++)l[o]=a[o].fn;return l},b.prototype.listenerCount=function(u){var p=S?S+u:u,a=this._events[p];return a?a.fn?1:a.length:0},b.prototype.emit=function(u,p,a,o,h,l){var n=S?S+u:u;if(!this._events[n])return!1;var s=this._events[n],d=arguments.length,E,D;if(s.fn){s.once&&this.removeListener(u,s.fn,void 0,!0);switch(d){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,p),!0;case 3:return s.fn.call(s.context,p,a),!0;case 4:return s.fn.call(s.context,p,a,o),!0;case 5:return s.fn.call(s.context,p,a,o,h),!0;case 6:return s.fn.call(s.context,p,a,o,h,l),!0}for(D=1,E=new Array(d-1);D<d;D++)E[D-1]=arguments[D];s.fn.apply(s.context,E)}else{var T=s.length,k;for(D=0;D<T;D++){s[D].once&&this.removeListener(u,s[D].fn,void 0,!0);switch(d){case 1:s[D].fn.call(s[D].context);break;case 2:s[D].fn.call(s[D].context,p);break;case 3:s[D].fn.call(s[D].context,p,a);break;case 4:s[D].fn.call(s[D].context,p,a,o);break;default:if(!E)for(k=1,E=new Array(d-1);k<d;k++)E[k-1]=arguments[k];s[D].fn.apply(s[D].context,E)}}}return!0},b.prototype.on=function(u,p,a){return y(this,u,p,a,!1)},b.prototype.once=function(u,p,a){return y(this,u,p,a,!0)},b.prototype.removeListener=function(u,p,a,o){var h=S?S+u:u;if(!this._events[h])return this;if(!p)return t(this,h),this;var l=this._events[h];if(l.fn)l.fn===p&&(!o||l.once)&&(!a||l.context===a)&&t(this,h);else{for(var n=0,s=[],d=l.length;n<d;n++)(l[n].fn!==p||o&&!l[n].once||a&&l[n].context!==a)&&s.push(l[n]);s.length?this._events[h]=s.length===1?s[0]:s:t(this,h)}return this},b.prototype.removeAllListeners=function(u){var p;return u?(p=S?S+u:u,this._events[p]&&t(this,p)):(this._events=new C,this._eventsCount=0),this},b.prototype.off=b.prototype.removeListener,b.prototype.addListener=b.prototype.on,b.prefixed=S,b.EventEmitter=b,X.exports=b},"./node_modules/url-toolkit/src/url-toolkit.js":function(X,B,I){(function(F){var S=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,C=/^([^\/?#]*)([^]*)$/,P=/(?:\/|^)\.(?=\/)/g,y=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(b,i,u){if(u=u||{},b=b.trim(),i=i.trim(),!i){if(!u.alwaysNormalize)return b;var p=t.parseURL(b);if(!p)throw new Error("Error trying to parse base URL.");return p.path=t.normalizePath(p.path),t.buildURLFromParts(p)}var a=t.parseURL(i);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return u.alwaysNormalize?(a.path=t.normalizePath(a.path),t.buildURLFromParts(a)):i;var o=t.parseURL(b);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var h=C.exec(o.path);o.netLoc=h[1],o.path=h[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,a.path[0]!=="/"))if(!a.path)l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));else{var n=o.path,s=n.substring(0,n.lastIndexOf("/")+1)+a.path;l.path=t.normalizePath(s)}return l.path===null&&(l.path=u.alwaysNormalize?t.normalizePath(a.path):a.path),t.buildURLFromParts(l)},parseURL:function(b){var i=S.exec(b);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(b){for(b=b.split("").reverse().join("").replace(P,"");b.length!==(b=b.replace(y,"")).length;);return b.split("").reverse().join("")},buildURLFromParts:function(b){return b.scheme+b.netLoc+b.path+b.params+b.query+b.fragment}};X.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(X,B,I){function F(u){var p={};function a(h){if(p[h])return p[h].exports;var l=p[h]={i:h,l:!1,exports:{}};return u[h].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=u,a.c=p,a.i=function(h){return h},a.d=function(h,l,n){a.o(h,l)||Object.defineProperty(h,l,{configurable:!1,enumerable:!0,get:n})},a.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},a.n=function(h){var l=h&&h.__esModule?function(){return h.default}:function(){return h};return a.d(l,"a",l),l},a.o=function(h,l){return Object.prototype.hasOwnProperty.call(h,l)},a.p="/",a.oe=function(h){throw console.error(h),h};var o=a(a.s=ENTRY_MODULE);return o.default||o}var S="[\\.|\\-|\\+|\\w|/|@]+",C="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+S+").*?\\)";function P(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function y(u){return!isNaN(1*u)}function t(u,p,a){var o={};o[a]=[];var h=p.toString(),l=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return o;for(var n=l[1],s=new RegExp("(\\\\n|\\W)"+P(n)+C,"g"),d;d=s.exec(h);){if(d[3]==="dll-reference")continue;o[a].push(d[3])}for(s=new RegExp("\\("+P(n)+'\\("(dll-reference\\s('+S+'))"\\)\\)'+C,"g");d=s.exec(h);)u[d[2]]||(o[a].push(d[1]),u[d[2]]=I(d[1]).m),o[d[2]]=o[d[2]]||[],o[d[2]].push(d[4]);for(var E=Object.keys(o),D=0;D<E.length;D++)for(var T=0;T<o[E[D]].length;T++)y(o[E[D]][T])&&(o[E[D]][T]=1*o[E[D]][T]);return o}function b(u){var p=Object.keys(u);return p.reduce(function(a,o){return a||u[o].length>0},!1)}function i(u,p){for(var a={main:[p]},o={main:[]},h={main:{}};b(a);)for(var l=Object.keys(a),n=0;n<l.length;n++){var s=l[n],d=a[s],E=d.pop();if(h[s]=h[s]||{},h[s][E]||!u[s][E])continue;h[s][E]=!0,o[s]=o[s]||[],o[s].push(E);for(var D=t(u,u[s][E],s),T=Object.keys(D),k=0;k<T.length;k++)a[T[k]]=a[T[k]]||[],a[T[k]]=a[T[k]].concat(D[T[k]])}return o}X.exports=function(u,p){p=p||{};var a={main:I.m},o=p.all?{main:Object.keys(a.main)}:i(a,u),h="";Object.keys(o).filter(function(E){return E!=="main"}).forEach(function(E){for(var D=0;o[E][D];)D++;o[E].push(D),a[E][D]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+E+" = ("+F.toString().replace("ENTRY_MODULE",JSON.stringify(D))+")({"+o[E].map(function(T){return""+JSON.stringify(T)+": "+a[E][T].toString()}).join(",")+`});
`}),h=h+"new (("+F.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+o.main.map(function(E){return""+JSON.stringify(E)+": "+a.main[E].toString()}).join(",")+"}))(self);";var l=new window.Blob([h],{type:"text/javascript"});if(p.bare)return l;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,s=n.createObjectURL(l),d=new window.Worker(s);return d.objectURL=s,d}},"./src/config.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"hlsDefaultConfig",function(){return k}),I.d(B,"mergeConfig",function(){return v}),I.d(B,"enableStreamingMode",function(){return c});var F=I("./src/controller/abr-controller.ts"),S=I("./src/controller/audio-stream-controller.ts"),C=I("./src/controller/audio-track-controller.ts"),P=I("./src/controller/subtitle-stream-controller.ts"),y=I("./src/controller/subtitle-track-controller.ts"),t=I("./src/controller/buffer-controller.ts"),b=I("./src/controller/timeline-controller.ts"),i=I("./src/controller/cap-level-controller.ts"),u=I("./src/controller/fps-controller.ts"),p=I("./src/controller/eme-controller.ts"),a=I("./src/controller/cmcd-controller.ts"),o=I("./src/utils/xhr-loader.ts"),h=I("./src/utils/fetch-loader.ts"),l=I("./src/utils/cues.ts"),n=I("./src/utils/mediakeys-helper.ts"),s=I("./src/utils/logger.ts");function d(){return d=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var _=arguments[m];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(f[x]=_[x])}return f},d.apply(this,arguments)}function E(f,m){var _=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);m&&(x=x.filter(function(g){return Object.getOwnPropertyDescriptor(f,g).enumerable})),_.push.apply(_,x)}return _}function D(f){for(var m=1;m<arguments.length;m++){var _=arguments[m]!=null?arguments[m]:{};m%2?E(Object(_),!0).forEach(function(x){T(f,x,_[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(_)):E(Object(_)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(_,x))})}return f}function T(f,m,_){return m in f?Object.defineProperty(f,m,{value:_,enumerable:!0,configurable:!0,writable:!0}):f[m]=_,f}var k=D(D({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:F.default,bufferController:t.default,capLevelController:i.default,fpsController:u.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},w()),{},{subtitleStreamController:P.SubtitleStreamController,subtitleTrackController:y.default,timelineController:b.TimelineController,audioStreamController:S.default,audioTrackController:C.default,emeController:p.default,cmcdController:a.default});function w(){return{cueHandler:l.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function v(f,m){if((m.liveSyncDurationCount||m.liveMaxLatencyDurationCount)&&(m.liveSyncDuration||m.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(m.liveMaxLatencyDurationCount!==void 0&&(m.liveSyncDurationCount===void 0||m.liveMaxLatencyDurationCount<=m.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(m.liveMaxLatencyDuration!==void 0&&(m.liveSyncDuration===void 0||m.liveMaxLatencyDuration<=m.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return d({},f,m)}function c(f){var m=f.loader;if(m!==h.default&&m!==o.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),f.progressive=!1;else{var _=Object(h.fetchSupported)();_&&(f.loader=h.default,f.progressive=!0,f.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),S=I("./src/utils/ewma-bandwidth-estimator.ts"),C=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/errors.ts"),t=I("./src/types/loader.ts"),b=I("./src/utils/logger.ts");function i(a,o){for(var h=0;h<o.length;h++){var l=o[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function u(a,o,h){return o&&i(a.prototype,o),h&&i(a,h),a}var p=function(){function a(h){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=h;var l=h.config;this.bwEstimator=new S.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var o=a.prototype;return o.registerListeners=function(){var l=this.hls;l.on(C.Events.FRAG_LOADING,this.onFragLoading,this),l.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(C.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(C.Events.FRAG_LOADING,this.onFragLoading,this),l.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(C.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(l,n){var s=n.frag;if(s.type===t.PlaylistLevelType.MAIN&&!this.timer){var d;this.fragCurrent=s,this.partCurrent=(d=n.part)!=null?d:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(l,n){var s=this.hls.config;n.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,d=s.autoLevelEnabled,E=s.config,D=s.media;if(!l||!D)return;var T=n?n.stats:l.stats,k=n?n.duration:l.duration;if(T.aborted){b.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!d||D.paused||!D.playbackRate||!D.readyState)return;var w=performance.now()-T.loading.start,v=Math.abs(D.playbackRate);if(w<=500*k/v)return;var c=s.levels,f=s.minAutoLevel,m=c[l.level],_=T.total||Math.max(T.loaded,Math.round(k*m.maxBitrate/8)),x=Math.max(1,T.bwEstimate?T.bwEstimate/8:T.loaded*1e3/w),g=(_-T.loaded)/x,j=D.currentTime,U=(P.BufferHelper.bufferInfo(D,j,E.maxBufferHole).end-j)/v;if(U>=2*k/v||g<=U)return;var R=Number.POSITIVE_INFINITY,W;for(W=l.level-1;W>f;W--){var H=c[W].maxBitrate;if(R=k*H/(8*.8*x),R<U)break}if(R>=g)return;var L=this.bwEstimator.getEstimate();b.logger.warn("Fragment "+l.sn+(n?" part "+n.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+W+`
Current BW estimate: `+(Object(F.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+g.toFixed(3)+` s
Estimated load time for the next fragment: `+R.toFixed(3)+` s
Time to underbuffer: `+U.toFixed(3)+" s"),s.nextLoadLevel=W,this.bwEstimator.sample(w,T.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:n,stats:T})},o.onFragLoaded=function(l,n){var s=n.frag,d=n.part;if(s.type===t.PlaylistLevelType.MAIN&&Object(F.isFiniteNumber)(s.sn)){var E=d?d.stats:s.stats,D=d?d.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var T=this.hls.levels[s.level],k=(T.loaded?T.loaded.bytes:0)+E.loaded,w=(T.loaded?T.loaded.duration:0)+D;T.loaded={bytes:k,duration:w},T.realBitrate=Math.round(8*k/w)}if(s.bitrateTest){var v={stats:E,frag:s,part:d,id:s.type};this.onFragBuffered(C.Events.FRAG_BUFFERED,v),s.bitrateTest=!1}}},o.onFragBuffered=function(l,n){var s=n.frag,d=n.part,E=d?d.stats:s.stats;if(E.aborted)return;if(s.type!==t.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var D=E.parsing.end-E.loading.start;this.bwEstimator.sample(D,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=D/1e3:this.bitrateTestDelay=0},o.onError=function(l,n){switch(n.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,d=s.maxAutoLevel,E=s.config,D=s.minAutoLevel,T=s.media,k=n?n.duration:l?l.duration:0,w=T?T.currentTime:0,v=T&&T.playbackRate!==0?Math.abs(T.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,f=(P.BufferHelper.bufferInfo(T,w,E.maxBufferHole).end-w)/v,m=this.findBestLevel(c,D,d,f,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(m>=0)return m;b.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var _=k?Math.min(k,E.maxStarvationDelay):E.maxStarvationDelay,x=E.abrBandWidthFactor,g=E.abrBandWidthUpFactor;if(!f){var j=this.bitrateTestDelay;if(j){var U=k?Math.min(k,E.maxLoadingDelay):E.maxLoadingDelay;_=U-j,b.logger.trace("bitrate test took "+Math.round(1e3*j)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*_)+" ms"),x=g=1}}return m=this.findBestLevel(c,D,d,f+_,x,g),Math.max(m,0)},o.findBestLevel=function(l,n,s,d,E,D){for(var T,k=this.fragCurrent,w=this.partCurrent,v=this.lastLoadedFragLevel,c=this.hls.levels,f=c[v],m=!!(f!=null&&(T=f.details)!==null&&T!==void 0&&T.live),_=f==null?void 0:f.codecSet,x=w?w.duration:k?k.duration:0,g=s;g>=n;g--){var j=c[g];if(!j||_&&j.codecSet!==_)continue;var U=j.details,R=(w?U==null?void 0:U.partTarget:U==null?void 0:U.averagetargetduration)||x,W=void 0;g<=v?W=E*l:W=D*l;var H=c[g].maxBitrate,L=H*R/W;if(b.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(W)+"/"+H+"/"+R+"/"+d+"/"+L),W>H&&(!L||m&&!this.bitrateTestDelay||L<d))return g}return-1},u(a,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,n=this.bwEstimator;if(l!==-1&&(!n||!n.canEstimate()))return l;var s=this.getNextABRAutoLevel();return l!==-1&&(s=Math.min(l,s)),s},set:function(l){this._nextAutoLevel=l}}]),a}();B.default=p},"./src/controller/audio-stream-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),S=I("./src/controller/base-stream-controller.ts"),C=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/controller/fragment-tracker.ts"),t=I("./src/types/level.ts"),b=I("./src/types/loader.ts"),i=I("./src/loader/fragment.ts"),u=I("./src/demux/chunk-cache.ts"),p=I("./src/demux/transmuxer-interface.ts"),a=I("./src/types/transmuxer.ts"),o=I("./src/controller/fragment-finders.ts"),h=I("./src/utils/discontinuities.ts"),l=I("./src/errors.ts"),n=I("./src/utils/logger.ts");function s(){return s=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var v=arguments[w];for(var c in v)Object.prototype.hasOwnProperty.call(v,c)&&(k[c]=v[c])}return k},s.apply(this,arguments)}function d(k,w){k.prototype=Object.create(w.prototype),k.prototype.constructor=k,E(k,w)}function E(k,w){return E=Object.setPrototypeOf||function(c,f){return c.__proto__=f,c},E(k,w)}var D=100,T=function(k){d(w,k);function w(c,f){var m;return m=k.call(this,c,f,"[audio-stream-controller]")||this,m.videoBuffer=null,m.videoTrackCC=-1,m.waitingVideoCC=-1,m.audioSwitch=!1,m.trackId=-1,m.waitingData=null,m.mainDetails=null,m.bufferFlushed=!1,m._registerListeners(),m}var v=w.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var f=this.hls;f.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(C.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),f.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),f.on(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(C.Events.ERROR,this.onError,this),f.on(C.Events.BUFFER_RESET,this.onBufferReset,this),f.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),f.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),f.on(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v._unregisterListeners=function(){var f=this.hls;f.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(C.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),f.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),f.off(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(C.Events.ERROR,this.onError,this),f.off(C.Events.BUFFER_RESET,this.onBufferReset,this),f.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),f.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),f.off(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v.onInitPtsFound=function(f,m){var _=m.frag,x=m.id,g=m.initPTS;if(x==="main"){var j=_.cc;this.initPTS[_.cc]=g,this.log("InitPTS for cc: "+j+" found from main: "+g),this.videoTrackCC=j,this.state===S.State.WAITING_INIT_PTS&&this.tick()}},v.startLoad=function(f){if(!this.levels){this.startPosition=f,this.state=S.State.STOPPED;return}var m=this.lastCurrentTime;this.stopLoad(),this.setInterval(D),this.fragLoadError=0,m>0&&f===-1?(this.log("Override startPosition with lastCurrentTime @"+m.toFixed(3)),this.state=S.State.IDLE):(this.loadedmetadata=!1,this.state=S.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=f,this.tick()},v.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_TRACK:{var f,m=this.levels,_=this.trackId,x=m==null||((f=m[_])===null||f===void 0)?void 0:f.details;if(x){if(this.waitForCdnTuneIn(x))break;this.state=S.State.WAITING_INIT_PTS}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var g,j=performance.now(),U=this.retryDate;(!U||j>=U||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=S.State.IDLE);break}case S.State.WAITING_INIT_PTS:{var R=this.waitingData;if(R){var W=R.frag,H=R.part,L=R.cache,G=R.complete;if(this.initPTS[W.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=S.State.FRAG_LOADING;var z=L.flush(),J={frag:W,part:H,payload:z,networkDetails:null};this._handleFragmentLoadProgress(J),G&&k.prototype._handleFragmentLoadComplete.call(this,J)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+W.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var te=this.getLoadPosition(),_e=P.BufferHelper.bufferInfo(this.mediaBuffer,te,this.config.maxBufferHole),ce=Object(o.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,W);ce<0&&(n.logger.log("Waiting fragment cc ("+W.cc+") @ "+W.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=S.State.IDLE}}this.onTickEnd()},v.clearWaitingFragment=function(){var f=this.waitingData;f&&(this.fragmentTracker.removeFragment(f.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=S.State.IDLE)},v.onTickEnd=function(){var f=this.media;if(!f||!f.readyState)return;var m=this.mediaBuffer?this.mediaBuffer:f,_=m.buffered;!this.loadedmetadata&&_.length&&(this.loadedmetadata=!0),this.lastCurrentTime=f.currentTime},v.doTickIdle=function(){var f,m,_=this.hls,x=this.levels,g=this.media,j=this.trackId,U=_.config;if(!x||!x[j])return;if(!g&&(this.startFragRequested||!U.startFragPrefetch))return;var R=x[j],W=R.details;if(!W||W.live&&this.levelLastLoaded!==j||this.waitForCdnTuneIn(W)){this.state=S.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,b.PlaylistLevelType.AUDIO));var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,b.PlaylistLevelType.AUDIO);if(H===null)return;var L=H.len,G=this.getMaxBufferLength(),z=this.audioSwitch;if(L>=G&&!z)return;if(!z&&this._streamEnded(H,W)){_.trigger(C.Events.BUFFER_EOS,{type:"audio"}),this.state=S.State.ENDED;return}var J=W.fragments,te=J[0].start,_e=H.end;if(z){var ce=this.getLoadPosition();_e=ce,W.PTSKnown&&ce<te&&((H.end>te||H.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=te+.05))}var xe=this.getNextFragment(_e,W);if(!xe){this.bufferFlushed=!0;return}((f=xe.decryptdata)===null||f===void 0?void 0:f.keyFormat)==="identity"&&!((m=xe.decryptdata)!==null&&m!==void 0&&m.key)?this.loadKey(xe,W):this.loadFragment(xe,W,_e)},v.getMaxBufferLength=function(){var f=k.prototype.getMaxBufferLength.call(this),m=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,b.PlaylistLevelType.MAIN);return m===null?f:Math.max(f,m.len)},v.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},v.onAudioTracksUpdated=function(f,m){var _=m.audioTracks;this.resetTransmuxer(),this.levels=_.map(function(x){return new t.Level(x)})},v.onAudioTrackSwitching=function(f,m){var _=!!m.url;this.trackId=m.id;var x=this.fragCurrent;x!=null&&x.loader&&x.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),_?this.setInterval(D):this.resetTransmuxer(),_?(this.audioSwitch=!0,this.state=S.State.IDLE):this.state=S.State.STOPPED,this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},v.onLevelLoaded=function(f,m){this.mainDetails=m.details},v.onAudioTrackLoaded=function(f,m){var _,x=this.levels,g=m.details,j=m.id;if(!x){this.warn("Audio tracks were reset while loading level "+j);return}this.log("Track "+j+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var U=x[j],R=0;if(g.live||(_=U.details)!==null&&_!==void 0&&_.live){var W=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!W)return;!U.details&&g.hasProgramDateTime&&W.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(g,W),R=g.fragments[0].start):R=this.alignPlaylists(g,U.details)}U.details=g,this.levelLastLoaded=j,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(U.details,R),this.state===S.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=S.State.IDLE),this.tick()},v._handleFragmentLoadProgress=function(f){var m,_=f.frag,x=f.part,g=f.payload,j=this.config,U=this.trackId,R=this.levels;if(!R){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var W=R[U];console.assert(W,"Audio track is defined on fragment load progress");var H=W.details;console.assert(H,"Audio track details are defined on fragment load progress");var L=j.defaultAudioCodec||W.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new p.default(this.hls,b.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var z=this.initPTS[_.cc],J=(m=_.initSegment)===null||m===void 0?void 0:m.data;if(z!==void 0){var te=!1,_e=x?x.index:-1,ce=_e!==-1,xe=new a.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,g.byteLength,_e,ce);G.push(g,J,L,"",_,x,H.totalduration,te,xe,z)}else{n.logger.log("Unknown video PTS for cc "+_.cc+", waiting for video PTS before demuxing audio frag "+_.sn+" of ["+H.startSN+" ,"+H.endSN+"],track "+U);var Te=this.waitingData=this.waitingData||{frag:_,part:x,cache:new u.default,complete:!1},je=Te.cache;je.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=S.State.WAITING_INIT_PTS}},v._handleFragmentLoadComplete=function(f){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,f)},v.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},v.onBufferCreated=function(f,m){var _=m.tracks.audio;_&&(this.mediaBuffer=_.buffer),m.tracks.video&&(this.videoBuffer=m.tracks.video.buffer)},v.onFragBuffered=function(f,m){var _=m.frag,x=m.part;if(_.type!==b.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(x?" p: "+x.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}_.sn!=="initSegment"&&(this.fragPrevious=_,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(_,x)},v.onError=function(f,m){switch(m.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(b.PlaylistLevelType.AUDIO,m);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==S.State.ERROR&&this.state!==S.State.STOPPED&&(this.state=m.fatal?S.State.ERROR:S.State.IDLE,this.warn(m.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(m.parent==="audio"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var _=!0,x=this.getFwdBufferInfo(this.mediaBuffer,b.PlaylistLevelType.AUDIO);x&&x.len>.5&&(_=!this.reduceMaxBufferLength(x.len)),_&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},v.onBufferFlushed=function(f,m){var _=m.type;_===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},v._handleTransmuxComplete=function(f){var m,_="audio",x=this.hls,g=f.remuxResult,j=f.chunkMeta,U=this.getCurrentContext(j);if(!U){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 R=U.frag,W=U.part,H=g.audio,L=g.text,G=g.id3,z=g.initSegment;if(this.fragContextChanged(R))return;if(this.state=S.State.PARSING,this.audioSwitch&&H&&this.completeAudioSwitch(),z!=null&&z.tracks&&(this._bufferInitSegment(z.tracks,R,j),x.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:R,id:_,tracks:z.tracks})),H){var J=H.startPTS,te=H.endPTS,_e=H.startDTS,ce=H.endDTS;W&&(W.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:J,endPTS:te,startDTS:_e,endDTS:ce}),R.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,J,te,_e,ce),this.bufferFragmentData(H,R,W,j)}if(G!=null&&(m=G.samples)!==null&&m!==void 0&&m.length){var xe=s({frag:R,id:_},G);x.trigger(C.Events.FRAG_PARSING_METADATA,xe)}if(L){var Te=s({frag:R,id:_},L);x.trigger(C.Events.FRAG_PARSING_USERDATA,Te)}},v._bufferInitSegment=function(f,m,_){if(this.state!==S.State.PARSING)return;f.video&&delete f.video;var x=f.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(C.Events.BUFFER_CODECS,f);var g=x.initSegment;if(g!=null&&g.byteLength){var j={type:"audio",frag:m,part:null,chunkMeta:_,parent:m.type,data:g};this.hls.trigger(C.Events.BUFFER_APPENDING,j)}this.tick()},v.loadFragment=function(f,m,_){var x=this.fragmentTracker.getState(f);this.fragCurrent=f,(this.audioSwitch||x===y.FragmentState.NOT_LOADED||x===y.FragmentState.PARTIAL)&&(f.sn==="initSegment"?this._loadInitSegment(f):m.live&&!Object(F.isFiniteNumber)(this.initPTS[f.cc])?(this.log("Waiting for video PTS in continuity counter "+f.cc+" of live stream before loading audio fragment "+f.sn+" of level "+this.trackId),this.state=S.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,f,m,_)))},v.completeAudioSwitch=function(){var f=this.hls,m=this.media,_=this.trackId;m&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,f.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:_})},w}(S.default);B.default=T},"./src/controller/audio-track-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/errors.ts"),C=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function y(p,a){for(var o=0;o<a.length;o++){var h=a[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(p,h.key,h)}}function t(p,a,o){return a&&y(p.prototype,a),o&&y(p,o),p}function b(p,a){p.prototype=Object.create(a.prototype),p.prototype.constructor=p,i(p,a)}function i(p,a){return i=Object.setPrototypeOf||function(h,l){return h.__proto__=l,h},i(p,a)}var u=function(p){b(a,p);function a(h){var l;return l=p.call(this,h,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var o=a.prototype;return o.registerListeners=function(){var l=this.hls;l.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(F.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(F.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(l,n){this.tracks=n.audioTracks||[]},o.onAudioTrackLoaded=function(l,n){var s=n.id,d=n.details,E=this.tracksInGroup[s];if(!E){this.warn("Invalid audio track id "+s);return}var D=E.details;E.details=n.details,this.log("audioTrack "+s+" loaded ["+d.startSN+"-"+d.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,n,D))},o.onLevelLoading=function(l,n){this.switchLevel(n.level)},o.onLevelSwitching=function(l,n){this.switchLevel(n.level)},o.switchLevel=function(l){var n=this.hls.levels[l];if(!(n!=null&&n.audioGroupIds))return;var s=n.audioGroupIds[n.urlId];if(this.groupId!==s){this.groupId=s;var d=this.tracks.filter(function(D){return!s||D.groupId===s});this.selectDefaultTrack&&!d.some(function(D){return D.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=d;var E={audioTracks:d};this.log("Updating audio tracks, "+d.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(F.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},o.onError=function(l,n){if(p.prototype.onError.call(this,l,n),n.fatal||!n.context)return;n.context.type===P.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},o.setAudioTrack=function(l){var n=this.tracksInGroup;if(l<0||l>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=n[this.trackId];this.log("Now switching to audio-track index "+l);var d=n[l],E=d.id,D=d.groupId,T=D===void 0?"":D,k=d.name,w=d.type,v=d.url;if(this.trackId=l,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(F.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:T,name:k,type:w,url:v}),d.details&&!d.details.live)return;var c=this.switchParams(d.url,s==null?void 0:s.details);this.loadPlaylist(c)},o.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,s=this.findTrackId(n)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(l){for(var n=this.tracksInGroup,s=0;s<n.length;s++){var d=n[s];if((!this.selectDefaultTrack||d.default)&&(!l||l===d.name))return d.id}return-1},o.loadPlaylist=function(l){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var s=n.id,d=n.groupId,E=n.url;if(l)try{E=l.addDirectives(E)}catch(D){this.warn("Could not construct new URL with HLS Delivery Directives: "+D)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(F.Events.AUDIO_TRACK_LOADING,{url:E,id:s,groupId:d,deliveryDirectives:l||null})}},t(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),a}(C.default);B.default=u},"./src/controller/base-playlist-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/polyfills/number.ts"),S=I("./src/types/level.ts"),C=I("./src/controller/level-helper.ts"),P=I("./src/utils/logger.ts"),y=I("./src/errors.ts"),t=function(){function b(u,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=P.logger.log.bind(P.logger,p+":"),this.warn=P.logger.warn.bind(P.logger,p+":"),this.hls=u}var i=b.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(p,a){a.fatal&&a.type===y.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(p,a){var o=a==null?void 0:a.renditionReports;if(o)for(var h=0;h<o.length;h++){var l=o[h],n=""+l.URI;if(n===p.substr(-n.length)){var s=parseInt(l["LAST-MSN"]),d=parseInt(l["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var E=Math.min(a.age-a.partTarget,a.targetduration);d!==void 0&&E>a.partTarget&&(d+=1)}if(Object(F.isFiniteNumber)(s))return new S.HlsUrlParameters(s,Object(F.isFiniteNumber)(d)?d:void 0,S.HlsSkip.No)}}},i.loadPlaylist=function(p){},i.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},i.playlistLoaded=function(p,a,o){var h=this,l=a.details,n=a.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||o!=null&&o.live){if(l.reloaded(o),o&&this.log("live playlist "+p+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),o&&l.fragments.length>0&&Object(C.mergeDetails)(o,l),!this.canLoad||!l.live)return;var d,E=void 0,D=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var T=this.hls.config.lowLatencyMode,k=l.lastPartSn,w=l.endSN,v=l.lastPartIndex,c=v!==-1,f=k===w,m=T?0:v;c?(E=f?w+1:k,D=f?m:v+1):E=w+1;var _=l.age,x=_+l.ageHeader,g=Math.min(x-l.partTarget,l.targetduration*1.5);if(g>0){if(o&&g>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+g+" with playlist age: "+l.age),g=0;else{var j=Math.floor(g/l.targetduration);if(E+=j,D!==void 0){var U=Math.round(g%l.targetduration/l.partTarget);D+=U}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+_.toFixed(2)+"s goal: "+g+" skip sn "+j+" to part "+D)}l.tuneInGoal=g}if(d=this.getDeliveryDirectives(l,a.deliveryDirectives,E,D),T||!f){this.loadPlaylist(d);return}}else d=this.getDeliveryDirectives(l,a.deliveryDirectives,E,D);var R=Object(C.computeReloadInterval)(l,n);E!==void 0&&l.canBlockReload&&(R-=l.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(R)+" ms"),this.timer=self.setTimeout(function(){return h.loadPlaylist(d)},R)}else this.clearTimer()},i.getDeliveryDirectives=function(p,a,o,h){var l=Object(S.getSkipValue)(p,o);return a!=null&&a.skip&&p.deltaUpdateFailed&&(o=a.msn,h=a.part,l=S.HlsSkip.No),new S.HlsUrlParameters(o,h,l)},i.retryLoadingOrFail=function(p){var a=this,o=this.hls.config,h=this.retryCount<o.levelLoadingMaxRetry;if(h){var l;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(l=p.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return h},b}()},"./src/controller/base-stream-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"State",function(){return w}),I.d(B,"default",function(){return v});var F=I("./src/polyfills/number.ts"),S=I("./src/task-loop.ts"),C=I("./src/controller/fragment-tracker.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/utils/logger.ts"),t=I("./src/events.ts"),b=I("./src/errors.ts"),i=I("./src/types/transmuxer.ts"),u=I("./src/utils/mp4-tools.ts"),p=I("./src/utils/discontinuities.ts"),a=I("./src/controller/fragment-finders.ts"),o=I("./src/controller/level-helper.ts"),h=I("./src/loader/fragment-loader.ts"),l=I("./src/crypt/decrypter.ts"),n=I("./src/utils/time-ranges.ts"),s=I("./src/types/loader.ts");function d(c,f){for(var m=0;m<f.length;m++){var _=f[m];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(c,_.key,_)}}function E(c,f,m){return f&&d(c.prototype,f),m&&d(c,m),c}function D(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function T(c,f){c.prototype=Object.create(f.prototype),c.prototype.constructor=c,k(c,f)}function k(c,f){return k=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},k(c,f)}var w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},v=function(c){T(f,c);function f(_,x,g){var j;return j=c.call(this)||this,j.hls=void 0,j.fragPrevious=null,j.fragCurrent=null,j.fragmentTracker=void 0,j.transmuxer=null,j._state=w.STOPPED,j.media=void 0,j.mediaBuffer=void 0,j.config=void 0,j.bitrateTest=!1,j.lastCurrentTime=0,j.nextLoadPosition=0,j.startPosition=0,j.loadedmetadata=!1,j.fragLoadError=0,j.retryDate=0,j.levels=null,j.fragmentLoader=void 0,j.levelLastLoaded=null,j.startFragRequested=!1,j.decrypter=void 0,j.initPTS=[],j.onvseeking=null,j.onvended=null,j.logPrefix="",j.log=void 0,j.warn=void 0,j.logPrefix=g,j.log=y.logger.log.bind(y.logger,g+":"),j.warn=y.logger.warn.bind(y.logger,g+":"),j.hls=_,j.fragmentLoader=new h.default(_.config),j.fragmentTracker=x,j.config=_.config,j.decrypter=new l.default(_,_.config),_.on(t.Events.KEY_LOADED,j.onKeyLoaded,D(j)),j}var m=f.prototype;return m.doTick=function(){this.onTickEnd()},m.onTickEnd=function(){},m.startLoad=function(x){},m.stopLoad=function(){this.fragmentLoader.abort();var x=this.fragCurrent;x&&this.fragmentTracker.removeFragment(x),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},m._streamEnded=function(x,g){var j=this.fragCurrent,U=this.fragmentTracker;if(!g.live&&j&&j.sn===g.endSN&&!x.nextStart){var R=U.getState(j);return R===C.FragmentState.PARTIAL||R===C.FragmentState.OK}return!1},m.onMediaAttached=function(x,g){var j=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),j.addEventListener("seeking",this.onvseeking),j.addEventListener("ended",this.onvended);var U=this.config;this.levels&&U.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(U.startPosition)},m.onMediaDetaching=function(){var x=this.media;x!=null&&x.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),x&&(x.removeEventListener("seeking",this.onvseeking),x.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},m.onMediaSeeking=function(){var x=this.config,g=this.fragCurrent,j=this.media,U=this.mediaBuffer,R=this.state,W=j?j.currentTime:0,H=P.BufferHelper.bufferInfo(U||j,W,x.maxBufferHole);if(this.log("media seeking to "+(Object(F.isFiniteNumber)(W)?W.toFixed(3):W)+", state: "+R),R===w.ENDED)this.resetLoadingState();else if(g&&!H.len){var L=x.maxFragLookUpTolerance,G=g.start-L,z=g.start+g.duration+L,J=W>z;(W<G||J)&&(J&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}j&&(this.lastCurrentTime=W),!this.loadedmetadata&&!H.len&&(this.nextLoadPosition=this.startPosition=W),this.tickImmediate()},m.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},m.onKeyLoaded=function(x,g){if(this.state!==w.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=w.IDLE;var j=this.levels[g.frag.level].details;j&&this.loadFragment(g.frag,j,g.frag.start)},m.onHandlerDestroying=function(){this.stopLoad(),c.prototype.onHandlerDestroying.call(this)},m.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(t.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,c.prototype.onHandlerDestroyed.call(this)},m.loadKey=function(x,g){this.log("Loading key for "+x.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level),this.state=w.KEY_LOADING,this.fragCurrent=x,this.hls.trigger(t.Events.KEY_LOADING,{frag:x})},m.loadFragment=function(x,g,j){this._loadFragForPlayback(x,g,j)},m._loadFragForPlayback=function(x,g,j){var U=this,R=function(H){if(U.fragContextChanged(x)){U.warn("Fragment "+x.sn+(H.part?" p: "+H.part.index:"")+" of level "+x.level+" was dropped during download."),U.fragmentTracker.removeFragment(x);return}x.stats.chunkCount++,U._handleFragmentLoadProgress(H)};this._doFragLoad(x,g,j,R).then(function(W){if(!W)return;U.fragLoadError=0;var H=U.state;if(U.fragContextChanged(x)){(H===w.FRAG_LOADING||H===w.BACKTRACKING||!U.fragCurrent&&H===w.PARSING)&&(U.fragmentTracker.removeFragment(x),U.state=w.IDLE);return}if("payload"in W&&(U.log("Loaded fragment "+x.sn+" of level "+x.level),U.hls.trigger(t.Events.FRAG_LOADED,W),U.state===w.BACKTRACKING)){U.fragmentTracker.backtrack(x,W),U.resetFragmentLoading(x);return}U._handleFragmentLoadComplete(W)}).catch(function(W){U.warn(W),U.resetFragmentLoading(x)})},m.flushMainBuffer=function(x,g,j){if(j===void 0&&(j=null),!(x-g))return;var U={startOffset:x,endOffset:g,type:j};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,U)},m._loadInitSegment=function(x){var g=this;this._doFragLoad(x).then(function(j){if(!j||g.fragContextChanged(x)||!g.levels)throw new Error("init load aborted");return j}).then(function(j){var U=g.hls,R=j.payload,W=x.decryptdata;if(R&&R.byteLength>0&&W&&W.key&&W.iv&&W.method==="AES-128"){var H=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(R),W.key.buffer,W.iv.buffer).then(function(L){var G=self.performance.now();return U.trigger(t.Events.FRAG_DECRYPTED,{frag:x,payload:L,stats:{tstart:H,tdecrypt:G}}),j.payload=L,j})}return j}).then(function(j){var U=g.fragCurrent,R=g.hls,W=g.levels;if(!W)throw new Error("init load aborted, missing levels");var H=W[x.level].details;console.assert(H,"Level details are defined when init segment is loaded");var L=x.stats;g.state=w.IDLE,g.fragLoadError=0,x.data=new Uint8Array(j.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),j.frag===U&&R.trigger(t.Events.FRAG_BUFFERED,{stats:L,frag:U,part:null,id:x.type}),g.tick()}).catch(function(j){g.warn(j),g.resetFragmentLoading(x)})},m.fragContextChanged=function(x){var g=this.fragCurrent;return!x||!g||x.level!==g.level||x.sn!==g.sn||x.urlId!==g.urlId},m.fragBufferedComplete=function(x,g){var j=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+x.type+" sn: "+x.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level+" "+n.default.toString(P.BufferHelper.getBuffered(j))),this.state=w.IDLE,this.tick()},m._handleFragmentLoadComplete=function(x){var g=this.transmuxer;if(!g)return;var j=x.frag,U=x.part,R=x.partsLoaded,W=!R||R.length===0||R.some(function(L){return!L}),H=new i.ChunkMetadata(j.level,j.sn,j.stats.chunkCount+1,0,U?U.index:-1,!W);g.flush(H)},m._handleFragmentLoadProgress=function(x){},m._doFragLoad=function(x,g,j,U){var R=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&&g){var W=g.partList;if(W&&U){j>x.end&&g.fragmentHint&&(x=g.fragmentHint);var H=this.getNextPart(W,x,j);if(H>-1){var L=W[H];return this.log("Loading part sn: "+x.sn+" p: "+L.index+" cc: "+x.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+H+"-"+(W.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(j.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:x,part:W[H],targetBufferTime:j}),this.doFragPartsLoad(x,W,H,U).catch(function(G){return R.handleFragLoadError(G)})}else if(!x.url||this.loadedEndOfParts(W,j))return Promise.resolve(null)}}return this.log("Loading fragment "+x.sn+" cc: "+x.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(j.toFixed(3))),Object(F.isFiniteNumber)(x.sn)&&!this.bitrateTest&&(this.nextLoadPosition=x.start+x.duration),this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:x,targetBufferTime:j}),this.fragmentLoader.load(x,U).catch(function(G){return R.handleFragLoadError(G)})},m.doFragPartsLoad=function(x,g,j,U){var R=this;return new Promise(function(W,H){var L=[],G=function z(J){var te=g[J];R.fragmentLoader.loadPart(x,te,U).then(function(_e){L[te.index]=_e;var ce=_e.part;R.hls.trigger(t.Events.FRAG_LOADED,_e);var xe=g[J+1];if(xe&&xe.fragment===x)z(J+1);else return W({frag:x,part:ce,partsLoaded:L})}).catch(H)};G(j)})},m.handleFragLoadError=function(x){var g=x.data;return g&&g.details===b.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(t.Events.ERROR,g),null},m._handleTransmuxerFlush=function(x){var g=this.getCurrentContext(x);if(!g||this.state!==w.PARSING){this.fragCurrent||(this.state=w.IDLE);return}var j=g.frag,U=g.part,R=g.level,W=self.performance.now();j.stats.parsing.end=W,U&&(U.stats.parsing.end=W),this.updateLevelTiming(j,U,R,x.partial)},m.getCurrentContext=function(x){var g=this.levels,j=x.level,U=x.sn,R=x.part;if(!g||!g[j])return this.warn("Levels object was unset while buffering fragment "+U+" of level "+j+". The current chunk will not be buffered."),null;var W=g[j],H=R>-1?Object(o.getPartWith)(W,U,R):null,L=H?H.fragment:Object(o.getFragmentWithSN)(W,U,this.fragCurrent);return L?{frag:L,part:H,level:W}:null},m.bufferFragmentData=function(x,g,j,U){if(!x||this.state!==w.PARSING)return;var R=x.data1,W=x.data2,H=R;if(R&&W&&(H=Object(u.appendUint8Array)(R,W)),!H||!H.length)return;var L={type:x.type,frag:g,part:j,chunkMeta:U,parent:g.type,data:H};this.hls.trigger(t.Events.BUFFER_APPENDING,L),x.dropped&&x.independent&&!j&&this.flushBufferGap(g)},m.flushBufferGap=function(x){var g=this.media;if(!g)return;if(!P.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,x.start);return}var j=g.currentTime,U=P.BufferHelper.bufferInfo(g,j,0),R=x.duration,W=Math.min(this.config.maxFragLookUpTolerance*2,R*.25),H=Math.max(Math.min(x.start-W,U.end-W),j+W);x.start-H>W&&this.flushMainBuffer(H,x.start)},m.getFwdBufferInfo=function(x,g){var j=this.config,U=this.getLoadPosition();if(!Object(F.isFiniteNumber)(U))return null;var R=P.BufferHelper.bufferInfo(x,U,j.maxBufferHole);if(R.len===0&&R.nextStart!==void 0){var W=this.fragmentTracker.getBufferedFrag(U,g);if(W&&R.nextStart<W.end)return P.BufferHelper.bufferInfo(x,U,Math.max(R.nextStart,j.maxBufferHole))}return R},m.getMaxBufferLength=function(x){var g=this.config,j;return x?j=Math.max(8*g.maxBufferSize/x,g.maxBufferLength):j=g.maxBufferLength,Math.min(j,g.maxMaxBufferLength)},m.reduceMaxBufferLength=function(x){var g=this.config,j=x||g.maxBufferLength;return g.maxMaxBufferLength>=j?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},m.getNextFragment=function(x,g){var j,U,R=g.fragments,W=R.length;if(!W)return null;var H=this.config,L=R[0].start,G;if(g.live){var z=H.initialLiveManifestSize;if(W<z)return this.warn("Not enough fragments to start playback (have: "+W+", need: "+z+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(g,R),this.startPosition=G?this.hls.liveSyncPosition||G.start:x)}else x<=L&&(G=R[0]);if(!G){var J=H.lowLatencyMode?g.partEnd:g.fragmentEnd;G=this.getFragmentAtPosition(x,J,g)}return(j=G)!==null&&j!==void 0&&j.initSegment&&!((U=G)!==null&&U!==void 0&&U.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},m.getNextPart=function(x,g,j){for(var U=-1,R=!1,W=!0,H=0,L=x.length;H<L;H++){var G=x[H];if(W=W&&!G.independent,U>-1&&j<G.start)break;var z=G.loaded;!z&&(R||G.independent||W)&&G.fragment===g&&(U=H),R=z}return U},m.loadedEndOfParts=function(x,g){var j=x[x.length-1];return j&&g>j.start&&j.loaded},m.getInitialLiveFragment=function(x,g){var j=this.fragPrevious,U=null;if(j){if(x.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+j.programDateTime),U=Object(a.findFragmentByPDT)(g,j.endProgramDateTime,this.config.maxFragLookUpTolerance)),!U){var R=j.sn+1;if(R>=x.startSN&&R<=x.endSN){var W=g[R-x.startSN];j.cc===W.cc&&(U=W,this.log("Live playlist, switching playlist, load frag with next SN: "+U.sn))}U||(U=Object(a.findFragWithCC)(g,j.cc),U&&this.log("Live playlist, switching playlist, load frag with same CC: "+U.sn))}}else{var H=this.hls.liveSyncPosition;H!==null&&(U=this.getFragmentAtPosition(H,this.bitrateTest?x.fragmentEnd:x.edge,x))}return U},m.getFragmentAtPosition=function(x,g,j){var U=this.config,R=this.fragPrevious,W=j.fragments,H=j.endSN,L=j.fragmentHint,G=U.maxFragLookUpTolerance,z=!!(U.lowLatencyMode&&j.partList&&L);z&&L&&!this.bitrateTest&&(W=W.concat(L),H=L.sn);var J;if(x<g){var te=x>g-G?0:G;J=Object(a.findFragmentByPTS)(R,W,x,te)}else J=W[W.length-1];if(J){var _e=J.sn-j.startSN,ce=R&&J.level===R.level,xe=W[_e+1],Te=this.fragmentTracker.getState(J);if(Te===C.FragmentState.BACKTRACKED){J=null;for(var je=_e;W[je]&&this.fragmentTracker.getState(W[je])===C.FragmentState.BACKTRACKED;)R?J=W[je--]:J=W[--je];J||(J=xe)}else R&&J.sn===R.sn&&!z&&(ce&&(J.sn<H&&this.fragmentTracker.getState(xe)!==C.FragmentState.OK?(this.log("SN "+J.sn+" just loaded, load next one: "+xe.sn),J=xe):J=null))}return J},m.synchronizeToLiveEdge=function(x){var g=this.config,j=this.media;if(!j)return;var U=this.hls.liveSyncPosition,R=j.currentTime,W=x.fragments[0].start,H=x.edge,L=R>=W-g.maxFragLookUpTolerance&&R<=H;if(U!==null&&j.duration>U&&(R<U||!L)){var G=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*x.targetduration;(!L&&j.readyState<4||R<H-G)&&(this.loadedmetadata||(this.nextLoadPosition=U),j.readyState&&(this.warn("Playback: "+R.toFixed(3)+" is located too far from the end of live sliding playlist: "+H+", reset currentTime to : "+U.toFixed(3)),j.currentTime=U))}},m.alignPlaylists=function(x,g){var j=this.levels,U=this.levelLastLoaded,R=this.fragPrevious,W=U!==null?j[U]:null,H=x.fragments.length;if(!H)return this.warn("No fragments in live playlist"),0;var L=x.fragments[0].start,G=!g,z=x.alignedSliding&&Object(F.isFiniteNumber)(L);if(G||!z&&!L){Object(p.alignStream)(R,W,x);var J=x.fragments[0].start;return this.log("Live playlist sliding: "+J.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+x.startSN+" prev-sn: "+(R?R.sn:"na")+" fragments: "+H),J}return L},m.waitForCdnTuneIn=function(x){var g=3;return x.live&&x.canBlockReload&&x.tuneInGoal>Math.max(x.partHoldBack,x.partTarget*g)},m.setStartPosition=function(x,g){var j=this.startPosition;if(j<g&&(j=-1),j===-1||this.lastCurrentTime===-1){var U=x.startTimeOffset;Object(F.isFiniteNumber)(U)?(j=g+U,U<0&&(j+=x.totalduration),j=Math.min(Math.max(g,j),g+x.totalduration),this.log("Start time offset "+U+" found in playlist, adjust startPosition to "+j),this.startPosition=j):x.live?j=this.hls.liveSyncPosition||g:this.startPosition=j=0,this.lastCurrentTime=j}this.nextLoadPosition=j},m.getLoadPosition=function(){var x=this.media,g=0;return this.loadedmetadata&&x?g=x.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},m.handleFragLoadAborted=function(x,g){this.transmuxer&&x.sn!=="initSegment"&&x.stats.aborted&&(this.warn("Fragment "+x.sn+(g?" part"+g.index:"")+" of level "+x.level+" was aborted"),this.resetFragmentLoading(x))},m.resetFragmentLoading=function(x){(!this.fragCurrent||!this.fragContextChanged(x))&&(this.state=w.IDLE)},m.onFragmentOrKeyLoadError=function(x,g){if(g.fatal)return;var j=g.frag;if(!j||j.type!==x)return;var U=this.fragCurrent;console.assert(U&&j.sn===U.sn&&j.level===U.level&&j.urlId===U.urlId,"Frag load error must match current frag to retry");var R=this.config;if(this.fragLoadError+1<=R.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(j.level))return;var W=Math.min(Math.pow(2,this.fragLoadError)*R.fragLoadingRetryDelay,R.fragLoadingMaxRetryTimeout);this.warn("Fragment "+j.sn+" of "+x+" "+j.level+" failed to load, retrying in "+W+"ms"),this.retryDate=self.performance.now()+W,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(x===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(y.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)},m.afterBufferFlushed=function(x,g,j){if(!x)return;var U=P.BufferHelper.getBuffered(x);this.fragmentTracker.detectEvictedFragments(g,U,j),this.state===w.ENDED&&this.resetLoadingState()},m.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},m.resetLiveStartWhenNotLoaded=function(x){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[x].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},m.updateLevelTiming=function(x,g,j,U){var R=this,W=j.details;console.assert(!!W,"level.details must be defined");var H=Object.keys(x.elementaryStreams).reduce(function(L,G){var z=x.elementaryStreams[G];if(z){var J=z.endPTS-z.startPTS;if(J<=0)return R.warn("Could not parse fragment "+x.sn+" "+G+" duration reliably ("+J+") resetting transmuxer to fallback to playlist timing"),R.resetTransmuxer(),L||!1;var te=U?0:Object(o.updateFragPTSDTS)(W,x,z.startPTS,z.endPTS,z.startDTS,z.endDTS);return R.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:W,level:j,drift:te,type:G,frag:x,start:z.startPTS,end:z.endPTS}),!0}return L},!1);H?(this.state=w.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:x,part:g})):this.resetLoadingState()},m.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(f,[{key:"state",get:function(){return this._state},set:function(x){var g=this._state;g!==x&&(this._state=x,this.log(g+"->"+x))}}]),f}(S.default)},"./src/controller/buffer-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./src/polyfills/number.ts"),S=I("./src/events.ts"),C=I("./src/utils/logger.ts"),P=I("./src/errors.ts"),y=I("./src/utils/buffer-helper.ts"),t=I("./src/utils/mediasource-helper.ts"),b=I("./src/loader/fragment.ts"),i=I("./src/controller/buffer-operation-queue.ts"),u=Object(t.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function o(l){var n=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=n.hls,d=n.media,E=n.mediaSource;C.logger.log("[buffer-controller]: Media source opened"),d&&(n.updateMediaElementDuration(),s.trigger(S.Events.MEDIA_ATTACHED,{media:d})),E&&E.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){C.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){C.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var h=o.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var n=this.hls;n.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(S.Events.BUFFER_RESET,this.onBufferReset,this),n.on(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(S.Events.BUFFER_EOS,this.onBufferEos,this),n.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(S.Events.FRAG_PARSED,this.onFragParsed,this),n.on(S.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(S.Events.BUFFER_RESET,this.onBufferReset,this),n.off(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(S.Events.BUFFER_EOS,this.onBufferEos,this),n.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(S.Events.FRAG_PARSED,this.onFragParsed,this),n.off(S.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(n,s){var d=2;(s.audio&&!s.video||!s.altAudio)&&(d=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=d,this.details=null,C.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(n,s){var d=this.media=s.media;if(d&&u){var E=this.mediaSource=new u;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),d.src=self.URL.createObjectURL(E),this._objectUrl=d.src}},h.onMediaDetaching=function(){var n=this.media,s=this.mediaSource,d=this._objectUrl;if(s){if(C.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(E){C.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(d&&self.URL.revokeObjectURL(d),n.src===d?(n.removeAttribute("src"),n.load()):C.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(S.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(s){var d=n.sourceBuffer[s];try{d&&(n.removeBufferListeners(s),n.mediaSource&&n.mediaSource.removeSourceBuffer(d),n.sourceBuffer[s]=void 0)}catch(E){C.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",E)}}),this._initSourceBuffer()},h.onBufferCodecs=function(n,s){var d=this,E=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(D){if(E){var T=d.tracks[D];if(T&&typeof T.buffer.changeType=="function"){var k=s[D],w=k.codec,v=k.levelCodec,c=k.container,f=(T.levelCodec||T.codec).replace(p,"$1"),m=(v||w).replace(p,"$1");if(f!==m){var _=c+";codecs="+(v||w);d.appendChangeType(D,_)}}}else d.pendingTracks[D]=s[D]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(n,s){var d=this,E=this.operationQueue,D={execute:function(){var k=d.sourceBuffer[n];k&&(C.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+s),k.changeType(s)),E.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(k){C.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",k)}};E.append(D,n)},h.onBufferAppending=function(n,s){var d=this,E=this.hls,D=this.operationQueue,T=this.tracks,k=s.data,w=s.type,v=s.frag,c=s.part,f=s.chunkMeta,m=f.buffering[w],_=self.performance.now();m.start=_;var x=v.stats.buffering,g=c?c.stats.buffering:null;x.start===0&&(x.start=_),g&&g.start===0&&(g.start=_);var j=T.audio,U=w==="audio"&&f.id===1&&(j==null?void 0:j.container)==="audio/mpeg",R={execute:function(){if(m.executeStart=self.performance.now(),U){var H=d.sourceBuffer[w];if(H){var L=v.start-H.timestampOffset;Math.abs(L)>=.1&&(C.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v.start+" (delta: "+L+") sn: "+v.sn+")"),H.timestampOffset=v.start)}}d.appendExecutor(k,w)},onStart:function(){},onComplete:function(){var H=self.performance.now();m.executeEnd=m.end=H,x.first===0&&(x.first=H),g&&g.first===0&&(g.first=H);var L=d.sourceBuffer,G={};for(var z in L)G[z]=y.BufferHelper.getBuffered(L[z]);d.appendError=0,d.hls.trigger(S.Events.BUFFER_APPENDED,{type:w,frag:v,part:c,chunkMeta:f,parent:v.type,timeRanges:G})},onError:function(H){C.logger.error("[buffer-controller]: Error encountered while trying to append to the "+w+" SourceBuffer",H);var L={type:P.ErrorTypes.MEDIA_ERROR,parent:v.type,details:P.ErrorDetails.BUFFER_APPEND_ERROR,err:H,fatal:!1};H.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=P.ErrorDetails.BUFFER_FULL_ERROR:(d.appendError++,L.details=P.ErrorDetails.BUFFER_APPEND_ERROR,d.appendError>E.config.appendErrorMaxRetry&&(C.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),E.trigger(S.Events.ERROR,L)}};D.append(R,w)},h.onBufferFlushing=function(n,s){var d=this,E=this.operationQueue,D=function(k){return{execute:d.removeExecutor.bind(d,k,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){d.hls.trigger(S.Events.BUFFER_FLUSHED,{type:k})},onError:function(v){C.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",v)}}};s.type?E.append(D(s.type),s.type):this.getSourceBufferTypes().forEach(function(T){E.append(D(T),T)})},h.onFragParsed=function(n,s){var d=this,E=s.frag,D=s.part,T=[],k=D?D.elementaryStreams:E.elementaryStreams;k[b.ElementaryStreamTypes.AUDIOVIDEO]?T.push("audiovideo"):(k[b.ElementaryStreamTypes.AUDIO]&&T.push("audio"),k[b.ElementaryStreamTypes.VIDEO]&&T.push("video"));var w=function(){var c=self.performance.now();E.stats.buffering.end=c,D&&(D.stats.buffering.end=c);var f=D?D.stats:E.stats;d.hls.trigger(S.Events.FRAG_BUFFERED,{frag:E,part:D,stats:f,id:E.type})};T.length===0&&C.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(w,T)},h.onFragChanged=function(n,s){this.flushBackBuffer()},h.onBufferEos=function(n,s){var d=this,E=this.getSourceBufferTypes().reduce(function(D,T){var k=d.sourceBuffer[T];return(!s.type||s.type===T)&&(k&&!k.ended&&(k.ended=!0,C.logger.log("[buffer-controller]: "+T+" sourceBuffer now EOS"))),D&&!!(!k||k.ended)},!0);E&&this.blockBuffers(function(){var D=d.mediaSource;if(!D||D.readyState!=="open")return;D.endOfStream()})},h.onLevelUpdated=function(n,s){var d=s.details;if(!d.fragments.length)return;this.details=d,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var n=this.hls,s=this.details,d=this.media,E=this.sourceBuffer;if(!d||s===null)return;var D=this.getSourceBufferTypes();if(!D.length)return;var T=s.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(F.isFiniteNumber)(T)||T<0)return;var k=d.currentTime,w=s.levelTargetDuration,v=Math.max(T,w),c=Math.floor(k/w)*w-v;D.forEach(function(f){var m=E[f];if(m){var _=y.BufferHelper.getBuffered(m);_.length>0&&c>_.start(0)&&(n.trigger(S.Events.BACK_BUFFER_REACHED,{bufferEnd:c}),s.live&&n.trigger(S.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:c}),n.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:c,type:f}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,s=this.hls,d=this.media,E=this.mediaSource,D=n.fragments[0].start+n.totalduration,T=d.duration,k=Object(F.isFiniteNumber)(E.duration)?E.duration:0;n.live&&s.config.liveDurationInfinity?(C.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(n)):(D>k&&D>T||!Object(F.isFiniteNumber)(T))&&(C.logger.log("[buffer-controller]: Updating Media Source duration to "+D.toFixed(3)),E.duration=D)},h.updateSeekableRange=function(n){var s=this.mediaSource,d=n.fragments,E=d.length;if(E&&n.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var D=Math.max(0,d[0].start),T=Math.max(D,D+n.totalduration);s.setLiveSeekableRange(D,T)}},h.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,s=this.operationQueue,d=this.pendingTracks,E=Object.keys(d).length;if(E&&!n||E===2){this.createSourceBuffers(d),this.pendingTracks={};var D=this.getSourceBufferTypes();if(D.length===0){this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}D.forEach(function(T){s.executeNext(T)})}},h.createSourceBuffers=function(n){var s=this.sourceBuffer,d=this.mediaSource;if(!d)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var D in n)if(!s[D]){var T=n[D];if(!T)throw Error("source buffer exists for track "+D+", however track does not");var k=T.levelCodec||T.codec,w=T.container+";codecs="+k;C.logger.log("[buffer-controller]: creating sourceBuffer("+w+")");try{var v=s[D]=d.addSourceBuffer(w),c=D;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[D]={buffer:v,codec:k,container:T.container,levelCodec:T.levelCodec,id:T.id},E++}catch(f){C.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+f.message),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:f,mimeType:w})}}E&&this.hls.trigger(S.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(n){var s=this.operationQueue,d=s.current(n);d.onStart()},h._onSBUpdateEnd=function(n){var s=this.operationQueue,d=s.current(n);d.onComplete(),s.shiftAndExecuteNext(n)},h._onSBUpdateError=function(n,s){C.logger.error("[buffer-controller]: "+n+" SourceBuffer error",s),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var d=this.operationQueue.current(n);d&&d.onError(s)},h.removeExecutor=function(n,s,d){var E=this.media,D=this.mediaSource,T=this.operationQueue,k=this.sourceBuffer,w=k[n];if(!E||!D||!w){C.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),T.shiftAndExecuteNext(n);return}var v=Object(F.isFiniteNumber)(E.duration)?E.duration:Infinity,c=Object(F.isFiniteNumber)(D.duration)?D.duration:Infinity,f=Math.max(0,s),m=Math.min(d,v,c);m>f?(C.logger.log("[buffer-controller]: Removing ["+f+","+m+"] from the "+n+" SourceBuffer"),console.assert(!w.updating,n+" sourceBuffer must not be updating"),w.remove(f,m)):T.shiftAndExecuteNext(n)},h.appendExecutor=function(n,s){var d=this.operationQueue,E=this.sourceBuffer,D=E[s];if(!D){C.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),d.shiftAndExecuteNext(s);return}D.ended=!1,console.assert(!D.updating,s+" sourceBuffer must not be updating"),D.appendBuffer(n)},h.blockBuffers=function(n,s){var d=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){C.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var E=this.operationQueue,D=s.map(function(T){return E.appendBlocker(T)});Promise.all(D).then(function(){n(),s.forEach(function(T){var k=d.sourceBuffer[T];(!k||!k.updating)&&E.shiftAndExecuteNext(T)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(n,s,d){var E=this.sourceBuffer[n];if(!E)return;var D=d.bind(this,n);this.listeners[n].push({event:s,listener:D}),E.addEventListener(s,D)},h.removeBufferListeners=function(n){var s=this.sourceBuffer[n];if(!s)return;this.listeners[n].forEach(function(d){s.removeEventListener(d.event,d.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return S});var F=I("./src/utils/logger.ts"),S=function(){function C(y){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=y}var P=C.prototype;return P.append=function(t,b){var i=this.queues[b];i.push(t),i.length===1&&this.buffers[b]&&this.executeNext(b)},P.insertAbort=function(t,b){var i=this.queues[b];i.unshift(t),this.executeNext(b)},P.appendBlocker=function(t){var b,i=new Promise(function(p){b=p}),u={execute:b,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,t),i},P.executeNext=function(t){var b=this.buffers,i=this.queues,u=b[t],p=i[t];if(p.length){var a=p[0];try{a.execute()}catch(o){F.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),(!u||!u.updating)&&(p.shift(),this.executeNext(t))}}},P.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},P.current=function(t){return this.queues[t][0]},C}()},"./src/controller/cap-level-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts");function S(y,t){for(var b=0;b<t.length;b++){var i=t[b];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(y,i.key,i)}}function C(y,t,b){return t&&S(y.prototype,t),b&&S(y,b),y}var P=function(){function y(b){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=b,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=y.prototype;return t.setStreamController=function(i){this.streamController=i},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var i=this.hls;i.on(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var i=this.hls;i.off(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(i,u){y.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},t.onMediaAttaching=function(i,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},t.onManifestParsed=function(i,u){var p=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},t.onBufferCodecs=function(i,u){var p=this.hls;p.config.capLevelToPlayerSize&&u.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(i.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},t.getMaxLevel=function(i){var u=this,p=this.hls.levels;if(!p.length)return-1;var a=p.filter(function(o,h){return y.isLevelAllowed(h,u.restrictedLevels)&&h<=i});return this.clientRect=null,y.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},t.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()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,u={width:0,height:0};if(i){var p=i.getBoundingClientRect();u.width=p.width,u.height=p.height,!u.width&&!u.height&&(u.width=p.right-p.left||i.width||0,u.height=p.bottom-p.top||i.height||0)}return this.clientRect=u,u},y.isLevelAllowed=function(i,u){return u===void 0&&(u=[]),u.indexOf(i)===-1},y.getMaxLevelByMediaSize=function(i,u,p){if(!i||!i.length)return-1;for(var a=function(s,d){return d?s.width!==d.width||s.height!==d.height:!0},o=i.length-1,h=0;h<i.length;h+=1){var l=i[h];if((l.width>=u||l.height>=p)&&a(l,i[h+1])){o=h;break}}return o},C(y,[{key:"mediaWidth",get:function(){return this.getDimensions().width*y.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*y.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(u){}return i}}]),y}();B.default=P},"./src/controller/cmcd-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./src/events.ts"),S=I("./src/types/cmcd.ts"),C=I("./src/utils/buffer-helper.ts"),P=I("./src/utils/logger.ts");function y(o,h){for(var l=0;l<h.length;l++){var n=h[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}function t(o,h,l){return h&&y(o.prototype,h),l&&y(o,l),o}function b(o,h){var l=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(l)return(l=l.call(o)).next.bind(l);if(Array.isArray(o)||(l=i(o))||h&&o&&typeof o.length=="number"){l&&(o=l);var n=0;return function(){return n>=o.length?{done:!0}:{done:!1,value:o[n++]}}}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 i(o,h){if(!o)return;if(typeof o=="string")return u(o,h);var l=Object.prototype.toString.call(o).slice(8,-1);if(l==="Object"&&o.constructor&&(l=o.constructor.name),l==="Map"||l==="Set")return Array.from(o);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return u(o,h)}function u(o,h){(h==null||h>o.length)&&(h=o.length);for(var l=0,n=new Array(h);l<h;l++)n[l]=o[l];return n}function p(){return p=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var l=arguments[h];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(o[n]=l[n])}return o},p.apply(this,arguments)}var a=function(){function o(l){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(E){try{n.apply(E,{ot:S.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(D){P.logger.warn("Could not generate manifest CMCD data.",D)}},this.applyFragmentData=function(E){try{var D=E.frag,T=n.hls.levels[D.level],k=n.getObjectType(D),w={d:D.duration*1e3,ot:k};(k===S.CMCDObjectType.VIDEO||k===S.CMCDObjectType.AUDIO||k==S.CMCDObjectType.MUXED)&&(w.br=T.bitrate/1e3,w.tb=n.getTopBandwidth(k),w.bl=n.getBufferLength(k)),n.apply(E,w)}catch(v){P.logger.warn("Could not generate segment CMCD data.",v)}},this.hls=l;var s=this.config=l.config,d=s.cmcd;d!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=d.sessionId||o.uuid(),this.cid=d.contentId,this.useHeaders=d.useHeaders===!0,this.registerListeners())}var h=o.prototype;return h.registerListeners=function(){var n=this.hls;n.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(F.Events.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var n=this.hls;n.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(F.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(n,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(n,s){var d,E;this.audioBuffer=(d=s.tracks.audio)===null||d===void 0?void 0:d.buffer,this.videoBuffer=(E=s.tracks.video)===null||E===void 0?void 0:E.buffer},h.createData=function(){var n;return{v:S.CMCDVersion,sf:S.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},h.apply=function(n,s){s===void 0&&(s={}),p(s,this.createData());var d=s.ot===S.CMCDObjectType.INIT||s.ot===S.CMCDObjectType.VIDEO||s.ot===S.CMCDObjectType.MUXED;if(this.starved&&d&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var E=o.toHeaders(s);if(!Object.keys(E).length)return;n.headers||(n.headers={}),p(n.headers,E)}else{var D=o.toQuery(s);if(!D)return;n.url=o.appendQueryToUri(n.url,D)}},h.getObjectType=function(n){var s=n.type;return s==="subtitle"?S.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?S.CMCDObjectType.INIT:s==="audio"?S.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?S.CMCDObjectType.VIDEO:S.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(n){for(var s=0,d=n===S.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=b(d),D;!(D=E()).done;){var T=D.value;T.bitrate>s&&(s=T.bitrate)}return s>0?s:NaN},h.getBufferLength=function(n){var s=this.hls.media,d=n===S.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!d||!s)return NaN;var E=C.BufferHelper.bufferInfo(d,s.currentTime,this.config.maxBufferHole);return E.len*1e3},h.createPlaylistLoader=function(){var n=this.config.pLoader,s=this.applyPlaylistData,d=n||this.config.loader;return function(){function E(T){this.loader=void 0,this.loader=new d(T)}var D=E.prototype;return D.destroy=function(){this.loader.destroy()},D.abort=function(){this.loader.abort()},D.load=function(k,w,v){s(k),this.loader.load(k,w,v)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},h.createFragmentLoader=function(){var n=this.config.fLoader,s=this.applyFragmentData,d=n||this.config.loader;return function(){function E(T){this.loader=void 0,this.loader=new d(T)}var D=E.prototype;return D.destroy=function(){this.loader.destroy()},D.abort=function(){this.loader.abort()},D.load=function(k,w,v){s(k),this.loader.load(k,w,v)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},o.uuid=function(){var n=URL.createObjectURL(new Blob),s=n.toString();return URL.revokeObjectURL(n),s.substr(s.lastIndexOf("/")+1)},o.serialize=function(n){for(var s=[],d=function(U){return!Number.isNaN(U)&&U!=null&&U!==""&&U!==!1},E=function(U){return Math.round(U)},D=function(U){return E(U/100)*100},T=function(U){return encodeURIComponent(U)},k={br:E,d:E,bl:D,dl:D,mtp:D,nor:T,rtp:D,tb:E},w=Object.keys(n||{}).sort(),v=b(w),c;!(c=v()).done;){var f=c.value,m=n[f];if(!d(m))continue;if(f==="v"&&m===1)continue;if(f=="pr"&&m===1)continue;var _=k[f];_&&(m=_(m));var x=typeof m,g=void 0;f==="ot"||f==="sf"||f==="st"?g=f+"="+m:x==="boolean"?g=f:x==="number"?g=f+"="+m:g=f+"="+JSON.stringify(m),s.push(g)}return s.join(",")},o.toHeaders=function(n){for(var s=Object.keys(n),d={},E=["Object","Request","Session","Status"],D=[{},{},{},{}],T={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},k=0,w=s;k<w.length;k++){var v=w[k],c=T[v]!=null?T[v]:1;D[c][v]=n[v]}for(var f=0;f<D.length;f++){var m=o.serialize(D[f]);m&&(d["CMCD-"+E[f]]=m)}return d},o.toQuery=function(n){return"CMCD="+encodeURIComponent(o.serialize(n))},o.appendQueryToUri=function(n,s){if(!s)return n;var d=n.includes("?")?"&":"?";return""+n+d+s},o}()},"./src/controller/eme-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/errors.ts"),C=I("./src/utils/logger.ts"),P=I("./src/utils/mediakeys-helper.ts");function y(a,o){for(var h=0;h<o.length;h++){var l=o[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function t(a,o,h){return o&&y(a.prototype,o),h&&y(a,h),a}var b=3,i=function(o,h,l){var n={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(s){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:l.audioRobustness||""})}),h.forEach(function(s){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:l.videoRobustness||""})}),[n]},u=function(o,h,l,n){switch(o){case P.KeySystems.WIDEVINE:return i(h,l,n);default:throw new Error("Unknown key-system: "+o)}},p=function(){function a(h){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=h,this._config=h.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var o=a.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(l){switch(l){case P.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},o._attemptKeySystemAccess=function(l,n,s){var d=this,E=u(l,n,s,this._drmSystemOptions);C.logger.log("Requesting encrypted media key-system access");var D=this.requestMediaKeySystemAccess(l,E);this.mediaKeysPromise=D.then(function(T){return d._onMediaKeySystemAccessObtained(l,T)}),D.catch(function(T){C.logger.error('Failed to obtain key-system "'+l+'" access:',T)})},o._onMediaKeySystemAccessObtained=function(l,n){var s=this;C.logger.log('Access for key-system "'+l+'" obtained');var d={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:l};this._mediaKeysList.push(d);var E=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(D){return d.mediaKeys=D,C.logger.log('Media-keys created for key-system "'+l+'"'),s._onMediaKeysCreated(),D});return E.catch(function(D){C.logger.error("Failed to create media-keys:",D)}),E},o._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),l._onNewMediaKeySession(n.mediaKeysSession))})},o._onNewMediaKeySession=function(l){var n=this;C.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(s){n._onKeySessionMessage(l,s.message)},!1)},o._onKeySessionMessage=function(l,n){C.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(s){C.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),l.update(s)})},o.onMediaEncrypted=function(l){var n=this;if(C.logger.log('Media is encrypted using "'+l.initDataType+'" init data type'),!this.mediaKeysPromise){C.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(E){if(!n._media)return;n._attemptSetMediaKeys(E),n._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(s).catch(s)},o._attemptSetMediaKeys=function(l){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){C.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}C.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(l,n){var s=this,d=this._mediaKeysList[0];if(!d){C.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(d.mediaKeysSessionInitialized){C.logger.warn("Key-Session already initialized but requested again");return}var E=d.mediaKeysSession;if(!E){C.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){C.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}C.logger.log('Generating key-session request for "'+l+'" init data type'),d.mediaKeysSessionInitialized=!0,E.generateRequest(l,n).then(function(){C.logger.debug("Key-session generation succeeded")}).catch(function(D){C.logger.error("Error generating key-session request:",D),s.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(l,n,s){var d=new XMLHttpRequest;d.responseType="arraybuffer",d.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,d,l,n,s);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,d,l),E=void 0}catch(D){C.logger.error(D)}try{d.readyState||d.open("POST",l,!0),E&&E.call(this.hls,d,l)}catch(D){throw new Error("issue setting up KeySystem license XHR "+D)}return d},o._onLicenseRequestReadyStageChange=function(l,n,s,d){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,C.logger.log("License request succeeded");var E=l.response,D=this._licenseResponseCallback;if(D)try{E=D.call(this.hls,l,n)}catch(k){C.logger.error(k)}d(E)}else{if(C.logger.error("License Request XHR failed ("+n+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>b){this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var T=b-this._requestLicenseFailureCount+1;C.logger.warn("Retrying license request, "+T+" attempts left"),this._requestLicense(s,d)}break}},o._generateLicenseRequestChallenge=function(l,n){switch(l.mediaKeySystemDomain){case P.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},o._requestLicense=function(l,n){C.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){C.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var d=this.getLicenseServerUrl(s.mediaKeySystemDomain),E=this._createLicenseXhr(d,l,n);C.logger.log("Sending license request to URL: "+d);var D=this._generateLicenseRequestChallenge(s,l);E.send(D)}catch(T){C.logger.error("Failure requesting DRM license: "+T),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(l,n){if(!this._emeEnabled)return;var s=n.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var l=this._media,n=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(l,n){if(!this._emeEnabled)return;var s=n.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),d=n.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(P.KeySystems.WIDEVINE,s,d)},t(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();B.default=p},"./src/controller/fps-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/utils/logger.ts"),C=function(){function P(t){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=t,this.registerListeners()}var y=P.prototype;return y.setStreamController=function(b){this.streamController=b},y.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},y.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching)},y.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},y.onMediaAttaching=function(b,i){var u=this.hls.config;if(u.capLevelOnFPSDrop){var p=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),u.fpsDroppedMonitoringPeriod)}},y.checkFPS=function(b,i,u){var p=performance.now();if(i){if(this.lastTime){var a=p-this.lastTime,o=u-this.lastDroppedFrames,h=i-this.lastDecodedFrames,l=1e3*o/a,n=this.hls;if(n.trigger(F.Events.FPS_DROP,{currentDropped:o,currentDecoded:h,totalDroppedFrames:u}),l>0&&o>n.config.fpsDroppedMonitoringThreshold*h){var s=n.currentLevel;S.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=s)&&(s=s-1,n.trigger(F.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:n.currentLevel}),n.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=u,this.lastDecodedFrames=i}},y.checkFPSInterval=function(){var b=this.media;if(b)if(this.isVideoPlaybackQualityAvailable){var i=b.getVideoPlaybackQuality();this.checkFPS(b,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(b,b.webkitDecodedFrameCount,b.webkitDroppedFrameCount)},P}();B.default=C},"./src/controller/fragment-finders.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"findFragmentByPDT",function(){return C}),I.d(B,"findFragmentByPTS",function(){return P}),I.d(B,"fragmentWithinToleranceTest",function(){return y}),I.d(B,"pdtWithinToleranceTest",function(){return t}),I.d(B,"findFragWithCC",function(){return b});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/binary-search.ts");function C(i,u,p){if(u===null||!Array.isArray(i)||!i.length||!Object(F.isFiniteNumber)(u))return null;var a=i[0].programDateTime;if(u<(a||0))return null;var o=i[i.length-1].endProgramDateTime;if(u>=(o||0))return null;p=p||0;for(var h=0;h<i.length;++h){var l=i[h];if(t(u,p,l))return l}return null}function P(i,u,p,a){p===void 0&&(p=0),a===void 0&&(a=0);var o=null;if(i?o=u[i.sn-u[0].sn+1]||null:p===0&&u[0].start===0&&(o=u[0]),o&&y(p,a,o)===0)return o;var h=S.default.search(u,y.bind(null,p,a));return h||o}function y(i,u,p){i===void 0&&(i=0),u===void 0&&(u=0);var a=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-a<=i?1:p.start-a>i&&p.start?-1:0}function t(i,u,p){var a=Math.min(u,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,o=p.endProgramDateTime||0;return o-a>i}function b(i,u){return S.default.search(i,function(p){return p.cc<u?1:p.cc>u?-1:0})}},"./src/controller/fragment-tracker.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"FragmentState",function(){return C}),I.d(B,"FragmentTracker",function(){return P});var F=I("./src/events.ts"),S=I("./src/types/loader.ts"),C;(function(b){b.NOT_LOADED="NOT_LOADED",b.BACKTRACKED="BACKTRACKED",b.APPENDING="APPENDING",b.PARTIAL="PARTIAL",b.OK="OK"})(C||(C={}));var P=function(){function b(u){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=u,this._registerListeners()}var i=b.prototype;return i._registerListeners=function(){var p=this.hls;p.on(F.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(F.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(F.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var p=this.hls;p.off(F.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(F.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(F.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(p,a){if(a===S.PlaylistLevelType.MAIN){var o=this.activeFragment,h=this.activeParts;if(!o)return null;if(h)for(var l=h.length;l--;){var n=h[l],s=n?n.end:o.appendedPTS;if(n.start<=p&&s!==void 0&&p<=s)return l>9&&(this.activeParts=h.slice(l-9)),n}else if(o.start<=p&&o.appendedPTS!==void 0&&p<=o.appendedPTS)return o}return this.getBufferedFrag(p,a)},i.getBufferedFrag=function(p,a){for(var o=this.fragments,h=Object.keys(o),l=h.length;l--;){var n=o[h[l]];if((n==null?void 0:n.body.type)===a&&n.buffered){var s=n.body;if(s.start<=p&&p<=s.end)return s}}return null},i.detectEvictedFragments=function(p,a,o){var h=this;Object.keys(this.fragments).forEach(function(l){var n=h.fragments[l];if(!n)return;if(!n.buffered){n.body.type===o&&h.removeFragment(n.body);return}var s=n.range[p];if(!s)return;s.time.some(function(d){var E=!h.isTimeBuffered(d.startPTS,d.endPTS,a);return E&&h.removeFragment(n.body),E})})},i.detectPartialFragments=function(p){var a=this,o=this.timeRanges,h=p.frag,l=p.part;if(!o||h.sn==="initSegment")return;var n=t(h),s=this.fragments[n];if(!s)return;Object.keys(o).forEach(function(d){var E=h.elementaryStreams[d];if(!E)return;var D=o[d],T=l!==null||E.partial===!0;s.range[d]=a.getBufferedTimes(h,l,T,D)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},i.fragBuffered=function(p){var a=t(p),o=this.fragments[a];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},i.getBufferedTimes=function(p,a,o,h){for(var l={time:[],partial:o},n=a?a.start:p.start,s=a?a.end:p.end,d=p.minEndPTS||s,E=p.maxStartPTS||n,D=0;D<h.length;D++){var T=h.start(D)-this.bufferPadding,k=h.end(D)+this.bufferPadding;if(E>=T&&d<=k){l.time.push({startPTS:Math.max(n,h.start(D)),endPTS:Math.min(s,h.end(D))});break}else if(n<k&&s>T)l.partial=!0,l.time.push({startPTS:Math.max(n,h.start(D)),endPTS:Math.min(s,h.end(D))});else if(s<=T)break}return l},i.getPartialFragment=function(p){var a=null,o,h,l,n=0,s=this.bufferPadding,d=this.fragments;return Object.keys(d).forEach(function(E){var D=d[E];if(!D)return;y(D)&&(h=D.body.start-s,l=D.body.end+s,p>=h&&p<=l&&(o=Math.min(p-h,l-p),n<=o&&(a=D.body,n=o)))}),a},i.getState=function(p){var a=t(p),o=this.fragments[a];return o?o.buffered?y(o)?C.PARTIAL:C.OK:o.backtrack?C.BACKTRACKED:C.APPENDING:C.NOT_LOADED},i.backtrack=function(p,a){var o=t(p),h=this.fragments[o];if(!h||h.backtrack)return null;var l=h.backtrack=a||h.loaded;return h.loaded=null,l},i.getBacktrackData=function(p){var a=t(p),o=this.fragments[a];if(o){var h,l=o.backtrack;if(l!=null&&(h=l.payload)!==null&&h!==void 0&&h.byteLength)return l;this.removeFragment(p)}return null},i.isTimeBuffered=function(p,a,o){for(var h,l,n=0;n<o.length;n++){if(h=o.start(n)-this.bufferPadding,l=o.end(n)+this.bufferPadding,p>=h&&a<=l)return!0;if(a<=h)return!1}return!1},i.onFragLoaded=function(p,a){var o=a.frag,h=a.part;if(o.sn==="initSegment"||o.bitrateTest||h)return;var l=t(o);this.fragments[l]={body:o,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(p,a){var o=this,h=a.frag,l=a.part,n=a.timeRanges;if(h.type===S.PlaylistLevelType.MAIN)if(this.activeFragment=h,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(d){var E=n[d];if(o.detectEvictedFragments(d,E),!l)for(var D=0;D<E.length;D++)h.appendedPTS=Math.max(E.end(D),h.appendedPTS||0)})},i.onFragBuffered=function(p,a){this.detectPartialFragments(a)},i.hasFragment=function(p){var a=t(p);return!!this.fragments[a]},i.removeFragmentsInRange=function(p,a,o){var h=this;Object.keys(this.fragments).forEach(function(l){var n=h.fragments[l];if(!n)return;if(n.buffered){var s=n.body;s.type===o&&s.start<a&&s.end>p&&h.removeFragment(s)}})},i.removeFragment=function(p){var a=t(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[a]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},b}();function y(b){var i,u;return b.buffered&&(((i=b.range.video)===null||i===void 0?void 0:i.partial)||((u=b.range.audio)===null||u===void 0?void 0:u.partial))}function t(b){return b.type+"_"+b.level+"_"+b.urlId+"_"+b.sn}},"./src/controller/gap-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"STALL_MINIMUM_DURATION_MS",function(){return y}),I.d(B,"MAX_START_GAP_JUMP",function(){return t}),I.d(B,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return b}),I.d(B,"SKIP_BUFFER_RANGE_START",function(){return i}),I.d(B,"default",function(){return u});var F=I("./src/utils/buffer-helper.ts"),S=I("./src/errors.ts"),C=I("./src/events.ts"),P=I("./src/utils/logger.ts"),y=250,t=2,b=.1,i=.05,u=function(){function p(o,h,l,n){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=o,this.media=h,this.fragmentTracker=l,this.hls=n}var a=p.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(h){var l=this.config,n=this.media,s=this.stalled,d=n.currentTime,E=n.seeking,D=this.seeking&&!E,T=!this.seeking&&E;if(this.seeking=E,d!==h){if(this.moved=!0,s!==null){if(this.stallReported){var k=self.performance.now()-s;P.logger.warn("playback not stuck anymore @"+d+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((T||D)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!F.BufferHelper.getBuffered(n).length)return;var w=F.BufferHelper.bufferInfo(n,d,0),v=w.len>0,c=w.nextStart||0;if(!v&&!c)return;if(E){var f=w.len>t,m=!c||c-d>t&&!this.fragmentTracker.getPartialFragment(d);if(f||m)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var _,x=Math.max(c,w.start||0)-d,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,j=g==null||((_=g.details)===null||_===void 0)?void 0:_.live,U=j?g.details.targetduration*2:t;if(x>0&&x<=U){this._trySkipBufferHole(null);return}}var R=self.performance.now();if(s===null){this.stalled=R;return}var W=R-s;!E&&W>=y&&this._reportStall(w.len);var H=F.BufferHelper.bufferInfo(n,d,l.maxBufferHole);this._tryFixBufferStall(H,W)},a._tryFixBufferStall=function(h,l){var n=this.config,s=this.fragmentTracker,d=this.media,E=d.currentTime,D=s.getPartialFragment(E);if(D){var T=this._trySkipBufferHole(D);if(T)return}h.len>n.maxBufferHole&&l>n.highBufferWatchdogPeriod*1e3&&(P.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(h){var l=this.hls,n=this.media,s=this.stallReported;s||(this.stallReported=!0,P.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+h+")"),l.trigger(C.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},a._trySkipBufferHole=function(h){for(var l=this.config,n=this.hls,s=this.media,d=s.currentTime,E=0,D=F.BufferHelper.getBuffered(s),T=0;T<D.length;T++){var k=D.start(T);if(d+l.maxBufferHole>=E&&d<k){var w=Math.max(k+i,s.currentTime+b);return P.logger.warn("skipping hole, adjusting currentTime from "+d+" to "+w),this.moved=!0,this.stalled=null,s.currentTime=w,h&&n.trigger(C.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+d+" to "+w,frag:h}),w}E=D.end(T)}return 0},a._tryNudgeBuffer=function(){var h=this.config,l=this.hls,n=this.media,s=n.currentTime,d=(this.nudgeRetry||0)+1;if(this.nudgeRetry=d,d<h.nudgeMaxRetry){var E=s+d*h.nudgeOffset;P.logger.warn("Nudging 'currentTime' from "+s+" to "+E),n.currentTime=E,l.trigger(C.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else P.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+h.nudgeMaxRetry+" nudges"),l.trigger(C.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/utils/texttrack-utils.ts"),C=I("./src/demux/id3.ts"),P=.25,y=function(){function t(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var b=t.prototype;return b.destroy=function(){this._unregisterListeners()},b._registerListeners=function(){var u=this.hls;u.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(F.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var u=this.hls;u.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(F.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.onMediaAttached=function(u,p){this.media=p.media},b.onMediaDetaching=function(){if(!this.id3Track)return;Object(S.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},b.getID3Track=function(u){if(!this.media)return;for(var p=0;p<u.length;p++){var a=u[p];if(a.kind==="metadata"&&a.label==="id3")return Object(S.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},b.onFragParsingMetadata=function(u,p){if(!this.media)return;var a=p.frag,o=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<o.length;l++){var n=C.getID3Frames(o[l].data);if(n){var s=o[l].pts,d=l<o.length-1?o[l+1].pts:a.end,E=d-s;E<=0&&(d=s+P);for(var D=0;D<n.length;D++){var T=n[D];if(!C.isTimeStampFrame(T)){var k=new h(s,d,"");k.value=T,this.id3Track.addCue(k)}}}}},b.onBufferFlushing=function(u,p){var a=p.startOffset,o=p.endOffset,h=p.type;if(!h||h==="audio"){var l=this.id3Track;l&&Object(S.removeCuesInRange)(l,a,o)}},t}();B.default=y},"./src/controller/latency-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/errors.ts"),S=I("./src/events.ts"),C=I("./src/utils/logger.ts");function P(b,i){for(var u=0;u<i.length;u++){var p=i[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(b,p.key,p)}}function y(b,i,u){return i&&P(b.prototype,i),u&&P(b,u),b}var t=function(){function b(u){var p=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return p.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var i=b.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(S.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(S.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(S.Events.ERROR,this.onError)},i.onMediaAttached=function(p,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(p,a){var o=a.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(p,a){if(a.details!==F.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,C.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var p=this.media,a=this.levelDetails;if(!p||!a)return;this.currentTime=p.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var h=this.config,l=h.lowLatencyMode,n=h.maxLiveSyncPlaybackRate;if(!l||n===1)return;var s=this.targetLatency;if(s===null)return;var d=o-s,E=Math.min(this.maxLatency,s+a.targetduration),D=d<E;if(a.live&&D&&d>.05&&this.forwardBufferLength>1){var T=Math.min(2,Math.max(1,n)),k=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20;p.playbackRate=Math.min(T,Math.max(1,k))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},i.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},i.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},y(b,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,a=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:a?p.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var a=p.holdBack,o=p.partHoldBack,h=p.targetduration,l=this.config,n=l.liveSyncDuration,s=l.liveSyncDurationCount,d=l.lowLatencyMode,E=this.hls.userConfig,D=d&&o||a;(E.liveSyncDuration||E.liveSyncDurationCount||D===0)&&(D=n!==void 0?n:s*h);var T=h,k=1;return D+Math.min(this.stallCount*k,T)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),a=this.targetLatency,o=this.levelDetails;if(p===null||a===null||o===null)return null;var h=o.edge,l=p-a-this.edgeStalled,n=h-o.totalduration,s=h-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(n,l),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var a=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-a,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,a=this.levelDetails;if(!p||!a)return 0;var o=p.buffered.length;return o?p.buffered.end(o-1):a.edge-this.currentTime}}]),b}()},"./src/controller/level-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return l});var F=I("./src/types/level.ts"),S=I("./src/events.ts"),C=I("./src/errors.ts"),P=I("./src/utils/codecs.ts"),y=I("./src/controller/level-helper.ts"),t=I("./src/controller/base-playlist-controller.ts"),b=I("./src/types/loader.ts");function i(){return i=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&(n[E]=d[E])}return n},i.apply(this,arguments)}function u(n,s){for(var d=0;d<s.length;d++){var E=s[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}function p(n,s,d){return s&&u(n.prototype,s),d&&u(n,d),n}function a(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,o(n,s)}function o(n,s){return o=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},o(n,s)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(n){a(s,n);function s(E){var D;return D=n.call(this,E,"[level-controller]")||this,D._levels=[],D._firstLevel=-1,D._startLevel=void 0,D.currentLevelIndex=-1,D.manualLevelIndex=-1,D.onParsedComplete=void 0,D._registerListeners(),D}var d=s.prototype;return d._registerListeners=function(){var D=this.hls;D.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),D.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),D.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),D.on(S.Events.ERROR,this.onError,this)},d._unregisterListeners=function(){var D=this.hls;D.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),D.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),D.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),D.off(S.Events.ERROR,this.onError,this)},d.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},d.startLoad=function(){var D=this._levels;D.forEach(function(T){T.loadError=0}),n.prototype.startLoad.call(this)},d.onManifestLoaded=function(D,T){var k=[],w=[],v=[],c,f={},m,_=!1,x=!1,g=!1;if(T.levels.forEach(function(W){var H=W.attrs;_=_||!!(W.width&&W.height),x=x||!!W.videoCodec,g=g||!!W.audioCodec,h&&W.audioCodec&&W.audioCodec.indexOf("mp4a.40.34")!==-1&&(W.audioCodec=void 0);var L=W.bitrate+"-"+W.attrs.RESOLUTION+"-"+W.attrs.CODECS;m=f[L],m?m.url.push(W.url):(m=new F.Level(W),f[L]=m,k.push(m)),H&&(H.AUDIO&&Object(y.addGroupId)(m,"audio",H.AUDIO),H.SUBTITLES&&Object(y.addGroupId)(m,"text",H.SUBTITLES))}),(_||x)&&g&&(k=k.filter(function(W){var H=W.videoCodec,L=W.width,G=W.height;return!!H||!!(L&&G)})),k=k.filter(function(W){var H=W.audioCodec,L=W.videoCodec;return(!H||Object(P.isCodecSupportedInMp4)(H,"audio"))&&(!L||Object(P.isCodecSupportedInMp4)(L,"video"))}),T.audioTracks&&(w=T.audioTracks.filter(function(W){return!W.audioCodec||Object(P.isCodecSupportedInMp4)(W.audioCodec,"audio")}),Object(y.assignTrackIdsByGroup)(w)),T.subtitles&&(v=T.subtitles,Object(y.assignTrackIdsByGroup)(v)),k.length>0){c=k[0].bitrate,k.sort(function(W,H){return W.bitrate-H.bitrate}),this._levels=k;for(var j=0;j<k.length;j++)if(k[j].bitrate===c){this._firstLevel=j,this.log("manifest loaded, "+k.length+" level(s) found, first bitrate: "+c);break}var U=g&&!x,R={levels:k,audioTracks:w,subtitleTracks:v,firstLevel:this._firstLevel,stats:T.stats,audio:g,video:x,altAudio:!U&&w.some(function(W){return!!W.url})};this.hls.trigger(S.Events.MANIFEST_PARSED,R),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(S.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:T.url,reason:"no level with compatible codecs found in manifest"})},d.onError=function(D,T){if(n.prototype.onError.call(this,D,T),T.fatal)return;var k=T.context,w=this._levels[this.currentLevelIndex];if(k&&(k.type===b.PlaylistContextType.AUDIO_TRACK&&w.audioGroupIds&&k.groupId===w.audioGroupIds[w.urlId]||k.type===b.PlaylistContextType.SUBTITLE_TRACK&&w.textGroupIds&&k.groupId===w.textGroupIds[w.urlId])){this.redundantFailover(this.currentLevelIndex);return}var v=!1,c=!0,f;switch(T.details){case C.ErrorDetails.FRAG_LOAD_ERROR:case C.ErrorDetails.FRAG_LOAD_TIMEOUT:case C.ErrorDetails.KEY_LOAD_ERROR:case C.ErrorDetails.KEY_LOAD_TIMEOUT:if(T.frag){var m=this._levels[T.frag.level];m?(m.fragmentError++,m.fragmentError>this.hls.config.fragLoadingMaxRetry&&(f=T.frag.level)):f=T.frag.level}break;case C.ErrorDetails.LEVEL_LOAD_ERROR:case C.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(c=!1),f=k.level),v=!0;break;case C.ErrorDetails.REMUX_ALLOC_ERROR:f=T.level,v=!0;break}f!==void 0&&this.recoverLevel(T,f,v,c)},d.recoverLevel=function(D,T,k,w){var v=D.details,c=this._levels[T];if(c.loadError++,k){var f=this.retryLoadingOrFail(D);if(f)D.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var m=c.url.length;if(m>1&&c.loadError<m)D.levelRetry=!0,this.redundantFailover(T);else if(this.manualLevelIndex===-1){var _=T===0?this._levels.length-1:T-1;this.currentLevelIndex!==_&&this._levels[_].loadError===0&&(this.warn(v+": switch to "+_),D.levelRetry=!0,this.hls.nextAutoLevel=_)}}},d.redundantFailover=function(D){var T=this._levels[D],k=T.url.length;if(k>1){var w=(T.urlId+1)%k;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(v){v.urlId=w}),this.level=D}},d.onFragLoaded=function(D,T){var k=T.frag;if(k!==void 0&&k.type===b.PlaylistLevelType.MAIN){var w=this._levels[k.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},d.onLevelLoaded=function(D,T){var k,w=T.level,v=T.details,c=this._levels[w];if(!c){var f;this.warn("Invalid level index "+w),(f=T.deliveryDirectives)!==null&&f!==void 0&&f.skip&&(v.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(c.fragmentError===0&&(c.loadError=0,this.retryCount=0),this.playlistLoaded(w,T,c.details)):(k=T.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(v.deltaUpdateFailed=!0)},d.onAudioTrackSwitched=function(D,T){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var w=-1,v=this.hls.audioTracks[T.id].groupId,c=0;c<k.audioGroupIds.length;c++)if(k.audioGroupIds[c]===v){w=c;break}w!==k.urlId&&(k.urlId=w,this.startLoad())}},d.loadPlaylist=function(D){var T=this.currentLevelIndex,k=this._levels[T];if(this.canLoad&&k&&k.url.length>0){var w=k.urlId,v=k.url[w];if(D)try{v=D.addDirectives(v)}catch(c){this.warn("Could not construct new URL with HLS Delivery Directives: "+c)}this.log("Attempt loading level index "+T+(D?" at sn "+D.msn+" part "+D.part:"")+" with URL-id "+w+" "+v),this.clearTimer(),this.hls.trigger(S.Events.LEVEL_LOADING,{url:v,level:T,id:w,deliveryDirectives:D||null})}},d.removeLevel=function(D,T){var k=function(c,f){return f!==T},w=this._levels.filter(function(v,c){return c!==D?!0:v.url.length>1&&T!==void 0?(v.url=v.url.filter(k),v.audioGroupIds&&(v.audioGroupIds=v.audioGroupIds.filter(k)),v.textGroupIds&&(v.textGroupIds=v.textGroupIds.filter(k)),v.urlId=0,!0):!1}).map(function(v,c){var f=v.details;return f!=null&&f.fragments&&f.fragments.forEach(function(m){m.level=c}),v});this._levels=w,this.hls.trigger(S.Events.LEVELS_UPDATED,{levels:w})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(D){var T,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===D&&(T=k[D])!==null&&T!==void 0&&T.details)return;if(D<0||D>=k.length){var w=D<0;if(this.hls.trigger(S.Events.ERROR,{type:C.ErrorTypes.OTHER_ERROR,details:C.ErrorDetails.LEVEL_SWITCH_ERROR,level:D,fatal:w,reason:"invalid level idx"}),w)return;D=Math.min(D,k.length-1)}this.clearTimer();var v=this.currentLevelIndex,c=k[v],f=k[D];this.log("switching to level "+D+" from "+v),this.currentLevelIndex=D;var m=i({},f,{level:D,maxBitrate:f.maxBitrate,uri:f.uri,urlId:f.urlId});delete m._urlId,this.hls.trigger(S.Events.LEVEL_SWITCHING,m);var _=f.details;if(!_||_.live){var x=this.switchParams(f.uri,c==null?void 0:c.details);this.loadPlaylist(x)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(D){this.manualLevelIndex=D,this._startLevel===void 0&&(this._startLevel=D),D!==-1&&(this.level=D)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(D){this._firstLevel=D}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var D=this.hls.config.startLevel;return D!==void 0?D:this._firstLevel}else return this._startLevel},set:function(D){this._startLevel=D}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(D){this.level=D,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=D)}}]),s}(t.default)},"./src/controller/level-helper.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"addGroupId",function(){return C}),I.d(B,"assignTrackIdsByGroup",function(){return P}),I.d(B,"updatePTS",function(){return y}),I.d(B,"updateFragPTSDTS",function(){return b}),I.d(B,"mergeDetails",function(){return i}),I.d(B,"mapPartIntersection",function(){return u}),I.d(B,"mapFragmentIntersection",function(){return p}),I.d(B,"adjustSliding",function(){return a}),I.d(B,"addSliding",function(){return o}),I.d(B,"computeReloadInterval",function(){return h}),I.d(B,"getFragmentWithSN",function(){return l}),I.d(B,"getPartWith",function(){return n});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/logger.ts");function C(s,d,E){switch(d){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(E);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(E);break}}function P(s){var d={};s.forEach(function(E){var D=E.groupId||"";E.id=d[D]=d[D]||0,d[D]++})}function y(s,d,E){var D=s[d],T=s[E];t(D,T)}function t(s,d){var E=d.startPTS;if(Object(F.isFiniteNumber)(E)){var D=0,T;d.sn>s.sn?(D=E-s.start,T=s):(D=s.start-E,T=d),T.duration!==D&&(T.duration=D)}else if(d.sn>s.sn){var k=s.cc===d.cc;k&&s.minEndPTS?d.start=s.start+(s.minEndPTS-s.start):d.start=s.start+s.duration}else d.start=Math.max(s.start-d.duration,0)}function b(s,d,E,D,T,k){var w=D-E;w<=0&&(S.logger.warn("Fragment should have a positive duration",d),D=E+d.duration,k=T+d.duration);var v=E,c=D,f=d.startPTS,m=d.endPTS;if(Object(F.isFiniteNumber)(f)){var _=Math.abs(f-E);Object(F.isFiniteNumber)(d.deltaPTS)?d.deltaPTS=Math.max(_,d.deltaPTS):d.deltaPTS=_,v=Math.max(E,f),E=Math.min(E,f),T=Math.min(T,d.startDTS),c=Math.min(D,m),D=Math.max(D,m),k=Math.max(k,d.endDTS)}d.duration=D-E;var x=E-d.start;d.appendedPTS=D,d.start=d.startPTS=E,d.maxStartPTS=v,d.startDTS=T,d.endPTS=D,d.minEndPTS=c,d.endDTS=k;var g=d.sn;if(!s||g<s.startSN||g>s.endSN)return 0;var j,U=g-s.startSN,R=s.fragments;for(R[U]=d,j=U;j>0;j--)t(R[j],R[j-1]);for(j=U;j<R.length-1;j++)t(R[j],R[j+1]);return s.fragmentHint&&t(R[R.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,x}function i(s,d){for(var E=null,D=s.fragments,T=D.length-1;T>=0;T--){var k=D[T].initSegment;if(k){E=k;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var w=0,v;if(p(s,d,function(j,U){j.relurl&&(w=j.cc-U.cc),Object(F.isFiniteNumber)(j.startPTS)&&Object(F.isFiniteNumber)(j.endPTS)&&(U.start=U.startPTS=j.startPTS,U.startDTS=j.startDTS,U.appendedPTS=j.appendedPTS,U.maxStartPTS=j.maxStartPTS,U.endPTS=j.endPTS,U.endDTS=j.endDTS,U.minEndPTS=j.minEndPTS,U.duration=j.endPTS-j.startPTS,U.duration&&(v=U),d.PTSKnown=d.alignedSliding=!0),U.elementaryStreams=j.elementaryStreams,U.loader=j.loader,U.stats=j.stats,U.urlId=j.urlId,j.initSegment&&(U.initSegment=j.initSegment,E=j.initSegment)}),E){var c=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments;c.forEach(function(j){var U;(!j.initSegment||j.initSegment.relurl===((U=E)===null||U===void 0?void 0:U.relurl))&&(j.initSegment=E)})}if(d.skippedSegments&&(d.deltaUpdateFailed=d.fragments.some(function(j){return!j}),d.deltaUpdateFailed)){S.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var f=d.skippedSegments;f--;)d.fragments.shift();d.startSN=d.fragments[0].sn,d.startCC=d.fragments[0].cc}var m=d.fragments;if(w){S.logger.warn("discontinuity sliding from playlist, take drift into account");for(var _=0;_<m.length;_++)m[_].cc+=w}d.skippedSegments&&(d.startCC=d.fragments[0].cc),u(s.partList,d.partList,function(j,U){U.elementaryStreams=j.elementaryStreams,U.stats=j.stats}),v?b(d,v,v.startPTS,v.endPTS,v.startDTS,v.endDTS):a(s,d),m.length&&(d.totalduration=d.edge-m[0].start),d.driftStartTime=s.driftStartTime,d.driftStart=s.driftStart;var x=d.advancedDateTime;if(d.advanced&&x){var g=d.edge;d.driftStart||(d.driftStartTime=x,d.driftStart=g),d.driftEndTime=x,d.driftEnd=g}else d.driftEndTime=s.driftEndTime,d.driftEnd=s.driftEnd,d.advancedDateTime=s.advancedDateTime}function u(s,d,E){if(s&&d)for(var D=0,T=0,k=s.length;T<=k;T++){var w=s[T],v=d[T+D];w&&v&&w.index===v.index&&w.fragment.sn===v.fragment.sn?E(w,v):D--}}function p(s,d,E){for(var D=d.skippedSegments,T=Math.max(s.startSN,d.startSN)-d.startSN,k=(s.fragmentHint?1:0)+(D?d.endSN:Math.min(s.endSN,d.endSN))-d.startSN,w=d.startSN-s.startSN,v=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,c=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,f=T;f<=k;f++){var m=c[w+f],_=v[f];D&&!_&&f<D&&(_=d.fragments[f]=m),m&&_&&E(m,_)}}function a(s,d){var E=d.startSN+d.skippedSegments-s.startSN,D=s.fragments;if(E<0||E>=D.length)return;o(d,D[E].start)}function o(s,d){if(d){for(var E=s.fragments,D=s.skippedSegments;D<E.length;D++)E[D].start+=d;s.fragmentHint&&(s.fragmentHint.start+=d)}}function h(s,d){var E=1e3*s.levelTargetDuration,D=E/2,T=s.age,k=T>0&&T<E*3,w=d.loading.end-d.loading.start,v,c=s.availabilityDelay;if(s.updated===!1)if(k){var f=333*s.misses;v=Math.max(Math.min(D,w*2),f),s.availabilityDelay=(s.availabilityDelay||0)+v}else v=D;else k?(c=Math.min(c||E/2,T),s.availabilityDelay=c,v=c+E-T):v=E-w;return Math.round(v)}function l(s,d,E){if(!s||!s.details)return null;var D=s.details,T=D.fragments[d-D.startSN];return T||(T=D.fragmentHint,T&&T.sn===d?T:d<D.startSN&&E&&E.sn===d?E:null)}function n(s,d,E){if(!s||!s.details)return null;var D=s.details.partList;if(D)for(var T=D.length;T--;){var k=D[T];if(k.index===E&&k.fragment.sn===d)return k}return null}},"./src/controller/stream-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return D});var F=I("./src/polyfills/number.ts"),S=I("./src/controller/base-stream-controller.ts"),C=I("./src/is-supported.ts"),P=I("./src/events.ts"),y=I("./src/utils/buffer-helper.ts"),t=I("./src/controller/fragment-tracker.ts"),b=I("./src/types/loader.ts"),i=I("./src/loader/fragment.ts"),u=I("./src/demux/transmuxer-interface.ts"),p=I("./src/types/transmuxer.ts"),a=I("./src/controller/gap-controller.ts"),o=I("./src/errors.ts"),h=I("./src/utils/logger.ts");function l(T,k){for(var w=0;w<k.length;w++){var v=k[w];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(T,v.key,v)}}function n(T,k,w){return k&&l(T.prototype,k),w&&l(T,w),T}function s(T,k){T.prototype=Object.create(k.prototype),T.prototype.constructor=T,d(T,k)}function d(T,k){return d=Object.setPrototypeOf||function(v,c){return v.__proto__=c,v},d(T,k)}var E=100,D=function(T){s(k,T);function k(v,c){var f;return f=T.call(this,v,c,"[stream-controller]")||this,f.audioCodecSwap=!1,f.gapController=null,f.level=-1,f._forceStartLoad=!1,f.altAudio=!1,f.audioOnly=!1,f.fragPlaying=null,f.onvplaying=null,f.onvseeked=null,f.fragLastKbps=0,f.stalled=!1,f.couldBacktrack=!1,f.audioCodecSwitch=!1,f.videoBuffer=null,f._registerListeners(),f}var w=k.prototype;return w._registerListeners=function(){var c=this.hls;c.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(P.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.on(P.Events.ERROR,this.onError,this),c.on(P.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.on(P.Events.BUFFER_CREATED,this.onBufferCreated,this),c.on(P.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.on(P.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var c=this.hls;c.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(P.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.off(P.Events.ERROR,this.onError,this),c.off(P.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.off(P.Events.BUFFER_CREATED,this.onBufferCreated,this),c.off(P.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.off(P.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},w.startLoad=function(c){if(this.levels){var f=this.lastCurrentTime,m=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var _=m.startLevel;_===-1&&(m.config.testBandwidth?(_=0,this.bitrateTest=!0):_=m.nextAutoLevel),this.level=m.nextLoadLevel=_,this.loadedmetadata=!1}f>0&&c===-1&&(this.log("Override startPosition with lastCurrentTime @"+f.toFixed(3)),c=f),this.state=S.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=c,this.tick()}else this._forceStartLoad=!0,this.state=S.State.STOPPED},w.stopLoad=function(){this._forceStartLoad=!1,T.prototype.stopLoad.call(this)},w.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_LEVEL:{var c,f=this.levels,m=this.level,_=f==null||((c=f[m])===null||c===void 0)?void 0:c.details;if(_&&(!_.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(_))break;this.state=S.State.IDLE;break}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var x,g=self.performance.now(),j=this.retryDate;(!j||g>=j||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=S.State.IDLE)}break;default:break}this.onTickEnd()},w.onTickEnd=function(){T.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},w.doTickIdle=function(){var c,f,m=this.hls,_=this.levelLastLoaded,x=this.levels,g=this.media,j=m.config,U=m.nextLoadLevel;if(_===null||!g&&(this.startFragRequested||!j.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!x||!x[U])return;var R=x[U];this.level=m.nextLoadLevel=U;var W=R.details;if(!W||this.state===S.State.WAITING_LEVEL||W.live&&this.levelLastLoaded!==U){this.state=S.State.WAITING_LEVEL;return}var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,b.PlaylistLevelType.MAIN);if(H===null)return;var L=H.len,G=this.getMaxBufferLength(R.maxBitrate);if(L>=G)return;if(this._streamEnded(H,W)){var z={};this.altAudio&&(z.type="video"),this.hls.trigger(P.Events.BUFFER_EOS,z),this.state=S.State.ENDED;return}var J=H.end,te=this.getNextFragment(J,W);if(this.couldBacktrack&&!this.fragPrevious&&te&&te.sn!=="initSegment"){var _e=te.sn-W.startSN;_e>1&&(te=W.fragments[_e-1],this.fragmentTracker.removeFragment(te))}if(te&&this.fragmentTracker.getState(te)===t.FragmentState.OK&&this.nextLoadPosition>J){var ce=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,ce,b.PlaylistLevelType.MAIN),te=this.getNextFragment(this.nextLoadPosition,W)}if(!te)return;te.initSegment&&!te.initSegment.data&&!this.bitrateTest&&(te=te.initSegment),((c=te.decryptdata)===null||c===void 0?void 0:c.keyFormat)==="identity"&&!((f=te.decryptdata)!==null&&f!==void 0&&f.key)?this.loadKey(te,W):this.loadFragment(te,W,J)},w.loadFragment=function(c,f,m){var _,x=this.fragmentTracker.getState(c);if(this.fragCurrent=c,x===t.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(c);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else x=t.FragmentState.NOT_LOADED}x===t.FragmentState.NOT_LOADED||x===t.FragmentState.PARTIAL?c.sn==="initSegment"?this._loadInitSegment(c):this.bitrateTest?(c.bitrateTest=!0,this.log("Fragment "+c.sn+" of level "+c.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(c)):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,c,f,m)):x===t.FragmentState.APPENDING?this.reduceMaxBufferLength(c.duration)&&this.fragmentTracker.removeFragment(c):((_=this.media)===null||_===void 0?void 0:_.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},w.getAppendedFrag=function(c){var f=this.fragmentTracker.getAppendedFrag(c,b.PlaylistLevelType.MAIN);return f&&"fragment"in f?f.fragment:f},w.getBufferedFrag=function(c){return this.fragmentTracker.getBufferedFrag(c,b.PlaylistLevelType.MAIN)},w.followingBufferedFrag=function(c){return c?this.getBufferedFrag(c.end+.5):null},w.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},w.nextLevelSwitch=function(){var c=this.levels,f=this.media;if(f!=null&&f.readyState){var m,_=this.getAppendedFrag(f.currentTime);if(_&&_.start>1&&this.flushMainBuffer(0,_.start-1),!f.paused&&c){var x=this.hls.nextLoadLevel,g=c[x],j=this.fragLastKbps;j&&this.fragCurrent?m=this.fragCurrent.duration*g.maxBitrate/(1e3*j)+1:m=0}else m=0;var U=this.getBufferedFrag(f.currentTime+m);if(U){var R=this.followingBufferedFrag(U);if(R){this.abortCurrentFrag();var W=R.maxStartPTS?R.maxStartPTS:R.start,H=R.duration,L=Math.max(U.end,W+Math.min(Math.max(H-this.config.maxFragLookUpTolerance,H*.5),H*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},w.abortCurrentFrag=function(){var c=this.fragCurrent;this.fragCurrent=null,c!=null&&c.loader&&c.loader.abort(),this.state===S.State.KEY_LOADING&&(this.state=S.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},w.flushMainBuffer=function(c,f){T.prototype.flushMainBuffer.call(this,c,f,this.altAudio?"video":null)},w.onMediaAttached=function(c,f){T.prototype.onMediaAttached.call(this,c,f);var m=f.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),m.addEventListener("playing",this.onvplaying),m.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,m,this.fragmentTracker,this.hls)},w.onMediaDetaching=function(){var c=this.media;c&&(c.removeEventListener("playing",this.onvplaying),c.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),T.prototype.onMediaDetaching.call(this)},w.onMediaPlaying=function(){this.tick()},w.onMediaSeeked=function(){var c=this.media,f=c?c.currentTime:null;Object(F.isFiniteNumber)(f)&&this.log("Media seeked to "+f.toFixed(3)),this.tick()},w.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(P.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},w.onManifestParsed=function(c,f){var m=!1,_=!1,x;f.levels.forEach(function(g){x=g.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(m=!0),x.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=m&&_&&!Object(C.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=f.levels,this.startFragRequested=!1},w.onLevelLoading=function(c,f){var m=this.levels;if(!m||this.state!==S.State.IDLE)return;var _=m[f.level];(!_.details||_.details.live&&this.levelLastLoaded!==f.level||this.waitForCdnTuneIn(_.details))&&(this.state=S.State.WAITING_LEVEL)},w.onLevelLoaded=function(c,f){var m,_=this.levels,x=f.level,g=f.details,j=g.totalduration;if(!_){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+j);var U=this.fragCurrent;U&&(this.state===S.State.FRAG_LOADING||this.state===S.State.FRAG_LOADING_WAITING_RETRY)&&(U.level!==f.level&&U.loader&&(this.state=S.State.IDLE,U.loader.abort()));var R=_[x],W=0;if(g.live||(m=R.details)!==null&&m!==void 0&&m.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;W=this.alignPlaylists(g,R.details)}if(R.details=g,this.levelLastLoaded=x,this.hls.trigger(P.Events.LEVEL_UPDATED,{details:g,level:x}),this.state===S.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=S.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,W),this.tick()},w._handleFragmentLoadProgress=function(c){var f,m=c.frag,_=c.part,x=c.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var j=g[m.level],U=j.details;if(!U){this.warn("Dropping fragment "+m.sn+" of level "+m.level+" after level details were reset");return}var R=j.videoCodec,W=U.PTSKnown||!U.live,H=(f=m.initSegment)===null||f===void 0?void 0:f.data,L=this._getAudioCodec(j),G=this.transmuxer=this.transmuxer||new u.default(this.hls,b.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),z=_?_.index:-1,J=z!==-1,te=new p.ChunkMetadata(m.level,m.sn,m.stats.chunkCount,x.byteLength,z,J),_e=this.initPTS[m.cc];G.push(x,H,L,R,m,_,U.totalduration,W,te,_e)},w.onAudioTrackSwitching=function(c,f){var m=this.altAudio,_=!!f.url,x=f.id;if(!_){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var g=this.fragCurrent;g!=null&&g.loader&&(this.log("Switching to main audio track, cancel main fragment load"),g.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var j=this.hls;m&&j.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),j.trigger(P.Events.AUDIO_TRACK_SWITCHED,{id:x})}},w.onAudioTrackSwitched=function(c,f){var m=f.id,_=!!this.hls.audioTracks[m].url;if(_){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=_,this.tick()},w.onBufferCreated=function(c,f){var m=f.tracks,_,x,g=!1;for(var j in m){var U=m[j];if(U.id==="main"){if(x=j,_=U,j==="video"){var R=m[j];R&&(this.videoBuffer=R.buffer)}}else g=!0}g&&_?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},w.onFragBuffered=function(c,f){var m=f.frag,_=f.part;if(m&&m.type!==b.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(_?" p: "+_.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state),this.state===S.State.PARSED&&(this.state=S.State.IDLE);return}var x=_?_.stats:m.stats;this.fragLastKbps=Math.round(8*x.total/(x.buffering.end-x.loading.first)),m.sn!=="initSegment"&&(this.fragPrevious=m),this.fragBufferedComplete(m,_)},w.onError=function(c,f){switch(f.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(b.PlaylistLevelType.MAIN,f);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==S.State.ERROR&&(f.fatal?(this.warn(""+f.details),this.state=S.State.ERROR):!f.levelRetry&&this.state===S.State.WAITING_LEVEL&&(this.state=S.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(f.parent==="main"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var m=!0,_=this.getFwdBufferInfo(this.media,b.PlaylistLevelType.MAIN);_&&_.len>.5&&(m=!this.reduceMaxBufferLength(_.len)),m&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},w.checkBuffer=function(){var c=this.media,f=this.gapController;if(!c||!f||!c.readyState)return;var m=y.BufferHelper.getBuffered(c);!this.loadedmetadata&&m.length?(this.loadedmetadata=!0,this.seekToStartPos()):f.poll(this.lastCurrentTime),this.lastCurrentTime=c.currentTime},w.onFragLoadEmergencyAborted=function(){this.state=S.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},w.onBufferFlushed=function(c,f){var m=f.type;if(m!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var _=(m===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(_,m,b.PlaylistLevelType.MAIN)}},w.onLevelsUpdated=function(c,f){this.levels=f.levels},w.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},w.seekToStartPos=function(){var c=this.media,f=c.currentTime,m=this.startPosition;if(m>=0&&f<m){if(c.seeking){h.logger.log("could not seek to "+m+", already seeking at "+f);return}var _=y.BufferHelper.getBuffered(c),x=_.length?_.start(0):0,g=x-m;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(h.logger.log("adjusting start position by "+g+" to match buffer start"),m+=g,this.startPosition=m),this.log("seek to target start position "+m+" from current time "+f),c.currentTime=m}},w._getAudioCodec=function(c){var f=this.config.defaultAudioCodec||c.audioCodec;return this.audioCodecSwap&&f&&(this.log("Swapping audio codec"),f.indexOf("mp4a.40.5")!==-1?f="mp4a.40.2":f="mp4a.40.5"),f},w._loadBitrateTestFrag=function(c){var f=this;this._doFragLoad(c).then(function(m){var _=f.hls;if(!m||_.nextLoadLevel||f.fragContextChanged(c))return;f.fragLoadError=0,f.state=S.State.IDLE,f.startFragRequested=!1,f.bitrateTest=!1;var x=c.stats;x.parsing.start=x.parsing.end=x.buffering.start=x.buffering.end=self.performance.now(),_.trigger(P.Events.FRAG_LOADED,m)})},w._handleTransmuxComplete=function(c){var f,m="main",_=this.hls,x=c.remuxResult,g=c.chunkMeta,j=this.getCurrentContext(g);if(!j){this.warn("The loading context changed while buffering fragment "+g.sn+" of level "+g.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(g.level);return}var U=j.frag,R=j.part,W=j.level,H=x.video,L=x.text,G=x.id3,z=x.initSegment,J=this.altAudio?void 0:x.audio;if(this.fragContextChanged(U))return;if(this.state=S.State.PARSING,z){z.tracks&&(this._bufferInitSegment(W,z.tracks,U,g),_.trigger(P.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:m,tracks:z.tracks}));var te=z.initPTS,_e=z.timescale;Object(F.isFiniteNumber)(te)&&(this.initPTS[U.cc]=te,_.trigger(P.Events.INIT_PTS_FOUND,{frag:U,id:m,initPTS:te,timescale:_e}))}if(H&&x.independent!==!1){if(W.details){var ce=H.startPTS,xe=H.endPTS,Te=H.startDTS,je=H.endDTS;if(R)R.elementaryStreams[H.type]={startPTS:ce,endPTS:xe,startDTS:Te,endDTS:je};else if(H.firstKeyFrame&&H.independent&&(this.couldBacktrack=!0),H.dropped&&H.independent){var Ce=this.getLoadPosition()+this.config.maxBufferHole;if(Ce<ce){this.backtrack(U);return}U.setElementaryStreamInfo(H.type,U.start,xe,U.start,je,!0)}U.setElementaryStreamInfo(H.type,ce,xe,Te,je),this.bufferFragmentData(H,U,R,g)}}else if(x.independent===!1){this.backtrack(U);return}if(J){var Z=J.startPTS,K=J.endPTS,V=J.startDTS,$=J.endDTS;R&&(R.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:Z,endPTS:K,startDTS:V,endDTS:$}),U.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,Z,K,V,$),this.bufferFragmentData(J,U,R,g)}if(G!=null&&(f=G.samples)!==null&&f!==void 0&&f.length){var q={frag:U,id:m,samples:G.samples};_.trigger(P.Events.FRAG_PARSING_METADATA,q)}if(L){var Q={frag:U,id:m,samples:L.samples};_.trigger(P.Events.FRAG_PARSING_USERDATA,Q)}},w._bufferInitSegment=function(c,f,m,_){var x=this;if(this.state!==S.State.PARSING)return;this.audioOnly=!!f.audio&&!f.video,this.altAudio&&!this.audioOnly&&delete f.audio;var g=f.audio,j=f.video,U=f.audiovideo;if(g){var R=c.audioCodec,W=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(R&&(R.indexOf("mp4a.40.5")!==-1?R="mp4a.40.2":R="mp4a.40.5"),g.metadata.channelCount!==1&&W.indexOf("firefox")===-1&&(R="mp4a.40.5")),W.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(R="mp4a.40.2",this.log("Android: force audio codec to "+R)),c.audioCodec&&c.audioCodec!==R&&this.log('Swapping manifest audio codec "'+c.audioCodec+'" for "'+R+'"'),g.levelCodec=R,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(R||"")+"/"+(c.audioCodec||"")+"/"+g.codec+"]")}j&&(j.levelCodec=c.videoCodec,j.id="main",this.log("Init video buffer, container:"+j.container+", codecs[level/parsed]=["+(c.videoCodec||"")+"/"+j.codec+"]")),U&&this.log("Init audiovideo buffer, container:"+U.container+", codecs[level/parsed]=["+(c.attrs.CODECS||"")+"/"+U.codec+"]"),this.hls.trigger(P.Events.BUFFER_CODECS,f),Object.keys(f).forEach(function(H){var L=f[H],G=L.initSegment;G!=null&&G.byteLength&&x.hls.trigger(P.Events.BUFFER_APPENDING,{type:H,data:G,frag:m,part:null,chunkMeta:_,parent:m.type})}),this.tick()},w.backtrack=function(c){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(c);var f=this.fragmentTracker.backtrack(c);this.fragPrevious=null,this.nextLoadPosition=c.start,f?this.resetFragmentLoading(c):this.state=S.State.BACKTRACKING},w.checkFragmentChanged=function(){var c=this.media,f=null;if(c&&c.readyState>1&&c.seeking===!1){var m=c.currentTime;if(y.BufferHelper.isBuffered(c,m)?f=this.getAppendedFrag(m):y.BufferHelper.isBuffered(c,m+.1)&&(f=this.getAppendedFrag(m+.1)),f){var _=this.fragPlaying,x=f.level;(!_||f.sn!==_.sn||_.level!==x||f.urlId!==_.urlId)&&(this.hls.trigger(P.Events.FRAG_CHANGED,{frag:f}),(!_||_.level!==x)&&this.hls.trigger(P.Events.LEVEL_SWITCHED,{level:x}),this.fragPlaying=f)}}},n(k,[{key:"nextLevel",get:function(){var c=this.nextBufferedFrag;return c?c.level:-1}},{key:"currentLevel",get:function(){var c=this.media;if(c){var f=this.getAppendedFrag(c.currentTime);if(f)return f.level}return-1}},{key:"nextBufferedFrag",get:function(){var c=this.media;if(c){var f=this.getAppendedFrag(c.currentTime);return this.followingBufferedFrag(f)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(S.default)},"./src/controller/subtitle-stream-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"SubtitleStreamController",function(){return s});var F=I("./src/events.ts"),S=I("./src/utils/logger.ts"),C=I("./src/utils/buffer-helper.ts"),P=I("./src/controller/fragment-finders.ts"),y=I("./src/utils/discontinuities.ts"),t=I("./src/controller/level-helper.ts"),b=I("./src/controller/fragment-tracker.ts"),i=I("./src/controller/base-stream-controller.ts"),u=I("./src/types/loader.ts"),p=I("./src/types/level.ts");function a(d,E){for(var D=0;D<E.length;D++){var T=E[D];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(d,T.key,T)}}function o(d,E,D){return E&&a(d.prototype,E),D&&a(d,D),d}function h(d,E){d.prototype=Object.create(E.prototype),d.prototype.constructor=d,l(d,E)}function l(d,E){return l=Object.setPrototypeOf||function(T,k){return T.__proto__=k,T},l(d,E)}var n=500,s=function(d){h(E,d);function E(T,k){var w;return w=d.call(this,T,k,"[subtitle-stream-controller]")||this,w.levels=[],w.currentTrackId=-1,w.tracksBuffered=[],w.mainDetails=null,w._registerListeners(),w}var D=E.prototype;return D.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},D._registerListeners=function(){var k=this.hls;k.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.on(F.Events.ERROR,this.onError,this),k.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.on(F.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.on(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.on(F.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},D._unregisterListeners=function(){var k=this.hls;k.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.off(F.Events.ERROR,this.onError,this),k.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.off(F.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.off(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.off(F.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},D.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(n),this.tick()},D.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},D.onLevelLoaded=function(k,w){this.mainDetails=w.details},D.onSubtitleFragProcessed=function(k,w){var v=w.frag,c=w.success;if(this.fragPrevious=v,this.state=i.State.IDLE,!c)return;var f=this.tracksBuffered[this.currentTrackId];if(!f)return;for(var m,_=v.start,x=0;x<f.length;x++)if(_>=f[x].start&&_<=f[x].end){m=f[x];break}var g=v.start+v.duration;m?m.end=g:(m={start:_,end:g},f.push(m)),this.fragmentTracker.fragBuffered(v)},D.onBufferFlushing=function(k,w){var v=w.startOffset,c=w.endOffset;if(v===0&&c!==Number.POSITIVE_INFINITY){var f=this.currentTrackId,m=this.levels;if(!m.length||!m[f]||!m[f].details)return;var _=m[f].details,x=_.targetduration,g=c-x;if(g<=0)return;w.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(j){for(var U=0;U<j.length;){if(j[U].end<=g){j.shift();continue}else if(j[U].start<g)j[U].start=g;else break;U++}}),this.fragmentTracker.removeFragmentsInRange(v,g,u.PlaylistLevelType.SUBTITLE)}},D.onError=function(k,w){var v,c=w.frag;if(!c||c.type!==u.PlaylistLevelType.SUBTITLE)return;(v=this.fragCurrent)!==null&&v!==void 0&&v.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},D.onSubtitleTracksUpdated=function(k,w){var v=this,c=w.subtitleTracks;this.tracksBuffered=[],this.levels=c.map(function(f){return new p.Level(f)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(f){v.tracksBuffered[f.id]=[]}),this.mediaBuffer=null},D.onSubtitleTrackSwitch=function(k,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var v=this.levels[this.currentTrackId];v!=null&&v.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,v&&this.setInterval(n)},D.onSubtitleTrackLoaded=function(k,w){var v,c=w.details,f=w.id,m=this.currentTrackId,_=this.levels;if(!_.length)return;var x=_[m];if(f>=_.length||f!==m||!x)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,c.live||(v=x.details)!==null&&v!==void 0&&v.live){var g=this.mainDetails;if(c.deltaUpdateFailed||!g)return;var j=g.fragments[0];if(!x.details)c.hasProgramDateTime&&g.hasProgramDateTime?Object(y.alignMediaPlaylistByPDT)(c,g):j&&Object(t.addSliding)(c,j.start);else{var U=this.alignPlaylists(c,x.details);U===0&&j&&Object(t.addSliding)(c,j.start)}}if(x.details=c,this.levelLastLoaded=f,this.tick(),c.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var R=Object(P.findFragmentByPTS)(null,c.fragments,this.media.currentTime,0);R||(this.warn("Subtitle playlist not aligned with playback"),x.details=void 0)}},D._handleFragmentLoadComplete=function(k){var w=k.frag,v=k.payload,c=w.decryptdata,f=this.hls;if(this.fragContextChanged(w))return;if(v&&v.byteLength>0&&c&&c.key&&c.iv&&c.method==="AES-128"){var m=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(v),c.key.buffer,c.iv.buffer).then(function(_){var x=performance.now();f.trigger(F.Events.FRAG_DECRYPTED,{frag:w,payload:_,stats:{tstart:m,tdecrypt:x}})})}},D.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var k,w=this.currentTrackId,v=this.levels;if(!v.length||!v[w]||!v[w].details)return;var c=v[w].details,f=c.targetduration,m=this.config,_=this.media,x=C.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,_.currentTime-f,m.maxBufferHole),g=x.end,j=x.len,U=this.getMaxBufferLength()+f;if(j>U)return;console.assert(c,"Subtitle track details are defined on idle subtitle stream controller tick");var R=c.fragments,W=R.length,H=c.edge,L,G=this.fragPrevious;if(g<H){var z=m.maxFragLookUpTolerance;G&&c.hasProgramDateTime&&(L=Object(P.findFragmentByPDT)(R,G.endProgramDateTime,z)),L||(L=Object(P.findFragmentByPTS)(G,R,g,z),!L&&G&&G.start<R[0].start&&(L=R[0]))}else L=R[W-1];(k=L)!==null&&k!==void 0&&k.encrypted?(S.logger.log("Loading key for "+L.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(F.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===b.FragmentState.NOT_LOADED&&this.loadFragment(L,c,g)}},D.loadFragment=function(k,w,v){this.fragCurrent=k,d.prototype.loadFragment.call(this,k,w,v)},o(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(i.default)},"./src/controller/subtitle-track-controller.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/utils/texttrack-utils.ts"),C=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function y(a,o){for(var h=0;h<o.length;h++){var l=o[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function t(a,o,h){return o&&y(a.prototype,o),h&&y(a,h),a}function b(a,o){a.prototype=Object.create(o.prototype),a.prototype.constructor=a,i(a,o)}function i(a,o){return i=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},i(a,o)}var u=function(a){b(o,a);function o(l){var n;return n=a.call(this,l,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var h=o.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},h.registerListeners=function(){var n=this.hls;n.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(F.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var n=this.hls;n.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(F.Events.ERROR,this.onError,this)},h.onMediaAttached=function(n,s){if(this.media=s.media,!this.media)return;this.queuedDefaultTrack>-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)},h.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},h.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 n=p(this.media.textTracks);n.forEach(function(s){Object(S.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(n,s){this.tracks=s.subtitleTracks},h.onSubtitleTrackLoaded=function(n,s){var d=s.id,E=s.details,D=this.trackId,T=this.tracksInGroup[D];if(!T){this.warn("Invalid subtitle track id "+d);return}var k=T.details;T.details=s.details,this.log("subtitle track "+d+" loaded ["+E.startSN+"-"+E.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,s,k))},h.onLevelLoading=function(n,s){this.switchLevel(s.level)},h.onLevelSwitching=function(n,s){this.switchLevel(s.level)},h.switchLevel=function(n){var s=this.hls.levels[n];if(!(s!=null&&s.textGroupIds))return;var d=s.textGroupIds[s.urlId];if(this.groupId!==d){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,D=this.tracks.filter(function(w){return!d||w.groupId===d});this.tracksInGroup=D;var T=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=d;var k={subtitleTracks:D};this.log("Updating subtitle tracks, "+D.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(F.Events.SUBTITLE_TRACKS_UPDATED,k),T!==-1&&this.setSubtitleTrack(T,E)}},h.findTrackId=function(n){for(var s=this.tracksInGroup,d=0;d<s.length;d++){var E=s[d];if((!this.selectDefaultTrack||E.default)&&(!n||n===E.name))return E.id}return-1},h.onError=function(n,s){if(a.prototype.onError.call(this,n,s),s.fatal||!s.context)return;s.context.type===P.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},h.loadPlaylist=function(n){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var d=s.id,E=s.groupId,D=s.url;if(n)try{D=n.addDirectives(D)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("Loading subtitle playlist for id "+d),this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADING,{url:D,id:d,groupId:E,deliveryDirectives:n||null})}},h.toggleTrackModes=function(n){var s=this,d=this.media,E=this.subtitleDisplay,D=this.trackId;if(!d)return;var T=p(d.textTracks),k=T.filter(function(c){return c.groupId===s.groupId});if(n===-1)[].slice.call(T).forEach(function(c){c.mode="disabled"});else{var w=k[D];w&&(w.mode="disabled")}var v=k[n];v&&(v.mode=E?"showing":"hidden")},h.setSubtitleTrack=function(n,s){var d,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(d=E[n])!==null&&d!==void 0&&d.details)||n<-1||n>=E.length)return;this.clearTimer();var D=E[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,D){var T=D.id,k=D.groupId,w=k===void 0?"":k,v=D.name,c=D.type,f=D.url;this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:T,groupId:w,name:v,type:c,url:f});var m=this.switchParams(D.url,s==null?void 0:s.details);this.loadPlaylist(m)}else this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:n})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,s=p(this.media.textTracks),d=0;d<s.length;d++)if(s[d].mode==="hidden")n=d;else if(s[d].mode==="showing"){n=d;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},t(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,s)}}]),o}(C.default);function p(a){for(var o=[],h=0;h<a.length;h++){var l=a[h];l.kind==="subtitles"&&l.label&&o.push(a[h])}return o}B.default=u},"./src/controller/timeline-controller.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"TimelineController",function(){return p});var F=I("./src/polyfills/number.ts"),S=I("./src/events.ts"),C=I("./src/utils/cea-608-parser.ts"),P=I("./src/utils/output-filter.ts"),y=I("./src/utils/webvtt-parser.ts"),t=I("./src/utils/texttrack-utils.ts"),b=I("./src/utils/imsc1-ttml-parser.ts"),i=I("./src/types/loader.ts"),u=I("./src/utils/logger.ts"),p=function(){function l(s){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var d=new P.default(this,"textTrack1"),E=new P.default(this,"textTrack2"),D=new P.default(this,"textTrack3"),T=new P.default(this,"textTrack4");this.cea608Parser1=new C.default(1,d,E),this.cea608Parser2=new C.default(3,D,T)}s.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(S.Events.FRAG_LOADING,this.onFragLoading,this),s.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=l.prototype;return n.destroy=function(){var d=this.hls;d.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.off(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),d.off(S.Events.FRAG_LOADING,this.onFragLoading,this),d.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),d.off(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),d.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),d.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(d,E,D,T,k){for(var w=!1,v=k.length;v--;){var c=k[v],f=o(c[0],c[1],E,D);if(f>=0&&(c[0]=Math.min(c[0],E),c[1]=Math.max(c[1],D),w=!0,f/(D-E)>.5))return}if(w||k.push([E,D]),this.config.renderTextTracksNatively){var m=this.captionsTracks[d];this.Cues.newCue(m,E,D,T)}else{var _=this.Cues.newCue(null,E,D,T);this.hls.trigger(S.Events.CUES_PARSED,{type:"captions",cues:_,track:d})}},n.onInitPtsFound=function(d,E){var D=this,T=E.frag,k=E.id,w=E.initPTS,v=E.timescale,c=this.unparsedVttFrags;k==="main"&&(this.initPTS[T.cc]=w,this.timescale[T.cc]=v),c.length&&(this.unparsedVttFrags=[],c.forEach(function(f){D.onFragLoaded(S.Events.FRAG_LOADED,f)}))},n.getExistingTrack=function(d){var E=this.media;if(E)for(var D=0;D<E.textTracks.length;D++){var T=E.textTracks[D];if(T[d])return T}return null},n.createCaptionsTrack=function(d){this.config.renderTextTracksNatively?this.createNativeTrack(d):this.createNonNativeTrack(d)},n.createNativeTrack=function(d){if(this.captionsTracks[d])return;var E=this.captionsProperties,D=this.captionsTracks,T=this.media,k=E[d],w=k.label,v=k.languageCode,c=this.getExistingTrack(d);if(c)D[d]=c,Object(t.clearCurrentCues)(D[d]),Object(t.sendAddTrackEvent)(D[d],T);else{var f=this.createTextTrack("captions",w,v);f&&(f[d]=!0,D[d]=f)}},n.createNonNativeTrack=function(d){if(this.nonNativeCaptionsTracks[d])return;var E=this.captionsProperties[d];if(!E)return;var D=E.label,T={_id:d,label:D,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[d]=T,this.hls.trigger(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[T]})},n.createTextTrack=function(d,E,D){var T=this.media;return T?T.addTextTrack(d,E,D):void 0},n.onMediaAttaching=function(d,E){this.media=E.media,this._cleanTracks()},n.onMediaDetaching=function(){var d=this.captionsTracks;Object.keys(d).forEach(function(E){Object(t.clearCurrentCues)(d[E]),delete d[E]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var d=this.media;if(!d)return;var E=d.textTracks;if(E)for(var D=0;D<E.length;D++)Object(t.clearCurrentCues)(E[D])},n.onSubtitleTracksUpdated=function(d,E){var D=this;this.textTracks=[];var T=E.subtitleTracks||[],k=T.some(function(f){return f.textCodec===b.IMSC1_CODEC});if(this.config.enableWebVTT||k&&this.config.enableIMSC1){var w=this.tracks&&T&&this.tracks.length===T.length;if(this.tracks=T||[],this.config.renderTextTracksNatively){var v=this.media?this.media.textTracks:[];this.tracks.forEach(function(f,m){var _;if(m<v.length){for(var x=null,g=0;g<v.length;g++)if(a(v[g],f)){x=v[g];break}x&&(_=x)}_?Object(t.clearCurrentCues)(_):(_=D.createTextTrack("subtitles",f.name,f.lang),_&&(_.mode="disabled")),_&&(_.groupId=f.groupId,D.textTracks.push(_))})}else if(!w&&this.tracks&&this.tracks.length){var c=this.tracks.map(function(f){return{label:f.name,kind:f.type.toLowerCase(),default:f.default,subtitleTrack:f}});this.hls.trigger(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:c})}}},n.onManifestLoaded=function(d,E){var D=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(T){var k=/(?:CC|SERVICE)([1-4])/.exec(T.instreamId);if(!k)return;var w="textTrack"+k[1],v=D.captionsProperties[w];if(!v)return;v.label=T.name,T.lang&&(v.languageCode=T.lang),v.media=T})},n.onFragLoading=function(d,E){var D=this.cea608Parser1,T=this.cea608Parser2,k=this.lastSn,w=this.lastPartIndex;if(!this.enabled||!(D&&T))return;if(E.frag.type===i.PlaylistLevelType.MAIN){var v,c,f=E.frag.sn,m=(v=E==null||((c=E.part)===null||c===void 0)?void 0:c.index)!=null?v:-1;f===k+1||f===k&&m===w+1||(D.reset(),T.reset()),this.lastSn=f,this.lastPartIndex=m}},n.onFragLoaded=function(d,E){var D=E.frag,T=E.payload,k=this.initPTS,w=this.unparsedVttFrags;if(D.type===i.PlaylistLevelType.SUBTITLE)if(T.byteLength){if(!Object(F.isFiniteNumber)(k[D.cc])){w.push(E),k.length&&this.hls.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:D,error:new Error("Missing initial subtitle PTS")});return}var v=D.decryptdata;if(v==null||v.key==null||v.method!=="AES-128"){var c=this.tracks[D.level],f=this.vttCCs;f[D.cc]||(f[D.cc]={start:D.start,prevCC:this.prevCC,new:!0},this.prevCC=D.cc),c&&c.textCodec===b.IMSC1_CODEC?this._parseIMSC1(D,T):this._parseVTTs(D,T,f)}}else this.hls.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:D,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(d,E){var D=this,T=this.hls;Object(b.parseIMSC1)(E,this.initPTS[d.cc],this.timescale[d.cc],function(k){D._appendCues(k,d.level),T.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(k){u.logger.log("Failed to parse IMSC1: "+k),T.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:k})})},n._parseVTTs=function(d,E,D){var T=this,k=this.hls;Object(y.parseWebVTT)(E,this.initPTS[d.cc],this.timescale[d.cc],D,d.cc,d.start,function(w){T._appendCues(w,d.level),k.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(w){T._fallbackToIMSC1(d,E),u.logger.log("Failed to parse VTT cue: "+w),k.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:w})})},n._fallbackToIMSC1=function(d,E){var D=this,T=this.tracks[d.level];T.textCodec||Object(b.parseIMSC1)(E,this.initPTS[d.cc],this.timescale[d.cc],function(){T.textCodec=b.IMSC1_CODEC,D._parseIMSC1(d,E)},function(){T.textCodec="wvtt"})},n._appendCues=function(d,E){var D=this.hls;if(this.config.renderTextTracksNatively){var T=this.textTracks[E];if(T.mode==="disabled")return;d.forEach(function(v){return Object(t.addCueToTrack)(T,v)})}else{var k=this.tracks[E],w=k.default?"default":"subtitles"+E;D.trigger(S.Events.CUES_PARSED,{type:"subtitles",cues:d,track:w})}},n.onFragDecrypted=function(d,E){var D=E.frag;if(D.type===i.PlaylistLevelType.SUBTITLE){if(!Object(F.isFiniteNumber)(this.initPTS[D.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(S.Events.FRAG_LOADED,E)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(d,E){var D=this.cea608Parser1,T=this.cea608Parser2;if(!this.enabled||!(D&&T))return;for(var k=0;k<E.samples.length;k++){var w=E.samples[k].bytes;if(w){var v=this.extractCea608Data(w);D.addData(E.samples[k].pts,v[0]),T.addData(E.samples[k].pts,v[1])}}},n.onBufferFlushing=function(d,E){var D=E.startOffset,T=E.endOffset,k=E.endOffsetSubtitles,w=E.type,v=this.media;if(!v||v.currentTime<T)return;if(!w||w==="video"){var c=this.captionsTracks;Object.keys(c).forEach(function(m){return Object(t.removeCuesInRange)(c[m],D,T)})}if(this.config.renderTextTracksNatively&&(D===0&&k!==void 0)){var f=this.textTracks;Object.keys(f).forEach(function(m){return Object(t.removeCuesInRange)(f[m],D,k)})}},n.extractCea608Data=function(d){for(var E=d[0]&31,D=2,T=[[],[]],k=0;k<E;k++){var w=d[D++],v=127&d[D++],c=127&d[D++],f=(4&w)!==0,m=3&w;if(v===0&&c===0)continue;f&&((m===0||m===1)&&(T[m].push(v),T[m].push(c)))}return T},l}();function a(l,n){return l&&l.label===n.name&&!(l.textTrack1||l.textTrack2)}function o(l,n,s,d){return Math.min(n,d)-Math.max(l,s)}function h(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function S(P,y){this.subtle=void 0,this.aesIV=void 0,this.subtle=P,this.aesIV=y}var C=S.prototype;return C.decrypt=function(y,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,y)},S}()},"./src/crypt/aes-decryptor.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"removePadding",function(){return S}),I.d(B,"default",function(){return C});var F=I("./src/utils/typed-array.ts");function S(P){var y=P.byteLength,t=y&&new DataView(P.buffer).getUint8(y-1);return t?Object(F.sliceUint8)(P,0,y-t):P}var C=function(){function P(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var y=P.prototype;return y.uint8ArrayToUint32Array_=function(b){for(var i=new DataView(b),u=new Uint32Array(4),p=0;p<4;p++)u[p]=i.getUint32(p*4);return u},y.initTable=function(){var b=this.sBox,i=this.invSBox,u=this.subMix,p=u[0],a=u[1],o=u[2],h=u[3],l=this.invSubMix,n=l[0],s=l[1],d=l[2],E=l[3],D=new Uint32Array(256),T=0,k=0,w=0;for(w=0;w<256;w++)w<128?D[w]=w<<1:D[w]=w<<1^283;for(w=0;w<256;w++){var v=k^k<<1^k<<2^k<<3^k<<4;v=v>>>8^v&255^99,b[T]=v,i[v]=T;var c=D[T],f=D[c],m=D[f],_=D[v]*257^v*16843008;p[T]=_<<24|_>>>8,a[T]=_<<16|_>>>16,o[T]=_<<8|_>>>24,h[T]=_,_=m*16843009^f*65537^c*257^T*16843008,n[v]=_<<24|_>>>8,s[v]=_<<16|_>>>16,d[v]=_<<8|_>>>24,E[v]=_,T?(T=c^D[D[D[m^c]]],k^=D[D[k]]):T=k=1}},y.expandKey=function(b){for(var i=this.uint8ArrayToUint32Array_(b),u=!0,p=0;p<i.length&&u;)u=i[p]===this.key[p],p++;if(u)return;this.key=i;var a=this.keySize=i.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var o=this.ksRows=(a+6+1)*4,h,l,n=this.keySchedule=new Uint32Array(o),s=this.invKeySchedule=new Uint32Array(o),d=this.sBox,E=this.rcon,D=this.invSubMix,T=D[0],k=D[1],w=D[2],v=D[3],c,f;for(h=0;h<o;h++){if(h<a){c=n[h]=i[h];continue}f=c,h%a===0?(f=f<<8|f>>>24,f=d[f>>>24]<<24|d[f>>>16&255]<<16|d[f>>>8&255]<<8|d[f&255],f^=E[h/a|0]<<24):a>6&&h%a===4&&(f=d[f>>>24]<<24|d[f>>>16&255]<<16|d[f>>>8&255]<<8|d[f&255]),n[h]=c=(n[h-a]^f)>>>0}for(l=0;l<o;l++)h=o-l,l&3?f=n[h]:f=n[h-4],l<4||h<=4?s[l]=f:s[l]=T[d[f>>>24]]^k[d[f>>>16&255]]^w[d[f>>>8&255]]^v[d[f&255]],s[l]=s[l]>>>0},y.networkToHostOrderSwap=function(b){return b<<24|(b&65280)<<8|(b&16711680)>>8|b>>>24},y.decrypt=function(b,i,u){for(var p=this.keySize+6,a=this.invKeySchedule,o=this.invSBox,h=this.invSubMix,l=h[0],n=h[1],s=h[2],d=h[3],E=this.uint8ArrayToUint32Array_(u),D=E[0],T=E[1],k=E[2],w=E[3],v=new Int32Array(b),c=new Int32Array(v.length),f,m,_,x,g,j,U,R,W,H,L,G,z,J,te=this.networkToHostOrderSwap;i<v.length;){for(W=te(v[i]),H=te(v[i+1]),L=te(v[i+2]),G=te(v[i+3]),g=W^a[0],j=G^a[1],U=L^a[2],R=H^a[3],z=4,J=1;J<p;J++)f=l[g>>>24]^n[j>>16&255]^s[U>>8&255]^d[R&255]^a[z],m=l[j>>>24]^n[U>>16&255]^s[R>>8&255]^d[g&255]^a[z+1],_=l[U>>>24]^n[R>>16&255]^s[g>>8&255]^d[j&255]^a[z+2],x=l[R>>>24]^n[g>>16&255]^s[j>>8&255]^d[U&255]^a[z+3],g=f,j=m,U=_,R=x,z=z+4;f=o[g>>>24]<<24^o[j>>16&255]<<16^o[U>>8&255]<<8^o[R&255]^a[z],m=o[j>>>24]<<24^o[U>>16&255]<<16^o[R>>8&255]<<8^o[g&255]^a[z+1],_=o[U>>>24]<<24^o[R>>16&255]<<16^o[g>>8&255]<<8^o[j&255]^a[z+2],x=o[R>>>24]<<24^o[g>>16&255]<<16^o[j>>8&255]<<8^o[U&255]^a[z+3],c[i]=te(f^D),c[i+1]=te(x^T),c[i+2]=te(_^k),c[i+3]=te(m^w),D=W,T=H,k=L,w=G,i=i+4}return c.buffer},P}()},"./src/crypt/decrypter.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return i});var F=I("./src/crypt/aes-crypto.ts"),S=I("./src/crypt/fast-aes-key.ts"),C=I("./src/crypt/aes-decryptor.ts"),P=I("./src/utils/logger.ts"),y=I("./src/utils/mp4-tools.ts"),t=I("./src/utils/typed-array.ts"),b=16,i=function(){function u(a,o,h){var l=h===void 0?{}:h,n=l.removePKCS7Padding,s=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=a,this.config=o,this.removePKCS7Padding=s,s)try{var d=self.crypto;d&&(this.subtle=d.subtle||d.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=u.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var h=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(C.removePadding)(h):h},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(o,h,l,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),h,l);var s=this.flush();s&&n(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),h,l).then(n)},p.softwareDecrypt=function(o,h,l){var n=this.currentIV,s=this.currentResult,d=this.remainderData;this.logOnce("JS AES decrypt"),d&&(o=Object(y.appendUint8Array)(d,o),this.remainderData=null);var E=this.getValidChunk(o);if(!E.length)return null;n&&(l=n);var D=this.softwareDecrypter;D||(D=this.softwareDecrypter=new C.default),D.expandKey(h);var T=s;return this.currentResult=D.decrypt(E.buffer,0,l),this.currentIV=Object(t.sliceUint8)(E,-16).buffer,T||null},p.webCryptoDecrypt=function(o,h,l){var n=this,s=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new S.default(s,h)),this.fastAesKey.expandKey().then(function(d){if(!s)return Promise.reject(new Error("web crypto not initialized"));var E=new F.default(s,l);return E.decrypt(o.buffer,d)}).catch(function(d){return n.onWebCryptoError(d,o,h,l)})},p.onWebCryptoError=function(o,h,l,n){return P.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,l,n)},p.getValidChunk=function(o){var h=o,l=o.length-o.length%b;return l!==o.length&&(h=Object(t.sliceUint8)(o,0,l),this.remainderData=Object(t.sliceUint8)(o,l)),h},p.logOnce=function(o){if(!this.logEnabled)return;P.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function S(P,y){this.subtle=void 0,this.key=void 0,this.subtle=P,this.key=y}var C=S.prototype;return C.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},S}()},"./src/demux/aacdemuxer.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),S=I("./src/demux/adts.ts"),C=I("./src/utils/logger.ts"),P=I("./src/demux/id3.ts");function y(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,t(i,u)}function t(i,u){return t=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},t(i,u)}var b=function(i){y(u,i);function u(a,o){var h;return h=i.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=a,h.config=o,h}var p=u.prototype;return p.resetInitSegment=function(o,h,l){i.prototype.resetInitSegment.call(this,o,h,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},u.probe=function(o){if(!o)return!1;for(var h=P.getID3Data(o,0)||[],l=h.length,n=o.length;l<n;l++)if(S.probe(o,l))return C.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(o,h){return S.canParse(o,h)},p.appendFrame=function(o,h,l){S.initTrackConfig(o,this.observer,h,l,o.manifestCodec);var n=S.appendFrame(o,h,l,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},u}(F.default);b.minProbeByteLength=9,B.default=b},"./src/demux/adts.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"getAudioConfig",function(){return P}),I.d(B,"isHeaderPattern",function(){return y}),I.d(B,"getHeaderLength",function(){return t}),I.d(B,"getFullFrameLength",function(){return b}),I.d(B,"canGetFrameLength",function(){return i}),I.d(B,"isHeader",function(){return u}),I.d(B,"canParse",function(){return p}),I.d(B,"probe",function(){return a}),I.d(B,"initTrackConfig",function(){return o}),I.d(B,"getFrameDuration",function(){return h}),I.d(B,"parseFrameHeader",function(){return l}),I.d(B,"appendFrame",function(){return n});var F=I("./src/utils/logger.ts"),S=I("./src/errors.ts"),C=I("./src/events.ts");function P(s,d,E,D){var T,k,w,v,c=navigator.userAgent.toLowerCase(),f=D,m=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];T=((d[E+2]&192)>>>6)+1;var _=(d[E+2]&60)>>>2;if(_>m.length-1){s.trigger(C.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+_});return}return w=(d[E+2]&1)<<2,w|=(d[E+3]&192)>>>6,F.logger.log("manifest codec:"+D+", ADTS type:"+T+", samplingIndex:"+_),/firefox/i.test(c)?_>=6?(T=5,v=new Array(4),k=_-3):(T=2,v=new Array(2),k=_):c.indexOf("android")!==-1?(T=2,v=new Array(2),k=_):(T=5,v=new Array(4),D&&(D.indexOf("mp4a.40.29")!==-1||D.indexOf("mp4a.40.5")!==-1)||!D&&_>=6?k=_-3:((D&&D.indexOf("mp4a.40.2")!==-1&&(_>=6&&w===1||/vivaldi/i.test(c))||!D&&w===1)&&(T=2,v=new Array(2)),k=_)),v[0]=T<<3,v[0]|=(_&14)>>1,v[1]|=(_&1)<<7,v[1]|=w<<3,T===5&&(v[1]|=(k&14)>>1,v[2]=(k&1)<<7,v[2]|=2<<2,v[3]=0),{config:v,samplerate:m[_],channelCount:w,codec:"mp4a.40."+T,manifestCodec:f}}function y(s,d){return s[d]===255&&(s[d+1]&246)===240}function t(s,d){return s[d+1]&1?7:9}function b(s,d){return(s[d+3]&3)<<11|s[d+4]<<3|(s[d+5]&224)>>>5}function i(s,d){return d+5<s.length}function u(s,d){return d+1<s.length&&y(s,d)}function p(s,d){return i(s,d)&&y(s,d)&&b(s,d)<=s.length-d}function a(s,d){if(u(s,d)){var E=t(s,d);if(d+E>=s.length)return!1;var D=b(s,d);if(D<=E)return!1;var T=d+D;return T===s.length||u(s,T)}return!1}function o(s,d,E,D,T){if(!s.samplerate){var k=P(d,E,D,T);if(!k)return;s.config=k.config,s.samplerate=k.samplerate,s.channelCount=k.channelCount,s.codec=k.codec,s.manifestCodec=k.manifestCodec,F.logger.log("parsed codec:"+s.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function h(s){return 1024*9e4/s}function l(s,d,E,D,T){var k=t(s,d),w=b(s,d);if(w-=k,w>0){var v=E+D*T;return{headerLength:k,frameLength:w,stamp:v}}}function n(s,d,E,D,T){var k=h(s.samplerate),w=l(d,E,D,T,k);if(w){var v=w.frameLength,c=w.headerLength,f=w.stamp,m=c+v,_=Math.max(0,E+m-d.length),x;_?(x=new Uint8Array(m-c),x.set(d.subarray(E+c,d.length),0)):x=d.subarray(E+c,E+m);var g={unit:x,pts:f};return _||s.samples.push(g),{sample:g,length:m,missing:_}}}},"./src/demux/base-audio-demuxer.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"initPTSFn",function(){return b});var F=I("./src/polyfills/number.ts"),S=I("./src/demux/id3.ts"),C=I("./src/demux/dummy-demuxed-track.ts"),P=I("./src/utils/mp4-tools.ts"),y=I("./src/utils/typed-array.ts"),t=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=i.prototype;return u.resetInitSegment=function(a,o,h){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(a,o){return!1},u.appendFrame=function(a,o,h){},u.demux=function(a,o){this.cachedData&&(a=Object(P.appendUint8Array)(this.cachedData,a),this.cachedData=null);var h=S.getID3Data(a,0),l=h?h.length:0,n,s,d=this._audioTrack,E=this._id3Track,D=h?S.getTimeStamp(h):void 0,T=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=b(D,o)),h&&h.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),s=this.initPTS;l<T;){if(this.canParse(a,l)){var k=this.appendFrame(d,a,l);k?(this.frameIndex++,s=k.sample.pts,l+=k.length,n=l):l=T}else S.canParse(a,l)?(h=S.getID3Data(a,l),E.samples.push({pts:s,dts:s,data:h}),l+=h.length,n=l):l++;if(l===T&&n!==T){var w=Object(y.sliceUint8)(a,n);this.cachedData?this.cachedData=Object(P.appendUint8Array)(this.cachedData,w):this.cachedData=w}}return{audioTrack:d,avcTrack:Object(C.dummyTrack)(),id3Track:E,textTrack:Object(C.dummyTrack)()}},u.demuxSampleAes=function(a,o,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(a){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(C.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(C.dummyTrack)()}},u.destroy=function(){},i}(),b=function(u,p){return Object(F.isFiniteNumber)(u)?u*90:p*9e4};B.default=t},"./src/demux/chunk-cache.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function C(){this.chunks=[],this.dataLength=0}var P=C.prototype;return P.push=function(t){this.chunks.push(t),this.dataLength+=t.length},P.flush=function(){var t=this.chunks,b=this.dataLength,i;if(t.length)t.length===1?i=t[0]:i=S(t,b);else return new Uint8Array(0);return this.reset(),i},P.reset=function(){this.chunks.length=0,this.dataLength=0},C}();function S(C,P){for(var y=new Uint8Array(P),t=0,b=0;b<C.length;b++){var i=C[b];y.set(i,t),t+=i.length}return y}},"./src/demux/dummy-demuxed-track.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"dummyTrack",function(){return F});function F(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/utils/logger.ts"),S=function(){function C(y){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=y,this.bytesAvailable=y.byteLength,this.word=0,this.bitsAvailable=0}var P=C.prototype;return P.loadWord=function(){var t=this.data,b=this.bytesAvailable,i=t.byteLength-b,u=new Uint8Array(4),p=Math.min(4,b);if(p===0)throw new Error("no bytes available");u.set(t.subarray(i,i+p)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},P.skipBits=function(t){var b;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,b=t>>3,t-=b>>3,this.bytesAvailable-=b,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},P.readBits=function(t){var b=Math.min(this.bitsAvailable,t),i=this.word>>>32-b;return t>32&&F.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=b,this.bitsAvailable>0?this.word<<=b:this.bytesAvailable>0&&this.loadWord(),b=t-b,b>0&&this.bitsAvailable?i<<b|this.readBits(b):i},P.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},P.skipUEG=function(){this.skipBits(1+this.skipLZ())},P.skipEG=function(){this.skipBits(1+this.skipLZ())},P.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},P.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},P.readBoolean=function(){return this.readBits(1)===1},P.readUByte=function(){return this.readBits(8)},P.readUShort=function(){return this.readBits(16)},P.readUInt=function(){return this.readBits(32)},P.skipScalingList=function(t){for(var b=8,i=8,u,p=0;p<t;p++)i!==0&&(u=this.readEG(),i=(b+u+256)%256),b=i===0?b:i},P.readSPS=function(){var t=0,b=0,i=0,u=0,p,a,o,h=this.readUByte.bind(this),l=this.readBits.bind(this),n=this.readUEG.bind(this),s=this.readBoolean.bind(this),d=this.skipBits.bind(this),E=this.skipEG.bind(this),D=this.skipUEG.bind(this),T=this.skipScalingList.bind(this);h();var k=h();if(l(5),d(3),h(),D(),k===100||k===110||k===122||k===244||k===44||k===83||k===86||k===118||k===128){var w=n();if(w===3&&d(1),D(),D(),d(1),s())for(a=w!==3?8:12,o=0;o<a;o++)s()&&(o<6?T(16):T(64))}D();var v=n();if(v===0)n();else if(v===1)for(d(1),E(),E(),p=n(),o=0;o<p;o++)E();D(),d(1);var c=n(),f=n(),m=l(1);m===0&&d(1),d(1),s()&&(t=n(),b=n(),i=n(),u=n());var _=[1,1];if(s()&&s()){var x=h();switch(x){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((c+1)*16-t*2-b*2),height:(2-m)*(f+1)*16-(m?2:4)*(i+u),pixelRatio:_}},P.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},C}();B.default=S},"./src/demux/id3.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"isHeader",function(){return F}),I.d(B,"isFooter",function(){return S}),I.d(B,"getID3Data",function(){return C}),I.d(B,"canParse",function(){return y}),I.d(B,"getTimeStamp",function(){return t}),I.d(B,"isTimeStampFrame",function(){return b}),I.d(B,"getID3Frames",function(){return u}),I.d(B,"decodeFrame",function(){return p}),I.d(B,"utf8ArrayToStr",function(){return n}),I.d(B,"testables",function(){return s});var F=function(T,k){return k+10<=T.length&&(T[k]===73&&T[k+1]===68&&T[k+2]===51&&(T[k+3]<255&&T[k+4]<255&&(T[k+6]<128&&T[k+7]<128&&T[k+8]<128&&T[k+9]<128)))},S=function(T,k){return k+10<=T.length&&(T[k]===51&&T[k+1]===68&&T[k+2]===73&&(T[k+3]<255&&T[k+4]<255&&(T[k+6]<128&&T[k+7]<128&&T[k+8]<128&&T[k+9]<128)))},C=function(T,k){for(var w=k,v=0;F(T,k);){v+=10;var c=P(T,k+6);v+=c,S(T,k+10)&&(v+=10),k+=v}return v>0?T.subarray(w,w+v):void 0},P=function(T,k){var w=0;return w=(T[k]&127)<<21,w|=(T[k+1]&127)<<14,w|=(T[k+2]&127)<<7,w|=T[k+3]&127,w},y=function(T,k){return F(T,k)&&P(T,k+6)+10<=T.length-k},t=function(T){for(var k=u(T),w=0;w<k.length;w++){var v=k[w];if(b(v))return l(v)}return},b=function(T){return T&&T.key==="PRIV"&&T.info==="com.apple.streaming.transportStreamTimestamp"},i=function(T){var k=String.fromCharCode(T[0],T[1],T[2],T[3]),w=P(T,4),v=10;return{type:k,size:w,data:T.subarray(v,v+w)}},u=function(T){for(var k=0,w=[];F(T,k);){var v=P(T,k+6);k+=10;for(var c=k+v;k+8<c;){var f=i(T.subarray(k)),m=p(f);m&&w.push(m),k+=f.size+10}S(T,k)&&(k+=10)}return w},p=function(T){return T.type==="PRIV"?a(T):T.type[0]==="W"?h(T):o(T)},a=function(T){if(T.size<2)return;var k=n(T.data,!0),w=new Uint8Array(T.data.subarray(k.length+1));return{key:T.type,info:k,data:w.buffer}},o=function(T){if(T.size<2)return;if(T.type==="TXXX"){var k=1,w=n(T.data.subarray(k),!0);k+=w.length+1;var v=n(T.data.subarray(k));return{key:T.type,info:w,data:v}}var c=n(T.data.subarray(1));return{key:T.type,data:c}},h=function(T){if(T.type==="WXXX"){if(T.size<2)return;var k=1,w=n(T.data.subarray(k),!0);k+=w.length+1;var v=n(T.data.subarray(k));return{key:T.type,info:w,data:v}}var c=n(T.data);return{key:T.type,data:c}},l=function(T){if(T.data.byteLength===8){var k=new Uint8Array(T.data),w=k[3]&1,v=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return v/=45,w&&(v+=4772185884e-2),Math.round(v)}return},n=function(T,k){k===void 0&&(k=!1);var w=E();if(w){var v=w.decode(T);if(k){var c=v.indexOf("\0");return c!==-1?v.substring(0,c):v}return v.replace(/\0/g,"")}for(var f=T.length,m,_,x,g="",j=0;j<f;){if(m=T[j++],m===0&&k)return g;if(m===0||m===3)continue;switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(m);break;case 12:case 13:_=T[j++],g+=String.fromCharCode((m&31)<<6|_&63);break;case 14:_=T[j++],x=T[j++],g+=String.fromCharCode((m&15)<<12|(_&63)<<6|(x&63)<<0);break;default:}}return g},s={decodeTextFrame:o},d;function E(){return!d&&typeof self.TextDecoder!="undefined"&&(d=new self.TextDecoder("utf-8")),d}},"./src/demux/mp3demuxer.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),S=I("./src/demux/id3.ts"),C=I("./src/utils/logger.ts"),P=I("./src/demux/mpegaudio.ts");function y(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,t(i,u)}function t(i,u){return t=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},t(i,u)}var b=function(i){y(u,i);function u(){return i.apply(this,arguments)||this}var p=u.prototype;return p.resetInitSegment=function(o,h,l){i.prototype.resetInitSegment.call(this,o,h,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},u.probe=function(o){if(!o)return!1;for(var h=S.getID3Data(o,0)||[],l=h.length,n=o.length;l<n;l++)if(P.probe(o,l))return C.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(o,h){return P.canParse(o,h)},p.appendFrame=function(o,h,l){return this.initPTS===null?void 0:P.appendFrame(o,h,l,this.initPTS,this.frameIndex)},u}(F.default);b.minProbeByteLength=4,B.default=b},"./src/demux/mp4demuxer.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/utils/mp4-tools.ts"),S=I("./src/demux/dummy-demuxed-track.ts"),C=function(){function P(t,b){this.remainderData=null,this.config=void 0,this.config=b}var y=P.prototype;return y.resetTimeStamp=function(){},y.resetInitSegment=function(){},y.resetContiguity=function(){},P.probe=function(b){return Object(F.findBox)({data:b,start:0,end:Math.min(b.length,16384)},["moof"]).length>0},y.demux=function(b){var i=b,u=Object(S.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(F.appendUint8Array)(this.remainderData,b));var p=Object(F.segmentValidRange)(i);this.remainderData=p.remainder,u.samples=p.valid||new Uint8Array}else u.samples=i;return{audioTrack:Object(S.dummyTrack)(),avcTrack:u,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},y.flush=function(){var b=Object(S.dummyTrack)();return b.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(S.dummyTrack)(),avcTrack:b,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},y.demuxSampleAes=function(b,i,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},y.destroy=function(){},P}();C.minProbeByteLength=1024,B.default=C},"./src/demux/mpegaudio.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"appendFrame",function(){return t}),I.d(B,"parseHeader",function(){return b}),I.d(B,"isHeaderPattern",function(){return i}),I.d(B,"isHeader",function(){return u}),I.d(B,"canParse",function(){return p}),I.d(B,"probe",function(){return a});var F=null,S=[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],C=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],P=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],y=[0,1,1,4];function t(o,h,l,n,s){if(l+24>h.length)return;var d=b(h,l);if(d&&l+d.frameLength<=h.length){var E=d.samplesPerFrame*9e4/d.sampleRate,D=n+s*E,T={unit:h.subarray(l,l+d.frameLength),pts:D,dts:D};return o.config=[],o.channelCount=d.channelCount,o.samplerate=d.sampleRate,o.samples.push(T),{sample:T,length:d.frameLength,missing:0}}}function b(o,h){var l=o[h+1]>>3&3,n=o[h+1]>>1&3,s=o[h+2]>>4&15,d=o[h+2]>>2&3;if(l!==1&&s!==0&&s!==15&&d!==3){var E=o[h+2]>>1&1,D=o[h+3]>>6,T=l===3?3-n:n===3?3:4,k=S[T*14+s-1]*1e3,w=l===3?0:l===2?1:2,v=C[w*3+d],c=D===3?1:2,f=P[l][n],m=y[n],_=f*8*m,x=Math.floor(f*k/v+E)*m;if(F===null){var g=navigator.userAgent||"",j=g.match(/Chrome\/(\d+)/i);F=j?parseInt(j[1]):0}var U=!!F&&F<=87;return U&&n===2&&k>=224e3&&D===0&&(o[h+3]=o[h+3]|128),{sampleRate:v,channelCount:c,frameLength:x,samplesPerFrame:_}}}function i(o,h){return o[h]===255&&(o[h+1]&224)===224&&(o[h+1]&6)!==0}function u(o,h){return h+1<o.length&&i(o,h)}function p(o,h){var l=4;return i(o,h)&&l<=o.length-h}function a(o,h){if(h+1<o.length&&i(o,h)){var l=4,n=b(o,h),s=l;n!=null&&n.frameLength&&(s=n.frameLength);var d=h+s;return d===o.length||u(o,d)}return!1}},"./src/demux/sample-aes.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/crypt/decrypter.ts"),S=I("./src/demux/tsdemuxer.ts"),C=function(){function P(t,b,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new F.default(t,b,{removePKCS7Padding:!1})}var y=P.prototype;return y.decryptBuffer=function(b,i){this.decrypter.decrypt(b,this.keyData.key.buffer,this.keyData.iv.buffer,i)},y.decryptAacSample=function(b,i,u,p){var a=b[i].unit,o=a.subarray(16,a.length-a.length%16),h=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),l=this;this.decryptBuffer(h,function(n){var s=new Uint8Array(n);a.set(s,16),p||l.decryptAacSamples(b,i+1,u)})},y.decryptAacSamples=function(b,i,u){for(;;i++){if(i>=b.length){u();return}if(b[i].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(b,i,u,p),!p)return}},y.getAvcEncryptedData=function(b){for(var i=Math.floor((b.length-48)/160)*16+16,u=new Int8Array(i),p=0,a=32;a<=b.length-16;a+=160,p+=16)u.set(b.subarray(a,a+16),p);return u},y.getAvcDecryptedUnit=function(b,i){for(var u=new Uint8Array(i),p=0,a=32;a<=b.length-16;a+=160,p+=16)b.set(u.subarray(p,p+16),a);return b},y.decryptAvcSample=function(b,i,u,p,a,o){var h=Object(S.discardEPB)(a.data),l=this.getAvcEncryptedData(h),n=this;this.decryptBuffer(l.buffer,function(s){a.data=n.getAvcDecryptedUnit(h,s),o||n.decryptAvcSamples(b,i,u+1,p)})},y.decryptAvcSamples=function(b,i,u,p){if(b instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,u=0){if(i>=b.length){p();return}for(var a=b[i].units;!(u>=a.length);u++){var o=a[u];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(b,i,u,p,o,h),!h)return}}},P}();B.default=C},"./src/demux/transmuxer-interface.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./node_modules/webworkify-webpack/index.js"),S=I.n(F),C=I("./src/events.ts"),P=I("./src/demux/transmuxer.ts"),y=I("./src/utils/logger.ts"),t=I("./src/errors.ts"),b=I("./src/utils/mediasource-helper.ts"),i=I("./node_modules/eventemitter3/index.js"),u=I.n(i),p=Object(b.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function o(l,n,s,d){var E=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=n,this.onTransmuxComplete=s,this.onFlush=d;var D=l.config,T=function(f,m){m=m||{},m.frag=E.frag,m.id=E.id,l.trigger(f,m)};this.observer=new i.EventEmitter,this.observer.on(C.Events.FRAG_DECRYPTED,T),this.observer.on(C.Events.ERROR,T);var k={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},w=navigator.vendor;if(D.enableWorker&&typeof Worker!="undefined"){y.logger.log("demuxing in webworker");var v;try{v=this.worker=F("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.onerror=function(c){l.trigger(C.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(c.message+" ("+c.filename+":"+c.lineno+")")})},v.postMessage({cmd:"init",typeSupported:k,vendor:w,id:n,config:JSON.stringify(D)})}catch(c){y.logger.warn("Error in worker:",c),y.logger.error("Error while initializing DemuxerWorker, fallback to inline"),v&&self.URL.revokeObjectURL(v.objectURL),this.transmuxer=new P.default(this.observer,k,D,w,n),this.worker=null}}else this.transmuxer=new P.default(this.observer,k,D,w,n)}var h=o.prototype;return h.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var d=this.observer;d&&d.removeAllListeners(),this.observer=null},h.push=function(n,s,d,E,D,T,k,w,v,c){var f=this;v.transmuxing.start=self.performance.now();var m=this.transmuxer,_=this.worker,x=T?T.start:D.start,g=D.decryptdata,j=this.frag,U=!(j&&D.cc===j.cc),R=!(j&&v.level===j.level),W=j?v.sn-j.sn:-1,H=this.part?v.part-this.part.index:1,L=!R&&(W===1||W===0&&H===1),G=self.performance.now();(R||W||D.stats.parsing.start===0)&&(D.stats.parsing.start=G),T&&(H||!L)&&(T.stats.parsing.start=G);var z=new P.TransmuxState(U,L,w,R,x);if(!L||U){y.logger.log("[transmuxer-interface, "+D.type+"]: Starting new transmux session for sn: "+v.sn+" p: "+v.part+" level: "+v.level+" id: "+v.id+`
discontinuity: `+U+`
trackSwitch: `+R+`
contiguous: `+L+`
accurateTimeOffset: `+w+`
timeOffset: `+x);var J=new P.TransmuxConfig(d,E,s,k,c);this.configureTransmuxer(J)}if(this.frag=D,this.part=T,_)_.postMessage({cmd:"demux",data:n,decryptdata:g,chunkMeta:v,state:z},n instanceof ArrayBuffer?[n]:[]);else if(m){var te=m.push(n,g,v,z);Object(P.isPromise)(te)?te.then(function(_e){f.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(te)}},h.flush=function(n){var s=this;n.transmuxing.start=self.performance.now();var d=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:n});else if(d){var D=d.flush(n);Object(P.isPromise)(D)?D.then(function(T){s.handleFlushResult(T,n)}):this.handleFlushResult(D,n)}},h.handleFlushResult=function(n,s){var d=this;n.forEach(function(E){d.handleTransmuxComplete(E)}),this.onFlush(s)},h.onWorkerMessage=function(n){var s=n.data,d=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,d.trigger(s.event,s.data);break}}},h.configureTransmuxer=function(n){var s=this.worker,d=this.transmuxer;s?s.postMessage({cmd:"configure",config:n}):d&&d.configure(n)},h.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},o}()},"./src/demux/transmuxer-worker.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/demux/transmuxer.ts"),S=I("./src/events.ts"),C=I("./src/utils/logger.ts"),P=I("./node_modules/eventemitter3/index.js"),y=I.n(P);function t(a){var o=new P.EventEmitter,h=function(n,s){a.postMessage({event:n,data:s})};o.on(S.Events.FRAG_DECRYPTED,h),o.on(S.Events.ERROR,h),a.addEventListener("message",function(l){var n=l.data;switch(n.cmd){case"init":{var s=JSON.parse(n.config);a.transmuxer=new F.default(o,n.typeSupported,s,n.vendor,n.id),Object(C.enableLogs)(s.debug),h("init",null);break}case"configure":{a.transmuxer.configure(n.config);break}case"demux":{var d=a.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(F.isPromise)(d)?d.then(function(T){b(a,T)}):b(a,d);break}case"flush":{var E=n.chunkMeta,D=a.transmuxer.flush(E);Object(F.isPromise)(D)?D.then(function(T){u(a,T,E)}):u(a,D,E);break}default:break}})}function b(a,o){if(p(o.remuxResult))return;var h=[],l=o.remuxResult,n=l.audio,s=l.video;n&&i(h,n),s&&i(h,s),a.postMessage({event:"transmuxComplete",data:o},h)}function i(a,o){o.data1&&a.push(o.data1.buffer),o.data2&&a.push(o.data2.buffer)}function u(a,o,h){o.forEach(function(l){b(a,l)}),a.postMessage({event:"flush",data:h})}function p(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return s}),I.d(B,"isPromise",function(){return D}),I.d(B,"TransmuxConfig",function(){return T}),I.d(B,"TransmuxState",function(){return k});var F=I("./src/events.ts"),S=I("./src/errors.ts"),C=I("./src/crypt/decrypter.ts"),P=I("./src/demux/aacdemuxer.ts"),y=I("./src/demux/mp4demuxer.ts"),t=I("./src/demux/tsdemuxer.ts"),b=I("./src/demux/mp3demuxer.ts"),i=I("./src/remux/mp4-remuxer.ts"),u=I("./src/remux/passthrough-remuxer.ts"),p=I("./src/demux/chunk-cache.ts"),a=I("./src/utils/mp4-tools.ts"),o=I("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(w){o.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var l=[{demux:t.default,remux:i.default},{demux:y.default,remux:u.default},{demux:P.default,remux:i.default},{demux:b.default,remux:i.default}],n=1024;l.forEach(function(w){var v=w.demux;n=Math.max(n,v.minProbeByteLength)});var s=function(){function w(c,f,m,_,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 p.default,this.observer=c,this.typeSupported=f,this.config=m,this.vendor=_,this.id=x}var v=w.prototype;return v.configure=function(f){this.transmuxConfig=f,this.decrypter&&this.decrypter.reset()},v.push=function(f,m,_,x){var g=this,j=_.transmuxing;j.executeStart=h();var U=new Uint8Array(f),R=this.cache,W=this.config,H=this.currentTransmuxState,L=this.transmuxConfig;x&&(this.currentTransmuxState=x);var G=d(U,m);if(G&&G.method==="AES-128"){var z=this.getDecrypter();if(W.enableSoftwareAES){var J=z.softwareDecrypt(U,G.key.buffer,G.iv.buffer);if(!J)return j.executeEnd=h(),E(_);U=new Uint8Array(J)}else return this.decryptionPromise=z.webCryptoDecrypt(U,G.key.buffer,G.iv.buffer).then(function(Oe){var Ye=g.push(Oe,null,_);return g.decryptionPromise=null,Ye}),this.decryptionPromise}var te=x||H,_e=te.contiguous,ce=te.discontinuity,xe=te.trackSwitch,Te=te.accurateTimeOffset,je=te.timeOffset,Ce=L.audioCodec,Z=L.videoCodec,K=L.defaultInitPts,V=L.duration,$=L.initSegmentData;if((ce||xe)&&this.resetInitSegment($,Ce,Z,V),ce&&this.resetInitialTimestamp(K),_e||this.resetContiguity(),this.needsProbing(U,ce,xe)){if(R.dataLength){var q=R.flush();U=Object(a.appendUint8Array)(q,U)}this.configureTransmuxer(U,L)}var Q=this.transmux(U,G,je,Te,_),ge=this.currentTransmuxState;return ge.contiguous=!0,ge.discontinuity=!1,ge.trackSwitch=!1,j.executeEnd=h(),Q},v.flush=function(f){var m=this,_=f.transmuxing;_.executeStart=h();var x=this.decrypter,g=this.cache,j=this.currentTransmuxState,U=this.decryptionPromise;if(U)return U.then(function(){return m.flush(f)});var R=[],W=j.timeOffset;if(x){var H=x.flush();H&&R.push(this.push(H,null,f))}var L=g.dataLength;g.reset();var G=this.demuxer,z=this.remuxer;if(!G||!z)return L>=n&&this.observer.emit(F.Events.ERROR,F.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),_.executeEnd=h(),[E(f)];var J=G.flush(W);return D(J)?J.then(function(te){return m.flushRemux(R,te,f),R}):(this.flushRemux(R,J,f),R)},v.flushRemux=function(f,m,_){var x=m.audioTrack,g=m.avcTrack,j=m.id3Track,U=m.textTrack,R=this.currentTransmuxState,W=R.accurateTimeOffset,H=R.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+_.sn+(_.part>-1?" p: "+_.part:"")+" of level "+_.level);var L=this.remuxer.remux(x,g,j,U,H,W,!0,this.id);f.push({remuxResult:L,chunkMeta:_}),_.transmuxing.executeEnd=h()},v.resetInitialTimestamp=function(f){var m=this.demuxer,_=this.remuxer;if(!m||!_)return;m.resetTimeStamp(f),_.resetTimeStamp(f)},v.resetContiguity=function(){var f=this.demuxer,m=this.remuxer;if(!f||!m)return;f.resetContiguity(),m.resetNextTimestamp()},v.resetInitSegment=function(f,m,_,x){var g=this.demuxer,j=this.remuxer;if(!g||!j)return;g.resetInitSegment(m,_,x),j.resetInitSegment(f,m,_)},v.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},v.transmux=function(f,m,_,x,g){var j;return m&&m.method==="SAMPLE-AES"?j=this.transmuxSampleAes(f,m,_,x,g):j=this.transmuxUnencrypted(f,_,x,g),j},v.transmuxUnencrypted=function(f,m,_,x){var g=this.demuxer.demux(f,m,!1,!this.config.progressive),j=g.audioTrack,U=g.avcTrack,R=g.id3Track,W=g.textTrack,H=this.remuxer.remux(j,U,R,W,m,_,!1,this.id);return{remuxResult:H,chunkMeta:x}},v.transmuxSampleAes=function(f,m,_,x,g){var j=this;return this.demuxer.demuxSampleAes(f,m,_).then(function(U){var R=j.remuxer.remux(U.audioTrack,U.avcTrack,U.id3Track,U.textTrack,_,x,!1,j.id);return{remuxResult:R,chunkMeta:g}})},v.configureTransmuxer=function(f,m){for(var _=this.config,x=this.observer,g=this.typeSupported,j=this.vendor,U=m.audioCodec,R=m.defaultInitPts,W=m.duration,H=m.initSegmentData,L=m.videoCodec,G,z=0,J=l.length;z<J;z++)if(l[z].demux.probe(f)){G=l[z];break}G||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:y.default,remux:u.default});var te=this.demuxer,_e=this.remuxer,ce=G.remux,xe=G.demux;(!_e||!(_e instanceof ce))&&(this.remuxer=new ce(x,_,g,j)),(!te||!(te instanceof xe))&&(this.demuxer=new xe(x,_,g),this.probe=xe.probe),this.resetInitSegment(H,U,L,W),this.resetInitialTimestamp(R)},v.needsProbing=function(f,m,_){return!this.demuxer||!this.remuxer||m||_},v.getDecrypter=function(){var f=this.decrypter;return f||(f=this.decrypter=new C.default(this.observer,this.config)),f},w}();function d(w,v){var c=null;return w.byteLength>0&&v!=null&&v.key!=null&&v.iv!==null&&v.method!=null&&(c=v),c}var E=function(v){return{remuxResult:{},chunkMeta:v}};function D(w){return"then"in w&&w.then instanceof Function}var T=function(v,c,f,m,_){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=v,this.videoCodec=c,this.initSegmentData=f,this.duration=m,this.defaultInitPts=_},k=function(v,c,f,m,_){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=v,this.contiguous=c,this.accurateTimeOffset=f,this.trackSwitch=m,this.timeOffset=_}},"./src/demux/tsdemuxer.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"discardEPB",function(){return E});var F=I("./src/demux/adts.ts"),S=I("./src/demux/mpegaudio.ts"),C=I("./src/demux/exp-golomb.ts"),P=I("./src/demux/id3.ts"),y=I("./src/demux/sample-aes.ts"),t=I("./src/events.ts"),b=I("./src/utils/mp4-tools.ts"),i=I("./src/utils/logger.ts"),u=I("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},a=function(){function D(k,w,v){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=k,this.config=w,this.typeSupported=v}D.probe=function(w){var v=D.syncOffset(w);return v<0?!1:(v&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+v+", junk ahead ?"),!0)},D.syncOffset=function(w){for(var v=Math.min(1e3,w.length-3*188),c=0;c<v;){if(w[c]===71&&w[c+188]===71&&w[c+2*188]===71)return c;c++}return-1},D.createTrack=function(w,v){return{container:w==="video"||w==="audio"?"video/mp2t":void 0,type:w,id:p[w],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:w==="audio"?v:void 0}};var T=D.prototype;return T.resetInitSegment=function(w,v,c){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=D.createTrack("video",c),this._audioTrack=D.createTrack("audio",c),this._id3Track=D.createTrack("id3",c),this._txtTrack=D.createTrack("text",c),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=w,this.videoCodec=v,this._duration=c},T.resetTimeStamp=function(){},T.resetContiguity=function(){var w=this._audioTrack,v=this._avcTrack,c=this._id3Track;w&&(w.pesData=null),v&&(v.pesData=null),c&&(c.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},T.demux=function(w,v,c,f){c===void 0&&(c=!1),f===void 0&&(f=!1),c||(this.sampleAes=null);var m,_=this._avcTrack,x=this._audioTrack,g=this._id3Track,j=_.pid,U=_.pesData,R=x.pid,W=g.pid,H=x.pesData,L=g.pesData,G=!1,z=this.pmtParsed,J=this._pmtId,te=w.length;if(this.remainderData&&(w=Object(b.appendUint8Array)(this.remainderData,w),te=w.length,this.remainderData=null),te<188&&!f)return this.remainderData=w,{audioTrack:x,avcTrack:_,id3Track:g,textTrack:this._txtTrack};var _e=Math.max(0,D.syncOffset(w));te-=(te+_e)%188,te<w.byteLength&&!f&&(this.remainderData=new Uint8Array(w.buffer,te,w.buffer.byteLength-te));for(var ce=_e;ce<te;ce+=188)if(w[ce]===71){var xe=!!(w[ce+1]&64),Te=((w[ce+1]&31)<<8)+w[ce+2],je=(w[ce+3]&48)>>4,Ce=void 0;if(je>1){if(Ce=ce+5+w[ce+4],Ce===ce+188)continue}else Ce=ce+4;switch(Te){case j:xe&&(U&&(m=n(U))&&this.parseAVCPES(m,!1),U={data:[],size:0}),U&&(U.data.push(w.subarray(Ce,ce+188)),U.size+=ce+188-Ce);break;case R:xe&&(H&&(m=n(H))&&(x.isAAC?this.parseAACPES(m):this.parseMPEGPES(m)),H={data:[],size:0}),H&&(H.data.push(w.subarray(Ce,ce+188)),H.size+=ce+188-Ce);break;case W:xe&&(L&&(m=n(L))&&this.parseID3PES(m),L={data:[],size:0}),L&&(L.data.push(w.subarray(Ce,ce+188)),L.size+=ce+188-Ce);break;case 0:xe&&(Ce+=w[Ce]+1),J=this._pmtId=h(w,Ce);break;case J:{xe&&(Ce+=w[Ce]+1);var Z=l(w,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,c);j=Z.avc,j>0&&(_.pid=j),R=Z.audio,R>0&&(x.pid=R,x.isAAC=Z.isAAC),W=Z.id3,W>0&&(g.pid=W),G&&!z&&(i.logger.log("reparse from beginning"),G=!1,ce=_e-188),z=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_.pesData=U,x.pesData=H,g.pesData=L;var K={audioTrack:x,avcTrack:_,id3Track:g,textTrack:this._txtTrack};return f&&this.extractRemainingSamples(K),K},T.flush=function(){var w=this.remainderData;this.remainderData=null;var v;return w?v=this.demux(w,-1,!1,!0):v={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(v),this.sampleAes?this.decrypt(v,this.sampleAes):v},T.extractRemainingSamples=function(w){var v=w.audioTrack,c=w.avcTrack,f=w.id3Track,m=c.pesData,_=v.pesData,x=f.pesData,g;m&&(g=n(m))?(this.parseAVCPES(g,!0),c.pesData=null):c.pesData=m,_&&(g=n(_))?(v.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),v.pesData=null):(_!=null&&_.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=_),x&&(g=n(x))?(this.parseID3PES(g),f.pesData=null):f.pesData=x},T.demuxSampleAes=function(w,v,c){var f=this.demux(w,c,!0,!this.config.progressive),m=this.sampleAes=new y.default(this.observer,this.config,v);return this.decrypt(f,m)},T.decrypt=function(w,v){return new Promise(function(c){var f=w.audioTrack,m=w.avcTrack;f.samples&&f.isAAC?v.decryptAacSamples(f.samples,0,function(){m.samples?v.decryptAvcSamples(m.samples,0,0,function(){c(w)}):c(w)}):m.samples&&v.decryptAvcSamples(m.samples,0,0,function(){c(w)})})},T.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},T.parseAVCPES=function(w,v){var c=this,f=this._avcTrack,m=this.parseAVCNALu(w.data),_=!1,x=this.avcSample,g,j=!1;w.data=null,x&&m.length&&!f.audFound&&(s(x,f),x=this.avcSample=o(!1,w.pts,w.dts,"")),m.forEach(function(U){switch(U.type){case 1:{g=!0,x||(x=c.avcSample=o(!0,w.pts,w.dts,"")),_&&(x.debug+="NDR "),x.frame=!0;var R=U.data;if(j&&R.length>4){var W=new C.default(R).readSliceType();(W===2||W===4||W===7||W===9)&&(x.key=!0)}break}case 5:g=!0,x||(x=c.avcSample=o(!0,w.pts,w.dts,"")),_&&(x.debug+="IDR "),x.key=!0,x.frame=!0;break;case 6:{g=!0,_&&x&&(x.debug+="SEI ");var H=new C.default(E(U.data));H.readUByte();for(var L=0,G=0,z=!1,J=0;!z&&H.bytesAvailable>1;){L=0;do J=H.readUByte(),L+=J;while(J===255);G=0;do J=H.readUByte(),G+=J;while(J===255);if(L===4&&H.bytesAvailable!==0){z=!0;var te=H.readUByte();if(te===181){var _e=H.readUShort();if(_e===49){var ce=H.readUInt();if(ce===1195456820){var xe=H.readUByte();if(xe===3){for(var Te=H.readUByte(),je=H.readUByte(),Ce=31&Te,Z=[Te,je],K=0;K<Ce;K++)Z.push(H.readUByte()),Z.push(H.readUByte()),Z.push(H.readUByte());d(c._txtTrack.samples,{type:3,pts:w.pts,bytes:Z})}}}}}else if(L===5&&H.bytesAvailable!==0){if(z=!0,G>16){for(var V=[],$=0;$<16;$++)V.push(H.readUByte().toString(16)),($===3||$===5||$===7||$===9)&&V.push("-");for(var q=G-16,Q=new Uint8Array(q),ge=0;ge<q;ge++)Q[ge]=H.readUByte();d(c._txtTrack.samples,{pts:w.pts,payloadType:L,uuid:V.join(""),userData:Object(P.utf8ArrayToStr)(Q),userDataBytes:Q})}}else if(G<H.bytesAvailable)for(var Oe=0;Oe<G;Oe++)H.readUByte()}break}case 7:if(g=!0,j=!0,_&&x&&(x.debug+="SPS "),!f.sps){var Ye=new C.default(U.data),le=Ye.readSPS();f.width=le.width,f.height=le.height,f.pixelRatio=le.pixelRatio,f.sps=[U.data],f.duration=c._duration;for(var Ee=U.data.subarray(1,4),Re="avc1.",He=0;He<3;He++){var et=Ee[He].toString(16);et.length<2&&(et="0"+et),Re+=et}f.codec=Re}break;case 8:g=!0,_&&x&&(x.debug+="PPS "),f.pps||(f.pps=[U.data]);break;case 9:g=!1,f.audFound=!0,x&&s(x,f),x=c.avcSample=o(!1,w.pts,w.dts,_?"AUD ":"");break;case 12:g=!1;break;default:g=!1,x&&(x.debug+="unknown NAL "+U.type+" ");break}if(x&&g){var ut=x.units;ut.push(U)}}),v&&x&&(s(x,f),this.avcSample=null)},T.getLastNalUnit=function(){var w,v=this.avcSample,c;if(!v||v.units.length===0){var f=this._avcTrack.samples;v=f[f.length-1]}if((w=v)!==null&&w!==void 0&&w.units){var m=v.units;c=m[m.length-1]}return c},T.parseAVCNALu=function(w){var v=w.byteLength,c=this._avcTrack,f=c.naluState||0,m=f,_=[],x=0,g,j,U,R=-1,W=0;for(f===-1&&(R=0,W=w[0]&31,f=0,x=1);x<v;){if(g=w[x++],!f){f=g?0:1;continue}if(f===1){f=g?0:2;continue}if(!g)f=3;else if(g===1){if(R>=0){var H={data:w.subarray(R,x-f-1),type:W};_.push(H)}else{var L=this.getLastNalUnit();if(L&&(m&&x<=4-m&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-m))),j=x-f-1,j>0)){var G=new Uint8Array(L.data.byteLength+j);G.set(L.data,0),G.set(w.subarray(0,j),L.data.byteLength),L.data=G,L.state=0}}x<v?(U=w[x]&31,R=x,W=U,f=0):f=-1}else f=0}if(R>=0&&f>=0){var z={data:w.subarray(R,v),type:W,state:f};_.push(z)}if(_.length===0){var J=this.getLastNalUnit();if(J){var te=new Uint8Array(J.data.byteLength+w.byteLength);te.set(J.data,0),te.set(w,J.data.byteLength),J.data=te}}return c.naluState=f,_},T.parseAACPES=function(w){var v=0,c=this._audioTrack,f=this.aacOverFlow,m=w.data;if(f){this.aacOverFlow=null;var _=f.sample.unit.byteLength,x=Math.min(f.missing,_),g=_-x;f.sample.unit.set(m.subarray(0,x),g),c.samples.push(f.sample),v=f.missing}var j,U;for(j=v,U=m.length;j<U-1&&!F.isHeader(m,j);j++);if(j!==v){var R,W;if(j<U-1?(R="AAC PES did not start with ADTS header,offset:"+j,W=!1):(R="no ADTS header found in AAC PES",W=!0),i.logger.warn("parsing error:"+R),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:W,reason:R}),W)return}F.initTrackConfig(c,this.observer,m,j,this.audioCodec);var H;if(w.pts!==void 0)H=w.pts;else if(f){var L=F.getFrameDuration(c.samplerate);H=f.sample.pts+L}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;j<U;)if(F.isHeader(m,j)){if(j+5<U){var z=F.appendFrame(c,m,j,H,G);if(z)if(z.missing)this.aacOverFlow=z;else{j+=z.length,G++;continue}}break}else j++},T.parseMPEGPES=function(w){var v=w.data,c=v.length,f=0,m=0,_=w.pts;if(_===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;m<c;)if(S.isHeader(v,m)){var x=S.appendFrame(this._audioTrack,v,m,_,f);if(x)m+=x.length,f++;else break}else m++},T.parseID3PES=function(w){if(w.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(w)},D}();a.minProbeByteLength=188;function o(D,T,k,w){return{key:D,frame:!1,pts:T,dts:k,units:[],debug:w,length:0}}function h(D,T){return(D[T+10]&31)<<8|D[T+11]}function l(D,T,k,w){var v={audio:-1,avc:-1,id3:-1,isAAC:!0},c=(D[T+1]&15)<<8|D[T+2],f=T+3+c-4,m=(D[T+10]&15)<<8|D[T+11];for(T+=12+m;T<f;){var _=(D[T+1]&31)<<8|D[T+2];switch(D[T]){case 207:if(!w){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:v.audio===-1&&(v.audio=_);break;case 21:v.id3===-1&&(v.id3=_);break;case 219:if(!w){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:v.avc===-1&&(v.avc=_);break;case 3:case 4:k?v.audio===-1&&(v.audio=_,v.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}T+=((D[T+3]&15)<<8|D[T+4])+5}return v}function n(D){var T=0,k,w,v,c,f,m=D.data;if(!D||D.size===0)return null;for(;m[0].length<19&&m.length>1;){var _=new Uint8Array(m[0].length+m[1].length);_.set(m[0]),_.set(m[1],m[0].length),m[0]=_,m.splice(1,1)}k=m[0];var x=(k[0]<<16)+(k[1]<<8)+k[2];if(x===1){if(w=(k[4]<<8)+k[5],w&&w>D.size-6)return null;var g=k[7];g&192&&(c=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,g&64?(f=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,c-f>60*9e4&&(i.logger.warn(Math.round((c-f)/9e4)+"s delta between PTS and DTS, align them"),c=f)):f=c),v=k[8];var j=v+9;if(D.size<=j)return null;D.size-=j;for(var U=new Uint8Array(D.size),R=0,W=m.length;R<W;R++){k=m[R];var H=k.byteLength;if(j)if(j>H){j-=H;continue}else k=k.subarray(j),H-=j,j=0;U.set(k,T),T+=H}return w&&(w-=v+3),{data:U,pts:c,dts:f,len:w}}return null}function s(D,T){if(D.units.length&&D.frame){if(D.pts===void 0){var k=T.samples,w=k.length;if(w){var v=k[w-1];D.pts=v.pts,D.dts=v.dts}else{T.dropped++;return}}T.samples.push(D)}D.debug.length&&i.logger.log(D.pts+"/"+D.dts+":"+D.debug)}function d(D,T){var k=D.length;if(k>0){if(T.pts>=D[k-1].pts)D.push(T);else for(var w=k-1;w>=0;w--)if(T.pts<D[w].pts){D.splice(w,0,T);break}}else D.push(T)}function E(D){for(var T=D.byteLength,k=[],w=1;w<T-2;)D[w]===0&&D[w+1]===0&&D[w+2]===3?(k.push(w+2),w+=2):w++;if(k.length===0)return D;var v=T-k.length,c=new Uint8Array(v),f=0;for(w=0;w<v;f++,w++)f===k[0]&&(f++,k.shift()),c[w]=D[f];return c}B.default=a},"./src/errors.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"ErrorTypes",function(){return F}),I.d(B,"ErrorDetails",function(){return S});var F;(function(C){C.NETWORK_ERROR="networkError",C.MEDIA_ERROR="mediaError",C.KEY_SYSTEM_ERROR="keySystemError",C.MUX_ERROR="muxError",C.OTHER_ERROR="otherError"})(F||(F={}));var S;(function(C){C.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",C.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",C.KEY_SYSTEM_NO_SESSION="keySystemNoSession",C.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",C.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",C.MANIFEST_LOAD_ERROR="manifestLoadError",C.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",C.MANIFEST_PARSING_ERROR="manifestParsingError",C.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",C.LEVEL_EMPTY_ERROR="levelEmptyError",C.LEVEL_LOAD_ERROR="levelLoadError",C.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",C.LEVEL_SWITCH_ERROR="levelSwitchError",C.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",C.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",C.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",C.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",C.FRAG_LOAD_ERROR="fragLoadError",C.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",C.FRAG_DECRYPT_ERROR="fragDecryptError",C.FRAG_PARSING_ERROR="fragParsingError",C.REMUX_ALLOC_ERROR="remuxAllocError",C.KEY_LOAD_ERROR="keyLoadError",C.KEY_LOAD_TIMEOUT="keyLoadTimeOut",C.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",C.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",C.BUFFER_APPEND_ERROR="bufferAppendError",C.BUFFER_APPENDING_ERROR="bufferAppendingError",C.BUFFER_STALLED_ERROR="bufferStalledError",C.BUFFER_FULL_ERROR="bufferFullError",C.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",C.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",C.INTERNAL_EXCEPTION="internalException",C.INTERNAL_ABORTED="aborted",C.UNKNOWN="unknown"})(S||(S={}))},"./src/events.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"Events",function(){return F});var F;(function(S){S.MEDIA_ATTACHING="hlsMediaAttaching",S.MEDIA_ATTACHED="hlsMediaAttached",S.MEDIA_DETACHING="hlsMediaDetaching",S.MEDIA_DETACHED="hlsMediaDetached",S.BUFFER_RESET="hlsBufferReset",S.BUFFER_CODECS="hlsBufferCodecs",S.BUFFER_CREATED="hlsBufferCreated",S.BUFFER_APPENDING="hlsBufferAppending",S.BUFFER_APPENDED="hlsBufferAppended",S.BUFFER_EOS="hlsBufferEos",S.BUFFER_FLUSHING="hlsBufferFlushing",S.BUFFER_FLUSHED="hlsBufferFlushed",S.MANIFEST_LOADING="hlsManifestLoading",S.MANIFEST_LOADED="hlsManifestLoaded",S.MANIFEST_PARSED="hlsManifestParsed",S.LEVEL_SWITCHING="hlsLevelSwitching",S.LEVEL_SWITCHED="hlsLevelSwitched",S.LEVEL_LOADING="hlsLevelLoading",S.LEVEL_LOADED="hlsLevelLoaded",S.LEVEL_UPDATED="hlsLevelUpdated",S.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",S.LEVELS_UPDATED="hlsLevelsUpdated",S.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",S.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",S.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",S.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",S.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",S.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",S.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",S.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",S.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",S.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",S.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",S.CUES_PARSED="hlsCuesParsed",S.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",S.INIT_PTS_FOUND="hlsInitPtsFound",S.FRAG_LOADING="hlsFragLoading",S.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",S.FRAG_LOADED="hlsFragLoaded",S.FRAG_DECRYPTED="hlsFragDecrypted",S.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",S.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",S.FRAG_PARSING_METADATA="hlsFragParsingMetadata",S.FRAG_PARSED="hlsFragParsed",S.FRAG_BUFFERED="hlsFragBuffered",S.FRAG_CHANGED="hlsFragChanged",S.FPS_DROP="hlsFpsDrop",S.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",S.ERROR="hlsError",S.DESTROYING="hlsDestroying",S.KEY_LOADING="hlsKeyLoading",S.KEY_LOADED="hlsKeyLoaded",S.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",S.BACK_BUFFER_REACHED="hlsBackBufferReached"})(F||(F={}))},"./src/hls.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return D});var F=I("./node_modules/url-toolkit/src/url-toolkit.js"),S=I.n(F),C=I("./src/loader/playlist-loader.ts"),P=I("./src/loader/key-loader.ts"),y=I("./src/controller/id3-track-controller.ts"),t=I("./src/controller/latency-controller.ts"),b=I("./src/controller/level-controller.ts"),i=I("./src/controller/fragment-tracker.ts"),u=I("./src/controller/stream-controller.ts"),p=I("./src/is-supported.ts"),a=I("./src/utils/logger.ts"),o=I("./src/config.ts"),h=I("./node_modules/eventemitter3/index.js"),l=I.n(h),n=I("./src/events.ts"),s=I("./src/errors.ts");function d(T,k){for(var w=0;w<k.length;w++){var v=k[w];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(T,v.key,v)}}function E(T,k,w){return k&&d(T.prototype,k),w&&d(T,w),T}var D=function(){T.isSupported=function(){return Object(p.isSupported)()};function T(w){w===void 0&&(w={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var v=this.config=Object(o.mergeConfig)(T.DefaultConfig,w);this.userConfig=w,Object(a.enableLogs)(v.debug),this._autoLevelCapping=-1,v.progressive&&Object(o.enableStreamingMode)(v);var c=v.abrController,f=v.bufferController,m=v.capLevelController,_=v.fpsController,x=this.abrController=new c(this),g=this.bufferController=new f(this),j=this.capLevelController=new m(this),U=new _(this),R=new C.default(this),W=new P.default(this),H=new y.default(this),L=this.levelController=new b.default(this),G=new i.FragmentTracker(this),z=this.streamController=new u.default(this,G);j.setStreamController(z),U.setStreamController(z);var J=[L,z];this.networkControllers=J;var te=[R,W,x,g,j,U,H,G];this.audioTrackController=this.createController(v.audioTrackController,null,J),this.createController(v.audioStreamController,G,J),this.subtitleTrackController=this.createController(v.subtitleTrackController,null,J),this.createController(v.subtitleStreamController,G,J),this.createController(v.timelineController,null,te),this.emeController=this.createController(v.emeController,null,te),this.cmcdController=this.createController(v.cmcdController,null,te),this.latencyController=this.createController(t.default,null,te),this.coreComponents=te}var k=T.prototype;return k.createController=function(v,c,f){if(v){var m=c?new v(this,c):new v(this);return f&&f.push(m),m}return null},k.on=function(v,c,f){f===void 0&&(f=this),this._emitter.on(v,c,f)},k.once=function(v,c,f){f===void 0&&(f=this),this._emitter.once(v,c,f)},k.removeAllListeners=function(v){this._emitter.removeAllListeners(v)},k.off=function(v,c,f,m){f===void 0&&(f=this),this._emitter.off(v,c,f,m)},k.listeners=function(v){return this._emitter.listeners(v)},k.emit=function(v,c,f){return this._emitter.emit(v,c,f)},k.trigger=function(v,c){if(this.config.debug)return this.emit(v,v,c);try{return this.emit(v,v,c)}catch(f){a.logger.error("An internal error happened while handling event "+v+'. Error message: "'+f.message+'". Here is a stacktrace:',f),this.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:v,error:f})}return!1},k.listenerCount=function(v){return this._emitter.listenerCount(v)},k.destroy=function(){a.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(v){return v.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(v){return v.destroy()}),this.coreComponents.length=0},k.attachMedia=function(v){a.logger.log("attachMedia"),this._media=v,this.trigger(n.Events.MEDIA_ATTACHING,{media:v})},k.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(v){this.stopLoad();var c=this.media,f=this.url,m=this.url=F.buildAbsoluteURL(self.location.href,v,{alwaysNormalize:!0});a.logger.log("loadSource:"+m),c&&f&&f!==m&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(c)),this.trigger(n.Events.MANIFEST_LOADING,{url:v})},k.startLoad=function(v){v===void 0&&(v=-1),a.logger.log("startLoad("+v+")"),this.networkControllers.forEach(function(c){c.startLoad(v)})},k.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(v){v.stopLoad()})},k.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){a.logger.log("recoverMediaError");var v=this._media;this.detachMedia(),v&&this.attachMedia(v)},k.removeLevel=function(v,c){c===void 0&&(c=0),this.levelController.removeLevel(v,c)},E(T,[{key:"levels",get:function(){var v=this.levelController.levels;return v||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(v){a.logger.log("set currentLevel:"+v),this.loadLevel=v,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(v){a.logger.log("set nextLevel:"+v),this.levelController.manualLevel=v,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(v){a.logger.log("set loadLevel:"+v),this.levelController.manualLevel=v}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(v){this.levelController.nextLoadLevel=v}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(v){a.logger.log("set firstLevel:"+v),this.levelController.firstLevel=v}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(v){a.logger.log("set startLevel:"+v),v!==-1&&(v=Math.max(v,this.minAutoLevel)),this.levelController.startLevel=v}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(v){var c=!!v;c!==this.config.capLevelToPlayerSize&&(c?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=c)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(v){this._autoLevelCapping!==v&&(a.logger.log("set autoLevelCapping:"+v),this._autoLevelCapping=v)}},{key:"bandwidthEstimate",get:function(){var v=this.abrController.bwEstimator;return v?v.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var v=this.levels,c=this.config.minAutoBitrate;if(!v)return 0;for(var f=v.length,m=0;m<f;m++)if(v[m].maxBitrate>c)return m;return 0}},{key:"maxAutoLevel",get:function(){var v=this.levels,c=this.autoLevelCapping,f;return c===-1&&v&&v.length?f=v.length-1:f=c,f}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(v){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,v)}},{key:"audioTracks",get:function(){var v=this.audioTrackController;return v?v.audioTracks:[]}},{key:"audioTrack",get:function(){var v=this.audioTrackController;return v?v.audioTrack:-1},set:function(v){var c=this.audioTrackController;c&&(c.audioTrack=v)}},{key:"subtitleTracks",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTrack:-1},set:function(v){var c=this.subtitleTrackController;c&&(c.subtitleTrack=v)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var v=this.subtitleTrackController;return v?v.subtitleDisplay:!1},set:function(v){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=v)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(v){this.config.lowLatencyMode=v}},{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 n.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return T.defaultConfig?T.defaultConfig:o.hlsDefaultConfig},set:function(v){T.defaultConfig=v}}]),T}();D.defaultConfig=void 0},"./src/is-supported.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"isSupported",function(){return C}),I.d(B,"changeTypeSupported",function(){return P});var F=I("./src/utils/mediasource-helper.ts");function S(){return self.SourceBuffer||self.WebKitSourceBuffer}function C(){var y=Object(F.getMediaSource)();if(!y)return!1;var t=S(),b=y&&typeof y.isTypeSupported=="function"&&y.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!b&&!!i}function P(){var y,t=S();return typeof(t==null||((y=t.prototype)===null||y===void 0)?void 0:y.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a}),I.d(B,"LoadError",function(){return h});var F=I("./src/polyfills/number.ts"),S=I("./src/errors.ts");function C(l,n){l.prototype=Object.create(n.prototype),l.prototype.constructor=l,i(l,n)}function P(l){var n=typeof Map=="function"?new Map:void 0;return P=function(d){if(d===null||!b(d))return d;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(d))return n.get(d);n.set(d,E)}function E(){return y(d,arguments,u(this).constructor)}return E.prototype=Object.create(d.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),i(E,d)},P(l)}function y(l,n,s){return t()?y=Reflect.construct:y=function(E,D,T){var k=[null];k.push.apply(k,D);var w=Function.bind.apply(E,k),v=new w;return T&&i(v,T.prototype),v},y.apply(null,arguments)}function t(){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 b(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function i(l,n){return i=Object.setPrototypeOf||function(d,E){return d.__proto__=E,d},i(l,n)}function u(l){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(l)}var p=Math.pow(2,17),a=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var n=l.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(d,E){var D=this,T=d.url;if(!T)return Promise.reject(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,networkDetails:null},"Fragment does not have a "+(T?"part list":"url")));this.abort();var k=this.config,w=k.fLoader,v=k.loader;return new Promise(function(c,f){D.loader&&D.loader.destroy();var m=D.loader=d.loader=w?new w(k):new v(k),_=o(d),x={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:p};d.stats=m.stats,m.load(_,x,{onSuccess:function(j,U,R,W){D.resetLoader(d,m),c({frag:d,part:null,payload:j.data,networkDetails:W})},onError:function(j,U,R){D.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,response:j,networkDetails:R}))},onAbort:function(j,U,R){D.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,networkDetails:R}))},onTimeout:function(j,U,R){D.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,networkDetails:R}))},onProgress:function(j,U,R,W){E&&E({frag:d,part:null,payload:R,networkDetails:W})}})})},n.loadPart=function(d,E,D){var T=this;this.abort();var k=this.config,w=k.fLoader,v=k.loader;return new Promise(function(c,f){T.loader&&T.loader.destroy();var m=T.loader=d.loader=w?new w(k):new v(k),_=o(d,E),x={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:p};E.stats=m.stats,m.load(_,x,{onSuccess:function(j,U,R,W){T.resetLoader(d,m),T.updateStatsFromPart(d,E);var H={frag:d,part:E,payload:j.data,networkDetails:W};D(H),c(H)},onError:function(j,U,R){T.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,part:E,response:j,networkDetails:R}))},onAbort:function(j,U,R){d.stats.aborted=E.stats.aborted,T.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,part:E,networkDetails:R}))},onTimeout:function(j,U,R){T.resetLoader(d,m),f(new h({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,part:E,networkDetails:R}))}})})},n.updateStatsFromPart=function(d,E){var D=d.stats,T=E.stats,k=T.total;if(D.loaded+=T.loaded,k){var w=Math.round(d.duration/E.duration),v=Math.min(Math.round(D.loaded/k),w),c=w-v,f=c*Math.round(D.loaded/v);D.total=D.loaded+f}else D.total=Math.max(D.loaded,D.total);var m=D.loading,_=T.loading;m.start?m.first+=_.first-_.start:(m.start=_.start,m.first=_.first),m.end=_.end},n.resetLoader=function(d,E){d.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},l}();function o(l,n){n===void 0&&(n=null);var s=n||l,d={frag:l,part:n,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},E=s.byteRangeStartOffset,D=s.byteRangeEndOffset;return Object(F.isFiniteNumber)(E)&&Object(F.isFiniteNumber)(D)&&(d.rangeStart=E,d.rangeEnd=D),d}var h=function(l){C(n,l);function n(s){for(var d,E=arguments.length,D=new Array(E>1?E-1:0),T=1;T<E;T++)D[T-1]=arguments[T];return d=l.call.apply(l,[this].concat(D))||this,d.data=void 0,d.data=s,d}return n}(P(Error))},"./src/loader/fragment.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"ElementaryStreamTypes",function(){return a}),I.d(B,"BaseSegment",function(){return o}),I.d(B,"Fragment",function(){return h}),I.d(B,"Part",function(){return l});var F=I("./src/polyfills/number.ts"),S=I("./node_modules/url-toolkit/src/url-toolkit.js"),C=I.n(S),P=I("./src/utils/logger.ts"),y=I("./src/loader/level-key.ts"),t=I("./src/loader/load-stats.ts");function b(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,i(n,s)}function i(n,s){return i=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},i(n,s)}function u(n,s){for(var d=0;d<s.length;d++){var E=s[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}function p(n,s,d){return s&&u(n.prototype,s),d&&u(n,d),n}var a;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(a||(a={}));var o=function(){function n(d){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[a.AUDIO]=null,E[a.VIDEO]=null,E[a.AUDIOVIDEO]=null,E),this.baseurl=d}var s=n.prototype;return s.setByteRange=function(E,D){var T=E.split("@",2),k=[];T.length===1?k[0]=D?D.byteRangeEndOffset:0:k[0]=parseInt(T[1]),k[1]=parseInt(T[0])+k[0],this._byteRange=k},p(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(S.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),n}(),h=function(n){b(s,n);function s(E,D){var T;return T=n.call(this,D)||this,T._decryptdata=null,T.rawProgramDateTime=null,T.programDateTime=null,T.tagList=[],T.duration=0,T.sn=0,T.levelkey=void 0,T.type=void 0,T.loader=null,T.level=-1,T.cc=0,T.startPTS=void 0,T.endPTS=void 0,T.appendedPTS=void 0,T.startDTS=void 0,T.endDTS=void 0,T.start=0,T.deltaPTS=void 0,T.maxStartPTS=void 0,T.minEndPTS=void 0,T.stats=new t.LoadStats,T.urlId=0,T.data=void 0,T.bitrateTest=!1,T.title=null,T.initSegment=null,T.type=E,T}var d=s.prototype;return d.createInitializationVector=function(D){for(var T=new Uint8Array(16),k=12;k<16;k++)T[k]=D>>8*(15-k)&255;return T},d.setDecryptDataFromLevelKey=function(D,T){var k=D;return(D==null?void 0:D.method)==="AES-128"&&D.uri&&!D.iv&&(k=y.LevelKey.fromURI(D.uri),k.method=D.method,k.iv=this.createInitializationVector(T),k.keyFormat="identity"),k},d.setElementaryStreamInfo=function(D,T,k,w,v,c){c===void 0&&(c=!1);var f=this.elementaryStreams,m=f[D];if(!m){f[D]={startPTS:T,endPTS:k,startDTS:w,endDTS:v,partial:c};return}m.startPTS=Math.min(m.startPTS,T),m.endPTS=Math.max(m.endPTS,k),m.startDTS=Math.min(m.startDTS,w),m.endDTS=Math.max(m.endDTS,v)},d.clearElementaryStreamInfo=function(){var D=this.elementaryStreams;D[a.AUDIO]=null,D[a.VIDEO]=null,D[a.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var D=this.sn;typeof D!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&P.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),D=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,D)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(F.isFiniteNumber)(this.programDateTime))return null;var D=Object(F.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+D*1e3}},{key:"encrypted",get:function(){var D;return!!((D=this.decryptdata)!==null&&D!==void 0&&D.keyFormat&&this.decryptdata.uri)}}]),s}(o),l=function(n){b(s,n);function s(d,E,D,T,k){var w;w=n.call(this,D)||this,w.fragOffset=0,w.duration=0,w.gap=!1,w.independent=!1,w.relurl=void 0,w.fragment=void 0,w.index=void 0,w.stats=new t.LoadStats,w.duration=d.decimalFloatingPoint("DURATION"),w.gap=d.bool("GAP"),w.independent=d.bool("INDEPENDENT"),w.relurl=d.enumeratedString("URI"),w.fragment=E,w.index=T;var v=d.enumeratedString("BYTERANGE");return v&&w.setByteRange(v,k),k&&(w.fragOffset=k.fragOffset+k.duration),w}return p(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 E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),s}(o)},"./src/loader/key-loader.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return P});var F=I("./src/events.ts"),S=I("./src/errors.ts"),C=I("./src/utils/logger.ts"),P=function(){function y(b){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=b,this._registerListeners()}var t=y.prototype;return t._registerListeners=function(){this.hls.on(F.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(F.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var u=this.loaders[i];u&&u.destroy()}this.loaders={}},t.onKeyLoading=function(i,u){var p=u.frag,a=p.type,o=this.loaders[a];if(!p.decryptdata){C.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=p.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(o&&(C.logger.warn("abort previous key loader for type:"+a),o.abort()),!h){C.logger.warn("key uri is falsy");return}var n=l.loader,s=p.loader=this.loaders[a]=new n(l);this.decrypturl=h,this.decryptkey=null;var d={url:h,frag:p,responseType:"arraybuffer"},E={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},D={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(d,E,D)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(F.Events.KEY_LOADED,{frag:p}))},t.loadsuccess=function(i,u,p){var a=p.frag;if(!a.decryptdata){C.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(i.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(F.Events.KEY_LOADED,{frag:a})},t.loaderror=function(i,u){var p=u.frag,a=p.loader;a&&a.abort(),delete this.loaders[p.type],this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:i})},t.loadtimeout=function(i,u){var p=u.frag,a=p.loader;a&&a.abort(),delete this.loaders[p.type],this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},y}()},"./src/loader/level-details.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"LevelDetails",function(){return y});var F=I("./src/polyfills/number.ts");function S(t,b){for(var i=0;i<b.length;i++){var u=b[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function C(t,b,i){return b&&S(t.prototype,b),i&&S(t,i),t}var P=10,y=function(){function t(i){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=i}var b=t.prototype;return b.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-u.lastPartSn,a=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!a||!!p,this.advanced=this.endSN>u.endSN||p>0||p===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},C(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(F.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||P}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var p=this.driftEnd-this.driftStart;return p*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.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 u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),t}()},"./src/loader/level-key.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"LevelKey",function(){return y});var F=I("./node_modules/url-toolkit/src/url-toolkit.js"),S=I.n(F);function C(t,b){for(var i=0;i<b.length;i++){var u=b[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function P(t,b,i){return b&&C(t.prototype,b),i&&C(t,i),t}var y=function(){t.fromURL=function(i,u){return new t(i,u)},t.fromURI=function(i){return new t(i)};function t(b,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(F.buildAbsoluteURL)(b,i,{alwaysNormalize:!0}):this._uri=b}return P(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"LoadStats",function(){return F});var F=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return s});var F=I("./src/polyfills/number.ts"),S=I("./node_modules/url-toolkit/src/url-toolkit.js"),C=I.n(S),P=I("./src/loader/fragment.ts"),y=I("./src/loader/level-details.ts"),t=I("./src/loader/level-key.ts"),b=I("./src/utils/attr-list.ts"),i=I("./src/utils/logger.ts"),u=I("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,a=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function n(k){var w,v;return l.test((w=(v=S.parseURL(k))===null||v===void 0?void 0:v.path)!=null?w:"")}var s=function(){function k(){}return k.findGroup=function(v,c){for(var f=0;f<v.length;f++){var m=v[f];if(m.id===c)return m}},k.convertAVC1ToAVCOTI=function(v){var c=v.split(".");if(c.length>2){var f=c.shift()+".";return f+=parseInt(c.shift()).toString(16),f+=("000"+parseInt(c.shift()).toString(16)).substr(-4),f}return v},k.resolve=function(v,c){return S.buildAbsoluteURL(c,v,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(v,c){var f=[],m={},_=!1;p.lastIndex=0;for(var x;(x=p.exec(v))!=null;)if(x[1]){var g=new b.AttrList(x[1]),j={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:k.resolve(x[2],c)},U=g.decimalResolution("RESOLUTION");U&&(j.width=U.width,j.height=U.height),d((g.CODECS||"").split(/[ ,]+/).filter(function(W){return W}),j),j.videoCodec&&j.videoCodec.indexOf("avc1")!==-1&&(j.videoCodec=k.convertAVC1ToAVCOTI(j.videoCodec)),f.push(j)}else if(x[3]){var R=new b.AttrList(x[3]);R["DATA-ID"]&&(_=!0,m[R["DATA-ID"]]=R)}return{levels:f,sessionData:_?m:null}},k.parseMasterPlaylistMedia=function(v,c,f,m){m===void 0&&(m=[]);var _,x=[],g=0;for(a.lastIndex=0;(_=a.exec(v))!==null;){var j=new b.AttrList(_[1]);if(j.TYPE===f){var U={attrs:j,bitrate:0,id:g++,groupId:j["GROUP-ID"],instreamId:j["INSTREAM-ID"],name:j.NAME||j.LANGUAGE||"",type:f,default:j.bool("DEFAULT"),autoselect:j.bool("AUTOSELECT"),forced:j.bool("FORCED"),lang:j.LANGUAGE,url:j.URI?k.resolve(j.URI,c):""};if(m.length){var R=k.findGroup(m,U.groupId)||m[0];E(U,R,"audioCodec"),E(U,R,"textCodec")}x.push(U)}}return x},k.parseLevelPlaylist=function(v,c,f,m,_){var x=new y.LevelDetails(c),g=x.fragments,j=null,U=0,R=0,W=0,H=0,L=null,G=new P.Fragment(m,c),z,J,te,_e=-1,ce=!1;for(o.lastIndex=0,x.m3u8=v;(z=o.exec(v))!==null;){ce&&(ce=!1,G=new P.Fragment(m,c),G.start=W,G.sn=U,G.cc=H,G.level=f,j&&(G.initSegment=j,G.rawProgramDateTime=j.rawProgramDateTime));var xe=z[1];if(xe){G.duration=parseFloat(xe);var Te=(" "+z[2]).slice(1);G.title=Te||null,G.tagList.push(Te?["INF",xe,Te]:["INF",xe])}else if(z[3])Object(F.isFiniteNumber)(G.duration)&&(G.start=W,te&&(G.levelkey=te),G.sn=U,G.level=f,G.cc=H,G.urlId=_,g.push(G),G.relurl=(" "+z[3]).slice(1),T(G,L),L=G,W+=G.duration,U++,R=0,ce=!0);else if(z[4]){var je=(" "+z[4]).slice(1);L?G.setByteRange(je,L):G.setByteRange(je)}else if(z[5])G.rawProgramDateTime=(" "+z[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),_e===-1&&(_e=g.length);else{if(z=z[0].match(h),!z){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(J=1;J<z.length&&!(typeof z[J]!="undefined");J++);var Ce=(" "+z[J]).slice(1),Z=(" "+z[J+1]).slice(1),K=z[J+2]?(" "+z[J+2]).slice(1):"";switch(Ce){case"PLAYLIST-TYPE":x.type=Z.toUpperCase();break;case"MEDIA-SEQUENCE":U=x.startSN=parseInt(Z);break;case"SKIP":{var V=new b.AttrList(Z),$=V.decimalInteger("SKIPPED-SEGMENTS");if(Object(F.isFiniteNumber)($)){x.skippedSegments=$;for(var q=$;q--;)g.unshift(null);U+=$}var Q=V.enumeratedString("RECENTLY-REMOVED-DATERANGES");Q&&(x.recentlyRemovedDateranges=Q.split(" "));break}case"TARGETDURATION":x.targetduration=parseFloat(Z);break;case"VERSION":x.version=parseInt(Z);break;case"EXTM3U":break;case"ENDLIST":x.live=!1;break;case"#":(Z||K)&&G.tagList.push(K?[Z,K]:[Z]);break;case"DIS":H++;case"GAP":G.tagList.push([Ce]);break;case"BITRATE":G.tagList.push([Ce,Z]);break;case"DISCONTINUITY-SEQ":H=parseInt(Z);break;case"KEY":{var ge,Oe=new b.AttrList(Z),Ye=Oe.enumeratedString("METHOD"),le=Oe.URI,Ee=Oe.hexadecimalInteger("IV"),Re=Oe.enumeratedString("KEYFORMATVERSIONS"),He=Oe.enumeratedString("KEYID"),et=(ge=Oe.enumeratedString("KEYFORMAT"))!=null?ge:"identity",ut=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ut.indexOf(et)>-1){i.logger.warn("Keyformat "+et+" is not supported from the manifest");continue}else if(et!=="identity")continue;Ye&&(te=t.LevelKey.fromURL(c,le),le&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ye)>=0&&(te.method=Ye,te.keyFormat=et,He&&(te.keyID=He),Re&&(te.keyFormatVersions=Re),te.iv=Ee));break}case"START":{var Dt=new b.AttrList(Z),We=Dt.decimalFloatingPoint("TIME-OFFSET");Object(F.isFiniteNumber)(We)&&(x.startTimeOffset=We);break}case"MAP":{var Mt=new b.AttrList(Z);G.relurl=Mt.URI,Mt.BYTERANGE&&G.setByteRange(Mt.BYTERANGE),G.level=f,G.sn="initSegment",te&&(G.levelkey=te),G.initSegment=null,j=G,ce=!0;break}case"SERVER-CONTROL":{var Wt=new b.AttrList(Z);x.canBlockReload=Wt.bool("CAN-BLOCK-RELOAD"),x.canSkipUntil=Wt.optionalFloat("CAN-SKIP-UNTIL",0),x.canSkipDateRanges=x.canSkipUntil>0&&Wt.bool("CAN-SKIP-DATERANGES"),x.partHoldBack=Wt.optionalFloat("PART-HOLD-BACK",0),x.holdBack=Wt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ne=new b.AttrList(Z);x.partTarget=Ne.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=x.partList;Pe||(Pe=x.partList=[]);var it=R>0?Pe[Pe.length-1]:void 0,gt=R++,fe=new P.Part(new b.AttrList(Z),G,c,gt,it);Pe.push(fe),G.duration+=fe.duration;break}case"PRELOAD-HINT":{var ae=new b.AttrList(Z);x.preloadHint=ae;break}case"RENDITION-REPORT":{var se=new b.AttrList(Z);x.renditionReports=x.renditionReports||[],x.renditionReports.push(se);break}default:i.logger.warn("line parsed but not handled: "+z);break}}}L&&!L.relurl?(g.pop(),W-=L.duration,x.partList&&(x.fragmentHint=L)):x.partList&&(T(G,L),G.cc=H,x.fragmentHint=G);var de=g.length,ve=g[0],ie=g[de-1];if(W+=x.skippedSegments*x.targetduration,W>0&&de&&ie){x.averagetargetduration=W/de;var oe=ie.sn;x.endSN=oe!=="initSegment"?oe:0,ve&&(x.startCC=ve.cc,ve.initSegment||x.fragments.every(function(pe){return pe.relurl&&n(pe.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new P.Fragment(m,c),G.relurl=ie.relurl,G.level=f,G.sn="initSegment",ve.initSegment=G,x.needSidxRanges=!0))}else x.endSN=0,x.startCC=0;return x.fragmentHint&&(W+=x.fragmentHint.duration),x.totalduration=W,x.endCC=H,_e>0&&D(g,_e),x},k}();function d(k,w){["video","audio","text"].forEach(function(v){var c=k.filter(function(m){return Object(u.isCodecType)(m,v)});if(c.length){var f=c.filter(function(m){return m.lastIndexOf("avc1",0)===0||m.lastIndexOf("mp4a",0)===0});w[v+"Codec"]=f.length>0?f[0]:c[0],k=k.filter(function(m){return c.indexOf(m)===-1})}}),w.unknownCodecs=k}function E(k,w,v){var c=w[v];c&&(k[v]=c)}function D(k,w){for(var v=k[w],c=w;c--;){var f=k[c];if(!f)return;f.programDateTime=v.programDateTime-f.duration*1e3,v=f}}function T(k,w){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):w!=null&&w.programDateTime&&(k.programDateTime=w.endProgramDateTime),Object(F.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),S=I("./src/events.ts"),C=I("./src/errors.ts"),P=I("./src/utils/logger.ts"),y=I("./src/utils/mp4-tools.ts"),t=I("./src/loader/m3u8-parser.ts"),b=I("./src/types/loader.ts"),i=I("./src/utils/attr-list.ts");function u(o){var h=o.type;switch(h){case b.PlaylistContextType.AUDIO_TRACK:return b.PlaylistLevelType.AUDIO;case b.PlaylistContextType.SUBTITLE_TRACK:return b.PlaylistLevelType.SUBTITLE;default:return b.PlaylistLevelType.MAIN}}function p(o,h){var l=o.url;return(l===void 0||l.indexOf("data:")===0)&&(l=h.url),l}var a=function(){function o(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var h=o.prototype;return h.registerListeners=function(){var n=this.hls;n.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(n){var s=this.hls.config,d=s.pLoader,E=s.loader,D=d||E,T=new D(s);return n.loader=T,this.loaders[n.type]=T,T},h.getInternalLoader=function(n){return this.loaders[n.type]},h.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},h.destroyInternalLoaders=function(){for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy(),this.resetInternalLoader(n)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(n,s){var d=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:b.PlaylistContextType.MANIFEST,url:d,deliveryDirectives:null})},h.onLevelLoading=function(n,s){var d=s.id,E=s.level,D=s.url,T=s.deliveryDirectives;this.load({id:d,groupId:null,level:E,responseType:"text",type:b.PlaylistContextType.LEVEL,url:D,deliveryDirectives:T})},h.onAudioTrackLoading=function(n,s){var d=s.id,E=s.groupId,D=s.url,T=s.deliveryDirectives;this.load({id:d,groupId:E,level:null,responseType:"text",type:b.PlaylistContextType.AUDIO_TRACK,url:D,deliveryDirectives:T})},h.onSubtitleTrackLoading=function(n,s){var d=s.id,E=s.groupId,D=s.url,T=s.deliveryDirectives;this.load({id:d,groupId:E,level:null,responseType:"text",type:b.PlaylistContextType.SUBTITLE_TRACK,url:D,deliveryDirectives:T})},h.load=function(n){var s,d=this.hls.config,E=this.getInternalLoader(n);if(E){var D=E.context;if(D&&D.url===n.url){P.logger.trace("[playlist-loader]: playlist request ongoing");return}P.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),E.abort()}var T,k,w,v;switch(n.type){case b.PlaylistContextType.MANIFEST:T=d.manifestLoadingMaxRetry,k=d.manifestLoadingTimeOut,w=d.manifestLoadingRetryDelay,v=d.manifestLoadingMaxRetryTimeout;break;case b.PlaylistContextType.LEVEL:case b.PlaylistContextType.AUDIO_TRACK:case b.PlaylistContextType.SUBTITLE_TRACK:T=0,k=d.levelLoadingTimeOut;break;default:T=d.levelLoadingMaxRetry,k=d.levelLoadingTimeOut,w=d.levelLoadingRetryDelay,v=d.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(n),(s=n.deliveryDirectives)!==null&&s!==void 0&&s.part){var c;if(n.type===b.PlaylistContextType.LEVEL&&n.level!==null?c=this.hls.levels[n.level].details:n.type===b.PlaylistContextType.AUDIO_TRACK&&n.id!==null?c=this.hls.audioTracks[n.id].details:n.type===b.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(c=this.hls.subtitleTracks[n.id].details),c){var f=c.partTarget,m=c.targetduration;f&&m&&(k=Math.min(Math.max(f*3,m*.8)*1e3,k))}}var _={timeout:k,maxRetry:T,retryDelay:w,maxRetryDelay:v,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(n,_,x)},h.loadsuccess=function(n,s,d,E){if(E===void 0&&(E=null),d.isSidxRequest){this.handleSidxRequest(n,d),this.handlePlaylistLoaded(n,s,d,E);return}this.resetInternalLoader(d.type);var D=n.data;if(D.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,d,"no EXTM3U delimiter",E);return}s.parsing.start=performance.now(),D.indexOf("#EXTINF:")>0||D.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,s,d,E):this.handleMasterPlaylist(n,s,d,E)},h.loaderror=function(n,s,d){d===void 0&&(d=null),this.handleNetworkError(s,d,!1,n)},h.loadtimeout=function(n,s,d){d===void 0&&(d=null),this.handleNetworkError(s,d,!0)},h.handleMasterPlaylist=function(n,s,d,E){var D=this.hls,T=n.data,k=p(n,d),w=t.default.parseMasterPlaylist(T,k),v=w.levels,c=w.sessionData;if(!v.length){this.handleManifestParsingError(n,d,"no level found in manifest",E);return}var f=v.map(function(U){return{id:U.attrs.AUDIO,audioCodec:U.audioCodec}}),m=v.map(function(U){return{id:U.attrs.SUBTITLES,textCodec:U.textCodec}}),_=t.default.parseMasterPlaylistMedia(T,k,"AUDIO",f),x=t.default.parseMasterPlaylistMedia(T,k,"SUBTITLES",m),g=t.default.parseMasterPlaylistMedia(T,k,"CLOSED-CAPTIONS");if(_.length){var j=_.some(function(U){return!U.url});!j&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(P.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),_.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new i.AttrList({}),bitrate:0,url:""}))}D.trigger(S.Events.MANIFEST_LOADED,{levels:v,audioTracks:_,subtitles:x,captions:g,url:k,stats:s,networkDetails:E,sessionData:c})},h.handleTrackOrLevelPlaylist=function(n,s,d,E){var D=this.hls,T=d.id,k=d.level,w=d.type,v=p(n,d),c=Object(F.isFiniteNumber)(T)?T:0,f=Object(F.isFiniteNumber)(k)?k:c,m=u(d),_=t.default.parseLevelPlaylist(n.data,v,f,m,c);if(!_.fragments.length){D.trigger(S.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:v,reason:"no fragments found in level",level:typeof d.level=="number"?d.level:void 0});return}if(w===b.PlaylistContextType.MANIFEST){var x={attrs:new i.AttrList({}),bitrate:0,details:_,name:"",url:v};D.trigger(S.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:v,stats:s,networkDetails:E,sessionData:null})}if(s.parsing.end=performance.now(),_.needSidxRanges){var g,j=(g=_.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:j,isSidxRequest:!0,type:w,level:k,levelDetails:_,id:T,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}d.levelDetails=_,this.handlePlaylistLoaded(n,s,d,E)},h.handleSidxRequest=function(n,s){var d=Object(y.parseSegmentIndex)(new Uint8Array(n.data));if(!d)return;var E=d.references,D=s.levelDetails;E.forEach(function(T,k){var w=T.info,v=D.fragments[k];v.byteRange.length===0&&v.setByteRange(String(1+w.end-w.start)+"@"+String(w.start)),v.initSegment&&v.initSegment.setByteRange(String(d.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(n,s,d,E){this.hls.trigger(S.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===b.PlaylistContextType.MANIFEST,url:n.url,reason:d,response:n,context:s,networkDetails:E})},h.handleNetworkError=function(n,s,d,E){d===void 0&&(d=!1),P.logger.warn("[playlist-loader]: A network "+(d?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var D=C.ErrorDetails.UNKNOWN,T=!1,k=this.getInternalLoader(n);switch(n.type){case b.PlaylistContextType.MANIFEST:D=d?C.ErrorDetails.MANIFEST_LOAD_TIMEOUT:C.ErrorDetails.MANIFEST_LOAD_ERROR,T=!0;break;case b.PlaylistContextType.LEVEL:D=d?C.ErrorDetails.LEVEL_LOAD_TIMEOUT:C.ErrorDetails.LEVEL_LOAD_ERROR,T=!1;break;case b.PlaylistContextType.AUDIO_TRACK:D=d?C.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:C.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,T=!1;break;case b.PlaylistContextType.SUBTITLE_TRACK:D=d?C.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:C.ErrorDetails.SUBTITLE_LOAD_ERROR,T=!1;break}k&&this.resetInternalLoader(n.type);var w={type:C.ErrorTypes.NETWORK_ERROR,details:D,fatal:T,url:n.url,loader:k,context:n,networkDetails:s};E&&(w.response=E),this.hls.trigger(S.Events.ERROR,w)},h.handlePlaylistLoaded=function(n,s,d,E){var D=d.type,T=d.level,k=d.id,w=d.groupId,v=d.loader,c=d.levelDetails,f=d.deliveryDirectives;if(!(c!=null&&c.targetduration)){this.handleManifestParsingError(n,d,"invalid target duration",E);return}if(!v)return;c.live&&(v.getCacheAge&&(c.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(c.ageHeader))&&(c.ageHeader=0));switch(D){case b.PlaylistContextType.MANIFEST:case b.PlaylistContextType.LEVEL:this.hls.trigger(S.Events.LEVEL_LOADED,{details:c,level:T||0,id:k||0,stats:s,networkDetails:E,deliveryDirectives:f});break;case b.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(S.Events.AUDIO_TRACK_LOADED,{details:c,id:k||0,groupId:w||"",stats:s,networkDetails:E,deliveryDirectives:f});break;case b.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(S.Events.SUBTITLE_TRACK_LOADED,{details:c,id:k||0,groupId:w||"",stats:s,networkDetails:E,deliveryDirectives:f});break}},o}();B.default=a},"./src/polyfills/number.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"isFiniteNumber",function(){return F}),I.d(B,"MAX_SAFE_INTEGER",function(){return S});var F=Number.isFinite||function(C){return typeof C=="number"&&isFinite(C)},S=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(X,B,I){"use strict";I.r(B);var F=function(){function S(){}return S.getSilentFrame=function(P,y){switch(P){case"mp4a.40.2":if(y===1)return new Uint8Array([0,200,0,128,35,128]);if(y===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(y===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(y===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(y===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(y===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(y===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(y===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(y===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},S}();B.default=F},"./src/remux/mp4-generator.ts":function(X,B,I){"use strict";I.r(B);var F=Math.pow(2,32)-1,S=function(){function C(){}return C.init=function(){C.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 y;for(y in C.types)C.types.hasOwnProperty(y)&&(C.types[y]=[y.charCodeAt(0),y.charCodeAt(1),y.charCodeAt(2),y.charCodeAt(3)]);var t=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]),b=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]);C.HDLR_TYPES={video:t,audio:b};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);C.STTS=C.STSC=C.STCO=u,C.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),C.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),C.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),C.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);C.FTYP=C.box(C.types.ftyp,p,o,p,a),C.DINF=C.box(C.types.dinf,C.box(C.types.dref,i))},C.box=function(y){for(var t=8,b=arguments.length,i=new Array(b>1?b-1:0),u=1;u<b;u++)i[u-1]=arguments[u];for(var p=i.length,a=p;p--;)t+=i[p].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=t&255,o.set(y,4),p=0,t=8;p<a;p++)o.set(i[p],t),t+=i[p].byteLength;return o},C.hdlr=function(y){return C.box(C.types.hdlr,C.HDLR_TYPES[y])},C.mdat=function(y){return C.box(C.types.mdat,y)},C.mdhd=function(y,t){t*=y;var b=Math.floor(t/(F+1)),i=Math.floor(t%(F+1));return C.box(C.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,y>>24&255,y>>16&255,y>>8&255,y&255,b>>24,b>>16&255,b>>8&255,b&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},C.mdia=function(y){return C.box(C.types.mdia,C.mdhd(y.timescale,y.duration),C.hdlr(y.type),C.minf(y))},C.mfhd=function(y){return C.box(C.types.mfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255]))},C.minf=function(y){return y.type==="audio"?C.box(C.types.minf,C.box(C.types.smhd,C.SMHD),C.DINF,C.stbl(y)):C.box(C.types.minf,C.box(C.types.vmhd,C.VMHD),C.DINF,C.stbl(y))},C.moof=function(y,t,b){return C.box(C.types.moof,C.mfhd(y),C.traf(b,t))},C.moov=function(y){for(var t=y.length,b=[];t--;)b[t]=C.trak(y[t]);return C.box.apply(null,[C.types.moov,C.mvhd(y[0].timescale,y[0].duration)].concat(b).concat(C.mvex(y)))},C.mvex=function(y){for(var t=y.length,b=[];t--;)b[t]=C.trex(y[t]);return C.box.apply(null,[C.types.mvex].concat(b))},C.mvhd=function(y,t){t*=y;var b=Math.floor(t/(F+1)),i=Math.floor(t%(F+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,y>>24&255,y>>16&255,y>>8&255,y&255,b>>24,b>>16&255,b>>8&255,b&255,i>>24,i>>16&255,i>>8&255,i&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 C.box(C.types.mvhd,u)},C.sdtp=function(y){var t=y.samples||[],b=new Uint8Array(4+t.length),i,u;for(i=0;i<t.length;i++)u=t[i].flags,b[i+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return C.box(C.types.sdtp,b)},C.stbl=function(y){return C.box(C.types.stbl,C.stsd(y),C.box(C.types.stts,C.STTS),C.box(C.types.stsc,C.STSC),C.box(C.types.stsz,C.STSZ),C.box(C.types.stco,C.STCO))},C.avc1=function(y){var t=[],b=[],i,u,p;for(i=0;i<y.sps.length;i++)u=y.sps[i],p=u.byteLength,t.push(p>>>8&255),t.push(p&255),t=t.concat(Array.prototype.slice.call(u));for(i=0;i<y.pps.length;i++)u=y.pps[i],p=u.byteLength,b.push(p>>>8&255),b.push(p&255),b=b.concat(Array.prototype.slice.call(u));var a=C.box(C.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|y.sps.length].concat(t).concat([y.pps.length]).concat(b))),o=y.width,h=y.height,l=y.pixelRatio[0],n=y.pixelRatio[1];return C.box(C.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,o>>8&255,o&255,h>>8&255,h&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]),a,C.box(C.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),C.box(C.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255])))},C.esds=function(y){var t=y.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(y.config).concat([6,1,2]))},C.mp4a=function(y){var t=y.samplerate;return C.box(C.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),C.box(C.types.esds,C.esds(y)))},C.mp3=function(y){var t=y.samplerate;return C.box(C.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},C.stsd=function(y){return y.type==="audio"?!y.isAAC&&y.codec==="mp3"?C.box(C.types.stsd,C.STSD,C.mp3(y)):C.box(C.types.stsd,C.STSD,C.mp4a(y)):C.box(C.types.stsd,C.STSD,C.avc1(y))},C.tkhd=function(y){var t=y.id,b=y.duration*y.timescale,i=y.width,u=y.height,p=Math.floor(b/(F+1)),a=Math.floor(b%(F+1));return C.box(C.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,a>>24,a>>16&255,a>>8&255,a&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,i>>8&255,i&255,0,0,u>>8&255,u&255,0,0]))},C.traf=function(y,t){var b=C.sdtp(y),i=y.id,u=Math.floor(t/(F+1)),p=Math.floor(t%(F+1));return C.box(C.types.traf,C.box(C.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),C.box(C.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,p>>24,p>>16&255,p>>8&255,p&255])),C.trun(y,b.length+16+20+8+16+8+8),b)},C.trak=function(y){return y.duration=y.duration||4294967295,C.box(C.types.trak,C.tkhd(y),C.mdia(y))},C.trex=function(y){var t=y.id;return C.box(C.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},C.trun=function(y,t){var b=y.samples||[],i=b.length,u=12+16*i,p=new Uint8Array(u),a,o,h,l,n,s;for(t+=8+u,p.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<i;a++)o=b[a],h=o.duration,l=o.size,n=o.flags,s=o.cts,p.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*a);return C.box(C.types.trun,p)},C.initSegment=function(y){C.types||C.init();var t=C.moov(y),b=new Uint8Array(C.FTYP.byteLength+t.byteLength);return b.set(C.FTYP),b.set(t,C.FTYP.byteLength),b},C}();S.types=void 0,S.HDLR_TYPES=void 0,S.STTS=void 0,S.STSC=void 0,S.STCO=void 0,S.STSZ=void 0,S.VMHD=void 0,S.SMHD=void 0,S.STSD=void 0,S.FTYP=void 0,S.DINF=void 0,B.default=S},"./src/remux/mp4-remuxer.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return s}),I.d(B,"normalizePts",function(){return d});var F=I("./src/polyfills/number.ts"),S=I("./src/remux/aac-helper.ts"),C=I("./src/remux/mp4-generator.ts"),P=I("./src/events.ts"),y=I("./src/errors.ts"),t=I("./src/utils/logger.ts"),b=I("./src/types/loader.ts"),i=I("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var v=arguments[w];for(var c in v)Object.prototype.hasOwnProperty.call(v,c)&&(k[c]=v[c])}return k},u.apply(this,arguments)}var p=10*1e3,a=1024,o=1152,h=null,l=null,n=!1,s=function(){function k(v,c,f,m){if(m===void 0&&(m=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=v,this.config=c,this.typeSupported=f,this.ISGenerated=!1,h===null){var _=navigator.userAgent||"",x=_.match(/Chrome\/(\d+)/i);h=x?parseInt(x[1]):0}if(l===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);l=g?parseInt(g[1]):0}n=!!h&&h<75||!!l&&l<600}var w=k.prototype;return w.destroy=function(){},w.resetTimeStamp=function(c){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=c},w.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},w.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},w.getVideoStartPts=function(c){var f=!1,m=c.reduce(function(_,x){var g=x.pts-_;return g<-4294967296?(f=!0,d(_,x.pts)):g>0?_:x.pts},c[0].pts);return f&&t.logger.debug("PTS rollover detected"),m},w.remux=function(c,f,m,_,x,g,j,U){var R,W,H,L,G,z,J=x,te=x,_e=c.pid>-1,ce=f.pid>-1,xe=f.samples.length,Te=c.samples.length>0,je=xe>1,Ce=(!_e||Te)&&(!ce||je)||this.ISGenerated||j;if(Ce){this.ISGenerated||(H=this.generateIS(c,f,x));var Z=this.isVideoContiguous,K=-1;if(je&&(K=E(f.samples),!Z&&this.config.forceKeyFrameOnDiscontinuity))if(z=!0,K>0){t.logger.warn("[mp4-remuxer]: Dropped "+K+" out of "+xe+" video samples due to a missing keyframe");var V=this.getVideoStartPts(f.samples);f.samples=f.samples.slice(K),f.dropped+=K,te+=(f.samples[0].pts-V)/(f.timescale||9e4)}else K===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+xe+" video samples"),z=!1);if(this.ISGenerated){if(Te&&je){var $=this.getVideoStartPts(f.samples),q=d(c.samples[0].pts,$)-$,Q=q/f.inputTimeScale;J+=Math.max(0,Q),te+=Math.max(0,-Q)}if(Te){if(c.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),H=this.generateIS(c,f,x)),W=this.remuxAudio(c,J,this.isAudioContiguous,g,ce||je||U===b.PlaylistLevelType.AUDIO?te:void 0),je){var ge=W?W.endPTS-W.startPTS:0;f.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),H=this.generateIS(c,f,x)),R=this.remuxVideo(f,te,Z,ge)}}else je&&(R=this.remuxVideo(f,te,Z,0));R&&(R.firstKeyFrame=K,R.independent=K!==-1)}}return this.ISGenerated&&(m.samples.length&&(G=this.remuxID3(m,x)),_.samples.length&&(L=this.remuxText(_,x))),{audio:W,video:R,initSegment:H,independent:z,text:L,id3:G}},w.generateIS=function(c,f,m){var _=c.samples,x=f.samples,g=this.typeSupported,j={},U=!Object(F.isFiniteNumber)(this._initPTS),R="audio/mp4",W,H,L;if(U&&(W=H=Infinity),c.config&&_.length&&(c.timescale=c.samplerate,c.isAAC||(g.mpeg?(R="audio/mpeg",c.codec=""):g.mp3&&(c.codec="mp3")),j.audio={id:"audio",container:R,codec:c.codec,initSegment:!c.isAAC&&g.mpeg?new Uint8Array(0):C.default.initSegment([c]),metadata:{channelCount:c.channelCount}},U&&(L=c.inputTimeScale,W=H=_[0].pts-Math.round(L*m))),f.sps&&f.pps&&x.length&&(f.timescale=f.inputTimeScale,j.video={id:"main",container:"video/mp4",codec:f.codec,initSegment:C.default.initSegment([f]),metadata:{width:f.width,height:f.height}},U)){L=f.inputTimeScale;var G=this.getVideoStartPts(x),z=Math.round(L*m);H=Math.min(H,d(x[0].dts,G)-z),W=Math.min(W,G-z)}if(Object.keys(j).length)return this.ISGenerated=!0,U&&(this._initPTS=W,this._initDTS=H),{tracks:j,initPTS:W,timescale:L}},w.remuxVideo=function(c,f,m,_){var x=c.inputTimeScale,g=c.samples,j=[],U=g.length,R=this._initPTS,W=this.nextAvcDts,H=8,L,G,z,J=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY,_e=0,ce=!1;if(!m||W===null){var xe=f*x,Te=g[0].pts-d(g[0].dts,g[0].pts);W=xe-Te}for(var je=0;je<U;je++){var Ce=g[je];if(Ce.pts=d(Ce.pts-R,W),Ce.dts=d(Ce.dts-R,W),Ce.dts>Ce.pts){var Z=9e4*.2;_e=Math.max(Math.min(_e,Ce.pts-Ce.dts),-1*Z)}Ce.dts<g[je>0?je-1:je].dts&&(ce=!0)}ce&&g.sort(function(zt,mt){var _t=zt.dts-mt.dts,ot=zt.pts-mt.pts;return _t||ot}),G=g[0].dts,z=g[g.length-1].dts;var K=Math.round((z-G)/(U-1));if(_e<0){if(_e<K*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-K,!0)+" ms");for(var V=_e,$=0;$<U;$++)g[$].dts=V=Math.max(V,g[$].pts-K),g[$].pts=Math.max(V,g[$].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var q=0;q<U;q++)g[q].dts=g[q].dts+_e}G=g[0].dts}if(m){var Q=G-W,ge=Q>K,Oe=Q<-1;if(ge||Oe){ge?t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(Q,!0)+" ms ("+Q+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-Q,!0)+" ms ("+Q+"dts) overlapping between fragments detected"),G=W;var Ye=g[0].pts-Q;g[0].dts=G,g[0].pts=Ye,t.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(Ye,!0)+"/"+Object(i.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(Q,!0)+" ms")}}n&&(G=Math.max(0,G));for(var le=0,Ee=0,Re=0;Re<U;Re++){for(var He=g[Re],et=He.units,ut=et.length,Dt=0,We=0;We<ut;We++)Dt+=et[We].data.length;Ee+=Dt,le+=ut,He.length=Dt,He.dts=Math.max(He.dts,G),He.pts=Math.max(He.pts,He.dts,0),J=Math.min(He.pts,J),te=Math.max(He.pts,te)}z=g[U-1].dts;var Mt=Ee+4*le+8,Wt;try{Wt=new Uint8Array(Mt)}catch(zt){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Mt,reason:"fail allocating video mdat "+Mt});return}var Ne=new DataView(Wt.buffer);Ne.setUint32(0,Mt),Wt.set(C.default.types.mdat,4);for(var Pe=0;Pe<U;Pe++){for(var it=g[Pe],gt=it.units,fe=0,ae=0,se=gt.length;ae<se;ae++){var de=gt[ae],ve=de.data,ie=de.data.byteLength;Ne.setUint32(H,ie),H+=4,Wt.set(ve,H),H+=ie,fe+=4+ie}if(Pe<U-1)L=g[Pe+1].dts-it.dts;else{var oe=this.config,pe=it.dts-g[Pe>0?Pe-1:Pe].dts;if(oe.stretchShortVideoTrack&&this.nextAudioPts!==null){var we=Math.floor(oe.maxBufferHole*x),Ae=(_?J+_*x:this.nextAudioPts)-it.pts;Ae>we?(L=Ae-pe,L<0&&(L=pe),t.logger.log("[mp4-remuxer]: It is approximately "+Ae/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=pe}else L=pe}var Me=Math.round(it.pts-it.dts);j.push(new D(it.key,L,fe,Me))}if(j.length&&h&&h<70){var rt=j[0].flags;rt.dependsOn=2,rt.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=W=z+L,this.isVideoContiguous=!0;var Pt=C.default.moof(c.sequenceNumber++,G,u({},c,{samples:j})),Xt="video",lt={data1:Pt,data2:Wt,startPTS:J/x,endPTS:(te+L)/x,startDTS:G/x,endDTS:W/x,type:Xt,hasAudio:!1,hasVideo:!0,nb:j.length,dropped:c.dropped};return c.samples=[],c.dropped=0,console.assert(Wt.length,"MDAT length must not be zero"),lt},w.remuxAudio=function(c,f,m,_,x){var g=c.inputTimeScale,j=c.samplerate?c.samplerate:g,U=g/j,R=c.isAAC?a:o,W=R*U,H=this._initPTS,L=!c.isAAC&&this.typeSupported.mpeg,G=[],z=c.samples,J=L?0:8,te=this.nextAudioPts||-1,_e=f*g;if(this.isAudioContiguous=m=m||z.length&&te>0&&(_&&Math.abs(_e-te)<9e3||Math.abs(d(z[0].pts-H,_e)-te)<20*W),z.forEach(function(ve){ve.pts=d(ve.pts-H,_e)}),!m||te<0){if(z=z.filter(function(ve){return ve.pts>=0}),!z.length)return;x===0?te=0:_?te=Math.max(0,_e):te=z[0].pts}if(c.isAAC)for(var ce=x!==void 0,xe=this.config.maxAudioFramesDrift,Te=0,je=te;Te<z.length;Te++){var Ce=z[Te],Z=Ce.pts,K=Z-je,V=Math.abs(1e3*K/g);if(K<=-xe*W&&ce)Te===0&&(t.logger.warn("Audio frame @ "+(Z/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*K/g)+" ms."),this.nextAudioPts=te=je=Z);else if(K>=xe*W&&V<p&&ce){var $=Math.round(K/W);je=Z-$*W,je<0&&($--,je+=W),Te===0&&(this.nextAudioPts=te=je),t.logger.warn("[mp4-remuxer]: Injecting "+$+" audio frame @ "+(je/g).toFixed(3)+"s due to "+Math.round(1e3*K/g)+" ms gap.");for(var q=0;q<$;q++){var Q=Math.max(je,0),ge=S.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);ge||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ge=Ce.unit.subarray()),z.splice(Te,0,{unit:ge,pts:Q}),je+=W,Te++}}Ce.pts=je,je+=W}for(var Oe=null,Ye=null,le,Ee=0,Re=z.length;Re--;)Ee+=z[Re].unit.byteLength;for(var He=0,et=z.length;He<et;He++){var ut=z[He],Dt=ut.unit,We=ut.pts;if(Ye!==null){var Mt=G[He-1];Mt.duration=Math.round((We-Ye)/U)}else if(m&&c.isAAC&&(We=te),Oe=We,Ee>0){Ee+=J;try{le=new Uint8Array(Ee)}catch(ve){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ee,reason:"fail allocating audio mdat "+Ee});return}if(!L){var Wt=new DataView(le.buffer);Wt.setUint32(0,Ee),le.set(C.default.types.mdat,4)}}else return;le.set(Dt,J);var Ne=Dt.byteLength;J+=Ne,G.push(new D(!0,R,Ne,0)),Ye=We}var Pe=G.length;if(!Pe)return;var it=G[G.length-1];this.nextAudioPts=te=Ye+U*it.duration;var gt=L?new Uint8Array(0):C.default.moof(c.sequenceNumber++,Oe/U,u({},c,{samples:G}));c.samples=[];var fe=Oe/g,ae=te/g,se="audio",de={data1:gt,data2:le,startPTS:fe,endPTS:ae,startDTS:fe,endDTS:ae,type:se,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(le.length,"MDAT length must not be zero"),de},w.remuxEmptyAudio=function(c,f,m,_){var x=c.inputTimeScale,g=c.samplerate?c.samplerate:x,j=x/g,U=this.nextAudioPts,R=(U!==null?U:_.startDTS*x)+this._initDTS,W=_.endDTS*x+this._initDTS,H=j*a,L=Math.ceil((W-R)/H),G=S.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var z=[],J=0;J<L;J++){var te=R+J*H;z.push({unit:G,pts:te,dts:te})}return c.samples=z,this.remuxAudio(c,f,m,!1)},w.remuxID3=function(c,f){var m=c.samples.length;if(!m)return;for(var _=c.inputTimeScale,x=this._initPTS,g=this._initDTS,j=0;j<m;j++){var U=c.samples[j];U.pts=d(U.pts-x,f*_)/_,U.dts=d(U.dts-g,f*_)/_}var R=c.samples;return c.samples=[],{samples:R}},w.remuxText=function(c,f){var m=c.samples.length;if(!m)return;for(var _=c.inputTimeScale,x=this._initPTS,g=0;g<m;g++){var j=c.samples[g];j.pts=d(j.pts-x,f*_)/_}c.samples.sort(function(R,W){return R.pts-W.pts});var U=c.samples;return c.samples=[],{samples:U}},k}();function d(k,w){var v;if(w===null)return k;for(w<k?v=-8589934592:v=8589934592;Math.abs(k-w)>4294967296;)k+=v;return k}function E(k){for(var w=0;w<k.length;w++)if(k[w].key)return w;return-1}var D=function(w,v,c,f){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=v,this.size=c,this.cts=f,this.flags=new T(w)},T=function(w){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=w?2:1,this.isNonSync=w?0:1}},"./src/remux/passthrough-remuxer.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),S=I("./src/utils/mp4-tools.ts"),C=I("./src/loader/fragment.ts"),P=I("./src/utils/logger.ts"),y=function(){function i(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var u=i.prototype;return u.destroy=function(){},u.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(a,o,h){this.audioCodec=o,this.videoCodec=h,this.generateInitSegment(a),this.emitInitSegment=!0},u.generateInitSegment=function(a){var o=this.audioCodec,h=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(S.parseInitSegment)(a);o||(o=b(l.audio,C.ElementaryStreamTypes.AUDIO)),h||(h=b(l.video,C.ElementaryStreamTypes.VIDEO));var n={};l.audio&&l.video?n.audiovideo={container:"video/mp4",codec:o+","+h,initSegment:a,id:"main"}:l.audio?n.audio={container:"audio/mp4",codec:o,initSegment:a,id:"audio"}:l.video?n.video={container:"video/mp4",codec:h,initSegment:a,id:"main"}:P.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},u.remux=function(a,o,h,l,n){var s=this.initPTS,d=this.lastEndDTS,E={audio:void 0,video:void 0,text:l,id3:h,initSegment:void 0};Object(F.isFiniteNumber)(d)||(d=this.lastEndDTS=n||0);var D=o.samples;if(!D||!D.length)return E;var T={initPTS:void 0,timescale:1},k=this.initData;if((!k||!k.length)&&(this.generateInitSegment(D),k=this.initData),!k||!k.length)return P.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(T.tracks=this.initTracks,this.emitInitSegment=!1),Object(F.isFiniteNumber)(s)||(this.initPTS=T.initPTS=s=t(k,D,d));var w=Object(S.getDuration)(D,k),v=d,c=w+v;Object(S.offsetStartDTS)(k,D,s),w>0?this.lastEndDTS=c:(P.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var f=!!k.audio,m=!!k.video,_="";f&&(_+="audio"),m&&(_+="video");var x={data1:D,startPTS:v,startDTS:v,endPTS:c,endDTS:c,type:_,hasAudio:f,hasVideo:m,nb:1,dropped:0};return E.audio=x.type==="audio"?x:void 0,E.video=x.type!=="audio"?x:void 0,E.text=l,E.id3=h,E.initSegment=T,E},i}(),t=function(u,p,a){return Object(S.getStartDTS)(u,p)-a};function b(i,u){var p=i==null?void 0:i.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||u===C.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}B.default=y},"./src/task-loop.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function S(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var C=S.prototype;return C.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},C.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},C.onHandlerDestroyed=function(){},C.hasInterval=function(){return!!this._tickInterval},C.hasNextTick=function(){return!!this._tickTimer},C.setInterval=function(y){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,y),!0)},C.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},C.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},C.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},C.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},C.doTick=function(){},S}()},"./src/types/cmcd.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"CMCDVersion",function(){return F}),I.d(B,"CMCDObjectType",function(){return S}),I.d(B,"CMCDStreamingFormat",function(){return C}),I.d(B,"CMCDStreamType",function(){return P});var F=1,S;(function(y){y.MANIFEST="m",y.AUDIO="a",y.VIDEO="v",y.MUXED="av",y.INIT="i",y.CAPTION="c",y.TIMED_TEXT="tt",y.KEY="k",y.OTHER="o"})(S||(S={}));var C;(function(y){y.DASH="d",y.HLS="h",y.SMOOTH="s",y.OTHER="o"})(C||(C={}));var P;(function(y){y.VOD="v",y.LIVE="l"})(P||(P={}))},"./src/types/level.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"HlsSkip",function(){return C}),I.d(B,"getSkipValue",function(){return P}),I.d(B,"HlsUrlParameters",function(){return y}),I.d(B,"Level",function(){return t});function F(b,i){for(var u=0;u<i.length;u++){var p=i[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(b,p.key,p)}}function S(b,i,u){return i&&F(b.prototype,i),u&&F(b,u),b}var C;(function(b){b.No="",b.Yes="YES",b.v2="v2"})(C||(C={}));function P(b,i){var u=b.canSkipUntil,p=b.canSkipDateRanges,a=b.endSN,o=i!==void 0?i-a:0;return u&&o<u?p?C.v2:C.Yes:C.No}var y=function(){function b(u,p,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=p,this.skip=a}var i=b.prototype;return i.addDirectives=function(p){var a=new self.URL(p);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},b}(),t=function(){function b(i){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return S(b,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(u){var p=u%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),b}()},"./src/types/loader.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"PlaylistContextType",function(){return F}),I.d(B,"PlaylistLevelType",function(){return S});var F;(function(C){C.MANIFEST="manifest",C.LEVEL="level",C.AUDIO_TRACK="audioTrack",C.SUBTITLE_TRACK="subtitleTrack"})(F||(F={}));var S;(function(C){C.MAIN="main",C.AUDIO="audio",C.SUBTITLE="subtitle"})(S||(S={}))},"./src/types/transmuxer.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"ChunkMetadata",function(){return F});var F=function(P,y,t,b,i,u){b===void 0&&(b=0),i===void 0&&(i=-1),u===void 0&&(u=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=S(),this.buffering={audio:S(),video:S(),audiovideo:S()},this.level=P,this.sn=y,this.id=t,this.size=b,this.part=i,this.partial=u};function S(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"AttrList",function(){return C});var F=/^(\d+)x(\d+)$/,S=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,C=function(){function P(t){typeof t=="string"&&(t=P.parseAttrList(t));for(var b in t)t.hasOwnProperty(b)&&(this[b]=t[b])}var y=P.prototype;return y.decimalInteger=function(b){var i=parseInt(this[b],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.hexadecimalInteger=function(b){if(this[b]){var i=(this[b]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var u=new Uint8Array(i.length/2),p=0;p<i.length/2;p++)u[p]=parseInt(i.slice(p*2,p*2+2),16);return u}else return null},y.hexadecimalIntegerAsNumber=function(b){var i=parseInt(this[b],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.decimalFloatingPoint=function(b){return parseFloat(this[b])},y.optionalFloat=function(b,i){var u=this[b];return u?parseFloat(u):i},y.enumeratedString=function(b){return this[b]},y.bool=function(b){return this[b]==="YES"},y.decimalResolution=function(b){var i=F.exec(this[b]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},P.parseAttrList=function(b){var i,u={},p='"';for(S.lastIndex=0;(i=S.exec(b))!==null;){var a=i[2];a.indexOf(p)===0&&a.lastIndexOf(p)===a.length-1&&(a=a.slice(1,-1)),u[i[1]]=a}return u},P}()},"./src/utils/binary-search.ts":function(X,B,I){"use strict";I.r(B);var F={search:function(C,P){for(var y=0,t=C.length-1,b=null,i=null;y<=t;){b=(y+t)/2|0,i=C[b];var u=P(i);if(u>0)y=b+1;else if(u<0)t=b-1;else return i}return null}};B.default=F},"./src/utils/buffer-helper.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"BufferHelper",function(){return C});var F=I("./src/utils/logger.ts"),S={length:0,start:function(){return 0},end:function(){return 0}},C=function(){function P(){}return P.isBuffered=function(t,b){try{if(t){for(var i=P.getBuffered(t),u=0;u<i.length;u++)if(b>=i.start(u)&&b<=i.end(u))return!0}}catch(p){}return!1},P.bufferInfo=function(t,b,i){try{if(t){var u=P.getBuffered(t),p=[],a;for(a=0;a<u.length;a++)p.push({start:u.start(a),end:u.end(a)});return this.bufferedInfo(p,b,i)}}catch(o){}return{len:0,start:b,end:b,nextStart:void 0}},P.bufferedInfo=function(t,b,i){b=Math.max(0,b),t.sort(function(T,k){var w=T.start-k.start;return w||k.end-T.end});var u=[];if(i)for(var p=0;p<t.length;p++){var a=u.length;if(a){var o=u[a-1].end;t[p].start-o<i?t[p].end>o&&(u[a-1].end=t[p].end):u.push(t[p])}else u.push(t[p])}else u=t;for(var h=0,l,n=b,s=b,d=0;d<u.length;d++){var E=u[d].start,D=u[d].end;if(b+i>=E&&b<D)n=E,s=D,h=s-b;else if(b+i<E){l=E;break}}return{len:h,start:n||0,end:s||0,nextStart:l}},P.getBuffered=function(t){try{return t.buffered}catch(b){return F.logger.log("failed to get media.buffered",b),S}},P}()},"./src/utils/cea-608-parser.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"Row",function(){return s}),I.d(B,"CaptionScreen",function(){return d});var F=I("./src/utils/logger.ts"),S={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},C=function(c){var f=c;return S.hasOwnProperty(c)&&(f=S[c]),String.fromCharCode(f)},P=15,y=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},b={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(v){v[v.ERROR=0]="ERROR",v[v.TEXT=1]="TEXT",v[v.WARNING=2]="WARNING",v[v.INFO=2]="INFO",v[v.DEBUG=3]="DEBUG",v[v.DATA=3]="DATA"})(a||(a={}));var o=function(){function v(){this.time=null,this.verboseLevel=a.ERROR}var c=v.prototype;return c.log=function(m,_){this.verboseLevel>=m&&F.logger.log(this.time+" ["+m+"] "+_)},v}(),h=function(c){for(var f=[],m=0;m<c.length;m++)f.push(c[m].toString(16));return f},l=function(){function v(f,m,_,x,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=f||"white",this.underline=m||!1,this.italics=_||!1,this.background=x||"black",this.flash=g||!1}var c=v.prototype;return c.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},c.setStyles=function(m){for(var _=["foreground","underline","italics","background","flash"],x=0;x<_.length;x++){var g=_[x];m.hasOwnProperty(g)&&(this[g]=m[g])}},c.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},c.equals=function(m){return this.foreground===m.foreground&&this.underline===m.underline&&this.italics===m.italics&&this.background===m.background&&this.flash===m.flash},c.copy=function(m){this.foreground=m.foreground,this.underline=m.underline,this.italics=m.italics,this.background=m.background,this.flash=m.flash},c.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},v}(),n=function(){function v(f,m,_,x,g,j){this.uchar=void 0,this.penState=void 0,this.uchar=f||" ",this.penState=new l(m,_,x,g,j)}var c=v.prototype;return c.reset=function(){this.uchar=" ",this.penState.reset()},c.setChar=function(m,_){this.uchar=m,this.penState.copy(_)},c.setPenState=function(m){this.penState.copy(m)},c.equals=function(m){return this.uchar===m.uchar&&this.penState.equals(m.penState)},c.copy=function(m){this.uchar=m.uchar,this.penState.copy(m.penState)},c.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},v}(),s=function(){function v(f){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var m=0;m<y;m++)this.chars.push(new n);this.logger=f,this.pos=0,this.currPenState=new l}var c=v.prototype;return c.equals=function(m){for(var _=!0,x=0;x<y;x++)if(!this.chars[x].equals(m.chars[x])){_=!1;break}return _},c.copy=function(m){for(var _=0;_<y;_++)this.chars[_].copy(m.chars[_])},c.isEmpty=function(){for(var m=!0,_=0;_<y;_++)if(!this.chars[_].isEmpty()){m=!1;break}return m},c.setCursor=function(m){this.pos!==m&&(this.pos=m),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>y&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=y)},c.moveCursor=function(m){var _=this.pos+m;if(m>1)for(var x=this.pos+1;x<_+1;x++)this.chars[x].setPenState(this.currPenState);this.setCursor(_)},c.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},c.insertChar=function(m){m>=144&&this.backSpace();var _=C(m);if(this.pos>=y){this.logger.log(a.ERROR,"Cannot insert "+m.toString(16)+" ("+_+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(_,this.currPenState),this.moveCursor(1)},c.clearFromPos=function(m){var _;for(_=m;_<y;_++)this.chars[_].reset()},c.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},c.clearToEndOfRow=function(){this.clearFromPos(this.pos)},c.getTextString=function(){for(var m=[],_=!0,x=0;x<y;x++){var g=this.chars[x].uchar;g!==" "&&(_=!1),m.push(g)}return _?"":m.join("")},c.setPenStyles=function(m){this.currPenState.setStyles(m);var _=this.chars[this.pos];_.setPenState(this.currPenState)},v}(),d=function(){function v(f){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var m=0;m<P;m++)this.rows.push(new s(f));this.logger=f,this.currRow=P-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var c=v.prototype;return c.reset=function(){for(var m=0;m<P;m++)this.rows[m].clear();this.currRow=P-1},c.equals=function(m){for(var _=!0,x=0;x<P;x++)if(!this.rows[x].equals(m.rows[x])){_=!1;break}return _},c.copy=function(m){for(var _=0;_<P;_++)this.rows[_].copy(m.rows[_])},c.isEmpty=function(){for(var m=!0,_=0;_<P;_++)if(!this.rows[_].isEmpty()){m=!1;break}return m},c.backSpace=function(){var m=this.rows[this.currRow];m.backSpace()},c.clearToEndOfRow=function(){var m=this.rows[this.currRow];m.clearToEndOfRow()},c.insertChar=function(m){var _=this.rows[this.currRow];_.insertChar(m)},c.setPen=function(m){var _=this.rows[this.currRow];_.setPenStyles(m)},c.moveCursor=function(m){var _=this.rows[this.currRow];_.moveCursor(m)},c.setCursor=function(m){this.logger.log(a.INFO,"setCursor: "+m);var _=this.rows[this.currRow];_.setCursor(m)},c.setPAC=function(m){this.logger.log(a.INFO,"pacData = "+JSON.stringify(m));var _=m.row-1;if(this.nrRollUpRows&&_<this.nrRollUpRows-1&&(_=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==_){for(var x=0;x<P;x++)this.rows[x].clear();var g=this.currRow+1-this.nrRollUpRows,j=this.lastOutputScreen;if(j){var U=j.rows[g].cueStartTime,R=this.logger.time;if(U&&R!==null&&U<R)for(var W=0;W<this.nrRollUpRows;W++)this.rows[_-this.nrRollUpRows+W+1].copy(j.rows[g+W])}}this.currRow=_;var H=this.rows[this.currRow];if(m.indent!==null){var L=m.indent,G=Math.max(L-1,0);H.setCursor(m.indent),m.color=H.chars[G].penState.foreground}var z={foreground:m.color,underline:m.underline,italics:m.italics,background:"black",flash:!1};this.setPen(z)},c.setBkgData=function(m){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(m)),this.backSpace(),this.setPen(m),this.insertChar(32)},c.setRollUpRows=function(m){this.nrRollUpRows=m},c.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var m=this.currRow+1-this.nrRollUpRows,_=this.rows.splice(m,1)[0];_.clear(),this.rows.splice(this.currRow,0,_),this.logger.log(a.INFO,"Rolling up")},c.getDisplayText=function(m){m=m||!1;for(var _=[],x="",g=-1,j=0;j<P;j++){var U=this.rows[j].getTextString();U&&(g=j+1,m?_.push("Row "+g+": '"+U+"'"):_.push(U.trim()))}return _.length>0&&(m?x="["+_.join(" | ")+"]":x=_.join(`
`)),x},c.getTextAndFormat=function(){return this.rows},v}(),E=function(){function v(f,m,_){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=f,this.outputFilter=m,this.mode=null,this.verbose=0,this.displayedMemory=new d(_),this.nonDisplayedMemory=new d(_),this.lastOutputScreen=new d(_),this.currRollUpRow=this.displayedMemory.rows[P-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=_}var c=v.prototype;return c.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[P-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},c.getHandler=function(){return this.outputFilter},c.setHandler=function(m){this.outputFilter=m},c.setPAC=function(m){this.writeScreen.setPAC(m)},c.setBkgData=function(m){this.writeScreen.setBkgData(m)},c.setMode=function(m){if(m===this.mode)return;this.mode=m,this.logger.log(a.INFO,"MODE="+m),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=m},c.insertChars=function(m){for(var _=0;_<m.length;_++)this.writeScreen.insertChar(m[_]);var x=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,x+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},c.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},c.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},c.ccAOF=function(){},c.ccAON=function(){},c.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},c.ccRU=function(m){this.logger.log(a.INFO,"RU("+m+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(m)},c.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},c.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},c.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},c.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},c.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},c.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},c.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},c.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var m=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=m,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},c.ccTO=function(m){this.logger.log(a.INFO,"TO("+m+") - Tab Offset"),this.writeScreen.moveCursor(m)},c.ccMIDROW=function(m){var _={flash:!1};if(_.underline=m%2===1,_.italics=m>=46,_.italics)_.foreground="white";else{var x=Math.floor(m/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];_.foreground=g[x]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(_)),this.writeScreen.setPen(_)},c.outputDataUpdate=function(m){m===void 0&&(m=!1);var _=this.logger.time;if(_===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=_:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,_,this.lastOutputScreen),m&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:_),this.lastOutputScreen.copy(this.displayedMemory))},c.cueSplitAtTime=function(m){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,m,this.displayedMemory),this.cueStartTime=m))},v}(),D=function(){function v(f,m,_){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new o;this.channels=[null,new E(f,m,x),new E(f+1,_,x)],this.cmdHistory=w(),this.logger=x}var c=v.prototype;return c.getHandler=function(m){return this.channels[m].getHandler()},c.setHandler=function(m,_){this.channels[m].setHandler(_)},c.addData=function(m,_){var x,g,j,U=!1;this.logger.time=m;for(var R=0;R<_.length;R+=2){if(g=_[R]&127,j=_[R+1]&127,g===0&&j===0)continue;if(this.logger.log(a.DATA,"["+h([_[R],_[R+1]])+"] -> ("+h([g,j])+")"),x=this.parseCmd(g,j),x||(x=this.parseMidrow(g,j)),x||(x=this.parsePAC(g,j)),x||(x=this.parseBackgroundAttributes(g,j)),!x&&(U=this.parseChars(g,j),U)){var W=this.currentChannel;if(W&&W>0){var H=this.channels[W];H.insertChars(U)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!x&&!U&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+h([g,j])+" orig: "+h([_[R],_[R+1]]))}},c.parseCmd=function(m,_){var x=this.cmdHistory,g=(m===20||m===28||m===21||m===29)&&_>=32&&_<=47,j=(m===23||m===31)&&_>=33&&_<=35;if(!(g||j))return!1;if(k(m,_,x))return T(null,null,x),this.logger.log(a.DEBUG,"Repeated command ("+h([m,_])+") is dropped"),!0;var U=m===20||m===21||m===23?1:2,R=this.channels[U];return m===20||m===21||m===28||m===29?_===32?R.ccRCL():_===33?R.ccBS():_===34?R.ccAOF():_===35?R.ccAON():_===36?R.ccDER():_===37?R.ccRU(2):_===38?R.ccRU(3):_===39?R.ccRU(4):_===40?R.ccFON():_===41?R.ccRDC():_===42?R.ccTR():_===43?R.ccRTD():_===44?R.ccEDM():_===45?R.ccCR():_===46?R.ccENM():_===47&&R.ccEOC():R.ccTO(_-32),T(m,_,x),this.currentChannel=U,!0},c.parseMidrow=function(m,_){var x=0;if((m===17||m===25)&&_>=32&&_<=47){if(m===17?x=1:x=2,x!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[x];return g?(g.ccMIDROW(_),this.logger.log(a.DEBUG,"MIDROW ("+h([m,_])+")"),!0):!1}return!1},c.parsePAC=function(m,_){var x,g=this.cmdHistory,j=(m>=17&&m<=23||m>=25&&m<=31)&&_>=64&&_<=127,U=(m===16||m===24)&&_>=64&&_<=95;if(!(j||U))return!1;if(k(m,_,g))return T(null,null,g),!0;var R=m<=23?1:2;_>=64&&_<=95?x=R===1?t[m]:i[m]:x=R===1?b[m]:u[m];var W=this.channels[R];return W?(W.setPAC(this.interpretPAC(x,_)),T(m,_,g),this.currentChannel=R,!0):!1},c.interpretPAC=function(m,_){var x,g={color:null,italics:!1,indent:null,underline:!1,row:m};return _>95?x=_-96:x=_-64,g.underline=(x&1)===1,x<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((x-16)/2)*4,g},c.parseChars=function(m,_){var x,g=null,j=null;if(m>=25?(x=2,j=m-8):(x=1,j=m),j>=17&&j<=19){var U;j===17?U=_+80:j===18?U=_+112:U=_+144,this.logger.log(a.INFO,"Special char '"+C(U)+"' in channel "+x),g=[U]}else m>=32&&m<=127&&(g=_===0?[m]:[m,_]);if(g){var R=h(g);this.logger.log(a.DEBUG,"Char codes = "+R.join(",")),T(m,_,this.cmdHistory)}return g},c.parseBackgroundAttributes=function(m,_){var x=(m===16||m===24)&&_>=32&&_<=47,g=(m===23||m===31)&&_>=45&&_<=47;if(!(x||g))return!1;var j,U={};m===16||m===24?(j=Math.floor((_-32)/2),U.background=p[j],_%2===1&&(U.background=U.background+"_semi")):_===45?U.background="transparent":(U.foreground="black",_===47&&(U.underline=!0));var R=m<=23?1:2,W=this.channels[R];return W.setBkgData(U),T(m,_,this.cmdHistory),!0},c.reset=function(){for(var m=0;m<Object.keys(this.channels).length;m++){var _=this.channels[m];_&&_.reset()}this.cmdHistory=w()},c.cueSplitAtTime=function(m){for(var _=0;_<this.channels.length;_++){var x=this.channels[_];x&&x.cueSplitAtTime(m)}},v}();function T(v,c,f){f.a=v,f.b=c}function k(v,c,f){return f.a===v&&f.b===c}function w(){return{a:null,b:null}}B.default=D},"./src/utils/codecs.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"isCodecType",function(){return S}),I.d(B,"isCodecSupportedInMp4",function(){return C});var F={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function S(P,y){var t=F[y];return!!t&&t[P.slice(0,4)]===!0}function C(P,y){return MediaSource.isTypeSupported((y||"video")+'/mp4;codecs="'+P+'"')}},"./src/utils/cues.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/utils/vttparser.ts"),S=I("./src/utils/webvtt-parser.ts"),C=I("./src/utils/texttrack-utils.ts"),P=/\s/,y={newCue:function(b,i,u,p){for(var a=[],o,h,l,n,s,d=self.VTTCue||self.TextTrackCue,E=0;E<p.rows.length;E++)if(o=p.rows[E],l=!0,n=0,s="",!o.isEmpty()){for(var D=0;D<o.chars.length;D++)P.test(o.chars[D].uchar)&&l?n++:(s+=o.chars[D].uchar,l=!1);o.cueStartTime=i,i===u&&(u+=1e-4),n>=16?n--:n++;var T=Object(F.fixLineBreaks)(s.trim()),k=Object(S.generateCueId)(i,u,T);(!b||!b.cues||!b.cues.getCueById(k))&&(h=new d(i,u,T),h.id=k,h.line=E+1,h.align="left",h.position=10+Math.min(80,Math.floor(n*8/32)*10),a.push(h))}return b&&a.length&&(a.sort(function(w,v){return w.line==="auto"||v.line==="auto"?0:w.line>8&&v.line>8?v.line-w.line:w.line-v.line}),a.forEach(function(w){return Object(C.addCueToTrack)(b,w)})),a}};B.default=y},"./src/utils/discontinuities.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"findFirstFragWithCC",function(){return P}),I.d(B,"shouldAlignOnDiscontinuities",function(){return y}),I.d(B,"findDiscontinuousReferenceFrag",function(){return t}),I.d(B,"adjustSlidingStart",function(){return i}),I.d(B,"alignStream",function(){return u}),I.d(B,"alignPDT",function(){return a}),I.d(B,"alignFragmentByPDTDelta",function(){return o}),I.d(B,"alignMediaPlaylistByPDT",function(){return h});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/logger.ts"),C=I("./src/controller/level-helper.ts");function P(l,n){for(var s=null,d=0,E=l.length;d<E;d++){var D=l[d];if(D&&D.cc===n){s=D;break}}return s}function y(l,n,s){return!!(n.details&&(s.endCC>s.startCC||l&&l.cc<s.startCC))}function t(l,n){var s=l.fragments,d=n.fragments;if(!d.length||!s.length){S.logger.log("No fragments to align");return}var E=P(s,d[0].cc);if(!E||E&&!E.startPTS){S.logger.log("No frag in previous level to align on");return}return E}function b(l,n){if(l){var s=l.start+n;l.start=l.startPTS=s,l.endPTS=s+l.duration}}function i(l,n){for(var s=n.fragments,d=0,E=s.length;d<E;d++)b(s[d],l);n.fragmentHint&&b(n.fragmentHint,l),n.alignedSliding=!0}function u(l,n,s){if(!n)return;p(l,s,n),!s.alignedSliding&&n.details&&a(s,n.details),!s.alignedSliding&&n.details&&!s.skippedSegments&&Object(C.adjustSliding)(n.details,s)}function p(l,n,s){if(y(l,s,n)){var d=t(s.details,n);d&&Object(F.isFiniteNumber)(d.start)&&(S.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),i(d.start,n))}}function a(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,d=l.fragments[0].programDateTime,E=(d-s)/1e3+n.fragments[0].start;E&&Object(F.isFiniteNumber)(E)&&(S.logger.log("Adjusting PTS using programDateTime delta "+(d-s)+"ms, sliding:"+E.toFixed(3)+" "+l.url+" "),i(E,l))}function o(l,n){var s=l.programDateTime;if(!s)return;var d=(s-n)/1e3;l.start=l.startPTS=d,l.endPTS=d+l.duration}function h(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,d=n.fragments[0].start,E=s-d*1e3;l.fragments.forEach(function(D){o(D,E)}),l.fragmentHint&&o(l.fragmentHint,E),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/utils/ewma.ts"),S=function(){function C(y,t,b){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=b,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new F.default(y),this.fast_=new F.default(t)}var P=C.prototype;return P.update=function(t,b){var i=this.slow_,u=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new F.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==b&&(this.fast_=new F.default(b,u.getEstimate(),u.getTotalWeight()))},P.sample=function(t,b){t=Math.max(t,this.minDelayMs_);var i=8*b,u=t/1e3,p=i/u;this.fast_.sample(u,p),this.slow_.sample(u,p)},P.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},P.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},P.destroy=function(){},C}();B.default=S},"./src/utils/ewma.ts":function(X,B,I){"use strict";I.r(B);var F=function(){function S(P,y,t){y===void 0&&(y=0),t===void 0&&(t=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=P,this.alpha_=P?Math.exp(Math.log(.5)/P):0,this.estimate_=y,this.totalWeight_=t}var C=S.prototype;return C.sample=function(y,t){var b=Math.pow(this.alpha_,y);this.estimate_=t*(1-b)+b*this.estimate_,this.totalWeight_+=y},C.getTotalWeight=function(){return this.totalWeight_},C.getEstimate=function(){if(this.alpha_){var y=1-Math.pow(this.alpha_,this.totalWeight_);if(y)return this.estimate_/y}return this.estimate_},S}();B.default=F},"./src/utils/fetch-loader.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"fetchSupported",function(){return o});var F=I("./src/polyfills/number.ts"),S=I("./src/loader/load-stats.ts"),C=I("./src/demux/chunk-cache.ts");function P(d,E){d.prototype=Object.create(E.prototype),d.prototype.constructor=d,u(d,E)}function y(d){var E=typeof Map=="function"?new Map:void 0;return y=function(T){if(T===null||!i(T))return T;if(typeof T!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(T))return E.get(T);E.set(T,k)}function k(){return t(T,arguments,p(this).constructor)}return k.prototype=Object.create(T.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),u(k,T)},y(d)}function t(d,E,D){return b()?t=Reflect.construct:t=function(k,w,v){var c=[null];c.push.apply(c,w);var f=Function.bind.apply(k,c),m=new f;return v&&u(m,v.prototype),m},t.apply(null,arguments)}function b(){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(d){return!1}}function i(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function u(d,E){return u=Object.setPrototypeOf||function(T,k){return T.__proto__=k,T},u(d,E)}function p(d){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},p(d)}function a(){return a=Object.assign||function(d){for(var E=1;E<arguments.length;E++){var D=arguments[E];for(var T in D)Object.prototype.hasOwnProperty.call(D,T)&&(d[T]=D[T])}return d},a.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var h=function(){function d(D){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=D.fetchSetup||n,this.controller=new self.AbortController,this.stats=new S.LoadStats}var E=d.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var T=this.response;(!T||!T.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var T;this.abortInternal(),(T=this.callbacks)!==null&&T!==void 0&&T.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(T,k,w){var v=this,c=this.stats;if(c.loading.start)throw new Error("Loader can only be used once.");c.loading.start=self.performance.now();var f=l(T,this.controller.signal),m=w.onProgress,_=T.responseType==="arraybuffer",x=_?"byteLength":"length";this.context=T,this.config=k,this.callbacks=w,this.request=this.fetchSetup(T,f),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){v.abortInternal(),w.onTimeout(c,T,v.response)},k.timeout),self.fetch(this.request).then(function(g){if(v.response=v.loader=g,!g.ok){var j=g.status,U=g.statusText;throw new s(U||"fetch, bad network response",j,g)}return c.loading.first=Math.max(self.performance.now(),c.loading.start),c.total=parseInt(g.headers.get("Content-Length")||"0"),m&&Object(F.isFiniteNumber)(k.highWaterMark)?v.loadProgressively(g,c,T,k.highWaterMark,m):_?g.arrayBuffer():g.text()}).then(function(g){var j=v.response;self.clearTimeout(v.requestTimeout),c.loading.end=Math.max(self.performance.now(),c.loading.first),c.loaded=c.total=g[x];var U={url:j.url,data:g};m&&!Object(F.isFiniteNumber)(k.highWaterMark)&&m(c,T,g,j),w.onSuccess(U,c,T,j)}).catch(function(g){if(self.clearTimeout(v.requestTimeout),c.aborted)return;var j=g.code||0;w.onError({code:j,text:g.message},T,g.details)})},E.getCacheAge=function(){var T=null;if(this.response){var k=this.response.headers.get("age");T=k?parseFloat(k):null}return T},E.loadProgressively=function(T,k,w,v,c){v===void 0&&(v=0);var f=new C.default,m=T.body.getReader(),_=function x(){return m.read().then(function(g){if(g.done)return f.dataLength&&c(k,w,f.flush(),T),Promise.resolve(new ArrayBuffer(0));var j=g.value,U=j.length;return k.loaded+=U,U<v||f.dataLength?(f.push(j),f.dataLength>=v&&c(k,w,f.flush(),T)):c(k,w,j,T),x()}).catch(function(){return Promise.reject()})};return _()},d}();function l(d,E){var D={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(a({},d.headers))};return d.rangeEnd&&D.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),D}function n(d,E){return new self.Request(d.url,E)}var s=function(d){P(E,d);function E(D,T,k){var w;return w=d.call(this,D)||this,w.code=void 0,w.details=void 0,w.code=T,w.details=k,w}return E}(y(Error));B.default=h},"./src/utils/imsc1-ttml-parser.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"IMSC1_CODEC",function(){return i}),I.d(B,"parseIMSC1",function(){return o});var F=I("./src/utils/mp4-tools.ts"),S=I("./src/utils/vttparser.ts"),C=I("./src/utils/vttcue.ts"),P=I("./src/demux/id3.ts"),y=I("./src/utils/timescale-conversion.ts"),t=I("./src/utils/webvtt-parser.ts");function b(){return b=Object.assign||function(v){for(var c=1;c<arguments.length;c++){var f=arguments[c];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(v[m]=f[m])}return v},b.apply(this,arguments)}var i="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(v,c,f,m,_){var x=Object(F.findBox)(new Uint8Array(v),["mdat"]);if(x.length===0){_(new Error("Could not parse IMSC1 mdat"));return}var g=x[0],j=Object(P.utf8ArrayToStr)(new Uint8Array(v,g.start,g.end-g.start)),U=Object(y.toTimescaleFromScale)(c,1,f);try{m(h(j,U))}catch(R){_(R)}}function h(v,c){var f=new DOMParser,m=f.parseFromString(v,"text/xml"),_=m.getElementsByTagName("tt")[0];if(!_)throw new Error("Invalid ttml");var x={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(x).reduce(function(H,L){return H[L]=_.getAttribute("ttp:"+L)||x[L],H},{}),j=_.getAttribute("xml:space")!=="preserve",U=n(l(_,"styling","style")),R=n(l(_,"layout","region")),W=l(_,"body","[begin]");return[].map.call(W,function(H){var L=s(H,j);if(!L||!H.hasAttribute("begin"))return null;var G=T(H.getAttribute("begin"),g),z=T(H.getAttribute("dur"),g),J=T(H.getAttribute("end"),g);if(G===null)throw D(H);if(J===null){if(z===null)throw D(H);J=G+z}var te=new C.default(G-c,J-c,L);te.id=Object(t.generateCueId)(te.startTime,te.endTime,te.text);var _e=R[H.getAttribute("region")],ce=U[H.getAttribute("style")];te.position=10,te.size=80;var xe=d(_e,ce),Te=xe.textAlign;if(Te){var je=a[Te];je&&(te.lineAlign=je),te.align=Te}return b(te,xe),te}).filter(function(H){return H!==null})}function l(v,c,f){var m=v.getElementsByTagName(c)[0];return m?[].slice.call(m.querySelectorAll(f)):[]}function n(v){return v.reduce(function(c,f){var m=f.getAttribute("xml:id");return m&&(c[m]=f),c},{})}function s(v,c){return[].slice.call(v.childNodes).reduce(function(f,m,_){var x;return m.nodeName==="br"&&_?f+`
`:(x=m.childNodes)!==null&&x!==void 0&&x.length?s(m,c):c?f+m.textContent.trim().replace(/\s+/g," "):f+m.textContent},"")}function d(v,c){var f="http://www.w3.org/ns/ttml#styling",m=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return m.reduce(function(_,x){var g=E(c,f,x)||E(v,f,x);return g&&(_[x]=g),_},{})}function E(v,c,f){return v.hasAttributeNS(c,f)?v.getAttributeNS(c,f):null}function D(v){return new Error("Could not parse ttml timestamp "+v)}function T(v,c){if(!v)return null;var f=Object(S.parseTimeStamp)(v);return f===null&&(u.test(v)?f=k(v,c):p.test(v)&&(f=w(v,c))),f}function k(v,c){var f=u.exec(v),m=(f[4]|0)+(f[5]|0)/c.subFrameRate;return(f[1]|0)*3600+(f[2]|0)*60+(f[3]|0)+m/c.frameRate}function w(v,c){var f=p.exec(v),m=Number(f[1]),_=f[2];switch(_){case"h":return m*3600;case"m":return m*60;case"ms":return m*1e3;case"f":return m/c.frameRate;case"t":return m/c.tickRate}return m}},"./src/utils/logger.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"enableLogs",function(){return t}),I.d(B,"logger",function(){return b});var F=function(){},S={trace:F,debug:F,log:F,warn:F,info:F,error:F},C=S;function P(i){var u=self.console[i];return u?u.bind(self.console,"["+i+"] >"):F}function y(i){for(var u=arguments.length,p=new Array(u>1?u-1:0),a=1;a<u;a++)p[a-1]=arguments[a];p.forEach(function(o){C[o]=i[o]?i[o].bind(i):P(o)})}function t(i){if(self.console&&i===!0||typeof i=="object"){y(i,"debug","log","info","warn","error");try{C.log()}catch(u){C=S}}else C=S}var b=C},"./src/utils/mediakeys-helper.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"KeySystems",function(){return F}),I.d(B,"requestMediaKeySystemAccess",function(){return S});var F;(function(C){C.WIDEVINE="com.widevine.alpha",C.PLAYREADY="com.microsoft.playready"})(F||(F={}));var S=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"getMediaSource",function(){return F});function F(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"bin2str",function(){return y}),I.d(B,"readUint16",function(){return t}),I.d(B,"readUint32",function(){return b}),I.d(B,"writeUint32",function(){return i}),I.d(B,"findBox",function(){return u}),I.d(B,"parseSegmentIndex",function(){return p}),I.d(B,"parseInitSegment",function(){return a}),I.d(B,"getStartDTS",function(){return o}),I.d(B,"getDuration",function(){return h}),I.d(B,"computeRawDurationFromSamples",function(){return l}),I.d(B,"offsetStartDTS",function(){return n}),I.d(B,"segmentValidRange",function(){return s}),I.d(B,"appendUint8Array",function(){return d});var F=I("./src/utils/typed-array.ts"),S=I("./src/loader/fragment.ts"),C=Math.pow(2,32)-1,P=[].push;function y(E){return String.fromCharCode.apply(null,E)}function t(E,D){"data"in E&&(D+=E.start,E=E.data);var T=E[D]<<8|E[D+1];return T<0?65536+T:T}function b(E,D){"data"in E&&(D+=E.start,E=E.data);var T=E[D]<<24|E[D+1]<<16|E[D+2]<<8|E[D+3];return T<0?4294967296+T:T}function i(E,D,T){"data"in E&&(D+=E.start,E=E.data),E[D]=T>>24,E[D+1]=T>>16&255,E[D+2]=T>>8&255,E[D+3]=T&255}function u(E,D){var T=[];if(!D.length)return T;var k,w,v;"data"in E?(k=E.data,w=E.start,v=E.end):(k=E,w=0,v=k.byteLength);for(var c=w;c<v;){var f=b(k,c),m=y(k.subarray(c+4,c+8)),_=f>1?c+f:v;if(m===D[0])if(D.length===1)T.push({data:k,start:c+8,end:_});else{var x=u({data:k,start:c+8,end:_},D.slice(1));x.length&&P.apply(T,x)}c=_}return T}function p(E){var D=u(E,["moov"]),T=D[0],k=T?T.end:null,w=u(E,["sidx"]);if(!w||!w[0])return null;var v=[],c=w[0],f=c.data[0],m=f===0?8:16,_=b(c,m);m+=4;var x=0,g=0;f===0?m+=8:m+=16,m+=2;var j=c.end+g,U=t(c,m);m+=2;for(var R=0;R<U;R++){var W=m,H=b(c,W);W+=4;var L=H&2147483647,G=(H&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var z=b(c,W);W+=4,v.push({referenceSize:L,subsegmentDuration:z,info:{duration:z/_,start:j,end:j+L-1}}),j+=L,W+=4,m=W}return{earliestPresentationTime:x,timescale:_,version:f,referencesCount:U,references:v,moovEndOffset:k}}function a(E){for(var D=[],T=u(E,["moov","trak"]),k=0;k<T.length;k++){var w=T[k],v=u(w,["tkhd"])[0];if(v){var c=v.data[v.start],f=c===0?12:20,m=b(v,f),_=u(w,["mdia","mdhd"])[0];if(_){c=_.data[_.start],f=c===0?12:20;var x=b(_,f),g=u(w,["mdia","hdlr"])[0];if(g){var j=y(g.data.subarray(g.start+8,g.start+12)),U={soun:S.ElementaryStreamTypes.AUDIO,vide:S.ElementaryStreamTypes.VIDEO}[j];if(U){var R=u(w,["mdia","minf","stbl","stsd"])[0],W=void 0;R&&(W=y(R.data.subarray(R.start+12,R.start+16))),D[m]={timescale:x,type:U},D[U]={timescale:x,id:m,codec:W}}}}}}var H=u(E,["moov","mvex","trex"]);return H.forEach(function(L){var G=b(L,4),z=D[G];z&&(z.default={duration:b(L,12),flags:b(L,20)})}),D}function o(E,D){return u(D,["moof","traf"]).reduce(function(T,k){var w=u(k,["tfdt"])[0],v=w.data[w.start],c=u(k,["tfhd"]).reduce(function(f,m){var _=b(m,4),x=E[_];if(x){var g=b(w,4);v===1&&(g*=Math.pow(2,32),g+=b(w,8));var j=x.timescale||9e4,U=g/j;if(isFinite(U)&&(f===null||U<f))return U}return f},null);return c!==null&&isFinite(c)&&(T===null||c<T)?c:T},null)||0}function h(E,D){for(var T=0,k=0,w=0,v=u(E,["moof","traf"]),c=0;c<v.length;c++){var f=v[c],m=u(f,["tfhd"])[0],_=b(m,4),x=D[_];if(!x)continue;var g=x.default,j=b(m,0)|(g==null?void 0:g.flags),U=g==null?void 0:g.duration;j&8&&(j&2?U=b(m,12):U=b(m,8));for(var R=x.timescale||9e4,W=u(f,["trun"]),H=0;H<W.length;H++){if(U){var L=b(W[H],4);T=U*L}else T=l(W[H]);x.type===S.ElementaryStreamTypes.VIDEO?k+=T/R:x.type===S.ElementaryStreamTypes.AUDIO&&(w+=T/R)}}if(k===0&&w===0){var G=p(E);if(G!=null&&G.references)return G.references.reduce(function(z,J){return z+J.info.duration||0},0)}return k||w}function l(E){var D=b(E,0),T=8;D&1&&(T+=4),D&4&&(T+=4);for(var k=0,w=b(E,4),v=0;v<w;v++){if(D&256){var c=b(E,T);k+=c,T+=4}D&512&&(T+=4),D&1024&&(T+=4),D&2048&&(T+=4)}return k}function n(E,D,T){u(D,["moof","traf"]).forEach(function(k){u(k,["tfhd"]).forEach(function(w){var v=b(w,4),c=E[v];if(!c)return;var f=c.timescale||9e4;u(k,["tfdt"]).forEach(function(m){var _=m.data[m.start],x=b(m,4);if(_===0)i(m,4,x-T*f);else{x*=Math.pow(2,32),x+=b(m,8),x-=T*f,x=Math.max(x,0);var g=Math.floor(x/(C+1)),j=Math.floor(x%(C+1));i(m,4,g),i(m,8,j)}})})})}function s(E){var D={valid:null,remainder:null},T=u(E,["moof"]);if(T){if(T.length<2)return D.remainder=E,D}else return D;var k=T[T.length-1];return D.valid=Object(F.sliceUint8)(E,0,k.start-8),D.remainder=Object(F.sliceUint8)(E,k.start-8),D}function d(E,D){var T=new Uint8Array(E.length+D.length);return T.set(E),T.set(D,E.length),T}},"./src/utils/output-filter.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function S(P,y){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=P,this.trackName=y}var C=S.prototype;return C.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},C.newCue=function(y,t,b){(this.startTime===null||this.startTime>y)&&(this.startTime=y),this.endTime=t,this.screen=b,this.timelineController.createCaptionsTrack(this.trackName)},C.reset=function(){this.cueRanges=[]},S}()},"./src/utils/texttrack-utils.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"sendAddTrackEvent",function(){return S}),I.d(B,"addCueToTrack",function(){return C}),I.d(B,"clearCurrentCues",function(){return P}),I.d(B,"removeCuesInRange",function(){return y}),I.d(B,"getCuesInRange",function(){return b});var F=I("./src/utils/logger.ts");function S(i,u){var p;try{p=new Event("addtrack")}catch(a){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=i,u.dispatchEvent(p)}function C(i,u){var p=i.mode;if(p==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(u.id))try{if(i.addCue(u),!i.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(o){F.logger.debug("[texttrack-utils]: "+o);var a=new self.TextTrackCue(u.startTime,u.endTime,u.text);a.id=u.id,i.addCue(a)}p==="disabled"&&(i.mode=p)}function P(i){var u=i.mode;if(u==="disabled"&&(i.mode="hidden"),i.cues)for(var p=i.cues.length;p--;)i.removeCue(i.cues[p]);u==="disabled"&&(i.mode=u)}function y(i,u,p){var a=i.mode;if(a==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var o=b(i.cues,u,p),h=0;h<o.length;h++)i.removeCue(o[h]);a==="disabled"&&(i.mode=a)}function t(i,u){if(u<i[0].startTime)return 0;var p=i.length-1;if(u>i[p].endTime)return-1;for(var a=0,o=p;a<=o;){var h=Math.floor((o+a)/2);if(u<i[h].startTime)o=h-1;else if(u>i[h].startTime&&a<p)a=h+1;else return h}return i[a].startTime-u<u-i[o].startTime?a:o}function b(i,u,p){var a=[],o=t(i,u);if(o>-1)for(var h=o,l=i.length;h<l;h++){var n=i[h];if(n.startTime>=u&&n.endTime<=p)a.push(n);else if(n.startTime>p)return a}return a}},"./src/utils/time-ranges.ts":function(X,B,I){"use strict";I.r(B);var F={toString:function(C){for(var P="",y=C.length,t=0;t<y;t++)P+="["+C.start(t).toFixed(3)+","+C.end(t).toFixed(3)+"]";return P}};B.default=F},"./src/utils/timescale-conversion.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"toTimescaleFromBase",function(){return S}),I.d(B,"toTimescaleFromScale",function(){return C}),I.d(B,"toMsFromMpegTsClock",function(){return P}),I.d(B,"toMpegTsClockFromTimescale",function(){return y});var F=9e4;function S(t,b,i,u){i===void 0&&(i=1),u===void 0&&(u=!1);var p=t*b*i;return u?Math.round(p):p}function C(t,b,i,u){return i===void 0&&(i=1),u===void 0&&(u=!1),S(t,b,1/i,u)}function P(t,b){return b===void 0&&(b=!1),S(t,1e3,1/F,b)}function y(t,b){return b===void 0&&(b=1),S(t,F,1/b)}},"./src/utils/typed-array.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"sliceUint8",function(){return F});function F(S,C,P){return Uint8Array.prototype.slice?S.slice(C,P):new Uint8Array(Array.prototype.slice.call(S,C,P))}},"./src/utils/vttcue.ts":function(X,B,I){"use strict";I.r(B),B.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var F=["","lr","rl"],S=["start","middle","end","left","right"];function C(i,u){if(typeof u!="string")return!1;if(!Array.isArray(i))return!1;var p=u.toLowerCase();return~i.indexOf(p)?p:!1}function P(i){return C(F,i)}function y(i){return C(S,i)}function t(i){for(var u=arguments.length,p=new Array(u>1?u-1:0),a=1;a<u;a++)p[a-1]=arguments[a];for(var o=1;o<arguments.length;o++){var h=arguments[o];for(var l in h)i[l]=h[l]}return i}function b(i,u,p){var a=this,o={enumerable:!0};a.hasBeenReset=!1;var h="",l=!1,n=i,s=u,d=p,E=null,D="",T=!0,k="auto",w="start",v=50,c="middle",f=50,m="middle";Object.defineProperty(a,"id",t({},o,{get:function(){return h},set:function(x){h=""+x}})),Object.defineProperty(a,"pauseOnExit",t({},o,{get:function(){return l},set:function(x){l=!!x}})),Object.defineProperty(a,"startTime",t({},o,{get:function(){return n},set:function(x){if(typeof x!="number")throw new TypeError("Start time must be set to a number.");n=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",t({},o,{get:function(){return s},set:function(x){if(typeof x!="number")throw new TypeError("End time must be set to a number.");s=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",t({},o,{get:function(){return d},set:function(x){d=""+x,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",t({},o,{get:function(){return E},set:function(x){E=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",t({},o,{get:function(){return D},set:function(x){var g=P(x);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");D=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",t({},o,{get:function(){return T},set:function(x){T=!!x,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",t({},o,{get:function(){return k},set:function(x){if(typeof x!="number"&&x!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",t({},o,{get:function(){return w},set:function(x){var g=y(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");w=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",t({},o,{get:function(){return v},set:function(x){if(x<0||x>100)throw new Error("Position must be between 0 and 100.");v=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",t({},o,{get:function(){return c},set:function(x){var g=y(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");c=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",t({},o,{get:function(){return f},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");f=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",t({},o,{get:function(){return m},set:function(x){var g=y(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");m=g,this.hasBeenReset=!0}})),a.displayState=void 0}return b.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},b}()},"./src/utils/vttparser.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"parseTimeStamp",function(){return C}),I.d(B,"fixLineBreaks",function(){return u}),I.d(B,"VTTParser",function(){return p});var F=I("./src/utils/vttcue.ts"),S=function(){function a(){}var o=a.prototype;return o.decode=function(l,n){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},a}();function C(a){function o(l,n,s,d){return(l|0)*3600+(n|0)*60+(s|0)+parseFloat(d||0)}var h=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?o(h[2],h[3],0,h[4]):o(h[1],h[2],h[3],h[4]):null}var P=function(){function a(){this.values=Object.create(null)}var o=a.prototype;return o.set=function(l,n){!this.get(l)&&n!==""&&(this.values[l]=n)},o.get=function(l,n,s){return s?this.has(l)?this.values[l]:n[s]:this.has(l)?this.values[l]:n},o.has=function(l){return l in this.values},o.alt=function(l,n,s){for(var d=0;d<s.length;++d)if(n===s[d]){this.set(l,n);break}},o.integer=function(l,n){/^-?\d+$/.test(n)&&this.set(l,parseInt(n,10))},o.percent=function(l,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var s=parseFloat(n);if(s>=0&&s<=100)return this.set(l,s),!0}return!1},a}();function y(a,o,h,l){var n=l?a.split(l):[a];for(var s in n){if(typeof n[s]!="string")continue;var d=n[s].split(h);if(d.length!==2)continue;var E=d[0],D=d[1];o(E,D)}}var t=new F.default(0,0,""),b=t.align==="middle"?"middle":"center";function i(a,o,h){var l=a;function n(){var E=C(a);if(E===null)throw new Error("Malformed timestamp: "+l);return a=a.replace(/^[^\sa-zA-Z-]+/,""),E}function s(E,D){var T=new P;y(E,function(v,c){var f;switch(v){case"region":for(var m=h.length-1;m>=0;m--)if(h[m].id===c){T.set(v,h[m].region);break}break;case"vertical":T.alt(v,c,["rl","lr"]);break;case"line":f=c.split(","),T.integer(v,f[0]),T.percent(v,f[0])&&T.set("snapToLines",!1),T.alt(v,f[0],["auto"]),f.length===2&&T.alt("lineAlign",f[1],["start",b,"end"]);break;case"position":f=c.split(","),T.percent(v,f[0]),f.length===2&&T.alt("positionAlign",f[1],["start",b,"end","line-left","line-right","auto"]);break;case"size":T.percent(v,c);break;case"align":T.alt(v,c,["start",b,"end","left","right"]);break}},/:/,/\s/),D.region=T.get("region",null),D.vertical=T.get("vertical","");var k=T.get("line","auto");k==="auto"&&t.line===-1&&(k=-1),D.line=k,D.lineAlign=T.get("lineAlign","start"),D.snapToLines=T.get("snapToLines",!0),D.size=T.get("size",100),D.align=T.get("align",b);var w=T.get("position","auto");w==="auto"&&t.position===50&&(w=D.align==="start"||D.align==="left"?0:D.align==="end"||D.align==="right"?100:50),D.position=w}function d(){a=a.replace(/^\s+/,"")}if(d(),o.startTime=n(),d(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);a=a.substr(3),d(),o.endTime=n(),d(),s(a,o)}function u(a){return a.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new S,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=a.prototype;return o.parse=function(l){var n=this;l&&(n.buffer+=n.decoder.decode(l,{stream:!0}));function s(){var w=n.buffer,v=0;for(w=u(w);v<w.length&&w[v]!=="\r"&&w[v]!==`
`;)++v;var c=w.substr(0,v);return w[v]==="\r"&&++v,w[v]===`
`&&++v,n.buffer=w.substr(v),c}function d(w){y(w,function(v,c){},/:/)}try{var E="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;E=s();var D=E.match(/^()?WEBVTT([ \t].*)?$/);if(!D||!D[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var T=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;T?T=!1:E=s();switch(n.state){case"HEADER":/:/.test(E)?d(E):E||(n.state="ID");continue;case"NOTE":E||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){n.state="NOTE";break}if(!E)continue;if(n.cue=new F.default(0,0,""),n.state="CUE",E.indexOf("-->")===-1){n.cue.id=E;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{i(E,n.cue,n.regionList)}catch(w){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var k=E.indexOf("-->")!==-1;if(!E||k&&(T=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=E}continue;case"BADCUE":E||(n.state="ID")}}}catch(w){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.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(n){l.onparsingerror&&l.onparsingerror(n)}return l.onflush&&l.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(X,B,I){"use strict";I.r(B),I.d(B,"generateCueId",function(){return p}),I.d(B,"parseWebVTT",function(){return o});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/vttparser.ts"),C=I("./src/demux/id3.ts"),P=I("./src/utils/timescale-conversion.ts"),y=I("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,b=function(l,n,s){return s===void 0&&(s=0),l.substr(s,n.length)===n},i=function(l){var n=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),d=parseInt(l.substr(-9,2)),E=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(F.isFiniteNumber)(n)||!Object(F.isFiniteNumber)(s)||!Object(F.isFiniteNumber)(d)||!Object(F.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return n+=1e3*s,n+=60*1e3*d,n+=60*60*1e3*E,n},u=function(l){for(var n=5381,s=l.length;s;)n=n*33^l.charCodeAt(--s);return(n>>>0).toString()};function p(h,l,n){return u(h.toString())+u(l.toString())+u(n)}var a=function(l,n,s){var d=l[n],E=l[d.prevCC];if(!E||!E.new&&d.new){l.ccOffset=l.presentationOffset=d.start,d.new=!1;return}for(;(D=E)!==null&&D!==void 0&&D.new;){var D;l.ccOffset+=d.start-E.start,d.new=!1,d=E,E=l[d.prevCC]}l.presentationOffset=s};function o(h,l,n,s,d,E,D,T){var k=new S.VTTParser,w=Object(C.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(t,`
`).split(`
`),v=[],c=Object(P.toMpegTsClockFromTimescale)(l,n),f="00:00.000",m=0,_=0,x,g=!0,j=!1;k.oncue=function(U){var R=s[d],W=s.ccOffset,H=(m-c)/9e4;if(R!=null&&R.new&&(_!==void 0?W=s.ccOffset=R.start:a(s,d,H)),H&&(W=H-s.presentationOffset),j){var L=U.endTime-U.startTime,G=Object(y.normalizePts)((U.startTime+W-_)*9e4,E*9e4)/9e4;U.startTime=G,U.endTime=G+L}var z=U.text.trim();U.text=decodeURIComponent(encodeURIComponent(z)),U.id||(U.id=p(U.startTime,U.endTime,z)),U.endTime>0&&v.push(U)},k.onparsingerror=function(U){x=U},k.onflush=function(){if(x){T(x);return}D(v)},w.forEach(function(U){if(g)if(b(U,"X-TIMESTAMP-MAP=")){g=!1,j=!0,U.substr(16).split(",").forEach(function(R){b(R,"LOCAL:")?f=R.substr(6):b(R,"MPEGTS:")&&(m=parseInt(R.substr(7)))});try{_=i(f)/1e3}catch(R){j=!1,x=R}return}else U===""&&(g=!1);k.parse(U+`
`)}),k.flush()}},"./src/utils/xhr-loader.ts":function(X,B,I){"use strict";I.r(B);var F=I("./src/utils/logger.ts"),S=I("./src/loader/load-stats.ts"),C=/^age:\s*[\d.]+\s*$/m,P=function(){function y(b){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=b?b.xhrSetup:null,this.stats=new S.LoadStats,this.retryDelay=0}var t=y.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},t.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(i,u,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=u,this.callbacks=p,this.retryDelay=u.retryDelay,this.loadInternal()},t.loadInternal=function(){var i=this.config,u=this.context;if(!i)return;var p=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var o=this.xhrSetup;try{if(o)try{o(p,u.url)}catch(n){p.open("GET",u.url,!0),o(p,u.url)}p.readyState||p.open("GET",u.url,!0);var h=this.context.headers;if(h)for(var l in h)p.setRequestHeader(l,h[l])}catch(n){this.callbacks.onError({code:p.status,text:n.message},u,p);return}u.rangeEnd&&p.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),p.send()},t.readystatechange=function(){var i=this.context,u=this.loader,p=this.stats;if(!i||!u)return;var a=u.readyState,o=this.config;if(p.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),a===4){u.onreadystatechange=null,u.onprogress=null;var h=u.status;if(h>=200&&h<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var l,n;if(i.responseType==="arraybuffer"?(l=u.response,n=l.byteLength):(l=u.responseText,n=l.length),p.loaded=p.total=n,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,i,l,u),!this.callbacks)return;var d={url:u.responseURL,data:l};this.callbacks.onSuccess(d,p,i,u)}else p.retry>=o.maxRetry||h>=400&&h<499?(F.logger.error(h+" while loading "+i.url),this.callbacks.onError({code:h,text:u.statusText},i,u)):(F.logger.warn(h+" while loading "+i.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,o.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.loadtimeout=function(){F.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(i){var u=this.stats;u.loaded=i.loaded,i.lengthComputable&&(u.total=i.total)},t.getCacheAge=function(){var i=null;if(this.loader&&C.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");i=u?parseFloat(u):null}return i},y}();B.default=P}}).default})},vHTk:function(ze,ee,M){ze.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(ze,ee,M){var X=M("SrGk"),B=M("bYtY");function I(C,P){X.call(this,C,P,["filter"],"__filter_in_use__","_shadowDom")}B.inherits(I,X),I.prototype.addWithoutUpdate=function(C,P){if(P&&F(P.style)){var y;if(P._shadowDom){y=P._shadowDom;var t=this.getDefs(!0);t.contains(P._shadowDom)||this.addDom(y)}else y=this.add(P);this.markUsed(P);var b=y.getAttribute("id");C.style.filter="url(#"+b+")"}},I.prototype.add=function(C){var P=this.createElement("filter");return C._shadowDomId=C._shadowDomId||this.nextId++,P.setAttribute("id","zr"+this._zrId+"-shadow-"+C._shadowDomId),this.updateDom(C,P),this.addDom(P),P},I.prototype.update=function(C,P){var y=P.style;if(F(y)){var t=this;X.prototype.update.call(this,P,function(){t.updateDom(P,P._shadowDom)})}else this.remove(C,P)},I.prototype.remove=function(C,P){P._shadowDomId!=null&&(this.removeDom(C),C.style.filter="")},I.prototype.updateDom=function(C,P){var y=P.getElementsByTagName("feDropShadow");y.length===0?y=this.createElement("feDropShadow"):y=y[0];var t=C.style,b=C.scale&&C.scale[0]||1,i=C.scale&&C.scale[1]||1,u,p,a,o;if(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)u=t.shadowOffsetX||0,p=t.shadowOffsetY||0,a=t.shadowBlur,o=t.shadowColor;else if(t.textShadowBlur)u=t.textShadowOffsetX||0,p=t.textShadowOffsetY||0,a=t.textShadowBlur,o=t.textShadowColor;else{this.removeDom(P,t);return}y.setAttribute("dx",u/b),y.setAttribute("dy",p/i),y.setAttribute("flood-color",o);var h=a/2/b,l=a/2/i,n=h+" "+l;y.setAttribute("stdDeviation",n),P.setAttribute("x","-100%"),P.setAttribute("y","-100%"),P.setAttribute("width",Math.ceil(a/2*200)+"%"),P.setAttribute("height",Math.ceil(a/2*200)+"%"),P.appendChild(y),C._shadowDom=P},I.prototype.markUsed=function(C){C._shadowDom&&X.prototype.markUsed.call(this,C._shadowDom)};function F(C){return C&&(C.shadowBlur||C.shadowOffsetX||C.shadowOffsetY||C.textShadowBlur||C.textShadowOffsetX||C.textShadowOffsetY)}var S=I;ze.exports=S},vWvF:function(ze,ee,M){var X=M("Bq2U"),B=M("SUKs"),I=M("bYtY"),F=I.isString,S=I.isFunction,C=I.isObject,P=I.isArrayLike,y=I.indexOf,t=function(){this.animators=[]};t.prototype={constructor:t,animate:function(a,o){var h,l=!1,n=this,s=this.__zr;if(a){var d=a.split("."),E=n;l=d[0]==="shape";for(var D=0,T=d.length;D<T;D++){if(!E)continue;E=E[d[D]]}E&&(h=E)}else h=n;if(!h){B('Property "'+a+'" is not existed in element '+n.id);return}var k=n.animators,w=new X(h,o);return w.during(function(v){n.dirty(l)}).done(function(){k.splice(y(k,w),1)}),k.push(w),s&&s.animation.addAnimator(w),w},stopAnimation:function(a){for(var o=this.animators,h=o.length,l=0;l<h;l++)o[l].stop(a);return o.length=0,this},animateTo:function(a,o,h,l,n,s){b(this,a,o,h,l,n,s)},animateFrom:function(a,o,h,l,n,s){b(this,a,o,h,l,n,s,!0)}};function b(a,o,h,l,n,s,d,E){F(l)?(s=n,n=l,l=0):S(n)?(s=n,n="linear",l=0):S(l)?(s=l,l=0):S(h)?(s=h,h=500):h||(h=500),a.stopAnimation(),i(a,"",a,o,h,l,E);var D=a.animators.slice(),T=D.length;function k(){T--,T||s&&s()}T||s&&s();for(var w=0;w<D.length;w++)D[w].done(k).start(n,d)}function i(a,o,h,l,n,s,d){var E={},D=0;for(var T in l){if(!l.hasOwnProperty(T))continue;h[T]!=null?C(l[T])&&!P(l[T])?i(a,o?o+"."+T:T,h[T],l[T],n,s,d):(d?(E[T]=h[T],u(a,o,T,l[T])):E[T]=l[T],D++):l[T]!=null&&!d&&u(a,o,T,l[T])}D>0&&a.animate(o,!1).when(n==null?500:n,E).delay(s||0)}function u(a,o,h,l){if(!o)a.attr(h,l);else{var n={};n[o]={},n[o][h]=l,a.attr(n)}}var p=t;ze.exports=p},wCXF:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return Dt});var X=M("rePB"),B=M("VTBJ"),I=M("KQm4"),F=M("U8pU"),S=M("ODXe"),C=M("q1tI"),P=M("TSYQ"),y=M.n(P),t=M("Gytx"),b=M.n(t),i=M("Kwbf"),u=M("t23M"),p=M("qx4F"),a=M("6eGT"),o=M("IBYe"),h=M("Ff2n"),l=M("c+Xe"),n=M("fyJ8"),s=M("biw7");function d(Ne,Pe,it,gt,fe){var ae=it[Ne]||{},se=it[Pe]||{},de,ve;ae.fixed==="left"?de=gt.left[Ne]:se.fixed==="right"&&(ve=gt.right[Pe]);var ie=!1,oe=!1,pe=!1,we=!1,Ae=it[Pe+1],Me=it[Ne-1];if(fe==="rtl"){if(de!==void 0){var rt=Me&&Me.fixed==="left";we=!rt}else if(ve!==void 0){var Pt=Ae&&Ae.fixed==="right";pe=!Pt}}else if(de!==void 0){var Xt=Ae&&Ae.fixed==="left";ie=!Xt}else if(ve!==void 0){var lt=Me&&Me.fixed==="right";oe=!lt}return{fixLeft:de,fixRight:ve,lastFixLeft:ie,firstFixRight:oe,lastFixRight:pe,firstFixLeft:we,isSticky:gt.isSticky}}var E=M("sR1s");function D(Ne){var Pe=Ne.cells,it=Ne.stickyOffsets,gt=Ne.flattenColumns,fe=Ne.rowComponent,ae=Ne.cellComponent,se=Ne.onHeaderRow,de=Ne.index,ve=C.useContext(s.a),ie=ve.prefixCls,oe=ve.direction,pe;se&&(pe=se(Pe.map(function(Ae){return Ae.column}),de));var we=Object(E.a)(Pe.map(function(Ae){return Ae.column}));return C.createElement(fe,Object.assign({},pe),Pe.map(function(Ae,Me){var rt=Ae.column,Pt=d(Ae.colStart,Ae.colEnd,gt,it,oe),Xt;return rt&&rt.onHeaderCell&&(Xt=Ae.column.onHeaderCell(rt)),C.createElement(n.a,Object.assign({},Ae,{ellipsis:rt.ellipsis,align:rt.align,component:ae,prefixCls:ie,key:we[Me]},Pt,{additionalProps:Xt,rowType:"header"}))}))}D.displayName="HeaderRow";var T=D;function k(Ne){var Pe=[];function it(se,de){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[ve]=Pe[ve]||[];var ie=de,oe=se.filter(Boolean).map(function(pe){var we={key:pe.key,className:pe.className||"",children:pe.title,column:pe,colStart:ie},Ae=1,Me=pe.children;return Me&&Me.length>0&&(Ae=it(Me,ie,ve+1).reduce(function(rt,Pt){return rt+Pt},0),we.hasSubColumns=!0),"colSpan"in pe&&(Ae=pe.colSpan),"rowSpan"in pe&&(we.rowSpan=pe.rowSpan),we.colSpan=Ae,we.colEnd=we.colStart+Ae-1,Pe[ve].push(we),ie+=Ae,Ae});return oe}it(Ne,0);for(var gt=Pe.length,fe=function(de){Pe[de].forEach(function(ve){!("rowSpan"in ve)&&!ve.hasSubColumns&&(ve.rowSpan=gt-de)})},ae=0;ae<gt;ae+=1)fe(ae);return Pe}function w(Ne){var Pe=Ne.stickyOffsets,it=Ne.columns,gt=Ne.flattenColumns,fe=Ne.onHeaderRow,ae=C.useContext(s.a),se=ae.prefixCls,de=ae.getComponent,ve=C.useMemo(function(){return k(it)},[it]),ie=de(["header","wrapper"],"thead"),oe=de(["header","row"],"tr"),pe=de(["header","cell"],"th");return C.createElement(ie,{className:"".concat(se,"-thead")},ve.map(function(we,Ae){var Me=C.createElement(T,{key:Ae,flattenColumns:gt,cells:we,stickyOffsets:Pe,rowComponent:oe,cellComponent:pe,onHeaderRow:fe,index:Ae});return Me}))}var v=w,c=M("hW8S");function f(Ne){for(var Pe=Ne.colWidths,it=Ne.columns,gt=Ne.columCount,fe=[],ae=gt||it.length,se=!1,de=ae-1;de>=0;de-=1){var ve=Pe[de],ie=it&&it[de],oe=ie&&ie[c.a];(ve||oe||se)&&(fe.unshift(C.createElement("col",Object.assign({key:de,style:{width:ve,minWidth:ve}},oe))),se=!0)}return C.createElement("colgroup",null,fe)}var m=f;function _(Ne,Pe){return Object(C.useMemo)(function(){for(var it=[],gt=0;gt<Pe;gt+=1){var fe=Ne[gt];if(fe!==void 0)it[gt]=fe;else return null}return it},[Ne.join("_"),Pe])}var x=C.forwardRef(function(Ne,Pe){var it=Ne.noData,gt=Ne.columns,fe=Ne.flattenColumns,ae=Ne.colWidths,se=Ne.columCount,de=Ne.stickyOffsets,ve=Ne.direction,ie=Ne.fixHeader,oe=Ne.offsetHeader,pe=Ne.stickyClassName,we=Ne.onScroll,Ae=Object(h.a)(Ne,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Me=C.useContext(s.a),rt=Me.prefixCls,Pt=Me.scrollbarSize,Xt=Me.isSticky,lt=Xt&&!ie?0:Pt,zt=C.useRef(null),mt=C.useCallback(function(jt){Object(l.b)(Pe,jt),Object(l.b)(zt,jt)},[]);C.useEffect(function(){var jt;function Gt(Ze){var at=Ze.currentTarget,Tt=Ze.deltaX;Tt&&(we({currentTarget:at,scrollLeft:at.scrollLeft+Tt}),Ze.preventDefault())}return(jt=zt.current)===null||jt===void 0||jt.addEventListener("wheel",Gt),function(){var Ze;(Ze=zt.current)===null||Ze===void 0||Ze.removeEventListener("wheel",Gt)}},[]);var _t=fe[fe.length-1],ot={fixed:_t?_t.fixed:null,onHeaderCell:function(){return{className:"".concat(rt,"-cell-scrollbar")}}},Se=Object(C.useMemo)(function(){return lt?[].concat(Object(I.a)(gt),[ot]):gt},[lt,gt]),Ue=Object(C.useMemo)(function(){return lt?[].concat(Object(I.a)(fe),[ot]):fe},[lt,fe]),At=Object(C.useMemo)(function(){var jt=de.right,Gt=de.left;return Object(B.a)(Object(B.a)({},de),{},{left:ve==="rtl"?[].concat(Object(I.a)(Gt.map(function(Ze){return Ze+lt})),[0]):Gt,right:ve==="rtl"?jt:[].concat(Object(I.a)(jt.map(function(Ze){return Ze+lt})),[0]),isSticky:Xt})},[lt,de,Xt]),pt=_(ae,se);return C.createElement("div",{style:Object(B.a)({overflow:"hidden"},Xt?{top:oe}:{}),ref:mt,className:y()("".concat(rt,"-header"),Object(X.a)({},pe,!!pe))},C.createElement("table",{style:{tableLayout:"fixed",visibility:it||pt?null:"hidden"}},C.createElement(m,{colWidths:pt?[].concat(Object(I.a)(pt),[lt]):[],columCount:se+1,columns:Ue}),C.createElement(v,Object.assign({},Ae,{stickyOffsets:At,columns:Se,flattenColumns:Ue}))))});x.displayName="FixedHeader";var g=x,j=C.createContext(null),U=j;function R(Ne){var Pe=Ne.prefixCls,it=Ne.children,gt=Ne.component,fe=Ne.cellComponent,ae=Ne.fixHeader,se=Ne.fixColumn,de=Ne.horizonScroll,ve=Ne.className,ie=Ne.expanded,oe=Ne.componentWidth,pe=Ne.colSpan,we=C.useContext(s.a),Ae=we.scrollbarSize;return C.useMemo(function(){var Me=it;return se&&(Me=C.createElement("div",{style:{width:oe-(ae?Ae:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},Me)),C.createElement(gt,{className:ve,style:{display:ie?null:"none"}},C.createElement(n.a,{component:fe,prefixCls:Pe,colSpan:pe},Me))},[it,gt,ae,de,ve,ie,oe,pe,Ae])}var W=R;function H(Ne){var Pe=Ne.className,it=Ne.style,gt=Ne.record,fe=Ne.index,ae=Ne.rowKey,se=Ne.getRowKey,de=Ne.rowExpandable,ve=Ne.expandedKeys,ie=Ne.onRow,oe=Ne.indent,pe=oe===void 0?0:oe,we=Ne.rowComponent,Ae=Ne.cellComponent,Me=Ne.childrenColumnName,rt=C.useContext(s.a),Pt=rt.prefixCls,Xt=rt.fixedInfoList,lt=C.useContext(U),zt=lt.fixHeader,mt=lt.fixColumn,_t=lt.horizonScroll,ot=lt.componentWidth,Se=lt.flattenColumns,Ue=lt.expandableType,At=lt.expandRowByClick,pt=lt.onTriggerExpand,jt=lt.rowClassName,Gt=lt.expandedRowClassName,Ze=lt.indentSize,at=lt.expandIcon,Tt=lt.expandedRowRender,Ht=lt.expandIconColumnIndex,Jt=C.useState(!1),on=Object(S.a)(Jt,2),Qn=on[0],Hn=on[1],nn=ve&&ve.has(Ne.recordKey);C.useEffect(function(){nn&&Hn(!0)},[nn]);var Un=Ue==="row"&&(!de||de(gt)),ar=Ue==="nest",xn=Me&&gt&&gt[Me],zn=Un||ar,nr;ie&&(nr=ie(gt,fe));var Lr=function($n){if(At&&zn&&pt(gt,$n),nr&&nr.onClick){for(var ma,sn=arguments.length,oa=new Array(sn>1?sn-1:0),Xr=1;Xr<sn;Xr++)oa[Xr-1]=arguments[Xr];(ma=nr).onClick.apply(ma,[$n].concat(oa))}},Cr;typeof jt=="string"?Cr=jt:typeof jt=="function"&&(Cr=jt(gt,fe,pe));var en=Object(E.a)(Se),Yn=C.createElement(we,Object.assign({},nr,{"data-row-key":ae,className:y()(Pe,"".concat(Pt,"-row"),"".concat(Pt,"-row-level-").concat(pe),Cr,nr&&nr.className),style:Object(B.a)(Object(B.a)({},it),nr?nr.style:null),onClick:Lr}),Se.map(function(Jr,$n){var ma=Jr.render,sn=Jr.dataIndex,oa=Jr.className,Xr=en[$n],Ua=Xt[$n],xa;$n===(Ht||0)&&ar&&(xa=C.createElement(C.Fragment,null,C.createElement("span",{style:{paddingLeft:"".concat(Ze*pe,"px")},className:"".concat(Pt,"-row-indent indent-level-").concat(pe)}),at({prefixCls:Pt,expanded:nn,expandable:xn,record:gt,onExpand:pt})));var ga;return Jr.onCell&&(ga=Jr.onCell(gt,fe)),C.createElement(n.a,Object.assign({className:oa,ellipsis:Jr.ellipsis,align:Jr.align,component:Ae,prefixCls:Pt,key:Xr,record:gt,index:fe,dataIndex:sn,render:ma,shouldCellUpdate:Jr.shouldCellUpdate},Ua,{appendNode:xa,additionalProps:ga}))})),na;if(Un&&(Qn||nn)){var Ea=Tt(gt,fe,pe+1,nn),$r=Gt&&Gt(gt,fe,pe);na=C.createElement(W,{expanded:nn,className:y()("".concat(Pt,"-expanded-row"),"".concat(Pt,"-expanded-row-level-").concat(pe+1),$r),prefixCls:Pt,fixHeader:zt,fixColumn:mt,horizonScroll:_t,component:we,componentWidth:ot,cellComponent:Ae,colSpan:Se.length},Ea)}var Qr;return xn&&nn&&(Qr=(gt[Me]||[]).map(function(Jr,$n){var ma=se(Jr,$n);return C.createElement(H,Object.assign({},Ne,{key:ma,rowKey:ma,record:Jr,recordKey:ma,index:$n,indent:pe+1}))})),C.createElement(C.Fragment,null,Yn,na,Qr)}H.displayName="BodyRow";var L=H,G=C.createContext(null),z=G;function J(Ne){var Pe=Ne.columnKey,it=Ne.onColumnResize,gt=C.useRef();return C.useEffect(function(){gt.current&&it(Pe,gt.current.offsetWidth)},[]),C.createElement(u.a,{onResize:function(ae){var se=ae.offsetWidth;it(Pe,se)}},C.createElement("td",{ref:gt,style:{padding:0,border:0,height:0}},C.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function te(Ne){var Pe=Ne.data,it=Ne.getRowKey,gt=Ne.measureColumnWidth,fe=Ne.expandedKeys,ae=Ne.onRow,se=Ne.rowExpandable,de=Ne.emptyNode,ve=Ne.childrenColumnName,ie=C.useContext(z),oe=ie.onColumnResize,pe=C.useContext(s.a),we=pe.prefixCls,Ae=pe.getComponent,Me=C.useContext(U),rt=Me.fixHeader,Pt=Me.horizonScroll,Xt=Me.flattenColumns,lt=Me.componentWidth;return C.useMemo(function(){var zt=Ae(["body","wrapper"],"tbody"),mt=Ae(["body","row"],"tr"),_t=Ae(["body","cell"],"td"),ot;Pe.length?ot=Pe.map(function(Ue,At){var pt=it(Ue,At);return C.createElement(L,{key:pt,rowKey:pt,record:Ue,recordKey:pt,index:At,rowComponent:mt,cellComponent:_t,expandedKeys:fe,onRow:ae,getRowKey:it,rowExpandable:se,childrenColumnName:ve})}):ot=C.createElement(W,{expanded:!0,className:"".concat(we,"-placeholder"),prefixCls:we,fixHeader:rt,fixColumn:Pt,horizonScroll:Pt,component:mt,componentWidth:lt,cellComponent:_t,colSpan:Xt.length},de);var Se=Object(E.a)(Xt);return C.createElement(zt,{className:"".concat(we,"-tbody")},gt&&C.createElement("tr",{"aria-hidden":"true",className:"".concat(we,"-measure-row"),style:{height:0}},Se.map(function(Ue){return C.createElement(J,{key:Ue,columnKey:Ue,onColumnResize:oe})})),ot)},[Pe,we,ae,gt,fe,it,Ae,lt,de,Xt])}var _e=C.memo(te);_e.displayName="Body";var ce=_e,xe=M("wRmb"),Te=M("xEkU"),je=M.n(Te);function Ce(Ne){var Pe=Object(C.useRef)(Ne),it=Object(C.useState)({}),gt=Object(S.a)(it,2),fe=gt[1],ae=Object(C.useRef)(null),se=Object(C.useRef)([]);function de(ve){ae.current===null&&(se.current=[],ae.current=je()(function(){se.current.forEach(function(ie){Pe.current=ie(Pe.current)}),ae.current=null,fe({})})),se.current.push(ve)}return Object(C.useEffect)(function(){return function(){je.a.cancel(ae.current)}},[]),[Pe.current,de]}function Z(Ne){var Pe=Object(C.useRef)(Ne),it=Object(C.useRef)(null);function gt(){window.clearTimeout(it.current)}function fe(se){Pe.current=se,gt(),it.current=window.setTimeout(function(){Pe.current=null,it.current=null},100)}function ae(){return Pe.current}return Object(C.useEffect)(function(){return gt},[]),[fe,ae]}function K(Ne,Pe,it){var gt=Object(C.useMemo)(function(){for(var fe=[],ae=[],se=0,de=0,ve=0;ve<Pe;ve+=1)if(it==="rtl"){ae[ve]=de,de+=Ne[ve]||0;var ie=Pe-ve-1;fe[ie]=se,se+=Ne[ie]||0}else{fe[ve]=se,se+=Ne[ve]||0;var oe=Pe-ve-1;ae[oe]=de,de+=Ne[oe]||0}return{left:fe,right:ae}},[Ne,Pe,it]);return gt}var V=K;function $(Ne){var Pe=Ne.className,it=Ne.children;return C.createElement("div",{className:Pe},it)}var q=$,Q=M("n6Qo");function ge(Ne){var Pe,it=Ne.prefixCls,gt=Ne.record,fe=Ne.onExpand,ae=Ne.expanded,se=Ne.expandable,de="".concat(it,"-row-expand-icon");if(!se)return C.createElement("span",{className:y()(de,"".concat(it,"-row-spaced"))});var ve=function(oe){fe(gt,oe),oe.stopPropagation()};return C.createElement("span",{className:y()(de,(Pe={},Object(X.a)(Pe,"".concat(it,"-row-expanded"),ae),Object(X.a)(Pe,"".concat(it,"-row-collapsed"),!ae),Pe)),onClick:ve})}function Oe(Ne,Pe,it){var gt=[];function fe(ae){(ae||[]).forEach(function(se,de){gt.push(Pe(se,de)),fe(se[it])})}return fe(Ne),gt}var Ye=M("zT1h"),le=M("y0+3"),Ee=function(Pe,it){var gt,fe,ae=Pe.scrollBodyRef,se=Pe.onScroll,de=Pe.offsetScroll,ve=C.useContext(s.a),ie=ve.prefixCls,oe=((gt=ae.current)===null||gt===void 0?void 0:gt.scrollWidth)||0,pe=((fe=ae.current)===null||fe===void 0?void 0:fe.clientWidth)||0,we=oe&&pe*(pe/oe),Ae=C.useRef(),Me=Ce({scrollLeft:0,isHiddenScrollBar:!1}),rt=Object(S.a)(Me,2),Pt=rt[0],Xt=rt[1],lt=C.useRef({delta:0,x:0}),zt=C.useState(!1),mt=Object(S.a)(zt,2),_t=mt[0],ot=mt[1],Se=function(){ot(!1)},Ue=function(Ze){Ze.persist(),lt.current.delta=Ze.pageX-Pt.scrollLeft,lt.current.x=0,ot(!0),Ze.preventDefault()},At=function(Ze){var at,Tt=Ze||((at=window)===null||at===void 0?void 0:at.event),Ht=Tt.buttons;if(!_t||Ht===0){_t&&ot(!1);return}var Jt=lt.current.x+Ze.pageX-lt.current.x-lt.current.delta;Jt<=0&&(Jt=0),Jt+we>=pe&&(Jt=pe-we),se({scrollLeft:Jt/pe*(oe+2)}),lt.current.x=Ze.pageX},pt=function(){var Ze=Object(le.b)(ae.current).top,at=Ze+ae.current.offsetHeight,Tt=document.documentElement.scrollTop+window.innerHeight;at-Object(p.a)()<=Tt||Ze>=Tt-de?Xt(function(Ht){return Object(B.a)(Object(B.a)({},Ht),{},{isHiddenScrollBar:!0})}):Xt(function(Ht){return Object(B.a)(Object(B.a)({},Ht),{},{isHiddenScrollBar:!1})})},jt=function(Ze){Xt(function(at){return Object(B.a)(Object(B.a)({},at),{},{scrollLeft:Ze/oe*pe||0})})};return C.useImperativeHandle(it,function(){return{setScrollLeft:jt}}),C.useEffect(function(){var Gt=Object(Ye.a)(document.body,"mouseup",Se,!1),Ze=Object(Ye.a)(document.body,"mousemove",At,!1);return pt(),function(){Gt.remove(),Ze.remove()}},[we,_t]),C.useEffect(function(){var Gt=Object(Ye.a)(window,"scroll",pt,!1),Ze=Object(Ye.a)(window,"resize",pt,!1);return function(){Gt.remove(),Ze.remove()}},[]),C.useEffect(function(){Pt.isHiddenScrollBar||Xt(function(Gt){var Ze,at;return Object(B.a)(Object(B.a)({},Gt),{},{scrollLeft:ae.current.scrollLeft/((Ze=ae.current)===null||Ze===void 0?void 0:Ze.scrollWidth)*((at=ae.current)===null||at===void 0?void 0:at.clientWidth)})})},[Pt.isHiddenScrollBar]),oe<=pe||!we||Pt.isHiddenScrollBar?null:C.createElement("div",{style:{height:Object(p.a)(),width:pe,bottom:de},className:"".concat(ie,"-sticky-scroll")},C.createElement("div",{onMouseDown:Ue,ref:Ae,className:y()("".concat(ie,"-sticky-scroll-bar"),Object(X.a)({},"".concat(ie,"-sticky-scroll-bar-active"),_t)),style:{width:"".concat(we,"px"),transform:"translate3d(".concat(Pt.scrollLeft,"px, 0, 0)")}}))},Re=C.forwardRef(Ee);function He(Ne,Pe){return C.useMemo(function(){var it=!!Ne;return{isSticky:it,stickyClassName:it?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(F.a)(Ne)==="object"&&Ne.offsetHeader||0,offsetScroll:Object(F.a)(Ne)==="object"&&Ne.offsetScroll||0}},[Ne,Pe])}var et=[],ut={},Dt="rc-table-internal-hook",We=C.memo(function(Ne){var Pe=Ne.children;return Pe},function(Ne,Pe){return b()(Ne.props,Pe.props)?Ne.pingLeft!==Pe.pingLeft||Ne.pingRight!==Pe.pingRight:!1});function Mt(Ne){var Pe,it=Ne.prefixCls,gt=Ne.className,fe=Ne.rowClassName,ae=Ne.style,se=Ne.data,de=Ne.rowKey,ve=Ne.scroll,ie=Ne.tableLayout,oe=Ne.direction,pe=Ne.title,we=Ne.footer,Ae=Ne.summary,Me=Ne.id,rt=Ne.showHeader,Pt=Ne.components,Xt=Ne.emptyText,lt=Ne.onRow,zt=Ne.onHeaderRow,mt=Ne.internalHooks,_t=Ne.transformColumns,ot=Ne.internalRefs,Se=Ne.sticky,Ue=se||et,At=!!Ue.length,pt=C.useState(0),jt=Object(S.a)(pt,2),Gt=jt[0],Ze=jt[1];C.useEffect(function(){Ze(Object(p.a)())});var at=C.useMemo(function(){return Object(E.c)(Pt,{})},[Pt]),Tt=C.useCallback(function(Mn,Nn){return Object(E.b)(at,Mn)||Nn},[at]),Ht=C.useMemo(function(){return typeof de=="function"?de:function(Mn){var Nn=Mn&&Mn[de];return Nn}},[de]),Jt=Object(c.c)(Ne),on=Jt.expandIcon,Qn=Jt.expandedRowKeys,Hn=Jt.defaultExpandedRowKeys,nn=Jt.defaultExpandAllRows,Un=Jt.expandedRowRender,ar=Jt.onExpand,xn=Jt.onExpandedRowsChange,zn=Jt.expandRowByClick,nr=Jt.rowExpandable,Lr=Jt.expandIconColumnIndex,Cr=Jt.expandedRowClassName,en=Jt.childrenColumnName,Yn=Jt.indentSize,na=on||ge,Ea=en||"children",$r=C.useMemo(function(){return Un?"row":Ne.expandable&&mt===Dt&&Ne.expandable.__PARENT_RENDER_ICON__||Ue.some(function(Mn){return Mn&&Object(F.a)(Mn)==="object"&&Mn[Ea]})?"nest":!1},[!!Un,Ue]),Qr=C.useState(function(){return Hn||(nn?Oe(Ue,Ht,Ea):[])}),Jr=Object(S.a)(Qr,2),$n=Jr[0],ma=Jr[1],sn=C.useMemo(function(){return new Set(Qn||$n||[])},[Qn,$n]),oa=C.useCallback(function(Mn){var Nn=Ht(Mn,Ue.indexOf(Mn)),Kn,vr=sn.has(Nn);vr?(sn.delete(Nn),Kn=Object(I.a)(sn)):Kn=[].concat(Object(I.a)(sn),[Nn]),ma(Kn),ar&&ar(!vr,Mn),xn&&xn(Kn)},[Ht,sn,Ue,ar,xn]),Xr=C.useState(0),Ua=Object(S.a)(Xr,2),xa=Ua[0],ga=Ua[1],Ya=Object(xe.b)(Object(B.a)(Object(B.a)(Object(B.a)({},Ne),Jt),{},{expandable:!!Un,expandedKeys:sn,getRowKey:Ht,onTriggerExpand:oa,expandIcon:na,expandIconColumnIndex:Lr,direction:oe}),mt===Dt?_t:null),Ka=Object(S.a)(Ya,2),da=Ka[0],Sn=Ka[1],hn=C.useMemo(function(){return{columns:da,flattenColumns:Sn}},[da,Sn]),pn=C.useRef(),kn=C.useRef(),cr=C.useRef(),qn=C.useState(!1),Xn=Object(S.a)(qn,2),Dn=Xn[0],hr=Xn[1],jn=C.useState(!1),Jn=Object(S.a)(jn,2),rr=Jn[0],wn=Jn[1],Er=Ce(new Map),Sr=Object(S.a)(Er,2),gr=Sr[0],sr=Sr[1],re=Object(E.a)(Sn),Le=re.map(function(Mn){return gr.get(Mn)}),Xe=C.useMemo(function(){return Le},[Le.join("_")]),ke=V(Xe,Sn.length,oe),dt=ve&&Object(E.d)(ve.y),tt=ve&&Object(E.d)(ve.x),ht=tt&&Sn.some(function(Mn){var Nn=Mn.fixed;return Nn}),xt=C.useRef(),Rt=He(Se,it),st=Rt.isSticky,Kt=Rt.offsetHeader,Zt=Rt.offsetScroll,Et=Rt.stickyClassName,Vt,$e,Yt;dt&&($e={overflowY:"scroll",maxHeight:ve.y}),tt&&(Vt={overflowX:"auto"},dt||($e={overflowY:"hidden"}),Yt={width:ve.x===!0?"auto":ve.x,minWidth:"100%"});var Nt=C.useCallback(function(Mn,Nn){sr(function(Kn){var vr=new Map(Kn);return vr.set(Mn,Nn),vr})},[]),un=Z(null),yn=Object(S.a)(un,2),Cn=yn[0],wt=yn[1];function kt(Mn,Nn){if(!Nn)return;typeof Nn=="function"?Nn(Mn):Nn.scrollLeft!==Mn&&(Nn.scrollLeft=Mn)}var mn=function(Nn){var Kn=Nn.currentTarget,vr=Nn.scrollLeft,Rr=typeof vr=="number"?vr:Kn.scrollLeft,Br=Kn||ut;if(!wt()||wt()===Br){var sa;Cn(Br),kt(Rr,kn.current),kt(Rr,cr.current),kt(Rr,(sa=xt.current)===null||sa===void 0?void 0:sa.setScrollLeft)}if(Kn){var la=Kn.scrollWidth,ca=Kn.clientWidth;hr(Rr>0),wn(Rr<la-ca)}},dn=function(){cr.current&&mn({currentTarget:cr.current})},vt=function(Nn){var Kn=Nn.width;dn(),ga(pn.current?pn.current.offsetWidth:Kn)};C.useEffect(function(){return dn},[]),C.useEffect(function(){tt&&dn()},[tt]),C.useEffect(function(){mt===Dt&&ot&&(ot.body.current=cr.current)});var St=Tt(["table"],"table"),Ot=C.useMemo(function(){return ie||(ht?ve.x==="max-content"?"auto":"fixed":dt||Sn.some(function(Mn){var Nn=Mn.ellipsis;return Nn})?"fixed":"auto")},[dt,ht,Sn,ie]),yt,ft={colWidths:Xe,columCount:Sn.length,stickyOffsets:ke,onHeaderRow:zt,fixHeader:dt},gn=C.useMemo(function(){return At?null:typeof Xt=="function"?Xt():Xt},[At,Xt]),Bt=C.createElement(ce,{data:Ue,measureColumnWidth:dt||tt||st,expandedKeys:sn,rowExpandable:nr,getRowKey:Ht,onRow:lt,emptyNode:gn,childrenColumnName:Ea}),vn=C.createElement(m,{colWidths:Sn.map(function(Mn){var Nn=Mn.width;return Nn}),columns:Sn}),qt=Ae&&C.createElement(Q.b,null,Ae(Ue)),Ut=Tt(["body"]);if(dt||st){var fn;typeof Ut=="function"?(fn=Ut(Ue,{scrollbarSize:Gt,ref:cr,onScroll:mn}),ft.colWidths=Sn.map(function(Mn,Nn){var Kn=Mn.width,vr=Nn===da.length-1?Kn-Gt:Kn;return typeof vr=="number"&&!Number.isNaN(vr)?vr:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):fn=C.createElement("div",{style:Object(B.a)(Object(B.a)({},Vt),$e),onScroll:mn,ref:cr,className:y()("".concat(it,"-body"))},C.createElement(St,{style:Object(B.a)(Object(B.a)({},Yt),{},{tableLayout:Ot})},vn,Bt,qt),st&&C.createElement(Re,{ref:xt,offsetScroll:Zt,scrollBodyRef:cr,onScroll:mn})),yt=C.createElement(C.Fragment,null,rt!==!1&&C.createElement(g,Object.assign({noData:!Ue.length},ft,hn,{direction:oe,offsetHeader:Kt,stickyClassName:Et,ref:kn,onScroll:mn})),fn)}else yt=C.createElement("div",{style:Object(B.a)(Object(B.a)({},Vt),$e),className:y()("".concat(it,"-content")),onScroll:mn,ref:cr},C.createElement(St,{style:Object(B.a)(Object(B.a)({},Yt),{},{tableLayout:Ot})},vn,rt!==!1&&C.createElement(v,Object.assign({},ft,hn)),Bt,qt));var In=Object(c.b)(Ne),ur=C.createElement("div",Object.assign({className:y()(it,gt,(Pe={},Object(X.a)(Pe,"".concat(it,"-rtl"),oe==="rtl"),Object(X.a)(Pe,"".concat(it,"-ping-left"),Dn),Object(X.a)(Pe,"".concat(it,"-ping-right"),rr),Object(X.a)(Pe,"".concat(it,"-layout-fixed"),ie==="fixed"),Object(X.a)(Pe,"".concat(it,"-fixed-header"),dt),Object(X.a)(Pe,"".concat(it,"-fixed-column"),ht),Object(X.a)(Pe,"".concat(it,"-scroll-horizontal"),tt),Object(X.a)(Pe,"".concat(it,"-has-fix-left"),Sn[0]&&Sn[0].fixed),Object(X.a)(Pe,"".concat(it,"-has-fix-right"),Sn[Sn.length-1]&&Sn[Sn.length-1].fixed==="right"),Pe)),style:ae,id:Me,ref:pn},In),C.createElement(We,{pingLeft:Dn,pingRight:rr,props:Object(B.a)(Object(B.a)({},Ne),{},{stickyOffsets:ke,mergedExpandedKeys:sn})},pe&&C.createElement(q,{className:"".concat(it,"-title")},pe(Ue)),C.createElement("div",{className:"".concat(it,"-container")},yt),we&&C.createElement(q,{className:"".concat(it,"-footer")},we(Ue))));tt&&(ur=C.createElement(u.a,{onResize:vt},ur));var Ln=C.useMemo(function(){return{prefixCls:it,getComponent:Tt,scrollbarSize:Gt,direction:oe,fixedInfoList:Sn.map(function(Mn,Nn){return d(Nn,Nn,Sn,ke,oe)}),isSticky:st}},[it,Tt,Gt,oe,Sn,ke,oe,st]),Tr=C.useMemo(function(){return Object(B.a)(Object(B.a)({},hn),{},{tableLayout:Ot,rowClassName:fe,expandedRowClassName:Cr,componentWidth:xa,fixHeader:dt,fixColumn:ht,horizonScroll:tt,expandIcon:na,expandableType:$r,expandRowByClick:zn,expandedRowRender:Un,onTriggerExpand:oa,expandIconColumnIndex:Lr,indentSize:Yn})},[hn,Ot,fe,Cr,xa,dt,ht,tt,na,$r,zn,Un,oa,Lr,Yn]),Ur=C.useMemo(function(){return{onColumnResize:Nt}},[Nt]);return C.createElement(s.a.Provider,{value:Ln},C.createElement(U.Provider,{value:Tr},C.createElement(z.Provider,{value:Ur},ur)))}Mt.Column=o.a,Mt.ColumnGroup=a.a,Mt.Summary=Q.a,Mt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Wt=ee.b=Mt},wRmb:function(ze,ee,M){"use strict";M.d(ee,"a",function(){return b});var X=M("rePB"),B=M("KQm4"),I=M("VTBJ"),F=M("Ff2n"),S=M("q1tI"),C=M.n(S),P=M("Kwbf"),y=M("Zm9Q"),t=M("hW8S");function b(o){return Object(y.a)(o).filter(function(h){return S.isValidElement(h)}).map(function(h){var l=h.key,n=h.props,s=n.children,d=Object(F.a)(n,["children"]),E=Object(I.a)({key:l},d);return s&&(E.children=b(s)),E})}function i(o){return o.reduce(function(h,l){var n=l.fixed,s=n===!0?"left":n,d=l.children;return d&&d.length>0?[].concat(Object(B.a)(h),Object(B.a)(i(d).map(function(E){return Object(I.a)({fixed:s},E)}))):[].concat(Object(B.a)(h),[Object(I.a)(Object(I.a)({},l),{},{fixed:s})])},[])}function u(o){for(var h=!0,l=0;l<o.length;l+=1){var n=o[l];if(h&&n.fixed!=="left")h=!1;else if(!h&&n.fixed==="left"){Object(P.a)(!1,"Index ".concat(l-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,d=o.length-1;d>=0;d-=1){var E=o[d];if(s&&E.fixed!=="right")s=!1;else if(!s&&E.fixed==="right"){Object(P.a)(!1,"Index ".concat(d+1," of `columns` missing `fixed='right'` prop."));break}}}function p(o){return o.map(function(h){var l=h.fixed,n=Object(F.a)(h,["fixed"]),s=l;return l==="left"?s="right":l==="right"&&(s="left"),Object(I.a)({fixed:s},n)})}function a(o,h){var l=o.prefixCls,n=o.columns,s=o.children,d=o.expandable,E=o.expandedKeys,D=o.getRowKey,T=o.onTriggerExpand,k=o.expandIcon,w=o.rowExpandable,v=o.expandIconColumnIndex,c=o.direction,f=o.expandRowByClick,m=S.useMemo(function(){return n||b(s)},[n,s]),_=S.useMemo(function(){if(d){var j,U=v||0,R=m[U],W=(j={},Object(X.a)(j,t.a,{className:"".concat(l,"-expand-icon-col")}),Object(X.a)(j,"title",""),Object(X.a)(j,"fixed",R?R.fixed:null),Object(X.a)(j,"className","".concat(l,"-row-expand-icon-cell")),Object(X.a)(j,"render",function(G,z,J){var te=D(z,J),_e=E.has(te),ce=w?w(z):!0,xe=k({prefixCls:l,expanded:_e,expandable:ce,record:z,onExpand:T});return f?S.createElement("span",{onClick:function(je){return je.stopPropagation()}},xe):xe}),j),H=m.slice();return U>=0&&H.splice(U,0,W),H}return m},[d,m,D,E,k,c]),x=S.useMemo(function(){var j=_;return h&&(j=h(j)),j.length||(j=[{render:function(){return null}}]),j},[h,_,c]),g=S.useMemo(function(){return c==="rtl"?p(i(x)):i(x)},[x,c]);return[x,g]}ee.b=a},x6Kt:function(ze,ee,M){var X=M("y+Vt"),B=M("VpOo"),I=M("nPnh"),F=I.subPixelOptimizeRect,S={},C=X.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(P,y){var t,b,i,u;this.subPixelOptimize?(F(S,y,this.style),t=S.x,b=S.y,i=S.width,u=S.height,S.r=y.r,y=S):(t=y.x,b=y.y,i=y.width,u=y.height),y.r?B.buildPath(P,y):P.rect(t,b,i,u),P.closePath();return}});ze.exports=C},xOL1:function(ze,ee){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y+Vt":function(ze,ee,M){var X=M("Gev7"),B=M("bYtY"),I=M("IMiH"),F=M("2DNl"),S=M("3C/r"),C=S.prototype.getCanvasPattern,P=Math.abs,y=new I(!0);function t(i){X.call(this,i),this.path=null}t.prototype={constructor:t,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,u){var p=this.style,a=this.path||y,o=p.hasStroke(),h=p.hasFill(),l=p.fill,n=p.stroke,s=h&&!!l.colorStops,d=o&&!!n.colorStops,E=h&&!!l.image,D=o&&!!n.image;if(p.bind(i,this,u),this.setTransform(i),this.__dirty){var T;s&&(T=T||this.getBoundingRect(),this._fillGradient=p.getGradient(i,l,T)),d&&(T=T||this.getBoundingRect(),this._strokeGradient=p.getGradient(i,n,T))}s?i.fillStyle=this._fillGradient:E&&(i.fillStyle=C.call(l,i)),d?i.strokeStyle=this._strokeGradient:D&&(i.strokeStyle=C.call(n,i));var k=p.lineDash,w=p.lineDashOffset,v=!!i.setLineDash,c=this.getGlobalScale();if(a.setScale(c[0],c[1],this.segmentIgnoreThreshold),this.__dirtyPath||k&&!v&&o?(a.beginPath(i),k&&!v&&(a.setLineDash(k),a.setLineDashOffset(w)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),h)if(p.fillOpacity!=null){var f=i.globalAlpha;i.globalAlpha=p.fillOpacity*p.opacity,a.fill(i),i.globalAlpha=f}else a.fill(i);if(k&&v&&(i.setLineDash(k),i.lineDashOffset=w),o)if(p.strokeOpacity!=null){var f=i.globalAlpha;i.globalAlpha=p.strokeOpacity*p.opacity,a.stroke(i),i.globalAlpha=f}else a.stroke(i);k&&v&&i.setLineDash([]),p.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,u,p){},createPathProxy:function(){this.path=new I},getBoundingRect:function(){var i=this._rect,u=this.style,p=!i;if(p){var a=this.path;a||(a=this.path=new I),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),i=a.getBoundingRect()}if(this._rect=i,u.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||p){o.copy(i);var h=u.lineWidth,l=u.strokeNoScale?this.getLineScale():1;u.hasFill()||(h=Math.max(h,this.strokeContainThreshold||4)),l>1e-10&&(o.width+=h/l,o.height+=h/l,o.x-=h/l/2,o.y-=h/l/2)}return o}return i},contain:function(i,u){var p=this.transformCoordToLocal(i,u),a=this.getBoundingRect(),o=this.style;if(i=p[0],u=p[1],a.contain(i,u)){var h=this.path.data;if(o.hasStroke()){var l=o.lineWidth,n=o.strokeNoScale?this.getLineScale():1;if(n>1e-10&&(o.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),F.containStroke(h,l/n,i,u)))return!0}if(o.hasFill())return F.contain(h,i,u)}return!1},dirty:function(i){i==null&&(i=!0),i&&(this.__dirtyPath=i,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(i){return this.animate("shape",i)},attrKV:function(i,u){i==="shape"?(this.setShape(u),this.__dirtyPath=!0,this._rect=null):X.prototype.attrKV.call(this,i,u)},setShape:function(i,u){var p=this.shape;if(p){if(B.isObject(i))for(var a in i)i.hasOwnProperty(a)&&(p[a]=i[a]);else p[i]=u;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&P(i[0]-1)>1e-10&&P(i[3]-1)>1e-10?Math.sqrt(P(i[0]*i[3]-i[2]*i[1])):1}},t.extend=function(i){var u=function(a){t.call(this,a),i.style&&this.style.extendFrom(i.style,!1);var o=i.shape;if(o){this.shape=this.shape||{};var h=this.shape;for(var l in o)!h.hasOwnProperty(l)&&o.hasOwnProperty(l)&&(h[l]=o[l])}i.init&&i.init.call(this,a)};B.inherits(u,t);for(var p in i)p!=="style"&&p!=="shape"&&(u.prototype[p]=i[p]);return u},B.inherits(t,X);var b=t;ze.exports=b},"y0+3":function(ze,ee,M){"use strict";M.d(ee,"a",function(){return i}),M.d(ee,"b",function(){return p});var X=/margin|padding|width|height|max|min|offset/,B={left:!0,top:!0},I={cssFloat:1,styleFloat:1,float:1};function F(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function S(a,o,h){if(o=o.toLowerCase(),h==="auto"){if(o==="height")return a.offsetHeight;if(o==="width")return a.offsetWidth}return o in B||(B[o]=X.test(o)),B[o]?parseFloat(h)||0:h}function C(a,o){var h=arguments.length,l=F(a);return o=I[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,h===1?l:S(a,o,l[o]||a.style[o])}function P(a,o,h){var l=arguments.length;if(o=I[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,l===3)return typeof h=="number"&&X.test(o)&&(h="".concat(h,"px")),a.style[o]=h,h;for(var n in o)o.hasOwnProperty(n)&&P(a,n,o[n]);return F(a)}function y(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function t(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function b(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:o}}function i(){var a=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:o}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(a){var o=a.getBoundingClientRect(),h=document.documentElement;return{left:o.left+(window.pageXOffset||h.scrollLeft)-(h.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||h.scrollTop)-(h.clientTop||document.body.clientTop||0)}}},y23F:function(ze,ee){function M(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}M.prototype={constructor:M,_dragStart:function(I){for(var F=I.target;F&&!F.draggable;)F=F.parent;F&&(this._draggingTarget=F,F.dragging=!0,this._x=I.offsetX,this._y=I.offsetY,this.dispatchToElement(X(F,I),"dragstart",I.event))},_drag:function(I){var F=this._draggingTarget;if(F){var S=I.offsetX,C=I.offsetY,P=S-this._x,y=C-this._y;this._x=S,this._y=C,F.drift(P,y,I),this.dispatchToElement(X(F,I),"drag",I.event);var t=this.findHover(S,C,F).target,b=this._dropTarget;this._dropTarget=t,F!==t&&(b&&t!==b&&this.dispatchToElement(X(b,I),"dragleave",I.event),t&&t!==b&&this.dispatchToElement(X(t,I),"dragenter",I.event))}},_dragEnd:function(I){var F=this._draggingTarget;F&&(F.dragging=!1),this.dispatchToElement(X(F,I),"dragend",I.event),this._dropTarget&&this.dispatchToElement(X(this._dropTarget,I),"drop",I.event),this._draggingTarget=null,this._dropTarget=null}};function X(I,F){return{target:I,topTarget:F&&F.topTarget}}var B=M;ze.exports=B},yQHh:function(ze,ee,M){},"yTi+":function(ze,ee,M){ze.exports=M.p+"static/AssistantCode3.fdd8db3c.jpeg"},yxFR:function(ze,ee,M){var X=M("y+Vt"),B=M("nPnh"),I=B.subPixelOptimizeLine,F={},S=X.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(C,P){var y,t,b,i;this.subPixelOptimize?(I(F,P,this.style),y=F.x1,t=F.y1,b=F.x2,i=F.y2):(y=P.x1,t=P.y1,b=P.x2,i=P.y2);var u=P.percent;if(u===0)return;C.moveTo(y,t),u<1&&(b=y*(1-u)+b*u,i=t*(1-u)+i*u),C.lineTo(b,i)},pointAt:function(C){var P=this.shape;return[P.x1*(1-C)+P.x2*C,P.y1*(1-C)+P.y2*C]}});ze.exports=S},zarK:function(ze,ee,M){var X=M("YH21"),B=X.addEventListener,I=X.removeEventListener,F=X.normalizeEvent,S=X.getNativeEvent,C=M("bYtY"),P=M("H6uX"),y=M("ItGF"),t=300,b=y.domSupported,i=function(){var g=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],j=["touchstart","touchend","touchmove"],U={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},R=C.map(g,function(W){var H=W.replace("mouse","pointer");return U.hasOwnProperty(H)?H:W});return{mouse:g,touch:j,pointer:R}}(),u={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function p(g){return g==="mousewheel"&&y.browser.firefox?"DOMMouseScroll":g}function a(g){var j=g.pointerType;return j==="pen"||j==="touch"}function o(g){g.touching=!0,g.touchTimer!=null&&(clearTimeout(g.touchTimer),g.touchTimer=null),g.touchTimer=setTimeout(function(){g.touching=!1,g.touchTimer=null},700)}function h(g){g&&(g.zrByTouch=!0)}function l(g,j){return F(g.dom,new s(g,j),!0)}function n(g,j){for(var U=j,R=!1;U&&U.nodeType!==9&&!(R=U.domBelongToZr||U!==j&&U===g.painterRoot);)U=U.parentNode;return R}function s(g,j){this.type=j.type,this.target=this.currentTarget=g.dom,this.pointerType=j.pointerType,this.clientX=j.clientX,this.clientY=j.clientY}var d=s.prototype;d.stopPropagation=d.stopImmediatePropagation=d.preventDefault=C.noop;var E={mousedown:function(g){g=F(this.dom,g),this._mayPointerCapture=[g.zrX,g.zrY],this.trigger("mousedown",g)},mousemove:function(g){g=F(this.dom,g);var j=this._mayPointerCapture;j&&(g.zrX!==j[0]||g.zrY!==j[1])&&c(this,!0),this.trigger("mousemove",g)},mouseup:function(g){g=F(this.dom,g),c(this,!1),this.trigger("mouseup",g)},mouseout:function(g){g=F(this.dom,g),this._pointerCapturing&&(g.zrEventControl="no_globalout");var j=g.toElement||g.relatedTarget;g.zrIsToLocalDOM=n(this,j),this.trigger("mouseout",g)},touchstart:function(g){g=F(this.dom,g),h(g),this._lastTouchMoment=new Date,this.handler.processGesture(g,"start"),E.mousemove.call(this,g),E.mousedown.call(this,g)},touchmove:function(g){g=F(this.dom,g),h(g),this.handler.processGesture(g,"change"),E.mousemove.call(this,g)},touchend:function(g){g=F(this.dom,g),h(g),this.handler.processGesture(g,"end"),E.mouseup.call(this,g),+new Date-this._lastTouchMoment<t&&E.click.call(this,g)},pointerdown:function(g){E.mousedown.call(this,g)},pointermove:function(g){a(g)||E.mousemove.call(this,g)},pointerup:function(g){E.mouseup.call(this,g)},pointerout:function(g){a(g)||E.mouseout.call(this,g)}};C.each(["click","mousewheel","dblclick","contextmenu"],function(g){E[g]=function(j){j=F(this.dom,j),this.trigger(g,j)}});var D={pointermove:function(g){a(g)||D.mousemove.call(this,g)},pointerup:function(g){D.mouseup.call(this,g)},mousemove:function(g){this.trigger("mousemove",g)},mouseup:function(g){var j=this._pointerCapturing;c(this,!1),this.trigger("mouseup",g),j&&(g.zrEventControl="only_globalout",this.trigger("mouseout",g))}};function T(g,j){var U=j.domHandlers;y.pointerEventsSupported?C.each(i.pointer,function(R){w(j,R,function(W){U[R].call(g,W)})}):(y.touchEventsSupported&&C.each(i.touch,function(R){w(j,R,function(W){U[R].call(g,W),o(j)})}),C.each(i.mouse,function(R){w(j,R,function(W){W=S(W),j.touching||U[R].call(g,W)})}))}function k(g,j){y.pointerEventsSupported?C.each(u.pointer,U):y.touchEventsSupported||C.each(u.mouse,U);function U(R){function W(H){H=S(H),n(g,H.target)||(H=l(g,H),j.domHandlers[R].call(g,H))}w(j,R,W,{capture:!0})}}function w(g,j,U,R){g.mounted[j]=U,g.listenerOpts[j]=R,B(g.domTarget,p(j),U,R)}function v(g){var j=g.mounted;for(var U in j)j.hasOwnProperty(U)&&I(g.domTarget,p(U),j[U],g.listenerOpts[U]);g.mounted={}}function c(g,j){if(g._mayPointerCapture=null,b&&g._pointerCapturing^j){g._pointerCapturing=j;var U=g._globalHandlerScope;j?k(g,U):v(U)}}function f(g,j){this.domTarget=g,this.domHandlers=j,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function m(g,j){P.call(this),this.dom=g,this.painterRoot=j,this._localHandlerScope=new f(g,E),b&&(this._globalHandlerScope=new f(document,D)),this._pointerCapturing=!1,this._mayPointerCapture=null,T(this,this._localHandlerScope)}var _=m.prototype;_.dispose=function(){v(this._localHandlerScope),b&&v(this._globalHandlerScope)},_.setCursor=function(g){this.dom.style&&(this.dom.style.cursor=g||"default")},C.mixin(m,P);var x=m;ze.exports=x},zetH:function(ze,ee,M){ze.exports={flex_box_center:"flex_box_center___Joa_H",flex_space_between:"flex_space_between___3VhCy",flex_box_vertical_center:"flex_box_vertical_center___3wSNZ",flex_box_center_end:"flex_box_center_end___3z8HR",flex_box_column:"flex_box_column___KdHzx",form:"form___3KoYn",efficiency:"efficiency___1LMk4"}}}]);