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.
408 lines
1.4 MiB
408 lines
1.4 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[92,3,5,7,8,18],{"+NIl":function($e,me,z){(function(J){J(z("VrN/"))})(function(J){"use strict";J.defineMode("stex",function(N,L){"use strict";function Q(T,y){T.cmdState.push(y)}function D(T){return T.cmdState.length>0?T.cmdState[T.cmdState.length-1]:null}function w(T){var y=T.cmdState.pop();y&&y.closeBracket()}function _(T){for(var y=T.cmdState,B=y.length-1;B>=0;B--){var u=y[B];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function c(T,y,B){return function(){this.name=T,this.bracketNo=0,this.style=y,this.styles=B,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var C={};C.importmodule=c("importmodule","tag",["string","builtin"]),C.documentclass=c("documentclass","tag",["","atom"]),C.usepackage=c("usepackage","tag",["atom"]),C.begin=c("begin","tag",["atom"]),C.end=c("end","tag",["atom"]),C.label=c("label","tag",["atom"]),C.ref=c("ref","tag",["atom"]),C.eqref=c("eqref","tag",["atom"]),C.cite=c("cite","tag",["atom"]),C.bibitem=c("bibitem","tag",["atom"]),C.Bibitem=c("Bibitem","tag",["atom"]),C.RBibitem=c("RBibitem","tag",["atom"]),C.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function x(T,y){T.f=y}function i(T,y){var B;if(T.match(/^\\[a-zA-Z@]+/)){var u=T.current().slice(1);return B=C.hasOwnProperty(u)?C[u]:C.DEFAULT,B=new B,Q(y,B),x(y,O),B.style}if(T.match(/^\\[$&%#{}_]/))return"tag";if(T.match(/^\\[,;!\/\\]/))return"tag";if(T.match("\\["))return x(y,function(l,f){return h(l,f,"\\]")}),"keyword";if(T.match("\\("))return x(y,function(l,f){return h(l,f,"\\)")}),"keyword";if(T.match("$$"))return x(y,function(l,f){return h(l,f,"$$")}),"keyword";if(T.match("$"))return x(y,function(l,f){return h(l,f,"$")}),"keyword";var s=T.next();if(s=="%")return T.skipToEnd(),"comment";if(s=="}"||s=="]"){if(B=D(y),B)B.closeBracket(s),x(y,O);else return"error";return"bracket"}else return s=="{"||s=="["?(B=C.DEFAULT,B=new B,Q(y,B),"bracket"):/\d/.test(s)?(T.eatWhile(/[\w.%]/),"atom"):(T.eatWhile(/[\w\-_]/),B=_(y),B.name=="begin"&&(B.argument=T.current()),B.styleIdentifier())}function h(T,y,B){if(T.eatSpace())return null;if(B&&T.match(B))return x(y,i),"keyword";if(T.match(/^\\[a-zA-Z@]+/))return"tag";if(T.match(/^[a-zA-Z]+/))return"variable-2";if(T.match(/^\\[$&%#{}_]/))return"tag";if(T.match(/^\\[,;!\/]/))return"tag";if(T.match(/^[\^_&]/))return"tag";if(T.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(T.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=T.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(T.skipToEnd(),"comment"):"error"}function O(T,y){var B=T.peek(),u;return B=="{"||B=="["?(u=D(y),u.openBracket(B),T.eat(B),x(y,i),"bracket"):/[ \t\r]/.test(B)?(T.eat(B),null):(x(y,i),w(y),i(T,y))}return{startState:function(){var T=L.inMathMode?function(y,B){return h(y,B)}:i;return{cmdState:[],f:T}},copyState:function(T){return{cmdState:T.cmdState.slice(),f:T.f}},token:function(T,y){return y.f(T,y)},blankLine:function(T){T.f=i,T.cmdState.length=0},lineComment:"%"}}),J.defineMIME("text/x-stex","stex"),J.defineMIME("text/x-latex","stex")})},"06Qe":function($e,me,z){var J=z("ItGF"),N="urn:schemas-microsoft-com:vml",L=typeof window=="undefined"?null:window,Q=!1,D=L&&L.document;function w(C){return _(C)}var _;if(D&&!J.canvasSupported)try{!D.namespaces.zrvml&&D.namespaces.add("zrvml",N),_=function(C){return D.createElement("<zrvml:"+C+' class="zrvml">')}}catch(C){_=function(x){return D.createElement("<"+x+' xmlns="'+N+'" class="zrvml">')}}function c(){if(Q||!D)return;Q=!0;var C=D.styleSheets;C.length<31?D.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):C[0].addRule(".zrvml","behavior:url(#default#VML)")}me.doc=D,me.createNode=w,me.initVML=c},"0s+r":function($e,me,z){var J=z("bYtY"),N=z("QBsz"),L=z("y23F"),Q=z("H6uX"),D=z("YH21"),w=z("C0SR"),_="silent";function c(B,u,s){return{type:B,event:s,target:u.target,topTarget:u.topTarget,cancelBubble:!1,offsetX:s.zrX,offsetY:s.zrY,gestureEvent:s.gestureEvent,pinchX:s.pinchX,pinchY:s.pinchY,pinchScale:s.pinchScale,wheelDelta:s.zrDelta,zrByTouch:s.zrByTouch,which:s.which,stop:C}}function C(){D.stop(this.event)}function x(){}x.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(B,u,s,l){Q.call(this),this.storage=B,this.painter=u,this.painterRoot=l,s=s||new x,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,L.call(this),this.setHandlerProxy(s)};h.prototype={constructor:h,setHandlerProxy:function(B){this.proxy&&this.proxy.dispose(),B&&(J.each(i,function(u){B.on&&B.on(u,this[u],this)},this),B.handler=this),this.proxy=B},mousemove:function(B){var u=B.zrX,s=B.zrY,l=T(this,u,s),f=this._hovered,m=f.target;m&&!m.__zr&&(f=this.findHover(f.x,f.y),m=f.target);var E=this._hovered=l?{x:u,y:s}:this.findHover(u,s),v=E.target,R=this.proxy;R.setCursor&&R.setCursor(v?v.cursor:"default"),m&&v!==m&&this.dispatchToElement(f,"mouseout",B),this.dispatchToElement(E,"mousemove",B),v&&v!==m&&this.dispatchToElement(E,"mouseover",B)},mouseout:function(B){var u=B.zrEventControl,s=B.zrIsToLocalDOM;u!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",B),u!=="no_globalout"&&(!s&&this.trigger("globalout",{type:"globalout",event:B}))},resize:function(B){this._hovered={}},dispatch:function(B,u){var s=this[B];s&&s.call(this,u)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(B){var u=this.proxy;u.setCursor&&u.setCursor(B)},dispatchToElement:function(B,u,s){B=B||{};var l=B.target;if(l&&l.silent)return;for(var f="on"+u,m=c(u,B,s);l&&!(l[f]&&(m.cancelBubble=l[f].call(l,m)),l.trigger(u,m),l=l.parent,m.cancelBubble););m.cancelBubble||(this.trigger(u,m),this.painter&&this.painter.eachOtherLayer(function(E){typeof E[f]=="function"&&E[f].call(E,m),E.trigger&&E.trigger(u,m)}))},findHover:function(B,u,s){for(var l=this.storage.getDisplayList(),f={x:B,y:u},m=l.length-1;m>=0;m--){var E;if(l[m]!==s&&!l[m].ignore&&(E=O(l[m],B,u))&&(!f.topTarget&&(f.topTarget=l[m]),E!==_)){f.target=l[m];break}}return f},processGesture:function(B,u){this._gestureMgr||(this._gestureMgr=new w);var s=this._gestureMgr;u==="start"&&s.clear();var l=s.recognize(B,this.findHover(B.zrX,B.zrY,null).target,this.proxy.dom);if(u==="end"&&s.clear(),l){var f=l.type;B.gestureEvent=f,this.dispatchToElement({target:l.target},f,l.event)}}},J.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(B){h.prototype[B]=function(u){var s=u.zrX,l=u.zrY,f=T(this,s,l),m,E;if((B!=="mouseup"||!f)&&(m=this.findHover(s,l),E=m.target),B==="mousedown")this._downEl=E,this._downPoint=[u.zrX,u.zrY],this._upEl=E;else if(B==="mouseup")this._upEl=E;else if(B==="click"){if(this._downEl!==this._upEl||!this._downPoint||N.dist(this._downPoint,[u.zrX,u.zrY])>4)return;this._downPoint=null}this.dispatchToElement(m,B,u)}});function O(B,u,s){if(B[B.rectHover?"rectContain":"contain"](u,s)){for(var l=B,f;l;){if(l.clipPath&&!l.clipPath.contain(u,s))return!1;l.silent&&(f=!0),l=l.parent}return f?_:!0}return!1}function T(B,u,s){var l=B.painter;return u<0||u>l.getWidth()||s<0||s>l.getHeight()}J.mixin(h,Q),J.mixin(h,L);var y=h;$e.exports=y},"19Vz":function($e,me,z){(function(J){J(z("VrN/"))})(function(J){J.defineOption("placeholder","",function(c,C,x){var i=x&&x!=J.Init;if(C&&!i)c.on("blur",D),c.on("change",w),c.on("swapDoc",w),J.on(c.getInputField(),"compositionupdate",c.state.placeholderCompose=function(){Q(c)}),w(c);else if(!C&&i){c.off("blur",D),c.off("change",w),c.off("swapDoc",w),J.off(c.getInputField(),"compositionupdate",c.state.placeholderCompose),N(c);var h=c.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}C&&!c.hasFocus()&&D(c)});function N(c){c.state.placeholder&&(c.state.placeholder.parentNode.removeChild(c.state.placeholder),c.state.placeholder=null)}function L(c){N(c);var C=c.state.placeholder=document.createElement("pre");C.style.cssText="height: 0; overflow: visible",C.style.direction=c.getOption("direction"),C.className="CodeMirror-placeholder CodeMirror-line-like";var x=c.getOption("placeholder");typeof x=="string"&&(x=document.createTextNode(x)),C.appendChild(x),c.display.lineSpace.insertBefore(C,c.display.lineSpace.firstChild)}function Q(c){setTimeout(function(){var C=!1,x=c.getInputField();x.nodeName=="TEXTAREA"?C=!x.value:c.lineCount()==1&&(C=!/[^\u200b]/.test(x.querySelector(".CodeMirror-line").textContent)),C?L(c):N(c)},20)}function D(c){_(c)&&L(c)}function w(c){var C=c.getWrapperElement(),x=_(c);C.className=C.className.replace(" CodeMirror-empty","")+(x?" CodeMirror-empty":""),x?L(c):N(c)}function _(c){return c.lineCount()===1&&c.getLine(0)===""}})},"1Jh7":function($e,me,z){var J=z("y+Vt"),N=z("T6xi"),L=J.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(Q,D){N.buildPath(Q,D,!1)}});$e.exports=L},"1MYJ":function($e,me,z){var J=z("y+Vt"),N=J.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var L=this.__dirtyPath,Q=this.shape.paths,D=0;D<Q.length;D++)L=L||Q[D].__dirtyPath;this.__dirtyPath=L,this.__dirty=this.__dirty||L},beforeBrush:function(){this._updatePathDirty();for(var L=this.shape.paths||[],Q=this.getGlobalScale(),D=0;D<L.length;D++)L[D].path||L[D].createPathProxy(),L[D].path.setScale(Q[0],Q[1],L[D].segmentIgnoreThreshold)},buildPath:function(L,Q){for(var D=Q.paths||[],w=0;w<D.length;w++)D[w].buildPath(L,D[w].shape,!0)},afterBrush:function(){for(var L=this.shape.paths||[],Q=0;Q<L.length;Q++)L[Q].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),J.prototype.getBoundingRect.call(this)}});$e.exports=N},"1RvN":function($e,me){var z=function(){this.head=null,this.tail=null,this._len=0},J=z.prototype;J.insert=function(w){var _=new N(w);return this.insertEntry(_),_},J.insertEntry=function(w){this.head?(this.tail.next=w,w.prev=this.tail,w.next=null,this.tail=w):this.head=this.tail=w,this._len++},J.remove=function(w){var _=w.prev,c=w.next;_?_.next=c:this.head=c,c?c.prev=_:this.tail=_,w.next=w.prev=null,this._len--},J.len=function(){return this._len},J.clear=function(){this.head=this.tail=null,this._len=0};var N=function(w){this.value=w,this.next,this.prev},L=function(w){this._list=new z,this._map={},this._maxSize=w||10,this._lastRemovedEntry=null},Q=L.prototype;Q.put=function(w,_){var c=this._list,C=this._map,x=null;if(C[w]==null){var i=c.len(),h=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var O=c.head;c.remove(O),delete C[O.key],x=O.value,this._lastRemovedEntry=O}h?h.value=_:h=new N(_),h.key=w,c.insertEntry(h),C[w]=h}return x},Q.get=function(w){var _=this._map[w],c=this._list;if(_!=null)return _!==c.tail&&(c.remove(_),c.insertEntry(_)),_.value},Q.clear=function(){this._list.clear(),this._map={}};var D=L;$e.exports=D},"1bdT":function($e,me,z){var J=z("3gBT"),N=z("H6uX"),L=z("DN4a"),Q=z("vWvF"),D=z("bYtY"),w=function(c){L.call(this,c),N.call(this,c),Q.call(this,c),this.id=c.id||J()};w.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(c,C){switch(this.draggable){case"horizontal":C=0;break;case"vertical":c=0;break}var x=this.transform;x||(x=this.transform=[1,0,0,1,0,0]),x[4]+=c,x[5]+=C,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(c,C){},attrKV:function(c,C){if(c==="position"||c==="scale"||c==="origin"){if(C){var x=this[c];x||(x=this[c]=[]),x[0]=C[0],x[1]=C[1]}}else this[c]=C},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(c,C){if(typeof c=="string")this.attrKV(c,C);else if(D.isObject(c))for(var x in c)c.hasOwnProperty(x)&&this.attrKV(x,c[x]);return this.dirty(!1),this},setClipPath:function(c){var C=this.__zr;C&&c.addSelfToZr(C),this.clipPath&&this.clipPath!==c&&this.removeClipPath(),this.clipPath=c,c.__zr=C,c.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var c=this.clipPath;c&&(c.__zr&&c.removeSelfFromZr(c.__zr),c.__zr=null,c.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(c){this.__zr=c;var C=this.animators;if(C)for(var x=0;x<C.length;x++)c.animation.addAnimator(C[x]);this.clipPath&&this.clipPath.addSelfToZr(c)},removeSelfFromZr:function(c){this.__zr=null;var C=this.animators;if(C)for(var x=0;x<C.length;x++)c.animation.removeAnimator(C[x]);this.clipPath&&this.clipPath.removeSelfFromZr(c)}},D.mixin(w,Q),D.mixin(w,L),D.mixin(w,N);var _=w;$e.exports=_},"1eCo":function($e,me,z){(function(J){J(z("VrN/"))})(function(J){"use strict";var N={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},L={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};J.defineMode("xml",function(Q,D){var w=Q.indentUnit,_={},c=D.htmlMode?N:L;for(var C in c)_[C]=c[C];for(var C in D)_[C]=D[C];var x,i;function h(o,S){function b(K){return S.tokenize=K,K(o,S)}var g=o.next();if(g=="<")return o.eat("!")?o.eat("[")?o.match("CDATA[")?b(y("atom","]]>")):null:o.match("--")?b(y("comment","-->")):o.match("DOCTYPE",!0,!0)?(o.eatWhile(/[\w\._\-]/),b(B(1))):null:o.eat("?")?(o.eatWhile(/[\w\._\-]/),S.tokenize=y("meta","?>"),"meta"):(x=o.eat("/")?"closeTag":"openTag",S.tokenize=O,"tag bracket");if(g=="&"){var U;return o.eat("#")?o.eat("x")?U=o.eatWhile(/[a-fA-F\d]/)&&o.eat(";"):U=o.eatWhile(/[\d]/)&&o.eat(";"):U=o.eatWhile(/[\w\.\-:]/)&&o.eat(";"),U?"atom":"error"}else return o.eatWhile(/[^&<]/),null}h.isInText=!0;function O(o,S){var b=o.next();if(b==">"||b=="/"&&o.eat(">"))return S.tokenize=h,x=b==">"?"endTag":"selfcloseTag","tag bracket";if(b=="=")return x="equals",null;if(b=="<"){S.tokenize=h,S.state=f,S.tagName=S.tagStart=null;var g=S.tokenize(o,S);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(b)?(S.tokenize=T(b),S.stringStartCol=o.column(),S.tokenize(o,S)):(o.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function T(o){var S=function(b,g){for(;!b.eol();)if(b.next()==o){g.tokenize=O;break}return"string"};return S.isInAttribute=!0,S}function y(o,S){return function(b,g){for(;!b.eol();){if(b.match(S)){g.tokenize=h;break}b.next()}return o}}function B(o){return function(S,b){for(var g;(g=S.next())!=null;){if(g=="<")return b.tokenize=B(o+1),b.tokenize(S,b);if(g==">")if(o==1){b.tokenize=h;break}else return b.tokenize=B(o-1),b.tokenize(S,b)}return"meta"}}function u(o,S,b){this.prev=o.context,this.tagName=S,this.indent=o.indented,this.startOfLine=b,(_.doNotIndent.hasOwnProperty(S)||o.context&&o.context.noIndent)&&(this.noIndent=!0)}function s(o){o.context&&(o.context=o.context.prev)}function l(o,S){for(var b;;){if(!o.context)return;if(b=o.context.tagName,!_.contextGrabbers.hasOwnProperty(b)||!_.contextGrabbers[b].hasOwnProperty(S))return;s(o)}}function f(o,S,b){return o=="openTag"?(b.tagStart=S.column(),m):o=="closeTag"?E:f}function m(o,S,b){return o=="word"?(b.tagName=S.current(),i="tag",p):_.allowMissingTagName&&o=="endTag"?(i="tag bracket",p(o,S,b)):(i="error",m)}function E(o,S,b){if(o=="word"){var g=S.current();return b.context&&b.context.tagName!=g&&_.implicitlyClosed.hasOwnProperty(b.context.tagName)&&s(b),b.context&&b.context.tagName==g||_.matchClosing===!1?(i="tag",v):(i="tag error",R)}else return _.allowMissingTagName&&o=="endTag"?(i="tag bracket",v(o,S,b)):(i="error",R)}function v(o,S,b){return o!="endTag"?(i="error",v):(s(b),f)}function R(o,S,b){return i="error",v(o,S,b)}function p(o,S,b){if(o=="word")return i="attribute",a;if(o=="endTag"||o=="selfcloseTag"){var g=b.tagName,U=b.tagStart;return b.tagName=b.tagStart=null,o=="selfcloseTag"||_.autoSelfClosers.hasOwnProperty(g)?l(b,g):(l(b,g),b.context=new u(b,g,U==b.indented)),f}return i="error",p}function a(o,S,b){return o=="equals"?r:(_.allowMissing||(i="error"),p(o,S,b))}function r(o,S,b){return o=="string"?n:o=="word"&&_.allowUnquoted?(i="string",p):(i="error",p(o,S,b))}function n(o,S,b){return o=="string"?n:p(o,S,b)}return{startState:function(o){var S={tokenize:h,state:f,indented:o||0,tagName:null,tagStart:null,context:null};return o!=null&&(S.baseIndent=o),S},token:function(o,S){if(!S.tagName&&o.sol()&&(S.indented=o.indentation()),o.eatSpace())return null;x=null;var b=S.tokenize(o,S);return(b||x)&&b!="comment"&&(i=null,S.state=S.state(x||b,o,S),i&&(b=i=="error"?b+" error":i)),b},indent:function(o,S,b){var g=o.context;if(o.tokenize.isInAttribute)return o.tagStart==o.indented?o.stringStartCol+1:o.indented+w;if(g&&g.noIndent)return J.Pass;if(o.tokenize!=O&&o.tokenize!=h)return b?b.match(/^(\s*)/)[0].length:0;if(o.tagName)return _.multilineTagIndentPastTag!==!1?o.tagStart+o.tagName.length+2:o.tagStart+w*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/<!\[CDATA\[/.test(S))return 0;var U=S&&/^<(\/)?([\w_:\.-]*)/.exec(S);if(U&&U[1])for(;g;)if(g.tagName==U[2]){g=g.prev;break}else if(_.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(U)for(;g;){var K=_.contextGrabbers[g.tagName];if(K&&K.hasOwnProperty(U[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+w:o.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(o){o.state==r&&(o.state=p)},xmlCurrentTag:function(o){return o.tagName?{name:o.tagName,close:o.type=="closeTag"}:null},xmlCurrentContext:function(o){for(var S=[],b=o.context;b;b=b.prev)b.tagName&&S.push(b.tagName);return S.reverse()}}}),J.defineMIME("text/xml","xml"),J.defineMIME("application/xml","xml"),J.mimeModes.hasOwnProperty("text/html")||J.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function($e,me,z){$e.exports={md:"md___1fRow"}},"1j5w":function($e,me,z){"use strict";z.d(me,"d",function(){return ht}),z.d(me,"b",function(){return We}),z.d(me,"c",function(){return ut}),z.d(me,"a",function(){return Ut});var J=z("VTBJ"),N=z("1OyB"),L=z("vuIU"),Q=z("JX7q"),D=z("Ji7U"),w=z("LK+K"),_=z("q1tI"),c=z("I8Z2"),C=z("BGR+"),x=z("wx14"),i=z("rePB"),h=z("4IlW"),O=z("2GS6"),T=z("Gytx"),y=z.n(T),B=z("TSYQ"),u=z.n(B),s=z("U8pU"),l=z("ODXe"),f=/iPhone/i,m=/iPod/i,E=/iPad/i,v=/\bAndroid(?:.+)Mobile\b/i,R=/Android/i,p=/\bAndroid(?:.+)SD4930UR\b/i,a=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,r=/Windows Phone/i,n=/\bWindows(?:.+)ARM\b/i,o=/BlackBerry/i,S=/BB10/i,b=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function K(_t,At){return _t.test(At)}function W(_t){var At=_t||(typeof navigator!="undefined"?navigator.userAgent:""),nt=At.split("[FBAN");if(typeof nt[1]!="undefined"){var rt=nt,xe=Object(l.a)(rt,1);At=xe[0]}if(nt=At.split("Twitter"),typeof nt[1]!="undefined"){var Fe=nt,dt=Object(l.a)(Fe,1);At=dt[0]}var at={apple:{phone:K(f,At)&&!K(r,At),ipod:K(m,At),tablet:!K(f,At)&&K(E,At)&&!K(r,At),device:(K(f,At)||K(m,At)||K(E,At))&&!K(r,At)},amazon:{phone:K(p,At),tablet:!K(p,At)&&K(a,At),device:K(p,At)||K(a,At)},android:{phone:!K(r,At)&&K(p,At)||!K(r,At)&&K(v,At),tablet:!K(r,At)&&!K(p,At)&&!K(v,At)&&(K(a,At)||K(R,At)),device:!K(r,At)&&(K(p,At)||K(a,At)||K(v,At)||K(R,At))||K(/\bokhttp\b/i,At)},windows:{phone:K(r,At),tablet:K(n,At),device:K(r,At)||K(n,At)},other:{blackberry:K(o,At),blackberry10:K(S,At),opera:K(b,At),firefox:K(U,At),chrome:K(g,At),device:K(o,At)||K(S,At)||K(b,At)||K(U,At)||K(g,At)},any:null,phone:null,tablet:null};return at.any=at.apple.device||at.android.device||at.windows.device||at.other.device,at.phone=at.apple.phone||at.android.phone||at.windows.phone,at.tablet=at.apple.tablet||at.android.tablet||at.windows.tablet,at}var q=Object(J.a)(Object(J.a)({},W()),{},{isMobile:W}),Y=q;function V(){}function te(_t,At,nt){var rt=At||"";return _t.key||"".concat(rt,"item_").concat(nt)}function X(_t){return"".concat(_t,"-menu-")}function se(_t,At){var nt=-1;_.Children.forEach(_t,function(rt){nt+=1,rt&&rt.type&&rt.type.isMenuItemGroup?_.Children.forEach(rt.props.children,function(xe){nt+=1,At(xe,nt)}):At(rt,nt)})}function le(_t,At,nt){if(!_t||nt.find)return;_.Children.forEach(_t,function(rt){if(rt){var xe=rt.type;if(!xe||!(xe.isSubMenu||xe.isMenuItem||xe.isMenuItemGroup))return;At.indexOf(rt.key)!==-1?nt.find=!0:rt.props.children&&le(rt.props.children,At,nt)}})}var Te=["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(At){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rt=At&&typeof At.getBoundingClientRect=="function"&&At.getBoundingClientRect().width;if(rt){if(nt){var xe=getComputedStyle(At),Fe=xe.marginLeft,dt=xe.marginRight;rt+=+Fe.replace("px","")+ +dt.replace("px","")}rt=+rt.toFixed(6)}return rt||0},Be=function(At,nt,rt){At&&Object(s.a)(At.style)==="object"&&(At.style[nt]=rt)},De=function(){return Y.any},Ve=z("KQm4"),_e=z("Ff2n"),Le=z("i8i4"),tt=z("bdgK"),Et=z("uciX"),Oe=z("8XRh"),He={adjustX:1,adjustY:1},it={topLeft:{points:["bl","tl"],overflow:He,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:He,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:He,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:He,offset:[4,0]}},Ae={topLeft:{points:["bl","tl"],overflow:He,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:He,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:He,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:He,offset:[4,0]}},re=it,ae=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},we=function(At,nt,rt){var xe=X(nt),Fe=At.getState();At.setState({defaultActiveFirst:Object(J.a)(Object(J.a)({},Fe.defaultActiveFirst),{},Object(i.a)({},xe,rt))})},Re=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(rt){var xe;Object(N.a)(this,nt),xe=At.call(this,rt),xe.onDestroy=function(qe){xe.props.onDestroy(qe)},xe.onKeyDown=function(qe){var Bt=qe.keyCode,Ht=xe.menuInstance,Nt=xe.props,Gt=Nt.isOpen,Or=Nt.store;if(Bt===h.a.ENTER)return xe.onTitleClick(qe),we(Or,xe.props.eventKey,!0),!0;if(Bt===h.a.RIGHT)return Gt?Ht.onKeyDown(qe):(xe.triggerOpenChange(!0),we(Or,xe.props.eventKey,!0)),!0;if(Bt===h.a.LEFT){var Pr;if(Gt)Pr=Ht.onKeyDown(qe);else return;return Pr||(xe.triggerOpenChange(!1),Pr=!0),Pr}return Gt&&(Bt===h.a.UP||Bt===h.a.DOWN)?Ht.onKeyDown(qe):void 0},xe.onOpenChange=function(qe){xe.props.onOpenChange(qe)},xe.onPopupVisibleChange=function(qe){xe.triggerOpenChange(qe,qe?"mouseenter":"mouseleave")},xe.onMouseEnter=function(qe){var Bt=xe.props,Ht=Bt.eventKey,Nt=Bt.onMouseEnter,Gt=Bt.store;we(Gt,xe.props.eventKey,!1),Nt({key:Ht,domEvent:qe})},xe.onMouseLeave=function(qe){var Bt=xe.props,Ht=Bt.parentMenu,Nt=Bt.eventKey,Gt=Bt.onMouseLeave;Ht.subMenuInstance=Object(Q.a)(xe),Gt({key:Nt,domEvent:qe})},xe.onTitleMouseEnter=function(qe){var Bt=xe.props,Ht=Bt.eventKey,Nt=Bt.onItemHover,Gt=Bt.onTitleMouseEnter;Nt({key:Ht,hover:!0}),Gt({key:Ht,domEvent:qe})},xe.onTitleMouseLeave=function(qe){var Bt=xe.props,Ht=Bt.parentMenu,Nt=Bt.eventKey,Gt=Bt.onItemHover,Or=Bt.onTitleMouseLeave;Ht.subMenuInstance=Object(Q.a)(xe),Gt({key:Nt,hover:!1}),Or({key:Nt,domEvent:qe})},xe.onTitleClick=function(qe){var Bt=Object(Q.a)(xe),Ht=Bt.props;if(Ht.onTitleClick({key:Ht.eventKey,domEvent:qe}),Ht.triggerSubMenuAction==="hover")return;xe.triggerOpenChange(!Ht.isOpen,"click"),we(Ht.store,xe.props.eventKey,!1)},xe.onSubMenuClick=function(qe){typeof xe.props.onClick=="function"&&xe.props.onClick(xe.addKeyPath(qe))},xe.onSelect=function(qe){xe.props.onSelect(qe)},xe.onDeselect=function(qe){xe.props.onDeselect(qe)},xe.getPrefixCls=function(){return"".concat(xe.props.rootPrefixCls,"-submenu")},xe.getActiveClassName=function(){return"".concat(xe.getPrefixCls(),"-active")},xe.getDisabledClassName=function(){return"".concat(xe.getPrefixCls(),"-disabled")},xe.getSelectedClassName=function(){return"".concat(xe.getPrefixCls(),"-selected")},xe.getOpenClassName=function(){return"".concat(xe.props.rootPrefixCls,"-submenu-open")},xe.saveMenuInstance=function(qe){xe.menuInstance=qe},xe.addKeyPath=function(qe){return Object(J.a)(Object(J.a)({},qe),{},{keyPath:(qe.keyPath||[]).concat(xe.props.eventKey)})},xe.triggerOpenChange=function(qe,Bt){var Ht=xe.props.eventKey,Nt=function(){xe.onOpenChange({key:Ht,item:Object(Q.a)(xe),trigger:Bt,open:qe})};Bt==="mouseenter"?xe.mouseenterTimeout=setTimeout(function(){Nt()},0):Nt()},xe.isChildrenSelected=function(){var qe={find:!1};return le(xe.props.children,xe.props.selectedKeys,qe),qe.find},xe.isOpen=function(){return xe.props.openKeys.indexOf(xe.props.eventKey)!==-1},xe.adjustWidth=function(){if(!xe.subMenuTitle||!xe.menuInstance)return;var qe=Le.findDOMNode(xe.menuInstance);if(qe.offsetWidth>=xe.subMenuTitle.offsetWidth)return;qe.style.minWidth="".concat(xe.subMenuTitle.offsetWidth,"px")},xe.saveSubMenuTitle=function(qe){xe.subMenuTitle=qe},xe.getBaseProps=function(){var qe=Object(Q.a)(xe),Bt=qe.props;return{mode:Bt.mode==="horizontal"?"vertical":Bt.mode,visible:xe.props.isOpen,level:Bt.level+1,inlineIndent:Bt.inlineIndent,focusable:!1,onClick:xe.onSubMenuClick,onSelect:xe.onSelect,onDeselect:xe.onDeselect,onDestroy:xe.onDestroy,selectedKeys:Bt.selectedKeys,eventKey:"".concat(Bt.eventKey,"-menu-"),openKeys:Bt.openKeys,motion:Bt.motion,onOpenChange:xe.onOpenChange,subMenuOpenDelay:Bt.subMenuOpenDelay,parentMenu:Object(Q.a)(xe),subMenuCloseDelay:Bt.subMenuCloseDelay,forceSubMenuRender:Bt.forceSubMenuRender,triggerSubMenuAction:Bt.triggerSubMenuAction,builtinPlacements:Bt.builtinPlacements,defaultActiveFirst:Bt.store.getState().defaultActiveFirst[X(Bt.eventKey)],multiple:Bt.multiple,prefixCls:Bt.rootPrefixCls,id:xe.internalMenuId,manualRef:xe.saveMenuInstance,itemIcon:Bt.itemIcon,expandIcon:Bt.expandIcon,direction:Bt.direction}},xe.getMotion=function(qe,Bt){var Ht=Object(Q.a)(xe),Nt=Ht.haveRendered,Gt=xe.props,Or=Gt.motion,Pr=Gt.rootPrefixCls,yr=Object(J.a)(Object(J.a)({},Or),{},{leavedClassName:"".concat(Pr,"-hidden"),removeOnLeave:!1,motionAppear:Nt||!Bt||qe!=="inline"});return yr};var Fe=rt.store,dt=rt.eventKey,at=Fe.getState(),xt=at.defaultActiveFirst;xe.isRootMenu=!1;var wt=!1;return xt&&(wt=xt[dt]),we(Fe,dt,wt),xe}return Object(L.a)(nt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xe=this,Fe=this.props,dt=Fe.mode,at=Fe.parentMenu,xt=Fe.manualRef;if(xt&&xt(this),dt!=="horizontal"||!at.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return xe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var xe=this.props,Fe=xe.onDestroy,dt=xe.eventKey;Fe&&Fe(dt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(xe){var Fe=this,dt=this.getBaseProps(),at=this.getMotion(dt.mode,dt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||dt.visible||dt.forceSubMenuRender,!this.haveOpened)return _.createElement("div",null);var xt=dt.direction;return _.createElement(Oe.default,Object.assign({visible:dt.visible},at),function(wt){var qe=wt.className,Bt=wt.style,Ht=u()("".concat(dt.prefixCls,"-sub"),qe,Object(i.a)({},"".concat(dt.prefixCls,"-rtl"),xt==="rtl"));return _.createElement(Ke,Object.assign({},dt,{id:Fe.internalMenuId,className:Ht,style:Bt}),xe)})}},{key:"render",value:function(){var xe,Fe=Object(J.a)({},this.props),dt=Fe.isOpen,at=this.getPrefixCls(),xt=Fe.mode==="inline",wt=u()(at,"".concat(at,"-").concat(Fe.mode),(xe={},Object(i.a)(xe,Fe.className,!!Fe.className),Object(i.a)(xe,this.getOpenClassName(),dt),Object(i.a)(xe,this.getActiveClassName(),Fe.active||dt&&!xt),Object(i.a)(xe,this.getDisabledClassName(),Fe.disabled),Object(i.a)(xe,this.getSelectedClassName(),this.isChildrenSelected()),xe));this.internalMenuId||(Fe.eventKey?this.internalMenuId="".concat(Fe.eventKey,"$Menu"):(ae+=1,this.internalMenuId="$__$".concat(ae,"$Menu")));var qe={},Bt={},Ht={};Fe.disabled||(qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Bt={onClick:this.onTitleClick},Ht={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Nt={},Gt=Fe.direction;xt&&(Gt==="rtl"?Nt.paddingRight=Fe.inlineIndent*Fe.level:Nt.paddingLeft=Fe.inlineIndent*Fe.level);var Or={};this.props.isOpen&&(Or={"aria-owns":this.internalMenuId});var Pr=null;Fe.mode!=="horizontal"&&(Pr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Pr=_.createElement(this.props.expandIcon,Object(J.a)({},this.props))));var yr=_.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Nt,className:"".concat(at,"-title"),role:"button"},Ht,Bt,{"aria-expanded":dt},Or,{"aria-haspopup":"true",title:typeof Fe.title=="string"?Fe.title:void 0}),Fe.title,Pr||_.createElement("i",{className:"".concat(at,"-arrow")})),jt=this.renderChildren(Fe.children),Dr=Fe.parentMenu.isRootMenu?Fe.parentMenu.props.getPopupContainer:function(Je){return Je.parentNode},Wr=ce[Fe.mode],Mr=Fe.popupOffset?{offset:Fe.popupOffset}:{},pr=Fe.mode==="inline"?"":Fe.popupClassName;pr+=Gt==="rtl"?" ".concat(at,"-rtl"):"";var Sr=Fe.disabled,mn=Fe.triggerSubMenuAction,on=Fe.subMenuOpenDelay,fe=Fe.forceSubMenuRender,ye=Fe.subMenuCloseDelay,Ue=Fe.builtinPlacements;Te.forEach(function(Je){return delete Fe[Je]}),delete Fe.onClick;var et=Gt==="rtl"?Object.assign({},Ae,Ue):Object.assign({},it,Ue);return delete Fe.direction,_.createElement("li",Object.assign({},Fe,qe,{className:wt,role:"menuitem"}),xt&&yr,xt&&jt,!xt&&_.createElement(Et.a,{prefixCls:at,popupClassName:u()("".concat(at,"-popup"),pr),getPopupContainer:Dr,builtinPlacements:et,popupPlacement:Wr,popupVisible:dt,popupAlign:Mr,popup:jt,action:Sr?[]:[mn],mouseEnterDelay:on,mouseLeaveDelay:ye,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fe},yr))}}]),nt}(_.Component);Re.defaultProps={onMouseEnter:V,onMouseLeave:V,onTitleMouseEnter:V,onTitleMouseLeave:V,onTitleClick:V,manualRef:V,mode:"vertical",title:""};var ke=Object(c.b)(function(_t,At){var nt=_t.openKeys,rt=_t.activeKey,xe=_t.selectedKeys,Fe=At.eventKey,dt=At.subMenuKey;return{isOpen:nt.indexOf(Fe)>-1,active:rt[dt]===Fe,selectedKeys:xe}})(Re);ke.isSubMenu=!0;var ht=ke,ft="menuitem-overflowed",vt=.5,yt=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(){var rt;return Object(N.a)(this,nt),rt=At.apply(this,arguments),rt.resizeObserver=null,rt.mutationObserver=null,rt.originalTotalWidth=0,rt.overflowedItems=[],rt.menuItemSizes=[],rt.cancelFrameId=null,rt.state={lastVisibleIndex:void 0},rt.getMenuItemNodes=function(){var xe=rt.props.prefixCls,Fe=Le.findDOMNode(Object(Q.a)(rt));return Fe?[].slice.call(Fe.children).filter(function(dt){return dt.className.split(" ").indexOf("".concat(xe,"-overflowed-submenu"))<0}):[]},rt.getOverflowedSubMenuItem=function(xe,Fe,dt){var at=rt.props,xt=at.overflowedIndicator,wt=at.level,qe=at.mode,Bt=at.prefixCls,Ht=at.theme;if(wt!==1||qe!=="horizontal")return null;var Nt=rt.props.children[0],Gt=Nt.props,Or=Gt.children,Pr=Gt.title,yr=Gt.style,jt=Object(_e.a)(Gt,["children","title","style"]),Dr=Object(J.a)({},yr),Wr="".concat(xe,"-overflowed-indicator"),Mr="".concat(xe,"-overflowed-indicator");Fe.length===0&&dt!==!0?Dr=Object(J.a)(Object(J.a)({},Dr),{},{display:"none"}):dt&&(Dr=Object(J.a)(Object(J.a)({},Dr),{},{visibility:"hidden",position:"absolute"}),Wr="".concat(Wr,"-placeholder"),Mr="".concat(Mr,"-placeholder"));var pr=Ht?"".concat(Bt,"-").concat(Ht):"",Sr={};return Te.forEach(function(mn){jt[mn]!==void 0&&(Sr[mn]=jt[mn])}),_.createElement(ht,Object.assign({title:xt,className:"".concat(Bt,"-overflowed-submenu"),popupClassName:pr},Sr,{key:Wr,eventKey:Mr,disabled:!1,style:Dr}),Fe)},rt.setChildrenWidthAndResize=function(){if(rt.props.mode!=="horizontal")return;var xe=Le.findDOMNode(Object(Q.a)(rt));if(!xe)return;var Fe=xe.children;if(!Fe||Fe.length===0)return;var dt=xe.children[Fe.length-1];Be(dt,"display","inline-block");var at=rt.getMenuItemNodes(),xt=at.filter(function(wt){return wt.className.split(" ").indexOf(ft)>=0});xt.forEach(function(wt){Be(wt,"display","inline-block")}),rt.menuItemSizes=at.map(function(wt){return Ee(wt,!0)}),xt.forEach(function(wt){Be(wt,"display","none")}),rt.overflowedIndicatorWidth=Ee(xe.children[xe.children.length-1],!0),rt.originalTotalWidth=rt.menuItemSizes.reduce(function(wt,qe){return wt+qe},0),rt.handleResize(),Be(dt,"display","none")},rt.handleResize=function(){if(rt.props.mode!=="horizontal")return;var xe=Le.findDOMNode(Object(Q.a)(rt));if(!xe)return;var Fe=Ee(xe);rt.overflowedItems=[];var dt=0,at;rt.originalTotalWidth>Fe+vt&&(at=-1,rt.menuItemSizes.forEach(function(xt){dt+=xt,dt+rt.overflowedIndicatorWidth<=Fe&&(at+=1)})),rt.setState({lastVisibleIndex:at})},rt}return Object(L.a)(nt,[{key:"componentDidMount",value:function(){var xe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Fe=Le.findDOMNode(this);if(!Fe)return;this.resizeObserver=new tt.default(function(dt){dt.forEach(function(){var at=xe.cancelFrameId;cancelAnimationFrame(at),xe.cancelFrameId=requestAnimationFrame(xe.setChildrenWidthAndResize)})}),[].slice.call(Fe.children).concat(Fe).forEach(function(dt){xe.resizeObserver.observe(dt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){xe.resizeObserver.disconnect(),[].slice.call(Fe.children).concat(Fe).forEach(function(dt){xe.resizeObserver.observe(dt)}),xe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Fe,{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(xe){var Fe=this,dt=this.state.lastVisibleIndex;return(xe||[]).reduce(function(at,xt,wt){var qe=xt;if(Fe.props.mode==="horizontal"){var Bt=Fe.getOverflowedSubMenuItem(xt.props.eventKey,[]);dt!==void 0&&Fe.props.className.indexOf("".concat(Fe.props.prefixCls,"-root"))!==-1&&(wt>dt&&(qe=_.cloneElement(xt,{style:{display:"none"},eventKey:"".concat(xt.props.eventKey,"-hidden"),className:"".concat(ft)})),wt===dt+1&&(Fe.overflowedItems=xe.slice(dt+1).map(function(Nt){return _.cloneElement(Nt,{key:Nt.props.eventKey,mode:"vertical-left"})}),Bt=Fe.getOverflowedSubMenuItem(xt.props.eventKey,Fe.overflowedItems)));var Ht=[].concat(Object(Ve.a)(at),[Bt,qe]);return wt===xe.length-1&&Ht.push(Fe.getOverflowedSubMenuItem(xt.props.eventKey,[],!0)),Ht}return[].concat(Object(Ve.a)(at),[qe])},[])}},{key:"render",value:function(){var xe=this.props,Fe=xe.visible,dt=xe.prefixCls,at=xe.overflowedIndicator,xt=xe.mode,wt=xe.level,qe=xe.tag,Bt=xe.children,Ht=xe.theme,Nt=Object(_e.a)(xe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Gt=qe;return _.createElement(Gt,Object.assign({},Nt),this.renderChildren(Bt))}}]),nt}(_.Component);yt.defaultProps={tag:"div",className:""};var Lt=yt;function Mt(_t){return _t.length?_t.every(function(At){return!!At.props.disabled}):!0}function Qe(_t,At,nt){var rt=_t.getState();_t.setState({activeKey:Object(J.a)(Object(J.a)({},rt.activeKey),{},Object(i.a)({},At,nt))})}function Pe(_t){return _t.eventKey||"0-menu-"}function lt(_t,At){var nt=At,rt=_t.children,xe=_t.eventKey;if(nt){var Fe;if(se(rt,function(dt,at){dt&&dt.props&&!dt.props.disabled&&nt===te(dt,xe,at)&&(Fe=!0)}),Fe)return nt}return nt=null,_t.defaultActiveFirst&&se(rt,function(dt,at){!nt&&dt&&!dt.props.disabled&&(nt=te(dt,xe,at))}),nt}function pt(_t){if(_t){var At=this.instanceArray.indexOf(_t);At!==-1?this.instanceArray[At]=_t:this.instanceArray.push(_t)}}var Ze=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(rt){var xe;return Object(N.a)(this,nt),xe=At.call(this,rt),xe.onKeyDown=function(Fe,dt){var at=Fe.keyCode,xt;if(xe.getFlatInstanceArray().forEach(function(qe){qe&&qe.props.active&&qe.onKeyDown&&(xt=qe.onKeyDown(Fe))}),xt)return 1;var wt=null;return(at===h.a.UP||at===h.a.DOWN)&&(wt=xe.step(at===h.a.UP?-1:1)),wt?(Fe.preventDefault(),Qe(xe.props.store,Pe(xe.props),wt.props.eventKey),typeof dt=="function"&&dt(wt),1):void 0},xe.onItemHover=function(Fe){var dt=Fe.key,at=Fe.hover;Qe(xe.props.store,Pe(xe.props),at?dt:null)},xe.onDeselect=function(Fe){xe.props.onDeselect(Fe)},xe.onSelect=function(Fe){xe.props.onSelect(Fe)},xe.onClick=function(Fe){xe.props.onClick(Fe)},xe.onOpenChange=function(Fe){xe.props.onOpenChange(Fe)},xe.onDestroy=function(Fe){xe.props.onDestroy(Fe)},xe.getFlatInstanceArray=function(){return xe.instanceArray},xe.step=function(Fe){var dt=xe.getFlatInstanceArray(),at=xe.props.store.getState().activeKey[Pe(xe.props)],xt=dt.length;if(!xt)return null;Fe<0&&(dt=dt.concat().reverse());var wt=-1;if(dt.every(function(Nt,Gt){return Nt&&Nt.props.eventKey===at?(wt=Gt,!1):!0}),!xe.props.defaultActiveFirst&&wt!==-1&&Mt(dt.slice(wt,xt-1)))return;var qe=(wt+1)%xt,Bt=qe;do{var Ht=dt[Bt];if(!Ht||Ht.props.disabled)Bt=(Bt+1)%xt;else return Ht}while(Bt!==qe);return null},xe.renderCommonMenuItem=function(Fe,dt,at){var xt=xe.props.store.getState(),wt=Object(Q.a)(xe),qe=wt.props,Bt=te(Fe,qe.eventKey,dt),Ht=Fe.props;if(!Ht||typeof Fe.type=="string")return Fe;var Nt=Bt===xt.activeKey,Gt=Object(J.a)(Object(J.a)({mode:Ht.mode||qe.mode,level:qe.level,inlineIndent:qe.inlineIndent,renderMenuItem:xe.renderMenuItem,rootPrefixCls:qe.prefixCls,index:dt,parentMenu:qe.parentMenu,manualRef:Ht.disabled?void 0:Object(O.a)(Fe.ref,pt.bind(Object(Q.a)(xe))),eventKey:Bt,active:!Ht.disabled&&Nt,multiple:qe.multiple,onClick:function(Pr){(Ht.onClick||V)(Pr),xe.onClick(Pr)},onItemHover:xe.onItemHover,motion:qe.motion,subMenuOpenDelay:qe.subMenuOpenDelay,subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,onOpenChange:xe.onOpenChange,onDeselect:xe.onDeselect,onSelect:xe.onSelect,builtinPlacements:qe.builtinPlacements,itemIcon:Ht.itemIcon||xe.props.itemIcon,expandIcon:Ht.expandIcon||xe.props.expandIcon},at),{},{direction:qe.direction});return(qe.mode==="inline"||De())&&(Gt.triggerSubMenuAction="click"),_.cloneElement(Fe,Gt)},xe.renderMenuItem=function(Fe,dt,at){if(!Fe)return null;var xt=xe.props.store.getState(),wt={openKeys:xt.openKeys,selectedKeys:xt.selectedKeys,triggerSubMenuAction:xe.props.triggerSubMenuAction,subMenuKey:at};return xe.renderCommonMenuItem(Fe,dt,wt)},rt.store.setState({activeKey:Object(J.a)(Object(J.a)({},rt.store.getState().activeKey),{},Object(i.a)({},rt.eventKey,lt(rt,rt.activeKey)))}),xe.instanceArray=[],xe}return Object(L.a)(nt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(xe){return this.props.visible||xe.visible||this.props.className!==xe.className||!y()(this.props.style,xe.style)}},{key:"componentDidUpdate",value:function(xe){var Fe=this.props,dt="activeKey"in Fe?Fe.activeKey:Fe.store.getState().activeKey[Pe(Fe)],at=lt(Fe,dt);if(at!==dt)Qe(Fe.store,Pe(Fe),at);else if("activeKey"in xe){var xt=lt(xe,xe.activeKey);at!==xt&&Qe(Fe.store,Pe(Fe),at)}}},{key:"render",value:function(){var xe=this,Fe=Object(x.a)({},this.props);this.instanceArray=[];var dt=u()(Fe.prefixCls,Fe.className,"".concat(Fe.prefixCls,"-").concat(Fe.mode)),at={className:dt,role:Fe.role||"menu"};Fe.id&&(at.id=Fe.id),Fe.focusable&&(at.tabIndex=0,at.onKeyDown=this.onKeyDown);var xt=Fe.prefixCls,wt=Fe.eventKey,qe=Fe.visible,Bt=Fe.level,Ht=Fe.mode,Nt=Fe.overflowedIndicator,Gt=Fe.theme;return Te.forEach(function(Or){return delete Fe[Or]}),delete Fe.onClick,_.createElement(Lt,Object.assign({},Fe,{prefixCls:xt,mode:Ht,tag:"ul",level:Bt,theme:Gt,visible:qe,overflowedIndicator:Nt},at),_.Children.map(Fe.children,function(Or,Pr){return xe.renderMenuItem(Or,Pr,wt||"0-menu-")}))}}]),nt}(_.Component);Ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:V};var st=Object(c.b)()(Ze),Ke=st,Ie=z("Kwbf");function Me(_t,At,nt){var rt=_t.prefixCls,xe=_t.motion,Fe=_t.defaultMotions,dt=Fe===void 0?{}:Fe,at=_t.openAnimation,xt=_t.openTransitionName,wt=At.switchingModeFromInline;if(xe)return xe;if(Object(s.a)(at)==="object"&&at)Object(Ie.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof at=="string")return{motionName:"".concat(rt,"-open-").concat(at)};if(xt)return{motionName:xt};var qe=dt[nt];return qe||(wt?null:dt.other)}var pe=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(rt){var xe;Object(N.a)(this,nt),xe=At.call(this,rt),xe.inlineOpenKeys=[],xe.onSelect=function(at){var xt=Object(Q.a)(xe),wt=xt.props;if(wt.selectable){var qe=xe.store.getState(),Bt=qe.selectedKeys,Ht=at.key;wt.multiple?Bt=Bt.concat([Ht]):Bt=[Ht],"selectedKeys"in wt||xe.store.setState({selectedKeys:Bt}),wt.onSelect(Object(J.a)(Object(J.a)({},at),{},{selectedKeys:Bt}))}},xe.onClick=function(at){var xt=xe.getRealMenuMode(),wt=Object(Q.a)(xe),qe=wt.store,Bt=wt.props.onOpenChange;xt!=="inline"&&!("openKeys"in xe.props)&&(qe.setState({openKeys:[]}),Bt([])),xe.props.onClick(at)},xe.onKeyDown=function(at,xt){xe.innerMenu.getWrappedInstance().onKeyDown(at,xt)},xe.onOpenChange=function(at){var xt=Object(Q.a)(xe),wt=xt.props,qe=xe.store.getState().openKeys.concat(),Bt=!1,Ht=function(Gt){var Or=!1;if(Gt.open)Or=qe.indexOf(Gt.key)===-1,Or&&qe.push(Gt.key);else{var Pr=qe.indexOf(Gt.key);Or=Pr!==-1,Or&&qe.splice(Pr,1)}Bt=Bt||Or};Array.isArray(at)?at.forEach(Ht):Ht(at),Bt&&("openKeys"in xe.props||xe.store.setState({openKeys:qe}),wt.onOpenChange(qe))},xe.onDeselect=function(at){var xt=Object(Q.a)(xe),wt=xt.props;if(wt.selectable){var qe=xe.store.getState().selectedKeys.concat(),Bt=at.key,Ht=qe.indexOf(Bt);Ht!==-1&&qe.splice(Ht,1),"selectedKeys"in wt||xe.store.setState({selectedKeys:qe}),wt.onDeselect(Object(J.a)(Object(J.a)({},at),{},{selectedKeys:qe}))}},xe.onMouseEnter=function(at){xe.restoreModeVerticalFromInline();var xt=xe.props.onMouseEnter;xt&&xt(at)},xe.onTransitionEnd=function(at){var xt=at.propertyName==="width"&&at.target===at.currentTarget,wt=at.target.className,qe=Object.prototype.toString.call(wt)==="[object SVGAnimatedString]"?wt.animVal:wt,Bt=at.propertyName==="font-size"&&qe.indexOf("anticon")>=0;(xt||Bt)&&xe.restoreModeVerticalFromInline()},xe.setInnerMenu=function(at){xe.innerMenu=at},xe.isRootMenu=!0;var Fe=rt.defaultSelectedKeys,dt=rt.defaultOpenKeys;return"selectedKeys"in rt&&(Fe=rt.selectedKeys||[]),"openKeys"in rt&&(dt=rt.openKeys||[]),xe.store=Object(c.c)({selectedKeys:Fe,openKeys:dt,activeKey:{"0-menu-":lt(rt,rt.activeKey)}}),xe.state={switchingModeFromInline:!1},xe}return Object(L.a)(nt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(xe){this.updateOpentKeysWhenSwitchMode(xe),this.updateMiniStore();var Fe=this.props,dt=Fe.siderCollapsed,at=Fe.inlineCollapsed,xt=Fe.onOpenChange;(!xe.inlineCollapsed&&at||!xe.siderCollapsed&&dt)&&xt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(xe){var Fe=this.props,dt=this.store,at=this.inlineOpenKeys,xt=dt.getState(),wt={};xe.mode==="inline"&&Fe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Fe||((Fe.inlineCollapsed&&!xe.inlineCollapsed||Fe.siderCollapsed&&!xe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=xt.openKeys.concat(),wt.openKeys=[]),(!Fe.inlineCollapsed&&xe.inlineCollapsed||!Fe.siderCollapsed&&xe.siderCollapsed)&&(wt.openKeys=at,this.inlineOpenKeys=[])),Object.keys(wt).length&&dt.setState(wt)}},{key:"updateMenuDisplay",value:function(){var xe=this.props.collapsedWidth,Fe=this.store,dt=this.prevOpenKeys,at=this.getInlineCollapsed()&&(xe===0||xe==="0"||xe==="0px");at?(this.prevOpenKeys=Fe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):dt&&(this.store.setState({openKeys:dt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var xe=this.props.mode,Fe=this.state.switchingModeFromInline,dt=this.getInlineCollapsed();return Fe&&dt?"inline":dt?"vertical":xe}},{key:"getInlineCollapsed",value:function(){var xe=this.props,Fe=xe.inlineCollapsed,dt=xe.siderCollapsed;return dt!==void 0?dt:Fe}},{key:"restoreModeVerticalFromInline",value:function(){var xe=this.state.switchingModeFromInline;xe&&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 xe=Object(J.a)({},Object(C.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Fe=this.getRealMenuMode();return xe.className+=" ".concat(xe.prefixCls,"-root"),xe.direction==="rtl"&&(xe.className+=" ".concat(xe.prefixCls,"-rtl")),xe=Object(J.a)(Object(J.a)({},xe),{},{mode:Fe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Me(this.props,this.state,Fe)}),delete xe.openAnimation,delete xe.openTransitionName,_.createElement(c.a,{store:this.store},_.createElement(Ke,Object.assign({},xe,{ref:this.setInnerMenu}),this.props.children))}}]),nt}(_.Component);pe.defaultProps={selectable:!0,onClick:V,onSelect:V,onOpenChange:V,onDeselect:V,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:_.createElement("span",null,"\xB7\xB7\xB7")};var be=pe,ge=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(){var rt;return Object(N.a)(this,nt),rt=At.apply(this,arguments),rt.onKeyDown=function(xe){var Fe=xe.keyCode;return Fe===h.a.ENTER?(rt.onClick(xe),!0):void 0},rt.onMouseLeave=function(xe){var Fe=rt.props,dt=Fe.eventKey,at=Fe.onItemHover,xt=Fe.onMouseLeave;at({key:dt,hover:!1}),xt({key:dt,domEvent:xe})},rt.onMouseEnter=function(xe){var Fe=rt.props,dt=Fe.eventKey,at=Fe.onItemHover,xt=Fe.onMouseEnter;at({key:dt,hover:!0}),xt({key:dt,domEvent:xe})},rt.onClick=function(xe){var Fe=rt.props,dt=Fe.eventKey,at=Fe.multiple,xt=Fe.onClick,wt=Fe.onSelect,qe=Fe.onDeselect,Bt=Fe.isSelected,Ht={key:dt,keyPath:[dt],item:Object(Q.a)(rt),domEvent:xe};xt(Ht),at?Bt?qe(Ht):wt(Ht):Bt||wt(Ht)},rt.saveNode=function(xe){rt.node=xe},rt}return Object(L.a)(nt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var xe=this.props;xe.onDestroy&&xe.onDestroy(xe.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 xe,Fe=Object(J.a)({},this.props),dt=u()(this.getPrefixCls(),Fe.className,(xe={},Object(i.a)(xe,this.getActiveClassName(),!Fe.disabled&&Fe.active),Object(i.a)(xe,this.getSelectedClassName(),Fe.isSelected),Object(i.a)(xe,this.getDisabledClassName(),Fe.disabled),xe)),at=Object(J.a)(Object(J.a)({},Fe.attribute),{},{title:typeof Fe.title=="string"?Fe.title:void 0,className:dt,role:Fe.role||"menuitem","aria-disabled":Fe.disabled});Fe.role==="option"?at=Object(J.a)(Object(J.a)({},at),{},{role:"option","aria-selected":Fe.isSelected}):(Fe.role===null||Fe.role==="none")&&(at.role="none");var xt={onClick:Fe.disabled?null:this.onClick,onMouseLeave:Fe.disabled?null:this.onMouseLeave,onMouseEnter:Fe.disabled?null:this.onMouseEnter},wt=Object(J.a)({},Fe.style);Fe.mode==="inline"&&(Fe.direction==="rtl"?wt.paddingRight=Fe.inlineIndent*Fe.level:wt.paddingLeft=Fe.inlineIndent*Fe.level),Te.forEach(function(Bt){return delete Fe[Bt]}),delete Fe.direction;var qe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(qe=_.createElement(this.props.itemIcon,this.props)),_.createElement("li",Object.assign({},Object(C.default)(Fe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),at,xt,{style:wt,ref:this.saveNode}),Fe.children,qe)}}]),nt}(_.Component);ge.isMenuItem=!0,ge.defaultProps={onSelect:V,onMouseEnter:V,onMouseLeave:V,manualRef:V};var Ce=Object(c.b)(function(_t,At){var nt=_t.activeKey,rt=_t.selectedKeys,xe=At.eventKey,Fe=At.subMenuKey;return{active:nt[Fe]===xe,isSelected:rt.indexOf(xe)!==-1}})(ge),We=Ce,Ne=function(_t){Object(D.a)(nt,_t);var At=Object(w.a)(nt);function nt(){var rt;return Object(N.a)(this,nt),rt=At.apply(this,arguments),rt.renderInnerMenuItem=function(xe){var Fe=rt.props,dt=Fe.renderMenuItem,at=Fe.index;return dt(xe,at,rt.props.subMenuKey)},rt}return Object(L.a)(nt,[{key:"render",value:function(){var xe=Object(x.a)({},this.props),Fe=xe.className,dt=Fe===void 0?"":Fe,at=xe.rootPrefixCls,xt="".concat(at,"-item-group-title"),wt="".concat(at,"-item-group-list"),qe=xe.title,Bt=xe.children;return Te.forEach(function(Ht){return delete xe[Ht]}),delete xe.onClick,delete xe.direction,_.createElement("li",Object.assign({},xe,{className:"".concat(dt," ").concat(at,"-item-group")}),_.createElement("div",{className:xt,title:typeof qe=="string"?qe:void 0},qe),_.createElement("ul",{className:wt},_.Children.map(Bt,this.renderInnerMenuItem)))}}]),nt}(_.Component);Ne.isMenuItemGroup=!0,Ne.defaultProps={disabled:!0};var ut=Ne,Tt=function(At){var nt=At.className,rt=At.rootPrefixCls,xe=At.style;return _.createElement("li",{className:"".concat(nt," ").concat(rt,"-item-divider"),style:xe})};Tt.defaultProps={disabled:!0,className:"",style:{}};var Ut=Tt,St=me.e=be},"24YM":function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.SensorTabIndex=me.SensorClassName=me.SizeSensorId=void 0;var J="size-sensor-id";me.SizeSensorId=J;var N="size-sensor-object";me.SensorClassName=N;var L="-1";me.SensorTabIndex=L},"2DNl":function($e,me,z){var J=z("IMiH"),N=z("loD1"),L=z("59Ip"),Q=z("aKvl"),D=z("n1HI"),w=z("hX1E"),_=w.normalizeRadian,c=z("Sj9i"),C=z("hyiK"),x=J.CMD,i=Math.PI*2,h=1e-4;function O(v,R){return Math.abs(v-R)<h}var T=[-1,-1,-1],y=[-1,-1];function B(){var v=y[0];y[0]=y[1],y[1]=v}function u(v,R,p,a,r,n,o,S,b,g){if(g>R&&g>a&&g>n&&g>S||g<R&&g<a&&g<n&&g<S)return 0;var U=c.cubicRootAt(R,a,n,S,g,T);if(U===0)return 0;for(var K=0,W=-1,q,Y,V=0;V<U;V++){var te=T[V],X=te===0||te===1?.5:1,se=c.cubicAt(v,p,r,o,te);if(se<b)continue;W<0&&(W=c.cubicExtrema(R,a,n,S,y),y[1]<y[0]&&W>1&&B(),q=c.cubicAt(R,a,n,S,y[0]),W>1&&(Y=c.cubicAt(R,a,n,S,y[1]))),W===2?te<y[0]?K+=q<R?X:-X:te<y[1]?K+=Y<q?X:-X:K+=S<Y?X:-X:te<y[0]?K+=q<R?X:-X:K+=S<q?X:-X}return K}function s(v,R,p,a,r,n,o,S){if(S>R&&S>a&&S>n||S<R&&S<a&&S<n)return 0;var b=c.quadraticRootAt(R,a,n,S,T);if(b===0)return 0;var g=c.quadraticExtremum(R,a,n);if(g>=0&&g<=1){for(var U=0,K=c.quadraticAt(R,a,n,g),W=0;W<b;W++){var q=T[W]===0||T[W]===1?.5:1,Y=c.quadraticAt(v,p,r,T[W]);if(Y<o)continue;T[W]<g?U+=K<R?q:-q:U+=n<K?q:-q}return U}else{var q=T[0]===0||T[0]===1?.5:1,Y=c.quadraticAt(v,p,r,T[0]);return Y<o?0:n<R?q:-q}}function l(v,R,p,a,r,n,o,S){if(S-=R,S>p||S<-p)return 0;var b=Math.sqrt(p*p-S*S);T[0]=-b,T[1]=b;var g=Math.abs(a-r);if(g<1e-4)return 0;if(g%i<1e-4){a=0,r=i;var U=n?1:-1;return o>=T[0]+v&&o<=T[1]+v?U:0}if(n){var b=a;a=_(r),r=_(b)}else a=_(a),r=_(r);a>r&&(r+=i);for(var K=0,W=0;W<2;W++){var q=T[W];if(q+v>o){var Y=Math.atan2(S,q),U=n?1:-1;Y<0&&(Y=i+Y),(Y>=a&&Y<=r||Y+i>=a&&Y+i<=r)&&(Y>Math.PI/2&&Y<Math.PI*1.5&&(U=-U),K+=U)}}return K}function f(v,R,p,a,r){for(var n=0,o=0,S=0,b=0,g=0,U=0;U<v.length;){var K=v[U++];K===x.M&&U>1&&(p||(n+=C(o,S,b,g,a,r))),U===1&&(o=v[U],S=v[U+1],b=o,g=S);switch(K){case x.M:b=v[U++],g=v[U++],o=b,S=g;break;case x.L:if(p){if(N.containStroke(o,S,v[U],v[U+1],R,a,r))return!0}else n+=C(o,S,v[U],v[U+1],a,r)||0;o=v[U++],S=v[U++];break;case x.C:if(p){if(L.containStroke(o,S,v[U++],v[U++],v[U++],v[U++],v[U],v[U+1],R,a,r))return!0}else n+=u(o,S,v[U++],v[U++],v[U++],v[U++],v[U],v[U+1],a,r)||0;o=v[U++],S=v[U++];break;case x.Q:if(p){if(Q.containStroke(o,S,v[U++],v[U++],v[U],v[U+1],R,a,r))return!0}else n+=s(o,S,v[U++],v[U++],v[U],v[U+1],a,r)||0;o=v[U++],S=v[U++];break;case x.A:var W=v[U++],q=v[U++],Y=v[U++],V=v[U++],te=v[U++],X=v[U++];U+=1;var se=1-v[U++],le=Math.cos(te)*Y+W,Te=Math.sin(te)*V+q;U>1?n+=C(o,S,le,Te,a,r):(b=le,g=Te);var Ee=(a-W)*V/Y+W;if(p){if(D.containStroke(W,q,V,te,te+X,se,R,Ee,r))return!0}else n+=l(W,q,V,te,te+X,se,Ee,r);o=Math.cos(te+X)*Y+W,S=Math.sin(te+X)*V+q;break;case x.R:b=o=v[U++],g=S=v[U++];var Be=v[U++],De=v[U++],le=b+Be,Te=g+De;if(p){if(N.containStroke(b,g,le,g,R,a,r)||N.containStroke(le,g,le,Te,R,a,r)||N.containStroke(le,Te,b,Te,R,a,r)||N.containStroke(b,Te,b,g,R,a,r))return!0}else n+=C(le,g,le,Te,a,r),n+=C(b,Te,b,g,a,r);break;case x.Z:if(p){if(N.containStroke(o,S,b,g,R,a,r))return!0}else n+=C(o,S,b,g,a,r);o=b,S=g;break}}return!p&&!O(S,g)&&(n+=C(o,S,b,g,a,r)||0),n!==0}function m(v,R,p){return f(v,0,!1,R,p)}function E(v,R,p,a){return f(v,R,!0,p,a)}me.contain=m,me.containStroke=E},"2fw6":function($e,me,z){var J=z("y+Vt"),N=J.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(L,Q,D){D&&L.moveTo(Q.cx+Q.r,Q.cy),L.arc(Q.cx,Q.cy,Q.r,0,Math.PI*2,!0)}});$e.exports=N},"3C/r":function($e,me){var z=function(N,L){this.image=N,this.repeat=L,this.type="pattern"};z.prototype.getCanvasPattern=function(N){return N.createPattern(this.image,this.repeat||"repeat")};var J=z;$e.exports=J},"3CBa":function($e,me,z){var J=z("hydK"),N=J.createElement,L=z("bYtY"),Q=z("SUKs"),D=z("y+Vt"),w=z("Dagg"),_=z("dqUG"),c=z("DBLp"),C=z("sW+o"),x=z("n6Mw"),i=z("vKoX"),h=z("P47w"),O=h.path,T=h.image,y=h.text;function B(r){return parseInt(r,10)}function u(r){return r instanceof D?O:r instanceof w?T:r instanceof _?y:O}function s(r,n){return n&&r&&n.parentNode!==r}function l(r,n,o){if(s(r,n)&&o){var S=o.nextSibling;S?r.insertBefore(n,S):r.appendChild(n)}}function f(r,n){if(s(r,n)){var o=r.firstChild;o?r.insertBefore(n,o):r.appendChild(n)}}function m(r,n){n&&r&&n.parentNode===r&&r.removeChild(n)}function E(r){return r.__textSvgEl}function v(r){return r.__svgEl}var R=function(r,n,o,S){this.root=r,this.storage=n,this._opts=o=L.extend({},o||{});var b=N("svg");b.setAttribute("xmlns","http://www.w3.org/2000/svg"),b.setAttribute("version","1.1"),b.setAttribute("baseProfile","full"),b.style.cssText="user-select:none;position:absolute;left:0;top:0;";var g=N("g");b.appendChild(g);var U=N("g");b.appendChild(U),this.gradientManager=new C(S,U),this.clipPathManager=new x(S,U),this.shadowManager=new i(S,U);var K=document.createElement("div");K.style.cssText="overflow:hidden;position:relative",this._svgDom=b,this._svgRoot=U,this._backgroundRoot=g,this._viewport=K,r.appendChild(K),K.appendChild(b),this.resize(o.width,o.height),this._visibleList=[]};R.prototype={constructor:R,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},refresh:function(){var r=this.storage.getDisplayList(!0);this._paintList(r)},setBackgroundColor:function(r){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var n=N("rect");n.setAttribute("width",this.getWidth()),n.setAttribute("height",this.getHeight()),n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("id",0),n.style.fill=r,this._backgroundRoot.appendChild(n),this._backgroundNode=n},_paintList:function(r){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var n=this._svgRoot,o=this._visibleList,S=r.length,b=[],g;for(g=0;g<S;g++){var U=r[g],K=u(U),W=v(U)||E(U);U.invisible||(U.__dirty&&(K&&K.brush(U),this.clipPathManager.update(U),U.style&&(this.gradientManager.update(U.style.fill),this.gradientManager.update(U.style.stroke),this.shadowManager.update(W,U)),U.__dirty=!1),b.push(U))}var q=c(o,b),Y;for(g=0;g<q.length;g++){var V=q[g];if(V.removed)for(var te=0;te<V.count;te++){var U=o[V.indices[te]],W=v(U),X=E(U);m(n,W),m(n,X)}}for(g=0;g<q.length;g++){var V=q[g];if(V.added)for(var te=0;te<V.count;te++){var U=b[V.indices[te]],W=v(U),X=E(U);Y?l(n,W,Y):f(n,W),W?l(n,X,W):Y?l(n,X,Y):f(n,X),l(n,X,W),Y=X||W||Y,this.gradientManager.addWithoutUpdate(W||X,U),this.shadowManager.addWithoutUpdate(W||X,U),this.clipPathManager.markUsed(U)}else if(!V.removed)for(var te=0;te<V.count;te++){var U=b[V.indices[te]],W=v(U),X=E(U),W=v(U),X=E(U);this.gradientManager.markUsed(U),this.gradientManager.addWithoutUpdate(W||X,U),this.shadowManager.markUsed(U),this.shadowManager.addWithoutUpdate(W||X,U),this.clipPathManager.markUsed(U),X&&l(n,X,W),Y=W||X||Y}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=b},_getDefs:function(r){var n=this._svgDom,o=n.getElementsByTagName("defs");if(o.length===0)if(r){var o=n.insertBefore(N("defs"),n.firstChild);return o.contains||(o.contains=function(b){var g=o.children;if(!g)return!1;for(var U=g.length-1;U>=0;--U)if(g[U]===b)return!0;return!1}),o}else return null;else return o[0]},resize:function(r,n){var o=this._viewport;o.style.display="none";var S=this._opts;if(r!=null&&(S.width=r),n!=null&&(S.height=n),r=this._getSize(0),n=this._getSize(1),o.style.display="",this._width!==r||this._height!==n){this._width=r,this._height=n;var b=o.style;b.width=r+"px",b.height=n+"px";var g=this._svgDom;g.setAttribute("width",r),g.setAttribute("height",n)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",r),this._backgroundNode.setAttribute("height",n))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(r){var n=this._opts,o=["width","height"][r],S=["clientWidth","clientHeight"][r],b=["paddingLeft","paddingTop"][r],g=["paddingRight","paddingBottom"][r];if(n[o]!=null&&n[o]!=="auto")return parseFloat(n[o]);var U=this.root,K=document.defaultView.getComputedStyle(U);return(U[S]||B(K[o])||B(U.style[o]))-(B(K[b])||0)-(B(K[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 r=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
|
|
\r<`));return"data:image/svg+xml;charset=UTF-8,"+r}};function p(r){return function(){Q('In SVG mode painter not support method "'+r+'"')}}L.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(r){R.prototype[r]=p(r)});var a=R;$e.exports=a},"3e3G":function($e,me,z){var J=z("bYtY"),N=z("QuXc"),L=function(D,w,_,c,C){this.x=D==null?.5:D,this.y=w==null?.5:w,this.r=_==null?.5:_,this.type="radial",this.global=C||!1,N.call(this,c)};L.prototype={constructor:L},J.inherits(L,N);var Q=L;$e.exports=Q},"3gBT":function($e,me){var z=2311;function J(){return z++}$e.exports=J},"49sm":function($e,me){var z={}.toString;$e.exports=Array.isArray||function(J){return z.call(J)=="[object Array]"}},"4fz+":function($e,me,z){var J=z("bYtY"),N=z("1bdT"),L=z("mFDi"),Q=function(w){w=w||{},N.call(this,w);for(var _ in w)w.hasOwnProperty(_)&&(this[_]=w[_]);this._children=[],this.__storage=null,this.__dirty=!0};Q.prototype={constructor:Q,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(w){return this._children[w]},childOfName:function(w){for(var _=this._children,c=0;c<_.length;c++)if(_[c].name===w)return _[c]},childCount:function(){return this._children.length},add:function(w){return w&&w!==this&&w.parent!==this&&(this._children.push(w),this._doAdd(w)),this},addBefore:function(w,_){if(w&&w!==this&&w.parent!==this&&_&&_.parent===this){var c=this._children,C=c.indexOf(_);C>=0&&(c.splice(C,0,w),this._doAdd(w))}return this},_doAdd:function(w){w.parent&&w.parent.remove(w),w.parent=this;var _=this.__storage,c=this.__zr;_&&_!==w.__storage&&(_.addToStorage(w),w instanceof Q&&w.addChildrenToStorage(_)),c&&c.refresh()},remove:function(w){var _=this.__zr,c=this.__storage,C=this._children,x=J.indexOf(C,w);return x<0?this:(C.splice(x,1),w.parent=null,c&&(c.delFromStorage(w),w instanceof Q&&w.delChildrenFromStorage(c)),_&&_.refresh(),this)},removeAll:function(){var w=this._children,_=this.__storage,c,C;for(C=0;C<w.length;C++)c=w[C],_&&(_.delFromStorage(c),c instanceof Q&&c.delChildrenFromStorage(_)),c.parent=null;return w.length=0,this},eachChild:function(w,_){for(var c=this._children,C=0;C<c.length;C++){var x=c[C];w.call(_,x,C)}return this},traverse:function(w,_){for(var c=0;c<this._children.length;c++){var C=this._children[c];w.call(_,C),C.type==="group"&&C.traverse(w,_)}return this},addChildrenToStorage:function(w){for(var _=0;_<this._children.length;_++){var c=this._children[_];w.addToStorage(c),c instanceof Q&&c.addChildrenToStorage(w)}},delChildrenFromStorage:function(w){for(var _=0;_<this._children.length;_++){var c=this._children[_];w.delFromStorage(c),c instanceof Q&&c.delChildrenFromStorage(w)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(w){for(var _=null,c=new L(0,0,0,0),C=w||this._children,x=[],i=0;i<C.length;i++){var h=C[i];if(h.ignore||h.invisible)continue;var O=h.getBoundingRect(),T=h.getLocalTransform(x);T?(c.copy(O),c.applyTransform(T),_=_||c.clone(),_.union(c)):(_=_||O.clone(),_.union(O))}return _||c}},J.inherits(Q,N);var D=Q;$e.exports=D},"4mN7":function($e,me,z){var J=z("QBsz"),N=z("Sj9i"),L=Math.min,Q=Math.max,D=Math.sin,w=Math.cos,_=Math.PI*2,c=J.create(),C=J.create(),x=J.create();function i(s,l,f){if(s.length===0)return;var m=s[0],E=m[0],v=m[0],R=m[1],p=m[1],a;for(a=1;a<s.length;a++)m=s[a],E=L(E,m[0]),v=Q(v,m[0]),R=L(R,m[1]),p=Q(p,m[1]);l[0]=E,l[1]=R,f[0]=v,f[1]=p}function h(s,l,f,m,E,v){E[0]=L(s,f),E[1]=L(l,m),v[0]=Q(s,f),v[1]=Q(l,m)}var O=[],T=[];function y(s,l,f,m,E,v,R,p,a,r){var n=N.cubicExtrema,o=N.cubicAt,S,b=n(s,f,E,R,O);for(a[0]=Infinity,a[1]=Infinity,r[0]=-Infinity,r[1]=-Infinity,S=0;S<b;S++){var g=o(s,f,E,R,O[S]);a[0]=L(g,a[0]),r[0]=Q(g,r[0])}for(b=n(l,m,v,p,T),S=0;S<b;S++){var U=o(l,m,v,p,T[S]);a[1]=L(U,a[1]),r[1]=Q(U,r[1])}a[0]=L(s,a[0]),r[0]=Q(s,r[0]),a[0]=L(R,a[0]),r[0]=Q(R,r[0]),a[1]=L(l,a[1]),r[1]=Q(l,r[1]),a[1]=L(p,a[1]),r[1]=Q(p,r[1])}function B(s,l,f,m,E,v,R,p){var a=N.quadraticExtremum,r=N.quadraticAt,n=Q(L(a(s,f,E),1),0),o=Q(L(a(l,m,v),1),0),S=r(s,f,E,n),b=r(l,m,v,o);R[0]=L(s,E,S),R[1]=L(l,v,b),p[0]=Q(s,E,S),p[1]=Q(l,v,b)}function u(s,l,f,m,E,v,R,p,a){var r=J.min,n=J.max,o=Math.abs(E-v);if(o%_<1e-4&&o>1e-4){p[0]=s-f,p[1]=l-m,a[0]=s+f,a[1]=l+m;return}if(c[0]=w(E)*f+s,c[1]=D(E)*m+l,C[0]=w(v)*f+s,C[1]=D(v)*m+l,r(p,c,C),n(a,c,C),E=E%_,E<0&&(E=E+_),v=v%_,v<0&&(v=v+_),E>v&&!R?v+=_:E<v&&R&&(E+=_),R){var S=v;v=E,E=S}for(var b=0;b<v;b+=Math.PI/2)b>E&&(x[0]=w(b)*f+s,x[1]=D(b)*m+l,r(p,x,p),n(a,x,a))}me.fromPoints=i,me.fromLine=h,me.fromCubic=y,me.fromQuadratic=B,me.fromArc=u},"55Ip":function($e,me,z){"use strict";z.d(me,"a",function(){return l}),z.d(me,"b",function(){return p});var J=z("Ty5D"),N=z("dI71"),L=z("q1tI"),Q=z.n(L),D=z("YS25"),w=z("17x9"),_=z.n(w),c=z("wx14"),C=z("zLVn"),x=z("9R94"),i=function(r){Object(N.a)(n,r);function n(){for(var S,b=arguments.length,g=new Array(b),U=0;U<b;U++)g[U]=arguments[U];return S=r.call.apply(r,[this].concat(g))||this,S.history=Object(D.a)(S.props),S}var o=n.prototype;return o.render=function(){return Q.a.createElement(J.c,{history:this.history,children:this.props.children})},n}(Q.a.Component),h=function(r){Object(N.a)(n,r);function n(){for(var S,b=arguments.length,g=new Array(b),U=0;U<b;U++)g[U]=arguments[U];return S=r.call.apply(r,[this].concat(g))||this,S.history=Object(D.b)(S.props),S}var o=n.prototype;return o.render=function(){return Q.a.createElement(J.c,{history:this.history,children:this.props.children})},n}(Q.a.Component),O=function(n,o){return typeof n=="function"?n(o):n},T=function(n,o){return typeof n=="string"?Object(D.c)(n,null,null,o):n},y=function(n){return n},B=Q.a.forwardRef;typeof B=="undefined"&&(B=y);function u(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}var s=B(function(r,n){var o=r.innerRef,S=r.navigate,b=r.onClick,g=Object(C.a)(r,["innerRef","navigate","onClick"]),U=g.target,K=Object(c.a)({},g,{onClick:function(q){try{b&&b(q)}catch(Y){throw q.preventDefault(),Y}!q.defaultPrevented&&q.button===0&&(!U||U==="_self")&&!u(q)&&(q.preventDefault(),S())}});return y!==B?K.ref=n||o:K.ref=o,Q.a.createElement("a",K)}),l=B(function(r,n){var o=r.component,S=o===void 0?s:o,b=r.replace,g=r.to,U=r.innerRef,K=Object(C.a)(r,["component","replace","to","innerRef"]);return Q.a.createElement(J.e.Consumer,null,function(W){W||Object(x.a)(!1);var q=W.history,Y=T(O(g,W.location),W.location),V=Y?q.createHref(Y):"",te=Object(c.a)({},K,{href:V,navigate:function(){var se=O(g,W.location),le=b?q.replace:q.push;le(se)}});return y!==B?te.ref=n||U:te.innerRef=U,Q.a.createElement(S,te)})});if(!1)var f,m;var E=function(n){return n},v=Q.a.forwardRef;typeof v=="undefined"&&(v=E);function R(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.filter(function(S){return S}).join(" ")}var p=v(function(r,n){var o=r["aria-current"],S=o===void 0?"page":o,b=r.activeClassName,g=b===void 0?"active":b,U=r.activeStyle,K=r.className,W=r.exact,q=r.isActive,Y=r.location,V=r.sensitive,te=r.strict,X=r.style,se=r.to,le=r.innerRef,Te=Object(C.a)(r,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Q.a.createElement(J.e.Consumer,null,function(Ee){Ee||Object(x.a)(!1);var Be=Y||Ee.location,De=T(O(se,Be),Be),Ve=De.pathname,_e=Ve&&Ve.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Le=_e?Object(J.f)(Be.pathname,{path:_e,exact:W,sensitive:V,strict:te}):null,tt=!!(q?q(Le,Be):Le),Et=tt?R(K,g):K,Oe=tt?Object(c.a)({},X,{},U):X,He=Object(c.a)({"aria-current":tt&&S||null,className:Et,style:Oe,to:De},Te);return E!==v?He.ref=n||le:He.innerRef=le,Q.a.createElement(l,He)})});if(!1)var a},"59Ip":function($e,me,z){var J=z("Sj9i");function N(L,Q,D,w,_,c,C,x,i,h,O){if(i===0)return!1;var T=i;if(O>Q+T&&O>w+T&&O>c+T&&O>x+T||O<Q-T&&O<w-T&&O<c-T&&O<x-T||h>L+T&&h>D+T&&h>_+T&&h>C+T||h<L-T&&h<D-T&&h<_-T&&h<C-T)return!1;var y=J.cubicProjectPoint(L,Q,D,w,_,c,C,x,h,O,null);return y<=T/2}me.containStroke=N},"5gs/":function($e,me,z){"use strict";z.r(me);var J=z("cWXX"),N=z("/ezw"),L=z("g9YV"),Q=z("wCAj"),D=z("/zsF"),w=z("PArb"),_=z("14J3"),c=z("BMrR"),C=z("+L6B"),x=z("2/Rp"),i=z("jCWc"),h=z("kPKH"),O=z("sPJy"),T=z("bE4q"),y=z("miYZ"),B=z("tsqr"),u=z("2qtc"),s=z("kLXV"),l=z("9og8"),f=z("Pv/L"),m=z("k1fw"),E=z("tJVT"),v=z("PpiC"),R=z("WmNS"),p=z.n(R),a=z("q1tI"),r=z.n(a),n=z("wd/R"),o=z.n(n),S=z("xOOu"),b=z.n(S),g=z("Ty5D"),U=z("9kvl"),K=z("55Ip"),W=z("jhfD"),q=z("CTES"),Y=z("RCxd"),V=z("/MfK"),te=z("m3rI"),X=z("xKgJ"),se=z("1vsH"),le=z("cVA7"),Te=z.n(le),Ee=z("z9Ch"),Be=z.n(Ee),De={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},Ve=function(Ce){var We,Ne,ut,Tt,Ut,St=Ce.shixunHomeworks,_t=Ce.globalSetting,At=Ce.loading,nt=Ce.dispatch,rt=Object(g.i)(),xe=Object(g.h)(),Fe=Object(a.useState)([]),dt=Object(E.a)(Fe,2),at=dt[0],xt=dt[1],wt=Object(a.useState)(xe.query.tabs||0),qe=Object(E.a)(wt,2),Bt=qe[0],Ht=qe[1],Nt=St.shixunWorkReport,Gt=((We=Nt.echart_data)===null||We===void 0?void 0:We.efficiency_list.length)-parseInt((Ne=Nt.echart_data)===null||Ne===void 0?void 0:Ne.myself_eff[0]),Or=function(){var jt,Dr,Wr;return{title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(pr){if(pr.name===Nt.username){var Sr;return"\u59D3\u540D\uFF1A"+Nt.username+"<br/>\u5B66\u53F7\uFF1A "+Nt.user_id+"<br/>\u6548\u7387\uFF1A"+((Sr=Nt.echart_data)===null||Sr===void 0?void 0:Sr.myself_eff[1])}else return pr.name+":"+pr.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:(jt=Nt.echart_data)===null||jt===void 0?void 0:jt.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:Nt.username,xAxis:Gt,yAxis:(Dr=Nt.echart_data)===null||Dr===void 0?void 0:Dr.myself_eff[1],value:(Wr=Nt.echart_data)===null||Wr===void 0?void 0:Wr.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},Pr=function(){var jt,Dr,Wr,Mr;return{title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Sr){var mn=Sr.value;if(Sr.name===Nt.username){var on;return"\u59D3\u540D\uFF1A"+Nt.username+"<br/>\u5B66\u53F7\uFF1A "+Nt.user_id+"<br/>\u5F97\u5206\uFF1A"+((on=Nt.echart_data)===null||on===void 0?void 0:on.myself_object[1])}}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:De,data:(jt=Nt.echart_data)===null||jt===void 0?void 0:jt.consume_list,symbolSize:function(Sr){return Math.round(Sr[2])},markPoint:{data:[{name:Nt.username,xAxis:(Dr=Nt.echart_data)===null||Dr===void 0?void 0:Dr.myself_object[0],yAxis:(Wr=Nt.echart_data)===null||Wr===void 0?void 0:Wr.myself_object[1],value:(Mr=Nt.echart_data)===null||Mr===void 0?void 0:Mr.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return r.a.createElement(r.a.Fragment,null,r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(c.a,null,r.a.createElement(h.a,{flex:"800px"},r.a.createElement(Te.a,{style:{width:750,height:580},option:Or()})),r.a.createElement(h.a,{flex:"1"},r.a.createElement("aside",{className:Be.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Nt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Nt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",r.a.createElement("span",{className:"ml30 c-orange"},(ut=Nt.echart_data)===null||ut===void 0?void 0:ut.myself_eff[1])),r.a.createElement("li",null,r.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Tt=Nt.echart_data)===null||Tt===void 0?void 0:Tt.myself_eff[0]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",r.a.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(c.a,null,r.a.createElement(h.a,{flex:"800px"},r.a.createElement(Te.a,{style:{width:750,height:580},option:Pr()})),r.a.createElement(h.a,{flex:"1"},r.a.createElement("aside",{className:Be.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Nt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Nt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u80FD\u529B")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Ut=Nt.echart_data)===null||Ut===void 0?void 0:Ut.myself_object[1]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",r.a.createElement("br",null)))))))},_e=Object(U.a)(function(ge){var Ce=ge.shixunHomeworks,We=ge.loading,Ne=ge.globalSetting;return{shixunHomeworks:Ce,globalSetting:Ne,loading:We.effects}})(Ve),Le=z("giR+"),tt=z("fyUT"),Et=function(ge){var Ce=ge.defaultValue,We=ge.onBlur,Ne=ge.max,ut=ge.className,Tt=ut===void 0?"game-score":ut,Ut=Object(a.useState)(Ce),St=Object(E.a)(Ut,2),_t=St[0],At=St[1];Object(a.useEffect)(function(){At(Ce)},[Ce]);function nt(xe){At(xe)}function rt(){_t!==Ce&&We(_t>Ne?Ne:_t)}return r.a.createElement(tt.a,{max:Ne,min:0,className:Tt,value:_t,onChange:nt,onBlur:rt})},Oe=z("OaEy"),He=z("2fM7"),it=z("ZW9T"),Ae=z("Ot1p"),re=z("1eJ8"),ae=z.n(re),ce=He.a.Option,we={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Re;(function(ge){ge[ge.SET_PATH=0]="SET_PATH",ge[ge.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Re||(Re={}));function ke(ge,Ce){switch(Ce.type){case Re.SET_PATH:return Object(m.a)(Object(m.a)({},ge),{},{selectedPath:Ce.payload});case Re.GET_PASSED_CONTENT:return Object(m.a)(Object(m.a)({},ge),{},{passedContent:Ce.payload});default:throw new Error}}var ht=function(ge){var Ce,We,Ne,ut,Tt=ge.path,Ut=ge.game_id,St=ge.onPathChange,_t=ge.autoHeight,At=ge.diff_code_count,nt=ge.data,rt=Tt.split("\uFF1B").filter(function(Bt){return!!Bt}),xe=Object(a.useReducer)(ke,{selectedPath:rt[0],passedContent:{language:"python",content:""}}),Fe=Object(E.a)(xe,2),dt=Fe[0],at=Fe[1],xt=dt.selectedPath,wt=dt.passedContent;function qe(Bt){at({type:Re.SET_PATH,payload:Bt})}return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null," ",r.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),At&&r.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",At),r.a.createElement("span",null,r.a.createElement(He.a,{style:{width:200},value:xt,onChange:qe}," ",rt.map(function(Bt){return r.a.createElement(ce,{key:Bt,value:Bt},Bt)})," "))," "),(xt==null?void 0:xt.split(".")[1])==="md"&&r.a.createElement(Ae.a,{height:300,autoHeight:_t,defaultValue:(nt==null||((Ce=nt.filter(function(Bt){return Bt.path===xt}))===null||Ce===void 0||((We=Ce[0])===null||We===void 0))?void 0:We.content)||"",className:ae.a.md}),(xt==null?void 0:xt.split(".")[1])!=="md"&&r.a.createElement(it.b,{height:300,language:wt.language,value:(nt==null||((Ne=nt.filter(function(Bt){return Bt.path===xt}))===null||Ne===void 0||((ut=Ne[0])===null||ut===void 0))?void 0:ut.content)||"",autoHeight:_t,theme:"default",options:we}))},ft=z("ErOA"),vt=function(Ce){var We=Ce.shixunHomeworks,Ne=Ce.autoHeight,ut=Ce.dispatch,Tt=We.shixunWorkReport,Ut=Tt.stage_list,St=Tt.work_id,_t=Object(g.i)(),At=Object(X.c)(),nt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"}];function rt(at,xt){return xe.apply(this,arguments)}function xe(){return xe=Object(l.a)(p.a.mark(function at(xt,wt){var qe,Bt;return p.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return qe=Ut[xt].challenge_id,Nt.next=3,ut({type:"shixunHomeworks/changeScore",payload:{categoryId:_t.homeworkId,type:"report",score:wt,challenge_id:qe}});case 3:return Bt=Nt.sent,Nt.next=6,ut({type:"shixunHomeworks/getShixunWorkReport",payload:Object(m.a)({},_t)});case 6:Bt.status===0&&B.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return Nt.stop()}},at)})),xe.apply(this,arguments)}function Fe(at,xt){return Object(ft.c)("student_works/".concat(St,"/rep_passed_content.json"),{path:xt,game_id:at})}var dt=Object(se.n)(5,Tt.shixun_detail);return r.a.createElement(r.a.Fragment,null,dt==null?void 0:dt.map(function(at,xt){return r.a.createElement("div",{key:xt},at.map(function(wt,qe){var Bt;return r.a.createElement("aside",{className:"pl30 pr30",key:qe},r.a.createElement("div",{className:"".concat(Be.a.shixunTitle," mt10")},r.a.createElement("div",null,r.a.createElement("span",{className:"fa fa-code "}),r.a.createElement("strong",{className:"c-black"},"\u7B2C",xt*5+qe+1,"\u5173 ",r.a.createElement(K.a,{className:"c-black",to:"/tasks/".concat(wt.game_identifier)},wt.subject))),At?r.a.createElement("span",null,"\u8C03\u5206\uFF1A",r.a.createElement(Et,{className:"game-score",max:Ut[qe].game_score_full,defaultValue:Ut[qe].game_score,onBlur:function(Nt){rt(qe,Nt)}})):null),r.a.createElement("div",{className:"font16 mt10"},wt.st===0&&wt.complete_status===0&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",wt.st===0&&wt.complete_status!==0&&(wt.path?r.a.createElement("aside",{className:Be.a.shixunWrp},r.a.createElement(ht,{autoHeight:Ne,path:wt.path,game_id:wt.id,data:wt.game_codes,diff_code_count:wt.diff_code_count,onPathChange:Fe})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),wt.st===1&&(wt.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),r.a.createElement("aside",{className:"mt10 font16"},(Bt=wt.outputs)!==null&&Bt!==void 0&&Bt.length?r.a.createElement(Q.a,{columns:nt,pagination:{hideOnSinglePage:!0},dataSource:wt.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},yt=Object(U.a)(function(ge){var Ce=ge.shixunHomeworks,We=ge.loading,Ne=ge.globalSetting;return{shixunHomeworks:Ce,globalSetting:Ne,loading:We.effects}})(vt),Lt=z("5NDa"),Mt=z("5rEg"),Qe=z("y8nQ"),Pe=z("Vl3Y"),lt=function(Ce){var We=Ce.shixunHomeworks,Ne=Ce.dispatch,ut=Object(v.a)(Ce,["shixunHomeworks","dispatch"]),Tt=Object(g.i)(),Ut=Object(a.useState)(!1),St=Object(E.a)(Ut,2),_t=St[0],At=St[1],nt=Pe.a.useForm(),rt=Object(E.a)(nt,1),xe=rt[0];Object(a.useEffect)(function(){var dt,at,xt,wt;We.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&xe.setFieldsValue({comment:(dt=We.actionTabs.selectArrs)===null||dt===void 0||((at=dt.data)===null||at===void 0)?void 0:at.work_comment,hidden_comment:(xt=We.actionTabs.selectArrs)===null||xt===void 0||((wt=xt.data)===null||wt===void 0)?void 0:wt.work_comment_hidden})},[We.actionTabs.key]);var Fe=function(){var dt=Object(l.a)(p.a.mark(function at(){var xt,wt;return p.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return xt=xe.getFieldValue(),Bt.next=3,Object(ft.a)("/api/student_works/".concat(Tt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:xt.hidden_comment,comment:xt.comment}});case 3:wt=Bt.sent,wt.status===0&&(B.b.success("\u8BC4\u9605\u6210\u529F"),xe.resetFields(),Ne({type:"shixunHomeworks/setActionTabs",payload:{}}),Ne({type:"shixunHomeworks/getShixunWorkReport",payload:Object(m.a)({},Tt)}));case 5:case"end":return Bt.stop()}},at)}));return function(){return dt.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:We.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(l.a)(p.a.mark(function dt(){var at;return p.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:at=xe.getFieldValue(),JSON.stringify(at)==="{}"||at.hidden_comment===""&&at.comment===""?At(!0):Fe();case 2:case"end":return wt.stop()}},dt)})),onCancel:function(){Ne({type:"shixunHomeworks/setActionTabs",payload:{}})}},r.a.createElement(Pe.a,{form:xe,onChange:function(){_t&&At(!1)}},r.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),r.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"hidden_comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),_t&&r.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},pt=Object(U.a)(function(ge){var Ce=ge.shixunHomeworks;return{shixunHomeworks:Ce}})(lt),Ze=z("Xm8N"),st=z("9Bee"),Ke=z("XYT7"),Ie=z("1n7x"),Me=z.n(Ie),pe=function(Ce){var We,Ne,ut=Ce.shixunHomeworks,Tt=Ce.globalSetting,Ut=Ce.loading,St=Ce.dispatch,_t=Object(v.a)(Ce,["shixunHomeworks","globalSetting","loading","dispatch"]),At=Object(a.useState)(Object(m.a)({},Object(g.i)())),nt=Object(E.a)(At,2),rt=nt[0],xe=nt[1],Fe=Object(g.i)(),dt=Object(a.useState)([]),at=Object(f.a)(dt),xt=Object(a.useState)({last:!1}),wt=Object(E.a)(xt,2),qe=wt[0],Bt=wt[1],Ht=Object(a.useState)({last:!1}),Nt=Object(E.a)(Ht,2),Gt=Nt[0],Or=Nt[1],Pr=Object(a.useRef)(),yr=Object(a.useRef)(),jt=Object(a.useState)(!1),Dr=Object(E.a)(jt,2),Wr=Dr[0],Mr=Dr[1],pr=Object(a.useState)(!1),Sr=Object(E.a)(pr,2),mn=Sr[0],on=Sr[1],fe=Object(a.useState)(!1),ye=Object(E.a)(fe,2),Ue=ye[0],et=ye[1],Je=ut.shixunWorkReport,Dt=Object(X.c)(),Z=Object(a.useState)(new b.a),M=Object(E.a)(Z,2),P=M[0],$=M[1],ne=Object(a.useState)(0),ee=Object(E.a)(ne,2),je=ee[0],Ct=ee[1],Ft=Object(a.useState)([]),kt=Object(E.a)(Ft,2),bt=kt[0],Yt=kt[1],zt=Object(a.useState)(!1),$t=Object(E.a)(zt,2),dr=$t[0],Rr=$t[1],mr=Object(a.useState)(!1),_r=Object(E.a)(mr,2),hr=_r[0],kr=_r[1];Object(a.useEffect)(function(){return St({type:"globalSetting/footerToggle",payload:!1}),function(){St({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(a.useEffect)(function(){ut.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&bt.length>0&&$r("all")},[bt]),Object(a.useEffect)(function(){xe(Object(m.a)({},Fe))},[_t.location.pathname]);var Nr=function(){document.body.scrollIntoView()};function qr(){return Yr.apply(this,arguments)}function Yr(){return Yr=Object(l.a)(p.a.mark(function Cr(){var cr,sr,nr,Zt,gr,br,xr;return p.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),On.next=3,St({type:"shixunHomeworks/getAllStudentWorks",payload:Object(m.a)(Object(m.a)({},rt),nr)});case 3:Zt=On.sent,Yt(Zt.all_student_works),gr=(cr=Zt.all_student_works)===null||cr===void 0?void 0:cr.map(function(Hr){return String(Hr.student_work_id)}).indexOf(rt.homeworkId),gr===((sr=Zt.all_student_works)===null||sr===void 0?void 0:sr.length)-1?Bt({last:!0}):Bt((br=Zt.all_student_works)===null||br===void 0?void 0:br[gr+1]),gr===0?Or({last:!0}):Or((xr=Zt.all_student_works)===null||xr===void 0?void 0:xr[gr-1]);case 8:case"end":return On.stop()}},Cr)})),Yr.apply(this,arguments)}var rn=function(){document.querySelectorAll("canvas").forEach(function(cr){(!cr.clientWidth||!cr.clientHeight)&&cr.remove()})},An=function(){Pr.current.offsetHeight>62e3?et(!1):et(!0)},$r=function(){var Cr=Object(l.a)(p.a.mark(function cr(sr){var nr,Zt,gr,br,xr,vr;return p.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:if(xr=function(){return xr=Object(l.a)(p.a.mark(function Hn(){var Ln;return p.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,St({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:bt[nr].student_work_id}});case 2:Ln=Xn.sent,Nr(),nr++,setTimeout(Object(l.a)(p.a.mark(function wn(){var Yn,Mn,oi,Un,gn,Qn,li;return p.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:rn(),Mn=P.folder("".concat(Ln==null?void 0:Ln.username)),oi=document.querySelector("#export-all").children,Un=Me()(),gn=p.a.mark(function tr(wr){return p.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return Tr.next=2,Un.set(gr).from(oi[wr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Lr=Object(l.a)(p.a.mark(function bn(Fn){return p.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:if(!(wr<oi.length-1)){ei.next=3;break}return ei.next=3,Fn.addPage();case 3:case"end":return ei.stop()}},bn)}));return function(bn){return Lr.apply(this,arguments)}}());case 2:case"end":return Tr.stop()}},tr)}),Qn=0;case 6:if(!(Qn<oi.length)){er.next=11;break}return er.delegateYield(gn(Qn),"t0",8);case 8:Qn++,er.next=6;break;case 11:Mn.file("".concat(bt[nr-1].student_work_user_name).concat(nr,".pdf"),Un.output("blob")),li=Mn.folder("\u4EE3\u7801\u6587\u4EF6"),Ln==null||((Yn=Ln.shixun_detail)===null||Yn===void 0)||Yn.map(function(tr,wr){var Ur,Tr=li.folder("\u7B2C".concat(wr+1,"\u5173-").concat(tr.subject,"-").concat(tr.id));tr==null||((Ur=tr.game_codes)===null||Ur===void 0)||Ur.map(function(Lr){Tr.file("".concat(Lr.filename,".txt"),Lr==null?void 0:Lr.content)})}),Zt.update({content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr),"/",bt==null?void 0:bt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(bt==null?void 0:bt.length)?(Zt.destroy(),nn()):br();case 16:case"end":return er.stop()}},wn)})),2200);case 6:case"end":return Xn.stop()}},Hn)})),xr.apply(this,arguments)},br=function(){return xr.apply(this,arguments)},nr=0,Zt=s.a.info({width:460,title:r.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",r.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr+1),"/",sr!=="all"?1:bt==null?void 0:bt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Be.a.modal,onOk:function(){}}),gr={margin:[0,0],filename:"".concat(Je.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(sr!=="all"||(bt==null?void 0:bt.length)<2)){Hr.next=12;break}return Hr.delegateYield(p.a.mark(function Cn(){var Hn,Ln,Jr,Xn,wn,Yn,Mn;return p.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:rn(),Nr(),Ln=yr.current.children,Jr=Me()(),Xn=P.folder("".concat(Je==null?void 0:Je.username)),wn=p.a.mark(function gn(Qn){return p.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Jr.set(gr).from(Ln[Qn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var er=Object(l.a)(p.a.mark(function tr(wr){return p.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(!(Qn<Ln.length-1)){Tr.next=3;break}return Tr.next=3,wr.addPage();case 3:case"end":return Tr.stop()}},tr)}));return function(tr){return er.apply(this,arguments)}}());case 2:case"end":return qt.stop()}},gn)}),Yn=0;case 7:if(!(Yn<Ln.length)){Un.next=12;break}return Un.delegateYield(wn(Yn),"t0",9);case 9:Yn++,Un.next=7;break;case 12:return Mr(!1),Xn.file("".concat(Je.username,".pdf"),Jr.output("blob"),{base64:!1}),Mn=Xn.folder("\u4EE3\u7801\u6587\u4EF6"),Je==null||((Hn=Je.shixun_detail)===null||Hn===void 0)||Hn.map(function(gn,Qn){var li,qt=Mn.folder("\u7B2C".concat(Qn+1,"\u5173-").concat(gn.subject,"-").concat(gn.id));gn==null||((li=gn.game_codes)===null||li===void 0)||li.map(function(er){qt.file("".concat(er.filename,".txt"),er==null?void 0:er.content)})}),Zt.destroy(),nn(),Un.abrupt("return",{v:void 0});case 19:case"end":return Un.stop()}},Cn)})(),"t0",7);case 7:if(vr=Hr.t0,!(typeof vr=="object")){Hr.next=10;break}return Hr.abrupt("return",vr.v);case 10:Hr.next=13;break;case 12:br();case 13:case"end":return Hr.stop()}},cr)}));return function(sr){return Cr.apply(this,arguments)}}(),nn=function(){P.generateAsync({type:"blob"}).then(function(cr){var sr=document.createElement("a");sr.href=window.URL.createObjectURL(cr),sr.download=Je.course_name+".zip",document.body.appendChild(sr);var nr=document.createEvent("MouseEvents");nr.initEvent("click",!1,!1),sr.dispatchEvent(nr),document.body.removeChild(sr),$(new b.a)}),et(!1)};Object(a.useEffect)(function(){sn()},[rt.homeworkId]);var sn=function(){var Cr=Object(l.a)(p.a.mark(function cr(){return p.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return on(!0),nr.next=3,St({type:"shixunHomeworks/getShixunWorkReport",payload:Object(m.a)({},rt)});case 3:on(!1),Object(X.c)()&&qr();case 5:case"end":return nr.stop()}},cr)}));return function(){return Cr.apply(this,arguments)}}(),cn=[{title:"\u5173\u5361",dataIndex:"name",render:function(cr,sr,nr){return nr+1}},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name"},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:function(cr,sr,nr){return cr||"- -"}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:function(cr){return cr?"\u662F":"\u5426"}},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:function(cr,sr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},sr.myself_experience),"/",cr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(cr,sr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},cr),"/",sr.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(cr,sr){return Dt?r.a.createElement(Et,{max:sr.game_score_full,defaultValue:parseFloat(cr),onBlur:function(){var nr=Object(l.a)(p.a.mark(function Zt(gr){var br;return p.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,St({type:"shixunHomeworks/changeScore",payload:{categoryId:rt.homeworkId,type:"report",score:gr,challenge_id:sr.challenge_id}});case 2:return br=vr.sent,vr.next=5,St({type:"shixunHomeworks/getShixunWorkReport",payload:Object(m.a)({},rt)});case 5:br.status===0&&B.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return vr.stop()}},Zt)}));return function(Zt){return nr.apply(this,arguments)}}()}):cr}}],dn=function(cr){St({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){cr==="next"?U.d.push("/classrooms/".concat(rt.coursesId,"/shixun_homework/").concat(rt.categoryId,"/").concat(qe==null?void 0:qe.student_work_id,"/comment")):U.d.push("/classrooms/".concat(rt.coursesId,"/shixun_homework/").concat(rt.categoryId,"/").concat(Gt==null?void 0:Gt.student_work_id,"/comment"))},200)};return r.a.createElement("section",{className:"bg-fafafa mb100",style:{position:"sticky",top:0}},r.a.createElement("div",{className:"edu-container mt10"},r.a.createElement(N.a,{loading:mn,active:!0,avatar:{size:40},paragraph:{rows:5}},r.a.createElement("div",{className:"edu-container"},Je.course_id&&r.a.createElement("section",{className:"animated fadeIn"},r.a.createElement("aside",{className:""},Je.category&&r.a.createElement(T.a,{separator:">"},r.a.createElement(T.a.Item,null,r.a.createElement(K.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework")},Je.course_name)),r.a.createElement(T.a.Item,null,r.a.createElement(K.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.category.main?"":Je.category.category_id)},Je.category.category_name)),r.a.createElement(T.a.Item,null,r.a.createElement(K.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),r.a.createElement(T.a.Item,null,Je.username))),r.a.createElement("aside",{className:[Be.a.title1,"mt20"].join(" ")},r.a.createElement(c.a,{align:"middle"},r.a.createElement(h.a,{flex:1},r.a.createElement(K.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},r.a.createElement(W.a,{className:"font16 c-black"})),r.a.createElement("strong",{className:"font20 ml5"},Je.shixun_name),r.a.createElement(se.k,{temporary:!0,status:Je.homework_status})),r.a.createElement(h.a,{className:Be.a.title1_right},Je.view_tpi&&r.a.createElement(x.a,null,r.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),r.a.createElement(K.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(Je==null||((We=Je.shixun_detail)===null||We===void 0||((Ne=We[0])===null||Ne===void 0))?void 0:Ne.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(X.c)()&&Je.homework_end===!1&&!!Je.myshixun_id&&r.a.createElement(x.a,{className:"ml10",onClick:Object(l.a)(p.a.mark(function Cr(){return p.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,St({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Je.myshixun_identifier}}});case 2:case"end":return sr.stop()}},Cr)}))},r.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),r.a.createElement(x.a,{className:"ml10",onClick:function(){return $r("")},loading:Wr},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(X.c)()&&(bt==null?void 0:bt.length)>1&&r.a.createElement(x.a,{className:"ml10",onClick:function(){return $r("all")}},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),r.a.createElement("aside",{className:"mt30 relative"})),r.a.createElement("aside",{className:"edu-container bg-white",ref:Pr},r.a.createElement("div",{id:"export-all",ref:yr},r.a.createElement("div",{id:"export-all-1"},r.a.createElement("div",{className:Be.a.title},r.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),r.a.createElement("div",null,Object(X.c)()&&r.a.createElement(x.a,{className:"mr20",type:"primary",onClick:function(){St({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(m.a)({},Je)}}})}},r.a.createElement(q.a,null),Je.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),r.a.createElement(w.a,{style:{marginTop:0}}),r.a.createElement(c.a,{className:"pl30 pr30"},r.a.createElement(h.a,null,r.a.createElement("img",{className:Be.a.userPic,src:"".concat(te.a.IMG_SERVER,"/images/").concat(Je.image_url),alt:Je.username})),r.a.createElement(h.a,null,r.a.createElement("span",{className:"font16 ml40"},Je.username),r.a.createElement(se.e,{status:Je.compelete_status}),r.a.createElement("ul",{className:Be.a.userInfo},r.a.createElement("li",null,"\u5B66\u53F7\uFF1A",Je.student_id||"--"),r.a.createElement("li",null,"\u5206\u73ED\uFF1A",Je.group_name||"--"),r.a.createElement("br",null),r.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},Je.complete_count),"/",r.a.createElement("span",{className:"c-red"},Je.challenges_count)),r.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},Je.current_complete_count||"-"),"/",r.a.createElement("span",{className:"c-red"},Je.challenges_count)),r.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.efficiency===null?"--":Je&&Je.efficiency),r.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.max_efficiency===null?"--":Je&&Je.max_efficiency))),r.a.createElement("ul",{className:[Be.a.listItem,"mt10"].join(" ")},r.a.createElement("li",null,r.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),r.a.createElement("div",{className:"c-light-black mt20"},Je&&Je.passed_time===null||Je&&Je.passed_time==="--"?"--":o()(Je&&Je.passed_time).format("YYYY-MM-DD HH:mm"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",r.a.createElement("i",{onClick:function(cr){cr.stopPropagation(),cr.preventDefault(),Rr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},Je==null?void 0:Je.human_training_time_rules)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",r.a.createElement("i",{onClick:function(cr){cr.stopPropagation(),cr.preventDefault(),kr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},Je.time_consuming)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),r.a.createElement("div",{className:"mt20"},Je.evaluate_count)),(Je==null?void 0:Je.eff_score_full)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,r.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.challenge_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.challenge_score_full))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6548\u7387\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.eff_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.eff_score_full)))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",null,Je.late_penalty||"- -"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.work_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.all_work_score))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u603B\u8BC4"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.overall_appraisal))))),r.a.createElement(w.a,{style:{margin:0}}),(Je.work_comment_hidden||Je.work_comment)&&r.a.createElement("div",null,r.a.createElement(c.a,{align:"middle"},r.a.createElement(h.a,{flex:1},r.a.createElement("h1",{className:Be.a.title},"\u70B9\u8BC4\u5185\u5BB9")),r.a.createElement(h.a,{className:"pr30"},Object(X.c)()&&r.a.createElement(x.a,{onClick:Object(l.a)(p.a.mark(function Cr(){return p.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:s.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:r.a.createElement(Y.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(l.a)(p.a.mark(function Zt(){var gr;return p.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Object(Ke.m)({comment_id:Je.comment_id,homeworkId:rt.homeworkId});case 2:gr=xr.sent,gr.status===0&&(B.b.success("\u5220\u9664\u6210\u529F"),St({type:"shixunHomeworks/getShixunWorkReport",payload:Object(m.a)({},rt)}));case 4:case"end":return xr.stop()}},Zt)}))()}});case 1:case"end":return sr.stop()}},Cr)}))},r.a.createElement(V.a,null),"\u5220\u9664"))),r.a.createElement(w.a,{style:{margin:0}}),Je.work_comment&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:Je.work_comment})),Je.work_comment_hidden&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:Je.work_comment_hidden}))),r.a.createElement("h1",{className:Be.a.title},"\u9636\u6BB5\u6210\u7EE9"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(Q.a,{dataSource:Je.stage_list,pagination:!1,columns:cn})),(Je==null?void 0:Je.work_description)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:Be.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(st.a,{value:Je==null?void 0:Je.work_description}))),r.a.createElement("h1",{className:Be.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),r.a.createElement(_e,null),r.a.createElement("h1",{className:Be.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),r.a.createElement(yt,{autoHeight:Ue}))),Object(X.c)()&&r.a.createElement("aside",{className:"".concat(Be.a.footerBar," ").concat(Wr?Be.a.footerBarStatic:"")},r.a.createElement("aside",{className:"edu-container"},r.a.createElement(c.a,{align:"middle"},r.a.createElement(h.a,{flex:"1"},r.a.createElement(K.a,{className:Be.a.exitComment,to:"/classrooms/".concat(rt.coursesId,"/shixun_homework/").concat(rt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),r.a.createElement(h.a,{flex:"1",className:"tr"},r.a.createElement(x.a,{type:"default",disabled:Gt==null?void 0:Gt.last,onClick:function(){return dn()}},"\u4E0A\u4E00\u4E2A"),r.a.createElement(x.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:qe==null?void 0:qe.last,onClick:function(){return dn("next")}},"\u4E0B\u4E00\u4E2A"),Object(X.c)()&&r.a.createElement(x.a,{type:"primary",onClick:Object(l.a)(p.a.mark(function Cr(){return p.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:St({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(m.a)({},Je)}}});case 1:case"end":return sr.stop()}},Cr)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),r.a.createElement(pt,null),r.a.createElement(Ze.a,null),r.a.createElement(s.a,{visible:dr,width:860,centered:!0,onCancel:function(){Rr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},r.a.createElement("div",{style:{color:"#333333",fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),r.a.createElement("br",null),r.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"),r.a.createElement("br",null),r.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"),r.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 "),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),r.a.createElement("br",null),r.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 "),r.a.createElement("br",null),r.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"),r.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 "),r.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"),r.a.createElement("br",null),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u5373\u65F6\u901A\u5173\u65F6\u957F"),r.a.createElement("br",null),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u8BA1\u65F6\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),r.a.createElement(s.a,{visible:hr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){kr(!1)},width:600},r.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},r.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5373\u65F6\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},be=me.default=Object(U.a)(function(ge){var Ce=ge.shixunHomeworks,We=ge.loading,Ne=ge.globalSetting;return{shixunHomeworks:Ce,globalSetting:Ne,loading:We.effects}})(pe)},"6+eU":function($e,me,z){"use strict";z.d(me,"a",function(){return v});var J=z("wx14"),N=z("rePB"),L=z("VTBJ"),Q=z("1OyB"),D=z("vuIU"),w=z("Ji7U"),_=z("LK+K"),c=z("q1tI"),C=z.n(c),x=z("TSYQ"),i=z.n(x),h=function(p){var a,r="".concat(p.rootPrefixCls,"-item"),n=i()(r,"".concat(r,"-").concat(p.page),(a={},Object(N.a)(a,"".concat(r,"-active"),p.active),Object(N.a)(a,p.className,!!p.className),Object(N.a)(a,"".concat(r,"-disabled"),!p.page),a)),o=function(){p.onClick(p.page)},S=function(g){p.onKeyPress(g,p.onClick,p.page)};return C.a.createElement("li",{title:p.showTitle?p.page:null,className:n,onClick:o,onKeyPress:S,tabIndex:"0"},p.itemRender(p.page,"page",C.a.createElement("a",{rel:"nofollow"},p.page)))},O=h,T={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},y=function(R){Object(w.a)(a,R);var p=Object(_.a)(a);function a(){var r;Object(Q.a)(this,a);for(var n=arguments.length,o=new Array(n),S=0;S<n;S++)o[S]=arguments[S];return r=p.call.apply(p,[this].concat(o)),r.state={goInputText:""},r.buildOptionText=function(b){return"".concat(b," ").concat(r.props.locale.items_per_page)},r.changeSize=function(b){r.props.changeSize(Number(b))},r.handleChange=function(b){r.setState({goInputText:b.target.value})},r.handleBlur=function(b){var g=r.props,U=g.goButton,K=g.quickGo,W=g.rootPrefixCls,q=r.state.goInputText;if(U||q==="")return;if(b.relatedTarget&&(b.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||b.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;r.setState({goInputText:""}),K(r.getValidValue())},r.go=function(b){var g=r.state.goInputText;if(g==="")return;(b.keyCode===T.ENTER||b.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Object(D.a)(a,[{key:"getValidValue",value:function(){var n=this.state,o=n.goInputText,S=n.current;return!o||isNaN(o)?S:Number(o)}},{key:"getPageSizeOptions",value:function(){var n=this.props,o=n.pageSize,S=n.pageSizeOptions;return S.some(function(b){return b.toString()===o.toString()})?S:S.concat([o.toString()]).sort(function(b,g){var U=isNaN(Number(b))?0:Number(b),K=isNaN(Number(g))?0:Number(g);return U-K})}},{key:"render",value:function(){var n=this,o=this.props,S=o.pageSize,b=o.locale,g=o.rootPrefixCls,U=o.changeSize,K=o.quickGo,W=o.goButton,q=o.selectComponentClass,Y=o.buildOptionText,V=o.selectPrefixCls,te=o.disabled,X=this.state.goInputText,se="".concat(g,"-options"),le=q,Te=null,Ee=null,Be=null;if(!U&&!K)return null;var De=this.getPageSizeOptions();if(U&&le){var Ve=De.map(function(_e,Le){return C.a.createElement(le.Option,{key:Le,value:_e.toString()},(Y||n.buildOptionText)(_e))});Te=C.a.createElement(le,{disabled:te,prefixCls:V,showSearch:!1,className:"".concat(se,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(S||De[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Le){return Le.parentNode}},Ve)}return K&&(W&&(Be=typeof W=="boolean"?C.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:te,className:"".concat(se,"-quick-jumper-button")},b.jump_to_confirm):C.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),Ee=C.a.createElement("div",{className:"".concat(se,"-quick-jumper")},b.jump_to,C.a.createElement("input",{disabled:te,type:"text",value:X,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),b.page,Be)),C.a.createElement("li",{className:"".concat(se)},Te,Ee)}}]),a}(C.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var B=y,u=z("N2Kk");function s(){}function l(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function f(R,p,a){return a}function m(R,p,a){var r=typeof R=="undefined"?p.pageSize:R;return Math.floor((a.total-1)/r)+1}var E=function(R){Object(w.a)(a,R);var p=Object(_.a)(a);function a(r){var n;Object(Q.a)(this,a),n=p.call(this,r),n.getJumpPrevPage=function(){return Math.max(1,n.state.current-(n.props.showLessItems?3:5))},n.getJumpNextPage=function(){return Math.min(m(void 0,n.state,n.props),n.state.current+(n.props.showLessItems?3:5))},n.getItemIcon=function(U,K){var W=n.props.prefixCls,q=U||C.a.createElement("button",{type:"button","aria-label":K,className:"".concat(W,"-item-link")});return typeof U=="function"&&(q=C.a.createElement(U,Object(L.a)({},n.props))),q},n.savePaginationNode=function(U){n.paginationNode=U},n.isValid=function(U){return l(U)&&U!==n.state.current},n.shouldDisplayQuickJumper=function(){var U=n.props,K=U.showQuickJumper,W=U.pageSize,q=U.total;return q<=W?!1:K},n.handleKeyDown=function(U){(U.keyCode===T.ARROW_UP||U.keyCode===T.ARROW_DOWN)&&U.preventDefault()},n.handleKeyUp=function(U){var K=n.getValidValue(U),W=n.state.currentInputValue;K!==W&&n.setState({currentInputValue:K}),U.keyCode===T.ENTER?n.handleChange(K):U.keyCode===T.ARROW_UP?n.handleChange(K-1):U.keyCode===T.ARROW_DOWN&&n.handleChange(K+1)},n.changePageSize=function(U){var K=n.state.current,W=m(U,n.state,n.props);K=K>W?W:K,W===0&&(K=n.state.current),typeof U=="number"&&("pageSize"in n.props||n.setState({pageSize:U}),"current"in n.props||n.setState({current:K,currentInputValue:K})),n.props.onShowSizeChange(K,U),"onChange"in n.props&&n.props.onChange&&n.props.onChange(K,U)},n.handleChange=function(U){var K=n.props.disabled,W=U;if(n.isValid(W)&&!K){var q=m(void 0,n.state,n.props);W>q?W=q:W<1&&(W=1),"current"in n.props||n.setState({current:W,currentInputValue:W});var Y=n.state.pageSize;return n.props.onChange(W,Y),W}return n.state.current},n.prev=function(){n.hasPrev()&&n.handleChange(n.state.current-1)},n.next=function(){n.hasNext()&&n.handleChange(n.state.current+1)},n.jumpPrev=function(){n.handleChange(n.getJumpPrevPage())},n.jumpNext=function(){n.handleChange(n.getJumpNextPage())},n.hasPrev=function(){return n.state.current>1},n.hasNext=function(){return n.state.current<m(void 0,n.state,n.props)},n.runIfEnter=function(U,K){if(U.key==="Enter"||U.charCode===13){for(var W=arguments.length,q=new Array(W>2?W-2:0),Y=2;Y<W;Y++)q[Y-2]=arguments[Y];K.apply(void 0,q)}},n.runIfEnterPrev=function(U){n.runIfEnter(U,n.prev)},n.runIfEnterNext=function(U){n.runIfEnter(U,n.next)},n.runIfEnterJumpPrev=function(U){n.runIfEnter(U,n.jumpPrev)},n.runIfEnterJumpNext=function(U){n.runIfEnter(U,n.jumpNext)},n.handleGoTO=function(U){(U.keyCode===T.ENTER||U.type==="click")&&n.handleChange(n.state.currentInputValue)};var o=r.onChange!==s,S="current"in r;S&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var b=r.defaultCurrent;"current"in r&&(b=r.current);var g=r.defaultPageSize;return"pageSize"in r&&(g=r.pageSize),b=Math.min(b,m(g,void 0,r)),n.state={current:b,currentInputValue:b,pageSize:g},n}return Object(D.a)(a,[{key:"componentDidUpdate",value:function(n,o){var S=this.props.prefixCls;if(o.current!==this.state.current&&this.paginationNode){var b=this.paginationNode.querySelector(".".concat(S,"-item-").concat(o.current));b&&document.activeElement===b&&b.blur()}}},{key:"getValidValue",value:function(n){var o=n.target.value,S=m(void 0,this.state,this.props),b=this.state.currentInputValue,g;return o===""?g=o:isNaN(Number(o))?g=b:o>=S?g=S:g=Number(o),g}},{key:"getShowSizeChanger",value:function(){var n=this.props,o=n.showSizeChanger,S=n.total,b=n.totalBoundaryShowSizeChanger;return typeof o!="undefined"?o:S>b}},{key:"renderPrev",value:function(n){var o=this.props,S=o.prevIcon,b=o.itemRender,g=b(n,"prev",this.getItemIcon(S,"prev page")),U=!this.hasPrev();return Object(c.isValidElement)(g)?Object(c.cloneElement)(g,{disabled:U}):g}},{key:"renderNext",value:function(n){var o=this.props,S=o.nextIcon,b=o.itemRender,g=b(n,"next",this.getItemIcon(S,"next page")),U=!this.hasNext();return Object(c.isValidElement)(g)?Object(c.cloneElement)(g,{disabled:U}):g}},{key:"render",value:function(){var n=this,o=this.props,S=o.prefixCls,b=o.className,g=o.style,U=o.disabled,K=o.hideOnSinglePage,W=o.total,q=o.locale,Y=o.showQuickJumper,V=o.showLessItems,te=o.showTitle,X=o.showTotal,se=o.simple,le=o.itemRender,Te=o.showPrevNextJumpers,Ee=o.jumpPrevIcon,Be=o.jumpNextIcon,De=o.selectComponentClass,Ve=o.selectPrefixCls,_e=o.pageSizeOptions,Le=this.state,tt=Le.current,Et=Le.pageSize,Oe=Le.currentInputValue;if(K===!0&&W<=Et)return null;var He=m(void 0,this.state,this.props),it=[],Ae=null,re=null,ae=null,ce=null,we=null,Re=Y&&Y.goButton,ke=V?1:2,ht=tt-1>0?tt-1:0,ft=tt+1<He?tt+1:He,vt=Object.keys(this.props).reduce(function(pe,be){return(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(pe[be]=n.props[be]),pe},{});if(se)return Re&&(typeof Re=="boolean"?we=C.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},q.jump_to_confirm):we=C.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Re),we=C.a.createElement("li",{title:te?"".concat(q.jump_to).concat(tt,"/").concat(He):null,className:"".concat(S,"-simple-pager")},we)),C.a.createElement("ul",Object(J.a)({className:i()(S,"".concat(S,"-simple"),Object(N.a)({},"".concat(S,"-disabled"),U),b),style:g,ref:this.savePaginationNode},vt),C.a.createElement("li",{title:te?q.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(S,"-prev"),Object(N.a)({},"".concat(S,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ht)),C.a.createElement("li",{title:te?"".concat(tt,"/").concat(He):null,className:"".concat(S,"-simple-pager")},C.a.createElement("input",{type:"text",value:Oe,disabled:U,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),C.a.createElement("span",{className:"".concat(S,"-slash")},"/"),He),C.a.createElement("li",{title:te?q.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(S,"-next"),Object(N.a)({},"".concat(S,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ft)),we);if(He<=3+ke*2){var yt={locale:q,rootPrefixCls:S,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:te,itemRender:le};He||it.push(C.a.createElement(O,Object(J.a)({},yt,{key:"noPager",page:He,className:"".concat(S,"-disabled")})));for(var Lt=1;Lt<=He;Lt+=1){var Mt=tt===Lt;it.push(C.a.createElement(O,Object(J.a)({},yt,{key:Lt,page:Lt,active:Mt})))}}else{var Qe=V?q.prev_3:q.prev_5,Pe=V?q.next_3:q.next_5;Te&&(Ae=C.a.createElement("li",{title:te?Qe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(S,"-jump-prev"),Object(N.a)({},"".concat(S,"-jump-prev-custom-icon"),!!Ee))},le(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ee,"prev page"))),re=C.a.createElement("li",{title:te?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(S,"-jump-next"),Object(N.a)({},"".concat(S,"-jump-next-custom-icon"),!!Be))},le(this.getJumpNextPage(),"jump-next",this.getItemIcon(Be,"next page")))),ce=C.a.createElement(O,{locale:q,last:!0,rootPrefixCls:S,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:He,page:He,active:!1,showTitle:te,itemRender:le}),ae=C.a.createElement(O,{locale:q,rootPrefixCls:S,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:te,itemRender:le});var lt=Math.max(1,tt-ke),pt=Math.min(tt+ke,He);tt-1<=ke&&(pt=1+ke*2),He-tt<=ke&&(lt=He-ke*2);for(var Ze=lt;Ze<=pt;Ze+=1){var st=tt===Ze;it.push(C.a.createElement(O,{locale:q,rootPrefixCls:S,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:st,showTitle:te,itemRender:le}))}tt-1>=ke*2&&tt!==1+2&&(it[0]=Object(c.cloneElement)(it[0],{className:"".concat(S,"-item-after-jump-prev")}),it.unshift(Ae)),He-tt>=ke*2&&tt!==He-2&&(it[it.length-1]=Object(c.cloneElement)(it[it.length-1],{className:"".concat(S,"-item-before-jump-next")}),it.push(re)),lt!==1&&it.unshift(ae),pt!==He&&it.push(ce)}var Ke=null;X&&(Ke=C.a.createElement("li",{className:"".concat(S,"-total-text")},X(W,[W===0?0:(tt-1)*Et+1,tt*Et>W?W:tt*Et])));var Ie=!this.hasPrev()||!He,Me=!this.hasNext()||!He;return C.a.createElement("ul",Object(J.a)({className:i()(S,b,Object(N.a)({},"".concat(S,"-disabled"),U)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},vt),Ke,C.a.createElement("li",{title:te?q.prev_page:null,onClick:this.prev,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(S,"-prev"),Object(N.a)({},"".concat(S,"-disabled"),Ie)),"aria-disabled":Ie},this.renderPrev(ht)),it,C.a.createElement("li",{title:te?q.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(S,"-next"),Object(N.a)({},"".concat(S,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(ft)),C.a.createElement(B,{disabled:U,locale:q,rootPrefixCls:S,selectComponentClass:De,selectPrefixCls:Ve,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:tt,pageSize:Et,pageSizeOptions:_e,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Re}))}}],[{key:"getDerivedStateFromProps",value:function(n,o){var S={};if("current"in n&&(S.current=n.current,n.current!==o.current&&(S.currentInputValue=S.current)),"pageSize"in n&&n.pageSize!==o.pageSize){var b=o.current,g=m(n.pageSize,o,n);b=b>g?g:b,"current"in n||(S.current=b,S.currentInputValue=b),S.pageSize=n.pageSize}return S}}]),a}(C.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:s,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:s,locale:u.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var v=E},"6GrX":function($e,me,z){var J=z("mFDi"),N=z("Xnb7"),L=z("bYtY"),Q=L.getContext,D=L.extend,w=L.retrieve2,_=L.retrieve3,c=L.trim,C={},x=0,i=5e3,h=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,O="12px sans-serif",T={};function y(K,W){T[K]=W}function B(K,W){W=W||O;var q=K+":"+W;if(C[q])return C[q];for(var Y=(K+"").split(`
|
|
`),V=0,te=0,X=Y.length;te<X;te++)V=Math.max(o(Y[te],W).width,V);return x>i&&(x=0,C={}),x++,C[q]=V,V}function u(K,W,q,Y,V,te,X,se){return X?l(K,W,q,Y,V,te,X,se):s(K,W,q,Y,V,te,se)}function s(K,W,q,Y,V,te,X){var se=S(K,W,V,te,X),le=B(K,W);V&&(le+=V[1]+V[3]);var Te=se.outerHeight,Ee=f(0,le,q),Be=m(0,Te,Y),De=new J(Ee,Be,le,Te);return De.lineHeight=se.lineHeight,De}function l(K,W,q,Y,V,te,X,se){var le=b(K,{rich:X,truncate:se,font:W,textAlign:q,textPadding:V,textLineHeight:te}),Te=le.outerWidth,Ee=le.outerHeight,Be=f(0,Te,q),De=m(0,Ee,Y);return new J(Be,De,Te,Ee)}function f(K,W,q){return q==="right"?K-=W:q==="center"&&(K-=W/2),K}function m(K,W,q){return q==="middle"?K-=W/2:q==="bottom"&&(K-=W),K}function E(K,W,q){var Y=W.textPosition,V=W.textDistance,te=q.x,X=q.y;V=V||0;var se=q.height,le=q.width,Te=se/2,Ee="left",Be="top";switch(Y){case"left":te-=V,X+=Te,Ee="right",Be="middle";break;case"right":te+=V+le,X+=Te,Be="middle";break;case"top":te+=le/2,X-=V,Ee="center",Be="bottom";break;case"bottom":te+=le/2,X+=se+V,Ee="center";break;case"inside":te+=le/2,X+=Te,Ee="center",Be="middle";break;case"insideLeft":te+=V,X+=Te,Be="middle";break;case"insideRight":te+=le-V,X+=Te,Ee="right",Be="middle";break;case"insideTop":te+=le/2,X+=V,Ee="center";break;case"insideBottom":te+=le/2,X+=se-V,Ee="center",Be="bottom";break;case"insideTopLeft":te+=V,X+=V;break;case"insideTopRight":te+=le-V,X+=V,Ee="right";break;case"insideBottomLeft":te+=V,X+=se-V,Be="bottom";break;case"insideBottomRight":te+=le-V,X+=se-V,Ee="right",Be="bottom";break}return K=K||{},K.x=te,K.y=X,K.textAlign=Ee,K.textVerticalAlign=Be,K}function v(K,W,q){var Y={textPosition:K,textDistance:q};return E({},Y,W)}function R(K,W,q,Y,V){if(!W)return"";var te=(K+"").split(`
|
|
`);V=p(W,q,Y,V);for(var X=0,se=te.length;X<se;X++)te[X]=a(te[X],V);return te.join(`
|
|
`)}function p(K,W,q,Y){Y=D({},Y),Y.font=W;var q=w(q,"...");Y.maxIterations=w(Y.maxIterations,2);var V=Y.minChar=w(Y.minChar,0);Y.cnCharWidth=B("\u56FD",W);var te=Y.ascCharWidth=B("a",W);Y.placeholder=w(Y.placeholder,"");for(var X=K=Math.max(0,K-1),se=0;se<V&&X>=te;se++)X-=te;var le=B(q,W);return le>X&&(q="",le=0),X=K-le,Y.ellipsis=q,Y.ellipsisWidth=le,Y.contentWidth=X,Y.containerWidth=K,Y}function a(K,W){var q=W.containerWidth,Y=W.font,V=W.contentWidth;if(!q)return"";var te=B(K,Y);if(te<=q)return K;for(var X=0;;X++){if(te<=V||X>=W.maxIterations){K+=W.ellipsis;break}var se=X===0?r(K,V,W.ascCharWidth,W.cnCharWidth):te>0?Math.floor(K.length*V/te):0;K=K.substr(0,se),te=B(K,Y)}return K===""&&(K=W.placeholder),K}function r(K,W,q,Y){for(var V=0,te=0,X=K.length;te<X&&V<W;te++){var se=K.charCodeAt(te);V+=0<=se&&se<=127?q:Y}return te}function n(K){return B("\u56FD",K)}function o(K,W){return T.measureText(K,W)}T.measureText=function(K,W){var q=Q();return q.font=W||O,q.measureText(K)};function S(K,W,q,Y,V){K!=null&&(K+="");var te=w(Y,n(W)),X=K?K.split(`
|
|
`):[],se=X.length*te,le=se,Te=!0;if(q&&(le+=q[0]+q[2]),K&&V){Te=!1;var Ee=V.outerHeight,Be=V.outerWidth;if(Ee!=null&&le>Ee)K="",X=[];else if(Be!=null)for(var De=p(Be-(q?q[1]+q[3]:0),W,V.ellipsis,{minChar:V.minChar,placeholder:V.placeholder}),Ve=0,_e=X.length;Ve<_e;Ve++)X[Ve]=a(X[Ve],De)}return{lines:X,height:se,outerHeight:le,lineHeight:te,canCacheByTextString:Te}}function b(K,W){var q={lines:[],width:0,height:0};if(K!=null&&(K+=""),!K)return q;for(var Y=h.lastIndex=0,V;(V=h.exec(K))!=null;){var te=V.index;te>Y&&g(q,K.substring(Y,te)),g(q,V[2],V[1]),Y=h.lastIndex}Y<K.length&&g(q,K.substring(Y,K.length));var X=q.lines,se=0,le=0,Te=[],Ee=W.textPadding,Be=W.truncate,De=Be&&Be.outerWidth,Ve=Be&&Be.outerHeight;Ee&&(De!=null&&(De-=Ee[1]+Ee[3]),Ve!=null&&(Ve-=Ee[0]+Ee[2]));for(var _e=0;_e<X.length;_e++){for(var Le=X[_e],tt=0,Et=0,Oe=0;Oe<Le.tokens.length;Oe++){var He=Le.tokens[Oe],it=He.styleName&&W.rich[He.styleName]||{},Ae=He.textPadding=it.textPadding,re=He.font=it.font||W.font,ae=He.textHeight=w(it.textHeight,n(re));if(Ae&&(ae+=Ae[0]+Ae[2]),He.height=ae,He.lineHeight=_(it.textLineHeight,W.textLineHeight,ae),He.textAlign=it&&it.textAlign||W.textAlign,He.textVerticalAlign=it&&it.textVerticalAlign||"middle",Ve!=null&&se+He.lineHeight>Ve)return{lines:[],width:0,height:0};He.textWidth=B(He.text,re);var ce=it.textWidth,we=ce==null||ce==="auto";if(typeof ce=="string"&&ce.charAt(ce.length-1)==="%")He.percentWidth=ce,Te.push(He),ce=0;else{if(we){ce=He.textWidth;var Re=it.textBackgroundColor,ke=Re&&Re.image;ke&&(ke=N.findExistImage(ke),N.isImageReady(ke)&&(ce=Math.max(ce,ke.width*ae/ke.height)))}var ht=Ae?Ae[1]+Ae[3]:0;ce+=ht;var ft=De!=null?De-Et:null;ft!=null&&ft<ce&&(!we||ft<ht?(He.text="",He.textWidth=ce=0):(He.text=R(He.text,ft-ht,re,Be.ellipsis,{minChar:Be.minChar}),He.textWidth=B(He.text,re),ce=He.textWidth+ht))}Et+=He.width=ce,it&&(tt=Math.max(tt,He.lineHeight))}Le.width=Et,Le.lineHeight=tt,se+=tt,le=Math.max(le,Et)}q.outerWidth=q.width=w(W.textWidth,le),q.outerHeight=q.height=w(W.textHeight,se),Ee&&(q.outerWidth+=Ee[1]+Ee[3],q.outerHeight+=Ee[0]+Ee[2]);for(var _e=0;_e<Te.length;_e++){var He=Te[_e],vt=He.percentWidth;He.width=parseInt(vt,10)/100*le}return q}function g(K,W,q){for(var Y=W==="",V=W.split(`
|
|
`),te=K.lines,X=0;X<V.length;X++){var se=V[X],le={styleName:q,text:se,isLineHolder:!se&&!Y};if(X)te.push({tokens:[le]});else{var Te=(te[te.length-1]||(te[0]={tokens:[]})).tokens,Ee=Te.length;Ee===1&&Te[0].isLineHolder?Te[0]=le:(se||!Ee||Y)&&Te.push(le)}}}function U(K){var W=(K.fontSize||K.fontFamily)&&[K.fontStyle,K.fontWeight,(K.fontSize||12)+"px",K.fontFamily||"sans-serif"].join(" ");return W&&c(W)||K.textFont||K.font}me.DEFAULT_FONT=O,me.$override=y,me.getWidth=B,me.getBoundingRect=u,me.adjustTextX=f,me.adjustTextY=m,me.calculateTextPosition=E,me.adjustTextPositionOnRect=v,me.truncateText=R,me.getLineHeight=n,me.measureText=o,me.parsePlainText=S,me.parseRichText=b,me.makeFont=U},"6RRn":function($e,me,z){"use strict";var J=z("wCXF"),N=z("n6Qo");z.d(me,"b",function(){return N.a});var L=z("IBYe"),Q=z("6eGT"),D=z("hW8S");z.d(me,"a",function(){return D.a}),me.c=J.b},"6eGT":function($e,me,z){"use strict";function J(N){return null}me.a=J},"6fms":function($e,me,z){var J=z("SUKs"),N=z("06Qe"),L=z("bYtY"),Q=L.each;function D(C){return parseInt(C,10)}function w(C,x){N.initVML(),this.root=C,this.storage=x;var i=document.createElement("div"),h=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",h.style.cssText="position:absolute;left:0;top:0;",C.appendChild(i),this._vmlRoot=h,this._vmlViewport=i,this.resize();var O=x.delFromStorage,T=x.addToStorage;x.delFromStorage=function(y){O.call(x,y),y&&(y.onRemove&&y.onRemove(h))},x.addToStorage=function(y){y.onAdd&&y.onAdd(h),T.call(x,y)},this._firstPaint=!0}w.prototype={constructor:w,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},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,!0);this._paintList(C)},_paintList:function(C){for(var x=this._vmlRoot,i=0;i<C.length;i++){var h=C[i];h.invisible||h.ignore?(h.__alreadyNotVisible||h.onRemove(x),h.__alreadyNotVisible=!0):(h.__alreadyNotVisible&&h.onAdd(x),h.__alreadyNotVisible=!1,h.__dirty&&(h.beforeBrush&&h.beforeBrush(),(h.brushVML||h.brush).call(h,x),h.afterBrush&&h.afterBrush())),h.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(x),this._firstPaint=!1)},resize:function(C,x){var C=C==null?this._getWidth():C,x=x==null?this._getHeight():x;if(this._width!==C||this._height!==x){this._width=C,this._height=x;var i=this._vmlViewport.style;i.width=C+"px",i.height=x+"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 C=this.root,x=C.currentStyle;return(C.clientWidth||D(x.width))-D(x.paddingLeft)-D(x.paddingRight)|0},_getHeight:function(){var C=this.root,x=C.currentStyle;return(C.clientHeight||D(x.height))-D(x.paddingTop)-D(x.paddingBottom)|0}};function _(C){return function(){J('In IE8.0 VML mode painter not support method "'+C+'"')}}Q(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(C){w.prototype[C]=_(C)});var c=w;$e.exports=c},"7Cbv":function($e,me,z){"use strict";var J=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),N=new Uint8Array(16);function L(){if(!J)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(N)}var Q=/^(?:[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 D(O){return typeof O=="string"&&Q.test(O)}for(var w=D,_=[],c=0;c<256;++c)_.push((c+256).toString(16).substr(1));function C(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,y=(_[O[T+0]]+_[O[T+1]]+_[O[T+2]]+_[O[T+3]]+"-"+_[O[T+4]]+_[O[T+5]]+"-"+_[O[T+6]]+_[O[T+7]]+"-"+_[O[T+8]]+_[O[T+9]]+"-"+_[O[T+10]]+_[O[T+11]]+_[O[T+12]]+_[O[T+13]]+_[O[T+14]]+_[O[T+15]]).toLowerCase();if(!w(y))throw TypeError("Stringified UUID is invalid");return y}var x=C;function i(O,T,y){O=O||{};var B=O.random||(O.rng||L)();if(B[6]=B[6]&15|64,B[8]=B[8]&63|128,T){y=y||0;for(var u=0;u<16;++u)T[y+u]=B[u];return T}return x(B)}var h=me.a=i},"7SHv":function($e,me,z){var J=z("LPTA"),N=J.devicePixelRatio,L=z("bYtY"),Q=z("SUKs"),D=z("mFDi"),w=z("BPZU"),_=z("Xmg4"),c=z("mLcG"),C=z("Dagg"),x=z("ItGF"),i=1e5,h=314159,O=.01,T=.001;function y(p){return parseInt(p,10)}function B(p){return p?p.__builtin__?!0:!(typeof p.resize!="function"||typeof p.refresh!="function"):!1}var u=new D(0,0,0,0),s=new D(0,0,0,0);function l(p,a,r){return u.copy(p.getBoundingRect()),p.transform&&u.applyTransform(p.transform),s.width=a,s.height=r,!u.intersect(s)}function f(p,a){if(p===a)return!1;if(!p||!a||p.length!==a.length)return!0;for(var r=0;r<p.length;r++)if(p[r]!==a[r])return!0;return!1}function m(p,a){for(var r=0;r<p.length;r++){var n=p[r];n.setTransform(a),a.beginPath(),n.buildPath(a,n.shape),a.clip(),n.restoreTransform(a)}}function E(p,a){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+p+"px","height:"+a+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var v=function(p,a,r){this.type="canvas";var n=!p.nodeName||p.nodeName.toUpperCase()==="CANVAS";this._opts=r=L.extend({},r||{}),this.dpr=r.devicePixelRatio||N,this._singleCanvas=n,this.root=p;var o=p.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",p.innerHTML=""),this.storage=a;var S=this._zlevelList=[],b=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var U=p.width,K=p.height;r.width!=null&&(U=r.width),r.height!=null&&(K=r.height),this.dpr=r.devicePixelRatio||1,p.width=U*this.dpr,p.height=K*this.dpr,this._width=U,this._height=K;var W=new _(p,this,this.dpr);W.__builtin__=!0,W.initContext(),b[h]=W,W.zlevel=h,S.push(h),this._domRoot=p}else{this._width=this._getSize(0),this._height=this._getSize(1);var g=this._domRoot=E(this._width,this._height);p.appendChild(g)}this._hoverlayer=null,this._hoverElements=[]};v.prototype={constructor:v,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var p=this.getViewportRoot();if(p)return{offsetLeft:p.offsetLeft||0,offsetTop:p.offsetTop||0}},refresh:function(p){var a=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(a,p,this._redrawId);for(var n=0;n<r.length;n++){var o=r[n],S=this._layers[o];if(!S.__builtin__&&S.refresh){var b=n===0?this._backgroundColor:null;S.refresh(b)}}return this.refreshHover(),this},addHover:function(p,a){if(p.__hoverMir)return;var r=new p.constructor({style:p.style,shape:p.shape,z:p.z,z2:p.z2,silent:p.silent});return r.__from=p,p.__hoverMir=r,a&&r.setStyle(a),this._hoverElements.push(r),r},removeHover:function(p){var a=p.__hoverMir,r=this._hoverElements,n=L.indexOf(r,a);n>=0&&r.splice(n,1),p.__hoverMir=null},clearHover:function(p){for(var a=this._hoverElements,r=0;r<a.length;r++){var n=a[r].__from;n&&(n.__hoverMir=null)}a.length=0},refreshHover:function(){var p=this._hoverElements,a=p.length,r=this._hoverlayer;if(r&&r.clear(),!a)return;w(p,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(i));var n={};r.ctx.save();for(var o=0;o<a;){var S=p[o],b=S.__from;if(!(b&&b.__zr)){p.splice(o,1),b.__hoverMir=null,a--;continue}o++,b.invisible||(S.transform=b.transform,S.invTransform=b.invTransform,S.__clipPaths=b.__clipPaths,this._doPaintEl(S,r,!0,n))}r.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(p,a,r){if(this._redrawId!==r)return;a=a||!1,this._updateLayerStatus(p);var n=this._doPaintList(p,a);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;c(function(){o._paintList(p,a,r)})}},_compositeManually:function(){var p=this.getLayer(h).ctx,a=this._domRoot.width,r=this._domRoot.height;p.clearRect(0,0,a,r),this.eachBuiltinLayer(function(n){n.virtual&&p.drawImage(n.dom,0,0,a,r)})},_doPaintList:function(p,a){for(var r=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n],S=this._layers[o];S.__builtin__&&S!==this._hoverlayer&&(S.__dirty||a)&&r.push(S)}for(var b=!0,g=0;g<r.length;g++){var S=r[g],U=S.ctx,K={};U.save();var W=a?S.__startIndex:S.__drawIndex,q=!a&&S.incremental&&Date.now,Y=q&&Date.now(),V=S.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(S.__startIndex===S.__endIndex)S.clear(!1,V);else if(W===S.__startIndex){var te=p[W];(!te.incremental||!te.notClear||a)&&S.clear(!1,V)}W===-1&&(console.error("For some unknown reason. drawIndex is -1"),W=S.__startIndex);for(var X=W;X<S.__endIndex;X++){var se=p[X];if(this._doPaintEl(se,S,a,K),se.__dirty=se.__dirtyText=!1,q){var le=Date.now()-Y;if(le>15)break}}S.__drawIndex=X,S.__drawIndex<S.__endIndex&&(b=!1),K.prevElClipPaths&&U.restore(),U.restore()}return x.wxa&&L.each(this._layers,function(Te){Te&&Te.ctx&&Te.ctx.draw&&Te.ctx.draw()}),b},_doPaintEl:function(p,a,r,n){var o=a.ctx,S=p.transform;if((a.__dirty||r)&&!p.invisible&&p.style.opacity!==0&&!(S&&!S[0]&&!S[3])&&!(p.culling&&l(p,this._width,this._height))){var b=p.__clipPaths,g=n.prevElClipPaths;(!g||f(b,g))&&(g&&(o.restore(),n.prevElClipPaths=null,n.prevEl=null),b&&(o.save(),m(b,o),n.prevElClipPaths=b)),p.beforeBrush&&p.beforeBrush(o),p.brush(o,n.prevEl||null),n.prevEl=p,p.afterBrush&&p.afterBrush(o)}},getLayer:function(p,a){this._singleCanvas&&!this._needsManuallyCompositing&&(p=h);var r=this._layers[p];return r||(r=new _("zr_"+p,this,this.dpr),r.zlevel=p,r.__builtin__=!0,this._layerConfig[p]?L.merge(r,this._layerConfig[p],!0):this._layerConfig[p-O]&&L.merge(r,this._layerConfig[p-O],!0),a&&(r.virtual=a),this.insertLayer(p,r),r.initContext()),r},insertLayer:function(p,a){var r=this._layers,n=this._zlevelList,o=n.length,S=null,b=-1,g=this._domRoot;if(r[p]){Q("ZLevel "+p+" has been used already");return}if(!B(a)){Q("Layer of zlevel "+p+" is not valid");return}if(o>0&&p>n[0]){for(b=0;b<o-1&&!(n[b]<p&&n[b+1]>p);b++);S=r[n[b]]}if(n.splice(b+1,0,p),r[p]=a,!a.virtual)if(S){var U=S.dom;U.nextSibling?g.insertBefore(a.dom,U.nextSibling):g.appendChild(a.dom)}else g.firstChild?g.insertBefore(a.dom,g.firstChild):g.appendChild(a.dom)},eachLayer:function(p,a){var r=this._zlevelList,n,o;for(o=0;o<r.length;o++)n=r[o],p.call(a,this._layers[n],n)},eachBuiltinLayer:function(p,a){var r=this._zlevelList,n,o,S;for(S=0;S<r.length;S++)o=r[S],n=this._layers[o],n.__builtin__&&p.call(a,n,o)},eachOtherLayer:function(p,a){var r=this._zlevelList,n,o,S;for(S=0;S<r.length;S++)o=r[S],n=this._layers[o],n.__builtin__||p.call(a,n,o)},getLayers:function(){return this._layers},_updateLayerStatus:function(p){this.eachBuiltinLayer(function(K,W){K.__dirty=K.__used=!1});function a(K){o&&(o.__endIndex!==K&&(o.__dirty=!0),o.__endIndex=K)}if(this._singleCanvas)for(var r=1;r<p.length;r++){var n=p[r];if(n.zlevel!==p[r-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}for(var o=null,S=0,b,r=0;r<p.length;r++){var n=p[r],g=n.zlevel,U;b!==g&&(b=g,S=0),n.incremental?(U=this.getLayer(g+T,this._needsManuallyCompositing),U.incremental=!0,S=1):U=this.getLayer(g+(S>0?O:0),this._needsManuallyCompositing),U.__builtin__||Q("ZLevel "+g+" has been used by unkown layer "+U.id),U!==o&&(U.__used=!0,U.__startIndex!==r&&(U.__dirty=!0),U.__startIndex=r,U.incremental?U.__drawIndex=-1:U.__drawIndex=r,a(r),o=U),n.__dirty&&(U.__dirty=!0,U.incremental&&U.__drawIndex<0&&(U.__drawIndex=r))}a(r),this.eachBuiltinLayer(function(K,W){!K.__used&&K.getElementCount()>0&&(K.__dirty=!0,K.__startIndex=K.__endIndex=K.__drawIndex=0),K.__dirty&&K.__drawIndex<0&&(K.__drawIndex=K.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(p){p.clear()},setBackgroundColor:function(p){this._backgroundColor=p},configLayer:function(p,a){if(a){var r=this._layerConfig;r[p]?L.merge(r[p],a,!0):r[p]=a;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===p||o===p+O){var S=this._layers[o];L.merge(S,r[p],!0)}}}},delLayer:function(p){var a=this._layers,r=this._zlevelList,n=a[p];if(!n)return;n.dom.parentNode.removeChild(n.dom),delete a[p],r.splice(L.indexOf(r,p),1)},resize:function(p,a){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var n=this._opts;if(p!=null&&(n.width=p),a!=null&&(n.height=a),p=this._getSize(0),a=this._getSize(1),r.style.display="",this._width!==p||a!==this._height){r.style.width=p+"px",r.style.height=a+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(p,a);L.each(this._progressiveLayers,function(S){S.resize(p,a)}),this.refresh(!0)}this._width=p,this._height=a}else{if(p==null||a==null)return;this._width=p,this._height=a,this.getLayer(h).resize(p,a)}return this},clearLayer:function(p){var a=this._layers[p];a&&a.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(p){if(p=p||{},this._singleCanvas&&!this._compositeManually)return this._layers[h].dom;var a=new _("image",this,p.pixelRatio||this.dpr);if(a.initContext(),a.clear(!1,p.backgroundColor||this._backgroundColor),p.pixelRatio<=this.dpr){this.refresh();var r=a.dom.width,n=a.dom.height,o=a.ctx;this.eachLayer(function(K){K.__builtin__?o.drawImage(K.dom,0,0,r,n):K.renderToCanvas&&(a.ctx.save(),K.renderToCanvas(a.ctx),a.ctx.restore())})}else for(var S={},b=this.storage.getDisplayList(!0),g=0;g<b.length;g++){var U=b[g];this._doPaintEl(U,a,!0,S)}return a.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(p){var a=this._opts,r=["width","height"][p],n=["clientWidth","clientHeight"][p],o=["paddingLeft","paddingTop"][p],S=["paddingRight","paddingBottom"][p];if(a[r]!=null&&a[r]!=="auto")return parseFloat(a[r]);var b=this.root,g=document.defaultView.getComputedStyle(b);return(b[n]||y(g[r])||y(b.style[r]))-(y(g[o])||0)-(y(g[S])||0)|0},pathToImage:function(p,a){a=a||this.dpr;var r=document.createElement("canvas"),n=r.getContext("2d"),o=p.getBoundingRect(),S=p.style,b=S.shadowBlur*a,g=S.shadowOffsetX*a,U=S.shadowOffsetY*a,K=S.hasStroke()?S.lineWidth:0,W=Math.max(K/2,-g+b),q=Math.max(K/2,g+b),Y=Math.max(K/2,-U+b),V=Math.max(K/2,U+b),te=o.width+W+q,X=o.height+Y+V;r.width=te*a,r.height=X*a,n.scale(a,a),n.clearRect(0,0,te,X),n.dpr=a;var se={position:p.position,rotation:p.rotation,scale:p.scale};p.position=[W-o.x,Y-o.y],p.rotation=0,p.scale=[1,1],p.updateTransform(),p&&p.brush(n);var le=C,Te=new le({style:{x:0,y:0,image:r}});return se.position!=null&&(Te.position=p.position=se.position),se.rotation!=null&&(Te.rotation=p.rotation=se.rotation),se.scale!=null&&(Te.scale=p.scale=se.scale),Te}};var R=v;$e.exports=R},"7ahc":function($e,me,z){"use strict";z.d(me,"a",function(){return m});var J=z("k1fw"),N=z("0Owb"),L=z("+L6B"),Q=z("2/Rp"),D=z("y8nQ"),w=z("Vl3Y"),_=z("tJVT"),c=z("OaEy"),C=z("2fM7"),x=z("q1tI"),i=z.n(x),h=z("VrN/"),O=z.n(h),T=z("p77/"),y=z.n(T),B=z("c5Ni"),u=z.n(B),s=C.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},f={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};me.b=function(E){var v=E.callback,R=E.onCancel,p=Object(x.useState)("python"),a=Object(_.a)(p,2),r=a[0],n=a[1];function o(b){n(f[b][1])}function S(b){v(b)}return i.a.createElement(w.a,Object(N.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:S}),i.a.createElement(w.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(C.a,{onChange:o},Object.keys(f).map(function(b){return i.a.createElement(s,{key:b,value:b},f[b][0])}))),i.a.createElement(w.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(m,{mode:r})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(Q.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function m(E){var v=E.value,R=E.onChange,p=E.mode,a=E.options,r=a===void 0?{}:a,n=Object(x.useRef)(),o=Object(x.useState)(),S=Object(_.a)(o,2),b=S[0],g=S[1];return Object(x.useEffect)(function(){if(b){function U(K){var W=K.getValue();R&&R(W)}return b.on("change",U),function(){b.off("change",U)}}},[b,R]),Object(x.useEffect)(function(){b&&b.setOption("mode",p)},[b,p]),Object(x.useEffect)(function(){b&&((v!==b.getValue()||v==="")&&setTimeout(function(){b.setValue(v||" ")},300))},[b,v]),Object(x.useEffect)(function(){if(n.current&&!b){var U=O.a.fromTextArea(n.current,Object(J.a)({mode:p,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));g(U)}},[n.current,b]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:n}))}},"7ixt":function($e,me,z){"use strict";z.d(me,"a",function(){return L});var J={adjustX:1,adjustY:1},N=[0,0],L={left:{points:["cr","cl"],overflow:J,offset:[-4,0],targetOffset:N},right:{points:["cl","cr"],overflow:J,offset:[4,0],targetOffset:N},top:{points:["bc","tc"],overflow:J,offset:[0,-4],targetOffset:N},bottom:{points:["tc","bc"],overflow:J,offset:[0,4],targetOffset:N},topLeft:{points:["bl","tl"],overflow:J,offset:[0,-4],targetOffset:N},leftTop:{points:["tr","tl"],overflow:J,offset:[-4,0],targetOffset:N},topRight:{points:["br","tr"],overflow:J,offset:[0,-4],targetOffset:N},rightTop:{points:["tl","tr"],overflow:J,offset:[4,0],targetOffset:N},bottomRight:{points:["tr","br"],overflow:J,offset:[0,4],targetOffset:N},rightBottom:{points:["bl","br"],overflow:J,offset:[4,0],targetOffset:N},bottomLeft:{points:["tl","bl"],overflow:J,offset:[0,4],targetOffset:N},leftBottom:{points:["br","bl"],overflow:J,offset:[-4,0],targetOffset:N}},Q=L},"7oTu":function($e,me,z){var J=z("IMiH"),N=z("QBsz"),L=N.applyTransform,Q=J.CMD,D=[[],[],[]],w=Math.sqrt,_=Math.atan2;function c(C,x){var i=C.data,h,O,T,y,B,u,s=Q.M,l=Q.C,f=Q.L,m=Q.R,E=Q.A,v=Q.Q;for(T=0,y=0;T<i.length;){h=i[T++],y=T,O=0;switch(h){case s:O=1;break;case f:O=1;break;case l:O=3;break;case v:O=2;break;case E:var R=x[4],p=x[5],a=w(x[0]*x[0]+x[1]*x[1]),r=w(x[2]*x[2]+x[3]*x[3]),n=_(-x[1]/r,x[0]/a);i[T]*=a,i[T++]+=R,i[T]*=r,i[T++]+=p,i[T++]*=a,i[T++]*=r,i[T++]+=n,i[T++]+=n,T+=2,y=T;break;case m:u[0]=i[T++],u[1]=i[T++],L(u,u,x),i[y++]=u[0],i[y++]=u[1],u[0]+=i[T++],u[1]+=i[T++],L(u,u,x),i[y++]=u[0],i[y++]=u[1]}for(B=0;B<O;B++){var u=D[B];u[0]=i[T++],u[1]=i[T++],L(u,u,x),i[y++]=u[0],i[y++]=u[1]}}}$e.exports=c},"815F":function($e,me,z){"use strict";z.d(me,"e",function(){return _}),z.d(me,"c",function(){return C}),z.d(me,"d",function(){return x}),z.d(me,"a",function(){return h}),z.d(me,"f",function(){return O}),z.d(me,"b",function(){return T});var J=z("KQm4"),N=z("VTBJ"),L=z("Ff2n"),Q=z("Zm9Q"),D=z("Kwbf"),w=z("OZM5");function _(y,B){return y!=null?y:B}function c(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=new Map;function u(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(s||[]).forEach(function(f){var m=f.key,E=f.children;Object(D.a)(m!=null,"Tree node must have a certain key: [".concat(l).concat(m,"]"));var v=String(m);Object(D.a)(!B.has(v)||m===null||m===void 0,"Same 'key' exist in the Tree: ".concat(v)),B.set(v,!0),u(E,"".concat(l).concat(v," > "))})}u(y)}function C(y){function B(u){var s=Object(Q.a)(u);return s.map(function(l){if(!Object(w.i)(l))return Object(D.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var f=l.key,m=l.props,E=m.children,v=Object(L.a)(m,["children"]),R=Object(N.a)({key:f},v),p=B(E);return p.length&&(R.children=p),R}).filter(function(l){return l})}return B(y)}function x(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(B===!0?[]:B),s=[];function l(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return f.map(function(E,v){var R=Object(w.h)(m?m.pos:"0",v),p=_(E.key,R),a=Object(N.a)(Object(N.a)({},E),{},{parent:m,pos:R,children:null,data:E,isStart:[].concat(Object(J.a)(m?m.isStart:[]),[v===0]),isEnd:[].concat(Object(J.a)(m?m.isEnd:[]),[v===f.length-1])});return s.push(a),B===!0||u.has(p)?a.children=l(E.children||[],a):a.children=[],a})}return l(y),s}function i(y,B,u){var s;u?typeof u=="string"?s=function(m){return m[u]}:typeof u=="function"&&(s=function(m){return u(m)}):s=function(m,E){return _(m.key,E)};function l(f,m,E){var v=f?f.children:y,R=f?Object(w.h)(E.pos,m):"0";if(f){var p=s(f,R),a={node:f,index:m,pos:R,key:p,parentPos:E.node?E.pos:null,level:E.level+1};B(a)}v&&v.forEach(function(r,n){l(r,n,{node:f,pos:R,level:E?E.level+1:-1})})}l(null)}function h(y){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=B.initWrapper,s=B.processEntity,l=B.onProcessFinished,f=arguments.length>2?arguments[2]:void 0,m={},E={},v={posEntities:m,keyEntities:E};return u&&(v=u(v)||v),i(y,function(R){var p=R.node,a=R.index,r=R.pos,n=R.key,o=R.parentPos,S=R.level,b={node:p,index:a,key:n,pos:r,level:S},g=_(n,r);m[r]=b,E[g]=b,b.parent=m[o],b.parent&&(b.parent.children=b.parent.children||[],b.parent.children.push(b)),s&&s(b,v)},f),l&&l(v),v}function O(y,B){var u=B.expandedKeys,s=B.selectedKeys,l=B.loadedKeys,f=B.loadingKeys,m=B.checkedKeys,E=B.halfCheckedKeys,v=B.dragOverNodeKey,R=B.dropPosition,p=B.keyEntities,a=p[y],r={eventKey:y,expanded:u.indexOf(y)!==-1,selected:s.indexOf(y)!==-1,loaded:l.indexOf(y)!==-1,loading:f.indexOf(y)!==-1,checked:m.indexOf(y)!==-1,halfChecked:E.indexOf(y)!==-1,pos:String(a?a.pos:""),dragOver:v===y&&R===0,dragOverGapTop:v===y&&R===-1,dragOverGapBottom:v===y&&R===1};return r}function T(y){var B=y.data,u=y.expanded,s=y.selected,l=y.checked,f=y.loaded,m=y.loading,E=y.halfChecked,v=y.dragOver,R=y.dragOverGapTop,p=y.dragOverGapBottom,a=y.pos,r=y.active,n=Object(N.a)(Object(N.a)({},B),{},{expanded:u,selected:s,checked:l,loaded:f,loading:m,halfChecked:E,dragOver:v,dragOverGapTop:R,dragOverGapBottom:p,pos:a,active:r});return"props"in n||Object.defineProperty(n,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),y}}),n}},"8EBN":function($e,me,z){(function(J){J(z("VrN/"))})(function(J){"use strict";J.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 N=0;N<J.modeInfo.length;N++){var L=J.modeInfo[N];L.mimes&&(L.mime=L.mimes[0])}J.findModeByMIME=function(Q){Q=Q.toLowerCase();for(var D=0;D<J.modeInfo.length;D++){var w=J.modeInfo[D];if(w.mime==Q)return w;if(w.mimes){for(var _=0;_<w.mimes.length;_++)if(w.mimes[_]==Q)return w}}if(/\+xml$/.test(Q))return J.findModeByMIME("application/xml");if(/\+json$/.test(Q))return J.findModeByMIME("application/json")},J.findModeByExtension=function(Q){Q=Q.toLowerCase();for(var D=0;D<J.modeInfo.length;D++){var w=J.modeInfo[D];if(w.ext){for(var _=0;_<w.ext.length;_++)if(w.ext[_]==Q)return w}}},J.findModeByFileName=function(Q){for(var D=0;D<J.modeInfo.length;D++){var w=J.modeInfo[D];if(w.file&&w.file.test(Q))return w}var _=Q.lastIndexOf("."),c=_>-1&&Q.substring(_+1,Q.length);if(c)return J.findModeByExtension(c)},J.findModeByName=function(Q){Q=Q.toLowerCase();for(var D=0;D<J.modeInfo.length;D++){var w=J.modeInfo[D];if(w.name.toLowerCase()==Q)return w;if(w.alias){for(var _=0;_<w.alias.length;_++)if(w.alias[_].toLowerCase()==Q)return w}}}})},"8XDt":function($e,me,z){z("qH13");var J=z("aX58"),N=J.registerPainter,L=z("6fms");N("vml",L)},"8hTe":function($e,me,z){$e.exports={button:"button___1wy9m"}},"9Bee":function($e,me,z){"use strict";var J=z("DYRE"),N=z("zeV3"),L=z("+L6B"),Q=z("2/Rp"),D=z("k1fw"),w=z("9og8"),_=z("tJVT"),c=z("WmNS"),C=z.n(c),x=z("q1tI"),i=z.n(x),h=z("vg9a"),O=z("DlQD"),T=z.n(O),y=z("rUJ1");function B(Z,M){var P=Z.match(/^(\s+)(?:```)/);if(P===null)return M;var $=P[1];return M.split(`
|
|
`).map(function(ne){var ee=ne.match(/^\s+/);if(ee===null)return ne;var je=Object(_.a)(ee,1),Ct=je[0];return Ct.length>=$.length?ne.slice($.length):ne}).join(`
|
|
`)}var u=[],s=["<ul>"],l=new T.a.Renderer,f=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function m(){u.length=0,s=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(Z,M,P,$){if(M>=Z.length||Z[M].level<=P)return M;var ne=Z[M];$.push("<li><a href='#"+ne.anchor+"'>"+ne.text+"</a>"),M++;var ee=[];return M=v(Z,M,ne.level,ee),ee.length>0&&($.push("<ul>"),ee.forEach(function(je){$.push(je)}),$.push("</ul>")),$.push("</li>"),M=v(Z,M,P,$),M}function R(){return v(u,0,0,s),s.push("</ul>"),s.join("")}var p={heading:function(M){var P=f.exec(M);if(P)return{type:"heading",raw:P[0],depth:P[1].length,text:P[2]}},fences:function(M){var P=this.rules.block.fences.exec(M);if(P){var $=P[0],ne=B($,P[3]||""),ee=P[2]?P[2].trim():P[2];if(["latex","katex","math"].indexOf(ee)>=0){var je=n(),Ct=ne;ne=je,o[je]={type:"block",expression:Ct}}return{type:"code",raw:$,lang:ee,text:ne}}}},a=/(?:\${2})([^\n`]+?)(?:\${2})/gi,r=0,n=function(){return"__special_katext_id_".concat(r++,"__")},o={};function S(){return o}function b(){r=0,o={}}function g(Z){return Z=Z.replace(a,function(M,P){var $=n();return o[$]={type:"inline",expression:P},$}),Z}var U=l.listitem;l.listitem=function(Z){return U(g(Z))};var K=l.paragraph;l.paragraph=function(Z){return K(g(Z))};var W=l.tablecell;l.tablecell=function(Z,M){return W(g(Z),M)},l.code=function(Z,M,P){var $=(M||"").match(/\S*/)[0];return $?["latex","katex","math"].indexOf($)>=0?"<p class='editormd-tex'>".concat(Z,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(M,'">').concat(P?Z:Object(y.escape)(Z,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(P?Z:Object(y.escape)(Z,!0))+"</code></pre>"},l.heading=function(Z,M,P){var $=this.options.headerPrefix+P.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:$,level:M,text:Z}),"<h"+M+' id="'+$+'">'+Z+"</h"+M+">"},T.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),T.a.use({tokenizer:p,renderer:l});var q=T.a,Y=z("SJMd"),V=z("ulZh"),te=z.n(V),X=z("m3rI"),se=z("Oy/b"),le=z("p5ED"),Te=z("ErOA");/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var Ee=function(Z,M){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,$){P.__proto__=$}||function(P,$){for(var ne in $)Object.prototype.hasOwnProperty.call($,ne)&&(P[ne]=$[ne])})(Z,M)};function Be(Z,M){function P(){this.constructor=Z}Ee(Z,M),Z.prototype=M===null?Object.create(M):(P.prototype=M.prototype,new P)}function De(Z,M,P,$){return new(P||(P=Promise))(function(ne,ee){function je(kt){try{Ft($.next(kt))}catch(bt){ee(bt)}}function Ct(kt){try{Ft($.throw(kt))}catch(bt){ee(bt)}}function Ft(kt){var bt;kt.done?ne(kt.value):(bt=kt.value,bt instanceof P?bt:new P(function(Yt){Yt(bt)})).then(je,Ct)}Ft(($=$.apply(Z,M||[])).next())})}function Ve(Z,M){var P,$,ne,ee,je={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return ee={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function Ct(Ft){return function(kt){return function(bt){if(P)throw new TypeError("Generator is already executing.");for(;je;)try{if(P=1,$&&(ne=2&bt[0]?$.return:bt[0]?$.throw||((ne=$.return)&&ne.call($),0):$.next)&&!(ne=ne.call($,bt[1])).done)return ne;switch($=0,ne&&(bt=[2&bt[0],ne.value]),bt[0]){case 0:case 1:ne=bt;break;case 4:return je.label++,{value:bt[1],done:!1};case 5:je.label++,$=bt[1],bt=[0];continue;case 7:bt=je.ops.pop(),je.trys.pop();continue;default:if(!(ne=je.trys,(ne=ne.length>0&&ne[ne.length-1])||bt[0]!==6&&bt[0]!==2)){je=0;continue}if(bt[0]===3&&(!ne||bt[1]>ne[0]&&bt[1]<ne[3])){je.label=bt[1];break}if(bt[0]===6&&je.label<ne[1]){je.label=ne[1],ne=bt;break}if(ne&&je.label<ne[2]){je.label=ne[2],je.ops.push(bt);break}ne[2]&&je.ops.pop(),je.trys.pop();continue}bt=M.call(Z,je)}catch(Yt){bt=[6,Yt],$=0}finally{P=ne=0}if(5&bt[0])throw bt[1];return{value:bt[0]?bt[1]:void 0,done:!0}}([Ft,kt])}}}function _e(){for(var Z=0,M=0,P=arguments.length;M<P;M++)Z+=arguments[M].length;var $=Array(Z),ne=0;for(M=0;M<P;M++)for(var ee=arguments[M],je=0,Ct=ee.length;je<Ct;je++,ne++)$[ne]=ee[je];return $}var Le=function(){function Z(){}return Z.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Z.setAttributes=function(M,P){for(var $=0,ne=P;$<ne.length;$++){var ee=ne[$],je=ee[0],Ct=ee[1];M.setAttribute(je,Ct)}},Z.createRect=function(M,P,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return ne.setAttribute("width",M.toString()),ne.setAttribute("height",P.toString()),$&&Z.setAttributes(ne,$),ne},Z.createLine=function(M,P,$,ne,ee){var je=document.createElementNS("http://www.w3.org/2000/svg","line");return je.setAttribute("x1",M.toString()),je.setAttribute("y1",P.toString()),je.setAttribute("x2",$.toString()),je.setAttribute("y2",ne.toString()),ee&&Z.setAttributes(je,ee),je},Z.createPolygon=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $.setAttribute("points",M),P&&Z.setAttributes($,P),$},Z.createCircle=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","circle");return $.setAttribute("cx",(M/2).toString()),$.setAttribute("cy",(M/2).toString()),$.setAttribute("r",M.toString()),P&&Z.setAttributes($,P),$},Z.createEllipse=function(M,P,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ne.setAttribute("cx",(M/2).toString()),ne.setAttribute("cy",(P/2).toString()),ne.setAttribute("rx",(M/2).toString()),ne.setAttribute("ry",(P/2).toString()),$&&Z.setAttributes(ne,$),ne},Z.createGroup=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return M&&Z.setAttributes(P,M),P},Z.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Z.createMarker=function(M,P,$,ne,ee,je,Ct){var Ft=document.createElementNS("http://www.w3.org/2000/svg","marker");return Z.setAttributes(Ft,[["id",M],["orient",P],["markerWidth",$.toString()],["markerHeight",ne.toString()],["refX",ee.toString()],["refY",je.toString()]]),Ft.appendChild(Ct),Ft},Z.createText=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),M&&Z.setAttributes(P,M),P},Z.createTSpan=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $.textContent=M,P&&Z.setAttributes($,P),$},Z.createImage=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return M&&Z.setAttributes(P,M),P},Z.createPoint=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $.x=M,$.y=P,$},Z.createPath=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","path");return $.setAttribute("d",M),P&&Z.setAttributes($,P),$},Z}(),tt=function(){function Z(){}return Z.addKey=function(M){Z.key=M},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}(),Et=function(){function Z(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Z.prototype.rasterize=function(M,P,$){var ne=this;return new Promise(function(ee){var je=$!==void 0?$:document.createElement("canvas");M===null&&(ne.markersOnly=!0,ne.naturalSize=!1);var Ct=document.createElementNS("http://www.w3.org/2000/svg","svg");Ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ct.setAttribute("width",P.width.baseVal.valueAsString),Ct.setAttribute("height",P.height.baseVal.valueAsString),Ct.setAttribute("viewBox","0 0 "+P.viewBox.baseVal.width.toString()+" "+P.viewBox.baseVal.height.toString()),Ct.innerHTML=P.innerHTML,ne.naturalSize===!0?(Ct.width.baseVal.value=M.naturalWidth,Ct.height.baseVal.value=M.naturalHeight):ne.width!==void 0&&ne.height!==void 0&&(Ct.width.baseVal.value=ne.width,Ct.height.baseVal.value=ne.height),je.width=Ct.width.baseVal.value,je.height=Ct.height.baseVal.value;var Ft=Ct.outerHTML,kt=je.getContext("2d");ne.markersOnly!==!0&&kt.drawImage(M,0,0,je.width,je.height);var bt=window.URL,Yt=new Image(je.width,je.height);Yt.setAttribute("crossOrigin","anonymous");var zt=new Blob([Ft],{type:"image/svg+xml"}),$t=bt.createObjectURL(zt);Yt.onload=function(){kt.drawImage(Yt,0,0),bt.revokeObjectURL($t);var dr=je.toDataURL(ne.imageType,ne.imageQuality);ee(dr)},Yt.src=$t})},Z}(),Oe=function(){},He=function(){function Z(M){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+M+"_"}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(M){return this.styleSheet===void 0&&this.addStyleSheet(),M.name=""+this.classNamePrefix+M.localName,this.classes.push(M),this.styleSheet.sheet.insertRule("."+M.name+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length),M},Z.prototype.addRule=function(M){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(M),this.styleSheet.sheet.insertRule(M.selector+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length)},Z.prototype.addStyleSheet=function(){var M;this.styleSheet=document.createElement("style"),((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ae("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ae("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Z.prototype.removeStyleSheet=function(){var M;this.styleSheet&&(((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Z}(),it=function(Z,M){this.selector=Z,this.style=M},Ae=function(Z,M){this.localName=Z,this.style=M},re=function(){function Z(M,P,$,ne,ee){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=M,this.displayMode=P,this.markerItems=$,this.uiStyleSettings=ne,this.styles=ee,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(M){var P=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=M,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(ee){var je=document.createElement("div");je.className=""+P.toolbarButtonStyleClass.name,je.setAttribute("data-type-name",ee.typeName),je.innerHTML=ee.icon,je.addEventListener("click",function(){P.markerToolbarButtonClicked(je,ee)}),P.buttons.push(je),P.markerButtons.push(je)}),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 ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ne),this.addActionButton(ne,'<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(ne,'<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(M){this.buttonClickListeners.push(M)},Z.prototype.removeButtonClickListener=function(M){this.buttonClickListeners.indexOf(M)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(M),1)},Z.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Z.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var M=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var P=0;P<this.markerButtons.length;P++)P<M||P===M&&this.markerButtons.length-1===M?this.markerButtonBlock.appendChild(this.markerButtons[P]):(P===M&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[P]))}},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 M=this;this.buttons.forEach(function(P){P.className=P.className.replace(M.uiStyleSettings.toolbarButtonStyleColorsClassName?M.uiStyleSettings.toolbarButtonStyleColorsClassName:M.toolbarButtonStyleColorsClass.name,"").trim(),P.className=P.className.replace(M.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?M.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:M.toolbarActiveButtonStyleColorsClass.name,"").trim(),P.className+=" "+(M.uiStyleSettings.toolbarButtonStyleColorsClassName?M.uiStyleSettings.toolbarButtonStyleColorsClassName:M.toolbarButtonStyleColorsClass.name)})},Z.prototype.addActionButton=function(M,P,$){var ne=this,ee=document.createElement("div");switch(ee.className=""+this.toolbarButtonStyleClass.name,ee.innerHTML=P,ee.setAttribute("data-action",$),ee.addEventListener("click",function(){ne.actionToolbarButtonClicked(ee,$)}),$){case"select":ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ee.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ee.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ee.style.fill=this.uiStyleSettings.closeButtonColor}M.appendChild(ee),this.buttons.push(ee)},Z.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ae("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 Ae("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ae("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ae("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 Ae("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var M=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ae("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
padding: `+M+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Z.prototype.markerToolbarButtonClicked=function(M,P){this.setActiveButton(M),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("marker",P)}),this.markerButtonOverflowBlock.style.display="none"},Z.prototype.actionToolbarButtonClicked=function(M,P){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("action",P)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Z.prototype.setActiveButton=function(M){this.resetButtonStyles(),M.className=M.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),M.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Z.prototype.setActiveMarkerButton=function(M){var P=this.markerButtons.find(function($){return $.getAttribute("data-type-name")===M});P&&this.setActiveButton(P)},Z.prototype.setCurrentMarker=function(M){var P=this;this.currentMarker=M,this.buttons.filter(function($){return/delete|notes/.test($.getAttribute("data-action"))}).forEach(function($){P.currentMarker===void 0?($.style.fillOpacity="0.4",$.style.pointerEvents="none"):($.style.fillOpacity="1",$.style.pointerEvents="all")})},Z}(),ae=function(){function Z(M,P,$,ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=M,this.displayMode=P,this.uiStyleSettings=$,this.styles=ne,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Z.prototype.addStyles=function(){var M;this.toolboxStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var P=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ae("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox-panel-row_colors",`
|
|
background-color: `+((M=this.uiStyleSettings.toolboxBackgroundColor)!==null&&M!==void 0?M:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ae("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
padding: `+P+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Z.prototype.show=function(M){var P;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=M,this.uiContainer.className=this.toolboxStyleClass.name+" "+((P=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Z.prototype.setPanelButtons=function(M){var P,$,ne=this;this.panels=M,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((P=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&P!==void 0?P: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(ee){var je;ee.uiStyleSettings=ne.uiStyleSettings;var Ct=document.createElement("div");Ct.className=ne.toolboxButtonStyleClass.name+" "+((je=ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:ne.toolboxButtonStyleColorsClass.name),Ct.innerHTML=ee.icon,Ct.title=ee.title,Ct.addEventListener("click",function(){ne.panelButtonClick(ee)}),ne.panelButtons.push(Ct),ne.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Z.prototype.panelButtonClick=function(M){var P=this,$=-1;if(M!==this.activePanel){$=this.panels.indexOf(M),this.panelRow.innerHTML="";var ne=M.getUi();ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ne),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=M}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){P.displayMode==="inline"?P.panelRow.style.display="none":P.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ee,je){var Ct,Ft;ee.className=P.toolboxButtonStyleClass.name+" "+(je===$?""+((Ct=P.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:P.toolboxActiveButtonStyleColorsClass.name):""+((Ft=P.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ft!==void 0?Ft:P.toolboxButtonStyleColorsClass.name))})},Z}(),ce=function(Z,M){this.title=Z,this.icon=M},we=function(Z){function M(P,$,ne,ee){var je=Z.call(this,P,ee||'<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 je.colors=[],je.addTransparent=!1,je.colorBoxes=[],je.colors=$,je.currentColor=ne,je.setCurrentColor=je.setCurrentColor.bind(je),je.getColorBox=je.getColorBox.bind(je),je}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.whiteSpace="nowrap",this.colors.forEach(function(ne){var ee=P.getColorBox(ne);$.appendChild(ee),P.colorBoxes.push(ee)}),$},M.prototype.getColorBox=function(P){var $=this,ne=this.uiStyleSettings.toolbarHeight/4,ee=this.uiStyleSettings.toolbarHeight-ne,je=document.createElement("div");je.style.display="inline-block",je.style.boxSizing="content-box",je.style.width=ee-2+"px",je.style.height=ee-2+"px",je.style.padding="1px",je.style.marginRight="2px",je.style.marginBottom="2px",je.style.borderWidth="2px",je.style.borderStyle="solid",je.style.borderRadius=(ee+2)/2+"px",je.style.borderColor=P===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",je.addEventListener("click",function(){$.setCurrentColor(P,je)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=ee-2+"px",Ct.style.height=ee-2+"px",Ct.style.backgroundColor=P,Ct.style.borderRadius=ee/2+"px",P==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.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>`),je.appendChild(Ct),je},M.prototype.setCurrentColor=function(P,$){var ne=this;this.currentColor=P,this.colorBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(P)},M}(ce),Re=function(){function Z(M,P,$){this._state="new",this._isSelected=!1,this._container=M,this._overlayContainer=P,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(M){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(M,P){},Z.prototype.dblClick=function(M,P){},Z.prototype.manipulate=function(M){},Z.prototype.pointerUp=function(M){this.stateChanged()},Z.prototype.dispose=function(){},Z.prototype.addMarkerVisualToContainer=function(M){this.container.childNodes.length>0?this.container.insertBefore(M,this.container.childNodes[0]):this.container.appendChild(M)},Z.prototype.getState=function(){return{typeName:Z.typeName,state:this.state,notes:this.notes}},Z.prototype.restoreState=function(M){this._state=M.state,this.notes=M.notes},Z.prototype.scale=function(M,P){},Z.prototype.colorChanged=function(M){this.onColorChanged&&this.onColorChanged(M),this.stateChanged()},Z.prototype.fillColorChanged=function(M){this.onFillColorChanged&&this.onFillColorChanged(M),this.stateChanged()},Z.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var M=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),M.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(M)&&this.onStateChanged(this)}},Z.typeName="MarkerBase",Z}(),ke=function(){function Z(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Z.prototype.findGripByVisual=function(M){return this.topLeft.ownsTarget(M)?this.topLeft:this.topCenter.ownsTarget(M)?this.topCenter:this.topRight.ownsTarget(M)?this.topRight:this.centerLeft.ownsTarget(M)?this.centerLeft:this.centerRight.ownsTarget(M)?this.centerRight:this.bottomLeft.ownsTarget(M)?this.bottomLeft:this.bottomCenter.ownsTarget(M)?this.bottomCenter:this.bottomRight.ownsTarget(M)?this.bottomRight:void 0},Z}(),ht=function(){function Z(){this.GRIP_SIZE=10,this.visual=Le.createGroup(),this.visual.appendChild(Le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Z.prototype.ownsTarget=function(M){return M===this.visual||M===this.visual.childNodes[0]||M===this.visual.childNodes[1]},Z}(),ft=function(){function Z(){}return Z.toITransformMatrix=function(M){return{a:M.a,b:M.b,c:M.c,d:M.d,e:M.e,f:M.f}},Z.toSVGMatrix=function(M,P){return M.a=P.a,M.b=P.b,M.c=P.c,M.d=P.d,M.e=P.e,M.f=P.f,M},Z}(),vt=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.left=0,ee.top=0,ee.width=0,ee.height=0,ee.defaultSize={x:50,y:20},ee.offsetX=0,ee.offsetY=0,ee.rotationAngle=0,ee.CB_DISTANCE=10,ee._suppressMarkerCreateEvent=!1,ee.container.transform.baseVal.appendItem(Le.createTransform()),ee.setupControlBox(),ee}return Be(M,Z),Object.defineProperty(M.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"visual",{get:function(){return this._visual},set:function(P){this._visual=P;var $=Le.createTransform();this._visual.transform.baseVal.appendItem($)},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(P){return!!Z.prototype.ownsTarget.call(this,P)||!!(this.controlGrips.findGripByVisual(P)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(P))},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="new"&&(this.left=P.x,this.top=P.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ne=this.unrotatePoint(P);if(this.manipulationStartX=ne.x,this.manipulationStartY=ne.y,this.offsetX=ne.x-this.left,this.offsetY=ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($)){this.activeGrip=this.rotatorGrip;var ee=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ee.x-this.width/2,this.top=ee.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var je=this.container.transform.baseVal.getItem(0);je.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(je,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},M.prototype.pointerUp=function(P){var $=this.state;Z.prototype.pointerUp.call(this,P),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(P),this._state="select",$==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},M.prototype.moveVisual=function(P){this.visual.style.transform="translate("+P.x+"px, "+P.y+"px)"},M.prototype.manipulate=function(P){var $=this.unrotatePoint(P);this.state==="creating"?this.resize(P):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(P)},M.prototype.resize=function(P){var $=this.manipulationStartLeft,ne=this.manipulationStartWidth,ee=this.manipulationStartTop,je=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$=this.manipulationStartLeft+P.x-this.manipulationStartX,ne=this.manipulationStartWidth+this.manipulationStartLeft-$;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ne=this.manipulationStartWidth+P.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ee=this.manipulationStartTop+P.y-this.manipulationStartY,je=this.manipulationStartHeight+this.manipulationStartTop-ee;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:je=this.manipulationStartHeight+P.y-this.manipulationStartY}ne>=0?(this.left=$,this.width=ne):(this.left=$+ne,this.width=-ne),je>=0?(this.top=ee,this.height=je):(this.top=ee+je,this.height=-je),this.setSize()},M.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},M.prototype.rotate=function(P){if(Math.abs(P.x-this.centerX)>.1){var $=Math.sign(P.x-this.centerX);this.rotationAngle=180*Math.atan((P.y-this.centerY)/(P.x-this.centerX))/Math.PI+90*$,this.applyRotation()}},M.prototype.applyRotation=function(){var P=this.container.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(P,0)},M.prototype.rotatePoint=function(P){if(this.rotationAngle===0)return P;var $=this.container.getCTM(),ne=Le.createPoint(P.x,P.y);return{x:(ne=ne.matrixTransform($)).x,y:ne.y}},M.prototype.unrotatePoint=function(P){if(this.rotationAngle===0)return P;var $=this.container.getCTM();$=$.inverse();var ne=Le.createPoint(P.x,P.y);return{x:(ne=ne.matrixTransform($)).x,y:ne.y}},M.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},M.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},M.prototype.setupControlBox=function(){this.controlBox=Le.createGroup();var P=Le.createTransform();P.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(P),this.container.appendChild(this.controlBox),this.controlRect=Le.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=Le.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 ke,this.addControlGrips(),this.controlBox.style.display="none"},M.prototype.adjustControlBox=function(){var P=this.controlBox.transform.baseVal.getItem(0);P.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(P,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()},M.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()},M.prototype.createGrip=function(){var P=new ht;return P.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(P.visual),P},M.prototype.positionGrips=function(){var P=this.controlGrips.topLeft.GRIP_SIZE,$=-P/2,ne=$,ee=(this.width+this.CB_DISTANCE)/2-P/2,je=(this.height+this.CB_DISTANCE)/2-P/2,Ct=this.height+this.CB_DISTANCE-P/2,Ft=this.width+this.CB_DISTANCE-P/2;this.positionGrip(this.controlGrips.topLeft.visual,$,ne),this.positionGrip(this.controlGrips.topCenter.visual,ee,ne),this.positionGrip(this.controlGrips.topRight.visual,Ft,ne),this.positionGrip(this.controlGrips.centerLeft.visual,$,je),this.positionGrip(this.controlGrips.centerRight.visual,Ft,je),this.positionGrip(this.controlGrips.bottomLeft.visual,$,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,ee,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Ft,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ee,ne-3*this.CB_DISTANCE)},M.prototype.positionGrip=function(P,$,ne){var ee=P.transform.baseVal.getItem(0);ee.setTranslate($,ne),P.transform.baseVal.replaceItem(ee,0)},M.prototype.hideControlBox=function(){this.controlBox.style.display="none"},M.prototype.showControlBox=function(){this.controlBox.style.display=""},M.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Z.prototype.getState.call(this))},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P);var $=P;this.left=$.left,this.top=$.top,this.width=$.width,this.height=$.height,this.rotationAngle=$.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$.containerTransformMatrix))},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$);var ne=this.rotatePoint({x:this.left,y:this.top}),ee=this.unrotatePoint({x:ne.x*P,y:ne.y*$});this.left=ee.x,this.top=ee.y,this.width=this.width*P,this.height=this.height*$,this.adjustControlBox()},M}(Re),yt=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.fillColor="transparent",ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.opacity=1,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setFillColor=ee.setFillColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.createVisual=ee.createVisual.bind(ee),ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.visual)},M.prototype.createVisual=function(){this.visual=Le.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)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},M.prototype.manipulate=function(P){Z.prototype.manipulate.call(this,P)},M.prototype.resize=function(P){Z.prototype.resize.call(this,P),this.setSize()},M.prototype.setSize=function(){Z.prototype.setSize.call(this),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},M.prototype.pointerUp=function(P){Z.prototype.pointerUp.call(this,P),this.setSize()},M.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},M.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},M.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},M.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},M.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))},M.prototype.restoreState=function(P){var $=P;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),Z.prototype.restoreState.call(this,P),this.setSize()},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.setSize()},M.title="Rectangle marker",M}(vt),Lt=function(Z){function M(P,$,ne,ee){var je=Z.call(this,P,ee||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return je.widths=[],je.widthBoxes=[],je.widths=$,je.currentWidth=ne,je.setCurrentWidth=je.setCurrentWidth.bind(je),je}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.widths.forEach(function(ne){var ee=document.createElement("div");ee.style.display="flex",ee.style.flexGrow="2",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=ne===P.currentWidth?P.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){P.setCurrentWidth(ne,ee)}),$.appendChild(ee);var je=document.createElement("div");je.innerText=ne.toString(),je.style.marginRight="5px",ee.appendChild(je);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Ft=document.createElement("hr");Ft.style.minWidth="20px",Ft.style.border="0px",Ft.style.borderTop=ne+"px solid "+P.uiStyleSettings.toolboxColor,Ft.style.flexGrow="2",Ct.appendChild(Ft),ee.appendChild(Ct),P.widthBoxes.push(ee)}),$},M.prototype.setCurrentWidth=function(P,$){var ne=this;this.currentWidth=P,this.widthBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},M}(ce),Mt=function(Z){function M(P,$,ne,ee){var je=Z.call(this,P,ee||'<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 je.styles=[],je.styleBoxes=[],je.styles=$,je.currentStyle=ne,je.setCurrentStyle=je.setCurrentStyle.bind(je),je}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.styles.forEach(function(ne){var ee=document.createElement("div");ee.style.display="flex",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.overflow="hidden",ee.style.maxWidth=100/P.styles.length-5+"%",ee.style.borderColor=ne===P.currentStyle?P.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){P.setCurrentStyle(ne,ee)}),$.appendChild(ee);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.overflow="hidden";var Ct=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+P.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ne!==""?'stroke-dasharray="'+ne+'"':"")+` />
|
|
</svg>`;je.innerHTML=Ct,ee.appendChild(je),P.styleBoxes.push(ee)}),$},M.prototype.setCurrentStyle=function(P,$){var ne=this;this.currentStyle=P,this.styleBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},M}(ce),Qe=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.strokeColor=ne.defaultColor,ee.strokeWidth=ne.defaultStrokeWidth,ee.strokeDasharray=ne.defaultStrokeDasharray,ee.strokePanel=new we("Line color",ne.defaultColorSet,ne.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new Lt("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new Mt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return Be(M,Z),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Z.prototype.getState.call(this);return P.typeName=M.typeName,P},M.typeName="FrameMarker",M.title="Frame marker",M.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',M}(yt),Pe=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},lt=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.x1=0,ee.y1=0,ee.x2=0,ee.y2=0,ee.defaultLength=50,ee.manipulationStartX=0,ee.manipulationStartY=0,ee.manipulationStartX1=0,ee.manipulationStartY1=0,ee.manipulationStartX2=0,ee.manipulationStartY2=0,ee.setupControlBox(),ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!!Z.prototype.ownsTarget.call(this,P)||!(!this.grip1.ownsTarget(P)&&!this.grip2.ownsTarget(P))},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.manipulationStartX=P.x,this.manipulationStartY=P.y,this.state==="new"&&(this.x1=P.x,this.y1=P.y,this.x2=P.x,this.y2=P.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")},M.prototype.pointerUp=function(P){var $=this.state;Z.prototype.pointerUp.call(this,P),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(P),this._state="select",$==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},M.prototype.adjustVisual=function(){},M.prototype.manipulate=function(P){this.state==="creating"?this.resize(P):this.state==="move"?(this.x1=this.manipulationStartX1+P.x-this.manipulationStartX,this.y1=this.manipulationStartY1+P.y-this.manipulationStartY,this.x2=this.manipulationStartX2+P.x-this.manipulationStartX,this.y2=this.manipulationStartY2+P.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(P)},M.prototype.resize=function(P){switch(this.activeGrip){case this.grip1:this.x1=P.x,this.y1=P.y;break;case this.grip2:case void 0:this.x2=P.x,this.y2=P.y}this.adjustVisual(),this.adjustControlBox()},M.prototype.select=function(){Z.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},M.prototype.deselect=function(){Z.prototype.deselect.call(this),this.controlBox.style.display="none"},M.prototype.setupControlBox=function(){this.controlBox=Le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},M.prototype.adjustControlBox=function(){this.positionGrips()},M.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},M.prototype.createGrip=function(){var P=new ht;return P.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(P.visual),P},M.prototype.positionGrips=function(){var P=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-P/2,this.y1-P/2),this.positionGrip(this.grip2.visual,this.x2-P/2,this.y2-P/2)},M.prototype.positionGrip=function(P,$,ne){var ee=P.transform.baseVal.getItem(0);ee.setTranslate($,ne),P.transform.baseVal.replaceItem(ee,0)},M.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Z.prototype.getState.call(this))},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P);var $=P;this.x1=$.x1,this.y1=$.y1,this.x2=$.x2,this.y2=$.y2},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.x1=this.x1*P,this.y1=this.y1*$,this.x2=this.x2*P,this.y2=this.y2*$,this.adjustVisual(),this.adjustControlBox()},M}(Re),pt=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.strokeColor=ne.defaultColor,ee.strokeWidth=ne.defaultStrokeWidth,ee.strokeDasharray=ne.defaultStrokeDasharray,ee.strokePanel=new we("Line color",ne.defaultColorSet,ne.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new Lt("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new Mt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorLine&&P!==this.visibleLine)},M.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorLine=Le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Le.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)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},M.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()),Le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},M.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},M.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},M.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P);var $=P;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.createVisual(),this.adjustVisual()},M.typeName="LineMarker",M.title="Line marker",M.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',M}(lt),Ze=function(Z){function M(P,$,ne,ee){var je=Z.call(this,P,ee||'<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 je.fonts=[],je.fontBoxes=[],je.fonts=$,je.currentFont=ne,je.setCurrentFont=je.setCurrentFont.bind(je),je}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.flexGrow="2",this.fonts.forEach(function(ne){var ee=document.createElement("div");ee.style.display="inline-block",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.overflow="hidden",ee.style.maxWidth=100/P.fonts.length-5+"%",ee.style.borderColor=ne===P.currentFont?P.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){P.setCurrentFont(ne,ee)}),$.appendChild(ee);var je=document.createElement("div");je.style.display="flex",je.style.minHeight="20px",je.style.flexGrow="2",je.style.fontFamily=ne,je.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",je.appendChild(Ct),ee.appendChild(je),P.fontBoxes.push(ee)}),$},M.prototype.setCurrentFont=function(P,$){var ne=this;this.currentFont=P,this.fontBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},M}(ce),st=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.color="transparent",ee.padding=5,ee.DEFAULT_TEXT="your text here",ee.text=ee.DEFAULT_TEXT,ee.isMoved=!1,ee.color=ne.defaultColor,ee.fontFamily=ne.defaultFontFamily,ee.defaultSize={x:100,y:30},ee.setColor=ee.setColor.bind(ee),ee.setFont=ee.setFont.bind(ee),ee.renderText=ee.renderText.bind(ee),ee.sizeText=ee.sizeText.bind(ee),ee.textEditDivClicked=ee.textEditDivClicked.bind(ee),ee.showTextEditor=ee.showTextEditor.bind(ee),ee.setSize=ee.setSize.bind(ee),ee.positionTextEditor=ee.positionTextEditor.bind(ee),ee.colorPanel=new we("Color",ne.defaultColorSet,ne.defaultColor),ee.colorPanel.onColorChanged=ee.setColor,ee.fontFamilyPanel=new Ze("Font",ne.defaultFontFamilies,ne.defaultFontFamily),ee.fontFamilyPanel.onFontChanged=ee.setFont,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){if(Z.prototype.ownsTarget.call(this,P)||P===this.visual||P===this.textElement||P===this.bgRectangle)return!0;var $=!1;return this.textElement.childNodes.forEach(function(ne){ne===P&&($=!0)}),$},M.prototype.createVisual=function(){this.visual=Le.createGroup(),this.bgRectangle=Le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.isMoved=!1,this.pointerDownPoint=P,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},M.prototype.renderText=function(){var P=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($){P.textElement.appendChild(Le.createTSpan($.trim()===""?" ":$.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},M.prototype.getTextScale=function(){var P=this.textElement.getBBox(),$=1;if(P.width>0&&P.height>0){var ne=(1*this.width-this.width*this.padding*2/100)/P.width,ee=(1*this.height-this.height*this.padding*2/100)/P.height;$=Math.min(ne,ee)}return $},M.prototype.getTextPosition=function(P){var $=this.textElement.getBBox(),ne=0,ee=0;return $.width>0&&$.height>0&&(ne=(this.width-$.width*P)/2,ee=this.height/2-$.height*P/2),{x:ne,y:ee}},M.prototype.sizeText=function(){var P=this.textElement.getBBox(),$=this.getTextScale(),ne=this.getTextPosition($);ne.y-=P.y*$,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ne.x+"px, "+ne.y+"px) scale("+$+", "+$+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ne.x,ne.y),this.textElement.transform.baseVal.getItem(1).setScale($,$))},M.prototype.manipulate=function(P){Z.prototype.manipulate.call(this,P),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(P.x-this.pointerDownPoint.x)>5||Math.abs(P.y-this.pointerDownPoint.y)>5)},M.prototype.resize=function(P){Z.prototype.resize.call(this,P),this.isMoved=!0,this.setSize(),this.sizeText()},M.prototype.setSize=function(){Z.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},M.prototype.pointerUp=function(P){var $=this.state;$==="creating"&&(this._suppressMarkerCreateEvent=!0),Z.prototype.pointerUp.call(this,P),this.setSize(),($==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},M.prototype.showTextEditor=function(){var P=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(P.textEditor.style.fontSize);P.textEditor.clientWidth>=Number.parseInt(P.textEditor.style.maxWidth)&&$>.9;)$-=.1,P.textEditor.style.fontSize=Math.max($,.9)+"em"}),this.textEditor.addEventListener("keyup",function($){$.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($){if($.clipboardData){var ne=$.clipboardData.getData("text"),ee=window.getSelection();if(!ee.rangeCount)return!1;ee.deleteFromDocument(),ee.getRangeAt(0).insertNode(document.createTextNode(ne)),$.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){P.textEditDivClicked(P.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},M.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var P=this.getTextScale(),$=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ne=this.textElement.getBBox(),ee={x:ne.width*P,y:ne.height*P};$.x-=ee.x/2,$.y-=ee.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*P,12)+"px",this.textElement.style.display="none"}},M.prototype.textEditDivClicked=function(P){this.text=P.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},M.prototype.select=function(){Z.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},M.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Z.prototype.deselect.call(this)},M.prototype.dblClick=function(P,$){Z.prototype.dblClick.call(this,P,$),this.showTextEditor()},M.prototype.setColor=function(P){this.textElement&&Le.setAttributes(this.textElement,[["fill",P]]),this.color=P,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(P)},M.prototype.setFont=function(P){this.textElement&&Le.setAttributes(this.textElement,[["font-family",P]]),this.fontFamily=P,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},M.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},M.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){var $=P;this.color=$.color,this.fontFamily=$.fontFamily,this.padding=$.padding,this.text=$.text,this.createVisual(),Z.prototype.restoreState.call(this,P),this.setSize()},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.setSize(),this.sizeText(),this.positionTextEditor()},M.typeName="TextMarker",M.title="Text marker",M.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>',M}(vt),Ke=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.color="transparent",ee.lineWidth=3,ee.drawing=!1,ee.pixelRatio=1,ee.color=ne.defaultColor,ee.lineWidth=ne.defaultStrokeWidth,ee.pixelRatio=ne.freehandPixelRatio,ee.setColor=ee.setColor.bind(ee),ee.addCanvas=ee.addCanvas.bind(ee),ee.finishCreation=ee.finishCreation.bind(ee),ee.setLineWidth=ee.setLineWidth.bind(ee),ee.colorPanel=new we("Color",ne.defaultColorSet,ne.defaultColor),ee.colorPanel.onColorChanged=ee.setColor,ee.lineWidthPanel=new Lt("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),ee.lineWidthPanel.onWidthChanged=ee.setLineWidth,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.drawingImage)},M.prototype.createVisual=function(){this.visual=Le.createGroup(),this.drawingImage=Le.createImage(),this.visual.appendChild(this.drawingImage);var P=Le.createTransform();this.visual.transform.baseVal.appendItem(P),this.addMarkerVisualToContainer(this.visual)},M.prototype.pointerDown=function(P,$){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(P.x,P.y),this.drawing=!0):Z.prototype.pointerDown.call(this,P,$)},M.prototype.manipulate=function(P){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(P.x,P.y),this.canvasContext.stroke()):Z.prototype.manipulate.call(this,P)},M.prototype.resize=function(P){Z.prototype.resize.call(this,P),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},M.prototype.pointerUp=function(P){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Z.prototype.pointerUp.call(this,P)},M.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)},M.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.select.call(this)},M.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Z.prototype.deselect.call(this)},M.prototype.finishCreation=function(){for(var P=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ne=$[0],ee=$[1],je=$[2],Ct=$[3],Ft=!1,kt=0;kt<this.canvasElement.height;kt++)for(var bt=0;bt<this.canvasElement.width;bt++)P.data[kt*this.canvasElement.width*4+4*bt+3]>0&&(Ft=!0,kt<ee&&(ee=kt),bt<ne&&(ne=bt),kt>Ct&&(Ct=kt),bt>je&&(je=bt));if(Ft){this.left=ne/this.pixelRatio,this.top=ee/this.pixelRatio,this.width=(je-ne)/this.pixelRatio,this.height=(Ct-ee)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=je-ne,Yt.height=Ct-ee,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(ne,ee,je-ne,Ct-ee),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},M.prototype.setDrawingImage=function(){Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},M.prototype.setColor=function(P){this.color=P,this.colorChanged(P)},M.prototype.setLineWidth=function(P){this.lineWidth=P},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({drawingImgUrl:this.drawingImgUrl},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){this.createVisual(),Z.prototype.restoreState.call(this,P),this.drawingImgUrl=P.drawingImgUrl,this.setDrawingImage()},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.setDrawingImage()},M.typeName="FreehandMarker",M.title="Freehand marker",M.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>',M}(vt),Ie=function(Z){function M(P,$,ne){var ee=Z.call(this,P,ne||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ee.typeBoxes=[],ee.currentType=$,ee.setCurrentType=ee.setCurrentType.bind(ee),ee}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");$.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2";for(var ne=function(Ct){var Ft="both";switch(Ct){case 0:Ft="both";break;case 1:Ft="start";break;case 2:Ft="end";break;case 3:Ft="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Ft===ee.currentType?ee.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){P.setCurrentType(Ft,kt)}),$.appendChild(kt),Ft==="both"||Ft==="start"){var bt=document.createElement("div");bt.style.display="flex",bt.style.alignItems="center",bt.style.minHeight="20px",bt.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="`+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,bt.style.marginLeft="5px",kt.appendChild(bt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var zt=document.createElement("hr");if(zt.style.minWidth="20px",zt.style.border="0px",zt.style.borderTop="3px solid "+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee"),zt.style.flexGrow="2",Yt.appendChild(zt),kt.appendChild(Yt),Ft==="both"||Ft==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.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="`+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,$t.style.marginRight="5px",kt.appendChild($t)}ee.typeBoxes.push(kt)},ee=this,je=0;je<4;je++)ne(je);return $},M.prototype.setCurrentType=function(P,$){var ne=this;this.currentType=P,this.typeBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},M}(ce),Me=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.arrowType="end",ee.arrowBaseHeight=10,ee.arrowBaseWidth=10,ee.getArrowPoints=ee.getArrowPoints.bind(ee),ee.setArrowType=ee.setArrowType.bind(ee),ee.arrowTypePanel=new Ie("Arrow type","end"),ee.arrowTypePanel.onArrowTypeChanged=ee.setArrowType,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.arrow1&&P!==this.arrow2)},M.prototype.getArrowPoints=function(P,$){var ne=this.arrowBaseWidth+2*this.strokeWidth,ee=this.arrowBaseHeight+2*this.strokeWidth;return P-ne/2+","+($+ee/2)+" "+P+","+($-ee/2)+" "+(P+ne/2)+","+($+ee/2)},M.prototype.createTips=function(){this.arrow1=Le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow2)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="creating"&&this.createTips()},M.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",Le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var P=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(P,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($,0);var ne=this.arrow2.transform.baseVal.getItem(0);ne.setRotate(P+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ne,0)}},M.prototype.setArrowType=function(P){this.arrowType=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({arrowType:this.arrowType},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P);var $=P;this.arrowType=$.arrowType,this.createTips(),this.adjustVisual()},M.typeName="ArrowMarker",M.title="Arrow marker",M.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',M}(pt),pe=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.fillColor=ne.defaultFillColor,ee.strokeWidth=0,ee.fillPanel=new we("Color",ne.defaultColorSet,ne.defaultFillColor),ee.fillPanel.onColorChanged=ee.setFillColor,ee}return Be(M,Z),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Z.prototype.getState.call(this);return P.typeName=M.typeName,P},M.typeName="CoverMarker",M.title="Cover marker",M.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',M}(yt),be=function(Z){function M(P,$,ne,ee){var je=Z.call(this,P,ee||'<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 je.opacities=[],je.opacityBoxes=[],je.opacities=$,je.currentOpacity=ne,je.setCurrentOpacity=je.setCurrentOpacity.bind(je),je}return Be(M,Z),M.prototype.getUi=function(){var P=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",$.style.justifyContent="space-between",this.opacities.forEach(function(ne){var ee=document.createElement("div");ee.style.display="flex",ee.style.alignItems="center",ee.style.justifyContent="center",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=ne===P.currentOpacity?P.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){P.setCurrentOpacity(ne,ee)}),$.appendChild(ee);var je=document.createElement("div");je.innerText=100*ne+"%",ee.appendChild(je),P.opacityBoxes.push(ee)}),$},M.prototype.setCurrentOpacity=function(P,$){var ne=this;this.currentOpacity=P,this.opacityBoxes.forEach(function(ee){ee.style.borderColor=ee===$?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},M}(ce),ge=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.setOpacity=ee.setOpacity.bind(ee),ee.fillColor=ne.defaultHighlightColor,ee.strokeWidth=0,ee.opacity=ne.defaultHighlightOpacity,ee.fillPanel=new we("Color",ne.defaultColorSet,ee.fillColor),ee.fillPanel.onColorChanged=ee.setFillColor,ee.opacityPanel=new be("Opacity",ne.defaultOpacitySteps,ee.opacity),ee.opacityPanel.onOpacityChanged=ee.setOpacity,ee}return Be(M,Z),M.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Z.prototype.getState.call(this);return P.typeName=M.typeName,P},M.typeName="HighlightMarker",M.title="Highlight marker",M.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>',M}(pe),Ce='<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>',We=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.bgColor="transparent",ee.tipPosition={x:0,y:0},ee.tipBase1Position={x:0,y:0},ee.tipBase2Position={x:0,y:0},ee.tipMoving=!1,ee.color=ne.defaultStrokeColor,ee.bgColor=ne.defaultFillColor,ee.fontFamily=ne.defaultFontFamily,ee.defaultSize={x:100,y:30},ee.setBgColor=ee.setBgColor.bind(ee),ee.getTipPoints=ee.getTipPoints.bind(ee),ee.positionTip=ee.positionTip.bind(ee),ee.setTipPoints=ee.setTipPoints.bind(ee),ee.colorPanel=new we("Text color",ne.defaultColorSet,ee.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>'),ee.colorPanel.onColorChanged=ee.setColor,ee.bgColorPanel=new we("Fill color",ne.defaultColorSet,ee.bgColor,Ce),ee.bgColorPanel.onColorChanged=ee.setBgColor,ee.fontFamilyPanel=new Ze("Font",ne.defaultFontFamilies,ne.defaultFontFamily),ee.fontFamilyPanel.onFontChanged=ee.setFont,ee.tipGrip=new ht,ee.tipGrip.visual.transform.baseVal.appendItem(Le.createTransform()),ee.controlBox.appendChild(ee.tipGrip.visual),ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return Z.prototype.ownsTarget.call(this,P)||this.tipGrip.ownsTarget(P)||this.tip===P},M.prototype.createTip=function(){Le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},M.prototype.pointerDown=function(P,$){this.state==="new"&&Z.prototype.pointerDown.call(this,P,$),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Z.prototype.pointerDown.call(this,P,$)},M.prototype.pointerUp=function(P){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Z.prototype.pointerUp.call(this,P);else{var $=this.state==="creating";Z.prototype.pointerUp.call(this,P),this.setTipPoints($),this.positionTip()}},M.prototype.manipulate=function(P){if(this.tipMoving){var $=this.unrotatePoint(P);this.tipPosition={x:$.x-this.manipulationStartLeft,y:$.y-this.manipulationStartTop},this.positionTip()}else Z.prototype.manipulate.call(this,P)},M.prototype.setBgColor=function(P){this.bgRectangle&&this.tip&&(Le.setAttributes(this.bgRectangle,[["fill",P]]),Le.setAttributes(this.tip,[["fill",P]])),this.bgColor=P,this.fillColorChanged(P)},M.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},M.prototype.setTipPoints=function(P){P===void 0&&(P=!1);var $=Math.min(this.height/2,15),ne=this.height/5;P&&(this.tipPosition={x:$+ne/2,y:this.height+20});var ee=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ee<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ne=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:0},this.tipBase2Position={x:$+ne,y:0}):(this.tipBase1Position={x:0,y:$},this.tipBase2Position={x:0,y:$+ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ee<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ne=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-ne,y:0},this.tipBase2Position={x:this.width-$,y:0}):(this.tipBase1Position={x:this.width,y:$},this.tipBase2Position={x:this.width,y:$+ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ee<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ne=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-ne,y:this.height},this.tipBase2Position={x:this.width-$,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$-ne},this.tipBase2Position={x:this.width,y:this.height-$}):ee<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ne=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:this.height},this.tipBase2Position={x:$+ne,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$},this.tipBase2Position={x:0,y:this.height-$-ne})},M.prototype.resize=function(P){Z.prototype.resize.call(this,P),this.positionTip()},M.prototype.positionTip=function(){Le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var P=this.tipGrip.visual.transform.baseVal.getItem(0);P.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(P,0)},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),M.prototype.select=function(){this.positionTip(),Z.prototype.select.call(this)},M.prototype.getState=function(){var P=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){var $=P;this.bgColor=$.bgColor,this.tipPosition=$.tipPosition,Z.prototype.restoreState.call(this,P),this.createTip(),this.setTipPoints()},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.tipPosition={x:this.tipPosition.x*P,y:this.tipPosition.y*$},this.positionTip()},M.typeName="CalloutMarker",M.title="Callout marker",M.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>',M}(st),Ne=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.fillColor="transparent",ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.opacity=1,ee.strokeColor=ne.defaultColor,ee.strokeWidth=ne.defaultStrokeWidth,ee.strokeDasharray=ne.defaultStrokeDasharray,ee.fillColor=ne.defaultFillColor,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setFillColor=ee.setFillColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.setOpacity=ee.setOpacity.bind(ee),ee.createVisual=ee.createVisual.bind(ee),ee.strokePanel=new we("Line color",_e(ne.defaultColorSet,["transparent"]),ne.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.fillPanel=new we("Fill color",_e(ne.defaultColorSet,["transparent"]),ee.fillColor,Ce),ee.fillPanel.onColorChanged=ee.setFillColor,ee.strokeWidthPanel=new Lt("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new Mt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee.opacityPanel=new be("Opacity",ne.defaultOpacitySteps,ee.opacity),ee.opacityPanel.onOpacityChanged=ee.setOpacity,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.visual)},M.prototype.createVisual=function(){this.visual=Le.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)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},M.prototype.manipulate=function(P){Z.prototype.manipulate.call(this,P)},M.prototype.resize=function(P){Z.prototype.resize.call(this,P),this.setSize()},M.prototype.setSize=function(){Z.prototype.setSize.call(this),Le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},M.prototype.pointerUp=function(P){Z.prototype.pointerUp.call(this,P),this.setSize()},M.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},M.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(P),this.stateChanged()},M.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},M.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},M.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){var $=P;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),Z.prototype.restoreState.call(this,P),this.setSize()},M.prototype.scale=function(P,$){Z.prototype.scale.call(this,P,$),this.setSize()},M.typeName="EllipseMarker",M.title="Ellipse marker",M.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>',M}(vt),ut=function(Z){function M(P,$,ne){return Z.call(this,P,$,ne)||this}return Be(M,Z),Object.defineProperty(M.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.tip1&&P!==this.tip2)},M.prototype.createTips=function(){this.tip1=Le.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(Le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Le.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(Le.createTransform()),this.visual.appendChild(this.tip2)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.state==="creating"&&this.createTips()},M.prototype.adjustVisual=function(){if(Z.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Le.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()]]),Le.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 P=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(P,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($,0);var ne=this.tip2.transform.baseVal.getItem(0);ne.setRotate(P+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ne,0)}},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Z.prototype.getState.call(this);return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P),this.createTips(),this.adjustVisual()},M.typeName="MeasurementMarker",M.title="Measurement marker",M.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>',M}(pt),Tt=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.strokePanel.colors=ne.defaultColorSet,ee.fillColor="transparent",ee}return Be(M,Z),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Z.prototype.getState.call(this);return P.typeName=M.typeName,P},M.typeName="EllipseFrameMarker",M.title="Ellipse frame marker",M.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>',M}(Ne),Ut=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(M){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(M)||(this.undoStack.push(M),JSON.stringify(this.lastRedoStep)!==JSON.stringify(M)&&this.redoStack.splice(0,this.redoStack.length))},Z.prototype.replaceLastUndoStep=function(M){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=M)},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 M=this.undoStack.pop();return M!==void 0&&this.redoStack.push(M),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}(),St=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$,ne)||this;return ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.curveX=0,ee.curveY=0,ee.manipulationStartCurveX=0,ee.manipulationStartCurveY=0,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.positionGrips=ee.positionGrips.bind(ee),ee.addControlGrips=ee.addControlGrips.bind(ee),ee.adjustVisual=ee.adjustVisual.bind(ee),ee.setupControlBox=ee.setupControlBox.bind(ee),ee.resize=ee.resize.bind(ee),ee.strokeColor=ne.defaultColor,ee.strokeWidth=ne.defaultStrokeWidth,ee.strokeDasharray=ne.defaultStrokeDasharray,ee.strokePanel=new we("Line color",ne.defaultColorSet,ne.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new Lt("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new Mt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return Be(M,Z),M.prototype.ownsTarget=function(P){return!(!Z.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorCurve&&P!==this.visibleCurve&&!this.curveGrip.ownsTarget(P))},M.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},M.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorCurve=Le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Le.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)},M.prototype.pointerDown=function(P,$){Z.prototype.pointerDown.call(this,P,$),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=P.x,this.curveY=P.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($)&&(this.activeGrip=this.curveGrip,this._state="resize")},M.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},M.prototype.setupControlBox=function(){Z.prototype.setupControlBox.call(this),this.curveControlLine1=Le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Le.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)},M.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Z.prototype.addControlGrips.call(this)},M.prototype.positionGrips=function(){Z.prototype.positionGrips.call(this);var P=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-P/2,this.curveY-P/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()))},M.prototype.manipulate=function(P){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+P.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+P.y-this.manipulationStartY),Z.prototype.manipulate.call(this,P)},M.prototype.resize=function(P){this.activeGrip===this.curveGrip&&(this.curveX=P.x,this.curveY=P.y),Z.prototype.resize.call(this,P),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},M.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},M.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},M.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual()},M.prototype.scale=function(P,$){this.curveX=this.curveX*P,this.curveY=this.curveY*$,Z.prototype.scale.call(this,P,$)},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Z.prototype.getState.call(this));return P.typeName=M.typeName,P},M.prototype.restoreState=function(P){Z.prototype.restoreState.call(this,P);var $=P;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.curveX=$.curveX,this.curveY=$.curveY,this.createVisual(),this.adjustVisual()},M.typeName="CurveMarker",M.title="Curve marker",M.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>',M}(lt),_t=function(){function Z(M,P){P===void 0&&(P=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=M,this.cancelable=P}return Object.defineProperty(Z.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Z.prototype.preventDefault=function(){this._defaultPrevented=!0},Z}(),At=function(Z){function M(P,$,ne){var ee=Z.call(this,P,!1)||this;return ee.dataUrl=$,ee.state=ne,ee}return Be(M,Z),M}(_t),nt=function(Z){function M(P,$,ne){ne===void 0&&(ne=!1);var ee=Z.call(this,P,ne)||this;return ee.marker=$,ee}return Be(M,Z),M}(_t),rt=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(M,P){this[M].push(P)},Z.prototype.removeEventListener=function(M,P){var $=this[M].indexOf(P);$>-1&&this[M].splice($,1)},Z}(),xe=function(){function Z(M){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Pe,this._isOpen=!1,this.undoRedoManager=new Ut,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 rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Z.instanceCounter++,this.styles=new He(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=M,this.targetRoot=document.body,this.width=M.clientWidth,this.height=M.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[Qe,Ke,Me,st,Tt,Ne,ge,We,ut,pe,pt,St]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,Ke,Me,st,Ne,ge,We]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,Ke,Me,st,ge]},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(M){var P=this;this._availableMarkerTypes.splice(0),M.forEach(function($){if(typeof $=="string"){var ne=P.ALL_MARKER_TYPES.find(function(ee){return ee.typeName===$});ne!==void 0&&P._availableMarkerTypes.push(ne)}else P._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(M){this._zoomLevel=M,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(),tt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Z.prototype.show=function(){var M=this;this.styles.styleSheetRoot===void 0&&Oe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Oe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(P){return P(new _t(M))})},Z.prototype.render=function(){return De(this,void 0,void 0,function(){var M;return Ve(this,function(P){switch(P.label){case 0:return this.setCurrentMarker(),(M=new Et).naturalSize=this.renderAtNaturalSize,M.imageType=this.renderImageType,M.imageQuality=this.renderImageQuality,M.markersOnly=this.renderMarkersOnly,M.width=this.renderWidth,M.height=this.renderHeight,[4,M.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return P.sent(),[4,M.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,P.sent()]}})})},Z.prototype.close=function(M){var P=this;if(M===void 0&&(M=!1),this.isOpen){var $=!1;M||this.eventListeners.beforeclose.forEach(function(ne){var ee=new _t(P,!0);ne(ee),ee.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(ne){return ne(new _t(P))}),this.detachEvents(),this._isOpen=!1)}},Z.prototype.addMarkersToToolbar=function(){for(var M,P=[],$=0;$<arguments.length;$++)P[$]=arguments[$];(M=this._availableMarkerTypes).push.apply(M,P)},Z.prototype.addRenderEventListener=function(M){this.addEventListener("render",function(P){M(P.dataUrl,P.state)})},Z.prototype.removeRenderEventListener=function(M){},Z.prototype.addCloseEventListener=function(M){this.addEventListener("close",function(){M()})},Z.prototype.removeCloseEventListener=function(M){},Z.prototype.setupResizeObserver=function(){var M=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){M.resize(M.target.clientWidth,M.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return M.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Z.prototype.onPopupTargetResize=function(){var M=1*this.target.clientWidth/this.target.clientHeight,P=this.editorCanvas.clientWidth/M>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*M:this.editorCanvas.clientWidth,$=P<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/M;this.resize(P,$)},Z.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Z.prototype.resize=function(M,P){this._isResizing=!0;var $=M/this.imageWidth,ne=P/this.imageHeight;this.imageWidth=Math.round(M),this.imageHeight=Math.round(P),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($,ne),this._isResizing=!1},Z.prototype.scaleMarkers=function(M,P){var $,ne=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(M,P):($=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ee){ee!==ne._currentMarker&&ee.scale(M,P)}),$!==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 M=this.editingTarget.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=M.left-P.left,this.top=M.top-P.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 M,P=[],$=0;$<arguments.length;$++)P[$]=arguments[$];this.defs=Le.createDefs(),this.addDefsToImage(),(M=this.defs).append.apply(M,P)},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 M=document.createElement("a");M.href="https://markerjs.com/",M.target="_blank",M.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>',M.title="Powered by marker.js",M.style.display="grid",M.style.alignItems="center",M.style.justifyItems="center",M.style.padding="3px",M.style.width="20px",M.style.height="20px",this.logoUI.appendChild(M),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 M=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=M+"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 re(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 ae(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(M){this.markerImage.removeChild(M.container),this.markers.indexOf(M)>-1&&this.markers.splice(this.markers.indexOf(M),1),M.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(M,P){if(M==="marker"&&P!==void 0)this.createNewMarker(P);else if(M==="action")switch(P){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 M=this;if(this._currentMarker!==void 0){var P=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ne){var ee=new nt(M,M._currentMarker,!0);ne(ee),ee.defaultPrevented&&(P=!0)}),!P){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(ne){return ne(new nt(M,$))})}}},Z.prototype.clear=function(){var M=this,P=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(je){var Ct=new nt(M,void 0,!0);je(Ct),Ct.defaultPrevented&&(P=!0)}),!P)){this.setCurrentMarker();for(var $=function(je){var Ct=ne.markers[je];ne.setCurrentMarker(ne.markers[je]),ne._currentMarker.dispose(),ne.markerImage.removeChild(ne._currentMarker.container),ne.markers.splice(ne.markers.indexOf(ne._currentMarker),1),ne.eventListeners.markerdelete.forEach(function(Ft){return Ft(new nt(M,Ct))})},ne=this,ee=this.markers.length-1;ee>=0;ee--)$(ee);this.addUndoStep()}},Object.defineProperty(Z.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Z.prototype.showNotesEditor=function(){var M;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=(M=this._currentMarker.notes)!==null&&M!==void 0?M:"",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 M=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var P=this.getState(),$=this.undoRedoManager.getLastUndoStep();if(!$||$.width===P.width&&$.height===P.height){var ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(P),ne<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ee){return ee(new _t(M))})}else this.undoRedoManager.replaceLastUndoStep(P),this.eventListeners.statechange.forEach(function(ee){return ee(new _t(M))})}},Z.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Z.prototype.undoStep=function(){var M=this,P=this.undoRedoManager.undo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new _t(M))}))},Z.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Z.prototype.redoStep=function(){var M=this,P=this.undoRedoManager.redo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new _t(M))}))},Z.prototype.stepZoom=function(){var M=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=M<this.zoomSteps.length-1?this.zoomSteps[M+1]:this.zoomSteps[0]},Z.prototype.panTo=function(M){this.contentDiv.scrollBy({left:this.prevPanPoint.x-M.x,top:this.prevPanPoint.y-M.y}),this.prevPanPoint=M},Z.prototype.startRenderAndClose=function(){return De(this,void 0,void 0,function(){var M,P,$=this;return Ve(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return M=ne.sent(),P=this.getState(),this.eventListeners.render.forEach(function(ee){return ee(new At($,M,P))}),this.close(!0),[2]}})})},Z.prototype.getState=function(M){M===!0&&this.setCurrentMarker();var P={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($){return P.markers.push($.getState())}),P},Z.prototype.restoreState=function(M){var P=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);M.markers.forEach(function($){var ne=P._availableMarkerTypes.find(function(je){return je.typeName===$.typeName});if(ne!==void 0){var ee=P.addNewMarker(ne);ee.restoreState($),P.markers.push(ee)}}),M.width&&M.height&&(M.width!==this.imageWidth||M.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/M.width,this.imageHeight/M.height),this.eventListeners.restorestate.forEach(function($){return $(new _t(P))})},Z.prototype.addNewMarker=function(M){var P=Le.createGroup();return this.markerImage.appendChild(P),new M(P,this.overlayContainer,this.settings)},Z.prototype.createNewMarker=function(M){var P,$=this;(P=typeof M=="string"?this._availableMarkerTypes.find(function(ne){return ne.typeName===M}):M)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(P),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(P.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ne){return ne(new nt($,$._currentMarker))}))},Z.prototype.markerCreated=function(M){var P=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(M),this.setCurrentMarker(M),M instanceof Ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($){return $(new nt(P,P._currentMarker))})},Z.prototype.colorChanged=function(M){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=M,this.settings.defaultStrokeColor=M)},Z.prototype.fillColorChanged=function(M){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=M)},Z.prototype.markerStateChanged=function(M){var P=this;this.eventListeners.markerchange.forEach(function($){return $(new nt(P,M))})},Z.prototype.setCurrentMarker=function(M){var P=this;this._currentMarker!==M&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($){return $(new nt(P,P._currentMarker))})),this._currentMarker=M,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 nt(P,P._currentMarker))}))},Z.prototype.onPointerDown=function(M){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||M.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var P=this.markers.find(function($){return $.ownsTarget(M.target)});P!==void 0?(this.setCurrentMarker(P),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(M.clientX,M.clientY),M.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:M.clientX,y:M.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(M.clientX,M.clientY))},Z.prototype.onDblClick=function(M){if(this._isFocused||this.focus(),this.mode==="select"){var P=this.markers.find(function($){return $.ownsTarget(M.target)});P!==void 0&&P!==this._currentMarker&&this.setCurrentMarker(P),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(M.clientX,M.clientY),M.target):this.setCurrentMarker()}},Z.prototype.onPointerMove=function(M){this.touchPoints!==1&&M.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||M.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(M.clientX,M.clientY)):this.zoomLevel>1&&this.panTo({x:M.clientX,y:M.clientY}))},Z.prototype.onPointerUp=function(M){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(M.clientX,M.clientY)),this.isDragging=!1,this.addUndoStep()},Z.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Z.prototype.onKeyUp=function(M){this._currentMarker===void 0||this.notesArea!==void 0||M.key!=="Delete"&&M.key!=="Backspace"||this.deleteSelectedMarker()},Z.prototype.clientToLocalCoordinates=function(M,P){var $=this.markerImage.getBoundingClientRect();return{x:(M-$.left)/this.zoomLevel,y:(P-$.top)/this.zoomLevel}},Z.prototype.onWindowResize=function(){this.positionUI()},Z.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var M=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=M+"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(M){tt.addKey(M)},Z.prototype.addEventListener=function(M,P){this.eventListeners.addEventListener(M,P)},Z.prototype.removeEventListener=function(M,P){this.eventListeners.removeEventListener(M,P)},Z.prototype.renderState=function(M){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(M),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Z.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Z.prototype.focus=function(){var M=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(P){return P(new _t(M))}))},Z.prototype.blur=function(){var M=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(P){return P(new _t(M))}))},Z.instanceCounter=0,Z}();/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var Fe=function(Z,M){return(Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,$){P.__proto__=$}||function(P,$){for(var ne in $)Object.prototype.hasOwnProperty.call($,ne)&&(P[ne]=$[ne])})(Z,M)};function dt(Z,M){if(typeof M!="function"&&M!==null)throw new TypeError("Class extends value "+String(M)+" is not a constructor or null");function P(){this.constructor=Z}Fe(Z,M),Z.prototype=M===null?Object.create(M):(P.prototype=M.prototype,new P)}function at(Z,M,P,$){return new(P||(P=Promise))(function(ne,ee){function je(kt){try{Ft($.next(kt))}catch(bt){ee(bt)}}function Ct(kt){try{Ft($.throw(kt))}catch(bt){ee(bt)}}function Ft(kt){var bt;kt.done?ne(kt.value):(bt=kt.value,bt instanceof P?bt:new P(function(Yt){Yt(bt)})).then(je,Ct)}Ft(($=$.apply(Z,M||[])).next())})}function xt(Z,M){var P,$,ne,ee,je={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return ee={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function Ct(Ft){return function(kt){return function(bt){if(P)throw new TypeError("Generator is already executing.");for(;je;)try{if(P=1,$&&(ne=2&bt[0]?$.return:bt[0]?$.throw||((ne=$.return)&&ne.call($),0):$.next)&&!(ne=ne.call($,bt[1])).done)return ne;switch($=0,ne&&(bt=[2&bt[0],ne.value]),bt[0]){case 0:case 1:ne=bt;break;case 4:return je.label++,{value:bt[1],done:!1};case 5:je.label++,$=bt[1],bt=[0];continue;case 7:bt=je.ops.pop(),je.trys.pop();continue;default:if(!(ne=je.trys,(ne=ne.length>0&&ne[ne.length-1])||bt[0]!==6&&bt[0]!==2)){je=0;continue}if(bt[0]===3&&(!ne||bt[1]>ne[0]&&bt[1]<ne[3])){je.label=bt[1];break}if(bt[0]===6&&je.label<ne[1]){je.label=ne[1],ne=bt;break}if(ne&&je.label<ne[2]){je.label=ne[2],je.ops.push(bt);break}ne[2]&&je.ops.pop(),je.trys.pop();continue}bt=M.call(Z,je)}catch(Yt){bt=[6,Yt],$=0}finally{P=ne=0}if(5&bt[0])throw bt[1];return{value:bt[0]?bt[1]:void 0,done:!0}}([Ft,kt])}}}var wt=function(){function Z(){}return Z.addKey=function(M){Z.key=M},Object.defineProperty(Z,"isLicensed",{get:function(){return!!Z.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Z.key)},enumerable:!1,configurable:!0}),Z}(),qe=function(){function Z(){}return Z.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Z.setAttributes=function(M,P){for(var $=0,ne=P;$<ne.length;$++){var ee=ne[$],je=ee[0],Ct=ee[1];M.setAttribute(je,Ct)}},Z.createRect=function(M,P,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return ne.setAttribute("width",M.toString()),ne.setAttribute("height",P.toString()),$&&Z.setAttributes(ne,$),ne},Z.createLine=function(M,P,$,ne,ee){var je=document.createElementNS("http://www.w3.org/2000/svg","line");return je.setAttribute("x1",M.toString()),je.setAttribute("y1",P.toString()),je.setAttribute("x2",$.toString()),je.setAttribute("y2",ne.toString()),ee&&Z.setAttributes(je,ee),je},Z.createPolygon=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $.setAttribute("points",M),P&&Z.setAttributes($,P),$},Z.createCircle=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","circle");return $.setAttribute("cx",(M/2).toString()),$.setAttribute("cy",(M/2).toString()),$.setAttribute("r",M.toString()),P&&Z.setAttributes($,P),$},Z.createEllipse=function(M,P,$){var ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ne.setAttribute("cx",(M/2).toString()),ne.setAttribute("cy",(P/2).toString()),ne.setAttribute("rx",(M/2).toString()),ne.setAttribute("ry",(P/2).toString()),$&&Z.setAttributes(ne,$),ne},Z.createGroup=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return M&&Z.setAttributes(P,M),P},Z.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Z.createMarker=function(M,P,$,ne,ee,je,Ct){var Ft=document.createElementNS("http://www.w3.org/2000/svg","marker");return Z.setAttributes(Ft,[["id",M],["orient",P],["markerWidth",$.toString()],["markerHeight",ne.toString()],["refX",ee.toString()],["refY",je.toString()]]),Ft.appendChild(Ct),Ft},Z.createText=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),M&&Z.setAttributes(P,M),P},Z.createTSpan=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $.textContent=M,P&&Z.setAttributes($,P),$},Z.createImage=function(M){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return M&&Z.setAttributes(P,M),P},Z.createPoint=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $.x=M,$.y=P,$},Z.createPath=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg","path");return $.setAttribute("d",M),P&&Z.setAttributes($,P),$},Z.createElement=function(M,P){var $=document.createElementNS("http://www.w3.org/2000/svg",M);return P&&Z.setAttributes($,P),$},Z.getHollowRectanglePath=function(M,P,$,ne,ee,je,Ct,Ft){return"M"+M+","+P+"V"+(P+ne)+"H"+(M+$)+"V"+P+"H"+ee+"V"+je+"H"+(ee+Ct)+"V"+(je+Ft)+"H"+ee+"V"+P+"Z"},Z}(),Bt=function(){function Z(M){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+M+"_"}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:"#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(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(M){return this.styleSheet===void 0&&this.addStyleSheet(),M.name=""+this.classNamePrefix+M.localName,this.classes.push(M),this.styleSheet.sheet.insertRule("."+M.name+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length),M},Z.prototype.addRule=function(M){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(M),this.styleSheet.sheet.insertRule(M.selector+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length)},Z.prototype.addStyleSheet=function(){var M;this.styleSheet=document.createElement("style"),((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).appendChild(this.styleSheet),this.addRule(new Ht("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ht("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ht("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Nt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Nt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Z.prototype.removeStyleSheet=function(){var M;this.styleSheet&&(((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Z}(),Ht=function(Z,M){this.selector=Z,this.style=M},Nt=function(Z,M){this.localName=Z,this.style=M},Gt=function(){function Z(){this.blocks=[],this.display=""}return Z.prototype.addButtonBlock=function(M){M.className=this.blockClassName,M.buttonClassName=this.buttonClassName,M.buttonColorsClassName=this.buttonColorsClassName,M.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(M)},Z.prototype.addElementBlock=function(M){M.className===void 0&&(M.className=this.blockClassName),this.blocks.push(M)},Z.prototype.getUI=function(){var M=document.createElement("div");return M.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,M.style.display=this.display,this.blocks.forEach(function(P){return M.appendChild(P.getUI())}),M},Z}(),Or=function(){function Z(){}return Z.prototype.getUI=function(){var M=document.createElement("div");if(M.className=this.className,this.minWidth!==void 0&&(M.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":M.style.justifyContent="flex-start";break;case"center":M.style.justifyContent="center";break;case"end":M.style.justifyContent="flex-end"}return M.style.whiteSpace="nowrap",M},Z}(),Pr=function(Z){function M(){var P=Z!==null&&Z.apply(this,arguments)||this;return P.buttons=[],P}return dt(M,Z),M.prototype.addButton=function(P){P.className=this.buttonClassName,P.colorsClassName=this.buttonColorsClassName,P.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(P)},M.prototype.getUI=function(){var P=Z.prototype.getUI.call(this);return this.buttons.forEach(function($){return P.appendChild($.getUI())}),P},M}(Or),yr=function(){function Z(M,P){this._isActive=!1,this._isHidden=!1,this._icon=M,this.title=P,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Z.prototype,"icon",{get:function(){return this._icon},set:function(M){this._icon=M,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isActive",{get:function(){return this._isActive},set:function(M){this._isActive=M,this.adjustClassName()},enumerable:!1,configurable:!0}),Z.prototype.getUI=function(){var M=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 M.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Z.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,"")))},Z.prototype.hide=function(){this._isHidden=!0},Z}(),jt=function(Z){function M(){var P=Z!==null&&Z.apply(this,arguments)||this;return P.elements=[],P}return dt(M,Z),M.prototype.addElement=function(P){this.elements.push(P)},M.prototype.getUI=function(){var P=Z.prototype.getUI.call(this);return this.elements.forEach(function($){return P.appendChild($)}),P},M}(Or),Dr=function(){function Z(M,P){this.horizontal=M,this.vertical=P}return Object.defineProperty(Z.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Z.prototype.getVerticalLength=function(M){return M/this.ratio},Z.prototype.getHorizontalLength=function(M){return M*this.ratio},Z}(),Wr=function(){function Z(){}return Z.getIcon=function(M,P){if(M>0&&P>0){var $=new Dr(M,P),ne=$.ratio>=1?20:$.getHorizontalLength(20),ee=$.ratio<1?20:$.getVerticalLength(20),je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(je);var Ct=qe.createDefs();je.appendChild(Ct);var Ft=qe.createElement("clipPath",[["id","text-bg-clip"]]);Ct.appendChild(Ft);var kt=qe.createPath(qe.getHollowRectanglePath((24-ne)/2,(24-ee)/2,ne,ee,(24-ne)/2+2,(24-ee)/2+2,ne-4,ee-4));je.appendChild(kt);var bt=qe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);bt.appendChild(qe.createTSpan(M+":"+P)),je.appendChild(bt);var Yt=bt.getBBox();qe.setAttributes(bt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var zt=qe.createPath(qe.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return Ft.appendChild(zt),qe.setAttributes(kt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(je),je.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>'},Z}(),Mr=function(Z){function M(P,$,ne){var ee=Z.call(this,P,$)||this;return ee.isDropdownOpen=!1,ee.onClick=ee.dropdownButtonClicked,ee.dropdownButtons=ne,ee}return dt(M,Z),M.prototype.setupDropdown=function(){var P=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function($){$.className=P.className,$.colorsClassName=P.colorsClassName,P.dropdownBlock.appendChild($.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},M.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},M.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},M.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},M.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},M.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},M}(yr),pr=function(){function Z(M,P){this.GRIP_SIZE=10,this.color=M,this.fillColor=P,this.visual=qe.createGroup(),this.visual.appendChild(qe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(qe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Z.prototype.ownsTarget=function(M){return M===this.visual||M===this.visual.childNodes[0]||M===this.visual.childNodes[1]},Z.prototype.setCenter=function(M,P){this.visual.childNodes.forEach(function($){return qe.setAttributes($,[["cx",M.toString()],["cy",P.toString()]])})},Z}(),Sr=function(){function Z(M,P,$,ne){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=M,this.canvasHeight=P,this.margin=$,this.container=ne,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Z.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(M){this._aspectRatio=M,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(M){this._isGridVisible=M,this.gridContainer&&qe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(M){this._zoomFactor=M,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Z.prototype.open=function(){var M=this;this.cropShadeElement=qe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=qe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var P=0;P<this.numberOfGridLines;P++)this.horizontalGridLines.push(qe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(qe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function($){return M.gridContainer.appendChild($)}),this.verticalGridLines.forEach(function($){return M.gridContainer.appendChild($)}),this.cropRectElement=qe.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Z.prototype.setCropRectangle=function(M){this.cropRect=M;var P=Object.assign({},this.cropRect);this.zoomFactor!==1&&(P.width=this.cropRect.width*this.zoomFactor,P.height=this.cropRect.height*this.zoomFactor,P.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-P.width/2,P.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-P.height/2),qe.setAttributes(this.cropRectElement,[["x",P.x.toString()],["y",P.y.toString()],["width",P.width.toString()],["height",P.height.toString()]]);var $=P.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ee,je){var Ct=P.y+$*(je+1);qe.setAttributes(ee,[["x1",""+P.x],["y1",""+Ct],["x2",""+(P.x+P.width)],["y2",""+Ct]])});var ne=P.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ee,je){var Ct=P.x+ne*(je+1);qe.setAttributes(ee,[["x1",""+Ct],["y1",""+P.y],["x2",""+Ct],["y2",""+(P.y+P.height)]])}),qe.setAttributes(this.cropShadeElement,[["d",qe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,P.x,P.y,P.width,P.height)]]),this.topLeftGrip.setCenter(P.x,P.y),this.topRightGrip.setCenter(P.x+P.width,P.y),this.bottomLeftGrip.setCenter(P.x,P.y+P.height),this.bottomRightGrip.setCenter(P.x+P.width,P.y+P.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Z.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Z.prototype.clientToLocalCoordinates=function(M,P){var $=this.container.getBoundingClientRect();return{x:M-$.left+this.margin,y:P-$.top+this.margin}},Z.prototype.onPointerDown=function(M){this.container.setPointerCapture(M.pointerId),this.previousPoint=this.clientToLocalCoordinates(M.clientX,M.clientY),this.cropRectElement===M.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(M.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(M.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(M.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(M.target)&&(this.activeGrip=this.bottomRightGrip)},Z.prototype.onPointerMove=function(M){if(this.isMoving)this.move(this.clientToLocalCoordinates(M.clientX,M.clientY));else if(this.activeGrip){var P=this.clientToLocalCoordinates(M.clientX,M.clientY);this.resize(P)}M.preventDefault()},Z.prototype.onPointerUp=function(M){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(M.pointerId)},Z.prototype.move=function(M){var P=M.x-this.previousPoint.x,$=M.y-this.previousPoint.y;this.zoomFactor!==1&&(P=-P/this.zoomFactor,$=-$/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+P),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+$),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=M},Z.prototype.resize=function(M){var P=Object.assign({},this.cropRect),$=M.x-this.previousPoint.x,ne=M.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:P.x+$<this.margin&&($=this.margin-P.x),P.x+=$,P.width=this.cropRect.x+this.cropRect.width-P.x;break;case this.bottomRightGrip:case this.topRightGrip:P.width+$>this.canvasWidth*this.zoomFactor&&($=this.canvasWidth*this.zoomFactor-P.width),P.width+=$}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(P.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength($),P.height=this.aspectRatio.getVerticalLength(P.width)):(P.y+=ne,P.height=this.cropRect.y+this.cropRect.height-P.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?P.height=this.aspectRatio.getVerticalLength(P.width):P.height+=ne}P.width<10&&(P.x=this.cropRect.x,P.width=10),P.height<10&&(P.y=this.cropRect.y,P.height=10),this.previousPoint=M,P.x>=this.margin&&P.y>=this.margin&&P.x-this.margin+P.width<=this.canvasWidth&&P.y-this.margin+P.height<=this.canvasHeight&&(this.cropRect=P,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Z.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var M=this.cropRect.x+this.cropRect.width/2,P=this.cropRect.y+this.cropRect.height/2,$=this.aspectRatio.getHorizontalLength(this.cropRect.height),ne=this.aspectRatio.getVerticalLength(this.cropRect.width);$/this.canvasWidth<ne/this.canvasHeight?this.cropRect.width=$:this.cropRect.height=ne,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=M-this.cropRect.width/2,this.cropRect.y=P-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Z.prototype.getRescaledRect=function(M,P,$,ne,ee,je){var Ct=$/M,Ft=ne/P;return{x:(ee.x-je)*Ct+je,y:(ee.y-je)*Ft+je,width:ee.width*Ct,height:ee.height*Ft}},Z.prototype.scaleCanvas=function(M,P){var $=this.getRescaledRect(this.canvasWidth,this.canvasHeight,M,P,this.cropRect,this.margin);this.canvasWidth=M,this.canvasHeight=P,this.onCropChange&&this.onCropChange($),this.setCropRectangle($)},Z}(),mn=function(){function Z(M){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=M,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Z.prototype,"angle",{get:function(){return this._angle},set:function(M){this._angle=M,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Z.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Z.prototype.onPointerDown=function(M){this.controlContainer.setPointerCapture(M.pointerId),this.isDragging=!0,this.previousPoint={x:M.clientX,y:M.clientY}},Z.prototype.onPointerMove=function(M){this.isDragging&&(this.onAngleChange&&this.onAngleChange((M.clientX-this.previousPoint.x)/5),this.previousPoint.x=M.clientX)},Z.prototype.onPointerUp=function(M){this.isDragging&&this.onAngleChange&&this.onAngleChange((M.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(M.pointerId)},Z.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var M=this.angleLabelText.getBBox();qe.setAttributes(this.angleLabelElement,[["x",((this.width-M.width)/2).toString()],["y",(this.height/2).toString()]])}},Z.prototype.positionScaleShape=function(){if(this.scaleShape){var M=this.scaleShape.transform.baseVal.getItem(0);M.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(M,0)}},Z.prototype.getVisual=function(){var M=document.createElementNS("http://www.w3.org/2000/svg","svg");M.setAttribute("xmlns","http://www.w3.org/2000/svg"),M.setAttribute("width",this.width+"px"),M.setAttribute("height",this.height+"px"),M.setAttribute("viewBox","0 0 "+this.width+" "+this.height),M.style.flexShrink="0",document.body.appendChild(M);for(var P="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,$=1;$<=this.width/5+10;$++){var ne=$%5==0?this.height/3:this.height/6;P+="h4v"+-ne+"h1v"+ne}P+="v1H0Z",this.scaleShape=qe.createPath(P);var ee=qe.createTransform();this.scaleShape.transform.baseVal.appendItem(ee),M.appendChild(this.scaleShape),this.angleLabelElement=qe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=qe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var je=qe.createTSpan("");return je.innerHTML="°",this.angleLabelElement.appendChild(je),M.appendChild(this.angleLabelElement),document.body.removeChild(M),M},Z}(),on=function(){function Z(){this.naturalSize=!1,this.imageType="image/png"}return Z.prototype.rasterize=function(M,P,$,ne,ee,je,Ct){var Ft=this;return new Promise(function(kt){var bt=document.createElement("canvas");bt.width=M.width.baseVal.value-2*ne,bt.height=M.height.baseVal.value-2*ne;var Yt=1,zt=1;Ft.naturalSize===!0?(Yt=P.naturalWidth/(M.width.baseVal.value-2*ne)/je,zt=P.naturalHeight/(M.height.baseVal.value-2*ne)/Ct,bt.width=P.naturalWidth/je,bt.height=P.naturalHeight/Ct):Ft.width!==void 0&&Ft.height!==void 0&&(Yt=Ft.width/$.width,zt=Ft.height/$.height,bt.width*=Yt,bt.height*=zt);var $t=bt.getContext("2d");$t.translate(bt.width/2,bt.height/2),$t.rotate(ee*Math.PI/180),$t.scale(je,Ct),$t.translate(-bt.width/2,-bt.height/2),$t.drawImage(P,0,0,bt.width,bt.height);var dr=document.createElement("canvas");dr.width=$.width*Yt,dr.height=$.height*zt,dr.getContext("2d").putImageData($t.getImageData(($.x-ne)*Yt,($.y-ne)*zt,$.width*Yt,$.height*zt),0,0),kt(dr.toDataURL(Ft.imageType,Ft.imageQuality))})},Z}(),fe=function(){function Z(M){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Z.instanceCounter++,this.styles=new Bt(this.instanceNo),this.target=M,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Z.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(M){this._zoomToCropEnabled=M,M?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(M){this._isGridVisible=M,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"gridLines",{get:function(){return this._gridLines},set:function(M){this._gridLines=M,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(M){this._rotationAngle=M,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"aspectRatio",{get:function(){var M;return(M=this._aspectRatio)!==null&&M!==void 0?M:this.aspectRatios[0]},set:function(M){this._aspectRatio=M},enumerable:!1,configurable:!0}),Z.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Z.prototype.show=function(){this.showUI(),this.open()},Z.prototype.close=function(M){M===void 0&&(M=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),M||this.closeEventListeners.forEach(function(P){return P()}),this._isOpen=!1)},Z.prototype.addRenderEventListener=function(M){this.renderEventListeners.push(M)},Z.prototype.removeRenderEventListener=function(M){this.renderEventListeners.indexOf(M)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(M),1)},Z.prototype.addCloseEventListener=function(M){this.closeEventListeners.push(M)},Z.prototype.removeCloseEventListener=function(M){this.closeEventListeners.indexOf(M)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(M),1)},Z.prototype.setupResizeObserver=function(){var M=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){M.resize(M.target.clientWidth,M.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Z.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var M=1*this.target.clientWidth/this.target.clientHeight,P=this.contentDiv.clientWidth/M>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*M:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,$=P+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/M;this.resize(P,$)}},Z.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Z.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",qe.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Z.prototype.resize=function(M,P){this.imageWidth=Math.round(M),this.imageHeight=Math.round(P),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()},Z.prototype.setEditingTarget=function(){var M=document.createElement("canvas");M.width=this.target.naturalWidth,M.height=this.target.naturalHeight,M.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var P=M.toDataURL();qe.setAttributes(this.editingTarget,[["href",P]]),this.setEditingTargetSize()},Z.prototype.setTopLeft=function(){var M=this.target.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=M.left-P.left-this.CANVAS_MARGIN,this.top=M.top-P.top-this.CANVAS_MARGIN},Z.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=qe.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=qe.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=qe.createGroup(),this.editingTargetRotationScaleContainer=qe.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var M=qe.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(M);var P=qe.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(P),this.editingTargetContainer=qe.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)},Z.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Z.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=qe.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sr(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()},Z.prototype.zoomToCrop=function(){if(this.cropRect){var M=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,P=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=M+"px "+P+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-M+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-P+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Z.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)},Z.prototype.cropRectChanged=function(M){this.cropRect=M,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Z.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},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.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 M=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,P=this.target.offsetTop>M+this.CANVAS_MARGIN?this.target.offsetTop-(M+this.CANVAS_MARGIN):0;this.coverDiv.style.top=P+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Z.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Z.prototype.addTopToolbar=function(){var M=this;this.topToolbar=new Gt,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 P=new Pr;P.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(P);var $=[];this.aspectRatios.forEach(function(zt){var $t=new yr(Wr.getIcon(zt.horizontal,zt.vertical),zt.horizontal===0&&zt.vertical===0?"FREE":zt.horizontal+":"+zt.vertical);$t.onClick=function(){return M.ratioButtonClicked(zt)},$.push($t)}),this.aspectRatioButton=new Mr(Wr.getIcon(0,0),"Aspect ratio",$),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,P.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ne=new yr('<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");ne.isActive=this.isGridVisible,ne.onClick=function(){M.isGridVisible=!M.isGridVisible,ne.isActive=M.isGridVisible},P.addButton(ne);var ee=new yr('<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(ee.isActive=this.zoomToCropEnabled,ee.onClick=function(){M.zoomToCropEnabled=!M.zoomToCropEnabled,ee.isActive=M.zoomToCropEnabled},P.addButton(ee),!wt.isLicensed){var je=new jt;this.topToolbar.addElementBlock(je);var Ct=document.createElement("div");Ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ft=document.createElement("a");Ft.style.color="currentColor",Ft.href="https://markerjs.com/products/cropro",Ft.target="_blank",Ft.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>',Ct.appendChild(Ft),je.addElement(Ct)}var kt=new Pr;kt.minWidth=3*this.toolbarHeight+"px",kt.contentAlign="end",this.topToolbar.addButtonBlock(kt);var bt=new yr('<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");bt.onClick=this.startRenderAndClose,kt.addButton(bt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(bt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new yr('<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");Yt.onClick=this.close,kt.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Z.prototype.addBottomToolbar=function(){var M=this;this.bottomToolbar=new Gt,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 P=new Pr;P.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(P);var $=new yr('<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");$.onClick=this.rotateLeftButtonClicked,P.addButton($);var ne=new yr('<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");ne.onClick=this.rotateRightButtonClicked,P.addButton(ne);var ee=new jt;ee.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ee),this.straightener=new mn("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(kt){M.rotateBy(kt),M.straightener.angle=M.rotationAngle},ee.addElement(this.straightener.getUI());var je=new Pr;je.minWidth=2*this.toolbarHeight+"px",je.contentAlign="end",this.bottomToolbar.addButtonBlock(je);var Ct=new yr('<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");Ct.onClick=this.flipHorizontallyButtonClicked,je.addButton(Ct);var Ft=new yr('<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");Ft.onClick=this.flipVerticallyButtonClicked,je.addButton(Ft)},Z.prototype.ratioButtonClicked=function(M){this.aspectRatio=M,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Z.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Wr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Z.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Dr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Z.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Z.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Z.prototype.restoreState=function(M){if(M){var P=this.cropLayer.getRescaledRect(M.width,M.height,this.imageWidth,this.imageHeight,M.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(P),this.cropRectChanged(P),this.flippedHorizontally=M.flippedHorizontally,this.flippedVertically=M.flippedVertically,this.applyFlip(),this.rotationAngle=M.rotationAngle,this.applyRotation()}},Z.prototype.clientToLocalCoordinates=function(M,P){var $=this.cropImage.getBoundingClientRect();return{x:M-$.left,y:P-$.top}},Z.prototype.onWindowResize=function(){this.positionUI()},Z.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var M=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=M+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Z.prototype.rotateLeftButtonClicked=function(){var M=this.rotationAngle-90;this.rotationAngle%90!=0&&(M+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(M)},Z.prototype.rotateRightButtonClicked=function(){var M=this.rotationAngle+90;this.rotationAngle%90!=0&&(M-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(M)},Z.prototype.rotateTo=function(M){M=(M=M>180?M-360:M)<=-180?M+360:M,this.rotationAngle=M,this.applyRotation()},Z.prototype.rotateBy=function(M){this.rotateTo((this.rotationAngle+M)%360)},Z.prototype.applyRotation=function(){var M=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var P=this.editingTargetRotationContainer.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(P,0);var $=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/$.width,this.imageHeight/$.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=M},Z.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Z.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Z.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Z.prototype.startRenderAndClose=function(){return at(this,void 0,void 0,function(){var M,P;return xt(this,function($){switch($.label){case 0:return[4,this.render()];case 1:return M=$.sent(),P=this.getState(),this.renderEventListeners.forEach(function(ne){return ne(M,P)}),this.close(!0),[2]}})})},Z.prototype.render=function(){return at(this,void 0,void 0,function(){var M;return xt(this,function(P){switch(P.label){case 0:return(M=new on).naturalSize=this.renderAtNaturalSize,M.imageType=this.renderImageType,M.imageQuality=this.renderImageQuality,M.width=this.renderWidth,M.height=this.renderHeight,this.unzoomFromCrop(),qe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,M.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 P.sent(),[4,M.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,P.sent()]}})})},Z.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Nt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var M=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Nt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*M)+`px;
|
|
height: `+(this.toolbarHeight-2*M)+`px;
|
|
padding: `+M+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Nt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Nt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new Ht("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ht("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*M)+`px;
|
|
padding: `+M+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Nt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},Z.instanceCounter=0,Z}(),ye=z("8hTe"),Ue=z.n(ye),et=/<pre[^>]*>/g;function Je(Z){var M=document.createElement("div");return M.innerHTML=Z,M.childNodes.length===0?"":M.childNodes[0].nodeValue}var Dt=me.a=function(Z){var M=Z.value,P=M===void 0?"":M,$=Z.edit,ne=$===void 0?!1:$,ee=Z.className,je=Z.showTextOnly,Ct=Z.showLines,Ft=Z.replaces,kt=Z.zoomImg,bt=Z.hasMask,Yt=Z.style,zt=Yt===void 0?{}:Yt,$t=Z.stylesPrev,dr=$t===void 0?{}:$t,Rr=String(P),mr=Object(x.useRef)(),_r=Object(x.useRef)(),hr=Object(x.useState)(""),kr=Object(_.a)(hr,2),Nr=kr[0],qr=kr[1],Yr=Object(x.useState)("office"),rn=Object(_.a)(Yr,2),An=rn[0],$r=rn[1],nn=function(){var Zt=new fe(_r.current);Zt.displayMode="popup",Zt.addRenderEventListener(function(){var gr=Object(w.a)(C.a.mark(function br(xr){var vr;return C.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return mr.current.style.display="none",Hr.next=3,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr}});case 3:vr=Hr.sent,vr!=null&&vr.id&&Ft(_r.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(vr==null?void 0:vr.id,"?type=").concat(vr.content_type));case 5:case"end":return Hr.stop()}},br)}));return function(br){return gr.apply(this,arguments)}}()),Zt.show()},sn=function(){var Zt=new xe(_r.current);Zt.settings.displayMode="popup",Zt.addEventListener("render",function(){var gr=Object(w.a)(C.a.mark(function br(xr){var vr;return C.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:if(mr.current.style.display="none",!_r.current){Hr.next=6;break}return Hr.next=4,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr.dataUrl}});case 4:vr=Hr.sent,vr!=null&&vr.id&&Ft(_r.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(vr==null?void 0:vr.id,"?type=").concat(vr.content_type));case 6:case"end":return Hr.stop()}},br)}));return function(br){return gr.apply(this,arguments)}}()),Zt.show(),window.markerArea=Zt},cn=Object(x.useMemo)(function(){try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,gr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Rr=Rr.replace(nr,"("+X.a.API_SERVER+"/api/attachments/").replace(Zt,'"'+X.a.API_SERVER+"/api/attachments/").replace(gr,'"'+X.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Rr=Rr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(On){}var br=q(Rr),xr=S();if(Rr.match(/\[TOC\]/)&&(br=br.replace("<p>[TOC]</p>",R()),m()),br=br.replace(/(__special_katext_id_\d+__)/g,function(On,Hr){var Cn=xr[Hr],Hn=Cn.type,Ln=Cn.expression;return Object(se.renderToString)(Je(Ln)||"",{displayMode:Hn==="block",throwOnError:!1,output:"html"})}),br=br.replace(/▁/g,"\u2581\u2581\u2581"),b(),je){var vr=document.createElement("div");return vr.innerHTML=br,vr.innerText}return setTimeout(function(){return cr()},500),br},[Rr]),dn=Object(x.useRef)();E.WebkitLineClamp=Ct,Ct&&(zt=Object(D.a)(Object(D.a)({},zt),E));function Cr(nr){var Zt=nr.target;if(Zt.tagName.toUpperCase()==="IMG"){if(kt){var gr=Zt.getAttribute("src");qr(gr),$r("image")}}else if(Zt.tagName.toUpperCase()==="A"){var br=Zt.getAttribute("href");if(br.indexOf("office")>-1)nr.preventDefault(),qr(br),$r("office");else if(br.indexOf("application/pdf")>-1)nr.preventDefault(),qr(br),$r("pdf");else if(br.indexOf("type=text")>-1)nr.preventDefault(),qr(br),$r("html");else if(br.startsWith("#")){nr.preventDefault();var xr=document.getElementById(br.replace("#",""));xr&&xr.scrollIntoView(!0)}}}var cr=function(){var Zt,gr=(Zt=dn.current)===null||Zt===void 0?void 0:Zt.querySelectorAll("video");gr==null||gr.forEach(function(br){if(br.oncontextmenu=function(){return!1},br.src.indexOf(".m3u8")>-1&&!br.canPlayType("application/vnd.apple.mpegurl")){if(te.a.isSupported()){var xr=new te.a;xr.loadSource(br.src),xr.attachMedia(br)}}})};Object(x.useEffect)(function(){if(dn.current&&cn&&(cn.match(et)&&window.PR.prettyPrint()),dn.current)return dn.current.addEventListener("click",Cr),function(){dn.current.removeEventListener("click",Cr),b(),m()}},[cn,dn.current,Cr]);var sr=function(Zt){if(!ne)return;Zt.target.nodeName==="IMG"?(mr.current.style.display="flex",mr.current.style.width=Zt.target.clientWidth+"px",mr.current.style.height=Zt.target.clientHeight+"px",mr.current.style.top=Zt.target.offsetTop+"px",mr.current.style.left=Zt.target.offsetLeft+"px",_r.current.src=Zt.target.getAttribute("src")):mr.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:dn,style:Object(D.a)({},zt),className:"".concat(ee||""," markdown-body ").concat(Ue.a.mdBody),onMouseOver:sr,dangerouslySetInnerHTML:{__html:cn}}),i.a.createElement("div",{ref:mr,className:Ue.a.button},i.a.createElement(N.a,null,i.a.createElement(Q.a,{onClick:function(){return nn()}},"\u88C1\u526A"),i.a.createElement(Q.a,{onClick:function(){return sn()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:_r,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(le.a,{close:!0,data:Nr,hasMask:bt,type:Nr!=null&&Nr.length?An:"",style:Object(D.a)({},dr),onClose:function(){return qr("")}}))}},"9VGf":function($e,me,z){"use strict";z.d(me,"a",function(){return L});var J=z("q1tI"),N=z.n(J);function L(Q,D){var w=Object(J.useRef)();Object(J.useEffect)(function(){w.current=Q}),Object(J.useEffect)(function(){function _(){w.current()}if(D!==null){var c=setInterval(_,D);return function(){return clearInterval(c)}}},[D])}},BPZU:function($e,me){var z=32,J=7,N=256;function L(i){for(var h=0;i>=z;)h|=i&1,i>>=1;return i+h}function Q(i,h,O,T){var y=h+1;if(y===O)return 1;if(T(i[y++],i[h])<0){for(;y<O&&T(i[y],i[y-1])<0;)y++;D(i,h,y)}else for(;y<O&&T(i[y],i[y-1])>=0;)y++;return y-h}function D(i,h,O){for(O--;h<O;){var T=i[h];i[h++]=i[O],i[O--]=T}}function w(i,h,O,T,y){for(T===h&&T++;T<O;T++){for(var B=i[T],u=h,s=T,l;u<s;)l=u+s>>>1,y(B,i[l])<0?s=l:u=l+1;var f=T-u;switch(f){case 3:i[u+3]=i[u+2];case 2:i[u+2]=i[u+1];case 1:i[u+1]=i[u];break;default:for(;f>0;)i[u+f]=i[u+f-1],f--}i[u]=B}}function _(i,h,O,T,y,B){var u=0,s=0,l=1;if(B(i,h[O+y])>0){for(s=T-y;l<s&&B(i,h[O+y+l])>0;)u=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),u+=y,l+=y}else{for(s=y+1;l<s&&B(i,h[O+y-l])<=0;)u=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var f=u;u=y-l,l=y-f}for(u++;u<l;){var m=u+(l-u>>>1);B(i,h[O+m])>0?u=m+1:l=m}return l}function c(i,h,O,T,y,B){var u=0,s=0,l=1;if(B(i,h[O+y])<0){for(s=y+1;l<s&&B(i,h[O+y-l])<0;)u=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var f=u;u=y-l,l=y-f}else{for(s=T-y;l<s&&B(i,h[O+y+l])>=0;)u=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),u+=y,l+=y}for(u++;u<l;){var m=u+(l-u>>>1);B(i,h[O+m])<0?l=m:u=m+1}return l}function C(i,h){var O=J,T=0,y=N,B=0,u,s,l=0;T=i.length,T<2*N&&(y=T>>>1);var f=[];B=T<120?5:T<1542?10:T<119151?19:40,u=[],s=[];function m(r,n){u[l]=r,s[l]=n,l+=1}function E(){for(;l>1;){var r=l-2;if(r>=1&&s[r-1]<=s[r]+s[r+1]||r>=2&&s[r-2]<=s[r]+s[r-1])s[r-1]<s[r+1]&&r--;else if(s[r]>s[r+1])break;R(r)}}function v(){for(;l>1;){var r=l-2;r>0&&s[r-1]<s[r+1]&&r--,R(r)}}function R(r){var n=u[r],o=s[r],S=u[r+1],b=s[r+1];s[r]=o+b,r===l-3&&(u[r+1]=u[r+2],s[r+1]=s[r+2]),l--;var g=c(i[S],i,n,o,0,h);if(n+=g,o-=g,o===0)return;if(b=_(i[n+o-1],i,S,b,b-1,h),b===0)return;o<=b?p(n,o,S,b):a(n,o,S,b)}function p(r,n,o,S){var b=0;for(b=0;b<n;b++)f[b]=i[r+b];var g=0,U=o,K=r;if(i[K++]=i[U++],--S===0){for(b=0;b<n;b++)i[K+b]=f[g+b];return}if(n===1){for(b=0;b<S;b++)i[K+b]=i[U+b];i[K+S]=f[g];return}for(var W=O,q,Y,V;;){q=0,Y=0,V=!1;do if(h(i[U],f[g])<0){if(i[K++]=i[U++],Y++,q=0,--S===0){V=!0;break}}else if(i[K++]=f[g++],q++,Y=0,--n===1){V=!0;break}while((q|Y)<W);if(V)break;do{if(q=c(i[U],f,g,n,0,h),q!==0){for(b=0;b<q;b++)i[K+b]=f[g+b];if(K+=q,g+=q,n-=q,n<=1){V=!0;break}}if(i[K++]=i[U++],--S===0){V=!0;break}if(Y=_(f[g],i,U,S,0,h),Y!==0){for(b=0;b<Y;b++)i[K+b]=i[U+b];if(K+=Y,U+=Y,S-=Y,S===0){V=!0;break}}if(i[K++]=f[g++],--n===1){V=!0;break}W--}while(q>=J||Y>=J);if(V)break;W<0&&(W=0),W+=2}if(O=W,O<1&&(O=1),n===1){for(b=0;b<S;b++)i[K+b]=i[U+b];i[K+S]=f[g]}else{if(n===0)throw new Error;for(b=0;b<n;b++)i[K+b]=f[g+b]}}function a(r,n,o,S){var b=0;for(b=0;b<S;b++)f[b]=i[o+b];var g=r+n-1,U=S-1,K=o+S-1,W=0,q=0;if(i[K--]=i[g--],--n===0){for(W=K-(S-1),b=0;b<S;b++)i[W+b]=f[b];return}if(S===1){for(K-=n,g-=n,q=K+1,W=g+1,b=n-1;b>=0;b--)i[q+b]=i[W+b];i[K]=f[U];return}for(var Y=O;;){var V=0,te=0,X=!1;do if(h(f[U],i[g])<0){if(i[K--]=i[g--],V++,te=0,--n===0){X=!0;break}}else if(i[K--]=f[U--],te++,V=0,--S===1){X=!0;break}while((V|te)<Y);if(X)break;do{if(V=n-c(f[U],i,r,n,n-1,h),V!==0){for(K-=V,g-=V,n-=V,q=K+1,W=g+1,b=V-1;b>=0;b--)i[q+b]=i[W+b];if(n===0){X=!0;break}}if(i[K--]=f[U--],--S===1){X=!0;break}if(te=S-_(i[g],f,0,S,S-1,h),te!==0){for(K-=te,U-=te,S-=te,q=K+1,W=U+1,b=0;b<te;b++)i[q+b]=f[W+b];if(S<=1){X=!0;break}}if(i[K--]=i[g--],--n===0){X=!0;break}Y--}while(V>=J||te>=J);if(X)break;Y<0&&(Y=0),Y+=2}if(O=Y,O<1&&(O=1),S===1){for(K-=n,g-=n,q=K+1,W=g+1,b=n-1;b>=0;b--)i[q+b]=i[W+b];i[K]=f[U]}else{if(S===0)throw new Error;for(W=K-(S-1),b=0;b<S;b++)i[W+b]=f[b]}}this.mergeRuns=E,this.forceMergeRuns=v,this.pushRun=m}function x(i,h,O,T){O||(O=0),T||(T=i.length);var y=T-O;if(y<2)return;var B=0;if(y<z){B=Q(i,O,T,h),w(i,O,T,O+B,h);return}var u=new C(i,h),s=L(y);do{if(B=Q(i,O,T,h),B<s){var l=y;l>s&&(l=s),w(i,O,O+l,O+B,h),B=l}u.pushRun(O,B),u.mergeRuns(),y-=B,O+=B}while(y!==0);u.forceMergeRuns()}$e.exports=x},BU3w:function($e,me,z){"use strict";z.d(me,"a",function(){return w});var J=z("MNnm"),N="rc-util-key";function L(_){if(_.attachTo)return _.attachTo;var c=document.querySelector("head");return c||document.body}function Q(_){var c,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(J.a)())return null;var x=document.createElement("style");if((c=C.csp)===null||c===void 0?void 0:c.nonce){var i;x.nonce=(i=C.csp)===null||i===void 0?void 0:i.nonce}x.innerHTML=_;var h=L(C),O=h.firstChild;return C.prepend&&h.prepend?h.prepend(x):C.prepend&&O?h.insertBefore(x,O):h.appendChild(x),x}var D=new Map;function w(_,c){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=L(C);if(!D.has(x)){var i=Q("",C),h=i.parentNode;D.set(x,h),h.removeChild(i)}var O=Array.from(D.get(x).children).find(function(s){return s.tagName==="STYLE"&&s[N]===c});if(O){var T,y;if(((T=C.csp)===null||T===void 0?void 0:T.nonce)&&O.nonce!==((y=C.csp)===null||y===void 0?void 0:y.nonce)){var B;O.nonce=(B=C.csp)===null||B===void 0?void 0:B.nonce}return O.innerHTML!==_&&(O.innerHTML=_),O}var u=Q(_,C);return u[N]=c,u}},Bd2K:function($e,me,z){(function(J){J(z("VrN/"),z("osHv"))})(function(J){J.defineOption("autoCloseTags",!1,function(C,x,i){if(i!=J.Init&&i&&C.removeKeyMap("autoCloseTags"),!x)return;var h={name:"autoCloseTags"};(typeof x!="object"||x.whenClosing!==!1)&&(h["'/'"]=function(O){return w(O)}),(typeof x!="object"||x.whenOpening!==!1)&&(h["'>'"]=function(O){return Q(O)}),C.addKeyMap(h)});var N=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],L=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Q(C){if(C.getOption("disableInput"))return J.Pass;for(var x=C.listSelections(),i=[],h=C.getOption("autoCloseTags"),O=0;O<x.length;O++){if(!x[O].empty())return J.Pass;var T=x[O].head,y=C.getTokenAt(T),B=J.innerMode(C.getMode(),y.state),u=B.state,s=B.mode.xmlCurrentTag&&B.mode.xmlCurrentTag(u),l=s&&s.name;if(!l)return J.Pass;var f=B.mode.configuration=="html",m=typeof h=="object"&&h.dontCloseTags||f&&N,E=typeof h=="object"&&h.indentTags||f&&L;y.end>T.ch&&(l=l.slice(0,l.length-y.end+T.ch));var v=l.toLowerCase();if(!l||y.type=="string"&&(y.end!=T.ch||!/[\"\']/.test(y.string.charAt(y.string.length-1))||y.string.length==1)||y.type=="tag"&&s.close||y.string.indexOf("/")==T.ch-y.start-1||m&&_(m,v)>-1||c(C,B.mode.xmlCurrentContext&&B.mode.xmlCurrentContext(u)||[],l,T,!0))return J.Pass;var R=typeof h=="object"&&h.emptyTags;if(R&&_(R,l)>-1){i[O]={text:"/>",newPos:J.Pos(T.line,T.ch+2)};continue}var p=E&&_(E,v)>-1;i[O]={indent:p,text:">"+(p?`
|
|
|
|
`:"")+"</"+l+">",newPos:p?J.Pos(T.line+1,0):J.Pos(T.line,T.ch+1)}}for(var a=typeof h=="object"&&h.dontIndentOnAutoClose,O=x.length-1;O>=0;O--){var r=i[O];C.replaceRange(r.text,x[O].head,x[O].anchor,"+insert");var n=C.listSelections().slice(0);n[O]={head:r.newPos,anchor:r.newPos},C.setSelections(n),!a&&r.indent&&(C.indentLine(r.newPos.line,null,!0),C.indentLine(r.newPos.line+1,null,!0))}}function D(C,x){for(var i=C.listSelections(),h=[],O=x?"/":"</",T=C.getOption("autoCloseTags"),y=typeof T=="object"&&T.dontIndentOnSlash,B=0;B<i.length;B++){if(!i[B].empty())return J.Pass;var u=i[B].head,s=C.getTokenAt(u),l=J.innerMode(C.getMode(),s.state),f=l.state;if(x&&(s.type=="string"||s.string.charAt(0)!="<"||s.start!=u.ch-1))return J.Pass;var m,E=l.mode.name!="xml"&&C.getMode().name=="htmlmixed";if(E&&l.mode.name=="javascript")m=O+"script";else if(E&&l.mode.name=="css")m=O+"style";else{var v=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(f);if(!v||v.length&&c(C,v,v[v.length-1],u))return J.Pass;m=O+v[v.length-1]}C.getLine(u.line).charAt(s.end)!=">"&&(m+=">"),h[B]=m}if(C.replaceSelections(h),i=C.listSelections(),!y)for(var B=0;B<i.length;B++)(B==i.length-1||i[B].head.line<i[B+1].head.line)&&C.indentLine(i[B].head.line)}function w(C){return C.getOption("disableInput")?J.Pass:D(C,!0)}J.commands.closeTag=function(C){return D(C)};function _(C,x){if(C.indexOf)return C.indexOf(x);for(var i=0,h=C.length;i<h;++i)if(C[i]==x)return i;return-1}function c(C,x,i,h,O){if(!J.scanForClosingTag)return!1;var T=Math.min(C.lastLine()+1,h.line+500),y=J.scanForClosingTag(C,h,null,T);if(!y||y.tag!=i)return!1;for(var B=O?1:0,u=x.length-1;u>=0&&x[u]==i;u--)++B;h=y.to;for(var u=1;u<B;u++){var s=J.scanForClosingTag(C,h,null,T);if(!s||s.tag!=i)return!1;h=s.to}return!0}})},BjJ7:function($e,me,z){"use strict";z.d(me,"d",function(){return N}),z.d(me,"c",function(){return L}),z.d(me,"e",function(){return Q}),z.d(me,"b",function(){return D}),z.d(me,"a",function(){return _});var J=z("m3rI");function N(c){var C=!0;if(c.length>0){for(var x=0;x<c.length;x++)if(c[x].compile_success==0||!c[x].compile_success){C=!1;break}}else C=!1;return C}function L(c){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",x=[],i=0;i<c.length;i++){var h=c[i],O=C?"".concat(C,"/").concat(h.name):"".concat(h.name);x.push({title:h.name,isLeaf:!(h.type==="tree"),key:O})}return x}function Q(c,C,x){for(var i=0;i<c.length;i++){var h=c[i];if(h.key===C){h.children=x;break}h.children&&Q(h.children,C,x)}return c}function D(c,C,x){var i;return function(){var h=this,O=arguments,T=function(){i=null,x||c.apply(h,O)},y=x&&!i;clearTimeout(i),i=setTimeout(T,C),y&&c.apply(h,O)}}var w=!0,_=J.a.API_SERVER},BlVb:function($e,me,z){var J=z("hyiK"),N=1e-8;function L(D,w){return Math.abs(D-w)<N}function Q(D,w,_){var c=0,C=D[0];if(!C)return!1;for(var x=1;x<D.length;x++){var i=D[x];c+=J(C[0],C[1],i[0],i[1],w,_),C=i}var h=D[0];return(!L(C[0],h[0])||!L(C[1],h[1]))&&(c+=J(C[0],C[1],h[0],h[1],w,_)),c!==0}me.contain=Q},Bq2U:function($e,me,z){var J=z("RDYZ"),N=z("Qe9p"),L=z("bYtY"),Q=L.isArrayLike,D=Array.prototype.slice;function w(m,E){return m[E]}function _(m,E,v){m[E]=v}function c(m,E,v){return(E-m)*v+m}function C(m,E,v){return v>.5?E:m}function x(m,E,v,R,p){var a=m.length;if(p===1)for(var r=0;r<a;r++)R[r]=c(m[r],E[r],v);else for(var n=a&&m[0].length,r=0;r<a;r++)for(var o=0;o<n;o++)R[r][o]=c(m[r][o],E[r][o],v)}function i(m,E,v){var R=m.length,p=E.length;if(R!==p){var a=R>p;if(a)m.length=p;else for(var r=R;r<p;r++)m.push(v===1?E[r]:D.call(E[r]))}for(var n=m[0]&&m[0].length,r=0;r<m.length;r++)if(v===1)isNaN(m[r])&&(m[r]=E[r]);else for(var o=0;o<n;o++)isNaN(m[r][o])&&(m[r][o]=E[r][o])}function h(m,E,v){if(m===E)return!0;var R=m.length;if(R!==E.length)return!1;if(v===1){for(var p=0;p<R;p++)if(m[p]!==E[p])return!1}else for(var a=m[0].length,p=0;p<R;p++)for(var r=0;r<a;r++)if(m[p][r]!==E[p][r])return!1;return!0}function O(m,E,v,R,p,a,r,n,o){var S=m.length;if(o===1)for(var b=0;b<S;b++)n[b]=T(m[b],E[b],v[b],R[b],p,a,r);else for(var g=m[0].length,b=0;b<S;b++)for(var U=0;U<g;U++)n[b][U]=T(m[b][U],E[b][U],v[b][U],R[b][U],p,a,r)}function T(m,E,v,R,p,a,r){var n=(v-m)*.5,o=(R-E)*.5;return(2*(E-v)+n+o)*r+(-3*(E-v)-2*n-o)*a+n*p+E}function y(m){if(Q(m)){var E=m.length;if(Q(m[0])){for(var v=[],R=0;R<E;R++)v.push(D.call(m[R]));return v}return D.call(m)}return m}function B(m){return m[0]=Math.floor(m[0]),m[1]=Math.floor(m[1]),m[2]=Math.floor(m[2]),"rgba("+m.join(",")+")"}function u(m){var E=m[m.length-1].value;return Q(E&&E[0])?2:1}function s(m,E,v,R,p,a){var r=m._getter,n=m._setter,o=E==="spline",S=R.length;if(!S)return;var b=R[0].value,g=Q(b),U=!1,K=!1,W=g?u(R):0,q;R.sort(function(re,ae){return re.time-ae.time}),q=R[S-1].time;for(var Y=[],V=[],te=R[0].value,X=!0,se=0;se<S;se++){Y.push(R[se].time/q);var le=R[se].value;if(g&&h(le,te,W)||!g&&le===te||(X=!1),te=le,typeof le=="string"){var Te=N.parse(le);Te?(le=Te,U=!0):K=!0}V.push(le)}if(!a&&X)return;for(var Ee=V[S-1],se=0;se<S-1;se++)g?i(V[se],Ee,W):isNaN(V[se])&&!isNaN(Ee)&&!K&&!U&&(V[se]=Ee);g&&i(r(m._target,p),Ee,W);var Be=0,De=0,Ve,_e,Le,tt,Et,Oe;if(U)var He=[0,0,0,0];var it=function(re,ae){var ce;if(ae<0)ce=0;else if(ae<De){for(Ve=Math.min(Be+1,S-1),ce=Ve;ce>=0&&!(Y[ce]<=ae);ce--);ce=Math.min(ce,S-2)}else{for(ce=Be;ce<S&&!(Y[ce]>ae);ce++);ce=Math.min(ce-1,S-2)}Be=ce,De=ae;var we=Y[ce+1]-Y[ce];if(we===0)return;if(_e=(ae-Y[ce])/we,o)if(tt=V[ce],Le=V[ce===0?ce:ce-1],Et=V[ce>S-2?S-1:ce+1],Oe=V[ce>S-3?S-1:ce+2],g)O(Le,tt,Et,Oe,_e,_e*_e,_e*_e*_e,r(re,p),W);else{var Re;if(U)Re=O(Le,tt,Et,Oe,_e,_e*_e,_e*_e*_e,He,1),Re=B(He);else{if(K)return C(tt,Et,_e);Re=T(Le,tt,Et,Oe,_e,_e*_e,_e*_e*_e)}n(re,p,Re)}else if(g)x(V[ce],V[ce+1],_e,r(re,p),W);else{var Re;if(U)x(V[ce],V[ce+1],_e,He,1),Re=B(He);else{if(K)return C(V[ce],V[ce+1],_e);Re=c(V[ce],V[ce+1],_e)}n(re,p,Re)}},Ae=new J({target:m._target,life:q,loop:m._loop,delay:m._delay,onframe:it,ondestroy:v});return E&&E!=="spline"&&(Ae.easing=E),Ae}var l=function(m,E,v,R){this._tracks={},this._target=m,this._loop=E||!1,this._getter=v||w,this._setter=R||_,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};l.prototype={when:function(m,E){var v=this._tracks;for(var R in E){if(!E.hasOwnProperty(R))continue;if(!v[R]){v[R]=[];var p=this._getter(this._target,R);if(p==null)continue;m!==0&&v[R].push({time:0,value:y(p)})}v[R].push({time:m,value:E[R]})}return this},during:function(m){return this._onframeList.push(m),this},pause:function(){for(var m=0;m<this._clipList.length;m++)this._clipList[m].pause();this._paused=!0},resume:function(){for(var m=0;m<this._clipList.length;m++)this._clipList[m].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var m=this._doneList,E=m.length,v=0;v<E;v++)m[v].call(this)},start:function(m,E){var v=this,R=0,p=function(){R--,R||v._doneCallback()},a;for(var r in this._tracks){if(!this._tracks.hasOwnProperty(r))continue;var n=s(this,m,p,this._tracks[r],r,E);n&&(this._clipList.push(n),R++,this.animation&&this.animation.addClip(n),a=n)}if(a){var o=a.onframe;a.onframe=function(S,b){o(S,b);for(var g=0;g<v._onframeList.length;g++)v._onframeList[g](S,b)}}return R||this._doneCallback(),this},stop:function(m){for(var E=this._clipList,v=this.animation,R=0;R<E.length;R++){var p=E[R];m&&p.onframe(this._target,1),v&&v.removeClip(p)}E.length=0},delay:function(m){return this._delay=m,this},done:function(m){return m&&this._doneList.push(m),this},getClips:function(){return this._clipList}};var f=l;$e.exports=f},"C+DQ":function($e,me,z){},C0SR:function($e,me,z){var J=z("YH21"),N=function(){this._track=[]};N.prototype={constructor:N,recognize:function(_,c,C){return this._doTrack(_,c,C),this._recognize(_)},clear:function(){return this._track.length=0,this},_doTrack:function(_,c,C){var x=_.touches;if(!x)return;for(var i={points:[],touches:[],target:c,event:_},h=0,O=x.length;h<O;h++){var T=x[h],y=J.clientToLocal(C,T,{});i.points.push([y.zrX,y.zrY]),i.touches.push(T)}this._track.push(i)},_recognize:function(_){for(var c in D)if(D.hasOwnProperty(c)){var C=D[c](this._track,_);if(C)return C}}};function L(_){var c=_[1][0]-_[0][0],C=_[1][1]-_[0][1];return Math.sqrt(c*c+C*C)}function Q(_){return[(_[0][0]+_[1][0])/2,(_[0][1]+_[1][1])/2]}var D={pinch:function(_,c){var C=_.length;if(!C)return;var x=(_[C-1]||{}).points,i=(_[C-2]||{}).points||x;if(i&&i.length>1&&x&&x.length>1){var h=L(x)/L(i);!isFinite(h)&&(h=1),c.pinchScale=h;var O=Q(x);return c.pinchX=O[0],c.pinchY=O[1],{type:"pinch",target:_[0].target,event:c}}}},w=N;$e.exports=w},DBLp:function($e,me){function z(){}z.prototype={diff:function(D,w,_){_||(_=function(l,f){return l===f}),this.equals=_;var c=this;D=D.slice(),w=w.slice();var C=w.length,x=D.length,i=1,h=C+x,O=[{newPos:-1,components:[]}],T=this.extractCommon(O[0],w,D,0);if(O[0].newPos+1>=C&&T+1>=x){for(var y=[],B=0;B<w.length;B++)y.push(B);return[{indices:y,count:w.length}]}function u(){for(var l=-1*i;l<=i;l+=2){var f,m=O[l-1],E=O[l+1],v=(E?E.newPos:0)-l;m&&(O[l-1]=void 0);var R=m&&m.newPos+1<C,p=E&&0<=v&&v<x;if(!R&&!p){O[l]=void 0;continue}if(!R||p&&m.newPos<E.newPos?(f=N(E),c.pushComponent(f.components,void 0,!0)):(f=m,f.newPos++,c.pushComponent(f.components,!0,void 0)),v=c.extractCommon(f,w,D,l),f.newPos+1>=C&&v+1>=x)return J(c,f.components,w,D);O[l]=f}i++}for(;i<=h;){var s=u();if(s)return s}},pushComponent:function(D,w,_){var c=D[D.length-1];c&&c.added===w&&c.removed===_?D[D.length-1]={count:c.count+1,added:w,removed:_}:D.push({count:1,added:w,removed:_})},extractCommon:function(D,w,_,c){for(var C=w.length,x=_.length,i=D.newPos,h=i-c,O=0;i+1<C&&h+1<x&&this.equals(w[i+1],_[h+1]);)i++,h++,O++;return O&&D.components.push({count:O}),D.newPos=i,h},tokenize:function(D){return D.slice()},join:function(D){return D.slice()}};function J(D,w,_,c){for(var C=0,x=w.length,i=0,h=0;C<x;C++){var O=w[C];if(O.removed){for(var T=[],y=h;y<h+O.count;y++)T.push(y);O.indices=T,h+=O.count}else{for(var T=[],y=i;y<i+O.count;y++)T.push(y);O.indices=T,i+=O.count,O.added||(h+=O.count)}}return w}function N(D){return{newPos:D.newPos,components:D.components.slice(0)}}var L=new z;function Q(D,w,_){return L.diff(D,w,_)}$e.exports=Q},DN4a:function($e,me,z){var J=z("Fofx"),N=z("QBsz"),L=J.identity,Q=5e-5;function D(h){return h>Q||h<-Q}var w=function(h){h=h||{},h.position||(this.position=[0,0]),h.rotation==null&&(this.rotation=0),h.scale||(this.scale=[1,1]),this.origin=this.origin||null},_=w.prototype;_.transform=null,_.needLocalTransform=function(){return D(this.rotation)||D(this.position[0])||D(this.position[1])||D(this.scale[0]-1)||D(this.scale[1]-1)};var c=[];_.updateTransform=function(){var h=this.parent,O=h&&h.transform,T=this.needLocalTransform(),y=this.transform;if(!(T||O)){y&&L(y);return}y=y||J.create(),T?this.getLocalTransform(y):L(y),O&&(T?J.mul(y,h.transform,y):J.copy(y,h.transform)),this.transform=y;var B=this.globalScaleRatio;if(B!=null&&B!==1){this.getGlobalScale(c);var u=c[0]<0?-1:1,s=c[1]<0?-1:1,l=((c[0]-u)*B+u)/c[0]||0,f=((c[1]-s)*B+s)/c[1]||0;y[0]*=l,y[1]*=l,y[2]*=f,y[3]*=f}this.invTransform=this.invTransform||J.create(),J.invert(this.invTransform,y)},_.getLocalTransform=function(h){return w.getLocalTransform(this,h)},_.setTransform=function(h){var O=this.transform,T=h.dpr||1;O?h.setTransform(T*O[0],T*O[1],T*O[2],T*O[3],T*O[4],T*O[5]):h.setTransform(T,0,0,T,0,0)},_.restoreTransform=function(h){var O=h.dpr||1;h.setTransform(O,0,0,O,0,0)};var C=[],x=J.create();_.setLocalTransform=function(h){if(!h)return;var O=h[0]*h[0]+h[1]*h[1],T=h[2]*h[2]+h[3]*h[3],y=this.position,B=this.scale;D(O-1)&&(O=Math.sqrt(O)),D(T-1)&&(T=Math.sqrt(T)),h[0]<0&&(O=-O),h[3]<0&&(T=-T),y[0]=h[4],y[1]=h[5],B[0]=O,B[1]=T,this.rotation=Math.atan2(-h[1]/T,h[0]/O)},_.decomposeTransform=function(){if(!this.transform)return;var h=this.parent,O=this.transform;h&&h.transform&&(J.mul(C,h.invTransform,O),O=C);var T=this.origin;T&&(T[0]||T[1])&&(x[4]=T[0],x[5]=T[1],J.mul(C,O,x),C[4]-=T[0],C[5]-=T[1],O=C),this.setLocalTransform(O)},_.getGlobalScale=function(h){var O=this.transform;return h=h||[],O?(h[0]=Math.sqrt(O[0]*O[0]+O[1]*O[1]),h[1]=Math.sqrt(O[2]*O[2]+O[3]*O[3]),O[0]<0&&(h[0]=-h[0]),O[3]<0&&(h[1]=-h[1]),h):(h[0]=1,h[1]=1,h)},_.transformCoordToLocal=function(h,O){var T=[h,O],y=this.invTransform;return y&&N.applyTransform(T,T,y),T},_.transformCoordToGlobal=function(h,O){var T=[h,O],y=this.transform;return y&&N.applyTransform(T,T,y),T},w.getLocalTransform=function(h,O){O=O||[],L(O);var T=h.origin,y=h.scale||[1,1],B=h.rotation||0,u=h.position||[0,0];return T&&(O[4]-=T[0],O[5]-=T[1]),J.scale(O,O,y),B&&J.rotate(O,O,B),T&&(O[4]+=T[0],O[5]+=T[1]),O[4]+=u[0],O[5]+=u[1],O};var i=w;$e.exports=i},Dagg:function($e,me,z){var J=z("Gev7"),N=z("mFDi"),L=z("bYtY"),Q=z("Xnb7");function D(_){J.call(this,_)}D.prototype={constructor:D,type:"image",brush:function(_,c){var C=this.style,x=C.image;C.bind(_,this,c);var i=this._image=Q.createOrUpdateImage(x,this._image,this,this.onload);if(!i||!Q.isImageReady(i))return;var h=C.x||0,O=C.y||0,T=C.width,y=C.height,B=i.width/i.height;if(T==null&&y!=null?T=y*B:y==null&&T!=null?y=T/B:T==null&&y==null&&(T=i.width,y=i.height),this.setTransform(_),C.sWidth&&C.sHeight){var u=C.sx||0,s=C.sy||0;_.drawImage(i,u,s,C.sWidth,C.sHeight,h,O,T,y)}else if(C.sx&&C.sy){var u=C.sx,s=C.sy,l=T-u,f=y-s;_.drawImage(i,u,s,l,f,h,O,T,y)}else _.drawImage(i,h,O,T,y);C.text!=null&&(this.restoreTransform(_),this.drawRectText(_,this.getBoundingRect()))},getBoundingRect:function(){var _=this.style;return this._rect||(this._rect=new N(_.x||0,_.y||0,_.width||0,_.height||0)),this._rect}},L.inherits(D,J);var w=D;$e.exports=w},DlQD:function($e,me,z){(function(J,N){$e.exports=N()})(this,function(){"use strict";function J(Ke,Ie){for(var Me=0;Me<Ie.length;Me++){var pe=Ie[Me];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(Ke,pe.key,pe)}}function N(Ke,Ie,Me){return Ie&&J(Ke.prototype,Ie),Me&&J(Ke,Me),Ke}function L(Ke,Ie){if(!Ke)return;if(typeof Ke=="string")return Q(Ke,Ie);var Me=Object.prototype.toString.call(Ke).slice(8,-1);if(Me==="Object"&&Ke.constructor&&(Me=Ke.constructor.name),Me==="Map"||Me==="Set")return Array.from(Ke);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return Q(Ke,Ie)}function Q(Ke,Ie){(Ie==null||Ie>Ke.length)&&(Ie=Ke.length);for(var Me=0,pe=new Array(Ie);Me<Ie;Me++)pe[Me]=Ke[Me];return pe}function D(Ke,Ie){var Me;if(typeof Symbol=="undefined"||Ke[Symbol.iterator]==null){if(Array.isArray(Ke)||(Me=L(Ke))||Ie&&Ke&&typeof Ke.length=="number"){Me&&(Ke=Me);var pe=0;return function(){return pe>=Ke.length?{done:!0}:{done:!1,value:Ke[pe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Me=Ke[Symbol.iterator](),Me.next.bind(Me)}function w(Ke,Ie){return Ie={exports:{}},Ke(Ie,Ie.exports),Ie.exports}var _=w(function(Ke){function Ie(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Me(pe){Ke.exports.defaults=pe}Ke.exports={defaults:Ie(),getDefaults:Ie,changeDefaults:Me}}),c=_.defaults,C=_.getDefaults,x=_.changeDefaults,i=/[&<>"']/,h=/[&<>"']/g,O=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,y={"&":"&","<":"<",">":">",'"':""","'":"'"},B=function(Ie){return y[Ie]};function u(Ke,Ie){if(Ie){if(i.test(Ke))return Ke.replace(h,B)}else if(O.test(Ke))return Ke.replace(T,B);return Ke}var s=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Ke){return Ke.replace(s,function(Ie,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var f=/(^|[^\[])\^/g;function m(Ke,Ie){Ke=Ke.source||Ke,Ie=Ie||"";var Me={replace:function(be,ge){return ge=ge.source||ge,ge=ge.replace(f,"$1"),Ke=Ke.replace(be,ge),Me},getRegex:function(){return new RegExp(Ke,Ie)}};return Me}var E=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Ke,Ie,Me){if(Ke){var pe;try{pe=decodeURIComponent(l(Me)).replace(E,"").toLowerCase()}catch(be){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}Ie&&!v.test(Me)&&(Me=o(Ie,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(be){return null}return Me}var p={},a=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,n=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(Ke,Ie){p[" "+Ke]||(a.test(Ke)?p[" "+Ke]=Ke+"/":p[" "+Ke]=U(Ke,"/",!0)),Ke=p[" "+Ke];var Me=Ke.indexOf(":")===-1;return Ie.substring(0,2)==="//"?Me?Ie:Ke.replace(r,"$1")+Ie:Ie.charAt(0)==="/"?Me?Ie:Ke.replace(n,"$1")+Ie:Ke+Ie}var S={exec:function(){}};function b(Ke){for(var Ie=1,Me,pe;Ie<arguments.length;Ie++){Me=arguments[Ie];for(pe in Me)Object.prototype.hasOwnProperty.call(Me,pe)&&(Ke[pe]=Me[pe])}return Ke}function g(Ke,Ie){var Me=Ke.replace(/\|/g,function(ge,Ce,We){for(var Ne=!1,ut=Ce;--ut>=0&&We[ut]==="\\";)Ne=!Ne;return Ne?"|":" |"}),pe=Me.split(/ \|/),be=0;if(pe.length>Ie)pe.splice(Ie);else for(;pe.length<Ie;)pe.push("");for(;be<pe.length;be++)pe[be]=pe[be].trim().replace(/\\\|/g,"|");return pe}function U(Ke,Ie,Me){var pe=Ke.length;if(pe===0)return"";for(var be=0;be<pe;){var ge=Ke.charAt(pe-be-1);if(ge===Ie&&!Me)be++;else if(ge!==Ie&&Me)be++;else break}return Ke.substr(0,pe-be)}function K(Ke,Ie){if(Ke.indexOf(Ie[1])===-1)return-1;for(var Me=Ke.length,pe=0,be=0;be<Me;be++)if(Ke[be]==="\\")be++;else if(Ke[be]===Ie[0])pe++;else if(Ke[be]===Ie[1]&&(pe--,pe<0))return be;return-1}function W(Ke){Ke&&Ke.sanitize&&!Ke.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 q={escape:u,unescape:l,edit:m,cleanUrl:R,resolveUrl:o,noopTest:S,merge:b,splitCells:g,rtrim:U,findClosingBracket:K,checkSanitizeDeprecation:W},Y=_.defaults,V=q.rtrim,te=q.splitCells,X=q.escape,se=q.findClosingBracket;function le(Ke,Ie,Me){var pe=Ie.href,be=Ie.title?X(Ie.title):null,ge=Ke[1].replace(/\\([\[\]])/g,"$1");return Ke[0].charAt(0)!=="!"?{type:"link",raw:Me,href:pe,title:be,text:ge}:{type:"image",raw:Me,href:pe,title:be,text:X(ge)}}function Te(Ke,Ie){var Me=Ke.match(/^(\s+)(?:```)/);if(Me===null)return Ie;var pe=Me[1];return Ie.split(`
|
|
`).map(function(be){var ge=be.match(/^\s+/);if(ge===null)return be;var Ce=ge[0];return Ce.length>=pe.length?be.slice(pe.length):be}).join(`
|
|
`)}var Ee=function(){function Ke(Me){this.options=Me||Y}var Ie=Ke.prototype;return Ie.space=function(pe){var be=this.rules.block.newline.exec(pe);if(be)return be[0].length>1?{type:"space",raw:be[0]}:{raw:`
|
|
`}},Ie.code=function(pe,be){var ge=this.rules.block.code.exec(pe);if(ge){var Ce=be[be.length-1];if(Ce&&Ce.type==="paragraph")return{raw:ge[0],text:ge[0].trimRight()};var We=ge[0].replace(/^ {4}/gm,"");return{type:"code",raw:ge[0],codeBlockStyle:"indented",text:this.options.pedantic?We:V(We,`
|
|
`)}}},Ie.fences=function(pe){var be=this.rules.block.fences.exec(pe);if(be){var ge=be[0],Ce=Te(ge,be[3]||"");return{type:"code",raw:ge,lang:be[2]?be[2].trim():be[2],text:Ce}}},Ie.heading=function(pe){var be=this.rules.block.heading.exec(pe);if(be)return{type:"heading",raw:be[0],depth:be[1].length,text:be[2]}},Ie.nptable=function(pe){var be=this.rules.block.nptable.exec(pe);if(be){var ge={type:"table",header:te(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
|
|
`):[],raw:be[0]};if(ge.header.length===ge.align.length){var Ce=ge.align.length,We;for(We=0;We<Ce;We++)/^ *-+: *$/.test(ge.align[We])?ge.align[We]="right":/^ *:-+: *$/.test(ge.align[We])?ge.align[We]="center":/^ *:-+ *$/.test(ge.align[We])?ge.align[We]="left":ge.align[We]=null;for(Ce=ge.cells.length,We=0;We<Ce;We++)ge.cells[We]=te(ge.cells[We],ge.header.length);return ge}}},Ie.hr=function(pe){var be=this.rules.block.hr.exec(pe);if(be)return{type:"hr",raw:be[0]}},Ie.blockquote=function(pe){var be=this.rules.block.blockquote.exec(pe);if(be){var ge=be[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:be[0],text:ge}}},Ie.list=function(pe){var be=this.rules.block.list.exec(pe);if(be){for(var ge=be[0],Ce=be[2],We=Ce.length>1,Ne=Ce[Ce.length-1]===")",ut={type:"list",raw:ge,ordered:We,start:We?+Ce.slice(0,-1):"",loose:!1,items:[]},Tt=be[0].match(this.rules.block.item),Ut=!1,St,_t,At,nt,rt,xe,Fe,dt=Tt.length,at=0;at<dt;at++)St=Tt[at],ge=St,_t=St.length,St=St.replace(/^ *([*+-]|\d+[.)]) */,""),~St.indexOf(`
|
|
`)&&(_t-=St.length,St=this.options.pedantic?St.replace(/^ {1,4}/gm,""):St.replace(new RegExp("^ {1,"+_t+"}","gm"),"")),at!==dt-1&&(At=this.rules.block.bullet.exec(Tt[at+1])[0],(We?At.length===1||!Ne&&At[At.length-1]===")":At.length>1||this.options.smartLists&&At!==Ce)&&(nt=Tt.slice(at+1).join(`
|
|
`),ut.raw=ut.raw.substring(0,ut.raw.length-nt.length),at=dt-1)),rt=Ut||/\n\n(?!\s*$)/.test(St),at!==dt-1&&(Ut=St.charAt(St.length-1)===`
|
|
`,rt||(rt=Ut)),rt&&(ut.loose=!0),xe=/^\[[ xX]\] /.test(St),Fe=void 0,xe&&(Fe=St[1]!==" ",St=St.replace(/^\[[ xX]\] +/,"")),ut.items.push({type:"list_item",raw:ge,task:xe,checked:Fe,loose:rt,text:St});return ut}},Ie.html=function(pe){var be=this.rules.block.html.exec(pe);if(be)return{type:this.options.sanitize?"paragraph":"html",raw:be[0],pre:!this.options.sanitizer&&(be[1]==="pre"||be[1]==="script"||be[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):X(be[0]):be[0]}},Ie.def=function(pe){var be=this.rules.block.def.exec(pe);if(be){be[3]&&(be[3]=be[3].substring(1,be[3].length-1));var ge=be[1].toLowerCase().replace(/\s+/g," ");return{tag:ge,raw:be[0],href:be[2],title:be[3]}}},Ie.table=function(pe){var be=this.rules.block.table.exec(pe);if(be){var ge={type:"table",header:te(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ge.header.length===ge.align.length){ge.raw=be[0];var Ce=ge.align.length,We;for(We=0;We<Ce;We++)/^ *-+: *$/.test(ge.align[We])?ge.align[We]="right":/^ *:-+: *$/.test(ge.align[We])?ge.align[We]="center":/^ *:-+ *$/.test(ge.align[We])?ge.align[We]="left":ge.align[We]=null;for(Ce=ge.cells.length,We=0;We<Ce;We++)ge.cells[We]=te(ge.cells[We].replace(/^ *\| *| *\| *$/g,""),ge.header.length);return ge}}},Ie.lheading=function(pe){var be=this.rules.block.lheading.exec(pe);if(be)return{type:"heading",raw:be[0],depth:be[2].charAt(0)==="="?1:2,text:be[1]}},Ie.paragraph=function(pe){var be=this.rules.block.paragraph.exec(pe);if(be)return{type:"paragraph",raw:be[0],text:be[1].charAt(be[1].length-1)===`
|
|
`?be[1].slice(0,-1):be[1]}},Ie.text=function(pe,be){var ge=this.rules.block.text.exec(pe);if(ge){var Ce=be[be.length-1];return Ce&&Ce.type==="text"?{raw:ge[0],text:ge[0]}:{type:"text",raw:ge[0],text:ge[0]}}},Ie.escape=function(pe){var be=this.rules.inline.escape.exec(pe);if(be)return{type:"escape",raw:be[0],text:X(be[1])}},Ie.tag=function(pe,be,ge){var Ce=this.rules.inline.tag.exec(pe);if(Ce)return!be&&/^<a /i.test(Ce[0])?be=!0:be&&/^<\/a>/i.test(Ce[0])&&(be=!1),!ge&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ce[0])?ge=!0:ge&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ce[0])&&(ge=!1),{type:this.options.sanitize?"text":"html",raw:Ce[0],inLink:be,inRawBlock:ge,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):X(Ce[0]):Ce[0]}},Ie.link=function(pe){var be=this.rules.inline.link.exec(pe);if(be){var ge=se(be[2],"()");if(ge>-1){var Ce=be[0].indexOf("!")===0?5:4,We=Ce+be[1].length+ge;be[2]=be[2].substring(0,ge),be[0]=be[0].substring(0,We).trim(),be[3]=""}var Ne=be[2],ut="";if(this.options.pedantic){var Tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ne);Tt?(Ne=Tt[1],ut=Tt[3]):ut=""}else ut=be[3]?be[3].slice(1,-1):"";Ne=Ne.trim().replace(/^<([\s\S]*)>$/,"$1");var Ut=le(be,{href:Ne&&Ne.replace(this.rules.inline._escapes,"$1"),title:ut&&ut.replace(this.rules.inline._escapes,"$1")},be[0]);return Ut}},Ie.reflink=function(pe,be){var ge;if((ge=this.rules.inline.reflink.exec(pe))||(ge=this.rules.inline.nolink.exec(pe))){var Ce=(ge[2]||ge[1]).replace(/\s+/g," ");if(Ce=be[Ce.toLowerCase()],!Ce||!Ce.href){var We=ge[0].charAt(0);return{type:"text",raw:We,text:We}}var Ne=le(ge,Ce,ge[0]);return Ne}},Ie.strong=function(pe,be,ge){ge===void 0&&(ge="");var Ce=this.rules.inline.strong.start.exec(pe);if(Ce&&(!Ce[1]||Ce[1]&&(ge===""||this.rules.inline.punctuation.exec(ge)))){be=be.slice(-1*pe.length);var We=Ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;We.lastIndex=0;for(var Ne;(Ce=We.exec(be))!=null;)if(Ne=this.rules.inline.strong.middle.exec(be.slice(0,Ce.index+3)),Ne)return{type:"strong",raw:pe.slice(0,Ne[0].length),text:pe.slice(2,Ne[0].length-2)}}},Ie.em=function(pe,be,ge){ge===void 0&&(ge="");var Ce=this.rules.inline.em.start.exec(pe);if(Ce&&(!Ce[1]||Ce[1]&&(ge===""||this.rules.inline.punctuation.exec(ge)))){be=be.slice(-1*pe.length);var We=Ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;We.lastIndex=0;for(var Ne;(Ce=We.exec(be))!=null;)if(Ne=this.rules.inline.em.middle.exec(be.slice(0,Ce.index+2)),Ne)return{type:"em",raw:pe.slice(0,Ne[0].length),text:pe.slice(1,Ne[0].length-1)}}},Ie.codespan=function(pe){var be=this.rules.inline.code.exec(pe);if(be){var ge=be[2].replace(/\n/g," "),Ce=/[^ ]/.test(ge),We=ge.startsWith(" ")&&ge.endsWith(" ");return Ce&&We&&(ge=ge.substring(1,ge.length-1)),ge=X(ge,!0),{type:"codespan",raw:be[0],text:ge}}},Ie.br=function(pe){var be=this.rules.inline.br.exec(pe);if(be)return{type:"br",raw:be[0]}},Ie.del=function(pe){var be=this.rules.inline.del.exec(pe);if(be)return{type:"del",raw:be[0],text:be[1]}},Ie.autolink=function(pe,be){var ge=this.rules.inline.autolink.exec(pe);if(ge){var Ce,We;return ge[2]==="@"?(Ce=X(this.options.mangle?be(ge[1]):ge[1]),We="mailto:"+Ce):(Ce=X(ge[1]),We=Ce),{type:"link",raw:ge[0],text:Ce,href:We,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Ie.url=function(pe,be){var ge;if(ge=this.rules.inline.url.exec(pe)){var Ce,We;if(ge[2]==="@")Ce=X(this.options.mangle?be(ge[0]):ge[0]),We="mailto:"+Ce;else{var Ne;do Ne=ge[0],ge[0]=this.rules.inline._backpedal.exec(ge[0])[0];while(Ne!==ge[0]);Ce=X(ge[0]),ge[1]==="www."?We="http://"+Ce:We=Ce}return{type:"link",raw:ge[0],text:Ce,href:We,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Ie.inlineText=function(pe,be,ge){var Ce=this.rules.inline.text.exec(pe);if(Ce){var We;return be?We=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):X(Ce[0]):Ce[0]:We=X(this.options.smartypants?ge(Ce[0]):Ce[0]),{type:"text",raw:Ce[0],text:We}}},Ke}(),Be=q.noopTest,De=q.edit,Ve=q.merge,_e={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:Be,table:Be,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};_e._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_e._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,_e.def=De(_e.def).replace("label",_e._label).replace("title",_e._title).getRegex(),_e.bullet=/(?:[*+-]|\d{1,9}[.)])/,_e.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,_e.item=De(_e.item,"gm").replace(/bull/g,_e.bullet).getRegex(),_e.list=De(_e.list).replace(/bull/g,_e.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_e.def.source+")").getRegex(),_e._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",_e._comment=/<!--(?!-?>)[\s\S]*?-->/,_e.html=De(_e.html,"i").replace("comment",_e._comment).replace("tag",_e._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e.paragraph=De(_e._paragraph).replace("hr",_e.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",_e._tag).getRegex(),_e.blockquote=De(_e.blockquote).replace("paragraph",_e.paragraph).getRegex(),_e.normal=Ve({},_e),_e.gfm=Ve({},_e.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*|$)"}),_e.gfm.nptable=De(_e.gfm.nptable).replace("hr",_e.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",_e._tag).getRegex(),_e.gfm.table=De(_e.gfm.table).replace("hr",_e.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",_e._tag).getRegex(),_e.pedantic=Ve({},_e.normal,{html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_e._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:Be,paragraph:De(_e.normal._paragraph).replace("hr",_e.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",_e.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Be,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:Be,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Le.punctuation=De(Le.punctuation).replace(/punctuation/g,Le._punctuation).getRegex(),Le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Le.em.start=De(Le.em.start).replace(/punctuation/g,Le._punctuation).getRegex(),Le.em.middle=De(Le.em.middle).replace(/punctuation/g,Le._punctuation).replace(/overlapSkip/g,Le._overlapSkip).getRegex(),Le.em.endAst=De(Le.em.endAst,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.em.endUnd=De(Le.em.endUnd,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.start=De(Le.strong.start).replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.middle=De(Le.strong.middle).replace(/punctuation/g,Le._punctuation).replace(/blockSkip/g,Le._blockSkip).getRegex(),Le.strong.endAst=De(Le.strong.endAst,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.endUnd=De(Le.strong.endUnd,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.blockSkip=De(Le._blockSkip,"g").getRegex(),Le.overlapSkip=De(Le._overlapSkip,"g").getRegex(),Le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Le._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])?)+(?![-_])/,Le.autolink=De(Le.autolink).replace("scheme",Le._scheme).replace("email",Le._email).getRegex(),Le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Le.tag=De(Le.tag).replace("comment",_e._comment).replace("attribute",Le._attribute).getRegex(),Le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Le.link=De(Le.link).replace("label",Le._label).replace("href",Le._href).replace("title",Le._title).getRegex(),Le.reflink=De(Le.reflink).replace("label",Le._label).getRegex(),Le.reflinkSearch=De(Le.reflinkSearch,"g").replace("reflink",Le.reflink).replace("nolink",Le.nolink).getRegex(),Le.normal=Ve({},Le),Le.pedantic=Ve({},Le.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:De(/^!?\[(label)\]\((.*?)\)/).replace("label",Le._label).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Le._label).getRegex()}),Le.gfm=Ve({},Le.normal,{escape:De(Le.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Le.gfm.url=De(Le.gfm.url,"i").replace("email",Le.gfm._extended_email).getRegex(),Le.breaks=Ve({},Le.gfm,{br:De(Le.br).replace("{2,}","*").getRegex(),text:De(Le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var tt={block:_e,inline:Le},Et=_.defaults,Oe=tt.block,He=tt.inline;function it(Ke){return Ke.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 Ae(Ke){var Ie="",Me,pe,be=Ke.length;for(Me=0;Me<be;Me++)pe=Ke.charCodeAt(Me),Math.random()>.5&&(pe="x"+pe.toString(16)),Ie+="&#"+pe+";";return Ie}var re=function(){function Ke(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||Et,this.options.tokenizer=this.options.tokenizer||new Ee,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:Oe.normal,inline:He.normal};this.options.pedantic?(pe.block=Oe.pedantic,pe.inline=He.pedantic):this.options.gfm&&(pe.block=Oe.gfm,this.options.breaks?pe.inline=He.breaks:pe.inline=He.gfm),this.tokenizer.rules=pe}Ke.lex=function(pe,be){var ge=new Ke(be);return ge.lex(pe)};var Ie=Ke.prototype;return Ie.lex=function(pe){return pe=pe.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(pe,this.tokens,!0),this.inline(this.tokens),this.tokens},Ie.blockTokens=function(pe,be,ge){be===void 0&&(be=[]),ge===void 0&&(ge=!0),pe=pe.replace(/^ +$/gm,"");for(var Ce,We,Ne,ut;pe;){if(Ce=this.tokenizer.space(pe)){pe=pe.substring(Ce.raw.length),Ce.type&&be.push(Ce);continue}if(Ce=this.tokenizer.code(pe,be)){pe=pe.substring(Ce.raw.length),Ce.type?be.push(Ce):(ut=be[be.length-1],ut.raw+=`
|
|
`+Ce.raw,ut.text+=`
|
|
`+Ce.text);continue}if(Ce=this.tokenizer.fences(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.heading(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.nptable(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.hr(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.blockquote(pe)){pe=pe.substring(Ce.raw.length),Ce.tokens=this.blockTokens(Ce.text,[],ge),be.push(Ce);continue}if(Ce=this.tokenizer.list(pe)){for(pe=pe.substring(Ce.raw.length),Ne=Ce.items.length,We=0;We<Ne;We++)Ce.items[We].tokens=this.blockTokens(Ce.items[We].text,[],!1);be.push(Ce);continue}if(Ce=this.tokenizer.html(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(ge&&(Ce=this.tokenizer.def(pe))){pe=pe.substring(Ce.raw.length),this.tokens.links[Ce.tag]||(this.tokens.links[Ce.tag]={href:Ce.href,title:Ce.title});continue}if(Ce=this.tokenizer.table(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.lheading(pe)){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(ge&&(Ce=this.tokenizer.paragraph(pe))){pe=pe.substring(Ce.raw.length),be.push(Ce);continue}if(Ce=this.tokenizer.text(pe,be)){pe=pe.substring(Ce.raw.length),Ce.type?be.push(Ce):(ut=be[be.length-1],ut.raw+=`
|
|
`+Ce.raw,ut.text+=`
|
|
`+Ce.text);continue}if(pe){var Tt="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(Tt);break}else throw new Error(Tt)}}return be},Ie.inline=function(pe){var be,ge,Ce,We,Ne,ut,Tt=pe.length;for(be=0;be<Tt;be++){ut=pe[be];switch(ut.type){case"paragraph":case"text":case"heading":{ut.tokens=[],this.inlineTokens(ut.text,ut.tokens);break}case"table":{for(ut.tokens={header:[],cells:[]},We=ut.header.length,ge=0;ge<We;ge++)ut.tokens.header[ge]=[],this.inlineTokens(ut.header[ge],ut.tokens.header[ge]);for(We=ut.cells.length,ge=0;ge<We;ge++)for(Ne=ut.cells[ge],ut.tokens.cells[ge]=[],Ce=0;Ce<Ne.length;Ce++)ut.tokens.cells[ge][Ce]=[],this.inlineTokens(Ne[Ce],ut.tokens.cells[ge][Ce]);break}case"blockquote":{this.inline(ut.tokens);break}case"list":{for(We=ut.items.length,ge=0;ge<We;ge++)this.inline(ut.items[ge].tokens);break}}}return pe},Ie.inlineTokens=function(pe,be,ge,Ce,We){be===void 0&&(be=[]),ge===void 0&&(ge=!1),Ce===void 0&&(Ce=!1),We===void 0&&(We="");var Ne,ut=pe,Tt;if(this.tokens.links){var Ut=Object.keys(this.tokens.links);if(Ut.length>0)for(;(Tt=this.tokenizer.rules.inline.reflinkSearch.exec(ut))!=null;)Ut.includes(Tt[0].slice(Tt[0].lastIndexOf("[")+1,-1))&&(ut=ut.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Tt=this.tokenizer.rules.inline.blockSkip.exec(ut))!=null;)ut=ut.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if(Ne=this.tokenizer.escape(pe)){pe=pe.substring(Ne.raw.length),be.push(Ne);continue}if(Ne=this.tokenizer.tag(pe,ge,Ce)){pe=pe.substring(Ne.raw.length),ge=Ne.inLink,Ce=Ne.inRawBlock,be.push(Ne);continue}if(Ne=this.tokenizer.link(pe)){pe=pe.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,Ce)),be.push(Ne);continue}if(Ne=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,Ce)),be.push(Ne);continue}if(Ne=this.tokenizer.strong(pe,ut,We)){pe=pe.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],ge,Ce),be.push(Ne);continue}if(Ne=this.tokenizer.em(pe,ut,We)){pe=pe.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],ge,Ce),be.push(Ne);continue}if(Ne=this.tokenizer.codespan(pe)){pe=pe.substring(Ne.raw.length),be.push(Ne);continue}if(Ne=this.tokenizer.br(pe)){pe=pe.substring(Ne.raw.length),be.push(Ne);continue}if(Ne=this.tokenizer.del(pe)){pe=pe.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],ge,Ce),be.push(Ne);continue}if(Ne=this.tokenizer.autolink(pe,Ae)){pe=pe.substring(Ne.raw.length),be.push(Ne);continue}if(!ge&&(Ne=this.tokenizer.url(pe,Ae))){pe=pe.substring(Ne.raw.length),be.push(Ne);continue}if(Ne=this.tokenizer.inlineText(pe,Ce,it)){pe=pe.substring(Ne.raw.length),We=Ne.raw.slice(-1),be.push(Ne);continue}if(pe){var St="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(St);break}else throw new Error(St)}}return be},N(Ke,null,[{key:"rules",get:function(){return{block:Oe,inline:He}}}]),Ke}(),ae=_.defaults,ce=q.cleanUrl,we=q.escape,Re=function(){function Ke(Me){this.options=Me||ae}var Ie=Ke.prototype;return Ie.code=function(pe,be,ge){var Ce=(be||"").match(/\S*/)[0];if(this.options.highlight){var We=this.options.highlight(pe,Ce);We!=null&&We!==pe&&(ge=!0,pe=We)}return Ce?'<pre><code class="'+this.options.langPrefix+we(Ce,!0)+'">'+(ge?pe:we(pe,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ge?pe:we(pe,!0))+`</code></pre>
|
|
`},Ie.blockquote=function(pe){return`<blockquote>
|
|
`+pe+`</blockquote>
|
|
`},Ie.html=function(pe){return pe},Ie.heading=function(pe,be,ge,Ce){return this.options.headerIds?"<h"+be+' id="'+this.options.headerPrefix+Ce.slug(ge)+'">'+pe+"</h"+be+`>
|
|
`:"<h"+be+">"+pe+"</h"+be+`>
|
|
`},Ie.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Ie.list=function(pe,be,ge){var Ce=be?"ol":"ul",We=be&&ge!==1?' start="'+ge+'"':"";return"<"+Ce+We+`>
|
|
`+pe+"</"+Ce+`>
|
|
`},Ie.listitem=function(pe){return"<li>"+pe+`</li>
|
|
`},Ie.checkbox=function(pe){return"<input "+(pe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ie.paragraph=function(pe){return"<p>"+pe+`</p>
|
|
`},Ie.table=function(pe,be){return be&&(be="<tbody>"+be+"</tbody>"),`<table>
|
|
<thead>
|
|
`+pe+`</thead>
|
|
`+be+`</table>
|
|
`},Ie.tablerow=function(pe){return`<tr>
|
|
`+pe+`</tr>
|
|
`},Ie.tablecell=function(pe,be){var ge=be.header?"th":"td",Ce=be.align?"<"+ge+' align="'+be.align+'">':"<"+ge+">";return Ce+pe+"</"+ge+`>
|
|
`},Ie.strong=function(pe){return"<strong>"+pe+"</strong>"},Ie.em=function(pe){return"<em>"+pe+"</em>"},Ie.codespan=function(pe){return"<code>"+pe+"</code>"},Ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ie.del=function(pe){return"<del>"+pe+"</del>"},Ie.link=function(pe,be,ge){if(pe=ce(this.options.sanitize,this.options.baseUrl,pe),pe===null)return ge;var Ce='<a href="'+we(pe)+'"';return be&&(Ce+=' title="'+be+'"'),Ce+=">"+ge+"</a>",Ce},Ie.image=function(pe,be,ge){if(pe=ce(this.options.sanitize,this.options.baseUrl,pe),pe===null)return ge;var Ce='<img src="'+pe+'" alt="'+ge+'"';return be&&(Ce+=' title="'+be+'"'),Ce+=this.options.xhtml?"/>":">",Ce},Ie.text=function(pe){return pe},Ke}(),ke=function(){function Ke(){}var Ie=Ke.prototype;return Ie.strong=function(pe){return pe},Ie.em=function(pe){return pe},Ie.codespan=function(pe){return pe},Ie.del=function(pe){return pe},Ie.html=function(pe){return pe},Ie.text=function(pe){return pe},Ie.link=function(pe,be,ge){return""+ge},Ie.image=function(pe,be,ge){return""+ge},Ie.br=function(){return""},Ke}(),ht=function(){function Ke(){this.seen={}}var Ie=Ke.prototype;return Ie.slug=function(pe){var be=pe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(be)){var ge=be;do this.seen[ge]++,be=ge+"-"+this.seen[ge];while(this.seen.hasOwnProperty(be))}return this.seen[be]=0,be},Ke}(),ft=_.defaults,vt=q.unescape,yt=function(){function Ke(Me){this.options=Me||ft,this.options.renderer=this.options.renderer||new Re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new ht}Ke.parse=function(pe,be){var ge=new Ke(be);return ge.parse(pe)};var Ie=Ke.prototype;return Ie.parse=function(pe,be){be===void 0&&(be=!0);var ge="",Ce,We,Ne,ut,Tt,Ut,St,_t,At,nt,rt,xe,Fe,dt,at,xt,wt,qe,Bt=pe.length;for(Ce=0;Ce<Bt;Ce++){nt=pe[Ce];switch(nt.type){case"space":continue;case"hr":{ge+=this.renderer.hr();continue}case"heading":{ge+=this.renderer.heading(this.parseInline(nt.tokens),nt.depth,vt(this.parseInline(nt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ge+=this.renderer.code(nt.text,nt.lang,nt.escaped);continue}case"table":{for(_t="",St="",ut=nt.header.length,We=0;We<ut;We++)St+=this.renderer.tablecell(this.parseInline(nt.tokens.header[We]),{header:!0,align:nt.align[We]});for(_t+=this.renderer.tablerow(St),At="",ut=nt.cells.length,We=0;We<ut;We++){for(Ut=nt.tokens.cells[We],St="",Tt=Ut.length,Ne=0;Ne<Tt;Ne++)St+=this.renderer.tablecell(this.parseInline(Ut[Ne]),{header:!1,align:nt.align[Ne]});At+=this.renderer.tablerow(St)}ge+=this.renderer.table(_t,At);continue}case"blockquote":{At=this.parse(nt.tokens),ge+=this.renderer.blockquote(At);continue}case"list":{for(rt=nt.ordered,xe=nt.start,Fe=nt.loose,ut=nt.items.length,At="",We=0;We<ut;We++)at=nt.items[We],xt=at.checked,wt=at.task,dt="",at.task&&(qe=this.renderer.checkbox(xt),Fe?at.tokens.length>0&&at.tokens[0].type==="text"?(at.tokens[0].text=qe+" "+at.tokens[0].text,at.tokens[0].tokens&&at.tokens[0].tokens.length>0&&at.tokens[0].tokens[0].type==="text"&&(at.tokens[0].tokens[0].text=qe+" "+at.tokens[0].tokens[0].text)):at.tokens.unshift({type:"text",text:qe}):dt+=qe),dt+=this.parse(at.tokens,Fe),At+=this.renderer.listitem(dt,wt,xt);ge+=this.renderer.list(At,rt,xe);continue}case"html":{ge+=this.renderer.html(nt.text);continue}case"paragraph":{ge+=this.renderer.paragraph(this.parseInline(nt.tokens));continue}case"text":{for(At=nt.tokens?this.parseInline(nt.tokens):nt.text;Ce+1<Bt&&pe[Ce+1].type==="text";)nt=pe[++Ce],At+=`
|
|
`+(nt.tokens?this.parseInline(nt.tokens):nt.text);ge+=be?this.renderer.paragraph(At):At;continue}default:{var Ht='Token with "'+nt.type+'" type was not found.';if(this.options.silent){console.error(Ht);return}else throw new Error(Ht)}}}return ge},Ie.parseInline=function(pe,be){be=be||this.renderer;var ge="",Ce,We,Ne=pe.length;for(Ce=0;Ce<Ne;Ce++){We=pe[Ce];switch(We.type){case"escape":{ge+=be.text(We.text);break}case"html":{ge+=be.html(We.text);break}case"link":{ge+=be.link(We.href,We.title,this.parseInline(We.tokens,be));break}case"image":{ge+=be.image(We.href,We.title,We.text);break}case"strong":{ge+=be.strong(this.parseInline(We.tokens,be));break}case"em":{ge+=be.em(this.parseInline(We.tokens,be));break}case"codespan":{ge+=be.codespan(We.text);break}case"br":{ge+=be.br();break}case"del":{ge+=be.del(this.parseInline(We.tokens,be));break}case"text":{ge+=be.text(We.text);break}default:{var ut='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error(ut);return}else throw new Error(ut)}}}return ge},Ke}(),Lt=q.merge,Mt=q.checkSanitizeDeprecation,Qe=q.escape,Pe=_.getDefaults,lt=_.changeDefaults,pt=_.defaults;function Ze(Ke,Ie,Me){if(typeof Ke=="undefined"||Ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ke)+", string expected");if(typeof Ie=="function"&&(Me=Ie,Ie=null),Ie=Lt({},Ze.defaults,Ie||{}),Mt(Ie),Me){var pe=Ie.highlight,be;try{be=re.lex(Ke,Ie)}catch(Ne){return Me(Ne)}var ge=function(ut){var Tt;if(!ut)try{Tt=yt.parse(be,Ie)}catch(Ut){ut=Ut}return Ie.highlight=pe,ut?Me(ut):Me(null,Tt)};if(!pe||pe.length<3)return ge();if(delete Ie.highlight,!be.length)return ge();var Ce=0;Ze.walkTokens(be,function(Ne){Ne.type==="code"&&(Ce++,setTimeout(function(){pe(Ne.text,Ne.lang,function(ut,Tt){if(ut)return ge(ut);Tt!=null&&Tt!==Ne.text&&(Ne.text=Tt,Ne.escaped=!0),Ce--,Ce===0&&ge()})},0))}),Ce===0&&ge();return}try{var We=re.lex(Ke,Ie);return Ie.walkTokens&&Ze.walkTokens(We,Ie.walkTokens),yt.parse(We,Ie)}catch(Ne){if(Ne.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+Qe(Ne.message+"",!0)+"</pre>";throw Ne}}Ze.options=Ze.setOptions=function(Ke){return Lt(Ze.defaults,Ke),lt(Ze.defaults),Ze},Ze.getDefaults=Pe,Ze.defaults=pt,Ze.use=function(Ke){var Ie=Lt({},Ke);if(Ke.renderer&&function(){var pe=Ze.defaults.renderer||new Re,be=function(We){var Ne=pe[We];pe[We]=function(){for(var ut=arguments.length,Tt=new Array(ut),Ut=0;Ut<ut;Ut++)Tt[Ut]=arguments[Ut];var St=Ke.renderer[We].apply(pe,Tt);return St===!1&&(St=Ne.apply(pe,Tt)),St}};for(var ge in Ke.renderer)be(ge);Ie.renderer=pe}(),Ke.tokenizer&&function(){var pe=Ze.defaults.tokenizer||new Ee,be=function(We){var Ne=pe[We];pe[We]=function(){for(var ut=arguments.length,Tt=new Array(ut),Ut=0;Ut<ut;Ut++)Tt[Ut]=arguments[Ut];var St=Ke.tokenizer[We].apply(pe,Tt);return St===!1&&(St=Ne.apply(pe,Tt)),St}};for(var ge in Ke.tokenizer)be(ge);Ie.tokenizer=pe}(),Ke.walkTokens){var Me=Ze.defaults.walkTokens;Ie.walkTokens=function(pe){Ke.walkTokens(pe),Me&&Me(pe)}}Ze.setOptions(Ie)},Ze.walkTokens=function(Ke,Ie){for(var Me=D(Ke),pe;!(pe=Me()).done;){var be=pe.value;Ie(be);switch(be.type){case"table":{for(var ge=D(be.tokens.header),Ce;!(Ce=ge()).done;){var We=Ce.value;Ze.walkTokens(We,Ie)}for(var Ne=D(be.tokens.cells),ut;!(ut=Ne()).done;)for(var Tt=ut.value,Ut=D(Tt),St;!(St=Ut()).done;){var _t=St.value;Ze.walkTokens(_t,Ie)}break}case"list":{Ze.walkTokens(be.items,Ie);break}default:be.tokens&&Ze.walkTokens(be.tokens,Ie)}}},Ze.Parser=yt,Ze.parser=yt.parse,Ze.Renderer=Re,Ze.TextRenderer=ke,Ze.Lexer=re,Ze.lexer=re.lex,Ze.Tokenizer=Ee,Ze.Slugger=ht,Ze.parse=Ze;var st=Ze;return st})},ELLl:function($e,me,z){(function(J){J(z("VrN/"))})(function(J){var N={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},L=J.Pos;J.defineOption("autoCloseBrackets",!1,function(y,B,u){u&&u!=J.Init&&(y.removeKeyMap(D),y.state.closeBrackets=null),B&&(w(Q(B,"pairs")),y.state.closeBrackets=B,y.addKeyMap(D))});function Q(y,B){return B=="pairs"&&typeof y=="string"?y:typeof y=="object"&&y[B]!=null?y[B]:N[B]}var D={Backspace:C,Enter:x};function w(y){for(var B=0;B<y.length;B++){var u=y.charAt(B),s="'"+u+"'";D[s]||(D[s]=_(u))}}w(N.pairs+"`");function _(y){return function(B){return h(B,y)}}function c(y){var B=y.state.closeBrackets;if(!B||B.override)return B;var u=y.getModeAt(y.getCursor());return u.closeBrackets||B}function C(y){var B=c(y);if(!B||y.getOption("disableInput"))return J.Pass;for(var u=Q(B,"pairs"),s=y.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return J.Pass;var f=O(y,s[l].head);if(!f||u.indexOf(f)%2!=0)return J.Pass}for(var l=s.length-1;l>=0;l--){var m=s[l].head;y.replaceRange("",L(m.line,m.ch-1),L(m.line,m.ch+1),"+delete")}}function x(y){var B=c(y),u=B&&Q(B,"explode");if(!u||y.getOption("disableInput"))return J.Pass;for(var s=y.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return J.Pass;var f=O(y,s[l].head);if(!f||u.indexOf(f)%2!=0)return J.Pass}y.operation(function(){var m=y.lineSeparator()||`
|
|
`;y.replaceSelection(m+m,null),y.execCommand("goCharLeft"),s=y.listSelections();for(var E=0;E<s.length;E++){var v=s[E].head.line;y.indentLine(v,null,!0),y.indentLine(v+1,null,!0)}})}function i(y){var B=J.cmpPos(y.anchor,y.head)>0;return{anchor:new L(y.anchor.line,y.anchor.ch+(B?-1:1)),head:new L(y.head.line,y.head.ch+(B?1:-1))}}function h(y,B){var u=c(y);if(!u||y.getOption("disableInput"))return J.Pass;var s=Q(u,"pairs"),l=s.indexOf(B);if(l==-1)return J.Pass;for(var f=Q(u,"closeBefore"),m=Q(u,"triples"),E=s.charAt(l+1)==B,v=y.listSelections(),R=l%2==0,p,a=0;a<v.length;a++){var r=v[a],n=r.head,o,S=y.getRange(n,L(n.line,n.ch+1));if(R&&!r.empty())o="surround";else if((E||!R)&&S==B)E&&T(y,n)?o="both":m.indexOf(B)>=0&&y.getRange(n,L(n.line,n.ch+3))==B+B+B?o="skipThree":o="skip";else if(E&&n.ch>1&&m.indexOf(B)>=0&&y.getRange(L(n.line,n.ch-2),n)==B+B){if(n.ch>2&&/\bstring/.test(y.getTokenTypeAt(L(n.line,n.ch-2))))return J.Pass;o="addFour"}else if(E){var b=n.ch==0?" ":y.getRange(L(n.line,n.ch-1),n);if(!J.isWordChar(S)&&b!=B&&!J.isWordChar(b))o="both";else return J.Pass}else if(R&&(S.length===0||/\s/.test(S)||f.indexOf(S)>-1))o="both";else return J.Pass;if(!p)p=o;else if(p!=o)return J.Pass}var g=l%2?s.charAt(l-1):B,U=l%2?B:s.charAt(l+1);y.operation(function(){if(p=="skip")y.execCommand("goCharRight");else if(p=="skipThree")for(var K=0;K<3;K++)y.execCommand("goCharRight");else if(p=="surround"){for(var W=y.getSelections(),K=0;K<W.length;K++)W[K]=g+W[K]+U;y.replaceSelections(W,"around"),W=y.listSelections().slice();for(var K=0;K<W.length;K++)W[K]=i(W[K]);y.setSelections(W)}else p=="both"?(y.replaceSelection(g+U,null),y.triggerElectric(g+U),y.execCommand("goCharLeft")):p=="addFour"&&(y.replaceSelection(g+g+g+g,"before"),y.execCommand("goCharRight"))})}function O(y,B){var u=y.getRange(L(B.line,B.ch-1),L(B.line,B.ch+1));return u.length==2?u:null}function T(y,B){var u=y.getTokenAt(L(B.line,B.ch+1));return/\bstring/.test(u.type)&&u.start==B.ch&&(B.ch==0||!/\bstring/.test(y.getTokenTypeAt(B)))}})},Fofx:function($e,me){var z=typeof Float32Array=="undefined"?Array:Float32Array;function J(){var x=new z(6);return N(x),x}function N(x){return x[0]=1,x[1]=0,x[2]=0,x[3]=1,x[4]=0,x[5]=0,x}function L(x,i){return x[0]=i[0],x[1]=i[1],x[2]=i[2],x[3]=i[3],x[4]=i[4],x[5]=i[5],x}function Q(x,i,h){var O=i[0]*h[0]+i[2]*h[1],T=i[1]*h[0]+i[3]*h[1],y=i[0]*h[2]+i[2]*h[3],B=i[1]*h[2]+i[3]*h[3],u=i[0]*h[4]+i[2]*h[5]+i[4],s=i[1]*h[4]+i[3]*h[5]+i[5];return x[0]=O,x[1]=T,x[2]=y,x[3]=B,x[4]=u,x[5]=s,x}function D(x,i,h){return x[0]=i[0],x[1]=i[1],x[2]=i[2],x[3]=i[3],x[4]=i[4]+h[0],x[5]=i[5]+h[1],x}function w(x,i,h){var O=i[0],T=i[2],y=i[4],B=i[1],u=i[3],s=i[5],l=Math.sin(h),f=Math.cos(h);return x[0]=O*f+B*l,x[1]=-O*l+B*f,x[2]=T*f+u*l,x[3]=-T*l+f*u,x[4]=f*y+l*s,x[5]=f*s-l*y,x}function _(x,i,h){var O=h[0],T=h[1];return x[0]=i[0]*O,x[1]=i[1]*T,x[2]=i[2]*O,x[3]=i[3]*T,x[4]=i[4]*O,x[5]=i[5]*T,x}function c(x,i){var h=i[0],O=i[2],T=i[4],y=i[1],B=i[3],u=i[5],s=h*B-y*O;return s?(s=1/s,x[0]=B*s,x[1]=-y*s,x[2]=-O*s,x[3]=h*s,x[4]=(O*u-B*T)*s,x[5]=(y*T-h*u)*s,x):null}function C(x){var i=J();return L(i,x),i}me.create=J,me.identity=N,me.copy=L,me.mul=Q,me.translate=D,me.rotate=w,me.scale=_,me.invert=c,me.clone=C},FxDU:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.createSensor=void 0;var J=z("QO+J"),N=z("j5sG"),L=typeof ResizeObserver!="undefined"?N.createSensor:J.createSensor;me.createSensor=L},Gev7:function($e,me,z){var J=z("bYtY"),N=z("K2GJ"),L=z("1bdT"),Q=z("ni6a");function D(_){_=_||{},L.call(this,_);for(var c in _)_.hasOwnProperty(c)&&c!=="style"&&(this[c]=_[c]);this.style=new N(_.style,this),this._rect=null,this.__clipPaths=null}D.prototype={constructor:D,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(_){},afterBrush:function(_){},brush:function(_,c){},getBoundingRect:function(){},contain:function(_,c){return this.rectContain(_,c)},traverse:function(_,c){_.call(c,this)},rectContain:function(_,c){var C=this.transformCoordToLocal(_,c),x=this.getBoundingRect();return x.contain(C[0],C[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(_){return this.animate("style",_)},attrKV:function(_,c){_!=="style"?L.prototype.attrKV.call(this,_,c):this.style.set(c)},setStyle:function(_,c){return this.style.set(_,c),this.dirty(!1),this},useStyle:function(_){return this.style=new N(_,this),this.dirty(!1),this},calculateTextPosition:null},J.inherits(D,L),J.mixin(D,Q);var w=D;$e.exports=w},Gytx:function($e,me){$e.exports=function(J,N,L,Q){var D=L?L.call(Q,J,N):void 0;if(D!==void 0)return!!D;if(J===N)return!0;if(typeof J!="object"||!J||typeof N!="object"||!N)return!1;var w=Object.keys(J),_=Object.keys(N);if(w.length!==_.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(N),C=0;C<w.length;C++){var x=w[C];if(!c(x))return!1;var i=J[x],h=N[x];if(D=L?L.call(Q,i,h,x):void 0,D===!1||D===void 0&&i!==h)return!1}return!0}},H6uX:function($e,me){var z=Array.prototype.slice,J=function(D){this._$handlers={},this._$eventProcessor=D};J.prototype={constructor:J,one:function(D,w,_,c){return L(this,D,w,_,c,!0)},on:function(D,w,_,c){return L(this,D,w,_,c,!1)},isSilent:function(D){var w=this._$handlers;return!w[D]||!w[D].length},off:function(D,w){var _=this._$handlers;if(!D)return this._$handlers={},this;if(w){if(_[D]){for(var c=[],C=0,x=_[D].length;C<x;C++)_[D][C].h!==w&&c.push(_[D][C]);_[D]=c}_[D]&&_[D].length===0&&delete _[D]}else delete _[D];return this},trigger:function(D){var w=this._$handlers[D],_=this._$eventProcessor;if(w){var c=arguments,C=c.length;C>3&&(c=z.call(c,1));for(var x=w.length,i=0;i<x;){var h=w[i];if(_&&_.filter&&h.query!=null&&!_.filter(D,h.query)){i++;continue}switch(C){case 1:h.h.call(h.ctx);break;case 2:h.h.call(h.ctx,c[1]);break;case 3:h.h.call(h.ctx,c[1],c[2]);break;default:h.h.apply(h.ctx,c);break}h.one?(w.splice(i,1),x--):i++}}return _&&_.afterTrigger&&_.afterTrigger(D),this},triggerWithContext:function(D){var w=this._$handlers[D],_=this._$eventProcessor;if(w){var c=arguments,C=c.length;C>4&&(c=z.call(c,1,c.length-1));for(var x=c[c.length-1],i=w.length,h=0;h<i;){var O=w[h];if(_&&_.filter&&O.query!=null&&!_.filter(D,O.query)){h++;continue}switch(C){case 1:O.h.call(x);break;case 2:O.h.call(x,c[1]);break;case 3:O.h.call(x,c[1],c[2]);break;default:O.h.apply(x,c);break}O.one?(w.splice(h,1),i--):h++}}return _&&_.afterTrigger&&_.afterTrigger(D),this}};function N(D,w){var _=D._$eventProcessor;return w!=null&&_&&_.normalizeQuery&&(w=_.normalizeQuery(w)),w}function L(D,w,_,c,C,x){var i=D._$handlers;if(typeof _=="function"&&(C=c,c=_,_=null),!c||!w)return D;_=N(D,_),i[w]||(i[w]=[]);for(var h=0;h<i[w].length;h++)if(i[w][h].h===c)return D;var O={h:c,one:x,query:_,ctx:C||D,callAtLast:c.zrEventfulCallAtLast},T=i[w].length-1,y=i[w][T];return y&&y.callAtLast?i[w].splice(T,0,O):i[w].push(O),D}var Q=J;$e.exports=Q},H7XF:function($e,me,z){"use strict";me.byteLength=c,me.toByteArray=x,me.fromByteArray=O;for(var J=[],N=[],L=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,w=Q.length;D<w;++D)J[D]=Q[D],N[Q.charCodeAt(D)]=D;N["-".charCodeAt(0)]=62,N["_".charCodeAt(0)]=63;function _(T){var y=T.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var B=T.indexOf("=");B===-1&&(B=y);var u=B===y?0:4-B%4;return[B,u]}function c(T){var y=_(T),B=y[0],u=y[1];return(B+u)*3/4-u}function C(T,y,B){return(y+B)*3/4-B}function x(T){var y,B=_(T),u=B[0],s=B[1],l=new L(C(T,u,s)),f=0,m=s>0?u-4:u,E;for(E=0;E<m;E+=4)y=N[T.charCodeAt(E)]<<18|N[T.charCodeAt(E+1)]<<12|N[T.charCodeAt(E+2)]<<6|N[T.charCodeAt(E+3)],l[f++]=y>>16&255,l[f++]=y>>8&255,l[f++]=y&255;return s===2&&(y=N[T.charCodeAt(E)]<<2|N[T.charCodeAt(E+1)]>>4,l[f++]=y&255),s===1&&(y=N[T.charCodeAt(E)]<<10|N[T.charCodeAt(E+1)]<<4|N[T.charCodeAt(E+2)]>>2,l[f++]=y>>8&255,l[f++]=y&255),l}function i(T){return J[T>>18&63]+J[T>>12&63]+J[T>>6&63]+J[T&63]}function h(T,y,B){for(var u,s=[],l=y;l<B;l+=3)u=(T[l]<<16&16711680)+(T[l+1]<<8&65280)+(T[l+2]&255),s.push(i(u));return s.join("")}function O(T){for(var y,B=T.length,u=B%3,s=[],l=16383,f=0,m=B-u;f<m;f+=l)s.push(h(T,f,f+l>m?m:f+l));return u===1?(y=T[B-1],s.push(J[y>>2]+J[y<<4&63]+"==")):u===2&&(y=(T[B-2]<<8)+T[B-1],s.push(J[y>>10]+J[y>>4&63]+J[y<<2&63]+"=")),s.join("")}},HDXh:function($e,me,z){"use strict";(function(J){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var N=z("H7XF"),L=z("kVK+"),Q=z("49sm");me.Buffer=c,me.SlowBuffer=s,me.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=J.TYPED_ARRAY_SUPPORT!==void 0?J.TYPED_ARRAY_SUPPORT:D(),me.kMaxLength=w();function D(){try{var Ae=new Uint8Array(1);return Ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ae.foo()===42&&typeof Ae.subarray=="function"&&Ae.subarray(1,1).byteLength===0}catch(re){return!1}}function w(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(Ae,re){if(w()<re)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(Ae=new Uint8Array(re),Ae.__proto__=c.prototype):(Ae===null&&(Ae=new c(re)),Ae.length=re),Ae}function c(Ae,re,ae){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(Ae,re,ae);if(typeof Ae=="number"){if(typeof re=="string")throw new Error("If encoding is specified then the first argument must be a string");return h(this,Ae)}return C(this,Ae,re,ae)}c.poolSize=8192,c._augment=function(Ae){return Ae.__proto__=c.prototype,Ae};function C(Ae,re,ae,ce){if(typeof re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&re instanceof ArrayBuffer?y(Ae,re,ae,ce):typeof re=="string"?O(Ae,re,ae):B(Ae,re)}c.from=function(Ae,re,ae){return C(null,Ae,re,ae)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));function x(Ae){if(typeof Ae!="number")throw new TypeError('"size" argument must be a number');if(Ae<0)throw new RangeError('"size" argument must not be negative')}function i(Ae,re,ae,ce){return x(re),re<=0?_(Ae,re):ae!==void 0?typeof ce=="string"?_(Ae,re).fill(ae,ce):_(Ae,re).fill(ae):_(Ae,re)}c.alloc=function(Ae,re,ae){return i(null,Ae,re,ae)};function h(Ae,re){if(x(re),Ae=_(Ae,re<0?0:u(re)|0),!c.TYPED_ARRAY_SUPPORT)for(var ae=0;ae<re;++ae)Ae[ae]=0;return Ae}c.allocUnsafe=function(Ae){return h(null,Ae)},c.allocUnsafeSlow=function(Ae){return h(null,Ae)};function O(Ae,re,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!c.isEncoding(ae))throw new TypeError('"encoding" must be a valid string encoding');var ce=l(re,ae)|0;Ae=_(Ae,ce);var we=Ae.write(re,ae);return we!==ce&&(Ae=Ae.slice(0,we)),Ae}function T(Ae,re){var ae=re.length<0?0:u(re.length)|0;Ae=_(Ae,ae);for(var ce=0;ce<ae;ce+=1)Ae[ce]=re[ce]&255;return Ae}function y(Ae,re,ae,ce){if(re.byteLength,ae<0||re.byteLength<ae)throw new RangeError("'offset' is out of bounds");if(re.byteLength<ae+(ce||0))throw new RangeError("'length' is out of bounds");return ae===void 0&&ce===void 0?re=new Uint8Array(re):ce===void 0?re=new Uint8Array(re,ae):re=new Uint8Array(re,ae,ce),c.TYPED_ARRAY_SUPPORT?(Ae=re,Ae.__proto__=c.prototype):Ae=T(Ae,re),Ae}function B(Ae,re){if(c.isBuffer(re)){var ae=u(re.length)|0;return Ae=_(Ae,ae),Ae.length===0||re.copy(Ae,0,0,ae),Ae}if(re){if(typeof ArrayBuffer!="undefined"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||it(re.length)?_(Ae,0):T(Ae,re);if(re.type==="Buffer"&&Q(re.data))return T(Ae,re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function u(Ae){if(Ae>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return Ae|0}function s(Ae){return+Ae!=Ae&&(Ae=0),c.alloc(+Ae)}c.isBuffer=function(re){return!!(re!=null&&re._isBuffer)},c.compare=function(re,ae){if(!c.isBuffer(re)||!c.isBuffer(ae))throw new TypeError("Arguments must be Buffers");if(re===ae)return 0;for(var ce=re.length,we=ae.length,Re=0,ke=Math.min(ce,we);Re<ke;++Re)if(re[Re]!==ae[Re]){ce=re[Re],we=ae[Re];break}return ce<we?-1:we<ce?1:0},c.isEncoding=function(re){switch(String(re).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(re,ae){if(!Q(re))throw new TypeError('"list" argument must be an Array of Buffers');if(re.length===0)return c.alloc(0);var ce;if(ae===void 0)for(ae=0,ce=0;ce<re.length;++ce)ae+=re[ce].length;var we=c.allocUnsafe(ae),Re=0;for(ce=0;ce<re.length;++ce){var ke=re[ce];if(!c.isBuffer(ke))throw new TypeError('"list" argument must be an Array of Buffers');ke.copy(we,Re),Re+=ke.length}return we};function l(Ae,re){if(c.isBuffer(Ae))return Ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ae)||Ae instanceof ArrayBuffer))return Ae.byteLength;typeof Ae!="string"&&(Ae=""+Ae);var ae=Ae.length;if(ae===0)return 0;for(var ce=!1;;)switch(re){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":case void 0:return Le(Ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return Oe(Ae).length;default:if(ce)return Le(Ae).length;re=(""+re).toLowerCase(),ce=!0}}c.byteLength=l;function f(Ae,re,ae){var ce=!1;if((re===void 0||re<0)&&(re=0),re>this.length)return"";if((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)return"";if(ae>>>=0,re>>>=0,ae<=re)return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return q(this,re,ae);case"utf8":case"utf-8":return b(this,re,ae);case"ascii":return K(this,re,ae);case"latin1":case"binary":return W(this,re,ae);case"base64":return S(this,re,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,re,ae);default:if(ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),ce=!0}}c.prototype._isBuffer=!0;function m(Ae,re,ae){var ce=Ae[re];Ae[re]=Ae[ae],Ae[ae]=ce}c.prototype.swap16=function(){var re=this.length;if(re%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;ae<re;ae+=2)m(this,ae,ae+1);return this},c.prototype.swap32=function(){var re=this.length;if(re%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ae=0;ae<re;ae+=4)m(this,ae,ae+3),m(this,ae+1,ae+2);return this},c.prototype.swap64=function(){var re=this.length;if(re%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ae=0;ae<re;ae+=8)m(this,ae,ae+7),m(this,ae+1,ae+6),m(this,ae+2,ae+5),m(this,ae+3,ae+4);return this},c.prototype.toString=function(){var re=this.length|0;return re===0?"":arguments.length===0?b(this,0,re):f.apply(this,arguments)},c.prototype.equals=function(re){if(!c.isBuffer(re))throw new TypeError("Argument must be a Buffer");return this===re?!0:c.compare(this,re)===0},c.prototype.inspect=function(){var re="",ae=me.INSPECT_MAX_BYTES;return this.length>0&&(re=this.toString("hex",0,ae).match(/.{2}/g).join(" "),this.length>ae&&(re+=" ... ")),"<Buffer "+re+">"},c.prototype.compare=function(re,ae,ce,we,Re){if(!c.isBuffer(re))throw new TypeError("Argument must be a Buffer");if(ae===void 0&&(ae=0),ce===void 0&&(ce=re?re.length:0),we===void 0&&(we=0),Re===void 0&&(Re=this.length),ae<0||ce>re.length||we<0||Re>this.length)throw new RangeError("out of range index");if(we>=Re&&ae>=ce)return 0;if(we>=Re)return-1;if(ae>=ce)return 1;if(ae>>>=0,ce>>>=0,we>>>=0,Re>>>=0,this===re)return 0;for(var ke=Re-we,ht=ce-ae,ft=Math.min(ke,ht),vt=this.slice(we,Re),yt=re.slice(ae,ce),Lt=0;Lt<ft;++Lt)if(vt[Lt]!==yt[Lt]){ke=vt[Lt],ht=yt[Lt];break}return ke<ht?-1:ht<ke?1:0};function E(Ae,re,ae,ce,we){if(Ae.length===0)return-1;if(typeof ae=="string"?(ce=ae,ae=0):ae>2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,isNaN(ae)&&(ae=we?0:Ae.length-1),ae<0&&(ae=Ae.length+ae),ae>=Ae.length){if(we)return-1;ae=Ae.length-1}else if(ae<0)if(we)ae=0;else return-1;if(typeof re=="string"&&(re=c.from(re,ce)),c.isBuffer(re))return re.length===0?-1:v(Ae,re,ae,ce,we);if(typeof re=="number")return re=re&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(Ae,re,ae):Uint8Array.prototype.lastIndexOf.call(Ae,re,ae):v(Ae,[re],ae,ce,we);throw new TypeError("val must be string, number or Buffer")}function v(Ae,re,ae,ce,we){var Re=1,ke=Ae.length,ht=re.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(Ae.length<2||re.length<2)return-1;Re=2,ke/=2,ht/=2,ae/=2}function ft(Qe,Pe){return Re===1?Qe[Pe]:Qe.readUInt16BE(Pe*Re)}var vt;if(we){var yt=-1;for(vt=ae;vt<ke;vt++)if(ft(Ae,vt)===ft(re,yt===-1?0:vt-yt)){if(yt===-1&&(yt=vt),vt-yt+1===ht)return yt*Re}else yt!==-1&&(vt-=vt-yt),yt=-1}else for(ae+ht>ke&&(ae=ke-ht),vt=ae;vt>=0;vt--){for(var Lt=!0,Mt=0;Mt<ht;Mt++)if(ft(Ae,vt+Mt)!==ft(re,Mt)){Lt=!1;break}if(Lt)return vt}return-1}c.prototype.includes=function(re,ae,ce){return this.indexOf(re,ae,ce)!==-1},c.prototype.indexOf=function(re,ae,ce){return E(this,re,ae,ce,!0)},c.prototype.lastIndexOf=function(re,ae,ce){return E(this,re,ae,ce,!1)};function R(Ae,re,ae,ce){ae=Number(ae)||0;var we=Ae.length-ae;ce?(ce=Number(ce),ce>we&&(ce=we)):ce=we;var Re=re.length;if(Re%2!==0)throw new TypeError("Invalid hex string");ce>Re/2&&(ce=Re/2);for(var ke=0;ke<ce;++ke){var ht=parseInt(re.substr(ke*2,2),16);if(isNaN(ht))return ke;Ae[ae+ke]=ht}return ke}function p(Ae,re,ae,ce){return He(Le(re,Ae.length-ae),Ae,ae,ce)}function a(Ae,re,ae,ce){return He(tt(re),Ae,ae,ce)}function r(Ae,re,ae,ce){return a(Ae,re,ae,ce)}function n(Ae,re,ae,ce){return He(Oe(re),Ae,ae,ce)}function o(Ae,re,ae,ce){return He(Et(re,Ae.length-ae),Ae,ae,ce)}c.prototype.write=function(re,ae,ce,we){if(ae===void 0)we="utf8",ce=this.length,ae=0;else if(ce===void 0&&typeof ae=="string")we=ae,ce=this.length,ae=0;else if(isFinite(ae))ae=ae|0,isFinite(ce)?(ce=ce|0,we===void 0&&(we="utf8")):(we=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Re=this.length-ae;if((ce===void 0||ce>Re)&&(ce=Re),re.length>0&&(ce<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");for(var ke=!1;;)switch(we){case"hex":return R(this,re,ae,ce);case"utf8":case"utf-8":return p(this,re,ae,ce);case"ascii":return a(this,re,ae,ce);case"latin1":case"binary":return r(this,re,ae,ce);case"base64":return n(this,re,ae,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,re,ae,ce);default:if(ke)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),ke=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(Ae,re,ae){return re===0&&ae===Ae.length?N.fromByteArray(Ae):N.fromByteArray(Ae.slice(re,ae))}function b(Ae,re,ae){ae=Math.min(Ae.length,ae);for(var ce=[],we=re;we<ae;){var Re=Ae[we],ke=null,ht=Re>239?4:Re>223?3:Re>191?2:1;if(we+ht<=ae){var ft,vt,yt,Lt;switch(ht){case 1:Re<128&&(ke=Re);break;case 2:ft=Ae[we+1],(ft&192)===128&&(Lt=(Re&31)<<6|ft&63,Lt>127&&(ke=Lt));break;case 3:ft=Ae[we+1],vt=Ae[we+2],(ft&192)===128&&(vt&192)===128&&(Lt=(Re&15)<<12|(ft&63)<<6|vt&63,Lt>2047&&(Lt<55296||Lt>57343)&&(ke=Lt));break;case 4:ft=Ae[we+1],vt=Ae[we+2],yt=Ae[we+3],(ft&192)===128&&(vt&192)===128&&(yt&192)===128&&(Lt=(Re&15)<<18|(ft&63)<<12|(vt&63)<<6|yt&63,Lt>65535&&Lt<1114112&&(ke=Lt))}}ke===null?(ke=65533,ht=1):ke>65535&&(ke-=65536,ce.push(ke>>>10&1023|55296),ke=56320|ke&1023),ce.push(ke),we+=ht}return U(ce)}var g=4096;function U(Ae){var re=Ae.length;if(re<=g)return String.fromCharCode.apply(String,Ae);for(var ae="",ce=0;ce<re;)ae+=String.fromCharCode.apply(String,Ae.slice(ce,ce+=g));return ae}function K(Ae,re,ae){var ce="";ae=Math.min(Ae.length,ae);for(var we=re;we<ae;++we)ce+=String.fromCharCode(Ae[we]&127);return ce}function W(Ae,re,ae){var ce="";ae=Math.min(Ae.length,ae);for(var we=re;we<ae;++we)ce+=String.fromCharCode(Ae[we]);return ce}function q(Ae,re,ae){var ce=Ae.length;(!re||re<0)&&(re=0),(!ae||ae<0||ae>ce)&&(ae=ce);for(var we="",Re=re;Re<ae;++Re)we+=_e(Ae[Re]);return we}function Y(Ae,re,ae){for(var ce=Ae.slice(re,ae),we="",Re=0;Re<ce.length;Re+=2)we+=String.fromCharCode(ce[Re]+ce[Re+1]*256);return we}c.prototype.slice=function(re,ae){var ce=this.length;re=~~re,ae=ae===void 0?ce:~~ae,re<0?(re+=ce,re<0&&(re=0)):re>ce&&(re=ce),ae<0?(ae+=ce,ae<0&&(ae=0)):ae>ce&&(ae=ce),ae<re&&(ae=re);var we;if(c.TYPED_ARRAY_SUPPORT)we=this.subarray(re,ae),we.__proto__=c.prototype;else{var Re=ae-re;we=new c(Re,void 0);for(var ke=0;ke<Re;++ke)we[ke]=this[ke+re]}return we};function V(Ae,re,ae){if(Ae%1!==0||Ae<0)throw new RangeError("offset is not uint");if(Ae+re>ae)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(re,ae,ce){re=re|0,ae=ae|0,ce||V(re,ae,this.length);for(var we=this[re],Re=1,ke=0;++ke<ae&&(Re*=256);)we+=this[re+ke]*Re;return we},c.prototype.readUIntBE=function(re,ae,ce){re=re|0,ae=ae|0,ce||V(re,ae,this.length);for(var we=this[re+--ae],Re=1;ae>0&&(Re*=256);)we+=this[re+--ae]*Re;return we},c.prototype.readUInt8=function(re,ae){return ae||V(re,1,this.length),this[re]},c.prototype.readUInt16LE=function(re,ae){return ae||V(re,2,this.length),this[re]|this[re+1]<<8},c.prototype.readUInt16BE=function(re,ae){return ae||V(re,2,this.length),this[re]<<8|this[re+1]},c.prototype.readUInt32LE=function(re,ae){return ae||V(re,4,this.length),(this[re]|this[re+1]<<8|this[re+2]<<16)+this[re+3]*16777216},c.prototype.readUInt32BE=function(re,ae){return ae||V(re,4,this.length),this[re]*16777216+(this[re+1]<<16|this[re+2]<<8|this[re+3])},c.prototype.readIntLE=function(re,ae,ce){re=re|0,ae=ae|0,ce||V(re,ae,this.length);for(var we=this[re],Re=1,ke=0;++ke<ae&&(Re*=256);)we+=this[re+ke]*Re;return Re*=128,we>=Re&&(we-=Math.pow(2,8*ae)),we},c.prototype.readIntBE=function(re,ae,ce){re=re|0,ae=ae|0,ce||V(re,ae,this.length);for(var we=ae,Re=1,ke=this[re+--we];we>0&&(Re*=256);)ke+=this[re+--we]*Re;return Re*=128,ke>=Re&&(ke-=Math.pow(2,8*ae)),ke},c.prototype.readInt8=function(re,ae){return ae||V(re,1,this.length),this[re]&128?(255-this[re]+1)*-1:this[re]},c.prototype.readInt16LE=function(re,ae){ae||V(re,2,this.length);var ce=this[re]|this[re+1]<<8;return ce&32768?ce|4294901760:ce},c.prototype.readInt16BE=function(re,ae){ae||V(re,2,this.length);var ce=this[re+1]|this[re]<<8;return ce&32768?ce|4294901760:ce},c.prototype.readInt32LE=function(re,ae){return ae||V(re,4,this.length),this[re]|this[re+1]<<8|this[re+2]<<16|this[re+3]<<24},c.prototype.readInt32BE=function(re,ae){return ae||V(re,4,this.length),this[re]<<24|this[re+1]<<16|this[re+2]<<8|this[re+3]},c.prototype.readFloatLE=function(re,ae){return ae||V(re,4,this.length),L.read(this,re,!0,23,4)},c.prototype.readFloatBE=function(re,ae){return ae||V(re,4,this.length),L.read(this,re,!1,23,4)},c.prototype.readDoubleLE=function(re,ae){return ae||V(re,8,this.length),L.read(this,re,!0,52,8)},c.prototype.readDoubleBE=function(re,ae){return ae||V(re,8,this.length),L.read(this,re,!1,52,8)};function te(Ae,re,ae,ce,we,Re){if(!c.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(re>we||re<Re)throw new RangeError('"value" argument is out of bounds');if(ae+ce>Ae.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(re,ae,ce,we){if(re=+re,ae=ae|0,ce=ce|0,!we){var Re=Math.pow(2,8*ce)-1;te(this,re,ae,ce,Re,0)}var ke=1,ht=0;for(this[ae]=re&255;++ht<ce&&(ke*=256);)this[ae+ht]=re/ke&255;return ae+ce},c.prototype.writeUIntBE=function(re,ae,ce,we){if(re=+re,ae=ae|0,ce=ce|0,!we){var Re=Math.pow(2,8*ce)-1;te(this,re,ae,ce,Re,0)}var ke=ce-1,ht=1;for(this[ae+ke]=re&255;--ke>=0&&(ht*=256);)this[ae+ke]=re/ht&255;return ae+ce},c.prototype.writeUInt8=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,1,255,0),c.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),this[ae]=re&255,ae+1};function X(Ae,re,ae,ce){re<0&&(re=65535+re+1);for(var we=0,Re=Math.min(Ae.length-ae,2);we<Re;++we)Ae[ae+we]=(re&255<<8*(ce?we:1-we))>>>(ce?we:1-we)*8}c.prototype.writeUInt16LE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[ae]=re&255,this[ae+1]=re>>>8):X(this,re,ae,!0),ae+2},c.prototype.writeUInt16BE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[ae]=re>>>8,this[ae+1]=re&255):X(this,re,ae,!1),ae+2};function se(Ae,re,ae,ce){re<0&&(re=4294967295+re+1);for(var we=0,Re=Math.min(Ae.length-ae,4);we<Re;++we)Ae[ae+we]=re>>>(ce?we:3-we)*8&255}c.prototype.writeUInt32LE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[ae+3]=re>>>24,this[ae+2]=re>>>16,this[ae+1]=re>>>8,this[ae]=re&255):se(this,re,ae,!0),ae+4},c.prototype.writeUInt32BE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[ae]=re>>>24,this[ae+1]=re>>>16,this[ae+2]=re>>>8,this[ae+3]=re&255):se(this,re,ae,!1),ae+4},c.prototype.writeIntLE=function(re,ae,ce,we){if(re=+re,ae=ae|0,!we){var Re=Math.pow(2,8*ce-1);te(this,re,ae,ce,Re-1,-Re)}var ke=0,ht=1,ft=0;for(this[ae]=re&255;++ke<ce&&(ht*=256);)re<0&&ft===0&&this[ae+ke-1]!==0&&(ft=1),this[ae+ke]=(re/ht>>0)-ft&255;return ae+ce},c.prototype.writeIntBE=function(re,ae,ce,we){if(re=+re,ae=ae|0,!we){var Re=Math.pow(2,8*ce-1);te(this,re,ae,ce,Re-1,-Re)}var ke=ce-1,ht=1,ft=0;for(this[ae+ke]=re&255;--ke>=0&&(ht*=256);)re<0&&ft===0&&this[ae+ke+1]!==0&&(ft=1),this[ae+ke]=(re/ht>>0)-ft&255;return ae+ce},c.prototype.writeInt8=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,1,127,-128),c.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),re<0&&(re=255+re+1),this[ae]=re&255,ae+1},c.prototype.writeInt16LE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[ae]=re&255,this[ae+1]=re>>>8):X(this,re,ae,!0),ae+2},c.prototype.writeInt16BE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[ae]=re>>>8,this[ae+1]=re&255):X(this,re,ae,!1),ae+2},c.prototype.writeInt32LE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[ae]=re&255,this[ae+1]=re>>>8,this[ae+2]=re>>>16,this[ae+3]=re>>>24):se(this,re,ae,!0),ae+4},c.prototype.writeInt32BE=function(re,ae,ce){return re=+re,ae=ae|0,ce||te(this,re,ae,4,2147483647,-2147483648),re<0&&(re=4294967295+re+1),c.TYPED_ARRAY_SUPPORT?(this[ae]=re>>>24,this[ae+1]=re>>>16,this[ae+2]=re>>>8,this[ae+3]=re&255):se(this,re,ae,!1),ae+4};function le(Ae,re,ae,ce,we,Re){if(ae+ce>Ae.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function Te(Ae,re,ae,ce,we){return we||le(Ae,re,ae,4,34028234663852886e22,-34028234663852886e22),L.write(Ae,re,ae,ce,23,4),ae+4}c.prototype.writeFloatLE=function(re,ae,ce){return Te(this,re,ae,!0,ce)},c.prototype.writeFloatBE=function(re,ae,ce){return Te(this,re,ae,!1,ce)};function Ee(Ae,re,ae,ce,we){return we||le(Ae,re,ae,8,17976931348623157e292,-17976931348623157e292),L.write(Ae,re,ae,ce,52,8),ae+8}c.prototype.writeDoubleLE=function(re,ae,ce){return Ee(this,re,ae,!0,ce)},c.prototype.writeDoubleBE=function(re,ae,ce){return Ee(this,re,ae,!1,ce)},c.prototype.copy=function(re,ae,ce,we){if(ce||(ce=0),!we&&we!==0&&(we=this.length),ae>=re.length&&(ae=re.length),ae||(ae=0),we>0&&we<ce&&(we=ce),we===ce)return 0;if(re.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(ce<0||ce>=this.length)throw new RangeError("sourceStart out of bounds");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),re.length-ae<we-ce&&(we=re.length-ae+ce);var Re=we-ce,ke;if(this===re&&ce<ae&&ae<we)for(ke=Re-1;ke>=0;--ke)re[ke+ae]=this[ke+ce];else if(Re<1e3||!c.TYPED_ARRAY_SUPPORT)for(ke=0;ke<Re;++ke)re[ke+ae]=this[ke+ce];else Uint8Array.prototype.set.call(re,this.subarray(ce,ce+Re),ae);return Re},c.prototype.fill=function(re,ae,ce,we){if(typeof re=="string"){if(typeof ae=="string"?(we=ae,ae=0,ce=this.length):typeof ce=="string"&&(we=ce,ce=this.length),re.length===1){var Re=re.charCodeAt(0);Re<256&&(re=Re)}if(we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!c.isEncoding(we))throw new TypeError("Unknown encoding: "+we)}else typeof re=="number"&&(re=re&255);if(ae<0||this.length<ae||this.length<ce)throw new RangeError("Out of range index");if(ce<=ae)return this;ae=ae>>>0,ce=ce===void 0?this.length:ce>>>0,re||(re=0);var ke;if(typeof re=="number")for(ke=ae;ke<ce;++ke)this[ke]=re;else{var ht=c.isBuffer(re)?re:Le(new c(re,we).toString()),ft=ht.length;for(ke=0;ke<ce-ae;++ke)this[ke+ae]=ht[ke%ft]}return this};var Be=/[^+\/0-9A-Za-z-_]/g;function De(Ae){if(Ae=Ve(Ae).replace(Be,""),Ae.length<2)return"";for(;Ae.length%4!==0;)Ae=Ae+"=";return Ae}function Ve(Ae){return Ae.trim?Ae.trim():Ae.replace(/^\s+|\s+$/g,"")}function _e(Ae){return Ae<16?"0"+Ae.toString(16):Ae.toString(16)}function Le(Ae,re){re=re||Infinity;for(var ae,ce=Ae.length,we=null,Re=[],ke=0;ke<ce;++ke){if(ae=Ae.charCodeAt(ke),ae>55295&&ae<57344){if(!we){if(ae>56319){(re-=3)>-1&&Re.push(239,191,189);continue}else if(ke+1===ce){(re-=3)>-1&&Re.push(239,191,189);continue}we=ae;continue}if(ae<56320){(re-=3)>-1&&Re.push(239,191,189),we=ae;continue}ae=(we-55296<<10|ae-56320)+65536}else we&&((re-=3)>-1&&Re.push(239,191,189));if(we=null,ae<128){if((re-=1)<0)break;Re.push(ae)}else if(ae<2048){if((re-=2)<0)break;Re.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((re-=3)<0)break;Re.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((re-=4)<0)break;Re.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return Re}function tt(Ae){for(var re=[],ae=0;ae<Ae.length;++ae)re.push(Ae.charCodeAt(ae)&255);return re}function Et(Ae,re){for(var ae,ce,we,Re=[],ke=0;ke<Ae.length&&!((re-=2)<0);++ke)ae=Ae.charCodeAt(ke),ce=ae>>8,we=ae%256,Re.push(we),Re.push(ce);return Re}function Oe(Ae){return N.toByteArray(De(Ae))}function He(Ae,re,ae,ce){for(var we=0;we<ce&&!(we+ae>=re.length||we>=Ae.length);++we)re[we+ae]=Ae[we];return we}function it(Ae){return Ae!==Ae}}).call(this,z("IyRk"))},HmJG:function($e,me,z){},I8Z2:function($e,me,z){"use strict";z.d(me,"a",function(){return Q}),z.d(me,"b",function(){return O}),z.d(me,"c",function(){return y});var J=z("q1tI"),N=function(){var B=function(u,s){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var m in f)f.hasOwnProperty(m)&&(l[m]=f[m])},B(u,s)};return function(u,s){B(u,s);function l(){this.constructor=u}u.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),L=J.createContext(null),Q=function(B){N(u,B);function u(){return B!==null&&B.apply(this,arguments)||this}return u.prototype.render=function(){return J.createElement(L.Provider,{value:this.props.store},this.props.children)},u}(J.Component),D=z("Gytx"),w=z.n(D),_=z("2mql"),c=z.n(_),C=function(){var B=function(u,s){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var m in f)f.hasOwnProperty(m)&&(l[m]=f[m])},B(u,s)};return function(u,s){B(u,s);function l(){this.constructor=u}u.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),x=function(){return x=Object.assign||function(B){for(var u,s=1,l=arguments.length;s<l;s++){u=arguments[s];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(B[f]=u[f])}return B},x.apply(this,arguments)};function i(B){return B.displayName||B.name||"Component"}var h=function(){return{}};function O(B,u){u===void 0&&(u={});var s=!!B,l=B||h;return function(m){var E=function(R){C(p,R);function p(a,r){var n=R.call(this,a,r)||this;return n.unsubscribe=null,n.handleChange=function(){if(!n.unsubscribe)return;var o=l(n.store.getState(),n.props);n.setState({subscribed:o})},n.store=n.context,n.state={subscribed:l(n.store.getState(),a),store:n.store,props:a},n}return p.getDerivedStateFromProps=function(a,r){return B&&B.length===2&&a!==r.props?{subscribed:l(r.store.getState(),a),props:a}:{props:a}},p.prototype.componentDidMount=function(){this.trySubscribe()},p.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},p.prototype.shouldComponentUpdate=function(a,r){return!w()(this.props,a)||!w()(this.state.subscribed,r.subscribed)},p.prototype.trySubscribe=function(){s&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},p.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},p.prototype.render=function(){var a=x(x(x({},this.props),this.state.subscribed),{store:this.store});return J.createElement(m,x({},a,{ref:this.props.miniStoreForwardedRef}))},p.displayName="Connect("+i(m)+")",p.contextType=L,p}(J.Component);if(u.forwardRef){var v=J.forwardRef(function(R,p){return J.createElement(E,x({},R,{miniStoreForwardedRef:p}))});return c()(v,m)}return c()(E,m)}}var T=function(){return T=Object.assign||function(B){for(var u,s=1,l=arguments.length;s<l;s++){u=arguments[s];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(B[f]=u[f])}return B},T.apply(this,arguments)};function y(B){var u=B,s=[];function l(E){u=T(T({},u),E);for(var v=0;v<s.length;v++)s[v]()}function f(){return u}function m(E){return s.push(E),function(){var R=s.indexOf(E);s.splice(R,1)}}return{setState:l,getState:f,subscribe:m}}},IBYe:function($e,me,z){"use strict";function J(N){return null}me.a=J},IMiH:function($e,me,z){var J=z("Sj9i"),N=z("QBsz"),L=z("4mN7"),Q=z("mFDi"),D=z("LPTA"),w=D.devicePixelRatio,_={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},c=[],C=[],x=[],i=[],h=Math.min,O=Math.max,T=Math.cos,y=Math.sin,B=Math.sqrt,u=Math.abs,s=typeof Float32Array!="undefined",l=function(m){this._saveData=!(m||!1),this._saveData&&(this.data=[]),this._ctx=null};l.prototype={constructor:l,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(m,E,v){v=v||0,this._ux=u(v/w/m)||0,this._uy=u(v/w/E)||0},getContext:function(){return this._ctx},beginPath:function(m){return this._ctx=m,m&&m.beginPath(),m&&(this.dpr=m.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(m,E){return this.addData(_.M,m,E),this._ctx&&this._ctx.moveTo(m,E),this._x0=m,this._y0=E,this._xi=m,this._yi=E,this},lineTo:function(m,E){var v=u(m-this._xi)>this._ux||u(E-this._yi)>this._uy||this._len<5;return this.addData(_.L,m,E),this._ctx&&v&&(this._needsDash()?this._dashedLineTo(m,E):this._ctx.lineTo(m,E)),v&&(this._xi=m,this._yi=E),this},bezierCurveTo:function(m,E,v,R,p,a){return this.addData(_.C,m,E,v,R,p,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(m,E,v,R,p,a):this._ctx.bezierCurveTo(m,E,v,R,p,a)),this._xi=p,this._yi=a,this},quadraticCurveTo:function(m,E,v,R){return this.addData(_.Q,m,E,v,R),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(m,E,v,R):this._ctx.quadraticCurveTo(m,E,v,R)),this._xi=v,this._yi=R,this},arc:function(m,E,v,R,p,a){return this.addData(_.A,m,E,v,v,R,p-R,0,a?0:1),this._ctx&&this._ctx.arc(m,E,v,R,p,a),this._xi=T(p)*v+m,this._yi=y(p)*v+E,this},arcTo:function(m,E,v,R,p){return this._ctx&&this._ctx.arcTo(m,E,v,R,p),this},rect:function(m,E,v,R){return this._ctx&&this._ctx.rect(m,E,v,R),this.addData(_.R,m,E,v,R),this},closePath:function(){this.addData(_.Z);var m=this._ctx,E=this._x0,v=this._y0;return m&&(this._needsDash()&&this._dashedLineTo(E,v),m.closePath()),this._xi=E,this._yi=v,this},fill:function(m){m&&m.fill(),this.toStatic()},stroke:function(m){m&&m.stroke(),this.toStatic()},setLineDash:function(m){if(m instanceof Array){this._lineDash=m,this._dashIdx=0;for(var E=0,v=0;v<m.length;v++)E+=m[v];this._dashSum=E}return this},setLineDashOffset:function(m){return this._dashOffset=m,this},len:function(){return this._len},setData:function(m){var E=m.length;!(this.data&&this.data.length===E)&&s&&(this.data=new Float32Array(E));for(var v=0;v<E;v++)this.data[v]=m[v];this._len=E},appendPath:function(m){m instanceof Array||(m=[m]);for(var E=m.length,v=0,R=this._len,p=0;p<E;p++)v+=m[p].len();s&&this.data instanceof Float32Array&&(this.data=new Float32Array(R+v));for(var p=0;p<E;p++)for(var a=m[p].data,r=0;r<a.length;r++)this.data[R++]=a[r];this._len=R},addData:function(m){if(!this._saveData)return;var E=this.data;this._len+arguments.length>E.length&&(this._expandData(),E=this.data);for(var v=0;v<arguments.length;v++)E[this._len++]=arguments[v];this._prevCmd=m},_expandData:function(){if(!(this.data instanceof Array)){for(var m=[],E=0;E<this._len;E++)m[E]=this.data[E];this.data=m}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(m,E){var v=this._dashSum,R=this._dashOffset,p=this._lineDash,a=this._ctx,r=this._xi,n=this._yi,o=m-r,S=E-n,b=B(o*o+S*S),g=r,U=n,K,W=p.length,q;for(o/=b,S/=b,R<0&&(R=v+R),R%=v,g-=R*o,U-=R*S;o>0&&g<=m||o<0&&g>=m||o===0&&(S>0&&U<=E||S<0&&U>=E);){if(q=this._dashIdx,K=p[q],g+=o*K,U+=S*K,this._dashIdx=(q+1)%W,o>0&&g<r||o<0&&g>r||S>0&&U<n||S<0&&U>n)continue;a[q%2?"moveTo":"lineTo"](o>=0?h(g,m):O(g,m),S>=0?h(U,E):O(U,E))}o=g-m,S=U-E,this._dashOffset=-B(o*o+S*S)},_dashedBezierTo:function(m,E,v,R,p,a){var r=this._dashSum,n=this._dashOffset,o=this._lineDash,S=this._ctx,b=this._xi,g=this._yi,U,K,W,q=J.cubicAt,Y=0,V=this._dashIdx,te=o.length,X,se,le=0;for(n<0&&(n=r+n),n%=r,U=0;U<1;U+=.1)K=q(b,m,v,p,U+.1)-q(b,m,v,p,U),W=q(g,E,R,a,U+.1)-q(g,E,R,a,U),Y+=B(K*K+W*W);for(;V<te&&!(le+=o[V],le>n);V++);for(U=(le-n)/Y;U<=1;)X=q(b,m,v,p,U),se=q(g,E,R,a,U),V%2?S.moveTo(X,se):S.lineTo(X,se),U+=o[V]/Y,V=(V+1)%te;V%2!==0&&S.lineTo(p,a),K=p-X,W=a-se,this._dashOffset=-B(K*K+W*W)},_dashedQuadraticTo:function(m,E,v,R){var p=v,a=R;v=(v+2*m)/3,R=(R+2*E)/3,m=(this._xi+2*m)/3,E=(this._yi+2*E)/3,this._dashedBezierTo(m,E,v,R,p,a)},toStatic:function(){var m=this.data;m instanceof Array&&(m.length=this._len,s&&(this.data=new Float32Array(m)))},getBoundingRect:function(){c[0]=c[1]=x[0]=x[1]=Number.MAX_VALUE,C[0]=C[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var m=this.data,E=0,v=0,R=0,p=0,a=0;a<m.length;){var r=m[a++];a===1&&(E=m[a],v=m[a+1],R=E,p=v);switch(r){case _.M:R=m[a++],p=m[a++],E=R,v=p,x[0]=R,x[1]=p,i[0]=R,i[1]=p;break;case _.L:L.fromLine(E,v,m[a],m[a+1],x,i),E=m[a++],v=m[a++];break;case _.C:L.fromCubic(E,v,m[a++],m[a++],m[a++],m[a++],m[a],m[a+1],x,i),E=m[a++],v=m[a++];break;case _.Q:L.fromQuadratic(E,v,m[a++],m[a++],m[a],m[a+1],x,i),E=m[a++],v=m[a++];break;case _.A:var n=m[a++],o=m[a++],S=m[a++],b=m[a++],g=m[a++],U=m[a++]+g;a+=1;var K=1-m[a++];a===1&&(R=T(g)*S+n,p=y(g)*b+o),L.fromArc(n,o,S,b,g,U,K,x,i),E=T(U)*S+n,v=y(U)*b+o;break;case _.R:R=E=m[a++],p=v=m[a++];var W=m[a++],q=m[a++];L.fromLine(R,p,R+W,p+q,x,i);break;case _.Z:E=R,v=p;break}N.min(c,c,x),N.max(C,C,i)}return a===0&&(c[0]=c[1]=C[0]=C[1]=0),new Q(c[0],c[1],C[0]-c[0],C[1]-c[1])},rebuildPath:function(m){for(var E=this.data,v,R,p,a,r,n,o=this._ux,S=this._uy,b=this._len,g=0;g<b;){var U=E[g++];g===1&&(p=E[g],a=E[g+1],v=p,R=a);switch(U){case _.M:v=p=E[g++],R=a=E[g++],m.moveTo(p,a);break;case _.L:r=E[g++],n=E[g++],(u(r-p)>o||u(n-a)>S||g===b-1)&&(m.lineTo(r,n),p=r,a=n);break;case _.C:m.bezierCurveTo(E[g++],E[g++],E[g++],E[g++],E[g++],E[g++]),p=E[g-2],a=E[g-1];break;case _.Q:m.quadraticCurveTo(E[g++],E[g++],E[g++],E[g++]),p=E[g-2],a=E[g-1];break;case _.A:var K=E[g++],W=E[g++],q=E[g++],Y=E[g++],V=E[g++],te=E[g++],X=E[g++],se=E[g++],le=q>Y?q:Y,Te=q>Y?1:q/Y,Ee=q>Y?Y/q:1,Be=Math.abs(q-Y)>.001,De=V+te;Be?(m.translate(K,W),m.rotate(X),m.scale(Te,Ee),m.arc(0,0,le,V,De,1-se),m.scale(1/Te,1/Ee),m.rotate(-X),m.translate(-K,-W)):m.arc(K,W,le,V,De,1-se),g===1&&(v=T(V)*q+K,R=y(V)*Y+W),p=T(De)*q+K,a=y(De)*Y+W;break;case _.R:v=p=E[g],R=a=E[g+1],m.rect(E[g++],E[g++],E[g++],E[g++]);break;case _.Z:m.closePath(),p=v,a=R}}}},l.CMD=_;var f=l;$e.exports=f},ItGF:function($e,me){var z={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?z={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?z={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?z={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:z=N(navigator.userAgent);var J=z;function N(L){var Q={},D={},w=L.match(/Firefox\/([\d.]+)/),_=L.match(/MSIE\s([\d.]+)/)||L.match(/Trident\/.+?rv:(([\d.]+))/),c=L.match(/Edge\/([\d.]+)/),C=/micromessenger/i.test(L);return w&&(D.firefox=!0,D.version=w[1]),_&&(D.ie=!0,D.version=_[1]),c&&(D.edge=!0,D.version=c[1]),C&&(D.weChat=!0),{browser:D,os:Q,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!D.ie&&!D.edge,pointerEventsSupported:"onpointerdown"in window&&(D.edge||D.ie&&D.version>=11),domSupported:typeof document!="undefined"}}$e.exports=J},K2GJ:function($e,me,z){var J=z("fW2E"),N=z("gut8"),L=N.ContextCachedBy,Q=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],D=function(h){this.extendFrom(h,!1)};function w(h,O,T){var y=O.x==null?0:O.x,B=O.x2==null?1:O.x2,u=O.y==null?0:O.y,s=O.y2==null?0:O.y2;O.global||(y=y*T.width+T.x,B=B*T.width+T.x,u=u*T.height+T.y,s=s*T.height+T.y),y=isNaN(y)?0:y,B=isNaN(B)?1:B,u=isNaN(u)?0:u,s=isNaN(s)?0:s;var l=h.createLinearGradient(y,u,B,s);return l}function _(h,O,T){var y=T.width,B=T.height,u=Math.min(y,B),s=O.x==null?.5:O.x,l=O.y==null?.5:O.y,f=O.r==null?.5:O.r;O.global||(s=s*y+T.x,l=l*B+T.y,f=f*u);var m=h.createRadialGradient(s,l,0,s,l,f);return m}D.prototype={constructor:D,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(h,O,T){var y=this,B=T&&T.style,u=!B||h.__attrCachedBy!==L.STYLE_BIND;h.__attrCachedBy=L.STYLE_BIND;for(var s=0;s<Q.length;s++){var l=Q[s],f=l[0];(u||y[f]!==B[f])&&(h[f]=J(h,f,y[f]||l[1]))}if((u||y.fill!==B.fill)&&(h.fillStyle=y.fill),(u||y.stroke!==B.stroke)&&(h.strokeStyle=y.stroke),(u||y.opacity!==B.opacity)&&(h.globalAlpha=y.opacity==null?1:y.opacity),(u||y.blend!==B.blend)&&(h.globalCompositeOperation=y.blend||"source-over"),this.hasStroke()){var m=y.lineWidth;h.lineWidth=m/(this.strokeNoScale&&O&&O.getLineScale?O.getLineScale():1)}},hasFill:function(){var h=this.fill;return h!=null&&h!=="none"},hasStroke:function(){var h=this.stroke;return h!=null&&h!=="none"&&this.lineWidth>0},extendFrom:function(h,O){if(h)for(var T in h)h.hasOwnProperty(T)&&(O===!0||(O===!1?!this.hasOwnProperty(T):h[T]!=null))&&(this[T]=h[T])},set:function(h,O){typeof h=="string"?this[h]=O:this.extendFrom(h,!0)},clone:function(){var h=new this.constructor;return h.extendFrom(this,!0),h},getGradient:function(h,O,T){for(var y=O.type==="radial"?_:w,B=y(h,O,T),u=O.colorStops,s=0;s<u.length;s++)B.addColorStop(u[s].offset,u[s].color);return B}};for(var c=D.prototype,C=0;C<Q.length;C++){var x=Q[C];x[0]in c||(c[x[0]]=x[1])}D.getGradient=c.getGradient;var i=D;$e.exports=i},LPTA:function($e,me){var z=1;typeof window!="undefined"&&(z=Math.max(window.devicePixelRatio||1,1));var J=0,N=z;me.debugMode=J,me.devicePixelRatio=N},LdHM:function($e,me,z){"use strict";z.d(me,"b",function(){return f}),z.d(me,"a",function(){return E});var J=z("1OyB"),N=z("vuIU"),L=z("Ji7U"),Q=z("LK+K"),D=z("q1tI"),w=z("rePB"),_=z("Ff2n"),c=z("ODXe"),C=z("4IlW"),x=z("bX4T"),i=z("YrtM"),h=z("TSYQ"),O=z.n(h),T=z("+nKL"),y=z("8OUc"),B=function(te,X){var se=te.prefixCls,le=te.id,Te=te.flattenOptions,Ee=te.childrenAsData,Be=te.values,De=te.searchValue,Ve=te.multiple,_e=te.defaultActiveFirstOption,Le=te.height,tt=te.itemHeight,Et=te.notFoundContent,Oe=te.open,He=te.menuItemSelectedIcon,it=te.virtual,Ae=te.onSelect,re=te.onToggleOpen,ae=te.onActiveValue,ce=te.onScroll,we=te.onMouseEnter,Re="".concat(se,"-item"),ke=Object(i.a)(function(){return Te},[Oe,Te],function(st,Ke){return Ke[0]&&st[1]!==Ke[1]}),ht=D.useRef(null),ft=function(Ke){Ke.preventDefault()},vt=function(Ke){ht.current&&ht.current.scrollTo({index:Ke})},yt=function(Ke){for(var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=ke.length,pe=0;pe<Me;pe+=1){var be=(Ke+pe*Ie+Me)%Me,ge=ke[be],Ce=ge.group,We=ge.data;if(!Ce&&!We.disabled)return be}return-1},Lt=D.useState(function(){return yt(0)}),Mt=Object(c.a)(Lt,2),Qe=Mt[0],Pe=Mt[1],lt=function(Ke){Pe(Ke);var Ie=ke[Ke];if(!Ie){ae(null,-1);return}ae(Ie.data.value,Ke)};D.useEffect(function(){lt(_e!==!1?yt(0):-1)},[ke.length,De]),D.useEffect(function(){var st=setTimeout(function(){if(!Ve&&Oe&&Be.size===1){var Ke=Array.from(Be)[0],Ie=ke.findIndex(function(Me){var pe=Me.data;return pe.value===Ke});lt(Ie),vt(Ie)}});return function(){return clearTimeout(st)}},[Oe]);var pt=function(Ke){Ke!==void 0&&Ae(Ke,{selected:!Be.has(Ke)}),Ve||re(!1)};if(D.useImperativeHandle(X,function(){return{onKeyDown:function(Ke){var Ie=Ke.which;switch(Ie){case C.a.UP:case C.a.DOWN:{var Me=0;if(Ie===C.a.UP?Me=-1:Ie===C.a.DOWN&&(Me=1),Me!==0){var pe=yt(Qe+Me,Me);vt(pe),lt(pe)}break}case C.a.ENTER:{var be=ke[Qe];be&&!be.data.disabled?pt(be.data.value):pt(void 0),Oe&&Ke.preventDefault();break}case C.a.ESC:re(!1)}},onKeyUp:function(){},scrollTo:function(Ke){vt(Ke)}}}),ke.length===0)return D.createElement("div",{role:"listbox",id:"".concat(le,"_list"),className:"".concat(Re,"-empty"),onMouseDown:ft},Et);function Ze(st){var Ke=ke[st];if(!Ke)return null;var Ie=Ke.data||{},Me=Ie.value,pe=Ie.label,be=Ie.children,ge=Object(x.a)(Ie,!0),Ce=Ee?be:pe;return Ke?D.createElement("div",Object.assign({"aria-label":typeof Ce=="string"?Ce:null},ge,{key:st,role:"option",id:"".concat(le,"_list_").concat(st),"aria-selected":Be.has(Me)}),Me):null}return D.createElement(D.Fragment,null,D.createElement("div",{role:"listbox",id:"".concat(le,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(Qe-1),Ze(Qe),Ze(Qe+1)),D.createElement(T.a,{itemKey:"key",ref:ht,data:ke,height:Le,itemHeight:tt,fullHeight:!1,onMouseDown:ft,onScroll:ce,virtual:it,onMouseEnter:we},function(st,Ke){var Ie,Me=st.group,pe=st.groupOption,be=st.data,ge=be.label,Ce=be.key;if(Me)return D.createElement("div",{className:O()(Re,"".concat(Re,"-group"))},ge!==void 0?ge:Ce);var We=be.disabled,Ne=be.value,ut=be.title,Tt=be.children,Ut=be.style,St=be.className,_t=Object(_.a)(be,["disabled","value","title","children","style","className"]),At=Be.has(Ne),nt="".concat(Re,"-option"),rt=O()(Re,nt,St,(Ie={},Object(w.a)(Ie,"".concat(nt,"-grouped"),pe),Object(w.a)(Ie,"".concat(nt,"-active"),Qe===Ke&&!We),Object(w.a)(Ie,"".concat(nt,"-disabled"),We),Object(w.a)(Ie,"".concat(nt,"-selected"),At),Ie)),xe=Ee?Tt:ge,Fe=!He||typeof He=="function"||At;return D.createElement("div",Object.assign({},_t,{"aria-selected":At,className:rt,title:ut,onMouseMove:function(){if(Qe===Ke||We)return;lt(Ke)},onClick:function(){We||pt(Ne)},style:Ut}),D.createElement("div",{className:"".concat(nt,"-content")},xe||Ne),D.isValidElement(He)||At,Fe&&D.createElement(y.a,{className:"".concat(Re,"-option-state"),customizeIcon:He,customizeIconProps:{isSelected:At}},At?"\u2713":null))}))},u=D.forwardRef(B);u.displayName="OptionList";var s=u,l=function(){return null};l.isSelectOption=!0;var f=l,m=function(){return null};m.isSelectOptGroup=!0;var E=m,v=z("VTBJ"),R=z("Zm9Q");function p(V){var te=V.key,X=V.props,se=X.children,le=X.value,Te=Object(_.a)(X,["children","value"]);return Object(v.a)({key:te,value:le!==void 0?le:te,children:se},Te)}function a(V){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(V).map(function(X,se){if(!D.isValidElement(X)||!X.type)return null;var le=X.type.isSelectOptGroup,Te=X.key,Ee=X.props,Be=Ee.children,De=Object(_.a)(Ee,["children"]);return te||!le?p(X):Object(v.a)(Object(v.a)({key:"__RC_SELECT_GRP__".concat(Te===null?se:Te,"__"),label:Te},De),{},{options:a(Be)})}).filter(function(X){return X})}var r=z("2Qr1"),n=z("qNPg"),o=z("U8pU"),S=z("Kwbf"),b=z("WKfj");function g(V){var te=V.mode,X=V.options,se=V.children,le=V.backfill,Te=V.allowClear,Ee=V.placeholder,Be=V.getInputElement,De=V.showSearch,Ve=V.onSearch,_e=V.defaultOpen,Le=V.autoFocus,tt=V.labelInValue,Et=V.value,Oe=V.inputValue,He=V.optionLabelProp,it=te==="multiple"||te==="tags",Ae=De!==void 0?De:it||te==="combobox",re=X||a(se);if(Object(S.a)(te!=="tags"||re.every(function(Re){return!Re.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),te==="tags"||te==="combobox"){var ae=re.some(function(Re){return Re.options?Re.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Re?Re.value:Re.key)=="number"});Object(S.a)(!ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(S.a)(te!=="combobox"||!He,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(S.a)(te==="combobox"||!le,"`backfill` only works with `combobox` mode."),Object(S.a)(te==="combobox"||!Be,"`getInputElement` only work with `combobox` mode."),Object(S.b)(te!=="combobox"||!Be||!Te||!Ee,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ve&&!Ae&&te!=="combobox"&&te!=="tags"&&Object(S.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(S.b)(!_e||Le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Et!=null){var ce=Object(b.d)(Et);Object(S.a)(!tt||ce.every(function(Re){return Object(o.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(S.a)(!it||Array.isArray(Et),"`value` should be array when `mode` is `multiple` or `tags`")}if(se){var we=null;Object(R.a)(se).some(function(Re){if(!D.isValidElement(Re)||!Re.type)return!1;var ke=Re.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var ht=Object(R.a)(Re.props.children).every(function(ft){return!D.isValidElement(ft)||!Re.type||ft.type.isSelectOption?!0:(we=ft.type,!1)});return!ht}return we=ke,!0}),we&&Object(S.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(we.displayName||we.name||we,"`.")),Object(S.a)(Oe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=g,K=Object(n.a)({prefixCls:"rc-select",components:{optionList:s},convertChildrenToData:a,flattenOptions:r.d,getLabeledValue:r.e,filterOptions:r.b,isValueDisabled:r.g,findValueOption:r.c,warningProps:U,fillOptionsWithMissingValue:r.a}),W=function(V){Object(L.a)(X,V);var te=Object(Q.a)(X);function X(){var se;return Object(J.a)(this,X),se=te.apply(this,arguments),se.selectRef=D.createRef(),se.focus=function(){se.selectRef.current.focus()},se.blur=function(){se.selectRef.current.blur()},se}return Object(N.a)(X,[{key:"render",value:function(){return D.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),X}(D.Component);W.Option=f,W.OptGroup=E;var q=W,Y=me.c=q},M8RZ:function($e,me,z){"use strict";z.d(me,"a",function(){return C});var J=z("fWQN"),N=z("mtLc"),L=z("yKVA"),Q=z("879j"),D=z("q1tI"),w=z.n(D),_=z("i8i4"),c=z.n(_),C=function(x){Object(L.a)(h,x);var i=Object(Q.a)(h);function h(O){var T;Object(J.a)(this,h),T=i.call(this,O);var y=window.document;return T.node=y.createElement("div"),y.body.appendChild(T.node),T}return Object(N.a)(h,[{key:"render",value:function(){var T=this.props.children;return Object(_.createPortal)(T,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(w.a.Component)},MEGo:function($e,me,z){var J=z("4fz+"),N=z("Dagg"),L=z("dqUG"),Q=z("2fw6"),D=z("x6Kt"),w=z("rmlV"),_=z("yxFR"),c=z("y+Vt"),C=z("h7HQ"),x=z("1Jh7"),i=z("SKnc"),h=z("K2GJ"),O=z("Fofx"),T=z("NC18"),y=T.createFromString,B=z("bYtY"),u=B.isString,s=B.extend,l=B.defaults,f=B.trim,m=B.each,E=/[\s,]+/;function v(X){if(u(X)){var se=new DOMParser;X=se.parseFromString(X,"text/xml")}for(X.nodeType===9&&(X=X.firstChild);X.nodeName.toLowerCase()!=="svg"||X.nodeType!==1;)X=X.nextSibling;return X}function R(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}R.prototype.parse=function(X,se){se=se||{};var le=v(X);if(!le)throw new Error("Illegal svg");var Te=new J;this._root=Te;var Ee=le.getAttribute("viewBox")||"",Be=parseFloat(le.getAttribute("width")||se.width),De=parseFloat(le.getAttribute("height")||se.height);isNaN(Be)&&(Be=null),isNaN(De)&&(De=null),b(le,Te,null,!0);for(var Ve=le.firstChild;Ve;)this._parseNode(Ve,Te),Ve=Ve.nextSibling;var _e,Le;if(Ee){var tt=f(Ee).split(E);tt.length>=4&&(_e={x:parseFloat(tt[0]||0),y:parseFloat(tt[1]||0),width:parseFloat(tt[2]),height:parseFloat(tt[3])})}if(_e&&Be!=null&&De!=null&&(Le=V(_e,Be,De),!se.ignoreViewBox)){var Et=Te;Te=new J,Te.add(Et),Et.scale=Le.scale.slice(),Et.position=Le.position.slice()}return!se.ignoreRootClip&&Be!=null&&De!=null&&Te.setClipPath(new D({shape:{x:0,y:0,width:Be,height:De}})),{root:Te,width:Be,height:De,viewBoxRect:_e,viewBoxTransform:Le}},R.prototype._parseNode=function(X,se){var le=X.nodeName.toLowerCase();le==="defs"?this._isDefine=!0:le==="text"&&(this._isText=!0);var Te;if(this._isDefine){var Ee=a[le];if(Ee){var Be=Ee.call(this,X),De=X.getAttribute("id");De&&(this._defs[De]=Be)}}else{var Ee=p[le];Ee&&(Te=Ee.call(this,X,se),se.add(Te))}for(var Ve=X.firstChild;Ve;)Ve.nodeType===1&&this._parseNode(Ve,Te),Ve.nodeType===3&&this._isText&&this._parseText(Ve,Te),Ve=Ve.nextSibling;le==="defs"?this._isDefine=!1:le==="text"&&(this._isText=!1)},R.prototype._parseText=function(X,se){if(X.nodeType===1){var le=X.getAttribute("dx")||0,Te=X.getAttribute("dy")||0;this._textX+=parseFloat(le),this._textY+=parseFloat(Te)}var Ee=new L({style:{text:X.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});n(se,Ee),b(X,Ee,this._defs);var Be=Ee.style.fontSize;Be&&Be<9&&(Ee.style.fontSize=9,Ee.scale=Ee.scale||[1,1],Ee.scale[0]*=Be/9,Ee.scale[1]*=Be/9);var De=Ee.getBoundingRect();return this._textX+=De.width,se.add(Ee),Ee};var p={g:function(X,se){var le=new J;return n(se,le),b(X,le,this._defs),le},rect:function(X,se){var le=new D;return n(se,le),b(X,le,this._defs),le.setShape({x:parseFloat(X.getAttribute("x")||0),y:parseFloat(X.getAttribute("y")||0),width:parseFloat(X.getAttribute("width")||0),height:parseFloat(X.getAttribute("height")||0)}),le},circle:function(X,se){var le=new Q;return n(se,le),b(X,le,this._defs),le.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),r:parseFloat(X.getAttribute("r")||0)}),le},line:function(X,se){var le=new _;return n(se,le),b(X,le,this._defs),le.setShape({x1:parseFloat(X.getAttribute("x1")||0),y1:parseFloat(X.getAttribute("y1")||0),x2:parseFloat(X.getAttribute("x2")||0),y2:parseFloat(X.getAttribute("y2")||0)}),le},ellipse:function(X,se){var le=new w;return n(se,le),b(X,le,this._defs),le.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),rx:parseFloat(X.getAttribute("rx")||0),ry:parseFloat(X.getAttribute("ry")||0)}),le},polygon:function(X,se){var le=X.getAttribute("points");le&&(le=o(le));var Te=new C({shape:{points:le||[]}});return n(se,Te),b(X,Te,this._defs),Te},polyline:function(X,se){var le=new c;n(se,le),b(X,le,this._defs);var Te=X.getAttribute("points");Te&&(Te=o(Te));var Ee=new x({shape:{points:Te||[]}});return Ee},image:function(X,se){var le=new N;return n(se,le),b(X,le,this._defs),le.setStyle({image:X.getAttribute("xlink:href"),x:X.getAttribute("x"),y:X.getAttribute("y"),width:X.getAttribute("width"),height:X.getAttribute("height")}),le},text:function(X,se){var le=X.getAttribute("x")||0,Te=X.getAttribute("y")||0,Ee=X.getAttribute("dx")||0,Be=X.getAttribute("dy")||0;this._textX=parseFloat(le)+parseFloat(Ee),this._textY=parseFloat(Te)+parseFloat(Be);var De=new J;return n(se,De),b(X,De,this._defs),De},tspan:function(X,se){var le=X.getAttribute("x"),Te=X.getAttribute("y");le!=null&&(this._textX=parseFloat(le)),Te!=null&&(this._textY=parseFloat(Te));var Ee=X.getAttribute("dx")||0,Be=X.getAttribute("dy")||0,De=new J;return n(se,De),b(X,De,this._defs),this._textX+=Ee,this._textY+=Be,De},path:function(X,se){var le=X.getAttribute("d")||"",Te=y(le);return n(se,Te),b(X,Te,this._defs),Te}},a={lineargradient:function(X){var se=parseInt(X.getAttribute("x1")||0,10),le=parseInt(X.getAttribute("y1")||0,10),Te=parseInt(X.getAttribute("x2")||10,10),Ee=parseInt(X.getAttribute("y2")||0,10),Be=new i(se,le,Te,Ee);return r(X,Be),Be},radialgradient:function(X){}};function r(X,se){for(var le=X.firstChild;le;){if(le.nodeType===1){var Te=le.getAttribute("offset");Te.indexOf("%")>0?Te=parseInt(Te,10)/100:Te?Te=parseFloat(Te):Te=0;var Ee=le.getAttribute("stop-color")||"#000000";se.addColorStop(Te,Ee)}le=le.nextSibling}}function n(X,se){X&&X.__inheritedStyle&&(se.__inheritedStyle||(se.__inheritedStyle={}),l(se.__inheritedStyle,X.__inheritedStyle))}function o(X){for(var se=f(X).split(E),le=[],Te=0;Te<se.length;Te+=2){var Ee=parseFloat(se[Te]),Be=parseFloat(se[Te+1]);le.push([Ee,Be])}return le}var S={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 b(X,se,le,Te){var Ee=se.__inheritedStyle||{},Be=se.type==="text";if(X.nodeType===1&&(W(X,se),s(Ee,Y(X)),!Te)){for(var De in S)if(S.hasOwnProperty(De)){var Ve=X.getAttribute(De);Ve!=null&&(Ee[S[De]]=Ve)}}var _e=Be?"textFill":"fill",Le=Be?"textStroke":"stroke";se.style=se.style||new h;var tt=se.style;Ee.fill!=null&&tt.set(_e,U(Ee.fill,le)),Ee.stroke!=null&&tt.set(Le,U(Ee.stroke,le)),m(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Et){var Oe=Et==="lineWidth"&&Be?"textStrokeWidth":Et;Ee[Et]!=null&&tt.set(Oe,parseFloat(Ee[Et]))}),(!Ee.textBaseline||Ee.textBaseline==="auto")&&(Ee.textBaseline="alphabetic"),Ee.textBaseline==="alphabetic"&&(Ee.textBaseline="bottom"),Ee.textAlign==="start"&&(Ee.textAlign="left"),Ee.textAlign==="end"&&(Ee.textAlign="right"),m(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Et){Ee[Et]!=null&&tt.set(Et,Ee[Et])}),Ee.lineDash&&(se.style.lineDash=f(Ee.lineDash).split(E)),tt[Le]&&tt[Le]!=="none"&&(se[Le]=!0),se.__inheritedStyle=Ee}var g=/url\(\s*#(.*?)\)/;function U(X,se){var le=se&&X&&X.match(g);if(le){var Te=f(le[1]),Ee=se[Te];return Ee}return X}var K=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function W(X,se){var le=X.getAttribute("transform");if(le){le=le.replace(/,/g," ");var Te=null,Ee=[];le.replace(K,function(_e,Le,tt){Ee.push(Le,tt)});for(var Be=Ee.length-1;Be>0;Be-=2){var De=Ee[Be],Ve=Ee[Be-1];Te=Te||O.create();switch(Ve){case"translate":De=f(De).split(E),O.translate(Te,Te,[parseFloat(De[0]),parseFloat(De[1]||0)]);break;case"scale":De=f(De).split(E),O.scale(Te,Te,[parseFloat(De[0]),parseFloat(De[1]||De[0])]);break;case"rotate":De=f(De).split(E),O.rotate(Te,Te,parseFloat(De[0]));break;case"skew":De=f(De).split(E),console.warn("Skew transform is not supported yet");break;case"matrix":var De=f(De).split(E);Te[0]=parseFloat(De[0]),Te[1]=parseFloat(De[1]),Te[2]=parseFloat(De[2]),Te[3]=parseFloat(De[3]),Te[4]=parseFloat(De[4]),Te[5]=parseFloat(De[5]);break}}se.setLocalTransform(Te)}}var q=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Y(X){var se=X.getAttribute("style"),le={};if(!se)return le;var Te={};q.lastIndex=0;for(var Ee;(Ee=q.exec(se))!=null;)Te[Ee[1]]=Ee[2];for(var Be in S)S.hasOwnProperty(Be)&&Te[Be]!=null&&(le[S[Be]]=Te[Be]);return le}function V(X,se,le){var Te=se/X.width,Ee=le/X.height,Be=Math.min(Te,Ee),De=[Be,Be],Ve=[-(X.x+X.width/2)*Be+se/2,-(X.y+X.height/2)*Be+le/2];return{scale:De,position:Ve}}function te(X,se){var le=new R;return le.parse(X,se)}me.parseXML=v,me.makeViewBoxTransform=V,me.parseSVG=te},MKOG:function($e,me,z){var J=z("bYtY"),N=z("YH21"),L=N.Dispatcher,Q=z("mLcG"),D=z("Bq2U"),w=function(c){c=c||{},this.stage=c.stage||{},this.onframe=c.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,L.call(this)};w.prototype={constructor:w,addClip:function(c){this._clips.push(c)},addAnimator:function(c){c.animation=this;for(var C=c.getClips(),x=0;x<C.length;x++)this.addClip(C[x])},removeClip:function(c){var C=J.indexOf(this._clips,c);C>=0&&this._clips.splice(C,1)},removeAnimator:function(c){for(var C=c.getClips(),x=0;x<C.length;x++)this.removeClip(C[x]);c.animation=null},_update:function(){for(var c=new Date().getTime()-this._pausedTime,C=c-this._time,x=this._clips,i=x.length,h=[],O=[],T=0;T<i;T++){var y=x[T],B=y.step(c,C);B&&(h.push(B),O.push(y))}for(var T=0;T<i;)x[T]._needsRemove?(x[T]=x[i-1],x.pop(),i--):T++;i=h.length;for(var T=0;T<i;T++)O[T].fire(h[T]);this._time=c,this.onframe(C),this.trigger("frame",C),this.stage.update&&this.stage.update()},_startLoop:function(){var c=this;this._running=!0;function C(){c._running&&(Q(C),!c._paused&&c._update())}Q(C)},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(c,C){C=C||{};var x=new D(c,C.loop,C.getter,C.setter);return this.addAnimator(x),x}},J.mixin(w,L);var _=w;$e.exports=_},NC18:function($e,me,z){var J=z("y+Vt"),N=z("IMiH"),L=z("7oTu"),Q=Math.sqrt,D=Math.sin,w=Math.cos,_=Math.PI,c=function(l){return Math.sqrt(l[0]*l[0]+l[1]*l[1])},C=function(l,f){return(l[0]*f[0]+l[1]*f[1])/(c(l)*c(f))},x=function(l,f){return(l[0]*f[1]<l[1]*f[0]?-1:1)*Math.acos(C(l,f))};function i(l,f,m,E,v,R,p,a,r,n,o){var S=r*(_/180),b=w(S)*(l-m)/2+D(S)*(f-E)/2,g=-1*D(S)*(l-m)/2+w(S)*(f-E)/2,U=b*b/(p*p)+g*g/(a*a);U>1&&(p*=Q(U),a*=Q(U));var K=(v===R?-1:1)*Q((p*p*(a*a)-p*p*(g*g)-a*a*(b*b))/(p*p*(g*g)+a*a*(b*b)))||0,W=K*p*g/a,q=K*-a*b/p,Y=(l+m)/2+w(S)*W-D(S)*q,V=(f+E)/2+D(S)*W+w(S)*q,te=x([1,0],[(b-W)/p,(g-q)/a]),X=[(b-W)/p,(g-q)/a],se=[(-1*b-W)/p,(-1*g-q)/a],le=x(X,se);C(X,se)<=-1&&(le=_),C(X,se)>=1&&(le=0),R===0&&le>0&&(le=le-2*_),R===1&&le<0&&(le=le+2*_),o.addData(n,Y,V,p,a,te,le,S,R)}var h=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,O=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function T(l){if(!l)return new N;for(var f=0,m=0,E=f,v=m,R,p=new N,a=N.CMD,r=l.match(h),n=0;n<r.length;n++){for(var o=r[n],S=o.charAt(0),b,g=o.match(O)||[],U=g.length,K=0;K<U;K++)g[K]=parseFloat(g[K]);for(var W=0;W<U;){var q,Y,V,te,X,se,le,Te=f,Ee=m;switch(S){case"l":f+=g[W++],m+=g[W++],b=a.L,p.addData(b,f,m);break;case"L":f=g[W++],m=g[W++],b=a.L,p.addData(b,f,m);break;case"m":f+=g[W++],m+=g[W++],b=a.M,p.addData(b,f,m),E=f,v=m,S="l";break;case"M":f=g[W++],m=g[W++],b=a.M,p.addData(b,f,m),E=f,v=m,S="L";break;case"h":f+=g[W++],b=a.L,p.addData(b,f,m);break;case"H":f=g[W++],b=a.L,p.addData(b,f,m);break;case"v":m+=g[W++],b=a.L,p.addData(b,f,m);break;case"V":m=g[W++],b=a.L,p.addData(b,f,m);break;case"C":b=a.C,p.addData(b,g[W++],g[W++],g[W++],g[W++],g[W++],g[W++]),f=g[W-2],m=g[W-1];break;case"c":b=a.C,p.addData(b,g[W++]+f,g[W++]+m,g[W++]+f,g[W++]+m,g[W++]+f,g[W++]+m),f+=g[W-2],m+=g[W-1];break;case"S":q=f,Y=m;var Be=p.len(),De=p.data;R===a.C&&(q+=f-De[Be-4],Y+=m-De[Be-3]),b=a.C,Te=g[W++],Ee=g[W++],f=g[W++],m=g[W++],p.addData(b,q,Y,Te,Ee,f,m);break;case"s":q=f,Y=m;var Be=p.len(),De=p.data;R===a.C&&(q+=f-De[Be-4],Y+=m-De[Be-3]),b=a.C,Te=f+g[W++],Ee=m+g[W++],f+=g[W++],m+=g[W++],p.addData(b,q,Y,Te,Ee,f,m);break;case"Q":Te=g[W++],Ee=g[W++],f=g[W++],m=g[W++],b=a.Q,p.addData(b,Te,Ee,f,m);break;case"q":Te=g[W++]+f,Ee=g[W++]+m,f+=g[W++],m+=g[W++],b=a.Q,p.addData(b,Te,Ee,f,m);break;case"T":q=f,Y=m;var Be=p.len(),De=p.data;R===a.Q&&(q+=f-De[Be-4],Y+=m-De[Be-3]),f=g[W++],m=g[W++],b=a.Q,p.addData(b,q,Y,f,m);break;case"t":q=f,Y=m;var Be=p.len(),De=p.data;R===a.Q&&(q+=f-De[Be-4],Y+=m-De[Be-3]),f+=g[W++],m+=g[W++],b=a.Q,p.addData(b,q,Y,f,m);break;case"A":V=g[W++],te=g[W++],X=g[W++],se=g[W++],le=g[W++],Te=f,Ee=m,f=g[W++],m=g[W++],b=a.A,i(Te,Ee,f,m,se,le,V,te,X,b,p);break;case"a":V=g[W++],te=g[W++],X=g[W++],se=g[W++],le=g[W++],Te=f,Ee=m,f+=g[W++],m+=g[W++],b=a.A,i(Te,Ee,f,m,se,le,V,te,X,b,p);break}}(S==="z"||S==="Z")&&(b=a.Z,p.addData(b),f=E,m=v),R=b}return p.toStatic(),p}function y(l,f){var m=T(l);return f=f||{},f.buildPath=function(E){if(E.setData){E.setData(m.data);var v=E.getContext();v&&E.rebuildPath(v)}else{var v=E;m.rebuildPath(v)}},f.applyTransform=function(E){L(m,E),this.dirty(!0)},f}function B(l,f){return new J(y(l,f))}function u(l,f){return J.extend(y(l,f))}function s(l,f){for(var m=[],E=l.length,v=0;v<E;v++){var R=l[v];R.path||R.createPathProxy(),R.__dirtyPath&&R.buildPath(R.path,R.shape,!0),m.push(R.path)}var p=new J(f);return p.createPathProxy(),p.buildPath=function(a){a.appendPath(m);var r=a.getContext();r&&a.rebuildPath(r)},p}me.createFromString=B,me.extendFromString=u,me.mergePath=s},NohK:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.default=void 0;var J=function(L){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,D=null;return function(){for(var w=this,_=arguments.length,c=new Array(_),C=0;C<_;C++)c[C]=arguments[C];clearTimeout(D),D=setTimeout(function(){L.apply(w,c)},Q)}};me.default=J},NvD2:function($e,me,z){"use strict";z.d(me,"a",function(){return w});var J=z("Kwbf");function N(_,c){var C=new Set;return _.forEach(function(x){c.has(x)||C.add(x)}),C}function L(_){var c=_||{},C=c.disabled,x=c.disableCheckbox,i=c.checkable;return!!(C||x)||i===!1}function Q(_,c,C,x){for(var i=new Set(_),h=new Set,O=0;O<=C;O+=1){var T=c.get(O)||new Set;T.forEach(function(s){var l=s.key,f=s.node,m=s.children,E=m===void 0?[]:m;i.has(l)&&!x(f)&&E.filter(function(v){return!x(v.node)}).forEach(function(v){i.add(v.key)})})}for(var y=new Set,B=C;B>=0;B-=1){var u=c.get(B)||new Set;u.forEach(function(s){var l=s.parent,f=s.node;if(x(f)||!s.parent||y.has(s.parent.key))return;if(x(s.parent.node)){y.add(l.key);return}var m=!0,E=!1;(l.children||[]).filter(function(v){return!x(v.node)}).forEach(function(v){var R=v.key,p=i.has(R);m&&!p&&(m=!1),!E&&(p||h.has(R))&&(E=!0)}),m&&i.add(l.key),E&&h.add(l.key),y.add(l.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(N(h,i))}}function D(_,c,C,x,i){for(var h=new Set(_),O=new Set(c),T=0;T<=x;T+=1){var y=C.get(T)||new Set;y.forEach(function(l){var f=l.key,m=l.node,E=l.children,v=E===void 0?[]:E;!h.has(f)&&!O.has(f)&&!i(m)&&v.filter(function(R){return!i(R.node)}).forEach(function(R){h.delete(R.key)})})}O=new Set;for(var B=new Set,u=x;u>=0;u-=1){var s=C.get(u)||new Set;s.forEach(function(l){var f=l.parent,m=l.node;if(i(m)||!l.parent||B.has(l.parent.key))return;if(i(l.parent.node)){B.add(f.key);return}var E=!0,v=!1;(f.children||[]).filter(function(R){return!i(R.node)}).forEach(function(R){var p=R.key,a=h.has(p);E&&!a&&(E=!1),!v&&(a||O.has(p))&&(v=!0)}),E||h.delete(f.key),v&&O.add(f.key),B.add(f.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(N(O,h))}}function w(_,c,C,x){var i=[],h;x?h=x:h=L;var O=new Set(_.filter(function(u){var s=!!C[u];return s||i.push(u),s})),T=new Map,y=0;Object.keys(C).forEach(function(u){var s=C[u],l=s.level,f=T.get(l);f||(f=new Set,T.set(l,f)),f.add(s),y=Math.max(y,l)}),Object(J.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var B;return c===!0?B=Q(O,T,y,h):B=D(O,c.halfCheckedKeys,T,y,h),B}},OLES:function($e,me,z){"use strict";var J=z("U8pU"),N=z("VTBJ"),L=z("Ff2n"),Q=z("q1tI"),D=z("uciX"),w=z("7ixt"),_=function(O){var T=O.overlay,y=O.prefixCls,B=O.id,u=O.overlayInnerStyle;return Q.createElement("div",{className:"".concat(y,"-inner"),id:B,role:"tooltip",style:u},typeof T=="function"?T():T)},c=_,C=function(O,T){var y=O.overlayClassName,B=O.trigger,u=B===void 0?["hover"]:B,s=O.mouseEnterDelay,l=s===void 0?0:s,f=O.mouseLeaveDelay,m=f===void 0?.1:f,E=O.overlayStyle,v=O.prefixCls,R=v===void 0?"rc-tooltip":v,p=O.children,a=O.onVisibleChange,r=O.afterVisibleChange,n=O.transitionName,o=O.animation,S=O.placement,b=S===void 0?"right":S,g=O.align,U=g===void 0?{}:g,K=O.destroyTooltipOnHide,W=K===void 0?!1:K,q=O.defaultVisible,Y=O.getTooltipContainer,V=O.overlayInnerStyle,te=Object(L.a)(O,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),X=Object(Q.useRef)(null);Object(Q.useImperativeHandle)(T,function(){return X.current});var se=Object(N.a)({},te);"visible"in O&&(se.popupVisible=O.visible);var le=function(){var Ve=O.arrowContent,_e=Ve===void 0?null:Ve,Le=O.overlay,tt=O.id;return[Q.createElement("div",{className:"".concat(R,"-arrow"),key:"arrow"},_e),Q.createElement(c,{key:"content",prefixCls:R,id:tt,overlay:Le,overlayInnerStyle:V})]},Te=!1,Ee=!1;if(typeof W=="boolean")Te=W;else if(W&&Object(J.a)(W)==="object"){var Be=W.keepParent;Te=Be===!0,Ee=Be===!1}return Q.createElement(D.a,Object.assign({popupClassName:y,prefixCls:R,popup:le,action:u,builtinPlacements:w.a,popupPlacement:b,ref:X,popupAlign:U,getPopupContainer:Y,onPopupVisibleChange:a,afterPopupVisibleChange:r,popupTransitionName:n,popupAnimation:o,defaultPopupVisible:q,destroyPopupOnHide:Te,autoDestroy:Ee,mouseLeaveDelay:m,popupStyle:E,mouseEnterDelay:l},se),p)},x=Object(Q.forwardRef)(C),i=me.a=x},OS9S:function($e,me,z){var J=z("bYtY"),N=J.inherits,L=z("Gev7"),Q=z("mFDi");function D(c){L.call(this,c),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}D.prototype.incremental=!0,D.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},D.prototype.addDisplayable=function(c,C){C?this._temporaryDisplayables.push(c):this._displayables.push(c),this.dirty()},D.prototype.addDisplayables=function(c,C){C=C||!1;for(var x=0;x<c.length;x++)this.addDisplayable(c[x],C)},D.prototype.eachPendingDisplayable=function(c){for(var C=this._cursor;C<this._displayables.length;C++)c&&c(this._displayables[C]);for(var C=0;C<this._temporaryDisplayables.length;C++)c&&c(this._temporaryDisplayables[C])},D.prototype.update=function(){this.updateTransform();for(var c=this._cursor;c<this._displayables.length;c++){var C=this._displayables[c];C.parent=this,C.update(),C.parent=null}for(var c=0;c<this._temporaryDisplayables.length;c++){var C=this._temporaryDisplayables[c];C.parent=this,C.update(),C.parent=null}},D.prototype.brush=function(c,C){for(var x=this._cursor;x<this._displayables.length;x++){var i=this._displayables[x];i.beforeBrush&&i.beforeBrush(c),i.brush(c,x===this._cursor?null:this._displayables[x-1]),i.afterBrush&&i.afterBrush(c)}this._cursor=x;for(var x=0;x<this._temporaryDisplayables.length;x++){var i=this._temporaryDisplayables[x];i.beforeBrush&&i.beforeBrush(c),i.brush(c,x===0?null:this._temporaryDisplayables[x-1]),i.afterBrush&&i.afterBrush(c)}this._temporaryDisplayables=[],this.notClear=!0};var w=[];D.prototype.getBoundingRect=function(){if(!this._rect){for(var c=new Q(Infinity,Infinity,-Infinity,-Infinity),C=0;C<this._displayables.length;C++){var x=this._displayables[C],i=x.getBoundingRect().clone();x.needLocalTransform()&&i.applyTransform(x.getLocalTransform(w)),c.union(i)}this._rect=c}return this._rect},D.prototype.contain=function(c,C){var x=this.transformCoordToLocal(c,C),i=this.getBoundingRect();if(i.contain(x[0],x[1]))for(var h=0;h<this._displayables.length;h++){var O=this._displayables[h];if(O.contain(c,C))return!0}return!1},N(D,L);var _=D;$e.exports=_},OZM5:function($e,me,z){"use strict";z.d(me,"b",function(){return x}),z.d(me,"a",function(){return i}),z.d(me,"k",function(){return h}),z.d(me,"h",function(){return O}),z.d(me,"i",function(){return T}),z.d(me,"g",function(){return y}),z.d(me,"c",function(){return B}),z.d(me,"d",function(){return u}),z.d(me,"j",function(){return f}),z.d(me,"e",function(){return m}),z.d(me,"f",function(){return E});var J=z("KQm4"),N=z("U8pU"),L=z("Ff2n"),Q=z("q1tI"),D=z.n(Q),w=z("Kwbf"),_=z("WaYH"),c=.25,C=2;function x(v,R){var p=v.slice(),a=p.indexOf(R);return a>=0&&p.splice(a,1),p}function i(v,R){var p=v.slice();return p.indexOf(R)===-1&&p.push(R),p}function h(v){return v.split("-")}function O(v,R){return"".concat(v,"-").concat(R)}function T(v){return v&&v.type&&v.type.isTreeNode}function y(v,R){var p=[v],a=R[v];function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.forEach(function(o){var S=o.key,b=o.children;p.push(S),r(b)})}return r(a.children),p}function B(v,R){var p=v.clientY,a=R.selectHandle.getBoundingClientRect(),r=a.top,n=a.bottom,o=a.height,S=Math.max(o*c,C);return p<=r+S?-1:p>=n-S?1:0}function u(v,R){if(!v)return;var p=R.multiple;return p?v.slice():v.length?[v[0]]:v}var s=function(R){return R};function l(v,R){if(!v)return[];var p=R||{},a=p.processProps,r=a===void 0?s:a,n=Array.isArray(v)?v:[v];return n.map(function(o){var S=o.children,b=Object(L.a)(o,["children"]),g=l(S,R);return D.a.createElement(_.a,Object.assign({},r(b)),g)})}function f(v){if(!v)return null;var R;if(Array.isArray(v))R={checkedKeys:v,halfCheckedKeys:void 0};else if(Object(N.a)(v)==="object")R={checkedKeys:v.checked||void 0,halfCheckedKeys:v.halfChecked||void 0};else return Object(w.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function m(v,R){var p=new Set;function a(r){if(p.has(r))return;var n=R[r];if(!n)return;p.add(r);var o=n.parent,S=n.node;if(S.disabled)return;o&&a(o.key)}return(v||[]).forEach(function(r){a(r)}),Object(J.a)(p)}function E(v){var R={};return Object.keys(v).forEach(function(p){(p.startsWith("data-")||p.startsWith("aria-"))&&(R[p]=v[p])}),R}},Ot1p:function($e,me,z){"use strict";var J=z("2qtc"),N=z("kLXV"),L=z("rAM+"),Q=z("miYZ"),D=z("tsqr"),w=z("9og8"),_=z("tJVT"),c=z("jrin"),C=z("WmNS"),x=z.n(C),i=z("q1tI"),h=z.n(i),O=z("VrN/"),T=z.n(O),y=z("bdgK"),B=z("p77/"),u=z("Bd2K"),s=z("ELLl"),l=z("19Vz"),f=z("lZu9"),m=z("+NIl"),E=z("kSUc"),v=z("9Bee"),R=function(Ne){var ut=Ne.value,Tt=ut===void 0?"":ut,Ut=Ne.className,St=Ne.showTextOnly,_t=Ne.showLines,At=Ne.style,nt=At===void 0?{}:At,rt=Object(i.useMemo)(function(){return""},[Tt]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt}}))},p=z("0Owb"),a=z("dejd"),r=z("C+DQ"),n=z("1vsH"),o=z("m3rI"),S=[{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 b(Ne){var ut=Ne.onActionCallback,Tt=Ne.title,Ut=Ne.icon,St=Ne.actionName,_t=Ne.className,At=_t===void 0?"":_t,nt=Ne.children;function rt(){ut(St)}return h.a.createElement("a",{title:Tt,className:At,onClick:rt},h.a.createElement("i",{className:"md-iconfont ".concat(Ut)}),nt)}var g=function(Ne){var ut=Ne.watch,Tt=Ne.showNullButton,Ut=Ne.onActionCallback,St=Ne.fullScreen,_t=Ne.insertTemp,At=Ne.hidetoolBar,nt=Ne.uuid,rt=Ne.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(n.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(n.E)("_educoder_session"),"&key=").concat(nt,"&api=").concat(encodeURIComponent(o.a.PROXY_SERVER)));var xe=[].concat(S,[{title:"".concat(ut?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ut?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!At&&xe.map(function(Fe,dt){return h.a.createElement("li",{key:dt},Fe.actionName?h.a.createElement(b,Object(p.a)({},Fe,{onActionCallback:Ut})):h.a.createElement("span",{className:"v-line"}))}),Tt?h.a.createElement("li",null,h.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_t&&h.a.createElement("li",null,h.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_t),onActionCallback:Ut},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(b,{icon:"".concat(St?"icon-shrink":"icon-enlarge"),title:St?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},U=z("M8RZ"),K=z("+L6B"),W=z("2/Rp"),q=z("y8nQ"),Y=z("Vl3Y"),V=z("5NDa"),te=z("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},se=function(Ne){var ut=Ne.callback,Tt=Ne.onCancel;function Ut(St){ut(St)}return h.a.createElement(Y.a,Object(p.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ut}),h.a.createElement(Y.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(te.a,null)),h.a.createElement(Y.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(te.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))},le=z("7ahc"),Te=z("k1fw"),Ee=z("HmJG"),Be=z("BjJ7"),De=Y.a.useForm,Ve={width:280,marginRight:10},_e={labelCol:{span:5},wrapperCol:{span:19}},Le=function(Ne){var ut=Ne.callback,Tt=Ne.onCancel,Ut=De(),St=Object(_.a)(Ut,1),_t=St[0],At=Object(i.useRef)();function nt(Fe){ut(Object(Te.a)(Object(Te.a)({},Fe),{},{name:At.current}))}function rt(Fe,dt){_t.setFieldsValue({src:"/api/attachments/".concat(Fe.id,"?type=").concat(Fe.content_type),type:dt.type})}function xe(Fe){var dt=Fe.target.files[0];At.current=dt.name,Et(dt,rt)}return h.a.createElement(Y.a,Object(p.a)({form:_t},_e,{className:"upload-image-panel",onFinish:nt}),h.a.createElement(Y.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(Y.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},h.a.createElement(te.a,{style:Ve})),h.a.createElement(tt,{onFileChange:xe}))),h.a.createElement(Y.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},h.a.createElement(te.a,{style:{width:264}})),h.a.createElement(Y.a.Item,{style:{textAlign:"right"}},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))};function tt(Ne){var ut=Ne.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:ut}))}function Et(Ne,ut){if(!Ne)throw new String("\u6CA1\u6709\u6587\u4EF6");var Tt=new FormData;Tt.append("editormd-image-file",Ne),Tt.append("file_param_name","editormd-image-file"),Tt.append("byxhr","true");var Ut=new window.XMLHttpRequest;Ut.withCredentials=!0,Ut.addEventListener("load",function(St){ut(JSON.parse(St.target.responseText),Ne)},!1),Ut.addEventListener("error",function(St){console.error(St)},!1),Ut.open("POST","".concat(Be.a,"/api/attachments.json")),Ut.send(Tt)}var Oe=z("giR+"),He=z("fyUT"),it=z("7Kak"),Ae=z("9yH6"),re=Ae.a.Group,ae={margin:"0 8px"},ce=function(Ne){var ut=Ne.callback,Tt=Ne.onCancel;function Ut(St){ut(St)}return h.a.createElement(Y.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ut},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:ae},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:ae},"\u884C\u6570"),h.a.createElement(Y.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(He.a,null)),h.a.createElement("span",{style:ae},"\u5217\u6570"),h.a.createElement(Y.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(He.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:ae},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(Y.a.Item,{name:"align"},h.a.createElement(re,null,h.a.createElement(Ae.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(Ae.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(Ae.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(Ae.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))},we=z("ErOA"),Re=z("7Cbv"),ke="link",ht="upload-image",ft="code-block",vt="add-table",yt="------------",Lt={default:yt,left:":".concat(yt),center:":".concat(yt,":"),right:"".concat(yt,":")},Mt=z("9VGf"),Qe,Pe;function lt(){}var pt=0,Ze=1e4,st="\u2581",Ke=`
|
|
**\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 Ie(Ne){return/^\d+$/.test(Ne)?"".concat(Ne,"px"):Ne}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,pe=Me?"Cmd":"Ctrl",be=["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"],ge=(Qe={},Object(c.a)(Qe,pe+"-B","bold"),Object(c.a)(Qe,pe+"-I","italic"),Qe),Ce=(Pe={},Object(c.a)(Pe,ke,"\u6DFB\u52A0\u94FE\u63A5"),Object(c.a)(Pe,ft,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(c.a)(Pe,ht,"\u6DFB\u52A0\u6587\u4EF6"),Object(c.a)(Pe,vt,"\u6DFB\u52A0\u8868\u683C"),Pe),We=me.a=function(Ne){var ut=Ne.defaultValue,Tt=ut===void 0?"":ut,Ut=Ne.onChange,St=Ne.width,_t=St===void 0?"100%":St,At=Ne.height,nt=At===void 0?400:At,rt=Ne.miniToolbar,xe=rt===void 0?!1:rt,Fe=Ne.isFocus,dt=Fe===void 0?!1:Fe,at=Ne.watch,xt=Ne.insertTemp,wt=Ne.mode,qe=wt===void 0?"markdown":wt,Bt=Ne.id,Ht=Bt===void 0?"markdown-editor-id":Bt,Nt=Ne.showResizeBar,Gt=Nt===void 0?!1:Nt,Or=Ne.noStorage,Pr=Or===void 0?!1:Or,yr=Ne.showNullButton,jt=yr===void 0?!1:yr,Dr=Ne.hidetoolBar,Wr=Dr===void 0?!1:Dr,Mr=Ne.fullScreen,pr=Mr===void 0?!1:Mr,Sr=Ne.onBlur,mn=Ne.onCMBeforeChange,on=Ne.onFullScreen,fe=Ne.className,ye=fe===void 0?"":fe,Ue=Ne.disablePaste,et=Ue===void 0?!1:Ue,Je=Ne.placeholder,Dt=Je===void 0?"":Je,Z=Ne.values,M=Z===void 0?"":Z,P=Object(i.useState)(null),$=Object(_.a)(P,2),ne=$[0],ee=$[1],je=Object(i.useState)(Tt),Ct=Object(_.a)(je,2),Ft=Ct[0],kt=Ct[1],bt=Object(i.useState)(at),Yt=Object(_.a)(bt,2),zt=Yt[0],$t=Yt[1],dr=Object(i.useState)(pr),Rr=Object(_.a)(dr,2),mr=Rr[0],_r=Rr[1],hr=Object(i.useState)(""),kr=Object(_.a)(hr,2),Nr=kr[0],qr=kr[1],Yr=Object(i.useState)(0),rn=Object(_.a)(Yr,2),An=rn[0],$r=rn[1],nn=Object(i.useState)(nt),sn=Object(_.a)(nn,2),cn=sn[0],dn=sn[1],Cr=Object(i.useState)(!1),cr=Object(_.a)(Cr,2),sr=cr[0],nr=cr[1],Zt=Object(i.useRef)(Object(Re.a)()),gr=Object(i.useRef)(!1),br=Object(i.useRef)(),xr=Object(i.useRef)(),vr=Object(i.useRef)(),On=Object(i.useRef)(),Hr=Object(i.useRef)(),Cn=function(){var qt=Object(w.a)(x.a.mark(function er(){var tr,wr;return x.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return Tr.next=2,Object(we.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Zt.current}});case 2:wr=Tr.sent,wr!=null&&(tr=wr.attachments)!==null&&tr!==void 0&&tr.length&&(console.log("cm:",ne,xr),wr.attachments.map(function(Lr){Lr.content_type.indexOf("image")>-1?ne.replaceSelection(".concat(Lr.content_type,")")):Lr.content_type.indexOf("video")>-1?ne.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Lr.content_type.indexOf("pdf")>-1?ne.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,'&disposition=inline" target="_blank">').concat(Lr.name,"</a>")):ne.replaceSelection("[".concat(Lr.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}));case 4:case"end":return Tr.stop()}},er)}));return function(){return qt.apply(this,arguments)}}();Object(i.useEffect)(function(){kt(M),ne==null||ne.setValue(M)},[M]),Object(i.useEffect)(function(){on==null||on(mr)},[mr]),Object(i.useEffect)(function(){if(xr.current){var qt=T.a.fromTextArea(xr.current,{mode:qe,lineNumbers:!xe,lineWrapping:!0,value:Tt,autoCloseTags:!0,autoCloseBrackets:!0});dt&&qt.focus();function er(tr,wr){if(et){wr.preventDefault();return}var Ur=wr.clipboardData;if(Ur){var Tr=Ur.types.toString(),Lr=Ur.items;if(Tr==="Files"||Ur.types.indexOf("Files")>-1){if(wr.preventDefault(),qe=="stex")return;try{var bn,Fn=Lr[1];((bn=Lr[0])===null||bn===void 0?void 0:bn.kind)==="file"&&(Fn=Lr[0]);var Ir=Fn.getAsFile(),ei=Ir.name.split(".").pop();Et(Ir,function(Gr){if(Gr.id){var Dn,ui,Ai;(Ir==null||((Dn=Ir.type)===null||Dn===void 0)?void 0:Dn.indexOf("image"))>-1?qt.replaceSelection(".concat(Gr.content_type,")")):(Ir==null||((ui=Ir.type)===null||ui===void 0)?void 0:ui.indexOf("video"))>-1?qt.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,'"></video>')):(Ir==null||((Ai=Ir.type)===null||Ai===void 0)?void 0:Ai.indexOf("pdf"))>-1?qt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Ir.type,'&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):be.includes(ei)?qt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,'?type=office&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):qt.replaceSelection("[".concat(Ir.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Gr.content_type,")"))}else(Gr==null?void 0:Gr.status)===401&&(document.location.href="/user/login")})}catch(Gr){D.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return qt.on("paste",er),qt.on("dragleave",function(tr,wr){vr.current.classList.remove("mouse-hover-md")}),qt.on("dragover",function(tr,wr){vr.current.classList.add("mouse-hover-md")}),qt.on("drop",function(tr,wr){vr.current.classList.add("mouse-hover-md");var Ur;if(Ur=wr.dataTransfer.files,Ur.length>0){wr.preventDefault(),wr.stopPropagation();for(var Tr=function(Fn){var Ir=Ur[Fn],ei=Ir.name.split(".").pop();Et(Ir,function(Gr){if(Gr.id){var Dn,ui,Ai;(Ir==null||((Dn=Ir.type)===null||Dn===void 0)?void 0:Dn.indexOf("image"))>-1?qt.replaceSelection(".concat(Gr.content_type,")")):(Ir==null||((ui=Ir.type)===null||ui===void 0)?void 0:ui.indexOf("video"))>-1?qt.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,'"></video>')):(Ir==null||((Ai=Ir.type)===null||Ai===void 0)?void 0:Ai.indexOf("pdf"))>-1?qt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Ir.type,'&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):be.includes(ei)?qt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,'?type=office&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):qt.replaceSelection("[".concat(Ir.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Gr.content_type,")"))}else(Gr==null?void 0:Gr.status)===401&&(document.location.href="/user/login")})},Lr=0;Lr<Ur.length;Lr++)Tr(Lr)}}),ee(qt),function(){qt.off("paste",er)}}},[]);var Hn=Object(i.useCallback)(function(){if(vr.current)try{}catch(qt){console.log(qt,"---- to set md editor body height")}},[cn,vr,mr]);Object(i.useEffect)(function(){function qt(){var tr=new y.default(function(wr){var Ur=Object(L.a)(wr),Tr;try{for(Ur.s();!(Tr=Ur.n()).done;){var Lr=Tr.value;(Lr.target.offsetHeight>0||Lr.target.offsetWidth>0)&&(Hn(),ne.setSize("100%","100%"),ne.refresh())}}catch(bn){Ur.e(bn)}finally{Ur.f()}});return tr.observe(xr.current.parentElement),tr}if(ne){var er=qt();return function(){er.unobserve(xr.current.parentElement)}}},[ne,Hn]),Object(i.useEffect)(function(){if(ne){for(var qt=[],er=function(){var Lr=wr[tr];Ur=Object(_.a)(Lr,2);var bn=Ur[0],Fn=Ur[1],Ir=Object(c.a)({},bn,function(){Ln(Fn)});qt.push(Ir),ne.addKeyMap(Ir)},tr=0,wr=Object.entries(ge);tr<wr.length;tr++){var Ur;er()}return br.current=setInterval(function(){gr.current&&Cn()},4e3),function(){clearInterval(br.current);var Tr=Object(L.a)(qt),Lr;try{for(Tr.s();!(Lr=Tr.n()).done;){var bn=Lr.value;ne.removeKeyMap(bn)}}catch(Fn){Tr.e(Fn)}finally{Tr.f()}}}},[ne]),Object(i.useEffect)(function(){pr!==mr&&_r(pr)},[pr]),Object(Mt.a)(function(){if(!Pr&&An>0){var qt=new Date().getTime(),er=window.sessionStorage.getItem(Ht);qt>=An+Ze&&(!er||er!==Ft)&&(window.sessionStorage.setItem(Ht,Ft),nr(!0))}},Ze),Object(i.useEffect)(function(){$t(at)},[ne,at]),Object(i.useEffect)(function(){ne&&(dt&&ne.focus())},[ne,dt]),Object(i.useEffect)(function(){if(zt&&ne){var qt=ne.getScrollerElement();function er(tr){var wr=tr.target;if(Hr.current){var Ur=wr.scrollTop/wr.scrollHeight;Hr.current.scrollTop=Hr.current.scrollHeight*Ur}}return qt.addEventListener("scroll",er),function(){qt.removeEventListener("scroll",er)}}},[ne,zt]),Object(i.useEffect)(function(){if(ne&&mn){function qt(er,tr){mn(er,tr)}return ne.on("beforeChange",qt),function(){ne.off("beforeChange",qt)}}},[ne,mn]),Object(i.useEffect)(function(){if(ne&&Sr){function qt(){Sr(ne.getValue())}return ne.on("blur",qt),function(){ne.off("blur",qt)}}},[ne,Sr]),Object(i.useEffect)(function(){if(ne){function qt(er){var tr=er.getValue();kt(tr),$r(new Date().getTime()),er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ut&&Ut(tr)}return ne.on("change",qt),function(){ne.off("change",qt)}}},[ne,Ut]),Object(i.useEffect)(function(){ne&&(Tt==null?(ne.setValue(""),kt("")):Tt!==ne.getValue()&&(ne.setValue(Tt),kt(Tt),ne.setCursor(ne.lineCount(),0)))},[ne,Tt]);var Ln=Object(i.useCallback)(function(qt){var er=ne.getCursor(),tr=ne.getSelection(),wr=tr.split(`
|
|
`);switch(qt){case"bold":return ne.replaceSelection("**"+tr+"**"),tr===""&&ne.setCursor(er.line,er.ch+2),ne.focus();case"italic":return ne.replaceSelection("*"+tr+"*"),tr===""&&ne.setCursor(er.line,er.ch+1),ne.focus();case"code":return ne.replaceSelection("`"+tr+"`"),tr===""&&ne.setCursor(er.line,er.ch+1),ne.focus();case"inline-latex":return ne.replaceSelection("`$$"+tr+"$$`"),tr===""&&ne.setCursor(er.line,er.ch+3),ne.focus();case"latex":return ne.replaceSelection("```latex\n"+tr+"\n```"),ne.setCursor(er.line+1,tr.length+1),ne.focus();case"line-break":return ne.replaceSelection(`<br/>
|
|
`),ne.focus();case"list-ul":return tr===""?ne.replaceSelection("- "+tr):ne.replaceSelection(wr.map(function(Ur){return Ur===""?"":"- ".concat(Ur)}).join(`
|
|
`)),ne.focus();case"list-ol":return tr===""?ne.replaceSelection("1. "+tr):ne.replaceSelection(wr.map(function(Ur,Tr){return Ur===""?"":"".concat(Tr+1,". ").concat(Ur)}).join(`
|
|
`)),ne.focus();case"add-null-ch":return tr===""&&ne.setCursor(er.line,er.ch+1),ne.replaceSelection(st),ne.focus();case"inster-template-1":return tr===""&&ne.setCursor(er.line,er.ch),ne.replaceSelection(Ke),ne.focus();case"eraser":return ne.setValue(""),ne.focus();case"trigger-watch":return $t(!zt),ne.focus();case"trigger-full-screen":return _r(!mr),ne.focus();case ke:qr(ke);return;case ft:qr(ft);return;case ht:qr(ht);return;case vt:qr(vt);return;default:throw new Error}},[ne,zt,mr]),Jr=Object(i.useCallback)(function(qt){qr("");switch(Nr){case ke:var er=qt.title,tr=qt.link;return ne.replaceSelection("[".concat(er,"](").concat(tr,")")),ne.focus();case ft:var wr=qt.language,Ur=qt.content;return ne.replaceSelection(["```"+wr,Ur,"```"].join(`
|
|
`)),ne.focus();case ht:var Tr=qt.src,Lr=qt.alt,bn=qt.name;return Tr.indexOf("type=image")>-1?ne.replaceSelection(".concat(Tr,' "').concat(Lr||"",'" )')):Tr.indexOf("type=application/pdf")>-1?ne.replaceSelection('<a href="'.concat(Tr,'&disposition=inline" target="_blank">').concat(bn,"</a>")):ne.replaceSelection('<a href="'.concat(Tr,'" target="_blank">').concat(bn,"</a>")),ne.focus();case vt:for(var Fn=qt.row,Ir=qt.col,ei=qt.align,Gr=`
|
|
`,Dn=0;Dn<Fn;Dn++){for(var ui=[],Ai=[],Vr=0;Vr<Ir;Vr++)Dn===1&&Ai.push(Lt[ei]),ui.push(" ");Dn===1&&(Gr+="| ".concat(Ai.join(" | "),` |
|
|
`)),Gr+="| ".concat(ui.join(Ir===1?"":" | "),` |
|
|
`)}return ne.replaceSelection(Gr+`
|
|
`),ne.focus();default:throw new Error}},[ne,Nr]),Xn=Object(i.useMemo)(function(){switch(Nr){case ke:return h.a.createElement(se,{callback:Jr,onCancel:wn});case ft:return h.a.createElement(le.b,{callback:Jr,onCancel:wn});case ht:return h.a.createElement(Le,{callback:Jr,onCancel:wn});case vt:return h.a.createElement(ce,{callback:Jr,onCancel:wn});default:return null}},[Nr]);function wn(){qr("")}Object(i.useEffect)(function(){if(On.current){var qt=On.current,er=!1,tr=0;function wr(Lr){er=!0,tr=Lr.pageY}function Ur(){er=!1}function Tr(Lr){if(er){var bn=Lr.pageY-tr;bn<0&&(bn=0),bn>300&&(bn=300);var Fn=nt+bn+"px";dn(Fn)}}return qt.addEventListener("mousedown",wr),document.addEventListener("mousemove",Tr),document.addEventListener("mouseup",Ur),function(){qt.removeEventListener("mousedown",wr),document.removeEventListener("mousemove",Tr),document.removeEventListener("mouseup",Ur)}}},[ne,On]),Object(i.useEffect)(function(){dn(nt)},[nt]);var Yn=Ie(_t),Mn=Ie(cn),oi={width:Yn,height:Mn},Un=Object(i.useMemo)(function(){if(An){var qt=new Date(An),er=qt.getHours(),tr=qt.getMinutes(),wr=qt.getSeconds();return er=er<10?"0"+er:er,tr=tr<10?"0"+tr:tr,wr=wr<10?"0"+wr:wr,"".concat(er,":").concat(tr,":").concat(wr)}return 0},[An]);function gn(){window.sessionStorage.removeItem(Ht),nr(!1),$r(0)}function Qn(){nr(!1),$r(0),ne.setValue(window.sessionStorage.getItem(Ht))}function li(qt,er){var tr=ne.getValue();tr=tr.replace(qt,er),kt(tr),ne==null||ne.setValue(tr)}return h.a.createElement(i.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:vr},h.a.createElement("div",{className:"markdown-editor-container ".concat(ye," ").concat(zt?"on-preview":""," ").concat(xe?"mini":""," ").concat(mr?"full-screen":""),style:oi},h.a.createElement(g,{insertTemp:xt,watch:zt,fullScreen:mr,showNullButton:jt,onActionCallback:Ln,hidetoolBar:Wr,uuid:Zt.current,setOpenPhones:function(){gr.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:xr,placeholder:Dt})),zt?h.a.createElement("div",{ref:Hr,className:"preview-container"},qe==="stex"&&h.a.createElement(R,{value:Ft}),qe!=="stex"&&h.a.createElement(v.a,{edit:!0,value:Ft,replaces:li})):null))),Gt?h.a.createElement("a",{ref:On,className:"editor-resize"}):null,h.a.createElement(U.a,null,Ce[Nr]?h.a.createElement(N.a,{centered:!0,title:Ce[Nr],visible:!0,onCancel:wn,footer:null},Xn):null))}},P47w:function($e,me,z){var J=z("hydK"),N=J.createElement,L=z("IMiH"),Q=z("mFDi"),D=z("Fofx"),w=z("6GrX"),_=z("pzxd"),c=z("dqUG"),C=L.CMD,x=Array.prototype.join,i="none",h=Math.round,O=Math.sin,T=Math.cos,y=Math.PI,B=Math.PI*2,u=180/y,s=1e-4;function l(X){return h(X*1e4)/1e4}function f(X){return X<s&&X>-s}function m(X,se){var le=se?X.textFill:X.fill;return le!=null&&le!==i}function E(X,se){var le=se?X.textStroke:X.stroke;return le!=null&&le!==i}function v(X,se){se&&R(X,"transform","matrix("+x.call(se,",")+")")}function R(X,se,le){(!le||le.type!=="linear"&&le.type!=="radial")&&X.setAttribute(se,le)}function p(X,se,le){X.setAttributeNS("http://www.w3.org/1999/xlink",se,le)}function a(X,se,le,Te){if(m(se,le)){var Ee=le?se.textFill:se.fill;Ee=Ee==="transparent"?i:Ee,R(X,"fill",Ee),R(X,"fill-opacity",se.fillOpacity!=null?se.fillOpacity*se.opacity:se.opacity)}else R(X,"fill",i);if(E(se,le)){var Be=le?se.textStroke:se.stroke;Be=Be==="transparent"?i:Be,R(X,"stroke",Be);var De=le?se.textStrokeWidth:se.lineWidth,Ve=!le&&se.strokeNoScale?Te.getLineScale():1;R(X,"stroke-width",De/Ve),R(X,"paint-order",le?"stroke":"fill"),R(X,"stroke-opacity",se.strokeOpacity!=null?se.strokeOpacity:se.opacity);var _e=se.lineDash;_e?(R(X,"stroke-dasharray",se.lineDash.join(",")),R(X,"stroke-dashoffset",h(se.lineDashOffset||0))):R(X,"stroke-dasharray",""),se.lineCap&&R(X,"stroke-linecap",se.lineCap),se.lineJoin&&R(X,"stroke-linejoin",se.lineJoin),se.miterLimit&&R(X,"stroke-miterlimit",se.miterLimit)}else R(X,"stroke",i)}function r(X){for(var se=[],le=X.data,Te=X.len(),Ee=0;Ee<Te;){var Be=le[Ee++],De="",Ve=0;switch(Be){case C.M:De="M",Ve=2;break;case C.L:De="L",Ve=2;break;case C.Q:De="Q",Ve=4;break;case C.C:De="C",Ve=6;break;case C.A:var _e=le[Ee++],Le=le[Ee++],tt=le[Ee++],Et=le[Ee++],Oe=le[Ee++],He=le[Ee++],it=le[Ee++],Ae=le[Ee++],re=Math.abs(He),ae=f(re-B)||(Ae?He>=B:-He>=B),ce=He>0?He%B:He%B+B,we=!1;ae?we=!0:f(re)?we=!1:we=ce>=y===!!Ae;var Re=l(_e+tt*T(Oe)),ke=l(Le+Et*O(Oe));ae&&(Ae?He=B-1e-4:He=-B+1e-4,we=!0,Ee===9&&se.push("M",Re,ke));var ht=l(_e+tt*T(Oe+He)),ft=l(Le+Et*O(Oe+He));se.push("A",l(tt),l(Et),h(it*u),+we,+Ae,ht,ft);break;case C.Z:De="Z";break;case C.R:var ht=l(le[Ee++]),ft=l(le[Ee++]),vt=l(le[Ee++]),yt=l(le[Ee++]);se.push("M",ht,ft,"L",ht+vt,ft,"L",ht+vt,ft+yt,"L",ht,ft+yt,"L",ht,ft);break}De&&se.push(De);for(var Lt=0;Lt<Ve;Lt++)se.push(l(le[Ee++]))}return se.join(" ")}var n={};n.brush=function(X){var se=X.style,le=X.__svgEl;le||(le=N("path"),X.__svgEl=le),X.path||X.createPathProxy();var Te=X.path;if(X.__dirtyPath){Te.beginPath(),Te.subPixelOptimize=!1,X.buildPath(Te,X.shape),X.__dirtyPath=!1;var Ee=r(Te);Ee.indexOf("NaN")<0&&R(le,"d",Ee)}a(le,se,!1,X),v(le,X.transform),se.text!=null?W(X,X.getBoundingRect()):te(X)};var o={};o.brush=function(X){var se=X.style,le=se.image;if(le instanceof HTMLImageElement){var Te=le.src;le=Te}if(!le)return;var Ee=se.x||0,Be=se.y||0,De=se.width,Ve=se.height,_e=X.__svgEl;_e||(_e=N("image"),X.__svgEl=_e),le!==X.__imageSrc&&(p(_e,"href",le),X.__imageSrc=le),R(_e,"width",De),R(_e,"height",Ve),R(_e,"x",Ee),R(_e,"y",Be),v(_e,X.transform),se.text!=null?W(X,X.getBoundingRect()):te(X)};var S={},b=new Q,g={},U=[],K={left:"start",right:"end",center:"middle",middle:"middle"},W=function(X,se){var le=X.style,Te=X.transform,Ee=X instanceof c||le.transformText;X.__dirty&&_.normalizeTextStyle(le,!0);var Be=le.text;if(Be!=null&&(Be+=""),!_.needDrawText(Be,le))return;Be==null&&(Be=""),!Ee&&Te&&(b.copy(se),b.applyTransform(Te),se=b);var De=X.__textSvgEl;De||(De=N("text"),X.__textSvgEl=De);var Ve=De.style,_e=le.font||w.DEFAULT_FONT,Le=De.__computedFont;_e!==De.__styleFont&&(Ve.font=De.__styleFont=_e,Le=De.__computedFont=Ve.font);var tt=le.textPadding,Et=le.textLineHeight,Oe=X.__textCotentBlock;(!Oe||X.__dirtyText)&&(Oe=X.__textCotentBlock=w.parsePlainText(Be,Le,tt,Et,le.truncate));var He=Oe.outerHeight,it=Oe.lineHeight;_.getBoxPosition(g,X,le,se);var Ae=g.baseX,re=g.baseY,ae=g.textAlign||"left",ce=g.textVerticalAlign;q(De,Ee,Te,le,se,Ae,re);var we=w.adjustTextY(re,He,ce),Re=Ae,ke=we;tt&&(Re=Y(Ae,ae,tt),ke+=tt[0]),ke+=it/2,a(De,le,!0,X);var ht=Oe.canCacheByTextString,ft=X.__tspanList||(X.__tspanList=[]),vt=ft.length;if(ht&&X.__canCacheByTextString&&X.__text===Be){if(X.__dirtyText&&vt)for(var yt=0;yt<vt;++yt)V(ft[yt],ae,Re,ke+yt*it)}else{X.__text=Be,X.__canCacheByTextString=ht;for(var Lt=Oe.lines,Mt=Lt.length,yt=0;yt<Mt;yt++){var Qe=ft[yt],Pe=Lt[yt];Qe?Qe.__zrText!==Pe&&(Qe.innerHTML="",Qe.appendChild(document.createTextNode(Pe))):(Qe=ft[yt]=N("tspan"),De.appendChild(Qe),Qe.appendChild(document.createTextNode(Pe))),V(Qe,ae,Re,ke+yt*it)}if(vt>Mt){for(;yt<vt;yt++)De.removeChild(ft[yt]);ft.length=Mt}}};function q(X,se,le,Te,Ee,Be,De){D.identity(U),se&&le&&D.copy(U,le);var Ve=Te.textRotation;if(Ee&&Ve){var _e=Te.textOrigin;_e==="center"?(Be=Ee.width/2+Ee.x,De=Ee.height/2+Ee.y):_e&&(Be=_e[0]+Ee.x,De=_e[1]+Ee.y),U[4]-=Be,U[5]-=De,D.rotate(U,U,Ve),U[4]+=Be,U[5]+=De}v(X,U)}function Y(X,se,le){return se==="right"?X-le[1]:se==="center"?X+le[3]/2-le[1]/2:X+le[3]}function V(X,se,le,Te){R(X,"dominant-baseline","middle"),R(X,"text-anchor",K[se]),R(X,"x",le),R(X,"y",Te)}function te(X){X&&X.__textSvgEl&&(X.__textSvgEl.parentNode&&X.__textSvgEl.parentNode.removeChild(X.__textSvgEl),X.__textSvgEl=null,X.__tspanList=[],X.__text=null)}S.drawRectText=W,S.brush=function(X){var se=X.style;se.text!=null?W(X,!1):te(X)},me.path=n,me.image=o,me.text=S},P4Qj:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.removeSensor=me.getSensor=void 0;var J=Q(z("chpo")),N=z("FxDU"),L=z("24YM");function Q(c){return c&&c.__esModule?c:{default:c}}var D={},w=function(C){var x=C.getAttribute(L.SizeSensorId);if(x&&D[x])return D[x];var i=(0,J.default)();C.setAttribute(L.SizeSensorId,i);var h=(0,N.createSensor)(C);return D[i]=h,h};me.getSensor=w;var _=function(C){var x=C.element.getAttribute(L.SizeSensorId);C.element.removeAttribute(L.SizeSensorId),C.destroy(),x&&D[x]&&delete D[x]};me.removeSensor=_},QBsz:function($e,me){var z=typeof Float32Array=="undefined"?Array:Float32Array;function J(a,r){var n=new z(2);return a==null&&(a=0),r==null&&(r=0),n[0]=a,n[1]=r,n}function N(a,r){return a[0]=r[0],a[1]=r[1],a}function L(a){var r=new z(2);return r[0]=a[0],r[1]=a[1],r}function Q(a,r,n){return a[0]=r,a[1]=n,a}function D(a,r,n){return a[0]=r[0]+n[0],a[1]=r[1]+n[1],a}function w(a,r,n,o){return a[0]=r[0]+n[0]*o,a[1]=r[1]+n[1]*o,a}function _(a,r,n){return a[0]=r[0]-n[0],a[1]=r[1]-n[1],a}function c(a){return Math.sqrt(x(a))}var C=c;function x(a){return a[0]*a[0]+a[1]*a[1]}var i=x;function h(a,r,n){return a[0]=r[0]*n[0],a[1]=r[1]*n[1],a}function O(a,r,n){return a[0]=r[0]/n[0],a[1]=r[1]/n[1],a}function T(a,r){return a[0]*r[0]+a[1]*r[1]}function y(a,r,n){return a[0]=r[0]*n,a[1]=r[1]*n,a}function B(a,r){var n=c(r);return n===0?(a[0]=0,a[1]=0):(a[0]=r[0]/n,a[1]=r[1]/n),a}function u(a,r){return Math.sqrt((a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1]))}var s=u;function l(a,r){return(a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1])}var f=l;function m(a,r){return a[0]=-r[0],a[1]=-r[1],a}function E(a,r,n,o){return a[0]=r[0]+o*(n[0]-r[0]),a[1]=r[1]+o*(n[1]-r[1]),a}function v(a,r,n){var o=r[0],S=r[1];return a[0]=n[0]*o+n[2]*S+n[4],a[1]=n[1]*o+n[3]*S+n[5],a}function R(a,r,n){return a[0]=Math.min(r[0],n[0]),a[1]=Math.min(r[1],n[1]),a}function p(a,r,n){return a[0]=Math.max(r[0],n[0]),a[1]=Math.max(r[1],n[1]),a}me.create=J,me.copy=N,me.clone=L,me.set=Q,me.add=D,me.scaleAndAdd=w,me.sub=_,me.len=c,me.length=C,me.lenSquare=x,me.lengthSquare=i,me.mul=h,me.div=O,me.dot=T,me.scale=y,me.normalize=B,me.distance=u,me.dist=s,me.distanceSquare=l,me.distSquare=f,me.negate=m,me.lerp=E,me.applyTransform=v,me.min=R,me.max=p},"QO+J":function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.createSensor=void 0;var J=L(z("NohK")),N=z("24YM");function L(D){return D&&D.__esModule?D:{default:D}}var Q=function(w){var _=void 0,c=[],C=function(){getComputedStyle(w).position==="static"&&(w.style.position="relative");var y=document.createElement("object");return y.onload=function(){y.contentDocument.defaultView.addEventListener("resize",x),x()},y.style.display="block",y.style.position="absolute",y.style.top="0",y.style.left="0",y.style.height="100%",y.style.width="100%",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.zIndex="-1",y.style.opacity="0",y.setAttribute("class",N.SensorClassName),y.setAttribute("tabindex",N.SensorTabIndex),y.type="text/html",w.appendChild(y),y.data="about:blank",y},x=(0,J.default)(function(){c.forEach(function(T){T(w)})}),i=function(y){_||(_=C()),c.indexOf(y)===-1&&c.push(y)},h=function(){_&&_.parentNode&&(_.contentDocument&&_.contentDocument.defaultView.removeEventListener("resize",x),_.parentNode.removeChild(_),_=void 0,c=[])},O=function(y){var B=c.indexOf(y);B!==-1&&c.splice(B,1),c.length===0&&_&&h()};return{element:w,bind:i,destroy:h,unbind:O}};me.createSensor=Q},Qe9p:function($e,me,z){var J=z("1RvN"),N={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 L(r){return r=Math.round(r),r<0?0:r>255?255:r}function Q(r){return r=Math.round(r),r<0?0:r>360?360:r}function D(r){return r<0?0:r>1?1:r}function w(r){return r.length&&r.charAt(r.length-1)==="%"?L(parseFloat(r)/100*255):L(parseInt(r,10))}function _(r){return r.length&&r.charAt(r.length-1)==="%"?D(parseFloat(r)/100):D(parseFloat(r))}function c(r,n,o){return o<0?o+=1:o>1&&(o-=1),o*6<1?r+(n-r)*o*6:o*2<1?n:o*3<2?r+(n-r)*(2/3-o)*6:r}function C(r,n,o){return r+(n-r)*o}function x(r,n,o,S,b){return r[0]=n,r[1]=o,r[2]=S,r[3]=b,r}function i(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r}var h=new J(20),O=null;function T(r,n){O&&i(O,n),O=h.put(r,O||n.slice())}function y(r,n){if(!r)return;n=n||[];var o=h.get(r);if(o)return i(n,o);r=r+"";var S=r.replace(/ /g,"").toLowerCase();if(S in N)return i(n,N[S]),T(r,n),n;if(S.charAt(0)==="#"){if(S.length===4){var b=parseInt(S.substr(1),16);if(!(b>=0&&b<=4095)){x(n,0,0,0,1);return}return x(n,(b&3840)>>4|(b&3840)>>8,b&240|(b&240)>>4,b&15|(b&15)<<4,1),T(r,n),n}else if(S.length===7){var b=parseInt(S.substr(1),16);if(!(b>=0&&b<=16777215)){x(n,0,0,0,1);return}return x(n,(b&16711680)>>16,(b&65280)>>8,b&255,1),T(r,n),n}return}var g=S.indexOf("("),U=S.indexOf(")");if(g!==-1&&U+1===S.length){var K=S.substr(0,g),W=S.substr(g+1,U-(g+1)).split(","),q=1;switch(K){case"rgba":if(W.length!==4){x(n,0,0,0,1);return}q=_(W.pop());case"rgb":if(W.length!==3){x(n,0,0,0,1);return}return x(n,w(W[0]),w(W[1]),w(W[2]),q),T(r,n),n;case"hsla":if(W.length!==4){x(n,0,0,0,1);return}return W[3]=_(W[3]),B(W,n),T(r,n),n;case"hsl":if(W.length!==3){x(n,0,0,0,1);return}return B(W,n),T(r,n),n;default:return}}x(n,0,0,0,1);return}function B(r,n){var o=(parseFloat(r[0])%360+360)%360/360,S=_(r[1]),b=_(r[2]),g=b<=.5?b*(S+1):b+S-b*S,U=b*2-g;return n=n||[],x(n,L(c(U,g,o+1/3)*255),L(c(U,g,o)*255),L(c(U,g,o-1/3)*255),1),r.length===4&&(n[3]=r[3]),n}function u(r){if(!r)return;var n=r[0]/255,o=r[1]/255,S=r[2]/255,b=Math.min(n,o,S),g=Math.max(n,o,S),U=g-b,K=(g+b)/2,W,q;if(U===0)W=0,q=0;else{K<.5?q=U/(g+b):q=U/(2-g-b);var Y=((g-n)/6+U/2)/U,V=((g-o)/6+U/2)/U,te=((g-S)/6+U/2)/U;n===g?W=te-V:o===g?W=1/3+Y-te:S===g&&(W=2/3+V-Y),W<0&&(W+=1),W>1&&(W-=1)}var X=[W*360,q,K];return r[3]!=null&&X.push(r[3]),X}function s(r,n){var o=y(r);if(o){for(var S=0;S<3;S++)n<0?o[S]=o[S]*(1-n)|0:o[S]=(255-o[S])*n+o[S]|0,o[S]>255?o[S]=255:r[S]<0&&(o[S]=0);return a(o,o.length===4?"rgba":"rgb")}}function l(r){var n=y(r);if(n)return((1<<24)+(n[0]<<16)+(n[1]<<8)+ +n[2]).toString(16).slice(1)}function f(r,n,o){if(!(n&&n.length)||!(r>=0&&r<=1))return;o=o||[];var S=r*(n.length-1),b=Math.floor(S),g=Math.ceil(S),U=n[b],K=n[g],W=S-b;return o[0]=L(C(U[0],K[0],W)),o[1]=L(C(U[1],K[1],W)),o[2]=L(C(U[2],K[2],W)),o[3]=D(C(U[3],K[3],W)),o}var m=f;function E(r,n,o){if(!(n&&n.length)||!(r>=0&&r<=1))return;var S=r*(n.length-1),b=Math.floor(S),g=Math.ceil(S),U=y(n[b]),K=y(n[g]),W=S-b,q=a([L(C(U[0],K[0],W)),L(C(U[1],K[1],W)),L(C(U[2],K[2],W)),D(C(U[3],K[3],W))],"rgba");return o?{color:q,leftIndex:b,rightIndex:g,value:S}:q}var v=E;function R(r,n,o,S){if(r=y(r),r)return r=u(r),n!=null&&(r[0]=Q(n)),o!=null&&(r[1]=_(o)),S!=null&&(r[2]=_(S)),a(B(r),"rgba")}function p(r,n){if(r=y(r),r&&n!=null)return r[3]=D(n),a(r,"rgba")}function a(r,n){if(!r||!r.length)return;var o=r[0]+","+r[1]+","+r[2];return(n==="rgba"||n==="hsva"||n==="hsla")&&(o+=","+r[3]),n+"("+o+")"}me.parse=y,me.lift=s,me.toHex=l,me.fastLerp=f,me.fastMapToColor=m,me.lerp=E,me.mapToColor=v,me.modifyHSL=R,me.modifyAlpha=p,me.stringify=a},QuXc:function($e,me){var z=function(N){this.colorStops=N||[]};z.prototype={constructor:z,addColorStop:function(N,L){this.colorStops.push({offset:N,color:L})}};var J=z;$e.exports=J},RDYZ:function($e,me,z){var J=z("dMvE");function N(Q){this._target=Q.target,this._life=Q.life||1e3,this._delay=Q.delay||0,this._initialized=!1,this.loop=Q.loop==null?!1:Q.loop,this.gap=Q.gap||0,this.easing=Q.easing||"Linear",this.onframe=Q.onframe,this.ondestroy=Q.ondestroy,this.onrestart=Q.onrestart,this._pausedTime=0,this._paused=!1}N.prototype={constructor:N,step:function(Q,D){if(this._initialized||(this._startTime=Q+this._delay,this._initialized=!0),this._paused){this._pausedTime+=D;return}var w=(Q-this._startTime-this._pausedTime)/this._life;if(w<0)return;w=Math.min(w,1);var _=this.easing,c=typeof _=="string"?J[_]:_,C=typeof c=="function"?c(w):w;return this.fire("frame",C),w===1?this.loop?(this.restart(Q),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(Q){var D=(Q-this._startTime-this._pausedTime)%this._life;this._startTime=Q-D+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(Q,D){Q="on"+Q,this[Q]&&this[Q](this._target,D)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var L=N;$e.exports=L},RXMa:function($e,me,z){var J=z("y+Vt"),N=J.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(L,Q){var D=Q.cx,w=Q.cy,_=Math.PI*2;L.moveTo(D+Q.r,w),L.arc(D,w,Q.r,0,_,!1),L.moveTo(D+Q.r0,w),L.arc(D,w,Q.r0,0,_,!0)}});$e.exports=N},"SA+Z":function($e,me,z){var J=z("wTVA"),N=z("EbDI"),L=z("ZhPi"),Q=z("wkBT");function D(w){return J(w)||N(w)||L(w)||Q()}$e.exports=D,$e.exports.__esModule=!0,$e.exports.default=$e.exports},SJMd:function($e,me){/**
|
|
* @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 z,J,N,L=!1,Q,D;window.PR_SHOULD_USE_CONTINUATION=!0;var w,_;(function(){var c=window,C=["break,continue,do,else,for,if,return,while"],x=[C,"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=[x,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[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"],O=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],T=[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"],y="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",B=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="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",s=[C,"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"],l=[C,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],f=[C,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],m=[h,T,O,B,u,s,l,f],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,v="str",R="kwd",p="com",a="typ",r="lit",n="pun",o="pln",S="tag",b="dec",g="src",U="atn",K="atv",W="nocode",q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Y(Ae){for(var re=0,ae=!1,ce=!1,we=0,Re=Ae.length;we<Re;++we){var ke=Ae[we];if(ke.ignoreCase)ce=!0;else if(/[a-z]/i.test(ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ae=!0,ce=!1;break}}var ht={b:8,t:9,n:10,v:11,f:12,r:13};function ft(Qe){var Pe=Qe.charCodeAt(0);if(Pe!==92)return Pe;var lt=Qe.charAt(1);return Pe=ht[lt],Pe||("0"<=lt&<<="7"?parseInt(Qe.substring(1),8):lt==="u"||lt==="x"?parseInt(Qe.substring(2),16):Qe.charCodeAt(1))}function vt(Qe){if(Qe<32)return(Qe<16?"\\x0":"\\x")+Qe.toString(16);var Pe=String.fromCharCode(Qe);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function yt(Qe){var Pe=Qe.substring(1,Qe.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")),lt=[],pt=Pe[0]==="^",Ze=["["];pt&&Ze.push("^");for(var st=pt?1:0,Ke=Pe.length;st<Ke;++st){var Ie=Pe[st];if(/\\[bdsw]/i.test(Ie))Ze.push(Ie);else{var Me=ft(Ie),pe;st+2<Ke&&Pe[st+1]==="-"?(pe=ft(Pe[st+2]),st+=2):pe=Me,lt.push([Me,pe]),pe<65||Me>122||(pe<65||Me>90||lt.push([Math.max(65,Me)|32,Math.min(pe,90)|32]),pe<97||Me>122||lt.push([Math.max(97,Me)&~32,Math.min(pe,122)&~32]))}}lt.sort(function(We,Ne){return We[0]-Ne[0]||Ne[1]-We[1]});for(var be=[],ge=[],st=0;st<lt.length;++st){var Ce=lt[st];Ce[0]<=ge[1]+1?ge[1]=Math.max(ge[1],Ce[1]):be.push(ge=Ce)}for(var st=0;st<be.length;++st){var Ce=be[st];Ze.push(vt(Ce[0])),Ce[1]>Ce[0]&&(Ce[1]+1>Ce[0]&&Ze.push("-"),Ze.push(vt(Ce[1])))}return Ze.push("]"),Ze.join("")}function Lt(Qe){for(var Pe=Qe.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")),lt=Pe.length,pt=[],Ze=0,st=0;Ze<lt;++Ze){var Ke=Pe[Ze];if(Ke==="(")++st;else if(Ke.charAt(0)==="\\"){var Ie=+Ke.substring(1);Ie&&(Ie<=st?pt[Ie]=-1:Pe[Ze]=vt(Ie))}}for(var Ze=1;Ze<pt.length;++Ze)pt[Ze]===-1&&(pt[Ze]=++re);for(var Ze=0,st=0;Ze<lt;++Ze){var Ke=Pe[Ze];if(Ke==="(")++st,pt[st]||(Pe[Ze]="(?:");else if(Ke.charAt(0)==="\\"){var Ie=+Ke.substring(1);Ie&&Ie<=st&&(Pe[Ze]="\\"+pt[Ie])}}for(var Ze=0;Ze<lt;++Ze)Pe[Ze]==="^"&&Pe[Ze+1]!=="^"&&(Pe[Ze]="");if(Qe.ignoreCase&&ae)for(var Ze=0;Ze<lt;++Ze){var Ke=Pe[Ze],Me=Ke.charAt(0);Ke.length>=2&&Me==="["?Pe[Ze]=yt(Ke):Me!=="\\"&&(Pe[Ze]=Ke.replace(/[a-zA-Z]/g,function(ge){var Ce=ge.charCodeAt(0);return"["+String.fromCharCode(Ce&~32,Ce|32)+"]"}))}return Pe.join("")}for(var Mt=[],we=0,Re=Ae.length;we<Re;++we){var ke=Ae[we];if(ke.global||ke.multiline)throw new Error(""+ke);Mt.push("(?:"+Lt(ke)+")")}return new RegExp(Mt.join("|"),ce?"gi":"g")}function V(Ae,re){var ae=/(?:^|\s)nocode(?:\s|$)/,ce=[],we=0,Re=[],ke=0;function ht(ft){var vt=ft.nodeType;if(vt==1){if(ae.test(ft.className))return;for(var yt=ft.firstChild;yt;yt=yt.nextSibling)ht(yt);var Lt=ft.nodeName.toLowerCase();(Lt==="br"||Lt==="li")&&(ce[ke]=`
|
|
`,Re[ke<<1]=we++,Re[ke++<<1|1]=ft)}else if(vt==3||vt==4){var Mt=ft.nodeValue;Mt.length&&(re?Mt=Mt.replace(/\r\n?/g,`
|
|
`):Mt=Mt.replace(/[ \t\r\n]+/g," "),ce[ke]=Mt,Re[ke<<1]=we,we+=Mt.length,Re[ke++<<1|1]=ft)}}return ht(Ae),{sourceCode:ce.join("").replace(/\n$/,""),spans:Re}}function te(Ae,re,ae,ce,we){if(!ae)return;var Re={sourceNode:Ae,pre:1,langExtension:null,numberLines:null,sourceCode:ae,spans:null,basePos:re,decorations:null};ce(Re),we.push.apply(we,Re.decorations)}var X=/\S/;function se(Ae){for(var re=void 0,ae=Ae.firstChild;ae;ae=ae.nextSibling){var ce=ae.nodeType;re=ce===1?re?Ae:ae:ce===3&&X.test(ae.nodeValue)?Ae:re}return re===Ae?void 0:re}function le(Ae,re){var ae={},ce;(function(){for(var ke=Ae.concat(re),ht=[],ft={},vt=0,yt=ke.length;vt<yt;++vt){var Lt=ke[vt],Mt=Lt[3];if(Mt)for(var Qe=Mt.length;--Qe>=0;)ae[Mt.charAt(Qe)]=Lt;var Pe=Lt[1],lt=""+Pe;ft.hasOwnProperty(lt)||(ht.push(Pe),ft[lt]=null)}ht.push(/[\0-\uffff]/),ce=Y(ht)})();var we=re.length,Re=function(ke){for(var ht=ke.sourceCode,ft=ke.basePos,vt=ke.sourceNode,yt=[ft,o],Lt=0,Mt=ht.match(ce)||[],Qe={},Pe=0,lt=Mt.length;Pe<lt;++Pe){var pt=Mt[Pe],Ze=Qe[pt],st=void 0,Ke;if(typeof Ze=="string")Ke=!1;else{var Ie=ae[pt.charAt(0)];if(Ie)st=pt.match(Ie[1]),Ze=Ie[0];else{for(var Me=0;Me<we;++Me)if(Ie=re[Me],st=pt.match(Ie[1]),st){Ze=Ie[0];break}st||(Ze=o)}Ke=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ke&&!(st&&typeof st[1]=="string")&&(Ke=!1,Ze=g),Ke||(Qe[pt]=Ze)}var pe=Lt;if(Lt+=pt.length,!Ke)yt.push(ft+pe,Ze);else{var be=st[1],ge=pt.indexOf(be),Ce=ge+be.length;st[2]&&(Ce=pt.length-st[2].length,ge=Ce-be.length);var We=Ze.substring(5);te(vt,ft+pe,pt.substring(0,ge),Re,yt),te(vt,ft+pe+ge,be,Le(We,be),yt),te(vt,ft+pe+Ce,pt.substring(Ce),Re,yt)}}ke.decorations=yt};return Re}function Te(Ae){var re=[],ae=[];Ae.tripleQuotedStrings?re.push([v,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?re.push([v,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):re.push([v,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&ae.push([v,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=Ae.hashComments;ce&&(Ae.cStyleComments?(ce>1?re.push([p,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):re.push([p,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ae.push([v,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):re.push([p,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(ae.push([p,/^\/\/[^\r\n]*/,null]),ae.push([p,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var we=Ae.regexLiterals;if(we){var Re=we>1?"":`
|
|
\r`,ke=Re?".":"[\\S\\s]",ht="/(?=[^/*"+Re+"])(?:[^/\\x5B\\x5C"+Re+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Re+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";ae.push(["lang-regex",RegExp("^"+q+"("+ht+")")])}var ft=Ae.types;ft&&ae.push([a,ft]);var vt=(""+Ae.keywords).replace(/^ | $/g,"");vt.length&&ae.push([R,new RegExp("^(?:"+vt.replace(/[\s,]+/g,"|")+")\\b"),null]),re.push([o,/^\s+/,null,` \r
|
|
\xA0`]);var yt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(yt+="(?!s*/)"),ae.push([r,/^@[a-z_$][a-z_$@0-9]*/i,null],[a,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[o,/^[a-z_$][a-z_$@0-9]*/i,null],[r,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[o,/^\\[\s\S]?/,null],[n,new RegExp(yt),null]),le(re,ae)}var Ee=Te({keywords:m,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Be(Ae,re,ae){for(var ce=/(?:^|\s)nocode(?:\s|$)/,we=/\r\n?|\n/,Re=Ae.ownerDocument,ke=Re.createElement("li");Ae.firstChild;)ke.appendChild(Ae.firstChild);var ht=[ke];function ft(Pe){var lt=Pe.nodeType;if(lt==1&&!ce.test(Pe.className))if(Pe.nodeName==="br")vt(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var pt=Pe.firstChild;pt;pt=pt.nextSibling)ft(pt);else if((lt==3||lt==4)&&ae){var Ze=Pe.nodeValue,st=Ze.match(we);if(st){var Ke=Ze.substring(0,st.index);Pe.nodeValue=Ke;var Ie=Ze.substring(st.index+st[0].length);if(Ie){var Me=Pe.parentNode;Me.insertBefore(Re.createTextNode(Ie),Pe.nextSibling)}vt(Pe),Ke||Pe.parentNode.removeChild(Pe)}}}function vt(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function lt(st,Ke){var Ie=Ke?st.cloneNode(!1):st,Me=st.parentNode;if(Me){var pe=lt(Me,1),be=st.nextSibling;pe.appendChild(Ie);for(var ge=be;ge;ge=be)be=ge.nextSibling,pe.appendChild(ge)}return Ie}for(var pt=lt(Pe.nextSibling,0),Ze;(Ze=pt.parentNode)&&Ze.nodeType===1;)pt=Ze;ht.push(pt)}for(var yt=0;yt<ht.length;++yt)ft(ht[yt]);re===(re|0)&&ht[0].setAttribute("value",re);var Lt=Re.createElement("ol");Lt.className="linenums";for(var Mt=Math.max(0,re-1|0)||0,yt=0,Qe=ht.length;yt<Qe;++yt)ke=ht[yt],ke.className="L"+(yt+Mt)%10,ke.firstChild||ke.appendChild(Re.createTextNode("\xA0")),Lt.appendChild(ke);Ae.appendChild(Lt)}function De(Ae){var re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);re=re&&+re[1]<=8;var ae=/\n/g,ce=Ae.sourceCode,we=ce.length,Re=0,ke=Ae.spans,ht=ke.length,ft=0,vt=Ae.decorations,yt=vt.length,Lt=0;vt[yt]=we;var Mt,Qe;for(Qe=Mt=0;Qe<yt;)vt[Qe]!==vt[Qe+2]?(vt[Mt++]=vt[Qe++],vt[Mt++]=vt[Qe++]):Qe+=2;for(yt=Mt,Qe=Mt=0;Qe<yt;){for(var Pe=vt[Qe],lt=vt[Qe+1],pt=Qe+2;pt+2<=yt&&vt[pt+1]===lt;)pt+=2;vt[Mt++]=Pe,vt[Mt++]=lt,Qe=pt}yt=vt.length=Mt;var Ze=Ae.sourceNode,st="";Ze&&(st=Ze.style.display,Ze.style.display="none");try{for(var Ke=null;ft<ht;){var Ie=ke[ft],Me=ke[ft+2]||we,pe=vt[Lt+2]||we,pt=Math.min(Me,pe),be=ke[ft+1],ge;if(be.nodeType!==1&&(ge=ce.substring(Re,pt))){re&&(ge=ge.replace(ae,"\r")),be.nodeValue=ge;var Ce=be.ownerDocument,We=Ce.createElement("span");We.className=vt[Lt+1];var Ne=be.parentNode;Ne.replaceChild(We,be),We.appendChild(be),Re<Me&&(ke[ft+1]=be=Ce.createTextNode(ce.substring(pt,Me)),Ne.insertBefore(be,We.nextSibling))}Re=pt,Re>=Me&&(ft+=2),Re>=pe&&(Lt+=2)}}finally{Ze&&(Ze.style.display=st)}}var Ve={};function _e(Ae,re){for(var ae=re.length;--ae>=0;){var ce=re[ae];Ve.hasOwnProperty(ce)?c.console&&console.warn("cannot override language handler %s",ce):Ve[ce]=Ae}}function Le(Ae,re){return Ae&&Ve.hasOwnProperty(Ae)||(Ae=/^\s*</.test(re)?"default-markup":"default-code"),Ve[Ae]}_e(Ee,["default-code"]),_e(le([],[[o,/^[^<?]+/],[b,/^<!\w[^>]*(?:>|$)/],[p,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[n,/^(?:<[%?]|[%?]>)/],["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"]),_e(le([[o,/^[\s]+/,null,` \r
|
|
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[S,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[n,/^[=<>\/]+/],["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"]),_e(le([],[[K,/^[\s\S]+/]]),["uq.val"]),_e(Te({keywords:h,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),_e(Te({keywords:"null,true,false"}),["json"]),_e(Te({keywords:T,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),_e(Te({keywords:O,cStyleComments:!0}),["java"]),_e(Te({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),_e(Te({keywords:s,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),_e(Te({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),_e(Te({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),_e(Te({keywords:B,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),_e(Te({keywords:y,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),_e(le([],[[v,/^[\s\S]+/]]),["regex"]);function tt(Ae){var re=Ae.langExtension;try{var ae=V(Ae.sourceNode,Ae.pre),ce=ae.sourceCode;Ae.sourceCode=ce,Ae.spans=ae.spans,Ae.basePos=0,Le(re,ce)(Ae),De(Ae)}catch(we){c.console&&console.log(we&&we.stack||we)}}function Et(Ae,re,ae){var ce=ae||!1,we=re||null,Re=document.createElement("div");Re.innerHTML="<pre>"+Ae+"</pre>",Re=Re.firstChild,ce&&Be(Re,ce,!0);var ke={langExtension:we,numberLines:ce,sourceNode:Re,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(ke),Re.innerHTML}function Oe(Ae,re){var ae=re||document.body,ce=ae.ownerDocument||document;function we(Ie){return ae.getElementsByTagName(Ie)}for(var Re=[we("pre"),we("code"),we("xmp")],ke=[],ht=0;ht<Re.length;++ht)for(var ft=0,vt=Re[ht].length;ft<vt;++ft)ke.push(Re[ht][ft]);Re=null;var yt=Date;yt.now||(yt={now:function(){return+new Date}});var Lt=0,Mt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Qe=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,lt=/pre|xmp/i,pt=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,st={};function Ke(){for(var Ie=c.PR_SHOULD_USE_CONTINUATION?yt.now()+250:Infinity;Lt<ke.length&&yt.now()<Ie;Lt++){for(var Me=ke[Lt],pe=st,be=Me;be=be.previousSibling;){var ge=be.nodeType,Ce=(ge===7||ge===8)&&be.nodeValue;if(Ce?!/^\??prettify\b/.test(Ce):ge!==3||/\S/.test(be.nodeValue))break;if(Ce){pe={},Ce.replace(/\b(\w+)=([\w:.%+-]+)/g,function(dt,at,xt){pe[at]=xt});break}}var We=Me.className;if((pe!==st||Qe.test(We))&&!Pe.test(We)){for(var Ne=!1,ut=Me.parentNode;ut;ut=ut.parentNode){var Tt=ut.tagName;if(Ze.test(Tt)&&ut.className&&Qe.test(ut.className)){Ne=!0;break}}if(!Ne){Me.className+=" prettyprinted";var Ut=pe.lang;if(!Ut){Ut=We.match(Mt);var St;!Ut&&(St=se(Me))&&pt.test(St.tagName)&&(Ut=St.className.match(Mt)),Ut&&(Ut=Ut[1])}var _t;if(lt.test(Me.tagName))_t=1;else{var At=Me.currentStyle,nt=ce.defaultView,rt=At?At.whiteSpace:nt&&nt.getComputedStyle?nt.getComputedStyle(Me,null).getPropertyValue("white-space"):0;_t=rt&&rt.substring(0,3)==="pre"}var xe=pe.linenums;(xe=xe==="true"||+xe)||(xe=We.match(/\blinenums\b(?::(\d+))?/),xe=xe?xe[1]&&xe[1].length?+xe[1]:!0:!1),xe&&Be(Me,xe,_t);var Fe={langExtension:Ut,sourceNode:Me,numberLines:xe,pre:_t,sourceCode:null,basePos:null,spans:null,decorations:null};tt(Fe)}}}Lt<ke.length?c.setTimeout(Ke,250):typeof Ae=="function"&&Ae()}Ke()}var He=c.PR={createSimpleLexer:le,registerLangHandler:_e,sourceDecorator:Te,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:K,PR_COMMENT:p,PR_DECLARATION:b,PR_KEYWORD:R,PR_LITERAL:r,PR_NOCODE:W,PR_PLAIN:o,PR_PUNCTUATION:n,PR_SOURCE:g,PR_STRING:v,PR_TAG:S,PR_TYPE:a,prettyPrintOne:L?c.prettyPrintOne=Et:w=Et,prettyPrint:_=L?c.prettyPrint=Oe:_=Oe},it=c.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return He})})()},SKnc:function($e,me,z){var J=z("bYtY"),N=z("QuXc"),L=function(D,w,_,c,C,x){this.x=D==null?0:D,this.y=w==null?0:w,this.x2=_==null?1:_,this.y2=c==null?0:c,this.type="linear",this.global=x||!1,N.call(this,C)};L.prototype={constructor:L},J.inherits(L,N);var Q=L;$e.exports=Q},SUKs:function($e,me,z){var J=z("LPTA"),N=J.debugMode,L=function(){};N===1&&(L=console.error);var Q=L;$e.exports=Q},Sj9i:function($e,me,z){var J=z("QBsz"),N=J.create,L=J.distSquare,Q=Math.pow,D=Math.sqrt,w=1e-8,_=1e-4,c=D(3),C=1/3,x=N(),i=N(),h=N();function O(r){return r>-w&&r<w}function T(r){return r>w||r<-w}function y(r,n,o,S,b){var g=1-b;return g*g*(g*r+3*b*n)+b*b*(b*S+3*g*o)}function B(r,n,o,S,b){var g=1-b;return 3*(((n-r)*g+2*(o-n)*b)*g+(S-o)*b*b)}function u(r,n,o,S,b,g){var U=S+3*(n-o)-r,K=3*(o-n*2+r),W=3*(n-r),q=r-b,Y=K*K-3*U*W,V=K*W-9*U*q,te=W*W-3*K*q,X=0;if(O(Y)&&O(V))if(O(K))g[0]=0;else{var se=-W/K;se>=0&&se<=1&&(g[X++]=se)}else{var le=V*V-4*Y*te;if(O(le)){var Te=V/Y,se=-K/U+Te,Ee=-Te/2;se>=0&&se<=1&&(g[X++]=se),Ee>=0&&Ee<=1&&(g[X++]=Ee)}else if(le>0){var Be=D(le),De=Y*K+1.5*U*(-V+Be),Ve=Y*K+1.5*U*(-V-Be);De<0?De=-Q(-De,C):De=Q(De,C),Ve<0?Ve=-Q(-Ve,C):Ve=Q(Ve,C);var se=(-K-(De+Ve))/(3*U);se>=0&&se<=1&&(g[X++]=se)}else{var _e=(2*Y*K-3*U*V)/(2*D(Y*Y*Y)),Le=Math.acos(_e)/3,tt=D(Y),Et=Math.cos(Le),se=(-K-2*tt*Et)/(3*U),Ee=(-K+tt*(Et+c*Math.sin(Le)))/(3*U),Oe=(-K+tt*(Et-c*Math.sin(Le)))/(3*U);se>=0&&se<=1&&(g[X++]=se),Ee>=0&&Ee<=1&&(g[X++]=Ee),Oe>=0&&Oe<=1&&(g[X++]=Oe)}}return X}function s(r,n,o,S,b){var g=6*o-12*n+6*r,U=9*n+3*S-3*r-9*o,K=3*n-3*r,W=0;if(O(U)){if(T(g)){var q=-K/g;q>=0&&q<=1&&(b[W++]=q)}}else{var Y=g*g-4*U*K;if(O(Y))b[0]=-g/(2*U);else if(Y>0){var V=D(Y),q=(-g+V)/(2*U),te=(-g-V)/(2*U);q>=0&&q<=1&&(b[W++]=q),te>=0&&te<=1&&(b[W++]=te)}}return W}function l(r,n,o,S,b,g){var U=(n-r)*b+r,K=(o-n)*b+n,W=(S-o)*b+o,q=(K-U)*b+U,Y=(W-K)*b+K,V=(Y-q)*b+q;g[0]=r,g[1]=U,g[2]=q,g[3]=V,g[4]=V,g[5]=Y,g[6]=W,g[7]=S}function f(r,n,o,S,b,g,U,K,W,q,Y){var V,te=.005,X=Infinity,se,le,Te,Ee;x[0]=W,x[1]=q;for(var Be=0;Be<1;Be+=.05)i[0]=y(r,o,b,U,Be),i[1]=y(n,S,g,K,Be),Te=L(x,i),Te<X&&(V=Be,X=Te);X=Infinity;for(var De=0;De<32&&!(te<_);De++)se=V-te,le=V+te,i[0]=y(r,o,b,U,se),i[1]=y(n,S,g,K,se),Te=L(i,x),se>=0&&Te<X?(V=se,X=Te):(h[0]=y(r,o,b,U,le),h[1]=y(n,S,g,K,le),Ee=L(h,x),le<=1&&Ee<X?(V=le,X=Ee):te*=.5);return Y&&(Y[0]=y(r,o,b,U,V),Y[1]=y(n,S,g,K,V)),D(X)}function m(r,n,o,S){var b=1-S;return b*(b*r+2*S*n)+S*S*o}function E(r,n,o,S){return 2*((1-S)*(n-r)+S*(o-n))}function v(r,n,o,S,b){var g=r-2*n+o,U=2*(n-r),K=r-S,W=0;if(O(g)){if(T(U)){var q=-K/U;q>=0&&q<=1&&(b[W++]=q)}}else{var Y=U*U-4*g*K;if(O(Y)){var q=-U/(2*g);q>=0&&q<=1&&(b[W++]=q)}else if(Y>0){var V=D(Y),q=(-U+V)/(2*g),te=(-U-V)/(2*g);q>=0&&q<=1&&(b[W++]=q),te>=0&&te<=1&&(b[W++]=te)}}return W}function R(r,n,o){var S=r+o-2*n;return S===0?.5:(r-n)/S}function p(r,n,o,S,b){var g=(n-r)*S+r,U=(o-n)*S+n,K=(U-g)*S+g;b[0]=r,b[1]=g,b[2]=K,b[3]=K,b[4]=U,b[5]=o}function a(r,n,o,S,b,g,U,K,W){var q,Y=.005,V=Infinity;x[0]=U,x[1]=K;for(var te=0;te<1;te+=.05){i[0]=m(r,o,b,te),i[1]=m(n,S,g,te);var X=L(x,i);X<V&&(q=te,V=X)}V=Infinity;for(var se=0;se<32&&!(Y<_);se++){var le=q-Y,Te=q+Y;i[0]=m(r,o,b,le),i[1]=m(n,S,g,le);var X=L(i,x);if(le>=0&&X<V)q=le,V=X;else{h[0]=m(r,o,b,Te),h[1]=m(n,S,g,Te);var Ee=L(h,x);Te<=1&&Ee<V?(q=Te,V=Ee):Y*=.5}}return W&&(W[0]=m(r,o,b,q),W[1]=m(n,S,g,q)),D(V)}me.cubicAt=y,me.cubicDerivativeAt=B,me.cubicRootAt=u,me.cubicExtrema=s,me.cubicSubdivide=l,me.cubicProjectPoint=f,me.quadraticAt=m,me.quadraticDerivativeAt=E,me.quadraticRootAt=v,me.quadraticExtremum=R,me.quadraticSubdivide=p,me.quadraticProjectPoint=a},SqI9:function($e,me,z){var J=z("y+Vt"),N=z("iXp4"),L=J.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:N(J.prototype.brush),buildPath:function(Q,D){var w=D.cx,_=D.cy,c=Math.max(D.r0||0,0),C=Math.max(D.r,0),x=D.startAngle,i=D.endAngle,h=D.clockwise,O=Math.cos(x),T=Math.sin(x);Q.moveTo(O*c+w,T*c+_),Q.lineTo(O*C+w,T*C+_),Q.arc(w,_,C,x,i,!h),Q.lineTo(Math.cos(i)*c+w,Math.sin(i)*c+_),c!==0&&Q.arc(w,_,c,i,x,h),Q.closePath()}});$e.exports=L},SrGk:function($e,me,z){var J=z("hydK"),N=J.createElement,L=z("bYtY"),Q=z("y+Vt"),D=z("Dagg"),w=z("dqUG"),_=z("P47w"),c=_.path,C=_.image,x=_.text,i="0",h="1";function O(y,B,u,s,l){this._zrId=y,this._svgRoot=B,this._tagNames=typeof u=="string"?[u]:u,this._markLabel=s,this._domName=l||"_dom",this.nextId=0}O.prototype.createElement=N,O.prototype.getDefs=function(y){var B=this._svgRoot,u=this._svgRoot.getElementsByTagName("defs");return u.length===0?y?(u=B.insertBefore(this.createElement("defs"),B.firstChild),u.contains||(u.contains=function(s){var l=u.children;if(!l)return!1;for(var f=l.length-1;f>=0;--f)if(l[f]===s)return!0;return!1}),u):null:u[0]},O.prototype.update=function(y,B){if(!y)return;var u=this.getDefs(!1);if(y[this._domName]&&u.contains(y[this._domName]))typeof B=="function"&&B(y);else{var s=this.add(y);s&&(y[this._domName]=s)}},O.prototype.addDom=function(y){var B=this.getDefs(!0);B.appendChild(y)},O.prototype.removeDom=function(y){var B=this.getDefs(!1);B&&y[this._domName]&&(B.removeChild(y[this._domName]),y[this._domName]=null)},O.prototype.getDoms=function(){var y=this.getDefs(!1);if(!y)return[];var B=[];return L.each(this._tagNames,function(u){var s=y.getElementsByTagName(u);B=B.concat([].slice.call(s))}),B},O.prototype.markAllUnused=function(){var y=this.getDoms(),B=this;L.each(y,function(u){u[B._markLabel]=i})},O.prototype.markUsed=function(y){y&&(y[this._markLabel]=h)},O.prototype.removeUnused=function(){var y=this.getDefs(!1);if(!y)return;var B=this.getDoms(),u=this;L.each(B,function(s){s[u._markLabel]!==h&&y.removeChild(s)})},O.prototype.getSvgProxy=function(y){return y instanceof Q?c:y instanceof D?C:y instanceof w?x:c},O.prototype.getTextSvgElement=function(y){return y.__textSvgEl},O.prototype.getSvgElement=function(y){return y.__svgEl};var T=O;$e.exports=T},T6xi:function($e,me,z){var J=z("YgsL"),N=z("nCxF");function L(Q,D,w){var _=D.points,c=D.smooth;if(_&&_.length>=2){if(c&&c!=="spline"){var C=N(_,c,w,D.smoothConstraint);Q.moveTo(_[0][0],_[0][1]);for(var x=_.length,i=0;i<(w?x:x-1);i++){var h=C[i*2],O=C[i*2+1],T=_[(i+1)%x];Q.bezierCurveTo(h[0],h[1],O[0],O[1],T[0],T[1])}}else{c==="spline"&&(_=J(_,w)),Q.moveTo(_[0][0],_[0][1]);for(var i=1,y=_.length;i<y;i++)Q.lineTo(_[i][0],_[i][1])}w&&Q.closePath()}}me.buildPath=L},VpOo:function($e,me){function z(J,N){var L=N.x,Q=N.y,D=N.width,w=N.height,_=N.r,c,C,x,i;D<0&&(L=L+D,D=-D),w<0&&(Q=Q+w,w=-w),typeof _=="number"?c=C=x=i=_:_ instanceof Array?_.length===1?c=C=x=i=_[0]:_.length===2?(c=x=_[0],C=i=_[1]):_.length===3?(c=_[0],C=i=_[1],x=_[2]):(c=_[0],C=_[1],x=_[2],i=_[3]):c=C=x=i=0;var h;c+C>D&&(h=c+C,c*=D/h,C*=D/h),x+i>D&&(h=x+i,x*=D/h,i*=D/h),C+x>w&&(h=C+x,C*=w/h,x*=w/h),c+i>w&&(h=c+i,c*=w/h,i*=w/h),J.moveTo(L+c,Q),J.lineTo(L+D-C,Q),C!==0&&J.arc(L+D-C,Q+C,C,-Math.PI/2,0),J.lineTo(L+D,Q+w-x),x!==0&&J.arc(L+D-x,Q+w-x,x,0,Math.PI/2),J.lineTo(L+i,Q+w),i!==0&&J.arc(L+i,Q+w-i,i,Math.PI/2,Math.PI),J.lineTo(L,Q+c),c!==0&&J.arc(L+c,Q+c,c,Math.PI,Math.PI*1.5)}me.buildPath=z},"VrN/":function($e,me,z){(function(J,N){$e.exports=N()})(this,function(){"use strict";var J=navigator.userAgent,N=navigator.platform,L=/gecko\/\d/i.test(J),Q=/MSIE \d/.test(J),D=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(J),w=/Edge\/(\d+)/.exec(J),_=Q||D||w,c=_&&(Q?document.documentMode||6:+(w||D)[1]),C=!w&&/WebKit\//.test(J),x=C&&/Qt\/\d+\.\d+/.test(J),i=!w&&/Chrome\//.test(J),h=/Opera\//.test(J),O=/Apple Computer/.test(navigator.vendor),T=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(J),y=/PhantomJS/.test(J),B=!w&&/AppleWebKit/.test(J)&&/Mobile\/\w+/.test(J),u=/Android/.test(J),s=B||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(J),l=B||/Mac/.test(N),f=/\bCrOS\b/.test(J),m=/win/i.test(N),E=h&&J.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(h=!1,C=!0);var v=l&&(x||h&&(E==null||E<12.11)),R=L||_&&c>=9;function p(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var a=function(e,t){var d=e.className,A=p(t).exec(d);if(A){var I=d.slice(A.index+A[0].length);e.className=d.slice(0,A.index)+(I?A[1]+I:"")}};function r(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,t){return r(e).appendChild(t)}function o(e,t,d,A){var I=document.createElement(e);if(d&&(I.className=d),A&&(I.style.cssText=A),typeof t=="string")I.appendChild(document.createTextNode(t));else if(t)for(var G=0;G<t.length;++G)I.appendChild(t[G]);return I}function S(e,t,d,A){var I=o(e,t,d,A);return I.setAttribute("role","presentation"),I}var b;document.createRange?b=function(e,t,d,A){var I=document.createRange();return I.setEnd(A||e,d),I.setStart(e,t),I}:b=function(e,t,d){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(I){return A}return A.collapse(!0),A.moveEnd("character",d),A.moveStart("character",t),A};function g(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function U(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function K(e,t){var d=e.className;p(t).test(d)||(e.className+=(d?" ":"")+t)}function W(e,t){for(var d=e.split(" "),A=0;A<d.length;A++)d[A]&&!p(d[A]).test(t)&&(t+=" "+d[A]);return t}var q=function(e){e.select()};B?q=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_&&(q=function(e){try{e.select()}catch(t){}});function Y(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function V(e,t,d){t||(t={});for(var A in e)e.hasOwnProperty(A)&&(d!==!1||!t.hasOwnProperty(A))&&(t[A]=e[A]);return t}function te(e,t,d,A,I){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var G=A||0,ie=I||0;;){var ue=e.indexOf(" ",G);if(ue<0||ue>=t)return ie+(t-G);ie+=ue-G,ie+=d-ie%d,G=ue+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=Y(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var d=+new Date+e;(!this.id||d<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=d)};function se(e,t){for(var d=0;d<e.length;++d)if(e[d]==t)return d;return-1}var le=50,Te={toString:function(){return"CodeMirror.Pass"}},Ee={scroll:!1},Be={origin:"*mouse"},De={origin:"+move"};function Ve(e,t,d){for(var A=0,I=0;;){var G=e.indexOf(" ",A);G==-1&&(G=e.length);var ie=G-A;if(G==e.length||I+ie>=t)return A+Math.min(ie,t-I);if(I+=G-A,I+=d-I%d,A=G+1,I>=t)return A}}var _e=[""];function Le(e){for(;_e.length<=e;)_e.push(tt(_e)+" ");return _e[e]}function tt(e){return e[e.length-1]}function Et(e,t){for(var d=[],A=0;A<e.length;A++)d[A]=t(e[A],A);return d}function Oe(e,t,d){for(var A=0,I=d(t);A<e.length&&d(e[A])<=I;)A++;e.splice(A,0,t)}function He(){}function it(e,t){var d;return Object.create?d=Object.create(e):(He.prototype=e,d=new He),t&&V(t,d),d}var Ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ae.test(e))}function ae(e,t){return t?t.source.indexOf("\\w")>-1&&re(e)?!0:t.test(e):re(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var we=/[\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&&we.test(e)}function ke(e,t,d){for(;(d<0?t>0:t<e.length)&&Re(e.charAt(t));)t+=d;return t}function ht(e,t,d){for(var A=t>d?-1:1;;){if(t==d)return t;var I=(t+d)/2,G=A<0?Math.ceil(I):Math.floor(I);if(G==t)return e(G)?t:d;e(G)?d=G:t=G+A}}function ft(e,t,d,A){if(!e)return A(t,d,"ltr",0);for(var I=!1,G=0;G<e.length;++G){var ie=e[G];(ie.from<d&&ie.to>t||t==d&&ie.to==t)&&(A(Math.max(ie.from,t),Math.min(ie.to,d),ie.level==1?"rtl":"ltr",G),I=!0)}I||A(t,d,"ltr")}var vt=null;function yt(e,t,d){var A;vt=null;for(var I=0;I<e.length;++I){var G=e[I];if(G.from<t&&G.to>t)return I;G.to==t&&(G.from!=G.to&&d=="before"?A=I:vt=I),G.from==t&&(G.from!=G.to&&d!="before"?A=I:vt=I)}return A!=null?A:vt}var Lt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function d(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?t.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,I=/[stwN]/,G=/[LRr]/,ie=/[Lb1n]/,ue=/[1n]/;function de(ve,Xe,Ye){this.level=ve,this.from=Xe,this.to=Ye}return function(ve,Xe){var Ye=Xe=="ltr"?"L":"R";if(ve.length==0||Xe=="ltr"&&!A.test(ve))return!1;for(var mt=ve.length,ct=[],Rt=0;Rt<mt;++Rt)ct.push(d(ve.charCodeAt(Rt)));for(var Pt=0,Qt=Ye;Pt<mt;++Pt){var Vt=ct[Pt];Vt=="m"?ct[Pt]=Qt:Qt=Vt}for(var Jt=0,Xt=Ye;Jt<mt;++Jt){var ir=ct[Jt];ir=="1"&&Xt=="r"?ct[Jt]="n":G.test(ir)&&(Xt=ir,ir=="r"&&(ct[Jt]="R"))}for(var Er=1,fr=ct[0];Er<mt-1;++Er){var Fr=ct[Er];Fr=="+"&&fr=="1"&&ct[Er+1]=="1"?ct[Er]="1":Fr==","&&fr==ct[Er+1]&&(fr=="1"||fr=="n")&&(ct[Er]=fr),fr=Fr}for(var yn=0;yn<mt;++yn){var zn=ct[yn];if(zn==",")ct[yn]="N";else if(zn=="%"){var _n=void 0;for(_n=yn+1;_n<mt&&ct[_n]=="%";++_n);for(var fi=yn&&ct[yn-1]=="!"||_n<mt&&ct[_n]=="1"?"1":"N",$n=yn;$n<_n;++$n)ct[$n]=fi;yn=_n-1}}for(var Rn=0,qn=Ye;Rn<mt;++Rn){var Vn=ct[Rn];qn=="L"&&Vn=="1"?ct[Rn]="L":G.test(Vn)&&(qn=Vn)}for(var Wt=0;Wt<mt;++Wt)if(I.test(ct[Wt])){var Bn=void 0;for(Bn=Wt+1;Bn<mt&&I.test(ct[Bn]);++Bn);for(var Tn=(Wt?ct[Wt-1]:Ye)=="L",Sn=(Bn<mt?ct[Bn]:Ye)=="L",Wa=Tn==Sn?Tn?"L":"R":Ye,Xr=Wt;Xr<Bn;++Xr)ct[Xr]=Wa;Wt=Bn-1}for(var jr=[],yi,Wn=0;Wn<mt;)if(ie.test(ct[Wn])){var Ga=Wn;for(++Wn;Wn<mt&&ie.test(ct[Wn]);++Wn);jr.push(new de(0,Ga,Wn))}else{var Gi=Wn,Ui=jr.length,Ba=Xe=="rtl"?1:0;for(++Wn;Wn<mt&&ct[Wn]!="L";++Wn);for(var ii=Gi;ii<Wn;)if(ue.test(ct[ii])){Gi<ii&&(jr.splice(Ui,0,new de(1,Gi,ii)),Ui+=Ba);var Ta=ii;for(++ii;ii<Wn&&ue.test(ct[ii]);++ii);jr.splice(Ui,0,new de(2,Ta,ii)),Ui+=Ba,Gi=ii}else++ii;Gi<Wn&&jr.splice(Ui,0,new de(1,Gi,Wn))}return Xe=="ltr"&&(jr[0].level==1&&(yi=ve.match(/^\s+/))&&(jr[0].from=yi[0].length,jr.unshift(new de(0,0,yi[0].length))),tt(jr).level==1&&(yi=ve.match(/\s+$/))&&(tt(jr).to-=yi[0].length,jr.push(new de(0,mt-yi[0].length,mt)))),Xe=="rtl"?jr.reverse():jr}}();function Mt(e,t){var d=e.order;return d==null&&(d=e.order=Lt(e.text,t)),d}var Qe=[],Pe=function(e,t,d){if(e.addEventListener)e.addEventListener(t,d,!1);else if(e.attachEvent)e.attachEvent("on"+t,d);else{var A=e._handlers||(e._handlers={});A[t]=(A[t]||Qe).concat(d)}};function lt(e,t){return e._handlers&&e._handlers[t]||Qe}function pt(e,t,d){if(e.removeEventListener)e.removeEventListener(t,d,!1);else if(e.detachEvent)e.detachEvent("on"+t,d);else{var A=e._handlers,I=A&&A[t];if(I){var G=se(I,d);G>-1&&(A[t]=I.slice(0,G).concat(I.slice(G+1)))}}}function Ze(e,t){var d=lt(e,t);if(!d.length)return;for(var A=Array.prototype.slice.call(arguments,2),I=0;I<d.length;++I)d[I].apply(null,A)}function st(e,t,d){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,d||t.type,e,t),ge(t)||t.codemirrorIgnore}function Ke(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var d=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<t.length;++A)se(d,t[A])==-1&&d.push(t[A])}function Ie(e,t){return lt(e,t).length>0}function Me(e){e.prototype.on=function(t,d){Pe(this,t,d)},e.prototype.off=function(t,d){pt(this,t,d)}}function pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function be(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ge(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ce(e){pe(e),be(e)}function We(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),l&&e.ctrlKey&&t==1&&(t=3),t}var ut=function(){if(_&&c<9)return!1;var e=o("div");return"draggable"in e||"dragDrop"in e}(),Tt;function Ut(e){if(Tt==null){var t=o("span","\u200B");n(e,o("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(_&&c<8))}var d=Tt?o("span","\u200B"):o("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return d.setAttribute("cm-text",""),d}var St;function _t(e){if(St!=null)return St;var t=n(e,document.createTextNode("A\u062EA")),d=b(t,0,1).getBoundingClientRect(),A=b(t,1,2).getBoundingClientRect();return r(e),!d||d.left==d.right?!1:St=A.right-d.right<3}var At=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,d=[],A=e.length;t<=A;){var I=e.indexOf(`
|
|
`,t);I==-1&&(I=e.length);var G=e.slice(t,e.charAt(I-1)=="\r"?I-1:I),ie=G.indexOf("\r");ie!=-1?(d.push(G.slice(0,ie)),t+=ie+1):(d.push(G),t=I+1)}return d}:function(e){return e.split(/\r\n?|\n/)},nt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(d){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},rt=function(){var e=o("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),xe=null;function Fe(e){if(xe!=null)return xe;var t=n(e,o("span","x")),d=t.getBoundingClientRect(),A=b(t,0,1).getBoundingClientRect();return xe=Math.abs(d.left-A.left)>1}var dt={},at={};function xt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),dt[e]=t}function wt(e,t){at[e]=t}function qe(e){if(typeof e=="string"&&at.hasOwnProperty(e))e=at[e];else if(e&&typeof e.name=="string"&&at.hasOwnProperty(e.name)){var t=at[e.name];typeof t=="string"&&(t={name:t}),e=it(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bt(e,t){t=qe(t);var d=dt[t.name];if(!d)return Bt(e,"text/plain");var A=d(e,t);if(Ht.hasOwnProperty(t.name)){var I=Ht[t.name];for(var G in I){if(!I.hasOwnProperty(G))continue;A.hasOwnProperty(G)&&(A["_"+G]=A[G]),A[G]=I[G]}}if(A.name=t.name,t.helperType&&(A.helperType=t.helperType),t.modeProps)for(var ie in t.modeProps)A[ie]=t.modeProps[ie];return A}var Ht={};function Nt(e,t){var d=Ht.hasOwnProperty(e)?Ht[e]:Ht[e]={};V(t,d)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var d={};for(var A in t){var I=t[A];I instanceof Array&&(I=I.concat([])),d[A]=I}return d}function Or(e,t){for(var d;e.innerMode&&!(d=e.innerMode(t),!d||d.mode==e);)t=d.state,e=d.mode;return d||{mode:e,state:t}}function Pr(e,t,d){return e.startState?e.startState(t,d):!0}var yr=function(e,t,d){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=d};yr.prototype.eol=function(){return this.pos>=this.string.length},yr.prototype.sol=function(){return this.pos==this.lineStart},yr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},yr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},yr.prototype.eat=function(e){var t=this.string.charAt(this.pos),d;if(typeof e=="string"?d=t==e:d=t&&(e.test?e.test(t):e(t)),d)return++this.pos,t},yr.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},yr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},yr.prototype.skipToEnd=function(){this.pos=this.string.length},yr.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},yr.prototype.backUp=function(e){this.pos-=e},yr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=te(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?te(this.string,this.lineStart,this.tabSize):0)},yr.prototype.indentation=function(){return te(this.string,null,this.tabSize)-(this.lineStart?te(this.string,this.lineStart,this.tabSize):0)},yr.prototype.match=function(e,t,d){if(typeof e=="string"){var A=function(ie){return d?ie.toLowerCase():ie},I=this.string.substr(this.pos,e.length);if(A(I)==A(e))return t!==!1&&(this.pos+=e.length),!0}else{var G=this.string.slice(this.pos).match(e);return G&&G.index>0?null:(G&&t!==!1&&(this.pos+=G[0].length),G)}},yr.prototype.current=function(){return this.string.slice(this.start,this.pos)},yr.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},yr.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},yr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function jt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var d=e;!d.lines;)for(var A=0;;++A){var I=d.children[A],G=I.chunkSize();if(t<G){d=I;break}t-=G}return d.lines[t]}function Dr(e,t,d){var A=[],I=t.line;return e.iter(t.line,d.line+1,function(G){var ie=G.text;I==d.line&&(ie=ie.slice(0,d.ch)),I==t.line&&(ie=ie.slice(t.ch)),A.push(ie),++I}),A}function Wr(e,t,d){var A=[];return e.iter(t,d,function(I){A.push(I.text)}),A}function Mr(e,t){var d=t-e.height;if(d)for(var A=e;A;A=A.parent)A.height+=d}function pr(e){if(e.parent==null)return null;for(var t=e.parent,d=se(t.lines,e),A=t.parent;A;t=A,A=A.parent)for(var I=0;!(A.children[I]==t);++I)d+=A.children[I].chunkSize();return d+t.first}function Sr(e,t){var d=e.first;e:do{for(var A=0;A<e.children.length;++A){var I=e.children[A],G=I.height;if(t<G){e=I;continue e}t-=G,d+=I.chunkSize()}return d}while(!e.lines);for(var ie=0;ie<e.lines.length;++ie){var ue=e.lines[ie],de=ue.height;if(t<de)break;t-=de}return d+ie}function mn(e,t){return t>=e.first&&t<e.first+e.size}function on(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function fe(e,t,d){if(d===void 0&&(d=null),!(this instanceof fe))return new fe(e,t,d);this.line=e,this.ch=t,this.sticky=d}function ye(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&ye(e,t)==0}function et(e){return fe(e.line,e.ch)}function Je(e,t){return ye(e,t)<0?t:e}function Dt(e,t){return ye(e,t)<0?e:t}function Z(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function M(e,t){if(t.line<e.first)return fe(e.first,0);var d=e.first+e.size-1;return t.line>d?fe(d,jt(e,d).text.length):P(t,jt(e,t.line).text.length)}function P(e,t){var d=e.ch;return d==null||d>t?fe(e.line,t):d<0?fe(e.line,0):e}function $(e,t){for(var d=[],A=0;A<t.length;A++)d[A]=M(e,t[A]);return d}var ne=function(e,t){this.state=e,this.lookAhead=t},ee=function(e,t,d,A){this.state=t,this.doc=e,this.line=d,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};ee.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ee.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ee.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ee.fromSaved=function(e,t,d){return t instanceof ne?new ee(e,Gt(e.mode,t.state),d,t.lookAhead):new ee(e,Gt(e.mode,t),d)},ee.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ne(t,this.maxLookAhead):t};function je(e,t,d,A){var I=[e.state.modeGen],G={};Rr(e,t.text,e.doc.mode,d,function(ve,Xe){return I.push(ve,Xe)},G,A);for(var ie=d.state,ue=function(ve){d.baseTokens=I;var Xe=e.state.overlays[ve],Ye=1,mt=0;d.state=!0,Rr(e,t.text,Xe.mode,d,function(ct,Rt){for(var Pt=Ye;mt<ct;){var Qt=I[Ye];Qt>ct&&I.splice(Ye,1,ct,I[Ye+1],Qt),Ye+=2,mt=Math.min(ct,Qt)}if(!Rt)return;if(Xe.opaque)I.splice(Pt,Ye-Pt,ct,"overlay "+Rt),Ye=Pt+2;else for(;Pt<Ye;Pt+=2){var Vt=I[Pt+1];I[Pt+1]=(Vt?Vt+" ":"")+"overlay "+Rt}},G),d.state=ie,d.baseTokens=null,d.baseTokenPos=1},de=0;de<e.state.overlays.length;++de)ue(de);return{styles:I,classes:G.bgClass||G.textClass?G:null}}function Ct(e,t,d){if(!t.styles||t.styles[0]!=e.state.modeGen){var A=Ft(e,pr(t)),I=t.text.length>e.options.maxHighlightLength&&Gt(e.doc.mode,A.state),G=je(e,t,A);I&&(A.state=I),t.stateAfter=A.save(!I),t.styles=G.styles,G.classes?t.styleClasses=G.classes:t.styleClasses&&(t.styleClasses=null),d===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ft(e,t,d){var A=e.doc,I=e.display;if(!A.mode.startState)return new ee(A,!0,t);var G=mr(e,t,d),ie=G>A.first&&jt(A,G-1).stateAfter,ue=ie?ee.fromSaved(A,ie,G):new ee(A,Pr(A.mode),G);return A.iter(G,t,function(de){kt(e,de.text,ue);var ve=ue.line;de.stateAfter=ve==t-1||ve%5==0||ve>=I.viewFrom&&ve<I.viewTo?ue.save():null,ue.nextLine()}),d&&(A.modeFrontier=ue.line),ue}function kt(e,t,d,A){var I=e.doc.mode,G=new yr(t,e.options.tabSize,d);for(G.start=G.pos=A||0,t==""&&bt(I,d.state);!G.eol();)Yt(I,G,d.state),G.start=G.pos}function bt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var d=Or(e,t);if(d.mode.blankLine)return d.mode.blankLine(d.state)}function Yt(e,t,d,A){for(var I=0;I<10;I++){A&&(A[0]=Or(e,d).mode);var G=e.token(t,d);if(t.pos>t.start)return G}throw new Error("Mode "+e.name+" failed to advance stream.")}var zt=function(e,t,d){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=d};function $t(e,t,d,A){var I=e.doc,G=I.mode,ie;t=M(I,t);var ue=jt(I,t.line),de=Ft(e,t.line,d),ve=new yr(ue.text,e.options.tabSize,de),Xe;for(A&&(Xe=[]);(A||ve.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,ie=Yt(G,ve,de.state),A&&Xe.push(new zt(ve,ie,Gt(I.mode,de.state)));return A?Xe:new zt(ve,ie,de.state)}function dr(e,t){if(e)for(;;){var d=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!d)break;e=e.slice(0,d.index)+e.slice(d.index+d[0].length);var A=d[1]?"bgClass":"textClass";t[A]==null?t[A]=d[2]:new RegExp("(?:^|\\s)"+d[2]+"(?:$|\\s)").test(t[A])||(t[A]+=" "+d[2])}return e}function Rr(e,t,d,A,I,G,ie){var ue=d.flattenSpans;ue==null&&(ue=e.options.flattenSpans);var de=0,ve=null,Xe=new yr(t,e.options.tabSize,A),Ye,mt=e.options.addModeClass&&[null];for(t==""&&dr(bt(d,A.state),G);!Xe.eol();){if(Xe.pos>e.options.maxHighlightLength?(ue=!1,ie&&kt(e,t,A,Xe.pos),Xe.pos=t.length,Ye=null):Ye=dr(Yt(d,Xe,A.state,mt),G),mt){var ct=mt[0].name;ct&&(Ye="m-"+(Ye?ct+" "+Ye:ct))}if(!ue||ve!=Ye){for(;de<Xe.start;)de=Math.min(Xe.start,de+5e3),I(de,ve);ve=Ye}Xe.start=Xe.pos}for(;de<Xe.pos;){var Rt=Math.min(Xe.pos,de+5e3);I(Rt,ve),de=Rt}}function mr(e,t,d){for(var A,I,G=e.doc,ie=d?-1:t-(e.doc.mode.innerMode?1e3:100),ue=t;ue>ie;--ue){if(ue<=G.first)return G.first;var de=jt(G,ue-1),ve=de.stateAfter;if(ve&&(!d||ue+(ve instanceof ne?ve.lookAhead:0)<=G.modeFrontier))return ue;var Xe=te(de.text,null,e.options.tabSize);(I==null||A>Xe)&&(I=ue-1,A=Xe)}return I}function _r(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var d=e.first,A=t-1;A>d;A--){var I=jt(e,A).stateAfter;if(I&&(!(I instanceof ne)||A+I.lookAhead<t)){d=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,d)}var hr=!1,kr=!1;function Nr(){hr=!0}function qr(){kr=!0}function Yr(e,t,d){this.marker=e,this.from=t,this.to=d}function rn(e,t){if(e)for(var d=0;d<e.length;++d){var A=e[d];if(A.marker==t)return A}}function An(e,t){for(var d,A=0;A<e.length;++A)e[A]!=t&&(d||(d=[])).push(e[A]);return d}function $r(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function nn(e,t,d){var A;if(e)for(var I=0;I<e.length;++I){var G=e[I],ie=G.marker,ue=G.from==null||(ie.inclusiveLeft?G.from<=t:G.from<t);if(ue||G.from==t&&ie.type=="bookmark"&&(!d||!G.marker.insertLeft)){var de=G.to==null||(ie.inclusiveRight?G.to>=t:G.to>t);(A||(A=[])).push(new Yr(ie,G.from,de?null:G.to))}}return A}function sn(e,t,d){var A;if(e)for(var I=0;I<e.length;++I){var G=e[I],ie=G.marker,ue=G.to==null||(ie.inclusiveRight?G.to>=t:G.to>t);if(ue||G.from==t&&ie.type=="bookmark"&&(!d||G.marker.insertLeft)){var de=G.from==null||(ie.inclusiveLeft?G.from<=t:G.from<t);(A||(A=[])).push(new Yr(ie,de?null:G.from-t,G.to==null?null:G.to-t))}}return A}function cn(e,t){if(t.full)return null;var d=mn(e,t.from.line)&&jt(e,t.from.line).markedSpans,A=mn(e,t.to.line)&&jt(e,t.to.line).markedSpans;if(!d&&!A)return null;var I=t.from.ch,G=t.to.ch,ie=ye(t.from,t.to)==0,ue=nn(d,I,ie),de=sn(A,G,ie),ve=t.text.length==1,Xe=tt(t.text).length+(ve?I:0);if(ue)for(var Ye=0;Ye<ue.length;++Ye){var mt=ue[Ye];if(mt.to==null){var ct=rn(de,mt.marker);ct?ve&&(mt.to=ct.to==null?null:ct.to+Xe):mt.to=I}}if(de)for(var Rt=0;Rt<de.length;++Rt){var Pt=de[Rt];if(Pt.to!=null&&(Pt.to+=Xe),Pt.from==null){var Qt=rn(ue,Pt.marker);Qt||(Pt.from=Xe,ve&&(ue||(ue=[])).push(Pt))}else Pt.from+=Xe,ve&&(ue||(ue=[])).push(Pt)}ue&&(ue=dn(ue)),de&&de!=ue&&(de=dn(de));var Vt=[ue];if(!ve){var Jt=t.text.length-2,Xt;if(Jt>0&&ue)for(var ir=0;ir<ue.length;++ir)ue[ir].to==null&&(Xt||(Xt=[])).push(new Yr(ue[ir].marker,null,null));for(var Er=0;Er<Jt;++Er)Vt.push(Xt);Vt.push(de)}return Vt}function dn(e){for(var t=0;t<e.length;++t){var d=e[t];d.from!=null&&d.from==d.to&&d.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Cr(e,t,d){var A=null;if(e.iter(t.line,d.line+1,function(ct){if(ct.markedSpans)for(var Rt=0;Rt<ct.markedSpans.length;++Rt){var Pt=ct.markedSpans[Rt].marker;Pt.readOnly&&(!A||se(A,Pt)==-1)&&(A||(A=[])).push(Pt)}}),!A)return null;for(var I=[{from:t,to:d}],G=0;G<A.length;++G)for(var ie=A[G],ue=ie.find(0),de=0;de<I.length;++de){var ve=I[de];if(ye(ve.to,ue.from)<0||ye(ve.from,ue.to)>0)continue;var Xe=[de,1],Ye=ye(ve.from,ue.from),mt=ye(ve.to,ue.to);(Ye<0||!ie.inclusiveLeft&&!Ye)&&Xe.push({from:ve.from,to:ue.from}),(mt>0||!ie.inclusiveRight&&!mt)&&Xe.push({from:ue.to,to:ve.to}),I.splice.apply(I,Xe),de+=Xe.length-3}return I}function cr(e){var t=e.markedSpans;if(!t)return;for(var d=0;d<t.length;++d)t[d].marker.detachLine(e);e.markedSpans=null}function sr(e,t){if(!t)return;for(var d=0;d<t.length;++d)t[d].marker.attachLine(e);e.markedSpans=t}function nr(e){return e.inclusiveLeft?-1:0}function Zt(e){return e.inclusiveRight?1:0}function gr(e,t){var d=e.lines.length-t.lines.length;if(d!=0)return d;var A=e.find(),I=t.find(),G=ye(A.from,I.from)||nr(e)-nr(t);if(G)return-G;var ie=ye(A.to,I.to)||Zt(e)-Zt(t);return ie||t.id-e.id}function br(e,t){var d=kr&&e.markedSpans,A;if(d)for(var I=void 0,G=0;G<d.length;++G)I=d[G],I.marker.collapsed&&(t?I.from:I.to)==null&&(!A||gr(A,I.marker)<0)&&(A=I.marker);return A}function xr(e){return br(e,!0)}function vr(e){return br(e,!1)}function On(e,t){var d=kr&&e.markedSpans,A;if(d)for(var I=0;I<d.length;++I){var G=d[I];G.marker.collapsed&&(G.from==null||G.from<t)&&(G.to==null||G.to>t)&&(!A||gr(A,G.marker)<0)&&(A=G.marker)}return A}function Hr(e,t,d,A,I){var G=jt(e,t),ie=kr&&G.markedSpans;if(ie)for(var ue=0;ue<ie.length;++ue){var de=ie[ue];if(!de.marker.collapsed)continue;var ve=de.marker.find(0),Xe=ye(ve.from,d)||nr(de.marker)-nr(I),Ye=ye(ve.to,A)||Zt(de.marker)-Zt(I);if(Xe>=0&&Ye<=0||Xe<=0&&Ye>=0)continue;if(Xe<=0&&(de.marker.inclusiveRight&&I.inclusiveLeft?ye(ve.to,d)>=0:ye(ve.to,d)>0)||Xe>=0&&(de.marker.inclusiveRight&&I.inclusiveLeft?ye(ve.from,A)<=0:ye(ve.from,A)<0))return!0}}function Cn(e){for(var t;t=xr(e);)e=t.find(-1,!0).line;return e}function Hn(e){for(var t;t=vr(e);)e=t.find(1,!0).line;return e}function Ln(e){for(var t,d;t=vr(e);)e=t.find(1,!0).line,(d||(d=[])).push(e);return d}function Jr(e,t){var d=jt(e,t),A=Cn(d);return d==A?t:pr(A)}function Xn(e,t){if(t>e.lastLine())return t;var d=jt(e,t),A;if(!wn(e,d))return t;for(;A=vr(d);)d=A.find(1,!0).line;return pr(d)+1}function wn(e,t){var d=kr&&t.markedSpans;if(d)for(var A=void 0,I=0;I<d.length;++I){if(A=d[I],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&Yn(e,t,A))return!0}}function Yn(e,t,d){if(d.to==null){var A=d.marker.find(1,!0);return Yn(e,A.line,rn(A.line.markedSpans,d.marker))}if(d.marker.inclusiveRight&&d.to==t.text.length)return!0;for(var I=void 0,G=0;G<t.markedSpans.length;++G)if(I=t.markedSpans[G],I.marker.collapsed&&!I.marker.widgetNode&&I.from==d.to&&(I.to==null||I.to!=d.from)&&(I.marker.inclusiveLeft||d.marker.inclusiveRight)&&Yn(e,t,I))return!0}function Mn(e){e=Cn(e);for(var t=0,d=e.parent,A=0;A<d.lines.length;++A){var I=d.lines[A];if(I==e)break;t+=I.height}for(var G=d.parent;G;d=G,G=d.parent)for(var ie=0;ie<G.children.length;++ie){var ue=G.children[ie];if(ue==d)break;t+=ue.height}return t}function oi(e){if(e.height==0)return 0;for(var t=e.text.length,d,A=e;d=xr(A);){var I=d.find(0,!0);A=I.from.line,t+=I.from.ch-I.to.ch}for(A=e;d=vr(A);){var G=d.find(0,!0);t-=A.text.length-G.from.ch,A=G.to.line,t+=A.text.length-G.to.ch}return t}function Un(e){var t=e.display,d=e.doc;t.maxLine=jt(d,d.first),t.maxLineLength=oi(t.maxLine),t.maxLineChanged=!0,d.iter(function(A){var I=oi(A);I>t.maxLineLength&&(t.maxLineLength=I,t.maxLine=A)})}var gn=function(e,t,d){this.text=e,sr(this,t),this.height=d?d(this):1};gn.prototype.lineNo=function(){return pr(this)},Me(gn);function Qn(e,t,d,A){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),cr(e),sr(e,d);var I=A?A(e):1;I!=e.height&&Mr(e,I)}function li(e){e.parent=null,cr(e)}var qt={},er={};function tr(e,t){if(!e||/^\s*$/.test(e))return null;var d=t.addModeClass?er:qt;return d[e]||(d[e]=e.replace(/\S+/g,"cm-$&"))}function wr(e,t){var d=S("span",null,null,C?"padding-right: .1px":null),A={pre:S("pre",[d],"CodeMirror-line"),content:d,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var I=0;I<=(t.rest?t.rest.length:0);I++){var G=I?t.rest[I-1]:t.line,ie=void 0;A.pos=0,A.addToken=Tr,_t(e.display.measure)&&(ie=Mt(G,e.doc.direction))&&(A.addToken=bn(A.addToken,ie)),A.map=[];var ue=t!=e.display.externalMeasured&&pr(G);Ir(G,A,Ct(e,G,ue)),G.styleClasses&&(G.styleClasses.bgClass&&(A.bgClass=W(G.styleClasses.bgClass,A.bgClass||"")),G.styleClasses.textClass&&(A.textClass=W(G.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Ut(e.display.measure))),I==0?(t.measure.map=A.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(A.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(C){var de=A.content.lastChild;(/\bcm-tab\b/.test(de.className)||de.querySelector&&de.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,t.line,A.pre),A.pre.className&&(A.textClass=W(A.pre.className,A.textClass||"")),A}function Ur(e){var t=o("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Tr(e,t,d,A,I,G,ie){if(!t)return;var ue=e.splitSpaces?Lr(t,e.trailingSpace):t,de=e.cm.state.specialChars,ve=!1,Xe;if(!de.test(t))e.col+=t.length,Xe=document.createTextNode(ue),e.map.push(e.pos,e.pos+t.length,Xe),_&&c<9&&(ve=!0),e.pos+=t.length;else{Xe=document.createDocumentFragment();for(var Ye=0;;){de.lastIndex=Ye;var mt=de.exec(t),ct=mt?mt.index-Ye:t.length-Ye;if(ct){var Rt=document.createTextNode(ue.slice(Ye,Ye+ct));_&&c<9?Xe.appendChild(o("span",[Rt])):Xe.appendChild(Rt),e.map.push(e.pos,e.pos+ct,Rt),e.col+=ct,e.pos+=ct}if(!mt)break;Ye+=ct+1;var Pt=void 0;if(mt[0]==" "){var Qt=e.cm.options.tabSize,Vt=Qt-e.col%Qt;Pt=Xe.appendChild(o("span",Le(Vt),"cm-tab")),Pt.setAttribute("role","presentation"),Pt.setAttribute("cm-text"," "),e.col+=Vt}else mt[0]=="\r"||mt[0]==`
|
|
`?(Pt=Xe.appendChild(o("span",mt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pt.setAttribute("cm-text",mt[0]),e.col+=1):(Pt=e.cm.options.specialCharPlaceholder(mt[0]),Pt.setAttribute("cm-text",mt[0]),_&&c<9?Xe.appendChild(o("span",[Pt])):Xe.appendChild(Pt),e.col+=1);e.map.push(e.pos,e.pos+1,Pt),e.pos++}}if(e.trailingSpace=ue.charCodeAt(t.length-1)==32,d||A||I||ve||G||ie){var Jt=d||"";A&&(Jt+=A),I&&(Jt+=I);var Xt=o("span",[Xe],Jt,G);if(ie)for(var ir in ie)ie.hasOwnProperty(ir)&&ir!="style"&&ir!="class"&&Xt.setAttribute(ir,ie[ir]);return e.content.appendChild(Xt)}e.content.appendChild(Xe)}function Lr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var d=t,A="",I=0;I<e.length;I++){var G=e.charAt(I);G==" "&&d&&(I==e.length-1||e.charCodeAt(I+1)==32)&&(G="\xA0"),A+=G,d=G==" "}return A}function bn(e,t){return function(d,A,I,G,ie,ue,de){I=I?I+" cm-force-border":"cm-force-border";for(var ve=d.pos,Xe=ve+A.length;;){for(var Ye=void 0,mt=0;mt<t.length&&!(Ye=t[mt],Ye.to>ve&&Ye.from<=ve);mt++);if(Ye.to>=Xe)return e(d,A,I,G,ie,ue,de);e(d,A.slice(0,Ye.to-ve),I,G,null,ue,de),G=null,A=A.slice(Ye.to-ve),ve=Ye.to}}}function Fn(e,t,d,A){var I=!A&&d.widgetNode;I&&e.map.push(e.pos,e.pos+t,I),!A&&e.cm.display.input.needsContentAttribute&&(I||(I=e.content.appendChild(document.createElement("span"))),I.setAttribute("cm-marker",d.id)),I&&(e.cm.display.input.setUneditable(I),e.content.appendChild(I)),e.pos+=t,e.trailingSpace=!1}function Ir(e,t,d){var A=e.markedSpans,I=e.text,G=0;if(!A){for(var ie=1;ie<d.length;ie+=2)t.addToken(t,I.slice(G,G=d[ie]),tr(d[ie+1],t.cm.options));return}for(var ue=I.length,de=0,ve=1,Xe="",Ye,mt,ct=0,Rt,Pt,Qt,Vt,Jt;;){if(ct==de){Rt=Pt=Qt=mt="",Jt=null,Vt=null,ct=Infinity;for(var Xt=[],ir=void 0,Er=0;Er<A.length;++Er){var fr=A[Er],Fr=fr.marker;if(Fr.type=="bookmark"&&fr.from==de&&Fr.widgetNode)Xt.push(Fr);else if(fr.from<=de&&(fr.to==null||fr.to>de||Fr.collapsed&&fr.to==de&&fr.from==de)){if(fr.to!=null&&fr.to!=de&&ct>fr.to&&(ct=fr.to,Pt=""),Fr.className&&(Rt+=" "+Fr.className),Fr.css&&(mt=(mt?mt+";":"")+Fr.css),Fr.startStyle&&fr.from==de&&(Qt+=" "+Fr.startStyle),Fr.endStyle&&fr.to==ct&&(ir||(ir=[])).push(Fr.endStyle,fr.to),Fr.title&&((Jt||(Jt={})).title=Fr.title),Fr.attributes)for(var yn in Fr.attributes)(Jt||(Jt={}))[yn]=Fr.attributes[yn];Fr.collapsed&&(!Vt||gr(Vt.marker,Fr)<0)&&(Vt=fr)}else fr.from>de&&ct>fr.from&&(ct=fr.from)}if(ir)for(var zn=0;zn<ir.length;zn+=2)ir[zn+1]==ct&&(Pt+=" "+ir[zn]);if(!Vt||Vt.from==de)for(var _n=0;_n<Xt.length;++_n)Fn(t,0,Xt[_n]);if(Vt&&(Vt.from||0)==de){if(Fn(t,(Vt.to==null?ue+1:Vt.to)-de,Vt.marker,Vt.from==null),Vt.to==null)return;Vt.to==de&&(Vt=!1)}}if(de>=ue)break;for(var fi=Math.min(ue,ct);;){if(Xe){var $n=de+Xe.length;if(!Vt){var Rn=$n>fi?Xe.slice(0,fi-de):Xe;t.addToken(t,Rn,Ye?Ye+Rt:Rt,Qt,de+Rn.length==ct?Pt:"",mt,Jt)}if($n>=fi){Xe=Xe.slice(fi-de),de=fi;break}de=$n,Qt=""}Xe=I.slice(G,G=d[ve++]),Ye=tr(d[ve++],t.cm.options)}}}function ei(e,t,d){this.line=t,this.rest=Ln(t),this.size=this.rest?pr(tt(this.rest))-d+1:1,this.node=this.text=null,this.hidden=wn(e,t)}function Gr(e,t,d){for(var A=[],I,G=t;G<d;G=I){var ie=new ei(e.doc,jt(e.doc,G),G);I=G+ie.size,A.push(ie)}return A}var Dn=null;function ui(e){Dn?Dn.ops.push(e):e.ownsGroup=Dn={ops:[e],delayedCallbacks:[]}}function Ai(e){var t=e.delayedCallbacks,d=0;do{for(;d<t.length;d++)t[d].call(null);for(var A=0;A<e.ops.length;A++){var I=e.ops[A];if(I.cursorActivityHandlers)for(;I.cursorActivityCalled<I.cursorActivityHandlers.length;)I.cursorActivityHandlers[I.cursorActivityCalled++].call(null,I.cm)}}while(d<t.length)}function Vr(e,t){var d=e.ownsGroup;if(!d)return;try{Ai(d)}finally{Dn=null,t(d)}}var Qr=null;function Zr(e,t){var d=lt(e,t);if(!d.length)return;var A=Array.prototype.slice.call(arguments,2),I;Dn?I=Dn.delayedCallbacks:Qr?I=Qr:(I=Qr=[],setTimeout(ci,0));for(var G=function(ue){I.push(function(){return d[ue].apply(null,A)})},ie=0;ie<d.length;++ie)G(ie)}function ci(){var e=Qr;Qr=null;for(var t=0;t<e.length;++t)e[t]()}function Vi(e,t,d,A){for(var I=0;I<t.changes.length;I++){var G=t.changes[I];G=="text"?hs(e,t):G=="gutter"?Ro(e,t,d,A):G=="class"?fs(e,t):G=="widget"&&nl(e,t,A)}t.changes=null}function Xi(e){return e.node==e.text&&(e.node=o("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),_&&c<8&&(e.node.style.zIndex=2)),e.node}function Za(e,t){var d=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(d&&(d+=" CodeMirror-linebackground"),t.background)d?t.background.className=d:(t.background.parentNode.removeChild(t.background),t.background=null);else if(d){var A=Xi(t);t.background=A.insertBefore(o("div",null,d),A.firstChild),e.display.input.setUneditable(t.background)}}function Do(e,t){var d=e.display.externalMeasured;return d&&d.line==t.line?(e.display.externalMeasured=null,t.measure=d.measure,d.built):wr(e,t)}function hs(e,t){var d=t.text.className,A=Do(e,t);t.text==t.node&&(t.node=A.pre),t.text.parentNode.replaceChild(A.pre,t.text),t.text=A.pre,A.bgClass!=t.bgClass||A.textClass!=t.textClass?(t.bgClass=A.bgClass,t.textClass=A.textClass,fs(e,t)):d&&(t.text.className=d)}function fs(e,t){Za(e,t),t.line.wrapClass?Xi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var d=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=d||""}function Ro(e,t,d,A){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var I=Xi(t);t.gutterBackground=o("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),I.insertBefore(t.gutterBackground,t.text)}var G=t.line.gutterMarkers;if(e.options.lineNumbers||G){var ie=Xi(t),ue=t.gutter=o("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ue),ie.insertBefore(ue,t.text),t.line.gutterClass&&(ue.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!G||!G["CodeMirror-linenumbers"])&&(t.lineNumber=ue.appendChild(o("div",on(e.options,d),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),G)for(var de=0;de<e.display.gutterSpecs.length;++de){var ve=e.display.gutterSpecs[de].className,Xe=G.hasOwnProperty(ve)&&G[ve];Xe&&ue.appendChild(o("div",[Xe],"CodeMirror-gutter-elt","left: "+A.gutterLeft[ve]+"px; width: "+A.gutterWidth[ve]+"px"))}}}function nl(e,t,d){t.alignable&&(t.alignable=null);for(var A=p("CodeMirror-linewidget"),I=t.node.firstChild,G=void 0;I;I=G)G=I.nextSibling,A.test(I.className)&&t.node.removeChild(I);_a(e,t,d)}function il(e,t,d,A){var I=Do(e,t);return t.text=t.node=I.pre,I.bgClass&&(t.bgClass=I.bgClass),I.textClass&&(t.textClass=I.textClass),fs(e,t),Ro(e,t,d,A),_a(e,t,A),t.node}function _a(e,t,d){if(Aa(e,t.line,t,d,!0),t.rest)for(var A=0;A<t.rest.length;A++)Aa(e,t.rest[A],t,d,!1)}function Aa(e,t,d,A,I){if(!t.widgets)return;for(var G=Xi(d),ie=0,ue=t.widgets;ie<ue.length;++ie){var de=ue[ie],ve=o("div",[de.node],"CodeMirror-linewidget"+(de.className?" "+de.className:""));de.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),vn(de,ve,d,A),e.display.input.setUneditable(ve),I&&de.above?G.insertBefore(ve,d.gutter||d.text):G.appendChild(ve),Zr(de,"redraw")}}function vn(e,t,d,A){if(e.noHScroll){(d.alignable||(d.alignable=[])).push(t);var I=A.wrapperWidth;t.style.left=A.fixedPos+"px",e.coverGutter||(I-=A.gutterTotalWidth,t.style.paddingLeft=A.gutterTotalWidth+"px"),t.style.width=I+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-A.gutterTotalWidth+"px"))}function $a(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!g(document.body,e.node)){var d="position: relative;";e.coverGutter&&(d+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(d+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,o("div",[e.node],null,d))}return e.height=e.node.parentNode.offsetHeight}function Bi(e,t){for(var d=We(t);d!=e.wrapper;d=d.parentNode)if(!d||d.nodeType==1&&d.getAttribute("cm-ignore-events")=="true"||d.parentNode==e.sizer&&d!=e.mover)return!0}function qa(e){return e.lineSpace.offsetTop}function Yi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ti(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,o("pre","x","CodeMirror-line-like")),d=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,A={left:parseInt(d.paddingLeft),right:parseInt(d.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Ii(e){return le-e.display.nativeBarWidth}function di(e){return e.display.scroller.clientWidth-Ii(e)-e.display.barWidth}function In(e){return e.display.scroller.clientHeight-Ii(e)-e.display.barHeight}function al(e,t,d){var A=e.options.lineWrapping,I=A&&di(e);if(!t.measure.heights||A&&t.measure.width!=I){var G=t.measure.heights=[];if(A){t.measure.width=I;for(var ie=t.text.firstChild.getClientRects(),ue=0;ue<ie.length-1;ue++){var de=ie[ue],ve=ie[ue+1];Math.abs(de.bottom-ve.bottom)>2&&G.push((de.bottom+ve.top)/2-d.top)}}G.push(d.bottom-d.top)}}function Gn(e,t,d){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==t)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var I=0;I<e.rest.length;I++)if(pr(e.rest[I])>d)return{map:e.measure.maps[I],cache:e.measure.caches[I],before:!0}}function ps(e,t){t=Cn(t);var d=pr(t),A=e.display.externalMeasured=new ei(e.doc,t,d);A.lineN=d;var I=A.built=wr(e,A);return A.text=I.pre,n(e.display.lineMeasure,I.pre),A}function Pi(e,t,d,A){return Si(e,an(e,t),d,A)}function ca(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Zi(e,t)];var d=e.display.externalMeasured;if(d&&t>=d.lineN&&t<d.lineN+d.size)return d}function an(e,t){var d=pr(t),A=ca(e,d);A&&!A.text?A=null:A&&A.changes&&(Vi(e,A,d,bs(e)),e.curOp.forceUpdate=!0),A||(A=ps(e,t));var I=Gn(A,t,d);return{line:t,view:A,rect:null,map:I.map,cache:I.cache,before:I.before,hasHeights:!1}}function Si(e,t,d,A,I){t.before&&(d=-1);var G=d+(A||""),ie;return t.cache.hasOwnProperty(G)?ie=t.cache[G]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(al(e,t.view,t.rect),t.hasHeights=!0),ie=Mo(e,t,d,A),ie.bogus||(t.cache[G]=ie)),{left:ie.left,right:ie.right,top:I?ie.rtop:ie.top,bottom:I?ie.rbottom:ie.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,t,d){for(var A,I,G,ie,ue,de,ve=0;ve<e.length;ve+=3)if(ue=e[ve],de=e[ve+1],t<ue?(I=0,G=1,ie="left"):t<de?(I=t-ue,G=I+1):(ve==e.length-3||t==de&&e[ve+3]>t)&&(G=de-ue,I=G-1,t>=de&&(ie="right")),I!=null){if(A=e[ve+2],ue==de&&d==(A.insertLeft?"left":"right")&&(ie=d),d=="left"&&I==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)A=e[(ve-=3)+2],ie="left";if(d=="right"&&I==de-ue)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)A=e[(ve+=3)+2],ie="right";break}return{node:A,start:I,end:G,collapse:ie,coverStart:ue,coverEnd:de}}function ol(e,t){var d=ms;if(t=="left")for(var A=0;A<e.length&&!((d=e[A]).left!=d.right);A++);else for(var I=e.length-1;I>=0&&!((d=e[I]).left!=d.right);I--);return d}function Mo(e,t,d,A){var I=gs(t.map,d,A),G=I.node,ie=I.start,ue=I.end,de=I.collapse,ve;if(G.nodeType==3){for(var Xe=0;Xe<4;Xe++){for(;ie&&Re(t.line.text.charAt(I.coverStart+ie));)--ie;for(;I.coverStart+ue<I.coverEnd&&Re(t.line.text.charAt(I.coverStart+ue));)++ue;if(_&&c<9&&ie==0&&ue==I.coverEnd-I.coverStart?ve=G.parentNode.getBoundingClientRect():ve=ol(b(G,ie,ue).getClientRects(),A),ve.left||ve.right||ie==0)break;ue=ie,ie=ie-1,de="right"}_&&c<11&&(ve=sl(e.display.measure,ve))}else{ie>0&&(de=A="right");var Ye;e.options.lineWrapping&&(Ye=G.getClientRects()).length>1?ve=Ye[A=="right"?Ye.length-1:0]:ve=G.getBoundingClientRect()}if(_&&c<9&&!ie&&(!ve||!ve.left&&!ve.right)){var mt=G.parentNode.getClientRects()[0];mt?ve={left:mt.left,right:mt.left+Ia(e.display),top:mt.top,bottom:mt.bottom}:ve=ms}for(var ct=ve.top-t.rect.top,Rt=ve.bottom-t.rect.top,Pt=(ct+Rt)/2,Qt=t.view.measure.heights,Vt=0;Vt<Qt.length-1&&!(Pt<Qt[Vt]);Vt++);var Jt=Vt?Qt[Vt-1]:0,Xt=Qt[Vt],ir={left:(de=="right"?ve.right:ve.left)-t.rect.left,right:(de=="left"?ve.left:ve.right)-t.rect.left,top:Jt,bottom:Xt};return!ve.left&&!ve.right&&(ir.bogus=!0),e.options.singleCursorHeightPerLine||(ir.rtop=ct,ir.rbottom=Rt),ir}function sl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return t;var d=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*d,right:t.right*d,top:t.top*A,bottom:t.bottom*A}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pi(e){e.display.externalMeasure=null,r(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vs(e.display.view[t])}function Ei(e){pi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ki(){return i&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function jn(){return i&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Di(e){var t=0;if(e.widgets)for(var d=0;d<e.widgets.length;++d)e.widgets[d].above&&(t+=$a(e.widgets[d]));return t}function eo(e,t,d,A,I){if(!I){var G=Di(t);d.top+=G,d.bottom+=G}if(A=="line")return d;A||(A="local");var ie=Mn(t);if(A=="local"?ie+=qa(e.display):ie-=e.display.viewOffset,A=="page"||A=="window"){var ue=e.display.lineSpace.getBoundingClientRect();ie+=ue.top+(A=="window"?0:jn());var de=ue.left+(A=="window"?0:ki());d.left+=de,d.right+=de}return d.top+=ie,d.bottom+=ie,d}function ys(e,t,d){if(d=="div")return t;var A=t.left,I=t.top;if(d=="page")A-=ki(),I-=jn();else if(d=="local"||!d){var G=e.display.sizer.getBoundingClientRect();A+=G.left,I+=G.top}var ie=e.display.lineSpace.getBoundingClientRect();return{left:A-ie.left,top:I-ie.top}}function to(e,t,d,A,I){return A||(A=jt(e.doc,t.line)),eo(e,A,Pi(e,A,t.ch,I),d)}function Ci(e,t,d,A,I,G){A=A||jt(e.doc,t.line),I||(I=an(e,A));function ie(Rt,Pt){var Qt=Si(e,I,Rt,Pt?"right":"left",G);return Pt?Qt.left=Qt.right:Qt.right=Qt.left,eo(e,A,Qt,d)}var ue=Mt(A,e.doc.direction),de=t.ch,ve=t.sticky;if(de>=A.text.length?(de=A.text.length,ve="before"):de<=0&&(de=0,ve="after"),!ue)return ie(ve=="before"?de-1:de,ve=="before");function Xe(Rt,Pt,Qt){var Vt=ue[Pt],Jt=Vt.level==1;return ie(Qt?Rt-1:Rt,Jt!=Qt)}var Ye=yt(ue,de,ve),mt=vt,ct=Xe(de,Ye,ve=="before");return mt!=null&&(ct.other=Xe(de,mt,ve!="before")),ct}function ll(e,t){var d=0;t=M(e.doc,t),e.options.lineWrapping||(d=Ia(e.display)*t.ch);var A=jt(e.doc,t.line),I=Mn(A)+qa(e.display);return{left:d,right:d,top:I,bottom:I+A.height}}function da(e,t,d,A,I){var G=fe(e,t,d);return G.xRel=I,A&&(G.outside=A),G}function Li(e,t,d){var A=e.doc;if(d+=e.display.viewOffset,d<0)return da(A.first,0,null,-1,-1);var I=Sr(A,d),G=A.first+A.size-1;if(I>G)return da(A.first+A.size-1,jt(A,G).text.length,null,1,1);t<0&&(t=0);for(var ie=jt(A,I);;){var ue=cl(e,ie,I,t,d),de=On(ie,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!de)return ue;var ve=de.find(1);if(ve.line==I)return ve;ie=jt(A,I=ve.line)}}function ul(e,t,d,A){A-=Di(t);var I=t.text.length,G=ht(function(ie){return Si(e,d,ie-1).bottom<=A},I,0);return I=ht(function(ie){return Si(e,d,ie).top>A},G,I),{begin:G,end:I}}function Al(e,t,d,A){d||(d=an(e,t));var I=eo(e,t,Si(e,d,A),"line").top;return ul(e,t,d,I)}function Oa(e,t,d,A){return e.bottom<=d?!1:e.top>d?!0:(A?e.left:e.right)>t}function cl(e,t,d,A,I){I-=Mn(t);var G=an(e,t),ie=Di(t),ue=0,de=t.text.length,ve=!0,Xe=Mt(t,e.doc.direction);if(Xe){var Ye=(e.options.lineWrapping?yu:vu)(e,t,d,G,Xe,A,I);ve=Ye.level!=1,ue=ve?Ye.from:Ye.to-1,de=ve?Ye.to:Ye.from-1}var mt=null,ct=null,Rt=ht(function(Er){var fr=Si(e,G,Er);return fr.top+=ie,fr.bottom+=ie,Oa(fr,A,I,!1)?(fr.top<=I&&fr.left<=A&&(mt=Er,ct=fr),!0):!1},ue,de),Pt,Qt,Vt=!1;if(ct){var Jt=A-ct.left<ct.right-A,Xt=Jt==ve;Rt=mt+(Xt?0:1),Qt=Xt?"after":"before",Pt=Jt?ct.left:ct.right}else{!ve&&(Rt==de||Rt==ue)&&Rt++,Qt=Rt==0?"after":Rt==t.text.length?"before":Si(e,G,Rt-(ve?1:0)).bottom+ie<=I==ve?"after":"before";var ir=Ci(e,fe(d,Rt,Qt),"line",t,G);Pt=ir.left,Vt=I<ir.top?-1:I>=ir.bottom?1:0}return Rt=ke(t.text,Rt,1),da(d,Rt,Qt,Vt,A-Pt)}function vu(e,t,d,A,I,G,ie){var ue=ht(function(Ye){var mt=I[Ye],ct=mt.level!=1;return Oa(Ci(e,fe(d,ct?mt.to:mt.from,ct?"before":"after"),"line",t,A),G,ie,!0)},0,I.length-1),de=I[ue];if(ue>0){var ve=de.level!=1,Xe=Ci(e,fe(d,ve?de.from:de.to,ve?"after":"before"),"line",t,A);Oa(Xe,G,ie,!0)&&Xe.top>ie&&(de=I[ue-1])}return de}function yu(e,t,d,A,I,G,ie){var ue=ul(e,t,A,ie),de=ue.begin,ve=ue.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var Xe=null,Ye=null,mt=0;mt<I.length;mt++){var ct=I[mt];if(ct.from>=ve||ct.to<=de)continue;var Rt=ct.level!=1,Pt=Si(e,A,Rt?Math.min(ve,ct.to)-1:Math.max(de,ct.from)).right,Qt=Pt<G?G-Pt+1e9:Pt-G;(!Xe||Ye>Qt)&&(Xe=ct,Ye=Qt)}return Xe||(Xe=I[I.length-1]),Xe.from<de&&(Xe={from:de,to:Xe.to,level:Xe.level}),Xe.to>ve&&(Xe={from:Xe.from,to:ve,level:Xe.level}),Xe}var Jn;function ha(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Jn==null){Jn=o("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Jn.appendChild(document.createTextNode("x")),Jn.appendChild(o("br"));Jn.appendChild(document.createTextNode("x"))}n(e.measure,Jn);var d=Jn.offsetHeight/50;return d>3&&(e.cachedTextHeight=d),r(e.measure),d||1}function Ia(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=o("span","xxxxxxxxxx"),d=o("pre",[t],"CodeMirror-line-like");n(e.measure,d);var A=t.getBoundingClientRect(),I=(A.right-A.left)/10;return I>2&&(e.cachedCharWidth=I),I||10}function bs(e){for(var t=e.display,d={},A={},I=t.gutters.clientLeft,G=t.gutters.firstChild,ie=0;G;G=G.nextSibling,++ie){var ue=e.display.gutterSpecs[ie].className;d[ue]=G.offsetLeft+G.clientLeft+I,A[ue]=G.clientWidth}return{fixedPos:Da(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:d,gutterWidth:A,wrapperWidth:t.wrapper.clientWidth}}function Da(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dl(e){var t=ha(e.display),d=e.options.lineWrapping,A=d&&Math.max(5,e.display.scroller.clientWidth/Ia(e.display)-3);return function(I){if(wn(e.doc,I))return 0;var G=0;if(I.widgets)for(var ie=0;ie<I.widgets.length;ie++)I.widgets[ie].height&&(G+=I.widgets[ie].height);return d?G+(Math.ceil(I.text.length/A)||1)*t:G+t}}function Uo(e){var t=e.doc,d=dl(e);t.iter(function(A){var I=d(A);I!=A.height&&Mr(A,I)})}function Ji(e,t,d,A){var I=e.display;if(!d&&We(t).getAttribute("cm-not-content")=="true")return null;var G,ie,ue=I.lineSpace.getBoundingClientRect();try{G=t.clientX-ue.left,ie=t.clientY-ue.top}catch(Ye){return null}var de=Li(e,G,ie),ve;if(A&&de.xRel>0&&(ve=jt(e.doc,de.line).text).length==de.ch){var Xe=te(ve,ve.length,e.options.tabSize)-ve.length;de=fe(de.line,Math.max(0,Math.round((G-Ti(e.display).left)/Ia(e.display))-Xe))}return de}function Zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var d=e.display.view,A=0;A<d.length;A++)if(t-=d[A].size,t<0)return A}function ti(e,t,d,A){t==null&&(t=e.doc.first),d==null&&(d=e.doc.first+e.doc.size),A||(A=0);var I=e.display;if(A&&d<I.viewTo&&(I.updateLineNumbers==null||I.updateLineNumbers>t)&&(I.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=I.viewTo)kr&&Jr(e.doc,t)<I.viewTo&&Hi(e);else if(d<=I.viewFrom)kr&&Xn(e.doc,d+A)>I.viewFrom?Hi(e):(I.viewFrom+=A,I.viewTo+=A);else if(t<=I.viewFrom&&d>=I.viewTo)Hi(e);else if(t<=I.viewFrom){var G=ro(e,d,d+A,1);G?(I.view=I.view.slice(G.index),I.viewFrom=G.lineN,I.viewTo+=A):Hi(e)}else if(d>=I.viewTo){var ie=ro(e,t,t,-1);ie?(I.view=I.view.slice(0,ie.index),I.viewTo=ie.lineN):Hi(e)}else{var ue=ro(e,t,t,-1),de=ro(e,d,d+A,1);ue&&de?(I.view=I.view.slice(0,ue.index).concat(Gr(e,ue.lineN,de.lineN)).concat(I.view.slice(de.index)),I.viewTo+=A):Hi(e)}var ve=I.externalMeasured;ve&&(d<ve.lineN?ve.lineN+=A:t<ve.lineN+ve.size&&(I.externalMeasured=null))}function Ni(e,t,d){e.curOp.viewChanged=!0;var A=e.display,I=e.display.externalMeasured;if(I&&t>=I.lineN&&t<I.lineN+I.size&&(A.externalMeasured=null),t<A.viewFrom||t>=A.viewTo)return;var G=A.view[Zi(e,t)];if(G.node==null)return;var ie=G.changes||(G.changes=[]);se(ie,d)==-1&&ie.push(d)}function Hi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ro(e,t,d,A){var I=Zi(e,t),G,ie=e.display.view;if(!kr||d==e.doc.first+e.doc.size)return{index:I,lineN:d};for(var ue=e.display.viewFrom,de=0;de<I;de++)ue+=ie[de].size;if(ue!=t){if(A>0){if(I==ie.length-1)return null;G=ue+ie[I].size-t,I++}else G=ue-t;t+=G,d+=G}for(;Jr(e.doc,d)!=d;){if(I==(A<0?0:ie.length-1))return null;d+=A*ie[I-(A<0?1:0)].size,I+=A}return{index:I,lineN:d}}function hl(e,t,d){var A=e.display,I=A.view;I.length==0||t>=A.viewTo||d<=A.viewFrom?(A.view=Gr(e,t,d),A.viewFrom=t):(A.viewFrom>t?A.view=Gr(e,t,A.viewFrom).concat(A.view):A.viewFrom<t&&(A.view=A.view.slice(Zi(e,t))),A.viewFrom=t,A.viewTo<d?A.view=A.view.concat(Gr(e,A.viewTo,d)):A.viewTo>d&&(A.view=A.view.slice(0,Zi(e,d)))),A.viewTo=d}function fl(e){for(var t=e.display.view,d=0,A=0;A<t.length;A++){var I=t[A];!I.hidden&&(!I.node||I.changes)&&++d}return d}function $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,t){t===void 0&&(t=!0);for(var d=e.doc,A={},I=A.cursors=document.createDocumentFragment(),G=A.selection=document.createDocumentFragment(),ie=0;ie<d.sel.ranges.length;ie++){if(!t&&ie==d.sel.primIndex)continue;var ue=d.sel.ranges[ie];if(ue.from().line>=e.display.viewTo||ue.to().line<e.display.viewFrom)continue;var de=ue.empty();(de||e.options.showCursorWhenSelecting)&&ml(e,ue.head,I),de||bu(e,ue,G)}return A}function ml(e,t,d){var A=Ci(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),I=d.appendChild(o("div","\xA0","CodeMirror-cursor"));if(I.style.left=A.left+"px",I.style.top=A.top+"px",I.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var G=d.appendChild(o("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));G.style.display="",G.style.left=A.other.left+"px",G.style.top=A.other.top+"px",G.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function Ra(e,t){return e.top-t.top||e.left-t.left}function bu(e,t,d){var A=e.display,I=e.doc,G=document.createDocumentFragment(),ie=Ti(e.display),ue=ie.left,de=Math.max(A.sizerWidth,di(e)-A.sizer.offsetLeft)-ie.right,ve=I.direction=="ltr";function Xe(Xt,ir,Er,fr){ir<0&&(ir=0),ir=Math.round(ir),fr=Math.round(fr),G.appendChild(o("div",null,"CodeMirror-selected","position: absolute; left: "+Xt+`px;
|
|
top: `+ir+"px; width: "+(Er==null?de-Xt:Er)+`px;
|
|
height: `+(fr-ir)+"px"))}function Ye(Xt,ir,Er){var fr=jt(I,Xt),Fr=fr.text.length,yn,zn;function _n(Rn,qn){return to(e,fe(Xt,Rn),"div",fr,qn)}function fi(Rn,qn,Vn){var Wt=Al(e,fr,null,Rn),Bn=qn=="ltr"==(Vn=="after")?"left":"right",Tn=Vn=="after"?Wt.begin:Wt.end-(/\s/.test(fr.text.charAt(Wt.end-1))?2:1);return _n(Tn,Bn)[Bn]}var $n=Mt(fr,I.direction);return ft($n,ir||0,Er==null?Fr:Er,function(Rn,qn,Vn,Wt){var Bn=Vn=="ltr",Tn=_n(Rn,Bn?"left":"right"),Sn=_n(qn-1,Bn?"right":"left"),Wa=ir==null&&Rn==0,Xr=Er==null&&qn==Fr,jr=Wt==0,yi=!$n||Wt==$n.length-1;if(Sn.top-Tn.top<=3){var Wn=(ve?Wa:Xr)&&jr,Ga=(ve?Xr:Wa)&&yi,Gi=Wn?ue:(Bn?Tn:Sn).left,Ui=Ga?de:(Bn?Sn:Tn).right;Xe(Gi,Tn.top,Ui-Gi,Tn.bottom)}else{var Ba,ii,Ta,tl;Bn?(Ba=ve&&Wa&&jr?ue:Tn.left,ii=ve?de:fi(Rn,Vn,"before"),Ta=ve?ue:fi(qn,Vn,"after"),tl=ve&&Xr&&yi?de:Sn.right):(Ba=ve?fi(Rn,Vn,"before"):ue,ii=!ve&&Wa&&jr?de:Tn.right,Ta=!ve&&Xr&&yi?ue:Sn.left,tl=ve?fi(qn,Vn,"after"):de),Xe(Ba,Tn.top,ii-Ba,Tn.bottom),Tn.bottom<Sn.top&&Xe(ue,Tn.bottom,null,Sn.top),Xe(Ta,Sn.top,tl-Ta,Sn.bottom)}(!yn||Ra(Tn,yn)<0)&&(yn=Tn),Ra(Sn,yn)<0&&(yn=Sn),(!zn||Ra(Tn,zn)<0)&&(zn=Tn),Ra(Sn,zn)<0&&(zn=Sn)}),{start:yn,end:zn}}var mt=t.from(),ct=t.to();if(mt.line==ct.line)Ye(mt.line,mt.ch,ct.ch);else{var Rt=jt(I,mt.line),Pt=jt(I,ct.line),Qt=Cn(Rt)==Cn(Pt),Vt=Ye(mt.line,mt.ch,Qt?Rt.text.length+1:null).end,Jt=Ye(ct.line,Qt?0:null,ct.ch).start;Qt&&(Vt.top<Jt.top-2?(Xe(Vt.right,Vt.top,null,Vt.bottom),Xe(ue,Jt.top,Jt.left,Jt.bottom)):Xe(Vt.right,Vt.top,Jt.left-Vt.right,Vt.bottom)),Vt.bottom<Jt.top&&Xe(ue,Vt.bottom,null,Jt.top)}d.appendChild(G)}function Fo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var d=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ma(e),t.cursorDiv.style.visibility=(d=!d)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gl(e){e.state.focused||(e.display.input.focus(),Es(e))}function vl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ma(e))},100)}function Es(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,t),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),C&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fo(e)}function Ma(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,t),e.state.focused=!1,a(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Po(e){for(var t=e.display,d=t.lineDiv.offsetTop,A=0;A<t.view.length;A++){var I=t.view[A],G=e.options.lineWrapping,ie=void 0,ue=0;if(I.hidden)continue;if(_&&c<8){var de=I.node.offsetTop+I.node.offsetHeight;ie=de-d,d=de}else{var ve=I.node.getBoundingClientRect();ie=ve.bottom-ve.top,!G&&I.text.firstChild&&(ue=I.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Xe=I.line.height-ie;if((Xe>.005||Xe<-.005)&&(Mr(I.line,ie),fa(I.line),I.rest))for(var Ye=0;Ye<I.rest.length;Ye++)fa(I.rest[Ye]);if(ue>e.display.sizerWidth){var mt=Math.ceil(ue/Ia(e.display));mt>e.display.maxLineLength&&(e.display.maxLineLength=mt,e.display.maxLine=I.line,e.display.maxLineChanged=!0)}}}function fa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var d=e.widgets[t],A=d.node.parentNode;A&&(d.height=A.offsetHeight)}}function ko(e,t,d){var A=d&&d.top!=null?Math.max(0,d.top):e.scroller.scrollTop;A=Math.floor(A-qa(e));var I=d&&d.bottom!=null?d.bottom:A+e.wrapper.clientHeight,G=Sr(t,A),ie=Sr(t,I);if(d&&d.ensure){var ue=d.ensure.from.line,de=d.ensure.to.line;ue<G?(G=ue,ie=Sr(t,Mn(jt(t,ue))+e.wrapper.clientHeight)):Math.min(de,t.lastLine())>=ie&&(G=Sr(t,Mn(jt(t,de))-e.wrapper.clientHeight),ie=de)}return{from:G,to:Math.max(ie,G+1)}}function Eu(e,t){if(st(e,"scrollCursorIntoView"))return;var d=e.display,A=d.sizer.getBoundingClientRect(),I=null;if(t.top+A.top<0?I=!0:t.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(I=!1),I!=null&&!y){var G=o("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-d.viewOffset-qa(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Ii(e)+d.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(G),G.scrollIntoView(I),e.display.lineSpace.removeChild(G)}}function No(e,t,d,A){A==null&&(A=0);var I;!e.options.lineWrapping&&t==d&&(t=t.ch?fe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,d=t.sticky=="before"?fe(t.line,t.ch+1,"before"):t);for(var G=0;G<5;G++){var ie=!1,ue=Ci(e,t),de=!d||d==t?ue:Ci(e,d);I={left:Math.min(ue.left,de.left),top:Math.min(ue.top,de.top)-A,right:Math.max(ue.left,de.left),bottom:Math.max(ue.bottom,de.bottom)+A};var ve=Cs(e,I),Xe=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(ve.scrollTop!=null&&(no(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Xe)>1&&(ie=!0)),ve.scrollLeft!=null&&(pa(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(ie=!0)),!ie)break}return I}function Cu(e,t){var d=Cs(e,t);d.scrollTop!=null&&no(e,d.scrollTop),d.scrollLeft!=null&&pa(e,d.scrollLeft)}function Cs(e,t){var d=e.display,A=ha(e.display);t.top<0&&(t.top=0);var I=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:d.scroller.scrollTop,G=In(e),ie={};t.bottom-t.top>G&&(t.bottom=t.top+G);var ue=e.doc.height+Yi(d),de=t.top<A,ve=t.bottom>ue-A;if(t.top<I)ie.scrollTop=de?0:t.top;else if(t.bottom>I+G){var Xe=Math.min(t.top,(ve?ue:t.bottom)-G);Xe!=I&&(ie.scrollTop=Xe)}var Ye=e.options.fixedGutter?0:d.gutters.offsetWidth,mt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:d.scroller.scrollLeft-Ye,ct=di(e)-d.gutters.offsetWidth,Rt=t.right-t.left>ct;return Rt&&(t.right=t.left+ct),t.left<10?ie.scrollLeft=0:t.left<mt?ie.scrollLeft=Math.max(0,t.left+Ye-(Rt?0:10)):t.right>ct+mt-3&&(ie.scrollLeft=t.right+(Rt?0:10)-ct),ie}function ws(e,t){if(t==null)return;Ho(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ua(e){Ho(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function qi(e,t,d){(t!=null||d!=null)&&Ho(e),t!=null&&(e.curOp.scrollLeft=t),d!=null&&(e.curOp.scrollTop=d)}function wu(e,t){Ho(e),e.curOp.scrollToPos=t}function Ho(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var d=ll(e,t.from),A=ll(e,t.to);yl(e,d,A,t.margin)}}function yl(e,t,d,A){var I=Cs(e,{left:Math.min(t.left,d.left),top:Math.min(t.top,d.top)-A,right:Math.max(t.right,d.right),bottom:Math.max(t.bottom,d.bottom)+A});qi(e,I.scrollLeft,I.scrollTop)}function no(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;L||Fa(e,{top:t}),io(e,t,!0),L&&Fa(e),ya(e,100)}function io(e,t,d){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!d)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function pa(e,t,d,A){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(d?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!A)return;e.doc.scrollLeft=t,xl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ao(e){var t=e.display,d=t.gutters.offsetWidth,A=Math.round(e.doc.height+Yi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?d:0,docHeight:A,scrollHeight:A+Ii(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:d}}var ma=function(e,t,d){this.cm=d;var A=this.vert=o("div",[o("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),I=this.horiz=o("div",[o("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=I.tabIndex=-1,e(A),e(I),Pe(A,"scroll",function(){A.clientHeight&&t(A.scrollTop,"vertical")}),Pe(I,"scroll",function(){I.clientWidth&&t(I.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_&&c<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ma.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,d=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(d){this.vert.style.display="block",this.vert.style.bottom=t?A+"px":"0";var I=e.viewHeight-(t?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+I)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=d?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var G=e.viewWidth-e.barLeft-(d?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+G)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:d?A:0,bottom:t?A:0}},ma.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ma.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ma.prototype.zeroWidthHack=function(){var e=l&&!T?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},ma.prototype.enableZeroWidthBar=function(e,t,d){e.style.pointerEvents="auto";function A(){var I=e.getBoundingClientRect(),G=d=="vert"?document.elementFromPoint(I.right-1,(I.top+I.bottom)/2):document.elementFromPoint((I.right+I.left)/2,I.bottom-1);G!=e?e.style.pointerEvents="none":t.set(1e3,A)}t.set(1e3,A)},ma.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var oo=function(){};oo.prototype.update=function(){return{bottom:0,right:0}},oo.prototype.setScrollLeft=function(){},oo.prototype.setScrollTop=function(){},oo.prototype.clear=function(){};function Qi(e,t){t||(t=ao(e));var d=e.display.barWidth,A=e.display.barHeight;bl(e,t);for(var I=0;I<4&&d!=e.display.barWidth||A!=e.display.barHeight;I++)d!=e.display.barWidth&&e.options.lineWrapping&&Po(e),bl(e,ao(e)),d=e.display.barWidth,A=e.display.barHeight}function bl(e,t){var d=e.display,A=d.scrollbars.update(t);d.sizer.style.paddingRight=(d.barWidth=A.right)+"px",d.sizer.style.paddingBottom=(d.barHeight=A.bottom)+"px",d.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(d.scrollbarFiller.style.display="block",d.scrollbarFiller.style.height=A.bottom+"px",d.scrollbarFiller.style.width=A.right+"px"):d.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(d.gutterFiller.style.display="block",d.gutterFiller.style.height=A.bottom+"px",d.gutterFiller.style.width=t.gutterWidth+"px"):d.gutterFiller.style.display=""}var El={native:ma,null:oo};function Cl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&a(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,d){d=="horizontal"?pa(e,t):no(e,t)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var xu=0;function ga(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:++xu},ui(e.curOp)}function va(e){var t=e.curOp;t&&Vr(t,function(d){for(var A=0;A<d.ops.length;A++)d.ops[A].cm.curOp=null;Bu(d)})}function Bu(e){for(var t=e.ops,d=0;d<t.length;d++)Tu(t[d]);for(var A=0;A<t.length;A++)Su(t[A]);for(var I=0;I<t.length;I++)Lu(t[I]);for(var G=0;G<t.length;G++)Qo(t[G]);for(var ie=0;ie<t.length;ie++)_u(t[ie])}function Tu(e){var t=e.cm,d=t.display;Ou(t),e.updateMaxLine&&Un(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<d.viewFrom||e.scrollToPos.to.line>=d.viewTo)||d.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ko(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Su(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Lu(e){var t=e.cm,d=t.display;e.updatedDisplay&&Po(t),e.barMeasure=ao(t),d.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Pi(t,d.maxLine,d.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(d.scroller.clientWidth,d.sizer.offsetLeft+e.adjustWidthTo+Ii(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,d.sizer.offsetLeft+e.adjustWidthTo-di(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=d.input.prepareSelection())}function Qo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pa(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var d=e.focus&&e.focus==U();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,d),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Qi(t,e.barMeasure),e.updatedDisplay&&Ts(t,e.barMeasure),e.selectionChanged&&Fo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),d&&gl(e.cm)}function _u(e){var t=e.cm,d=t.display,A=t.doc;if(e.updatedDisplay&&wl(t,e.update),d.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(d.wheelStartX=d.wheelStartY=null),e.scrollTop!=null&&io(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&pa(t,e.scrollLeft,!0,!0),e.scrollToPos){var I=No(t,M(A,e.scrollToPos.from),M(A,e.scrollToPos.to),e.scrollToPos.margin);Eu(t,I)}var G=e.maybeHiddenMarkers,ie=e.maybeUnhiddenMarkers;if(G)for(var ue=0;ue<G.length;++ue)G[ue].lines.length||Ze(G[ue],"hide");if(ie)for(var de=0;de<ie.length;++de)ie[de].lines.length&&Ze(ie[de],"unhide");d.wrapper.offsetHeight&&(A.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ze(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function hi(e,t){if(e.curOp)return t();ga(e);try{return t()}finally{va(e)}}function Pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ga(e);try{return t.apply(e,arguments)}finally{va(e)}}}function ri(e){return function(){if(this.curOp)return e.apply(this,arguments);ga(this);try{return e.apply(this,arguments)}finally{va(this)}}}function Kn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ga(t);try{return e.apply(this,arguments)}finally{va(t)}}}function ya(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Y(jo,e))}function jo(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var d=+new Date+e.options.workTime,A=Ft(e,t.highlightFrontier),I=[];t.iter(A.line,Math.min(t.first+t.size,e.display.viewTo+500),function(G){if(A.line>=e.display.viewFrom){var ie=G.styles,ue=G.text.length>e.options.maxHighlightLength?Gt(t.mode,A.state):null,de=je(e,G,A,!0);ue&&(A.state=ue),G.styles=de.styles;var ve=G.styleClasses,Xe=de.classes;Xe?G.styleClasses=Xe:ve&&(G.styleClasses=null);for(var Ye=!ie||ie.length!=G.styles.length||ve!=Xe&&(!ve||!Xe||ve.bgClass!=Xe.bgClass||ve.textClass!=Xe.textClass),mt=0;!Ye&&mt<ie.length;++mt)Ye=ie[mt]!=G.styles[mt];Ye&&I.push(A.line),G.stateAfter=A.save(),A.nextLine()}else G.text.length<=e.options.maxHighlightLength&&kt(e,G.text,A),G.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>d)return ya(e,e.options.workDelay),!0}),t.highlightFrontier=A.line,t.modeFrontier=Math.max(t.modeFrontier,A.line),I.length&&hi(e,function(){for(var G=0;G<I.length;G++)Ni(e,I[G],"text")})}var Ko=function(e,t,d){var A=e.display;this.viewport=t,this.visible=ko(A,e.doc,t),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=di(e),this.force=d,this.dims=bs(e),this.events=[]};Ko.prototype.signal=function(e,t){Ie(e,t)&&this.events.push(arguments)},Ko.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function Ou(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ii(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ii(e)+"px",t.scrollbarsClipped=!0)}function Iu(e){if(e.hasFocus())return null;var t=U();if(!t||!g(e.display.lineDiv,t))return null;var d={activeElt:t};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&g(e.display.lineDiv,A.anchorNode)&&(d.anchorNode=A.anchorNode,d.anchorOffset=A.anchorOffset,d.focusNode=A.focusNode,d.focusOffset=A.focusOffset)}return d}function Du(e){if(!e||!e.activeElt||e.activeElt==U())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode)){var t=window.getSelection(),d=document.createRange();d.setEnd(e.anchorNode,e.anchorOffset),d.collapse(!1),t.removeAllRanges(),t.addRange(d),t.extend(e.focusNode,e.focusOffset)}}function xs(e,t){var d=e.display,A=e.doc;if(t.editorIsHidden)return Hi(e),!1;if(!t.force&&t.visible.from>=d.viewFrom&&t.visible.to<=d.viewTo&&(d.updateLineNumbers==null||d.updateLineNumbers>=d.viewTo)&&d.renderedView==d.view&&fl(e)==0)return!1;Bl(e)&&(Hi(e),t.dims=bs(e));var I=A.first+A.size,G=Math.max(t.visible.from-e.options.viewportMargin,A.first),ie=Math.min(I,t.visible.to+e.options.viewportMargin);d.viewFrom<G&&G-d.viewFrom<20&&(G=Math.max(A.first,d.viewFrom)),d.viewTo>ie&&d.viewTo-ie<20&&(ie=Math.min(I,d.viewTo)),kr&&(G=Jr(e.doc,G),ie=Xn(e.doc,ie));var ue=G!=d.viewFrom||ie!=d.viewTo||d.lastWrapHeight!=t.wrapperHeight||d.lastWrapWidth!=t.wrapperWidth;hl(e,G,ie),d.viewOffset=Mn(jt(e.doc,d.viewFrom)),e.display.mover.style.top=d.viewOffset+"px";var de=fl(e);if(!ue&&de==0&&!t.force&&d.renderedView==d.view&&(d.updateLineNumbers==null||d.updateLineNumbers>=d.viewTo))return!1;var ve=Iu(e);return de>4&&(d.lineDiv.style.display="none"),Ru(e,d.updateLineNumbers,t.dims),de>4&&(d.lineDiv.style.display=""),d.renderedView=d.view,Du(ve),r(d.cursorDiv),r(d.selectionDiv),d.gutters.style.height=d.sizer.style.minHeight=0,ue&&(d.lastWrapHeight=t.wrapperHeight,d.lastWrapWidth=t.wrapperWidth,ya(e,400)),d.updateLineNumbers=null,!0}function wl(e,t){for(var d=t.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||t.oldDisplayWidth==di(e)){if(d&&d.top!=null&&(d={top:Math.min(e.doc.height+Yi(e.display)-In(e),d.top)}),t.visible=ko(e.display,e.doc,d),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else A&&(t.visible=ko(e.display,e.doc,d));if(!xs(e,t))break;Po(e);var I=ao(e);$i(e),Qi(e,I),Ts(e,I),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Fa(e,t){var d=new Ko(e,t);if(xs(e,d)){Po(e),wl(e,d);var A=ao(e);$i(e),Qi(e,A),Ts(e,A),d.finish()}}function Ru(e,t,d){var A=e.display,I=e.options.lineNumbers,G=A.lineDiv,ie=G.firstChild;function ue(Rt){var Pt=Rt.nextSibling;return C&&l&&e.display.currentWheelTarget==Rt?Rt.style.display="none":Rt.parentNode.removeChild(Rt),Pt}for(var de=A.view,ve=A.viewFrom,Xe=0;Xe<de.length;Xe++){var Ye=de[Xe];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=G){var mt=il(e,Ye,ve,d);G.insertBefore(mt,ie)}else{for(;ie!=Ye.node;)ie=ue(ie);var ct=I&&t!=null&&t<=ve&&Ye.lineNumber;Ye.changes&&(se(Ye.changes,"gutter")>-1&&(ct=!1),Vi(e,Ye,ve,d)),ct&&(r(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(on(e.options,ve)))),ie=Ye.node.nextSibling}ve+=Ye.size}for(;ie;)ie=ue(ie)}function Bs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ts(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ii(e)+"px"}function xl(e){var t=e.display,d=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var A=Da(t)-t.scroller.scrollLeft+e.doc.scrollLeft,I=t.gutters.offsetWidth,G=A+"px",ie=0;ie<d.length;ie++)if(!d[ie].hidden){e.options.fixedGutter&&(d[ie].gutter&&(d[ie].gutter.style.left=G),d[ie].gutterBackground&&(d[ie].gutterBackground.style.left=G));var ue=d[ie].alignable;if(ue)for(var de=0;de<ue.length;de++)ue[de].style.left=G}e.options.fixedGutter&&(t.gutters.style.left=A+I+"px")}function Bl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,d=on(e.options,t.first+t.size-1),A=e.display;if(d.length!=A.lineNumChars){var I=A.measure.appendChild(o("div",[o("div",d)],"CodeMirror-linenumber CodeMirror-gutter-elt")),G=I.firstChild.offsetWidth,ie=I.offsetWidth-G;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(G,A.lineGutter.offsetWidth-ie)+1,A.lineNumWidth=A.lineNumInnerWidth+ie,A.lineNumChars=A.lineNumInnerWidth?d.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Bs(e.display),!0}return!1}function Ss(e,t){for(var d=[],A=!1,I=0;I<e.length;I++){var G=e[I],ie=null;if(typeof G!="string"&&(ie=G.style,G=G.className),G=="CodeMirror-linenumbers")if(t)A=!0;else continue;d.push({className:G,style:ie})}return t&&!A&&d.push({className:"CodeMirror-linenumbers",style:null}),d}function Tl(e){var t=e.gutters,d=e.gutterSpecs;r(t),e.lineGutter=null;for(var A=0;A<d.length;++A){var I=d[A],G=I.className,ie=I.style,ue=t.appendChild(o("div",null,"CodeMirror-gutter "+G));ie&&(ue.style.cssText=ie),G=="CodeMirror-linenumbers"&&(e.lineGutter=ue,ue.style.width=(e.lineNumWidth||1)+"px")}t.style.display=d.length?"":"none",Bs(e)}function so(e){Tl(e.display),ti(e),xl(e)}function Mu(e,t,d,A){var I=this;this.input=d,I.scrollbarFiller=o("div",null,"CodeMirror-scrollbar-filler"),I.scrollbarFiller.setAttribute("cm-not-content","true"),I.gutterFiller=o("div",null,"CodeMirror-gutter-filler"),I.gutterFiller.setAttribute("cm-not-content","true"),I.lineDiv=S("div",null,"CodeMirror-code"),I.selectionDiv=o("div",null,null,"position: relative; z-index: 1"),I.cursorDiv=o("div",null,"CodeMirror-cursors"),I.measure=o("div",null,"CodeMirror-measure"),I.lineMeasure=o("div",null,"CodeMirror-measure"),I.lineSpace=S("div",[I.measure,I.lineMeasure,I.selectionDiv,I.cursorDiv,I.lineDiv],null,"position: relative; outline: none");var G=S("div",[I.lineSpace],"CodeMirror-lines");I.mover=o("div",[G],null,"position: relative"),I.sizer=o("div",[I.mover],"CodeMirror-sizer"),I.sizerWidth=null,I.heightForcer=o("div",null,null,"position: absolute; height: "+le+"px; width: 1px;"),I.gutters=o("div",null,"CodeMirror-gutters"),I.lineGutter=null,I.scroller=o("div",[I.sizer,I.heightForcer,I.gutters],"CodeMirror-scroll"),I.scroller.setAttribute("tabIndex","-1"),I.wrapper=o("div",[I.scrollbarFiller,I.gutterFiller,I.scroller],"CodeMirror"),_&&c<8&&(I.gutters.style.zIndex=-1,I.scroller.style.paddingRight=0),!C&&!(L&&s)&&(I.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(I.wrapper):e(I.wrapper)),I.viewFrom=I.viewTo=t.first,I.reportedViewFrom=I.reportedViewTo=t.first,I.view=[],I.renderedView=null,I.externalMeasured=null,I.viewOffset=0,I.lastWrapHeight=I.lastWrapWidth=0,I.updateLineNumbers=null,I.nativeBarWidth=I.barHeight=I.barWidth=0,I.scrollbarsClipped=!1,I.lineNumWidth=I.lineNumInnerWidth=I.lineNumChars=null,I.alignWidgets=!1,I.cachedCharWidth=I.cachedTextHeight=I.cachedPaddingH=null,I.maxLine=null,I.maxLineLength=0,I.maxLineChanged=!1,I.wheelDX=I.wheelDY=I.wheelStartX=I.wheelStartY=null,I.shift=!1,I.selForContextMenu=null,I.activeTouch=null,I.gutterSpecs=Ss(A.gutters,A.lineNumbers),Tl(I),d.init(I)}var zo=0,mi=null;_?mi=-.53:L?mi=15:i?mi=-.7:O&&(mi=-1/3);function Sl(e){var t=e.wheelDeltaX,d=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),d==null&&e.detail&&e.axis==e.VERTICAL_AXIS?d=e.detail:d==null&&(d=e.wheelDelta),{x:t,y:d}}function Ll(e){var t=Sl(e);return t.x*=mi,t.y*=mi,t}function _l(e,t){var d=Sl(t),A=d.x,I=d.y,G=e.display,ie=G.scroller,ue=ie.scrollWidth>ie.clientWidth,de=ie.scrollHeight>ie.clientHeight;if(!(A&&ue||I&&de))return;if(I&&l&&C){e:for(var ve=t.target,Xe=G.view;ve!=ie;ve=ve.parentNode)for(var Ye=0;Ye<Xe.length;Ye++)if(Xe[Ye].node==ve){e.display.currentWheelTarget=ve;break e}}if(A&&!L&&!h&&mi!=null){I&&de&&no(e,Math.max(0,ie.scrollTop+I*mi)),pa(e,Math.max(0,ie.scrollLeft+A*mi)),(!I||I&&de)&&pe(t),G.wheelStartX=null;return}if(I&&mi!=null){var mt=I*mi,ct=e.doc.scrollTop,Rt=ct+G.wrapper.clientHeight;mt<0?ct=Math.max(0,ct+mt-50):Rt=Math.min(e.doc.height,Rt+mt+50),Fa(e,{top:ct,bottom:Rt})}zo<20&&(G.wheelStartX==null?(G.wheelStartX=ie.scrollLeft,G.wheelStartY=ie.scrollTop,G.wheelDX=A,G.wheelDY=I,setTimeout(function(){if(G.wheelStartX==null)return;var Pt=ie.scrollLeft-G.wheelStartX,Qt=ie.scrollTop-G.wheelStartY,Vt=Qt&&G.wheelDY&&Qt/G.wheelDY||Pt&&G.wheelDX&&Pt/G.wheelDX;if(G.wheelStartX=G.wheelStartY=null,!Vt)return;mi=(mi*zo+Vt)/(zo+1),++zo},200)):(G.wheelDX+=A,G.wheelDY+=I))}var gi=function(e,t){this.ranges=e,this.primIndex=t};gi.prototype.primary=function(){return this.ranges[this.primIndex]},gi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var d=this.ranges[t],A=e.ranges[t];if(!Ue(d.anchor,A.anchor)||!Ue(d.head,A.head))return!1}return!0},gi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new en(et(this.ranges[t].anchor),et(this.ranges[t].head));return new gi(e,this.primIndex)},gi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gi.prototype.contains=function(e,t){t||(t=e);for(var d=0;d<this.ranges.length;d++){var A=this.ranges[d];if(ye(t,A.from())>=0&&ye(e,A.to())<=0)return d}return-1};var en=function(e,t){this.anchor=e,this.head=t};en.prototype.from=function(){return Dt(this.anchor,this.head)},en.prototype.to=function(){return Je(this.anchor,this.head)},en.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function si(e,t,d){var A=e&&e.options.selectionsMayTouch,I=t[d];t.sort(function(mt,ct){return ye(mt.from(),ct.from())}),d=se(t,I);for(var G=1;G<t.length;G++){var ie=t[G],ue=t[G-1],de=ye(ue.to(),ie.from());if(A&&!ie.empty()?de>0:de>=0){var ve=Dt(ue.from(),ie.from()),Xe=Je(ue.to(),ie.to()),Ye=ue.empty()?ie.from()==ie.head:ue.from()==ue.head;G<=d&&--d,t.splice(--G,2,new en(Ye?Xe:ve,Ye?ve:Xe))}}return new gi(t,d)}function ea(e,t){return new gi([new en(e,t||e)],0)}function ta(e){return e.text?fe(e.from.line+e.text.length-1,tt(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(ye(e,t.from)<0)return e;if(ye(e,t.to)<=0)return ta(t);var d=e.line+t.text.length-(t.to.line-t.from.line)-1,A=e.ch;return e.line==t.to.line&&(A+=ta(t).ch-t.to.ch),fe(d,A)}function _s(e,t){for(var d=[],A=0;A<e.sel.ranges.length;A++){var I=e.sel.ranges[A];d.push(new en(Ls(I.anchor,t),Ls(I.head,t)))}return si(e.cm,d,e.sel.primIndex)}function Ol(e,t,d){return e.line==t.line?fe(d.line,e.ch-t.ch+d.ch):fe(d.line+(e.line-t.line),e.ch)}function Uu(e,t,d){for(var A=[],I=fe(e.first,0),G=I,ie=0;ie<t.length;ie++){var ue=t[ie],de=Ol(ue.from,I,G),ve=Ol(ta(ue),I,G);if(I=ue.to,G=ve,d=="around"){var Xe=e.sel.ranges[ie],Ye=ye(Xe.head,Xe.anchor)<0;A[ie]=new en(Ye?ve:de,Ye?de:ve)}else A[ie]=new en(de,de)}return new gi(A,e.sel.primIndex)}function Os(e){e.doc.mode=Bt(e.options,e.doc.modeOption),lo(e)}function lo(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ya(e,100),e.state.modeGen++,e.curOp&&ti(e)}function Il(e,t){return t.from.ch==0&&t.to.ch==0&&tt(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Is(e,t,d,A){function I(Jt){return d?d[Jt]:null}function G(Jt,Xt,ir){Qn(Jt,Xt,ir,A),Zr(Jt,"change",Jt,t)}function ie(Jt,Xt){for(var ir=[],Er=Jt;Er<Xt;++Er)ir.push(new gn(ve[Er],I(Er),A));return ir}var ue=t.from,de=t.to,ve=t.text,Xe=jt(e,ue.line),Ye=jt(e,de.line),mt=tt(ve),ct=I(ve.length-1),Rt=de.line-ue.line;if(t.full)e.insert(0,ie(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(Il(e,t)){var Pt=ie(0,ve.length-1);G(Ye,Ye.text,ct),Rt&&e.remove(ue.line,Rt),Pt.length&&e.insert(ue.line,Pt)}else if(Xe==Ye)if(ve.length==1)G(Xe,Xe.text.slice(0,ue.ch)+mt+Xe.text.slice(de.ch),ct);else{var Qt=ie(1,ve.length-1);Qt.push(new gn(mt+Xe.text.slice(de.ch),ct,A)),G(Xe,Xe.text.slice(0,ue.ch)+ve[0],I(0)),e.insert(ue.line+1,Qt)}else if(ve.length==1)G(Xe,Xe.text.slice(0,ue.ch)+ve[0]+Ye.text.slice(de.ch),I(0)),e.remove(ue.line+1,Rt);else{G(Xe,Xe.text.slice(0,ue.ch)+ve[0],I(0)),G(Ye,mt+Ye.text.slice(de.ch),ct);var Vt=ie(1,ve.length-1);Rt>1&&e.remove(ue.line+1,Rt-1),e.insert(ue.line+1,Vt)}Zr(e,"change",e,t)}function ra(e,t,d){function A(I,G,ie){if(I.linked)for(var ue=0;ue<I.linked.length;++ue){var de=I.linked[ue];if(de.doc==G)continue;var ve=ie&&de.sharedHist;if(d&&!ve)continue;t(de.doc,ve),A(de.doc,I,ve)}}A(e,null,!0)}function kn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Uo(e),Os(e),Dl(e),e.options.lineWrapping||Un(e),e.options.mode=t.modeOption,ti(e)}function Dl(e){(e.doc.direction=="rtl"?K:a)(e.display.lineDiv,"CodeMirror-rtl")}function Fu(e){hi(e,function(){Dl(e),ti(e)})}function Wo(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 Ds(e,t){var d={from:et(t.from),to:ta(t),text:Dr(e,t.from,t.to)};return Fl(e,d,t.from.line,t.to.line+1),ra(e,function(A){return Fl(A,d,t.from.line,t.to.line+1)},!0),d}function Rl(e){for(;e.length;){var t=tt(e);if(t.ranges)e.pop();else break}}function Ml(e,t){if(t)return Rl(e.done),tt(e.done);if(e.done.length&&!tt(e.done).ranges)return tt(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),tt(e.done)}function Ul(e,t,d,A){var I=e.history;I.undone.length=0;var G=+new Date,ie,ue;if((I.lastOp==A||I.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&I.lastModTime>G-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ie=Ml(I,I.lastOp==A)))ue=tt(ie.changes),ye(t.from,t.to)==0&&ye(t.from,ue.to)==0?ue.to=ta(t):ie.changes.push(Ds(e,t));else{var de=tt(I.done);for((!de||!de.ranges)&&Go(e.sel,I.done),ie={changes:[Ds(e,t)],generation:I.generation},I.done.push(ie);I.done.length>I.undoDepth;)I.done.shift(),I.done[0].ranges||I.done.shift()}I.done.push(d),I.generation=++I.maxGeneration,I.lastModTime=I.lastSelTime=G,I.lastOp=I.lastSelOp=A,I.lastOrigin=I.lastSelOrigin=t.origin,ue||Ze(e,"historyAdded")}function Pu(e,t,d,A){var I=t.charAt(0);return I=="*"||I=="+"&&d.ranges.length==A.ranges.length&&d.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ku(e,t,d,A){var I=e.history,G=A&&A.origin;d==I.lastSelOp||G&&I.lastSelOrigin==G&&(I.lastModTime==I.lastSelTime&&I.lastOrigin==G||Pu(e,G,tt(I.done),t))?I.done[I.done.length-1]=t:Go(t,I.done),I.lastSelTime=+new Date,I.lastSelOrigin=G,I.lastSelOp=d,A&&A.clearRedo!==!1&&Rl(I.undone)}function Go(e,t){var d=tt(t);d&&d.ranges&&d.equals(e)||t.push(e)}function Fl(e,t,d,A){var I=t["spans_"+e.id],G=0;e.iter(Math.max(e.first,d),Math.min(e.first+e.size,A),function(ie){ie.markedSpans&&((I||(I=t["spans_"+e.id]={}))[G]=ie.markedSpans),++G})}function Nu(e){if(!e)return null;for(var t,d=0;d<e.length;++d)e[d].marker.explicitlyCleared?t||(t=e.slice(0,d)):t&&t.push(e[d]);return t?t.length?t:null:e}function Pl(e,t){var d=t["spans_"+e.id];if(!d)return null;for(var A=[],I=0;I<t.text.length;++I)A.push(Nu(d[I]));return A}function ar(e,t){var d=Pl(e,t),A=cn(e,t);if(!d)return A;if(!A)return d;for(var I=0;I<d.length;++I){var G=d[I],ie=A[I];if(G&&ie){e:for(var ue=0;ue<ie.length;++ue){for(var de=ie[ue],ve=0;ve<G.length;++ve)if(G[ve].marker==de.marker)continue e;G.push(de)}}else ie&&(d[I]=ie)}return d}function Pa(e,t,d){for(var A=[],I=0;I<e.length;++I){var G=e[I];if(G.ranges){A.push(d?gi.prototype.deepCopy.call(G):G);continue}var ie=G.changes,ue=[];A.push({changes:ue});for(var de=0;de<ie.length;++de){var ve=ie[de],Xe=void 0;if(ue.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var Ye in ve)(Xe=Ye.match(/^spans_(\d+)$/))&&(se(t,Number(Xe[1]))>-1&&(tt(ue)[Ye]=ve[Ye],delete ve[Ye]))}}return A}function Rs(e,t,d,A){if(A){var I=e.anchor;if(d){var G=ye(t,I)<0;G!=ye(d,I)<0?(I=t,t=d):G!=ye(t,d)<0&&(t=d)}return new en(I,t)}else return new en(d||t,t)}function ka(e,t,d,A,I){I==null&&(I=e.cm&&(e.cm.display.shift||e.extend)),Zn(e,new gi([Rs(e.sel.primary(),t,d,I)],0),A)}function _i(e,t,d){for(var A=[],I=e.cm&&(e.cm.display.shift||e.extend),G=0;G<e.sel.ranges.length;G++)A[G]=Rs(e.sel.ranges[G],t[G],null,I);var ie=si(e.cm,A,e.sel.primIndex);Zn(e,ie,d)}function Ms(e,t,d,A){var I=e.sel.ranges.slice(0);I[t]=d,Zn(e,si(e.cm,I,e.sel.primIndex),A)}function Us(e,t,d,A){Zn(e,ea(t,d),A)}function uo(e,t,d){var A={ranges:t.ranges,update:function(I){this.ranges=[];for(var G=0;G<I.length;G++)this.ranges[G]=new en(M(e,I[G].anchor),M(e,I[G].head))},origin:d&&d.origin};return Ze(e,"beforeSelectionChange",e,A),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=t.ranges?si(e.cm,A.ranges,A.ranges.length-1):t}function Ao(e,t,d){var A=e.history.done,I=tt(A);I&&I.ranges?(A[A.length-1]=t,Vo(e,t,d)):Zn(e,t,d)}function Zn(e,t,d){Vo(e,t,d),ku(e,e.sel,e.cm?e.cm.curOp.id:NaN,d)}function Vo(e,t,d){(Ie(e,"beforeSelectionChange")||e.cm&&Ie(e.cm,"beforeSelectionChange"))&&(t=uo(e,t,d));var A=d&&d.bias||(ye(t.primary().head,e.sel.primary().head)<0?-1:1);kl(e,Xo(e,t,A,!0)),!(d&&d.scroll===!1)&&e.cm&&Ua(e.cm)}function kl(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ke(e.cm)),Zr(e,"cursorActivity",e)}function na(e){kl(e,Xo(e,e.sel,null,!1))}function Xo(e,t,d,A){for(var I,G=0;G<t.ranges.length;G++){var ie=t.ranges[G],ue=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[G],de=Yo(e,ie.anchor,ue&&ue.anchor,d,A),ve=Yo(e,ie.head,ue&&ue.head,d,A);(I||de!=ie.anchor||ve!=ie.head)&&(I||(I=t.ranges.slice(0,G)),I[G]=new en(de,ve))}return I?si(e.cm,I,t.primIndex):t}function ia(e,t,d,A,I){var G=jt(e,t.line);if(G.markedSpans)for(var ie=0;ie<G.markedSpans.length;++ie){var ue=G.markedSpans[ie],de=ue.marker,ve="selectLeft"in de?!de.selectLeft:de.inclusiveLeft,Xe="selectRight"in de?!de.selectRight:de.inclusiveRight;if((ue.from==null||(ve?ue.from<=t.ch:ue.from<t.ch))&&(ue.to==null||(Xe?ue.to>=t.ch:ue.to>t.ch))){if(I&&(Ze(de,"beforeCursorEnter"),de.explicitlyCleared))if(G.markedSpans){--ie;continue}else break;if(!de.atomic)continue;if(d){var Ye=de.find(A<0?1:-1),mt=void 0;if((A<0?Xe:ve)&&(Ye=Fs(e,Ye,-A,Ye&&Ye.line==t.line?G:null)),Ye&&Ye.line==t.line&&(mt=ye(Ye,d))&&(A<0?mt<0:mt>0))return ia(e,Ye,t,A,I)}var ct=de.find(A<0?-1:1);return(A<0?ve:Xe)&&(ct=Fs(e,ct,A,ct.line==t.line?G:null)),ct?ia(e,ct,t,A,I):null}}return t}function Yo(e,t,d,A,I){var G=A||1,ie=ia(e,t,d,G,I)||!I&&ia(e,t,d,G,!0)||ia(e,t,d,-G,I)||!I&&ia(e,t,d,-G,!0);return ie||(e.cantEdit=!0,fe(e.first,0))}function Fs(e,t,d,A){return d<0&&t.ch==0?t.line>e.first?M(e,fe(t.line-1)):null:d>0&&t.ch==(A||jt(e,t.line)).text.length?t.line<e.first+e.size-1?fe(t.line+1,0):null:new fe(t.line,t.ch+d)}function Nl(e){e.setSelection(fe(e.firstLine(),0),fe(e.lastLine()),Ee)}function Jo(e,t,d){var A={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return A.canceled=!0}};return d&&(A.update=function(I,G,ie,ue){I&&(A.from=M(e,I)),G&&(A.to=M(e,G)),ie&&(A.text=ie),ue!==void 0&&(A.origin=ue)}),Ze(e,"beforeChange",e,A),e.cm&&Ze(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function Na(e,t,d){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,Na)(e,t,d);if(e.cm.state.suppressEdits)return}if((Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"))&&(t=Jo(e,t,!0),!t))return;var A=hr&&!d&&Cr(e,t.from,t.to);if(A)for(var I=A.length-1;I>=0;--I)Hl(e,{from:A[I].from,to:A[I].to,text:I?[""]:t.text,origin:t.origin});else Hl(e,t)}function Hl(e,t){if(t.text.length==1&&t.text[0]==""&&ye(t.from,t.to)==0)return;var d=_s(e,t);Ul(e,t,d,e.cm?e.cm.curOp.id:NaN),co(e,t,d,cn(e,t));var A=[];ra(e,function(I,G){!G&&se(A,I.history)==-1&&(Kl(I.history,t),A.push(I.history)),co(I,t,null,cn(I,t))})}function Zo(e,t,d){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!d)return;for(var I=e.history,G,ie=e.sel,ue=t=="undo"?I.done:I.undone,de=t=="undo"?I.undone:I.done,ve=0;ve<ue.length&&!(G=ue[ve],d?G.ranges&&!G.equals(e.sel):!G.ranges);ve++);if(ve==ue.length)return;for(I.lastOrigin=I.lastSelOrigin=null;;)if(G=ue.pop(),G.ranges){if(Go(G,de),d&&!G.equals(e.sel)){Zn(e,G,{clearRedo:!1});return}ie=G}else if(A){ue.push(G);return}else break;var Xe=[];Go(ie,de),de.push({changes:Xe,generation:I.generation}),I.generation=G.generation||++I.maxGeneration;for(var Ye=Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"),mt=function(Pt){var Qt=G.changes[Pt];if(Qt.origin=t,Ye&&!Jo(e,Qt,!1))return ue.length=0,{};Xe.push(Ds(e,Qt));var Vt=Pt?_s(e,Qt):tt(ue);co(e,Qt,Vt,ar(e,Qt)),!Pt&&e.cm&&e.cm.scrollIntoView({from:Qt.from,to:ta(Qt)});var Jt=[];ra(e,function(Xt,ir){!ir&&se(Jt,Xt.history)==-1&&(Kl(Xt.history,Qt),Jt.push(Xt.history)),co(Xt,Qt,null,ar(Xt,Qt))})},ct=G.changes.length-1;ct>=0;--ct){var Rt=mt(ct);if(Rt)return Rt.v}}function Ql(e,t){if(t==0)return;if(e.first+=t,e.sel=new gi(Et(e.sel.ranges,function(I){return new en(fe(I.anchor.line+t,I.anchor.ch),fe(I.head.line+t,I.head.ch))}),e.sel.primIndex),e.cm){ti(e.cm,e.first,e.first-t,t);for(var d=e.cm.display,A=d.viewFrom;A<d.viewTo;A++)Ni(e.cm,A,"gutter")}}function co(e,t,d,A){if(e.cm&&!e.cm.curOp)return Pn(e.cm,co)(e,t,d,A);if(t.to.line<e.first){Ql(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var I=t.text.length-1-(e.first-t.from.line);Ql(e,I),t={from:fe(e.first,0),to:fe(t.to.line+I,t.to.ch),text:[tt(t.text)],origin:t.origin}}var G=e.lastLine();t.to.line>G&&(t={from:t.from,to:fe(G,jt(e,G).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dr(e,t.from,t.to),d||(d=_s(e,t)),e.cm?Hu(e.cm,t,A):Is(e,t,A),Vo(e,d,Ee),e.cantEdit&&Yo(e,fe(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,t,d){var A=e.doc,I=e.display,G=t.from,ie=t.to,ue=!1,de=G.line;e.options.lineWrapping||(de=pr(Cn(jt(A,G.line))),A.iter(de,ie.line+1,function(ct){if(ct==I.maxLine)return ue=!0,!0})),A.sel.contains(t.from,t.to)>-1&&Ke(e),Is(A,t,d,dl(e)),e.options.lineWrapping||(A.iter(de,G.line+t.text.length,function(ct){var Rt=oi(ct);Rt>I.maxLineLength&&(I.maxLine=ct,I.maxLineLength=Rt,I.maxLineChanged=!0,ue=!1)}),ue&&(e.curOp.updateMaxLine=!0)),_r(A,G.line),ya(e,400);var ve=t.text.length-(ie.line-G.line)-1;t.full?ti(e):G.line==ie.line&&t.text.length==1&&!Il(e.doc,t)?Ni(e,G.line,"text"):ti(e,G.line,ie.line+1,ve);var Xe=Ie(e,"changes"),Ye=Ie(e,"change");if(Ye||Xe){var mt={from:G,to:ie,text:t.text,removed:t.removed,origin:t.origin};Ye&&Zr(e,"change",e,mt),Xe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(mt)}e.display.selForContextMenu=null}function Ha(e,t,d,A,I){var G;A||(A=d),ye(A,d)<0&&(G=[A,d],d=G[0],A=G[1]),typeof t=="string"&&(t=e.splitLines(t)),Na(e,{from:d,to:A,text:t,origin:I})}function jl(e,t,d,A){d<e.line?e.line+=A:t<e.line&&(e.line=t,e.ch=0)}function Ps(e,t,d,A){for(var I=0;I<e.length;++I){var G=e[I],ie=!0;if(G.ranges){G.copied||(G=e[I]=G.deepCopy(),G.copied=!0);for(var ue=0;ue<G.ranges.length;ue++)jl(G.ranges[ue].anchor,t,d,A),jl(G.ranges[ue].head,t,d,A);continue}for(var de=0;de<G.changes.length;++de){var ve=G.changes[de];if(d<ve.from.line)ve.from=fe(ve.from.line+A,ve.from.ch),ve.to=fe(ve.to.line+A,ve.to.ch);else if(t<=ve.to.line){ie=!1;break}}ie||(e.splice(0,I+1),I=0)}}function Kl(e,t){var d=t.from.line,A=t.to.line,I=t.text.length-(A-d)-1;Ps(e.done,d,A,I),Ps(e.undone,d,A,I)}function ho(e,t,d,A){var I=t,G=t;return typeof t=="number"?G=jt(e,Z(e,t)):I=pr(t),I==null?null:(A(G,I)&&e.cm&&Ni(e.cm,I,d),G)}function fo(e){this.lines=e,this.parent=null;for(var t=0,d=0;d<e.length;++d)e[d].parent=this,t+=e[d].height;this.height=t}fo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var d=e,A=e+t;d<A;++d){var I=this.lines[d];this.height-=I.height,li(I),Zr(I,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,d){this.height+=d,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var A=0;A<t.length;++A)t[A].parent=this},iterN:function(e,t,d){for(var A=e+t;e<A;++e)if(d(this.lines[e]))return!0}};function Qa(e){this.children=e;for(var t=0,d=0,A=0;A<e.length;++A){var I=e[A];t+=I.chunkSize(),d+=I.height,I.parent=this}this.size=t,this.height=d,this.parent=null}Qa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var d=0;d<this.children.length;++d){var A=this.children[d],I=A.chunkSize();if(e<I){var G=Math.min(t,I-e),ie=A.height;if(A.removeInner(e,G),this.height-=ie-A.height,I==G&&(this.children.splice(d--,1),A.parent=null),(t-=G)==0)break;e=0}else e-=I}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof fo))){var ue=[];this.collapse(ue),this.children=[new fo(ue)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,d){this.size+=t.length,this.height+=d;for(var A=0;A<this.children.length;++A){var I=this.children[A],G=I.chunkSize();if(e<=G){if(I.insertInner(e,t,d),I.lines&&I.lines.length>50){for(var ie=I.lines.length%25+25,ue=ie;ue<I.lines.length;){var de=new fo(I.lines.slice(ue,ue+=25));I.height-=de.height,this.children.splice(++A,0,de),de.parent=this}I.lines=I.lines.slice(0,ie),this.maybeSpill()}break}e-=G}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),d=new Qa(t);if(e.parent){e.size-=d.size,e.height-=d.height;var I=se(e.parent.children,e);e.parent.children.splice(I+1,0,d)}else{var A=new Qa(e.children);A.parent=e,e.children=[A,d],e=A}d.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,d){for(var A=0;A<this.children.length;++A){var I=this.children[A],G=I.chunkSize();if(e<G){var ie=Math.min(t,G-e);if(I.iterN(e,ie,d))return!0;if((t-=ie)==0)break;e=0}else e-=G}}};var po=function(e,t,d){if(d)for(var A in d)d.hasOwnProperty(A)&&(this[A]=d[A]);this.doc=e,this.node=t};po.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,d=this.line,A=pr(d);if(A==null||!t)return;for(var I=0;I<t.length;++I)t[I]==this&&t.splice(I--,1);t.length||(d.widgets=null);var G=$a(this);Mr(d,Math.max(0,d.height-G)),e&&(hi(e,function(){mo(e,d,-G),Ni(e,A,"widget")}),Zr(e,"lineWidgetCleared",e,this,A))},po.prototype.changed=function(){var e=this,t=this.height,d=this.doc.cm,A=this.line;this.height=null;var I=$a(this)-t;if(!I)return;wn(this.doc,A)||Mr(A,A.height+I),d&&hi(d,function(){d.curOp.forceUpdate=!0,mo(d,A,I),Zr(d,"lineWidgetChanged",d,e,pr(A))})},Me(po);function mo(e,t,d){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ws(e,d)}function Qu(e,t,d,A){var I=new po(e,d,A),G=e.cm;return G&&I.noHScroll&&(G.display.alignWidgets=!0),ho(e,t,"widget",function(ie){var ue=ie.widgets||(ie.widgets=[]);if(I.insertAt==null?ue.push(I):ue.splice(Math.min(ue.length-1,Math.max(0,I.insertAt)),0,I),I.line=ie,G&&!wn(e,ie)){var de=Mn(ie)<e.scrollTop;Mr(ie,ie.height+$a(I)),de&&ws(G,I.height),G.curOp.forceUpdate=!0}return!0}),G&&Zr(G,"lineWidgetAdded",G,I,typeof t=="number"?t:pr(t)),I}var $o=0,Ri=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++$o};Ri.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ga(e),Ie(this,"clear")){var d=this.find();d&&Zr(this,"clear",d.from,d.to)}for(var A=null,I=null,G=0;G<this.lines.length;++G){var ie=this.lines[G],ue=rn(ie.markedSpans,this);e&&!this.collapsed?Ni(e,pr(ie),"text"):e&&(ue.to!=null&&(I=pr(ie)),ue.from!=null&&(A=pr(ie))),ie.markedSpans=An(ie.markedSpans,ue),ue.from==null&&this.collapsed&&!wn(this.doc,ie)&&e&&Mr(ie,ha(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var de=0;de<this.lines.length;++de){var ve=Cn(this.lines[de]),Xe=oi(ve);Xe>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Xe,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&ti(e,A,I+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&Zr(e,"markerCleared",e,this,A,I),t&&va(e),this.parent&&this.parent.clear()},Ri.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var d,A,I=0;I<this.lines.length;++I){var G=this.lines[I],ie=rn(G.markedSpans,this);if(ie.from!=null&&(d=fe(t?G:pr(G),ie.from),e==-1))return d;if(ie.to!=null&&(A=fe(t?G:pr(G),ie.to),e==1))return A}return d&&{from:d,to:A}},Ri.prototype.changed=function(){var e=this,t=this.find(-1,!0),d=this,A=this.doc.cm;if(!t||!A)return;hi(A,function(){var I=t.line,G=pr(t.line),ie=ca(A,G);if(ie&&(vs(ie),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!wn(d.doc,I)&&d.height!=null){var ue=d.height;d.height=null;var de=$a(d)-ue;de&&Mr(I,I.height+de)}Zr(A,"markerChanged",A,e)})},Ri.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||se(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ri.prototype.detachLine=function(e){if(this.lines.splice(se(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(Ri);function ba(e,t,d,A,I){if(A&&A.shared)return ju(e,t,d,A,I);if(e.cm&&!e.cm.curOp)return Pn(e.cm,ba)(e,t,d,A,I);var G=new Ri(e,I),ie=ye(t,d);if(A&&V(A,G,!1),ie>0||ie==0&&G.clearWhenEmpty!==!1)return G;if(G.replacedWith&&(G.collapsed=!0,G.widgetNode=S("span",[G.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||G.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(G.widgetNode.insertLeft=!0)),G.collapsed){if(Hr(e,t.line,t,d,G)||t.line!=d.line&&Hr(e,d.line,t,d,G))throw new Error("Inserting collapsed marker partially overlapping an existing one");qr()}G.addToHistory&&Ul(e,{from:t,to:d,origin:"markText"},e.sel,NaN);var ue=t.line,de=e.cm,ve;if(e.iter(ue,d.line+1,function(Ye){de&&G.collapsed&&!de.options.lineWrapping&&Cn(Ye)==de.display.maxLine&&(ve=!0),G.collapsed&&ue!=t.line&&Mr(Ye,0),$r(Ye,new Yr(G,ue==t.line?t.ch:null,ue==d.line?d.ch:null)),++ue}),G.collapsed&&e.iter(t.line,d.line+1,function(Ye){wn(e,Ye)&&Mr(Ye,0)}),G.clearOnEnter&&Pe(G,"beforeCursorEnter",function(){return G.clear()}),G.readOnly&&(Nr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),G.collapsed&&(G.id=++$o,G.atomic=!0),de){if(ve&&(de.curOp.updateMaxLine=!0),G.collapsed)ti(de,t.line,d.line+1);else if(G.className||G.startStyle||G.endStyle||G.css||G.attributes||G.title)for(var Xe=t.line;Xe<=d.line;Xe++)Ni(de,Xe,"text");G.atomic&&na(de.doc),Zr(de,"markerAdded",de,G)}return G}var ja=function(e,t){this.markers=e,this.primary=t;for(var d=0;d<e.length;++d)e[d].parent=this};ja.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Zr(this,"clear")},ja.prototype.find=function(e,t){return this.primary.find(e,t)},Me(ja);function ju(e,t,d,A,I){A=V(A),A.shared=!1;var G=[ba(e,t,d,A,I)],ie=G[0],ue=A.widgetNode;return ra(e,function(de){ue&&(A.widgetNode=ue.cloneNode(!0)),G.push(ba(de,M(de,t),M(de,d),A,I));for(var ve=0;ve<de.linked.length;++ve)if(de.linked[ve].isParent)return;ie=tt(G)}),new ja(G,ie)}function ks(e){return e.findMarks(fe(e.first,0),e.clipPos(fe(e.lastLine())),function(t){return t.parent})}function Ns(e,t){for(var d=0;d<t.length;d++){var A=t[d],I=A.find(),G=e.clipPos(I.from),ie=e.clipPos(I.to);if(ye(G,ie)){var ue=ba(e,G,ie,A.primary,A.primary.type);A.markers.push(ue),ue.parent=A}}}function Hs(e){for(var t=function(A){var I=e[A],G=[I.primary.doc];ra(I.primary.doc,function(de){return G.push(de)});for(var ie=0;ie<I.markers.length;ie++){var ue=I.markers[ie];se(G,ue.doc)==-1&&(ue.parent=null,I.markers.splice(ie--,1))}},d=0;d<e.length;d++)t(d)}var zl=0,ni=function(e,t,d,A,I){if(!(this instanceof ni))return new ni(e,t,d,A,I);d==null&&(d=0),Qa.call(this,[new fo([new gn("",null)])]),this.first=d,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=d;var G=fe(d,0);this.sel=ea(G),this.history=new Wo(null),this.id=++zl,this.modeOption=t,this.lineSep=A,this.direction=I=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Is(this,{from:G,to:G,text:e}),Zn(this,ea(G),Ee)};ni.prototype=it(Qa.prototype,{constructor:ni,iter:function(e,t,d){d?this.iterN(e-this.first,t-e,d):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var d=0,A=0;A<t.length;++A)d+=t[A].height;this.insertInner(e-this.first,t,d)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Wr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Kn(function(e){var t=fe(this.first,0),d=this.first+this.size-1;Na(this,{from:t,to:fe(d,jt(this,d).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&qi(this.cm,0,0),Zn(this,ea(t),Ee)}),replaceRange:function(e,t,d,A){t=M(this,t),d=d?M(this,d):t,Ha(this,e,t,d,A)},getRange:function(e,t,d){var A=Dr(this,M(this,e),M(this,t));return d===!1?A:A.join(d||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(mn(this,e))return jt(this,e)},getLineNumber:function(e){return pr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=jt(this,e)),Cn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return M(this,e)},getCursor:function(e){var t=this.sel.primary(),d;return e==null||e=="head"?d=t.head:e=="anchor"?d=t.anchor:e=="end"||e=="to"||e===!1?d=t.to():d=t.from(),d},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Kn(function(e,t,d){Us(this,M(this,typeof e=="number"?fe(e,t||0):e),null,d)}),setSelection:Kn(function(e,t,d){Us(this,M(this,e),M(this,t||e),d)}),extendSelection:Kn(function(e,t,d){ka(this,M(this,e),t&&M(this,t),d)}),extendSelections:Kn(function(e,t){_i(this,$(this,e),t)}),extendSelectionsBy:Kn(function(e,t){var d=Et(this.sel.ranges,e);_i(this,$(this,d),t)}),setSelections:Kn(function(e,t,d){if(!e.length)return;for(var A=[],I=0;I<e.length;I++)A[I]=new en(M(this,e[I].anchor),M(this,e[I].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Zn(this,si(this.cm,A,t),d)}),addSelection:Kn(function(e,t,d){var A=this.sel.ranges.slice(0);A.push(new en(M(this,e),M(this,t||e))),Zn(this,si(this.cm,A,A.length-1),d)}),getSelection:function(e){for(var t=this.sel.ranges,d,A=0;A<t.length;A++){var I=Dr(this,t[A].from(),t[A].to());d=d?d.concat(I):I}return e===!1?d:d.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],d=this.sel.ranges,A=0;A<d.length;A++){var I=Dr(this,d[A].from(),d[A].to());e!==!1&&(I=I.join(e||this.lineSeparator())),t[A]=I}return t},replaceSelection:function(e,t,d){for(var A=[],I=0;I<this.sel.ranges.length;I++)A[I]=e;this.replaceSelections(A,t,d||"+input")},replaceSelections:Kn(function(e,t,d){for(var A=[],I=this.sel,G=0;G<I.ranges.length;G++){var ie=I.ranges[G];A[G]={from:ie.from(),to:ie.to(),text:this.splitLines(e[G]),origin:d}}for(var ue=t&&t!="end"&&Uu(this,A,t),de=A.length-1;de>=0;de--)Na(this,A[de]);ue?Ao(this,ue):this.cm&&Ua(this.cm)}),undo:Kn(function(){Zo(this,"undo")}),redo:Kn(function(){Zo(this,"redo")}),undoSelection:Kn(function(){Zo(this,"undo",!0)}),redoSelection:Kn(function(){Zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,d=0,A=0;A<e.done.length;A++)e.done[A].ranges||++t;for(var I=0;I<e.undone.length;I++)e.undone[I].ranges||++d;return{undo:t,redo:d}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ra(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Pa(this.history.done),undone:Pa(this.history.undone)}},setHistory:function(e){var t=this.history=new Wo(this.history.maxGeneration);t.done=Pa(e.done.slice(0),null,!0),t.undone=Pa(e.undone.slice(0),null,!0)},setGutterMarker:Kn(function(e,t,d){return ho(this,e,"gutter",function(A){var I=A.gutterMarkers||(A.gutterMarkers={});return I[t]=d,!d&&ce(I)&&(A.gutterMarkers=null),!0})}),clearGutter:Kn(function(e){var t=this;this.iter(function(d){d.gutterMarkers&&d.gutterMarkers[e]&&ho(t,d,"gutter",function(){return d.gutterMarkers[e]=null,ce(d.gutterMarkers)&&(d.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!mn(this,e))return null;if(t=e,e=jt(this,e),!e)return null}else if(t=pr(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Kn(function(e,t,d){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var I=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!A[I])A[I]=d;else{if(p(d).test(A[I]))return!1;A[I]+=" "+d}return!0})}),removeLineClass:Kn(function(e,t,d){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var I=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",G=A[I];if(G)if(d==null)A[I]=null;else{var ie=G.match(p(d));if(!ie)return!1;var ue=ie.index+ie[0].length;A[I]=G.slice(0,ie.index)+(!ie.index||ue==G.length?"":" ")+G.slice(ue)||null}else return!1;return!0})}),addLineWidget:Kn(function(e,t,d){return Qu(this,e,t,d)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,d){return ba(this,M(this,e),M(this,t),d,d&&d.type||"range")},setBookmark:function(e,t){var d={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=M(this,e),ba(this,e,e,d,"bookmark")},findMarksAt:function(e){e=M(this,e);var t=[],d=jt(this,e.line).markedSpans;if(d)for(var A=0;A<d.length;++A){var I=d[A];(I.from==null||I.from<=e.ch)&&(I.to==null||I.to>=e.ch)&&t.push(I.marker.parent||I.marker)}return t},findMarks:function(e,t,d){e=M(this,e),t=M(this,t);var A=[],I=e.line;return this.iter(e.line,t.line+1,function(G){var ie=G.markedSpans;if(ie)for(var ue=0;ue<ie.length;ue++){var de=ie[ue];!(de.to!=null&&I==e.line&&e.ch>=de.to||de.from==null&&I!=e.line||de.from!=null&&I==t.line&&de.from>=t.ch)&&(!d||d(de.marker))&&A.push(de.marker.parent||de.marker)}++I}),A},getAllMarks:function(){var e=[];return this.iter(function(t){var d=t.markedSpans;if(d)for(var A=0;A<d.length;++A)d[A].from!=null&&e.push(d[A].marker)}),e},posFromIndex:function(e){var t,d=this.first,A=this.lineSeparator().length;return this.iter(function(I){var G=I.text.length+A;if(G>e)return t=e,!0;e-=G,++d}),M(this,fe(d,t))},indexFromPos:function(e){e=M(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var d=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){t+=A.text.length+d}),t},copy:function(e){var t=new ni(Wr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,d=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<d&&(d=e.to);var A=new ni(Wr(this,t,d),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(A,ks(this)),A},unlinkDoc:function(e){if(e instanceof En&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var d=this.linked[t];if(d.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Hs(ks(this));break}if(e.history==this.history){var A=[e.id];ra(e,function(I){return A.push(I.id)},!0),e.history=new Wo(null),e.history.done=Pa(this.history.done,A),e.history.undone=Pa(this.history.undone,A)}},iterLinkedDocs:function(e){ra(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):At(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Kn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Fu(this.cm)})}),ni.prototype.eachLine=ni.prototype.iter;var Qs=0;function Wl(e){var t=this;if(Gl(t),st(t,e)||Bi(t.display,e))return;pe(e),_&&(Qs=+new Date);var d=Ji(t,e,!0),A=e.dataTransfer.files;if(!d||t.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var I=A.length,G=Array(I),ie=0,ue=function(){++ie==I&&Pn(t,function(){d=M(t.doc,d);var ct={from:d,to:d,text:t.doc.splitLines(G.filter(function(Rt){return Rt!=null}).join(t.doc.lineSeparator())),origin:"paste"};Na(t.doc,ct),Ao(t.doc,ea(M(t.doc,d),M(t.doc,ta(ct))))})()},de=function(ct,Rt){if(t.options.allowDropFileTypes&&se(t.options.allowDropFileTypes,ct.type)==-1){ue();return}var Pt=new FileReader;Pt.onerror=function(){return ue()},Pt.onload=function(){var Qt=Pt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qt)){ue();return}G[Rt]=Qt,ue()},Pt.readAsText(ct)},ve=0;ve<A.length;ve++)de(A[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(d)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Xe=e.dataTransfer.getData("Text");if(Xe){var Ye;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ye=t.listSelections()),Vo(t.doc,ea(d,d)),Ye)for(var mt=0;mt<Ye.length;++mt)Ha(t.doc,"",Ye[mt].anchor,Ye[mt].head,"drag");t.replaceSelection(Xe,"around","paste"),t.display.input.focus()}}catch(ct){}}}function js(e,t){if(_&&(!e.state.draggingText||+new Date-Qs<100)){Ce(t);return}if(st(e,t)||Bi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!O){var d=o("img",null,null,"position: fixed; left: 0; top: 0;");d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(d.width=d.height=1,e.display.wrapper.appendChild(d),d._top=d.offsetTop),t.dataTransfer.setDragImage(d,0,0),h&&d.parentNode.removeChild(d)}}function Ku(e,t){var d=Ji(e,t);if(!d)return;var A=document.createDocumentFragment();ml(e,d,A),e.display.dragCursor||(e.display.dragCursor=o("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,A)}function Gl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),d=[],A=0;A<t.length;A++){var I=t[A].CodeMirror;I&&d.push(I)}d.length&&d[0].operation(function(){for(var G=0;G<d.length;G++)e(d[G])})}var vi=!1;function Ks(){if(vi)return;zu(),vi=!0}function zu(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(Wu)},100))}),Pe(window,"blur",function(){return Vl(Ma)})}function Wu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var aa={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"},go=0;go<10;go++)aa[go+48]=aa[go+96]=String(go);for(var qo=65;qo<=90;qo++)aa[qo]=String.fromCharCode(qo);for(var vo=1;vo<=12;vo++)aa[vo+111]=aa[vo+63235]="F"+vo;var ji={};ji.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"},ji.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"},ji.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"},ji.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"]},ji.default=l?ji.macDefault:ji.pcDefault;function Gu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var d,A,I,G,ie=0;ie<t.length-1;ie++){var ue=t[ie];if(/^(cmd|meta|m)$/i.test(ue))G=!0;else if(/^a(lt)?$/i.test(ue))d=!0;else if(/^(c|ctrl|control)$/i.test(ue))A=!0;else if(/^s(hift)?$/i.test(ue))I=!0;else throw new Error("Unrecognized modifier name: "+ue)}return d&&(e="Alt-"+e),A&&(e="Ctrl-"+e),G&&(e="Cmd-"+e),I&&(e="Shift-"+e),e}function Vu(e){var t={};for(var d in e)if(e.hasOwnProperty(d)){var A=e[d];if(/^(name|fallthrough|(de|at)tach)$/.test(d))continue;if(A=="..."){delete e[d];continue}for(var I=Et(d.split(" "),Gu),G=0;G<I.length;G++){var ie=void 0,ue=void 0;G==I.length-1?(ue=I.join(" "),ie=A):(ue=I.slice(0,G+1).join(" "),ie="...");var de=t[ue];if(!de)t[ue]=ie;else if(de!=ie)throw new Error("Inconsistent bindings for "+ue)}delete e[d]}for(var ve in t)e[ve]=t[ve];return e}function Ea(e,t,d,A){t=Nn(t);var I=t.call?t.call(e,A):t[e];if(I===!1)return"nothing";if(I==="...")return"multi";if(I!=null&&d(I))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ea(e,t.fallthrough,d,A);for(var G=0;G<t.fallthrough.length;G++){var ie=Ea(e,t.fallthrough[G],d,A);if(ie)return ie}}}function Xl(e){var t=typeof e=="string"?e:aa[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function es(e,t,d){var A=e;return t.altKey&&A!="Alt"&&(e="Alt-"+e),(v?t.metaKey:t.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(v?t.ctrlKey:t.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!d&&t.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function zs(e,t){if(h&&e.keyCode==34&&e.char)return!1;var d=aa[e.keyCode];return d==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(d=e.code),es(d,e,t))}function Nn(e){return typeof e=="string"?ji[e]:e}function Mi(e,t){for(var d=e.doc.sel.ranges,A=[],I=0;I<d.length;I++){for(var G=t(d[I]);A.length&&ye(G.from,tt(A).to)<=0;){var ie=A.pop();if(ye(ie.from,G.from)<0){G.from=ie.from;break}}A.push(G)}hi(e,function(){for(var ue=A.length-1;ue>=0;ue--)Ha(e.doc,"",A[ue].from,A[ue].to,"+delete");Ua(e)})}function Ws(e,t,d){var A=ke(e.text,t+d,d);return A<0||A>e.text.length?null:A}function Gs(e,t,d){var A=Ws(e,t.ch,d);return A==null?null:new fe(t.line,A,d<0?"after":"before")}function ts(e,t,d,A,I){if(e){t.doc.direction=="rtl"&&(I=-I);var G=Mt(d,t.doc.direction);if(G){var ie=I<0?tt(G):G[0],ue=I<0==(ie.level==1),de=ue?"after":"before",ve;if(ie.level>0||t.doc.direction=="rtl"){var Xe=an(t,d);ve=I<0?d.text.length-1:0;var Ye=Si(t,Xe,ve).top;ve=ht(function(mt){return Si(t,Xe,mt).top==Ye},I<0==(ie.level==1)?ie.from:ie.to-1,ve),de=="before"&&(ve=Ws(d,ve,1))}else ve=I<0?ie.to:ie.from;return new fe(A,ve,de)}}return new fe(A,I<0?d.text.length:0,I<0?"before":"after")}function Vs(e,t,d,A){var I=Mt(t,e.doc.direction);if(!I)return Gs(t,d,A);d.ch>=t.text.length?(d.ch=t.text.length,d.sticky="before"):d.ch<=0&&(d.ch=0,d.sticky="after");var G=yt(I,d.ch,d.sticky),ie=I[G];if(e.doc.direction=="ltr"&&ie.level%2==0&&(A>0?ie.to>d.ch:ie.from<d.ch))return Gs(t,d,A);var ue=function(Vt,Jt){return Ws(t,Vt instanceof fe?Vt.ch:Vt,Jt)},de,ve=function(Vt){return e.options.lineWrapping?(de=de||an(e,t),Al(e,t,de,Vt)):{begin:0,end:t.text.length}},Xe=ve(d.sticky=="before"?ue(d,-1):d.ch);if(e.doc.direction=="rtl"||ie.level==1){var Ye=ie.level==1==A<0,mt=ue(d,Ye?1:-1);if(mt!=null&&(Ye?mt<=ie.to&&mt<=Xe.end:mt>=ie.from&&mt>=Xe.begin)){var ct=Ye?"before":"after";return new fe(d.line,mt,ct)}}var Rt=function(Vt,Jt,Xt){for(var ir=function(yn,zn){return zn?new fe(d.line,ue(yn,1),"before"):new fe(d.line,yn,"after")};Vt>=0&&Vt<I.length;Vt+=Jt){var Er=I[Vt],fr=Jt>0==(Er.level!=1),Fr=fr?Xt.begin:ue(Xt.end,-1);if(Er.from<=Fr&&Fr<Er.to)return ir(Fr,fr);if(Fr=fr?Er.from:ue(Er.to,-1),Xt.begin<=Fr&&Fr<Xt.end)return ir(Fr,fr)}},Pt=Rt(G+A,A,Xe);if(Pt)return Pt;var Qt=A>0?Xe.end:ue(Xe.begin,-1);return Qt!=null&&!(A>0&&Qt==t.text.length)&&(Pt=Rt(A>0?0:I.length-1,A,ve(Qt)),Pt)?Pt:null}var yo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ee)},killLine:function(e){return Mi(e,function(t){if(t.empty()){var d=jt(e.doc,t.head.line).text.length;return t.head.ch==d&&t.head.line<e.lastLine()?{from:t.head,to:fe(t.head.line+1,0)}:{from:t.head,to:fe(t.head.line,d)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Mi(e,function(t){return{from:fe(t.from().line,0),to:M(e.doc,fe(t.to().line+1,0))}})},delLineLeft:function(e){return Mi(e,function(t){return{from:fe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Mi(e,function(t){var d=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:d},"div");return{from:A,to:t.from()}})},delWrappedLineRight:function(e){return Mi(e,function(t){var d=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:d},"div");return{from:t.from(),to:A}})},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(fe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(fe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Yl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Jl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Xu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var d=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:d},"div")},De)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var d=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:d},"div")},De)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var d=e.cursorCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:d},"div");return A.ch<e.getLine(A.line).search(/\S/)?Jl(e,t.head):A},De)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],d=e.listSelections(),A=e.options.tabSize,I=0;I<d.length;I++){var G=d[I].from(),ie=te(e.getLine(G.line),G.ch,A);t.push(Le(A-ie%A))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var t=e.listSelections(),d=[],A=0;A<t.length;A++){if(!t[A].empty())continue;var I=t[A].head,G=jt(e.doc,I.line).text;if(G){if(I.ch==G.length&&(I=new fe(I.line,I.ch-1)),I.ch>0)I=new fe(I.line,I.ch+1),e.replaceRange(G.charAt(I.ch-1)+G.charAt(I.ch-2),fe(I.line,I.ch-2),I,"+transpose");else if(I.line>e.doc.first){var ie=jt(e.doc,I.line-1).text;ie&&(I=new fe(I.line,1),e.replaceRange(G.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),fe(I.line-1,ie.length-1),I,"+transpose"))}}d.push(new en(I,I))}e.setSelections(d)})},newlineAndIndent:function(e){return hi(e,function(){for(var t=e.listSelections(),d=t.length-1;d>=0;d--)e.replaceRange(e.doc.lineSeparator(),t[d].anchor,t[d].head,"+input");t=e.listSelections();for(var A=0;A<t.length;A++)e.indentLine(t[A].from().line,null,!0);Ua(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var d=jt(e.doc,t),A=Cn(d);return A!=d&&(t=pr(A)),ts(!0,e,A,t,1)}function Xu(e,t){var d=jt(e.doc,t),A=Hn(d);return A!=d&&(t=pr(A)),ts(!0,e,d,t,-1)}function Jl(e,t){var d=Yl(e,t.line),A=jt(e.doc,d.line),I=Mt(A,e.doc.direction);if(!I||I[0].level==0){var G=Math.max(d.ch,A.text.search(/\S/)),ie=t.line==d.line&&t.ch<=G&&t.ch;return fe(d.line,ie?0:G,d.sticky)}return d}function rs(e,t,d){if(typeof t=="string"&&(t=yo[t],!t))return!1;e.display.input.ensurePolled();var A=e.display.shift,I=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d&&(e.display.shift=!1),I=t(e)!=Te}finally{e.display.shift=A,e.state.suppressEdits=!1}return I}function Yu(e,t,d){for(var A=0;A<e.state.keyMaps.length;A++){var I=Ea(t,e.state.keyMaps[A],d,e);if(I)return I}return e.options.extraKeys&&Ea(t,e.options.extraKeys,d,e)||Ea(t,e.options.keyMap,d,e)}var Ju=new X;function bo(e,t,d,A){var I=e.state.keySeq;if(I){if(Xl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==I&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,I+" "+t,d,A))return!0}return Xs(e,t,d,A)}function Xs(e,t,d,A){var I=Yu(e,t,A);return I=="multi"&&(e.state.keySeq=t),I=="handled"&&Zr(e,"keyHandled",e,t,d),(I=="handled"||I=="multi")&&(pe(d),Fo(e)),!!I}function Ys(e,t){var d=zs(t,!0);return d?t.shiftKey&&!e.state.keySeq?bo(e,"Shift-"+d,t,function(A){return rs(e,A,!0)})||bo(e,d,t,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return rs(e,A)}):bo(e,d,t,function(A){return rs(e,A)}):!1}function Zl(e,t,d){return bo(e,"'"+d+"'",t,function(A){return rs(e,A,!0)})}var ns=null;function is(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=U(),st(t,e))return;_&&c<11&&e.keyCode==27&&(e.returnValue=!1);var d=e.keyCode;t.display.shift=d==16||e.shiftKey;var A=Ys(t,e);h&&(ns=A?d:null,!A&&d==88&&!rt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),L&&!l&&!A&&d==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),d==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Zu(t)}function Zu(e){var t=e.display.lineDiv;K(t,"CodeMirror-crosshair");function d(A){(A.keyCode==18||!A.altKey)&&(a(t,"CodeMirror-crosshair"),pt(document,"keyup",d),pt(document,"mouseover",d))}Pe(document,"keyup",d),Pe(document,"mouseover",d)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function ql(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Bi(t.display,e)||st(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var d=e.keyCode,A=e.charCode;if(h&&d==ns){ns=null,pe(e);return}if(h&&(!e.which||e.which<10)&&Ys(t,e))return;var I=String.fromCharCode(A==null?d:A);if(I=="\b")return;if(Zl(t,e,I))return;t.display.input.onKeyPress(e)}var $u=400,Ka=function(e,t,d){this.time=e,this.pos=t,this.button=d};Ka.prototype.compare=function(e,t,d){return this.time+$u>e&&ye(t,this.pos)==0&&d==this.button};var oa,Eo;function eu(e,t){var d=+new Date;return Eo&&Eo.compare(d,e,t)?(oa=Eo=null,"triple"):oa&&oa.compare(d,e,t)?(Eo=new Ka(d,e,t),oa=null,"double"):(oa=new Ka(d,e,t),Eo=null,"single")}function as(e){var t=this,d=t.display;if(st(t,e)||d.activeTouch&&d.input.supportsTouch())return;if(d.input.ensurePolled(),d.shift=e.shiftKey,Bi(d,e)){C||(d.scroller.draggable=!1,setTimeout(function(){return d.scroller.draggable=!0},100));return}if(Js(t,e))return;var A=Ji(t,e),I=Ne(e),G=A?eu(A,I):"single";if(window.focus(),I==1&&t.state.selectingText&&t.state.selectingText(e),A&&tu(t,I,A,G,e))return;I==1?A?nu(t,A,G,e):We(e)==d.scroller&&pe(e):I==2?(A&&ka(t.doc,A),setTimeout(function(){return d.input.focus()},20)):I==3&&(R?t.display.input.onContextMenu(e):vl(t))}function tu(e,t,d,A,I){var G="Click";return A=="double"?G="Double"+G:A=="triple"&&(G="Triple"+G),G=(t==1?"Left":t==2?"Middle":"Right")+G,bo(e,es(G,I),I,function(ie){if(typeof ie=="string"&&(ie=yo[ie]),!ie)return!1;var ue=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ue=ie(e,d)!=Te}finally{e.state.suppressEdits=!1}return ue})}function ru(e,t,d){var A=e.getOption("configureMouse"),I=A?A(e,t,d):{};if(I.unit==null){var G=f?d.shiftKey&&d.metaKey:d.altKey;I.unit=G?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(I.extend==null||e.doc.extend)&&(I.extend=e.doc.extend||d.shiftKey),I.addNew==null&&(I.addNew=l?d.metaKey:d.ctrlKey),I.moveOnDrag==null&&(I.moveOnDrag=!(l?d.altKey:d.ctrlKey)),I}function nu(e,t,d,A){_?setTimeout(Y(gl,e),0):e.curOp.focus=U();var I=ru(e,d,A),G=e.doc.sel,ie;e.options.dragDrop&&ut&&!e.isReadOnly()&&d=="single"&&(ie=G.contains(t))>-1&&(ye((ie=G.ranges[ie]).from(),t)<0||t.xRel>0)&&(ye(ie.to(),t)>0||t.xRel<0)?qu(e,A,t,I):iu(e,A,t,I)}function qu(e,t,d,A){var I=e.display,G=!1,ie=Pn(e,function(ve){C&&(I.scroller.draggable=!1),e.state.draggingText=!1,pt(I.wrapper.ownerDocument,"mouseup",ie),pt(I.wrapper.ownerDocument,"mousemove",ue),pt(I.scroller,"dragstart",de),pt(I.scroller,"drop",ie),G||(pe(ve),A.addNew||ka(e.doc,d,null,null,A.extend),C&&!O||_&&c==9?setTimeout(function(){I.wrapper.ownerDocument.body.focus({preventScroll:!0}),I.input.focus()},20):I.input.focus())}),ue=function(ve){G=G||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},de=function(){return G=!0};C&&(I.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!A.moveOnDrag,I.scroller.dragDrop&&I.scroller.dragDrop(),Pe(I.wrapper.ownerDocument,"mouseup",ie),Pe(I.wrapper.ownerDocument,"mousemove",ue),Pe(I.scroller,"dragstart",de),Pe(I.scroller,"drop",ie),vl(e),setTimeout(function(){return I.input.focus()},20)}function Co(e,t,d){if(d=="char")return new en(t,t);if(d=="word")return e.findWordAt(t);if(d=="line")return new en(fe(t.line,0),M(e.doc,fe(t.line+1,0)));var A=d(e,t);return new en(A.from,A.to)}function iu(e,t,d,A){var I=e.display,G=e.doc;pe(t);var ie,ue,de=G.sel,ve=de.ranges;if(A.addNew&&!A.extend?(ue=G.sel.contains(d),ue>-1?ie=ve[ue]:ie=new en(d,d)):(ie=G.sel.primary(),ue=G.sel.primIndex),A.unit=="rectangle")A.addNew||(ie=new en(d,d)),d=Ji(e,t,!0,!0),ue=-1;else{var Xe=Co(e,d,A.unit);A.extend?ie=Rs(ie,Xe.anchor,Xe.head,A.extend):ie=Xe}A.addNew?ue==-1?(ue=ve.length,Zn(G,si(e,ve.concat([ie]),ue),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[ue].empty()&&A.unit=="char"&&!A.extend?(Zn(G,si(e,ve.slice(0,ue).concat(ve.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),de=G.sel):Ms(G,ue,ie,Be):(ue=0,Zn(G,new gi([ie],0),Be),de=G.sel);var Ye=d;function mt(Xt){if(ye(Ye,Xt)==0)return;if(Ye=Xt,A.unit=="rectangle"){for(var ir=[],Er=e.options.tabSize,fr=te(jt(G,d.line).text,d.ch,Er),Fr=te(jt(G,Xt.line).text,Xt.ch,Er),yn=Math.min(fr,Fr),zn=Math.max(fr,Fr),_n=Math.min(d.line,Xt.line),fi=Math.min(e.lastLine(),Math.max(d.line,Xt.line));_n<=fi;_n++){var $n=jt(G,_n).text,Rn=Ve($n,yn,Er);yn==zn?ir.push(new en(fe(_n,Rn),fe(_n,Rn))):$n.length>Rn&&ir.push(new en(fe(_n,Rn),fe(_n,Ve($n,zn,Er))))}ir.length||ir.push(new en(d,d)),Zn(G,si(e,de.ranges.slice(0,ue).concat(ir),ue),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Xt)}else{var qn=ie,Vn=Co(e,Xt,A.unit),Wt=qn.anchor,Bn;ye(Vn.anchor,Wt)>0?(Bn=Vn.head,Wt=Dt(qn.from(),Vn.anchor)):(Bn=Vn.anchor,Wt=Je(qn.to(),Vn.head));var Tn=de.ranges.slice(0);Tn[ue]=au(e,new en(M(G,Wt),Bn)),Zn(G,si(e,Tn,ue),Be)}}var ct=I.wrapper.getBoundingClientRect(),Rt=0;function Pt(Xt){var ir=++Rt,Er=Ji(e,Xt,!0,A.unit=="rectangle");if(!Er)return;if(ye(Er,Ye)!=0){e.curOp.focus=U(),mt(Er);var fr=ko(I,G);(Er.line>=fr.to||Er.line<fr.from)&&setTimeout(Pn(e,function(){Rt==ir&&Pt(Xt)}),150)}else{var Fr=Xt.clientY<ct.top?-20:Xt.clientY>ct.bottom?20:0;Fr&&setTimeout(Pn(e,function(){if(Rt!=ir)return;I.scroller.scrollTop+=Fr,Pt(Xt)}),50)}}function Qt(Xt){e.state.selectingText=!1,Rt=Infinity,Xt&&(pe(Xt),I.input.focus()),pt(I.wrapper.ownerDocument,"mousemove",Vt),pt(I.wrapper.ownerDocument,"mouseup",Jt),G.history.lastSelOrigin=null}var Vt=Pn(e,function(Xt){Xt.buttons===0||!Ne(Xt)?Qt(Xt):Pt(Xt)}),Jt=Pn(e,Qt);e.state.selectingText=Jt,Pe(I.wrapper.ownerDocument,"mousemove",Vt),Pe(I.wrapper.ownerDocument,"mouseup",Jt)}function au(e,t){var d=t.anchor,A=t.head,I=jt(e.doc,d.line);if(ye(d,A)==0&&d.sticky==A.sticky)return t;var G=Mt(I);if(!G)return t;var ie=yt(G,d.ch,d.sticky),ue=G[ie];if(ue.from!=d.ch&&ue.to!=d.ch)return t;var de=ie+(ue.from==d.ch==(ue.level!=1)?0:1);if(de==0||de==G.length)return t;var ve;if(A.line!=d.line)ve=(A.line-d.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Xe=yt(G,A.ch,A.sticky),Ye=Xe-ie||(A.ch-d.ch)*(ue.level==1?-1:1);Xe==de-1||Xe==de?ve=Ye<0:ve=Ye>0}var mt=G[de+(ve?-1:0)],ct=ve==(mt.level==1),Rt=ct?mt.from:mt.to,Pt=ct?"after":"before";return d.ch==Rt&&d.sticky==Pt?t:new en(new fe(d.line,Rt,Pt),A)}function ou(e,t,d,A){var I,G;if(t.touches)I=t.touches[0].clientX,G=t.touches[0].clientY;else try{I=t.clientX,G=t.clientY}catch(mt){return!1}if(I>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&pe(t);var ie=e.display,ue=ie.lineDiv.getBoundingClientRect();if(G>ue.bottom||!Ie(e,d))return ge(t);G-=ue.top-ie.viewOffset;for(var de=0;de<e.display.gutterSpecs.length;++de){var ve=ie.gutters.childNodes[de];if(ve&&ve.getBoundingClientRect().right>=I){var Xe=Sr(e.doc,G),Ye=e.display.gutterSpecs[de];return Ze(e,d,e,Xe,Ye.className,t),ge(t)}}}function Js(e,t){return ou(e,t,"gutterClick",!0)}function Zs(e,t){if(Bi(e.display,t)||za(e,t))return;if(st(e,t,"contextmenu"))return;R||e.display.input.onContextMenu(t)}function za(e,t){return Ie(e,"gutterContextMenu")?ou(e,t,"gutterContextMenu",!1):!1}function os(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Ki={toString:function(){return"CodeMirror.Init"}},su={},ss={};function eA(e){var t=e.optionHandlers;function d(A,I,G,ie){e.defaults[A]=I,G&&(t[A]=ie?function(ue,de,ve){ve!=Ki&&G(ue,de,ve)}:G)}e.defineOption=d,e.Init=Ki,d("value","",function(A,I){return A.setValue(I)},!0),d("mode",null,function(A,I){A.doc.modeOption=I,Os(A)},!0),d("indentUnit",2,Os,!0),d("indentWithTabs",!1),d("smartIndent",!0),d("tabSize",4,function(A){lo(A),Ei(A),ti(A)},!0),d("lineSeparator",null,function(A,I){if(A.doc.lineSep=I,!I)return;var G=[],ie=A.doc.first;A.doc.iter(function(de){for(var ve=0;;){var Xe=de.text.indexOf(I,ve);if(Xe==-1)break;ve=Xe+I.length,G.push(fe(ie,Xe))}ie++});for(var ue=G.length-1;ue>=0;ue--)Ha(A.doc,I,G[ue],fe(G[ue].line,G[ue].ch+I.length))}),d("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,I,G){A.state.specialChars=new RegExp(I.source+(I.test(" ")?"":"| "),"g"),G!=Ki&&A.refresh()}),d("specialCharPlaceholder",Ur,function(A){return A.refresh()},!0),d("electricChars",!0),d("inputStyle",s?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),d("spellcheck",!1,function(A,I){return A.getInputField().spellcheck=I},!0),d("autocorrect",!1,function(A,I){return A.getInputField().autocorrect=I},!0),d("autocapitalize",!1,function(A,I){return A.getInputField().autocapitalize=I},!0),d("rtlMoveVisually",!m),d("wholeLineUpdateBefore",!0),d("theme","default",function(A){os(A),so(A)},!0),d("keyMap","default",function(A,I,G){var ie=Nn(I),ue=G!=Ki&&Nn(G);ue&&ue.detach&&ue.detach(A,ie),ie.attach&&ie.attach(A,ue||null)}),d("extraKeys",null),d("configureMouse",null),d("lineWrapping",!1,lu,!0),d("gutters",[],function(A,I){A.display.gutterSpecs=Ss(I,A.options.lineNumbers),so(A)},!0),d("fixedGutter",!0,function(A,I){A.display.gutters.style.left=I?Da(A.display)+"px":"0",A.refresh()},!0),d("coverGutterNextToScrollbar",!1,function(A){return Qi(A)},!0),d("scrollbarStyle","native",function(A){Cl(A),Qi(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),d("lineNumbers",!1,function(A,I){A.display.gutterSpecs=Ss(A.options.gutters,I),so(A)},!0),d("firstLineNumber",1,so,!0),d("lineNumberFormatter",function(A){return A},so,!0),d("showCursorWhenSelecting",!1,$i,!0),d("resetSelectionOnContextMenu",!0),d("lineWiseCopyCut",!0),d("pasteLinesPerSelection",!0),d("selectionsMayTouch",!1),d("readOnly",!1,function(A,I){I=="nocursor"&&(Ma(A),A.display.input.blur()),A.display.input.readOnlyChanged(I)}),d("screenReaderLabel",null,function(A,I){I=I===""?null:I,A.display.input.screenReaderLabelChanged(I)}),d("disableInput",!1,function(A,I){I||A.display.input.reset()},!0),d("dragDrop",!0,tA),d("allowDropFileTypes",null),d("cursorBlinkRate",530),d("cursorScrollMargin",0),d("cursorHeight",1,$i,!0),d("singleCursorHeightPerLine",!0,$i,!0),d("workTime",100),d("workDelay",100),d("flattenSpans",!0,lo,!0),d("addModeClass",!1,lo,!0),d("pollInterval",100),d("undoDepth",200,function(A,I){return A.doc.history.undoDepth=I}),d("historyEventDelay",1250),d("viewportMargin",10,function(A){return A.refresh()},!0),d("maxHighlightLength",1e4,lo,!0),d("moveInputWithCursor",!0,function(A,I){I||A.display.input.resetPosition()}),d("tabindex",null,function(A,I){return A.display.input.getField().tabIndex=I||""}),d("autofocus",null),d("direction","ltr",function(A,I){return A.doc.setDirection(I)},!0),d("phrases",null)}function tA(e,t,d){var A=d&&d!=Ki;if(!t!=!A){var I=e.display.dragFunctions,G=t?Pe:pt;G(e.display.scroller,"dragstart",I.start),G(e.display.scroller,"dragenter",I.enter),G(e.display.scroller,"dragover",I.over),G(e.display.scroller,"dragleave",I.leave),G(e.display.scroller,"drop",I.drop)}}function lu(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(a(e.display.wrapper,"CodeMirror-wrap"),Un(e)),Uo(e),ti(e),Ei(e),setTimeout(function(){return Qi(e)},100)}function En(e,t){var d=this;if(!(this instanceof En))return new En(e,t);this.options=t=t?V(t):{},V(su,t,!1);var A=t.value;typeof A=="string"?A=new ni(A,t.mode,null,t.lineSeparator,t.direction):t.mode&&(A.modeOption=t.mode),this.doc=A;var I=new En.inputStyles[t.inputStyle](this),G=this.display=new Mu(e,A,I,t);G.wrapper.CodeMirror=this,os(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Cl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new X,keySeq:null,specialChars:null},t.autofocus&&!s&&G.input.focus(),_&&c<11&&setTimeout(function(){return d.display.input.reset(!0)},20),uu(this),Ks(),ga(this),this.curOp.forceUpdate=!0,kn(this,A),t.autofocus&&!s||this.hasFocus()?setTimeout(function(){d.hasFocus()&&!d.state.focused&&Es(d)},20):Ma(this);for(var ie in ss)ss.hasOwnProperty(ie)&&ss[ie](this,t[ie],Ki);Bl(this),t.finishInit&&t.finishInit(this);for(var ue=0;ue<ls.length;++ue)ls[ue](this);va(this),C&&t.lineWrapping&&getComputedStyle(G.lineDiv).textRendering=="optimizelegibility"&&(G.lineDiv.style.textRendering="auto")}En.defaults=su,En.optionHandlers=ss;function uu(e){var t=e.display;Pe(t.scroller,"mousedown",Pn(e,as)),_&&c<11?Pe(t.scroller,"dblclick",Pn(e,function(de){if(st(e,de))return;var ve=Ji(e,de);if(!ve||Js(e,de)||Bi(e.display,de))return;pe(de);var Xe=e.findWordAt(ve);ka(e.doc,Xe.anchor,Xe.head)})):Pe(t.scroller,"dblclick",function(de){return st(e,de)||pe(de)}),Pe(t.scroller,"contextmenu",function(de){return Zs(e,de)}),Pe(t.input.getField(),"contextmenu",function(de){t.scroller.contains(de.target)||Zs(e,de)});var d,A={end:0};function I(){t.activeTouch&&(d=setTimeout(function(){return t.activeTouch=null},1e3),A=t.activeTouch,A.end=+new Date)}function G(de){if(de.touches.length!=1)return!1;var ve=de.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ie(de,ve){if(ve.left==null)return!0;var Xe=ve.left-de.left,Ye=ve.top-de.top;return Xe*Xe+Ye*Ye>20*20}Pe(t.scroller,"touchstart",function(de){if(!st(e,de)&&!G(de)&&!Js(e,de)){t.input.ensurePolled(),clearTimeout(d);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-A.end<=300?A:null},de.touches.length==1&&(t.activeTouch.left=de.touches[0].pageX,t.activeTouch.top=de.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(de){var ve=t.activeTouch;if(ve&&!Bi(t,de)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Xe=e.coordsChar(t.activeTouch,"page"),Ye;!ve.prev||ie(ve,ve.prev)?Ye=new en(Xe,Xe):!ve.prev.prev||ie(ve,ve.prev.prev)?Ye=e.findWordAt(Xe):Ye=new en(fe(Xe.line,0),M(e.doc,fe(Xe.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),pe(de)}I()}),Pe(t.scroller,"touchcancel",I),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(no(e,t.scroller.scrollTop),pa(e,t.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(de){return _l(e,de)}),Pe(t.scroller,"DOMMouseScroll",function(de){return _l(e,de)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(de){st(e,de)||Ce(de)},over:function(de){st(e,de)||(Ku(e,de),Ce(de))},start:function(de){return js(e,de)},drop:Pn(e,Wl),leave:function(de){st(e,de)||Gl(e)}};var ue=t.input.getField();Pe(ue,"keyup",function(de){return $l.call(e,de)}),Pe(ue,"keydown",Pn(e,is)),Pe(ue,"keypress",Pn(e,ql)),Pe(ue,"focus",function(de){return Es(e,de)}),Pe(ue,"blur",function(de){return Ma(e,de)})}var ls=[];En.defineInitHook=function(e){return ls.push(e)};function Ca(e,t,d,A){var I=e.doc,G;d==null&&(d="add"),d=="smart"&&(I.mode.indent?G=Ft(e,t).state:d="prev");var ie=e.options.tabSize,ue=jt(I,t),de=te(ue.text,null,ie);ue.stateAfter&&(ue.stateAfter=null);var ve=ue.text.match(/^\s*/)[0],Xe;if(!A&&!/\S/.test(ue.text))Xe=0,d="not";else if(d=="smart"&&(Xe=I.mode.indent(G,ue.text.slice(ve.length),ue.text),Xe==Te||Xe>150)){if(!A)return;d="prev"}d=="prev"?t>I.first?Xe=te(jt(I,t-1).text,null,ie):Xe=0:d=="add"?Xe=de+e.options.indentUnit:d=="subtract"?Xe=de-e.options.indentUnit:typeof d=="number"&&(Xe=de+d),Xe=Math.max(0,Xe);var Ye="",mt=0;if(e.options.indentWithTabs)for(var ct=Math.floor(Xe/ie);ct;--ct)mt+=ie,Ye+=" ";if(mt<Xe&&(Ye+=Le(Xe-mt)),Ye!=ve)return Ha(I,Ye,fe(t,0),fe(t,ve.length),"+input"),ue.stateAfter=null,!0;for(var Rt=0;Rt<I.sel.ranges.length;Rt++){var Pt=I.sel.ranges[Rt];if(Pt.head.line==t&&Pt.head.ch<ve.length){var Qt=fe(t,ve.length);Ms(I,Rt,new en(Qt,Qt));break}}}var wi=null;function wo(e){wi=e}function $s(e,t,d,A,I){var G=e.doc;e.display.shift=!1,A||(A=G.sel);var ie=+new Date-200,ue=I=="paste"||e.state.pasteIncoming>ie,de=At(t),ve=null;if(ue&&A.ranges.length>1)if(wi&&wi.text.join(`
|
|
`)==t){if(A.ranges.length%wi.text.length==0){ve=[];for(var Xe=0;Xe<wi.text.length;Xe++)ve.push(G.splitLines(wi.text[Xe]))}}else de.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(ve=Et(de,function(Vt){return[Vt]}));for(var Ye=e.curOp.updateInput,mt=A.ranges.length-1;mt>=0;mt--){var ct=A.ranges[mt],Rt=ct.from(),Pt=ct.to();ct.empty()&&(d&&d>0?Rt=fe(Rt.line,Rt.ch-d):e.state.overwrite&&!ue?Pt=fe(Pt.line,Math.min(jt(G,Pt.line).text.length,Pt.ch+tt(de).length)):ue&&wi&&wi.lineWise&&wi.text.join(`
|
|
`)==de.join(`
|
|
`)&&(Rt=Pt=fe(Rt.line,0)));var Qt={from:Rt,to:Pt,text:ve?ve[mt%ve.length]:de,origin:I||(ue?"paste":e.state.cutIncoming>ie?"cut":"+input")};Na(e.doc,Qt),Zr(e,"inputRead",e,Qt)}t&&!ue&&Bo(e,t),Ua(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function xo(e,t){var d=e.clipboardData&&e.clipboardData.getData("Text");if(d)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&hi(t,function(){return $s(t,d,0,null,"paste")}),!0}function Bo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var d=e.doc.sel,A=d.ranges.length-1;A>=0;A--){var I=d.ranges[A];if(I.head.ch>100||A&&d.ranges[A-1].head.line==I.head.line)continue;var G=e.getModeAt(I.head),ie=!1;if(G.electricChars){for(var ue=0;ue<G.electricChars.length;ue++)if(t.indexOf(G.electricChars.charAt(ue))>-1){ie=Ca(e,I.head.line,"smart");break}}else G.electricInput&&(G.electricInput.test(jt(e.doc,I.head.line).text.slice(0,I.head.ch))&&(ie=Ca(e,I.head.line,"smart")));ie&&Zr(e,"electricInput",e,I.head.line)}}function qs(e){for(var t=[],d=[],A=0;A<e.doc.sel.ranges.length;A++){var I=e.doc.sel.ranges[A].head.line,G={anchor:fe(I,0),head:fe(I+1,0)};d.push(G),t.push(e.getRange(G.anchor,G.head))}return{text:t,ranges:d}}function el(e,t,d,A){e.setAttribute("autocorrect",d?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!t)}function Au(){var e=o("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=o("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return C?e.style.width="1000px":e.setAttribute("wrap","off"),B&&(e.style.border="1px solid black"),el(e),t}function cu(e){var t=e.optionHandlers,d=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,I){var G=this.options,ie=G[A];if(G[A]==I&&A!="mode")return;G[A]=I,t.hasOwnProperty(A)&&Pn(this,t[A])(this,I,ie),Ze(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,I){this.state.keyMaps[I?"push":"unshift"](Nn(A))},removeKeyMap:function(A){for(var I=this.state.keyMaps,G=0;G<I.length;++G)if(I[G]==A||I[G].name==A)return I.splice(G,1),!0},addOverlay:ri(function(A,I){var G=A.token?A:e.getMode(this.options,A);if(G.startState)throw new Error("Overlays may not be stateful.");Oe(this.state.overlays,{mode:G,modeSpec:A,opaque:I&&I.opaque,priority:I&&I.priority||0},function(ie){return ie.priority}),this.state.modeGen++,ti(this)}),removeOverlay:ri(function(A){for(var I=this.state.overlays,G=0;G<I.length;++G){var ie=I[G].modeSpec;if(ie==A||typeof A=="string"&&ie.name==A){I.splice(G,1),this.state.modeGen++,ti(this);return}}}),indentLine:ri(function(A,I,G){typeof I!="string"&&typeof I!="number"&&(I==null?I=this.options.smartIndent?"smart":"prev":I=I?"add":"subtract"),mn(this.doc,A)&&Ca(this,A,I,G)}),indentSelection:ri(function(A){for(var I=this.doc.sel.ranges,G=-1,ie=0;ie<I.length;ie++){var ue=I[ie];if(ue.empty())ue.head.line>G&&(Ca(this,ue.head.line,A,!0),G=ue.head.line,ie==this.doc.sel.primIndex&&Ua(this));else{var de=ue.from(),ve=ue.to(),Xe=Math.max(G,de.line);G=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ye=Xe;Ye<G;++Ye)Ca(this,Ye,A);var mt=this.doc.sel.ranges;de.ch==0&&I.length==mt.length&&mt[ie].from().ch>0&&Ms(this.doc,ie,new en(de,mt[ie].to()),Ee)}}}),getTokenAt:function(A,I){return $t(this,A,I)},getLineTokens:function(A,I){return $t(this,fe(A),I,!0)},getTokenTypeAt:function(A){A=M(this.doc,A);var I=Ct(this,jt(this.doc,A.line)),G=0,ie=(I.length-1)/2,ue=A.ch,de;if(ue==0)de=I[2];else for(;;){var ve=G+ie>>1;if((ve?I[ve*2-1]:0)>=ue)ie=ve;else if(I[ve*2+1]<ue)G=ve+1;else{de=I[ve*2+2];break}}var Xe=de?de.indexOf("overlay "):-1;return Xe<0?de:Xe==0?null:de.slice(0,Xe-1)},getModeAt:function(A){var I=this.doc.mode;return I.innerMode?e.innerMode(I,this.getTokenAt(A).state).mode:I},getHelper:function(A,I){return this.getHelpers(A,I)[0]},getHelpers:function(A,I){var G=[];if(!d.hasOwnProperty(I))return G;var ie=d[I],ue=this.getModeAt(A);if(typeof ue[I]=="string")ie[ue[I]]&&G.push(ie[ue[I]]);else if(ue[I])for(var de=0;de<ue[I].length;de++){var ve=ie[ue[I][de]];ve&&G.push(ve)}else ue.helperType&&ie[ue.helperType]?G.push(ie[ue.helperType]):ie[ue.name]&&G.push(ie[ue.name]);for(var Xe=0;Xe<ie._global.length;Xe++){var Ye=ie._global[Xe];Ye.pred(ue,this)&&se(G,Ye.val)==-1&&G.push(Ye.val)}return G},getStateAfter:function(A,I){var G=this.doc;return A=Z(G,A==null?G.first+G.size-1:A),Ft(this,A+1,I).state},cursorCoords:function(A,I){var G,ie=this.doc.sel.primary();return A==null?G=ie.head:typeof A=="object"?G=M(this.doc,A):G=A?ie.from():ie.to(),Ci(this,G,I||"page")},charCoords:function(A,I){return to(this,M(this.doc,A),I||"page")},coordsChar:function(A,I){return A=ys(this,A,I||"page"),Li(this,A.left,A.top)},lineAtHeight:function(A,I){return A=ys(this,{top:A,left:0},I||"page").top,Sr(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,I,G){var ie=!1,ue;if(typeof A=="number"){var de=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>de&&(A=de,ie=!0),ue=jt(this.doc,A)}else ue=A;return eo(this,ue,{top:0,left:0},I||"page",G||ie).top+(ie?this.doc.height-Mn(ue):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Ia(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,I,G,ie,ue){var de=this.display;A=Ci(this,M(this.doc,A));var ve=A.bottom,Xe=A.left;if(I.style.position="absolute",I.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(I),de.sizer.appendChild(I),ie=="over")ve=A.top;else if(ie=="above"||ie=="near"){var Ye=Math.max(de.wrapper.clientHeight,this.doc.height),mt=Math.max(de.sizer.clientWidth,de.lineSpace.clientWidth);(ie=="above"||A.bottom+I.offsetHeight>Ye)&&A.top>I.offsetHeight?ve=A.top-I.offsetHeight:A.bottom+I.offsetHeight<=Ye&&(ve=A.bottom),Xe+I.offsetWidth>mt&&(Xe=mt-I.offsetWidth)}I.style.top=ve+"px",I.style.left=I.style.right="",ue=="right"?(Xe=de.sizer.clientWidth-I.offsetWidth,I.style.right="0px"):(ue=="left"?Xe=0:ue=="middle"&&(Xe=(de.sizer.clientWidth-I.offsetWidth)/2),I.style.left=Xe+"px"),G&&Cu(this,{left:Xe,top:ve,right:Xe+I.offsetWidth,bottom:ve+I.offsetHeight})},triggerOnKeyDown:ri(is),triggerOnKeyPress:ri(ql),triggerOnKeyUp:$l,triggerOnMouseDown:ri(as),execCommand:function(A){if(yo.hasOwnProperty(A))return yo[A].call(null,this)},triggerElectric:ri(function(A){Bo(this,A)}),findPosH:function(A,I,G,ie){var ue=1;I<0&&(ue=-1,I=-I);for(var de=M(this.doc,A),ve=0;ve<I&&!(de=us(this.doc,de,ue,G,ie),de.hitSide);++ve);return de},moveH:ri(function(A,I){var G=this;this.extendSelectionsBy(function(ie){return G.display.shift||G.doc.extend||ie.empty()?us(G.doc,ie.head,A,I,G.options.rtlMoveVisually):A<0?ie.from():ie.to()},De)}),deleteH:ri(function(A,I){var G=this.doc.sel,ie=this.doc;G.somethingSelected()?ie.replaceSelection("",null,"+delete"):Mi(this,function(ue){var de=us(ie,ue.head,A,I,!1);return A<0?{from:de,to:ue.head}:{from:ue.head,to:de}})}),findPosV:function(A,I,G,ie){var ue=1,de=ie;I<0&&(ue=-1,I=-I);for(var ve=M(this.doc,A),Xe=0;Xe<I;++Xe){var Ye=Ci(this,ve,"div");if(de==null?de=Ye.left:Ye.left=de,ve=du(this,Ye,ue,G),ve.hitSide)break}return ve},moveV:ri(function(A,I){var G=this,ie=this.doc,ue=[],de=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Xe){if(de)return A<0?Xe.from():Xe.to();var Ye=Ci(G,Xe.head,"div");Xe.goalColumn!=null&&(Ye.left=Xe.goalColumn),ue.push(Ye.left);var mt=du(G,Ye,A,I);return I=="page"&&Xe==ie.sel.primary()&&ws(G,to(G,mt,"div").top-Ye.top),mt},De),ue.length)for(var ve=0;ve<ie.sel.ranges.length;ve++)ie.sel.ranges[ve].goalColumn=ue[ve]}),findWordAt:function(A){var I=this.doc,G=jt(I,A.line).text,ie=A.ch,ue=A.ch;if(G){var de=this.getHelper(A,"wordChars");(A.sticky=="before"||ue==G.length)&&ie?--ie:++ue;for(var ve=G.charAt(ie),Xe=ae(ve,de)?function(Ye){return ae(Ye,de)}:/\s/.test(ve)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!ae(Ye)};ie>0&&Xe(G.charAt(ie-1));)--ie;for(;ue<G.length&&Xe(G.charAt(ue));)++ue}return new en(fe(A.line,ie),fe(A.line,ue))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):a(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==U()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ri(function(A,I){qi(this,A,I)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ii(this)-this.display.barHeight,width:A.scrollWidth-Ii(this)-this.display.barWidth,clientHeight:In(this),clientWidth:di(this)}},scrollIntoView:ri(function(A,I){A==null?(A={from:this.doc.sel.primary().head,to:null},I==null&&(I=this.options.cursorScrollMargin)):typeof A=="number"?A={from:fe(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=I||0,A.from.line!=null?wu(this,A):yl(this,A.from,A.to,A.margin)}),setSize:ri(function(A,I){var G=this,ie=function(de){return typeof de=="number"||/^\d+$/.test(String(de))?de+"px":de};A!=null&&(this.display.wrapper.style.width=ie(A)),I!=null&&(this.display.wrapper.style.height=ie(I)),this.options.lineWrapping&&pi(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(de){if(de.widgets){for(var ve=0;ve<de.widgets.length;ve++)if(de.widgets[ve].noHScroll){Ni(G,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(A){return hi(this,A)},startOperation:function(){return ga(this)},endOperation:function(){return va(this)},refresh:ri(function(){var A=this.display.cachedTextHeight;ti(this),this.curOp.forceUpdate=!0,Ei(this),qi(this,this.doc.scrollLeft,this.doc.scrollTop),Bs(this.display),(A==null||Math.abs(A-ha(this.display))>.5||this.options.lineWrapping)&&Uo(this),Ze(this,"refresh",this)}),swapDoc:ri(function(A){var I=this.doc;return I.cm=null,this.state.selectingText&&this.state.selectingText(),kn(this,A),Ei(this),this.display.input.reset(),qi(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Zr(this,"swapDoc",this,I),I}),phrase:function(A){var I=this.options.phrases;return I&&Object.prototype.hasOwnProperty.call(I,A)?I[A]:A},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(A,I,G){d.hasOwnProperty(A)||(d[A]=e[A]={_global:[]}),d[A][I]=G},e.registerGlobalHelper=function(A,I,G,ie){e.registerHelper(A,I,ie),d[A]._global.push({pred:G,val:ie})}}function us(e,t,d,A,I){var G=t,ie=d,ue=jt(e,t.line),de=I&&e.direction=="rtl"?-d:d;function ve(){var Jt=t.line+de;return Jt<e.first||Jt>=e.first+e.size?!1:(t=new fe(Jt,t.ch,t.sticky),ue=jt(e,Jt))}function Xe(Jt){var Xt;if(A=="codepoint"){var ir=ue.text.charCodeAt(t.ch+(A>0?0:-1));isNaN(ir)?Xt=null:Xt=new fe(t.line,Math.max(0,Math.min(ue.text.length,t.ch+d*(ir>=55296&&ir<56320?2:1))),-d)}else I?Xt=Vs(e.cm,ue,t,d):Xt=Gs(ue,t,d);if(Xt==null)if(!Jt&&ve())t=ts(I,e.cm,ue,t.line,de);else return!1;else t=Xt;return!0}if(A=="char"||A=="codepoint")Xe();else if(A=="column")Xe(!0);else if(A=="word"||A=="group")for(var Ye=null,mt=A=="group",ct=e.cm&&e.cm.getHelper(t,"wordChars"),Rt=!0;!(d<0&&!Xe(!Rt));Rt=!1){var Pt=ue.text.charAt(t.ch)||`
|
|
`,Qt=ae(Pt,ct)?"w":mt&&Pt==`
|
|
`?"n":!mt||/\s/.test(Pt)?null:"p";if(mt&&!Rt&&!Qt&&(Qt="s"),Ye&&Ye!=Qt){d<0&&(d=1,Xe(),t.sticky="after");break}if(Qt&&(Ye=Qt),d>0&&!Xe(!Rt))break}var Vt=Yo(e,t,G,ie,!0);return Ue(G,Vt)&&(Vt.hitSide=!0),Vt}function du(e,t,d,A){var I=e.doc,G=t.left,ie;if(A=="page"){var ue=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),de=Math.max(ue-.5*ha(e.display),3);ie=(d>0?t.bottom:t.top)+d*de}else A=="line"&&(ie=d>0?t.bottom+3:t.top-3);for(var ve;!(ve=Li(e,G,ie),!ve.outside);){if(d<0?ie<=0:ie>=I.height){ve.hitSide=!0;break}ie+=d*5}return ve}var ln=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ln.prototype.init=function(e){var t=this,d=this,A=d.cm,I=d.div=e.lineDiv;el(I,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function G(ue){for(var de=ue.target;de;de=de.parentNode){if(de==I)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(de.className))break}return!1}Pe(I,"paste",function(ue){if(!G(ue)||st(A,ue)||xo(ue,A))return;c<=11&&setTimeout(Pn(A,function(){return t.updateFromDOM()}),20)}),Pe(I,"compositionstart",function(ue){t.composing={data:ue.data,done:!1}}),Pe(I,"compositionupdate",function(ue){t.composing||(t.composing={data:ue.data,done:!1})}),Pe(I,"compositionend",function(ue){t.composing&&(ue.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(I,"touchstart",function(){return d.forceCompositionEnd()}),Pe(I,"input",function(){t.composing||t.readFromDOMSoon()});function ie(ue){if(!G(ue)||st(A,ue))return;if(A.somethingSelected())wo({lineWise:!1,text:A.getSelections()}),ue.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var de=qs(A);wo({lineWise:!0,text:de.text}),ue.type=="cut"&&A.operation(function(){A.setSelections(de.ranges,0,Ee),A.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var ve=wi.text.join(`
|
|
`);if(ue.clipboardData.setData("Text",ve),ue.clipboardData.getData("Text")==ve){ue.preventDefault();return}}var Xe=Au(),Ye=Xe.firstChild;A.display.lineSpace.insertBefore(Xe,A.display.lineSpace.firstChild),Ye.value=wi.text.join(`
|
|
`);var mt=document.activeElement;q(Ye),setTimeout(function(){A.display.lineSpace.removeChild(Xe),mt.focus(),mt==I&&d.showPrimarySelection()},50)}Pe(I,"copy",ie),Pe(I,"cut",ie)},ln.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ln.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},ln.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},ln.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ln.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,d=t.doc.sel.primary(),A=d.from(),I=d.to();if(t.display.viewTo==t.display.viewFrom||A.line>=t.display.viewTo||I.line<t.display.viewFrom){e.removeAllRanges();return}var G=zi(t,e.anchorNode,e.anchorOffset),ie=zi(t,e.focusNode,e.focusOffset);if(G&&!G.bad&&ie&&!ie.bad&&ye(Dt(G,ie),A)==0&&ye(Je(G,ie),I)==0)return;var ue=t.display.view,de=A.line>=t.display.viewFrom&&wa(t,A)||{node:ue[0].measure.map[2],offset:0},ve=I.line<t.display.viewTo&&wa(t,I);if(!ve){var Xe=ue[ue.length-1].measure,Ye=Xe.maps?Xe.maps[Xe.maps.length-1]:Xe.map;ve={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!de||!ve){e.removeAllRanges();return}var mt=e.rangeCount&&e.getRangeAt(0),ct;try{ct=b(de.node,de.offset,ve.offset,ve.node)}catch(Rt){}ct&&(!L&&t.state.focused?(e.collapse(de.node,de.offset),ct.collapsed||(e.removeAllRanges(),e.addRange(ct))):(e.removeAllRanges(),e.addRange(ct)),mt&&e.anchorNode==null?e.addRange(mt):L&&this.startGracePeriod()),this.rememberSelection()},ln.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)},ln.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},ln.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ln.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return g(this.div,t)},ln.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ln.prototype.blur=function(){this.div.blur()},ln.prototype.getField=function(){return this.div},ln.prototype.supportsTouch=function(){return!0},ln.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},ln.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ln.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(u&&i&&this.cm.display.gutterSpecs.length&&hu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var d=zi(t,e.anchorNode,e.anchorOffset),A=zi(t,e.focusNode,e.focusOffset);d&&A&&hi(t,function(){Zn(t.doc,ea(d,A),Ee),(d.bad||A.bad)&&(t.curOp.selectionChanged=!0)})},ln.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,d=e.doc.sel.primary(),A=d.from(),I=d.to();if(A.ch==0&&A.line>e.firstLine()&&(A=fe(A.line-1,jt(e.doc,A.line-1).length)),I.ch==jt(e.doc,I.line).text.length&&I.line<e.lastLine()&&(I=fe(I.line+1,0)),A.line<t.viewFrom||I.line>t.viewTo-1)return!1;var G,ie,ue;A.line==t.viewFrom||(G=Zi(e,A.line))==0?(ie=pr(t.view[0].line),ue=t.view[0].node):(ie=pr(t.view[G].line),ue=t.view[G-1].node.nextSibling);var de=Zi(e,I.line),ve,Xe;if(de==t.view.length-1?(ve=t.viewTo-1,Xe=t.lineDiv.lastChild):(ve=pr(t.view[de+1].line)-1,Xe=t.view[de+1].node.previousSibling),!ue)return!1;for(var Ye=e.doc.splitLines(xa(e,ue,Xe,ie,ve)),mt=Dr(e.doc,fe(ie,0),fe(ve,jt(e.doc,ve).text.length));Ye.length>1&&mt.length>1;)if(tt(Ye)==tt(mt))Ye.pop(),mt.pop(),ve--;else if(Ye[0]==mt[0])Ye.shift(),mt.shift(),ie++;else break;for(var ct=0,Rt=0,Pt=Ye[0],Qt=mt[0],Vt=Math.min(Pt.length,Qt.length);ct<Vt&&Pt.charCodeAt(ct)==Qt.charCodeAt(ct);)++ct;for(var Jt=tt(Ye),Xt=tt(mt),ir=Math.min(Jt.length-(Ye.length==1?ct:0),Xt.length-(mt.length==1?ct:0));Rt<ir&&Jt.charCodeAt(Jt.length-Rt-1)==Xt.charCodeAt(Xt.length-Rt-1);)++Rt;if(Ye.length==1&&mt.length==1&&ie==A.line)for(;ct&&ct>A.ch&&Jt.charCodeAt(Jt.length-Rt-1)==Xt.charCodeAt(Xt.length-Rt-1);)ct--,Rt++;Ye[Ye.length-1]=Jt.slice(0,Jt.length-Rt).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(ct).replace(/\u200b+$/,"");var Er=fe(ie,ct),fr=fe(ve,mt.length?tt(mt).length-Rt:0);if(Ye.length>1||Ye[0]||ye(Er,fr))return Ha(e.doc,Ye,Er,fr,"+input"),!0},ln.prototype.ensurePolled=function(){this.forceCompositionEnd()},ln.prototype.reset=function(){this.forceCompositionEnd()},ln.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ln.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)},ln.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return ti(e.cm)})},ln.prototype.setUneditable=function(e){e.contentEditable="false"},ln.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,$s)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},ln.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},ln.prototype.onContextMenu=function(){},ln.prototype.resetPosition=function(){},ln.prototype.needsContentAttribute=!0;function wa(e,t){var d=ca(e,t.line);if(!d||d.hidden)return null;var A=jt(e.doc,t.line),I=Gn(d,A,t.line),G=Mt(A,e.doc.direction),ie="left";if(G){var ue=yt(G,t.ch);ie=ue%2?"right":"left"}var de=gs(I.map,t.ch,ie);return de.offset=de.collapse=="right"?de.end:de.start,de}function hu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function xn(e,t){return t&&(e.bad=!0),e}function xa(e,t,d,A,I){var G="",ie=!1,ue=e.doc.lineSeparator(),de=!1;function ve(ct){return function(Rt){return Rt.id==ct}}function Xe(){ie&&(G+=ue,de&&(G+=ue),ie=de=!1)}function Ye(ct){ct&&(Xe(),G+=ct)}function mt(ct){if(ct.nodeType==1){var Rt=ct.getAttribute("cm-text");if(Rt){Ye(Rt);return}var Pt=ct.getAttribute("cm-marker"),Qt;if(Pt){var Vt=e.findMarks(fe(A,0),fe(I+1,0),ve(+Pt));Vt.length&&(Qt=Vt[0].find(0))&&Ye(Dr(e.doc,Qt.from,Qt.to).join(ue));return}if(ct.getAttribute("contenteditable")=="false")return;var Jt=/^(pre|div|p|li|table|br)$/i.test(ct.nodeName);if(!/^br$/i.test(ct.nodeName)&&ct.textContent.length==0)return;Jt&&Xe();for(var Xt=0;Xt<ct.childNodes.length;Xt++)mt(ct.childNodes[Xt]);/^(pre|p)$/i.test(ct.nodeName)&&(de=!0),Jt&&(ie=!0)}else ct.nodeType==3&&Ye(ct.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(mt(t),t==d);)t=t.nextSibling,de=!1;return G}function zi(e,t,d){var A;if(t==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[d],!A)return xn(e.clipPos(fe(e.display.viewTo-1)),!0);t=null,d=0}else for(A=t;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var I=0;I<e.display.view.length;I++){var G=e.display.view[I];if(G.node==A)return sa(G,t,d)}}function sa(e,t,d){var A=e.text.firstChild,I=!1;if(!t||!g(A,t))return xn(fe(pr(e.line),0),!0);if(t==A&&(I=!0,t=A.childNodes[d],d=0,!t)){var G=e.rest?tt(e.rest):e.line;return xn(fe(pr(G),G.text.length),I)}var ie=t.nodeType==3?t:null,ue=t;for(!ie&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ie=t.firstChild,d&&(d=ie.nodeValue.length));ue.parentNode!=A;)ue=ue.parentNode;var de=e.measure,ve=de.maps;function Xe(Qt,Vt,Jt){for(var Xt=-1;Xt<(ve?ve.length:0);Xt++)for(var ir=Xt<0?de.map:ve[Xt],Er=0;Er<ir.length;Er+=3){var fr=ir[Er+2];if(fr==Qt||fr==Vt){var Fr=pr(Xt<0?e.line:e.rest[Xt]),yn=ir[Er]+Jt;return(Jt<0||fr!=Qt)&&(yn=ir[Er+(Jt?1:0)]),fe(Fr,yn)}}}var Ye=Xe(ie,ue,d);if(Ye)return xn(Ye,I);for(var mt=ue.nextSibling,ct=ie?ie.nodeValue.length-d:0;mt;mt=mt.nextSibling){if(Ye=Xe(mt,mt.firstChild,0),Ye)return xn(fe(Ye.line,Ye.ch-ct),I);ct+=mt.textContent.length}for(var Rt=ue.previousSibling,Pt=d;Rt;Rt=Rt.previousSibling){if(Ye=Xe(Rt,Rt.firstChild,-1),Ye)return xn(fe(Ye.line,Ye.ch+Pt),I);Pt+=Rt.textContent.length}}var hn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};hn.prototype.init=function(e){var t=this,d=this,A=this.cm;this.createField(e);var I=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),B&&(I.style.width="0px"),Pe(I,"input",function(){_&&c>=9&&t.hasSelection&&(t.hasSelection=null),d.poll()}),Pe(I,"paste",function(ie){if(st(A,ie)||xo(ie,A))return;A.state.pasteIncoming=+new Date,d.fastPoll()});function G(ie){if(st(A,ie))return;if(A.somethingSelected())wo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var ue=qs(A);wo({lineWise:!0,text:ue.text}),ie.type=="cut"?A.setSelections(ue.ranges,null,Ee):(d.prevInput="",I.value=ue.text.join(`
|
|
`),q(I))}else return;ie.type=="cut"&&(A.state.cutIncoming=+new Date)}Pe(I,"cut",G),Pe(I,"copy",G),Pe(e.scroller,"paste",function(ie){if(Bi(e,ie)||st(A,ie))return;if(!I.dispatchEvent){A.state.pasteIncoming=+new Date,d.focus();return}var ue=new Event("paste");ue.clipboardData=ie.clipboardData,I.dispatchEvent(ue)}),Pe(e.lineSpace,"selectstart",function(ie){Bi(e,ie)||pe(ie)}),Pe(I,"compositionstart",function(){var ie=A.getCursor("from");d.composing&&d.composing.range.clear(),d.composing={start:ie,range:A.markText(ie,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(I,"compositionend",function(){d.composing&&(d.poll(),d.composing.range.clear(),d.composing=null)})},hn.prototype.createField=function(e){this.wrapper=Au(),this.textarea=this.wrapper.firstChild},hn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,d=e.doc,A=pl(e);if(e.options.moveInputWithCursor){var I=Ci(e,d.sel.primary().head,"div"),G=t.wrapper.getBoundingClientRect(),ie=t.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,I.top+ie.top-G.top)),A.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,I.left+ie.left-G.left))}return A},hn.prototype.showSelection=function(e){var t=this.cm,d=t.display;n(d.cursorDiv,e.cursors),n(d.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},hn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var d=t.getSelection();this.textarea.value=d,t.state.focused&&q(this.textarea),_&&c>=9&&(this.hasSelection=d)}else e||(this.prevInput=this.textarea.value="",_&&c>=9&&(this.hasSelection=null))},hn.prototype.getField=function(){return this.textarea},hn.prototype.supportsTouch=function(){return!1},hn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!s||U()!=this.textarea))try{this.textarea.focus()}catch(e){}},hn.prototype.blur=function(){this.textarea.blur()},hn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hn.prototype.receivedFocus=function(){this.slowPoll()},hn.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()})},hn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function d(){var A=t.poll();!A&&!e?(e=!0,t.polling.set(60,d)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,d)},hn.prototype.poll=function(){var e=this,t=this.cm,d=this.textarea,A=this.prevInput;if(this.contextMenuPending||!t.state.focused||nt(d)&&!A&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var I=d.value;if(I==A&&!t.somethingSelected())return!1;if(_&&c>=9&&this.hasSelection===I||l&&/[\uf700-\uf7ff]/.test(I))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var G=I.charCodeAt(0);if(G==8203&&!A&&(A="\u200B"),G==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,ue=Math.min(A.length,I.length);ie<ue&&A.charCodeAt(ie)==I.charCodeAt(ie);)++ie;return hi(t,function(){$s(t,I.slice(ie),A.length-ie,null,e.composing?"*compose":null),I.length>1e3||I.indexOf(`
|
|
`)>-1?d.value=e.prevInput="":e.prevInput=I,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hn.prototype.onKeyPress=function(){_&&c>=9&&(this.hasSelection=null),this.fastPoll()},hn.prototype.onContextMenu=function(e){var t=this,d=t.cm,A=d.display,I=t.textarea;t.contextMenuPending&&t.contextMenuPending();var G=Ji(d,e),ie=A.scroller.scrollTop;if(!G||h)return;var ue=d.options.resetSelectionOnContextMenu;ue&&d.doc.sel.contains(G)==-1&&Pn(d,Zn)(d.doc,ea(G),Ee);var de=I.style.cssText,ve=t.wrapper.style.cssText,Xe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",I.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-Xe.top-5)+"px; left: "+(e.clientX-Xe.left-5)+`px;
|
|
z-index: 1000; background: `+(_?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;C&&(Ye=window.scrollY),A.input.focus(),C&&window.scrollTo(null,Ye),A.input.reset(),d.somethingSelected()||(I.value=t.prevInput=" "),t.contextMenuPending=ct,A.selForContextMenu=d.doc.sel,clearTimeout(A.detectingSelectAll);function mt(){if(I.selectionStart!=null){var Pt=d.somethingSelected(),Qt="\u200B"+(Pt?I.value:"");I.value="\u21DA",I.value=Qt,t.prevInput=Pt?"":"\u200B",I.selectionStart=1,I.selectionEnd=Qt.length,A.selForContextMenu=d.doc.sel}}function ct(){if(t.contextMenuPending!=ct)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,I.style.cssText=de,_&&c<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=ie),I.selectionStart!=null){(!_||_&&c<9)&&mt();var Pt=0,Qt=function(){A.selForContextMenu==d.doc.sel&&I.selectionStart==0&&I.selectionEnd>0&&t.prevInput=="\u200B"?Pn(d,Nl)(d):Pt++<10?A.detectingSelectAll=setTimeout(Qt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Qt,200)}}if(_&&c>=9&&mt(),R){Ce(e);var Rt=function(){pt(window,"mouseup",Rt),setTimeout(ct,20)};Pe(window,"mouseup",Rt)}else setTimeout(ct,50)},hn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},hn.prototype.setUneditable=function(){},hn.prototype.needsContentAttribute=!1;function To(e,t){if(t=t?V(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var d=U();t.autofocus=d==e||e.getAttribute("autofocus")!=null&&d==document.body}function A(){e.value=ue.getValue()}var I;if(e.form&&(Pe(e.form,"submit",A),!t.leaveSubmitMethodAlone)){var G=e.form;I=G.submit;try{var ie=G.submit=function(){A(),G.submit=I,G.submit(),G.submit=ie}}catch(de){}}t.finishInit=function(de){de.save=A,de.getTextArea=function(){return e},de.toTextArea=function(){de.toTextArea=isNaN,A(),e.parentNode.removeChild(de.getWrapperElement()),e.style.display="",e.form&&(pt(e.form,"submit",A),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=I))}},e.style.display="none";var ue=En(function(de){return e.parentNode.insertBefore(de,e.nextSibling)},t);return ue}function Wi(e){e.off=pt,e.on=Pe,e.wheelEventPixels=Ll,e.Doc=ni,e.splitLines=At,e.countColumn=te,e.findColumn=Ve,e.isWordChar=re,e.Pass=Te,e.signal=Ze,e.Line=gn,e.changeEnd=ta,e.scrollbarModel=El,e.Pos=fe,e.cmpPos=ye,e.modes=dt,e.mimeModes=at,e.resolveMode=qe,e.getMode=Bt,e.modeExtensions=Ht,e.extendMode=Nt,e.copyState=Gt,e.startState=Pr,e.innerMode=Or,e.commands=yo,e.keyMap=ji,e.keyName=zs,e.isModifierKey=Xl,e.lookupKey=Ea,e.normalizeKeyMap=Vu,e.StringStream=yr,e.SharedTextMarker=ja,e.TextMarker=Ri,e.LineWidget=po,e.e_preventDefault=pe,e.e_stopPropagation=be,e.e_stop=Ce,e.addClass=K,e.contains=g,e.rmClass=a,e.keyNames=aa}eA(En),cu(En);var fu="iter insert remove copy getEditor constructor".split(" ");for(var So in ni.prototype)ni.prototype.hasOwnProperty(So)&&se(fu,So)<0&&(En.prototype[So]=function(e){return function(){return e.apply(this.doc,arguments)}}(ni.prototype[So]));return Me(ni),En.inputStyles={textarea:hn,contenteditable:ln},En.defineMode=function(e){!En.defaults.mode&&e!="null"&&(En.defaults.mode=e),xt.apply(this,arguments)},En.defineMIME=wt,En.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),En.defineMIME("text/plain","null"),En.defineExtension=function(e,t){En.prototype[e]=t},En.defineDocExtension=function(e,t){ni.prototype[e]=t},En.fromTextArea=To,Wi(En),En.version="5.58.2",En})},WaYH:function($e,me,z){"use strict";var J=z("rePB"),N=z("Ff2n"),L=z("VTBJ"),Q=z("1OyB"),D=z("vuIU"),w=z("JX7q"),_=z("Ji7U"),c=z("LK+K"),C=z("q1tI"),x=z("TSYQ"),i=z.n(x),h=z("sboe"),O=z("OZM5"),T=function(R){var p=R.prefixCls,a=R.level,r=R.isStart,n=R.isEnd;if(!a)return null;for(var o="".concat(p,"-indent-unit"),S=[],b=0;b<a;b+=1){var g;S.push(C.createElement("span",{key:b,className:i()(o,(g={},Object(J.a)(g,"".concat(o,"-start"),r[b+1]),Object(J.a)(g,"".concat(o,"-end"),n[b+1]),Object(J.a)(g,"".concat(o,"-end-first-level"),!b&&n[0]),g))}))}return C.createElement("span",{"aria-hidden":"true",className:"".concat(p,"-indent")},S)},y=T,B=z("815F"),u="open",s="close",l="---",f=function(v){Object(_.a)(p,v);var R=Object(c.a)(p);function p(){var a;return Object(Q.a)(this,p),a=R.apply(this,arguments),a.state={dragNodeHighlight:!1},a.onSelectorClick=function(r){var n=a.props.context.onNodeClick;n(r,Object(B.b)(a.props)),a.isSelectable()?a.onSelect(r):a.onCheck(r)},a.onSelectorDoubleClick=function(r){var n=a.props.context.onNodeDoubleClick;n(r,Object(B.b)(a.props))},a.onSelect=function(r){if(a.isDisabled())return;var n=a.props.context.onNodeSelect;r.preventDefault(),n(r,Object(B.b)(a.props))},a.onCheck=function(r){if(a.isDisabled())return;var n=a.props,o=n.disableCheckbox,S=n.checked,b=a.props.context.onNodeCheck;if(!a.isCheckable()||o)return;r.preventDefault();var g=!S;b(r,Object(B.b)(a.props),g)},a.onMouseEnter=function(r){var n=a.props.context.onNodeMouseEnter;n(r,Object(B.b)(a.props))},a.onMouseLeave=function(r){var n=a.props.context.onNodeMouseLeave;n(r,Object(B.b)(a.props))},a.onContextMenu=function(r){var n=a.props.context.onNodeContextMenu;n(r,Object(B.b)(a.props))},a.onDragStart=function(r){var n=a.props.context.onNodeDragStart;r.stopPropagation(),a.setState({dragNodeHighlight:!0}),n(r,Object(w.a)(a));try{r.dataTransfer.setData("text/plain","")}catch(o){}},a.onDragEnter=function(r){var n=a.props.context.onNodeDragEnter;r.preventDefault(),r.stopPropagation(),n(r,Object(w.a)(a))},a.onDragOver=function(r){var n=a.props.context.onNodeDragOver;r.preventDefault(),r.stopPropagation(),n(r,Object(w.a)(a))},a.onDragLeave=function(r){var n=a.props.context.onNodeDragLeave;r.stopPropagation(),n(r,Object(w.a)(a))},a.onDragEnd=function(r){var n=a.props.context.onNodeDragEnd;r.stopPropagation(),a.setState({dragNodeHighlight:!1}),n(r,Object(w.a)(a))},a.onDrop=function(r){var n=a.props.context.onNodeDrop;r.preventDefault(),r.stopPropagation(),a.setState({dragNodeHighlight:!1}),n(r,Object(w.a)(a))},a.onExpand=function(r){var n=a.props.context.onNodeExpand;n(r,Object(B.b)(a.props))},a.setSelectHandle=function(r){a.selectHandle=r},a.getNodeState=function(){var r=a.props.expanded;return a.isLeaf()?null:r?u:s},a.hasChildren=function(){var r=a.props.eventKey,n=a.props.context.keyEntities,o=n[r]||{},S=o.children;return!!(S||[]).length},a.isLeaf=function(){var r=a.props,n=r.isLeaf,o=r.loaded,S=a.props.context.loadData,b=a.hasChildren();return n===!1?!1:n||!S&&!b||S&&o&&!b},a.isDisabled=function(){var r=a.props.disabled,n=a.props.context.disabled;return!!(n||r)},a.isCheckable=function(){var r=a.props.checkable,n=a.props.context.checkable;return!n||r===!1?!1:n},a.syncLoadData=function(r){var n=r.expanded,o=r.loading,S=r.loaded,b=a.props.context,g=b.loadData,U=b.onNodeLoad;if(o)return;g&&n&&!a.isLeaf()&&(!a.hasChildren()&&!S&&U(Object(B.b)(a.props)))},a.renderSwitcher=function(){var r=a.props,n=r.expanded,o=r.switcherIcon,S=a.props.context,b=S.prefixCls,g=S.switcherIcon,U=o||g;if(a.isLeaf())return C.createElement("span",{className:i()("".concat(b,"-switcher"),"".concat(b,"-switcher-noop"))},typeof U=="function"?U(Object(L.a)(Object(L.a)({},a.props),{},{isLeaf:!0})):U);var K=i()("".concat(b,"-switcher"),"".concat(b,"-switcher_").concat(n?u:s));return C.createElement("span",{onClick:a.onExpand,className:K},typeof U=="function"?U(Object(L.a)(Object(L.a)({},a.props),{},{isLeaf:!1})):U)},a.renderCheckbox=function(){var r=a.props,n=r.checked,o=r.halfChecked,S=r.disableCheckbox,b=a.props.context.prefixCls,g=a.isDisabled(),U=a.isCheckable();if(!U)return null;var K=typeof U!="boolean"?U:null;return C.createElement("span",{className:i()("".concat(b,"-checkbox"),n&&"".concat(b,"-checkbox-checked"),!n&&o&&"".concat(b,"-checkbox-indeterminate"),(g||S)&&"".concat(b,"-checkbox-disabled")),onClick:a.onCheck},K)},a.renderIcon=function(){var r=a.props.loading,n=a.props.context.prefixCls;return C.createElement("span",{className:i()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(a.getNodeState()||"docu"),r&&"".concat(n,"-icon_loading"))})},a.renderSelector=function(){var r=a.state.dragNodeHighlight,n=a.props,o=n.title,S=n.selected,b=n.icon,g=n.loading,U=n.data,K=a.props.context,W=K.prefixCls,q=K.showIcon,Y=K.icon,V=K.draggable,te=K.loadData,X=K.titleRender,se=a.isDisabled(),le="".concat(W,"-node-content-wrapper"),Te;if(q){var Ee=b||Y;Te=Ee?C.createElement("span",{className:i()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof Ee=="function"?Ee(a.props):Ee):a.renderIcon()}else te&&g&&(Te=a.renderIcon());var Be;typeof o=="function"?Be=o(U):X?Be=X(U):Be=o;var De=C.createElement("span",{className:"".concat(W,"-title")},Be);return C.createElement("span",{ref:a.setSelectHandle,title:typeof o=="string"?o:"",className:i()("".concat(le),"".concat(le,"-").concat(a.getNodeState()||"normal"),!se&&(S||r)&&"".concat(W,"-node-selected"),!se&&V&&"draggable"),draggable:!se&&V||void 0,"aria-grabbed":!se&&V||void 0,onMouseEnter:a.onMouseEnter,onMouseLeave:a.onMouseLeave,onContextMenu:a.onContextMenu,onClick:a.onSelectorClick,onDoubleClick:a.onSelectorDoubleClick,onDragStart:V?a.onDragStart:void 0},Te,De)},a}return Object(D.a)(p,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var r=this.props.selectable,n=this.props.context.selectable;return typeof r=="boolean"?r:n}},{key:"render",value:function(){var r,n=this.props,o=n.eventKey,S=n.className,b=n.style,g=n.dragOver,U=n.dragOverGapTop,K=n.dragOverGapBottom,W=n.isLeaf,q=n.isStart,Y=n.isEnd,V=n.expanded,te=n.selected,X=n.checked,se=n.halfChecked,le=n.loading,Te=n.domRef,Ee=n.active,Be=n.onMouseMove,De=Object(N.a)(n,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ve=this.props.context,_e=Ve.prefixCls,Le=Ve.filterTreeNode,tt=Ve.draggable,Et=Ve.keyEntities,Oe=this.isDisabled(),He=Object(O.f)(De),it=Et[o]||{},Ae=it.level,re=Y[Y.length-1];return C.createElement("div",Object.assign({ref:Te,className:i()(S,"".concat(_e,"-treenode"),(r={},Object(J.a)(r,"".concat(_e,"-treenode-disabled"),Oe),Object(J.a)(r,"".concat(_e,"-treenode-switcher-").concat(V?"open":"close"),!W),Object(J.a)(r,"".concat(_e,"-treenode-checkbox-checked"),X),Object(J.a)(r,"".concat(_e,"-treenode-checkbox-indeterminate"),se),Object(J.a)(r,"".concat(_e,"-treenode-selected"),te),Object(J.a)(r,"".concat(_e,"-treenode-loading"),le),Object(J.a)(r,"".concat(_e,"-treenode-active"),Ee),Object(J.a)(r,"".concat(_e,"-treenode-leaf-last"),re),Object(J.a)(r,"drag-over",!Oe&&g),Object(J.a)(r,"drag-over-gap-top",!Oe&&U),Object(J.a)(r,"drag-over-gap-bottom",!Oe&&K),Object(J.a)(r,"filter-node",Le&&Le(Object(B.b)(this.props))),r)),style:b,onDragEnter:tt?this.onDragEnter:void 0,onDragOver:tt?this.onDragOver:void 0,onDragLeave:tt?this.onDragLeave:void 0,onDrop:tt?this.onDrop:void 0,onDragEnd:tt?this.onDragEnd:void 0,onMouseMove:Be},He),C.createElement(y,{prefixCls:_e,level:Ae,isStart:q,isEnd:Y}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),p}(C.Component),m=function(R){return C.createElement(h.a.Consumer,null,function(p){return C.createElement(f,Object.assign({},R,{context:p}))})};m.displayName="TreeNode",m.defaultProps={title:l},m.isTreeNode=1;var E=me.a=m},Xm8N:function($e,me,z){"use strict";var J=z("2qtc"),N=z("kLXV"),L=z("k1fw"),Q=z("miYZ"),D=z("tsqr"),w=z("9og8"),_=z("PpiC"),c=z("WmNS"),C=z.n(c),x=z("q1tI"),i=z.n(x),h=z("ErOA"),O=z("Ty5D"),T=z("9kvl"),y=function(u){var s=u.shixunHomeworks,l=u.dispatch,f=Object(_.a)(u,["shixunHomeworks","dispatch"]),m=Object(O.i)();return i.a.createElement(N.a,{centered:!0,title:"\u63D0\u793A",visible:s.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(w.a)(C.a.mark(function E(){var v;return C.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Object(h.a)("/api/myshixuns/".concat(s.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:m.coursesId}});case 2:v=p.sent,v.shixun_identifier&&(D.b.success("\u64CD\u4F5C\u6210\u529F"),l({type:"shixunHomeworks/setActionTabs",payload:{}}),l({type:"shixunHomeworks/getWorkList",payload:Object(L.a)({},s.actionTabs.params)}));case 4:case"end":return p.stop()}},E)})),onCancel:function(){l({type:"shixunHomeworks/setActionTabs",payload:{}})}},i.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),i.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};me.a=Object(T.a)(function(B){var u=B.shixunHomeworks;return{shixunHomeworks:u}})(y)},Xmg4:function($e,me,z){var J=z("bYtY"),N=z("LPTA"),L=N.devicePixelRatio,Q=z("K2GJ"),D=z("3C/r");function w(){return!1}function _(x,i,h){var O=J.createCanvas(),T=i.getWidth(),y=i.getHeight(),B=O.style;return B&&(B.position="absolute",B.left=0,B.top=0,B.width=T+"px",B.height=y+"px",O.setAttribute("data-zr-dom-id",x)),O.width=T*h,O.height=y*h,O}var c=function(x,i,h){var O;h=h||L,typeof x=="string"?O=_(x,i,h):J.isObject(x)&&(O=x,x=O.id),this.id=x,this.dom=O;var T=O.style;T&&(O.onselectstart=w,T["-webkit-user-select"]="none",T["user-select"]="none",T["-webkit-touch-callout"]="none",T["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",T.padding=0,T.margin=0,T["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=h};c.prototype={constructor:c,__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 x=this.dpr;this.domBack=_("back-"+this.id,this.painter,x),this.ctxBack=this.domBack.getContext("2d"),x!==1&&this.ctxBack.scale(x,x)},resize:function(x,i){var h=this.dpr,O=this.dom,T=O.style,y=this.domBack;T&&(T.width=x+"px",T.height=i+"px"),O.width=x*h,O.height=i*h,y&&(y.width=x*h,y.height=i*h,h!==1&&this.ctxBack.scale(h,h))},clear:function(x,i){var h=this.dom,O=this.ctx,T=h.width,y=h.height,i=i||this.clearColor,B=this.motionBlur&&!x,u=this.lastFrameAlpha,s=this.dpr;if(B&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(h,0,0,T/s,y/s)),O.clearRect(0,0,T,y),i&&i!=="transparent"){var l;i.colorStops?(l=i.__canvasGradient||Q.getGradient(O,i,{x:0,y:0,width:T,height:y}),i.__canvasGradient=l):i.image&&(l=D.prototype.getCanvasPattern.call(i,O)),O.save(),O.fillStyle=l||i,O.fillRect(0,0,T,y),O.restore()}if(B){var f=this.domBack;O.save(),O.globalAlpha=u,O.drawImage(f,0,0,T,y),O.restore()}}};var C=c;$e.exports=C},Xnb7:function($e,me,z){var J=z("1RvN"),N=new J(50);function L(_){if(typeof _=="string"){var c=N.get(_);return c&&c.image}else return _}function Q(_,c,C,x,i){if(_)if(typeof _=="string"){if(c&&c.__zrImageSrc===_||!C)return c;var h=N.get(_),O={hostEl:C,cb:x,cbPayload:i};return h?(c=h.image,!w(c)&&h.pending.push(O)):(c=new Image,c.onload=c.onerror=D,N.put(_,c.__cachedImgObj={image:c,pending:[O]}),c.src=c.__zrImageSrc=_),c}else return _;else return c}function D(){var _=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var c=0;c<_.pending.length;c++){var C=_.pending[c],x=C.cb;x&&x(this,C.cbPayload),C.hostEl.dirty()}_.pending.length=0}function w(_){return _&&_.width&&_.height}me.findExistImage=L,me.createOrUpdateImage=Q,me.isImageReady=w},Y1PL:function($e,me,z){"use strict";z.r(me),z.d(me,"ResizableTextArea",function(){return se});var J=z("wx14"),N=z("1OyB"),L=z("vuIU"),Q=z("Ji7U"),D=z("LK+K"),w=z("q1tI"),_=z("VTBJ"),c=z("rePB"),C=z("Zm9Q"),x=z("Kwbf"),i=z("c+Xe"),h=z("m+aA"),O=z("bdgK"),T=new Map;function y(Ee){Ee.forEach(function(Be){var De,Ve=Be.target;(De=T.get(Ve))===null||De===void 0||De.forEach(function(_e){return _e(Ve)})})}var B=new O.default(y),u=null,s=null;function l(Ee,Be){T.has(Ee)||(T.set(Ee,new Set),B.observe(Ee)),T.get(Ee).add(Be)}function f(Ee,Be){T.has(Ee)&&(T.get(Ee).delete(Be),T.get(Ee).size||(B.unobserve(Ee),T.delete(Ee)))}var m=function(Ee){Object(Q.a)(De,Ee);var Be=Object(D.a)(De);function De(){return Object(N.a)(this,De),Be.apply(this,arguments)}return Object(L.a)(De,[{key:"render",value:function(){return this.props.children}}]),De}(w.Component),E=w.createContext(null);function v(Ee){var Be=Ee.children,De=Ee.onBatchResize,Ve=w.useRef(0),_e=w.useRef([]),Le=w.useContext(E),tt=w.useCallback(function(Et,Oe,He){Ve.current+=1;var it=Ve.current;_e.current.push({size:Et,element:Oe,data:He}),Promise.resolve().then(function(){it===Ve.current&&(De==null||De(_e.current),_e.current=[])}),Le==null||Le(Et,Oe,He)},[De,Le]);return w.createElement(E.Provider,{value:tt},Be)}function R(Ee){var Be=Ee.children,De=Ee.disabled,Ve=w.useRef(null),_e=w.useRef(null),Le=w.useContext(E),tt=w.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Et=w.isValidElement(Be)&&Object(i.c)(Be),Oe=Et?Be.ref:null,He=w.useMemo(function(){return Object(i.a)(Oe,Ve)},[Oe,Ve]),it=w.useRef(Ee);it.current=Ee;var Ae=w.useCallback(function(re){var ae=it.current,ce=ae.onResize,we=ae.data,Re=re.getBoundingClientRect(),ke=Re.width,ht=Re.height,ft=re.offsetWidth,vt=re.offsetHeight,yt=Math.floor(ke),Lt=Math.floor(ht);if(tt.current.width!==yt||tt.current.height!==Lt||tt.current.offsetWidth!==ft||tt.current.offsetHeight!==vt){var Mt={width:yt,height:Lt,offsetWidth:ft,offsetHeight:vt};tt.current=Mt;var Qe=ft===Math.round(ke)?ke:ft,Pe=vt===Math.round(ht)?ht:vt,lt=Object(_.a)(Object(_.a)({},Mt),{},{offsetWidth:Qe,offsetHeight:Pe});Le==null||Le(lt,re,we),ce&&Promise.resolve().then(function(){ce(lt,re)})}},[]);return w.useEffect(function(){var re=Object(h.a)(Ve.current)||Object(h.a)(_e.current);return re&&!De&&l(re,Ae),function(){return f(re,Ae)}},[Ve.current,De]),w.createElement(m,{ref:_e},Et?w.cloneElement(Be,{ref:He}):Be)}var p="rc-observer-key";function a(Ee){var Be=Ee.children,De=Object(C.a)(Be);return De.map(function(Ve,_e){var Le=(Ve==null?void 0:Ve.key)||"".concat(p,"-").concat(_e);return w.createElement(R,Object(J.a)({},Ee,{key:Le}),Ve)})}a.Collection=v;var r=a,n=z("bT9E"),o=z("TSYQ"),S=z.n(o),b=`
|
|
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"],U={},K;function W(Ee){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=Ee.getAttribute("id")||Ee.getAttribute("data-reactid")||Ee.getAttribute("name");if(Be&&U[De])return U[De];var Ve=window.getComputedStyle(Ee),_e=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),Le=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),tt=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),Et=g.map(function(He){return"".concat(He,":").concat(Ve.getPropertyValue(He))}).join(";"),Oe={sizingStyle:Et,paddingSize:Le,borderSize:tt,boxSizing:_e};return Be&&De&&(U[De]=Oe),Oe}function q(Ee){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),Ee.getAttribute("wrap")?K.setAttribute("wrap",Ee.getAttribute("wrap")):K.removeAttribute("wrap");var _e=W(Ee,Be),Le=_e.paddingSize,tt=_e.borderSize,Et=_e.boxSizing,Oe=_e.sizingStyle;K.setAttribute("style","".concat(Oe,";").concat(b)),K.value=Ee.value||Ee.placeholder||"";var He=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,Ae=K.scrollHeight,re;if(Et==="border-box"?Ae+=tt:Et==="content-box"&&(Ae-=Le),De!==null||Ve!==null){K.value=" ";var ae=K.scrollHeight-Le;De!==null&&(He=ae*De,Et==="border-box"&&(He=He+Le+tt),Ae=Math.max(He,Ae)),Ve!==null&&(it=ae*Ve,Et==="border-box"&&(it=it+Le+tt),re=Ae>it?"":"hidden",Ae=Math.min(it,Ae))}return{height:Ae,minHeight:He,maxHeight:it,overflowY:re,resize:"none"}}var Y=z("Gytx"),V=z.n(Y),te;(function(Ee){Ee[Ee.NONE=0]="NONE",Ee[Ee.RESIZING=1]="RESIZING",Ee[Ee.RESIZED=2]="RESIZED"})(te||(te={}));var X=function(Ee){Object(Q.a)(De,Ee);var Be=Object(D.a)(De);function De(Ve){var _e;return Object(N.a)(this,De),_e=Be.call(this,Ve),_e.nextFrameActionId=void 0,_e.resizeFrameId=void 0,_e.textArea=void 0,_e.saveTextArea=function(Le){_e.textArea=Le},_e.handleResize=function(Le){var tt=_e.state.resizeStatus,Et=_e.props,Oe=Et.autoSize,He=Et.onResize;if(tt!==te.NONE)return;typeof He=="function"&&He(Le),Oe&&_e.resizeOnNextFrame()},_e.resizeOnNextFrame=function(){cancelAnimationFrame(_e.nextFrameActionId),_e.nextFrameActionId=requestAnimationFrame(_e.resizeTextarea)},_e.resizeTextarea=function(){var Le=_e.props.autoSize;if(!Le||!_e.textArea)return;var tt=Le.minRows,Et=Le.maxRows,Oe=q(_e.textArea,!1,tt,Et);_e.setState({textareaStyles:Oe,resizeStatus:te.RESIZING},function(){cancelAnimationFrame(_e.resizeFrameId),_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:te.RESIZED},function(){_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:te.NONE}),_e.fixFirefoxAutoScroll()})})})})},_e.renderTextArea=function(){var Le=_e.props,tt=Le.prefixCls,Et=tt===void 0?"rc-textarea":tt,Oe=Le.autoSize,He=Le.onResize,it=Le.className,Ae=Le.disabled,re=_e.state,ae=re.textareaStyles,ce=re.resizeStatus,we=Object(n.a)(_e.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Re=S()(Et,it,Object(c.a)({},"".concat(Et,"-disabled"),Ae));"value"in we&&(we.value=we.value||"");var ke=Object(_.a)(Object(_.a)(Object(_.a)({},_e.props.style),ae),ce===te.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return w.createElement(r,{onResize:_e.handleResize,disabled:!(Oe||He)},w.createElement("textarea",Object(J.a)({},we,{className:Re,style:ke,ref:_e.saveTextArea})))},_e.state={textareaStyles:{},resizeStatus:te.NONE},_e}return Object(L.a)(De,[{key:"componentDidUpdate",value:function(_e){(_e.value!==this.props.value||!V()(_e.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 _e=this.textArea.selectionStart,Le=this.textArea.selectionEnd;this.textArea.setSelectionRange(_e,Le)}}catch(tt){}}},{key:"render",value:function(){return this.renderTextArea()}}]),De}(w.Component),se=X,le=function(Ee){Object(Q.a)(De,Ee);var Be=Object(D.a)(De);function De(Ve){var _e;Object(N.a)(this,De),_e=Be.call(this,Ve),_e.resizableTextArea=void 0,_e.focus=function(){_e.resizableTextArea.textArea.focus()},_e.saveTextArea=function(tt){_e.resizableTextArea=tt},_e.handleChange=function(tt){var Et=_e.props.onChange;_e.setValue(tt.target.value,function(){_e.resizableTextArea.resizeTextarea()}),Et&&Et(tt)},_e.handleKeyDown=function(tt){var Et=_e.props,Oe=Et.onPressEnter,He=Et.onKeyDown;tt.keyCode===13&&Oe&&Oe(tt),He&&He(tt)};var Le=typeof Ve.value=="undefined"||Ve.value===null?Ve.defaultValue:Ve.value;return _e.state={value:Le},_e}return Object(L.a)(De,[{key:"setValue",value:function(_e,Le){"value"in this.props||this.setState({value:_e},Le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return w.createElement(se,Object(J.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(_e){return"value"in _e?{value:_e.value}:null}}]),De}(w.Component),Te=me.default=le},YH21:function($e,me,z){var J=z("H6uX");me.Dispatcher=J;var N=z("ItGF"),L=z("Ze12"),Q=L.isCanvasEl,D=L.transformCoordWithViewport,w=typeof window!="undefined"&&!!window.addEventListener,_=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,c=[];function C(s,l,f,m){return f=f||{},m||!N.canvasSupported?x(s,l,f):N.browser.firefox&&l.layerX!=null&&l.layerX!==l.offsetX?(f.zrX=l.layerX,f.zrY=l.layerY):l.offsetX!=null?(f.zrX=l.offsetX,f.zrY=l.offsetY):x(s,l,f),f}function x(s,l,f){if(N.domSupported&&s.getBoundingClientRect){var m=l.clientX,E=l.clientY;if(Q(s)){var v=s.getBoundingClientRect();f.zrX=m-v.left,f.zrY=E-v.top;return}else if(D(c,s,m,E)){f.zrX=c[0],f.zrY=c[1];return}}f.zrX=f.zrY=0}function i(s){return s||window.event}function h(s,l,f){if(l=i(l),l.zrX!=null)return l;var m=l.type,E=m&&m.indexOf("touch")>=0;if(!E)C(s,l,l,f),l.zrDelta=l.wheelDelta?l.wheelDelta/120:-(l.detail||0)/3;else{var v=m!=="touchend"?l.targetTouches[0]:l.changedTouches[0];v&&C(s,v,l,f)}var R=l.button;return l.which==null&&R!==void 0&&_.test(l.type)&&(l.which=R&1?1:R&2?3:R&4?2:0),l}function O(s,l,f,m){w?s.addEventListener(l,f,m):s.attachEvent("on"+l,f)}function T(s,l,f,m){w?s.removeEventListener(l,f,m):s.detachEvent("on"+l,f)}var y=w?function(s){s.preventDefault(),s.stopPropagation(),s.cancelBubble=!0}:function(s){s.returnValue=!1,s.cancelBubble=!0};function B(s){return s.which===2||s.which===3}function u(s){return s.which>1}me.clientToLocal=C,me.getNativeEvent=i,me.normalizeEvent=h,me.addEventListener=O,me.removeEventListener=T,me.stop=y,me.isMiddleOrRightButtonOnMouseUpDown=B,me.notLeftMouse=u},YgsL:function($e,me,z){var J=z("QBsz"),N=J.distance;function L(D,w,_,c,C,x,i){var h=(_-D)*.5,O=(c-w)*.5;return(2*(w-_)+h+O)*i+(-3*(w-_)-2*h-O)*x+h*C+w}function Q(D,w){for(var _=D.length,c=[],C=0,x=1;x<_;x++)C+=N(D[x-1],D[x]);var i=C/2;i=i<_?_:i;for(var x=0;x<i;x++){var h=x/(i-1)*(w?_:_-1),O=Math.floor(h),T=h-O,y,B=D[O%_],u,s;w?(y=D[(O-1+_)%_],u=D[(O+1)%_],s=D[(O+2)%_]):(y=D[O===0?O:O-1],u=D[O>_-2?_-1:O+1],s=D[O>_-3?_-1:O+2]);var l=T*T,f=T*l;c.push([L(y[0],B[0],u[0],s[0],T,l,f),L(y[1],B[1],u[1],s[1],T,l,f)])}return c}$e.exports=Q},ZW9T:function($e,me,z){"use strict";z.d(me,"a",function(){return m});var J=z("k1fw"),N=z("miYZ"),L=z("tsqr"),Q=z("rAM+"),D=z("tJVT"),w=z("PpiC"),_=z("q1tI"),c=z.n(_),C=z("bdgK");function x(E,v,R,p,a){var r=v.getWordUntilPosition(R),n={startLineNumber:R.lineNumber,endLineNumber:R.lineNumber,startColumn:r.startColumn,endColumn:r.endColumn},o=p.map(function(S){return{label:S,kind:E.languages.CompletionItemKind.Keyword,insertText:S,insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:n}});return a.map(function(S){o.push(Object(J.a)(Object(J.a)({},S),{},{range:n}))}),o}var i=function(E){var v={label:"ifelse",kind:E.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},R=["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","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];E.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(n,o){var S=x(E,n,o,R,[v]);return{suggestions:S}}});var p=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];E.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(n,o){var S=[{label:"print",kind:E.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],b=x(E,n,o,p,S);return{suggestions:b}}});var a=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];E.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,o){var S=[v,{label:"main",kind:E.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:E.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],b=x(E,n,o,a,S);return{suggestions:b}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",O=z("LvDl");function T(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}function y(){}var B=!1,u={"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 s(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=E;if(Array.isArray(E)){for(var R=0;R<E.length;R++){var p=u[E[R]];if(p)return p}return v[0]}return u[v]||v}var l=null,f=me.b=function(E){var v=E.width,R=v===void 0?"100%":v,p=E.height,a=p===void 0?"100%":p,r=E.value,n=E.language,o=n===void 0?"javascript":n,S=E.style,b=S===void 0?{}:S,g=E.options,U=g===void 0?{}:g,K=E.overrideServices,W=K===void 0?{}:K,q=E.theme,Y=q===void 0?"vs-dark":q,V=E.onEditBlur,te=E.onSave,X=E.autoHeight,se=X===void 0?!1:X,le=E.forbidCopy,Te=le===void 0?!1:le,Ee=E.onChange,Be=Ee===void 0?y:Ee,De=E.editorDidMount,Ve=De===void 0?y:De,_e=E.onFocus,Le=_e===void 0?y:_e,tt=E.filename,Et=tt===void 0?"educoder.txt":tt,Oe=Object(w.a)(E,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),He=Object(_.useRef)(),it=Object(_.useRef)({}),Ae=Object(_.useRef)(),re=Object(_.useRef)(!1),ae=Object(_.useRef)(),ce=Object(_.useState)(!1),we=Object(D.a)(ce,2),Re=we[0],ke=we[1];function ht(){var ge;return He.current&&(ge=new C.default(function(Ce){var We=Object(Q.a)(Ce),Ne;try{for(We.s();!(Ne=We.n()).done;){var ut=Ne.value;(ut.target.offsetHeight>0||ut.target.offsetWidth>0)&&it.current.instance.layout()}}catch(Tt){We.e(Tt)}finally{We.f()}}),ge.observe(He.current)),ge}function ft(){L.b.warn(decodeURIComponent(h))}var vt=function(){var Ce=it.current.instance;if(r!=null&&Ce&&Re){var We=Ce.getModel();We&&r!==We.getValue()&&(B=!0,We.setValue(r),Ce.layout(),B=!1)}};Object(_.useEffect)(function(){Ae.current&&clearTimeout(Ae.current),Ae.current=setTimeout(function(){vt()},500)},[r,Re,it.current]);function yt(){var ge=it.current.instance;if(ge){var Ce=ge.getSelection(),We=it.current.pastePos||{},Ne=new l.Range(We.startLineNumber||Ce.endLineNumber,We.startColumn||Ce.endColumn,We.endLineNumber||Ce.endLineNumber,We.endColumn||Ce.endColumn);setTimeout(function(){ge.executeEdits("",[{range:Ne,text:""}])},300)}}function Lt(ge){(window.navigator.platform.match("Mac")?ge.metaKey:ge.ctrlKey)&&ge.keyCode==83&&(ge.preventDefault(),te())}var Mt=function(){if(se&&it.current.instance){var Ce=it.current.instance.getContentHeight();pe(Ce<a?a:Ce)}else pe(a)};function Qe(ge){var Ce=document.createEvent("MouseEvents");Ce.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ge.dispatchEvent(Ce)}function Pe(ge,Ce){var We=window.URL||window.webkitURL||window,Ne=new Blob([Ce]),ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");ut.href=We.createObjectURL(Ne),ut.download=ge,Qe(ut)}Object(_.useEffect)(function(){Mt()},[Mt]),Object(_.useEffect)(function(){He.current&&!Re&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(ge){try{l=ge,it.current.instance=l.editor.create(He.current,{value:r,language:s(o),theme:Y,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},W);var Ce=it.current.instance;if(Ve(Ce,l),setTimeout(function(){Mt(),it.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Pe(Et||"educoder.txt",Ce.getValue())}})},500),it.current.subscription=Ce.onDidChangeModelContent(function(Ne){re.current?clearTimeout(ae.current):(Mt(),Be(Ce.getValue(),Ne)),ae.current=setTimeout(function(){re.current=!1},500)}),window.Monaco||i(l),Te&&(Ce.addCommand(l.KeyMod.CtrlCmd|l.KeyMod.Shift|l.KeyCode.KEY_V,function(){return ft(),null}),Ce.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_C,function(){return ft(),null})),window.Monaco=l,V&&Ce.onDidBlurEditorWidget(function(){V(Ce.getValue())}),Le&&Ce.onDidFocusEditorText(function(){Le(Ce.getValue())}),Te){Ce.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_V,function(){return ft(),null}),Ce.onDidPaste(function(Ne){it.current.pastePos=Ne});try{window.addEventListener("paste",yt)}catch(Ne){}}var We=ht();return ke(!0),function(){var Ne=it.current.instance;Ne.dispose();var ut=Ne.getModel();ut&&ut.dispose(),it.current.subscription&&it.current.subscription.dispose(),Te&&window.removeEventListener("paste",yt),We.unobserve(He.current)}}catch(Ne){}})},[]),Object(_.useEffect)(function(){var ge=it.current.instance;if(ge&&Re)return document.addEventListener("keydown",Lt,!1),function(){document.removeEventListener("keydown",Lt)}},[te,Re]),Object(_.useEffect)(function(){var ge=it.current.instance;if(ge&&Re){var Ce=s(o);l.editor.setModelLanguage(ge.getModel(),Ce),console.log("language:",o,ge.getModel(),Ce)}},[o,Re]),Object(_.useEffect)(function(){var ge=it.current.instance;ge&&Re&&l.editor.setTheme(Y)},[Y,Re]),Object(_.useEffect)(function(){var ge=it.current.instance;ge&&Re&&(ge.updateOptions(Object(J.a)({},U)),setTimeout(function(){ge.getModel().updateOptions(Object(J.a)({},U))},200))},[JSON.stringify(U),Re]),Object(_.useEffect)(function(){var ge=it.current.instance;ge&&Re&&ge.layout()},[R,a,Re]);var lt=Object(_.useState)(T(R)),pt=Object(D.a)(lt,2),Ze=pt[0],st=pt[1],Ke=Object(_.useState)(T(a)),Ie=Object(D.a)(Ke,2),Me=Ie[0],pe=Ie[1],be=Object(J.a)(Object(J.a)({},b),{},{width:Ze,height:Me});return c.a.createElement("div",{className:"my-monaco-editor",ref:He,style:be})};function m(E){var v=E.width,R=v===void 0?"100%":v,p=E.height,a=p===void 0?"100%":p,r=E.original,n=E.modified,o=E.language,S=E.options,b=S===void 0?{}:S,g=Object(_.useRef)(),U=Object(_.useState)(null),K=Object(D.a)(U,2),W=K[0],q=K[1];function Y(se){var le;return g.current&&(le=new C.default(function(Te){var Ee=Object(Q.a)(Te),Be;try{for(Ee.s();!(Be=Ee.n()).done;){var De=Be.value;(De.target.offsetHeight>0||De.target.offsetWidth>0)&&se.layout()}}catch(Ve){Ee.e(Ve)}finally{Ee.f()}}),le.observe(g.current)),le}Object(_.useEffect)(function(){g.current&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(se){l=se;var le=l.editor.createDiffEditor(g.current,Object(J.a)(Object(J.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},b),{},{wordWrap:!0}));q(le);var Te=Y(le);return function(){le.dispose();var Ee=le.getModel();Ee&&Ee.dispose(),Te.unobserve(g.current)}})},[]),Object(_.useEffect)(function(){W&&W.setModel({original:l.editor.createModel(r,o),modified:l.editor.createModel(n,o)})},[r,n,o,W]);var V=T(R),te=T(a),X={width:V,height:te};return c.a.createElement("div",{className:"my-diff-editor",ref:g,style:X})}},Ze12:function($e,me,z){var J=z("ItGF"),N=z("hOwI"),L=N.buildTransformer,Q="___zrEVENTSAVED",D=[];function w(i,h,O,T,y){return _(D,h,T,y,!0)&&_(i,O,D[0],D[1])}function _(i,h,O,T,y){if(h.getBoundingClientRect&&J.domSupported&&!x(h)){var B=h[Q]||(h[Q]={}),u=c(h,B),s=C(u,B,y);if(s)return s(i,O,T),!0}return!1}function c(i,h){var O=h.markers;if(O)return O;O=h.markers=[];for(var T=["left","right"],y=["top","bottom"],B=0;B<4;B++){var u=document.createElement("div"),s=u.style,l=B%2,f=(B>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",T[l]+":0",y[f]+":0",T[1-l]+":auto",y[1-f]+":auto",""].join("!important;"),i.appendChild(u),O.push(u)}return O}function C(i,h,O){for(var T=O?"invTrans":"trans",y=h[T],B=h.srcCoords,u=!0,s=[],l=[],f=0;f<4;f++){var m=i[f].getBoundingClientRect(),E=2*f,v=m.left,R=m.top;s.push(v,R),u=u&&B&&v===B[E]&&R===B[E+1],l.push(i[f].offsetLeft,i[f].offsetTop)}return u&&y?y:(h.srcCoords=s,h[T]=O?L(l,s):L(s,l))}function x(i){return i.nodeName.toUpperCase()==="CANVAS"}me.transformLocalCoord=w,me.transformCoordWithViewport=_,me.isCanvasEl=x},ZpRC:function($e,me,z){"use strict";function J(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function N(i,h){return(!h||i!=="hidden")&&i!=="visible"&&i!=="clip"}function L(i,h){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var O=getComputedStyle(i,null);return N(O.overflowY,h)||N(O.overflowX,h)||function(T){var y=function(B){if(!B.ownerDocument||!B.ownerDocument.defaultView)return null;try{return B.ownerDocument.defaultView.frameElement}catch(u){return null}}(T);return!!y&&(y.clientHeight<T.scrollHeight||y.clientWidth<T.scrollWidth)}(i)}return!1}function Q(i,h,O,T,y,B,u,s){return B<i&&u>h||B>i&&u<h?0:B<=i&&s<=O||u>=h&&s>=O?B-i-T:u>h&&s<O||B<i&&s>O?u-h+y:0}var D=function(i,h){var O=window,T=h.scrollMode,y=h.block,B=h.inline,u=h.boundary,s=h.skipOverflowHiddenElements,l=typeof u=="function"?u:function(ae){return ae!==u};if(!J(i))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,m=[],E=i;J(E)&&l(E);){if((E=E.parentElement)===f){m.push(E);break}E!=null&&E===document.body&&L(E)&&!L(document.documentElement)||E!=null&&L(E,s)&&m.push(E)}for(var v=O.visualViewport?O.visualViewport.width:innerWidth,R=O.visualViewport?O.visualViewport.height:innerHeight,p=window.scrollX||pageXOffset,a=window.scrollY||pageYOffset,r=i.getBoundingClientRect(),n=r.height,o=r.width,S=r.top,b=r.right,g=r.bottom,U=r.left,K=y==="start"||y==="nearest"?S:y==="end"?g:S+n/2,W=B==="center"?U+o/2:B==="end"?b:U,q=[],Y=0;Y<m.length;Y++){var V=m[Y],te=V.getBoundingClientRect(),X=te.height,se=te.width,le=te.top,Te=te.right,Ee=te.bottom,Be=te.left;if(T==="if-needed"&&S>=0&&U>=0&&g<=R&&b<=v&&S>=le&&g<=Ee&&U>=Be&&b<=Te)return q;var De=getComputedStyle(V),Ve=parseInt(De.borderLeftWidth,10),_e=parseInt(De.borderTopWidth,10),Le=parseInt(De.borderRightWidth,10),tt=parseInt(De.borderBottomWidth,10),Et=0,Oe=0,He="offsetWidth"in V?V.offsetWidth-V.clientWidth-Ve-Le:0,it="offsetHeight"in V?V.offsetHeight-V.clientHeight-_e-tt:0;if(f===V)Et=y==="start"?K:y==="end"?K-R:y==="nearest"?Q(a,a+R,R,_e,tt,a+K,a+K+n,n):K-R/2,Oe=B==="start"?W:B==="center"?W-v/2:B==="end"?W-v:Q(p,p+v,v,Ve,Le,p+W,p+W+o,o),Et=Math.max(0,Et+a),Oe=Math.max(0,Oe+p);else{Et=y==="start"?K-le-_e:y==="end"?K-Ee+tt+it:y==="nearest"?Q(le,Ee,X,_e,tt+it,K,K+n,n):K-(le+X/2)+it/2,Oe=B==="start"?W-Be-Ve:B==="center"?W-(Be+se/2)+He/2:B==="end"?W-Te+Le+He:Q(Be,Te,se,Ve,Le+He,W,W+o,o);var Ae=V.scrollLeft,re=V.scrollTop;K+=re-(Et=Math.max(0,Math.min(re+Et,V.scrollHeight-X+it))),W+=Ae-(Oe=Math.max(0,Math.min(Ae+Oe,V.scrollWidth-se+He)))}q.push({el:V,top:Et,left:Oe})}return q};function w(i){return i===Object(i)&&Object.keys(i).length!==0}function _(i,h){h===void 0&&(h="auto");var O="scrollBehavior"in document.body.style;i.forEach(function(T){var y=T.el,B=T.top,u=T.left;y.scroll&&O?y.scroll({top:B,left:u,behavior:h}):(y.scrollTop=B,y.scrollLeft=u)})}function c(i){return i===!1?{block:"end",inline:"nearest"}:w(i)?i:{block:"start",inline:"nearest"}}function C(i,h){var O=!i.ownerDocument.documentElement.contains(i);if(w(h)&&typeof h.behavior=="function")return h.behavior(O?[]:D(i,h));if(O)return;var T=c(h);return _(D(i,T),T.behavior)}var x=me.a=C},aKvl:function($e,me,z){var J=z("Sj9i"),N=J.quadraticProjectPoint;function L(Q,D,w,_,c,C,x,i,h){if(x===0)return!1;var O=x;if(h>D+O&&h>_+O&&h>C+O||h<D-O&&h<_-O&&h<C-O||i>Q+O&&i>w+O&&i>c+O||i<Q-O&&i<w-O&&i<c-O)return!1;var T=N(Q,D,w,_,c,C,i,h,null);return T<=O/2}me.containStroke=L},aX58:function($e,me,z){var J=z("3gBT"),N=z("ItGF"),L=z("bYtY"),Q=z("0s+r"),D=z("r6Bn"),w=z("7SHv"),_=z("MKOG"),c=z("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 C=!N.canvasSupported,x={canvas:w},i={},h="4.3.1";function O(l,f){var m=new s(J(),l,f);return i[m.id]=m,m}function T(l){if(l)l.dispose();else{for(var f in i)i.hasOwnProperty(f)&&i[f].dispose();i={}}return this}function y(l){return i[l]}function B(l,f){x[l]=f}function u(l){delete i[l]}var s=function(l,f,m){m=m||{},this.dom=f,this.id=l;var E=this,v=new D,R=m.renderer;if(C){if(!x.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");R="vml"}else(!R||!x[R])&&(R="canvas");var p=new x[R](f,v,m,l);this.storage=v,this.painter=p;var a=!N.node&&!N.worker?new c(p.getViewportRoot(),p.root):null;this.handler=new Q(v,p,a,p.root),this.animation=new _({stage:{update:L.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var r=v.delFromStorage,n=v.addToStorage;v.delFromStorage=function(o){r.call(v,o),o&&o.removeSelfFromZr(E)},v.addToStorage=function(o){n.call(v,o),o.addSelfToZr(E)}};s.prototype={constructor:s,getId:function(){return this.id},add:function(l){this.storage.addRoot(l),this._needsRefresh=!0},remove:function(l){this.storage.delRoot(l),this._needsRefresh=!0},configLayer:function(l,f){this.painter.configLayer&&this.painter.configLayer(l,f),this._needsRefresh=!0},setBackgroundColor:function(l){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(l),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 l;this._needsRefresh&&(l=!0,this.refreshImmediately()),this._needsRefreshHover&&(l=!0,this.refreshHoverImmediately()),l&&this.trigger("rendered")},addHover:function(l,f){if(this.painter.addHover){var m=this.painter.addHover(l,f);return this.refreshHover(),m}},removeHover:function(l){this.painter.removeHover&&(this.painter.removeHover(l),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(l){l=l||{},this.painter.resize(l.width,l.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(l,f){return this.painter.pathToImage(l,f)},setCursorStyle:function(l){this.handler.setCursorStyle(l)},findHover:function(l,f){return this.handler.findHover(l,f)},on:function(l,f,m){this.handler.on(l,f,m)},off:function(l,f){this.handler.off(l,f)},trigger:function(l,f){this.handler.trigger(l,f)},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,u(this.id)}},me.version=h,me.init=O,me.dispose=T,me.getInstance=y,me.registerPainter=B},bT9E:function($e,me,z){"use strict";z.d(me,"a",function(){return N});var J=z("VTBJ");function N(L,Q){var D=Object(J.a)({},L);return Array.isArray(Q)&&Q.forEach(function(w){delete D[w]}),D}},bYtY:function($e,me){var z={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},J={"[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},N=Object.prototype.toString,L=Array.prototype,Q=L.forEach,D=L.filter,w=L.slice,_=L.map,c=L.reduce,C={};function x(Oe,He){Oe==="createCanvas"&&(u=null),C[Oe]=He}function i(Oe){if(Oe==null||typeof Oe!="object")return Oe;var He=Oe,it=N.call(Oe);if(it==="[object Array]"){if(!Ve(Oe)){He=[];for(var Ae=0,re=Oe.length;Ae<re;Ae++)He[Ae]=i(Oe[Ae])}}else if(J[it]){if(!Ve(Oe)){var ae=Oe.constructor;if(Oe.constructor.from)He=ae.from(Oe);else{He=new ae(Oe.length);for(var Ae=0,re=Oe.length;Ae<re;Ae++)He[Ae]=i(Oe[Ae])}}}else if(!z[it]&&!Ve(Oe)&&!q(Oe)){He={};for(var ce in Oe)Oe.hasOwnProperty(ce)&&(He[ce]=i(Oe[ce]))}return He}function h(Oe,He,it){if(!U(He)||!U(Oe))return it?i(He):Oe;for(var Ae in He)if(He.hasOwnProperty(Ae)){var re=Oe[Ae],ae=He[Ae];U(ae)&&U(re)&&!S(ae)&&!S(re)&&!q(ae)&&!q(re)&&!K(ae)&&!K(re)&&!Ve(ae)&&!Ve(re)?h(re,ae,it):(it||!(Ae in Oe))&&(Oe[Ae]=i(He[Ae],!0))}return Oe}function O(Oe,He){for(var it=Oe[0],Ae=1,re=Oe.length;Ae<re;Ae++)it=h(it,Oe[Ae],He);return it}function T(Oe,He){for(var it in He)He.hasOwnProperty(it)&&(Oe[it]=He[it]);return Oe}function y(Oe,He,it){for(var Ae in He)He.hasOwnProperty(Ae)&&(it?He[Ae]!=null:Oe[Ae]==null)&&(Oe[Ae]=He[Ae]);return Oe}var B=function(){return C.createCanvas()};C.createCanvas=function(){return document.createElement("canvas")};var u;function s(){return u||(u=B().getContext("2d")),u}function l(Oe,He){if(Oe){if(Oe.indexOf)return Oe.indexOf(He);for(var it=0,Ae=Oe.length;it<Ae;it++)if(Oe[it]===He)return it}return-1}function f(Oe,He){var it=Oe.prototype;function Ae(){}Ae.prototype=He.prototype,Oe.prototype=new Ae;for(var re in it)it.hasOwnProperty(re)&&(Oe.prototype[re]=it[re]);Oe.prototype.constructor=Oe,Oe.superClass=He}function m(Oe,He,it){Oe="prototype"in Oe?Oe.prototype:Oe,He="prototype"in He?He.prototype:He,y(Oe,He,it)}function E(Oe){return Oe?typeof Oe=="string"?!1:typeof Oe.length=="number":void 0}function v(Oe,He,it){if(!(Oe&&He))return;if(Oe.forEach&&Oe.forEach===Q)Oe.forEach(He,it);else if(Oe.length===+Oe.length)for(var Ae=0,re=Oe.length;Ae<re;Ae++)He.call(it,Oe[Ae],Ae,Oe);else for(var ae in Oe)Oe.hasOwnProperty(ae)&&He.call(it,Oe[ae],ae,Oe)}function R(Oe,He,it){if(!(Oe&&He))return;if(Oe.map&&Oe.map===_)return Oe.map(He,it);for(var Ae=[],re=0,ae=Oe.length;re<ae;re++)Ae.push(He.call(it,Oe[re],re,Oe));return Ae}function p(Oe,He,it,Ae){if(!(Oe&&He))return;if(Oe.reduce&&Oe.reduce===c)return Oe.reduce(He,it,Ae);for(var re=0,ae=Oe.length;re<ae;re++)it=He.call(Ae,it,Oe[re],re,Oe);return it}function a(Oe,He,it){if(!(Oe&&He))return;if(Oe.filter&&Oe.filter===D)return Oe.filter(He,it);for(var Ae=[],re=0,ae=Oe.length;re<ae;re++)He.call(it,Oe[re],re,Oe)&&Ae.push(Oe[re]);return Ae}function r(Oe,He,it){if(!(Oe&&He))return;for(var Ae=0,re=Oe.length;Ae<re;Ae++)if(He.call(it,Oe[Ae],Ae,Oe))return Oe[Ae]}function n(Oe,He){var it=w.call(arguments,2);return function(){return Oe.apply(He,it.concat(w.call(arguments)))}}function o(Oe){var He=w.call(arguments,1);return function(){return Oe.apply(this,He.concat(w.call(arguments)))}}function S(Oe){return N.call(Oe)==="[object Array]"}function b(Oe){return typeof Oe=="function"}function g(Oe){return N.call(Oe)==="[object String]"}function U(Oe){var He=typeof Oe;return He==="function"||!!Oe&&He==="object"}function K(Oe){return!!z[N.call(Oe)]}function W(Oe){return!!J[N.call(Oe)]}function q(Oe){return typeof Oe=="object"&&typeof Oe.nodeType=="number"&&typeof Oe.ownerDocument=="object"}function Y(Oe){return Oe!==Oe}function V(Oe){for(var He=0,it=arguments.length;He<it;He++)if(arguments[He]!=null)return arguments[He]}function te(Oe,He){return Oe!=null?Oe:He}function X(Oe,He,it){return Oe!=null?Oe:He!=null?He:it}function se(){return Function.call.apply(w,arguments)}function le(Oe){if(typeof Oe=="number")return[Oe,Oe,Oe,Oe];var He=Oe.length;return He===2?[Oe[0],Oe[1],Oe[0],Oe[1]]:He===3?[Oe[0],Oe[1],Oe[2],Oe[1]]:Oe}function Te(Oe,He){if(!Oe)throw new Error(He)}function Ee(Oe){return Oe==null?null:typeof Oe.trim=="function"?Oe.trim():Oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Be="__ec_primitive__";function De(Oe){Oe[Be]=!0}function Ve(Oe){return Oe[Be]}function _e(Oe){var He=S(Oe);this.data={};var it=this;Oe instanceof _e?Oe.each(Ae):Oe&&v(Oe,Ae);function Ae(re,ae){He?it.set(re,ae):it.set(ae,re)}}_e.prototype={constructor:_e,get:function(Oe){return this.data.hasOwnProperty(Oe)?this.data[Oe]:null},set:function(Oe,He){return this.data[Oe]=He},each:function(Oe,He){He!==void 0&&(Oe=n(Oe,He));for(var it in this.data)this.data.hasOwnProperty(it)&&Oe(this.data[it],it)},removeKey:function(Oe){delete this.data[Oe]}};function Le(Oe){return new _e(Oe)}function tt(Oe,He){for(var it=new Oe.constructor(Oe.length+He.length),Ae=0;Ae<Oe.length;Ae++)it[Ae]=Oe[Ae];var re=Oe.length;for(Ae=0;Ae<He.length;Ae++)it[Ae+re]=He[Ae];return it}function Et(){}me.$override=x,me.clone=i,me.merge=h,me.mergeAll=O,me.extend=T,me.defaults=y,me.createCanvas=B,me.getContext=s,me.indexOf=l,me.inherits=f,me.mixin=m,me.isArrayLike=E,me.each=v,me.map=R,me.reduce=p,me.filter=a,me.find=r,me.bind=n,me.curry=o,me.isArray=S,me.isFunction=b,me.isString=g,me.isObject=U,me.isBuiltInObject=K,me.isTypedArray=W,me.isDom=q,me.eqNaN=Y,me.retrieve=V,me.retrieve2=te,me.retrieve3=X,me.slice=se,me.normalizeCssArray=le,me.assert=Te,me.trim=Ee,me.setAsPrimitive=De,me.isPrimitive=Ve,me.createHashMap=Le,me.concatArray=tt,me.noop=Et},biw7:function($e,me,z){"use strict";var J=z("q1tI"),N=z.n(J),L=J.createContext(null);me.a=L},c5Ni:function($e,me,z){},chpo:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.default=void 0;var J=1,N=function(){return"".concat(J++)};me.default=N},crp1:function($e,me,z){"use strict";z.d(me,"b",function(){return Fe}),z.d(me,"a",function(){return wt});var J={},N=function(fe,ye,Ue,et,Je){var Dt=J[ye]||(J[ye]=URL.createObjectURL(new Blob([fe],{type:"text/javascript"}))),Z=new Worker(Dt);return Z.onerror=function(M){return Je(M.error,null)},Z.onmessage=function(M){return Je(null,M.data)},Z.postMessage(Ue,et),Z},L=Uint8Array,Q=Uint16Array,D=Uint32Array,w=new L([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_=new L([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new L([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C=function(fe,ye){for(var Ue=new Q(31),et=0;et<31;++et)Ue[et]=ye+=1<<fe[et-1];for(var Je=new D(Ue[30]),et=1;et<30;++et)for(var Dt=Ue[et];Dt<Ue[et+1];++Dt)Je[Dt]=Dt-Ue[et]<<5|et;return[Ue,Je]},x=C(w,2),i=x[0],h=x[1];i[28]=258,h[258]=28;for(var O=C(_,0),T=O[0],y=O[1],B=new Q(32768),u=0;u<32768;++u){var s=(u&43690)>>>1|(u&21845)<<1;s=(s&52428)>>>2|(s&13107)<<2,s=(s&61680)>>>4|(s&3855)<<4,B[u]=((s&65280)>>>8|(s&255)<<8)>>>1}for(var l=function(fe,ye,Ue){for(var et=fe.length,Je=0,Dt=new Q(ye);Je<et;++Je)++Dt[fe[Je]-1];var Z=new Q(ye);for(Je=0;Je<ye;++Je)Z[Je]=Z[Je-1]+Dt[Je-1]<<1;var M;if(Ue){M=new Q(1<<ye);var P=15-ye;for(Je=0;Je<et;++Je)if(fe[Je])for(var $=Je<<4|fe[Je],ne=ye-fe[Je],ee=Z[fe[Je]-1]++<<ne,je=ee|(1<<ne)-1;ee<=je;++ee)M[B[ee]>>>P]=$}else for(M=new Q(et),Je=0;Je<et;++Je)M[Je]=B[Z[fe[Je]-1]++]>>>15-fe[Je];return M},f=new L(288),u=0;u<144;++u)f[u]=8;for(var u=144;u<256;++u)f[u]=9;for(var u=256;u<280;++u)f[u]=7;for(var u=280;u<288;++u)f[u]=8;for(var m=new L(32),u=0;u<32;++u)m[u]=5;var E=l(f,9,0),v=l(f,9,1),R=l(m,5,0),p=l(m,5,1),a=function(fe){for(var ye=fe[0],Ue=1;Ue<fe.length;++Ue)fe[Ue]>ye&&(ye=fe[Ue]);return ye},r=function(fe,ye,Ue){var et=ye/8>>0;return(fe[et]|fe[et+1]<<8)>>>(ye&7)&Ue},n=function(fe,ye){var Ue=ye/8>>0;return(fe[Ue]|fe[Ue+1]<<8|fe[Ue+2]<<16)>>>(ye&7)},o=function(fe){return(fe/8>>0)+(fe&7&&1)},S=function(fe,ye,Ue){(ye==null||ye<0)&&(ye=0),(Ue==null||Ue>fe.length)&&(Ue=fe.length);var et=new(fe instanceof Q?Q:fe instanceof D?D:L)(Ue-ye);return et.set(fe.subarray(ye,Ue)),et},b=function(fe,ye,Ue){var et=fe.length,Je=!ye||Ue,Dt=!Ue||Ue.i;Ue||(Ue={}),ye||(ye=new L(et*3));var Z=function(br){var xr=ye.length;if(br>xr){var vr=new L(Math.max(xr*2,br));vr.set(ye),ye=vr}},M=Ue.f||0,P=Ue.p||0,$=Ue.b||0,ne=Ue.l,ee=Ue.d,je=Ue.m,Ct=Ue.n,Ft=et*8;do{if(!ne){Ue.f=M=r(fe,P,1);var kt=r(fe,P+1,3);if(P+=3,kt)if(kt==1)ne=v,ee=p,je=9,Ct=5;else if(kt==2){var $t=r(fe,P,31)+257,dr=r(fe,P+10,15)+4,Rr=$t+r(fe,P+5,31)+1;P+=14;for(var mr=new L(Rr),_r=new L(19),hr=0;hr<dr;++hr)_r[c[hr]]=r(fe,P+hr*3,7);P+=dr*3;var kr=a(_r),Nr=(1<<kr)-1;if(!Dt&&P+Rr*(kr+7)>Ft)break;for(var qr=l(_r,kr,1),hr=0;hr<Rr;){var Yr=qr[r(fe,P,Nr)];P+=Yr&15;var bt=Yr>>>4;if(bt<16)mr[hr++]=bt;else{var rn=0,An=0;for(bt==16?(An=3+r(fe,P,3),P+=2,rn=mr[hr-1]):bt==17?(An=3+r(fe,P,7),P+=3):bt==18&&(An=11+r(fe,P,127),P+=7);An--;)mr[hr++]=rn}}var $r=mr.subarray(0,$t),nn=mr.subarray($t);je=a($r),Ct=a(nn),ne=l($r,je,1),ee=l(nn,Ct,1)}else throw"invalid block type";else{var bt=o(P)+4,Yt=fe[bt-4]|fe[bt-3]<<8,zt=bt+Yt;if(zt>et){if(Dt)throw"unexpected EOF";break}Je&&Z($+Yt),ye.set(fe.subarray(bt,zt),$),Ue.b=$+=Yt,Ue.p=P=zt*8;continue}if(P>Ft)throw"unexpected EOF"}Je&&Z($+131072);for(var sn=(1<<je)-1,cn=(1<<Ct)-1,dn=je+Ct+18;Dt||P+dn<Ft;){var rn=ne[n(fe,P)&sn],Cr=rn>>>4;if(P+=rn&15,P>Ft)throw"unexpected EOF";if(!rn)throw"invalid length/literal";if(Cr<256)ye[$++]=Cr;else if(Cr==256){ne=null;break}else{var cr=Cr-254;if(Cr>264){var hr=Cr-257,sr=w[hr];cr=r(fe,P,(1<<sr)-1)+i[hr],P+=sr}var nr=ee[n(fe,P)&cn],Zt=nr>>>4;if(!nr)throw"invalid distance";P+=nr&15;var nn=T[Zt];if(Zt>3){var sr=_[Zt];nn+=n(fe,P)&(1<<sr)-1,P+=sr}if(P>Ft)throw"unexpected EOF";Je&&Z($+131072);for(var gr=$+cr;$<gr;$+=4)ye[$]=ye[$-nn],ye[$+1]=ye[$+1-nn],ye[$+2]=ye[$+2-nn],ye[$+3]=ye[$+3-nn];$=gr}}Ue.l=ne,Ue.p=P,Ue.b=$,ne&&(M=1,Ue.m=je,Ue.d=ee,Ue.n=Ct)}while(!M);return $==ye.length?ye:S(ye,0,$)},g=function(fe,ye,Ue){Ue<<=ye&7;var et=ye/8>>0;fe[et]|=Ue,fe[et+1]|=Ue>>>8},U=function(fe,ye,Ue){Ue<<=ye&7;var et=ye/8>>0;fe[et]|=Ue,fe[et+1]|=Ue>>>8,fe[et+2]|=Ue>>>16},K=function(fe,ye){for(var Ue=[],et=0;et<fe.length;++et)fe[et]&&Ue.push({s:et,f:fe[et]});var Je=Ue.length,Dt=Ue.slice();if(!Je)return[new L(0),0];if(Je==1){var Z=new L(Ue[0].s+1);return Z[Ue[0].s]=1,[Z,1]}Ue.sort(function(Rr,mr){return Rr.f-mr.f}),Ue.push({s:-1,f:25001});var M=Ue[0],P=Ue[1],$=0,ne=1,ee=2;for(Ue[0]={s:-1,f:M.f+P.f,l:M,r:P};ne!=Je-1;)M=Ue[Ue[$].f<Ue[ee].f?$++:ee++],P=Ue[$!=ne&&Ue[$].f<Ue[ee].f?$++:ee++],Ue[ne++]={s:-1,f:M.f+P.f,l:M,r:P};for(var je=Dt[0].s,et=1;et<Je;++et)Dt[et].s>je&&(je=Dt[et].s);var Ct=new Q(je+1),Ft=W(Ue[ne-1],Ct,0);if(Ft>ye){var et=0,kt=0,bt=Ft-ye,Yt=1<<bt;for(Dt.sort(function(mr,_r){return Ct[_r.s]-Ct[mr.s]||mr.f-_r.f});et<Je;++et){var zt=Dt[et].s;if(Ct[zt]>ye)kt+=Yt-(1<<Ft-Ct[zt]),Ct[zt]=ye;else break}for(kt>>>=bt;kt>0;){var $t=Dt[et].s;Ct[$t]<ye?kt-=1<<ye-Ct[$t]++-1:++et}for(;et>=0&&kt;--et){var dr=Dt[et].s;Ct[dr]==ye&&(--Ct[dr],++kt)}Ft=ye}return[new L(Ct),Ft]},W=function(fe,ye,Ue){return fe.s==-1?Math.max(W(fe.l,ye,Ue+1),W(fe.r,ye,Ue+1)):ye[fe.s]=Ue},q=function(fe){for(var ye=fe.length;ye&&!fe[--ye];);for(var Ue=new Q(++ye),et=0,Je=fe[0],Dt=1,Z=function(P){Ue[et++]=P},M=1;M<=ye;++M)if(fe[M]==Je&&M!=ye)++Dt;else{if(!Je&&Dt>2){for(;Dt>138;Dt-=138)Z(32754);Dt>2&&(Z(Dt>10?Dt-11<<5|28690:Dt-3<<5|12305),Dt=0)}else if(Dt>3){for(Z(Je),--Dt;Dt>6;Dt-=6)Z(8304);Dt>2&&(Z(Dt-3<<5|8208),Dt=0)}for(;Dt--;)Z(Je);Dt=1,Je=fe[M]}return[Ue.subarray(0,et),ye]},Y=function(fe,ye){for(var Ue=0,et=0;et<ye.length;++et)Ue+=fe[et]*ye[et];return Ue},V=function(fe,ye,Ue){var et=Ue.length,Je=o(ye+2);fe[Je]=et&255,fe[Je+1]=et>>>8,fe[Je+2]=fe[Je]^255,fe[Je+3]=fe[Je+1]^255;for(var Dt=0;Dt<et;++Dt)fe[Je+Dt+4]=Ue[Dt];return(Je+4+et)*8},te=function(fe,ye,Ue,et,Je,Dt,Z,M,P,$,ne){g(ye,ne++,Ue),++Je[256];for(var ee=K(Je,15),je=ee[0],Ct=ee[1],Ft=K(Dt,15),kt=Ft[0],bt=Ft[1],Yt=q(je),zt=Yt[0],$t=Yt[1],dr=q(kt),Rr=dr[0],mr=dr[1],_r=new Q(19),hr=0;hr<zt.length;++hr)_r[zt[hr]&31]++;for(var hr=0;hr<Rr.length;++hr)_r[Rr[hr]&31]++;for(var kr=K(_r,7),Nr=kr[0],qr=kr[1],Yr=19;Yr>4&&!Nr[c[Yr-1]];--Yr);var rn=$+5<<3,An=Y(Je,f)+Y(Dt,m)+Z,$r=Y(Je,je)+Y(Dt,kt)+Z+14+3*Yr+Y(_r,Nr)+(2*_r[16]+3*_r[17]+7*_r[18]);if(rn<=An&&rn<=$r)return V(ye,ne,fe.subarray(P,P+$));var nn,sn,cn,dn;if(g(ye,ne,1+($r<An)),ne+=2,$r<An){nn=l(je,Ct,0),sn=je,cn=l(kt,bt,0),dn=kt;var Cr=l(Nr,qr,0);g(ye,ne,$t-257),g(ye,ne+5,mr-1),g(ye,ne+10,Yr-4),ne+=14;for(var hr=0;hr<Yr;++hr)g(ye,ne+3*hr,Nr[c[hr]]);ne+=3*Yr;for(var cr=[zt,Rr],sr=0;sr<2;++sr)for(var nr=cr[sr],hr=0;hr<nr.length;++hr){var Zt=nr[hr]&31;g(ye,ne,Cr[Zt]),ne+=Nr[Zt],Zt>15&&(g(ye,ne,nr[hr]>>>5&127),ne+=nr[hr]>>>12)}}else nn=E,sn=f,cn=R,dn=m;for(var hr=0;hr<M;++hr)if(et[hr]>255){var Zt=et[hr]>>>18&31;U(ye,ne,nn[Zt+257]),ne+=sn[Zt+257],Zt>7&&(g(ye,ne,et[hr]>>>23&31),ne+=w[Zt]);var gr=et[hr]&31;U(ye,ne,cn[gr]),ne+=dn[gr],gr>3&&(U(ye,ne,et[hr]>>>5&8191),ne+=_[gr])}else U(ye,ne,nn[et[hr]]),ne+=sn[et[hr]];return U(ye,ne,nn[256]),ne+sn[256]},X=new D([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),se=new L(0),le=function(fe,ye,Ue,et,Je,Dt){var Z=fe.length,M=new L(et+Z+5*(1+Math.floor(Z/7e3))+Je),P=M.subarray(et,M.length-Je),$=0;if(!ye||Z<8)for(var ne=0;ne<=Z;ne+=65535){var ee=ne+65535;ee<Z?$=V(P,$,fe.subarray(ne,ee)):(P[ne]=Dt,$=V(P,$,fe.subarray(ne,Z)))}else{for(var je=X[ye-1],Ct=je>>>13,Ft=je&8191,kt=(1<<Ue)-1,bt=new Q(32768),Yt=new Q(kt+1),zt=Math.ceil(Ue/3),$t=2*zt,dr=function(Jr){return(fe[Jr]^fe[Jr+1]<<zt^fe[Jr+2]<<$t)&kt},Rr=new D(25e3),mr=new Q(288),_r=new Q(32),hr=0,kr=0,ne=0,Nr=0,qr=0,Yr=0;ne<Z;++ne){var rn=dr(ne),An=ne&32767,$r=Yt[rn];if(bt[An]=$r,Yt[rn]=An,qr<=ne){var nn=Z-ne;if((hr>7e3||Nr>24576)&&nn>423){$=te(fe,P,0,Rr,mr,_r,kr,Nr,Yr,ne-Yr,$),Nr=hr=kr=0,Yr=ne;for(var sn=0;sn<286;++sn)mr[sn]=0;for(var sn=0;sn<30;++sn)_r[sn]=0}var cn=2,dn=0,Cr=Ft,cr=An-$r&32767;if(nn>2&&rn==dr(ne-cr))for(var sr=Math.min(Ct,nn)-1,nr=Math.min(32767,ne),Zt=Math.min(258,nn);cr<=nr&&--Cr&&An!=$r;){if(fe[ne+cn]==fe[ne+cn-cr]){for(var gr=0;gr<Zt&&fe[ne+gr]==fe[ne+gr-cr];++gr);if(gr>cn){if(cn=gr,dn=cr,gr>sr)break;for(var br=Math.min(cr,gr-2),xr=0,sn=0;sn<br;++sn){var vr=ne-cr+sn+32768&32767,On=bt[vr],Hr=vr-On+32768&32767;Hr>xr&&(xr=Hr,$r=vr)}}}An=$r,$r=bt[An],cr+=An-$r+32768&32767}if(dn){Rr[Nr++]=268435456|h[cn]<<18|y[dn];var Cn=h[cn]&31,Hn=y[dn]&31;kr+=w[Cn]+_[Hn],++mr[257+Cn],++_r[Hn],qr=ne+cn,++hr}else Rr[Nr++]=fe[ne],++mr[fe[ne]]}}$=te(fe,P,Dt,Rr,mr,_r,kr,Nr,Yr,ne-Yr,$),Dt||($=V(P,$,se))}return S(M,0,et+o($)+Je)},Te=function(){for(var fe=new D(256),ye=0;ye<256;++ye){for(var Ue=ye,et=9;--et;)Ue=(Ue&1&&3988292384)^Ue>>>1;fe[ye]=Ue}return fe}(),Ee=function(){var fe=4294967295;return{p:function(ye){for(var Ue=fe,et=0;et<ye.length;++et)Ue=Te[Ue&255^ye[et]]^Ue>>>8;fe=Ue},d:function(){return fe^4294967295}}},Be=function(){var fe=1,ye=0;return{p:function(Ue){for(var et=fe,Je=ye,Dt=Ue.length,Z=0;Z!=Dt;){for(var M=Math.min(Z+5552,Dt);Z<M;++Z)et+=Ue[Z],Je+=et;et%=65521,Je%=65521}fe=et,ye=Je},d:function(){return(fe>>>8<<16|(ye&255)<<8|ye>>>8)+((fe&255)<<23)*2}}},De=function(fe,ye,Ue,et,Je){return le(fe,ye.level==null?6:ye.level,ye.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(fe.length)))*1.5):12+ye.mem,Ue,et,!Je)},Ve=function(fe,ye){var Ue={};for(var et in fe)Ue[et]=fe[et];for(var et in ye)Ue[et]=ye[et];return Ue},_e=function(fe,ye,Ue){for(var et=fe(),Je=fe.toString(),Dt=Je.slice(Je.indexOf("[")+1,Je.lastIndexOf("]")).replace(/ /g,"").split(","),Z=0;Z<et.length;++Z){var M=et[Z],P=Dt[Z];if(typeof M=="function"){ye+=";"+P+"=";var $=M.toString();if(M.prototype)if($.indexOf("[native code]")!=-1){var ne=$.indexOf(" ",8)+1;ye+=$.slice(ne,$.indexOf("(",ne))}else{ye+=$;for(var ee in M.prototype)ye+=";"+P+".prototype."+ee+"="+M.prototype[ee].toString()}else ye+=$}else Ue[P]=M}return[ye,Ue]},Le=[],tt=function(fe){var ye=[];for(var Ue in fe)(fe[Ue]instanceof L||fe[Ue]instanceof Q||fe[Ue]instanceof D)&&ye.push((fe[Ue]=new fe[Ue].constructor(fe[Ue])).buffer);return ye},Et=function(fe,ye,Ue,et){var Je;if(!Le[Ue]){for(var Dt="",Z={},M=fe.length-1,P=0;P<M;++P)Je=_e(fe[P],Dt,Z),Dt=Je[0],Z=Je[1];Le[Ue]=_e(fe[M],Dt,Z)}var $=Ve({},Le[Ue][1]);return N(Le[Ue][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ye.toString()+"}",Ue,$,tt($),et)},Oe=function(){return[L,Q,D,w,_,c,i,T,v,p,B,l,a,r,n,o,S,b,Ce,ce,we]},He=function(){return[L,Q,D,w,_,c,h,y,E,f,R,m,B,X,se,l,g,U,K,W,q,Y,V,te,o,S,le,De,Me,ce]},it=function(){return[Lt,Pe,yt,Ee,Te]},Ae=function(){return[Mt,Qe]},re=function(){return[lt,yt,Be]},ae=function(){return[pt]},ce=function(fe){return postMessage(fe,[fe.buffer])},we=function(fe){return fe&&fe.size&&new L(fe.size)},Re=function(fe,ye,Ue,et,Je,Dt){var Z=Et(Ue,et,Je,function(M,P){Z.terminate(),Dt(M,P)});return ye.consume||(fe=new L(fe)),Z.postMessage([fe,ye],[fe.buffer]),function(){Z.terminate()}},ke=function(fe){return fe.ondata=function(ye,Ue){return postMessage([ye,Ue],[ye.buffer])},function(ye){return fe.push(ye.data[0],ye.data[1])}},ht=function(fe,ye,Ue,et,Je){var Dt,Z=Et(fe,et,Je,function(M,P){M?(Z.terminate(),ye.ondata.call(ye,M)):(P[1]&&Z.terminate(),ye.ondata.call(ye,M,P[0],P[1]))});Z.postMessage(Ue),ye.push=function(M,P){if(Dt)throw"stream finished";if(!ye.ondata)throw"no stream handler";Z.postMessage([M,Dt=P],[M.buffer])},ye.terminate=function(){Z.terminate()}},ft=function(fe,ye){return fe[ye]|fe[ye+1]<<8},vt=function(fe,ye){return(fe[ye]|fe[ye+1]<<8|fe[ye+2]<<16)+(fe[ye+3]<<23)*2},yt=function(fe,ye,Ue){for(;Ue;++ye)fe[ye]=Ue,Ue>>>=8},Lt=function(fe,ye){var Ue=ye.filename;if(fe[0]=31,fe[1]=139,fe[2]=8,fe[8]=ye.level<2?4:ye.level==9?2:0,fe[9]=3,ye.mtime!=0&&yt(fe,4,Math.floor(new Date(ye.mtime||Date.now())/1e3)),Ue){fe[3]=8;for(var et=0;et<=Ue.length;++et)fe[et+10]=Ue.charCodeAt(et)}},Mt=function(fe){if(fe[0]!=31||fe[1]!=139||fe[2]!=8)throw"invalid gzip data";var ye=fe[3],Ue=10;ye&4&&(Ue+=fe[10]|(fe[11]<<8)+2);for(var et=(ye>>3&1)+(ye>>4&1);et>0;et-=!fe[Ue++]);return Ue+(ye&2)},Qe=function(fe){var ye=fe.length;return(fe[ye-4]|fe[ye-3]<<8|fe[ye-2]<<16)+2*(fe[ye-1]<<23)},Pe=function(fe){return 10+(fe.filename&&fe.filename.length+1||0)},lt=function(fe,ye){var Ue=ye.level,et=Ue==0?0:Ue<6?1:Ue==9?3:2;fe[0]=120,fe[1]=et<<6|(et?32-2*et:1)},pt=function(fe){if((fe[0]&15)!=8||fe[0]>>>4>7||(fe[0]<<8|fe[1])%31)throw"invalid zlib data";if(fe[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ze(fe,ye){return!ye&&typeof fe=="function"&&(ye=fe,fe={}),this.ondata=ye,fe}var st=function(){function fe(ye,Ue){!Ue&&typeof ye=="function"&&(Ue=ye,ye={}),this.ondata=Ue,this.o=ye||{}}return fe.prototype.p=function(ye,Ue){this.ondata(De(ye,this.o,0,0,!Ue),Ue)},fe.prototype.push=function(ye,Ue){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Ue,this.p(ye,Ue||!1)},fe}(),Ke=function(){function fe(ye,Ue){ht([He,function(){return[ke,st]}],this,Ze.call(this,ye,Ue),function(et){var Je=new st(et.data);onmessage=ke(Je)},6)}return fe}();function Ie(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[He],function(et){return ce(Me(et.data[0],et.data[1]))},0,Ue)}function Me(fe,ye){return ye===void 0&&(ye={}),De(fe,ye,0,0)}var pe=function(){function fe(ye){this.s={},this.p=new L(0),this.ondata=ye}return fe.prototype.e=function(ye){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Ue=this.p.length,et=new L(Ue+ye.length);et.set(this.p),et.set(ye,Ue),this.p=et},fe.prototype.c=function(ye){this.d=this.s.i=ye||!1;var Ue=this.s.b,et=b(this.p,this.o,this.s);this.ondata(S(et,Ue,this.s.b),this.d),this.o=S(et,this.s.b-32768),this.s.b=this.o.length,this.p=S(this.p,this.s.p/8>>0),this.s.p&=7},fe.prototype.push=function(ye,Ue){this.e(ye),this.c(Ue)},fe}(),be=function(){function fe(ye){this.ondata=ye,ht([Oe,function(){return[ke,pe]}],this,0,function(){var Ue=new pe;onmessage=ke(Ue)},7)}return fe}();function ge(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[Oe],function(et){return ce(Ce(et.data[0],we(et.data[1])))},1,Ue)}function Ce(fe,ye){return b(fe,ye)}var We=function(){function fe(ye,Ue){this.c=Ee(),this.l=0,this.v=1,st.call(this,ye,Ue)}return fe.prototype.push=function(ye,Ue){st.prototype.push.call(this,ye,Ue)},fe.prototype.p=function(ye,Ue){this.c.p(ye),this.l+=ye.length;var et=De(ye,this.o,this.v&&Pe(this.o),Ue&&8,!Ue);this.v&&(Lt(et,this.o),this.v=0),Ue&&(yt(et,et.length-8,this.c.d()),yt(et,et.length-4,this.l)),this.ondata(et,Ue)},fe}(),Ne=function(){function fe(ye,Ue){ht([He,it,function(){return[ke,st,We]}],this,Ze.call(this,ye,Ue),function(et){var Je=new We(et.data);onmessage=ke(Je)},8)}return fe}();function ut(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[He,it,function(){return[Tt]}],function(et){return ce(Tt(et.data[0],et.data[1]))},2,Ue)}function Tt(fe,ye){ye===void 0&&(ye={});var Ue=Ee(),et=fe.length;Ue.p(fe);var Je=De(fe,ye,Pe(ye),8),Dt=Je.length;return Lt(Je,ye),yt(Je,Dt-8,Ue.d()),yt(Je,Dt-4,et),Je}var Ut=function(){function fe(ye){this.v=1,pe.call(this,ye)}return fe.prototype.push=function(ye,Ue){if(pe.prototype.e.call(this,ye),this.v){var et=Mt(this.p);if(et>=this.p.length&&!Ue)return;this.p=this.p.subarray(et),this.v=0}if(Ue){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}pe.prototype.c.call(this,Ue)},fe}(),St=function(){function fe(ye){this.ondata=ye,ht([Oe,Ae,function(){return[ke,pe,Ut]}],this,0,function(){var Ue=new Ut;onmessage=ke(Ue)},9)}return fe}();function _t(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[Oe,Ae,function(){return[At]}],function(et){return ce(At(et.data[0]))},3,Ue)}function At(fe,ye){return b(fe.subarray(Mt(fe),-8),ye||new L(Qe(fe)))}var nt=function(){function fe(ye,Ue){this.c=Be(),this.v=1,st.call(this,ye,Ue)}return fe.prototype.push=function(ye,Ue){st.prototype.push.call(this,ye,Ue)},fe.prototype.p=function(ye,Ue){this.c.p(ye);var et=De(ye,this.o,this.v&&2,Ue&&4,!Ue);this.v&&(lt(et,this.o),this.v=0),Ue&&yt(et,et.length-4,this.c.d()),this.ondata(et,Ue)},fe}(),rt=function(){function fe(ye,Ue){ht([He,re,function(){return[ke,st,nt]}],this,Ze.call(this,ye,Ue),function(et){var Je=new nt(et.data);onmessage=ke(Je)},10)}return fe}();function xe(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[He,re,function(){return[Fe]}],function(et){return ce(Fe(et.data[0],et.data[1]))},4,Ue)}function Fe(fe,ye){ye===void 0&&(ye={});var Ue=Be();Ue.p(fe);var et=De(fe,ye,2,4);return lt(et,ye),yt(et,et.length-4,Ue.d()),et}var dt=function(){function fe(ye){this.v=1,pe.call(this,ye)}return fe.prototype.push=function(ye,Ue){if(pe.prototype.e.call(this,ye),this.v){if(this.p.length<2&&!Ue)return;this.p=this.p.subarray(2),this.v=0}if(Ue){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}pe.prototype.c.call(this,Ue)},fe}(),at=function(){function fe(ye){this.ondata=ye,ht([Oe,ae,function(){return[ke,pe,dt]}],this,0,function(){var Ue=new dt;onmessage=ke(Ue)},11)}return fe}();function xt(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return Re(fe,ye,[Oe,ae,function(){return[wt]}],function(et){return ce(wt(et.data[0],we(et.data[1])))},5,Ue)}function wt(fe,ye){return b((pt(fe),fe.subarray(2,-4)),ye)}var qe=function(){function fe(ye){this.G=Ut,this.I=pe,this.Z=dt,this.ondata=ye}return fe.prototype.push=function(ye,Ue){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ye,Ue);else{if(this.p&&this.p.length){var et=new L(this.p.length+ye.length);et.set(this.p),et.set(ye,this.p.length)}else this.p=ye;if(this.p.length>2){var Je=this,Dt=function(){Je.ondata.apply(Je,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Dt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Dt):new this.Z(Dt),this.s.push(this.p,Ue),this.p=null}}},fe}(),Bt=function(){function fe(ye){this.G=St,this.I=be,this.Z=at,this.ondata=ye}return fe.prototype.push=function(ye,Ue){qe.prototype.push.call(this,ye,Ue)},fe}();function Ht(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";return fe[0]==31&&fe[1]==139&&fe[2]==8?_t(fe,ye,Ue):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?ge(fe,ye,Ue):xt(fe,ye,Ue)}function Nt(fe,ye){return fe[0]==31&&fe[1]==139&&fe[2]==8?At(fe,ye):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?Ce(fe,ye):wt(fe,ye)}var Gt=function(fe,ye,Ue,et){for(var Je in fe){var Dt=fe[Je],Z=ye+Je;Dt instanceof L?Ue[Z]=[Dt,et]:Array.isArray(Dt)?Ue[Z]=[Dt[0],Ve(et,Dt[1])]:Gt(Dt,Z+"/",Ue,et)}};function Or(fe,ye){var Ue=fe.length;if(!ye&&typeof TextEncoder!="undefined")return new TextEncoder().encode(fe);for(var et=new L(fe.length+(fe.length>>>1)),Je=0,Dt=function($){et[Je++]=$},Z=0;Z<Ue;++Z){if(Je+5>et.length){var M=new L(Je+8+(Ue-Z<<1));M.set(et),et=M}var P=fe.charCodeAt(Z);P<128||ye?Dt(P):P<2048?(Dt(192|P>>>6),Dt(128|P&63)):P>55295&&P<57344?(P=65536+(P&1023<<10)|fe.charCodeAt(++Z)&1023,Dt(240|P>>>18),Dt(128|P>>>12&63),Dt(128|P>>>6&63),Dt(128|P&63)):(Dt(224|P>>>12),Dt(128|P>>>6&63),Dt(128|P&63))}return S(et,0,Je)}function Pr(fe,ye){var Ue="";if(!ye&&typeof TextDecoder!="undefined")return new TextDecoder().decode(fe);for(var et=0;et<fe.length;){var Je=fe[et++];Je<128||ye?Ue+=String.fromCharCode(Je):Je<224?Ue+=String.fromCharCode((Je&31)<<6|fe[et++]&63):Je<240?Ue+=String.fromCharCode((Je&15)<<12|(fe[et++]&63)<<6|fe[et++]&63):(Je=((Je&15)<<18|(fe[et++]&63)<<12|(fe[et++]&63)<<6|fe[et++]&63)-65536,Ue+=String.fromCharCode(55296|Je>>10,56320|Je&1023))}return Ue}var yr=function(fe,ye){return ye+30+ft(fe,ye+26)+ft(fe,ye+28)},jt=function(fe,ye,Ue){var et=ft(fe,ye+28),Je=Pr(fe.subarray(ye+46,ye+46+et),!(ft(fe,ye+8)&2048)),Dt=ye+46+et,Z=Ue?Dr(fe,Dt):[vt(fe,ye+20),vt(fe,ye+24),vt(fe,ye+42)],M=Z[0],P=Z[1],$=Z[2];return[ft(fe,ye+10),M,P,Je,Dt+ft(fe,ye+30)+ft(fe,ye+32),$]},Dr=function(fe,ye){for(;ft(fe,ye)!=1;ye+=4+ft(fe,ye+2));return[vt(fe,ye+12),vt(fe,ye+4),vt(fe,ye+20)]},Wr=function(fe,ye,Ue,et,Je,Dt,Z,M,P,$){var ne=Dt.length,ee=et.length;yt(fe,ye,P!=null?33639248:67324752),ye+=4,P!=null&&(fe[ye]=20,ye+=2),fe[ye]=20,ye+=2,fe[ye++]=$==8&&(M.level==1?6:M.level<6?4:M.level==9?2:0),fe[ye++]=Z&&8,fe[ye]=$,ye+=2;var je=new Date(M.mtime||Date.now()),Ct=je.getFullYear()-1980;if(Ct<0||Ct>119)throw"date not in range 1980-2099";yt(fe,ye,(Ct<<24)*2|je.getMonth()+1<<21|je.getDate()<<16|je.getHours()<<11|je.getMinutes()<<5|je.getSeconds()>>>1),ye+=4,yt(fe,ye,Ue),yt(fe,ye+4,ee),yt(fe,ye+8,Je),yt(fe,ye+12,ne),ye+=16,P!=null&&(yt(fe,ye+=10,P),ye+=4),fe.set(Dt,ye),ye+=ne,P==null&&fe.set(et,ye)},Mr=function(fe,ye,Ue,et,Je){yt(fe,ye,101010256),yt(fe,ye+8,Ue),yt(fe,ye+10,Ue),yt(fe,ye+12,et),yt(fe,ye+16,Je)};function pr(fe,ye,Ue){if(Ue||(Ue=ye,ye={}),typeof Ue!="function")throw"no callback";var et={};Gt(fe,"",et,ye);var Je=Object.keys(et),Dt=Je.length,Z=0,M=0,P=Dt,$=new Array(Dt),ne=[],ee=function(){for(var kt=0;kt<ne.length;++kt)ne[kt]()},je=function(){var kt=new L(M+22),bt=Z,Yt=M-Z;M=0;for(var zt=0;zt<P;++zt){var $t=$[zt];try{Wr(kt,M,$t.c,$t.d,$t.m,$t.n,$t.u,$t.p,null,$t.t),Wr(kt,Z,$t.c,$t.d,$t.m,$t.n,$t.u,$t.p,M,$t.t),Z+=46+$t.n.length,M+=30+$t.n.length+$t.d.length}catch(dr){return Ue(dr,null)}}Mr(kt,Z,$.length,Yt,bt),Ue(null,kt)};Dt||je();for(var Ct=function(kt){var bt=Je[kt],Yt=et[bt],zt=Yt[0],$t=Yt[1],dr=Ee(),Rr=zt.length;dr.p(zt);var mr=Or(bt),_r=mr.length,hr=$t.level==0?0:8,kr=function(Nr,qr){if(Nr)ee(),Ue(Nr,null);else{var Yr=qr.length;$[kt]={t:hr,d:qr,m:Rr,c:dr.d(),u:bt.length!=Yr,n:mr,p:$t},Z+=30+_r+Yr,M+=76+2*_r+Yr,--Dt||je()}};if(mr.length>65535&&kr("filename too long",null),!hr)kr(null,zt);else if(Rr<16e4)try{kr(null,Me(zt,$t))}catch(Nr){kr(Nr,null)}else ne.push(Ie(zt,$t,kr))},Ft=0;Ft<P;++Ft)Ct(Ft);return ee}function Sr(fe,ye){ye===void 0&&(ye={});var Ue={},et=[];Gt(fe,"",Ue,ye);var Je=0,Dt=0;for(var Z in Ue){var M=Ue[Z],P=M[0],$=M[1],ne=$.level==0?0:8,ee=Or(Z),je=ee.length;if(ee.length>65535)throw"filename too long";var Ct=ne?Me(P,$):P,Ft=Ct.length,kt=Ee();kt.p(P),et.push({t:ne,d:Ct,m:P.length,c:kt.d(),u:Z.length!=je,n:ee,o:Je,p:$}),Je+=30+je+Ft,Dt+=76+2*je+Ft}for(var bt=new L(Dt+22),Yt=Je,zt=Dt-Je,$t=0;$t<et.length;++$t){var dr=et[$t];Wr(bt,dr.o,dr.c,dr.d,dr.m,dr.n,dr.u,dr.p,null,dr.t),Wr(bt,Je,dr.c,dr.d,dr.m,dr.n,dr.u,dr.p,dr.o,dr.t),Je+=46+dr.n.length}return Mr(bt,Je,et.length,zt,Yt),bt}function mn(fe,ye){if(typeof ye!="function")throw"no callback";for(var Ue=[],et=function(){for(var je=0;je<Ue.length;++je)Ue[je]()},Je={},Dt=fe.length-22;vt(fe,Dt)!=101010256;--Dt)if(!Dt||fe.length-Dt>65558){ye("invalid zip file",null);return}var Z=ft(fe,Dt+8);Z||ye(null,{});var M=Z,P=vt(fe,Dt+16),$=P==4294967295;if($){if(Dt=vt(fe,Dt-12),vt(fe,Dt)!=101075792)throw"invalid zip file";M=Z=vt(fe,Dt+32),P=vt(fe,Dt+48)}for(var ne=function(je){var Ct=jt(fe,P,$),Ft=Ct[0],kt=Ct[1],bt=Ct[2],Yt=Ct[3],zt=Ct[4],$t=Ct[5],dr=yr(fe,$t);P=zt;var Rr=function(_r,hr){_r?(et(),ye(_r,null)):(Je[Yt]=hr,--Z||ye(null,Je))};if(!Ft)Rr(null,S(fe,dr,dr+kt));else if(Ft==8){var mr=fe.subarray(dr,dr+kt);if(kt<32e4)try{Rr(null,Ce(mr,new L(bt)))}catch(_r){Rr(_r,null)}else Ue.push(ge(mr,{size:bt},Rr))}else Rr("unknown compression type "+Ft,null)},ee=0;ee<M;++ee)ne(ee);return et}function on(fe){for(var ye={},Ue=fe.length-22;vt(fe,Ue)!=101010256;--Ue)if(!Ue||fe.length-Ue>65558)throw"invalid zip file";var et=ft(fe,Ue+8);if(!et)return{};var Je=vt(fe,Ue+16),Dt=Je==4294967295;if(Dt){if(Ue=vt(fe,Ue-12),vt(fe,Ue)!=101075792)throw"invalid zip file";et=vt(fe,Ue+32),Je=vt(fe,Ue+48)}for(var Z=0;Z<et;++Z){var M=jt(fe,Je,Dt),P=M[0],$=M[1],ne=M[2],ee=M[3],je=M[4],Ct=M[5],Ft=yr(fe,Ct);if(Je=je,!P)ye[ee]=S(fe,Ft,Ft+$);else if(P==8)ye[ee]=Ce(fe.subarray(Ft,Ft+$),new L(ne));else throw"unknown compression type "+P}return ye}},dMvE:function($e,me){var z={linear:function(N){return N},quadraticIn:function(N){return N*N},quadraticOut:function(N){return N*(2-N)},quadraticInOut:function(N){return(N*=2)<1?.5*N*N:-.5*(--N*(N-2)-1)},cubicIn:function(N){return N*N*N},cubicOut:function(N){return--N*N*N+1},cubicInOut:function(N){return(N*=2)<1?.5*N*N*N:.5*((N-=2)*N*N+2)},quarticIn:function(N){return N*N*N*N},quarticOut:function(N){return 1- --N*N*N*N},quarticInOut:function(N){return(N*=2)<1?.5*N*N*N*N:-.5*((N-=2)*N*N*N-2)},quinticIn:function(N){return N*N*N*N*N},quinticOut:function(N){return--N*N*N*N*N+1},quinticInOut:function(N){return(N*=2)<1?.5*N*N*N*N*N:.5*((N-=2)*N*N*N*N+2)},sinusoidalIn:function(N){return 1-Math.cos(N*Math.PI/2)},sinusoidalOut:function(N){return Math.sin(N*Math.PI/2)},sinusoidalInOut:function(N){return .5*(1-Math.cos(Math.PI*N))},exponentialIn:function(N){return N===0?0:Math.pow(1024,N-1)},exponentialOut:function(N){return N===1?1:1-Math.pow(2,-10*N)},exponentialInOut:function(N){return N===0?0:N===1?1:(N*=2)<1?.5*Math.pow(1024,N-1):.5*(-Math.pow(2,-10*(N-1))+2)},circularIn:function(N){return 1-Math.sqrt(1-N*N)},circularOut:function(N){return Math.sqrt(1- --N*N)},circularInOut:function(N){return(N*=2)<1?-.5*(Math.sqrt(1-N*N)-1):.5*(Math.sqrt(1-(N-=2)*N)+1)},elasticIn:function(N){var L,Q=.1,D=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,L=D/4):L=D*Math.asin(1/Q)/(2*Math.PI),-(Q*Math.pow(2,10*(N-=1))*Math.sin((N-L)*(2*Math.PI)/D)))},elasticOut:function(N){var L,Q=.1,D=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,L=D/4):L=D*Math.asin(1/Q)/(2*Math.PI),Q*Math.pow(2,-10*N)*Math.sin((N-L)*(2*Math.PI)/D)+1)},elasticInOut:function(N){var L,Q=.1,D=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,L=D/4):L=D*Math.asin(1/Q)/(2*Math.PI),(N*=2)<1?-.5*(Q*Math.pow(2,10*(N-=1))*Math.sin((N-L)*(2*Math.PI)/D)):Q*Math.pow(2,-10*(N-=1))*Math.sin((N-L)*(2*Math.PI)/D)*.5+1)},backIn:function(N){var L=1.70158;return N*N*((L+1)*N-L)},backOut:function(N){var L=1.70158;return--N*N*((L+1)*N+L)+1},backInOut:function(N){var L=1.70158*1.525;return(N*=2)<1?.5*(N*N*((L+1)*N-L)):.5*((N-=2)*N*((L+1)*N+L)+2)},bounceIn:function(N){return 1-z.bounceOut(1-N)},bounceOut:function(N){return N<1/2.75?7.5625*N*N:N<2/2.75?7.5625*(N-=1.5/2.75)*N+.75:N<2.5/2.75?7.5625*(N-=2.25/2.75)*N+.9375:7.5625*(N-=2.625/2.75)*N+.984375},bounceInOut:function(N){return N<.5?z.bounceIn(N*2)*.5:z.bounceOut(N*2-1)*.5+.5}},J=z;$e.exports=J},dejd:function($e,me,z){},dmUQ:function($e,me,z){"use strict";var J=z("Ff2n"),N=z("rePB"),L=z("1OyB"),Q=z("vuIU"),D=z("Ji7U"),w=z("md7G"),_=z("foSv"),c=z("q1tI"),C=z.n(c),x=z("TSYQ"),i=z.n(x),h=z("4IlW");function O(n,o){var S=Object.keys(n);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(n);o&&(b=b.filter(function(g){return Object.getOwnPropertyDescriptor(n,g).enumerable})),S.push.apply(S,b)}return S}function T(n){for(var o=1;o<arguments.length;o++){var S=arguments[o]!=null?arguments[o]:{};o%2?O(Object(S),!0).forEach(function(b){Object(N.a)(n,b,S[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(S)):O(Object(S)).forEach(function(b){Object.defineProperty(n,b,Object.getOwnPropertyDescriptor(S,b))})}return n}function y(n){var o=B();return function(){var b=Object(_.a)(n),g;if(o){var U=Object(_.a)(this).constructor;g=Reflect.construct(b,arguments,U)}else g=b.apply(this,arguments);return Object(w.a)(this,g)}}function B(){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(n){return!1}}function u(){}function s(n){n.preventDefault()}var l=function(o){return o.replace(/[^\w.-]+/g,"")},f=200,m=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,v=function(o){return o!=null},R=function(o,S){return S===o||typeof S=="number"&&typeof o=="number"&&isNaN(S)&&isNaN(o)},p=function(n){Object(D.a)(S,n);var o=y(S);function S(b){var g;Object(L.a)(this,S),g=o.call(this,b),g.onKeyDown=function(W){var q=g.props,Y=q.onKeyDown,V=q.onPressEnter;if(W.keyCode===h.a.UP){var te=g.getRatio(W);g.up(W,te,null),g.stop()}else if(W.keyCode===h.a.DOWN){var X=g.getRatio(W);g.down(W,X,null),g.stop()}else W.keyCode===h.a.ENTER&&V&&V(W);if(g.recordCursorPosition(),g.lastKeyCode=W.keyCode,Y){for(var se=arguments.length,le=new Array(se>1?se-1:0),Te=1;Te<se;Te++)le[Te-1]=arguments[Te];Y.apply(void 0,[W].concat(le))}},g.onKeyUp=function(W){var q=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),q){for(var Y=arguments.length,V=new Array(Y>1?Y-1:0),te=1;te<Y;te++)V[te-1]=arguments[te];q.apply(void 0,[W].concat(V))}},g.onChange=function(W){var q=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(W)),g.setState({inputValue:g.rawInput}),q(g.toNumber(g.rawInput))},g.onMouseUp=function(){var W=g.props.onMouseUp;g.recordCursorPosition(),W&&W.apply(void 0,arguments)},g.onFocus=function(){var W;g.setState({focused:!0}),(W=g.props).onFocus.apply(W,arguments)},g.onBlur=function(){var W=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var q=g.getCurrentValidValue(g.state.inputValue),Y=g.setValue(q,u);if(W){var V=g.input.value,te=g.getInputDisplayValue({focus:!1,value:Y});g.input.value=te&&Number(te),W.apply(void 0,arguments),g.input.value=V}},g.getRatio=function(W){var q=1;return W.metaKey||W.ctrlKey?q=.1:W.shiftKey&&(q=10),q},g.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},g.getPrecision=function(W){if(v(g.props.precision))return g.props.precision;var q=String(W);if(q.indexOf("e-")>=0)return parseInt(q.slice(q.indexOf("e-")+2),10);var Y=0;return q.indexOf(".")>=0&&(Y=q.length-q.indexOf(".")-1),Y},g.getInputDisplayValue=function(W){var q=W||g.state,Y=q.focused,V=q.inputValue,te=q.value,X;Y?X=V:X=g.toPrecisionAsStep(te),X==null&&(X="");var se=g.formatWrapper(X);return v(g.props.decimalSeparator)&&(se=se.toString().replace(".",g.props.decimalSeparator)),se},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(W){}},g.restoreByAfter=function(W){if(W===void 0)return!1;var q=g.input.value,Y=q.lastIndexOf(W);if(Y===-1)return!1;var V=g.cursorBefore.length;return g.lastKeyCode===h.a.DELETE&&g.cursorBefore.charAt(V-1)===W[0]?(g.fixCaret(V,V),!0):Y+W.length===q.length?(g.fixCaret(Y,Y),!0):!1},g.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(q,Y){var V=W.substring(Y);return g.restoreByAfter(V)})},g.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(W,q,Y){g.pressingUpOrDown=!0,g.step("down",W,q,Y)},g.up=function(W,q,Y){g.pressingUpOrDown=!0,g.step("up",W,q,Y)},g.saveInput=function(W){g.input=W};var U=b.value;U===void 0&&(U=b.defaultValue),g.state={focused:b.autoFocus};var K=g.getValidValue(g.toNumber(U));return g.state=T(T({},g.state),{},{inputValue:g.toPrecisionAsStep(K),value:K}),g}return Object(Q.a)(S,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var U=this.props,K=U.value,W=U.onChange,q=U.max,Y=U.min,V=this.state.focused;if(g){if(!R(g.value,K)||!R(g.max,q)||!R(g.min,Y)){var te=V?K:this.getValidValue(K),X;this.pressingUpOrDown?X=te:this.inputting?X=this.rawInput:X=this.toPrecisionAsStep(te),this.setState({value:te,inputValue:X})}var se="value"in this.props?K:this.state.value;"max"in this.props&&g.max!==q&&typeof se=="number"&&se>q&&W&&W(q),"min"in this.props&&g.min!==Y&&typeof se=="number"&&se<Y&&W&&W(Y)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var le=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===h.a.BACKSPACE?le=this.cursorStart-1:this.lastKeyCode===h.a.DELETE&&(le=this.cursorStart):le=this.input.value.length,this.fixCaret(le,le)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case h.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case h.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Te){}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 U=g;return U===""?U="":this.isNotCompleteNumber(parseFloat(U))?U=this.state.value:U=this.getValidValue(U),this.toNumber(U)}},{key:"getValueFromEvent",value:function(g){var U=g.target.value.trim().replace(/。/g,".");return v(this.props.decimalSeparator)&&(U=U.replace(this.props.decimalSeparator,".")),U}},{key:"getValidValue",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(g);return isNaN(W)?g:(W<U&&(W=U),W>K&&(W=K),W)}},{key:"setValue",value:function(g,U){var K=this.props.precision,W=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),q=this.state.value,Y=q===void 0?null:q,V=this.state.inputValue,te=V===void 0?null:V,X=typeof W=="number"?W.toFixed(K):"".concat(W),se=W!==Y||X!=="".concat(te);return"value"in this.props?(te=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:te},U)):this.setState({value:W,inputValue:this.toPrecisionAsStep(g)},U),se&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,W=K.precision,q=K.step;if(v(W))return W;var Y=this.getPrecision(U),V=this.getPrecision(q),te=this.getPrecision(g);return g?Math.max(te,Y+V):Y+V}},{key:"getPrecisionFactor",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(g,U);return Math.pow(10,K)}},{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 U=Math.abs(this.getMaxPrecision(g));return isNaN(U)?g.toString():Number(g).toFixed(U)}},{key:"toNumber",value:function(g){var U=this.props.precision,K=this.state.focused,W=g&&g.length>16&&K;return this.isNotCompleteNumber(g)||W?g:v(U)?Math.round(g*Math.pow(10,U))/Math.pow(10,U):Number(g)}},{key:"upStep",value:function(g,U){var K=this.props.step,W=this.getPrecisionFactor(g,U),q=Math.abs(this.getMaxPrecision(g,U)),Y=((W*g+W*K*U)/W).toFixed(q);return this.toNumber(Y)}},{key:"downStep",value:function(g,U){var K=this.props.step,W=this.getPrecisionFactor(g,U),q=Math.abs(this.getMaxPrecision(g,U)),Y=((W*g-W*K*U)/W).toFixed(q);return this.toNumber(Y)}},{key:"step",value:function(g,U){var K=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,q=arguments.length>3?arguments[3]:void 0;this.stop(),U&&(U.persist(),U.preventDefault());var Y=this.props;if(Y.disabled)return;var V=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(V))return;var te=this["".concat(g,"Step")](V,W),X=te>Y.max||te<Y.min;if(te>Y.max?te=Y.max:te<Y.min&&(te=Y.min),this.setValue(te,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),X)return;this.autoStepTimer=setTimeout(function(){K[g](U,W,!0)},q?f:m)}},{key:"fixCaret",value:function(g,U){if(g===void 0||U===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,W=this.input.selectionEnd;(g!==K||U!==W)&&this.input.setSelectionRange(g,U)}catch(q){}}},{key:"render",value:function(){var g,U=this.props,K=U.prefixCls,W=U.disabled,q=U.readOnly,Y=U.useTouch,V=U.autoComplete,te=U.upHandler,X=U.downHandler,se=U.className,le=U.max,Te=U.min,Ee=U.style,Be=U.title,De=U.onMouseEnter,Ve=U.onMouseLeave,_e=U.onMouseOver,Le=U.onMouseOut,tt=U.required,Et=U.onClick,Oe=U.tabIndex,He=U.type,it=U.placeholder,Ae=U.id,re=U.inputMode,ae=U.pattern,ce=U.step,we=U.maxLength,Re=U.autoFocus,ke=U.name,ht=U.onPaste,ft=U.onInput,vt=Object(J.a)(U,["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"]),yt=this.state,Lt=yt.value,Mt=yt.focused,Qe=i()(K,(g={},Object(N.a)(g,se,!!se),Object(N.a)(g,"".concat(K,"-disabled"),W),Object(N.a)(g,"".concat(K,"-focused"),Mt),g)),Pe={};Object.keys(vt).forEach(function(Ce){(Ce.substr(0,5)==="data-"||Ce.substr(0,5)==="aria-"||Ce==="role")&&(Pe[Ce]=vt[Ce])});var lt=!q&&!W,pt=this.getInputDisplayValue(null),Ze=(Lt||Lt===0)&&(isNaN(Lt)||Number(Lt)>=le),st=(Lt||Lt===0)&&(isNaN(Lt)||Number(Lt)<=Te),Ke=Ze||W||q,Ie=st||W||q,Me=i()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(N.a)({},"".concat(K,"-handler-up-disabled"),Ke)),pe=i()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(N.a)({},"".concat(K,"-handler-down-disabled"),Ie)),be=Y?{onTouchStart:Ke?u:this.up,onTouchEnd:this.stop}:{onMouseDown:Ke?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ge=Y?{onTouchStart:Ie?u:this.down,onTouchEnd:this.stop}:{onMouseDown:Ie?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return C.a.createElement("div",{className:Qe,style:Ee,title:Be,onMouseEnter:De,onMouseLeave:Ve,onMouseOver:_e,onMouseOut:Le,onFocus:function(){return null},onBlur:function(){return null}},C.a.createElement("div",{className:"".concat(K,"-handler-wrap")},C.a.createElement("span",Object.assign({unselectable:"on"},be,{role:"button","aria-label":"Increase Value","aria-disabled":Ke,className:Me}),te||C.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:s})),C.a.createElement("span",Object.assign({unselectable:"on"},ge,{role:"button","aria-label":"Decrease Value","aria-disabled":Ie,className:pe}),X||C.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:s}))),C.a.createElement("div",{className:"".concat(K,"-input-wrap")},C.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Te,"aria-valuemax":le,"aria-valuenow":Lt,required:tt,type:He,placeholder:it,onPaste:ht,onClick:Et,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:Oe,autoComplete:V,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:lt?this.onKeyDown:u,onKeyUp:lt?this.onKeyUp:u,autoFocus:Re,maxLength:we,readOnly:q,disabled:W,max:le,min:Te,step:ce,name:ke,title:Be,id:Ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(pt),pattern:ae,inputMode:re,onInput:ft},Pe))))}}]),S}(C.a.Component);p.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:l,required:!1,autoComplete:"off"};var a=p,r=me.a=a},dqUG:function($e,me,z){var J=z("Gev7"),N=z("bYtY"),L=z("6GrX"),Q=z("pzxd"),D=z("gut8"),w=D.ContextCachedBy,_=function(C){J.call(this,C)};_.prototype={constructor:_,type:"text",brush:function(C,x){var i=this.style;this.__dirty&&Q.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var h=i.text;if(h!=null&&(h+=""),!Q.needDrawText(h,i)){C.__attrCachedBy=w.NONE;return}this.setTransform(C),Q.renderText(this,C,h,i,null,x),this.restoreTransform(C)},getBoundingRect:function(){var C=this.style;if(this.__dirty&&Q.normalizeTextStyle(C,!0),!this._rect){var x=C.text;x!=null?x+="":x="";var i=L.getBoundingRect(C.text+"",C.font,C.textAlign,C.textVerticalAlign,C.textPadding,C.textLineHeight,C.rich);if(i.x+=C.x||0,i.y+=C.y||0,Q.getStroke(C.textStroke,C.textStrokeWidth)){var h=C.textStrokeWidth;i.x-=h/2,i.y-=h/2,i.width+=h,i.height+=h}this._rect=i}return this._rect}},N.inherits(_,J);var c=_;$e.exports=c},fW2E:function($e,me){var z={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function J(N,L,Q){return z.hasOwnProperty(L)?Q*=N.dpr:Q}$e.exports=J},fyJ8:function($e,me,z){"use strict";var J=z("rePB"),N=z("VTBJ"),L=z("Ff2n"),Q=z("U8pU"),D=z("q1tI"),w=z.n(D),_=z("TSYQ"),c=z.n(_),C=z("c+Xe"),x=z("sR1s");function i(B){return B&&Object(Q.a)(B)==="object"&&!Array.isArray(B)&&!D.isValidElement(B)}function h(B){return typeof B=="string"?!0:Object(C.c)(B)}function O(B,u){var s,l=B.prefixCls,f=B.className,m=B.record,E=B.index,v=B.dataIndex,R=B.render,p=B.children,a=B.component,r=a===void 0?"td":a,n=B.colSpan,o=B.rowSpan,S=B.fixLeft,b=B.fixRight,g=B.firstFixLeft,U=B.lastFixLeft,K=B.firstFixRight,W=B.lastFixRight,q=B.appendNode,Y=B.additionalProps,V=Y===void 0?{}:Y,te=B.ellipsis,X=B.align,se=B.rowType,le=B.isSticky,Te="".concat(l,"-cell"),Ee,Be;if(p)Be=p;else{var De=Object(x.b)(m,v);if(Be=De,R){var Ve=R(De,m,E);i(Ve)?(Be=Ve.children,Ee=Ve.props):Be=Ve}}Object(Q.a)(Be)==="object"&&!Array.isArray(Be)&&!D.isValidElement(Be)&&(Be=null),te&&(U||K)&&(Be=D.createElement("span",{className:"".concat(Te,"-content")},Be));var _e=Ee||{},Le=_e.colSpan,tt=_e.rowSpan,Et=_e.style,Oe=_e.className,He=Object(L.a)(_e,["colSpan","rowSpan","style","className"]),it=Le!==void 0?Le:n,Ae=tt!==void 0?tt:o;if(it===0||Ae===0)return null;var re={},ae=typeof S=="number",ce=typeof b=="number";ae&&(re.position="sticky",re.left=S),ce&&(re.position="sticky",re.right=b);var we={};X&&(we.textAlign=X);var Re,ke=te===!0?{showTitle:!0}:te;ke&&(ke.showTitle||se==="header")&&(typeof Be=="string"||typeof Be=="number"?Re=Be.toString():D.isValidElement(Be)&&typeof Be.props.children=="string"&&(Re=Be.props.children));var ht=Object(N.a)(Object(N.a)(Object(N.a)({title:Re},He),V),{},{colSpan:it&&it!==1?it:null,rowSpan:Ae&&Ae!==1?Ae:null,className:c()(Te,f,(s={},Object(J.a)(s,"".concat(Te,"-fix-left"),ae),Object(J.a)(s,"".concat(Te,"-fix-left-first"),g),Object(J.a)(s,"".concat(Te,"-fix-left-last"),U),Object(J.a)(s,"".concat(Te,"-fix-right"),ce),Object(J.a)(s,"".concat(Te,"-fix-right-first"),K),Object(J.a)(s,"".concat(Te,"-fix-right-last"),W),Object(J.a)(s,"".concat(Te,"-ellipsis"),te),Object(J.a)(s,"".concat(Te,"-with-append"),q),Object(J.a)(s,"".concat(Te,"-fix-sticky"),(ae||ce)&&le),s),V.className,Oe),style:Object(N.a)(Object(N.a)(Object(N.a)(Object(N.a)({},V.style),we),re),Et),ref:h(r)?u:null});return D.createElement(r,Object.assign({},ht),q,Be)}var T=D.forwardRef(O);T.displayName="Cell";var y=D.memo(T,function(B,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,B.record):!1});me.a=y},gut8:function($e,me){var z={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},J=9;me.ContextCachedBy=z,me.WILL_BE_RESTORED=J},h7HQ:function($e,me,z){var J=z("y+Vt"),N=z("T6xi"),L=J.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(Q,D){N.buildPath(Q,D,!0)}});$e.exports=L},hOwI:function($e,me){var z=Math.log(2);function J(L,Q,D,w,_,c){var C=w+"-"+_,x=L.length;if(c.hasOwnProperty(C))return c[C];if(Q===1){var i=Math.round(Math.log((1<<x)-1&~_)/z);return L[D][i]}for(var h=w|1<<D,O=D+1;w&1<<O;)O++;for(var T=0,y=0,B=0;y<x;y++){var u=1<<y;u&_||(T+=(B%2?-1:1)*L[D][y]*J(L,Q-1,O,h,_|u,c),B++)}return c[C]=T,T}function N(L,Q){var D=[[L[0],L[1],1,0,0,0,-Q[0]*L[0],-Q[0]*L[1]],[0,0,0,L[0],L[1],1,-Q[1]*L[0],-Q[1]*L[1]],[L[2],L[3],1,0,0,0,-Q[2]*L[2],-Q[2]*L[3]],[0,0,0,L[2],L[3],1,-Q[3]*L[2],-Q[3]*L[3]],[L[4],L[5],1,0,0,0,-Q[4]*L[4],-Q[4]*L[5]],[0,0,0,L[4],L[5],1,-Q[5]*L[4],-Q[5]*L[5]],[L[6],L[7],1,0,0,0,-Q[6]*L[6],-Q[6]*L[7]],[0,0,0,L[6],L[7],1,-Q[7]*L[6],-Q[7]*L[7]]],w={},_=J(D,8,0,0,0,w);if(_===0)return;for(var c=[],C=0;C<8;C++)for(var x=0;x<8;x++)c[x]==null&&(c[x]=0),c[x]+=((C+x)%2?-1:1)*J(D,7,C===0?1:0,1<<C,1<<x,w)/_*Q[C];return function(i,h,O){var T=h*c[6]+O*c[7]+1;i[0]=(h*c[0]+O*c[1]+c[2])/T,i[1]=(h*c[3]+O*c[4]+c[5])/T}}me.buildTransformer=N},hW8S:function($e,me,z){"use strict";z.d(me,"a",function(){return Q}),z.d(me,"c",function(){return D}),z.d(me,"b",function(){return w});var J=z("VTBJ"),N=z("Ff2n"),L=z("Kwbf"),Q="RC_TABLE_INTERNAL_COL_DEFINE";function D(_){var c=_.expandable,C=Object(N.a)(_,["expandable"]);return"expandable"in _?Object(J.a)(Object(J.a)({},C),c):C}function w(_){return Object.keys(_).reduce(function(c,C){return(C.substr(0,5)==="data-"||C.substr(0,5)==="aria-")&&(c[C]=_[C]),c},{})}},hX1E:function($e,me){var z=Math.PI*2;function J(N){return N%=z,N<0&&(N+=z),N}me.normalizeRadian=J},hydK:function($e,me){var z="http://www.w3.org/2000/svg";function J(N){return document.createElementNS(z,N)}me.createElement=J},hyiK:function($e,me){function z(J,N,L,Q,D,w){if(w>N&&w>Q||w<N&&w<Q)return 0;if(Q===N)return 0;var _=Q<N?1:-1,c=(w-N)/(Q-N);(c===1||c===0)&&(_=Q<N?.5:-.5);var C=c*(L-J)+J;return C===D?Infinity:C>D?_:0}$e.exports=z},iXp4:function($e,me,z){var J=z("ItGF"),N=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function L(Q){return J.browser.ie&&J.browser.version>=11?function(){var D=this.__clipPaths,w=this.style,_;if(D)for(var c=0;c<D.length;c++){var C=D[c],x=C&&C.shape,i=C&&C.type;if(x&&(i==="sector"&&x.startAngle===x.endAngle||i==="rect"&&(!x.width||!x.height))){for(var h=0;h<N.length;h++)N[h][2]=w[N[h][0]],w[N[h][0]]=N[h][1];_=!0;break}}if(Q.apply(this,arguments),_)for(var h=0;h<N.length;h++)w[N[h][0]]=N[h][2]}:Q}$e.exports=L},j5sG:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.createSensor=void 0;var J=N(z("NohK"));function N(Q){return Q&&Q.__esModule?Q:{default:Q}}var L=function(D){var w=void 0,_=[],c=(0,J.default)(function(){_.forEach(function(O){O(D)})}),C=function(){var T=new ResizeObserver(c);return T.observe(D),c(),T},x=function(T){w||(w=C()),_.indexOf(T)===-1&&_.push(T)},i=function(){w.disconnect(),_=[],w=void 0},h=function(T){var y=_.indexOf(T);y!==-1&&_.splice(y,1),_.length===0&&w&&i()};return{element:D,bind:x,destroy:i,unbind:h}};me.createSensor=L},jTL6:function($e,me,z){var J=z("y+Vt"),N=J.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(L,Q){var D=Q.cx,w=Q.cy,_=Math.max(Q.r,0),c=Q.startAngle,C=Q.endAngle,x=Q.clockwise,i=Math.cos(c),h=Math.sin(c);L.moveTo(i*_+D,h*_+w),L.arc(D,w,_,c,C,!x)}});$e.exports=N},juDX:function($e,me,z){z("P47w");var J=z("aX58"),N=J.registerPainter,L=z("3CBa");N("svg",L)},kSUc:function($e,me,z){},"kVK+":function($e,me){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */me.read=function(z,J,N,L,Q){var D,w,_=Q*8-L-1,c=(1<<_)-1,C=c>>1,x=-7,i=N?Q-1:0,h=N?-1:1,O=z[J+i];for(i+=h,D=O&(1<<-x)-1,O>>=-x,x+=_;x>0;D=D*256+z[J+i],i+=h,x-=8);for(w=D&(1<<-x)-1,D>>=-x,x+=L;x>0;w=w*256+z[J+i],i+=h,x-=8);if(D===0)D=1-C;else{if(D===c)return w?NaN:(O?-1:1)*Infinity;w=w+Math.pow(2,L),D=D-C}return(O?-1:1)*w*Math.pow(2,D-L)},me.write=function(z,J,N,L,Q,D){var w,_,c,C=D*8-Q-1,x=(1<<C)-1,i=x>>1,h=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=L?0:D-1,T=L?1:-1,y=J<0||J===0&&1/J<0?1:0;for(J=Math.abs(J),isNaN(J)||J===Infinity?(_=isNaN(J)?1:0,w=x):(w=Math.floor(Math.log(J)/Math.LN2),J*(c=Math.pow(2,-w))<1&&(w--,c*=2),w+i>=1?J+=h/c:J+=h*Math.pow(2,1-i),J*c>=2&&(w++,c/=2),w+i>=x?(_=0,w=x):w+i>=1?(_=(J*c-1)*Math.pow(2,Q),w=w+i):(_=J*Math.pow(2,i-1)*Math.pow(2,Q),w=0));Q>=8;z[N+O]=_&255,O+=T,_/=256,Q-=8);for(w=w<<Q|_,C+=Q;C>0;z[N+O]=w&255,O+=T,w/=256,C-=8);z[N+O-T]|=y*128}},lZu9:function($e,me,z){(function(J){J(z("VrN/"),z("1eCo"),z("8EBN"))})(function(J){"use strict";J.defineMode("markdown",function(N,L){var Q=J.getMode(N,"text/html"),D=Q.name=="null";function w(Y){if(J.findModeByName){var V=J.findModeByName(Y);V&&(Y=V.mime||V.mimes[0])}var te=J.getMode(N,Y);return te.name=="null"?null:te}L.highlightFormatting===void 0&&(L.highlightFormatting=!1),L.maxBlockquoteDepth===void 0&&(L.maxBlockquoteDepth=0),L.taskLists===void 0&&(L.taskLists=!1),L.strikethrough===void 0&&(L.strikethrough=!1),L.emoji===void 0&&(L.emoji=!1),L.fencedCodeBlockHighlighting===void 0&&(L.fencedCodeBlockHighlighting=!0),L.fencedCodeBlockDefaultMode===void 0&&(L.fencedCodeBlockDefaultMode="text/plain"),L.xml===void 0&&(L.xml=!0),L.tokenTypeOverrides===void 0&&(L.tokenTypeOverrides={});var _={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 c in _)_.hasOwnProperty(c)&&L.tokenTypeOverrides[c]&&(_[c]=L.tokenTypeOverrides[c]);var C=/^([*\-_])(?:\s*\1){2,}\s*$/,x=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,h=L.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,O=/^ {0,3}(?:\={1,}|-{2,})\s*$/,T=/^[^#!\[\]*_\\<>` "'(~:]+/,y=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,B=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,s=" ";function l(Y,V,te){return V.f=V.inline=te,te(Y,V)}function f(Y,V,te){return V.f=V.block=te,te(Y,V)}function m(Y){return!Y||!/\S/.test(Y.string)}function E(Y){if(Y.linkTitle=!1,Y.linkHref=!1,Y.linkText=!1,Y.em=!1,Y.strong=!1,Y.strikethrough=!1,Y.quote=0,Y.indentedCode=!1,Y.f==R){var V=D;if(!V){var te=J.innerMode(Q,Y.htmlState);V=te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText}V&&(Y.f=n,Y.block=v,Y.htmlState=null)}return Y.trailingSpace=0,Y.trailingSpaceNewLine=!1,Y.prevLine=Y.thisLine,Y.thisLine={stream:null},null}function v(Y,V){var te=Y.column()===V.indentation,X=m(V.prevLine.stream),se=V.indentedCode,le=V.prevLine.hr,Te=V.list!==!1,Ee=(V.listStack[V.listStack.length-1]||0)+3;V.indentedCode=!1;var Be=V.indentation;if(V.indentationDiff===null&&(V.indentationDiff=V.indentation,Te)){for(V.list=null;Be<V.listStack[V.listStack.length-1];)V.listStack.pop(),V.listStack.length?V.indentation=V.listStack[V.listStack.length-1]:V.list=!1;V.list!==!1&&(V.indentationDiff=Be-V.listStack[V.listStack.length-1])}var De=!X&&!le&&!V.prevLine.header&&(!Te||!se)&&!V.prevLine.fencedCodeEnd,Ve=(V.list===!1||le||X)&&V.indentation<=Ee&&Y.match(C),_e=null;if(V.indentationDiff>=4&&(se||V.prevLine.fencedCodeEnd||V.prevLine.header||X))return Y.skipToEnd(),V.indentedCode=!0,_.code;if(Y.eatSpace())return null;if(te&&V.indentation<=Ee&&(_e=Y.match(h))&&_e[1].length<=6)return V.quote=0,V.header=_e[1].length,V.thisLine.header=!0,L.highlightFormatting&&(V.formatting="header"),V.f=V.inline,a(V);if(V.indentation<=Ee&&Y.eat(">"))return V.quote=te?1:V.quote+1,L.highlightFormatting&&(V.formatting="quote"),Y.eatSpace(),a(V);if(!Ve&&!V.setext&&te&&V.indentation<=Ee&&(_e=Y.match(x))){var Le=_e[1]?"ol":"ul";return V.indentation=Be+Y.current().length,V.list=!0,V.quote=0,V.listStack.push(V.indentation),V.em=!1,V.strong=!1,V.code=!1,V.strikethrough=!1,L.taskLists&&Y.match(i,!1)&&(V.taskList=!0),V.f=V.inline,L.highlightFormatting&&(V.formatting=["list","list-"+Le]),a(V)}else{if(te&&V.indentation<=Ee&&(_e=Y.match(y,!0)))return V.quote=0,V.fencedEndRE=new RegExp(_e[1]+"+ *$"),V.localMode=L.fencedCodeBlockHighlighting&&w(_e[2]||L.fencedCodeBlockDefaultMode),V.localMode&&(V.localState=J.startState(V.localMode)),V.f=V.block=p,L.highlightFormatting&&(V.formatting="code-block"),V.code=-1,a(V);if(V.setext||(!De||!Te)&&!V.quote&&V.list===!1&&!V.code&&!Ve&&!B.test(Y.string)&&(_e=Y.lookAhead(1))&&(_e=_e.match(O)))return V.setext?(V.header=V.setext,V.setext=0,Y.skipToEnd(),L.highlightFormatting&&(V.formatting="header")):(V.header=_e[0].charAt(0)=="="?1:2,V.setext=V.header),V.thisLine.header=!0,V.f=V.inline,a(V);if(Ve)return Y.skipToEnd(),V.hr=!0,V.thisLine.hr=!0,_.hr;if(Y.peek()==="[")return l(Y,V,U)}return l(Y,V,V.inline)}function R(Y,V){var te=Q.token(Y,V.htmlState);if(!D){var X=J.innerMode(Q,V.htmlState);(X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText||V.md_inside&&Y.current().indexOf(">")>-1)&&(V.f=n,V.block=v,V.htmlState=null)}return te}function p(Y,V){var te=V.listStack[V.listStack.length-1]||0,X=V.indentation<te,se=te+3;if(V.fencedEndRE&&V.indentation<=se&&(X||Y.match(V.fencedEndRE))){L.highlightFormatting&&(V.formatting="code-block");var le;return X||(le=a(V)),V.localMode=V.localState=null,V.block=v,V.f=n,V.fencedEndRE=null,V.code=0,V.thisLine.fencedCodeEnd=!0,X?f(Y,V,V.block):le}else return V.localMode?V.localMode.token(Y,V.localState):(Y.skipToEnd(),_.code)}function a(Y){var V=[];if(Y.formatting){V.push(_.formatting),typeof Y.formatting=="string"&&(Y.formatting=[Y.formatting]);for(var te=0;te<Y.formatting.length;te++)V.push(_.formatting+"-"+Y.formatting[te]),Y.formatting[te]==="header"&&V.push(_.formatting+"-"+Y.formatting[te]+"-"+Y.header),Y.formatting[te]==="quote"&&(!L.maxBlockquoteDepth||L.maxBlockquoteDepth>=Y.quote?V.push(_.formatting+"-"+Y.formatting[te]+"-"+Y.quote):V.push("error"))}if(Y.taskOpen)return V.push("meta"),V.length?V.join(" "):null;if(Y.taskClosed)return V.push("property"),V.length?V.join(" "):null;if(Y.linkHref?V.push(_.linkHref,"url"):(Y.strong&&V.push(_.strong),Y.em&&V.push(_.em),Y.strikethrough&&V.push(_.strikethrough),Y.emoji&&V.push(_.emoji),Y.linkText&&V.push(_.linkText),Y.code&&V.push(_.code),Y.image&&V.push(_.image),Y.imageAltText&&V.push(_.imageAltText,"link"),Y.imageMarker&&V.push(_.imageMarker)),Y.header&&V.push(_.header,_.header+"-"+Y.header),Y.quote&&(V.push(_.quote),!L.maxBlockquoteDepth||L.maxBlockquoteDepth>=Y.quote?V.push(_.quote+"-"+Y.quote):V.push(_.quote+"-"+L.maxBlockquoteDepth)),Y.list!==!1){var X=(Y.listStack.length-1)%3;X?X===1?V.push(_.list2):V.push(_.list3):V.push(_.list1)}return Y.trailingSpaceNewLine?V.push("trailing-space-new-line"):Y.trailingSpace&&V.push("trailing-space-"+(Y.trailingSpace%2?"a":"b")),V.length?V.join(" "):null}function r(Y,V){return Y.match(T,!0)?a(V):void 0}function n(Y,V){var te=V.text(Y,V);if(typeof te!="undefined")return te;if(V.list)return V.list=null,a(V);if(V.taskList){var X=Y.match(i,!0)[1]===" ";return X?V.taskOpen=!0:V.taskClosed=!0,L.highlightFormatting&&(V.formatting="task"),V.taskList=!1,a(V)}if(V.taskOpen=!1,V.taskClosed=!1,V.header&&Y.match(/^#+$/,!0))return L.highlightFormatting&&(V.formatting="header"),a(V);var se=Y.next();if(V.linkTitle){V.linkTitle=!1;var le=se;se==="("&&(le=")"),le=(le+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+le+"\\\\]+|\\\\\\\\|\\\\.)"+le;if(Y.match(new RegExp(Te),!0))return _.linkHref}if(se==="`"){var Ee=V.formatting;L.highlightFormatting&&(V.formatting="code"),Y.eatWhile("`");var Be=Y.current().length;if(V.code==0&&(!V.quote||Be==1))return V.code=Be,a(V);if(Be==V.code){var De=a(V);return V.code=0,De}else return V.formatting=Ee,a(V)}else if(V.code)return a(V);if(se==="\\"&&(Y.next(),L.highlightFormatting)){var Ve=a(V),_e=_.formatting+"-escape";return Ve?Ve+" "+_e:_e}if(se==="!"&&Y.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return V.imageMarker=!0,V.image=!0,L.highlightFormatting&&(V.formatting="image"),a(V);if(se==="["&&V.imageMarker&&Y.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return V.imageMarker=!1,V.imageAltText=!0,L.highlightFormatting&&(V.formatting="image"),a(V);if(se==="]"&&V.imageAltText){L.highlightFormatting&&(V.formatting="image");var Ve=a(V);return V.imageAltText=!1,V.image=!1,V.inline=V.f=S,Ve}if(se==="["&&!V.image)return V.linkText&&Y.match(/^.*?\]/)||(V.linkText=!0,L.highlightFormatting&&(V.formatting="link")),a(V);if(se==="]"&&V.linkText){L.highlightFormatting&&(V.formatting="link");var Ve=a(V);return V.linkText=!1,V.inline=V.f=Y.match(/\(.*?\)| ?\[.*?\]/,!1)?S:n,Ve}if(se==="<"&&Y.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){V.f=V.inline=o,L.highlightFormatting&&(V.formatting="link");var Ve=a(V);return Ve?Ve+=" ":Ve="",Ve+_.linkInline}if(se==="<"&&Y.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){V.f=V.inline=o,L.highlightFormatting&&(V.formatting="link");var Ve=a(V);return Ve?Ve+=" ":Ve="",Ve+_.linkEmail}if(L.xml&&se==="<"&&Y.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Le=Y.string.indexOf(">",Y.pos);if(Le!=-1){var tt=Y.string.substring(Y.start,Le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(V.md_inside=!0)}return Y.backUp(1),V.htmlState=J.startState(Q),f(Y,V,R)}if(L.xml&&se==="<"&&Y.match(/^\/\w*?>/))return V.md_inside=!1,"tag";if(se==="*"||se==="_"){for(var Et=1,Oe=Y.pos==1?" ":Y.string.charAt(Y.pos-2);Et<3&&Y.eat(se);)Et++;var He=Y.peek()||" ",it=!/\s/.test(He)&&(!u.test(He)||/\s/.test(Oe)||u.test(Oe)),Ae=!/\s/.test(Oe)&&(!u.test(Oe)||/\s/.test(He)||u.test(He)),re=null,ae=null;if(Et%2&&(!V.em&&it&&(se==="*"||!Ae||u.test(Oe))?re=!0:V.em==se&&Ae&&(se==="*"||!it||u.test(He))&&(re=!1)),Et>1&&(!V.strong&&it&&(se==="*"||!Ae||u.test(Oe))?ae=!0:V.strong==se&&Ae&&(se==="*"||!it||u.test(He))&&(ae=!1)),ae!=null||re!=null){L.highlightFormatting&&(V.formatting=re==null?"strong":ae==null?"em":"strong em"),re===!0&&(V.em=se),ae===!0&&(V.strong=se);var De=a(V);return re===!1&&(V.em=!1),ae===!1&&(V.strong=!1),De}}else if(se===" "&&(Y.eat("*")||Y.eat("_"))){if(Y.peek()===" ")return a(V);Y.backUp(1)}if(L.strikethrough){if(se==="~"&&Y.eatWhile(se)){if(V.strikethrough){L.highlightFormatting&&(V.formatting="strikethrough");var De=a(V);return V.strikethrough=!1,De}else if(Y.match(/^[^\s]/,!1))return V.strikethrough=!0,L.highlightFormatting&&(V.formatting="strikethrough"),a(V)}else if(se===" "&&Y.match(/^~~/,!0)){if(Y.peek()===" ")return a(V);Y.backUp(2)}}if(L.emoji&&se===":"&&Y.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){V.emoji=!0,L.highlightFormatting&&(V.formatting="emoji");var ce=a(V);return V.emoji=!1,ce}return se===" "&&(Y.match(/^ +$/,!1)?V.trailingSpace++:V.trailingSpace&&(V.trailingSpaceNewLine=!0)),a(V)}function o(Y,V){var te=Y.next();if(te===">"){V.f=V.inline=n,L.highlightFormatting&&(V.formatting="link");var X=a(V);return X?X+=" ":X="",X+_.linkInline}return Y.match(/^[^>]+/,!0),_.linkInline}function S(Y,V){if(Y.eatSpace())return null;var te=Y.next();return te==="("||te==="["?(V.f=V.inline=g(te==="("?")":"]"),L.highlightFormatting&&(V.formatting="link-string"),V.linkHref=!0,a(V)):"error"}var b={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(Y){return function(V,te){var X=V.next();if(X===Y){te.f=te.inline=n,L.highlightFormatting&&(te.formatting="link-string");var se=a(te);return te.linkHref=!1,se}return V.match(b[Y]),te.linkHref=!0,a(te)}}function U(Y,V){return Y.match(/^([^\]\\]|\\.)*\]:/,!1)?(V.f=K,Y.next(),L.highlightFormatting&&(V.formatting="link"),V.linkText=!0,a(V)):l(Y,V,n)}function K(Y,V){if(Y.match(/^\]:/,!0)){V.f=V.inline=W,L.highlightFormatting&&(V.formatting="link");var te=a(V);return V.linkText=!1,te}return Y.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function W(Y,V){return Y.eatSpace()?null:(Y.match(/^[^\s]+/,!0),Y.peek()===void 0?V.linkTitle=!0:Y.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),V.f=V.inline=n,_.linkHref+" url")}var q={startState:function(){return{f:v,prevLine:{stream:null},thisLine:{stream:null},block:v,htmlState:null,indentation:0,inline:n,text:r,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(Y){return{f:Y.f,prevLine:Y.prevLine,thisLine:Y.thisLine,block:Y.block,htmlState:Y.htmlState&&J.copyState(Q,Y.htmlState),indentation:Y.indentation,localMode:Y.localMode,localState:Y.localMode?J.copyState(Y.localMode,Y.localState):null,inline:Y.inline,text:Y.text,formatting:!1,linkText:Y.linkText,linkTitle:Y.linkTitle,linkHref:Y.linkHref,code:Y.code,em:Y.em,strong:Y.strong,strikethrough:Y.strikethrough,emoji:Y.emoji,header:Y.header,setext:Y.setext,hr:Y.hr,taskList:Y.taskList,list:Y.list,listStack:Y.listStack.slice(0),quote:Y.quote,indentedCode:Y.indentedCode,trailingSpace:Y.trailingSpace,trailingSpaceNewLine:Y.trailingSpaceNewLine,md_inside:Y.md_inside,fencedEndRE:Y.fencedEndRE}},token:function(Y,V){if(V.formatting=!1,Y!=V.thisLine.stream){if(V.header=0,V.hr=!1,Y.match(/^\s*$/,!0))return E(V),null;if(V.prevLine=V.thisLine,V.thisLine={stream:Y},V.taskList=!1,V.trailingSpace=0,V.trailingSpaceNewLine=!1,!V.localState&&(V.f=V.block,V.f!=R)){var te=Y.match(/^\s*/,!0)[0].replace(/\t/g,s).length;if(V.indentation=te,V.indentationDiff=null,te>0)return null}}return V.f(Y,V)},innerMode:function(Y){return Y.block==R?{state:Y.htmlState,mode:Q}:Y.localState?{state:Y.localState,mode:Y.localMode}:{state:Y,mode:q}},indent:function(Y,V,te){return Y.block==R&&Q.indent?Q.indent(Y.htmlState,V,te):Y.localState&&Y.localMode.indent?Y.localMode.indent(Y.localState,V,te):J.Pass},blankLine:E,getType:a,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return q},"xml"),J.defineMIME("text/markdown","markdown"),J.defineMIME("text/x-markdown","markdown")})},loD1:function($e,me){function z(J,N,L,Q,D,w,_){if(D===0)return!1;var c=D,C=0,x=J;if(_>N+c&&_>Q+c||_<N-c&&_<Q-c||w>J+c&&w>L+c||w<J-c&&w<L-c)return!1;if(J!==L)C=(N-Q)/(J-L),x=(J*Q-L*N)/(J-L);else return Math.abs(w-J)<=c/2;var i=C*w-_+x,h=i*i/(C*C+1);return h<=c/2*c/2}me.containStroke=z},mFDi:function($e,me,z){var J=z("QBsz"),N=z("Fofx"),L=J.applyTransform,Q=Math.min,D=Math.max;function w(c,C,x,i){x<0&&(c=c+x,x=-x),i<0&&(C=C+i,i=-i),this.x=c,this.y=C,this.width=x,this.height=i}w.prototype={constructor:w,union:function(c){var C=Q(c.x,this.x),x=Q(c.y,this.y);this.width=D(c.x+c.width,this.x+this.width)-C,this.height=D(c.y+c.height,this.y+this.height)-x,this.x=C,this.y=x},applyTransform:function(){var c=[],C=[],x=[],i=[];return function(h){if(!h)return;c[0]=x[0]=this.x,c[1]=i[1]=this.y,C[0]=i[0]=this.x+this.width,C[1]=x[1]=this.y+this.height,L(c,c,h),L(C,C,h),L(x,x,h),L(i,i,h),this.x=Q(c[0],C[0],x[0],i[0]),this.y=Q(c[1],C[1],x[1],i[1]);var O=D(c[0],C[0],x[0],i[0]),T=D(c[1],C[1],x[1],i[1]);this.width=O-this.x,this.height=T-this.y}}(),calculateTransform:function(c){var C=this,x=c.width/C.width,i=c.height/C.height,h=N.create();return N.translate(h,h,[-C.x,-C.y]),N.scale(h,h,[x,i]),N.translate(h,h,[c.x,c.y]),h},intersect:function(c){if(!c)return!1;c instanceof w||(c=w.create(c));var C=this,x=C.x,i=C.x+C.width,h=C.y,O=C.y+C.height,T=c.x,y=c.x+c.width,B=c.y,u=c.y+c.height;return!(i<T||y<x||O<B||u<h)},contain:function(c,C){var x=this;return c>=x.x&&c<=x.x+x.width&&C>=x.y&&C<=x.y+x.height},clone:function(){return new w(this.x,this.y,this.width,this.height)},copy:function(c){this.x=c.x,this.y=c.y,this.width=c.width,this.height=c.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},w.create=function(c){return new w(c.x,c.y,c.width,c.height)};var _=w;$e.exports=_},mLcG:function($e,me){var z=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(J){setTimeout(J,16)};$e.exports=z},n1HI:function($e,me,z){var J=z("hX1E"),N=J.normalizeRadian,L=Math.PI*2;function Q(D,w,_,c,C,x,i,h,O){if(i===0)return!1;var T=i;h-=D,O-=w;var y=Math.sqrt(h*h+O*O);if(y-T>_||y+T<_)return!1;if(Math.abs(c-C)%L<1e-4)return!0;if(x){var B=c;c=N(C),C=N(B)}else c=N(c),C=N(C);c>C&&(C+=L);var u=Math.atan2(O,h);return u<0&&(u+=L),u>=c&&u<=C||u+L>=c&&u+L<=C}me.containStroke=Q},n6Mw:function($e,me,z){var J=z("SrGk"),N=z("bYtY"),L=z("Fofx");function Q(w,_){J.call(this,w,_,"clipPath","__clippath_in_use__")}N.inherits(Q,J),Q.prototype.update=function(w){var _=this.getSvgElement(w);_&&this.updateDom(_,w.__clipPaths,!1);var c=this.getTextSvgElement(w);c&&this.updateDom(c,w.__clipPaths,!0),this.markUsed(w)},Q.prototype.updateDom=function(w,_,c){if(_&&_.length>0){var C=this.getDefs(!0),x=_[0],i,h,O=c?"_textDom":"_dom";x[O]?(h=x[O].getAttribute("id"),i=x[O],C.contains(i)||C.appendChild(i)):(h="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",h),C.appendChild(i),x[O]=i);var T=this.getSvgProxy(x);if(x.transform&&x.parent.invTransform&&!c){var y=Array.prototype.slice.call(x.transform);L.mul(x.transform,x.parent.invTransform,x.transform),T.brush(x),x.transform=y}else T.brush(x);var B=this.getSvgElement(x);i.innerHTML="",i.appendChild(B.cloneNode()),w.setAttribute("clip-path","url(#"+h+")"),_.length>1&&this.updateDom(i,_.slice(1),c)}else w&&w.setAttribute("clip-path","none")},Q.prototype.markUsed=function(w){var _=this;w.__clipPaths&&N.each(w.__clipPaths,function(c){c._dom&&J.prototype.markUsed.call(_,c._dom),c._textDom&&J.prototype.markUsed.call(_,c._textDom)})};var D=Q;$e.exports=D},n6Qo:function($e,me,z){"use strict";z.d(me,"a",function(){return c});var J=z("q1tI"),N=z("biw7"),L=z("fyJ8");function Q(C){var x=C.className,i=C.index,h=C.children,O=C.colSpan,T=C.rowSpan,y=J.useContext(N.a),B=y.prefixCls,u=y.fixedInfoList,s=u[i];return J.createElement(L.a,Object.assign({className:x,index:i,component:"td",prefixCls:B,record:null,dataIndex:null,render:function(){return{children:h,props:{colSpan:O,rowSpan:T}}}},s))}function D(C){return J.createElement("tr",Object.assign({},C))}function w(C){var x=C.children,i=J.useContext(N.a),h=i.prefixCls;return J.createElement("tfoot",{className:"".concat(h,"-summary")},x)}var _=me.b=w,c={Cell:Q,Row:D}},nCxF:function($e,me,z){var J=z("QBsz"),N=J.min,L=J.max,Q=J.scale,D=J.distance,w=J.add,_=J.clone,c=J.sub;function C(x,i,h,O){var T=[],y=[],B=[],u=[],s,l,f,m;if(O){f=[Infinity,Infinity],m=[-Infinity,-Infinity];for(var E=0,v=x.length;E<v;E++)N(f,f,x[E]),L(m,m,x[E]);N(f,f,O[0]),L(m,m,O[1])}for(var E=0,v=x.length;E<v;E++){var R=x[E];if(h)s=x[E?E-1:v-1],l=x[(E+1)%v];else if(E===0||E===v-1){T.push(_(x[E]));continue}else s=x[E-1],l=x[E+1];c(y,l,s),Q(y,y,i);var p=D(R,s),a=D(R,l),r=p+a;r!==0&&(p/=r,a/=r),Q(B,y,-p),Q(u,y,a);var n=w([],R,B),o=w([],R,u);O&&(L(n,n,f),N(n,n,m),L(o,o,f),N(o,o,m)),T.push(n),T.push(o)}return h&&T.push(T.shift()),T}$e.exports=C},nPnh:function($e,me){var z=Math.round;function J(Q,D,w){if(!D)return;var _=D.x1,c=D.x2,C=D.y1,x=D.y2;Q.x1=_,Q.x2=c,Q.y1=C,Q.y2=x;var i=w&&w.lineWidth;if(!i)return;z(_*2)===z(c*2)&&(Q.x1=Q.x2=L(_,i,!0)),z(C*2)===z(x*2)&&(Q.y1=Q.y2=L(C,i,!0))}function N(Q,D,w){if(!D)return;var _=D.x,c=D.y,C=D.width,x=D.height;Q.x=_,Q.y=c,Q.width=C,Q.height=x;var i=w&&w.lineWidth;if(!i)return;Q.x=L(_,i,!0),Q.y=L(c,i,!0),Q.width=Math.max(L(_+C,i,!1)-Q.x,C===0?0:1),Q.height=Math.max(L(c+x,i,!1)-Q.y,x===0?0:1)}function L(Q,D,w){if(!D)return Q;var _=z(Q*2);return(_+z(D))%2===0?_/2:(_+(w?1:-1))/2}me.subPixelOptimizeLine=J,me.subPixelOptimizeRect=N,me.subPixelOptimize=L},ni6a:function($e,me,z){var J=z("pzxd"),N=z("mFDi"),L=z("gut8"),Q=L.WILL_BE_RESTORED,D=new N,w=function(){};w.prototype={constructor:w,drawRectText:function(c,C){var x=this.style;C=x.textRect||C,this.__dirty&&J.normalizeTextStyle(x,!0);var i=x.text;if(i!=null&&(i+=""),!J.needDrawText(i,x))return;c.save();var h=this.transform;x.transformText?this.setTransform(c):h&&(D.copy(C),D.applyTransform(h),C=D),J.renderText(this,c,i,x,C,Q),c.restore()}};var _=w;$e.exports=_},osHv:function($e,me,z){(function(J){J(z("VrN/"))})(function(J){"use strict";var N=J.Pos;function L(u,s){return u.line-s.line||u.ch-s.ch}var Q="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",D=Q+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",w=new RegExp("<(/?)(["+Q+"]["+D+"]*)","g");function _(u,s,l,f){this.line=s,this.ch=l,this.cm=u,this.text=u.getLine(s),this.min=f?Math.max(f.from,u.firstLine()):u.firstLine(),this.max=f?Math.min(f.to-1,u.lastLine()):u.lastLine()}function c(u,s){var l=u.cm.getTokenTypeAt(N(u.line,s));return l&&/\btag\b/.test(l)}function C(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function x(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function i(u){for(;;){var s=u.text.indexOf(">",u.ch);if(s==-1){if(C(u))continue;return}if(!c(u,s+1)){u.ch=s+1;continue}var l=u.text.lastIndexOf("/",s),f=l>-1&&!/\S/.test(u.text.slice(l+1,s));return u.ch=s+1,f?"selfClose":"regular"}}function h(u){for(;;){var s=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(s==-1){if(x(u))continue;return}if(!c(u,s+1)){u.ch=s;continue}w.lastIndex=s,u.ch=s;var l=w.exec(u.text);if(l&&l.index==s)return l}}function O(u){for(;;){w.lastIndex=u.ch;var s=w.exec(u.text);if(!s){if(C(u))continue;return}if(!c(u,s.index+1)){u.ch=s.index+1;continue}return u.ch=s.index+s[0].length,s}}function T(u){for(;;){var s=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(s==-1){if(x(u))continue;return}if(!c(u,s+1)){u.ch=s;continue}var l=u.text.lastIndexOf("/",s),f=l>-1&&!/\S/.test(u.text.slice(l+1,s));return u.ch=s+1,f?"selfClose":"regular"}}function y(u,s){for(var l=[];;){var f=O(u),m,E=u.line,v=u.ch-(f?f[0].length:0);if(!f||!(m=i(u)))return;if(m=="selfClose")continue;if(f[1]){for(var R=l.length-1;R>=0;--R)if(l[R]==f[2]){l.length=R;break}if(R<0&&(!s||s==f[2]))return{tag:f[2],from:N(E,v),to:N(u.line,u.ch)}}else l.push(f[2])}}function B(u,s){for(var l=[];;){var f=T(u);if(!f)return;if(f=="selfClose"){h(u);continue}var m=u.line,E=u.ch,v=h(u);if(!v)return;if(v[1])l.push(v[2]);else{for(var R=l.length-1;R>=0;--R)if(l[R]==v[2]){l.length=R;break}if(R<0&&(!s||s==v[2]))return{tag:v[2],from:N(u.line,u.ch),to:N(m,E)}}}}J.registerHelper("fold","xml",function(u,s){for(var l=new _(u,s.line,0);;){var f=O(l);if(!f||l.line!=s.line)return;var m=i(l);if(!m)return;if(!f[1]&&m!="selfClose"){var E=N(l.line,l.ch),v=y(l,f[2]);return v&&L(v.from,E)>0?{from:E,to:v.from}:null}}}),J.findMatchingTag=function(u,s,l){var f=new _(u,s.line,s.ch,l);if(f.text.indexOf(">")==-1&&f.text.indexOf("<")==-1)return;var m=i(f),E=m&&N(f.line,f.ch),v=m&&h(f);if(!m||!v||L(f,s)>0)return;var R={from:N(f.line,f.ch),to:E,tag:v[2]};return m=="selfClose"?{open:R,close:null,at:"open"}:v[1]?{open:B(f,v[2]),close:R,at:"close"}:(f=new _(u,E.line,E.ch,l),{open:R,close:y(f,v[2]),at:"open"})},J.findEnclosingTag=function(u,s,l,f){for(var m=new _(u,s.line,s.ch,l);;){var E=B(m,f);if(!E)break;var v=new _(u,s.line,s.ch,l),R=y(v,E.tag);if(R)return{open:E,close:R}}},J.scanForClosingTag=function(u,s,l,f){var m=new _(u,s.line,s.ch,f?{from:0,to:f}:null);return y(m,l)}})},p5ED:function($e,me,z){"use strict";var J=z("+L6B"),N=z("2/Rp"),L=z("5Dmo"),Q=z("3S7+"),D=z("k1fw"),w=z("9og8"),_=z("tJVT"),c=z("WmNS"),C=z.n(c),x=z("q1tI"),i=z.n(x),h=z("vHTk"),O=z.n(h),T=z("yEEn"),y=z("ZW9T"),B=z("1vsH"),u=z("V0Rq"),s=z("m3rI"),l=function(m){var E=m.name,v=m.data,R=m.theme,p=m.type,a=m.filename,r=m.monacoEditor,n=m.className,o=m.style,S=m.close,b=m.onClose,g=m.hasMask,U=m.otherData,K=U===void 0?{}:U,W=Object(x.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),q=Object(_.a)(W,2),Y=q[0],V=q[1],te=Object(x.useState)(""),X=Object(_.a)(te,2),se=X[0],le=X[1],Te=Object(x.useState)(),Ee=Object(_.a)(Te,2),Be=Ee[0],De=Ee[1],Ve=window.ENV==="build"?"/react/build/office.html":"/office.html",_e,Le=1024*1024,tt=10*Le,Et=Object(x.useRef)();p==="office"&&(_e=Object(B.R)(v).filesize,_e>tt&&(p="other")),a&&(r.filename=a),Object(x.useEffect)(function(){var Ae,re,ae=(Ae=document.cookie)===null||Ae===void 0||((re=Ae.replace(/\s/g,""))===null||re===void 0)?void 0:re.split(";");ae==null||ae.map(function(ce){var we=ce.split("=");we[0]==="_educoder_session"&&le(we[1])})},[]),Object(x.useEffect)(function(){p==="office"&&Oe()},[p]);var Oe=function(){var Ae=Object(w.a)(C.a.mark(function re(){var ae,ce,we;return C.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return console.log("data:",v),ae=v,v.startsWith("http")||(ae=location.origin+ae),ce=new URL(ae).pathname.split("/").pop(),ke.next=6,Object(u.U)({attachment_id:ce});case 6:we=ke.sent,De(we);case 8:case"end":return ke.stop()}},re)}));return function(){return Ae.apply(this,arguments)}}(),He=function(){if(v.startsWith("http")||v.startsWith("/api")||v.startsWith("blob:")){it();return}Object(B.x)(a||"educoder",v,a||"educoder")},it=function(){Object(B.v)(a||"educoder",decodeURIComponent(v))};return i.a.createElement("div",{style:Object(D.a)({},o||{}),className:"".concat(g&&O.a.bgBlack," ").concat(p?O.a.wrp:"hide")},S&&i.a.createElement("div",{className:O.a.close,ref:Et},i.a.createElement(Q.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Et.current}},i.a.createElement("span",{onClick:it},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(Q.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Et.current}},i.a.createElement("span",{className:"",onClick:function(){b(),De(null)}},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(O.a[n]," ").concat(n," ").concat(O.a.monaco," ").concat(p==="txt"?"show":"hide")},p==="txt"&&i.a.createElement(y.b,r)),p==="audio"&&i.a.createElement("audio",{src:"".concat((v==null?void 0:v.indexOf("http://"))>-1||(v==null?void 0:v.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(v),autoPlay:!0}),p==="video"&&i.a.createElement(i.a.Fragment,null,(v==null?void 0:v.indexOf("/api"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(v),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(v),autoPlay:!0})),p==="office"&&Be&&i.a.createElement("iframe",{src:"".concat(Ve,"?key=").concat(Be.key,"&url=").concat(s.a.API_SERVER+Be.url,"&callbackUrl=").concat(s.a.API_SERVER+Be.callbackUrl,"&fileType=").concat(Be.fileType,"&title=").concat(Be.title,"&model=view")}),(p==="xlsx"||p==="doc"||p==="pptx"||p==="docx")&&i.a.createElement("iframe",{src:"".concat(Ve,"?key=").concat(K.key,"&url=").concat(s.a.API_SERVER+K.url,"&callbackUrl=").concat(s.a.API_SERVER+K.callbackUrl,"&fileType=").concat(K.fileType,"&title=").concat(K.title,"&model=").concat(K.model)}),p==="html"&&i.a.createElement("iframe",{src:v+"&disposition=inline"}),p==="pdf"&&i.a.createElement("embed",{className:O.a.embed,src:v,type:"application/pdf"}),p==="image"&&i.a.createElement("img",{src:"".concat((v==null?void 0:v.indexOf("http://"))>-1||(v==null?void 0:v.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(v)}),p==="other"&&i.a.createElement("div",null,i.a.createElement(N.a,{type:"primary",size:"large",onClick:He},i.a.createElement(T.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),p==="download"&&i.a.createElement(N.a,{type:"primary",size:"large",onClick:He},i.a.createElement(T.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};me.a=l},"p77/":function($e,me,z){},pzxd:function($e,me,z){var J=z("bYtY"),N=J.retrieve2,L=J.retrieve3,Q=J.each,D=J.normalizeCssArray,w=J.isString,_=J.isObject,c=z("6GrX"),C=z("VpOo"),x=z("Xnb7"),i=z("fW2E"),h=z("gut8"),O=h.ContextCachedBy,T=h.WILL_BE_RESTORED,y=c.DEFAULT_FONT,B={left:1,right:1,center:1},u={top:1,bottom:1,middle:1},s=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],l={},f={};function m(te){return E(te),Q(te.rich,E),te}function E(te){if(te){te.font=c.makeFont(te);var X=te.textAlign;X==="middle"&&(X="center"),te.textAlign=X==null||B[X]?X:"left";var se=te.textVerticalAlign||te.textBaseline;se==="center"&&(se="middle"),te.textVerticalAlign=se==null||u[se]?se:"top";var le=te.textPadding;le&&(te.textPadding=D(te.textPadding))}}function v(te,X,se,le,Te,Ee){le.rich?p(te,X,se,le,Te,Ee):R(te,X,se,le,Te,Ee)}function R(te,X,se,le,Te,Ee){"use strict";var Be=o(le),De,Ve=!1,_e=X.__attrCachedBy===O.PLAIN_TEXT;Ee!==T?(Ee&&(De=Ee.style,Ve=!Be&&_e&&De),X.__attrCachedBy=Be?O.NONE:O.PLAIN_TEXT):_e&&(X.__attrCachedBy=O.NONE);var Le=le.font||y;(!Ve||Le!==(De.font||y))&&(X.font=Le);var tt=te.__computedFont;te.__styleFont!==Le&&(te.__styleFont=Le,tt=te.__computedFont=X.font);var Et=le.textPadding,Oe=le.textLineHeight,He=te.__textCotentBlock;(!He||te.__dirtyText)&&(He=te.__textCotentBlock=c.parsePlainText(se,tt,Et,Oe,le.truncate));var it=He.outerHeight,Ae=He.lines,re=He.lineHeight,ae=g(f,te,le,Te),ce=ae.baseX,we=ae.baseY,Re=ae.textAlign||"left",ke=ae.textVerticalAlign;r(X,le,Te,ce,we);var ht=c.adjustTextY(we,it,ke),ft=ce,vt=ht;if(Be||Et){var yt=c.getWidth(se,tt),Lt=yt;Et&&(Lt+=Et[1]+Et[3]);var Mt=c.adjustTextX(ce,Lt,Re);Be&&S(te,X,le,Mt,ht,Lt,it),Et&&(ft=Y(ce,Re,Et),vt+=Et[0])}X.textAlign=Re,X.textBaseline="middle",X.globalAlpha=le.opacity||1;for(var Qe=0;Qe<s.length;Qe++){var Pe=s[Qe],lt=Pe[0],pt=Pe[1],Ze=le[lt];(!Ve||Ze!==De[lt])&&(X[pt]=i(X,pt,Ze||Pe[2]))}vt+=re/2;var st=le.textStrokeWidth,Ke=Ve?De.textStrokeWidth:null,Ie=!Ve||st!==Ke,Me=!Ve||Ie||le.textStroke!==De.textStroke,pe=K(le.textStroke,st),be=W(le.textFill);if(pe&&(Ie&&(X.lineWidth=st),Me&&(X.strokeStyle=pe)),be&&((!Ve||le.textFill!==De.textFill)&&(X.fillStyle=be)),Ae.length===1)pe&&X.strokeText(Ae[0],ft,vt),be&&X.fillText(Ae[0],ft,vt);else for(var Qe=0;Qe<Ae.length;Qe++)pe&&X.strokeText(Ae[Qe],ft,vt),be&&X.fillText(Ae[Qe],ft,vt),vt+=re}function p(te,X,se,le,Te,Ee){Ee!==T&&(X.__attrCachedBy=O.NONE);var Be=te.__textCotentBlock;(!Be||te.__dirtyText)&&(Be=te.__textCotentBlock=c.parseRichText(se,le)),a(te,X,Be,le,Te)}function a(te,X,se,le,Te){var Ee=se.width,Be=se.outerWidth,De=se.outerHeight,Ve=le.textPadding,_e=g(f,te,le,Te),Le=_e.baseX,tt=_e.baseY,Et=_e.textAlign,Oe=_e.textVerticalAlign;r(X,le,Te,Le,tt);var He=c.adjustTextX(Le,Be,Et),it=c.adjustTextY(tt,De,Oe),Ae=He,re=it;Ve&&(Ae+=Ve[3],re+=Ve[0]);var ae=Ae+Ee;o(le)&&S(te,X,le,He,it,Be,De);for(var ce=0;ce<se.lines.length;ce++){for(var we=se.lines[ce],Re=we.tokens,ke=Re.length,ht=we.lineHeight,ft=we.width,vt=0,yt=Ae,Lt=ae,Mt=ke-1,Qe;vt<ke&&(Qe=Re[vt],!Qe.textAlign||Qe.textAlign==="left");)n(te,X,Qe,le,ht,re,yt,"left"),ft-=Qe.width,yt+=Qe.width,vt++;for(;Mt>=0&&(Qe=Re[Mt],Qe.textAlign==="right");)n(te,X,Qe,le,ht,re,Lt,"right"),ft-=Qe.width,Lt-=Qe.width,Mt--;for(yt+=(Ee-(yt-Ae)-(ae-Lt)-ft)/2;vt<=Mt;)Qe=Re[vt],n(te,X,Qe,le,ht,re,yt+Qe.width/2,"center"),yt+=Qe.width,vt++;re+=ht}}function r(te,X,se,le,Te){if(se&&X.textRotation){var Ee=X.textOrigin;Ee==="center"?(le=se.width/2+se.x,Te=se.height/2+se.y):Ee&&(le=Ee[0]+se.x,Te=Ee[1]+se.y),te.translate(le,Te),te.rotate(-X.textRotation),te.translate(-le,-Te)}}function n(te,X,se,le,Te,Ee,Be,De){var Ve=le.rich[se.styleName]||{};Ve.text=se.text;var _e=se.textVerticalAlign,Le=Ee+Te/2;_e==="top"?Le=Ee+se.height/2:_e==="bottom"&&(Le=Ee+Te-se.height/2),!se.isLineHolder&&o(Ve)&&S(te,X,Ve,De==="right"?Be-se.width:De==="center"?Be-se.width/2:Be,Le-se.height/2,se.width,se.height);var tt=se.textPadding;tt&&(Be=Y(Be,De,tt),Le-=se.height/2-tt[2]-se.textHeight/2),U(X,"shadowBlur",L(Ve.textShadowBlur,le.textShadowBlur,0)),U(X,"shadowColor",Ve.textShadowColor||le.textShadowColor||"transparent"),U(X,"shadowOffsetX",L(Ve.textShadowOffsetX,le.textShadowOffsetX,0)),U(X,"shadowOffsetY",L(Ve.textShadowOffsetY,le.textShadowOffsetY,0)),U(X,"textAlign",De),U(X,"textBaseline","middle"),U(X,"font",se.font||y);var Et=K(Ve.textStroke||le.textStroke,He),Oe=W(Ve.textFill||le.textFill),He=N(Ve.textStrokeWidth,le.textStrokeWidth);Et&&(U(X,"lineWidth",He),U(X,"strokeStyle",Et),X.strokeText(se.text,Be,Le)),Oe&&(U(X,"fillStyle",Oe),X.fillText(se.text,Be,Le))}function o(te){return!!(te.textBackgroundColor||te.textBorderWidth&&te.textBorderColor)}function S(te,X,se,le,Te,Ee,Be){var De=se.textBackgroundColor,Ve=se.textBorderWidth,_e=se.textBorderColor,Le=w(De);if(U(X,"shadowBlur",se.textBoxShadowBlur||0),U(X,"shadowColor",se.textBoxShadowColor||"transparent"),U(X,"shadowOffsetX",se.textBoxShadowOffsetX||0),U(X,"shadowOffsetY",se.textBoxShadowOffsetY||0),Le||Ve&&_e){X.beginPath();var tt=se.textBorderRadius;tt?C.buildPath(X,{x:le,y:Te,width:Ee,height:Be,r:tt}):X.rect(le,Te,Ee,Be),X.closePath()}if(Le)if(U(X,"fillStyle",De),se.fillOpacity!=null){var Et=X.globalAlpha;X.globalAlpha=se.fillOpacity*se.opacity,X.fill(),X.globalAlpha=Et}else X.fill();else if(_(De)){var Oe=De.image;Oe=x.createOrUpdateImage(Oe,null,te,b,De),Oe&&x.isImageReady(Oe)&&X.drawImage(Oe,le,Te,Ee,Be)}if(Ve&&_e)if(U(X,"lineWidth",Ve),U(X,"strokeStyle",_e),se.strokeOpacity!=null){var Et=X.globalAlpha;X.globalAlpha=se.strokeOpacity*se.opacity,X.stroke(),X.globalAlpha=Et}else X.stroke()}function b(te,X){X.image=te}function g(te,X,se,le){var Te=se.x||0,Ee=se.y||0,Be=se.textAlign,De=se.textVerticalAlign;if(le){var Ve=se.textPosition;if(Ve instanceof Array)Te=le.x+q(Ve[0],le.width),Ee=le.y+q(Ve[1],le.height);else{var _e=X&&X.calculateTextPosition?X.calculateTextPosition(l,se,le):c.calculateTextPosition(l,se,le);Te=_e.x,Ee=_e.y,Be=Be||_e.textAlign,De=De||_e.textVerticalAlign}var Le=se.textOffset;Le&&(Te+=Le[0],Ee+=Le[1])}return te=te||{},te.baseX=Te,te.baseY=Ee,te.textAlign=Be,te.textVerticalAlign=De,te}function U(te,X,se){return te[X]=i(te,X,se),te[X]}function K(te,X){return te==null||X<=0||te==="transparent"||te==="none"?null:te.image||te.colorStops?"#000":te}function W(te){return te==null||te==="none"?null:te.image||te.colorStops?"#000":te}function q(te,X){return typeof te=="string"?te.lastIndexOf("%")>=0?parseFloat(te)/100*X:parseFloat(te):te}function Y(te,X,se){return X==="right"?te-se[1]:X==="center"?te+se[3]/2-se[1]/2:te+se[3]}function V(te,X){return te!=null&&(te||X.textBackgroundColor||X.textBorderWidth&&X.textBorderColor||X.textPadding)}me.normalizeTextStyle=m,me.renderText=v,me.getBoxPosition=g,me.getStroke=K,me.getFill=W,me.parsePercent=q,me.needDrawText=V},qH13:function($e,me,z){var J=z("ItGF"),N=z("QBsz"),L=N.applyTransform,Q=z("mFDi"),D=z("Qe9p"),w=z("6GrX"),_=z("pzxd"),c=z("ni6a"),C=z("Gev7"),x=z("Dagg"),i=z("dqUG"),h=z("y+Vt"),O=z("IMiH"),T=z("QuXc"),y=z("06Qe"),B=O.CMD,u=Math.round,s=Math.sqrt,l=Math.abs,f=Math.cos,m=Math.sin,E=Math.max;if(!J.canvasSupported){var v=",",R="progid:DXImageTransform.Microsoft",p=21600,a=p/2,r=1e5,n=1e3,o=function(ce){ce.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ce.coordsize=p+","+p,ce.coordorigin="0,0"},S=function(ce){return String(ce).replace(/&/g,"&").replace(/"/g,""")},b=function(ce,we,Re){return"rgb("+[ce,we,Re].join(",")+")"},g=function(ce,we){we&&ce&&we.parentNode!==ce&&ce.appendChild(we)},U=function(ce,we){we&&ce&&we.parentNode===ce&&ce.removeChild(we)},K=function(ce,we,Re){return(parseFloat(ce)||0)*r+(parseFloat(we)||0)*n+Re},W=_.parsePercent,q=function(ce,we,Re){var ke=D.parse(we);Re=+Re,isNaN(Re)&&(Re=1),ke&&(ce.color=b(ke[0],ke[1],ke[2]),ce.opacity=Re*ke[3])},Y=function(ce){var we=D.parse(ce);return[b(we[0],we[1],we[2]),we[3]]},V=function(ce,we,Re){var ke=we.fill;if(ke!=null)if(ke instanceof T){var ht,ft=0,vt=[0,0],yt=0,Lt=1,Mt=Re.getBoundingRect(),Qe=Mt.width,Pe=Mt.height;if(ke.type==="linear"){ht="gradient";var lt=Re.transform,pt=[ke.x*Qe,ke.y*Pe],Ze=[ke.x2*Qe,ke.y2*Pe];lt&&(L(pt,pt,lt),L(Ze,Ze,lt));var st=Ze[0]-pt[0],Ke=Ze[1]-pt[1];ft=Math.atan2(st,Ke)*180/Math.PI,ft<0&&(ft+=360),ft<1e-6&&(ft=0)}else{ht="gradientradial";var pt=[ke.x*Qe,ke.y*Pe],lt=Re.transform,Ie=Re.scale,Me=Qe,pe=Pe;vt=[(pt[0]-Mt.x)/Me,(pt[1]-Mt.y)/pe],lt&&L(pt,pt,lt),Me/=Ie[0]*p,pe/=Ie[1]*p;var be=E(Me,pe);yt=2*0/be,Lt=2*ke.r/be-yt}var ge=ke.colorStops.slice();ge.sort(function(rt,xe){return rt.offset-xe.offset});for(var Ce=ge.length,We=[],Ne=[],ut=0;ut<Ce;ut++){var Tt=ge[ut],Ut=Y(Tt.color);Ne.push(Tt.offset*Lt+yt+" "+Ut[0]),(ut===0||ut===Ce-1)&&We.push(Ut)}if(Ce>=2){var St=We[0][0],_t=We[1][0],At=We[0][1]*we.opacity,nt=We[1][1]*we.opacity;ce.type=ht,ce.method="none",ce.focus="100%",ce.angle=ft,ce.color=St,ce.color2=_t,ce.colors=Ne.join(","),ce.opacity=nt,ce.opacity2=At}ht==="radial"&&(ce.focusposition=vt.join(","))}else q(ce,ke,we.opacity)},te=function(ce,we){we.lineDash&&(ce.dashstyle=we.lineDash.join(" ")),we.stroke!=null&&!(we.stroke instanceof T)&&q(ce,we.stroke,we.opacity)},X=function(ce,we,Re,ke){var ht=we==="fill",ft=ce.getElementsByTagName(we)[0];Re[we]!=null&&Re[we]!=="none"&&(ht||!ht&&Re.lineWidth)?(ce[ht?"filled":"stroked"]="true",Re[we]instanceof T&&U(ce,ft),ft||(ft=y.createNode(we)),ht?V(ft,Re,ke):te(ft,Re),g(ce,ft)):(ce[ht?"filled":"stroked"]="false",U(ce,ft))},se=[[],[],[]],le=function(ce,we){var Re=B.M,ke=B.C,ht=B.L,ft=B.A,vt=B.Q,yt=[],Lt,Mt,Qe,Pe,lt,pt,Ze=ce.data,st=ce.len();for(Pe=0;Pe<st;){Qe=Ze[Pe++],Mt="",Lt=0;switch(Qe){case Re:Mt=" m ",Lt=1,lt=Ze[Pe++],pt=Ze[Pe++],se[0][0]=lt,se[0][1]=pt;break;case ht:Mt=" l ",Lt=1,lt=Ze[Pe++],pt=Ze[Pe++],se[0][0]=lt,se[0][1]=pt;break;case vt:case ke:Mt=" c ",Lt=3;var Ke=Ze[Pe++],Ie=Ze[Pe++],Me=Ze[Pe++],pe=Ze[Pe++],be,ge;Qe===vt?(be=Me,ge=pe,Me=(Me+2*Ke)/3,pe=(pe+2*Ie)/3,Ke=(lt+2*Ke)/3,Ie=(pt+2*Ie)/3):(be=Ze[Pe++],ge=Ze[Pe++]),se[0][0]=Ke,se[0][1]=Ie,se[1][0]=Me,se[1][1]=pe,se[2][0]=be,se[2][1]=ge,lt=be,pt=ge;break;case ft:var Ce=0,We=0,Ne=1,ut=1,Tt=0;we&&(Ce=we[4],We=we[5],Ne=s(we[0]*we[0]+we[1]*we[1]),ut=s(we[2]*we[2]+we[3]*we[3]),Tt=Math.atan2(-we[1]/ut,we[0]/Ne));var Ut=Ze[Pe++],St=Ze[Pe++],_t=Ze[Pe++],At=Ze[Pe++],nt=Ze[Pe++]+Tt,rt=Ze[Pe++]+nt+Tt;Pe++;var xe=Ze[Pe++],Fe=Ut+f(nt)*_t,dt=St+m(nt)*At,Ke=Ut+f(rt)*_t,Ie=St+m(rt)*At,at=xe?" wa ":" at ";Math.abs(Fe-Ke)<1e-4&&(Math.abs(rt-nt)>.01?xe&&(Fe+=270/p):Math.abs(dt-St)<1e-4?xe&&Fe<Ut||!xe&&Fe>Ut?Ie-=270/p:Ie+=270/p:xe&&dt<St||!xe&&dt>St?Ke+=270/p:Ke-=270/p),yt.push(at,u(((Ut-_t)*Ne+Ce)*p-a),v,u(((St-At)*ut+We)*p-a),v,u(((Ut+_t)*Ne+Ce)*p-a),v,u(((St+At)*ut+We)*p-a),v,u((Fe*Ne+Ce)*p-a),v,u((dt*ut+We)*p-a),v,u((Ke*Ne+Ce)*p-a),v,u((Ie*ut+We)*p-a)),lt=Ke,pt=Ie;break;case B.R:var xt=se[0],wt=se[1];xt[0]=Ze[Pe++],xt[1]=Ze[Pe++],wt[0]=xt[0]+Ze[Pe++],wt[1]=xt[1]+Ze[Pe++],we&&(L(xt,xt,we),L(wt,wt,we)),xt[0]=u(xt[0]*p-a),wt[0]=u(wt[0]*p-a),xt[1]=u(xt[1]*p-a),wt[1]=u(wt[1]*p-a),yt.push(" m ",xt[0],v,xt[1]," l ",wt[0],v,xt[1]," l ",wt[0],v,wt[1]," l ",xt[0],v,wt[1]);break;case B.Z:yt.push(" x ")}if(Lt>0){yt.push(Mt);for(var qe=0;qe<Lt;qe++){var Bt=se[qe];we&&L(Bt,Bt,we),yt.push(u(Bt[0]*p-a),v,u(Bt[1]*p-a),qe<Lt-1?v:"")}}}return yt.join("")};h.prototype.brushVML=function(ce){var we=this.style,Re=this._vmlEl;Re||(Re=y.createNode("shape"),o(Re),this._vmlEl=Re),X(Re,"fill",we,this),X(Re,"stroke",we,this);var ke=this.transform,ht=ke!=null,ft=Re.getElementsByTagName("stroke")[0];if(ft){var vt=we.lineWidth;if(ht&&!we.strokeNoScale){var yt=ke[0]*ke[3]-ke[1]*ke[2];vt*=s(l(yt))}ft.weight=vt+"px"}var Lt=this.path||(this.path=new O);this.__dirtyPath&&(Lt.beginPath(),Lt.subPixelOptimize=!1,this.buildPath(Lt,this.shape),Lt.toStatic(),this.__dirtyPath=!1),Re.path=le(Lt,this.transform),Re.style.zIndex=K(this.zlevel,this.z,this.z2),g(ce,Re),we.text!=null?this.drawRectText(ce,this.getBoundingRect()):this.removeRectText(ce)},h.prototype.onRemove=function(ce){U(ce,this._vmlEl),this.removeRectText(ce)},h.prototype.onAdd=function(ce){g(ce,this._vmlEl),this.appendRectText(ce)};var Te=function(ce){return typeof ce=="object"&&ce.tagName&&ce.tagName.toUpperCase()==="IMG"};x.prototype.brushVML=function(ce){var we=this.style,Re=we.image,ke,ht;if(Te(Re)){var ft=Re.src;if(ft===this._imageSrc)ke=this._imageWidth,ht=this._imageHeight;else{var vt=Re.runtimeStyle,yt=vt.width,Lt=vt.height;vt.width="auto",vt.height="auto",ke=Re.width,ht=Re.height,vt.width=yt,vt.height=Lt,this._imageSrc=ft,this._imageWidth=ke,this._imageHeight=ht}Re=ft}else Re===this._imageSrc&&(ke=this._imageWidth,ht=this._imageHeight);if(!Re)return;var Mt=we.x||0,Qe=we.y||0,Pe=we.width,lt=we.height,pt=we.sWidth,Ze=we.sHeight,st=we.sx||0,Ke=we.sy||0,Ie=pt&&Ze,Me=this._vmlEl;Me||(Me=y.doc.createElement("div"),o(Me),this._vmlEl=Me);var pe=Me.style,be=!1,ge,Ce=1,We=1;if(this.transform&&(ge=this.transform,Ce=s(ge[0]*ge[0]+ge[1]*ge[1]),We=s(ge[2]*ge[2]+ge[3]*ge[3]),be=ge[1]||ge[2]),be){var Ne=[Mt,Qe],ut=[Mt+Pe,Qe],Tt=[Mt,Qe+lt],Ut=[Mt+Pe,Qe+lt];L(Ne,Ne,ge),L(ut,ut,ge),L(Tt,Tt,ge),L(Ut,Ut,ge);var St=E(Ne[0],ut[0],Tt[0],Ut[0]),_t=E(Ne[1],ut[1],Tt[1],Ut[1]),At=[];At.push("M11=",ge[0]/Ce,v,"M12=",ge[2]/We,v,"M21=",ge[1]/Ce,v,"M22=",ge[3]/We,v,"Dx=",u(Mt*Ce+ge[4]),v,"Dy=",u(Qe*We+ge[5])),pe.padding="0 "+u(St)+"px "+u(_t)+"px 0",pe.filter=R+".Matrix("+At.join("")+", SizingMethod=clip)"}else ge&&(Mt=Mt*Ce+ge[4],Qe=Qe*We+ge[5]),pe.filter="",pe.left=u(Mt)+"px",pe.top=u(Qe)+"px";var nt=this._imageEl,rt=this._cropEl;nt||(nt=y.doc.createElement("div"),this._imageEl=nt);var xe=nt.style;if(Ie){if(ke&&ht)xe.width=u(Ce*ke*Pe/pt)+"px",xe.height=u(We*ht*lt/Ze)+"px";else{var Fe=new Image,dt=this;Fe.onload=function(){Fe.onload=null,ke=Fe.width,ht=Fe.height,xe.width=u(Ce*ke*Pe/pt)+"px",xe.height=u(We*ht*lt/Ze)+"px",dt._imageWidth=ke,dt._imageHeight=ht,dt._imageSrc=Re},Fe.src=Re}rt||(rt=y.doc.createElement("div"),rt.style.overflow="hidden",this._cropEl=rt);var at=rt.style;at.width=u((Pe+st*Pe/pt)*Ce),at.height=u((lt+Ke*lt/Ze)*We),at.filter=R+".Matrix(Dx="+-st*Pe/pt*Ce+",Dy="+-Ke*lt/Ze*We+")",rt.parentNode||Me.appendChild(rt),nt.parentNode!==rt&&rt.appendChild(nt)}else xe.width=u(Ce*Pe)+"px",xe.height=u(We*lt)+"px",Me.appendChild(nt),rt&&rt.parentNode&&(Me.removeChild(rt),this._cropEl=null);var xt="",wt=we.opacity;wt<1&&(xt+=".Alpha(opacity="+u(wt*100)+") "),xt+=R+".AlphaImageLoader(src="+Re+", SizingMethod=scale)",xe.filter=xt,Me.style.zIndex=K(this.zlevel,this.z,this.z2),g(ce,Me),we.text!=null&&this.drawRectText(ce,this.getBoundingRect())},x.prototype.onRemove=function(ce){U(ce,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ce)},x.prototype.onAdd=function(ce){g(ce,this._vmlEl),this.appendRectText(ce)};var Ee="normal",Be={},De=0,Ve=100,_e=document.createElement("div"),Le=function(ce){var we=Be[ce];if(!we){De>Ve&&(De=0,Be={});var Re=_e.style,ke;try{Re.font=ce,ke=Re.fontFamily.split(",")[0]}catch(ht){}we={style:Re.fontStyle||Ee,variant:Re.fontVariant||Ee,weight:Re.fontWeight||Ee,size:parseFloat(Re.fontSize||12)|0,family:ke||"Microsoft YaHei"},Be[ce]=we,De++}return we},tt;w.$override("measureText",function(ce,we){var Re=y.doc;tt||(tt=Re.createElement("div"),tt.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",y.doc.body.appendChild(tt));try{tt.style.font=we}catch(ke){}return tt.innerHTML="",tt.appendChild(Re.createTextNode(ce)),{width:tt.offsetWidth}});for(var Et=new Q,Oe=function(ce,we,Re,ke){var ht=this.style;this.__dirty&&_.normalizeTextStyle(ht,!0);var ft=ht.text;if(ft!=null&&(ft+=""),!ft)return;if(ht.rich){var vt=w.parseRichText(ft,ht);ft=[];for(var yt=0;yt<vt.lines.length;yt++){for(var Lt=vt.lines[yt].tokens,Mt=[],Qe=0;Qe<Lt.length;Qe++)Mt.push(Lt[Qe].text);ft.push(Mt.join(""))}ft=ft.join(`
|
|
`)}var Pe,lt,pt=ht.textAlign,Ze=ht.textVerticalAlign,st=Le(ht.font),Ke=st.style+" "+st.variant+" "+st.weight+" "+st.size+'px "'+st.family+'"';Re=Re||w.getBoundingRect(ft,Ke,pt,Ze,ht.textPadding,ht.textLineHeight);var Ie=this.transform;if(Ie&&!ke&&(Et.copy(we),Et.applyTransform(Ie),we=Et),ke)Pe=we.x,lt=we.y;else{var Me=ht.textPosition;if(Me instanceof Array)Pe=we.x+W(Me[0],we.width),lt=we.y+W(Me[1],we.height),pt=pt||"left";else{var pe=this.calculateTextPosition?this.calculateTextPosition({},ht,we):w.calculateTextPosition({},ht,we);Pe=pe.x,lt=pe.y,pt=pt||pe.textAlign,Ze=Ze||pe.textVerticalAlign}}Pe=w.adjustTextX(Pe,Re.width,pt),lt=w.adjustTextY(lt,Re.height,Ze),lt+=Re.height/2;var be=y.createNode,ge=this._textVmlEl,Ce,We,Ne;ge?(Ne=ge.firstChild,Ce=Ne.nextSibling,We=Ce.nextSibling):(ge=be("line"),Ce=be("path"),We=be("textpath"),Ne=be("skew"),We.style["v-text-align"]="left",o(ge),Ce.textpathok=!0,We.on=!0,ge.from="0 0",ge.to="1000 0.05",g(ge,Ne),g(ge,Ce),g(ge,We),this._textVmlEl=ge);var ut=[Pe,lt],Tt=ge.style;Ie&&ke?(L(ut,ut,Ie),Ne.on=!0,Ne.matrix=Ie[0].toFixed(3)+v+Ie[2].toFixed(3)+v+Ie[1].toFixed(3)+v+Ie[3].toFixed(3)+",0,0",Ne.offset=(u(ut[0])||0)+","+(u(ut[1])||0),Ne.origin="0 0",Tt.left="0px",Tt.top="0px"):(Ne.on=!1,Tt.left=u(Pe)+"px",Tt.top=u(lt)+"px"),We.string=S(ft);try{We.style.font=Ke}catch(Ut){}X(ge,"fill",{fill:ht.textFill,opacity:ht.opacity},this),X(ge,"stroke",{stroke:ht.textStroke,opacity:ht.opacity,lineDash:ht.lineDash||null},this),ge.style.zIndex=K(this.zlevel,this.z,this.z2),g(ce,ge)},He=function(ce){U(ce,this._textVmlEl),this._textVmlEl=null},it=function(ce){g(ce,this._textVmlEl)},Ae=[c,C,x,h,i],re=0;re<Ae.length;re++){var ae=Ae[re].prototype;ae.drawRectText=Oe,ae.removeRectText=He,ae.appendRectText=it}i.prototype.brushVML=function(ce){var we=this.style;we.text!=null?this.drawRectText(ce,{x:we.x||0,y:we.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ce)},i.prototype.onRemove=function(ce){this.removeRectText(ce)},i.prototype.onAdd=function(ce){this.appendRectText(ce)}}},r6Bn:function($e,me,z){var J=z("bYtY"),N=z("ItGF"),L=z("4fz+"),Q=z("BPZU");function D(c,C){return c.zlevel===C.zlevel?c.z===C.z?c.z2-C.z2:c.z-C.z:c.zlevel-C.zlevel}var w=function(){this._roots=[],this._displayList=[],this._displayListLen=0};w.prototype={constructor:w,traverse:function(c,C){for(var x=0;x<this._roots.length;x++)this._roots[x].traverse(c,C)},getDisplayList:function(c,C){return C=C||!1,c&&this.updateDisplayList(C),this._displayList},updateDisplayList:function(c){this._displayListLen=0;for(var C=this._roots,x=this._displayList,i=0,h=C.length;i<h;i++)this._updateAndAddDisplayable(C[i],null,c);x.length=this._displayListLen,N.canvasSupported&&Q(x,D)},_updateAndAddDisplayable:function(c,C,x){if(c.ignore&&!x)return;c.beforeUpdate(),c.__dirty&&c.update(),c.afterUpdate();var i=c.clipPath;if(i){C?C=C.slice():C=[];for(var h=i,O=c;h;)h.parent=O,h.updateTransform(),C.push(h),O=h,h=h.clipPath}if(c.isGroup){for(var T=c._children,y=0;y<T.length;y++){var B=T[y];c.__dirty&&(B.__dirty=!0),this._updateAndAddDisplayable(B,C,x)}c.__dirty=!1}else c.__clipPaths=C,this._displayList[this._displayListLen++]=c},addRoot:function(c){if(c.__storage===this)return;c instanceof L&&c.addChildrenToStorage(this),this.addToStorage(c),this._roots.push(c)},delRoot:function(c){if(c==null){for(var C=0;C<this._roots.length;C++){var x=this._roots[C];x instanceof L&&x.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(c instanceof Array){for(var C=0,i=c.length;C<i;C++)this.delRoot(c[C]);return}var h=J.indexOf(this._roots,c);h>=0&&(this.delFromStorage(c),this._roots.splice(h,1),c instanceof L&&c.delChildrenFromStorage(this))},addToStorage:function(c){return c&&(c.__storage=this,c.dirty(!1)),this},delFromStorage:function(c){return c&&(c.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:D};var _=w;$e.exports=_},rA99:function($e,me,z){var J=z("y+Vt"),N=z("QBsz"),L=z("Sj9i"),Q=L.quadraticSubdivide,D=L.cubicSubdivide,w=L.quadraticAt,_=L.cubicAt,c=L.quadraticDerivativeAt,C=L.cubicDerivativeAt,x=[];function i(O,T,y){var B=O.cpx2,u=O.cpy2;return B===null||u===null?[(y?C:_)(O.x1,O.cpx1,O.cpx2,O.x2,T),(y?C:_)(O.y1,O.cpy1,O.cpy2,O.y2,T)]:[(y?c:w)(O.x1,O.cpx1,O.x2,T),(y?c:w)(O.y1,O.cpy1,O.y2,T)]}var h=J.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(O,T){var y=T.x1,B=T.y1,u=T.x2,s=T.y2,l=T.cpx1,f=T.cpy1,m=T.cpx2,E=T.cpy2,v=T.percent;if(v===0)return;O.moveTo(y,B),m==null||E==null?(v<1&&(Q(y,l,u,v,x),l=x[1],u=x[2],Q(B,f,s,v,x),f=x[1],s=x[2]),O.quadraticCurveTo(l,f,u,s)):(v<1&&(D(y,l,m,u,v,x),l=x[1],m=x[2],u=x[3],D(B,f,E,s,v,x),f=x[1],E=x[2],s=x[3]),O.bezierCurveTo(l,f,m,E,u,s))},pointAt:function(O){return i(this.shape,O,!1)},tangentAt:function(O){var T=i(this.shape,O,!0);return N.normalize(T,T)}});$e.exports=h},"rAM+":function($e,me,z){"use strict";z.d(me,"a",function(){return N});var J=z("Qw5x");function N(L,Q){var D;if(typeof Symbol=="undefined"||L[Symbol.iterator]==null){if(Array.isArray(L)||(D=Object(J.a)(L))||Q&&L&&typeof L.length=="number"){D&&(L=D);var w=0,_=function(){};return{s:_,n:function(){return w>=L.length?{done:!0}:{done:!1,value:L[w++]}},e:function(h){throw h},f:_}}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 c=!0,C=!1,x;return{s:function(){D=L[Symbol.iterator]()},n:function(){var h=D.next();return c=h.done,h},e:function(h){C=!0,x=h},f:function(){try{!c&&D.return!=null&&D.return()}finally{if(C)throw x}}}}},rUJ1:function($e,me){const z=/[&<>"']/,J=/[&<>"']/g,N=/[<>"']|&(?!#?\w+;)/,L=/[<>"']|&(?!#?\w+;)/g,Q={"&":"&","<":"<",">":">",'"':""","'":"'"},D=p=>Q[p];function w(p,a){if(a){if(z.test(p))return p.replace(J,D)}else if(N.test(p))return p.replace(L,D);return p}const _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(p){return p.replace(_,(a,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const C=/(^|[^\[])\^/g;function x(p,a){p=p.source||p,a=a||"";const r={replace:(n,o)=>(o=o.source||o,o=o.replace(C,"$1"),p=p.replace(n,o),r),getRegex:()=>new RegExp(p,a)};return r}const i=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(p,a,r){if(p){let n;try{n=decodeURIComponent(c(r)).replace(i,"").toLowerCase()}catch(o){return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}a&&!h.test(r)&&(r=s(a,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(n){return null}return r}const T={},y=/^[^:]+:\/*[^/]*$/,B=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function s(p,a){T[" "+p]||(y.test(p)?T[" "+p]=p+"/":T[" "+p]=E(p,"/",!0)),p=T[" "+p];const r=p.indexOf(":")===-1;return a.substring(0,2)==="//"?r?a:p.replace(B,"$1")+a:a.charAt(0)==="/"?r?a:p.replace(u,"$1")+a:p+a}const l={exec:function(){}};function f(p){let a=1,r,n;for(;a<arguments.length;a++){r=arguments[a];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(p[n]=r[n])}return p}function m(p,a){const r=p.replace(/\|/g,(S,b,g)=>{let U=!1,K=b;for(;--K>=0&&g[K]==="\\";)U=!U;return U?"|":" |"}),n=r.split(/ \|/);let o=0;if(n.length>a)n.splice(a);else for(;n.length<a;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function E(p,a,r){const n=p.length;if(n===0)return"";let o=0;for(;o<n;){const S=p.charAt(n-o-1);if(S===a&&!r)o++;else if(S!==a&&r)o++;else break}return p.substr(0,n-o)}function v(p,a){if(p.indexOf(a[1])===-1)return-1;const r=p.length;let n=0,o=0;for(;o<r;o++)if(p[o]==="\\")o++;else if(p[o]===a[0])n++;else if(p[o]===a[1]&&(n--,n<0))return o;return-1}function R(p){p&&p.sanitize&&!p.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")}$e.exports={escape:w,unescape:c,edit:x,cleanUrl:O,resolveUrl:s,noopTest:l,merge:f,splitCells:m,rtrim:E,findClosingBracket:v,checkSanitizeDeprecation:R}},rmlV:function($e,me,z){var J=z("y+Vt"),N=J.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(L,Q){var D=.5522848,w=Q.cx,_=Q.cy,c=Q.rx,C=Q.ry,x=c*D,i=C*D;L.moveTo(w-c,_),L.bezierCurveTo(w-c,_-i,w-x,_-C,w,_-C),L.bezierCurveTo(w+x,_-C,w+c,_-i,w+c,_),L.bezierCurveTo(w+c,_+i,w+x,_+C,w,_+C),L.bezierCurveTo(w-x,_+C,w-c,_+i,w-c,_),L.closePath()}});$e.exports=N},sR1s:function($e,me,z){"use strict";z.d(me,"b",function(){return Q}),z.d(me,"a",function(){return D}),z.d(me,"c",function(){return w}),z.d(me,"d",function(){return _});var J=z("U8pU"),N="RC_TABLE_KEY";function L(c){return c==null?[]:Array.isArray(c)?c:[c]}function Q(c,C){if(!C&&typeof C!="number")return c;for(var x=L(C),i=c,h=0;h<x.length;h+=1){if(!i)return null;var O=x[h];i=i[O]}return i}function D(c){var C=[],x={};return c.forEach(function(i){for(var h=i||{},O=h.key,T=h.dataIndex,y=O||L(T).join("-")||N;x[y];)y="".concat(y,"_next");x[y]=!0,C.push(y)}),C}function w(){var c={};function C(O,T){T&&Object.keys(T).forEach(function(y){var B=T[y];B&&Object(J.a)(B)==="object"?(O[y]=O[y]||{},C(O[y],B)):O[y]=B})}for(var x=arguments.length,i=new Array(x),h=0;h<x;h++)i[h]=arguments[h];return i.forEach(function(O){C(c,O)}),c}function _(c){return c!=null}},"sW+o":function($e,me,z){var J=z("SrGk"),N=z("bYtY"),L=z("SUKs"),Q=z("Qe9p");function D(_,c){J.call(this,_,c,["linearGradient","radialGradient"],"__gradient_in_use__")}N.inherits(D,J),D.prototype.addWithoutUpdate=function(_,c){if(c&&c.style){var C=this;N.each(["fill","stroke"],function(x){if(c.style[x]&&(c.style[x].type==="linear"||c.style[x].type==="radial")){var i=c.style[x],h=C.getDefs(!0),O;i._dom?(O=i._dom,h.contains(i._dom)||C.addDom(O)):O=C.add(i),C.markUsed(c);var T=O.getAttribute("id");_.setAttribute(x,"url(#"+T+")")}})}},D.prototype.add=function(_){var c;if(_.type==="linear")c=this.createElement("linearGradient");else if(_.type==="radial")c=this.createElement("radialGradient");else return L("Illegal gradient type."),null;return _.id=_.id||this.nextId++,c.setAttribute("id","zr"+this._zrId+"-gradient-"+_.id),this.updateDom(_,c),this.addDom(c),c},D.prototype.update=function(_){var c=this;J.prototype.update.call(this,_,function(){var C=_.type,x=_._dom.tagName;C==="linear"&&x==="linearGradient"||C==="radial"&&x==="radialGradient"?c.updateDom(_,_._dom):(c.removeDom(_),c.add(_))})},D.prototype.updateDom=function(_,c){if(_.type==="linear")c.setAttribute("x1",_.x),c.setAttribute("y1",_.y),c.setAttribute("x2",_.x2),c.setAttribute("y2",_.y2);else if(_.type==="radial")c.setAttribute("cx",_.x),c.setAttribute("cy",_.y),c.setAttribute("r",_.r);else{L("Illegal gradient type.");return}_.global?c.setAttribute("gradientUnits","userSpaceOnUse"):c.setAttribute("gradientUnits","objectBoundingBox"),c.innerHTML="";for(var C=_.colorStops,x=0,i=C.length;x<i;++x){var h=this.createElement("stop");h.setAttribute("offset",C[x].offset*100+"%");var O=C[x].color;if(O.indexOf("rgba">-1)){var T=Q.parse(O)[3],y=Q.toHex(O);h.setAttribute("stop-color","#"+y),h.setAttribute("stop-opacity",T)}else h.setAttribute("stop-color",C[x].color);c.appendChild(h)}_._dom=c},D.prototype.markUsed=function(_){if(_.style){var c=_.style.fill;c&&c._dom&&J.prototype.markUsed.call(this,c._dom),c=_.style.stroke,c&&c._dom&&J.prototype.markUsed.call(this,c._dom)}};var w=D;$e.exports=w},sboe:function($e,me,z){"use strict";z.d(me,"a",function(){return L});var J=z("q1tI"),N=z.n(J),L=J.createContext(null)},t23M:function($e,me,z){"use strict";var J=z("VTBJ"),N=z("1OyB"),L=z("vuIU"),Q=z("Ji7U"),D=z("LK+K"),w=z("q1tI"),_=z.n(w),c=z("m+aA"),C=z("Zm9Q"),x=z("Kwbf"),i=z("c+Xe"),h=z("bdgK"),O="rc-observer-key",T=function(y){Object(Q.a)(u,y);var B=Object(D.a)(u);function u(){var s;return Object(N.a)(this,u),s=B.apply(this,arguments),s.resizeObserver=null,s.childNode=null,s.currentElement=null,s.state={width:0,height:0,offsetHeight:0,offsetWidth:0},s.onResize=function(l){var f=s.props.onResize,m=l[0].target,E=m.getBoundingClientRect(),v=E.width,R=E.height,p=m.offsetWidth,a=m.offsetHeight,r=Math.floor(v),n=Math.floor(R);if(s.state.width!==r||s.state.height!==n||s.state.offsetWidth!==p||s.state.offsetHeight!==a){var o={width:r,height:n,offsetWidth:p,offsetHeight:a};s.setState(o),f&&Promise.resolve().then(function(){f(Object(J.a)(Object(J.a)({},o),{},{offsetWidth:p,offsetHeight:a}))})}},s.setChildNode=function(l){s.childNode=l},s}return Object(L.a)(u,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var f=Object(c.a)(this.childNode||this),m=f!==this.currentElement;m&&(this.destroyObserver(),this.currentElement=f),!this.resizeObserver&&f&&(this.resizeObserver=new h.default(this.onResize),this.resizeObserver.observe(f))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,f=Object(C.a)(l);if(f.length>1)Object(x.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(f.length===0)return Object(x.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var m=f[0];if(w.isValidElement(m)&&Object(i.c)(m)){var E=m.ref;f[0]=w.cloneElement(m,{ref:Object(i.a)(E,this.setChildNode)})}return f.length===1?f[0]:f.map(function(v,R){return!w.isValidElement(v)||"key"in v&&v.key!==null?v:w.cloneElement(v,{key:"".concat(O,"-").concat(R)})})}}]),u}(w.Component);T.displayName="ResizeObserver",me.a=T},u3os:function($e,me,z){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.ver=me.clear=me.bind=void 0;var J=z("P4Qj"),N=function(w,_){var c=(0,J.getSensor)(w);return c.bind(_),function(){c.unbind(_)}};me.bind=N;var L=function(w){var _=(0,J.getSensor)(w);(0,J.removeSensor)(_)};me.clear=L;var Q="1.0.1";me.ver=Q},ulZh:function($e,me,z){typeof window!="undefined"&&function(N,L){$e.exports=L()}(this,function(){return function(J){var N={};function L(Q){if(N[Q])return N[Q].exports;var D=N[Q]={i:Q,l:!1,exports:{}};return J[Q].call(D.exports,D,D.exports,L),D.l=!0,D.exports}return L.m=J,L.c=N,L.d=function(Q,D,w){L.o(Q,D)||Object.defineProperty(Q,D,{enumerable:!0,get:w})},L.r=function(Q){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},L.t=function(Q,D){if(D&1&&(Q=L(Q)),D&8)return Q;if(D&4&&typeof Q=="object"&&Q&&Q.__esModule)return Q;var w=Object.create(null);if(L.r(w),Object.defineProperty(w,"default",{enumerable:!0,value:Q}),D&2&&typeof Q!="string")for(var _ in Q)L.d(w,_,function(c){return Q[c]}.bind(null,_));return w},L.n=function(Q){var D=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return L.d(D,"a",D),D},L.o=function(Q,D){return Object.prototype.hasOwnProperty.call(Q,D)},L.p="/dist/",L(L.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(J,N,L){"use strict";var Q=Object.prototype.hasOwnProperty,D="~";function w(){}Object.create&&(w.prototype=Object.create(null),new w().__proto__||(D=!1));function _(i,h,O){this.fn=i,this.context=h,this.once=O||!1}function c(i,h,O,T,y){if(typeof O!="function")throw new TypeError("The listener must be a function");var B=new _(O,T||i,y),u=D?D+h:h;return i._events[u]?i._events[u].fn?i._events[u]=[i._events[u],B]:i._events[u].push(B):(i._events[u]=B,i._eventsCount++),i}function C(i,h){--i._eventsCount===0?i._events=new w:delete i._events[h]}function x(){this._events=new w,this._eventsCount=0}x.prototype.eventNames=function(){var h=[],O,T;if(this._eventsCount===0)return h;for(T in O=this._events)Q.call(O,T)&&h.push(D?T.slice(1):T);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(O)):h},x.prototype.listeners=function(h){var O=D?D+h:h,T=this._events[O];if(!T)return[];if(T.fn)return[T.fn];for(var y=0,B=T.length,u=new Array(B);y<B;y++)u[y]=T[y].fn;return u},x.prototype.listenerCount=function(h){var O=D?D+h:h,T=this._events[O];return T?T.fn?1:T.length:0},x.prototype.emit=function(h,O,T,y,B,u){var s=D?D+h:h;if(!this._events[s])return!1;var l=this._events[s],f=arguments.length,m,E;if(l.fn){l.once&&this.removeListener(h,l.fn,void 0,!0);switch(f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,O),!0;case 3:return l.fn.call(l.context,O,T),!0;case 4:return l.fn.call(l.context,O,T,y),!0;case 5:return l.fn.call(l.context,O,T,y,B),!0;case 6:return l.fn.call(l.context,O,T,y,B,u),!0}for(E=1,m=new Array(f-1);E<f;E++)m[E-1]=arguments[E];l.fn.apply(l.context,m)}else{var v=l.length,R;for(E=0;E<v;E++){l[E].once&&this.removeListener(h,l[E].fn,void 0,!0);switch(f){case 1:l[E].fn.call(l[E].context);break;case 2:l[E].fn.call(l[E].context,O);break;case 3:l[E].fn.call(l[E].context,O,T);break;case 4:l[E].fn.call(l[E].context,O,T,y);break;default:if(!m)for(R=1,m=new Array(f-1);R<f;R++)m[R-1]=arguments[R];l[E].fn.apply(l[E].context,m)}}}return!0},x.prototype.on=function(h,O,T){return c(this,h,O,T,!1)},x.prototype.once=function(h,O,T){return c(this,h,O,T,!0)},x.prototype.removeListener=function(h,O,T,y){var B=D?D+h:h;if(!this._events[B])return this;if(!O)return C(this,B),this;var u=this._events[B];if(u.fn)u.fn===O&&(!y||u.once)&&(!T||u.context===T)&&C(this,B);else{for(var s=0,l=[],f=u.length;s<f;s++)(u[s].fn!==O||y&&!u[s].once||T&&u[s].context!==T)&&l.push(u[s]);l.length?this._events[B]=l.length===1?l[0]:l:C(this,B)}return this},x.prototype.removeAllListeners=function(h){var O;return h?(O=D?D+h:h,this._events[O]&&C(this,O)):(this._events=new w,this._eventsCount=0),this},x.prototype.off=x.prototype.removeListener,x.prototype.addListener=x.prototype.on,x.prefixed=D,x.EventEmitter=x,J.exports=x},"./node_modules/url-toolkit/src/url-toolkit.js":function(J,N,L){(function(Q){var D=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,w=/^([^\/?#]*)([^]*)$/,_=/(?:\/|^)\.(?=\/)/g,c=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,C={buildAbsoluteURL:function(x,i,h){if(h=h||{},x=x.trim(),i=i.trim(),!i){if(!h.alwaysNormalize)return x;var O=C.parseURL(x);if(!O)throw new Error("Error trying to parse base URL.");return O.path=C.normalizePath(O.path),C.buildURLFromParts(O)}var T=C.parseURL(i);if(!T)throw new Error("Error trying to parse relative URL.");if(T.scheme)return h.alwaysNormalize?(T.path=C.normalizePath(T.path),C.buildURLFromParts(T)):i;var y=C.parseURL(x);if(!y)throw new Error("Error trying to parse base URL.");if(!y.netLoc&&y.path&&y.path[0]!=="/"){var B=w.exec(y.path);y.netLoc=B[1],y.path=B[2]}y.netLoc&&!y.path&&(y.path="/");var u={scheme:y.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(u.netLoc=y.netLoc,T.path[0]!=="/"))if(!T.path)u.path=y.path,T.params||(u.params=y.params,T.query||(u.query=y.query));else{var s=y.path,l=s.substring(0,s.lastIndexOf("/")+1)+T.path;u.path=C.normalizePath(l)}return u.path===null&&(u.path=h.alwaysNormalize?C.normalizePath(T.path):T.path),C.buildURLFromParts(u)},parseURL:function(x){var i=D.exec(x);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(x){for(x=x.split("").reverse().join("").replace(_,"");x.length!==(x=x.replace(c,"")).length;);return x.split("").reverse().join("")},buildURLFromParts:function(x){return x.scheme+x.netLoc+x.path+x.params+x.query+x.fragment}};J.exports=C})(this)},"./node_modules/webworkify-webpack/index.js":function(J,N,L){function Q(h){var O={};function T(B){if(O[B])return O[B].exports;var u=O[B]={i:B,l:!1,exports:{}};return h[B].call(u.exports,u,u.exports,T),u.l=!0,u.exports}T.m=h,T.c=O,T.i=function(B){return B},T.d=function(B,u,s){T.o(B,u)||Object.defineProperty(B,u,{configurable:!1,enumerable:!0,get:s})},T.r=function(B){Object.defineProperty(B,"__esModule",{value:!0})},T.n=function(B){var u=B&&B.__esModule?function(){return B.default}:function(){return B};return T.d(u,"a",u),u},T.o=function(B,u){return Object.prototype.hasOwnProperty.call(B,u)},T.p="/",T.oe=function(B){throw console.error(B),B};var y=T(T.s=ENTRY_MODULE);return y.default||y}var D="[\\.|\\-|\\+|\\w|/|@]+",w="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+D+").*?\\)";function _(h){return(h+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(h){return!isNaN(1*h)}function C(h,O,T){var y={};y[T]=[];var B=O.toString(),u=B.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return y;for(var s=u[1],l=new RegExp("(\\\\n|\\W)"+_(s)+w,"g"),f;f=l.exec(B);){if(f[3]==="dll-reference")continue;y[T].push(f[3])}for(l=new RegExp("\\("+_(s)+'\\("(dll-reference\\s('+D+'))"\\)\\)'+w,"g");f=l.exec(B);)h[f[2]]||(y[T].push(f[1]),h[f[2]]=L(f[1]).m),y[f[2]]=y[f[2]]||[],y[f[2]].push(f[4]);for(var m=Object.keys(y),E=0;E<m.length;E++)for(var v=0;v<y[m[E]].length;v++)c(y[m[E]][v])&&(y[m[E]][v]=1*y[m[E]][v]);return y}function x(h){var O=Object.keys(h);return O.reduce(function(T,y){return T||h[y].length>0},!1)}function i(h,O){for(var T={main:[O]},y={main:[]},B={main:{}};x(T);)for(var u=Object.keys(T),s=0;s<u.length;s++){var l=u[s],f=T[l],m=f.pop();if(B[l]=B[l]||{},B[l][m]||!h[l][m])continue;B[l][m]=!0,y[l]=y[l]||[],y[l].push(m);for(var E=C(h,h[l][m],l),v=Object.keys(E),R=0;R<v.length;R++)T[v[R]]=T[v[R]]||[],T[v[R]]=T[v[R]].concat(E[v[R]])}return y}J.exports=function(h,O){O=O||{};var T={main:L.m},y=O.all?{main:Object.keys(T.main)}:i(T,h),B="";Object.keys(y).filter(function(m){return m!=="main"}).forEach(function(m){for(var E=0;y[m][E];)E++;y[m].push(E),T[m][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",B=B+"var "+m+" = ("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+y[m].map(function(v){return""+JSON.stringify(v)+": "+T[m][v].toString()}).join(",")+`});
|
|
`}),B=B+"new (("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(h))+")({"+y.main.map(function(m){return""+JSON.stringify(m)+": "+T.main[m].toString()}).join(",")+"}))(self);";var u=new window.Blob([B],{type:"text/javascript"});if(O.bare)return u;var s=window.URL||window.webkitURL||window.mozURL||window.msURL,l=s.createObjectURL(u),f=new window.Worker(l);return f.objectURL=l,f}},"./src/config.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"hlsDefaultConfig",function(){return R}),L.d(N,"mergeConfig",function(){return a}),L.d(N,"enableStreamingMode",function(){return r});var Q=L("./src/controller/abr-controller.ts"),D=L("./src/controller/audio-stream-controller.ts"),w=L("./src/controller/audio-track-controller.ts"),_=L("./src/controller/subtitle-stream-controller.ts"),c=L("./src/controller/subtitle-track-controller.ts"),C=L("./src/controller/buffer-controller.ts"),x=L("./src/controller/timeline-controller.ts"),i=L("./src/controller/cap-level-controller.ts"),h=L("./src/controller/fps-controller.ts"),O=L("./src/controller/eme-controller.ts"),T=L("./src/controller/cmcd-controller.ts"),y=L("./src/utils/xhr-loader.ts"),B=L("./src/utils/fetch-loader.ts"),u=L("./src/utils/cues.ts"),s=L("./src/utils/mediakeys-helper.ts"),l=L("./src/utils/logger.ts");function f(){return f=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var S=arguments[o];for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(n[b]=S[b])}return n},f.apply(this,arguments)}function m(n,o){var S=Object.keys(n);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(n);o&&(b=b.filter(function(g){return Object.getOwnPropertyDescriptor(n,g).enumerable})),S.push.apply(S,b)}return S}function E(n){for(var o=1;o<arguments.length;o++){var S=arguments[o]!=null?arguments[o]:{};o%2?m(Object(S),!0).forEach(function(b){v(n,b,S[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(S)):m(Object(S)).forEach(function(b){Object.defineProperty(n,b,Object.getOwnPropertyDescriptor(S,b))})}return n}function v(n,o,S){return o in n?Object.defineProperty(n,o,{value:S,enumerable:!0,configurable:!0,writable:!0}):n[o]=S,n}var R=E(E({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:y.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Q.default,bufferController:C.default,capLevelController:i.default,fpsController:h.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:s.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},p()),{},{subtitleStreamController:_.SubtitleStreamController,subtitleTrackController:c.default,timelineController:x.TimelineController,audioStreamController:D.default,audioTrackController:w.default,emeController:O.default,cmcdController:T.default});function p(){return{cueHandler:u.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 a(n,o){if((o.liveSyncDurationCount||o.liveMaxLatencyDurationCount)&&(o.liveSyncDuration||o.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(o.liveMaxLatencyDurationCount!==void 0&&(o.liveSyncDurationCount===void 0||o.liveMaxLatencyDurationCount<=o.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(o.liveMaxLatencyDuration!==void 0&&(o.liveSyncDuration===void 0||o.liveMaxLatencyDuration<=o.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return f({},n,o)}function r(n){var o=n.loader;if(o!==B.default&&o!==y.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),n.progressive=!1;else{var S=Object(B.fetchSupported)();S&&(n.loader=B.default,n.progressive=!0,n.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/ewma-bandwidth-estimator.ts"),w=L("./src/events.ts"),_=L("./src/utils/buffer-helper.ts"),c=L("./src/errors.ts"),C=L("./src/types/loader.ts"),x=L("./src/utils/logger.ts");function i(T,y){for(var B=0;B<y.length;B++){var u=y[B];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(T,u.key,u)}}function h(T,y,B){return y&&i(T.prototype,y),B&&i(T,B),T}var O=function(){function T(B){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=B;var u=B.config;this.bwEstimator=new D.default(u.abrEwmaSlowVoD,u.abrEwmaFastVoD,u.abrEwmaDefaultEstimate),this.registerListeners()}var y=T.prototype;return y.registerListeners=function(){var u=this.hls;u.on(w.Events.FRAG_LOADING,this.onFragLoading,this),u.on(w.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(w.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){var u=this.hls;u.off(w.Events.FRAG_LOADING,this.onFragLoading,this),u.off(w.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(w.Events.ERROR,this.onError,this)},y.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},y.onFragLoading=function(u,s){var l=s.frag;if(l.type===C.PlaylistLevelType.MAIN&&!this.timer){var f;this.fragCurrent=l,this.partCurrent=(f=s.part)!=null?f:null,this.timer=self.setInterval(this.onCheck,100)}},y.onLevelLoaded=function(u,s){var l=this.hls.config;s.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},y._abandonRulesCheck=function(){var u=this.fragCurrent,s=this.partCurrent,l=this.hls,f=l.autoLevelEnabled,m=l.config,E=l.media;if(!u||!E)return;var v=s?s.stats:u.stats,R=s?s.duration:u.duration;if(v.aborted){x.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!f||E.paused||!E.playbackRate||!E.readyState)return;var p=performance.now()-v.loading.start,a=Math.abs(E.playbackRate);if(p<=500*R/a)return;var r=l.levels,n=l.minAutoLevel,o=r[u.level],S=v.total||Math.max(v.loaded,Math.round(R*o.maxBitrate/8)),b=Math.max(1,v.bwEstimate?v.bwEstimate/8:v.loaded*1e3/p),g=(S-v.loaded)/b,U=E.currentTime,K=(_.BufferHelper.bufferInfo(E,U,m.maxBufferHole).end-U)/a;if(K>=2*R/a||g<=K)return;var W=Number.POSITIVE_INFINITY,q;for(q=u.level-1;q>n;q--){var Y=r[q].maxBitrate;if(W=R*Y/(8*.8*b),W<K)break}if(W>=g)return;var V=this.bwEstimator.getEstimate();x.logger.warn("Fragment "+u.sn+(s?" part "+s.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+q+`
|
|
Current BW estimate: `+(Object(Q.isFiniteNumber)(V)?(V/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+g.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
Time to underbuffer: `+K.toFixed(3)+" s"),l.nextLoadLevel=q,this.bwEstimator.sample(p,v.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),l.trigger(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:s,stats:v})},y.onFragLoaded=function(u,s){var l=s.frag,f=s.part;if(l.type===C.PlaylistLevelType.MAIN&&Object(Q.isFiniteNumber)(l.sn)){var m=f?f.stats:l.stats,E=f?f.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var v=this.hls.levels[l.level],R=(v.loaded?v.loaded.bytes:0)+m.loaded,p=(v.loaded?v.loaded.duration:0)+E;v.loaded={bytes:R,duration:p},v.realBitrate=Math.round(8*R/p)}if(l.bitrateTest){var a={stats:m,frag:l,part:f,id:l.type};this.onFragBuffered(w.Events.FRAG_BUFFERED,a),l.bitrateTest=!1}}},y.onFragBuffered=function(u,s){var l=s.frag,f=s.part,m=f?f.stats:l.stats;if(m.aborted)return;if(l.type!==C.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var E=m.parsing.end-m.loading.start;this.bwEstimator.sample(E,m.loaded),m.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},y.onError=function(u,s){switch(s.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},y.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},y.getNextABRAutoLevel=function(){var u=this.fragCurrent,s=this.partCurrent,l=this.hls,f=l.maxAutoLevel,m=l.config,E=l.minAutoLevel,v=l.media,R=s?s.duration:u?u.duration:0,p=v?v.currentTime:0,a=v&&v.playbackRate!==0?Math.abs(v.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():m.abrEwmaDefaultEstimate,n=(_.BufferHelper.bufferInfo(v,p,m.maxBufferHole).end-p)/a,o=this.findBestLevel(r,E,f,n,m.abrBandWidthFactor,m.abrBandWidthUpFactor);if(o>=0)return o;x.logger.trace((n?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var S=R?Math.min(R,m.maxStarvationDelay):m.maxStarvationDelay,b=m.abrBandWidthFactor,g=m.abrBandWidthUpFactor;if(!n){var U=this.bitrateTestDelay;if(U){var K=R?Math.min(R,m.maxLoadingDelay):m.maxLoadingDelay;S=K-U,x.logger.trace("bitrate test took "+Math.round(1e3*U)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*S)+" ms"),b=g=1}}return o=this.findBestLevel(r,E,f,n+S,b,g),Math.max(o,0)},y.findBestLevel=function(u,s,l,f,m,E){for(var v,R=this.fragCurrent,p=this.partCurrent,a=this.lastLoadedFragLevel,r=this.hls.levels,n=r[a],o=!!(n!=null&&(v=n.details)!==null&&v!==void 0&&v.live),S=n==null?void 0:n.codecSet,b=p?p.duration:R?R.duration:0,g=l;g>=s;g--){var U=r[g];if(!U||S&&U.codecSet!==S)continue;var K=U.details,W=(p?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||b,q=void 0;g<=a?q=m*u:q=E*u;var Y=r[g].maxBitrate,V=Y*W/q;if(x.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(q)+"/"+Y+"/"+W+"/"+f+"/"+V),q>Y&&(!V||o&&!this.bitrateTestDelay||V<f))return g}return-1},h(T,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,s=this.bwEstimator;if(u!==-1&&(!s||!s.canEstimate()))return u;var l=this.getNextABRAutoLevel();return u!==-1&&(l=Math.min(u,l)),l},set:function(u){this._nextAutoLevel=u}}]),T}();N.default=O},"./src/controller/audio-stream-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/polyfills/number.ts"),D=L("./src/controller/base-stream-controller.ts"),w=L("./src/events.ts"),_=L("./src/utils/buffer-helper.ts"),c=L("./src/controller/fragment-tracker.ts"),C=L("./src/types/level.ts"),x=L("./src/types/loader.ts"),i=L("./src/loader/fragment.ts"),h=L("./src/demux/chunk-cache.ts"),O=L("./src/demux/transmuxer-interface.ts"),T=L("./src/types/transmuxer.ts"),y=L("./src/controller/fragment-finders.ts"),B=L("./src/utils/discontinuities.ts"),u=L("./src/errors.ts"),s=L("./src/utils/logger.ts");function l(){return l=Object.assign||function(R){for(var p=1;p<arguments.length;p++){var a=arguments[p];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(R[r]=a[r])}return R},l.apply(this,arguments)}function f(R,p){R.prototype=Object.create(p.prototype),R.prototype.constructor=R,m(R,p)}function m(R,p){return m=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},m(R,p)}var E=100,v=function(R){f(p,R);function p(r,n){var o;return o=R.call(this,r,n,"[audio-stream-controller]")||this,o.videoBuffer=null,o.videoTrackCC=-1,o.waitingVideoCC=-1,o.audioSwitch=!1,o.trackId=-1,o.waitingData=null,o.mainDetails=null,o.bufferFlushed=!1,o._registerListeners(),o}var a=p.prototype;return a.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},a._registerListeners=function(){var n=this.hls;n.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(w.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.on(w.Events.ERROR,this.onError,this),n.on(w.Events.BUFFER_RESET,this.onBufferReset,this),n.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(w.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},a._unregisterListeners=function(){var n=this.hls;n.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(w.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.off(w.Events.ERROR,this.onError,this),n.off(w.Events.BUFFER_RESET,this.onBufferReset,this),n.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(w.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},a.onInitPtsFound=function(n,o){var S=o.frag,b=o.id,g=o.initPTS;if(b==="main"){var U=S.cc;this.initPTS[S.cc]=g,this.log("InitPTS for cc: "+U+" found from main: "+g),this.videoTrackCC=U,this.state===D.State.WAITING_INIT_PTS&&this.tick()}},a.startLoad=function(n){if(!this.levels){this.startPosition=n,this.state=D.State.STOPPED;return}var o=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,o>0&&n===-1?(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),this.state=D.State.IDLE):(this.loadedmetadata=!1,this.state=D.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()},a.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_TRACK:{var n,o=this.levels,S=this.trackId,b=o==null||((n=o[S])===null||n===void 0)?void 0:n.details;if(b){if(this.waitForCdnTuneIn(b))break;this.state=D.State.WAITING_INIT_PTS}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var g,U=performance.now(),K=this.retryDate;(!K||U>=K||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=D.State.IDLE);break}case D.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var q=W.frag,Y=W.part,V=W.cache,te=W.complete;if(this.initPTS[q.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.FRAG_LOADING;var X=V.flush(),se={frag:q,part:Y,payload:X,networkDetails:null};this._handleFragmentLoadProgress(se),te&&R.prototype._handleFragmentLoadComplete.call(this,se)}else if(this.videoTrackCC!==this.waitingVideoCC)s.logger.log("Waiting fragment cc ("+q.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var le=this.getLoadPosition(),Te=_.BufferHelper.bufferInfo(this.mediaBuffer,le,this.config.maxBufferHole),Ee=Object(y.fragmentWithinToleranceTest)(Te.end,this.config.maxFragLookUpTolerance,q);Ee<0&&(s.logger.log("Waiting fragment cc ("+q.cc+") @ "+q.start+" cancelled because another fragment at "+Te.end+" is needed"),this.clearWaitingFragment())}}else this.state=D.State.IDLE}}this.onTickEnd()},a.clearWaitingFragment=function(){var n=this.waitingData;n&&(this.fragmentTracker.removeFragment(n.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.IDLE)},a.onTickEnd=function(){var n=this.media;if(!n||!n.readyState)return;var o=this.mediaBuffer?this.mediaBuffer:n,S=o.buffered;!this.loadedmetadata&&S.length&&(this.loadedmetadata=!0),this.lastCurrentTime=n.currentTime},a.doTickIdle=function(){var n,o,S=this.hls,b=this.levels,g=this.media,U=this.trackId,K=S.config;if(!b||!b[U])return;if(!g&&(this.startFragRequested||!K.startFragPrefetch))return;var W=b[U],q=W.details;if(!q||q.live&&this.levelLastLoaded!==U||this.waitForCdnTuneIn(q)){this.state=D.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,x.PlaylistLevelType.AUDIO));var Y=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,x.PlaylistLevelType.AUDIO);if(Y===null)return;var V=Y.len,te=this.getMaxBufferLength(),X=this.audioSwitch;if(V>=te&&!X)return;if(!X&&this._streamEnded(Y,q)){S.trigger(w.Events.BUFFER_EOS,{type:"audio"}),this.state=D.State.ENDED;return}var se=q.fragments,le=se[0].start,Te=Y.end;if(X){var Ee=this.getLoadPosition();Te=Ee,q.PTSKnown&&Ee<le&&((Y.end>le||Y.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=le+.05))}var Be=this.getNextFragment(Te,q);if(!Be){this.bufferFlushed=!0;return}((n=Be.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((o=Be.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(Be,q):this.loadFragment(Be,q,Te)},a.getMaxBufferLength=function(){var n=R.prototype.getMaxBufferLength.call(this),o=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,x.PlaylistLevelType.MAIN);return o===null?n:Math.max(n,o.len)},a.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},a.onAudioTracksUpdated=function(n,o){var S=o.audioTracks;this.resetTransmuxer(),this.levels=S.map(function(b){return new C.Level(b)})},a.onAudioTrackSwitching=function(n,o){var S=!!o.url;this.trackId=o.id;var b=this.fragCurrent;b!=null&&b.loader&&b.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),S?this.setInterval(E):this.resetTransmuxer(),S?(this.audioSwitch=!0,this.state=D.State.IDLE):this.state=D.State.STOPPED,this.tick()},a.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},a.onLevelLoaded=function(n,o){this.mainDetails=o.details},a.onAudioTrackLoaded=function(n,o){var S,b=this.levels,g=o.details,U=o.id;if(!b){this.warn("Audio tracks were reset while loading level "+U);return}this.log("Track "+U+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var K=b[U],W=0;if(g.live||(S=K.details)!==null&&S!==void 0&&S.live){var q=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!q)return;!K.details&&g.hasProgramDateTime&&q.hasProgramDateTime?(Object(B.alignMediaPlaylistByPDT)(g,q),W=g.fragments[0].start):W=this.alignPlaylists(g,K.details)}K.details=g,this.levelLastLoaded=U,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(K.details,W),this.state===D.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=D.State.IDLE),this.tick()},a._handleFragmentLoadProgress=function(n){var o,S=n.frag,b=n.part,g=n.payload,U=this.config,K=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+S.sn+" of level "+S.level+" will not be buffered");return}var q=W[K];console.assert(q,"Audio track is defined on fragment load progress");var Y=q.details;console.assert(Y,"Audio track details are defined on fragment load progress");var V=U.defaultAudioCodec||q.audioCodec||"mp4a.40.2",te=this.transmuxer;te||(te=this.transmuxer=new O.default(this.hls,x.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var X=this.initPTS[S.cc],se=(o=S.initSegment)===null||o===void 0?void 0:o.data;if(X!==void 0){var le=!1,Te=b?b.index:-1,Ee=Te!==-1,Be=new T.ChunkMetadata(S.level,S.sn,S.stats.chunkCount,g.byteLength,Te,Ee);te.push(g,se,V,"",S,b,Y.totalduration,le,Be,X)}else{s.logger.log("Unknown video PTS for cc "+S.cc+", waiting for video PTS before demuxing audio frag "+S.sn+" of ["+Y.startSN+" ,"+Y.endSN+"],track "+K);var De=this.waitingData=this.waitingData||{frag:S,part:b,cache:new h.default,complete:!1},Ve=De.cache;Ve.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=D.State.WAITING_INIT_PTS}},a._handleFragmentLoadComplete=function(n){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,n)},a.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},a.onBufferCreated=function(n,o){var S=o.tracks.audio;S&&(this.mediaBuffer=S.buffer),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},a.onFragBuffered=function(n,o){var S=o.frag,b=o.part;if(S.type!==x.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(S)){this.warn("Fragment "+S.sn+(b?" p: "+b.index:"")+" of level "+S.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}S.sn!=="initSegment"&&(this.fragPrevious=S,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(S,b)},a.onError=function(n,o){switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(x.PlaylistLevelType.AUDIO,o);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==D.State.ERROR&&this.state!==D.State.STOPPED&&(this.state=o.fatal?D.State.ERROR:D.State.IDLE,this.warn(o.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var S=!0,b=this.getFwdBufferInfo(this.mediaBuffer,x.PlaylistLevelType.AUDIO);b&&b.len>.5&&(S=!this.reduceMaxBufferLength(b.len)),S&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},a.onBufferFlushed=function(n,o){var S=o.type;S===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},a._handleTransmuxComplete=function(n){var o,S="audio",b=this.hls,g=n.remuxResult,U=n.chunkMeta,K=this.getCurrentContext(U);if(!K){this.warn("The loading context changed while buffering fragment "+U.sn+" of level "+U.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(U.level);return}var W=K.frag,q=K.part,Y=g.audio,V=g.text,te=g.id3,X=g.initSegment;if(this.fragContextChanged(W))return;if(this.state=D.State.PARSING,this.audioSwitch&&Y&&this.completeAudioSwitch(),X!=null&&X.tracks&&(this._bufferInitSegment(X.tracks,W,U),b.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:S,tracks:X.tracks})),Y){var se=Y.startPTS,le=Y.endPTS,Te=Y.startDTS,Ee=Y.endDTS;q&&(q.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:le,startDTS:Te,endDTS:Ee}),W.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,se,le,Te,Ee),this.bufferFragmentData(Y,W,q,U)}if(te!=null&&(o=te.samples)!==null&&o!==void 0&&o.length){var Be=l({frag:W,id:S},te);b.trigger(w.Events.FRAG_PARSING_METADATA,Be)}if(V){var De=l({frag:W,id:S},V);b.trigger(w.Events.FRAG_PARSING_USERDATA,De)}},a._bufferInitSegment=function(n,o,S){if(this.state!==D.State.PARSING)return;n.video&&delete n.video;var b=n.audio;if(!b)return;b.levelCodec=b.codec,b.id="audio",this.log("Init audio buffer, container:"+b.container+", codecs[parsed]=["+b.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,n);var g=b.initSegment;if(g!=null&&g.byteLength){var U={type:"audio",frag:o,part:null,chunkMeta:S,parent:o.type,data:g};this.hls.trigger(w.Events.BUFFER_APPENDING,U)}this.tick()},a.loadFragment=function(n,o,S){var b=this.fragmentTracker.getState(n);this.fragCurrent=n,(this.audioSwitch||b===c.FragmentState.NOT_LOADED||b===c.FragmentState.PARTIAL)&&(n.sn==="initSegment"?this._loadInitSegment(n):o.live&&!Object(Q.isFiniteNumber)(this.initPTS[n.cc])?(this.log("Waiting for video PTS in continuity counter "+n.cc+" of live stream before loading audio fragment "+n.sn+" of level "+this.trackId),this.state=D.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,n,o,S)))},a.completeAudioSwitch=function(){var n=this.hls,o=this.media,S=this.trackId;o&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,n.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:S})},p}(D.default);N.default=v},"./src/controller/audio-track-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts"),D=L("./src/errors.ts"),w=L("./src/controller/base-playlist-controller.ts"),_=L("./src/types/loader.ts");function c(O,T){for(var y=0;y<T.length;y++){var B=T[y];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(O,B.key,B)}}function C(O,T,y){return T&&c(O.prototype,T),y&&c(O,y),O}function x(O,T){O.prototype=Object.create(T.prototype),O.prototype.constructor=O,i(O,T)}function i(O,T){return i=Object.setPrototypeOf||function(B,u){return B.__proto__=u,B},i(O,T)}var h=function(O){x(T,O);function T(B){var u;return u=O.call(this,B,"[audio-track-controller]")||this,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.trackName="",u.selectDefaultTrack=!0,u.registerListeners(),u}var y=T.prototype;return y.registerListeners=function(){var u=this.hls;u.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(Q.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){var u=this.hls;u.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(Q.Events.ERROR,this.onError,this)},y.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,O.prototype.destroy.call(this)},y.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},y.onManifestParsed=function(u,s){this.tracks=s.audioTracks||[]},y.onAudioTrackLoaded=function(u,s){var l=s.id,f=s.details,m=this.tracksInGroup[l];if(!m){this.warn("Invalid audio track id "+l);return}var E=m.details;m.details=s.details,this.log("audioTrack "+l+" loaded ["+f.startSN+"-"+f.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,s,E))},y.onLevelLoading=function(u,s){this.switchLevel(s.level)},y.onLevelSwitching=function(u,s){this.switchLevel(s.level)},y.switchLevel=function(u){var s=this.hls.levels[u];if(!(s!=null&&s.audioGroupIds))return;var l=s.audioGroupIds[s.urlId];if(this.groupId!==l){this.groupId=l;var f=this.tracks.filter(function(E){return!l||E.groupId===l});this.selectDefaultTrack&&!f.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=f;var m={audioTracks:f};this.log("Updating audio tracks, "+f.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(Q.Events.AUDIO_TRACKS_UPDATED,m),this.selectInitialTrack()}},y.onError=function(u,s){if(O.prototype.onError.call(this,u,s),s.fatal||!s.context)return;s.context.type===_.PlaylistContextType.AUDIO_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},y.setAudioTrack=function(u){var s=this.tracksInGroup;if(u<0||u>=s.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=s[this.trackId];this.log("Now switching to audio-track index "+u);var f=s[u],m=f.id,E=f.groupId,v=E===void 0?"":E,R=f.name,p=f.type,a=f.url;if(this.trackId=u,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(Q.Events.AUDIO_TRACK_SWITCHING,{id:m,groupId:v,name:R,type:p,url:a}),f.details&&!f.details.live)return;var r=this.switchParams(f.url,l==null?void 0:l.details);this.loadPlaylist(r)},y.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var s=this.trackName,l=this.findTrackId(s)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},y.findTrackId=function(u){for(var s=this.tracksInGroup,l=0;l<s.length;l++){var f=s[l];if((!this.selectDefaultTrack||f.default)&&(!u||u===f.name))return f.id}return-1},y.loadPlaylist=function(u){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var l=s.id,f=s.groupId,m=s.url;if(u)try{m=u.addDirectives(m)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(Q.Events.AUDIO_TRACK_LOADING,{url:m,id:l,groupId:f,deliveryDirectives:u||null})}},C(T,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1,this.setAudioTrack(u)}}]),T}(w.default);N.default=h},"./src/controller/base-playlist-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return C});var Q=L("./src/polyfills/number.ts"),D=L("./src/types/level.ts"),w=L("./src/controller/level-helper.ts"),_=L("./src/utils/logger.ts"),c=L("./src/errors.ts"),C=function(){function x(h,O){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=_.logger.log.bind(_.logger,O+":"),this.warn=_.logger.warn.bind(_.logger,O+":"),this.hls=h}var i=x.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(O,T){T.fatal&&T.type===c.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(O,T){var y=T==null?void 0:T.renditionReports;if(y)for(var B=0;B<y.length;B++){var u=y[B],s=""+u.URI;if(s===O.substr(-s.length)){var l=parseInt(u["LAST-MSN"]),f=parseInt(u["LAST-PART"]);if(T&&this.hls.config.lowLatencyMode){var m=Math.min(T.age-T.partTarget,T.targetduration);f!==void 0&&m>T.partTarget&&(f+=1)}if(Object(Q.isFiniteNumber)(l))return new D.HlsUrlParameters(l,Object(Q.isFiniteNumber)(f)?f:void 0,D.HlsSkip.No)}}},i.loadPlaylist=function(O){},i.shouldLoadTrack=function(O){return this.canLoad&&O&&!!O.url&&(!O.details||O.details.live)},i.playlistLoaded=function(O,T,y){var B=this,u=T.details,s=T.stats,l=s.loading.end?Math.max(0,self.performance.now()-s.loading.end):0;if(u.advancedDateTime=Date.now()-l,u.live||y!=null&&y.live){if(u.reloaded(y),y&&this.log("live playlist "+O+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),y&&u.fragments.length>0&&Object(w.mergeDetails)(y,u),!this.canLoad||!u.live)return;var f,m=void 0,E=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var v=this.hls.config.lowLatencyMode,R=u.lastPartSn,p=u.endSN,a=u.lastPartIndex,r=a!==-1,n=R===p,o=v?0:a;r?(m=n?p+1:R,E=n?o:a+1):m=p+1;var S=u.age,b=S+u.ageHeader,g=Math.min(b-u.partTarget,u.targetduration*1.5);if(g>0){if(y&&g>y.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+y.tuneInGoal+" to: "+g+" with playlist age: "+u.age),g=0;else{var U=Math.floor(g/u.targetduration);if(m+=U,E!==void 0){var K=Math.round(g%u.targetduration/u.partTarget);E+=K}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+S.toFixed(2)+"s goal: "+g+" skip sn "+U+" to part "+E)}u.tuneInGoal=g}if(f=this.getDeliveryDirectives(u,T.deliveryDirectives,m,E),v||!n){this.loadPlaylist(f);return}}else f=this.getDeliveryDirectives(u,T.deliveryDirectives,m,E);var W=Object(w.computeReloadInterval)(u,s);m!==void 0&&u.canBlockReload&&(W-=u.partTarget||1),this.log("reload live playlist "+O+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return B.loadPlaylist(f)},W)}else this.clearTimer()},i.getDeliveryDirectives=function(O,T,y,B){var u=Object(D.getSkipValue)(O,y);return T!=null&&T.skip&&O.deltaUpdateFailed&&(y=T.msn,B=T.part,u=D.HlsSkip.No),new D.HlsUrlParameters(y,B,u)},i.retryLoadingOrFail=function(O){var T=this,y=this.hls.config,B=this.retryCount<y.levelLoadingMaxRetry;if(B){var u;if(this.retryCount++,O.details.indexOf("LoadTimeOut")>-1&&(u=O.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+O.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*y.levelLoadingRetryDelay,y.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return T.loadPlaylist()},s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+O.details+'"')}}else this.warn('cannot recover from error "'+O.details+'"'),this.clearTimer(),O.fatal=!0;return B},x}()},"./src/controller/base-stream-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"State",function(){return p}),L.d(N,"default",function(){return a});var Q=L("./src/polyfills/number.ts"),D=L("./src/task-loop.ts"),w=L("./src/controller/fragment-tracker.ts"),_=L("./src/utils/buffer-helper.ts"),c=L("./src/utils/logger.ts"),C=L("./src/events.ts"),x=L("./src/errors.ts"),i=L("./src/types/transmuxer.ts"),h=L("./src/utils/mp4-tools.ts"),O=L("./src/utils/discontinuities.ts"),T=L("./src/controller/fragment-finders.ts"),y=L("./src/controller/level-helper.ts"),B=L("./src/loader/fragment-loader.ts"),u=L("./src/crypt/decrypter.ts"),s=L("./src/utils/time-ranges.ts"),l=L("./src/types/loader.ts");function f(r,n){for(var o=0;o<n.length;o++){var S=n[o];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(r,S.key,S)}}function m(r,n,o){return n&&f(r.prototype,n),o&&f(r,o),r}function E(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function v(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,R(r,n)}function R(r,n){return R=Object.setPrototypeOf||function(S,b){return S.__proto__=b,S},R(r,n)}var p={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"},a=function(r){v(n,r);function n(S,b,g){var U;return U=r.call(this)||this,U.hls=void 0,U.fragPrevious=null,U.fragCurrent=null,U.fragmentTracker=void 0,U.transmuxer=null,U._state=p.STOPPED,U.media=void 0,U.mediaBuffer=void 0,U.config=void 0,U.bitrateTest=!1,U.lastCurrentTime=0,U.nextLoadPosition=0,U.startPosition=0,U.loadedmetadata=!1,U.fragLoadError=0,U.retryDate=0,U.levels=null,U.fragmentLoader=void 0,U.levelLastLoaded=null,U.startFragRequested=!1,U.decrypter=void 0,U.initPTS=[],U.onvseeking=null,U.onvended=null,U.logPrefix="",U.log=void 0,U.warn=void 0,U.logPrefix=g,U.log=c.logger.log.bind(c.logger,g+":"),U.warn=c.logger.warn.bind(c.logger,g+":"),U.hls=S,U.fragmentLoader=new B.default(S.config),U.fragmentTracker=b,U.config=S.config,U.decrypter=new u.default(S,S.config),S.on(C.Events.KEY_LOADED,U.onKeyLoaded,E(U)),U}var o=n.prototype;return o.doTick=function(){this.onTickEnd()},o.onTickEnd=function(){},o.startLoad=function(b){},o.stopLoad=function(){this.fragmentLoader.abort();var b=this.fragCurrent;b&&this.fragmentTracker.removeFragment(b),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=p.STOPPED},o._streamEnded=function(b,g){var U=this.fragCurrent,K=this.fragmentTracker;if(!g.live&&U&&U.sn===g.endSN&&!b.nextStart){var W=K.getState(U);return W===w.FragmentState.PARTIAL||W===w.FragmentState.OK}return!1},o.onMediaAttached=function(b,g){var U=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),U.addEventListener("seeking",this.onvseeking),U.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===p.STOPPED&&this.startLoad(K.startPosition)},o.onMediaDetaching=function(){var b=this.media;b!=null&&b.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),b&&(b.removeEventListener("seeking",this.onvseeking),b.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},o.onMediaSeeking=function(){var b=this.config,g=this.fragCurrent,U=this.media,K=this.mediaBuffer,W=this.state,q=U?U.currentTime:0,Y=_.BufferHelper.bufferInfo(K||U,q,b.maxBufferHole);if(this.log("media seeking to "+(Object(Q.isFiniteNumber)(q)?q.toFixed(3):q)+", state: "+W),W===p.ENDED)this.resetLoadingState();else if(g&&!Y.len){var V=b.maxFragLookUpTolerance,te=g.start-V,X=g.start+g.duration+V,se=q>X;(q<te||se)&&(se&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}U&&(this.lastCurrentTime=q),!this.loadedmetadata&&!Y.len&&(this.nextLoadPosition=this.startPosition=q),this.tickImmediate()},o.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},o.onKeyLoaded=function(b,g){if(this.state!==p.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=p.IDLE;var U=this.levels[g.frag.level].details;U&&this.loadFragment(g.frag,U,g.frag.start)},o.onHandlerDestroying=function(){this.stopLoad(),r.prototype.onHandlerDestroying.call(this)},o.onHandlerDestroyed=function(){this.state=p.STOPPED,this.hls.off(C.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,r.prototype.onHandlerDestroyed.call(this)},o.loadKey=function(b,g){this.log("Loading key for "+b.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+b.level),this.state=p.KEY_LOADING,this.fragCurrent=b,this.hls.trigger(C.Events.KEY_LOADING,{frag:b})},o.loadFragment=function(b,g,U){this._loadFragForPlayback(b,g,U)},o._loadFragForPlayback=function(b,g,U){var K=this,W=function(Y){if(K.fragContextChanged(b)){K.warn("Fragment "+b.sn+(Y.part?" p: "+Y.part.index:"")+" of level "+b.level+" was dropped during download."),K.fragmentTracker.removeFragment(b);return}b.stats.chunkCount++,K._handleFragmentLoadProgress(Y)};this._doFragLoad(b,g,U,W).then(function(q){if(!q)return;K.fragLoadError=0;var Y=K.state;if(K.fragContextChanged(b)){(Y===p.FRAG_LOADING||Y===p.BACKTRACKING||!K.fragCurrent&&Y===p.PARSING)&&(K.fragmentTracker.removeFragment(b),K.state=p.IDLE);return}if("payload"in q&&(K.log("Loaded fragment "+b.sn+" of level "+b.level),K.hls.trigger(C.Events.FRAG_LOADED,q),K.state===p.BACKTRACKING)){K.fragmentTracker.backtrack(b,q),K.resetFragmentLoading(b);return}K._handleFragmentLoadComplete(q)}).catch(function(q){K.warn(q),K.resetFragmentLoading(b)})},o.flushMainBuffer=function(b,g,U){if(U===void 0&&(U=null),!(b-g))return;var K={startOffset:b,endOffset:g,type:U};this.fragLoadError=0,this.hls.trigger(C.Events.BUFFER_FLUSHING,K)},o._loadInitSegment=function(b){var g=this;this._doFragLoad(b).then(function(U){if(!U||g.fragContextChanged(b)||!g.levels)throw new Error("init load aborted");return U}).then(function(U){var K=g.hls,W=U.payload,q=b.decryptdata;if(W&&W.byteLength>0&&q&&q.key&&q.iv&&q.method==="AES-128"){var Y=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(W),q.key.buffer,q.iv.buffer).then(function(V){var te=self.performance.now();return K.trigger(C.Events.FRAG_DECRYPTED,{frag:b,payload:V,stats:{tstart:Y,tdecrypt:te}}),U.payload=V,U})}return U}).then(function(U){var K=g.fragCurrent,W=g.hls,q=g.levels;if(!q)throw new Error("init load aborted, missing levels");var Y=q[b.level].details;console.assert(Y,"Level details are defined when init segment is loaded");var V=b.stats;g.state=p.IDLE,g.fragLoadError=0,b.data=new Uint8Array(U.payload),V.parsing.start=V.buffering.start=self.performance.now(),V.parsing.end=V.buffering.end=self.performance.now(),U.frag===K&&W.trigger(C.Events.FRAG_BUFFERED,{stats:V,frag:K,part:null,id:b.type}),g.tick()}).catch(function(U){g.warn(U),g.resetFragmentLoading(b)})},o.fragContextChanged=function(b){var g=this.fragCurrent;return!b||!g||b.level!==g.level||b.sn!==g.sn||b.urlId!==g.urlId},o.fragBufferedComplete=function(b,g){var U=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+b.type+" sn: "+b.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+b.level+" "+s.default.toString(_.BufferHelper.getBuffered(U))),this.state=p.IDLE,this.tick()},o._handleFragmentLoadComplete=function(b){var g=this.transmuxer;if(!g)return;var U=b.frag,K=b.part,W=b.partsLoaded,q=!W||W.length===0||W.some(function(V){return!V}),Y=new i.ChunkMetadata(U.level,U.sn,U.stats.chunkCount+1,0,K?K.index:-1,!q);g.flush(Y)},o._handleFragmentLoadProgress=function(b){},o._doFragLoad=function(b,g,U,K){var W=this;if(U===void 0&&(U=null),!this.levels)throw new Error("frag load aborted, missing levels");if(U=Math.max(b.start,U||0),this.config.lowLatencyMode&&g){var q=g.partList;if(q&&K){U>b.end&&g.fragmentHint&&(b=g.fragmentHint);var Y=this.getNextPart(q,b,U);if(Y>-1){var V=q[Y];return this.log("Loading part sn: "+b.sn+" p: "+V.index+" cc: "+b.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+Y+"-"+(q.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+b.level+", target: "+parseFloat(U.toFixed(3))),this.nextLoadPosition=V.start+V.duration,this.state=p.FRAG_LOADING,this.hls.trigger(C.Events.FRAG_LOADING,{frag:b,part:q[Y],targetBufferTime:U}),this.doFragPartsLoad(b,q,Y,K).catch(function(te){return W.handleFragLoadError(te)})}else if(!b.url||this.loadedEndOfParts(q,U))return Promise.resolve(null)}}return this.log("Loading fragment "+b.sn+" cc: "+b.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+b.level+", target: "+parseFloat(U.toFixed(3))),Object(Q.isFiniteNumber)(b.sn)&&!this.bitrateTest&&(this.nextLoadPosition=b.start+b.duration),this.state=p.FRAG_LOADING,this.hls.trigger(C.Events.FRAG_LOADING,{frag:b,targetBufferTime:U}),this.fragmentLoader.load(b,K).catch(function(te){return W.handleFragLoadError(te)})},o.doFragPartsLoad=function(b,g,U,K){var W=this;return new Promise(function(q,Y){var V=[],te=function X(se){var le=g[se];W.fragmentLoader.loadPart(b,le,K).then(function(Te){V[le.index]=Te;var Ee=Te.part;W.hls.trigger(C.Events.FRAG_LOADED,Te);var Be=g[se+1];if(Be&&Be.fragment===b)X(se+1);else return q({frag:b,part:Ee,partsLoaded:V})}).catch(Y)};te(U)})},o.handleFragLoadError=function(b){var g=b.data;return g&&g.details===x.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(C.Events.ERROR,g),null},o._handleTransmuxerFlush=function(b){var g=this.getCurrentContext(b);if(!g||this.state!==p.PARSING){this.fragCurrent||(this.state=p.IDLE);return}var U=g.frag,K=g.part,W=g.level,q=self.performance.now();U.stats.parsing.end=q,K&&(K.stats.parsing.end=q),this.updateLevelTiming(U,K,W,b.partial)},o.getCurrentContext=function(b){var g=this.levels,U=b.level,K=b.sn,W=b.part;if(!g||!g[U])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+U+". The current chunk will not be buffered."),null;var q=g[U],Y=W>-1?Object(y.getPartWith)(q,K,W):null,V=Y?Y.fragment:Object(y.getFragmentWithSN)(q,K,this.fragCurrent);return V?{frag:V,part:Y,level:q}:null},o.bufferFragmentData=function(b,g,U,K){if(!b||this.state!==p.PARSING)return;var W=b.data1,q=b.data2,Y=W;if(W&&q&&(Y=Object(h.appendUint8Array)(W,q)),!Y||!Y.length)return;var V={type:b.type,frag:g,part:U,chunkMeta:K,parent:g.type,data:Y};this.hls.trigger(C.Events.BUFFER_APPENDING,V),b.dropped&&b.independent&&!U&&this.flushBufferGap(g)},o.flushBufferGap=function(b){var g=this.media;if(!g)return;if(!_.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,b.start);return}var U=g.currentTime,K=_.BufferHelper.bufferInfo(g,U,0),W=b.duration,q=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),Y=Math.max(Math.min(b.start-q,K.end-q),U+q);b.start-Y>q&&this.flushMainBuffer(Y,b.start)},o.getFwdBufferInfo=function(b,g){var U=this.config,K=this.getLoadPosition();if(!Object(Q.isFiniteNumber)(K))return null;var W=_.BufferHelper.bufferInfo(b,K,U.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var q=this.fragmentTracker.getBufferedFrag(K,g);if(q&&W.nextStart<q.end)return _.BufferHelper.bufferInfo(b,K,Math.max(W.nextStart,U.maxBufferHole))}return W},o.getMaxBufferLength=function(b){var g=this.config,U;return b?U=Math.max(8*g.maxBufferSize/b,g.maxBufferLength):U=g.maxBufferLength,Math.min(U,g.maxMaxBufferLength)},o.reduceMaxBufferLength=function(b){var g=this.config,U=b||g.maxBufferLength;return g.maxMaxBufferLength>=U?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},o.getNextFragment=function(b,g){var U,K,W=g.fragments,q=W.length;if(!q)return null;var Y=this.config,V=W[0].start,te;if(g.live){var X=Y.initialLiveManifestSize;if(q<X)return this.warn("Not enough fragments to start playback (have: "+q+", need: "+X+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(te=this.getInitialLiveFragment(g,W),this.startPosition=te?this.hls.liveSyncPosition||te.start:b)}else b<=V&&(te=W[0]);if(!te){var se=Y.lowLatencyMode?g.partEnd:g.fragmentEnd;te=this.getFragmentAtPosition(b,se,g)}return(U=te)!==null&&U!==void 0&&U.initSegment&&!((K=te)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(te=te.initSegment),te},o.getNextPart=function(b,g,U){for(var K=-1,W=!1,q=!0,Y=0,V=b.length;Y<V;Y++){var te=b[Y];if(q=q&&!te.independent,K>-1&&U<te.start)break;var X=te.loaded;!X&&(W||te.independent||q)&&te.fragment===g&&(K=Y),W=X}return K},o.loadedEndOfParts=function(b,g){var U=b[b.length-1];return U&&g>U.start&&U.loaded},o.getInitialLiveFragment=function(b,g){var U=this.fragPrevious,K=null;if(U){if(b.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+U.programDateTime),K=Object(T.findFragmentByPDT)(g,U.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var W=U.sn+1;if(W>=b.startSN&&W<=b.endSN){var q=g[W-b.startSN];U.cc===q.cc&&(K=q,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(T.findFragWithCC)(g,U.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var Y=this.hls.liveSyncPosition;Y!==null&&(K=this.getFragmentAtPosition(Y,this.bitrateTest?b.fragmentEnd:b.edge,b))}return K},o.getFragmentAtPosition=function(b,g,U){var K=this.config,W=this.fragPrevious,q=U.fragments,Y=U.endSN,V=U.fragmentHint,te=K.maxFragLookUpTolerance,X=!!(K.lowLatencyMode&&U.partList&&V);X&&V&&!this.bitrateTest&&(q=q.concat(V),Y=V.sn);var se;if(b<g){var le=b>g-te?0:te;se=Object(T.findFragmentByPTS)(W,q,b,le)}else se=q[q.length-1];if(se){var Te=se.sn-U.startSN,Ee=W&&se.level===W.level,Be=q[Te+1],De=this.fragmentTracker.getState(se);if(De===w.FragmentState.BACKTRACKED){se=null;for(var Ve=Te;q[Ve]&&this.fragmentTracker.getState(q[Ve])===w.FragmentState.BACKTRACKED;)W?se=q[Ve--]:se=q[--Ve];se||(se=Be)}else W&&se.sn===W.sn&&!X&&(Ee&&(se.sn<Y&&this.fragmentTracker.getState(Be)!==w.FragmentState.OK?(this.log("SN "+se.sn+" just loaded, load next one: "+Be.sn),se=Be):se=null))}return se},o.synchronizeToLiveEdge=function(b){var g=this.config,U=this.media;if(!U)return;var K=this.hls.liveSyncPosition,W=U.currentTime,q=b.fragments[0].start,Y=b.edge,V=W>=q-g.maxFragLookUpTolerance&&W<=Y;if(K!==null&&U.duration>K&&(W<K||!V)){var te=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*b.targetduration;(!V&&U.readyState<4||W<Y-te)&&(this.loadedmetadata||(this.nextLoadPosition=K),U.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+Y+", reset currentTime to : "+K.toFixed(3)),U.currentTime=K))}},o.alignPlaylists=function(b,g){var U=this.levels,K=this.levelLastLoaded,W=this.fragPrevious,q=K!==null?U[K]:null,Y=b.fragments.length;if(!Y)return this.warn("No fragments in live playlist"),0;var V=b.fragments[0].start,te=!g,X=b.alignedSliding&&Object(Q.isFiniteNumber)(V);if(te||!X&&!V){Object(O.alignStream)(W,q,b);var se=b.fragments[0].start;return this.log("Live playlist sliding: "+se.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+b.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+Y),se}return V},o.waitForCdnTuneIn=function(b){var g=3;return b.live&&b.canBlockReload&&b.tuneInGoal>Math.max(b.partHoldBack,b.partTarget*g)},o.setStartPosition=function(b,g){var U=this.startPosition;if(U<g&&(U=-1),U===-1||this.lastCurrentTime===-1){var K=b.startTimeOffset;Object(Q.isFiniteNumber)(K)?(U=g+K,K<0&&(U+=b.totalduration),U=Math.min(Math.max(g,U),g+b.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+U),this.startPosition=U):b.live?U=this.hls.liveSyncPosition||g:this.startPosition=U=0,this.lastCurrentTime=U}this.nextLoadPosition=U},o.getLoadPosition=function(){var b=this.media,g=0;return this.loadedmetadata&&b?g=b.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},o.handleFragLoadAborted=function(b,g){this.transmuxer&&b.sn!=="initSegment"&&b.stats.aborted&&(this.warn("Fragment "+b.sn+(g?" part"+g.index:"")+" of level "+b.level+" was aborted"),this.resetFragmentLoading(b))},o.resetFragmentLoading=function(b){(!this.fragCurrent||!this.fragContextChanged(b))&&(this.state=p.IDLE)},o.onFragmentOrKeyLoadError=function(b,g){if(g.fatal)return;var U=g.frag;if(!U||U.type!==b)return;var K=this.fragCurrent;console.assert(K&&U.sn===K.sn&&U.level===K.level&&U.urlId===K.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(U.level))return;var q=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+U.sn+" of "+b+" "+U.level+" failed to load, retrying in "+q+"ms"),this.retryDate=self.performance.now()+q,this.fragLoadError++,this.state=p.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(b===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=p.IDLE):(c.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=p.ERROR)},o.afterBufferFlushed=function(b,g,U){if(!b)return;var K=_.BufferHelper.getBuffered(b);this.fragmentTracker.detectEvictedFragments(g,K,U),this.state===p.ENDED&&this.resetLoadingState()},o.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=p.IDLE},o.resetLiveStartWhenNotLoaded=function(b){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[b].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},o.updateLevelTiming=function(b,g,U,K){var W=this,q=U.details;console.assert(!!q,"level.details must be defined");var Y=Object.keys(b.elementaryStreams).reduce(function(V,te){var X=b.elementaryStreams[te];if(X){var se=X.endPTS-X.startPTS;if(se<=0)return W.warn("Could not parse fragment "+b.sn+" "+te+" duration reliably ("+se+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),V||!1;var le=K?0:Object(y.updateFragPTSDTS)(q,b,X.startPTS,X.endPTS,X.startDTS,X.endDTS);return W.hls.trigger(C.Events.LEVEL_PTS_UPDATED,{details:q,level:U,drift:le,type:te,frag:b,start:X.startPTS,end:X.endPTS}),!0}return V},!1);Y?(this.state=p.PARSED,this.hls.trigger(C.Events.FRAG_PARSED,{frag:b,part:g})):this.resetLoadingState()},o.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},m(n,[{key:"state",get:function(){return this._state},set:function(b){var g=this._state;g!==b&&(this._state=b,this.log(g+"->"+b))}}]),n}(D.default)},"./src/controller/buffer-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return T});var Q=L("./src/polyfills/number.ts"),D=L("./src/events.ts"),w=L("./src/utils/logger.ts"),_=L("./src/errors.ts"),c=L("./src/utils/buffer-helper.ts"),C=L("./src/utils/mediasource-helper.ts"),x=L("./src/loader/fragment.ts"),i=L("./src/controller/buffer-operation-queue.ts"),h=Object(C.getMediaSource)(),O=/([ha]vc.)(?:\.[^.,]+)+/,T=function(){function y(u){var s=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 l=s.hls,f=s.media,m=s.mediaSource;w.logger.log("[buffer-controller]: Media source opened"),f&&(s.updateMediaElementDuration(),l.trigger(D.Events.MEDIA_ATTACHED,{media:f})),m&&m.removeEventListener("sourceopen",s._onMediaSourceOpen),s.checkPendingTracks()},this._onMediaSourceClose=function(){w.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){w.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var B=y.prototype;return B.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},B.destroy=function(){this.unregisterListeners(),this.details=null},B.registerListeners=function(){var s=this.hls;s.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(D.Events.BUFFER_RESET,this.onBufferReset,this),s.on(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.on(D.Events.BUFFER_EOS,this.onBufferEos,this),s.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.on(D.Events.FRAG_PARSED,this.onFragParsed,this),s.on(D.Events.FRAG_CHANGED,this.onFragChanged,this)},B.unregisterListeners=function(){var s=this.hls;s.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(D.Events.BUFFER_RESET,this.onBufferReset,this),s.off(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.off(D.Events.BUFFER_EOS,this.onBufferEos,this),s.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.off(D.Events.FRAG_PARSED,this.onFragParsed,this),s.off(D.Events.FRAG_CHANGED,this.onFragChanged,this)},B._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},B.onManifestParsed=function(s,l){var f=2;(l.audio&&!l.video||!l.altAudio)&&(f=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=f,this.details=null,w.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},B.onMediaAttaching=function(s,l){var f=this.media=l.media;if(f&&h){var m=this.mediaSource=new h;m.addEventListener("sourceopen",this._onMediaSourceOpen),m.addEventListener("sourceended",this._onMediaSourceEnded),m.addEventListener("sourceclose",this._onMediaSourceClose),f.src=self.URL.createObjectURL(m),this._objectUrl=f.src}},B.onMediaDetaching=function(){var s=this.media,l=this.mediaSource,f=this._objectUrl;if(l){if(w.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(m){w.logger.warn("[buffer-controller]: onMediaDetaching: "+m.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),s&&(f&&self.URL.revokeObjectURL(f),s.src===f?(s.removeAttribute("src"),s.load()):w.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(D.Events.MEDIA_DETACHED,void 0)},B.onBufferReset=function(){var s=this;this.getSourceBufferTypes().forEach(function(l){var f=s.sourceBuffer[l];try{f&&(s.removeBufferListeners(l),s.mediaSource&&s.mediaSource.removeSourceBuffer(f),s.sourceBuffer[l]=void 0)}catch(m){w.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",m)}}),this._initSourceBuffer()},B.onBufferCodecs=function(s,l){var f=this,m=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(E){if(m){var v=f.tracks[E];if(v&&typeof v.buffer.changeType=="function"){var R=l[E],p=R.codec,a=R.levelCodec,r=R.container,n=(v.levelCodec||v.codec).replace(O,"$1"),o=(a||p).replace(O,"$1");if(n!==o){var S=r+";codecs="+(a||p);f.appendChangeType(E,S)}}}else f.pendingTracks[E]=l[E]}),m)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},B.appendChangeType=function(s,l){var f=this,m=this.operationQueue,E={execute:function(){var R=f.sourceBuffer[s];R&&(w.logger.log("[buffer-controller]: changing "+s+" sourceBuffer type to "+l),R.changeType(l)),m.shiftAndExecuteNext(s)},onStart:function(){},onComplete:function(){},onError:function(R){w.logger.warn("[buffer-controller]: Failed to change "+s+" SourceBuffer type",R)}};m.append(E,s)},B.onBufferAppending=function(s,l){var f=this,m=this.hls,E=this.operationQueue,v=this.tracks,R=l.data,p=l.type,a=l.frag,r=l.part,n=l.chunkMeta,o=n.buffering[p],S=self.performance.now();o.start=S;var b=a.stats.buffering,g=r?r.stats.buffering:null;b.start===0&&(b.start=S),g&&g.start===0&&(g.start=S);var U=v.audio,K=p==="audio"&&n.id===1&&(U==null?void 0:U.container)==="audio/mpeg",W={execute:function(){if(o.executeStart=self.performance.now(),K){var Y=f.sourceBuffer[p];if(Y){var V=a.start-Y.timestampOffset;Math.abs(V)>=.1&&(w.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+a.start+" (delta: "+V+") sn: "+a.sn+")"),Y.timestampOffset=a.start)}}f.appendExecutor(R,p)},onStart:function(){},onComplete:function(){var Y=self.performance.now();o.executeEnd=o.end=Y,b.first===0&&(b.first=Y),g&&g.first===0&&(g.first=Y);var V=f.sourceBuffer,te={};for(var X in V)te[X]=c.BufferHelper.getBuffered(V[X]);f.appendError=0,f.hls.trigger(D.Events.BUFFER_APPENDED,{type:p,frag:a,part:r,chunkMeta:n,parent:a.type,timeRanges:te})},onError:function(Y){w.logger.error("[buffer-controller]: Error encountered while trying to append to the "+p+" SourceBuffer",Y);var V={type:_.ErrorTypes.MEDIA_ERROR,parent:a.type,details:_.ErrorDetails.BUFFER_APPEND_ERROR,err:Y,fatal:!1};Y.code===DOMException.QUOTA_EXCEEDED_ERR?V.details=_.ErrorDetails.BUFFER_FULL_ERROR:(f.appendError++,V.details=_.ErrorDetails.BUFFER_APPEND_ERROR,f.appendError>m.config.appendErrorMaxRetry&&(w.logger.error("[buffer-controller]: Failed "+m.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),V.fatal=!0)),m.trigger(D.Events.ERROR,V)}};E.append(W,p)},B.onBufferFlushing=function(s,l){var f=this,m=this.operationQueue,E=function(R){return{execute:f.removeExecutor.bind(f,R,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){f.hls.trigger(D.Events.BUFFER_FLUSHED,{type:R})},onError:function(a){w.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",a)}}};l.type?m.append(E(l.type),l.type):this.getSourceBufferTypes().forEach(function(v){m.append(E(v),v)})},B.onFragParsed=function(s,l){var f=this,m=l.frag,E=l.part,v=[],R=E?E.elementaryStreams:m.elementaryStreams;R[x.ElementaryStreamTypes.AUDIOVIDEO]?v.push("audiovideo"):(R[x.ElementaryStreamTypes.AUDIO]&&v.push("audio"),R[x.ElementaryStreamTypes.VIDEO]&&v.push("video"));var p=function(){var r=self.performance.now();m.stats.buffering.end=r,E&&(E.stats.buffering.end=r);var n=E?E.stats:m.stats;f.hls.trigger(D.Events.FRAG_BUFFERED,{frag:m,part:E,stats:n,id:m.type})};v.length===0&&w.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+m.type+" level: "+m.level+" sn: "+m.sn),this.blockBuffers(p,v)},B.onFragChanged=function(s,l){this.flushBackBuffer()},B.onBufferEos=function(s,l){var f=this,m=this.getSourceBufferTypes().reduce(function(E,v){var R=f.sourceBuffer[v];return(!l.type||l.type===v)&&(R&&!R.ended&&(R.ended=!0,w.logger.log("[buffer-controller]: "+v+" sourceBuffer now EOS"))),E&&!!(!R||R.ended)},!0);m&&this.blockBuffers(function(){var E=f.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},B.onLevelUpdated=function(s,l){var f=l.details;if(!f.fragments.length)return;this.details=f,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},B.flushBackBuffer=function(){var s=this.hls,l=this.details,f=this.media,m=this.sourceBuffer;if(!f||l===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var v=l.live&&s.config.liveBackBufferLength!==null?s.config.liveBackBufferLength:s.config.backBufferLength;if(!Object(Q.isFiniteNumber)(v)||v<0)return;var R=f.currentTime,p=l.levelTargetDuration,a=Math.max(v,p),r=Math.floor(R/p)*p-a;E.forEach(function(n){var o=m[n];if(o){var S=c.BufferHelper.getBuffered(o);S.length>0&&r>S.start(0)&&(s.trigger(D.Events.BACK_BUFFER_REACHED,{bufferEnd:r}),l.live&&s.trigger(D.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r}),s.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n}))}})},B.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var s=this.details,l=this.hls,f=this.media,m=this.mediaSource,E=s.fragments[0].start+s.totalduration,v=f.duration,R=Object(Q.isFiniteNumber)(m.duration)?m.duration:0;s.live&&l.config.liveDurationInfinity?(w.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),m.duration=Infinity,this.updateSeekableRange(s)):(E>R&&E>v||!Object(Q.isFiniteNumber)(v))&&(w.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),m.duration=E)},B.updateSeekableRange=function(s){var l=this.mediaSource,f=s.fragments,m=f.length;if(m&&s.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var E=Math.max(0,f[0].start),v=Math.max(E,E+s.totalduration);l.setLiveSeekableRange(E,v)}},B.checkPendingTracks=function(){var s=this.bufferCodecEventsExpected,l=this.operationQueue,f=this.pendingTracks,m=Object.keys(f).length;if(m&&!s||m===2){this.createSourceBuffers(f),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(D.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(v){l.executeNext(v)})}},B.createSourceBuffers=function(s){var l=this.sourceBuffer,f=this.mediaSource;if(!f)throw Error("createSourceBuffers called when mediaSource was null");var m=0;for(var E in s)if(!l[E]){var v=s[E];if(!v)throw Error("source buffer exists for track "+E+", however track does not");var R=v.levelCodec||v.codec,p=v.container+";codecs="+R;w.logger.log("[buffer-controller]: creating sourceBuffer("+p+")");try{var a=l[E]=f.addSourceBuffer(p),r=E;this.addBufferListener(r,"updatestart",this._onSBUpdateStart),this.addBufferListener(r,"updateend",this._onSBUpdateEnd),this.addBufferListener(r,"error",this._onSBUpdateError),this.tracks[E]={buffer:a,codec:R,container:v.container,levelCodec:v.levelCodec,id:v.id},m++}catch(n){w.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+n.message),this.hls.trigger(D.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:n,mimeType:p})}}m&&this.hls.trigger(D.Events.BUFFER_CREATED,{tracks:this.tracks})},B._onSBUpdateStart=function(s){var l=this.operationQueue,f=l.current(s);f.onStart()},B._onSBUpdateEnd=function(s){var l=this.operationQueue,f=l.current(s);f.onComplete(),l.shiftAndExecuteNext(s)},B._onSBUpdateError=function(s,l){w.logger.error("[buffer-controller]: "+s+" SourceBuffer error",l),this.hls.trigger(D.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var f=this.operationQueue.current(s);f&&f.onError(l)},B.removeExecutor=function(s,l,f){var m=this.media,E=this.mediaSource,v=this.operationQueue,R=this.sourceBuffer,p=R[s];if(!m||!E||!p){w.logger.warn("[buffer-controller]: Attempting to remove from the "+s+" SourceBuffer, but it does not exist"),v.shiftAndExecuteNext(s);return}var a=Object(Q.isFiniteNumber)(m.duration)?m.duration:Infinity,r=Object(Q.isFiniteNumber)(E.duration)?E.duration:Infinity,n=Math.max(0,l),o=Math.min(f,a,r);o>n?(w.logger.log("[buffer-controller]: Removing ["+n+","+o+"] from the "+s+" SourceBuffer"),console.assert(!p.updating,s+" sourceBuffer must not be updating"),p.remove(n,o)):v.shiftAndExecuteNext(s)},B.appendExecutor=function(s,l){var f=this.operationQueue,m=this.sourceBuffer,E=m[l];if(!E){w.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(l);return}E.ended=!1,console.assert(!E.updating,l+" sourceBuffer must not be updating"),E.appendBuffer(s)},B.blockBuffers=function(s,l){var f=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){w.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(s);return}var m=this.operationQueue,E=l.map(function(v){return m.appendBlocker(v)});Promise.all(E).then(function(){s(),l.forEach(function(v){var R=f.sourceBuffer[v];(!R||!R.updating)&&m.shiftAndExecuteNext(v)})})},B.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},B.addBufferListener=function(s,l,f){var m=this.sourceBuffer[s];if(!m)return;var E=f.bind(this,s);this.listeners[s].push({event:l,listener:E}),m.addEventListener(l,E)},B.removeBufferListeners=function(s){var l=this.sourceBuffer[s];if(!l)return;this.listeners[s].forEach(function(f){l.removeEventListener(f.event,f.listener)})},y}()},"./src/controller/buffer-operation-queue.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return D});var Q=L("./src/utils/logger.ts"),D=function(){function w(c){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=c}var _=w.prototype;return _.append=function(C,x){var i=this.queues[x];i.push(C),i.length===1&&this.buffers[x]&&this.executeNext(x)},_.insertAbort=function(C,x){var i=this.queues[x];i.unshift(C),this.executeNext(x)},_.appendBlocker=function(C){var x,i=new Promise(function(O){x=O}),h={execute:x,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,C),i},_.executeNext=function(C){var x=this.buffers,i=this.queues,h=x[C],O=i[C];if(O.length){var T=O[0];try{T.execute()}catch(y){Q.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),T.onError(y),(!h||!h.updating)&&(O.shift(),this.executeNext(C))}}},_.shiftAndExecuteNext=function(C){this.queues[C].shift(),this.executeNext(C)},_.current=function(C){return this.queues[C][0]},w}()},"./src/controller/cap-level-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts");function D(c,C){for(var x=0;x<C.length;x++){var i=C[x];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function w(c,C,x){return C&&D(c.prototype,C),x&&D(c,x),c}var _=function(){function c(x){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=x,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var C=c.prototype;return C.setStreamController=function(i){this.streamController=i},C.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},C.registerListeners=function(){var i=this.hls;i.on(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},C.unregisterListener=function(){var i=this.hls;i.off(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},C.onFpsDropLevelCapping=function(i,h){c.isLevelAllowed(h.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(h.droppedLevel)},C.onMediaAttaching=function(i,h){this.media=h.media instanceof HTMLVideoElement?h.media:null},C.onManifestParsed=function(i,h){var O=this.hls;this.restrictedLevels=[],this.firstLevel=h.firstLevel,O.config.capLevelToPlayerSize&&h.video&&this.startCapping()},C.onBufferCodecs=function(i,h){var O=this.hls;O.config.capLevelToPlayerSize&&h.video&&this.startCapping()},C.onMediaDetaching=function(){this.stopCapping()},C.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(i.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},C.getMaxLevel=function(i){var h=this,O=this.hls.levels;if(!O.length)return-1;var T=O.filter(function(y,B){return c.isLevelAllowed(B,h.restrictedLevels)&&B<=i});return this.clientRect=null,c.getMaxLevelByMediaSize(T,this.mediaWidth,this.mediaHeight)},C.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()},C.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},C.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,h={width:0,height:0};if(i){var O=i.getBoundingClientRect();h.width=O.width,h.height=O.height,!h.width&&!h.height&&(h.width=O.right-O.left||i.width||0,h.height=O.bottom-O.top||i.height||0)}return this.clientRect=h,h},c.isLevelAllowed=function(i,h){return h===void 0&&(h=[]),h.indexOf(i)===-1},c.getMaxLevelByMediaSize=function(i,h,O){if(!i||!i.length)return-1;for(var T=function(l,f){return f?l.width!==f.width||l.height!==f.height:!0},y=i.length-1,B=0;B<i.length;B+=1){var u=i[B];if((u.width>=h||u.height>=O)&&T(u,i[B+1])){y=B;break}}return y},w(c,[{key:"mediaWidth",get:function(){return this.getDimensions().width*c.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*c.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(h){}return i}}]),c}();N.default=_},"./src/controller/cmcd-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return T});var Q=L("./src/events.ts"),D=L("./src/types/cmcd.ts"),w=L("./src/utils/buffer-helper.ts"),_=L("./src/utils/logger.ts");function c(y,B){for(var u=0;u<B.length;u++){var s=B[u];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(y,s.key,s)}}function C(y,B,u){return B&&c(y.prototype,B),u&&c(y,u),y}function x(y,B){var u=typeof Symbol!="undefined"&&y[Symbol.iterator]||y["@@iterator"];if(u)return(u=u.call(y)).next.bind(u);if(Array.isArray(y)||(u=i(y))||B&&y&&typeof y.length=="number"){u&&(y=u);var s=0;return function(){return s>=y.length?{done:!0}:{done:!1,value:y[s++]}}}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(y,B){if(!y)return;if(typeof y=="string")return h(y,B);var u=Object.prototype.toString.call(y).slice(8,-1);if(u==="Object"&&y.constructor&&(u=y.constructor.name),u==="Map"||u==="Set")return Array.from(y);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return h(y,B)}function h(y,B){(B==null||B>y.length)&&(B=y.length);for(var u=0,s=new Array(B);u<B;u++)s[u]=y[u];return s}function O(){return O=Object.assign||function(y){for(var B=1;B<arguments.length;B++){var u=arguments[B];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(y[s]=u[s])}return y},O.apply(this,arguments)}var T=function(){function y(u){var s=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(){s.initialized&&(s.starved=!0),s.buffering=!0},this.onPlaying=function(){s.initialized||(s.initialized=!0),s.buffering=!1},this.applyPlaylistData=function(m){try{s.apply(m,{ot:D.CMCDObjectType.MANIFEST,su:!s.initialized})}catch(E){_.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(m){try{var E=m.frag,v=s.hls.levels[E.level],R=s.getObjectType(E),p={d:E.duration*1e3,ot:R};(R===D.CMCDObjectType.VIDEO||R===D.CMCDObjectType.AUDIO||R==D.CMCDObjectType.MUXED)&&(p.br=v.bitrate/1e3,p.tb=s.getTopBandwidth(R),p.bl=s.getBufferLength(R)),s.apply(m,p)}catch(a){_.logger.warn("Could not generate segment CMCD data.",a)}},this.hls=u;var l=this.config=u.config,f=l.cmcd;f!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=f.sessionId||y.uuid(),this.cid=f.contentId,this.useHeaders=f.useHeaders===!0,this.registerListeners())}var B=y.prototype;return B.registerListeners=function(){var s=this.hls;s.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.on(Q.Events.BUFFER_CREATED,this.onBufferCreated,this)},B.unregisterListeners=function(){var s=this.hls;s.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.off(Q.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},B.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},B.onMediaAttached=function(s,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},B.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},B.onBufferCreated=function(s,l){var f,m;this.audioBuffer=(f=l.tracks.audio)===null||f===void 0?void 0:f.buffer,this.videoBuffer=(m=l.tracks.video)===null||m===void 0?void 0:m.buffer},B.createData=function(){var s;return{v:D.CMCDVersion,sf:D.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(s=this.media)===null||s===void 0?void 0:s.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},B.apply=function(s,l){l===void 0&&(l={}),O(l,this.createData());var f=l.ot===D.CMCDObjectType.INIT||l.ot===D.CMCDObjectType.VIDEO||l.ot===D.CMCDObjectType.MUXED;if(this.starved&&f&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var m=y.toHeaders(l);if(!Object.keys(m).length)return;s.headers||(s.headers={}),O(s.headers,m)}else{var E=y.toQuery(l);if(!E)return;s.url=y.appendQueryToUri(s.url,E)}},B.getObjectType=function(s){var l=s.type;return l==="subtitle"?D.CMCDObjectType.TIMED_TEXT:s.sn==="initSegment"?D.CMCDObjectType.INIT:l==="audio"?D.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?D.CMCDObjectType.VIDEO:D.CMCDObjectType.MUXED:void 0},B.getTopBandwidth=function(s){for(var l=0,f=s===D.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,m=x(f),E;!(E=m()).done;){var v=E.value;v.bitrate>l&&(l=v.bitrate)}return l>0?l:NaN},B.getBufferLength=function(s){var l=this.hls.media,f=s===D.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!f||!l)return NaN;var m=w.BufferHelper.bufferInfo(f,l.currentTime,this.config.maxBufferHole);return m.len*1e3},B.createPlaylistLoader=function(){var s=this.config.pLoader,l=this.applyPlaylistData,f=s||this.config.loader;return function(){function m(v){this.loader=void 0,this.loader=new f(v)}var E=m.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(R,p,a){l(R),this.loader.load(R,p,a)},C(m,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),m}()},B.createFragmentLoader=function(){var s=this.config.fLoader,l=this.applyFragmentData,f=s||this.config.loader;return function(){function m(v){this.loader=void 0,this.loader=new f(v)}var E=m.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(R,p,a){l(R),this.loader.load(R,p,a)},C(m,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),m}()},y.uuid=function(){var s=URL.createObjectURL(new Blob),l=s.toString();return URL.revokeObjectURL(s),l.substr(l.lastIndexOf("/")+1)},y.serialize=function(s){for(var l=[],f=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},m=function(K){return Math.round(K)},E=function(K){return m(K/100)*100},v=function(K){return encodeURIComponent(K)},R={br:m,d:m,bl:E,dl:E,mtp:E,nor:v,rtp:E,tb:m},p=Object.keys(s||{}).sort(),a=x(p),r;!(r=a()).done;){var n=r.value,o=s[n];if(!f(o))continue;if(n==="v"&&o===1)continue;if(n=="pr"&&o===1)continue;var S=R[n];S&&(o=S(o));var b=typeof o,g=void 0;n==="ot"||n==="sf"||n==="st"?g=n+"="+o:b==="boolean"?g=n:b==="number"?g=n+"="+o:g=n+"="+JSON.stringify(o),l.push(g)}return l.join(",")},y.toHeaders=function(s){for(var l=Object.keys(s),f={},m=["Object","Request","Session","Status"],E=[{},{},{},{}],v={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,p=l;R<p.length;R++){var a=p[R],r=v[a]!=null?v[a]:1;E[r][a]=s[a]}for(var n=0;n<E.length;n++){var o=y.serialize(E[n]);o&&(f["CMCD-"+m[n]]=o)}return f},y.toQuery=function(s){return"CMCD="+encodeURIComponent(y.serialize(s))},y.appendQueryToUri=function(s,l){if(!l)return s;var f=s.includes("?")?"&":"?";return""+s+f+l},y}()},"./src/controller/eme-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts"),D=L("./src/errors.ts"),w=L("./src/utils/logger.ts"),_=L("./src/utils/mediakeys-helper.ts");function c(T,y){for(var B=0;B<y.length;B++){var u=y[B];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(T,u.key,u)}}function C(T,y,B){return y&&c(T.prototype,y),B&&c(T,B),T}var x=3,i=function(y,B,u){var s={audioCapabilities:[],videoCapabilities:[]};return y.forEach(function(l){s.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:u.audioRobustness||""})}),B.forEach(function(l){s.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:u.videoRobustness||""})}),[s]},h=function(y,B,u,s){switch(y){case _.KeySystems.WIDEVINE:return i(B,u,s);default:throw new Error("Unknown key-system: "+y)}},O=function(){function T(B){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=B,this._config=B.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 y=T.prototype;return y.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},y._registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},y._unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},y.getLicenseServerUrl=function(u){switch(u){case _.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},y._attemptKeySystemAccess=function(u,s,l){var f=this,m=h(u,s,l,this._drmSystemOptions);w.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(u,m);this.mediaKeysPromise=E.then(function(v){return f._onMediaKeySystemAccessObtained(u,v)}),E.catch(function(v){w.logger.error('Failed to obtain key-system "'+u+'" access:',v)})},y._onMediaKeySystemAccessObtained=function(u,s){var l=this;w.logger.log('Access for key-system "'+u+'" obtained');var f={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:s,mediaKeySystemDomain:u};this._mediaKeysList.push(f);var m=Promise.resolve().then(function(){return s.createMediaKeys()}).then(function(E){return f.mediaKeys=E,w.logger.log('Media-keys created for key-system "'+u+'"'),l._onMediaKeysCreated(),E});return m.catch(function(E){w.logger.error("Failed to create media-keys:",E)}),m},y._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(s){s.mediaKeysSession||(s.mediaKeysSession=s.mediaKeys.createSession(),u._onNewMediaKeySession(s.mediaKeysSession))})},y._onNewMediaKeySession=function(u){var s=this;w.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(l){s._onKeySessionMessage(u,l.message)},!1)},y._onKeySessionMessage=function(u,s){w.logger.log("Got EME message event, creating license request"),this._requestLicense(s,function(l){w.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),u.update(l)})},y.onMediaEncrypted=function(u){var s=this;if(w.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){w.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(m){if(!s._media)return;s._attemptSetMediaKeys(m),s._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(l).catch(l)},y._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var s=this._mediaKeysList[0];if(!s||!s.mediaKeys){w.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}w.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(s.mediaKeys),this._hasSetMediaKeys=!0}},y._generateRequestWithPreferredKeySession=function(u,s){var l=this,f=this._mediaKeysList[0];if(!f){w.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(f.mediaKeysSessionInitialized){w.logger.warn("Key-Session already initialized but requested again");return}var m=f.mediaKeysSession;if(!m){w.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!s){w.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}w.logger.log('Generating key-session request for "'+u+'" init data type'),f.mediaKeysSessionInitialized=!0,m.generateRequest(u,s).then(function(){w.logger.debug("Key-session generation succeeded")}).catch(function(E){w.logger.error("Error generating key-session request:",E),l.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},y._createLicenseXhr=function(u,s,l){var f=new XMLHttpRequest;f.responseType="arraybuffer",f.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,f,u,s,l);var m=this._licenseXhrSetup;if(m)try{m.call(this.hls,f,u),m=void 0}catch(E){w.logger.error(E)}try{f.readyState||f.open("POST",u,!0),m&&m.call(this.hls,f,u)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return f},y._onLicenseRequestReadyStageChange=function(u,s,l,f){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,w.logger.log("License request succeeded");var m=u.response,E=this._licenseResponseCallback;if(E)try{m=E.call(this.hls,u,s)}catch(R){w.logger.error(R)}f(m)}else{if(w.logger.error("License Request XHR failed ("+s+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>x){this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var v=x-this._requestLicenseFailureCount+1;w.logger.warn("Retrying license request, "+v+" attempts left"),this._requestLicense(l,f)}break}},y._generateLicenseRequestChallenge=function(u,s){switch(u.mediaKeySystemDomain){case _.KeySystems.WIDEVINE:return s}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},y._requestLicense=function(u,s){w.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){w.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var f=this.getLicenseServerUrl(l.mediaKeySystemDomain),m=this._createLicenseXhr(f,u,s);w.logger.log("Sending license request to URL: "+f);var E=this._generateLicenseRequestChallenge(l,u);m.send(E)}catch(v){w.logger.error("Failure requesting DRM license: "+v),this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},y.onMediaAttached=function(u,s){if(!this._emeEnabled)return;var l=s.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},y.onMediaDetached=function(){var u=this._media,s=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(s.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},y.onManifestParsed=function(u,s){if(!this._emeEnabled)return;var l=s.levels.map(function(m){return m.audioCodec}).filter(function(m){return!!m}),f=s.levels.map(function(m){return m.videoCodec}).filter(function(m){return!!m});this._attemptKeySystemAccess(_.KeySystems.WIDEVINE,l,f)},C(T,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),T}();N.default=O},"./src/controller/fps-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts"),D=L("./src/utils/logger.ts"),w=function(){function _(C){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=C,this.registerListeners()}var c=_.prototype;return c.setStreamController=function(x){this.streamController=x},c.registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(x,i){var h=this.hls.config;if(h.capLevelOnFPSDrop){var O=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=O,O&&typeof O.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(x,i,h){var O=performance.now();if(i){if(this.lastTime){var T=O-this.lastTime,y=h-this.lastDroppedFrames,B=i-this.lastDecodedFrames,u=1e3*y/T,s=this.hls;if(s.trigger(Q.Events.FPS_DROP,{currentDropped:y,currentDecoded:B,totalDroppedFrames:h}),u>0&&y>s.config.fpsDroppedMonitoringThreshold*B){var l=s.currentLevel;D.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(s.autoLevelCapping===-1||s.autoLevelCapping>=l)&&(l=l-1,s.trigger(Q.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:s.currentLevel}),s.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=O,this.lastDroppedFrames=h,this.lastDecodedFrames=i}},c.checkFPSInterval=function(){var x=this.media;if(x)if(this.isVideoPlaybackQualityAvailable){var i=x.getVideoPlaybackQuality();this.checkFPS(x,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(x,x.webkitDecodedFrameCount,x.webkitDroppedFrameCount)},_}();N.default=w},"./src/controller/fragment-finders.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"findFragmentByPDT",function(){return w}),L.d(N,"findFragmentByPTS",function(){return _}),L.d(N,"fragmentWithinToleranceTest",function(){return c}),L.d(N,"pdtWithinToleranceTest",function(){return C}),L.d(N,"findFragWithCC",function(){return x});var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/binary-search.ts");function w(i,h,O){if(h===null||!Array.isArray(i)||!i.length||!Object(Q.isFiniteNumber)(h))return null;var T=i[0].programDateTime;if(h<(T||0))return null;var y=i[i.length-1].endProgramDateTime;if(h>=(y||0))return null;O=O||0;for(var B=0;B<i.length;++B){var u=i[B];if(C(h,O,u))return u}return null}function _(i,h,O,T){O===void 0&&(O=0),T===void 0&&(T=0);var y=null;if(i?y=h[i.sn-h[0].sn+1]||null:O===0&&h[0].start===0&&(y=h[0]),y&&c(O,T,y)===0)return y;var B=D.default.search(h,c.bind(null,O,T));return B||y}function c(i,h,O){i===void 0&&(i=0),h===void 0&&(h=0);var T=Math.min(h,O.duration+(O.deltaPTS?O.deltaPTS:0));return O.start+O.duration-T<=i?1:O.start-T>i&&O.start?-1:0}function C(i,h,O){var T=Math.min(h,O.duration+(O.deltaPTS?O.deltaPTS:0))*1e3,y=O.endProgramDateTime||0;return y-T>i}function x(i,h){return D.default.search(i,function(O){return O.cc<h?1:O.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"FragmentState",function(){return w}),L.d(N,"FragmentTracker",function(){return _});var Q=L("./src/events.ts"),D=L("./src/types/loader.ts"),w;(function(x){x.NOT_LOADED="NOT_LOADED",x.BACKTRACKED="BACKTRACKED",x.APPENDING="APPENDING",x.PARTIAL="PARTIAL",x.OK="OK"})(w||(w={}));var _=function(){function x(h){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=h,this._registerListeners()}var i=x.prototype;return i._registerListeners=function(){var O=this.hls;O.on(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),O.on(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),O.on(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var O=this.hls;O.off(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),O.off(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),O.off(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(O,T){if(T===D.PlaylistLevelType.MAIN){var y=this.activeFragment,B=this.activeParts;if(!y)return null;if(B)for(var u=B.length;u--;){var s=B[u],l=s?s.end:y.appendedPTS;if(s.start<=O&&l!==void 0&&O<=l)return u>9&&(this.activeParts=B.slice(u-9)),s}else if(y.start<=O&&y.appendedPTS!==void 0&&O<=y.appendedPTS)return y}return this.getBufferedFrag(O,T)},i.getBufferedFrag=function(O,T){for(var y=this.fragments,B=Object.keys(y),u=B.length;u--;){var s=y[B[u]];if((s==null?void 0:s.body.type)===T&&s.buffered){var l=s.body;if(l.start<=O&&O<=l.end)return l}}return null},i.detectEvictedFragments=function(O,T,y){var B=this;Object.keys(this.fragments).forEach(function(u){var s=B.fragments[u];if(!s)return;if(!s.buffered){s.body.type===y&&B.removeFragment(s.body);return}var l=s.range[O];if(!l)return;l.time.some(function(f){var m=!B.isTimeBuffered(f.startPTS,f.endPTS,T);return m&&B.removeFragment(s.body),m})})},i.detectPartialFragments=function(O){var T=this,y=this.timeRanges,B=O.frag,u=O.part;if(!y||B.sn==="initSegment")return;var s=C(B),l=this.fragments[s];if(!l)return;Object.keys(y).forEach(function(f){var m=B.elementaryStreams[f];if(!m)return;var E=y[f],v=u!==null||m.partial===!0;l.range[f]=T.getBufferedTimes(B,u,v,E)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},i.fragBuffered=function(O){var T=C(O),y=this.fragments[T];y&&(y.backtrack=y.loaded=null,y.buffered=!0)},i.getBufferedTimes=function(O,T,y,B){for(var u={time:[],partial:y},s=T?T.start:O.start,l=T?T.end:O.end,f=O.minEndPTS||l,m=O.maxStartPTS||s,E=0;E<B.length;E++){var v=B.start(E)-this.bufferPadding,R=B.end(E)+this.bufferPadding;if(m>=v&&f<=R){u.time.push({startPTS:Math.max(s,B.start(E)),endPTS:Math.min(l,B.end(E))});break}else if(s<R&&l>v)u.partial=!0,u.time.push({startPTS:Math.max(s,B.start(E)),endPTS:Math.min(l,B.end(E))});else if(l<=v)break}return u},i.getPartialFragment=function(O){var T=null,y,B,u,s=0,l=this.bufferPadding,f=this.fragments;return Object.keys(f).forEach(function(m){var E=f[m];if(!E)return;c(E)&&(B=E.body.start-l,u=E.body.end+l,O>=B&&O<=u&&(y=Math.min(O-B,u-O),s<=y&&(T=E.body,s=y)))}),T},i.getState=function(O){var T=C(O),y=this.fragments[T];return y?y.buffered?c(y)?w.PARTIAL:w.OK:y.backtrack?w.BACKTRACKED:w.APPENDING:w.NOT_LOADED},i.backtrack=function(O,T){var y=C(O),B=this.fragments[y];if(!B||B.backtrack)return null;var u=B.backtrack=T||B.loaded;return B.loaded=null,u},i.getBacktrackData=function(O){var T=C(O),y=this.fragments[T];if(y){var B,u=y.backtrack;if(u!=null&&(B=u.payload)!==null&&B!==void 0&&B.byteLength)return u;this.removeFragment(O)}return null},i.isTimeBuffered=function(O,T,y){for(var B,u,s=0;s<y.length;s++){if(B=y.start(s)-this.bufferPadding,u=y.end(s)+this.bufferPadding,O>=B&&T<=u)return!0;if(T<=B)return!1}return!1},i.onFragLoaded=function(O,T){var y=T.frag,B=T.part;if(y.sn==="initSegment"||y.bitrateTest||B)return;var u=C(y);this.fragments[u]={body:y,loaded:T,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(O,T){var y=this,B=T.frag,u=T.part,s=T.timeRanges;if(B.type===D.PlaylistLevelType.MAIN)if(this.activeFragment=B,u){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(u)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach(function(f){var m=s[f];if(y.detectEvictedFragments(f,m),!u)for(var E=0;E<m.length;E++)B.appendedPTS=Math.max(m.end(E),B.appendedPTS||0)})},i.onFragBuffered=function(O,T){this.detectPartialFragments(T)},i.hasFragment=function(O){var T=C(O);return!!this.fragments[T]},i.removeFragmentsInRange=function(O,T,y){var B=this;Object.keys(this.fragments).forEach(function(u){var s=B.fragments[u];if(!s)return;if(s.buffered){var l=s.body;l.type===y&&l.start<T&&l.end>O&&B.removeFragment(l)}})},i.removeFragment=function(O){var T=C(O);O.stats.loaded=0,O.clearElementaryStreamInfo(),delete this.fragments[T]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},x}();function c(x){var i,h;return x.buffered&&(((i=x.range.video)===null||i===void 0?void 0:i.partial)||((h=x.range.audio)===null||h===void 0?void 0:h.partial))}function C(x){return x.type+"_"+x.level+"_"+x.urlId+"_"+x.sn}},"./src/controller/gap-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"STALL_MINIMUM_DURATION_MS",function(){return c}),L.d(N,"MAX_START_GAP_JUMP",function(){return C}),L.d(N,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return x}),L.d(N,"SKIP_BUFFER_RANGE_START",function(){return i}),L.d(N,"default",function(){return h});var Q=L("./src/utils/buffer-helper.ts"),D=L("./src/errors.ts"),w=L("./src/events.ts"),_=L("./src/utils/logger.ts"),c=250,C=2,x=.1,i=.05,h=function(){function O(y,B,u,s){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=y,this.media=B,this.fragmentTracker=u,this.hls=s}var T=O.prototype;return T.destroy=function(){this.hls=this.fragmentTracker=this.media=null},T.poll=function(B){var u=this.config,s=this.media,l=this.stalled,f=s.currentTime,m=s.seeking,E=this.seeking&&!m,v=!this.seeking&&m;if(this.seeking=m,f!==B){if(this.moved=!0,l!==null){if(this.stallReported){var R=self.performance.now()-l;_.logger.warn("playback not stuck anymore @"+f+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((v||E)&&(this.stalled=null),s.paused||s.ended||s.playbackRate===0||!Q.BufferHelper.getBuffered(s).length)return;var p=Q.BufferHelper.bufferInfo(s,f,0),a=p.len>0,r=p.nextStart||0;if(!a&&!r)return;if(m){var n=p.len>C,o=!r||r-f>C&&!this.fragmentTracker.getPartialFragment(f);if(n||o)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var S,b=Math.max(r,p.start||0)-f,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,U=g==null||((S=g.details)===null||S===void 0)?void 0:S.live,K=U?g.details.targetduration*2:C;if(b>0&&b<=K){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(l===null){this.stalled=W;return}var q=W-l;!m&&q>=c&&this._reportStall(p.len);var Y=Q.BufferHelper.bufferInfo(s,f,u.maxBufferHole);this._tryFixBufferStall(Y,q)},T._tryFixBufferStall=function(B,u){var s=this.config,l=this.fragmentTracker,f=this.media,m=f.currentTime,E=l.getPartialFragment(m);if(E){var v=this._trySkipBufferHole(E);if(v)return}B.len>s.maxBufferHole&&u>s.highBufferWatchdogPeriod*1e3&&(_.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},T._reportStall=function(B){var u=this.hls,s=this.media,l=this.stallReported;l||(this.stallReported=!0,_.logger.warn("Playback stalling at @"+s.currentTime+" due to low buffer (buffer="+B+")"),u.trigger(w.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:B}))},T._trySkipBufferHole=function(B){for(var u=this.config,s=this.hls,l=this.media,f=l.currentTime,m=0,E=Q.BufferHelper.getBuffered(l),v=0;v<E.length;v++){var R=E.start(v);if(f+u.maxBufferHole>=m&&f<R){var p=Math.max(R+i,l.currentTime+x);return _.logger.warn("skipping hole, adjusting currentTime from "+f+" to "+p),this.moved=!0,this.stalled=null,l.currentTime=p,B&&s.trigger(w.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+f+" to "+p,frag:B}),p}m=E.end(v)}return 0},T._tryNudgeBuffer=function(){var B=this.config,u=this.hls,s=this.media,l=s.currentTime,f=(this.nudgeRetry||0)+1;if(this.nudgeRetry=f,f<B.nudgeMaxRetry){var m=l+f*B.nudgeOffset;_.logger.warn("Nudging 'currentTime' from "+l+" to "+m),s.currentTime=m,u.trigger(w.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else _.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+B.nudgeMaxRetry+" nudges"),u.trigger(w.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},O}()},"./src/controller/id3-track-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts"),D=L("./src/utils/texttrack-utils.ts"),w=L("./src/demux/id3.ts"),_=.25,c=function(){function C(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var x=C.prototype;return x.destroy=function(){this._unregisterListeners()},x._registerListeners=function(){var h=this.hls;h.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x._unregisterListeners=function(){var h=this.hls;h.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x.onMediaAttached=function(h,O){this.media=O.media},x.onMediaDetaching=function(){if(!this.id3Track)return;Object(D.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},x.getID3Track=function(h){if(!this.media)return;for(var O=0;O<h.length;O++){var T=h[O];if(T.kind==="metadata"&&T.label==="id3")return Object(D.sendAddTrackEvent)(T,this.media),T}return this.media.addTextTrack("metadata","id3")},x.onFragParsingMetadata=function(h,O){if(!this.media)return;var T=O.frag,y=O.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var B=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,u=0;u<y.length;u++){var s=w.getID3Frames(y[u].data);if(s){var l=y[u].pts,f=u<y.length-1?y[u+1].pts:T.end,m=f-l;m<=0&&(f=l+_);for(var E=0;E<s.length;E++){var v=s[E];if(!w.isTimeStampFrame(v)){var R=new B(l,f,"");R.value=v,this.id3Track.addCue(R)}}}}},x.onBufferFlushing=function(h,O){var T=O.startOffset,y=O.endOffset,B=O.type;if(!B||B==="audio"){var u=this.id3Track;u&&Object(D.removeCuesInRange)(u,T,y)}},C}();N.default=c},"./src/controller/latency-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return C});var Q=L("./src/errors.ts"),D=L("./src/events.ts"),w=L("./src/utils/logger.ts");function _(x,i){for(var h=0;h<i.length;h++){var O=i[h];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function c(x,i,h){return i&&_(x.prototype,i),h&&_(x,h),x}var C=function(){function x(h){var O=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 O.timeupdate()},this.hls=h,this.config=h.config,this.registerListeners()}var i=x.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(D.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(D.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(D.Events.ERROR,this.onError)},i.onMediaAttached=function(O,T){this.media=T.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(O,T){var y=T.details;this.levelDetails=y,y.advanced&&this.timeupdate(),!y.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(O,T){if(T.details!==Q.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,w.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var O=this.media,T=this.levelDetails;if(!O||!T)return;this.currentTime=O.currentTime;var y=this.computeLatency();if(y===null)return;this._latency=y;var B=this.config,u=B.lowLatencyMode,s=B.maxLiveSyncPlaybackRate;if(!u||s===1)return;var l=this.targetLatency;if(l===null)return;var f=y-l,m=Math.min(this.maxLatency,l+T.targetduration),E=f<m;if(T.live&&E&&f>.05&&this.forwardBufferLength>1){var v=Math.min(2,Math.max(1,s)),R=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20;O.playbackRate=Math.min(v,Math.max(1,R))}else O.playbackRate!==1&&O.playbackRate!==0&&(O.playbackRate=1)},i.estimateLiveEdge=function(){var O=this.levelDetails;return O===null?null:O.edge+O.age},i.computeLatency=function(){var O=this.estimateLiveEdge();return O===null?null:O-this.currentTime},c(x,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var O=this.config,T=this.levelDetails;return O.liveMaxLatencyDuration!==void 0?O.liveMaxLatencyDuration:T?O.liveMaxLatencyDurationCount*T.targetduration:0}},{key:"targetLatency",get:function(){var O=this.levelDetails;if(O===null)return null;var T=O.holdBack,y=O.partHoldBack,B=O.targetduration,u=this.config,s=u.liveSyncDuration,l=u.liveSyncDurationCount,f=u.lowLatencyMode,m=this.hls.userConfig,E=f&&y||T;(m.liveSyncDuration||m.liveSyncDurationCount||E===0)&&(E=s!==void 0?s:l*B);var v=B,R=1;return E+Math.min(this.stallCount*R,v)}},{key:"liveSyncPosition",get:function(){var O=this.estimateLiveEdge(),T=this.targetLatency,y=this.levelDetails;if(O===null||T===null||y===null)return null;var B=y.edge,u=O-T-this.edgeStalled,s=B-y.totalduration,l=B-(this.config.lowLatencyMode&&y.partTarget||y.targetduration);return Math.min(Math.max(s,u),l)}},{key:"drift",get:function(){var O=this.levelDetails;return O===null?1:O.drift}},{key:"edgeStalled",get:function(){var O=this.levelDetails;if(O===null)return 0;var T=(this.config.lowLatencyMode&&O.partTarget||O.targetduration)*3;return Math.max(O.age-T,0)}},{key:"forwardBufferLength",get:function(){var O=this.media,T=this.levelDetails;if(!O||!T)return 0;var y=O.buffered.length;return y?O.buffered.end(y-1):T.edge-this.currentTime}}]),x}()},"./src/controller/level-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return u});var Q=L("./src/types/level.ts"),D=L("./src/events.ts"),w=L("./src/errors.ts"),_=L("./src/utils/codecs.ts"),c=L("./src/controller/level-helper.ts"),C=L("./src/controller/base-playlist-controller.ts"),x=L("./src/types/loader.ts");function i(){return i=Object.assign||function(s){for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(s[m]=f[m])}return s},i.apply(this,arguments)}function h(s,l){for(var f=0;f<l.length;f++){var m=l[f];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(s,m.key,m)}}function O(s,l,f){return l&&h(s.prototype,l),f&&h(s,f),s}function T(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,y(s,l)}function y(s,l){return y=Object.setPrototypeOf||function(m,E){return m.__proto__=E,m},y(s,l)}var B=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(s){T(l,s);function l(m){var E;return E=s.call(this,m,"[level-controller]")||this,E._levels=[],E._firstLevel=-1,E._startLevel=void 0,E.currentLevelIndex=-1,E.manualLevelIndex=-1,E.onParsedComplete=void 0,E._registerListeners(),E}var f=l.prototype;return f._registerListeners=function(){var E=this.hls;E.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(D.Events.ERROR,this.onError,this)},f._unregisterListeners=function(){var E=this.hls;E.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(D.Events.ERROR,this.onError,this)},f.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,s.prototype.destroy.call(this)},f.startLoad=function(){var E=this._levels;E.forEach(function(v){v.loadError=0}),s.prototype.startLoad.call(this)},f.onManifestLoaded=function(E,v){var R=[],p=[],a=[],r,n={},o,S=!1,b=!1,g=!1;if(v.levels.forEach(function(q){var Y=q.attrs;S=S||!!(q.width&&q.height),b=b||!!q.videoCodec,g=g||!!q.audioCodec,B&&q.audioCodec&&q.audioCodec.indexOf("mp4a.40.34")!==-1&&(q.audioCodec=void 0);var V=q.bitrate+"-"+q.attrs.RESOLUTION+"-"+q.attrs.CODECS;o=n[V],o?o.url.push(q.url):(o=new Q.Level(q),n[V]=o,R.push(o)),Y&&(Y.AUDIO&&Object(c.addGroupId)(o,"audio",Y.AUDIO),Y.SUBTITLES&&Object(c.addGroupId)(o,"text",Y.SUBTITLES))}),(S||b)&&g&&(R=R.filter(function(q){var Y=q.videoCodec,V=q.width,te=q.height;return!!Y||!!(V&&te)})),R=R.filter(function(q){var Y=q.audioCodec,V=q.videoCodec;return(!Y||Object(_.isCodecSupportedInMp4)(Y,"audio"))&&(!V||Object(_.isCodecSupportedInMp4)(V,"video"))}),v.audioTracks&&(p=v.audioTracks.filter(function(q){return!q.audioCodec||Object(_.isCodecSupportedInMp4)(q.audioCodec,"audio")}),Object(c.assignTrackIdsByGroup)(p)),v.subtitles&&(a=v.subtitles,Object(c.assignTrackIdsByGroup)(a)),R.length>0){r=R[0].bitrate,R.sort(function(q,Y){return q.bitrate-Y.bitrate}),this._levels=R;for(var U=0;U<R.length;U++)if(R[U].bitrate===r){this._firstLevel=U,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+r);break}var K=g&&!b,W={levels:R,audioTracks:p,subtitleTracks:a,firstLevel:this._firstLevel,stats:v.stats,audio:g,video:b,altAudio:!K&&p.some(function(q){return!!q.url})};this.hls.trigger(D.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(D.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:v.url,reason:"no level with compatible codecs found in manifest"})},f.onError=function(E,v){if(s.prototype.onError.call(this,E,v),v.fatal)return;var R=v.context,p=this._levels[this.currentLevelIndex];if(R&&(R.type===x.PlaylistContextType.AUDIO_TRACK&&p.audioGroupIds&&R.groupId===p.audioGroupIds[p.urlId]||R.type===x.PlaylistContextType.SUBTITLE_TRACK&&p.textGroupIds&&R.groupId===p.textGroupIds[p.urlId])){this.redundantFailover(this.currentLevelIndex);return}var a=!1,r=!0,n;switch(v.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:if(v.frag){var o=this._levels[v.frag.level];o?(o.fragmentError++,o.fragmentError>this.hls.config.fragLoadingMaxRetry&&(n=v.frag.level)):n=v.frag.level}break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(r=!1),n=R.level),a=!0;break;case w.ErrorDetails.REMUX_ALLOC_ERROR:n=v.level,a=!0;break}n!==void 0&&this.recoverLevel(v,n,a,r)},f.recoverLevel=function(E,v,R,p){var a=E.details,r=this._levels[v];if(r.loadError++,R){var n=this.retryLoadingOrFail(E);if(n)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(p){var o=r.url.length;if(o>1&&r.loadError<o)E.levelRetry=!0,this.redundantFailover(v);else if(this.manualLevelIndex===-1){var S=v===0?this._levels.length-1:v-1;this.currentLevelIndex!==S&&this._levels[S].loadError===0&&(this.warn(a+": switch to "+S),E.levelRetry=!0,this.hls.nextAutoLevel=S)}}},f.redundantFailover=function(E){var v=this._levels[E],R=v.url.length;if(R>1){var p=(v.urlId+1)%R;this.warn("Switching to redundant URL-id "+p),this._levels.forEach(function(a){a.urlId=p}),this.level=E}},f.onFragLoaded=function(E,v){var R=v.frag;if(R!==void 0&&R.type===x.PlaylistLevelType.MAIN){var p=this._levels[R.level];p!==void 0&&(p.fragmentError=0,p.loadError=0)}},f.onLevelLoaded=function(E,v){var R,p=v.level,a=v.details,r=this._levels[p];if(!r){var n;this.warn("Invalid level index "+p),(n=v.deliveryDirectives)!==null&&n!==void 0&&n.skip&&(a.deltaUpdateFailed=!0);return}p===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0,this.retryCount=0),this.playlistLoaded(p,v,r.details)):(R=v.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(a.deltaUpdateFailed=!0)},f.onAudioTrackSwitched=function(E,v){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var p=-1,a=this.hls.audioTracks[v.id].groupId,r=0;r<R.audioGroupIds.length;r++)if(R.audioGroupIds[r]===a){p=r;break}p!==R.urlId&&(R.urlId=p,this.startLoad())}},f.loadPlaylist=function(E){var v=this.currentLevelIndex,R=this._levels[v];if(this.canLoad&&R&&R.url.length>0){var p=R.urlId,a=R.url[p];if(E)try{a=E.addDirectives(a)}catch(r){this.warn("Could not construct new URL with HLS Delivery Directives: "+r)}this.log("Attempt loading level index "+v+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+p+" "+a),this.clearTimer(),this.hls.trigger(D.Events.LEVEL_LOADING,{url:a,level:v,id:p,deliveryDirectives:E||null})}},f.removeLevel=function(E,v){var R=function(r,n){return n!==v},p=this._levels.filter(function(a,r){return r!==E?!0:a.url.length>1&&v!==void 0?(a.url=a.url.filter(R),a.audioGroupIds&&(a.audioGroupIds=a.audioGroupIds.filter(R)),a.textGroupIds&&(a.textGroupIds=a.textGroupIds.filter(R)),a.urlId=0,!0):!1}).map(function(a,r){var n=a.details;return n!=null&&n.fragments&&n.fragments.forEach(function(o){o.level=r}),a});this._levels=p,this.hls.trigger(D.Events.LEVELS_UPDATED,{levels:p})},O(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var v,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===E&&(v=R[E])!==null&&v!==void 0&&v.details)return;if(E<0||E>=R.length){var p=E<0;if(this.hls.trigger(D.Events.ERROR,{type:w.ErrorTypes.OTHER_ERROR,details:w.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:p,reason:"invalid level idx"}),p)return;E=Math.min(E,R.length-1)}this.clearTimer();var a=this.currentLevelIndex,r=R[a],n=R[E];this.log("switching to level "+E+" from "+a),this.currentLevelIndex=E;var o=i({},n,{level:E,maxBitrate:n.maxBitrate,uri:n.uri,urlId:n.urlId});delete o._urlId,this.hls.trigger(D.Events.LEVEL_SWITCHING,o);var S=n.details;if(!S||S.live){var b=this.switchParams(n.uri,r==null?void 0:r.details);this.loadPlaylist(b)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),l}(C.default)},"./src/controller/level-helper.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"addGroupId",function(){return w}),L.d(N,"assignTrackIdsByGroup",function(){return _}),L.d(N,"updatePTS",function(){return c}),L.d(N,"updateFragPTSDTS",function(){return x}),L.d(N,"mergeDetails",function(){return i}),L.d(N,"mapPartIntersection",function(){return h}),L.d(N,"mapFragmentIntersection",function(){return O}),L.d(N,"adjustSliding",function(){return T}),L.d(N,"addSliding",function(){return y}),L.d(N,"computeReloadInterval",function(){return B}),L.d(N,"getFragmentWithSN",function(){return u}),L.d(N,"getPartWith",function(){return s});var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/logger.ts");function w(l,f,m){switch(f){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(m);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(m);break}}function _(l){var f={};l.forEach(function(m){var E=m.groupId||"";m.id=f[E]=f[E]||0,f[E]++})}function c(l,f,m){var E=l[f],v=l[m];C(E,v)}function C(l,f){var m=f.startPTS;if(Object(Q.isFiniteNumber)(m)){var E=0,v;f.sn>l.sn?(E=m-l.start,v=l):(E=l.start-m,v=f),v.duration!==E&&(v.duration=E)}else if(f.sn>l.sn){var R=l.cc===f.cc;R&&l.minEndPTS?f.start=l.start+(l.minEndPTS-l.start):f.start=l.start+l.duration}else f.start=Math.max(l.start-f.duration,0)}function x(l,f,m,E,v,R){var p=E-m;p<=0&&(D.logger.warn("Fragment should have a positive duration",f),E=m+f.duration,R=v+f.duration);var a=m,r=E,n=f.startPTS,o=f.endPTS;if(Object(Q.isFiniteNumber)(n)){var S=Math.abs(n-m);Object(Q.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(S,f.deltaPTS):f.deltaPTS=S,a=Math.max(m,n),m=Math.min(m,n),v=Math.min(v,f.startDTS),r=Math.min(E,o),E=Math.max(E,o),R=Math.max(R,f.endDTS)}f.duration=E-m;var b=m-f.start;f.appendedPTS=E,f.start=f.startPTS=m,f.maxStartPTS=a,f.startDTS=v,f.endPTS=E,f.minEndPTS=r,f.endDTS=R;var g=f.sn;if(!l||g<l.startSN||g>l.endSN)return 0;var U,K=g-l.startSN,W=l.fragments;for(W[K]=f,U=K;U>0;U--)C(W[U],W[U-1]);for(U=K;U<W.length-1;U++)C(W[U],W[U+1]);return l.fragmentHint&&C(W[W.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,b}function i(l,f){for(var m=null,E=l.fragments,v=E.length-1;v>=0;v--){var R=E[v].initSegment;if(R){m=R;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var p=0,a;if(O(l,f,function(U,K){U.relurl&&(p=U.cc-K.cc),Object(Q.isFiniteNumber)(U.startPTS)&&Object(Q.isFiniteNumber)(U.endPTS)&&(K.start=K.startPTS=U.startPTS,K.startDTS=U.startDTS,K.appendedPTS=U.appendedPTS,K.maxStartPTS=U.maxStartPTS,K.endPTS=U.endPTS,K.endDTS=U.endDTS,K.minEndPTS=U.minEndPTS,K.duration=U.endPTS-U.startPTS,K.duration&&(a=K),f.PTSKnown=f.alignedSliding=!0),K.elementaryStreams=U.elementaryStreams,K.loader=U.loader,K.stats=U.stats,K.urlId=U.urlId,U.initSegment&&(K.initSegment=U.initSegment,m=U.initSegment)}),m){var r=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;r.forEach(function(U){var K;(!U.initSegment||U.initSegment.relurl===((K=m)===null||K===void 0?void 0:K.relurl))&&(U.initSegment=m)})}if(f.skippedSegments&&(f.deltaUpdateFailed=f.fragments.some(function(U){return!U}),f.deltaUpdateFailed)){D.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var n=f.skippedSegments;n--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}var o=f.fragments;if(p){D.logger.warn("discontinuity sliding from playlist, take drift into account");for(var S=0;S<o.length;S++)o[S].cc+=p}f.skippedSegments&&(f.startCC=f.fragments[0].cc),h(l.partList,f.partList,function(U,K){K.elementaryStreams=U.elementaryStreams,K.stats=U.stats}),a?x(f,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):T(l,f),o.length&&(f.totalduration=f.edge-o[0].start),f.driftStartTime=l.driftStartTime,f.driftStart=l.driftStart;var b=f.advancedDateTime;if(f.advanced&&b){var g=f.edge;f.driftStart||(f.driftStartTime=b,f.driftStart=g),f.driftEndTime=b,f.driftEnd=g}else f.driftEndTime=l.driftEndTime,f.driftEnd=l.driftEnd,f.advancedDateTime=l.advancedDateTime}function h(l,f,m){if(l&&f)for(var E=0,v=0,R=l.length;v<=R;v++){var p=l[v],a=f[v+E];p&&a&&p.index===a.index&&p.fragment.sn===a.fragment.sn?m(p,a):E--}}function O(l,f,m){for(var E=f.skippedSegments,v=Math.max(l.startSN,f.startSN)-f.startSN,R=(l.fragmentHint?1:0)+(E?f.endSN:Math.min(l.endSN,f.endSN))-f.startSN,p=f.startSN-l.startSN,a=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,r=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,n=v;n<=R;n++){var o=r[p+n],S=a[n];E&&!S&&n<E&&(S=f.fragments[n]=o),o&&S&&m(o,S)}}function T(l,f){var m=f.startSN+f.skippedSegments-l.startSN,E=l.fragments;if(m<0||m>=E.length)return;y(f,E[m].start)}function y(l,f){if(f){for(var m=l.fragments,E=l.skippedSegments;E<m.length;E++)m[E].start+=f;l.fragmentHint&&(l.fragmentHint.start+=f)}}function B(l,f){var m=1e3*l.levelTargetDuration,E=m/2,v=l.age,R=v>0&&v<m*3,p=f.loading.end-f.loading.start,a,r=l.availabilityDelay;if(l.updated===!1)if(R){var n=333*l.misses;a=Math.max(Math.min(E,p*2),n),l.availabilityDelay=(l.availabilityDelay||0)+a}else a=E;else R?(r=Math.min(r||m/2,v),l.availabilityDelay=r,a=r+m-v):a=m-p;return Math.round(a)}function u(l,f,m){if(!l||!l.details)return null;var E=l.details,v=E.fragments[f-E.startSN];return v||(v=E.fragmentHint,v&&v.sn===f?v:f<E.startSN&&m&&m.sn===f?m:null)}function s(l,f,m){if(!l||!l.details)return null;var E=l.details.partList;if(E)for(var v=E.length;v--;){var R=E[v];if(R.index===m&&R.fragment.sn===f)return R}return null}},"./src/controller/stream-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return E});var Q=L("./src/polyfills/number.ts"),D=L("./src/controller/base-stream-controller.ts"),w=L("./src/is-supported.ts"),_=L("./src/events.ts"),c=L("./src/utils/buffer-helper.ts"),C=L("./src/controller/fragment-tracker.ts"),x=L("./src/types/loader.ts"),i=L("./src/loader/fragment.ts"),h=L("./src/demux/transmuxer-interface.ts"),O=L("./src/types/transmuxer.ts"),T=L("./src/controller/gap-controller.ts"),y=L("./src/errors.ts"),B=L("./src/utils/logger.ts");function u(v,R){for(var p=0;p<R.length;p++){var a=R[p];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(v,a.key,a)}}function s(v,R,p){return R&&u(v.prototype,R),p&&u(v,p),v}function l(v,R){v.prototype=Object.create(R.prototype),v.prototype.constructor=v,f(v,R)}function f(v,R){return f=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},f(v,R)}var m=100,E=function(v){l(R,v);function R(a,r){var n;return n=v.call(this,a,r,"[stream-controller]")||this,n.audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.stalled=!1,n.couldBacktrack=!1,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}var p=R.prototype;return p._registerListeners=function(){var r=this.hls;r.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(_.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(_.Events.ERROR,this.onError,this),r.on(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(_.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p._unregisterListeners=function(){var r=this.hls;r.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(_.Events.ERROR,this.onError,this),r.off(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(_.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(_.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},p.startLoad=function(r){if(this.levels){var n=this.lastCurrentTime,o=this.hls;if(this.stopLoad(),this.setInterval(m),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var S=o.startLevel;S===-1&&(o.config.testBandwidth?(S=0,this.bitrateTest=!0):S=o.nextAutoLevel),this.level=o.nextLoadLevel=S,this.loadedmetadata=!1}n>0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+n.toFixed(3)),r=n),this.state=D.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=D.State.STOPPED},p.stopLoad=function(){this._forceStartLoad=!1,v.prototype.stopLoad.call(this)},p.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_LEVEL:{var r,n=this.levels,o=this.level,S=n==null||((r=n[o])===null||r===void 0)?void 0:r.details;if(S&&(!S.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(S))break;this.state=D.State.IDLE;break}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var b,g=self.performance.now(),U=this.retryDate;(!U||g>=U||(b=this.media)!==null&&b!==void 0&&b.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=D.State.IDLE)}break;default:break}this.onTickEnd()},p.onTickEnd=function(){v.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},p.doTickIdle=function(){var r,n,o=this.hls,S=this.levelLastLoaded,b=this.levels,g=this.media,U=o.config,K=o.nextLoadLevel;if(S===null||!g&&(this.startFragRequested||!U.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!b||!b[K])return;var W=b[K];this.level=o.nextLoadLevel=K;var q=W.details;if(!q||this.state===D.State.WAITING_LEVEL||q.live&&this.levelLastLoaded!==K){this.state=D.State.WAITING_LEVEL;return}var Y=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,x.PlaylistLevelType.MAIN);if(Y===null)return;var V=Y.len,te=this.getMaxBufferLength(W.maxBitrate);if(V>=te)return;if(this._streamEnded(Y,q)){var X={};this.altAudio&&(X.type="video"),this.hls.trigger(_.Events.BUFFER_EOS,X),this.state=D.State.ENDED;return}var se=Y.end,le=this.getNextFragment(se,q);if(this.couldBacktrack&&!this.fragPrevious&&le&&le.sn!=="initSegment"){var Te=le.sn-q.startSN;Te>1&&(le=q.fragments[Te-1],this.fragmentTracker.removeFragment(le))}if(le&&this.fragmentTracker.getState(le)===C.FragmentState.OK&&this.nextLoadPosition>se){var Ee=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,Ee,x.PlaylistLevelType.MAIN),le=this.getNextFragment(this.nextLoadPosition,q)}if(!le)return;le.initSegment&&!le.initSegment.data&&!this.bitrateTest&&(le=le.initSegment),((r=le.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((n=le.decryptdata)!==null&&n!==void 0&&n.key)?this.loadKey(le,q):this.loadFragment(le,q,se)},p.loadFragment=function(r,n,o){var S,b=this.fragmentTracker.getState(r);if(this.fragCurrent=r,b===C.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(r);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else b=C.FragmentState.NOT_LOADED}b===C.FragmentState.NOT_LOADED||b===C.FragmentState.PARTIAL?r.sn==="initSegment"?this._loadInitSegment(r):this.bitrateTest?(r.bitrateTest=!0,this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r)):(this.startFragRequested=!0,v.prototype.loadFragment.call(this,r,n,o)):b===C.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((S=this.media)===null||S===void 0?void 0:S.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},p.getAppendedFrag=function(r){var n=this.fragmentTracker.getAppendedFrag(r,x.PlaylistLevelType.MAIN);return n&&"fragment"in n?n.fragment:n},p.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,x.PlaylistLevelType.MAIN)},p.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},p.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},p.nextLevelSwitch=function(){var r=this.levels,n=this.media;if(n!=null&&n.readyState){var o,S=this.getAppendedFrag(n.currentTime);if(S&&S.start>1&&this.flushMainBuffer(0,S.start-1),!n.paused&&r){var b=this.hls.nextLoadLevel,g=r[b],U=this.fragLastKbps;U&&this.fragCurrent?o=this.fragCurrent.duration*g.maxBitrate/(1e3*U)+1:o=0}else o=0;var K=this.getBufferedFrag(n.currentTime+o);if(K){var W=this.followingBufferedFrag(K);if(W){this.abortCurrentFrag();var q=W.maxStartPTS?W.maxStartPTS:W.start,Y=W.duration,V=Math.max(K.end,q+Math.min(Math.max(Y-this.config.maxFragLookUpTolerance,Y*.5),Y*.75));this.flushMainBuffer(V,Number.POSITIVE_INFINITY)}}}},p.abortCurrentFrag=function(){var r=this.fragCurrent;this.fragCurrent=null,r!=null&&r.loader&&r.loader.abort(),this.state===D.State.KEY_LOADING&&(this.state=D.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},p.flushMainBuffer=function(r,n){v.prototype.flushMainBuffer.call(this,r,n,this.altAudio?"video":null)},p.onMediaAttached=function(r,n){v.prototype.onMediaAttached.call(this,r,n);var o=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),o.addEventListener("playing",this.onvplaying),o.addEventListener("seeked",this.onvseeked),this.gapController=new T.default(this.config,o,this.fragmentTracker,this.hls)},p.onMediaDetaching=function(){var r=this.media;r&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),v.prototype.onMediaDetaching.call(this)},p.onMediaPlaying=function(){this.tick()},p.onMediaSeeked=function(){var r=this.media,n=r?r.currentTime:null;Object(Q.isFiniteNumber)(n)&&this.log("Media seeked to "+n.toFixed(3)),this.tick()},p.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},p.onManifestParsed=function(r,n){var o=!1,S=!1,b;n.levels.forEach(function(g){b=g.audioCodec,b&&(b.indexOf("mp4a.40.2")!==-1&&(o=!0),b.indexOf("mp4a.40.5")!==-1&&(S=!0))}),this.audioCodecSwitch=o&&S&&!Object(w.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=n.levels,this.startFragRequested=!1},p.onLevelLoading=function(r,n){var o=this.levels;if(!o||this.state!==D.State.IDLE)return;var S=o[n.level];(!S.details||S.details.live&&this.levelLastLoaded!==n.level||this.waitForCdnTuneIn(S.details))&&(this.state=D.State.WAITING_LEVEL)},p.onLevelLoaded=function(r,n){var o,S=this.levels,b=n.level,g=n.details,U=g.totalduration;if(!S){this.warn("Levels were reset while loading level "+b);return}this.log("Level "+b+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+U);var K=this.fragCurrent;K&&(this.state===D.State.FRAG_LOADING||this.state===D.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==n.level&&K.loader&&(this.state=D.State.IDLE,K.loader.abort()));var W=S[b],q=0;if(g.live||(o=W.details)!==null&&o!==void 0&&o.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;q=this.alignPlaylists(g,W.details)}if(W.details=g,this.levelLastLoaded=b,this.hls.trigger(_.Events.LEVEL_UPDATED,{details:g,level:b}),this.state===D.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=D.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,q),this.tick()},p._handleFragmentLoadProgress=function(r){var n,o=r.frag,S=r.part,b=r.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+o.sn+" of level "+o.level+" will not be buffered");return}var U=g[o.level],K=U.details;if(!K){this.warn("Dropping fragment "+o.sn+" of level "+o.level+" after level details were reset");return}var W=U.videoCodec,q=K.PTSKnown||!K.live,Y=(n=o.initSegment)===null||n===void 0?void 0:n.data,V=this._getAudioCodec(U),te=this.transmuxer=this.transmuxer||new h.default(this.hls,x.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),X=S?S.index:-1,se=X!==-1,le=new O.ChunkMetadata(o.level,o.sn,o.stats.chunkCount,b.byteLength,X,se),Te=this.initPTS[o.cc];te.push(b,Y,V,W,o,S,K.totalduration,q,le,Te)},p.onAudioTrackSwitching=function(r,n){var o=this.altAudio,S=!!n.url,b=n.id;if(!S){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 U=this.hls;o&&U.trigger(_.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),U.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:b})}},p.onAudioTrackSwitched=function(r,n){var o=n.id,S=!!this.hls.audioTracks[o].url;if(S){var b=this.videoBuffer;b&&this.mediaBuffer!==b&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=b)}this.altAudio=S,this.tick()},p.onBufferCreated=function(r,n){var o=n.tracks,S,b,g=!1;for(var U in o){var K=o[U];if(K.id==="main"){if(b=U,S=K,U==="video"){var W=o[U];W&&(this.videoBuffer=W.buffer)}}else g=!0}g&&S?(this.log("Alternate track found, use "+b+".buffered to schedule main fragment loading"),this.mediaBuffer=S.buffer):this.mediaBuffer=this.media},p.onFragBuffered=function(r,n){var o=n.frag,S=n.part;if(o&&o.type!==x.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(o)){this.warn("Fragment "+o.sn+(S?" p: "+S.index:"")+" of level "+o.level+" finished buffering, but was aborted. state: "+this.state),this.state===D.State.PARSED&&(this.state=D.State.IDLE);return}var b=S?S.stats:o.stats;this.fragLastKbps=Math.round(8*b.total/(b.buffering.end-b.loading.first)),o.sn!=="initSegment"&&(this.fragPrevious=o),this.fragBufferedComplete(o,S)},p.onError=function(r,n){switch(n.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.KEY_LOAD_ERROR:case y.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(x.PlaylistLevelType.MAIN,n);break;case y.ErrorDetails.LEVEL_LOAD_ERROR:case y.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==D.State.ERROR&&(n.fatal?(this.warn(""+n.details),this.state=D.State.ERROR):!n.levelRetry&&this.state===D.State.WAITING_LEVEL&&(this.state=D.State.IDLE));break;case y.ErrorDetails.BUFFER_FULL_ERROR:if(n.parent==="main"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var o=!0,S=this.getFwdBufferInfo(this.media,x.PlaylistLevelType.MAIN);S&&S.len>.5&&(o=!this.reduceMaxBufferLength(S.len)),o&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},p.checkBuffer=function(){var r=this.media,n=this.gapController;if(!r||!n||!r.readyState)return;var o=c.BufferHelper.getBuffered(r);!this.loadedmetadata&&o.length?(this.loadedmetadata=!0,this.seekToStartPos()):n.poll(this.lastCurrentTime),this.lastCurrentTime=r.currentTime},p.onFragLoadEmergencyAborted=function(){this.state=D.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},p.onBufferFlushed=function(r,n){var o=n.type;if(o!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var S=(o===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(S,o,x.PlaylistLevelType.MAIN)}},p.onLevelsUpdated=function(r,n){this.levels=n.levels},p.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},p.seekToStartPos=function(){var r=this.media,n=r.currentTime,o=this.startPosition;if(o>=0&&n<o){if(r.seeking){B.logger.log("could not seek to "+o+", already seeking at "+n);return}var S=c.BufferHelper.getBuffered(r),b=S.length?S.start(0):0,g=b-o;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(B.logger.log("adjusting start position by "+g+" to match buffer start"),o+=g,this.startPosition=o),this.log("seek to target start position "+o+" from current time "+n),r.currentTime=o}},p._getAudioCodec=function(r){var n=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&n&&(this.log("Swapping audio codec"),n.indexOf("mp4a.40.5")!==-1?n="mp4a.40.2":n="mp4a.40.5"),n},p._loadBitrateTestFrag=function(r){var n=this;this._doFragLoad(r).then(function(o){var S=n.hls;if(!o||S.nextLoadLevel||n.fragContextChanged(r))return;n.fragLoadError=0,n.state=D.State.IDLE,n.startFragRequested=!1,n.bitrateTest=!1;var b=r.stats;b.parsing.start=b.parsing.end=b.buffering.start=b.buffering.end=self.performance.now(),S.trigger(_.Events.FRAG_LOADED,o)})},p._handleTransmuxComplete=function(r){var n,o="main",S=this.hls,b=r.remuxResult,g=r.chunkMeta,U=this.getCurrentContext(g);if(!U){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 K=U.frag,W=U.part,q=U.level,Y=b.video,V=b.text,te=b.id3,X=b.initSegment,se=this.altAudio?void 0:b.audio;if(this.fragContextChanged(K))return;if(this.state=D.State.PARSING,X){X.tracks&&(this._bufferInitSegment(q,X.tracks,K,g),S.trigger(_.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:o,tracks:X.tracks}));var le=X.initPTS,Te=X.timescale;Object(Q.isFiniteNumber)(le)&&(this.initPTS[K.cc]=le,S.trigger(_.Events.INIT_PTS_FOUND,{frag:K,id:o,initPTS:le,timescale:Te}))}if(Y&&b.independent!==!1){if(q.details){var Ee=Y.startPTS,Be=Y.endPTS,De=Y.startDTS,Ve=Y.endDTS;if(W)W.elementaryStreams[Y.type]={startPTS:Ee,endPTS:Be,startDTS:De,endDTS:Ve};else if(Y.firstKeyFrame&&Y.independent&&(this.couldBacktrack=!0),Y.dropped&&Y.independent){var _e=this.getLoadPosition()+this.config.maxBufferHole;if(_e<Ee){this.backtrack(K);return}K.setElementaryStreamInfo(Y.type,K.start,Be,K.start,Ve,!0)}K.setElementaryStreamInfo(Y.type,Ee,Be,De,Ve),this.bufferFragmentData(Y,K,W,g)}}else if(b.independent===!1){this.backtrack(K);return}if(se){var Le=se.startPTS,tt=se.endPTS,Et=se.startDTS,Oe=se.endDTS;W&&(W.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:Le,endPTS:tt,startDTS:Et,endDTS:Oe}),K.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,Le,tt,Et,Oe),this.bufferFragmentData(se,K,W,g)}if(te!=null&&(n=te.samples)!==null&&n!==void 0&&n.length){var He={frag:K,id:o,samples:te.samples};S.trigger(_.Events.FRAG_PARSING_METADATA,He)}if(V){var it={frag:K,id:o,samples:V.samples};S.trigger(_.Events.FRAG_PARSING_USERDATA,it)}},p._bufferInitSegment=function(r,n,o,S){var b=this;if(this.state!==D.State.PARSING)return;this.audioOnly=!!n.audio&&!n.video,this.altAudio&&!this.audioOnly&&delete n.audio;var g=n.audio,U=n.video,K=n.audiovideo;if(g){var W=r.audioCodec,q=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),g.metadata.channelCount!==1&&q.indexOf("firefox")===-1&&(W="mp4a.40.5")),q.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),r.audioCodec&&r.audioCodec!==W&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+W+'"'),g.levelCodec=W,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(r.audioCodec||"")+"/"+g.codec+"]")}U&&(U.levelCodec=r.videoCodec,U.id="main",this.log("Init video buffer, container:"+U.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+U.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(_.Events.BUFFER_CODECS,n),Object.keys(n).forEach(function(Y){var V=n[Y],te=V.initSegment;te!=null&&te.byteLength&&b.hls.trigger(_.Events.BUFFER_APPENDING,{type:Y,data:te,frag:o,part:null,chunkMeta:S,parent:o.type})}),this.tick()},p.backtrack=function(r){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(r);var n=this.fragmentTracker.backtrack(r);this.fragPrevious=null,this.nextLoadPosition=r.start,n?this.resetFragmentLoading(r):this.state=D.State.BACKTRACKING},p.checkFragmentChanged=function(){var r=this.media,n=null;if(r&&r.readyState>1&&r.seeking===!1){var o=r.currentTime;if(c.BufferHelper.isBuffered(r,o)?n=this.getAppendedFrag(o):c.BufferHelper.isBuffered(r,o+.1)&&(n=this.getAppendedFrag(o+.1)),n){var S=this.fragPlaying,b=n.level;(!S||n.sn!==S.sn||S.level!==b||n.urlId!==S.urlId)&&(this.hls.trigger(_.Events.FRAG_CHANGED,{frag:n}),(!S||S.level!==b)&&this.hls.trigger(_.Events.LEVEL_SWITCHED,{level:b}),this.fragPlaying=n)}}},s(R,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentLevel",get:function(){var r=this.media;if(r){var n=this.getAppendedFrag(r.currentTime);if(n)return n.level}return-1}},{key:"nextBufferedFrag",get:function(){var r=this.media;if(r){var n=this.getAppendedFrag(r.currentTime);return this.followingBufferedFrag(n)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(D.default)},"./src/controller/subtitle-stream-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"SubtitleStreamController",function(){return l});var Q=L("./src/events.ts"),D=L("./src/utils/logger.ts"),w=L("./src/utils/buffer-helper.ts"),_=L("./src/controller/fragment-finders.ts"),c=L("./src/utils/discontinuities.ts"),C=L("./src/controller/level-helper.ts"),x=L("./src/controller/fragment-tracker.ts"),i=L("./src/controller/base-stream-controller.ts"),h=L("./src/types/loader.ts"),O=L("./src/types/level.ts");function T(f,m){for(var E=0;E<m.length;E++){var v=m[E];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,v.key,v)}}function y(f,m,E){return m&&T(f.prototype,m),E&&T(f,E),f}function B(f,m){f.prototype=Object.create(m.prototype),f.prototype.constructor=f,u(f,m)}function u(f,m){return u=Object.setPrototypeOf||function(v,R){return v.__proto__=R,v},u(f,m)}var s=500,l=function(f){B(m,f);function m(v,R){var p;return p=f.call(this,v,R,"[subtitle-stream-controller]")||this,p.levels=[],p.currentTrackId=-1,p.tracksBuffered=[],p.mainDetails=null,p._registerListeners(),p}var E=m.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var R=this.hls;R.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(Q.Events.ERROR,this.onError,this),R.on(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var R=this.hls;R.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(Q.Events.ERROR,this.onError,this),R.off(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(s),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(R,p){this.mainDetails=p.details},E.onSubtitleFragProcessed=function(R,p){var a=p.frag,r=p.success;if(this.fragPrevious=a,this.state=i.State.IDLE,!r)return;var n=this.tracksBuffered[this.currentTrackId];if(!n)return;for(var o,S=a.start,b=0;b<n.length;b++)if(S>=n[b].start&&S<=n[b].end){o=n[b];break}var g=a.start+a.duration;o?o.end=g:(o={start:S,end:g},n.push(o)),this.fragmentTracker.fragBuffered(a)},E.onBufferFlushing=function(R,p){var a=p.startOffset,r=p.endOffset;if(a===0&&r!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,o=this.levels;if(!o.length||!o[n]||!o[n].details)return;var S=o[n].details,b=S.targetduration,g=r-b;if(g<=0)return;p.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(U){for(var K=0;K<U.length;){if(U[K].end<=g){U.shift();continue}else if(U[K].start<g)U[K].start=g;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(a,g,h.PlaylistLevelType.SUBTITLE)}},E.onError=function(R,p){var a,r=p.frag;if(!r||r.type!==h.PlaylistLevelType.SUBTITLE)return;(a=this.fragCurrent)!==null&&a!==void 0&&a.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},E.onSubtitleTracksUpdated=function(R,p){var a=this,r=p.subtitleTracks;this.tracksBuffered=[],this.levels=r.map(function(n){return new O.Level(n)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(n){a.tracksBuffered[n.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(R,p){if(this.currentTrackId=p.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var a=this.levels[this.currentTrackId];a!=null&&a.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,a&&this.setInterval(s)},E.onSubtitleTrackLoaded=function(R,p){var a,r=p.details,n=p.id,o=this.currentTrackId,S=this.levels;if(!S.length)return;var b=S[o];if(n>=S.length||n!==o||!b)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||(a=b.details)!==null&&a!==void 0&&a.live){var g=this.mainDetails;if(r.deltaUpdateFailed||!g)return;var U=g.fragments[0];if(!b.details)r.hasProgramDateTime&&g.hasProgramDateTime?Object(c.alignMediaPlaylistByPDT)(r,g):U&&Object(C.addSliding)(r,U.start);else{var K=this.alignPlaylists(r,b.details);K===0&&U&&Object(C.addSliding)(r,U.start)}}if(b.details=r,this.levelLastLoaded=n,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var W=Object(_.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),b.details=void 0)}},E._handleFragmentLoadComplete=function(R){var p=R.frag,a=R.payload,r=p.decryptdata,n=this.hls;if(this.fragContextChanged(p))return;if(a&&a.byteLength>0&&r&&r.key&&r.iv&&r.method==="AES-128"){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(a),r.key.buffer,r.iv.buffer).then(function(S){var b=performance.now();n.trigger(Q.Events.FRAG_DECRYPTED,{frag:p,payload:S,stats:{tstart:o,tdecrypt:b}})})}},E.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var R,p=this.currentTrackId,a=this.levels;if(!a.length||!a[p]||!a[p].details)return;var r=a[p].details,n=r.targetduration,o=this.config,S=this.media,b=w.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,S.currentTime-n,o.maxBufferHole),g=b.end,U=b.len,K=this.getMaxBufferLength()+n;if(U>K)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var W=r.fragments,q=W.length,Y=r.edge,V,te=this.fragPrevious;if(g<Y){var X=o.maxFragLookUpTolerance;te&&r.hasProgramDateTime&&(V=Object(_.findFragmentByPDT)(W,te.endProgramDateTime,X)),V||(V=Object(_.findFragmentByPTS)(te,W,g,X),!V&&te&&te.start<W[0].start&&(V=W[0]))}else V=W[q-1];(R=V)!==null&&R!==void 0&&R.encrypted?(D.logger.log("Loading key for "+V.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(Q.Events.KEY_LOADING,{frag:V})):V&&this.fragmentTracker.getState(V)===x.FragmentState.NOT_LOADED&&this.loadFragment(V,r,g)}},E.loadFragment=function(R,p,a){this.fragCurrent=R,f.prototype.loadFragment.call(this,R,p,a)},y(m,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),m}(i.default)},"./src/controller/subtitle-track-controller.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/events.ts"),D=L("./src/utils/texttrack-utils.ts"),w=L("./src/controller/base-playlist-controller.ts"),_=L("./src/types/loader.ts");function c(T,y){for(var B=0;B<y.length;B++){var u=y[B];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(T,u.key,u)}}function C(T,y,B){return y&&c(T.prototype,y),B&&c(T,B),T}function x(T,y){T.prototype=Object.create(y.prototype),T.prototype.constructor=T,i(T,y)}function i(T,y){return i=Object.setPrototypeOf||function(u,s){return u.__proto__=s,u},i(T,y)}var h=function(T){x(y,T);function y(u){var s;return s=T.call(this,u,"[subtitle-track-controller]")||this,s.media=null,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.selectDefaultTrack=!0,s.queuedDefaultTrack=-1,s.trackChangeListener=function(){return s.onTextTracksChanged()},s.asyncPollTrackChange=function(){return s.pollTrackChange(0)},s.useTextTrackPolling=!1,s.subtitlePollingInterval=-1,s.subtitleDisplay=!0,s.registerListeners(),s}var B=y.prototype;return B.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,T.prototype.destroy.call(this)},B.registerListeners=function(){var s=this.hls;s.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),s.on(Q.Events.ERROR,this.onError,this)},B.unregisterListeners=function(){var s=this.hls;s.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),s.off(Q.Events.ERROR,this.onError,this)},B.onMediaAttached=function(s,l){if(this.media=l.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)},B.pollTrackChange=function(s){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,s)},B.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 s=O(this.media.textTracks);s.forEach(function(l){Object(D.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},B.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},B.onManifestParsed=function(s,l){this.tracks=l.subtitleTracks},B.onSubtitleTrackLoaded=function(s,l){var f=l.id,m=l.details,E=this.trackId,v=this.tracksInGroup[E];if(!v){this.warn("Invalid subtitle track id "+f);return}var R=v.details;v.details=l.details,this.log("subtitle track "+f+" loaded ["+m.startSN+"-"+m.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,l,R))},B.onLevelLoading=function(s,l){this.switchLevel(l.level)},B.onLevelSwitching=function(s,l){this.switchLevel(l.level)},B.switchLevel=function(s){var l=this.hls.levels[s];if(!(l!=null&&l.textGroupIds))return;var f=l.textGroupIds[l.urlId];if(this.groupId!==f){var m=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(p){return!f||p.groupId===f});this.tracksInGroup=E;var v=this.findTrackId(m==null?void 0:m.name)||this.findTrackId();this.groupId=f;var R={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(Q.Events.SUBTITLE_TRACKS_UPDATED,R),v!==-1&&this.setSubtitleTrack(v,m)}},B.findTrackId=function(s){for(var l=this.tracksInGroup,f=0;f<l.length;f++){var m=l[f];if((!this.selectDefaultTrack||m.default)&&(!s||s===m.name))return m.id}return-1},B.onError=function(s,l){if(T.prototype.onError.call(this,s,l),l.fatal||!l.context)return;l.context.type===_.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},B.loadPlaylist=function(s){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var f=l.id,m=l.groupId,E=l.url;if(s)try{E=s.addDirectives(E)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Loading subtitle playlist for id "+f),this.hls.trigger(Q.Events.SUBTITLE_TRACK_LOADING,{url:E,id:f,groupId:m,deliveryDirectives:s||null})}},B.toggleTrackModes=function(s){var l=this,f=this.media,m=this.subtitleDisplay,E=this.trackId;if(!f)return;var v=O(f.textTracks),R=v.filter(function(r){return r.groupId===l.groupId});if(s===-1)[].slice.call(v).forEach(function(r){r.mode="disabled"});else{var p=R[E];p&&(p.mode="disabled")}var a=R[s];a&&(a.mode=m?"showing":"hidden")},B.setSubtitleTrack=function(s,l){var f,m=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=s;return}if(this.trackId!==s&&this.toggleTrackModes(s),this.trackId===s&&(s===-1||(f=m[s])!==null&&f!==void 0&&f.details)||s<-1||s>=m.length)return;this.clearTimer();var E=m[s];if(this.log("Switching to subtitle track "+s),this.trackId=s,E){var v=E.id,R=E.groupId,p=R===void 0?"":R,a=E.name,r=E.type,n=E.url;this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:v,groupId:p,name:a,type:r,url:n});var o=this.switchParams(E.url,l==null?void 0:l.details);this.loadPlaylist(o)}else this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:s})},B.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var s=-1,l=O(this.media.textTracks),f=0;f<l.length;f++)if(l[f].mode==="hidden")s=f;else if(l[f].mode==="showing"){s=f;break}this.subtitleTrack!==s&&(this.subtitleTrack=s)},C(y,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(s,l)}}]),y}(w.default);function O(T){for(var y=[],B=0;B<T.length;B++){var u=T[B];u.kind==="subtitles"&&u.label&&y.push(T[B])}return y}N.default=h},"./src/controller/timeline-controller.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"TimelineController",function(){return O});var Q=L("./src/polyfills/number.ts"),D=L("./src/events.ts"),w=L("./src/utils/cea-608-parser.ts"),_=L("./src/utils/output-filter.ts"),c=L("./src/utils/webvtt-parser.ts"),C=L("./src/utils/texttrack-utils.ts"),x=L("./src/utils/imsc1-ttml-parser.ts"),i=L("./src/types/loader.ts"),h=L("./src/utils/logger.ts"),O=function(){function u(l){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=B(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.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 f=new _.default(this,"textTrack1"),m=new _.default(this,"textTrack2"),E=new _.default(this,"textTrack3"),v=new _.default(this,"textTrack4");this.cea608Parser1=new w.default(1,f,m),this.cea608Parser2=new w.default(3,E,v)}l.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(D.Events.FRAG_LOADING,this.onFragLoading,this),l.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var s=u.prototype;return s.destroy=function(){var f=this.hls;f.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),f.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),f.off(D.Events.FRAG_LOADING,this.onFragLoading,this),f.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),f.off(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),f.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.off(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),f.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},s.addCues=function(f,m,E,v,R){for(var p=!1,a=R.length;a--;){var r=R[a],n=y(r[0],r[1],m,E);if(n>=0&&(r[0]=Math.min(r[0],m),r[1]=Math.max(r[1],E),p=!0,n/(E-m)>.5))return}if(p||R.push([m,E]),this.config.renderTextTracksNatively){var o=this.captionsTracks[f];this.Cues.newCue(o,m,E,v)}else{var S=this.Cues.newCue(null,m,E,v);this.hls.trigger(D.Events.CUES_PARSED,{type:"captions",cues:S,track:f})}},s.onInitPtsFound=function(f,m){var E=this,v=m.frag,R=m.id,p=m.initPTS,a=m.timescale,r=this.unparsedVttFrags;R==="main"&&(this.initPTS[v.cc]=p,this.timescale[v.cc]=a),r.length&&(this.unparsedVttFrags=[],r.forEach(function(n){E.onFragLoaded(D.Events.FRAG_LOADED,n)}))},s.getExistingTrack=function(f){var m=this.media;if(m)for(var E=0;E<m.textTracks.length;E++){var v=m.textTracks[E];if(v[f])return v}return null},s.createCaptionsTrack=function(f){this.config.renderTextTracksNatively?this.createNativeTrack(f):this.createNonNativeTrack(f)},s.createNativeTrack=function(f){if(this.captionsTracks[f])return;var m=this.captionsProperties,E=this.captionsTracks,v=this.media,R=m[f],p=R.label,a=R.languageCode,r=this.getExistingTrack(f);if(r)E[f]=r,Object(C.clearCurrentCues)(E[f]),Object(C.sendAddTrackEvent)(E[f],v);else{var n=this.createTextTrack("captions",p,a);n&&(n[f]=!0,E[f]=n)}},s.createNonNativeTrack=function(f){if(this.nonNativeCaptionsTracks[f])return;var m=this.captionsProperties[f];if(!m)return;var E=m.label,v={_id:f,label:E,kind:"captions",default:m.media?!!m.media.default:!1,closedCaptions:m.media};this.nonNativeCaptionsTracks[f]=v,this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[v]})},s.createTextTrack=function(f,m,E){var v=this.media;return v?v.addTextTrack(f,m,E):void 0},s.onMediaAttaching=function(f,m){this.media=m.media,this._cleanTracks()},s.onMediaDetaching=function(){var f=this.captionsTracks;Object.keys(f).forEach(function(m){Object(C.clearCurrentCues)(f[m]),delete f[m]}),this.nonNativeCaptionsTracks={}},s.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=B(),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())},s._cleanTracks=function(){var f=this.media;if(!f)return;var m=f.textTracks;if(m)for(var E=0;E<m.length;E++)Object(C.clearCurrentCues)(m[E])},s.onSubtitleTracksUpdated=function(f,m){var E=this;this.textTracks=[];var v=m.subtitleTracks||[],R=v.some(function(n){return n.textCodec===x.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var p=this.tracks&&v&&this.tracks.length===v.length;if(this.tracks=v||[],this.config.renderTextTracksNatively){var a=this.media?this.media.textTracks:[];this.tracks.forEach(function(n,o){var S;if(o<a.length){for(var b=null,g=0;g<a.length;g++)if(T(a[g],n)){b=a[g];break}b&&(S=b)}S?Object(C.clearCurrentCues)(S):(S=E.createTextTrack("subtitles",n.name,n.lang),S&&(S.mode="disabled")),S&&(S.groupId=n.groupId,E.textTracks.push(S))})}else if(!p&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(n){return{label:n.name,kind:n.type.toLowerCase(),default:n.default,subtitleTrack:n}});this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},s.onManifestLoaded=function(f,m){var E=this;this.config.enableCEA708Captions&&m.captions&&m.captions.forEach(function(v){var R=/(?:CC|SERVICE)([1-4])/.exec(v.instreamId);if(!R)return;var p="textTrack"+R[1],a=E.captionsProperties[p];if(!a)return;a.label=v.name,v.lang&&(a.languageCode=v.lang),a.media=v})},s.onFragLoading=function(f,m){var E=this.cea608Parser1,v=this.cea608Parser2,R=this.lastSn,p=this.lastPartIndex;if(!this.enabled||!(E&&v))return;if(m.frag.type===i.PlaylistLevelType.MAIN){var a,r,n=m.frag.sn,o=(a=m==null||((r=m.part)===null||r===void 0)?void 0:r.index)!=null?a:-1;n===R+1||n===R&&o===p+1||(E.reset(),v.reset()),this.lastSn=n,this.lastPartIndex=o}},s.onFragLoaded=function(f,m){var E=m.frag,v=m.payload,R=this.initPTS,p=this.unparsedVttFrags;if(E.type===i.PlaylistLevelType.SUBTITLE)if(v.byteLength){if(!Object(Q.isFiniteNumber)(R[E.cc])){p.push(m),R.length&&this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Missing initial subtitle PTS")});return}var a=E.decryptdata;if(a==null||a.key==null||a.method!=="AES-128"){var r=this.tracks[E.level],n=this.vttCCs;n[E.cc]||(n[E.cc]={start:E.start,prevCC:this.prevCC,new:!0},this.prevCC=E.cc),r&&r.textCodec===x.IMSC1_CODEC?this._parseIMSC1(E,v):this._parseVTTs(E,v,n)}}else this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},s._parseIMSC1=function(f,m){var E=this,v=this.hls;Object(x.parseIMSC1)(m,this.initPTS[f.cc],this.timescale[f.cc],function(R){E._appendCues(R,f.level),v.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(R){h.logger.log("Failed to parse IMSC1: "+R),v.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:R})})},s._parseVTTs=function(f,m,E){var v=this,R=this.hls;Object(c.parseWebVTT)(m,this.initPTS[f.cc],this.timescale[f.cc],E,f.cc,f.start,function(p){v._appendCues(p,f.level),R.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(p){v._fallbackToIMSC1(f,m),h.logger.log("Failed to parse VTT cue: "+p),R.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:p})})},s._fallbackToIMSC1=function(f,m){var E=this,v=this.tracks[f.level];v.textCodec||Object(x.parseIMSC1)(m,this.initPTS[f.cc],this.timescale[f.cc],function(){v.textCodec=x.IMSC1_CODEC,E._parseIMSC1(f,m)},function(){v.textCodec="wvtt"})},s._appendCues=function(f,m){var E=this.hls;if(this.config.renderTextTracksNatively){var v=this.textTracks[m];if(v.mode==="disabled")return;f.forEach(function(a){return Object(C.addCueToTrack)(v,a)})}else{var R=this.tracks[m],p=R.default?"default":"subtitles"+m;E.trigger(D.Events.CUES_PARSED,{type:"subtitles",cues:f,track:p})}},s.onFragDecrypted=function(f,m){var E=m.frag;if(E.type===i.PlaylistLevelType.SUBTITLE){if(!Object(Q.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(m);return}this.onFragLoaded(D.Events.FRAG_LOADED,m)}},s.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},s.onFragParsingUserdata=function(f,m){var E=this.cea608Parser1,v=this.cea608Parser2;if(!this.enabled||!(E&&v))return;for(var R=0;R<m.samples.length;R++){var p=m.samples[R].bytes;if(p){var a=this.extractCea608Data(p);E.addData(m.samples[R].pts,a[0]),v.addData(m.samples[R].pts,a[1])}}},s.onBufferFlushing=function(f,m){var E=m.startOffset,v=m.endOffset,R=m.endOffsetSubtitles,p=m.type,a=this.media;if(!a||a.currentTime<v)return;if(!p||p==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(o){return Object(C.removeCuesInRange)(r[o],E,v)})}if(this.config.renderTextTracksNatively&&(E===0&&R!==void 0)){var n=this.textTracks;Object.keys(n).forEach(function(o){return Object(C.removeCuesInRange)(n[o],E,R)})}},s.extractCea608Data=function(f){for(var m=f[0]&31,E=2,v=[[],[]],R=0;R<m;R++){var p=f[E++],a=127&f[E++],r=127&f[E++],n=(4&p)!==0,o=3&p;if(a===0&&r===0)continue;n&&((o===0||o===1)&&(v[o].push(a),v[o].push(r)))}return v},u}();function T(u,s){return u&&u.label===s.name&&!(u.textTrack1||u.textTrack2)}function y(u,s,l,f){return Math.min(s,f)-Math.max(u,l)}function B(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return Q});var Q=function(){function D(_,c){this.subtle=void 0,this.aesIV=void 0,this.subtle=_,this.aesIV=c}var w=D.prototype;return w.decrypt=function(c,C){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},C,c)},D}()},"./src/crypt/aes-decryptor.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"removePadding",function(){return D}),L.d(N,"default",function(){return w});var Q=L("./src/utils/typed-array.ts");function D(_){var c=_.byteLength,C=c&&new DataView(_.buffer).getUint8(c-1);return C?Object(Q.sliceUint8)(_,0,c-C):_}var w=function(){function _(){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 c=_.prototype;return c.uint8ArrayToUint32Array_=function(x){for(var i=new DataView(x),h=new Uint32Array(4),O=0;O<4;O++)h[O]=i.getUint32(O*4);return h},c.initTable=function(){var x=this.sBox,i=this.invSBox,h=this.subMix,O=h[0],T=h[1],y=h[2],B=h[3],u=this.invSubMix,s=u[0],l=u[1],f=u[2],m=u[3],E=new Uint32Array(256),v=0,R=0,p=0;for(p=0;p<256;p++)p<128?E[p]=p<<1:E[p]=p<<1^283;for(p=0;p<256;p++){var a=R^R<<1^R<<2^R<<3^R<<4;a=a>>>8^a&255^99,x[v]=a,i[a]=v;var r=E[v],n=E[r],o=E[n],S=E[a]*257^a*16843008;O[v]=S<<24|S>>>8,T[v]=S<<16|S>>>16,y[v]=S<<8|S>>>24,B[v]=S,S=o*16843009^n*65537^r*257^v*16843008,s[a]=S<<24|S>>>8,l[a]=S<<16|S>>>16,f[a]=S<<8|S>>>24,m[a]=S,v?(v=r^E[E[E[o^r]]],R^=E[E[R]]):v=R=1}},c.expandKey=function(x){for(var i=this.uint8ArrayToUint32Array_(x),h=!0,O=0;O<i.length&&h;)h=i[O]===this.key[O],O++;if(h)return;this.key=i;var T=this.keySize=i.length;if(T!==4&&T!==6&&T!==8)throw new Error("Invalid aes key size="+T);var y=this.ksRows=(T+6+1)*4,B,u,s=this.keySchedule=new Uint32Array(y),l=this.invKeySchedule=new Uint32Array(y),f=this.sBox,m=this.rcon,E=this.invSubMix,v=E[0],R=E[1],p=E[2],a=E[3],r,n;for(B=0;B<y;B++){if(B<T){r=s[B]=i[B];continue}n=r,B%T===0?(n=n<<8|n>>>24,n=f[n>>>24]<<24|f[n>>>16&255]<<16|f[n>>>8&255]<<8|f[n&255],n^=m[B/T|0]<<24):T>6&&B%T===4&&(n=f[n>>>24]<<24|f[n>>>16&255]<<16|f[n>>>8&255]<<8|f[n&255]),s[B]=r=(s[B-T]^n)>>>0}for(u=0;u<y;u++)B=y-u,u&3?n=s[B]:n=s[B-4],u<4||B<=4?l[u]=n:l[u]=v[f[n>>>24]]^R[f[n>>>16&255]]^p[f[n>>>8&255]]^a[f[n&255]],l[u]=l[u]>>>0},c.networkToHostOrderSwap=function(x){return x<<24|(x&65280)<<8|(x&16711680)>>8|x>>>24},c.decrypt=function(x,i,h){for(var O=this.keySize+6,T=this.invKeySchedule,y=this.invSBox,B=this.invSubMix,u=B[0],s=B[1],l=B[2],f=B[3],m=this.uint8ArrayToUint32Array_(h),E=m[0],v=m[1],R=m[2],p=m[3],a=new Int32Array(x),r=new Int32Array(a.length),n,o,S,b,g,U,K,W,q,Y,V,te,X,se,le=this.networkToHostOrderSwap;i<a.length;){for(q=le(a[i]),Y=le(a[i+1]),V=le(a[i+2]),te=le(a[i+3]),g=q^T[0],U=te^T[1],K=V^T[2],W=Y^T[3],X=4,se=1;se<O;se++)n=u[g>>>24]^s[U>>16&255]^l[K>>8&255]^f[W&255]^T[X],o=u[U>>>24]^s[K>>16&255]^l[W>>8&255]^f[g&255]^T[X+1],S=u[K>>>24]^s[W>>16&255]^l[g>>8&255]^f[U&255]^T[X+2],b=u[W>>>24]^s[g>>16&255]^l[U>>8&255]^f[K&255]^T[X+3],g=n,U=o,K=S,W=b,X=X+4;n=y[g>>>24]<<24^y[U>>16&255]<<16^y[K>>8&255]<<8^y[W&255]^T[X],o=y[U>>>24]<<24^y[K>>16&255]<<16^y[W>>8&255]<<8^y[g&255]^T[X+1],S=y[K>>>24]<<24^y[W>>16&255]<<16^y[g>>8&255]<<8^y[U&255]^T[X+2],b=y[W>>>24]<<24^y[g>>16&255]<<16^y[U>>8&255]<<8^y[K&255]^T[X+3],r[i]=le(n^E),r[i+1]=le(b^v),r[i+2]=le(S^R),r[i+3]=le(o^p),E=q,v=Y,R=V,p=te,i=i+4}return r.buffer},_}()},"./src/crypt/decrypter.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return i});var Q=L("./src/crypt/aes-crypto.ts"),D=L("./src/crypt/fast-aes-key.ts"),w=L("./src/crypt/aes-decryptor.ts"),_=L("./src/utils/logger.ts"),c=L("./src/utils/mp4-tools.ts"),C=L("./src/utils/typed-array.ts"),x=16,i=function(){function h(T,y,B){var u=B===void 0?{}:B,s=u.removePKCS7Padding,l=s===void 0?!0:s;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=T,this.config=y,this.removePKCS7Padding=l,l)try{var f=self.crypto;f&&(this.subtle=f.subtle||f.webkitSubtle)}catch(m){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var O=h.prototype;return O.destroy=function(){this.observer=null},O.isSync=function(){return this.config.enableSoftwareAES},O.flush=function(){var y=this.currentResult;if(!y){this.reset();return}var B=new Uint8Array(y);return this.reset(),this.removePKCS7Padding?Object(w.removePadding)(B):B},O.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},O.decrypt=function(y,B,u,s){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(y),B,u);var l=this.flush();l&&s(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(y),B,u).then(s)},O.softwareDecrypt=function(y,B,u){var s=this.currentIV,l=this.currentResult,f=this.remainderData;this.logOnce("JS AES decrypt"),f&&(y=Object(c.appendUint8Array)(f,y),this.remainderData=null);var m=this.getValidChunk(y);if(!m.length)return null;s&&(u=s);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new w.default),E.expandKey(B);var v=l;return this.currentResult=E.decrypt(m.buffer,0,u),this.currentIV=Object(C.sliceUint8)(m,-16).buffer,v||null},O.webCryptoDecrypt=function(y,B,u){var s=this,l=this.subtle;return(this.key!==B||!this.fastAesKey)&&(this.key=B,this.fastAesKey=new D.default(l,B)),this.fastAesKey.expandKey().then(function(f){if(!l)return Promise.reject(new Error("web crypto not initialized"));var m=new Q.default(l,u);return m.decrypt(y.buffer,f)}).catch(function(f){return s.onWebCryptoError(f,y,B,u)})},O.onWebCryptoError=function(y,B,u,s){return _.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",y),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(B,u,s)},O.getValidChunk=function(y){var B=y,u=y.length-y.length%x;return u!==y.length&&(B=Object(C.sliceUint8)(y,0,u),this.remainderData=Object(C.sliceUint8)(y,u)),B},O.logOnce=function(y){if(!this.logEnabled)return;_.logger.log("[decrypter.ts]: "+y),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return Q});var Q=function(){function D(_,c){this.subtle=void 0,this.key=void 0,this.subtle=_,this.key=c}var w=D.prototype;return w.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},D}()},"./src/demux/aacdemuxer.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/demux/base-audio-demuxer.ts"),D=L("./src/demux/adts.ts"),w=L("./src/utils/logger.ts"),_=L("./src/demux/id3.ts");function c(i,h){i.prototype=Object.create(h.prototype),i.prototype.constructor=i,C(i,h)}function C(i,h){return C=Object.setPrototypeOf||function(T,y){return T.__proto__=y,T},C(i,h)}var x=function(i){c(h,i);function h(T,y){var B;return B=i.call(this)||this,B.observer=void 0,B.config=void 0,B.observer=T,B.config=y,B}var O=h.prototype;return O.resetInitSegment=function(y,B,u){i.prototype.resetInitSegment.call(this,y,B,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:y,duration:u,inputTimeScale:9e4,dropped:0}},h.probe=function(y){if(!y)return!1;for(var B=_.getID3Data(y,0)||[],u=B.length,s=y.length;u<s;u++)if(D.probe(y,u))return w.logger.log("ADTS sync word found !"),!0;return!1},O.canParse=function(y,B){return D.canParse(y,B)},O.appendFrame=function(y,B,u){D.initTrackConfig(y,this.observer,B,u,y.manifestCodec);var s=D.appendFrame(y,B,u,this.initPTS,this.frameIndex);if(s&&s.missing===0)return s},h}(Q.default);x.minProbeByteLength=9,N.default=x},"./src/demux/adts.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"getAudioConfig",function(){return _}),L.d(N,"isHeaderPattern",function(){return c}),L.d(N,"getHeaderLength",function(){return C}),L.d(N,"getFullFrameLength",function(){return x}),L.d(N,"canGetFrameLength",function(){return i}),L.d(N,"isHeader",function(){return h}),L.d(N,"canParse",function(){return O}),L.d(N,"probe",function(){return T}),L.d(N,"initTrackConfig",function(){return y}),L.d(N,"getFrameDuration",function(){return B}),L.d(N,"parseFrameHeader",function(){return u}),L.d(N,"appendFrame",function(){return s});var Q=L("./src/utils/logger.ts"),D=L("./src/errors.ts"),w=L("./src/events.ts");function _(l,f,m,E){var v,R,p,a,r=navigator.userAgent.toLowerCase(),n=E,o=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];v=((f[m+2]&192)>>>6)+1;var S=(f[m+2]&60)>>>2;if(S>o.length-1){l.trigger(w.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+S});return}return p=(f[m+2]&1)<<2,p|=(f[m+3]&192)>>>6,Q.logger.log("manifest codec:"+E+", ADTS type:"+v+", samplingIndex:"+S),/firefox/i.test(r)?S>=6?(v=5,a=new Array(4),R=S-3):(v=2,a=new Array(2),R=S):r.indexOf("android")!==-1?(v=2,a=new Array(2),R=S):(v=5,a=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&S>=6?R=S-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(S>=6&&p===1||/vivaldi/i.test(r))||!E&&p===1)&&(v=2,a=new Array(2)),R=S)),a[0]=v<<3,a[0]|=(S&14)>>1,a[1]|=(S&1)<<7,a[1]|=p<<3,v===5&&(a[1]|=(R&14)>>1,a[2]=(R&1)<<7,a[2]|=2<<2,a[3]=0),{config:a,samplerate:o[S],channelCount:p,codec:"mp4a.40."+v,manifestCodec:n}}function c(l,f){return l[f]===255&&(l[f+1]&246)===240}function C(l,f){return l[f+1]&1?7:9}function x(l,f){return(l[f+3]&3)<<11|l[f+4]<<3|(l[f+5]&224)>>>5}function i(l,f){return f+5<l.length}function h(l,f){return f+1<l.length&&c(l,f)}function O(l,f){return i(l,f)&&c(l,f)&&x(l,f)<=l.length-f}function T(l,f){if(h(l,f)){var m=C(l,f);if(f+m>=l.length)return!1;var E=x(l,f);if(E<=m)return!1;var v=f+E;return v===l.length||h(l,v)}return!1}function y(l,f,m,E,v){if(!l.samplerate){var R=_(f,m,E,v);if(!R)return;l.config=R.config,l.samplerate=R.samplerate,l.channelCount=R.channelCount,l.codec=R.codec,l.manifestCodec=R.manifestCodec,Q.logger.log("parsed codec:"+l.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function B(l){return 1024*9e4/l}function u(l,f,m,E,v){var R=C(l,f),p=x(l,f);if(p-=R,p>0){var a=m+E*v;return{headerLength:R,frameLength:p,stamp:a}}}function s(l,f,m,E,v){var R=B(l.samplerate),p=u(f,m,E,v,R);if(p){var a=p.frameLength,r=p.headerLength,n=p.stamp,o=r+a,S=Math.max(0,m+o-f.length),b;S?(b=new Uint8Array(o-r),b.set(f.subarray(m+r,f.length),0)):b=f.subarray(m+r,m+o);var g={unit:b,pts:n};return S||l.samples.push(g),{sample:g,length:o,missing:S}}}},"./src/demux/base-audio-demuxer.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"initPTSFn",function(){return x});var Q=L("./src/polyfills/number.ts"),D=L("./src/demux/id3.ts"),w=L("./src/demux/dummy-demuxed-track.ts"),_=L("./src/utils/mp4-tools.ts"),c=L("./src/utils/typed-array.ts"),C=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=i.prototype;return h.resetInitSegment=function(T,y,B){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(T,y){return!1},h.appendFrame=function(T,y,B){},h.demux=function(T,y){this.cachedData&&(T=Object(_.appendUint8Array)(this.cachedData,T),this.cachedData=null);var B=D.getID3Data(T,0),u=B?B.length:0,s,l,f=this._audioTrack,m=this._id3Track,E=B?D.getTimeStamp(B):void 0,v=T.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=x(E,y)),B&&B.length>0&&m.samples.push({pts:this.initPTS,dts:this.initPTS,data:B}),l=this.initPTS;u<v;){if(this.canParse(T,u)){var R=this.appendFrame(f,T,u);R?(this.frameIndex++,l=R.sample.pts,u+=R.length,s=u):u=v}else D.canParse(T,u)?(B=D.getID3Data(T,u),m.samples.push({pts:l,dts:l,data:B}),u+=B.length,s=u):u++;if(u===v&&s!==v){var p=Object(c.sliceUint8)(T,s);this.cachedData?this.cachedData=Object(_.appendUint8Array)(this.cachedData,p):this.cachedData=p}}return{audioTrack:f,avcTrack:Object(w.dummyTrack)(),id3Track:m,textTrack:Object(w.dummyTrack)()}},h.demuxSampleAes=function(T,y,B){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(T){var y=this.cachedData;return y&&(this.cachedData=null,this.demux(y,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(w.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(w.dummyTrack)()}},h.destroy=function(){},i}(),x=function(h,O){return Object(Q.isFiniteNumber)(h)?h*90:O*9e4};N.default=C},"./src/demux/chunk-cache.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return Q});var Q=function(){function w(){this.chunks=[],this.dataLength=0}var _=w.prototype;return _.push=function(C){this.chunks.push(C),this.dataLength+=C.length},_.flush=function(){var C=this.chunks,x=this.dataLength,i;if(C.length)C.length===1?i=C[0]:i=D(C,x);else return new Uint8Array(0);return this.reset(),i},_.reset=function(){this.chunks.length=0,this.dataLength=0},w}();function D(w,_){for(var c=new Uint8Array(_),C=0,x=0;x<w.length;x++){var i=w[x];c.set(i,C),C+=i.length}return c}},"./src/demux/dummy-demuxed-track.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"dummyTrack",function(){return Q});function Q(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/utils/logger.ts"),D=function(){function w(c){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=c,this.bytesAvailable=c.byteLength,this.word=0,this.bitsAvailable=0}var _=w.prototype;return _.loadWord=function(){var C=this.data,x=this.bytesAvailable,i=C.byteLength-x,h=new Uint8Array(4),O=Math.min(4,x);if(O===0)throw new Error("no bytes available");h.set(C.subarray(i,i+O)),this.word=new DataView(h.buffer).getUint32(0),this.bitsAvailable=O*8,this.bytesAvailable-=O},_.skipBits=function(C){var x;this.bitsAvailable>C?(this.word<<=C,this.bitsAvailable-=C):(C-=this.bitsAvailable,x=C>>3,C-=x>>3,this.bytesAvailable-=x,this.loadWord(),this.word<<=C,this.bitsAvailable-=C)},_.readBits=function(C){var x=Math.min(this.bitsAvailable,C),i=this.word>>>32-x;return C>32&&Q.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=x,this.bitsAvailable>0?this.word<<=x:this.bytesAvailable>0&&this.loadWord(),x=C-x,x>0&&this.bitsAvailable?i<<x|this.readBits(x):i},_.skipLZ=function(){var C;for(C=0;C<this.bitsAvailable;++C)if((this.word&2147483648>>>C)!==0)return this.word<<=C,this.bitsAvailable-=C,C;return this.loadWord(),C+this.skipLZ()},_.skipUEG=function(){this.skipBits(1+this.skipLZ())},_.skipEG=function(){this.skipBits(1+this.skipLZ())},_.readUEG=function(){var C=this.skipLZ();return this.readBits(C+1)-1},_.readEG=function(){var C=this.readUEG();return 1&C?1+C>>>1:-1*(C>>>1)},_.readBoolean=function(){return this.readBits(1)===1},_.readUByte=function(){return this.readBits(8)},_.readUShort=function(){return this.readBits(16)},_.readUInt=function(){return this.readBits(32)},_.skipScalingList=function(C){for(var x=8,i=8,h,O=0;O<C;O++)i!==0&&(h=this.readEG(),i=(x+h+256)%256),x=i===0?x:i},_.readSPS=function(){var C=0,x=0,i=0,h=0,O,T,y,B=this.readUByte.bind(this),u=this.readBits.bind(this),s=this.readUEG.bind(this),l=this.readBoolean.bind(this),f=this.skipBits.bind(this),m=this.skipEG.bind(this),E=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);B();var R=B();if(u(5),f(3),B(),E(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var p=s();if(p===3&&f(1),E(),E(),f(1),l())for(T=p!==3?8:12,y=0;y<T;y++)l()&&(y<6?v(16):v(64))}E();var a=s();if(a===0)s();else if(a===1)for(f(1),m(),m(),O=s(),y=0;y<O;y++)m();E(),f(1);var r=s(),n=s(),o=u(1);o===0&&f(1),f(1),l()&&(C=s(),x=s(),i=s(),h=s());var S=[1,1];if(l()&&l()){var b=B();switch(b){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:{S=[B()<<8|B(),B()<<8|B()];break}}}return{width:Math.ceil((r+1)*16-C*2-x*2),height:(2-o)*(n+1)*16-(o?2:4)*(i+h),pixelRatio:S}},_.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},w}();N.default=D},"./src/demux/id3.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"isHeader",function(){return Q}),L.d(N,"isFooter",function(){return D}),L.d(N,"getID3Data",function(){return w}),L.d(N,"canParse",function(){return c}),L.d(N,"getTimeStamp",function(){return C}),L.d(N,"isTimeStampFrame",function(){return x}),L.d(N,"getID3Frames",function(){return h}),L.d(N,"decodeFrame",function(){return O}),L.d(N,"utf8ArrayToStr",function(){return s}),L.d(N,"testables",function(){return l});var Q=function(v,R){return R+10<=v.length&&(v[R]===73&&v[R+1]===68&&v[R+2]===51&&(v[R+3]<255&&v[R+4]<255&&(v[R+6]<128&&v[R+7]<128&&v[R+8]<128&&v[R+9]<128)))},D=function(v,R){return R+10<=v.length&&(v[R]===51&&v[R+1]===68&&v[R+2]===73&&(v[R+3]<255&&v[R+4]<255&&(v[R+6]<128&&v[R+7]<128&&v[R+8]<128&&v[R+9]<128)))},w=function(v,R){for(var p=R,a=0;Q(v,R);){a+=10;var r=_(v,R+6);a+=r,D(v,R+10)&&(a+=10),R+=a}return a>0?v.subarray(p,p+a):void 0},_=function(v,R){var p=0;return p=(v[R]&127)<<21,p|=(v[R+1]&127)<<14,p|=(v[R+2]&127)<<7,p|=v[R+3]&127,p},c=function(v,R){return Q(v,R)&&_(v,R+6)+10<=v.length-R},C=function(v){for(var R=h(v),p=0;p<R.length;p++){var a=R[p];if(x(a))return u(a)}return},x=function(v){return v&&v.key==="PRIV"&&v.info==="com.apple.streaming.transportStreamTimestamp"},i=function(v){var R=String.fromCharCode(v[0],v[1],v[2],v[3]),p=_(v,4),a=10;return{type:R,size:p,data:v.subarray(a,a+p)}},h=function(v){for(var R=0,p=[];Q(v,R);){var a=_(v,R+6);R+=10;for(var r=R+a;R+8<r;){var n=i(v.subarray(R)),o=O(n);o&&p.push(o),R+=n.size+10}D(v,R)&&(R+=10)}return p},O=function(v){return v.type==="PRIV"?T(v):v.type[0]==="W"?B(v):y(v)},T=function(v){if(v.size<2)return;var R=s(v.data,!0),p=new Uint8Array(v.data.subarray(R.length+1));return{key:v.type,info:R,data:p.buffer}},y=function(v){if(v.size<2)return;if(v.type==="TXXX"){var R=1,p=s(v.data.subarray(R),!0);R+=p.length+1;var a=s(v.data.subarray(R));return{key:v.type,info:p,data:a}}var r=s(v.data.subarray(1));return{key:v.type,data:r}},B=function(v){if(v.type==="WXXX"){if(v.size<2)return;var R=1,p=s(v.data.subarray(R),!0);R+=p.length+1;var a=s(v.data.subarray(R));return{key:v.type,info:p,data:a}}var r=s(v.data);return{key:v.type,data:r}},u=function(v){if(v.data.byteLength===8){var R=new Uint8Array(v.data),p=R[3]&1,a=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return a/=45,p&&(a+=4772185884e-2),Math.round(a)}return},s=function(v,R){R===void 0&&(R=!1);var p=m();if(p){var a=p.decode(v);if(R){var r=a.indexOf("\0");return r!==-1?a.substring(0,r):a}return a.replace(/\0/g,"")}for(var n=v.length,o,S,b,g="",U=0;U<n;){if(o=v[U++],o===0&&R)return g;if(o===0||o===3)continue;switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(o);break;case 12:case 13:S=v[U++],g+=String.fromCharCode((o&31)<<6|S&63);break;case 14:S=v[U++],b=v[U++],g+=String.fromCharCode((o&15)<<12|(S&63)<<6|(b&63)<<0);break;default:}}return g},l={decodeTextFrame:y},f;function m(){return!f&&typeof self.TextDecoder!="undefined"&&(f=new self.TextDecoder("utf-8")),f}},"./src/demux/mp3demuxer.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/demux/base-audio-demuxer.ts"),D=L("./src/demux/id3.ts"),w=L("./src/utils/logger.ts"),_=L("./src/demux/mpegaudio.ts");function c(i,h){i.prototype=Object.create(h.prototype),i.prototype.constructor=i,C(i,h)}function C(i,h){return C=Object.setPrototypeOf||function(T,y){return T.__proto__=y,T},C(i,h)}var x=function(i){c(h,i);function h(){return i.apply(this,arguments)||this}var O=h.prototype;return O.resetInitSegment=function(y,B,u){i.prototype.resetInitSegment.call(this,y,B,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:y,duration:u,inputTimeScale:9e4,dropped:0}},h.probe=function(y){if(!y)return!1;for(var B=D.getID3Data(y,0)||[],u=B.length,s=y.length;u<s;u++)if(_.probe(y,u))return w.logger.log("MPEG Audio sync word found !"),!0;return!1},O.canParse=function(y,B){return _.canParse(y,B)},O.appendFrame=function(y,B,u){return this.initPTS===null?void 0:_.appendFrame(y,B,u,this.initPTS,this.frameIndex)},h}(Q.default);x.minProbeByteLength=4,N.default=x},"./src/demux/mp4demuxer.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/utils/mp4-tools.ts"),D=L("./src/demux/dummy-demuxed-track.ts"),w=function(){function _(C,x){this.remainderData=null,this.config=void 0,this.config=x}var c=_.prototype;return c.resetTimeStamp=function(){},c.resetInitSegment=function(){},c.resetContiguity=function(){},_.probe=function(x){return Object(Q.findBox)({data:x,start:0,end:Math.min(x.length,16384)},["moof"]).length>0},c.demux=function(x){var i=x,h=Object(D.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(Q.appendUint8Array)(this.remainderData,x));var O=Object(Q.segmentValidRange)(i);this.remainderData=O.remainder,h.samples=O.valid||new Uint8Array}else h.samples=i;return{audioTrack:Object(D.dummyTrack)(),avcTrack:h,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},c.flush=function(){var x=Object(D.dummyTrack)();return x.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(D.dummyTrack)(),avcTrack:x,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},c.demuxSampleAes=function(x,i,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},_}();w.minProbeByteLength=1024,N.default=w},"./src/demux/mpegaudio.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"appendFrame",function(){return C}),L.d(N,"parseHeader",function(){return x}),L.d(N,"isHeaderPattern",function(){return i}),L.d(N,"isHeader",function(){return h}),L.d(N,"canParse",function(){return O}),L.d(N,"probe",function(){return T});var Q=null,D=[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],w=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],c=[0,1,1,4];function C(y,B,u,s,l){if(u+24>B.length)return;var f=x(B,u);if(f&&u+f.frameLength<=B.length){var m=f.samplesPerFrame*9e4/f.sampleRate,E=s+l*m,v={unit:B.subarray(u,u+f.frameLength),pts:E,dts:E};return y.config=[],y.channelCount=f.channelCount,y.samplerate=f.sampleRate,y.samples.push(v),{sample:v,length:f.frameLength,missing:0}}}function x(y,B){var u=y[B+1]>>3&3,s=y[B+1]>>1&3,l=y[B+2]>>4&15,f=y[B+2]>>2&3;if(u!==1&&l!==0&&l!==15&&f!==3){var m=y[B+2]>>1&1,E=y[B+3]>>6,v=u===3?3-s:s===3?3:4,R=D[v*14+l-1]*1e3,p=u===3?0:u===2?1:2,a=w[p*3+f],r=E===3?1:2,n=_[u][s],o=c[s],S=n*8*o,b=Math.floor(n*R/a+m)*o;if(Q===null){var g=navigator.userAgent||"",U=g.match(/Chrome\/(\d+)/i);Q=U?parseInt(U[1]):0}var K=!!Q&&Q<=87;return K&&s===2&&R>=224e3&&E===0&&(y[B+3]=y[B+3]|128),{sampleRate:a,channelCount:r,frameLength:b,samplesPerFrame:S}}}function i(y,B){return y[B]===255&&(y[B+1]&224)===224&&(y[B+1]&6)!==0}function h(y,B){return B+1<y.length&&i(y,B)}function O(y,B){var u=4;return i(y,B)&&u<=y.length-B}function T(y,B){if(B+1<y.length&&i(y,B)){var u=4,s=x(y,B),l=u;s!=null&&s.frameLength&&(l=s.frameLength);var f=B+l;return f===y.length||h(y,f)}return!1}},"./src/demux/sample-aes.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/crypt/decrypter.ts"),D=L("./src/demux/tsdemuxer.ts"),w=function(){function _(C,x,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Q.default(C,x,{removePKCS7Padding:!1})}var c=_.prototype;return c.decryptBuffer=function(x,i){this.decrypter.decrypt(x,this.keyData.key.buffer,this.keyData.iv.buffer,i)},c.decryptAacSample=function(x,i,h,O){var T=x[i].unit,y=T.subarray(16,T.length-T.length%16),B=y.buffer.slice(y.byteOffset,y.byteOffset+y.length),u=this;this.decryptBuffer(B,function(s){var l=new Uint8Array(s);T.set(l,16),O||u.decryptAacSamples(x,i+1,h)})},c.decryptAacSamples=function(x,i,h){for(;;i++){if(i>=x.length){h();return}if(x[i].unit.length<32)continue;var O=this.decrypter.isSync();if(this.decryptAacSample(x,i,h,O),!O)return}},c.getAvcEncryptedData=function(x){for(var i=Math.floor((x.length-48)/160)*16+16,h=new Int8Array(i),O=0,T=32;T<=x.length-16;T+=160,O+=16)h.set(x.subarray(T,T+16),O);return h},c.getAvcDecryptedUnit=function(x,i){for(var h=new Uint8Array(i),O=0,T=32;T<=x.length-16;T+=160,O+=16)x.set(h.subarray(O,O+16),T);return x},c.decryptAvcSample=function(x,i,h,O,T,y){var B=Object(D.discardEPB)(T.data),u=this.getAvcEncryptedData(B),s=this;this.decryptBuffer(u.buffer,function(l){T.data=s.getAvcDecryptedUnit(B,l),y||s.decryptAvcSamples(x,i,h+1,O)})},c.decryptAvcSamples=function(x,i,h,O){if(x instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,h=0){if(i>=x.length){O();return}for(var T=x[i].units;!(h>=T.length);h++){var y=T[h];if(y.data.length<=48||y.type!==1&&y.type!==5)continue;var B=this.decrypter.isSync();if(this.decryptAvcSample(x,i,h,O,y,B),!B)return}}},_}();N.default=w},"./src/demux/transmuxer-interface.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return T});var Q=L("./node_modules/webworkify-webpack/index.js"),D=L.n(Q),w=L("./src/events.ts"),_=L("./src/demux/transmuxer.ts"),c=L("./src/utils/logger.ts"),C=L("./src/errors.ts"),x=L("./src/utils/mediasource-helper.ts"),i=L("./node_modules/eventemitter3/index.js"),h=L.n(i),O=Object(x.getMediaSource)()||{isTypeSupported:function(){return!1}},T=function(){function y(u,s,l,f){var m=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=u,this.id=s,this.onTransmuxComplete=l,this.onFlush=f;var E=u.config,v=function(n,o){o=o||{},o.frag=m.frag,o.id=m.id,u.trigger(n,o)};this.observer=new i.EventEmitter,this.observer.on(w.Events.FRAG_DECRYPTED,v),this.observer.on(w.Events.ERROR,v);var R={mp4:O.isTypeSupported("video/mp4"),mpeg:O.isTypeSupported("audio/mpeg"),mp3:O.isTypeSupported('audio/mp4; codecs="mp3"')},p=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){c.logger.log("demuxing in webworker");var a;try{a=this.worker=Q("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),a.addEventListener("message",this.onwmsg),a.onerror=function(r){u.trigger(w.Events.ERROR,{type:C.ErrorTypes.OTHER_ERROR,details:C.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(r.message+" ("+r.filename+":"+r.lineno+")")})},a.postMessage({cmd:"init",typeSupported:R,vendor:p,id:s,config:JSON.stringify(E)})}catch(r){c.logger.warn("Error in worker:",r),c.logger.error("Error while initializing DemuxerWorker, fallback to inline"),a&&self.URL.revokeObjectURL(a.objectURL),this.transmuxer=new _.default(this.observer,R,E,p,s),this.worker=null}}else this.transmuxer=new _.default(this.observer,R,E,p,s)}var B=y.prototype;return B.destroy=function(){var s=this.worker;if(s)s.removeEventListener("message",this.onwmsg),s.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var f=this.observer;f&&f.removeAllListeners(),this.observer=null},B.push=function(s,l,f,m,E,v,R,p,a,r){var n=this;a.transmuxing.start=self.performance.now();var o=this.transmuxer,S=this.worker,b=v?v.start:E.start,g=E.decryptdata,U=this.frag,K=!(U&&E.cc===U.cc),W=!(U&&a.level===U.level),q=U?a.sn-U.sn:-1,Y=this.part?a.part-this.part.index:1,V=!W&&(q===1||q===0&&Y===1),te=self.performance.now();(W||q||E.stats.parsing.start===0)&&(E.stats.parsing.start=te),v&&(Y||!V)&&(v.stats.parsing.start=te);var X=new _.TransmuxState(K,V,p,W,b);if(!V||K){c.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+a.sn+" p: "+a.part+" level: "+a.level+" id: "+a.id+`
|
|
discontinuity: `+K+`
|
|
trackSwitch: `+W+`
|
|
contiguous: `+V+`
|
|
accurateTimeOffset: `+p+`
|
|
timeOffset: `+b);var se=new _.TransmuxConfig(f,m,l,R,r);this.configureTransmuxer(se)}if(this.frag=E,this.part=v,S)S.postMessage({cmd:"demux",data:s,decryptdata:g,chunkMeta:a,state:X},s instanceof ArrayBuffer?[s]:[]);else if(o){var le=o.push(s,g,a,X);Object(_.isPromise)(le)?le.then(function(Te){n.handleTransmuxComplete(Te)}):this.handleTransmuxComplete(le)}},B.flush=function(s){var l=this;s.transmuxing.start=self.performance.now();var f=this.transmuxer,m=this.worker;if(m)m.postMessage({cmd:"flush",chunkMeta:s});else if(f){var E=f.flush(s);Object(_.isPromise)(E)?E.then(function(v){l.handleFlushResult(v,s)}):this.handleFlushResult(E,s)}},B.handleFlushResult=function(s,l){var f=this;s.forEach(function(m){f.handleTransmuxComplete(m)}),this.onFlush(l)},B.onWorkerMessage=function(s){var l=s.data,f=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,f.trigger(l.event,l.data);break}}},B.configureTransmuxer=function(s){var l=this.worker,f=this.transmuxer;l?l.postMessage({cmd:"configure",config:s}):f&&f.configure(s)},B.handleTransmuxComplete=function(s){s.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(s)},y}()},"./src/demux/transmuxer-worker.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return C});var Q=L("./src/demux/transmuxer.ts"),D=L("./src/events.ts"),w=L("./src/utils/logger.ts"),_=L("./node_modules/eventemitter3/index.js"),c=L.n(_);function C(T){var y=new _.EventEmitter,B=function(s,l){T.postMessage({event:s,data:l})};y.on(D.Events.FRAG_DECRYPTED,B),y.on(D.Events.ERROR,B),T.addEventListener("message",function(u){var s=u.data;switch(s.cmd){case"init":{var l=JSON.parse(s.config);T.transmuxer=new Q.default(y,s.typeSupported,l,s.vendor,s.id),Object(w.enableLogs)(l.debug),B("init",null);break}case"configure":{T.transmuxer.configure(s.config);break}case"demux":{var f=T.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(Q.isPromise)(f)?f.then(function(v){x(T,v)}):x(T,f);break}case"flush":{var m=s.chunkMeta,E=T.transmuxer.flush(m);Object(Q.isPromise)(E)?E.then(function(v){h(T,v,m)}):h(T,E,m);break}default:break}})}function x(T,y){if(O(y.remuxResult))return;var B=[],u=y.remuxResult,s=u.audio,l=u.video;s&&i(B,s),l&&i(B,l),T.postMessage({event:"transmuxComplete",data:y},B)}function i(T,y){y.data1&&T.push(y.data1.buffer),y.data2&&T.push(y.data2.buffer)}function h(T,y,B){y.forEach(function(u){x(T,u)}),T.postMessage({event:"flush",data:B})}function O(T){return!T.audio&&!T.video&&!T.text&&!T.id3&&!T.initSegment}},"./src/demux/transmuxer.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return l}),L.d(N,"isPromise",function(){return E}),L.d(N,"TransmuxConfig",function(){return v}),L.d(N,"TransmuxState",function(){return R});var Q=L("./src/events.ts"),D=L("./src/errors.ts"),w=L("./src/crypt/decrypter.ts"),_=L("./src/demux/aacdemuxer.ts"),c=L("./src/demux/mp4demuxer.ts"),C=L("./src/demux/tsdemuxer.ts"),x=L("./src/demux/mp3demuxer.ts"),i=L("./src/remux/mp4-remuxer.ts"),h=L("./src/remux/passthrough-remuxer.ts"),O=L("./src/demux/chunk-cache.ts"),T=L("./src/utils/mp4-tools.ts"),y=L("./src/utils/logger.ts"),B;try{B=self.performance.now.bind(self.performance)}catch(p){y.logger.debug("Unable to use Performance API on this environment"),B=self.Date.now}var u=[{demux:C.default,remux:i.default},{demux:c.default,remux:h.default},{demux:_.default,remux:i.default},{demux:x.default,remux:i.default}],s=1024;u.forEach(function(p){var a=p.demux;s=Math.max(s,a.minProbeByteLength)});var l=function(){function p(r,n,o,S,b){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 O.default,this.observer=r,this.typeSupported=n,this.config=o,this.vendor=S,this.id=b}var a=p.prototype;return a.configure=function(n){this.transmuxConfig=n,this.decrypter&&this.decrypter.reset()},a.push=function(n,o,S,b){var g=this,U=S.transmuxing;U.executeStart=B();var K=new Uint8Array(n),W=this.cache,q=this.config,Y=this.currentTransmuxState,V=this.transmuxConfig;b&&(this.currentTransmuxState=b);var te=f(K,o);if(te&&te.method==="AES-128"){var X=this.getDecrypter();if(q.enableSoftwareAES){var se=X.softwareDecrypt(K,te.key.buffer,te.iv.buffer);if(!se)return U.executeEnd=B(),m(S);K=new Uint8Array(se)}else return this.decryptionPromise=X.webCryptoDecrypt(K,te.key.buffer,te.iv.buffer).then(function(re){var ae=g.push(re,null,S);return g.decryptionPromise=null,ae}),this.decryptionPromise}var le=b||Y,Te=le.contiguous,Ee=le.discontinuity,Be=le.trackSwitch,De=le.accurateTimeOffset,Ve=le.timeOffset,_e=V.audioCodec,Le=V.videoCodec,tt=V.defaultInitPts,Et=V.duration,Oe=V.initSegmentData;if((Ee||Be)&&this.resetInitSegment(Oe,_e,Le,Et),Ee&&this.resetInitialTimestamp(tt),Te||this.resetContiguity(),this.needsProbing(K,Ee,Be)){if(W.dataLength){var He=W.flush();K=Object(T.appendUint8Array)(He,K)}this.configureTransmuxer(K,V)}var it=this.transmux(K,te,Ve,De,S),Ae=this.currentTransmuxState;return Ae.contiguous=!0,Ae.discontinuity=!1,Ae.trackSwitch=!1,U.executeEnd=B(),it},a.flush=function(n){var o=this,S=n.transmuxing;S.executeStart=B();var b=this.decrypter,g=this.cache,U=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return o.flush(n)});var W=[],q=U.timeOffset;if(b){var Y=b.flush();Y&&W.push(this.push(Y,null,n))}var V=g.dataLength;g.reset();var te=this.demuxer,X=this.remuxer;if(!te||!X)return V>=s&&this.observer.emit(Q.Events.ERROR,Q.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),S.executeEnd=B(),[m(n)];var se=te.flush(q);return E(se)?se.then(function(le){return o.flushRemux(W,le,n),W}):(this.flushRemux(W,se,n),W)},a.flushRemux=function(n,o,S){var b=o.audioTrack,g=o.avcTrack,U=o.id3Track,K=o.textTrack,W=this.currentTransmuxState,q=W.accurateTimeOffset,Y=W.timeOffset;y.logger.log("[transmuxer.ts]: Flushed fragment "+S.sn+(S.part>-1?" p: "+S.part:"")+" of level "+S.level);var V=this.remuxer.remux(b,g,U,K,Y,q,!0,this.id);n.push({remuxResult:V,chunkMeta:S}),S.transmuxing.executeEnd=B()},a.resetInitialTimestamp=function(n){var o=this.demuxer,S=this.remuxer;if(!o||!S)return;o.resetTimeStamp(n),S.resetTimeStamp(n)},a.resetContiguity=function(){var n=this.demuxer,o=this.remuxer;if(!n||!o)return;n.resetContiguity(),o.resetNextTimestamp()},a.resetInitSegment=function(n,o,S,b){var g=this.demuxer,U=this.remuxer;if(!g||!U)return;g.resetInitSegment(o,S,b),U.resetInitSegment(n,o,S)},a.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},a.transmux=function(n,o,S,b,g){var U;return o&&o.method==="SAMPLE-AES"?U=this.transmuxSampleAes(n,o,S,b,g):U=this.transmuxUnencrypted(n,S,b,g),U},a.transmuxUnencrypted=function(n,o,S,b){var g=this.demuxer.demux(n,o,!1,!this.config.progressive),U=g.audioTrack,K=g.avcTrack,W=g.id3Track,q=g.textTrack,Y=this.remuxer.remux(U,K,W,q,o,S,!1,this.id);return{remuxResult:Y,chunkMeta:b}},a.transmuxSampleAes=function(n,o,S,b,g){var U=this;return this.demuxer.demuxSampleAes(n,o,S).then(function(K){var W=U.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,S,b,!1,U.id);return{remuxResult:W,chunkMeta:g}})},a.configureTransmuxer=function(n,o){for(var S=this.config,b=this.observer,g=this.typeSupported,U=this.vendor,K=o.audioCodec,W=o.defaultInitPts,q=o.duration,Y=o.initSegmentData,V=o.videoCodec,te,X=0,se=u.length;X<se;X++)if(u[X].demux.probe(n)){te=u[X];break}te||(y.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),te={demux:c.default,remux:h.default});var le=this.demuxer,Te=this.remuxer,Ee=te.remux,Be=te.demux;(!Te||!(Te instanceof Ee))&&(this.remuxer=new Ee(b,S,g,U)),(!le||!(le instanceof Be))&&(this.demuxer=new Be(b,S,g),this.probe=Be.probe),this.resetInitSegment(Y,K,V,q),this.resetInitialTimestamp(W)},a.needsProbing=function(n,o,S){return!this.demuxer||!this.remuxer||o||S},a.getDecrypter=function(){var n=this.decrypter;return n||(n=this.decrypter=new w.default(this.observer,this.config)),n},p}();function f(p,a){var r=null;return p.byteLength>0&&a!=null&&a.key!=null&&a.iv!==null&&a.method!=null&&(r=a),r}var m=function(a){return{remuxResult:{},chunkMeta:a}};function E(p){return"then"in p&&p.then instanceof Function}var v=function(a,r,n,o,S){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=a,this.videoCodec=r,this.initSegmentData=n,this.duration=o,this.defaultInitPts=S},R=function(a,r,n,o,S){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=a,this.contiguous=r,this.accurateTimeOffset=n,this.trackSwitch=o,this.timeOffset=S}},"./src/demux/tsdemuxer.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"discardEPB",function(){return m});var Q=L("./src/demux/adts.ts"),D=L("./src/demux/mpegaudio.ts"),w=L("./src/demux/exp-golomb.ts"),_=L("./src/demux/id3.ts"),c=L("./src/demux/sample-aes.ts"),C=L("./src/events.ts"),x=L("./src/utils/mp4-tools.ts"),i=L("./src/utils/logger.ts"),h=L("./src/errors.ts"),O={video:1,audio:2,id3:3,text:4},T=function(){function E(R,p,a){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=p,this.typeSupported=a}E.probe=function(p){var a=E.syncOffset(p);return a<0?!1:(a&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+a+", junk ahead ?"),!0)},E.syncOffset=function(p){for(var a=Math.min(1e3,p.length-3*188),r=0;r<a;){if(p[r]===71&&p[r+188]===71&&p[r+2*188]===71)return r;r++}return-1},E.createTrack=function(p,a){return{container:p==="video"||p==="audio"?"video/mp2t":void 0,type:p,id:O[p],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:p==="audio"?a:void 0}};var v=E.prototype;return v.resetInitSegment=function(p,a,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=E.createTrack("video",r),this._audioTrack=E.createTrack("audio",r),this._id3Track=E.createTrack("id3",r),this._txtTrack=E.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=p,this.videoCodec=a,this._duration=r},v.resetTimeStamp=function(){},v.resetContiguity=function(){var p=this._audioTrack,a=this._avcTrack,r=this._id3Track;p&&(p.pesData=null),a&&(a.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},v.demux=function(p,a,r,n){r===void 0&&(r=!1),n===void 0&&(n=!1),r||(this.sampleAes=null);var o,S=this._avcTrack,b=this._audioTrack,g=this._id3Track,U=S.pid,K=S.pesData,W=b.pid,q=g.pid,Y=b.pesData,V=g.pesData,te=!1,X=this.pmtParsed,se=this._pmtId,le=p.length;if(this.remainderData&&(p=Object(x.appendUint8Array)(this.remainderData,p),le=p.length,this.remainderData=null),le<188&&!n)return this.remainderData=p,{audioTrack:b,avcTrack:S,id3Track:g,textTrack:this._txtTrack};var Te=Math.max(0,E.syncOffset(p));le-=(le+Te)%188,le<p.byteLength&&!n&&(this.remainderData=new Uint8Array(p.buffer,le,p.buffer.byteLength-le));for(var Ee=Te;Ee<le;Ee+=188)if(p[Ee]===71){var Be=!!(p[Ee+1]&64),De=((p[Ee+1]&31)<<8)+p[Ee+2],Ve=(p[Ee+3]&48)>>4,_e=void 0;if(Ve>1){if(_e=Ee+5+p[Ee+4],_e===Ee+188)continue}else _e=Ee+4;switch(De){case U:Be&&(K&&(o=s(K))&&this.parseAVCPES(o,!1),K={data:[],size:0}),K&&(K.data.push(p.subarray(_e,Ee+188)),K.size+=Ee+188-_e);break;case W:Be&&(Y&&(o=s(Y))&&(b.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),Y={data:[],size:0}),Y&&(Y.data.push(p.subarray(_e,Ee+188)),Y.size+=Ee+188-_e);break;case q:Be&&(V&&(o=s(V))&&this.parseID3PES(o),V={data:[],size:0}),V&&(V.data.push(p.subarray(_e,Ee+188)),V.size+=Ee+188-_e);break;case 0:Be&&(_e+=p[_e]+1),se=this._pmtId=B(p,_e);break;case se:{Be&&(_e+=p[_e]+1);var Le=u(p,_e,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,r);U=Le.avc,U>0&&(S.pid=U),W=Le.audio,W>0&&(b.pid=W,b.isAAC=Le.isAAC),q=Le.id3,q>0&&(g.pid=q),te&&!X&&(i.logger.log("reparse from beginning"),te=!1,Ee=Te-188),X=this.pmtParsed=!0;break}case 17:case 8191:break;default:te=!0;break}}else this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});S.pesData=K,b.pesData=Y,g.pesData=V;var tt={audioTrack:b,avcTrack:S,id3Track:g,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(tt),tt},v.flush=function(){var p=this.remainderData;this.remainderData=null;var a;return p?a=this.demux(p,-1,!1,!0):a={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(a),this.sampleAes?this.decrypt(a,this.sampleAes):a},v.extractRemainingSamples=function(p){var a=p.audioTrack,r=p.avcTrack,n=p.id3Track,o=r.pesData,S=a.pesData,b=n.pesData,g;o&&(g=s(o))?(this.parseAVCPES(g,!0),r.pesData=null):r.pesData=o,S&&(g=s(S))?(a.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),a.pesData=null):(S!=null&&S.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),a.pesData=S),b&&(g=s(b))?(this.parseID3PES(g),n.pesData=null):n.pesData=b},v.demuxSampleAes=function(p,a,r){var n=this.demux(p,r,!0,!this.config.progressive),o=this.sampleAes=new c.default(this.observer,this.config,a);return this.decrypt(n,o)},v.decrypt=function(p,a){return new Promise(function(r){var n=p.audioTrack,o=p.avcTrack;n.samples&&n.isAAC?a.decryptAacSamples(n.samples,0,function(){o.samples?a.decryptAvcSamples(o.samples,0,0,function(){r(p)}):r(p)}):o.samples&&a.decryptAvcSamples(o.samples,0,0,function(){r(p)})})},v.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},v.parseAVCPES=function(p,a){var r=this,n=this._avcTrack,o=this.parseAVCNALu(p.data),S=!1,b=this.avcSample,g,U=!1;p.data=null,b&&o.length&&!n.audFound&&(l(b,n),b=this.avcSample=y(!1,p.pts,p.dts,"")),o.forEach(function(K){switch(K.type){case 1:{g=!0,b||(b=r.avcSample=y(!0,p.pts,p.dts,"")),S&&(b.debug+="NDR "),b.frame=!0;var W=K.data;if(U&&W.length>4){var q=new w.default(W).readSliceType();(q===2||q===4||q===7||q===9)&&(b.key=!0)}break}case 5:g=!0,b||(b=r.avcSample=y(!0,p.pts,p.dts,"")),S&&(b.debug+="IDR "),b.key=!0,b.frame=!0;break;case 6:{g=!0,S&&b&&(b.debug+="SEI ");var Y=new w.default(m(K.data));Y.readUByte();for(var V=0,te=0,X=!1,se=0;!X&&Y.bytesAvailable>1;){V=0;do se=Y.readUByte(),V+=se;while(se===255);te=0;do se=Y.readUByte(),te+=se;while(se===255);if(V===4&&Y.bytesAvailable!==0){X=!0;var le=Y.readUByte();if(le===181){var Te=Y.readUShort();if(Te===49){var Ee=Y.readUInt();if(Ee===1195456820){var Be=Y.readUByte();if(Be===3){for(var De=Y.readUByte(),Ve=Y.readUByte(),_e=31&De,Le=[De,Ve],tt=0;tt<_e;tt++)Le.push(Y.readUByte()),Le.push(Y.readUByte()),Le.push(Y.readUByte());f(r._txtTrack.samples,{type:3,pts:p.pts,bytes:Le})}}}}}else if(V===5&&Y.bytesAvailable!==0){if(X=!0,te>16){for(var Et=[],Oe=0;Oe<16;Oe++)Et.push(Y.readUByte().toString(16)),(Oe===3||Oe===5||Oe===7||Oe===9)&&Et.push("-");for(var He=te-16,it=new Uint8Array(He),Ae=0;Ae<He;Ae++)it[Ae]=Y.readUByte();f(r._txtTrack.samples,{pts:p.pts,payloadType:V,uuid:Et.join(""),userData:Object(_.utf8ArrayToStr)(it),userDataBytes:it})}}else if(te<Y.bytesAvailable)for(var re=0;re<te;re++)Y.readUByte()}break}case 7:if(g=!0,U=!0,S&&b&&(b.debug+="SPS "),!n.sps){var ae=new w.default(K.data),ce=ae.readSPS();n.width=ce.width,n.height=ce.height,n.pixelRatio=ce.pixelRatio,n.sps=[K.data],n.duration=r._duration;for(var we=K.data.subarray(1,4),Re="avc1.",ke=0;ke<3;ke++){var ht=we[ke].toString(16);ht.length<2&&(ht="0"+ht),Re+=ht}n.codec=Re}break;case 8:g=!0,S&&b&&(b.debug+="PPS "),n.pps||(n.pps=[K.data]);break;case 9:g=!1,n.audFound=!0,b&&l(b,n),b=r.avcSample=y(!1,p.pts,p.dts,S?"AUD ":"");break;case 12:g=!1;break;default:g=!1,b&&(b.debug+="unknown NAL "+K.type+" ");break}if(b&&g){var ft=b.units;ft.push(K)}}),a&&b&&(l(b,n),this.avcSample=null)},v.getLastNalUnit=function(){var p,a=this.avcSample,r;if(!a||a.units.length===0){var n=this._avcTrack.samples;a=n[n.length-1]}if((p=a)!==null&&p!==void 0&&p.units){var o=a.units;r=o[o.length-1]}return r},v.parseAVCNALu=function(p){var a=p.byteLength,r=this._avcTrack,n=r.naluState||0,o=n,S=[],b=0,g,U,K,W=-1,q=0;for(n===-1&&(W=0,q=p[0]&31,n=0,b=1);b<a;){if(g=p[b++],!n){n=g?0:1;continue}if(n===1){n=g?0:2;continue}if(!g)n=3;else if(g===1){if(W>=0){var Y={data:p.subarray(W,b-n-1),type:q};S.push(Y)}else{var V=this.getLastNalUnit();if(V&&(o&&b<=4-o&&(V.state&&(V.data=V.data.subarray(0,V.data.byteLength-o))),U=b-n-1,U>0)){var te=new Uint8Array(V.data.byteLength+U);te.set(V.data,0),te.set(p.subarray(0,U),V.data.byteLength),V.data=te,V.state=0}}b<a?(K=p[b]&31,W=b,q=K,n=0):n=-1}else n=0}if(W>=0&&n>=0){var X={data:p.subarray(W,a),type:q,state:n};S.push(X)}if(S.length===0){var se=this.getLastNalUnit();if(se){var le=new Uint8Array(se.data.byteLength+p.byteLength);le.set(se.data,0),le.set(p,se.data.byteLength),se.data=le}}return r.naluState=n,S},v.parseAACPES=function(p){var a=0,r=this._audioTrack,n=this.aacOverFlow,o=p.data;if(n){this.aacOverFlow=null;var S=n.sample.unit.byteLength,b=Math.min(n.missing,S),g=S-b;n.sample.unit.set(o.subarray(0,b),g),r.samples.push(n.sample),a=n.missing}var U,K;for(U=a,K=o.length;U<K-1&&!Q.isHeader(o,U);U++);if(U!==a){var W,q;if(U<K-1?(W="AAC PES did not start with ADTS header,offset:"+U,q=!1):(W="no ADTS header found in AAC PES",q=!0),i.logger.warn("parsing error:"+W),this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:q,reason:W}),q)return}Q.initTrackConfig(r,this.observer,o,U,this.audioCodec);var Y;if(p.pts!==void 0)Y=p.pts;else if(n){var V=Q.getFrameDuration(r.samplerate);Y=n.sample.pts+V}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var te=0;U<K;)if(Q.isHeader(o,U)){if(U+5<K){var X=Q.appendFrame(r,o,U,Y,te);if(X)if(X.missing)this.aacOverFlow=X;else{U+=X.length,te++;continue}}break}else U++},v.parseMPEGPES=function(p){var a=p.data,r=a.length,n=0,o=0,S=p.pts;if(S===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;o<r;)if(D.isHeader(a,o)){var b=D.appendFrame(this._audioTrack,a,o,S,n);if(b)o+=b.length,n++;else break}else o++},v.parseID3PES=function(p){if(p.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(p)},E}();T.minProbeByteLength=188;function y(E,v,R,p){return{key:E,frame:!1,pts:v,dts:R,units:[],debug:p,length:0}}function B(E,v){return(E[v+10]&31)<<8|E[v+11]}function u(E,v,R,p){var a={audio:-1,avc:-1,id3:-1,isAAC:!0},r=(E[v+1]&15)<<8|E[v+2],n=v+3+r-4,o=(E[v+10]&15)<<8|E[v+11];for(v+=12+o;v<n;){var S=(E[v+1]&31)<<8|E[v+2];switch(E[v]){case 207:if(!p){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:a.audio===-1&&(a.audio=S);break;case 21:a.id3===-1&&(a.id3=S);break;case 219:if(!p){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:a.avc===-1&&(a.avc=S);break;case 3:case 4:R?a.audio===-1&&(a.audio=S,a.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}v+=((E[v+3]&15)<<8|E[v+4])+5}return a}function s(E){var v=0,R,p,a,r,n,o=E.data;if(!E||E.size===0)return null;for(;o[0].length<19&&o.length>1;){var S=new Uint8Array(o[0].length+o[1].length);S.set(o[0]),S.set(o[1],o[0].length),o[0]=S,o.splice(1,1)}R=o[0];var b=(R[0]<<16)+(R[1]<<8)+R[2];if(b===1){if(p=(R[4]<<8)+R[5],p&&p>E.size-6)return null;var g=R[7];g&192&&(r=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,g&64?(n=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,r-n>60*9e4&&(i.logger.warn(Math.round((r-n)/9e4)+"s delta between PTS and DTS, align them"),r=n)):n=r),a=R[8];var U=a+9;if(E.size<=U)return null;E.size-=U;for(var K=new Uint8Array(E.size),W=0,q=o.length;W<q;W++){R=o[W];var Y=R.byteLength;if(U)if(U>Y){U-=Y;continue}else R=R.subarray(U),Y-=U,U=0;K.set(R,v),v+=Y}return p&&(p-=a+3),{data:K,pts:r,dts:n,len:p}}return null}function l(E,v){if(E.units.length&&E.frame){if(E.pts===void 0){var R=v.samples,p=R.length;if(p){var a=R[p-1];E.pts=a.pts,E.dts=a.dts}else{v.dropped++;return}}v.samples.push(E)}E.debug.length&&i.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function f(E,v){var R=E.length;if(R>0){if(v.pts>=E[R-1].pts)E.push(v);else for(var p=R-1;p>=0;p--)if(v.pts<E[p].pts){E.splice(p,0,v);break}}else E.push(v)}function m(E){for(var v=E.byteLength,R=[],p=1;p<v-2;)E[p]===0&&E[p+1]===0&&E[p+2]===3?(R.push(p+2),p+=2):p++;if(R.length===0)return E;var a=v-R.length,r=new Uint8Array(a),n=0;for(p=0;p<a;n++,p++)n===R[0]&&(n++,R.shift()),r[p]=E[n];return r}N.default=T},"./src/errors.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"ErrorTypes",function(){return Q}),L.d(N,"ErrorDetails",function(){return D});var Q;(function(w){w.NETWORK_ERROR="networkError",w.MEDIA_ERROR="mediaError",w.KEY_SYSTEM_ERROR="keySystemError",w.MUX_ERROR="muxError",w.OTHER_ERROR="otherError"})(Q||(Q={}));var D;(function(w){w.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",w.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",w.KEY_SYSTEM_NO_SESSION="keySystemNoSession",w.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",w.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",w.MANIFEST_LOAD_ERROR="manifestLoadError",w.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",w.MANIFEST_PARSING_ERROR="manifestParsingError",w.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",w.LEVEL_EMPTY_ERROR="levelEmptyError",w.LEVEL_LOAD_ERROR="levelLoadError",w.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",w.LEVEL_SWITCH_ERROR="levelSwitchError",w.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",w.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",w.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",w.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",w.FRAG_LOAD_ERROR="fragLoadError",w.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",w.FRAG_DECRYPT_ERROR="fragDecryptError",w.FRAG_PARSING_ERROR="fragParsingError",w.REMUX_ALLOC_ERROR="remuxAllocError",w.KEY_LOAD_ERROR="keyLoadError",w.KEY_LOAD_TIMEOUT="keyLoadTimeOut",w.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",w.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",w.BUFFER_APPEND_ERROR="bufferAppendError",w.BUFFER_APPENDING_ERROR="bufferAppendingError",w.BUFFER_STALLED_ERROR="bufferStalledError",w.BUFFER_FULL_ERROR="bufferFullError",w.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",w.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",w.INTERNAL_EXCEPTION="internalException",w.INTERNAL_ABORTED="aborted",w.UNKNOWN="unknown"})(D||(D={}))},"./src/events.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"Events",function(){return Q});var Q;(function(D){D.MEDIA_ATTACHING="hlsMediaAttaching",D.MEDIA_ATTACHED="hlsMediaAttached",D.MEDIA_DETACHING="hlsMediaDetaching",D.MEDIA_DETACHED="hlsMediaDetached",D.BUFFER_RESET="hlsBufferReset",D.BUFFER_CODECS="hlsBufferCodecs",D.BUFFER_CREATED="hlsBufferCreated",D.BUFFER_APPENDING="hlsBufferAppending",D.BUFFER_APPENDED="hlsBufferAppended",D.BUFFER_EOS="hlsBufferEos",D.BUFFER_FLUSHING="hlsBufferFlushing",D.BUFFER_FLUSHED="hlsBufferFlushed",D.MANIFEST_LOADING="hlsManifestLoading",D.MANIFEST_LOADED="hlsManifestLoaded",D.MANIFEST_PARSED="hlsManifestParsed",D.LEVEL_SWITCHING="hlsLevelSwitching",D.LEVEL_SWITCHED="hlsLevelSwitched",D.LEVEL_LOADING="hlsLevelLoading",D.LEVEL_LOADED="hlsLevelLoaded",D.LEVEL_UPDATED="hlsLevelUpdated",D.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",D.LEVELS_UPDATED="hlsLevelsUpdated",D.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",D.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",D.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",D.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",D.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",D.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",D.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",D.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",D.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",D.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",D.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",D.CUES_PARSED="hlsCuesParsed",D.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",D.INIT_PTS_FOUND="hlsInitPtsFound",D.FRAG_LOADING="hlsFragLoading",D.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",D.FRAG_LOADED="hlsFragLoaded",D.FRAG_DECRYPTED="hlsFragDecrypted",D.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",D.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",D.FRAG_PARSING_METADATA="hlsFragParsingMetadata",D.FRAG_PARSED="hlsFragParsed",D.FRAG_BUFFERED="hlsFragBuffered",D.FRAG_CHANGED="hlsFragChanged",D.FPS_DROP="hlsFpsDrop",D.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",D.ERROR="hlsError",D.DESTROYING="hlsDestroying",D.KEY_LOADING="hlsKeyLoading",D.KEY_LOADED="hlsKeyLoaded",D.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",D.BACK_BUFFER_REACHED="hlsBackBufferReached"})(Q||(Q={}))},"./src/hls.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return E});var Q=L("./node_modules/url-toolkit/src/url-toolkit.js"),D=L.n(Q),w=L("./src/loader/playlist-loader.ts"),_=L("./src/loader/key-loader.ts"),c=L("./src/controller/id3-track-controller.ts"),C=L("./src/controller/latency-controller.ts"),x=L("./src/controller/level-controller.ts"),i=L("./src/controller/fragment-tracker.ts"),h=L("./src/controller/stream-controller.ts"),O=L("./src/is-supported.ts"),T=L("./src/utils/logger.ts"),y=L("./src/config.ts"),B=L("./node_modules/eventemitter3/index.js"),u=L.n(B),s=L("./src/events.ts"),l=L("./src/errors.ts");function f(v,R){for(var p=0;p<R.length;p++){var a=R[p];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(v,a.key,a)}}function m(v,R,p){return R&&f(v.prototype,R),p&&f(v,p),v}var E=function(){v.isSupported=function(){return Object(O.isSupported)()};function v(p){p===void 0&&(p={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new B.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 a=this.config=Object(y.mergeConfig)(v.DefaultConfig,p);this.userConfig=p,Object(T.enableLogs)(a.debug),this._autoLevelCapping=-1,a.progressive&&Object(y.enableStreamingMode)(a);var r=a.abrController,n=a.bufferController,o=a.capLevelController,S=a.fpsController,b=this.abrController=new r(this),g=this.bufferController=new n(this),U=this.capLevelController=new o(this),K=new S(this),W=new w.default(this),q=new _.default(this),Y=new c.default(this),V=this.levelController=new x.default(this),te=new i.FragmentTracker(this),X=this.streamController=new h.default(this,te);U.setStreamController(X),K.setStreamController(X);var se=[V,X];this.networkControllers=se;var le=[W,q,b,g,U,K,Y,te];this.audioTrackController=this.createController(a.audioTrackController,null,se),this.createController(a.audioStreamController,te,se),this.subtitleTrackController=this.createController(a.subtitleTrackController,null,se),this.createController(a.subtitleStreamController,te,se),this.createController(a.timelineController,null,le),this.emeController=this.createController(a.emeController,null,le),this.cmcdController=this.createController(a.cmcdController,null,le),this.latencyController=this.createController(C.default,null,le),this.coreComponents=le}var R=v.prototype;return R.createController=function(a,r,n){if(a){var o=r?new a(this,r):new a(this);return n&&n.push(o),o}return null},R.on=function(a,r,n){n===void 0&&(n=this),this._emitter.on(a,r,n)},R.once=function(a,r,n){n===void 0&&(n=this),this._emitter.once(a,r,n)},R.removeAllListeners=function(a){this._emitter.removeAllListeners(a)},R.off=function(a,r,n,o){n===void 0&&(n=this),this._emitter.off(a,r,n,o)},R.listeners=function(a){return this._emitter.listeners(a)},R.emit=function(a,r,n){return this._emitter.emit(a,r,n)},R.trigger=function(a,r){if(this.config.debug)return this.emit(a,a,r);try{return this.emit(a,a,r)}catch(n){T.logger.error("An internal error happened while handling event "+a+'. Error message: "'+n.message+'". Here is a stacktrace:',n),this.trigger(s.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:a,error:n})}return!1},R.listenerCount=function(a){return this._emitter.listenerCount(a)},R.destroy=function(){T.logger.log("destroy"),this.trigger(s.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(a){return a.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(a){return a.destroy()}),this.coreComponents.length=0},R.attachMedia=function(a){T.logger.log("attachMedia"),this._media=a,this.trigger(s.Events.MEDIA_ATTACHING,{media:a})},R.detachMedia=function(){T.logger.log("detachMedia"),this.trigger(s.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(a){this.stopLoad();var r=this.media,n=this.url,o=this.url=Q.buildAbsoluteURL(self.location.href,a,{alwaysNormalize:!0});T.logger.log("loadSource:"+o),r&&n&&n!==o&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(r)),this.trigger(s.Events.MANIFEST_LOADING,{url:a})},R.startLoad=function(a){a===void 0&&(a=-1),T.logger.log("startLoad("+a+")"),this.networkControllers.forEach(function(r){r.startLoad(a)})},R.stopLoad=function(){T.logger.log("stopLoad"),this.networkControllers.forEach(function(a){a.stopLoad()})},R.swapAudioCodec=function(){T.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){T.logger.log("recoverMediaError");var a=this._media;this.detachMedia(),a&&this.attachMedia(a)},R.removeLevel=function(a,r){r===void 0&&(r=0),this.levelController.removeLevel(a,r)},m(v,[{key:"levels",get:function(){var a=this.levelController.levels;return a||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(a){T.logger.log("set currentLevel:"+a),this.loadLevel=a,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(a){T.logger.log("set nextLevel:"+a),this.levelController.manualLevel=a,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(a){T.logger.log("set loadLevel:"+a),this.levelController.manualLevel=a}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(a){this.levelController.nextLoadLevel=a}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(a){T.logger.log("set firstLevel:"+a),this.levelController.firstLevel=a}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(a){T.logger.log("set startLevel:"+a),a!==-1&&(a=Math.max(a,this.minAutoLevel)),this.levelController.startLevel=a}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(a){var r=!!a;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(a){this._autoLevelCapping!==a&&(T.logger.log("set autoLevelCapping:"+a),this._autoLevelCapping=a)}},{key:"bandwidthEstimate",get:function(){var a=this.abrController.bwEstimator;return a?a.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var a=this.levels,r=this.config.minAutoBitrate;if(!a)return 0;for(var n=a.length,o=0;o<n;o++)if(a[o].maxBitrate>r)return o;return 0}},{key:"maxAutoLevel",get:function(){var a=this.levels,r=this.autoLevelCapping,n;return r===-1&&a&&a.length?n=a.length-1:n=r,n}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(a){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,a)}},{key:"audioTracks",get:function(){var a=this.audioTrackController;return a?a.audioTracks:[]}},{key:"audioTrack",get:function(){var a=this.audioTrackController;return a?a.audioTrack:-1},set:function(a){var r=this.audioTrackController;r&&(r.audioTrack=a)}},{key:"subtitleTracks",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTrack:-1},set:function(a){var r=this.subtitleTrackController;r&&(r.subtitleTrack=a)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var a=this.subtitleTrackController;return a?a.subtitleDisplay:!1},set:function(a){var r=this.subtitleTrackController;r&&(r.subtitleDisplay=a)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(a){this.config.lowLatencyMode=a}},{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 s.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return v.defaultConfig?v.defaultConfig:y.hlsDefaultConfig},set:function(a){v.defaultConfig=a}}]),v}();E.defaultConfig=void 0},"./src/is-supported.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"isSupported",function(){return w}),L.d(N,"changeTypeSupported",function(){return _});var Q=L("./src/utils/mediasource-helper.ts");function D(){return self.SourceBuffer||self.WebKitSourceBuffer}function w(){var c=Object(Q.getMediaSource)();if(!c)return!1;var C=D(),x=c&&typeof c.isTypeSupported=="function"&&c.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!C||C.prototype&&typeof C.prototype.appendBuffer=="function"&&typeof C.prototype.remove=="function";return!!x&&!!i}function _(){var c,C=D();return typeof(C==null||((c=C.prototype)===null||c===void 0)?void 0:c.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return T}),L.d(N,"LoadError",function(){return B});var Q=L("./src/polyfills/number.ts"),D=L("./src/errors.ts");function w(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,i(u,s)}function _(u){var s=typeof Map=="function"?new Map:void 0;return _=function(f){if(f===null||!x(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s!="undefined"){if(s.has(f))return s.get(f);s.set(f,m)}function m(){return c(f,arguments,h(this).constructor)}return m.prototype=Object.create(f.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),i(m,f)},_(u)}function c(u,s,l){return C()?c=Reflect.construct:c=function(m,E,v){var R=[null];R.push.apply(R,E);var p=Function.bind.apply(m,R),a=new p;return v&&i(a,v.prototype),a},c.apply(null,arguments)}function C(){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(u){return!1}}function x(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function i(u,s){return i=Object.setPrototypeOf||function(f,m){return f.__proto__=m,f},i(u,s)}function h(u){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},h(u)}var O=Math.pow(2,17),T=function(){function u(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var s=u.prototype;return s.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},s.abort=function(){this.loader&&this.loader.abort()},s.load=function(f,m){var E=this,v=f.url;if(!v)return Promise.reject(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(v?"part list":"url")));this.abort();var R=this.config,p=R.fLoader,a=R.loader;return new Promise(function(r,n){E.loader&&E.loader.destroy();var o=E.loader=f.loader=p?new p(R):new a(R),S=y(f),b={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:O};f.stats=o.stats,o.load(S,b,{onSuccess:function(U,K,W,q){E.resetLoader(f,o),r({frag:f,part:null,payload:U.data,networkDetails:q})},onError:function(U,K,W){E.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:U,networkDetails:W}))},onAbort:function(U,K,W){E.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:W}))},onTimeout:function(U,K,W){E.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:W}))},onProgress:function(U,K,W,q){m&&m({frag:f,part:null,payload:W,networkDetails:q})}})})},s.loadPart=function(f,m,E){var v=this;this.abort();var R=this.config,p=R.fLoader,a=R.loader;return new Promise(function(r,n){v.loader&&v.loader.destroy();var o=v.loader=f.loader=p?new p(R):new a(R),S=y(f,m),b={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:O};m.stats=o.stats,o.load(S,b,{onSuccess:function(U,K,W,q){v.resetLoader(f,o),v.updateStatsFromPart(f,m);var Y={frag:f,part:m,payload:U.data,networkDetails:q};E(Y),r(Y)},onError:function(U,K,W){v.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:m,response:U,networkDetails:W}))},onAbort:function(U,K,W){f.stats.aborted=m.stats.aborted,v.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:m,networkDetails:W}))},onTimeout:function(U,K,W){v.resetLoader(f,o),n(new B({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:m,networkDetails:W}))}})})},s.updateStatsFromPart=function(f,m){var E=f.stats,v=m.stats,R=v.total;if(E.loaded+=v.loaded,R){var p=Math.round(f.duration/m.duration),a=Math.min(Math.round(E.loaded/R),p),r=p-a,n=r*Math.round(E.loaded/a);E.total=E.loaded+n}else E.total=Math.max(E.loaded,E.total);var o=E.loading,S=v.loading;o.start?o.first+=S.first-S.start:(o.start=S.start,o.first=S.first),o.end=S.end},s.resetLoader=function(f,m){f.loader=null,this.loader===m&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),m.destroy()},u}();function y(u,s){s===void 0&&(s=null);var l=s||u,f={frag:u,part:s,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},m=l.byteRangeStartOffset,E=l.byteRangeEndOffset;return Object(Q.isFiniteNumber)(m)&&Object(Q.isFiniteNumber)(E)&&(f.rangeStart=m,f.rangeEnd=E),f}var B=function(u){w(s,u);function s(l){for(var f,m=arguments.length,E=new Array(m>1?m-1:0),v=1;v<m;v++)E[v-1]=arguments[v];return f=u.call.apply(u,[this].concat(E))||this,f.data=void 0,f.data=l,f}return s}(_(Error))},"./src/loader/fragment.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"ElementaryStreamTypes",function(){return T}),L.d(N,"BaseSegment",function(){return y}),L.d(N,"Fragment",function(){return B}),L.d(N,"Part",function(){return u});var Q=L("./src/polyfills/number.ts"),D=L("./node_modules/url-toolkit/src/url-toolkit.js"),w=L.n(D),_=L("./src/utils/logger.ts"),c=L("./src/loader/level-key.ts"),C=L("./src/loader/load-stats.ts");function x(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,i(s,l)}function i(s,l){return i=Object.setPrototypeOf||function(m,E){return m.__proto__=E,m},i(s,l)}function h(s,l){for(var f=0;f<l.length;f++){var m=l[f];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(s,m.key,m)}}function O(s,l,f){return l&&h(s.prototype,l),f&&h(s,f),s}var T;(function(s){s.AUDIO="audio",s.VIDEO="video",s.AUDIOVIDEO="audiovideo"})(T||(T={}));var y=function(){function s(f){var m;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(m={},m[T.AUDIO]=null,m[T.VIDEO]=null,m[T.AUDIOVIDEO]=null,m),this.baseurl=f}var l=s.prototype;return l.setByteRange=function(m,E){var v=m.split("@",2),R=[];v.length===1?R[0]=E?E.byteRangeEndOffset:0:R[0]=parseInt(v[1]),R[1]=parseInt(v[0])+R[0],this._byteRange=R},O(s,[{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(D.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(m){this._url=m}}]),s}(),B=function(s){x(l,s);function l(m,E){var v;return v=s.call(this,E)||this,v._decryptdata=null,v.rawProgramDateTime=null,v.programDateTime=null,v.tagList=[],v.duration=0,v.sn=0,v.levelkey=void 0,v.type=void 0,v.loader=null,v.level=-1,v.cc=0,v.startPTS=void 0,v.endPTS=void 0,v.appendedPTS=void 0,v.startDTS=void 0,v.endDTS=void 0,v.start=0,v.deltaPTS=void 0,v.maxStartPTS=void 0,v.minEndPTS=void 0,v.stats=new C.LoadStats,v.urlId=0,v.data=void 0,v.bitrateTest=!1,v.title=null,v.initSegment=null,v.type=m,v}var f=l.prototype;return f.createInitializationVector=function(E){for(var v=new Uint8Array(16),R=12;R<16;R++)v[R]=E>>8*(15-R)&255;return v},f.setDecryptDataFromLevelKey=function(E,v){var R=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(R=c.LevelKey.fromURI(E.uri),R.method=E.method,R.iv=this.createInitializationVector(v),R.keyFormat="identity"),R},f.setElementaryStreamInfo=function(E,v,R,p,a,r){r===void 0&&(r=!1);var n=this.elementaryStreams,o=n[E];if(!o){n[E]={startPTS:v,endPTS:R,startDTS:p,endDTS:a,partial:r};return}o.startPTS=Math.min(o.startPTS,v),o.endPTS=Math.max(o.endPTS,R),o.startDTS=Math.min(o.startDTS,p),o.endDTS=Math.max(o.endDTS,a)},f.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[T.AUDIO]=null,E[T.VIDEO]=null,E[T.AUDIOVIDEO]=null},O(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&_.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(Q.isFiniteNumber)(this.programDateTime))return null;var E=Object(Q.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),l}(y),u=function(s){x(l,s);function l(f,m,E,v,R){var p;p=s.call(this,E)||this,p.fragOffset=0,p.duration=0,p.gap=!1,p.independent=!1,p.relurl=void 0,p.fragment=void 0,p.index=void 0,p.stats=new C.LoadStats,p.duration=f.decimalFloatingPoint("DURATION"),p.gap=f.bool("GAP"),p.independent=f.bool("INDEPENDENT"),p.relurl=f.enumeratedString("URI"),p.fragment=m,p.index=v;var a=f.enumeratedString("BYTERANGE");return a&&p.setByteRange(a,R),R&&(p.fragOffset=R.fragOffset+R.duration),p}return O(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var m=this.elementaryStreams;return!!(m.audio||m.video||m.audiovideo)}}]),l}(y)},"./src/loader/key-loader.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return _});var Q=L("./src/events.ts"),D=L("./src/errors.ts"),w=L("./src/utils/logger.ts"),_=function(){function c(x){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=x,this._registerListeners()}var C=c.prototype;return C._registerListeners=function(){this.hls.on(Q.Events.KEY_LOADING,this.onKeyLoading,this)},C._unregisterListeners=function(){this.hls.off(Q.Events.KEY_LOADING,this.onKeyLoading)},C.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var h=this.loaders[i];h&&h.destroy()}this.loaders={}},C.onKeyLoading=function(i,h){var O=h.frag,T=O.type,y=this.loaders[T];if(!O.decryptdata){w.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var B=O.decryptdata.uri;if(B!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(y&&(w.logger.warn("abort previous key loader for type:"+T),y.abort()),!B){w.logger.warn("key uri is falsy");return}var s=u.loader,l=O.loader=this.loaders[T]=new s(u);this.decrypturl=B,this.decryptkey=null;var f={url:B,frag:O,responseType:"arraybuffer"},m={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(f,m,E)}else this.decryptkey&&(O.decryptdata.key=this.decryptkey,this.hls.trigger(Q.Events.KEY_LOADED,{frag:O}))},C.loadsuccess=function(i,h,O){var T=O.frag;if(!T.decryptdata){w.logger.error("after key load, decryptdata unset");return}this.decryptkey=T.decryptdata.key=new Uint8Array(i.data),T.loader=null,delete this.loaders[T.type],this.hls.trigger(Q.Events.KEY_LOADED,{frag:T})},C.loaderror=function(i,h){var O=h.frag,T=O.loader;T&&T.abort(),delete this.loaders[O.type],this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:O,response:i})},C.loadtimeout=function(i,h){var O=h.frag,T=O.loader;T&&T.abort(),delete this.loaders[O.type],this.hls.trigger(Q.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:O})},c}()},"./src/loader/level-details.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"LevelDetails",function(){return c});var Q=L("./src/polyfills/number.ts");function D(C,x){for(var i=0;i<x.length;i++){var h=x[i];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(C,h.key,h)}}function w(C,x,i){return x&&D(C.prototype,x),i&&D(C,i),C}var _=10,c=function(){function C(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 x=C.prototype;return x.reloaded=function(h){if(!h){this.advanced=!0,this.updated=!0;return}var O=this.lastPartSn-h.lastPartSn,T=this.lastPartIndex-h.lastPartIndex;this.updated=this.endSN!==h.endSN||!!T||!!O,this.advanced=this.endSN>h.endSN||O>0||O===0&&T>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},w(C,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(Q.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||_}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var O=this.driftEnd-this.driftStart;return O*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),C}()},"./src/loader/level-key.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"LevelKey",function(){return c});var Q=L("./node_modules/url-toolkit/src/url-toolkit.js"),D=L.n(Q);function w(C,x){for(var i=0;i<x.length;i++){var h=x[i];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(C,h.key,h)}}function _(C,x,i){return x&&w(C.prototype,x),i&&w(C,i),C}var c=function(){C.fromURL=function(i,h){return new C(i,h)},C.fromURI=function(i){return new C(i)};function C(x,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(Q.buildAbsoluteURL)(x,i,{alwaysNormalize:!0}):this._uri=x}return _(C,[{key:"uri",get:function(){return this._uri}}]),C}()},"./src/loader/load-stats.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"LoadStats",function(){return Q});var Q=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(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return l});var Q=L("./src/polyfills/number.ts"),D=L("./node_modules/url-toolkit/src/url-toolkit.js"),w=L.n(D),_=L("./src/loader/fragment.ts"),c=L("./src/loader/level-details.ts"),C=L("./src/loader/level-key.ts"),x=L("./src/utils/attr-list.ts"),i=L("./src/utils/logger.ts"),h=L("./src/utils/codecs.ts"),O=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,T=/#EXT-X-MEDIA:(.*)/g,y=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),B=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("|")),u=/\.(mp4|m4s|m4v|m4a)$/i;function s(R){var p,a;return u.test((p=(a=D.parseURL(R))===null||a===void 0?void 0:a.path)!=null?p:"")}var l=function(){function R(){}return R.findGroup=function(a,r){for(var n=0;n<a.length;n++){var o=a[n];if(o.id===r)return o}},R.convertAVC1ToAVCOTI=function(a){var r=a.split(".");if(r.length>2){var n=r.shift()+".";return n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).substr(-4),n}return a},R.resolve=function(a,r){return D.buildAbsoluteURL(r,a,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(a,r){var n=[],o={},S=!1;O.lastIndex=0;for(var b;(b=O.exec(a))!=null;)if(b[1]){var g=new x.AttrList(b[1]),U={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:R.resolve(b[2],r)},K=g.decimalResolution("RESOLUTION");K&&(U.width=K.width,U.height=K.height),f((g.CODECS||"").split(/[ ,]+/).filter(function(q){return q}),U),U.videoCodec&&U.videoCodec.indexOf("avc1")!==-1&&(U.videoCodec=R.convertAVC1ToAVCOTI(U.videoCodec)),n.push(U)}else if(b[3]){var W=new x.AttrList(b[3]);W["DATA-ID"]&&(S=!0,o[W["DATA-ID"]]=W)}return{levels:n,sessionData:S?o:null}},R.parseMasterPlaylistMedia=function(a,r,n,o){o===void 0&&(o=[]);var S,b=[],g=0;for(T.lastIndex=0;(S=T.exec(a))!==null;){var U=new x.AttrList(S[1]);if(U.TYPE===n){var K={attrs:U,bitrate:0,id:g++,groupId:U["GROUP-ID"],instreamId:U["INSTREAM-ID"],name:U.NAME||U.LANGUAGE||"",type:n,default:U.bool("DEFAULT"),autoselect:U.bool("AUTOSELECT"),forced:U.bool("FORCED"),lang:U.LANGUAGE,url:U.URI?R.resolve(U.URI,r):""};if(o.length){var W=R.findGroup(o,K.groupId)||o[0];m(K,W,"audioCodec"),m(K,W,"textCodec")}b.push(K)}}return b},R.parseLevelPlaylist=function(a,r,n,o,S){var b=new c.LevelDetails(r),g=b.fragments,U=null,K=0,W=0,q=0,Y=0,V=null,te=new _.Fragment(o,r),X,se,le,Te=-1,Ee=!1;for(y.lastIndex=0,b.m3u8=a;(X=y.exec(a))!==null;){Ee&&(Ee=!1,te=new _.Fragment(o,r),te.start=q,te.sn=K,te.cc=Y,te.level=n,U&&(te.initSegment=U,te.rawProgramDateTime=U.rawProgramDateTime));var Be=X[1];if(Be){te.duration=parseFloat(Be);var De=(" "+X[2]).slice(1);te.title=De||null,te.tagList.push(De?["INF",Be,De]:["INF",Be])}else if(X[3])Object(Q.isFiniteNumber)(te.duration)&&(te.start=q,le&&(te.levelkey=le),te.sn=K,te.level=n,te.cc=Y,te.urlId=S,g.push(te),te.relurl=(" "+X[3]).slice(1),v(te,V),V=te,q+=te.duration,K++,W=0,Ee=!0);else if(X[4]){var Ve=(" "+X[4]).slice(1);V?te.setByteRange(Ve,V):te.setByteRange(Ve)}else if(X[5])te.rawProgramDateTime=(" "+X[5]).slice(1),te.tagList.push(["PROGRAM-DATE-TIME",te.rawProgramDateTime]),Te===-1&&(Te=g.length);else{if(X=X[0].match(B),!X){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(se=1;se<X.length&&!(typeof X[se]!="undefined");se++);var _e=(" "+X[se]).slice(1),Le=(" "+X[se+1]).slice(1),tt=X[se+2]?(" "+X[se+2]).slice(1):"";switch(_e){case"PLAYLIST-TYPE":b.type=Le.toUpperCase();break;case"MEDIA-SEQUENCE":K=b.startSN=parseInt(Le);break;case"SKIP":{var Et=new x.AttrList(Le),Oe=Et.decimalInteger("SKIPPED-SEGMENTS");if(Object(Q.isFiniteNumber)(Oe)){b.skippedSegments=Oe;for(var He=Oe;He--;)g.unshift(null);K+=Oe}var it=Et.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(b.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":b.targetduration=parseFloat(Le);break;case"VERSION":b.version=parseInt(Le);break;case"EXTM3U":break;case"ENDLIST":b.live=!1;break;case"#":(Le||tt)&&te.tagList.push(tt?[Le,tt]:[Le]);break;case"DIS":Y++;case"GAP":te.tagList.push([_e]);break;case"BITRATE":te.tagList.push([_e,Le]);break;case"DISCONTINUITY-SEQ":Y=parseInt(Le);break;case"KEY":{var Ae,re=new x.AttrList(Le),ae=re.enumeratedString("METHOD"),ce=re.URI,we=re.hexadecimalInteger("IV"),Re=re.enumeratedString("KEYFORMATVERSIONS"),ke=re.enumeratedString("KEYID"),ht=(Ae=re.enumeratedString("KEYFORMAT"))!=null?Ae:"identity",ft=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ft.indexOf(ht)>-1){i.logger.warn("Keyformat "+ht+" is not supported from the manifest");continue}else if(ht!=="identity")continue;ae&&(le=C.LevelKey.fromURL(r,ce),ce&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ae)>=0&&(le.method=ae,le.keyFormat=ht,ke&&(le.keyID=ke),Re&&(le.keyFormatVersions=Re),le.iv=we));break}case"START":{var vt=new x.AttrList(Le),yt=vt.decimalFloatingPoint("TIME-OFFSET");Object(Q.isFiniteNumber)(yt)&&(b.startTimeOffset=yt);break}case"MAP":{var Lt=new x.AttrList(Le);te.relurl=Lt.URI,Lt.BYTERANGE&&te.setByteRange(Lt.BYTERANGE),te.level=n,te.sn="initSegment",le&&(te.levelkey=le),te.initSegment=null,U=te,Ee=!0;break}case"SERVER-CONTROL":{var Mt=new x.AttrList(Le);b.canBlockReload=Mt.bool("CAN-BLOCK-RELOAD"),b.canSkipUntil=Mt.optionalFloat("CAN-SKIP-UNTIL",0),b.canSkipDateRanges=b.canSkipUntil>0&&Mt.bool("CAN-SKIP-DATERANGES"),b.partHoldBack=Mt.optionalFloat("PART-HOLD-BACK",0),b.holdBack=Mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Qe=new x.AttrList(Le);b.partTarget=Qe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=b.partList;Pe||(Pe=b.partList=[]);var lt=W>0?Pe[Pe.length-1]:void 0,pt=W++,Ze=new _.Part(new x.AttrList(Le),te,r,pt,lt);Pe.push(Ze),te.duration+=Ze.duration;break}case"PRELOAD-HINT":{var st=new x.AttrList(Le);b.preloadHint=st;break}case"RENDITION-REPORT":{var Ke=new x.AttrList(Le);b.renditionReports=b.renditionReports||[],b.renditionReports.push(Ke);break}default:i.logger.warn("line parsed but not handled: "+X);break}}}V&&!V.relurl?(g.pop(),q-=V.duration,b.partList&&(b.fragmentHint=V)):b.partList&&(v(te,V),te.cc=Y,b.fragmentHint=te);var Ie=g.length,Me=g[0],pe=g[Ie-1];if(q+=b.skippedSegments*b.targetduration,q>0&&Ie&&pe){b.averagetargetduration=q/Ie;var be=pe.sn;b.endSN=be!=="initSegment"?be:0,Me&&(b.startCC=Me.cc,Me.initSegment||b.fragments.every(function(ge){return ge.relurl&&s(ge.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),te=new _.Fragment(o,r),te.relurl=pe.relurl,te.level=n,te.sn="initSegment",Me.initSegment=te,b.needSidxRanges=!0))}else b.endSN=0,b.startCC=0;return b.fragmentHint&&(q+=b.fragmentHint.duration),b.totalduration=q,b.endCC=Y,Te>0&&E(g,Te),b},R}();function f(R,p){["video","audio","text"].forEach(function(a){var r=R.filter(function(o){return Object(h.isCodecType)(o,a)});if(r.length){var n=r.filter(function(o){return o.lastIndexOf("avc1",0)===0||o.lastIndexOf("mp4a",0)===0});p[a+"Codec"]=n.length>0?n[0]:r[0],R=R.filter(function(o){return r.indexOf(o)===-1})}}),p.unknownCodecs=R}function m(R,p,a){var r=p[a];r&&(R[a]=r)}function E(R,p){for(var a=R[p],r=p;r--;){var n=R[r];if(!n)return;n.programDateTime=a.programDateTime-n.duration*1e3,a=n}}function v(R,p){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):p!=null&&p.programDateTime&&(R.programDateTime=p.endProgramDateTime),Object(Q.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/polyfills/number.ts"),D=L("./src/events.ts"),w=L("./src/errors.ts"),_=L("./src/utils/logger.ts"),c=L("./src/utils/mp4-tools.ts"),C=L("./src/loader/m3u8-parser.ts"),x=L("./src/types/loader.ts"),i=L("./src/utils/attr-list.ts");function h(y){var B=y.type;switch(B){case x.PlaylistContextType.AUDIO_TRACK:return x.PlaylistLevelType.AUDIO;case x.PlaylistContextType.SUBTITLE_TRACK:return x.PlaylistLevelType.SUBTITLE;default:return x.PlaylistLevelType.MAIN}}function O(y,B){var u=y.url;return(u===void 0||u.indexOf("data:")===0)&&(u=B.url),u}var T=function(){function y(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var B=y.prototype;return B.registerListeners=function(){var s=this.hls;s.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.on(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},B.unregisterListeners=function(){var s=this.hls;s.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.off(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},B.createInternalLoader=function(s){var l=this.hls.config,f=l.pLoader,m=l.loader,E=f||m,v=new E(l);return s.loader=v,this.loaders[s.type]=v,v},B.getInternalLoader=function(s){return this.loaders[s.type]},B.resetInternalLoader=function(s){this.loaders[s]&&delete this.loaders[s]},B.destroyInternalLoaders=function(){for(var s in this.loaders){var l=this.loaders[s];l&&l.destroy(),this.resetInternalLoader(s)}},B.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},B.onManifestLoading=function(s,l){var f=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:x.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},B.onLevelLoading=function(s,l){var f=l.id,m=l.level,E=l.url,v=l.deliveryDirectives;this.load({id:f,groupId:null,level:m,responseType:"text",type:x.PlaylistContextType.LEVEL,url:E,deliveryDirectives:v})},B.onAudioTrackLoading=function(s,l){var f=l.id,m=l.groupId,E=l.url,v=l.deliveryDirectives;this.load({id:f,groupId:m,level:null,responseType:"text",type:x.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:v})},B.onSubtitleTrackLoading=function(s,l){var f=l.id,m=l.groupId,E=l.url,v=l.deliveryDirectives;this.load({id:f,groupId:m,level:null,responseType:"text",type:x.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:v})},B.load=function(s){var l,f=this.hls.config,m=this.getInternalLoader(s);if(m){var E=m.context;if(E&&E.url===s.url){_.logger.trace("[playlist-loader]: playlist request ongoing");return}_.logger.log("[playlist-loader]: aborting previous loader for type: "+s.type),m.abort()}var v,R,p,a;switch(s.type){case x.PlaylistContextType.MANIFEST:v=f.manifestLoadingMaxRetry,R=f.manifestLoadingTimeOut,p=f.manifestLoadingRetryDelay,a=f.manifestLoadingMaxRetryTimeout;break;case x.PlaylistContextType.LEVEL:case x.PlaylistContextType.AUDIO_TRACK:case x.PlaylistContextType.SUBTITLE_TRACK:v=0,R=f.levelLoadingTimeOut;break;default:v=f.levelLoadingMaxRetry,R=f.levelLoadingTimeOut,p=f.levelLoadingRetryDelay,a=f.levelLoadingMaxRetryTimeout;break}if(m=this.createInternalLoader(s),(l=s.deliveryDirectives)!==null&&l!==void 0&&l.part){var r;if(s.type===x.PlaylistContextType.LEVEL&&s.level!==null?r=this.hls.levels[s.level].details:s.type===x.PlaylistContextType.AUDIO_TRACK&&s.id!==null?r=this.hls.audioTracks[s.id].details:s.type===x.PlaylistContextType.SUBTITLE_TRACK&&s.id!==null&&(r=this.hls.subtitleTracks[s.id].details),r){var n=r.partTarget,o=r.targetduration;n&&o&&(R=Math.min(Math.max(n*3,o*.8)*1e3,R))}}var S={timeout:R,maxRetry:v,retryDelay:p,maxRetryDelay:a,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};m.load(s,S,b)},B.loadsuccess=function(s,l,f,m){if(m===void 0&&(m=null),f.isSidxRequest){this.handleSidxRequest(s,f),this.handlePlaylistLoaded(s,l,f,m);return}this.resetInternalLoader(f.type);var E=s.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(s,f,"no EXTM3U delimiter",m);return}l.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(s,l,f,m):this.handleMasterPlaylist(s,l,f,m)},B.loaderror=function(s,l,f){f===void 0&&(f=null),this.handleNetworkError(l,f,!1,s)},B.loadtimeout=function(s,l,f){f===void 0&&(f=null),this.handleNetworkError(l,f,!0)},B.handleMasterPlaylist=function(s,l,f,m){var E=this.hls,v=s.data,R=O(s,f),p=C.default.parseMasterPlaylist(v,R),a=p.levels,r=p.sessionData;if(!a.length){this.handleManifestParsingError(s,f,"no level found in manifest",m);return}var n=a.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),o=a.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),S=C.default.parseMasterPlaylistMedia(v,R,"AUDIO",n),b=C.default.parseMasterPlaylistMedia(v,R,"SUBTITLES",o),g=C.default.parseMasterPlaylistMedia(v,R,"CLOSED-CAPTIONS");if(S.length){var U=S.some(function(K){return!K.url});!U&&a[0].audioCodec&&!a[0].attrs.AUDIO&&(_.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),S.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new i.AttrList({}),bitrate:0,url:""}))}E.trigger(D.Events.MANIFEST_LOADED,{levels:a,audioTracks:S,subtitles:b,captions:g,url:R,stats:l,networkDetails:m,sessionData:r})},B.handleTrackOrLevelPlaylist=function(s,l,f,m){var E=this.hls,v=f.id,R=f.level,p=f.type,a=O(s,f),r=Object(Q.isFiniteNumber)(v)?v:0,n=Object(Q.isFiniteNumber)(R)?R:r,o=h(f),S=C.default.parseLevelPlaylist(s.data,a,n,o,r);if(!S.fragments.length){E.trigger(D.Events.ERROR,{type:w.ErrorTypes.NETWORK_ERROR,details:w.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:a,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(p===x.PlaylistContextType.MANIFEST){var b={attrs:new i.AttrList({}),bitrate:0,details:S,name:"",url:a};E.trigger(D.Events.MANIFEST_LOADED,{levels:[b],audioTracks:[],url:a,stats:l,networkDetails:m,sessionData:null})}if(l.parsing.end=performance.now(),S.needSidxRanges){var g,U=(g=S.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:U,isSidxRequest:!0,type:p,level:R,levelDetails:S,id:v,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=S,this.handlePlaylistLoaded(s,l,f,m)},B.handleSidxRequest=function(s,l){var f=Object(c.parseSegmentIndex)(new Uint8Array(s.data));if(!f)return;var m=f.references,E=l.levelDetails;m.forEach(function(v,R){var p=v.info,a=E.fragments[R];a.byteRange.length===0&&a.setByteRange(String(1+p.end-p.start)+"@"+String(p.start)),a.initSegment&&a.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},B.handleManifestParsingError=function(s,l,f,m){this.hls.trigger(D.Events.ERROR,{type:w.ErrorTypes.NETWORK_ERROR,details:w.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===x.PlaylistContextType.MANIFEST,url:s.url,reason:f,response:s,context:l,networkDetails:m})},B.handleNetworkError=function(s,l,f,m){f===void 0&&(f=!1),_.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+s.type+" level: "+s.level+" id: "+s.id+' group-id: "'+s.groupId+'"');var E=w.ErrorDetails.UNKNOWN,v=!1,R=this.getInternalLoader(s);switch(s.type){case x.PlaylistContextType.MANIFEST:E=f?w.ErrorDetails.MANIFEST_LOAD_TIMEOUT:w.ErrorDetails.MANIFEST_LOAD_ERROR,v=!0;break;case x.PlaylistContextType.LEVEL:E=f?w.ErrorDetails.LEVEL_LOAD_TIMEOUT:w.ErrorDetails.LEVEL_LOAD_ERROR,v=!1;break;case x.PlaylistContextType.AUDIO_TRACK:E=f?w.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:w.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,v=!1;break;case x.PlaylistContextType.SUBTITLE_TRACK:E=f?w.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:w.ErrorDetails.SUBTITLE_LOAD_ERROR,v=!1;break}R&&this.resetInternalLoader(s.type);var p={type:w.ErrorTypes.NETWORK_ERROR,details:E,fatal:v,url:s.url,loader:R,context:s,networkDetails:l};m&&(p.response=m),this.hls.trigger(D.Events.ERROR,p)},B.handlePlaylistLoaded=function(s,l,f,m){var E=f.type,v=f.level,R=f.id,p=f.groupId,a=f.loader,r=f.levelDetails,n=f.deliveryDirectives;if(!(r!=null&&r.targetduration)){this.handleManifestParsingError(s,f,"invalid target duration",m);return}if(!a)return;r.live&&(a.getCacheAge&&(r.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0));switch(E){case x.PlaylistContextType.MANIFEST:case x.PlaylistContextType.LEVEL:this.hls.trigger(D.Events.LEVEL_LOADED,{details:r,level:v||0,id:R||0,stats:l,networkDetails:m,deliveryDirectives:n});break;case x.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(D.Events.AUDIO_TRACK_LOADED,{details:r,id:R||0,groupId:p||"",stats:l,networkDetails:m,deliveryDirectives:n});break;case x.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADED,{details:r,id:R||0,groupId:p||"",stats:l,networkDetails:m,deliveryDirectives:n});break}},y}();N.default=T},"./src/polyfills/number.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"isFiniteNumber",function(){return Q}),L.d(N,"MAX_SAFE_INTEGER",function(){return D});var Q=Number.isFinite||function(w){return typeof w=="number"&&isFinite(w)},D=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(J,N,L){"use strict";L.r(N);var Q=function(){function D(){}return D.getSilentFrame=function(_,c){switch(_){case"mp4a.40.2":if(c===1)return new Uint8Array([0,200,0,128,35,128]);if(c===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(c===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(c===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(c===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(c===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(c===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(c===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(c===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},D}();N.default=Q},"./src/remux/mp4-generator.ts":function(J,N,L){"use strict";L.r(N);var Q=Math.pow(2,32)-1,D=function(){function w(){}return w.init=function(){w.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 c;for(c in w.types)w.types.hasOwnProperty(c)&&(w.types[c]=[c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2),c.charCodeAt(3)]);var C=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]),x=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]);w.HDLR_TYPES={video:C,audio:x};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);w.STTS=w.STSC=w.STCO=h,w.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),w.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),w.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),w.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var O=new Uint8Array([105,115,111,109]),T=new Uint8Array([97,118,99,49]),y=new Uint8Array([0,0,0,1]);w.FTYP=w.box(w.types.ftyp,O,y,O,T),w.DINF=w.box(w.types.dinf,w.box(w.types.dref,i))},w.box=function(c){for(var C=8,x=arguments.length,i=new Array(x>1?x-1:0),h=1;h<x;h++)i[h-1]=arguments[h];for(var O=i.length,T=O;O--;)C+=i[O].byteLength;var y=new Uint8Array(C);for(y[0]=C>>24&255,y[1]=C>>16&255,y[2]=C>>8&255,y[3]=C&255,y.set(c,4),O=0,C=8;O<T;O++)y.set(i[O],C),C+=i[O].byteLength;return y},w.hdlr=function(c){return w.box(w.types.hdlr,w.HDLR_TYPES[c])},w.mdat=function(c){return w.box(w.types.mdat,c)},w.mdhd=function(c,C){C*=c;var x=Math.floor(C/(Q+1)),i=Math.floor(C%(Q+1));return w.box(w.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,x>>24,x>>16&255,x>>8&255,x&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},w.mdia=function(c){return w.box(w.types.mdia,w.mdhd(c.timescale,c.duration),w.hdlr(c.type),w.minf(c))},w.mfhd=function(c){return w.box(w.types.mfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255]))},w.minf=function(c){return c.type==="audio"?w.box(w.types.minf,w.box(w.types.smhd,w.SMHD),w.DINF,w.stbl(c)):w.box(w.types.minf,w.box(w.types.vmhd,w.VMHD),w.DINF,w.stbl(c))},w.moof=function(c,C,x){return w.box(w.types.moof,w.mfhd(c),w.traf(x,C))},w.moov=function(c){for(var C=c.length,x=[];C--;)x[C]=w.trak(c[C]);return w.box.apply(null,[w.types.moov,w.mvhd(c[0].timescale,c[0].duration)].concat(x).concat(w.mvex(c)))},w.mvex=function(c){for(var C=c.length,x=[];C--;)x[C]=w.trex(c[C]);return w.box.apply(null,[w.types.mvex].concat(x))},w.mvhd=function(c,C){C*=c;var x=Math.floor(C/(Q+1)),i=Math.floor(C%(Q+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,x>>24,x>>16&255,x>>8&255,x&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 w.box(w.types.mvhd,h)},w.sdtp=function(c){var C=c.samples||[],x=new Uint8Array(4+C.length),i,h;for(i=0;i<C.length;i++)h=C[i].flags,x[i+4]=h.dependsOn<<4|h.isDependedOn<<2|h.hasRedundancy;return w.box(w.types.sdtp,x)},w.stbl=function(c){return w.box(w.types.stbl,w.stsd(c),w.box(w.types.stts,w.STTS),w.box(w.types.stsc,w.STSC),w.box(w.types.stsz,w.STSZ),w.box(w.types.stco,w.STCO))},w.avc1=function(c){var C=[],x=[],i,h,O;for(i=0;i<c.sps.length;i++)h=c.sps[i],O=h.byteLength,C.push(O>>>8&255),C.push(O&255),C=C.concat(Array.prototype.slice.call(h));for(i=0;i<c.pps.length;i++)h=c.pps[i],O=h.byteLength,x.push(O>>>8&255),x.push(O&255),x=x.concat(Array.prototype.slice.call(h));var T=w.box(w.types.avcC,new Uint8Array([1,C[3],C[4],C[5],252|3,224|c.sps.length].concat(C).concat([c.pps.length]).concat(x))),y=c.width,B=c.height,u=c.pixelRatio[0],s=c.pixelRatio[1];return w.box(w.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,y>>8&255,y&255,B>>8&255,B&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]),T,w.box(w.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),w.box(w.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&255])))},w.esds=function(c){var C=c.config.length;return new Uint8Array([0,0,0,0,3,23+C,0,1,0,4,15+C,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([C]).concat(c.config).concat([6,1,2]))},w.mp4a=function(c){var C=c.samplerate;return w.box(w.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,C>>8&255,C&255,0,0]),w.box(w.types.esds,w.esds(c)))},w.mp3=function(c){var C=c.samplerate;return w.box(w.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,C>>8&255,C&255,0,0]))},w.stsd=function(c){return c.type==="audio"?!c.isAAC&&c.codec==="mp3"?w.box(w.types.stsd,w.STSD,w.mp3(c)):w.box(w.types.stsd,w.STSD,w.mp4a(c)):w.box(w.types.stsd,w.STSD,w.avc1(c))},w.tkhd=function(c){var C=c.id,x=c.duration*c.timescale,i=c.width,h=c.height,O=Math.floor(x/(Q+1)),T=Math.floor(x%(Q+1));return w.box(w.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,C>>24&255,C>>16&255,C>>8&255,C&255,0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255,T>>24,T>>16&255,T>>8&255,T&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,h>>8&255,h&255,0,0]))},w.traf=function(c,C){var x=w.sdtp(c),i=c.id,h=Math.floor(C/(Q+1)),O=Math.floor(C%(Q+1));return w.box(w.types.traf,w.box(w.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),w.box(w.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,O>>24,O>>16&255,O>>8&255,O&255])),w.trun(c,x.length+16+20+8+16+8+8),x)},w.trak=function(c){return c.duration=c.duration||4294967295,w.box(w.types.trak,w.tkhd(c),w.mdia(c))},w.trex=function(c){var C=c.id;return w.box(w.types.trex,new Uint8Array([0,0,0,0,C>>24,C>>16&255,C>>8&255,C&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},w.trun=function(c,C){var x=c.samples||[],i=x.length,h=12+16*i,O=new Uint8Array(h),T,y,B,u,s,l;for(C+=8+h,O.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255],0),T=0;T<i;T++)y=x[T],B=y.duration,u=y.size,s=y.flags,l=y.cts,O.set([B>>>24&255,B>>>16&255,B>>>8&255,B&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,s.degradPrio&240<<8,s.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*T);return w.box(w.types.trun,O)},w.initSegment=function(c){w.types||w.init();var C=w.moov(c),x=new Uint8Array(w.FTYP.byteLength+C.byteLength);return x.set(w.FTYP),x.set(C,w.FTYP.byteLength),x},w}();D.types=void 0,D.HDLR_TYPES=void 0,D.STTS=void 0,D.STSC=void 0,D.STCO=void 0,D.STSZ=void 0,D.VMHD=void 0,D.SMHD=void 0,D.STSD=void 0,D.FTYP=void 0,D.DINF=void 0,N.default=D},"./src/remux/mp4-remuxer.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return l}),L.d(N,"normalizePts",function(){return f});var Q=L("./src/polyfills/number.ts"),D=L("./src/remux/aac-helper.ts"),w=L("./src/remux/mp4-generator.ts"),_=L("./src/events.ts"),c=L("./src/errors.ts"),C=L("./src/utils/logger.ts"),x=L("./src/types/loader.ts"),i=L("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(R){for(var p=1;p<arguments.length;p++){var a=arguments[p];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(R[r]=a[r])}return R},h.apply(this,arguments)}var O=10*1e3,T=1024,y=1152,B=null,u=null,s=!1,l=function(){function R(a,r,n,o){if(o===void 0&&(o=""),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=a,this.config=r,this.typeSupported=n,this.ISGenerated=!1,B===null){var S=navigator.userAgent||"",b=S.match(/Chrome\/(\d+)/i);B=b?parseInt(b[1]):0}if(u===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);u=g?parseInt(g[1]):0}s=!!B&&B<75||!!u&&u<600}var p=R.prototype;return p.destroy=function(){},p.resetTimeStamp=function(r){C.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},p.resetNextTimestamp=function(){C.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},p.resetInitSegment=function(){C.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},p.getVideoStartPts=function(r){var n=!1,o=r.reduce(function(S,b){var g=b.pts-S;return g<-4294967296?(n=!0,f(S,b.pts)):g>0?S:b.pts},r[0].pts);return n&&C.logger.debug("PTS rollover detected"),o},p.remux=function(r,n,o,S,b,g,U,K){var W,q,Y,V,te,X,se=b,le=b,Te=r.pid>-1,Ee=n.pid>-1,Be=n.samples.length,De=r.samples.length>0,Ve=Be>1,_e=(!Te||De)&&(!Ee||Ve)||this.ISGenerated||U;if(_e){this.ISGenerated||(Y=this.generateIS(r,n,b));var Le=this.isVideoContiguous,tt=-1;if(Ve&&(tt=m(n.samples),!Le&&this.config.forceKeyFrameOnDiscontinuity))if(X=!0,tt>0){C.logger.warn("[mp4-remuxer]: Dropped "+tt+" out of "+Be+" video samples due to a missing keyframe");var Et=this.getVideoStartPts(n.samples);n.samples=n.samples.slice(tt),n.dropped+=tt,le+=(n.samples[0].pts-Et)/(n.timescale||9e4)}else tt===-1&&(C.logger.warn("[mp4-remuxer]: No keyframe found out of "+Be+" video samples"),X=!1);if(this.ISGenerated){if(De&&Ve){var Oe=this.getVideoStartPts(n.samples),He=f(r.samples[0].pts,Oe)-Oe,it=He/n.inputTimeScale;se+=Math.max(0,it),le+=Math.max(0,-it)}if(De){if(r.samplerate||(C.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),Y=this.generateIS(r,n,b)),q=this.remuxAudio(r,se,this.isAudioContiguous,g,Ee||Ve||K===x.PlaylistLevelType.AUDIO?le:void 0),Ve){var Ae=q?q.endPTS-q.startPTS:0;n.inputTimeScale||(C.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),Y=this.generateIS(r,n,b)),W=this.remuxVideo(n,le,Le,Ae)}}else Ve&&(W=this.remuxVideo(n,le,Le,0));W&&(W.firstKeyFrame=tt,W.independent=tt!==-1)}}return this.ISGenerated&&(o.samples.length&&(te=this.remuxID3(o,b)),S.samples.length&&(V=this.remuxText(S,b))),{audio:q,video:W,initSegment:Y,independent:X,text:V,id3:te}},p.generateIS=function(r,n,o){var S=r.samples,b=n.samples,g=this.typeSupported,U={},K=!Object(Q.isFiniteNumber)(this._initPTS),W="audio/mp4",q,Y,V;if(K&&(q=Y=Infinity),r.config&&S.length&&(r.timescale=r.samplerate,r.isAAC||(g.mpeg?(W="audio/mpeg",r.codec=""):g.mp3&&(r.codec="mp3")),U.audio={id:"audio",container:W,codec:r.codec,initSegment:!r.isAAC&&g.mpeg?new Uint8Array(0):w.default.initSegment([r]),metadata:{channelCount:r.channelCount}},K&&(V=r.inputTimeScale,q=Y=S[0].pts-Math.round(V*o))),n.sps&&n.pps&&b.length&&(n.timescale=n.inputTimeScale,U.video={id:"main",container:"video/mp4",codec:n.codec,initSegment:w.default.initSegment([n]),metadata:{width:n.width,height:n.height}},K)){V=n.inputTimeScale;var te=this.getVideoStartPts(b),X=Math.round(V*o);Y=Math.min(Y,f(b[0].dts,te)-X),q=Math.min(q,te-X)}if(Object.keys(U).length)return this.ISGenerated=!0,K&&(this._initPTS=q,this._initDTS=Y),{tracks:U,initPTS:q,timescale:V}},p.remuxVideo=function(r,n,o,S){var b=r.inputTimeScale,g=r.samples,U=[],K=g.length,W=this._initPTS,q=this.nextAvcDts,Y=8,V,te,X,se=Number.POSITIVE_INFINITY,le=Number.NEGATIVE_INFINITY,Te=0,Ee=!1;if(!o||q===null){var Be=n*b,De=g[0].pts-f(g[0].dts,g[0].pts);q=Be-De}for(var Ve=0;Ve<K;Ve++){var _e=g[Ve];if(_e.pts=f(_e.pts-W,q),_e.dts=f(_e.dts-W,q),_e.dts>_e.pts){var Le=9e4*.2;Te=Math.max(Math.min(Te,_e.pts-_e.dts),-1*Le)}_e.dts<g[Ve>0?Ve-1:Ve].dts&&(Ee=!0)}Ee&&g.sort(function(_t,At){var nt=_t.dts-At.dts,rt=_t.pts-At.pts;return nt||rt}),te=g[0].dts,X=g[g.length-1].dts;var tt=Math.round((X-te)/(K-1));if(Te<0){if(Te<tt*-2){C.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-tt,!0)+" ms");for(var Et=Te,Oe=0;Oe<K;Oe++)g[Oe].dts=Et=Math.max(Et,g[Oe].pts-tt),g[Oe].pts=Math.max(Et,g[Oe].pts)}else{C.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(Te,!0)+" ms to overcome this issue");for(var He=0;He<K;He++)g[He].dts=g[He].dts+Te}te=g[0].dts}if(o){var it=te-q,Ae=it>tt,re=it<-1;if(Ae||re){Ae?C.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):C.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),te=q;var ae=g[0].pts-it;g[0].dts=te,g[0].pts=ae,C.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(ae,!0)+"/"+Object(i.toMsFromMpegTsClock)(te,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(it,!0)+" ms")}}s&&(te=Math.max(0,te));for(var ce=0,we=0,Re=0;Re<K;Re++){for(var ke=g[Re],ht=ke.units,ft=ht.length,vt=0,yt=0;yt<ft;yt++)vt+=ht[yt].data.length;we+=vt,ce+=ft,ke.length=vt,ke.dts=Math.max(ke.dts,te),ke.pts=Math.max(ke.pts,ke.dts,0),se=Math.min(ke.pts,se),le=Math.max(ke.pts,le)}X=g[K-1].dts;var Lt=we+4*ce+8,Mt;try{Mt=new Uint8Array(Lt)}catch(_t){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Lt,reason:"fail allocating video mdat "+Lt});return}var Qe=new DataView(Mt.buffer);Qe.setUint32(0,Lt),Mt.set(w.default.types.mdat,4);for(var Pe=0;Pe<K;Pe++){for(var lt=g[Pe],pt=lt.units,Ze=0,st=0,Ke=pt.length;st<Ke;st++){var Ie=pt[st],Me=Ie.data,pe=Ie.data.byteLength;Qe.setUint32(Y,pe),Y+=4,Mt.set(Me,Y),Y+=pe,Ze+=4+pe}if(Pe<K-1)V=g[Pe+1].dts-lt.dts;else{var be=this.config,ge=lt.dts-g[Pe>0?Pe-1:Pe].dts;if(be.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ce=Math.floor(be.maxBufferHole*b),We=(S?se+S*b:this.nextAudioPts)-lt.pts;We>Ce?(V=We-ge,V<0&&(V=ge),C.logger.log("[mp4-remuxer]: It is approximately "+We/90+" ms to the next segment; using duration "+V/90+" ms for the last video frame.")):V=ge}else V=ge}var Ne=Math.round(lt.pts-lt.dts);U.push(new E(lt.key,V,Ze,Ne))}if(U.length&&B&&B<70){var ut=U[0].flags;ut.dependsOn=2,ut.isNonSync=0}console.assert(V!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=q=X+V,this.isVideoContiguous=!0;var Tt=w.default.moof(r.sequenceNumber++,te,h({},r,{samples:U})),Ut="video",St={data1:Tt,data2:Mt,startPTS:se/b,endPTS:(le+V)/b,startDTS:te/b,endDTS:q/b,type:Ut,hasAudio:!1,hasVideo:!0,nb:U.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(Mt.length,"MDAT length must not be zero"),St},p.remuxAudio=function(r,n,o,S,b){var g=r.inputTimeScale,U=r.samplerate?r.samplerate:g,K=g/U,W=r.isAAC?T:y,q=W*K,Y=this._initPTS,V=!r.isAAC&&this.typeSupported.mpeg,te=[],X=r.samples,se=V?0:8,le=this.nextAudioPts||-1,Te=n*g;if(this.isAudioContiguous=o=o||X.length&&le>0&&(S&&Math.abs(Te-le)<9e3||Math.abs(f(X[0].pts-Y,Te)-le)<20*q),X.forEach(function(Me){Me.pts=f(Me.pts-Y,Te)}),!o||le<0){if(X=X.filter(function(Me){return Me.pts>=0}),!X.length)return;b===0?le=0:S?le=Math.max(0,Te):le=X[0].pts}if(r.isAAC)for(var Ee=b!==void 0,Be=this.config.maxAudioFramesDrift,De=0,Ve=le;De<X.length;De++){var _e=X[De],Le=_e.pts,tt=Le-Ve,Et=Math.abs(1e3*tt/g);if(tt<=-Be*q&&Ee)De===0&&(C.logger.warn("Audio frame @ "+(Le/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*tt/g)+" ms."),this.nextAudioPts=le=Ve=Le);else if(tt>=Be*q&&Et<O&&Ee){var Oe=Math.round(tt/q);Ve=Le-Oe*q,Ve<0&&(Oe--,Ve+=q),De===0&&(this.nextAudioPts=le=Ve),C.logger.warn("[mp4-remuxer]: Injecting "+Oe+" audio frame @ "+(Ve/g).toFixed(3)+"s due to "+Math.round(1e3*tt/g)+" ms gap.");for(var He=0;He<Oe;He++){var it=Math.max(Ve,0),Ae=D.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);Ae||(C.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ae=_e.unit.subarray()),X.splice(De,0,{unit:Ae,pts:it}),Ve+=q,De++}}_e.pts=Ve,Ve+=q}for(var re=null,ae=null,ce,we=0,Re=X.length;Re--;)we+=X[Re].unit.byteLength;for(var ke=0,ht=X.length;ke<ht;ke++){var ft=X[ke],vt=ft.unit,yt=ft.pts;if(ae!==null){var Lt=te[ke-1];Lt.duration=Math.round((yt-ae)/K)}else if(o&&r.isAAC&&(yt=le),re=yt,we>0){we+=se;try{ce=new Uint8Array(we)}catch(Me){this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:we,reason:"fail allocating audio mdat "+we});return}if(!V){var Mt=new DataView(ce.buffer);Mt.setUint32(0,we),ce.set(w.default.types.mdat,4)}}else return;ce.set(vt,se);var Qe=vt.byteLength;se+=Qe,te.push(new E(!0,W,Qe,0)),ae=yt}var Pe=te.length;if(!Pe)return;var lt=te[te.length-1];this.nextAudioPts=le=ae+K*lt.duration;var pt=V?new Uint8Array(0):w.default.moof(r.sequenceNumber++,re/K,h({},r,{samples:te}));r.samples=[];var Ze=re/g,st=le/g,Ke="audio",Ie={data1:pt,data2:ce,startPTS:Ze,endPTS:st,startDTS:Ze,endDTS:st,type:Ke,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(ce.length,"MDAT length must not be zero"),Ie},p.remuxEmptyAudio=function(r,n,o,S){var b=r.inputTimeScale,g=r.samplerate?r.samplerate:b,U=b/g,K=this.nextAudioPts,W=(K!==null?K:S.startDTS*b)+this._initDTS,q=S.endDTS*b+this._initDTS,Y=U*T,V=Math.ceil((q-W)/Y),te=D.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(C.logger.warn("[mp4-remuxer]: remux empty Audio"),!te){C.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var X=[],se=0;se<V;se++){var le=W+se*Y;X.push({unit:te,pts:le,dts:le})}return r.samples=X,this.remuxAudio(r,n,o,!1)},p.remuxID3=function(r,n){var o=r.samples.length;if(!o)return;for(var S=r.inputTimeScale,b=this._initPTS,g=this._initDTS,U=0;U<o;U++){var K=r.samples[U];K.pts=f(K.pts-b,n*S)/S,K.dts=f(K.dts-g,n*S)/S}var W=r.samples;return r.samples=[],{samples:W}},p.remuxText=function(r,n){var o=r.samples.length;if(!o)return;for(var S=r.inputTimeScale,b=this._initPTS,g=0;g<o;g++){var U=r.samples[g];U.pts=f(U.pts-b,n*S)/S}r.samples.sort(function(W,q){return W.pts-q.pts});var K=r.samples;return r.samples=[],{samples:K}},R}();function f(R,p){var a;if(p===null)return R;for(p<R?a=-8589934592:a=8589934592;Math.abs(R-p)>4294967296;)R+=a;return R}function m(R){for(var p=0;p<R.length;p++)if(R[p].key)return p;return-1}var E=function(p,a,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=a,this.size=r,this.cts=n,this.flags=new v(p)},v=function(p){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=p?2:1,this.isNonSync=p?0:1}},"./src/remux/passthrough-remuxer.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/mp4-tools.ts"),w=L("./src/loader/fragment.ts"),_=L("./src/utils/logger.ts"),c=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 h=i.prototype;return h.destroy=function(){},h.resetTimeStamp=function(T){this.initPTS=T,this.lastEndDTS=null},h.resetNextTimestamp=function(){this.lastEndDTS=null},h.resetInitSegment=function(T,y,B){this.audioCodec=y,this.videoCodec=B,this.generateInitSegment(T),this.emitInitSegment=!0},h.generateInitSegment=function(T){var y=this.audioCodec,B=this.videoCodec;if(!T||!T.byteLength){this.initTracks=void 0,this.initData=void 0;return}var u=this.initData=Object(D.parseInitSegment)(T);y||(y=x(u.audio,w.ElementaryStreamTypes.AUDIO)),B||(B=x(u.video,w.ElementaryStreamTypes.VIDEO));var s={};u.audio&&u.video?s.audiovideo={container:"video/mp4",codec:y+","+B,initSegment:T,id:"main"}:u.audio?s.audio={container:"audio/mp4",codec:y,initSegment:T,id:"audio"}:u.video?s.video={container:"video/mp4",codec:B,initSegment:T,id:"main"}:_.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},h.remux=function(T,y,B,u,s){var l=this.initPTS,f=this.lastEndDTS,m={audio:void 0,video:void 0,text:u,id3:B,initSegment:void 0};Object(Q.isFiniteNumber)(f)||(f=this.lastEndDTS=s||0);var E=y.samples;if(!E||!E.length)return m;var v={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(E),R=this.initData),!R||!R.length)return _.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),m;this.emitInitSegment&&(v.tracks=this.initTracks,this.emitInitSegment=!1),Object(Q.isFiniteNumber)(l)||(this.initPTS=v.initPTS=l=C(R,E,f));var p=Object(D.getDuration)(E,R),a=f,r=p+a;Object(D.offsetStartDTS)(R,E,l),p>0?this.lastEndDTS=r:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var n=!!R.audio,o=!!R.video,S="";n&&(S+="audio"),o&&(S+="video");var b={data1:E,startPTS:a,startDTS:a,endPTS:r,endDTS:r,type:S,hasAudio:n,hasVideo:o,nb:1,dropped:0};return m.audio=b.type==="audio"?b:void 0,m.video=b.type!=="audio"?b:void 0,m.text=u,m.id3=B,m.initSegment=v,m},i}(),C=function(h,O,T){return Object(D.getStartDTS)(h,O)-T};function x(i,h){var O=i==null?void 0:i.codec;return O&&O.length>4?O:O==="hvc1"?"hvc1.1.c.L120.90":O==="av01"?"av01.0.04M.08":O==="avc1"||h===w.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}N.default=c},"./src/task-loop.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return Q});var Q=function(){function D(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var w=D.prototype;return w.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},w.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},w.onHandlerDestroyed=function(){},w.hasInterval=function(){return!!this._tickInterval},w.hasNextTick=function(){return!!this._tickTimer},w.setInterval=function(c){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,c),!0)},w.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},w.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},w.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},w.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},w.doTick=function(){},D}()},"./src/types/cmcd.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"CMCDVersion",function(){return Q}),L.d(N,"CMCDObjectType",function(){return D}),L.d(N,"CMCDStreamingFormat",function(){return w}),L.d(N,"CMCDStreamType",function(){return _});var Q=1,D;(function(c){c.MANIFEST="m",c.AUDIO="a",c.VIDEO="v",c.MUXED="av",c.INIT="i",c.CAPTION="c",c.TIMED_TEXT="tt",c.KEY="k",c.OTHER="o"})(D||(D={}));var w;(function(c){c.DASH="d",c.HLS="h",c.SMOOTH="s",c.OTHER="o"})(w||(w={}));var _;(function(c){c.VOD="v",c.LIVE="l"})(_||(_={}))},"./src/types/level.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"HlsSkip",function(){return w}),L.d(N,"getSkipValue",function(){return _}),L.d(N,"HlsUrlParameters",function(){return c}),L.d(N,"Level",function(){return C});function Q(x,i){for(var h=0;h<i.length;h++){var O=i[h];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function D(x,i,h){return i&&Q(x.prototype,i),h&&Q(x,h),x}var w;(function(x){x.No="",x.Yes="YES",x.v2="v2"})(w||(w={}));function _(x,i){var h=x.canSkipUntil,O=x.canSkipDateRanges,T=x.endSN,y=i!==void 0?i-T:0;return h&&y<h?O?w.v2:w.Yes:w.No}var c=function(){function x(h,O,T){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=h,this.part=O,this.skip=T}var i=x.prototype;return i.addDirectives=function(O){var T=new self.URL(O);return this.msn!==void 0&&T.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&T.searchParams.set("_HLS_part",this.part.toString()),this.skip&&T.searchParams.set("_HLS_skip",this.skip),T.toString()},x}(),C=function(){function x(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(h){return h}).join(",").replace(/\.[^.,]+/g,"")}return D(x,[{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(h){var O=h%this.url.length;this._urlId!==O&&(this.details=void 0,this._urlId=O)}}]),x}()},"./src/types/loader.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"PlaylistContextType",function(){return Q}),L.d(N,"PlaylistLevelType",function(){return D});var Q;(function(w){w.MANIFEST="manifest",w.LEVEL="level",w.AUDIO_TRACK="audioTrack",w.SUBTITLE_TRACK="subtitleTrack"})(Q||(Q={}));var D;(function(w){w.MAIN="main",w.AUDIO="audio",w.SUBTITLE="subtitle"})(D||(D={}))},"./src/types/transmuxer.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"ChunkMetadata",function(){return Q});var Q=function(_,c,C,x,i,h){x===void 0&&(x=0),i===void 0&&(i=-1),h===void 0&&(h=!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=D(),this.buffering={audio:D(),video:D(),audiovideo:D()},this.level=_,this.sn=c,this.id=C,this.size=x,this.part=i,this.partial=h};function D(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"AttrList",function(){return w});var Q=/^(\d+)x(\d+)$/,D=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,w=function(){function _(C){typeof C=="string"&&(C=_.parseAttrList(C));for(var x in C)C.hasOwnProperty(x)&&(this[x]=C[x])}var c=_.prototype;return c.decimalInteger=function(x){var i=parseInt(this[x],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},c.hexadecimalInteger=function(x){if(this[x]){var i=(this[x]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var h=new Uint8Array(i.length/2),O=0;O<i.length/2;O++)h[O]=parseInt(i.slice(O*2,O*2+2),16);return h}else return null},c.hexadecimalIntegerAsNumber=function(x){var i=parseInt(this[x],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},c.decimalFloatingPoint=function(x){return parseFloat(this[x])},c.optionalFloat=function(x,i){var h=this[x];return h?parseFloat(h):i},c.enumeratedString=function(x){return this[x]},c.bool=function(x){return this[x]==="YES"},c.decimalResolution=function(x){var i=Q.exec(this[x]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},_.parseAttrList=function(x){var i,h={},O='"';for(D.lastIndex=0;(i=D.exec(x))!==null;){var T=i[2];T.indexOf(O)===0&&T.lastIndexOf(O)===T.length-1&&(T=T.slice(1,-1)),h[i[1]]=T}return h},_}()},"./src/utils/binary-search.ts":function(J,N,L){"use strict";L.r(N);var Q={search:function(w,_){for(var c=0,C=w.length-1,x=null,i=null;c<=C;){x=(c+C)/2|0,i=w[x];var h=_(i);if(h>0)c=x+1;else if(h<0)C=x-1;else return i}return null}};N.default=Q},"./src/utils/buffer-helper.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"BufferHelper",function(){return w});var Q=L("./src/utils/logger.ts"),D={length:0,start:function(){return 0},end:function(){return 0}},w=function(){function _(){}return _.isBuffered=function(C,x){try{if(C){for(var i=_.getBuffered(C),h=0;h<i.length;h++)if(x>=i.start(h)&&x<=i.end(h))return!0}}catch(O){}return!1},_.bufferInfo=function(C,x,i){try{if(C){var h=_.getBuffered(C),O=[],T;for(T=0;T<h.length;T++)O.push({start:h.start(T),end:h.end(T)});return this.bufferedInfo(O,x,i)}}catch(y){}return{len:0,start:x,end:x,nextStart:void 0}},_.bufferedInfo=function(C,x,i){x=Math.max(0,x),C.sort(function(v,R){var p=v.start-R.start;return p||R.end-v.end});var h=[];if(i)for(var O=0;O<C.length;O++){var T=h.length;if(T){var y=h[T-1].end;C[O].start-y<i?C[O].end>y&&(h[T-1].end=C[O].end):h.push(C[O])}else h.push(C[O])}else h=C;for(var B=0,u,s=x,l=x,f=0;f<h.length;f++){var m=h[f].start,E=h[f].end;if(x+i>=m&&x<E)s=m,l=E,B=l-x;else if(x+i<m){u=m;break}}return{len:B,start:s||0,end:l||0,nextStart:u}},_.getBuffered=function(C){try{return C.buffered}catch(x){return Q.logger.log("failed to get media.buffered",x),D}},_}()},"./src/utils/cea-608-parser.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"Row",function(){return l}),L.d(N,"CaptionScreen",function(){return f});var Q=L("./src/utils/logger.ts"),D={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},w=function(r){var n=r;return D.hasOwnProperty(r)&&(n=D[r]),String.fromCharCode(n)},_=15,c=100,C={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},x={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},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},O=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],T;(function(a){a[a.ERROR=0]="ERROR",a[a.TEXT=1]="TEXT",a[a.WARNING=2]="WARNING",a[a.INFO=2]="INFO",a[a.DEBUG=3]="DEBUG",a[a.DATA=3]="DATA"})(T||(T={}));var y=function(){function a(){this.time=null,this.verboseLevel=T.ERROR}var r=a.prototype;return r.log=function(o,S){this.verboseLevel>=o&&Q.logger.log(this.time+" ["+o+"] "+S)},a}(),B=function(r){for(var n=[],o=0;o<r.length;o++)n.push(r[o].toString(16));return n},u=function(){function a(n,o,S,b,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=n||"white",this.underline=o||!1,this.italics=S||!1,this.background=b||"black",this.flash=g||!1}var r=a.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(o){for(var S=["foreground","underline","italics","background","flash"],b=0;b<S.length;b++){var g=S[b];o.hasOwnProperty(g)&&(this[g]=o[g])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(o){return this.foreground===o.foreground&&this.underline===o.underline&&this.italics===o.italics&&this.background===o.background&&this.flash===o.flash},r.copy=function(o){this.foreground=o.foreground,this.underline=o.underline,this.italics=o.italics,this.background=o.background,this.flash=o.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},a}(),s=function(){function a(n,o,S,b,g,U){this.uchar=void 0,this.penState=void 0,this.uchar=n||" ",this.penState=new u(o,S,b,g,U)}var r=a.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(o,S){this.uchar=o,this.penState.copy(S)},r.setPenState=function(o){this.penState.copy(o)},r.equals=function(o){return this.uchar===o.uchar&&this.penState.equals(o.penState)},r.copy=function(o){this.uchar=o.uchar,this.penState.copy(o.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},a}(),l=function(){function a(n){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var o=0;o<c;o++)this.chars.push(new s);this.logger=n,this.pos=0,this.currPenState=new u}var r=a.prototype;return r.equals=function(o){for(var S=!0,b=0;b<c;b++)if(!this.chars[b].equals(o.chars[b])){S=!1;break}return S},r.copy=function(o){for(var S=0;S<c;S++)this.chars[S].copy(o.chars[S])},r.isEmpty=function(){for(var o=!0,S=0;S<c;S++)if(!this.chars[S].isEmpty()){o=!1;break}return o},r.setCursor=function(o){this.pos!==o&&(this.pos=o),this.pos<0?(this.logger.log(T.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>c&&(this.logger.log(T.DEBUG,"Too large cursor position "+this.pos),this.pos=c)},r.moveCursor=function(o){var S=this.pos+o;if(o>1)for(var b=this.pos+1;b<S+1;b++)this.chars[b].setPenState(this.currPenState);this.setCursor(S)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(o){o>=144&&this.backSpace();var S=w(o);if(this.pos>=c){this.logger.log(T.ERROR,"Cannot insert "+o.toString(16)+" ("+S+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(S,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(o){var S;for(S=o;S<c;S++)this.chars[S].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var o=[],S=!0,b=0;b<c;b++){var g=this.chars[b].uchar;g!==" "&&(S=!1),o.push(g)}return S?"":o.join("")},r.setPenStyles=function(o){this.currPenState.setStyles(o);var S=this.chars[this.pos];S.setPenState(this.currPenState)},a}(),f=function(){function a(n){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var o=0;o<_;o++)this.rows.push(new l(n));this.logger=n,this.currRow=_-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=a.prototype;return r.reset=function(){for(var o=0;o<_;o++)this.rows[o].clear();this.currRow=_-1},r.equals=function(o){for(var S=!0,b=0;b<_;b++)if(!this.rows[b].equals(o.rows[b])){S=!1;break}return S},r.copy=function(o){for(var S=0;S<_;S++)this.rows[S].copy(o.rows[S])},r.isEmpty=function(){for(var o=!0,S=0;S<_;S++)if(!this.rows[S].isEmpty()){o=!1;break}return o},r.backSpace=function(){var o=this.rows[this.currRow];o.backSpace()},r.clearToEndOfRow=function(){var o=this.rows[this.currRow];o.clearToEndOfRow()},r.insertChar=function(o){var S=this.rows[this.currRow];S.insertChar(o)},r.setPen=function(o){var S=this.rows[this.currRow];S.setPenStyles(o)},r.moveCursor=function(o){var S=this.rows[this.currRow];S.moveCursor(o)},r.setCursor=function(o){this.logger.log(T.INFO,"setCursor: "+o);var S=this.rows[this.currRow];S.setCursor(o)},r.setPAC=function(o){this.logger.log(T.INFO,"pacData = "+JSON.stringify(o));var S=o.row-1;if(this.nrRollUpRows&&S<this.nrRollUpRows-1&&(S=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==S){for(var b=0;b<_;b++)this.rows[b].clear();var g=this.currRow+1-this.nrRollUpRows,U=this.lastOutputScreen;if(U){var K=U.rows[g].cueStartTime,W=this.logger.time;if(K&&W!==null&&K<W)for(var q=0;q<this.nrRollUpRows;q++)this.rows[S-this.nrRollUpRows+q+1].copy(U.rows[g+q])}}this.currRow=S;var Y=this.rows[this.currRow];if(o.indent!==null){var V=o.indent,te=Math.max(V-1,0);Y.setCursor(o.indent),o.color=Y.chars[te].penState.foreground}var X={foreground:o.color,underline:o.underline,italics:o.italics,background:"black",flash:!1};this.setPen(X)},r.setBkgData=function(o){this.logger.log(T.INFO,"bkgData = "+JSON.stringify(o)),this.backSpace(),this.setPen(o),this.insertChar(32)},r.setRollUpRows=function(o){this.nrRollUpRows=o},r.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(T.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(T.TEXT,this.getDisplayText());var o=this.currRow+1-this.nrRollUpRows,S=this.rows.splice(o,1)[0];S.clear(),this.rows.splice(this.currRow,0,S),this.logger.log(T.INFO,"Rolling up")},r.getDisplayText=function(o){o=o||!1;for(var S=[],b="",g=-1,U=0;U<_;U++){var K=this.rows[U].getTextString();K&&(g=U+1,o?S.push("Row "+g+": '"+K+"'"):S.push(K.trim()))}return S.length>0&&(o?b="["+S.join(" | ")+"]":b=S.join(`
|
|
`)),b},r.getTextAndFormat=function(){return this.rows},a}(),m=function(){function a(n,o,S){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=n,this.outputFilter=o,this.mode=null,this.verbose=0,this.displayedMemory=new f(S),this.nonDisplayedMemory=new f(S),this.lastOutputScreen=new f(S),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=S}var r=a.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[_-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(o){this.outputFilter=o},r.setPAC=function(o){this.writeScreen.setPAC(o)},r.setBkgData=function(o){this.writeScreen.setBkgData(o)},r.setMode=function(o){if(o===this.mode)return;this.mode=o,this.logger.log(T.INFO,"MODE="+o),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=o},r.insertChars=function(o){for(var S=0;S<o.length;S++)this.writeScreen.insertChar(o[S]);var b=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(T.INFO,b+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(T.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(T.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){if(this.logger.log(T.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(T.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(o){this.logger.log(T.INFO,"RU("+o+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(o)},r.ccFON=function(){this.logger.log(T.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(T.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(T.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(T.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(T.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(T.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(T.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){if(this.logger.log(T.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var o=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=o,this.writeScreen=this.nonDisplayedMemory,this.logger.log(T.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},r.ccTO=function(o){this.logger.log(T.INFO,"TO("+o+") - Tab Offset"),this.writeScreen.moveCursor(o)},r.ccMIDROW=function(o){var S={flash:!1};if(S.underline=o%2===1,S.italics=o>=46,S.italics)S.foreground="white";else{var b=Math.floor(o/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];S.foreground=g[b]}this.logger.log(T.INFO,"MIDROW: "+JSON.stringify(S)),this.writeScreen.setPen(S)},r.outputDataUpdate=function(o){o===void 0&&(o=!1);var S=this.logger.time;if(S===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=S:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,S,this.lastOutputScreen),o&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:S),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(o){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,o,this.displayedMemory),this.cueStartTime=o))},a}(),E=function(){function a(n,o,S){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var b=new y;this.channels=[null,new m(n,o,b),new m(n+1,S,b)],this.cmdHistory=p(),this.logger=b}var r=a.prototype;return r.getHandler=function(o){return this.channels[o].getHandler()},r.setHandler=function(o,S){this.channels[o].setHandler(S)},r.addData=function(o,S){var b,g,U,K=!1;this.logger.time=o;for(var W=0;W<S.length;W+=2){if(g=S[W]&127,U=S[W+1]&127,g===0&&U===0)continue;if(this.logger.log(T.DATA,"["+B([S[W],S[W+1]])+"] -> ("+B([g,U])+")"),b=this.parseCmd(g,U),b||(b=this.parseMidrow(g,U)),b||(b=this.parsePAC(g,U)),b||(b=this.parseBackgroundAttributes(g,U)),!b&&(K=this.parseChars(g,U),K)){var q=this.currentChannel;if(q&&q>0){var Y=this.channels[q];Y.insertChars(K)}else this.logger.log(T.WARNING,"No channel found yet. TEXT-MODE?")}!b&&!K&&this.logger.log(T.WARNING,"Couldn't parse cleaned data "+B([g,U])+" orig: "+B([S[W],S[W+1]]))}},r.parseCmd=function(o,S){var b=this.cmdHistory,g=(o===20||o===28||o===21||o===29)&&S>=32&&S<=47,U=(o===23||o===31)&&S>=33&&S<=35;if(!(g||U))return!1;if(R(o,S,b))return v(null,null,b),this.logger.log(T.DEBUG,"Repeated command ("+B([o,S])+") is dropped"),!0;var K=o===20||o===21||o===23?1:2,W=this.channels[K];return o===20||o===21||o===28||o===29?S===32?W.ccRCL():S===33?W.ccBS():S===34?W.ccAOF():S===35?W.ccAON():S===36?W.ccDER():S===37?W.ccRU(2):S===38?W.ccRU(3):S===39?W.ccRU(4):S===40?W.ccFON():S===41?W.ccRDC():S===42?W.ccTR():S===43?W.ccRTD():S===44?W.ccEDM():S===45?W.ccCR():S===46?W.ccENM():S===47&&W.ccEOC():W.ccTO(S-32),v(o,S,b),this.currentChannel=K,!0},r.parseMidrow=function(o,S){var b=0;if((o===17||o===25)&&S>=32&&S<=47){if(o===17?b=1:b=2,b!==this.currentChannel)return this.logger.log(T.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[b];return g?(g.ccMIDROW(S),this.logger.log(T.DEBUG,"MIDROW ("+B([o,S])+")"),!0):!1}return!1},r.parsePAC=function(o,S){var b,g=this.cmdHistory,U=(o>=17&&o<=23||o>=25&&o<=31)&&S>=64&&S<=127,K=(o===16||o===24)&&S>=64&&S<=95;if(!(U||K))return!1;if(R(o,S,g))return v(null,null,g),!0;var W=o<=23?1:2;S>=64&&S<=95?b=W===1?C[o]:i[o]:b=W===1?x[o]:h[o];var q=this.channels[W];return q?(q.setPAC(this.interpretPAC(b,S)),v(o,S,g),this.currentChannel=W,!0):!1},r.interpretPAC=function(o,S){var b,g={color:null,italics:!1,indent:null,underline:!1,row:o};return S>95?b=S-96:b=S-64,g.underline=(b&1)===1,b<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(b/2)]:b<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((b-16)/2)*4,g},r.parseChars=function(o,S){var b,g=null,U=null;if(o>=25?(b=2,U=o-8):(b=1,U=o),U>=17&&U<=19){var K;U===17?K=S+80:U===18?K=S+112:K=S+144,this.logger.log(T.INFO,"Special char '"+w(K)+"' in channel "+b),g=[K]}else o>=32&&o<=127&&(g=S===0?[o]:[o,S]);if(g){var W=B(g);this.logger.log(T.DEBUG,"Char codes = "+W.join(",")),v(o,S,this.cmdHistory)}return g},r.parseBackgroundAttributes=function(o,S){var b=(o===16||o===24)&&S>=32&&S<=47,g=(o===23||o===31)&&S>=45&&S<=47;if(!(b||g))return!1;var U,K={};o===16||o===24?(U=Math.floor((S-32)/2),K.background=O[U],S%2===1&&(K.background=K.background+"_semi")):S===45?K.background="transparent":(K.foreground="black",S===47&&(K.underline=!0));var W=o<=23?1:2,q=this.channels[W];return q.setBkgData(K),v(o,S,this.cmdHistory),!0},r.reset=function(){for(var o=0;o<Object.keys(this.channels).length;o++){var S=this.channels[o];S&&S.reset()}this.cmdHistory=p()},r.cueSplitAtTime=function(o){for(var S=0;S<this.channels.length;S++){var b=this.channels[S];b&&b.cueSplitAtTime(o)}},a}();function v(a,r,n){n.a=a,n.b=r}function R(a,r,n){return n.a===a&&n.b===r}function p(){return{a:null,b:null}}N.default=E},"./src/utils/codecs.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"isCodecType",function(){return D}),L.d(N,"isCodecSupportedInMp4",function(){return w});var Q={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 D(_,c){var C=Q[c];return!!C&&C[_.slice(0,4)]===!0}function w(_,c){return MediaSource.isTypeSupported((c||"video")+'/mp4;codecs="'+_+'"')}},"./src/utils/cues.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/utils/vttparser.ts"),D=L("./src/utils/webvtt-parser.ts"),w=L("./src/utils/texttrack-utils.ts"),_=/\s/,c={newCue:function(x,i,h,O){for(var T=[],y,B,u,s,l,f=self.VTTCue||self.TextTrackCue,m=0;m<O.rows.length;m++)if(y=O.rows[m],u=!0,s=0,l="",!y.isEmpty()){for(var E=0;E<y.chars.length;E++)_.test(y.chars[E].uchar)&&u?s++:(l+=y.chars[E].uchar,u=!1);y.cueStartTime=i,i===h&&(h+=1e-4),s>=16?s--:s++;var v=Object(Q.fixLineBreaks)(l.trim()),R=Object(D.generateCueId)(i,h,v);(!x||!x.cues||!x.cues.getCueById(R))&&(B=new f(i,h,v),B.id=R,B.line=m+1,B.align="left",B.position=10+Math.min(80,Math.floor(s*8/32)*10),T.push(B))}return x&&T.length&&(T.sort(function(p,a){return p.line==="auto"||a.line==="auto"?0:p.line>8&&a.line>8?a.line-p.line:p.line-a.line}),T.forEach(function(p){return Object(w.addCueToTrack)(x,p)})),T}};N.default=c},"./src/utils/discontinuities.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"findFirstFragWithCC",function(){return _}),L.d(N,"shouldAlignOnDiscontinuities",function(){return c}),L.d(N,"findDiscontinuousReferenceFrag",function(){return C}),L.d(N,"adjustSlidingStart",function(){return i}),L.d(N,"alignStream",function(){return h}),L.d(N,"alignPDT",function(){return T}),L.d(N,"alignFragmentByPDTDelta",function(){return y}),L.d(N,"alignMediaPlaylistByPDT",function(){return B});var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/logger.ts"),w=L("./src/controller/level-helper.ts");function _(u,s){for(var l=null,f=0,m=u.length;f<m;f++){var E=u[f];if(E&&E.cc===s){l=E;break}}return l}function c(u,s,l){return!!(s.details&&(l.endCC>l.startCC||u&&u.cc<l.startCC))}function C(u,s){var l=u.fragments,f=s.fragments;if(!f.length||!l.length){D.logger.log("No fragments to align");return}var m=_(l,f[0].cc);if(!m||m&&!m.startPTS){D.logger.log("No frag in previous level to align on");return}return m}function x(u,s){if(u){var l=u.start+s;u.start=u.startPTS=l,u.endPTS=l+u.duration}}function i(u,s){for(var l=s.fragments,f=0,m=l.length;f<m;f++)x(l[f],u);s.fragmentHint&&x(s.fragmentHint,u),s.alignedSliding=!0}function h(u,s,l){if(!s)return;O(u,l,s),!l.alignedSliding&&s.details&&T(l,s.details),!l.alignedSliding&&s.details&&!l.skippedSegments&&Object(w.adjustSliding)(s.details,l)}function O(u,s,l){if(c(u,l,s)){var f=C(l.details,s);f&&Object(Q.isFiniteNumber)(f.start)&&(D.logger.log("Adjusting PTS using last level due to CC increase within current level "+s.url),i(f.start,s))}}function T(u,s){if(!s.fragments.length||!u.hasProgramDateTime||!s.hasProgramDateTime)return;var l=s.fragments[0].programDateTime,f=u.fragments[0].programDateTime,m=(f-l)/1e3+s.fragments[0].start;m&&Object(Q.isFiniteNumber)(m)&&(D.logger.log("Adjusting PTS using programDateTime delta "+(f-l)+"ms, sliding:"+m.toFixed(3)+" "+u.url+" "),i(m,u))}function y(u,s){var l=u.programDateTime;if(!l)return;var f=(l-s)/1e3;u.start=u.startPTS=f,u.endPTS=f+u.duration}function B(u,s){if(!s.fragments.length||!u.hasProgramDateTime||!s.hasProgramDateTime)return;var l=s.fragments[0].programDateTime,f=s.fragments[0].start,m=l-f*1e3;u.fragments.forEach(function(E){y(E,m)}),u.fragmentHint&&y(u.fragmentHint,m),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/utils/ewma.ts"),D=function(){function w(c,C,x){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=x,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Q.default(c),this.fast_=new Q.default(C)}var _=w.prototype;return _.update=function(C,x){var i=this.slow_,h=this.fast_;this.slow_.halfLife!==C&&(this.slow_=new Q.default(C,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==x&&(this.fast_=new Q.default(x,h.getEstimate(),h.getTotalWeight()))},_.sample=function(C,x){C=Math.max(C,this.minDelayMs_);var i=8*x,h=C/1e3,O=i/h;this.fast_.sample(h,O),this.slow_.sample(h,O)},_.canEstimate=function(){var C=this.fast_;return C&&C.getTotalWeight()>=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},w}();N.default=D},"./src/utils/ewma.ts":function(J,N,L){"use strict";L.r(N);var Q=function(){function D(_,c,C){c===void 0&&(c=0),C===void 0&&(C=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=c,this.totalWeight_=C}var w=D.prototype;return w.sample=function(c,C){var x=Math.pow(this.alpha_,c);this.estimate_=C*(1-x)+x*this.estimate_,this.totalWeight_+=c},w.getTotalWeight=function(){return this.totalWeight_},w.getEstimate=function(){if(this.alpha_){var c=1-Math.pow(this.alpha_,this.totalWeight_);if(c)return this.estimate_/c}return this.estimate_},D}();N.default=Q},"./src/utils/fetch-loader.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"fetchSupported",function(){return y});var Q=L("./src/polyfills/number.ts"),D=L("./src/loader/load-stats.ts"),w=L("./src/demux/chunk-cache.ts");function _(f,m){f.prototype=Object.create(m.prototype),f.prototype.constructor=f,h(f,m)}function c(f){var m=typeof Map=="function"?new Map:void 0;return c=function(v){if(v===null||!i(v))return v;if(typeof v!="function")throw new TypeError("Super expression must either be null or a function");if(typeof m!="undefined"){if(m.has(v))return m.get(v);m.set(v,R)}function R(){return C(v,arguments,O(this).constructor)}return R.prototype=Object.create(v.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),h(R,v)},c(f)}function C(f,m,E){return x()?C=Reflect.construct:C=function(R,p,a){var r=[null];r.push.apply(r,p);var n=Function.bind.apply(R,r),o=new n;return a&&h(o,a.prototype),o},C.apply(null,arguments)}function x(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function i(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function h(f,m){return h=Object.setPrototypeOf||function(v,R){return v.__proto__=R,v},h(f,m)}function O(f){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},O(f)}function T(){return T=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var E=arguments[m];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(f[v]=E[v])}return f},T.apply(this,arguments)}function y(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(f){}return!1}var B=function(){function f(E){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=E.fetchSetup||s,this.controller=new self.AbortController,this.stats=new D.LoadStats}var m=f.prototype;return m.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},m.abortInternal=function(){var v=this.response;(!v||!v.ok)&&(this.stats.aborted=!0,this.controller.abort())},m.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},m.load=function(v,R,p){var a=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var n=u(v,this.controller.signal),o=p.onProgress,S=v.responseType==="arraybuffer",b=S?"byteLength":"length";this.context=v,this.config=R,this.callbacks=p,this.request=this.fetchSetup(v,n),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){a.abortInternal(),p.onTimeout(r,v,a.response)},R.timeout),self.fetch(this.request).then(function(g){if(a.response=a.loader=g,!g.ok){var U=g.status,K=g.statusText;throw new l(K||"fetch, bad network response",U,g)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(g.headers.get("Content-Length")||"0"),o&&Object(Q.isFiniteNumber)(R.highWaterMark)?a.loadProgressively(g,r,v,R.highWaterMark,o):S?g.arrayBuffer():g.text()}).then(function(g){var U=a.response;self.clearTimeout(a.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first),r.loaded=r.total=g[b];var K={url:U.url,data:g};o&&!Object(Q.isFiniteNumber)(R.highWaterMark)&&o(r,v,g,U),p.onSuccess(K,r,v,U)}).catch(function(g){if(self.clearTimeout(a.requestTimeout),r.aborted)return;var U=g.code||0;p.onError({code:U,text:g.message},v,g.details)})},m.getCacheAge=function(){var v=null;if(this.response){var R=this.response.headers.get("age");v=R?parseFloat(R):null}return v},m.loadProgressively=function(v,R,p,a,r){a===void 0&&(a=0);var n=new w.default,o=v.body.getReader(),S=function b(){return o.read().then(function(g){if(g.done)return n.dataLength&&r(R,p,n.flush(),v),Promise.resolve(new ArrayBuffer(0));var U=g.value,K=U.length;return R.loaded+=K,K<a||n.dataLength?(n.push(U),n.dataLength>=a&&r(R,p,n.flush(),v)):r(R,p,U,v),b()}).catch(function(){return Promise.reject()})};return S()},f}();function u(f,m){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:m,headers:new self.Headers(T({},f.headers))};return f.rangeEnd&&E.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),E}function s(f,m){return new self.Request(f.url,m)}var l=function(f){_(m,f);function m(E,v,R){var p;return p=f.call(this,E)||this,p.code=void 0,p.details=void 0,p.code=v,p.details=R,p}return m}(c(Error));N.default=B},"./src/utils/imsc1-ttml-parser.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"IMSC1_CODEC",function(){return i}),L.d(N,"parseIMSC1",function(){return y});var Q=L("./src/utils/mp4-tools.ts"),D=L("./src/utils/vttparser.ts"),w=L("./src/utils/vttcue.ts"),_=L("./src/demux/id3.ts"),c=L("./src/utils/timescale-conversion.ts"),C=L("./src/utils/webvtt-parser.ts");function x(){return x=Object.assign||function(a){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(a[o]=n[o])}return a},x.apply(this,arguments)}var i="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,O=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,T={left:"start",center:"center",right:"end",start:"start",end:"end"};function y(a,r,n,o,S){var b=Object(Q.findBox)(new Uint8Array(a),["mdat"]);if(b.length===0){S(new Error("Could not parse IMSC1 mdat"));return}var g=b[0],U=Object(_.utf8ArrayToStr)(new Uint8Array(a,g.start,g.end-g.start)),K=Object(c.toTimescaleFromScale)(r,1,n);try{o(B(U,K))}catch(W){S(W)}}function B(a,r){var n=new DOMParser,o=n.parseFromString(a,"text/xml"),S=o.getElementsByTagName("tt")[0];if(!S)throw new Error("Invalid ttml");var b={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(b).reduce(function(Y,V){return Y[V]=S.getAttribute("ttp:"+V)||b[V],Y},{}),U=S.getAttribute("xml:space")!=="preserve",K=s(u(S,"styling","style")),W=s(u(S,"layout","region")),q=u(S,"body","[begin]");return[].map.call(q,function(Y){var V=l(Y,U);if(!V||!Y.hasAttribute("begin"))return null;var te=v(Y.getAttribute("begin"),g),X=v(Y.getAttribute("dur"),g),se=v(Y.getAttribute("end"),g);if(te===null)throw E(Y);if(se===null){if(X===null)throw E(Y);se=te+X}var le=new w.default(te-r,se-r,V);le.id=Object(C.generateCueId)(le.startTime,le.endTime,le.text);var Te=W[Y.getAttribute("region")],Ee=K[Y.getAttribute("style")];le.position=10,le.size=80;var Be=f(Te,Ee),De=Be.textAlign;if(De){var Ve=T[De];Ve&&(le.lineAlign=Ve),le.align=De}return x(le,Be),le}).filter(function(Y){return Y!==null})}function u(a,r,n){var o=a.getElementsByTagName(r)[0];return o?[].slice.call(o.querySelectorAll(n)):[]}function s(a){return a.reduce(function(r,n){var o=n.getAttribute("xml:id");return o&&(r[o]=n),r},{})}function l(a,r){return[].slice.call(a.childNodes).reduce(function(n,o,S){var b;return o.nodeName==="br"&&S?n+`
|
|
`:(b=o.childNodes)!==null&&b!==void 0&&b.length?l(o,r):r?n+o.textContent.trim().replace(/\s+/g," "):n+o.textContent},"")}function f(a,r){var n="http://www.w3.org/ns/ttml#styling",o=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return o.reduce(function(S,b){var g=m(r,n,b)||m(a,n,b);return g&&(S[b]=g),S},{})}function m(a,r,n){return a.hasAttributeNS(r,n)?a.getAttributeNS(r,n):null}function E(a){return new Error("Could not parse ttml timestamp "+a)}function v(a,r){if(!a)return null;var n=Object(D.parseTimeStamp)(a);return n===null&&(h.test(a)?n=R(a,r):O.test(a)&&(n=p(a,r))),n}function R(a,r){var n=h.exec(a),o=(n[4]|0)+(n[5]|0)/r.subFrameRate;return(n[1]|0)*3600+(n[2]|0)*60+(n[3]|0)+o/r.frameRate}function p(a,r){var n=O.exec(a),o=Number(n[1]),S=n[2];switch(S){case"h":return o*3600;case"m":return o*60;case"ms":return o*1e3;case"f":return o/r.frameRate;case"t":return o/r.tickRate}return o}},"./src/utils/logger.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"enableLogs",function(){return C}),L.d(N,"logger",function(){return x});var Q=function(){},D={trace:Q,debug:Q,log:Q,warn:Q,info:Q,error:Q},w=D;function _(i){var h=self.console[i];return h?h.bind(self.console,"["+i+"] >"):Q}function c(i){for(var h=arguments.length,O=new Array(h>1?h-1:0),T=1;T<h;T++)O[T-1]=arguments[T];O.forEach(function(y){w[y]=i[y]?i[y].bind(i):_(y)})}function C(i){if(self.console&&i===!0||typeof i=="object"){c(i,"debug","log","info","warn","error");try{w.log()}catch(h){w=D}}else w=D}var x=w},"./src/utils/mediakeys-helper.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"KeySystems",function(){return Q}),L.d(N,"requestMediaKeySystemAccess",function(){return D});var Q;(function(w){w.WIDEVINE="com.widevine.alpha",w.PLAYREADY="com.microsoft.playready"})(Q||(Q={}));var D=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"getMediaSource",function(){return Q});function Q(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"bin2str",function(){return c}),L.d(N,"readUint16",function(){return C}),L.d(N,"readUint32",function(){return x}),L.d(N,"writeUint32",function(){return i}),L.d(N,"findBox",function(){return h}),L.d(N,"parseSegmentIndex",function(){return O}),L.d(N,"parseInitSegment",function(){return T}),L.d(N,"getStartDTS",function(){return y}),L.d(N,"getDuration",function(){return B}),L.d(N,"computeRawDurationFromSamples",function(){return u}),L.d(N,"offsetStartDTS",function(){return s}),L.d(N,"segmentValidRange",function(){return l}),L.d(N,"appendUint8Array",function(){return f});var Q=L("./src/utils/typed-array.ts"),D=L("./src/loader/fragment.ts"),w=Math.pow(2,32)-1,_=[].push;function c(m){return String.fromCharCode.apply(null,m)}function C(m,E){"data"in m&&(E+=m.start,m=m.data);var v=m[E]<<8|m[E+1];return v<0?65536+v:v}function x(m,E){"data"in m&&(E+=m.start,m=m.data);var v=m[E]<<24|m[E+1]<<16|m[E+2]<<8|m[E+3];return v<0?4294967296+v:v}function i(m,E,v){"data"in m&&(E+=m.start,m=m.data),m[E]=v>>24,m[E+1]=v>>16&255,m[E+2]=v>>8&255,m[E+3]=v&255}function h(m,E){var v=[];if(!E.length)return v;var R,p,a;"data"in m?(R=m.data,p=m.start,a=m.end):(R=m,p=0,a=R.byteLength);for(var r=p;r<a;){var n=x(R,r),o=c(R.subarray(r+4,r+8)),S=n>1?r+n:a;if(o===E[0])if(E.length===1)v.push({data:R,start:r+8,end:S});else{var b=h({data:R,start:r+8,end:S},E.slice(1));b.length&&_.apply(v,b)}r=S}return v}function O(m){var E=h(m,["moov"]),v=E[0],R=v?v.end:null,p=h(m,["sidx"]);if(!p||!p[0])return null;var a=[],r=p[0],n=r.data[0],o=n===0?8:16,S=x(r,o);o+=4;var b=0,g=0;n===0?o+=8:o+=16,o+=2;var U=r.end+g,K=C(r,o);o+=2;for(var W=0;W<K;W++){var q=o,Y=x(r,q);q+=4;var V=Y&2147483647,te=(Y&2147483648)>>>31;if(te===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var X=x(r,q);q+=4,a.push({referenceSize:V,subsegmentDuration:X,info:{duration:X/S,start:U,end:U+V-1}}),U+=V,q+=4,o=q}return{earliestPresentationTime:b,timescale:S,version:n,referencesCount:K,references:a,moovEndOffset:R}}function T(m){for(var E=[],v=h(m,["moov","trak"]),R=0;R<v.length;R++){var p=v[R],a=h(p,["tkhd"])[0];if(a){var r=a.data[a.start],n=r===0?12:20,o=x(a,n),S=h(p,["mdia","mdhd"])[0];if(S){r=S.data[S.start],n=r===0?12:20;var b=x(S,n),g=h(p,["mdia","hdlr"])[0];if(g){var U=c(g.data.subarray(g.start+8,g.start+12)),K={soun:D.ElementaryStreamTypes.AUDIO,vide:D.ElementaryStreamTypes.VIDEO}[U];if(K){var W=h(p,["mdia","minf","stbl","stsd"])[0],q=void 0;W&&(q=c(W.data.subarray(W.start+12,W.start+16))),E[o]={timescale:b,type:K},E[K]={timescale:b,id:o,codec:q}}}}}}var Y=h(m,["moov","mvex","trex"]);return Y.forEach(function(V){var te=x(V,4),X=E[te];X&&(X.default={duration:x(V,12),flags:x(V,20)})}),E}function y(m,E){return h(E,["moof","traf"]).reduce(function(v,R){var p=h(R,["tfdt"])[0],a=p.data[p.start],r=h(R,["tfhd"]).reduce(function(n,o){var S=x(o,4),b=m[S];if(b){var g=x(p,4);a===1&&(g*=Math.pow(2,32),g+=x(p,8));var U=b.timescale||9e4,K=g/U;if(isFinite(K)&&(n===null||K<n))return K}return n},null);return r!==null&&isFinite(r)&&(v===null||r<v)?r:v},null)||0}function B(m,E){for(var v=0,R=0,p=0,a=h(m,["moof","traf"]),r=0;r<a.length;r++){var n=a[r],o=h(n,["tfhd"])[0],S=x(o,4),b=E[S];if(!b)continue;var g=b.default,U=x(o,0)|(g==null?void 0:g.flags),K=g==null?void 0:g.duration;U&8&&(U&2?K=x(o,12):K=x(o,8));for(var W=b.timescale||9e4,q=h(n,["trun"]),Y=0;Y<q.length;Y++){if(K){var V=x(q[Y],4);v=K*V}else v=u(q[Y]);b.type===D.ElementaryStreamTypes.VIDEO?R+=v/W:b.type===D.ElementaryStreamTypes.AUDIO&&(p+=v/W)}}if(R===0&&p===0){var te=O(m);if(te!=null&&te.references)return te.references.reduce(function(X,se){return X+se.info.duration||0},0)}return R||p}function u(m){var E=x(m,0),v=8;E&1&&(v+=4),E&4&&(v+=4);for(var R=0,p=x(m,4),a=0;a<p;a++){if(E&256){var r=x(m,v);R+=r,v+=4}E&512&&(v+=4),E&1024&&(v+=4),E&2048&&(v+=4)}return R}function s(m,E,v){h(E,["moof","traf"]).forEach(function(R){h(R,["tfhd"]).forEach(function(p){var a=x(p,4),r=m[a];if(!r)return;var n=r.timescale||9e4;h(R,["tfdt"]).forEach(function(o){var S=o.data[o.start],b=x(o,4);if(S===0)i(o,4,b-v*n);else{b*=Math.pow(2,32),b+=x(o,8),b-=v*n,b=Math.max(b,0);var g=Math.floor(b/(w+1)),U=Math.floor(b%(w+1));i(o,4,g),i(o,8,U)}})})})}function l(m){var E={valid:null,remainder:null},v=h(m,["moof"]);if(v){if(v.length<2)return E.remainder=m,E}else return E;var R=v[v.length-1];return E.valid=Object(Q.sliceUint8)(m,0,R.start-8),E.remainder=Object(Q.sliceUint8)(m,R.start-8),E}function f(m,E){var v=new Uint8Array(m.length+E.length);return v.set(m),v.set(E,m.length),v}},"./src/utils/output-filter.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"default",function(){return Q});var Q=function(){function D(_,c){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=_,this.trackName=c}var w=D.prototype;return w.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},w.newCue=function(c,C,x){(this.startTime===null||this.startTime>c)&&(this.startTime=c),this.endTime=C,this.screen=x,this.timelineController.createCaptionsTrack(this.trackName)},w.reset=function(){this.cueRanges=[]},D}()},"./src/utils/texttrack-utils.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"sendAddTrackEvent",function(){return D}),L.d(N,"addCueToTrack",function(){return w}),L.d(N,"clearCurrentCues",function(){return _}),L.d(N,"removeCuesInRange",function(){return c}),L.d(N,"getCuesInRange",function(){return x});var Q=L("./src/utils/logger.ts");function D(i,h){var O;try{O=new Event("addtrack")}catch(T){O=document.createEvent("Event"),O.initEvent("addtrack",!1,!1)}O.track=i,h.dispatchEvent(O)}function w(i,h){var O=i.mode;if(O==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(h.id))try{if(i.addCue(h),!i.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(y){Q.logger.debug("[texttrack-utils]: "+y);var T=new self.TextTrackCue(h.startTime,h.endTime,h.text);T.id=h.id,i.addCue(T)}O==="disabled"&&(i.mode=O)}function _(i){var h=i.mode;if(h==="disabled"&&(i.mode="hidden"),i.cues)for(var O=i.cues.length;O--;)i.removeCue(i.cues[O]);h==="disabled"&&(i.mode=h)}function c(i,h,O){var T=i.mode;if(T==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var y=x(i.cues,h,O),B=0;B<y.length;B++)i.removeCue(y[B]);T==="disabled"&&(i.mode=T)}function C(i,h){if(h<i[0].startTime)return 0;var O=i.length-1;if(h>i[O].endTime)return-1;for(var T=0,y=O;T<=y;){var B=Math.floor((y+T)/2);if(h<i[B].startTime)y=B-1;else if(h>i[B].startTime&&T<O)T=B+1;else return B}return i[T].startTime-h<h-i[y].startTime?T:y}function x(i,h,O){var T=[],y=C(i,h);if(y>-1)for(var B=y,u=i.length;B<u;B++){var s=i[B];if(s.startTime>=h&&s.endTime<=O)T.push(s);else if(s.startTime>O)return T}return T}},"./src/utils/time-ranges.ts":function(J,N,L){"use strict";L.r(N);var Q={toString:function(w){for(var _="",c=w.length,C=0;C<c;C++)_+="["+w.start(C).toFixed(3)+","+w.end(C).toFixed(3)+"]";return _}};N.default=Q},"./src/utils/timescale-conversion.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"toTimescaleFromBase",function(){return D}),L.d(N,"toTimescaleFromScale",function(){return w}),L.d(N,"toMsFromMpegTsClock",function(){return _}),L.d(N,"toMpegTsClockFromTimescale",function(){return c});var Q=9e4;function D(C,x,i,h){i===void 0&&(i=1),h===void 0&&(h=!1);var O=C*x*i;return h?Math.round(O):O}function w(C,x,i,h){return i===void 0&&(i=1),h===void 0&&(h=!1),D(C,x,1/i,h)}function _(C,x){return x===void 0&&(x=!1),D(C,1e3,1/Q,x)}function c(C,x){return x===void 0&&(x=1),D(C,Q,1/x)}},"./src/utils/typed-array.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"sliceUint8",function(){return Q});function Q(D,w,_){return Uint8Array.prototype.slice?D.slice(w,_):new Uint8Array(Array.prototype.slice.call(D,w,_))}},"./src/utils/vttcue.ts":function(J,N,L){"use strict";L.r(N),N.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Q=["","lr","rl"],D=["start","middle","end","left","right"];function w(i,h){if(typeof h!="string")return!1;if(!Array.isArray(i))return!1;var O=h.toLowerCase();return~i.indexOf(O)?O:!1}function _(i){return w(Q,i)}function c(i){return w(D,i)}function C(i){for(var h=arguments.length,O=new Array(h>1?h-1:0),T=1;T<h;T++)O[T-1]=arguments[T];for(var y=1;y<arguments.length;y++){var B=arguments[y];for(var u in B)i[u]=B[u]}return i}function x(i,h,O){var T=this,y={enumerable:!0};T.hasBeenReset=!1;var B="",u=!1,s=i,l=h,f=O,m=null,E="",v=!0,R="auto",p="start",a=50,r="middle",n=50,o="middle";Object.defineProperty(T,"id",C({},y,{get:function(){return B},set:function(b){B=""+b}})),Object.defineProperty(T,"pauseOnExit",C({},y,{get:function(){return u},set:function(b){u=!!b}})),Object.defineProperty(T,"startTime",C({},y,{get:function(){return s},set:function(b){if(typeof b!="number")throw new TypeError("Start time must be set to a number.");s=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"endTime",C({},y,{get:function(){return l},set:function(b){if(typeof b!="number")throw new TypeError("End time must be set to a number.");l=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"text",C({},y,{get:function(){return f},set:function(b){f=""+b,this.hasBeenReset=!0}})),Object.defineProperty(T,"region",C({},y,{get:function(){return m},set:function(b){m=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"vertical",C({},y,{get:function(){return E},set:function(b){var g=_(b);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=g,this.hasBeenReset=!0}})),Object.defineProperty(T,"snapToLines",C({},y,{get:function(){return v},set:function(b){v=!!b,this.hasBeenReset=!0}})),Object.defineProperty(T,"line",C({},y,{get:function(){return R},set:function(b){if(typeof b!="number"&&b!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"lineAlign",C({},y,{get:function(){return p},set:function(b){var g=c(b);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");p=g,this.hasBeenReset=!0}})),Object.defineProperty(T,"position",C({},y,{get:function(){return a},set:function(b){if(b<0||b>100)throw new Error("Position must be between 0 and 100.");a=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"positionAlign",C({},y,{get:function(){return r},set:function(b){var g=c(b);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");r=g,this.hasBeenReset=!0}})),Object.defineProperty(T,"size",C({},y,{get:function(){return n},set:function(b){if(b<0||b>100)throw new Error("Size must be between 0 and 100.");n=b,this.hasBeenReset=!0}})),Object.defineProperty(T,"align",C({},y,{get:function(){return o},set:function(b){var g=c(b);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");o=g,this.hasBeenReset=!0}})),T.displayState=void 0}return x.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},x}()},"./src/utils/vttparser.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"parseTimeStamp",function(){return w}),L.d(N,"fixLineBreaks",function(){return h}),L.d(N,"VTTParser",function(){return O});var Q=L("./src/utils/vttcue.ts"),D=function(){function T(){}var y=T.prototype;return y.decode=function(u,s){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},T}();function w(T){function y(u,s,l,f){return(u|0)*3600+(s|0)*60+(l|0)+parseFloat(f||0)}var B=T.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return B?parseFloat(B[2])>59?y(B[2],B[3],0,B[4]):y(B[1],B[2],B[3],B[4]):null}var _=function(){function T(){this.values=Object.create(null)}var y=T.prototype;return y.set=function(u,s){!this.get(u)&&s!==""&&(this.values[u]=s)},y.get=function(u,s,l){return l?this.has(u)?this.values[u]:s[l]:this.has(u)?this.values[u]:s},y.has=function(u){return u in this.values},y.alt=function(u,s,l){for(var f=0;f<l.length;++f)if(s===l[f]){this.set(u,s);break}},y.integer=function(u,s){/^-?\d+$/.test(s)&&this.set(u,parseInt(s,10))},y.percent=function(u,s){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(s)){var l=parseFloat(s);if(l>=0&&l<=100)return this.set(u,l),!0}return!1},T}();function c(T,y,B,u){var s=u?T.split(u):[T];for(var l in s){if(typeof s[l]!="string")continue;var f=s[l].split(B);if(f.length!==2)continue;var m=f[0],E=f[1];y(m,E)}}var C=new Q.default(0,0,""),x=C.align==="middle"?"middle":"center";function i(T,y,B){var u=T;function s(){var m=w(T);if(m===null)throw new Error("Malformed timestamp: "+u);return T=T.replace(/^[^\sa-zA-Z-]+/,""),m}function l(m,E){var v=new _;c(m,function(a,r){var n;switch(a){case"region":for(var o=B.length-1;o>=0;o--)if(B[o].id===r){v.set(a,B[o].region);break}break;case"vertical":v.alt(a,r,["rl","lr"]);break;case"line":n=r.split(","),v.integer(a,n[0]),v.percent(a,n[0])&&v.set("snapToLines",!1),v.alt(a,n[0],["auto"]),n.length===2&&v.alt("lineAlign",n[1],["start",x,"end"]);break;case"position":n=r.split(","),v.percent(a,n[0]),n.length===2&&v.alt("positionAlign",n[1],["start",x,"end","line-left","line-right","auto"]);break;case"size":v.percent(a,r);break;case"align":v.alt(a,r,["start",x,"end","left","right"]);break}},/:/,/\s/),E.region=v.get("region",null),E.vertical=v.get("vertical","");var R=v.get("line","auto");R==="auto"&&C.line===-1&&(R=-1),E.line=R,E.lineAlign=v.get("lineAlign","start"),E.snapToLines=v.get("snapToLines",!0),E.size=v.get("size",100),E.align=v.get("align",x);var p=v.get("position","auto");p==="auto"&&C.position===50&&(p=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=p}function f(){T=T.replace(/^\s+/,"")}if(f(),y.startTime=s(),f(),T.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);T=T.substr(3),f(),y.endTime=s(),f(),l(T,y)}function h(T){return T.replace(/<br(?: \/)?>/gi,`
|
|
`)}var O=function(){function T(){this.state="INITIAL",this.buffer="",this.decoder=new D,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var y=T.prototype;return y.parse=function(u){var s=this;u&&(s.buffer+=s.decoder.decode(u,{stream:!0}));function l(){var p=s.buffer,a=0;for(p=h(p);a<p.length&&p[a]!=="\r"&&p[a]!==`
|
|
`;)++a;var r=p.substr(0,a);return p[a]==="\r"&&++a,p[a]===`
|
|
`&&++a,s.buffer=p.substr(a),r}function f(p){c(p,function(a,r){},/:/)}try{var m="";if(s.state==="INITIAL"){if(!/\r\n|\n/.test(s.buffer))return this;m=l();var E=m.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");s.state="HEADER"}for(var v=!1;s.buffer;){if(!/\r\n|\n/.test(s.buffer))return this;v?v=!1:m=l();switch(s.state){case"HEADER":/:/.test(m)?f(m):m||(s.state="ID");continue;case"NOTE":m||(s.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(m)){s.state="NOTE";break}if(!m)continue;if(s.cue=new Q.default(0,0,""),s.state="CUE",m.indexOf("-->")===-1){s.cue.id=m;continue}case"CUE":if(!s.cue){s.state="BADCUE";continue}try{i(m,s.cue,s.regionList)}catch(p){s.cue=null,s.state="BADCUE";continue}s.state="CUETEXT";continue;case"CUETEXT":{var R=m.indexOf("-->")!==-1;if(!m||R&&(v=!0)){s.oncue&&s.cue&&s.oncue(s.cue),s.cue=null,s.state="ID";continue}if(s.cue===null)continue;s.cue.text&&(s.cue.text+=`
|
|
`),s.cue.text+=m}continue;case"BADCUE":m||(s.state="ID")}}}catch(p){s.state==="CUETEXT"&&s.cue&&s.oncue&&s.oncue(s.cue),s.cue=null,s.state=s.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},y.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
|
|
|
|
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(s){u.onparsingerror&&u.onparsingerror(s)}return u.onflush&&u.onflush(),this},T}()},"./src/utils/webvtt-parser.ts":function(J,N,L){"use strict";L.r(N),L.d(N,"generateCueId",function(){return O}),L.d(N,"parseWebVTT",function(){return y});var Q=L("./src/polyfills/number.ts"),D=L("./src/utils/vttparser.ts"),w=L("./src/demux/id3.ts"),_=L("./src/utils/timescale-conversion.ts"),c=L("./src/remux/mp4-remuxer.ts"),C=/\r\n|\n\r|\n|\r/g,x=function(u,s,l){return l===void 0&&(l=0),u.substr(l,s.length)===s},i=function(u){var s=parseInt(u.substr(-3)),l=parseInt(u.substr(-6,2)),f=parseInt(u.substr(-9,2)),m=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(Q.isFiniteNumber)(s)||!Object(Q.isFiniteNumber)(l)||!Object(Q.isFiniteNumber)(f)||!Object(Q.isFiniteNumber)(m))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return s+=1e3*l,s+=60*1e3*f,s+=60*60*1e3*m,s},h=function(u){for(var s=5381,l=u.length;l;)s=s*33^u.charCodeAt(--l);return(s>>>0).toString()};function O(B,u,s){return h(B.toString())+h(u.toString())+h(s)}var T=function(u,s,l){var f=u[s],m=u[f.prevCC];if(!m||!m.new&&f.new){u.ccOffset=u.presentationOffset=f.start,f.new=!1;return}for(;(E=m)!==null&&E!==void 0&&E.new;){var E;u.ccOffset+=f.start-m.start,f.new=!1,f=m,m=u[f.prevCC]}u.presentationOffset=l};function y(B,u,s,l,f,m,E,v){var R=new D.VTTParser,p=Object(w.utf8ArrayToStr)(new Uint8Array(B)).trim().replace(C,`
|
|
`).split(`
|
|
`),a=[],r=Object(_.toMpegTsClockFromTimescale)(u,s),n="00:00.000",o=0,S=0,b,g=!0,U=!1;R.oncue=function(K){var W=l[f],q=l.ccOffset,Y=(o-r)/9e4;if(W!=null&&W.new&&(S!==void 0?q=l.ccOffset=W.start:T(l,f,Y)),Y&&(q=Y-l.presentationOffset),U){var V=K.endTime-K.startTime,te=Object(c.normalizePts)((K.startTime+q-S)*9e4,m*9e4)/9e4;K.startTime=te,K.endTime=te+V}var X=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(X)),K.id||(K.id=O(K.startTime,K.endTime,X)),K.endTime>0&&a.push(K)},R.onparsingerror=function(K){b=K},R.onflush=function(){if(b){v(b);return}E(a)},p.forEach(function(K){if(g)if(x(K,"X-TIMESTAMP-MAP=")){g=!1,U=!0,K.substr(16).split(",").forEach(function(W){x(W,"LOCAL:")?n=W.substr(6):x(W,"MPEGTS:")&&(o=parseInt(W.substr(7)))});try{S=i(n)/1e3}catch(W){U=!1,b=W}return}else K===""&&(g=!1);R.parse(K+`
|
|
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(J,N,L){"use strict";L.r(N);var Q=L("./src/utils/logger.ts"),D=L("./src/loader/load-stats.ts"),w=/^age:\s*[\d.]+\s*$/m,_=function(){function c(x){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=x?x.xhrSetup:null,this.stats=new D.LoadStats,this.retryDelay=0}var C=c.prototype;return C.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},C.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()))},C.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},C.load=function(i,h,O){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=h,this.callbacks=O,this.retryDelay=h.retryDelay,this.loadInternal()},C.loadInternal=function(){var i=this.config,h=this.context;if(!i)return;var O=this.loader=new self.XMLHttpRequest,T=this.stats;T.loading.first=0,T.loaded=0;var y=this.xhrSetup;try{if(y)try{y(O,h.url)}catch(s){O.open("GET",h.url,!0),y(O,h.url)}O.readyState||O.open("GET",h.url,!0);var B=this.context.headers;if(B)for(var u in B)O.setRequestHeader(u,B[u])}catch(s){this.callbacks.onError({code:O.status,text:s.message},h,O);return}h.rangeEnd&&O.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),O.onreadystatechange=this.readystatechange.bind(this),O.onprogress=this.loadprogress.bind(this),O.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),O.send()},C.readystatechange=function(){var i=this.context,h=this.loader,O=this.stats;if(!i||!h)return;var T=h.readyState,y=this.config;if(O.aborted)return;if(T>=2)if(self.clearTimeout(this.requestTimeout),O.loading.first===0&&(O.loading.first=Math.max(self.performance.now(),O.loading.start)),T===4){h.onreadystatechange=null,h.onprogress=null;var B=h.status;if(B>=200&&B<300){O.loading.end=Math.max(self.performance.now(),O.loading.first);var u,s;if(i.responseType==="arraybuffer"?(u=h.response,s=u.byteLength):(u=h.responseText,s=u.length),O.loaded=O.total=s,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(O,i,u,h),!this.callbacks)return;var f={url:h.responseURL,data:u};this.callbacks.onSuccess(f,O,i,h)}else O.retry>=y.maxRetry||B>=400&&B<499?(Q.logger.error(B+" while loading "+i.url),this.callbacks.onError({code:B,text:h.statusText},i,h)):(Q.logger.warn(B+" 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,y.maxRetryDelay),O.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),y.timeout)},C.loadtimeout=function(){Q.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},C.loadprogress=function(i){var h=this.stats;h.loaded=i.loaded,i.lengthComputable&&(h.total=i.total)},C.getCacheAge=function(){var i=null;if(this.loader&&w.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");i=h?parseFloat(h):null}return i},c}();N.default=_}}).default})},vHTk:function($e,me,z){$e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function($e,me,z){var J=z("SrGk"),N=z("bYtY");function L(w,_){J.call(this,w,_,["filter"],"__filter_in_use__","_shadowDom")}N.inherits(L,J),L.prototype.addWithoutUpdate=function(w,_){if(_&&Q(_.style)){var c;if(_._shadowDom){c=_._shadowDom;var C=this.getDefs(!0);C.contains(_._shadowDom)||this.addDom(c)}else c=this.add(_);this.markUsed(_);var x=c.getAttribute("id");w.style.filter="url(#"+x+")"}},L.prototype.add=function(w){var _=this.createElement("filter");return w._shadowDomId=w._shadowDomId||this.nextId++,_.setAttribute("id","zr"+this._zrId+"-shadow-"+w._shadowDomId),this.updateDom(w,_),this.addDom(_),_},L.prototype.update=function(w,_){var c=_.style;if(Q(c)){var C=this;J.prototype.update.call(this,_,function(){C.updateDom(_,_._shadowDom)})}else this.remove(w,_)},L.prototype.remove=function(w,_){_._shadowDomId!=null&&(this.removeDom(w),w.style.filter="")},L.prototype.updateDom=function(w,_){var c=_.getElementsByTagName("feDropShadow");c.length===0?c=this.createElement("feDropShadow"):c=c[0];var C=w.style,x=w.scale&&w.scale[0]||1,i=w.scale&&w.scale[1]||1,h,O,T,y;if(C.shadowBlur||C.shadowOffsetX||C.shadowOffsetY)h=C.shadowOffsetX||0,O=C.shadowOffsetY||0,T=C.shadowBlur,y=C.shadowColor;else if(C.textShadowBlur)h=C.textShadowOffsetX||0,O=C.textShadowOffsetY||0,T=C.textShadowBlur,y=C.textShadowColor;else{this.removeDom(_,C);return}c.setAttribute("dx",h/x),c.setAttribute("dy",O/i),c.setAttribute("flood-color",y);var B=T/2/x,u=T/2/i,s=B+" "+u;c.setAttribute("stdDeviation",s),_.setAttribute("x","-100%"),_.setAttribute("y","-100%"),_.setAttribute("width",Math.ceil(T/2*200)+"%"),_.setAttribute("height",Math.ceil(T/2*200)+"%"),_.appendChild(c),w._shadowDom=_},L.prototype.markUsed=function(w){w._shadowDom&&J.prototype.markUsed.call(this,w._shadowDom)};function Q(w){return w&&(w.shadowBlur||w.shadowOffsetX||w.shadowOffsetY||w.textShadowBlur||w.textShadowOffsetX||w.textShadowOffsetY)}var D=L;$e.exports=D},vWvF:function($e,me,z){var J=z("Bq2U"),N=z("SUKs"),L=z("bYtY"),Q=L.isString,D=L.isFunction,w=L.isObject,_=L.isArrayLike,c=L.indexOf,C=function(){this.animators=[]};C.prototype={constructor:C,animate:function(T,y){var B,u=!1,s=this,l=this.__zr;if(T){var f=T.split("."),m=s;u=f[0]==="shape";for(var E=0,v=f.length;E<v;E++){if(!m)continue;m=m[f[E]]}m&&(B=m)}else B=s;if(!B){N('Property "'+T+'" is not existed in element '+s.id);return}var R=s.animators,p=new J(B,y);return p.during(function(a){s.dirty(u)}).done(function(){R.splice(c(R,p),1)}),R.push(p),l&&l.animation.addAnimator(p),p},stopAnimation:function(T){for(var y=this.animators,B=y.length,u=0;u<B;u++)y[u].stop(T);return y.length=0,this},animateTo:function(T,y,B,u,s,l){x(this,T,y,B,u,s,l)},animateFrom:function(T,y,B,u,s,l){x(this,T,y,B,u,s,l,!0)}};function x(T,y,B,u,s,l,f,m){Q(u)?(l=s,s=u,u=0):D(s)?(l=s,s="linear",u=0):D(u)?(l=u,u=0):D(B)?(l=B,B=500):B||(B=500),T.stopAnimation(),i(T,"",T,y,B,u,m);var E=T.animators.slice(),v=E.length;function R(){v--,v||l&&l()}v||l&&l();for(var p=0;p<E.length;p++)E[p].done(R).start(s,f)}function i(T,y,B,u,s,l,f){var m={},E=0;for(var v in u){if(!u.hasOwnProperty(v))continue;B[v]!=null?w(u[v])&&!_(u[v])?i(T,y?y+"."+v:v,B[v],u[v],s,l,f):(f?(m[v]=B[v],h(T,y,v,u[v])):m[v]=u[v],E++):u[v]!=null&&!f&&h(T,y,v,u[v])}E>0&&T.animate(y,!1).when(s==null?500:s,m).delay(l||0)}function h(T,y,B,u){if(!y)T.attr(B,u);else{var s={};s[y]={},s[y][B]=u,T.attr(s)}}var O=C;$e.exports=O},wCXF:function($e,me,z){"use strict";z.d(me,"a",function(){return vt});var J=z("rePB"),N=z("VTBJ"),L=z("KQm4"),Q=z("U8pU"),D=z("ODXe"),w=z("q1tI"),_=z("TSYQ"),c=z.n(_),C=z("Gytx"),x=z.n(C),i=z("Kwbf"),h=z("t23M"),O=z("qx4F"),T=z("6eGT"),y=z("IBYe"),B=z("Ff2n"),u=z("c+Xe"),s=z("fyJ8"),l=z("biw7");function f(Qe,Pe,lt,pt,Ze){var st=lt[Qe]||{},Ke=lt[Pe]||{},Ie,Me;st.fixed==="left"?Ie=pt.left[Qe]:Ke.fixed==="right"&&(Me=pt.right[Pe]);var pe=!1,be=!1,ge=!1,Ce=!1,We=lt[Pe+1],Ne=lt[Qe-1];if(Ze==="rtl"){if(Ie!==void 0){var ut=Ne&&Ne.fixed==="left";Ce=!ut}else if(Me!==void 0){var Tt=We&&We.fixed==="right";ge=!Tt}}else if(Ie!==void 0){var Ut=We&&We.fixed==="left";pe=!Ut}else if(Me!==void 0){var St=Ne&&Ne.fixed==="right";be=!St}return{fixLeft:Ie,fixRight:Me,lastFixLeft:pe,firstFixRight:be,lastFixRight:ge,firstFixLeft:Ce,isSticky:pt.isSticky}}var m=z("sR1s");function E(Qe){var Pe=Qe.cells,lt=Qe.stickyOffsets,pt=Qe.flattenColumns,Ze=Qe.rowComponent,st=Qe.cellComponent,Ke=Qe.onHeaderRow,Ie=Qe.index,Me=w.useContext(l.a),pe=Me.prefixCls,be=Me.direction,ge;Ke&&(ge=Ke(Pe.map(function(We){return We.column}),Ie));var Ce=Object(m.a)(Pe.map(function(We){return We.column}));return w.createElement(Ze,Object.assign({},ge),Pe.map(function(We,Ne){var ut=We.column,Tt=f(We.colStart,We.colEnd,pt,lt,be),Ut;return ut&&ut.onHeaderCell&&(Ut=We.column.onHeaderCell(ut)),w.createElement(s.a,Object.assign({},We,{ellipsis:ut.ellipsis,align:ut.align,component:st,prefixCls:pe,key:Ce[Ne]},Tt,{additionalProps:Ut,rowType:"header"}))}))}E.displayName="HeaderRow";var v=E;function R(Qe){var Pe=[];function lt(Ke,Ie){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[Me]=Pe[Me]||[];var pe=Ie,be=Ke.filter(Boolean).map(function(ge){var Ce={key:ge.key,className:ge.className||"",children:ge.title,column:ge,colStart:pe},We=1,Ne=ge.children;return Ne&&Ne.length>0&&(We=lt(Ne,pe,Me+1).reduce(function(ut,Tt){return ut+Tt},0),Ce.hasSubColumns=!0),"colSpan"in ge&&(We=ge.colSpan),"rowSpan"in ge&&(Ce.rowSpan=ge.rowSpan),Ce.colSpan=We,Ce.colEnd=Ce.colStart+We-1,Pe[Me].push(Ce),pe+=We,We});return be}lt(Qe,0);for(var pt=Pe.length,Ze=function(Ie){Pe[Ie].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=pt-Ie)})},st=0;st<pt;st+=1)Ze(st);return Pe}function p(Qe){var Pe=Qe.stickyOffsets,lt=Qe.columns,pt=Qe.flattenColumns,Ze=Qe.onHeaderRow,st=w.useContext(l.a),Ke=st.prefixCls,Ie=st.getComponent,Me=w.useMemo(function(){return R(lt)},[lt]),pe=Ie(["header","wrapper"],"thead"),be=Ie(["header","row"],"tr"),ge=Ie(["header","cell"],"th");return w.createElement(pe,{className:"".concat(Ke,"-thead")},Me.map(function(Ce,We){var Ne=w.createElement(v,{key:We,flattenColumns:pt,cells:Ce,stickyOffsets:Pe,rowComponent:be,cellComponent:ge,onHeaderRow:Ze,index:We});return Ne}))}var a=p,r=z("hW8S");function n(Qe){for(var Pe=Qe.colWidths,lt=Qe.columns,pt=Qe.columCount,Ze=[],st=pt||lt.length,Ke=!1,Ie=st-1;Ie>=0;Ie-=1){var Me=Pe[Ie],pe=lt&<[Ie],be=pe&&pe[r.a];(Me||be||Ke)&&(Ze.unshift(w.createElement("col",Object.assign({key:Ie,style:{width:Me,minWidth:Me}},be))),Ke=!0)}return w.createElement("colgroup",null,Ze)}var o=n;function S(Qe,Pe){return Object(w.useMemo)(function(){for(var lt=[],pt=0;pt<Pe;pt+=1){var Ze=Qe[pt];if(Ze!==void 0)lt[pt]=Ze;else return null}return lt},[Qe.join("_"),Pe])}var b=w.forwardRef(function(Qe,Pe){var lt=Qe.noData,pt=Qe.columns,Ze=Qe.flattenColumns,st=Qe.colWidths,Ke=Qe.columCount,Ie=Qe.stickyOffsets,Me=Qe.direction,pe=Qe.fixHeader,be=Qe.offsetHeader,ge=Qe.stickyClassName,Ce=Qe.onScroll,We=Object(B.a)(Qe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ne=w.useContext(l.a),ut=Ne.prefixCls,Tt=Ne.scrollbarSize,Ut=Ne.isSticky,St=Ut&&!pe?0:Tt,_t=w.useRef(null),At=w.useCallback(function(xt){Object(u.b)(Pe,xt),Object(u.b)(_t,xt)},[]);w.useEffect(function(){var xt;function wt(qe){var Bt=qe.currentTarget,Ht=qe.deltaX;Ht&&(Ce({currentTarget:Bt,scrollLeft:Bt.scrollLeft+Ht}),qe.preventDefault())}return(xt=_t.current)===null||xt===void 0||xt.addEventListener("wheel",wt),function(){var qe;(qe=_t.current)===null||qe===void 0||qe.removeEventListener("wheel",wt)}},[]);var nt=Ze[Ze.length-1],rt={fixed:nt?nt.fixed:null,onHeaderCell:function(){return{className:"".concat(ut,"-cell-scrollbar")}}},xe=Object(w.useMemo)(function(){return St?[].concat(Object(L.a)(pt),[rt]):pt},[St,pt]),Fe=Object(w.useMemo)(function(){return St?[].concat(Object(L.a)(Ze),[rt]):Ze},[St,Ze]),dt=Object(w.useMemo)(function(){var xt=Ie.right,wt=Ie.left;return Object(N.a)(Object(N.a)({},Ie),{},{left:Me==="rtl"?[].concat(Object(L.a)(wt.map(function(qe){return qe+St})),[0]):wt,right:Me==="rtl"?xt:[].concat(Object(L.a)(xt.map(function(qe){return qe+St})),[0]),isSticky:Ut})},[St,Ie,Ut]),at=S(st,Ke);return w.createElement("div",{style:Object(N.a)({overflow:"hidden"},Ut?{top:be}:{}),ref:At,className:c()("".concat(ut,"-header"),Object(J.a)({},ge,!!ge))},w.createElement("table",{style:{tableLayout:"fixed",visibility:lt||at?null:"hidden"}},w.createElement(o,{colWidths:at?[].concat(Object(L.a)(at),[St]):[],columCount:Ke+1,columns:Fe}),w.createElement(a,Object.assign({},We,{stickyOffsets:dt,columns:xe,flattenColumns:Fe}))))});b.displayName="FixedHeader";var g=b,U=w.createContext(null),K=U;function W(Qe){var Pe=Qe.prefixCls,lt=Qe.children,pt=Qe.component,Ze=Qe.cellComponent,st=Qe.fixHeader,Ke=Qe.fixColumn,Ie=Qe.horizonScroll,Me=Qe.className,pe=Qe.expanded,be=Qe.componentWidth,ge=Qe.colSpan,Ce=w.useContext(l.a),We=Ce.scrollbarSize;return w.useMemo(function(){var Ne=lt;return Ke&&(Ne=w.createElement("div",{style:{width:be-(st?We:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},Ne)),w.createElement(pt,{className:Me,style:{display:pe?null:"none"}},w.createElement(s.a,{component:Ze,prefixCls:Pe,colSpan:ge},Ne))},[lt,pt,st,Ie,Me,pe,be,ge,We])}var q=W;function Y(Qe){var Pe=Qe.className,lt=Qe.style,pt=Qe.record,Ze=Qe.index,st=Qe.rowKey,Ke=Qe.getRowKey,Ie=Qe.rowExpandable,Me=Qe.expandedKeys,pe=Qe.onRow,be=Qe.indent,ge=be===void 0?0:be,Ce=Qe.rowComponent,We=Qe.cellComponent,Ne=Qe.childrenColumnName,ut=w.useContext(l.a),Tt=ut.prefixCls,Ut=ut.fixedInfoList,St=w.useContext(K),_t=St.fixHeader,At=St.fixColumn,nt=St.horizonScroll,rt=St.componentWidth,xe=St.flattenColumns,Fe=St.expandableType,dt=St.expandRowByClick,at=St.onTriggerExpand,xt=St.rowClassName,wt=St.expandedRowClassName,qe=St.indentSize,Bt=St.expandIcon,Ht=St.expandedRowRender,Nt=St.expandIconColumnIndex,Gt=w.useState(!1),Or=Object(D.a)(Gt,2),Pr=Or[0],yr=Or[1],jt=Me&&Me.has(Qe.recordKey);w.useEffect(function(){jt&&yr(!0)},[jt]);var Dr=Fe==="row"&&(!Ie||Ie(pt)),Wr=Fe==="nest",Mr=Ne&&pt&&pt[Ne],pr=Dr||Wr,Sr;pe&&(Sr=pe(pt,Ze));var mn=function(M){if(dt&&pr&&at(pt,M),Sr&&Sr.onClick){for(var P,$=arguments.length,ne=new Array($>1?$-1:0),ee=1;ee<$;ee++)ne[ee-1]=arguments[ee];(P=Sr).onClick.apply(P,[M].concat(ne))}},on;typeof xt=="string"?on=xt:typeof xt=="function"&&(on=xt(pt,Ze,ge));var fe=Object(m.a)(xe),ye=w.createElement(Ce,Object.assign({},Sr,{"data-row-key":st,className:c()(Pe,"".concat(Tt,"-row"),"".concat(Tt,"-row-level-").concat(ge),on,Sr&&Sr.className),style:Object(N.a)(Object(N.a)({},lt),Sr?Sr.style:null),onClick:mn}),xe.map(function(Z,M){var P=Z.render,$=Z.dataIndex,ne=Z.className,ee=fe[M],je=Ut[M],Ct;M===(Nt||0)&&Wr&&(Ct=w.createElement(w.Fragment,null,w.createElement("span",{style:{paddingLeft:"".concat(qe*ge,"px")},className:"".concat(Tt,"-row-indent indent-level-").concat(ge)}),Bt({prefixCls:Tt,expanded:jt,expandable:Mr,record:pt,onExpand:at})));var Ft;return Z.onCell&&(Ft=Z.onCell(pt,Ze)),w.createElement(s.a,Object.assign({className:ne,ellipsis:Z.ellipsis,align:Z.align,component:We,prefixCls:Tt,key:ee,record:pt,index:Ze,dataIndex:$,render:P,shouldCellUpdate:Z.shouldCellUpdate},je,{appendNode:Ct,additionalProps:Ft}))})),Ue;if(Dr&&(Pr||jt)){var et=Ht(pt,Ze,ge+1,jt),Je=wt&&wt(pt,Ze,ge);Ue=w.createElement(q,{expanded:jt,className:c()("".concat(Tt,"-expanded-row"),"".concat(Tt,"-expanded-row-level-").concat(ge+1),Je),prefixCls:Tt,fixHeader:_t,fixColumn:At,horizonScroll:nt,component:Ce,componentWidth:rt,cellComponent:We,colSpan:xe.length},et)}var Dt;return Mr&&jt&&(Dt=(pt[Ne]||[]).map(function(Z,M){var P=Ke(Z,M);return w.createElement(Y,Object.assign({},Qe,{key:P,rowKey:P,record:Z,recordKey:P,index:M,indent:ge+1}))})),w.createElement(w.Fragment,null,ye,Ue,Dt)}Y.displayName="BodyRow";var V=Y,te=w.createContext(null),X=te;function se(Qe){var Pe=Qe.columnKey,lt=Qe.onColumnResize,pt=w.useRef();return w.useEffect(function(){pt.current&<(Pe,pt.current.offsetWidth)},[]),w.createElement(h.a,{onResize:function(st){var Ke=st.offsetWidth;lt(Pe,Ke)}},w.createElement("td",{ref:pt,style:{padding:0,border:0,height:0}},w.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function le(Qe){var Pe=Qe.data,lt=Qe.getRowKey,pt=Qe.measureColumnWidth,Ze=Qe.expandedKeys,st=Qe.onRow,Ke=Qe.rowExpandable,Ie=Qe.emptyNode,Me=Qe.childrenColumnName,pe=w.useContext(X),be=pe.onColumnResize,ge=w.useContext(l.a),Ce=ge.prefixCls,We=ge.getComponent,Ne=w.useContext(K),ut=Ne.fixHeader,Tt=Ne.horizonScroll,Ut=Ne.flattenColumns,St=Ne.componentWidth;return w.useMemo(function(){var _t=We(["body","wrapper"],"tbody"),At=We(["body","row"],"tr"),nt=We(["body","cell"],"td"),rt;Pe.length?rt=Pe.map(function(Fe,dt){var at=lt(Fe,dt);return w.createElement(V,{key:at,rowKey:at,record:Fe,recordKey:at,index:dt,rowComponent:At,cellComponent:nt,expandedKeys:Ze,onRow:st,getRowKey:lt,rowExpandable:Ke,childrenColumnName:Me})}):rt=w.createElement(q,{expanded:!0,className:"".concat(Ce,"-placeholder"),prefixCls:Ce,fixHeader:ut,fixColumn:Tt,horizonScroll:Tt,component:At,componentWidth:St,cellComponent:nt,colSpan:Ut.length},Ie);var xe=Object(m.a)(Ut);return w.createElement(_t,{className:"".concat(Ce,"-tbody")},pt&&w.createElement("tr",{"aria-hidden":"true",className:"".concat(Ce,"-measure-row"),style:{height:0}},xe.map(function(Fe){return w.createElement(se,{key:Fe,columnKey:Fe,onColumnResize:be})})),rt)},[Pe,Ce,st,pt,Ze,lt,We,St,Ie,Ut])}var Te=w.memo(le);Te.displayName="Body";var Ee=Te,Be=z("wRmb"),De=z("xEkU"),Ve=z.n(De);function _e(Qe){var Pe=Object(w.useRef)(Qe),lt=Object(w.useState)({}),pt=Object(D.a)(lt,2),Ze=pt[1],st=Object(w.useRef)(null),Ke=Object(w.useRef)([]);function Ie(Me){st.current===null&&(Ke.current=[],st.current=Ve()(function(){Ke.current.forEach(function(pe){Pe.current=pe(Pe.current)}),st.current=null,Ze({})})),Ke.current.push(Me)}return Object(w.useEffect)(function(){return function(){Ve.a.cancel(st.current)}},[]),[Pe.current,Ie]}function Le(Qe){var Pe=Object(w.useRef)(Qe),lt=Object(w.useRef)(null);function pt(){window.clearTimeout(lt.current)}function Ze(Ke){Pe.current=Ke,pt(),lt.current=window.setTimeout(function(){Pe.current=null,lt.current=null},100)}function st(){return Pe.current}return Object(w.useEffect)(function(){return pt},[]),[Ze,st]}function tt(Qe,Pe,lt){var pt=Object(w.useMemo)(function(){for(var Ze=[],st=[],Ke=0,Ie=0,Me=0;Me<Pe;Me+=1)if(lt==="rtl"){st[Me]=Ie,Ie+=Qe[Me]||0;var pe=Pe-Me-1;Ze[pe]=Ke,Ke+=Qe[pe]||0}else{Ze[Me]=Ke,Ke+=Qe[Me]||0;var be=Pe-Me-1;st[be]=Ie,Ie+=Qe[be]||0}return{left:Ze,right:st}},[Qe,Pe,lt]);return pt}var Et=tt;function Oe(Qe){var Pe=Qe.className,lt=Qe.children;return w.createElement("div",{className:Pe},lt)}var He=Oe,it=z("n6Qo");function Ae(Qe){var Pe,lt=Qe.prefixCls,pt=Qe.record,Ze=Qe.onExpand,st=Qe.expanded,Ke=Qe.expandable,Ie="".concat(lt,"-row-expand-icon");if(!Ke)return w.createElement("span",{className:c()(Ie,"".concat(lt,"-row-spaced"))});var Me=function(be){Ze(pt,be),be.stopPropagation()};return w.createElement("span",{className:c()(Ie,(Pe={},Object(J.a)(Pe,"".concat(lt,"-row-expanded"),st),Object(J.a)(Pe,"".concat(lt,"-row-collapsed"),!st),Pe)),onClick:Me})}function re(Qe,Pe,lt){var pt=[];function Ze(st){(st||[]).forEach(function(Ke,Ie){pt.push(Pe(Ke,Ie)),Ze(Ke[lt])})}return Ze(Qe),pt}var ae=z("zT1h"),ce=z("y0+3"),we=function(Pe,lt){var pt,Ze,st=Pe.scrollBodyRef,Ke=Pe.onScroll,Ie=Pe.offsetScroll,Me=w.useContext(l.a),pe=Me.prefixCls,be=((pt=st.current)===null||pt===void 0?void 0:pt.scrollWidth)||0,ge=((Ze=st.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,Ce=be&&ge*(ge/be),We=w.useRef(),Ne=_e({scrollLeft:0,isHiddenScrollBar:!1}),ut=Object(D.a)(Ne,2),Tt=ut[0],Ut=ut[1],St=w.useRef({delta:0,x:0}),_t=w.useState(!1),At=Object(D.a)(_t,2),nt=At[0],rt=At[1],xe=function(){rt(!1)},Fe=function(qe){qe.persist(),St.current.delta=qe.pageX-Tt.scrollLeft,St.current.x=0,rt(!0),qe.preventDefault()},dt=function(qe){var Bt,Ht=qe||((Bt=window)===null||Bt===void 0?void 0:Bt.event),Nt=Ht.buttons;if(!nt||Nt===0){nt&&rt(!1);return}var Gt=St.current.x+qe.pageX-St.current.x-St.current.delta;Gt<=0&&(Gt=0),Gt+Ce>=ge&&(Gt=ge-Ce),Ke({scrollLeft:Gt/ge*(be+2)}),St.current.x=qe.pageX},at=function(){var qe=Object(ce.b)(st.current).top,Bt=qe+st.current.offsetHeight,Ht=document.documentElement.scrollTop+window.innerHeight;Bt-Object(O.a)()<=Ht||qe>=Ht-Ie?Ut(function(Nt){return Object(N.a)(Object(N.a)({},Nt),{},{isHiddenScrollBar:!0})}):Ut(function(Nt){return Object(N.a)(Object(N.a)({},Nt),{},{isHiddenScrollBar:!1})})},xt=function(qe){Ut(function(Bt){return Object(N.a)(Object(N.a)({},Bt),{},{scrollLeft:qe/be*ge||0})})};return w.useImperativeHandle(lt,function(){return{setScrollLeft:xt}}),w.useEffect(function(){var wt=Object(ae.a)(document.body,"mouseup",xe,!1),qe=Object(ae.a)(document.body,"mousemove",dt,!1);return at(),function(){wt.remove(),qe.remove()}},[Ce,nt]),w.useEffect(function(){var wt=Object(ae.a)(window,"scroll",at,!1),qe=Object(ae.a)(window,"resize",at,!1);return function(){wt.remove(),qe.remove()}},[]),w.useEffect(function(){Tt.isHiddenScrollBar||Ut(function(wt){var qe,Bt;return Object(N.a)(Object(N.a)({},wt),{},{scrollLeft:st.current.scrollLeft/((qe=st.current)===null||qe===void 0?void 0:qe.scrollWidth)*((Bt=st.current)===null||Bt===void 0?void 0:Bt.clientWidth)})})},[Tt.isHiddenScrollBar]),be<=ge||!Ce||Tt.isHiddenScrollBar?null:w.createElement("div",{style:{height:Object(O.a)(),width:ge,bottom:Ie},className:"".concat(pe,"-sticky-scroll")},w.createElement("div",{onMouseDown:Fe,ref:We,className:c()("".concat(pe,"-sticky-scroll-bar"),Object(J.a)({},"".concat(pe,"-sticky-scroll-bar-active"),nt)),style:{width:"".concat(Ce,"px"),transform:"translate3d(".concat(Tt.scrollLeft,"px, 0, 0)")}}))},Re=w.forwardRef(we);function ke(Qe,Pe){return w.useMemo(function(){var lt=!!Qe;return{isSticky:lt,stickyClassName:lt?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(Q.a)(Qe)==="object"&&Qe.offsetHeader||0,offsetScroll:Object(Q.a)(Qe)==="object"&&Qe.offsetScroll||0}},[Qe,Pe])}var ht=[],ft={},vt="rc-table-internal-hook",yt=w.memo(function(Qe){var Pe=Qe.children;return Pe},function(Qe,Pe){return x()(Qe.props,Pe.props)?Qe.pingLeft!==Pe.pingLeft||Qe.pingRight!==Pe.pingRight:!1});function Lt(Qe){var Pe,lt=Qe.prefixCls,pt=Qe.className,Ze=Qe.rowClassName,st=Qe.style,Ke=Qe.data,Ie=Qe.rowKey,Me=Qe.scroll,pe=Qe.tableLayout,be=Qe.direction,ge=Qe.title,Ce=Qe.footer,We=Qe.summary,Ne=Qe.id,ut=Qe.showHeader,Tt=Qe.components,Ut=Qe.emptyText,St=Qe.onRow,_t=Qe.onHeaderRow,At=Qe.internalHooks,nt=Qe.transformColumns,rt=Qe.internalRefs,xe=Qe.sticky,Fe=Ke||ht,dt=!!Fe.length,at=w.useState(0),xt=Object(D.a)(at,2),wt=xt[0],qe=xt[1];w.useEffect(function(){qe(Object(O.a)())});var Bt=w.useMemo(function(){return Object(m.c)(Tt,{})},[Tt]),Ht=w.useCallback(function(Vr,Qr){return Object(m.b)(Bt,Vr)||Qr},[Bt]),Nt=w.useMemo(function(){return typeof Ie=="function"?Ie:function(Vr){var Qr=Vr&&Vr[Ie];return Qr}},[Ie]),Gt=Object(r.c)(Qe),Or=Gt.expandIcon,Pr=Gt.expandedRowKeys,yr=Gt.defaultExpandedRowKeys,jt=Gt.defaultExpandAllRows,Dr=Gt.expandedRowRender,Wr=Gt.onExpand,Mr=Gt.onExpandedRowsChange,pr=Gt.expandRowByClick,Sr=Gt.rowExpandable,mn=Gt.expandIconColumnIndex,on=Gt.expandedRowClassName,fe=Gt.childrenColumnName,ye=Gt.indentSize,Ue=Or||Ae,et=fe||"children",Je=w.useMemo(function(){return Dr?"row":Qe.expandable&&At===vt&&Qe.expandable.__PARENT_RENDER_ICON__||Fe.some(function(Vr){return Vr&&Object(Q.a)(Vr)==="object"&&Vr[et]})?"nest":!1},[!!Dr,Fe]),Dt=w.useState(function(){return yr||(jt?re(Fe,Nt,et):[])}),Z=Object(D.a)(Dt,2),M=Z[0],P=Z[1],$=w.useMemo(function(){return new Set(Pr||M||[])},[Pr,M]),ne=w.useCallback(function(Vr){var Qr=Nt(Vr,Fe.indexOf(Vr)),Zr,ci=$.has(Qr);ci?($.delete(Qr),Zr=Object(L.a)($)):Zr=[].concat(Object(L.a)($),[Qr]),P(Zr),Wr&&Wr(!ci,Vr),Mr&&Mr(Zr)},[Nt,$,Fe,Wr,Mr]),ee=w.useState(0),je=Object(D.a)(ee,2),Ct=je[0],Ft=je[1],kt=Object(Be.b)(Object(N.a)(Object(N.a)(Object(N.a)({},Qe),Gt),{},{expandable:!!Dr,expandedKeys:$,getRowKey:Nt,onTriggerExpand:ne,expandIcon:Ue,expandIconColumnIndex:mn,direction:be}),At===vt?nt:null),bt=Object(D.a)(kt,2),Yt=bt[0],zt=bt[1],$t=w.useMemo(function(){return{columns:Yt,flattenColumns:zt}},[Yt,zt]),dr=w.useRef(),Rr=w.useRef(),mr=w.useRef(),_r=w.useState(!1),hr=Object(D.a)(_r,2),kr=hr[0],Nr=hr[1],qr=w.useState(!1),Yr=Object(D.a)(qr,2),rn=Yr[0],An=Yr[1],$r=_e(new Map),nn=Object(D.a)($r,2),sn=nn[0],cn=nn[1],dn=Object(m.a)(zt),Cr=dn.map(function(Vr){return sn.get(Vr)}),cr=w.useMemo(function(){return Cr},[Cr.join("_")]),sr=Et(cr,zt.length,be),nr=Me&&Object(m.d)(Me.y),Zt=Me&&Object(m.d)(Me.x),gr=Zt&&zt.some(function(Vr){var Qr=Vr.fixed;return Qr}),br=w.useRef(),xr=ke(xe,lt),vr=xr.isSticky,On=xr.offsetHeader,Hr=xr.offsetScroll,Cn=xr.stickyClassName,Hn,Ln,Jr;nr&&(Ln={overflowY:"scroll",maxHeight:Me.y}),Zt&&(Hn={overflowX:"auto"},nr||(Ln={overflowY:"hidden"}),Jr={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var Xn=w.useCallback(function(Vr,Qr){cn(function(Zr){var ci=new Map(Zr);return ci.set(Vr,Qr),ci})},[]),wn=Le(null),Yn=Object(D.a)(wn,2),Mn=Yn[0],oi=Yn[1];function Un(Vr,Qr){if(!Qr)return;typeof Qr=="function"?Qr(Vr):Qr.scrollLeft!==Vr&&(Qr.scrollLeft=Vr)}var gn=function(Qr){var Zr=Qr.currentTarget,ci=Qr.scrollLeft,Vi=typeof ci=="number"?ci:Zr.scrollLeft,Xi=Zr||ft;if(!oi()||oi()===Xi){var Za;Mn(Xi),Un(Vi,Rr.current),Un(Vi,mr.current),Un(Vi,(Za=br.current)===null||Za===void 0?void 0:Za.setScrollLeft)}if(Zr){var Do=Zr.scrollWidth,hs=Zr.clientWidth;Nr(Vi>0),An(Vi<Do-hs)}},Qn=function(){mr.current&&gn({currentTarget:mr.current})},li=function(Qr){var Zr=Qr.width;Qn(),Ft(dr.current?dr.current.offsetWidth:Zr)};w.useEffect(function(){return Qn},[]),w.useEffect(function(){Zt&&Qn()},[Zt]),w.useEffect(function(){At===vt&&rt&&(rt.body.current=mr.current)});var qt=Ht(["table"],"table"),er=w.useMemo(function(){return pe||(gr?Me.x==="max-content"?"auto":"fixed":nr||zt.some(function(Vr){var Qr=Vr.ellipsis;return Qr})?"fixed":"auto")},[nr,gr,zt,pe]),tr,wr={colWidths:cr,columCount:zt.length,stickyOffsets:sr,onHeaderRow:_t,fixHeader:nr},Ur=w.useMemo(function(){return dt?null:typeof Ut=="function"?Ut():Ut},[dt,Ut]),Tr=w.createElement(Ee,{data:Fe,measureColumnWidth:nr||Zt||vr,expandedKeys:$,rowExpandable:Sr,getRowKey:Nt,onRow:St,emptyNode:Ur,childrenColumnName:et}),Lr=w.createElement(o,{colWidths:zt.map(function(Vr){var Qr=Vr.width;return Qr}),columns:zt}),bn=We&&w.createElement(it.b,null,We(Fe)),Fn=Ht(["body"]);if(nr||vr){var Ir;typeof Fn=="function"?(Ir=Fn(Fe,{scrollbarSize:wt,ref:mr,onScroll:gn}),wr.colWidths=zt.map(function(Vr,Qr){var Zr=Vr.width,ci=Qr===Yt.length-1?Zr-wt:Zr;return typeof ci=="number"&&!Number.isNaN(ci)?ci:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ir=w.createElement("div",{style:Object(N.a)(Object(N.a)({},Hn),Ln),onScroll:gn,ref:mr,className:c()("".concat(lt,"-body"))},w.createElement(qt,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:er})},Lr,Tr,bn),vr&&w.createElement(Re,{ref:br,offsetScroll:Hr,scrollBodyRef:mr,onScroll:gn})),tr=w.createElement(w.Fragment,null,ut!==!1&&w.createElement(g,Object.assign({noData:!Fe.length},wr,$t,{direction:be,offsetHeader:On,stickyClassName:Cn,ref:Rr,onScroll:gn})),Ir)}else tr=w.createElement("div",{style:Object(N.a)(Object(N.a)({},Hn),Ln),className:c()("".concat(lt,"-content")),onScroll:gn,ref:mr},w.createElement(qt,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:er})},Lr,ut!==!1&&w.createElement(a,Object.assign({},wr,$t)),Tr,bn));var ei=Object(r.b)(Qe),Gr=w.createElement("div",Object.assign({className:c()(lt,pt,(Pe={},Object(J.a)(Pe,"".concat(lt,"-rtl"),be==="rtl"),Object(J.a)(Pe,"".concat(lt,"-ping-left"),kr),Object(J.a)(Pe,"".concat(lt,"-ping-right"),rn),Object(J.a)(Pe,"".concat(lt,"-layout-fixed"),pe==="fixed"),Object(J.a)(Pe,"".concat(lt,"-fixed-header"),nr),Object(J.a)(Pe,"".concat(lt,"-fixed-column"),gr),Object(J.a)(Pe,"".concat(lt,"-scroll-horizontal"),Zt),Object(J.a)(Pe,"".concat(lt,"-has-fix-left"),zt[0]&&zt[0].fixed),Object(J.a)(Pe,"".concat(lt,"-has-fix-right"),zt[zt.length-1]&&zt[zt.length-1].fixed==="right"),Pe)),style:st,id:Ne,ref:dr},ei),w.createElement(yt,{pingLeft:kr,pingRight:rn,props:Object(N.a)(Object(N.a)({},Qe),{},{stickyOffsets:sr,mergedExpandedKeys:$})},ge&&w.createElement(He,{className:"".concat(lt,"-title")},ge(Fe)),w.createElement("div",{className:"".concat(lt,"-container")},tr),Ce&&w.createElement(He,{className:"".concat(lt,"-footer")},Ce(Fe))));Zt&&(Gr=w.createElement(h.a,{onResize:li},Gr));var Dn=w.useMemo(function(){return{prefixCls:lt,getComponent:Ht,scrollbarSize:wt,direction:be,fixedInfoList:zt.map(function(Vr,Qr){return f(Qr,Qr,zt,sr,be)}),isSticky:vr}},[lt,Ht,wt,be,zt,sr,be,vr]),ui=w.useMemo(function(){return Object(N.a)(Object(N.a)({},$t),{},{tableLayout:er,rowClassName:Ze,expandedRowClassName:on,componentWidth:Ct,fixHeader:nr,fixColumn:gr,horizonScroll:Zt,expandIcon:Ue,expandableType:Je,expandRowByClick:pr,expandedRowRender:Dr,onTriggerExpand:ne,expandIconColumnIndex:mn,indentSize:ye})},[$t,er,Ze,on,Ct,nr,gr,Zt,Ue,Je,pr,Dr,ne,mn,ye]),Ai=w.useMemo(function(){return{onColumnResize:Xn}},[Xn]);return w.createElement(l.a.Provider,{value:Dn},w.createElement(K.Provider,{value:ui},w.createElement(X.Provider,{value:Ai},Gr)))}Lt.Column=y.a,Lt.ColumnGroup=T.a,Lt.Summary=it.a,Lt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Mt=me.b=Lt},wOnQ:function($e,me,z){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(J,N){$e.exports=N()})(this,function(){"use strict";/*! *****************************************************************************
|
|
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 J=function(k,F){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,H){j.__proto__=H}||function(j,H){for(var oe in H)Object.prototype.hasOwnProperty.call(H,oe)&&(j[oe]=H[oe])},J(k,F)};function N(k,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");J(k,F);function j(){this.constructor=k}k.prototype=F===null?Object.create(F):(j.prototype=F.prototype,new j)}var L=function(){return L=Object.assign||function(F){for(var j,H=1,oe=arguments.length;H<oe;H++){j=arguments[H];for(var he in j)Object.prototype.hasOwnProperty.call(j,he)&&(F[he]=j[he])}return F},L.apply(this,arguments)};function Q(k,F,j,H){function oe(he){return he instanceof j?he:new j(function(Se){Se(he)})}return new(j||(j=Promise))(function(he,Se){function Ge(gt){try{ot(H.next(gt))}catch(Ot){Se(Ot)}}function ze(gt){try{ot(H.throw(gt))}catch(Ot){Se(Ot)}}function ot(gt){gt.done?he(gt.value):oe(gt.value).then(Ge,ze)}ot((H=H.apply(k,F||[])).next())})}function D(k,F){var j={label:0,sent:function(){if(he[0]&1)throw he[1];return he[1]},trys:[],ops:[]},H,oe,he,Se;return Se={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Se[Symbol.iterator]=function(){return this}),Se;function Ge(ot){return function(gt){return ze([ot,gt])}}function ze(ot){if(H)throw new TypeError("Generator is already executing.");for(;j;)try{if(H=1,oe&&(he=ot[0]&2?oe.return:ot[0]?oe.throw||((he=oe.return)&&he.call(oe),0):oe.next)&&!(he=he.call(oe,ot[1])).done)return he;(oe=0,he)&&(ot=[ot[0]&2,he.value]);switch(ot[0]){case 0:case 1:he=ot;break;case 4:return j.label++,{value:ot[1],done:!1};case 5:j.label++,oe=ot[1],ot=[0];continue;case 7:ot=j.ops.pop(),j.trys.pop();continue;default:if(!(he=j.trys,he=he.length>0&&he[he.length-1])&&(ot[0]===6||ot[0]===2)){j=0;continue}if(ot[0]===3&&(!he||ot[1]>he[0]&&ot[1]<he[3])){j.label=ot[1];break}if(ot[0]===6&&j.label<he[1]){j.label=he[1],he=ot;break}if(he&&j.label<he[2]){j.label=he[2],j.ops.push(ot);break}he[2]&&j.ops.pop(),j.trys.pop();continue}ot=F.call(k,j)}catch(gt){ot=[6,gt],oe=0}finally{H=he=0}if(ot[0]&5)throw ot[1];return{value:ot[0]?ot[1]:void 0,done:!0}}}function w(k,F,j){if(j||arguments.length===2)for(var H=0,oe=F.length,he;H<oe;H++)(he||!(H in F))&&(he||(he=Array.prototype.slice.call(F,0,H)),he[H]=F[H]);return k.concat(he||F)}for(var _=function(){function k(F,j,H,oe){this.left=F,this.top=j,this.width=H,this.height=oe}return k.prototype.add=function(F,j,H,oe){return new k(this.left+F,this.top+j,this.width+H,this.height+oe)},k.fromClientRect=function(F,j){return new k(j.left+F.windowBounds.left,j.top+F.windowBounds.top,j.width,j.height)},k.fromDOMRectList=function(F,j){var H=Array.from(j).find(function(oe){return oe.width!==0});return H?new k(H.left+F.windowBounds.left,H.top+F.windowBounds.top,H.width,H.height):k.EMPTY},k.EMPTY=new k(0,0,0,0),k}(),c=function(k,F){return _.fromClientRect(k,F.getBoundingClientRect())},C=function(k){var F=k.body,j=k.documentElement;if(!F||!j)throw new Error("Unable to get document size");var H=Math.max(Math.max(F.scrollWidth,j.scrollWidth),Math.max(F.offsetWidth,j.offsetWidth),Math.max(F.clientWidth,j.clientWidth)),oe=Math.max(Math.max(F.scrollHeight,j.scrollHeight),Math.max(F.offsetHeight,j.offsetHeight),Math.max(F.clientHeight,j.clientHeight));return new _(0,0,H,oe)},x=function(k){for(var F=[],j=0,H=k.length;j<H;){var oe=k.charCodeAt(j++);if(oe>=55296&&oe<=56319&&j<H){var he=k.charCodeAt(j++);(he&64512)===56320?F.push(((oe&1023)<<10)+(he&1023)+65536):(F.push(oe),j--)}else F.push(oe)}return F},i=function(){for(var k=[],F=0;F<arguments.length;F++)k[F]=arguments[F];if(String.fromCodePoint)return String.fromCodePoint.apply(String,k);var j=k.length;if(!j)return"";for(var H=[],oe=-1,he="";++oe<j;){var Se=k[oe];Se<=65535?H.push(Se):(Se-=65536,H.push((Se>>10)+55296,Se%1024+56320)),(oe+1===j||H.length>16384)&&(he+=String.fromCharCode.apply(String,H),H.length=0)}return he},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),T=0;T<h.length;T++)O[h.charCodeAt(T)]=T;for(var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),u=0;u<y.length;u++)B[y.charCodeAt(u)]=u;for(var s=function(k){var F=k.length*.75,j=k.length,H,oe=0,he,Se,Ge,ze;k[k.length-1]==="="&&(F--,k[k.length-2]==="="&&F--);var ot=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(F):new Array(F),gt=Array.isArray(ot)?ot:new Uint8Array(ot);for(H=0;H<j;H+=4)he=B[k.charCodeAt(H)],Se=B[k.charCodeAt(H+1)],Ge=B[k.charCodeAt(H+2)],ze=B[k.charCodeAt(H+3)],gt[oe++]=he<<2|Se>>4,gt[oe++]=(Se&15)<<4|Ge>>2,gt[oe++]=(Ge&3)<<6|ze&63;return ot},l=function(k){for(var F=k.length,j=[],H=0;H<F;H+=2)j.push(k[H+1]<<8|k[H]);return j},f=function(k){for(var F=k.length,j=[],H=0;H<F;H+=4)j.push(k[H+3]<<24|k[H+2]<<16|k[H+1]<<8|k[H]);return j},m=5,E=6+5,v=2,R=E-m,p=65536>>m,a=1<<m,r=a-1,n=1024>>m,o=p+n,S=o,b=2048>>6,g=S+b,U=65536>>E,K=1<<R,W=K-1,q=function(k,F,j){return k.slice?k.slice(F,j):new Uint16Array(Array.prototype.slice.call(k,F,j))},Y=function(k,F,j){return k.slice?k.slice(F,j):new Uint32Array(Array.prototype.slice.call(k,F,j))},V=function(k,F){var j=s(k),H=Array.isArray(j)?f(j):new Uint32Array(j),oe=Array.isArray(j)?l(j):new Uint16Array(j),he=24,Se=q(oe,he/2,H[4]/2),Ge=H[5]===2?q(oe,(he+H[4])/2):Y(H,Math.ceil((he+H[4])/4));return new te(H[0],H[1],H[2],H[3],Se,Ge)},te=function(){function k(F,j,H,oe,he,Se){this.initialValue=F,this.errorValue=j,this.highStart=H,this.highValueIndex=oe,this.index=he,this.data=Se}return k.prototype.get=function(F){var j;if(F>=0){if(F<55296||F>56319&&F<=65535)return j=this.index[F>>m],j=(j<<v)+(F&r),this.data[j];if(F<=65535)return j=this.index[p+(F-55296>>m)],j=(j<<v)+(F&r),this.data[j];if(F<this.highStart)return j=g-U+(F>>E),j=this.index[j],j+=F>>m&W,j=this.index[j],j=(j<<v)+(F&r),this.data[j];if(F<=1114111)return this.data[this.highValueIndex]}return this.errorValue},k}(),X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",se=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),le=0;le<X.length;le++)se[X.charCodeAt(le)]=le;var Te="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Ee=50,Be=1,De=2,Ve=3,_e=4,Le=5,tt=7,Et=8,Oe=9,He=10,it=11,Ae=12,re=13,ae=14,ce=15,we=16,Re=17,ke=18,ht=19,ft=20,vt=21,yt=22,Lt=23,Mt=24,Qe=25,Pe=26,lt=27,pt=28,Ze=29,st=30,Ke=31,Ie=32,Me=33,pe=34,be=35,ge=36,Ce=37,We=38,Ne=39,ut=40,Tt=41,Ut=42,St=43,_t=[9001,65288],At="!",nt="\xD7",rt="\xF7",xe=V(Te),Fe=[st,ge],dt=[Be,De,Ve,Le],at=[He,Et],xt=[lt,Pe],wt=dt.concat(at),qe=[We,Ne,ut,pe,be],Bt=[ce,re],Ht=function(k,F){F===void 0&&(F="strict");var j=[],H=[],oe=[];return k.forEach(function(he,Se){var Ge=xe.get(he);if(Ge>Ee?(oe.push(!0),Ge-=Ee):oe.push(!1),["normal","auto","loose"].indexOf(F)!==-1&&[8208,8211,12316,12448].indexOf(he)!==-1)return H.push(Se),j.push(we);if(Ge===_e||Ge===it){if(Se===0)return H.push(Se),j.push(st);var ze=j[Se-1];return wt.indexOf(ze)===-1?(H.push(H[Se-1]),j.push(ze)):(H.push(Se),j.push(st))}if(H.push(Se),Ge===Ke)return j.push(F==="strict"?vt:Ce);if(Ge===Ut)return j.push(st);if(Ge===Ze)return j.push(st);if(Ge===St)return he>=131072&&he<=196605||he>=196608&&he<=262141?j.push(Ce):j.push(st);j.push(Ge)}),[H,j,oe]},Nt=function(k,F,j,H){var oe=H[j];if(Array.isArray(k)?k.indexOf(oe)!==-1:k===oe)for(var he=j;he<=H.length;){he++;var Se=H[he];if(Se===F)return!0;if(Se!==He)break}if(oe===He)for(var he=j;he>0;){he--;var Ge=H[he];if(Array.isArray(k)?k.indexOf(Ge)!==-1:k===Ge)for(var ze=j;ze<=H.length;){ze++;var Se=H[ze];if(Se===F)return!0;if(Se!==He)break}if(Ge!==He)break}return!1},Gt=function(k,F){for(var j=k;j>=0;){var H=F[j];if(H===He)j--;else return H}return 0},Or=function(k,F,j,H,oe){if(j[H]===0)return nt;var he=H-1;if(Array.isArray(oe)&&oe[he]===!0)return nt;var Se=he-1,Ge=he+1,ze=F[he],ot=Se>=0?F[Se]:0,gt=F[Ge];if(ze===De&>===Ve)return nt;if(dt.indexOf(ze)!==-1)return At;if(dt.indexOf(gt)!==-1)return nt;if(at.indexOf(gt)!==-1)return nt;if(Gt(he,F)===Et)return rt;if(xe.get(k[he])===it)return nt;if((ze===Ie||ze===Me)&&xe.get(k[Ge])===it)return nt;if(ze===tt||gt===tt)return nt;if(ze===Oe)return nt;if([He,re,ce].indexOf(ze)===-1&>===Oe)return nt;if([Re,ke,ht,Mt,pt].indexOf(gt)!==-1)return nt;if(Gt(he,F)===yt)return nt;if(Nt(Lt,yt,he,F))return nt;if(Nt([Re,ke],vt,he,F))return nt;if(Nt(Ae,Ae,he,F))return nt;if(ze===He)return rt;if(ze===Lt||gt===Lt)return nt;if(gt===we||ze===we)return rt;if([re,ce,vt].indexOf(gt)!==-1||ze===ae)return nt;if(ot===ge&&Bt.indexOf(ze)!==-1)return nt;if(ze===pt&>===ge)return nt;if(gt===ft)return nt;if(Fe.indexOf(gt)!==-1&&ze===Qe||Fe.indexOf(ze)!==-1&>===Qe)return nt;if(ze===lt&&[Ce,Ie,Me].indexOf(gt)!==-1||[Ce,Ie,Me].indexOf(ze)!==-1&>===Pe)return nt;if(Fe.indexOf(ze)!==-1&&xt.indexOf(gt)!==-1||xt.indexOf(ze)!==-1&&Fe.indexOf(gt)!==-1)return nt;if([lt,Pe].indexOf(ze)!==-1&&(gt===Qe||[yt,ce].indexOf(gt)!==-1&&F[Ge+1]===Qe)||[yt,ce].indexOf(ze)!==-1&>===Qe||ze===Qe&&[Qe,pt,Mt].indexOf(gt)!==-1)return nt;if([Qe,pt,Mt,Re,ke].indexOf(gt)!==-1)for(var Ot=he;Ot>=0;){var It=F[Ot];if(It===Qe)return nt;if([pt,Mt].indexOf(It)!==-1)Ot--;else break}if([lt,Pe].indexOf(gt)!==-1)for(var Ot=[Re,ke].indexOf(ze)!==-1?Se:he;Ot>=0;){var It=F[Ot];if(It===Qe)return nt;if([pt,Mt].indexOf(It)!==-1)Ot--;else break}if(We===ze&&[We,Ne,pe,be].indexOf(gt)!==-1||[Ne,pe].indexOf(ze)!==-1&&[Ne,ut].indexOf(gt)!==-1||[ut,be].indexOf(ze)!==-1&>===ut)return nt;if(qe.indexOf(ze)!==-1&&[ft,Pe].indexOf(gt)!==-1||qe.indexOf(gt)!==-1&&ze===lt)return nt;if(Fe.indexOf(ze)!==-1&&Fe.indexOf(gt)!==-1)return nt;if(ze===Mt&&Fe.indexOf(gt)!==-1)return nt;if(Fe.concat(Qe).indexOf(ze)!==-1&>===yt&&_t.indexOf(k[Ge])===-1||Fe.concat(Qe).indexOf(gt)!==-1&&ze===ke)return nt;if(ze===Tt&>===Tt){for(var lr=j[he],Kt=1;lr>0&&(lr--,F[lr]===Tt);)Kt++;if(Kt%2!==0)return nt}return ze===Ie&>===Me?nt:rt},Pr=function(k,F){F||(F={lineBreak:"normal",wordBreak:"normal"});var j=Ht(k,F.lineBreak),H=j[0],oe=j[1],he=j[2];(F.wordBreak==="break-all"||F.wordBreak==="break-word")&&(oe=oe.map(function(Ge){return[Qe,st,Ut].indexOf(Ge)!==-1?Ce:Ge}));var Se=F.wordBreak==="keep-all"?he.map(function(Ge,ze){return Ge&&k[ze]>=19968&&k[ze]<=40959}):void 0;return[H,oe,Se]},yr=function(){function k(F,j,H,oe){this.codePoints=F,this.required=j===At,this.start=H,this.end=oe}return k.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},k}(),jt=function(k,F){var j=x(k),H=Pr(j,F),oe=H[0],he=H[1],Se=H[2],Ge=j.length,ze=0,ot=0;return{next:function(){if(ot>=Ge)return{done:!0,value:null};for(var gt=nt;ot<Ge&&(gt=Or(j,he,oe,++ot,Se))===nt;);if(gt!==nt||ot===Ge){var Ot=new yr(j,gt,ze,ot);return ze=ot,{value:Ot,done:!1}}return{done:!0,value:null}}}},Dr=1<<0,Wr=1<<1,Mr=1<<2,pr=1<<3,Sr=10,mn=47,on=92,fe=9,ye=32,Ue=34,et=61,Je=35,Dt=36,Z=37,M=39,P=40,$=41,ne=95,ee=45,je=33,Ct=60,Ft=62,kt=64,bt=91,Yt=93,zt=61,$t=123,dr=63,Rr=125,mr=124,_r=126,hr=128,kr=65533,Nr=42,qr=43,Yr=44,rn=58,An=59,$r=46,nn=0,sn=8,cn=11,dn=14,Cr=31,cr=127,sr=-1,nr=48,Zt=97,gr=101,br=102,xr=117,vr=122,On=65,Hr=69,Cn=70,Hn=85,Ln=90,Jr=function(k){return k>=nr&&k<=57},Xn=function(k){return k>=55296&&k<=57343},wn=function(k){return Jr(k)||k>=On&&k<=Cn||k>=Zt&&k<=br},Yn=function(k){return k>=Zt&&k<=vr},Mn=function(k){return k>=On&&k<=Ln},oi=function(k){return Yn(k)||Mn(k)},Un=function(k){return k>=hr},gn=function(k){return k===Sr||k===fe||k===ye},Qn=function(k){return oi(k)||Un(k)||k===ne},li=function(k){return Qn(k)||Jr(k)||k===ee},qt=function(k){return k>=nn&&k<=sn||k===cn||k>=dn&&k<=Cr||k===cr},er=function(k,F){return k!==on?!1:F!==Sr},tr=function(k,F,j){return k===ee?Qn(F)||er(F,j):Qn(k)?!0:!!(k===on&&er(k,F))},wr=function(k,F,j){return k===qr||k===ee?Jr(F)?!0:F===$r&&Jr(j):k===$r?Jr(F):Jr(k)},Ur=function(k){var F=0,j=1;(k[F]===qr||k[F]===ee)&&(k[F]===ee&&(j=-1),F++);for(var H=[];Jr(k[F]);)H.push(k[F++]);var oe=H.length?parseInt(i.apply(void 0,H),10):0;k[F]===$r&&F++;for(var he=[];Jr(k[F]);)he.push(k[F++]);var Se=he.length,Ge=Se?parseInt(i.apply(void 0,he),10):0;(k[F]===Hr||k[F]===gr)&&F++;var ze=1;(k[F]===qr||k[F]===ee)&&(k[F]===ee&&(ze=-1),F++);for(var ot=[];Jr(k[F]);)ot.push(k[F++]);var gt=ot.length?parseInt(i.apply(void 0,ot),10):0;return j*(oe+Ge*Math.pow(10,-Se))*Math.pow(10,ze*gt)},Tr={type:2},Lr={type:3},bn={type:4},Fn={type:13},Ir={type:8},ei={type:21},Gr={type:9},Dn={type:10},ui={type:11},Ai={type:12},Vr={type:14},Qr={type:23},Zr={type:1},ci={type:25},Vi={type:24},Xi={type:26},Za={type:27},Do={type:28},hs={type:29},fs={type:31},Ro={type:32},nl=function(){function k(){this._value=[]}return k.prototype.write=function(F){this._value=this._value.concat(x(F))},k.prototype.read=function(){for(var F=[],j=this.consumeToken();j!==Ro;)F.push(j),j=this.consumeToken();return F},k.prototype.consumeToken=function(){var F=this.consumeCodePoint();switch(F){case Ue:return this.consumeStringToken(Ue);case Je:var j=this.peekCodePoint(0),H=this.peekCodePoint(1),oe=this.peekCodePoint(2);if(li(j)||er(H,oe)){var he=tr(j,H,oe)?Wr:Dr,Se=this.consumeName();return{type:5,value:Se,flags:he}}break;case Dt:if(this.peekCodePoint(0)===et)return this.consumeCodePoint(),Fn;break;case M:return this.consumeStringToken(M);case P:return Tr;case $:return Lr;case Nr:if(this.peekCodePoint(0)===et)return this.consumeCodePoint(),Vr;break;case qr:if(wr(F,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(F),this.consumeNumericToken();break;case Yr:return bn;case ee:var Ge=F,ze=this.peekCodePoint(0),ot=this.peekCodePoint(1);if(wr(Ge,ze,ot))return this.reconsumeCodePoint(F),this.consumeNumericToken();if(tr(Ge,ze,ot))return this.reconsumeCodePoint(F),this.consumeIdentLikeToken();if(ze===ee&&ot===Ft)return this.consumeCodePoint(),this.consumeCodePoint(),Vi;break;case $r:if(wr(F,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(F),this.consumeNumericToken();break;case mn:if(this.peekCodePoint(0)===Nr)for(this.consumeCodePoint();;){var gt=this.consumeCodePoint();if(gt===Nr&&(gt=this.consumeCodePoint(),gt===mn))return this.consumeToken();if(gt===sr)return this.consumeToken()}break;case rn:return Xi;case An:return Za;case Ct:if(this.peekCodePoint(0)===je&&this.peekCodePoint(1)===ee&&this.peekCodePoint(2)===ee)return this.consumeCodePoint(),this.consumeCodePoint(),ci;break;case kt:var Ot=this.peekCodePoint(0),It=this.peekCodePoint(1),lr=this.peekCodePoint(2);if(tr(Ot,It,lr)){var Se=this.consumeName();return{type:7,value:Se}}break;case bt:return Do;case on:if(er(F,this.peekCodePoint(0)))return this.reconsumeCodePoint(F),this.consumeIdentLikeToken();break;case Yt:return hs;case zt:if(this.peekCodePoint(0)===et)return this.consumeCodePoint(),Ir;break;case $t:return ui;case Rr:return Ai;case xr:case Hn:var Kt=this.peekCodePoint(0),rr=this.peekCodePoint(1);return Kt===qr&&(wn(rr)||rr===dr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(F),this.consumeIdentLikeToken();case mr:if(this.peekCodePoint(0)===et)return this.consumeCodePoint(),Gr;if(this.peekCodePoint(0)===mr)return this.consumeCodePoint(),ei;break;case _r:if(this.peekCodePoint(0)===et)return this.consumeCodePoint(),Dn;break;case sr:return Ro}return gn(F)?(this.consumeWhiteSpace(),fs):Jr(F)?(this.reconsumeCodePoint(F),this.consumeNumericToken()):Qn(F)?(this.reconsumeCodePoint(F),this.consumeIdentLikeToken()):{type:6,value:i(F)}},k.prototype.consumeCodePoint=function(){var F=this._value.shift();return typeof F=="undefined"?-1:F},k.prototype.reconsumeCodePoint=function(F){this._value.unshift(F)},k.prototype.peekCodePoint=function(F){return F>=this._value.length?-1:this._value[F]},k.prototype.consumeUnicodeRangeToken=function(){for(var F=[],j=this.consumeCodePoint();wn(j)&&F.length<6;)F.push(j),j=this.consumeCodePoint();for(var H=!1;j===dr&&F.length<6;)F.push(j),j=this.consumeCodePoint(),H=!0;if(H){var oe=parseInt(i.apply(void 0,F.map(function(ze){return ze===dr?nr:ze})),16),he=parseInt(i.apply(void 0,F.map(function(ze){return ze===dr?Cn:ze})),16);return{type:30,start:oe,end:he}}var Se=parseInt(i.apply(void 0,F),16);if(this.peekCodePoint(0)===ee&&wn(this.peekCodePoint(1))){this.consumeCodePoint(),j=this.consumeCodePoint();for(var Ge=[];wn(j)&&Ge.length<6;)Ge.push(j),j=this.consumeCodePoint();var he=parseInt(i.apply(void 0,Ge),16);return{type:30,start:Se,end:he}}else return{type:30,start:Se,end:Se}},k.prototype.consumeIdentLikeToken=function(){var F=this.consumeName();return F.toLowerCase()==="url"&&this.peekCodePoint(0)===P?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===P?(this.consumeCodePoint(),{type:19,value:F}):{type:20,value:F}},k.prototype.consumeUrlToken=function(){var F=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===sr)return{type:22,value:""};var j=this.peekCodePoint(0);if(j===M||j===Ue){var H=this.consumeStringToken(this.consumeCodePoint());return H.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===sr||this.peekCodePoint(0)===$)?(this.consumeCodePoint(),{type:22,value:H.value}):(this.consumeBadUrlRemnants(),Qr)}for(;;){var oe=this.consumeCodePoint();if(oe===sr||oe===$)return{type:22,value:i.apply(void 0,F)};if(gn(oe))return this.consumeWhiteSpace(),this.peekCodePoint(0)===sr||this.peekCodePoint(0)===$?(this.consumeCodePoint(),{type:22,value:i.apply(void 0,F)}):(this.consumeBadUrlRemnants(),Qr);if(oe===Ue||oe===M||oe===P||qt(oe))return this.consumeBadUrlRemnants(),Qr;if(oe===on)if(er(oe,this.peekCodePoint(0)))F.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Qr;else F.push(oe)}},k.prototype.consumeWhiteSpace=function(){for(;gn(this.peekCodePoint(0));)this.consumeCodePoint()},k.prototype.consumeBadUrlRemnants=function(){for(;;){var F=this.consumeCodePoint();if(F===$||F===sr)return;er(F,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},k.prototype.consumeStringSlice=function(F){for(var j=5e4,H="";F>0;){var oe=Math.min(j,F);H+=i.apply(void 0,this._value.splice(0,oe)),F-=oe}return this._value.shift(),H},k.prototype.consumeStringToken=function(F){var j="",H=0;do{var oe=this._value[H];if(oe===sr||oe===void 0||oe===F)return j+=this.consumeStringSlice(H),{type:0,value:j};if(oe===Sr)return this._value.splice(0,H),Zr;if(oe===on){var he=this._value[H+1];he!==sr&&he!==void 0&&(he===Sr?(j+=this.consumeStringSlice(H),H=-1,this._value.shift()):er(oe,he)&&(j+=this.consumeStringSlice(H),j+=i(this.consumeEscapedCodePoint()),H=-1))}H++}while(!0)},k.prototype.consumeNumber=function(){var F=[],j=Mr,H=this.peekCodePoint(0);for((H===qr||H===ee)&&F.push(this.consumeCodePoint());Jr(this.peekCodePoint(0));)F.push(this.consumeCodePoint());H=this.peekCodePoint(0);var oe=this.peekCodePoint(1);if(H===$r&&Jr(oe))for(F.push(this.consumeCodePoint(),this.consumeCodePoint()),j=pr;Jr(this.peekCodePoint(0));)F.push(this.consumeCodePoint());H=this.peekCodePoint(0),oe=this.peekCodePoint(1);var he=this.peekCodePoint(2);if((H===Hr||H===gr)&&((oe===qr||oe===ee)&&Jr(he)||Jr(oe)))for(F.push(this.consumeCodePoint(),this.consumeCodePoint()),j=pr;Jr(this.peekCodePoint(0));)F.push(this.consumeCodePoint());return[Ur(F),j]},k.prototype.consumeNumericToken=function(){var F=this.consumeNumber(),j=F[0],H=F[1],oe=this.peekCodePoint(0),he=this.peekCodePoint(1),Se=this.peekCodePoint(2);if(tr(oe,he,Se)){var Ge=this.consumeName();return{type:15,number:j,flags:H,unit:Ge}}return oe===Z?(this.consumeCodePoint(),{type:16,number:j,flags:H}):{type:17,number:j,flags:H}},k.prototype.consumeEscapedCodePoint=function(){var F=this.consumeCodePoint();if(wn(F)){for(var j=i(F);wn(this.peekCodePoint(0))&&j.length<6;)j+=i(this.consumeCodePoint());gn(this.peekCodePoint(0))&&this.consumeCodePoint();var H=parseInt(j,16);return H===0||Xn(H)||H>1114111?kr:H}return F===sr?kr:F},k.prototype.consumeName=function(){for(var F="";;){var j=this.consumeCodePoint();if(li(j))F+=i(j);else if(er(j,this.peekCodePoint(0)))F+=i(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(j),F}},k}(),il=function(){function k(F){this._tokens=F}return k.create=function(F){var j=new nl;return j.write(F),new k(j.read())},k.parseValue=function(F){return k.create(F).parseComponentValue()},k.parseValues=function(F){return k.create(F).parseComponentValues()},k.prototype.parseComponentValue=function(){for(var F=this.consumeToken();F.type===31;)F=this.consumeToken();if(F.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(F);var j=this.consumeComponentValue();do F=this.consumeToken();while(F.type===31);if(F.type===32)return j;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},k.prototype.parseComponentValues=function(){for(var F=[];;){var j=this.consumeComponentValue();if(j.type===32)return F;F.push(j),F.push()}},k.prototype.consumeComponentValue=function(){var F=this.consumeToken();switch(F.type){case 11:case 28:case 2:return this.consumeSimpleBlock(F.type);case 19:return this.consumeFunction(F)}return F},k.prototype.consumeSimpleBlock=function(F){for(var j={type:F,values:[]},H=this.consumeToken();;){if(H.type===32||Ii(H,F))return j;this.reconsumeToken(H),j.values.push(this.consumeComponentValue()),H=this.consumeToken()}},k.prototype.consumeFunction=function(F){for(var j={name:F.value,values:[],type:18};;){var H=this.consumeToken();if(H.type===32||H.type===3)return j;this.reconsumeToken(H),j.values.push(this.consumeComponentValue())}},k.prototype.consumeToken=function(){var F=this._tokens.shift();return typeof F=="undefined"?Ro:F},k.prototype.reconsumeToken=function(F){this._tokens.unshift(F)},k}(),_a=function(k){return k.type===15},Aa=function(k){return k.type===17},vn=function(k){return k.type===20},$a=function(k){return k.type===0},Bi=function(k,F){return vn(k)&&k.value===F},qa=function(k){return k.type!==31},Yi=function(k){return k.type!==31&&k.type!==4},Ti=function(k){var F=[],j=[];return k.forEach(function(H){if(H.type===4){if(j.length===0)throw new Error("Error parsing function args, zero tokens for arg");F.push(j),j=[];return}H.type!==31&&j.push(H)}),j.length&&F.push(j),F},Ii=function(k,F){return F===11&&k.type===12||F===28&&k.type===29?!0:F===2&&k.type===3},di=function(k){return k.type===17||k.type===15},In=function(k){return k.type===16||di(k)},al=function(k){return k.length>1?[k[0],k[1]]:[k[0]]},Gn={type:17,number:0,flags:Mr},ps={type:16,number:50,flags:Mr},Pi={type:16,number:100,flags:Mr},ca=function(k,F,j){var H=k[0],oe=k[1];return[an(H,F),an(typeof oe!="undefined"?oe:H,j)]},an=function(k,F){if(k.type===16)return k.number/100*F;if(_a(k))switch(k.unit){case"rem":case"em":return 16*k.number;case"px":default:return k.number}return k.number},Si="deg",ms="grad",gs="rad",ol="turn",Mo={name:"angle",parse:function(k,F){if(F.type===15)switch(F.unit){case Si:return Math.PI*F.number/180;case ms:return Math.PI/200*F.number;case gs:return F.number;case ol:return Math.PI*2*F.number}throw new Error("Unsupported angle type")}},sl=function(k){return k.type===15&&(k.unit===Si||k.unit===ms||k.unit===gs||k.unit===ol)},vs=function(k){var F=k.filter(vn).map(function(j){return j.value}).join(" ");switch(F){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Gn,Gn];case"to top":case"bottom":return pi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Gn,Pi];case"to right":case"left":return pi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Pi,Pi];case"to bottom":case"top":return pi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Pi,Gn];case"to left":case"right":return pi(270)}return 0},pi=function(k){return Math.PI*k/180},Ei={name:"color",parse:function(k,F){if(F.type===18){var j=ll[F.name];if(typeof j=="undefined")throw new Error('Attempting to parse an unsupported color function "'+F.name+'"');return j(k,F.values)}if(F.type===5){if(F.value.length===3){var H=F.value.substring(0,1),oe=F.value.substring(1,2),he=F.value.substring(2,3);return Di(parseInt(H+H,16),parseInt(oe+oe,16),parseInt(he+he,16),1)}if(F.value.length===4){var H=F.value.substring(0,1),oe=F.value.substring(1,2),he=F.value.substring(2,3),Se=F.value.substring(3,4);return Di(parseInt(H+H,16),parseInt(oe+oe,16),parseInt(he+he,16),parseInt(Se+Se,16)/255)}if(F.value.length===6){var H=F.value.substring(0,2),oe=F.value.substring(2,4),he=F.value.substring(4,6);return Di(parseInt(H,16),parseInt(oe,16),parseInt(he,16),1)}if(F.value.length===8){var H=F.value.substring(0,2),oe=F.value.substring(2,4),he=F.value.substring(4,6),Se=F.value.substring(6,8);return Di(parseInt(H,16),parseInt(oe,16),parseInt(he,16),parseInt(Se,16)/255)}}if(F.type===20){var Ge=Li[F.value.toUpperCase()];if(typeof Ge!="undefined")return Ge}return Li.TRANSPARENT}},ki=function(k){return(255&k)===0},jn=function(k){var F=255&k,j=255&k>>8,H=255&k>>16,oe=255&k>>24;return F<255?"rgba("+oe+","+H+","+j+","+F/255+")":"rgb("+oe+","+H+","+j+")"},Di=function(k,F,j,H){return(k<<24|F<<16|j<<8|Math.round(H*255)<<0)>>>0},eo=function(k,F){if(k.type===17)return k.number;if(k.type===16){var j=F===3?1:255;return F===3?k.number/100*j:Math.round(k.number/100*j)}return 0},ys=function(k,F){var j=F.filter(Yi);if(j.length===3){var H=j.map(eo),oe=H[0],he=H[1],Se=H[2];return Di(oe,he,Se,1)}if(j.length===4){var Ge=j.map(eo),oe=Ge[0],he=Ge[1],Se=Ge[2],ze=Ge[3];return Di(oe,he,Se,ze)}return 0};function to(k,F,j){return j<0&&(j+=1),j>=1&&(j-=1),j<1/6?(F-k)*j*6+k:j<1/2?F:j<2/3?(F-k)*6*(2/3-j)+k:k}var Ci=function(k,F){var j=F.filter(Yi),H=j[0],oe=j[1],he=j[2],Se=j[3],Ge=(H.type===17?pi(H.number):Mo.parse(k,H))/(Math.PI*2),ze=In(oe)?oe.number/100:0,ot=In(he)?he.number/100:0,gt=typeof Se!="undefined"&&In(Se)?an(Se,1):1;if(ze===0)return Di(ot*255,ot*255,ot*255,1);var Ot=ot<=.5?ot*(ze+1):ot+ze-ot*ze,It=ot*2-Ot,lr=to(It,Ot,Ge+1/3),Kt=to(It,Ot,Ge),rr=to(It,Ot,Ge-1/3);return Di(lr*255,Kt*255,rr*255,gt)},ll={hsl:Ci,hsla:Ci,rgb:ys,rgba:ys},da=function(k,F){return Ei.parse(k,il.create(F).parseComponentValue())},Li={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ul={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(k,F){return F.map(function(j){if(vn(j))switch(j.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Al={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oa=function(k,F){var j=Ei.parse(k,F[0]),H=F[1];return H&&In(H)?{color:j,stop:H}:{color:j,stop:null}},cl=function(k,F){var j=k[0],H=k[k.length-1];j.stop===null&&(j.stop=Gn),H.stop===null&&(H.stop=Pi);for(var oe=[],he=0,Se=0;Se<k.length;Se++){var Ge=k[Se].stop;if(Ge!==null){var ze=an(Ge,F);ze>he?oe.push(ze):oe.push(he),he=ze}else oe.push(null)}for(var ot=null,Se=0;Se<oe.length;Se++){var gt=oe[Se];if(gt===null)ot===null&&(ot=Se);else if(ot!==null){for(var Ot=Se-ot,It=oe[ot-1],lr=(gt-It)/(Ot+1),Kt=1;Kt<=Ot;Kt++)oe[ot+Kt-1]=lr*Kt;ot=null}}return k.map(function(rr,Br){var or=rr.color;return{color:or,stop:Math.max(Math.min(1,oe[Br]/F),0)}})},vu=function(k,F,j){var H=F/2,oe=j/2,he=an(k[0],F)-H,Se=oe-an(k[1],j);return(Math.atan2(Se,he)+Math.PI*2)%(Math.PI*2)},yu=function(k,F,j){var H=typeof k=="number"?k:vu(k,F,j),oe=Math.abs(F*Math.sin(H))+Math.abs(j*Math.cos(H)),he=F/2,Se=j/2,Ge=oe/2,ze=Math.sin(H-Math.PI/2)*Ge,ot=Math.cos(H-Math.PI/2)*Ge;return[oe,he-ot,he+ot,Se-ze,Se+ze]},Jn=function(k,F){return Math.sqrt(k*k+F*F)},ha=function(k,F,j,H,oe){var he=[[0,0],[0,F],[k,0],[k,F]];return he.reduce(function(Se,Ge){var ze=Ge[0],ot=Ge[1],gt=Jn(j-ze,H-ot);return(oe?gt<Se.optimumDistance:gt>Se.optimumDistance)?{optimumCorner:Ge,optimumDistance:gt}:Se},{optimumDistance:oe?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Ia=function(k,F,j,H,oe){var he=0,Se=0;switch(k.size){case 0:k.shape===0?he=Se=Math.min(Math.abs(F),Math.abs(F-H),Math.abs(j),Math.abs(j-oe)):k.shape===1&&(he=Math.min(Math.abs(F),Math.abs(F-H)),Se=Math.min(Math.abs(j),Math.abs(j-oe)));break;case 2:if(k.shape===0)he=Se=Math.min(Jn(F,j),Jn(F,j-oe),Jn(F-H,j),Jn(F-H,j-oe));else if(k.shape===1){var Ge=Math.min(Math.abs(j),Math.abs(j-oe))/Math.min(Math.abs(F),Math.abs(F-H)),ze=ha(H,oe,F,j,!0),ot=ze[0],gt=ze[1];he=Jn(ot-F,(gt-j)/Ge),Se=Ge*he}break;case 1:k.shape===0?he=Se=Math.max(Math.abs(F),Math.abs(F-H),Math.abs(j),Math.abs(j-oe)):k.shape===1&&(he=Math.max(Math.abs(F),Math.abs(F-H)),Se=Math.max(Math.abs(j),Math.abs(j-oe)));break;case 3:if(k.shape===0)he=Se=Math.max(Jn(F,j),Jn(F,j-oe),Jn(F-H,j),Jn(F-H,j-oe));else if(k.shape===1){var Ge=Math.max(Math.abs(j),Math.abs(j-oe))/Math.max(Math.abs(F),Math.abs(F-H)),Ot=ha(H,oe,F,j,!1),ot=Ot[0],gt=Ot[1];he=Jn(ot-F,(gt-j)/Ge),Se=Ge*he}break}return Array.isArray(k.size)&&(he=an(k.size[0],H),Se=k.size.length===2?an(k.size[1],oe):he),[he,Se]},bs=function(k,F){var j=pi(180),H=[];return Ti(F).forEach(function(oe,he){if(he===0){var Se=oe[0];if(Se.type===20&&Se.value==="to"){j=vs(oe);return}else if(sl(Se)){j=Mo.parse(k,Se);return}}var Ge=Oa(k,oe);H.push(Ge)}),{angle:j,stops:H,type:1}},Da=function(k,F){var j=pi(180),H=[];return Ti(F).forEach(function(oe,he){if(he===0){var Se=oe[0];if(Se.type===20&&["top","left","right","bottom"].indexOf(Se.value)!==-1){j=vs(oe);return}else if(sl(Se)){j=(Mo.parse(k,Se)+pi(270))%pi(360);return}}var Ge=Oa(k,oe);H.push(Ge)}),{angle:j,stops:H,type:1}},dl=function(k,F){var j=pi(180),H=[],oe=1,he=0,Se=3,Ge=[];return Ti(F).forEach(function(ze,ot){var gt=ze[0];if(ot===0){if(vn(gt)&>.value==="linear"){oe=1;return}else if(vn(gt)&>.value==="radial"){oe=2;return}}if(gt.type===18){if(gt.name==="from"){var Ot=Ei.parse(k,gt.values[0]);H.push({stop:Gn,color:Ot})}else if(gt.name==="to"){var Ot=Ei.parse(k,gt.values[0]);H.push({stop:Pi,color:Ot})}else if(gt.name==="color-stop"){var It=gt.values.filter(Yi);if(It.length===2){var Ot=Ei.parse(k,It[1]),lr=It[0];Aa(lr)&&H.push({stop:{type:16,number:lr.number*100,flags:lr.flags},color:Ot})}}}}),oe===1?{angle:(j+pi(180))%pi(360),stops:H,type:oe}:{size:Se,shape:he,stops:H,position:Ge,type:oe}},Uo="closest-side",Ji="farthest-side",Zi="closest-corner",ti="farthest-corner",Ni="circle",Hi="ellipse",ro="cover",hl="contain",fl=function(k,F){var j=0,H=3,oe=[],he=[];return Ti(F).forEach(function(Se,Ge){var ze=!0;if(Ge===0){var ot=!1;ze=Se.reduce(function(Ot,It){if(ot)if(vn(It))switch(It.value){case"center":return he.push(ps),Ot;case"top":case"left":return he.push(Gn),Ot;case"right":case"bottom":return he.push(Pi),Ot}else(In(It)||di(It))&&he.push(It);else if(vn(It))switch(It.value){case Ni:return j=0,!1;case Hi:return j=1,!1;case"at":return ot=!0,!1;case Uo:return H=0,!1;case ro:case Ji:return H=1,!1;case hl:case Zi:return H=2,!1;case ti:return H=3,!1}else if(di(It)||In(It))return Array.isArray(H)||(H=[]),H.push(It),!1;return Ot},ze)}if(ze){var gt=Oa(k,Se);oe.push(gt)}}),{size:H,shape:j,stops:oe,position:he,type:2}},$i=function(k,F){var j=0,H=3,oe=[],he=[];return Ti(F).forEach(function(Se,Ge){var ze=!0;if(Ge===0?ze=Se.reduce(function(gt,Ot){if(vn(Ot))switch(Ot.value){case"center":return he.push(ps),!1;case"top":case"left":return he.push(Gn),!1;case"right":case"bottom":return he.push(Pi),!1}else if(In(Ot)||di(Ot))return he.push(Ot),!1;return gt},ze):Ge===1&&(ze=Se.reduce(function(gt,Ot){if(vn(Ot))switch(Ot.value){case Ni:return j=0,!1;case Hi:return j=1,!1;case hl:case Uo:return H=0,!1;case Ji:return H=1,!1;case Zi:return H=2,!1;case ro:case ti:return H=3,!1}else if(di(Ot)||In(Ot))return Array.isArray(H)||(H=[]),H.push(Ot),!1;return gt},ze)),ze){var ot=Oa(k,Se);oe.push(ot)}}),{size:H,shape:j,stops:oe,position:he,type:2}},pl=function(k){return k.type===1},ml=function(k){return k.type===2},Ra={name:"image",parse:function(k,F){if(F.type===22){var j={url:F.value,type:0};return k.cache.addImage(F.value),j}if(F.type===18){var H=Fo[F.name];if(typeof H=="undefined")throw new Error('Attempting to parse an unsupported image function "'+F.name+'"');return H(k,F.values)}throw new Error("Unsupported image type "+F.type)}};function bu(k){return!(k.type===20&&k.value==="none")&&(k.type!==18||!!Fo[k.name])}var Fo={"linear-gradient":bs,"-moz-linear-gradient":Da,"-ms-linear-gradient":Da,"-o-linear-gradient":Da,"-webkit-linear-gradient":Da,"radial-gradient":fl,"-moz-radial-gradient":$i,"-ms-radial-gradient":$i,"-o-radial-gradient":$i,"-webkit-radial-gradient":$i,"-webkit-gradient":dl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(k,F){if(F.length===0)return[];var j=F[0];return j.type===20&&j.value==="none"?[]:F.filter(function(H){return Yi(H)&&bu(H)}).map(function(H){return Ra.parse(k,H)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(k,F){return F.map(function(j){if(vn(j))switch(j.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Es={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(k,F){return Ti(F).map(function(j){return j.filter(In)}).map(al)}},Ma={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(k,F){return Ti(F).map(function(j){return j.filter(vn).map(function(H){return H.value}).join(" ")}).map(Po)}},Po=function(k){switch(k){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},fa;(function(k){k.AUTO="auto",k.CONTAIN="contain",k.COVER="cover"})(fa||(fa={}));var ko={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(k,F){return Ti(F).map(function(j){return j.filter(Eu)})}},Eu=function(k){return vn(k)||In(k)},No=function(k){return{name:"border-"+k+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Cu=No("top"),Cs=No("right"),ws=No("bottom"),Ua=No("left"),qi=function(k){return{name:"border-radius-"+k,initialValue:"0 0",prefix:!1,type:1,parse:function(F,j){return al(j.filter(In))}}},wu=qi("top-left"),Ho=qi("top-right"),yl=qi("bottom-right"),no=qi("bottom-left"),io=function(k){return{name:"border-"+k+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(F,j){switch(j){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},pa=io("top"),ao=io("right"),ma=io("bottom"),oo=io("left"),Qi=function(k){return{name:"border-"+k+"-width",initialValue:"0",type:0,prefix:!1,parse:function(F,j){return _a(j)?j.number:0}}},bl=Qi("top"),El=Qi("right"),Cl=Qi("bottom"),xu=Qi("left"),ga={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},va={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(k,F){switch(F){case"rtl":return 1;case"ltr":default:return 0}}},Bu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(k,F){return F.filter(vn).reduce(function(j,H){return j|Tu(H.value)},0)}},Tu=function(k){switch(k){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Su={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(k,F){switch(F){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Lu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(k,F){return F.type===20&&F.value==="normal"?0:F.type===17||F.type===15?F.number:0}},Qo;(function(k){k.NORMAL="normal",k.STRICT="strict"})(Qo||(Qo={}));var _u={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(k,F){switch(F){case"strict":return Qo.STRICT;case"normal":default:return Qo.NORMAL}}},hi={name:"line-height",initialValue:"normal",prefix:!1,type:4},Pn=function(k,F){return vn(k)&&k.value==="normal"?1.2*F:k.type===17?F*k.number:In(k)?an(k,F):F},ri={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(k,F){return F.type===20&&F.value==="none"?null:Ra.parse(k,F)}},Kn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(k,F){switch(F){case"inside":return 0;case"outside":default:return 1}}},ya={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(k,F){switch(F){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},jo=function(k){return{name:"margin-"+k,initialValue:"0",prefix:!1,type:4}},Ko=jo("top"),Ou=jo("right"),Iu=jo("bottom"),Du=jo("left"),xs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(k,F){return F.filter(vn).map(function(j){switch(j.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},wl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(k,F){switch(F){case"break-word":return"break-word";case"normal":default:return"normal"}}},Fa=function(k){return{name:"padding-"+k,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ru=Fa("top"),Bs=Fa("right"),Ts=Fa("bottom"),xl=Fa("left"),Bl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(k,F){switch(F){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ss={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(k,F){switch(F){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Tl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(k,F){return F.length===1&&Bi(F[0],"none")?[]:Ti(F).map(function(j){for(var H={color:Li.TRANSPARENT,offsetX:Gn,offsetY:Gn,blur:Gn},oe=0,he=0;he<j.length;he++){var Se=j[he];di(Se)?(oe===0?H.offsetX=Se:oe===1?H.offsetY=Se:H.blur=Se,oe++):H.color=Ei.parse(k,Se)}return H})}},so={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(k,F){switch(F){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mu={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(k,F){if(F.type===20&&F.value==="none")return null;if(F.type===18){var j=Sl[F.name];if(typeof j=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+F.name+'"');return j(F.values)}return null}},zo=function(k){var F=k.filter(function(j){return j.type===17}).map(function(j){return j.number});return F.length===6?F:null},mi=function(k){var F=k.filter(function(ze){return ze.type===17}).map(function(ze){return ze.number}),j=F[0],H=F[1];F[2],F[3];var oe=F[4],he=F[5];F[6],F[7],F[8],F[9],F[10],F[11];var Se=F[12],Ge=F[13];return F[14],F[15],F.length===16?[j,H,oe,he,Se,Ge]:null},Sl={matrix:zo,matrix3d:mi},Ll={type:16,number:50,flags:Mr},_l=[Ll,Ll],gi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(k,F){var j=F.filter(In);return j.length!==2?_l:[j[0],j[1]]}},en={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(k,F){switch(F){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},si;(function(k){k.NORMAL="normal",k.BREAK_ALL="break-all",k.KEEP_ALL="keep-all"})(si||(si={}));for(var ea={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(k,F){switch(F){case"break-all":return si.BREAK_ALL;case"keep-all":return si.KEEP_ALL;case"normal":default:return si.NORMAL}}},ta={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(k,F){if(F.type===20)return{auto:!0,order:0};if(Aa(F))return{auto:!1,order:F.number};throw new Error("Invalid z-index number parsed")}},Ls={name:"time",parse:function(k,F){if(F.type===15)switch(F.unit.toLowerCase()){case"s":return 1e3*F.number;case"ms":return F.number}throw new Error("Unsupported time type")}},_s={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(k,F){return Aa(F)?F.number:1}},Ol={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Uu={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(k,F){return F.filter(vn).map(function(j){switch(j.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(j){return j!==0})}},Os={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(k,F){var j=[],H=[];return F.forEach(function(oe){switch(oe.type){case 20:case 0:j.push(oe.value);break;case 17:j.push(oe.number.toString());break;case 4:H.push(j.join(" ")),j.length=0;break}}),j.length&&H.push(j.join(" ")),H.map(function(oe){return oe.indexOf(" ")===-1?oe:"'"+oe+"'"})}},lo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Il={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(k,F){if(Aa(F))return F.number;if(vn(F))switch(F.value){case"bold":return 700;case"normal":default:return 400}return 400}},Is={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(k,F){return F.filter(vn).map(function(j){return j.value})}},ra={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(k,F){switch(F){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},kn=function(k,F){return(k&F)!==0},Dl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(k,F){if(F.length===0)return[];var j=F[0];return j.type===20&&j.value==="none"?[]:F}},Fu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(k,F){if(F.length===0)return null;var j=F[0];if(j.type===20&&j.value==="none")return null;for(var H=[],oe=F.filter(qa),he=0;he<oe.length;he++){var Se=oe[he],Ge=oe[he+1];if(Se.type===20){var ze=Ge&&Aa(Ge)?Ge.number:1;H.push({counter:Se.value,increment:ze})}}return H}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(k,F){if(F.length===0)return[];for(var j=[],H=F.filter(qa),oe=0;oe<H.length;oe++){var he=H[oe],Se=H[oe+1];if(vn(he)&&he.value!=="none"){var Ge=Se&&Aa(Se)?Se.number:0;j.push({counter:he.value,reset:Ge})}}return j}},Ds={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(k,F){return F.filter(_a).map(function(j){return Ls.parse(k,j)})}},Rl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(k,F){if(F.length===0)return null;var j=F[0];if(j.type===20&&j.value==="none")return null;var H=[],oe=F.filter($a);if(oe.length%2!==0)return null;for(var he=0;he<oe.length;he+=2){var Se=oe[he].value,Ge=oe[he+1].value;H.push({open:Se,close:Ge})}return H}},Ml=function(k,F,j){if(!k)return"";var H=k[Math.min(F,k.length-1)];return H?j?H.open:H.close:""},Ul={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(k,F){return F.length===1&&Bi(F[0],"none")?[]:Ti(F).map(function(j){for(var H={color:255,offsetX:Gn,offsetY:Gn,blur:Gn,spread:Gn,inset:!1},oe=0,he=0;he<j.length;he++){var Se=j[he];Bi(Se,"inset")?H.inset=!0:di(Se)?(oe===0?H.offsetX=Se:oe===1?H.offsetY=Se:oe===2?H.blur=Se:H.spread=Se,oe++):H.color=Ei.parse(k,Se)}return H})}},Pu={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(k,F){var j=[0,1,2],H=[];return F.filter(vn).forEach(function(oe){switch(oe.value){case"stroke":H.push(1);break;case"fill":H.push(0);break;case"markers":H.push(2);break}}),j.forEach(function(oe){H.indexOf(oe)===-1&&H.push(oe)}),H}},ku={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Go={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(k,F){return _a(F)?F.number:0}},Fl=function(){function k(F,j){var H,oe;this.animationDuration=ar(F,Ds,j.animationDuration),this.backgroundClip=ar(F,ul,j.backgroundClip),this.backgroundColor=ar(F,Al,j.backgroundColor),this.backgroundImage=ar(F,gl,j.backgroundImage),this.backgroundOrigin=ar(F,vl,j.backgroundOrigin),this.backgroundPosition=ar(F,Es,j.backgroundPosition),this.backgroundRepeat=ar(F,Ma,j.backgroundRepeat),this.backgroundSize=ar(F,ko,j.backgroundSize),this.borderTopColor=ar(F,Cu,j.borderTopColor),this.borderRightColor=ar(F,Cs,j.borderRightColor),this.borderBottomColor=ar(F,ws,j.borderBottomColor),this.borderLeftColor=ar(F,Ua,j.borderLeftColor),this.borderTopLeftRadius=ar(F,wu,j.borderTopLeftRadius),this.borderTopRightRadius=ar(F,Ho,j.borderTopRightRadius),this.borderBottomRightRadius=ar(F,yl,j.borderBottomRightRadius),this.borderBottomLeftRadius=ar(F,no,j.borderBottomLeftRadius),this.borderTopStyle=ar(F,pa,j.borderTopStyle),this.borderRightStyle=ar(F,ao,j.borderRightStyle),this.borderBottomStyle=ar(F,ma,j.borderBottomStyle),this.borderLeftStyle=ar(F,oo,j.borderLeftStyle),this.borderTopWidth=ar(F,bl,j.borderTopWidth),this.borderRightWidth=ar(F,El,j.borderRightWidth),this.borderBottomWidth=ar(F,Cl,j.borderBottomWidth),this.borderLeftWidth=ar(F,xu,j.borderLeftWidth),this.boxShadow=ar(F,Ul,j.boxShadow),this.color=ar(F,ga,j.color),this.direction=ar(F,va,j.direction),this.display=ar(F,Bu,j.display),this.float=ar(F,Su,j.cssFloat),this.fontFamily=ar(F,Os,j.fontFamily),this.fontSize=ar(F,lo,j.fontSize),this.fontStyle=ar(F,ra,j.fontStyle),this.fontVariant=ar(F,Is,j.fontVariant),this.fontWeight=ar(F,Il,j.fontWeight),this.letterSpacing=ar(F,Lu,j.letterSpacing),this.lineBreak=ar(F,_u,j.lineBreak),this.lineHeight=ar(F,hi,j.lineHeight),this.listStyleImage=ar(F,ri,j.listStyleImage),this.listStylePosition=ar(F,Kn,j.listStylePosition),this.listStyleType=ar(F,ya,j.listStyleType),this.marginTop=ar(F,Ko,j.marginTop),this.marginRight=ar(F,Ou,j.marginRight),this.marginBottom=ar(F,Iu,j.marginBottom),this.marginLeft=ar(F,Du,j.marginLeft),this.opacity=ar(F,_s,j.opacity);var he=ar(F,xs,j.overflow);this.overflowX=he[0],this.overflowY=he[he.length>1?1:0],this.overflowWrap=ar(F,wl,j.overflowWrap),this.paddingTop=ar(F,Ru,j.paddingTop),this.paddingRight=ar(F,Bs,j.paddingRight),this.paddingBottom=ar(F,Ts,j.paddingBottom),this.paddingLeft=ar(F,xl,j.paddingLeft),this.paintOrder=ar(F,Pu,j.paintOrder),this.position=ar(F,Ss,j.position),this.textAlign=ar(F,Bl,j.textAlign),this.textDecorationColor=ar(F,Ol,(H=j.textDecorationColor)!==null&&H!==void 0?H:j.color),this.textDecorationLine=ar(F,Uu,(oe=j.textDecorationLine)!==null&&oe!==void 0?oe:j.textDecoration),this.textShadow=ar(F,Tl,j.textShadow),this.textTransform=ar(F,so,j.textTransform),this.transform=ar(F,Mu,j.transform),this.transformOrigin=ar(F,gi,j.transformOrigin),this.visibility=ar(F,en,j.visibility),this.webkitTextStrokeColor=ar(F,ku,j.webkitTextStrokeColor),this.webkitTextStrokeWidth=ar(F,Go,j.webkitTextStrokeWidth),this.wordBreak=ar(F,ea,j.wordBreak),this.zIndex=ar(F,ta,j.zIndex)}return k.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},k.prototype.isTransparent=function(){return ki(this.backgroundColor)},k.prototype.isTransformed=function(){return this.transform!==null},k.prototype.isPositioned=function(){return this.position!==0},k.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},k.prototype.isFloating=function(){return this.float!==0},k.prototype.isInlineLevel=function(){return kn(this.display,4)||kn(this.display,33554432)||kn(this.display,268435456)||kn(this.display,536870912)||kn(this.display,67108864)||kn(this.display,134217728)},k}(),Nu=function(){function k(F,j){this.content=ar(F,Dl,j.content),this.quotes=ar(F,Rl,j.quotes)}return k}(),Pl=function(){function k(F,j){this.counterIncrement=ar(F,Fu,j.counterIncrement),this.counterReset=ar(F,Wo,j.counterReset)}return k}(),ar=function(k,F,j){var H=new nl,oe=j!==null&&typeof j!="undefined"?j.toString():F.initialValue;H.write(oe);var he=new il(H.read());switch(F.type){case 2:var Se=he.parseComponentValue();return F.parse(k,vn(Se)?Se.value:F.initialValue);case 0:return F.parse(k,he.parseComponentValue());case 1:return F.parse(k,he.parseComponentValues());case 4:return he.parseComponentValue();case 3:switch(F.format){case"angle":return Mo.parse(k,he.parseComponentValue());case"color":return Ei.parse(k,he.parseComponentValue());case"image":return Ra.parse(k,he.parseComponentValue());case"length":var Ge=he.parseComponentValue();return di(Ge)?Ge:Gn;case"length-percentage":var ze=he.parseComponentValue();return In(ze)?ze:Gn;case"time":return Ls.parse(k,he.parseComponentValue())}break}},Pa="data-html2canvas-debug",Rs=function(k){var F=k.getAttribute(Pa);switch(F){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ka=function(k,F){var j=Rs(k);return j===1||F===j},_i=function(){function k(F,j){if(this.context=F,this.textNodes=[],this.elements=[],this.flags=0,ka(j,3))debugger;this.styles=new Fl(F,window.getComputedStyle(j,null)),os(j)&&(this.styles.animationDuration.some(function(H){return H>0})&&(j.style.animationDuration="0s"),this.styles.transform!==null&&(j.style.transform="none")),this.bounds=c(this.context,j),ka(j,4)&&(this.flags|=16)}return k}(),Ms="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Us="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ao=0;Ao<Us.length;Ao++)uo[Us.charCodeAt(Ao)]=Ao;for(var Zn=function(k){var F=k.length*.75,j=k.length,H,oe=0,he,Se,Ge,ze;k[k.length-1]==="="&&(F--,k[k.length-2]==="="&&F--);var ot=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(F):new Array(F),gt=Array.isArray(ot)?ot:new Uint8Array(ot);for(H=0;H<j;H+=4)he=uo[k.charCodeAt(H)],Se=uo[k.charCodeAt(H+1)],Ge=uo[k.charCodeAt(H+2)],ze=uo[k.charCodeAt(H+3)],gt[oe++]=he<<2|Se>>4,gt[oe++]=(Se&15)<<4|Ge>>2,gt[oe++]=(Ge&3)<<6|ze&63;return ot},Vo=function(k){for(var F=k.length,j=[],H=0;H<F;H+=2)j.push(k[H+1]<<8|k[H]);return j},kl=function(k){for(var F=k.length,j=[],H=0;H<F;H+=4)j.push(k[H+3]<<24|k[H+2]<<16|k[H+1]<<8|k[H]);return j},na=5,Xo=6+5,ia=2,Yo=Xo-na,Fs=65536>>na,Nl=1<<na,Jo=Nl-1,Na=1024>>na,Hl=Fs+Na,Zo=Hl,Ql=2048>>6,co=Zo+Ql,Hu=65536>>Xo,Ha=1<<Yo,jl=Ha-1,Ps=function(k,F,j){return k.slice?k.slice(F,j):new Uint16Array(Array.prototype.slice.call(k,F,j))},Kl=function(k,F,j){return k.slice?k.slice(F,j):new Uint32Array(Array.prototype.slice.call(k,F,j))},ho=function(k,F){var j=Zn(k),H=Array.isArray(j)?kl(j):new Uint32Array(j),oe=Array.isArray(j)?Vo(j):new Uint16Array(j),he=24,Se=Ps(oe,he/2,H[4]/2),Ge=H[5]===2?Ps(oe,(he+H[4])/2):Kl(H,Math.ceil((he+H[4])/4));return new fo(H[0],H[1],H[2],H[3],Se,Ge)},fo=function(){function k(F,j,H,oe,he,Se){this.initialValue=F,this.errorValue=j,this.highStart=H,this.highValueIndex=oe,this.index=he,this.data=Se}return k.prototype.get=function(F){var j;if(F>=0){if(F<55296||F>56319&&F<=65535)return j=this.index[F>>na],j=(j<<ia)+(F&Jo),this.data[j];if(F<=65535)return j=this.index[Fs+(F-55296>>na)],j=(j<<ia)+(F&Jo),this.data[j];if(F<this.highStart)return j=co-Hu+(F>>Xo),j=this.index[j],j+=F>>na&jl,j=this.index[j],j=(j<<ia)+(F&Jo),this.data[j];if(F<=1114111)return this.data[this.highValueIndex]}return this.errorValue},k}(),Qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",po=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),mo=0;mo<Qa.length;mo++)po[Qa.charCodeAt(mo)]=mo;var Qu=1,$o=2,Ri=3,ba=4,ja=5,ju=7,ks=8,Ns=9,Hs=10,zl=11,ni=12,Qs=13,Wl=14,js=15,Ku=function(k){for(var F=[],j=0,H=k.length;j<H;){var oe=k.charCodeAt(j++);if(oe>=55296&&oe<=56319&&j<H){var he=k.charCodeAt(j++);(he&64512)===56320?F.push(((oe&1023)<<10)+(he&1023)+65536):(F.push(oe),j--)}else F.push(oe)}return F},Gl=function(){for(var k=[],F=0;F<arguments.length;F++)k[F]=arguments[F];if(String.fromCodePoint)return String.fromCodePoint.apply(String,k);var j=k.length;if(!j)return"";for(var H=[],oe=-1,he="";++oe<j;){var Se=k[oe];Se<=65535?H.push(Se):(Se-=65536,H.push((Se>>10)+55296,Se%1024+56320)),(oe+1===j||H.length>16384)&&(he+=String.fromCharCode.apply(String,H),H.length=0)}return he},Vl=ho(Ms),vi="\xD7",Ks="\xF7",zu=function(k){return Vl.get(k)},Wu=function(k,F,j){var H=j-2,oe=F[H],he=F[j-1],Se=F[j];if(he===$o&&Se===Ri)return vi;if(he===$o||he===Ri||he===ba)return Ks;if(Se===$o||Se===Ri||Se===ba)return Ks;if(he===ks&&[ks,Ns,zl,ni].indexOf(Se)!==-1)return vi;if((he===zl||he===Ns)&&(Se===Ns||Se===Hs))return vi;if((he===ni||he===Hs)&&Se===Hs)return vi;if(Se===Qs||Se===ja)return vi;if(Se===ju)return vi;if(he===Qu)return vi;if(he===Qs&&Se===Wl){for(;oe===ja;)oe=F[--H];if(oe===Wl)return vi}if(he===js&&Se===js){for(var Ge=0;oe===js;)Ge++,oe=F[--H];if(Ge%2===0)return vi}return Ks},aa=function(k){var F=Ku(k),j=F.length,H=0,oe=0,he=F.map(zu);return{next:function(){if(H>=j)return{done:!0,value:null};for(var Se=vi;H<j&&(Se=Wu(F,he,++H))===vi;);if(Se!==vi||H===j){var Ge=Gl.apply(null,F.slice(oe,H));return oe=H,{value:Ge,done:!1}}return{done:!0,value:null}}}},go=function(k){for(var F=aa(k),j=[],H;!(H=F.next()).done;)H.value&&j.push(H.value.slice());return j},qo=function(k){var F=123;if(k.createRange){var j=k.createRange();if(j.getBoundingClientRect){var H=k.createElement("boundtest");H.style.height=F+"px",H.style.display="block",k.body.appendChild(H),j.selectNode(H);var oe=j.getBoundingClientRect(),he=Math.round(oe.height);if(k.body.removeChild(H),he===F)return!0}}return!1},vo=function(k){var F=k.createElement("boundtest");F.style.width="50px",F.style.display="block",F.style.fontSize="12px",F.style.letterSpacing="0px",F.style.wordSpacing="0px",k.body.appendChild(F);var j=k.createRange();F.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var H=F.firstChild,oe=x(H.data).map(function(ze){return i(ze)}),he=0,Se={},Ge=oe.every(function(ze,ot){j.setStart(H,he),j.setEnd(H,he+ze.length);var gt=j.getBoundingClientRect();he+=ze.length;var Ot=gt.x>Se.x||gt.y>Se.y;return Se=gt,ot===0?!0:Ot});return k.body.removeChild(F),Ge},ji=function(){return typeof new Image().crossOrigin!="undefined"},Gu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(k){var F=new Image,j=k.createElement("canvas"),H=j.getContext("2d");if(!H)return!1;F.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{H.drawImage(F,0,0),j.toDataURL()}catch(oe){return!1}return!0},Ea=function(k){return k[0]===0&&k[1]===255&&k[2]===0&&k[3]===255},Xl=function(k){var F=k.createElement("canvas"),j=100;F.width=j,F.height=j;var H=F.getContext("2d");if(!H)return Promise.reject(!1);H.fillStyle="rgb(0, 255, 0)",H.fillRect(0,0,j,j);var oe=new Image,he=F.toDataURL();oe.src=he;var Se=es(j,j,0,0,oe);return H.fillStyle="red",H.fillRect(0,0,j,j),zs(Se).then(function(Ge){H.drawImage(Ge,0,0);var ze=H.getImageData(0,0,j,j).data;H.fillStyle="red",H.fillRect(0,0,j,j);var ot=k.createElement("div");return ot.style.backgroundImage="url("+he+")",ot.style.height=j+"px",Ea(ze)?zs(es(j,j,0,0,ot)):Promise.reject(!1)}).then(function(Ge){return H.drawImage(Ge,0,0),Ea(H.getImageData(0,0,j,j).data)}).catch(function(){return!1})},es=function(k,F,j,H,oe){var he="http://www.w3.org/2000/svg",Se=document.createElementNS(he,"svg"),Ge=document.createElementNS(he,"foreignObject");return Se.setAttributeNS(null,"width",k.toString()),Se.setAttributeNS(null,"height",F.toString()),Ge.setAttributeNS(null,"width","100%"),Ge.setAttributeNS(null,"height","100%"),Ge.setAttributeNS(null,"x",j.toString()),Ge.setAttributeNS(null,"y",H.toString()),Ge.setAttributeNS(null,"externalResourcesRequired","true"),Se.appendChild(Ge),Ge.appendChild(oe),Se},zs=function(k){return new Promise(function(F,j){var H=new Image;H.onload=function(){return F(H)},H.onerror=j,H.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(k))})},Nn={get SUPPORT_RANGE_BOUNDS(){var k=qo(document);return Object.defineProperty(Nn,"SUPPORT_RANGE_BOUNDS",{value:k}),k},get SUPPORT_WORD_BREAKING(){var k=Nn.SUPPORT_RANGE_BOUNDS&&vo(document);return Object.defineProperty(Nn,"SUPPORT_WORD_BREAKING",{value:k}),k},get SUPPORT_SVG_DRAWING(){var k=Vu(document);return Object.defineProperty(Nn,"SUPPORT_SVG_DRAWING",{value:k}),k},get SUPPORT_FOREIGNOBJECT_DRAWING(){var k=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(Nn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:k}),k},get SUPPORT_CORS_IMAGES(){var k=ji();return Object.defineProperty(Nn,"SUPPORT_CORS_IMAGES",{value:k}),k},get SUPPORT_RESPONSE_TYPE(){var k=Gu();return Object.defineProperty(Nn,"SUPPORT_RESPONSE_TYPE",{value:k}),k},get SUPPORT_CORS_XHR(){var k="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Nn,"SUPPORT_CORS_XHR",{value:k}),k},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var k=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Nn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:k}),k}},Mi=function(){function k(F,j){this.text=F,this.bounds=j}return k}(),Ws=function(k,F,j,H){var oe=Yl(F,j),he=[],Se=0;return oe.forEach(function(Ge){if(j.textDecorationLine.length||Ge.trim().length>0)if(Nn.SUPPORT_RANGE_BOUNDS){var ze=ts(H,Se,Ge.length).getClientRects();if(ze.length>1){var ot=Vs(Ge),gt=0;ot.forEach(function(It){he.push(new Mi(It,_.fromDOMRectList(k,ts(H,gt+Se,It.length).getClientRects()))),gt+=It.length})}else he.push(new Mi(Ge,_.fromDOMRectList(k,ze)))}else{var Ot=H.splitText(Ge.length);he.push(new Mi(Ge,Gs(k,H))),H=Ot}else Nn.SUPPORT_RANGE_BOUNDS||(H=H.splitText(Ge.length));Se+=Ge.length}),he},Gs=function(k,F){var j=F.ownerDocument;if(j){var H=j.createElement("html2canvaswrapper");H.appendChild(F.cloneNode(!0));var oe=F.parentNode;if(oe){oe.replaceChild(H,F);var he=c(k,H);return H.firstChild&&oe.replaceChild(H.firstChild,H),he}}return _.EMPTY},ts=function(k,F,j){var H=k.ownerDocument;if(!H)throw new Error("Node has no owner document");var oe=H.createRange();return oe.setStart(k,F),oe.setEnd(k,F+j),oe},Vs=function(k){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var F=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(F.segment(k)).map(function(j){return j.segment})}return go(k)},yo=function(k,F){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var j=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(j.segment(k)).map(function(H){return H.segment})}return Jl(k,F)},Yl=function(k,F){return F.letterSpacing!==0?Vs(k):yo(k,F)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(k,F){for(var j=jt(k,{lineBreak:F.lineBreak,wordBreak:F.overflowWrap==="break-word"?"break-word":F.wordBreak}),H=[],oe,he=function(){if(oe.value){var Se=oe.value.slice(),Ge=x(Se),ze="";Ge.forEach(function(ot){Xu.indexOf(ot)===-1?ze+=i(ot):(ze.length&&H.push(ze),H.push(i(ot)),ze="")}),ze.length&&H.push(ze)}};!(oe=j.next()).done;)he();return H},rs=function(){function k(F,j,H){this.text=Yu(j.data,H.textTransform),this.textBounds=Ws(F,this.text,H,j)}return k}(),Yu=function(k,F){switch(F){case 1:return k.toLowerCase();case 3:return k.replace(Ju,bo);case 2:return k.toUpperCase();default:return k}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,bo=function(k,F,j){return k.length>0?F+j.toUpperCase():k},Xs=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.src=H.currentSrc||H.src,oe.intrinsicWidth=H.naturalWidth,oe.intrinsicHeight=H.naturalHeight,oe.context.cache.addImage(oe.src),oe}return F}(_i),Ys=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.canvas=H,oe.intrinsicWidth=H.width,oe.intrinsicHeight=H.height,oe}return F}(_i),Zl=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this,he=new XMLSerializer,Se=c(j,H);return H.setAttribute("width",Se.width+"px"),H.setAttribute("height",Se.height+"px"),oe.svg="data:image/svg+xml,"+encodeURIComponent(he.serializeToString(H)),oe.intrinsicWidth=H.width.baseVal.value,oe.intrinsicHeight=H.height.baseVal.value,oe.context.cache.addImage(oe.svg),oe}return F}(_i),ns=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.value=H.value,oe}return F}(_i),is=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.start=H.start,oe.reversed=typeof H.reversed=="boolean"&&H.reversed===!0,oe}return F}(_i),Zu=[{type:15,flags:0,unit:"px",number:3}],$l=[{type:16,flags:0,number:50}],ql=function(k){return k.width>k.height?new _(k.left+(k.width-k.height)/2,k.top,k.height,k.height):k.width<k.height?new _(k.left,k.top+(k.height-k.width)/2,k.width,k.width):k},$u=function(k){var F=k.type===Eo?new Array(k.value.length+1).join("\u2022"):k.value;return F.length===0?k.placeholder||"":F},Ka="checkbox",oa="radio",Eo="password",eu=707406591,as=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;oe.type=H.type.toLowerCase(),oe.checked=H.checked,oe.value=$u(H),(oe.type===Ka||oe.type===oa)&&(oe.styles.backgroundColor=3739148031,oe.styles.borderTopColor=oe.styles.borderRightColor=oe.styles.borderBottomColor=oe.styles.borderLeftColor=2779096575,oe.styles.borderTopWidth=oe.styles.borderRightWidth=oe.styles.borderBottomWidth=oe.styles.borderLeftWidth=1,oe.styles.borderTopStyle=oe.styles.borderRightStyle=oe.styles.borderBottomStyle=oe.styles.borderLeftStyle=1,oe.styles.backgroundClip=[0],oe.styles.backgroundOrigin=[0],oe.bounds=ql(oe.bounds));switch(oe.type){case Ka:oe.styles.borderTopRightRadius=oe.styles.borderTopLeftRadius=oe.styles.borderBottomRightRadius=oe.styles.borderBottomLeftRadius=Zu;break;case oa:oe.styles.borderTopRightRadius=oe.styles.borderTopLeftRadius=oe.styles.borderBottomRightRadius=oe.styles.borderBottomLeftRadius=$l;break}return oe}return F}(_i),tu=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this,he=H.options[H.selectedIndex||0];return oe.value=he&&he.text||"",oe}return F}(_i),ru=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.value=H.value,oe}return F}(_i),nu=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;oe.src=H.src,oe.width=parseInt(H.width,10)||0,oe.height=parseInt(H.height,10)||0,oe.backgroundColor=oe.styles.backgroundColor;try{if(H.contentWindow&&H.contentWindow.document&&H.contentWindow.document.documentElement){oe.tree=au(j,H.contentWindow.document.documentElement);var he=H.contentWindow.document.documentElement?da(j,getComputedStyle(H.contentWindow.document.documentElement).backgroundColor):Li.TRANSPARENT,Se=H.contentWindow.document.body?da(j,getComputedStyle(H.contentWindow.document.body).backgroundColor):Li.TRANSPARENT;oe.backgroundColor=ki(he)?ki(Se)?oe.styles.backgroundColor:Se:he}}catch(Ge){}return oe}return F}(_i),qu=["OL","UL","MENU"],Co=function(k,F,j,H){for(var oe=F.firstChild,he=void 0;oe;oe=he)if(he=oe.nextSibling,Zs(oe)&&oe.data.trim().length>0)j.textNodes.push(new rs(k,oe,j.styles));else if(za(oe))if(qs(oe)&&oe.assignedNodes)oe.assignedNodes().forEach(function(Ge){return Co(k,Ge,j,H)});else{var Se=iu(k,oe);Se.styles.isVisible()&&(ou(oe,Se,H)?Se.flags|=4:Js(Se.styles)&&(Se.flags|=2),qu.indexOf(oe.tagName)!==-1&&(Se.flags|=8),j.elements.push(Se),oe.slot,oe.shadowRoot?Co(k,oe.shadowRoot,Se,H):!xo(oe)&&!lu(oe)&&!Bo(oe)&&Co(k,oe,Se,H))}},iu=function(k,F){return Ca(F)?new Xs(k,F):uu(F)?new Ys(k,F):lu(F)?new Zl(k,F):su(F)?new ns(k,F):ss(F)?new is(k,F):eA(F)?new as(k,F):Bo(F)?new tu(k,F):xo(F)?new ru(k,F):wi(F)?new nu(k,F):new _i(k,F)},au=function(k,F){var j=iu(k,F);return j.flags|=4,Co(k,F,j,j),j},ou=function(k,F,j){return F.styles.isPositionedWithZIndex()||F.styles.opacity<1||F.styles.isTransformed()||En(k)&&j.styles.isTransparent()},Js=function(k){return k.isPositioned()||k.isFloating()},Zs=function(k){return k.nodeType===Node.TEXT_NODE},za=function(k){return k.nodeType===Node.ELEMENT_NODE},os=function(k){return za(k)&&typeof k.style!="undefined"&&!Ki(k)},Ki=function(k){return typeof k.className=="object"},su=function(k){return k.tagName==="LI"},ss=function(k){return k.tagName==="OL"},eA=function(k){return k.tagName==="INPUT"},tA=function(k){return k.tagName==="HTML"},lu=function(k){return k.tagName==="svg"},En=function(k){return k.tagName==="BODY"},uu=function(k){return k.tagName==="CANVAS"},ls=function(k){return k.tagName==="VIDEO"},Ca=function(k){return k.tagName==="IMG"},wi=function(k){return k.tagName==="IFRAME"},wo=function(k){return k.tagName==="STYLE"},$s=function(k){return k.tagName==="SCRIPT"},xo=function(k){return k.tagName==="TEXTAREA"},Bo=function(k){return k.tagName==="SELECT"},qs=function(k){return k.tagName==="SLOT"},el=function(k){return k.tagName.indexOf("-")>0},Au=function(){function k(){this.counters={}}return k.prototype.getCounterValue=function(F){var j=this.counters[F];return j&&j.length?j[j.length-1]:1},k.prototype.getCounterValues=function(F){var j=this.counters[F];return j||[]},k.prototype.pop=function(F){var j=this;F.forEach(function(H){return j.counters[H].pop()})},k.prototype.parse=function(F){var j=this,H=F.counterIncrement,oe=F.counterReset,he=!0;H!==null&&H.forEach(function(Ge){var ze=j.counters[Ge.counter];ze&&Ge.increment!==0&&(he=!1,ze.length||ze.push(1),ze[Math.max(0,ze.length-1)]+=Ge.increment)});var Se=[];return he&&oe.forEach(function(Ge){var ze=j.counters[Ge.counter];Se.push(Ge.counter),ze||(ze=j.counters[Ge.counter]=[]),ze.push(Ge.reset)}),Se},k}(),cu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},us={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},du={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},ln={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},wa=function(k,F,j,H,oe,he){return k<F||k>j?d(k,oe,he.length>0):H.integers.reduce(function(Se,Ge,ze){for(;k>=Ge;)k-=Ge,Se+=H.values[ze];return Se},"")+he},hu=function(k,F,j,H){var oe="";do j||k--,oe=H(k)+oe,k/=F;while(k*F>=F);return oe},xn=function(k,F,j,H,oe){var he=j-F+1;return(k<0?"-":"")+(hu(Math.abs(k),he,H,function(Se){return i(Math.floor(Se%he)+F)})+oe)},xa=function(k,F,j){j===void 0&&(j=". ");var H=F.length;return hu(Math.abs(k),H,!1,function(oe){return F[Math.floor(oe%H)]})+j},zi=1<<0,sa=1<<1,hn=1<<2,To=1<<3,Wi=function(k,F,j,H,oe,he){if(k<-9999||k>9999)return d(k,4,oe.length>0);var Se=Math.abs(k),Ge=oe;if(Se===0)return F[0]+Ge;for(var ze=0;Se>0&&ze<=4;ze++){var ot=Se%10;ot===0&&kn(he,zi)&&Ge!==""?Ge=F[ot]+Ge:ot>1||ot===1&&ze===0||ot===1&&ze===1&&kn(he,sa)||ot===1&&ze===1&&kn(he,hn)&&k>100||ot===1&&ze>1&&kn(he,To)?Ge=F[ot]+(ze>0?j[ze-1]:"")+Ge:ot===1&&ze>0&&(Ge=j[ze-1]+Ge),Se=Math.floor(Se/10)}return(k<0?H:"")+Ge},fu="\u5341\u767E\u5343\u842C",So="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",t="\uB9C8\uC774\uB108\uC2A4",d=function(k,F,j){var H=j?". ":"",oe=j?"\u3001":"",he=j?", ":"",Se=j?" ":"";switch(F){case 0:return"\u2022"+Se;case 1:return"\u25E6"+Se;case 2:return"\u25FE"+Se;case 5:var Ge=xn(k,48,57,!0,H);return Ge.length<4?"0"+Ge:Ge;case 4:return xa(k,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",oe);case 6:return wa(k,1,3999,cu,3,H).toLowerCase();case 7:return wa(k,1,3999,cu,3,H);case 8:return xn(k,945,969,!1,H);case 9:return xn(k,97,122,!1,H);case 10:return xn(k,65,90,!1,H);case 11:return xn(k,1632,1641,!0,H);case 12:case 49:return wa(k,1,9999,us,3,H);case 35:return wa(k,1,9999,us,3,H).toLowerCase();case 13:return xn(k,2534,2543,!0,H);case 14:case 30:return xn(k,6112,6121,!0,H);case 15:return xa(k,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",oe);case 16:return xa(k,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",oe);case 17:case 48:return Wi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",oe,sa|hn|To);case 47:return Wi(k,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",So,"\u8CA0",oe,zi|sa|hn|To);case 42:return Wi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",oe,sa|hn|To);case 41:return Wi(k,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",So,"\u8D1F",oe,zi|sa|hn|To);case 26:return Wi(k,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,oe,0);case 25:return Wi(k,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,oe,zi|sa|hn);case 31:return Wi(k,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",t,he,zi|sa|hn);case 33:return Wi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",t,he,0);case 32:return Wi(k,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",t,he,zi|sa|hn);case 18:return xn(k,2406,2415,!0,H);case 20:return wa(k,1,19999,ln,3,H);case 21:return xn(k,2790,2799,!0,H);case 22:return xn(k,2662,2671,!0,H);case 22:return wa(k,1,10999,du,3,H);case 23:return xa(k,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return xa(k,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return xn(k,3302,3311,!0,H);case 28:return xa(k,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",oe);case 29:return xa(k,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",oe);case 34:return xn(k,3792,3801,!0,H);case 37:return xn(k,6160,6169,!0,H);case 38:return xn(k,4160,4169,!0,H);case 39:return xn(k,2918,2927,!0,H);case 40:return xn(k,1776,1785,!0,H);case 43:return xn(k,3046,3055,!0,H);case 44:return xn(k,3174,3183,!0,H);case 45:return xn(k,3664,3673,!0,H);case 46:return xn(k,3872,3881,!0,H);case 3:default:return xn(k,48,57,!0,H)}},A="data-html2canvas-ignore",I=function(){function k(F,j,H){if(this.context=F,this.options=H,this.scrolledElements=[],this.referenceElement=j,this.counters=new Au,this.quoteDepth=0,!j.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(j.ownerDocument.documentElement,!1)}return k.prototype.toIFrame=function(F,j){var H=this,oe=ie(F,j);if(!oe.contentWindow)return Promise.reject("Unable to find iframe window");var he=F.defaultView.pageXOffset,Se=F.defaultView.pageYOffset,Ge=oe.contentWindow,ze=Ge.document,ot=ve(oe).then(function(){return Q(H,void 0,void 0,function(){var gt,Ot;return D(this,function(It){switch(It.label){case 0:return this.scrolledElements.forEach(Rt),Ge&&(Ge.scrollTo(j.left,j.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ge.scrollY!==j.top||Ge.scrollX!==j.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ge.scrollX-j.left,Ge.scrollY-j.top,0,0))),gt=this.options.onclone,Ot=this.clonedReferenceElement,typeof Ot=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:ze.fonts&&ze.fonts.ready?[4,ze.fonts.ready]:[3,2];case 1:It.sent(),It.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,de(ze)]:[3,4];case 3:It.sent(),It.label=4;case 4:return typeof gt=="function"?[2,Promise.resolve().then(function(){return gt(ze,Ot)}).then(function(){return oe})]:[2,oe]}})})});return ze.open(),ze.write(mt(document.doctype)+"<html></html>"),ct(this.referenceElement.ownerDocument,he,Se),ze.replaceChild(ze.adoptNode(this.documentElement),ze.documentElement),ze.close(),ot},k.prototype.createElementClone=function(F){if(ka(F,2))debugger;if(uu(F))return this.createCanvasClone(F);if(ls(F))return this.createVideoClone(F);if(wo(F))return this.createStyleClone(F);var j=F.cloneNode(!1);return Ca(j)&&(Ca(F)&&F.currentSrc&&F.currentSrc!==F.src&&(j.src=F.currentSrc,j.srcset=""),j.loading==="lazy"&&(j.loading="eager")),el(j)?this.createCustomElementClone(j):j},k.prototype.createCustomElementClone=function(F){var j=document.createElement("html2canvascustomelement");return Ye(F.style,j),j},k.prototype.createStyleClone=function(F){try{var j=F.sheet;if(j&&j.cssRules){var H=[].slice.call(j.cssRules,0).reduce(function(he,Se){return Se&&typeof Se.cssText=="string"?he+Se.cssText:he},""),oe=F.cloneNode(!1);return oe.textContent=H,oe}}catch(he){if(this.context.logger.error("Unable to access cssRules property",he),he.name!=="SecurityError")throw he}return F.cloneNode(!1)},k.prototype.createCanvasClone=function(F){var j;if(this.options.inlineImages&&F.ownerDocument){var H=F.ownerDocument.createElement("img");try{return H.src=F.toDataURL(),H}catch(ot){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",F)}}var oe=F.cloneNode(!1);try{oe.width=F.width,oe.height=F.height;var he=F.getContext("2d"),Se=oe.getContext("2d");if(Se)if(!this.options.allowTaint&&he)Se.putImageData(he.getImageData(0,0,F.width,F.height),0,0);else{var Ge=(j=F.getContext("webgl2"))!==null&&j!==void 0?j:F.getContext("webgl");if(Ge){var ze=Ge.getContextAttributes();(ze==null?void 0:ze.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",F)}Se.drawImage(F,0,0)}return oe}catch(ot){this.context.logger.info("Unable to clone canvas as it is tainted",F)}return oe},k.prototype.createVideoClone=function(F){var j=F.ownerDocument.createElement("canvas");j.width=F.offsetWidth,j.height=F.offsetHeight;var H=j.getContext("2d");try{return H&&(H.drawImage(F,0,0,j.width,j.height),this.options.allowTaint||H.getImageData(0,0,j.width,j.height)),j}catch(he){this.context.logger.info("Unable to clone video as it is tainted",F)}var oe=F.ownerDocument.createElement("canvas");return oe.width=F.offsetWidth,oe.height=F.offsetHeight,oe},k.prototype.appendChildNode=function(F,j,H){(!za(j)||!$s(j)&&!j.hasAttribute(A)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(j)))&&((!this.options.copyStyles||!za(j)||!wo(j))&&F.appendChild(this.cloneNode(j,H)))},k.prototype.cloneChildNodes=function(F,j,H){for(var oe=this,he=F.shadowRoot?F.shadowRoot.firstChild:F.firstChild;he;he=he.nextSibling)if(za(he)&&qs(he)&&typeof he.assignedNodes=="function"){var Se=he.assignedNodes();Se.length&&Se.forEach(function(Ge){return oe.appendChildNode(j,Ge,H)})}else this.appendChildNode(j,he,H)},k.prototype.cloneNode=function(F,j){if(Zs(F))return document.createTextNode(F.data);if(!F.ownerDocument)return F.cloneNode(!1);var H=F.ownerDocument.defaultView;if(H&&za(F)&&(os(F)||Ki(F))){var oe=this.createElementClone(F);oe.style.transitionProperty="none";var he=H.getComputedStyle(F),Se=H.getComputedStyle(F,":before"),Ge=H.getComputedStyle(F,":after");this.referenceElement===F&&os(oe)&&(this.clonedReferenceElement=oe),En(oe)&&ir(oe);var ze=this.counters.parse(new Pl(this.context,he)),ot=this.resolvePseudoContent(F,oe,Se,G.BEFORE);el(F)&&(j=!0),ls(F)||this.cloneChildNodes(F,oe,j),ot&&oe.insertBefore(ot,oe.firstChild);var gt=this.resolvePseudoContent(F,oe,Ge,G.AFTER);return gt&&oe.appendChild(gt),this.counters.pop(ze),(he&&(this.options.copyStyles||Ki(F))&&!wi(F)||j)&&Ye(he,oe),(F.scrollTop!==0||F.scrollLeft!==0)&&this.scrolledElements.push([oe,F.scrollLeft,F.scrollTop]),(xo(F)||Bo(F))&&(xo(oe)||Bo(oe))&&(oe.value=F.value),oe}return F.cloneNode(!1)},k.prototype.resolvePseudoContent=function(F,j,H,oe){var he=this;if(!H)return;var Se=H.content,Ge=j.ownerDocument;if(!Ge||!Se||Se==="none"||Se==="-moz-alt-content"||H.display==="none")return;this.counters.parse(new Pl(this.context,H));var ze=new Nu(this.context,H),ot=Ge.createElement("html2canvaspseudoelement");Ye(H,ot),ze.content.forEach(function(Ot){if(Ot.type===0)ot.appendChild(Ge.createTextNode(Ot.value));else if(Ot.type===22){var It=Ge.createElement("img");It.src=Ot.value,It.style.opacity="1",ot.appendChild(It)}else if(Ot.type===18){if(Ot.name==="attr"){var lr=Ot.values.filter(vn);lr.length&&ot.appendChild(Ge.createTextNode(F.getAttribute(lr[0].value)||""))}else if(Ot.name==="counter"){var Kt=Ot.values.filter(Yi),rr=Kt[0],Br=Kt[1];if(rr&&vn(rr)){var or=he.counters.getCounterValue(rr.value),Ar=Br&&vn(Br)?ya.parse(he.context,Br.value):3;ot.appendChild(Ge.createTextNode(d(or,Ar,!1)))}}else if(Ot.name==="counters"){var tn=Ot.values.filter(Yi),rr=tn[0],zr=tn[1],Br=tn[2];if(rr&&vn(rr)){var fn=he.counters.getCounterValues(rr.value),ur=Br&&vn(Br)?ya.parse(he.context,Br.value):3,un=zr&&zr.type===0?zr.value:"",pn=fn.map(function(bi){return d(bi,ur,!1)}).join(un);ot.appendChild(Ge.createTextNode(pn))}}}else if(Ot.type===20)switch(Ot.value){case"open-quote":ot.appendChild(Ge.createTextNode(Ml(ze.quotes,he.quoteDepth++,!0)));break;case"close-quote":ot.appendChild(Ge.createTextNode(Ml(ze.quotes,--he.quoteDepth,!1)));break;default:ot.appendChild(Ge.createTextNode(Ot.value))}}),ot.className=Vt+" "+Jt;var gt=oe===G.BEFORE?" "+Vt:" "+Jt;return Ki(j)?j.className.baseValue+=gt:j.className+=gt,ot},k.destroy=function(F){return F.parentNode?(F.parentNode.removeChild(F),!0):!1},k}(),G;(function(k){k[k.BEFORE=0]="BEFORE",k[k.AFTER=1]="AFTER"})(G||(G={}));var ie=function(k,F){var j=k.createElement("iframe");return j.className="html2canvas-container",j.style.visibility="hidden",j.style.position="fixed",j.style.left="-10000px",j.style.top="0px",j.style.border="0",j.width=F.width.toString(),j.height=F.height.toString(),j.scrolling="no",j.setAttribute(A,"true"),k.body.appendChild(j),j},ue=function(k){return new Promise(function(F){if(k.complete){F();return}if(!k.src){F();return}k.onload=F,k.onerror=F})},de=function(k){return Promise.all([].slice.call(k.images,0).map(ue))},ve=function(k){return new Promise(function(F,j){var H=k.contentWindow;if(!H)return j("No window assigned for iframe");var oe=H.document;H.onload=k.onload=function(){H.onload=k.onload=null;var he=setInterval(function(){oe.body.childNodes.length>0&&oe.readyState==="complete"&&(clearInterval(he),F(k))},50)}})},Xe=["all","d","content"],Ye=function(k,F){for(var j=k.length-1;j>=0;j--){var H=k.item(j);Xe.indexOf(H)===-1&&F.style.setProperty(H,k.getPropertyValue(H))}return F},mt=function(k){var F="";return k&&(F+="<!DOCTYPE ",k.name&&(F+=k.name),k.internalSubset&&(F+=k.internalSubset),k.publicId&&(F+='"'+k.publicId+'"'),k.systemId&&(F+='"'+k.systemId+'"'),F+=">"),F},ct=function(k,F,j){k&&k.defaultView&&(F!==k.defaultView.pageXOffset||j!==k.defaultView.pageYOffset)&&k.defaultView.scrollTo(F,j)},Rt=function(k){var F=k[0],j=k[1],H=k[2];F.scrollLeft=j,F.scrollTop=H},Pt=":before",Qt=":after",Vt="___html2canvas___pseudoelement_before",Jt="___html2canvas___pseudoelement_after",Xt=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,ir=function(k){Er(k,"."+Vt+Pt+Xt+`
|
|
.`+Jt+Qt+Xt)},Er=function(k,F){var j=k.ownerDocument;if(j){var H=j.createElement("style");H.textContent=F,k.appendChild(H)}},fr=function(){function k(){}return k.getOrigin=function(F){var j=k._link;return j?(j.href=F,j.href=j.href,j.protocol+j.hostname+j.port):"about:blank"},k.isSameOrigin=function(F){return k.getOrigin(F)===k._origin},k.setContext=function(F){k._link=F.document.createElement("a"),k._origin=k.getOrigin(F.location.href)},k._origin="about:blank",k}(),Fr=function(){function k(F,j){this.context=F,this._options=j,this._cache={}}return k.prototype.addImage=function(F){var j=Promise.resolve();return this.has(F)||(qn(F)||fi(F))&&(this._cache[F]=this.loadImage(F)).catch(function(){}),j},k.prototype.match=function(F){return this._cache[F]},k.prototype.loadImage=function(F){return Q(this,void 0,void 0,function(){var j,H,oe,he,Se=this;return D(this,function(Ge){switch(Ge.label){case 0:return j=fr.isSameOrigin(F),H=!$n(F)&&this._options.useCORS===!0&&Nn.SUPPORT_CORS_IMAGES&&!j,oe=!$n(F)&&!j&&!qn(F)&&typeof this._options.proxy=="string"&&Nn.SUPPORT_CORS_XHR&&!H,!j&&this._options.allowTaint===!1&&!$n(F)&&!qn(F)&&!oe&&!H?[2]:(he=F,oe?[4,this.proxy(he)]:[3,2]);case 1:he=Ge.sent(),Ge.label=2;case 2:return this.context.logger.debug("Added image "+F.substring(0,256)),[4,new Promise(function(ze,ot){var gt=new Image;gt.onload=function(){return ze(gt)},gt.onerror=ot,(Rn(he)||H)&&(gt.crossOrigin="anonymous"),gt.src=he,gt.complete===!0&&setTimeout(function(){return ze(gt)},500),Se._options.imageTimeout>0&&setTimeout(function(){return ot("Timed out ("+Se._options.imageTimeout+"ms) loading image")},Se._options.imageTimeout)})];case 3:return[2,Ge.sent()]}})})},k.prototype.has=function(F){return typeof this._cache[F]!="undefined"},k.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},k.prototype.proxy=function(F){var j=this,H=this._options.proxy;if(!H)throw new Error("No proxy defined");var oe=F.substring(0,256);return new Promise(function(he,Se){var Ge=Nn.SUPPORT_RESPONSE_TYPE?"blob":"text",ze=new XMLHttpRequest;ze.onload=function(){if(ze.status===200)if(Ge==="text")he(ze.response);else{var Ot=new FileReader;Ot.addEventListener("load",function(){return he(Ot.result)},!1),Ot.addEventListener("error",function(It){return Se(It)},!1),Ot.readAsDataURL(ze.response)}else Se("Failed to proxy resource "+oe+" with status code "+ze.status)},ze.onerror=Se;var ot=H.indexOf("?")>-1?"&":"?";if(ze.open("GET",""+H+ot+"url="+encodeURIComponent(F)+"&responseType="+Ge),Ge!=="text"&&ze instanceof XMLHttpRequest&&(ze.responseType=Ge),j._options.imageTimeout){var gt=j._options.imageTimeout;ze.timeout=gt,ze.ontimeout=function(){return Se("Timed out ("+gt+"ms) proxying "+oe)}}ze.send()})},k}(),yn=/^data:image\/svg\+xml/i,zn=/^data:image\/.*;base64,/i,_n=/^data:image\/.*/i,fi=function(k){return Nn.SUPPORT_SVG_DRAWING||!Vn(k)},$n=function(k){return _n.test(k)},Rn=function(k){return zn.test(k)},qn=function(k){return k.substr(0,4)==="blob"},Vn=function(k){return k.substr(-3).toLowerCase()==="svg"||yn.test(k)},Wt=function(){function k(F,j){this.type=0,this.x=F,this.y=j}return k.prototype.add=function(F,j){return new k(this.x+F,this.y+j)},k}(),Bn=function(k,F,j){return new Wt(k.x+(F.x-k.x)*j,k.y+(F.y-k.y)*j)},Tn=function(){function k(F,j,H,oe){this.type=1,this.start=F,this.startControl=j,this.endControl=H,this.end=oe}return k.prototype.subdivide=function(F,j){var H=Bn(this.start,this.startControl,F),oe=Bn(this.startControl,this.endControl,F),he=Bn(this.endControl,this.end,F),Se=Bn(H,oe,F),Ge=Bn(oe,he,F),ze=Bn(Se,Ge,F);return j?new k(this.start,H,Se,ze):new k(ze,Ge,he,this.end)},k.prototype.add=function(F,j){return new k(this.start.add(F,j),this.startControl.add(F,j),this.endControl.add(F,j),this.end.add(F,j))},k.prototype.reverse=function(){return new k(this.end,this.endControl,this.startControl,this.start)},k}(),Sn=function(k){return k.type===1},Wa=function(){function k(F){var j=F.styles,H=F.bounds,oe=ca(j.borderTopLeftRadius,H.width,H.height),he=oe[0],Se=oe[1],Ge=ca(j.borderTopRightRadius,H.width,H.height),ze=Ge[0],ot=Ge[1],gt=ca(j.borderBottomRightRadius,H.width,H.height),Ot=gt[0],It=gt[1],lr=ca(j.borderBottomLeftRadius,H.width,H.height),Kt=lr[0],rr=lr[1],Br=[];Br.push((he+ze)/H.width),Br.push((Kt+Ot)/H.width),Br.push((Se+rr)/H.height),Br.push((ot+It)/H.height);var or=Math.max.apply(Math,Br);or>1&&(he/=or,Se/=or,ze/=or,ot/=or,Ot/=or,It/=or,Kt/=or,rr/=or);var Ar=H.width-ze,tn=H.height-It,zr=H.width-Ot,fn=H.height-rr,ur=j.borderTopWidth,un=j.borderRightWidth,pn=j.borderBottomWidth,Kr=j.borderLeftWidth,xi=an(j.paddingTop,F.bounds.width),bi=an(j.paddingRight,F.bounds.width),Oi=an(j.paddingBottom,F.bounds.width),ai=an(j.paddingLeft,F.bounds.width);this.topLeftBorderDoubleOuterBox=he>0||Se>0?jr(H.left+Kr/3,H.top+ur/3,he-Kr/3,Se-ur/3,Xr.TOP_LEFT):new Wt(H.left+Kr/3,H.top+ur/3),this.topRightBorderDoubleOuterBox=he>0||Se>0?jr(H.left+Ar,H.top+ur/3,ze-un/3,ot-ur/3,Xr.TOP_RIGHT):new Wt(H.left+H.width-un/3,H.top+ur/3),this.bottomRightBorderDoubleOuterBox=Ot>0||It>0?jr(H.left+zr,H.top+tn,Ot-un/3,It-pn/3,Xr.BOTTOM_RIGHT):new Wt(H.left+H.width-un/3,H.top+H.height-pn/3),this.bottomLeftBorderDoubleOuterBox=Kt>0||rr>0?jr(H.left+Kr/3,H.top+fn,Kt-Kr/3,rr-pn/3,Xr.BOTTOM_LEFT):new Wt(H.left+Kr/3,H.top+H.height-pn/3),this.topLeftBorderDoubleInnerBox=he>0||Se>0?jr(H.left+Kr*2/3,H.top+ur*2/3,he-Kr*2/3,Se-ur*2/3,Xr.TOP_LEFT):new Wt(H.left+Kr*2/3,H.top+ur*2/3),this.topRightBorderDoubleInnerBox=he>0||Se>0?jr(H.left+Ar,H.top+ur*2/3,ze-un*2/3,ot-ur*2/3,Xr.TOP_RIGHT):new Wt(H.left+H.width-un*2/3,H.top+ur*2/3),this.bottomRightBorderDoubleInnerBox=Ot>0||It>0?jr(H.left+zr,H.top+tn,Ot-un*2/3,It-pn*2/3,Xr.BOTTOM_RIGHT):new Wt(H.left+H.width-un*2/3,H.top+H.height-pn*2/3),this.bottomLeftBorderDoubleInnerBox=Kt>0||rr>0?jr(H.left+Kr*2/3,H.top+fn,Kt-Kr*2/3,rr-pn*2/3,Xr.BOTTOM_LEFT):new Wt(H.left+Kr*2/3,H.top+H.height-pn*2/3),this.topLeftBorderStroke=he>0||Se>0?jr(H.left+Kr/2,H.top+ur/2,he-Kr/2,Se-ur/2,Xr.TOP_LEFT):new Wt(H.left+Kr/2,H.top+ur/2),this.topRightBorderStroke=he>0||Se>0?jr(H.left+Ar,H.top+ur/2,ze-un/2,ot-ur/2,Xr.TOP_RIGHT):new Wt(H.left+H.width-un/2,H.top+ur/2),this.bottomRightBorderStroke=Ot>0||It>0?jr(H.left+zr,H.top+tn,Ot-un/2,It-pn/2,Xr.BOTTOM_RIGHT):new Wt(H.left+H.width-un/2,H.top+H.height-pn/2),this.bottomLeftBorderStroke=Kt>0||rr>0?jr(H.left+Kr/2,H.top+fn,Kt-Kr/2,rr-pn/2,Xr.BOTTOM_LEFT):new Wt(H.left+Kr/2,H.top+H.height-pn/2),this.topLeftBorderBox=he>0||Se>0?jr(H.left,H.top,he,Se,Xr.TOP_LEFT):new Wt(H.left,H.top),this.topRightBorderBox=ze>0||ot>0?jr(H.left+Ar,H.top,ze,ot,Xr.TOP_RIGHT):new Wt(H.left+H.width,H.top),this.bottomRightBorderBox=Ot>0||It>0?jr(H.left+zr,H.top+tn,Ot,It,Xr.BOTTOM_RIGHT):new Wt(H.left+H.width,H.top+H.height),this.bottomLeftBorderBox=Kt>0||rr>0?jr(H.left,H.top+fn,Kt,rr,Xr.BOTTOM_LEFT):new Wt(H.left,H.top+H.height),this.topLeftPaddingBox=he>0||Se>0?jr(H.left+Kr,H.top+ur,Math.max(0,he-Kr),Math.max(0,Se-ur),Xr.TOP_LEFT):new Wt(H.left+Kr,H.top+ur),this.topRightPaddingBox=ze>0||ot>0?jr(H.left+Math.min(Ar,H.width-un),H.top+ur,Ar>H.width+un?0:Math.max(0,ze-un),Math.max(0,ot-ur),Xr.TOP_RIGHT):new Wt(H.left+H.width-un,H.top+ur),this.bottomRightPaddingBox=Ot>0||It>0?jr(H.left+Math.min(zr,H.width-Kr),H.top+Math.min(tn,H.height-pn),Math.max(0,Ot-un),Math.max(0,It-pn),Xr.BOTTOM_RIGHT):new Wt(H.left+H.width-un,H.top+H.height-pn),this.bottomLeftPaddingBox=Kt>0||rr>0?jr(H.left+Kr,H.top+Math.min(fn,H.height-pn),Math.max(0,Kt-Kr),Math.max(0,rr-pn),Xr.BOTTOM_LEFT):new Wt(H.left+Kr,H.top+H.height-pn),this.topLeftContentBox=he>0||Se>0?jr(H.left+Kr+ai,H.top+ur+xi,Math.max(0,he-(Kr+ai)),Math.max(0,Se-(ur+xi)),Xr.TOP_LEFT):new Wt(H.left+Kr+ai,H.top+ur+xi),this.topRightContentBox=ze>0||ot>0?jr(H.left+Math.min(Ar,H.width+Kr+ai),H.top+ur+xi,Ar>H.width+Kr+ai?0:ze-Kr+ai,ot-(ur+xi),Xr.TOP_RIGHT):new Wt(H.left+H.width-(un+bi),H.top+ur+xi),this.bottomRightContentBox=Ot>0||It>0?jr(H.left+Math.min(zr,H.width-(Kr+ai)),H.top+Math.min(tn,H.height+ur+xi),Math.max(0,Ot-(un+bi)),It-(pn+Oi),Xr.BOTTOM_RIGHT):new Wt(H.left+H.width-(un+bi),H.top+H.height-(pn+Oi)),this.bottomLeftContentBox=Kt>0||rr>0?jr(H.left+Kr+ai,H.top+fn,Math.max(0,Kt-(Kr+ai)),rr-(pn+Oi),Xr.BOTTOM_LEFT):new Wt(H.left+Kr+ai,H.top+H.height-(pn+Oi))}return k}(),Xr;(function(k){k[k.TOP_LEFT=0]="TOP_LEFT",k[k.TOP_RIGHT=1]="TOP_RIGHT",k[k.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",k[k.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Xr||(Xr={}));var jr=function(k,F,j,H,oe){var he=4*((Math.sqrt(2)-1)/3),Se=j*he,Ge=H*he,ze=k+j,ot=F+H;switch(oe){case Xr.TOP_LEFT:return new Tn(new Wt(k,ot),new Wt(k,ot-Ge),new Wt(ze-Se,F),new Wt(ze,F));case Xr.TOP_RIGHT:return new Tn(new Wt(k,F),new Wt(k+Se,F),new Wt(ze,ot-Ge),new Wt(ze,ot));case Xr.BOTTOM_RIGHT:return new Tn(new Wt(ze,F),new Wt(ze,F+Ge),new Wt(k+Se,ot),new Wt(k,ot));case Xr.BOTTOM_LEFT:default:return new Tn(new Wt(ze,ot),new Wt(ze-Se,ot),new Wt(k,F+Ge),new Wt(k,F))}},yi=function(k){return[k.topLeftBorderBox,k.topRightBorderBox,k.bottomRightBorderBox,k.bottomLeftBorderBox]},Wn=function(k){return[k.topLeftContentBox,k.topRightContentBox,k.bottomRightContentBox,k.bottomLeftContentBox]},Ga=function(k){return[k.topLeftPaddingBox,k.topRightPaddingBox,k.bottomRightPaddingBox,k.bottomLeftPaddingBox]},Gi=function(){function k(F,j,H){this.offsetX=F,this.offsetY=j,this.matrix=H,this.type=0,this.target=2|4}return k}(),Ui=function(){function k(F,j){this.path=F,this.target=j,this.type=1}return k}(),Ba=function(){function k(F){this.opacity=F,this.type=2,this.target=2|4}return k}(),ii=function(k){return k.type===0},Ta=function(k){return k.type===1},tl=function(k){return k.type===2},iA=function(k,F){return k.length===F.length?k.some(function(j,H){return j===F[H]}):!1},dA=function(k,F,j,H,oe){return k.map(function(he,Se){switch(Se){case 0:return he.add(F,j);case 1:return he.add(F+H,j);case 2:return he.add(F+H,j+oe);case 3:return he.add(F,j+oe)}return he})},aA=function(){function k(F){this.element=F,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return k}(),oA=function(){function k(F,j){if(this.container=F,this.parent=j,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new Ba(this.container.styles.opacity)),this.container.styles.transform!==null){var H=this.container.bounds.left+this.container.styles.transformOrigin[0].number,oe=this.container.bounds.top+this.container.styles.transformOrigin[1].number,he=this.container.styles.transform;this.effects.push(new Gi(H,oe,he))}if(this.container.styles.overflowX!==0){var Se=yi(this.curves),Ge=Ga(this.curves);iA(Se,Ge)?this.effects.push(new Ui(Se,2|4)):(this.effects.push(new Ui(Se,2)),this.effects.push(new Ui(Ge,4)))}}return k.prototype.getEffects=function(F){for(var j=[2,3].indexOf(this.container.styles.position)===-1,H=this.parent,oe=this.effects.slice(0);H;){var he=H.effects.filter(function(ze){return!Ta(ze)});if(j||H.container.styles.position!==0||!H.parent){if(oe.unshift.apply(oe,he),j=[2,3].indexOf(H.container.styles.position)===-1,H.container.styles.overflowX!==0){var Se=yi(H.curves),Ge=Ga(H.curves);iA(Se,Ge)||oe.unshift(new Ui(Ge,2|4))}}else oe.unshift.apply(oe,he);H=H.parent}return oe.filter(function(ze){return kn(ze.target,F)})},k}(),rA=function(k,F,j,H){k.container.elements.forEach(function(oe){var he=kn(oe.flags,4),Se=kn(oe.flags,2),Ge=new oA(oe,k);kn(oe.styles.display,2048)&&H.push(Ge);var ze=kn(oe.flags,8)?[]:H;if(he||Se){var ot=he||oe.styles.isPositioned()?j:F,gt=new aA(Ge);if(oe.styles.isPositioned()||oe.styles.opacity<1||oe.styles.isTransformed()){var Ot=oe.styles.zIndex.order;if(Ot<0){var It=0;ot.negativeZIndex.some(function(Kt,rr){return Ot>Kt.element.container.styles.zIndex.order?(It=rr,!1):It>0}),ot.negativeZIndex.splice(It,0,gt)}else if(Ot>0){var lr=0;ot.positiveZIndex.some(function(Kt,rr){return Ot>=Kt.element.container.styles.zIndex.order?(lr=rr+1,!1):lr>0}),ot.positiveZIndex.splice(lr,0,gt)}else ot.zeroOrAutoZIndexOrTransformedOrOpacity.push(gt)}else oe.styles.isFloating()?ot.nonPositionedFloats.push(gt):ot.nonPositionedInlineLevel.push(gt);rA(Ge,gt,he?gt:j,ze)}else oe.styles.isInlineLevel()?F.inlineLevel.push(Ge):F.nonInlineLevel.push(Ge),rA(Ge,F,j,ze);kn(oe.flags,8)&&sA(oe,ze)})},sA=function(k,F){for(var j=k instanceof is?k.start:1,H=k instanceof is?k.reversed:!1,oe=0;oe<F.length;oe++){var he=F[oe];he.container instanceof ns&&typeof he.container.value=="number"&&he.container.value!==0&&(j=he.container.value),he.listValue=d(j,he.container.styles.listStyleType,!0),j+=H?-1:1}},hA=function(k){var F=new oA(k,null),j=new aA(F),H=[];return rA(F,j,j,H),sA(F.container,H),j},lA=function(k,F){switch(F){case 0:return Fi(k.topLeftBorderBox,k.topLeftPaddingBox,k.topRightBorderBox,k.topRightPaddingBox);case 1:return Fi(k.topRightBorderBox,k.topRightPaddingBox,k.bottomRightBorderBox,k.bottomRightPaddingBox);case 2:return Fi(k.bottomRightBorderBox,k.bottomRightPaddingBox,k.bottomLeftBorderBox,k.bottomLeftPaddingBox);case 3:default:return Fi(k.bottomLeftBorderBox,k.bottomLeftPaddingBox,k.topLeftBorderBox,k.topLeftPaddingBox)}},fA=function(k,F){switch(F){case 0:return Fi(k.topLeftBorderBox,k.topLeftBorderDoubleOuterBox,k.topRightBorderBox,k.topRightBorderDoubleOuterBox);case 1:return Fi(k.topRightBorderBox,k.topRightBorderDoubleOuterBox,k.bottomRightBorderBox,k.bottomRightBorderDoubleOuterBox);case 2:return Fi(k.bottomRightBorderBox,k.bottomRightBorderDoubleOuterBox,k.bottomLeftBorderBox,k.bottomLeftBorderDoubleOuterBox);case 3:default:return Fi(k.bottomLeftBorderBox,k.bottomLeftBorderDoubleOuterBox,k.topLeftBorderBox,k.topLeftBorderDoubleOuterBox)}},pA=function(k,F){switch(F){case 0:return Fi(k.topLeftBorderDoubleInnerBox,k.topLeftPaddingBox,k.topRightBorderDoubleInnerBox,k.topRightPaddingBox);case 1:return Fi(k.topRightBorderDoubleInnerBox,k.topRightPaddingBox,k.bottomRightBorderDoubleInnerBox,k.bottomRightPaddingBox);case 2:return Fi(k.bottomRightBorderDoubleInnerBox,k.bottomRightPaddingBox,k.bottomLeftBorderDoubleInnerBox,k.bottomLeftPaddingBox);case 3:default:return Fi(k.bottomLeftBorderDoubleInnerBox,k.bottomLeftPaddingBox,k.topLeftBorderDoubleInnerBox,k.topLeftPaddingBox)}},mA=function(k,F){switch(F){case 0:return pu(k.topLeftBorderStroke,k.topRightBorderStroke);case 1:return pu(k.topRightBorderStroke,k.bottomRightBorderStroke);case 2:return pu(k.bottomRightBorderStroke,k.bottomLeftBorderStroke);case 3:default:return pu(k.bottomLeftBorderStroke,k.topLeftBorderStroke)}},pu=function(k,F){var j=[];return Sn(k)?j.push(k.subdivide(.5,!1)):j.push(k),Sn(F)?j.push(F.subdivide(.5,!0)):j.push(F),j},Fi=function(k,F,j,H){var oe=[];return Sn(k)?oe.push(k.subdivide(.5,!1)):oe.push(k),Sn(j)?oe.push(j.subdivide(.5,!0)):oe.push(j),Sn(H)?oe.push(H.subdivide(.5,!0).reverse()):oe.push(H),Sn(F)?oe.push(F.subdivide(.5,!1).reverse()):oe.push(F),oe},uA=function(k){var F=k.bounds,j=k.styles;return F.add(j.borderLeftWidth,j.borderTopWidth,-(j.borderRightWidth+j.borderLeftWidth),-(j.borderTopWidth+j.borderBottomWidth))},mu=function(k){var F=k.styles,j=k.bounds,H=an(F.paddingLeft,j.width),oe=an(F.paddingRight,j.width),he=an(F.paddingTop,j.width),Se=an(F.paddingBottom,j.width);return j.add(H+F.borderLeftWidth,he+F.borderTopWidth,-(F.borderRightWidth+F.borderLeftWidth+H+oe),-(F.borderTopWidth+F.borderBottomWidth+he+Se))},gA=function(k,F){return k===0?F.bounds:k===2?mu(F):uA(F)},vA=function(k,F){return k===0?F.bounds:k===2?mu(F):uA(F)},nA=function(k,F,j){var H=gA(cs(k.styles.backgroundOrigin,F),k),oe=vA(cs(k.styles.backgroundClip,F),k),he=yA(cs(k.styles.backgroundSize,F),j,H),Se=he[0],Ge=he[1],ze=ca(cs(k.styles.backgroundPosition,F),H.width-Se,H.height-Ge),ot=bA(cs(k.styles.backgroundRepeat,F),ze,he,H,oe),gt=Math.round(H.left+ze[0]),Ot=Math.round(H.top+ze[1]);return[ot,gt,Ot,Se,Ge]},As=function(k){return vn(k)&&k.value===fa.AUTO},gu=function(k){return typeof k=="number"},yA=function(k,F,j){var H=F[0],oe=F[1],he=F[2],Se=k[0],Ge=k[1];if(!Se)return[0,0];if(In(Se)&&Ge&&In(Ge))return[an(Se,j.width),an(Ge,j.height)];var ze=gu(he);if(vn(Se)&&(Se.value===fa.CONTAIN||Se.value===fa.COVER)){if(gu(he)){var ot=j.width/j.height;return ot<he!==(Se.value===fa.COVER)?[j.width,j.width/he]:[j.height*he,j.height]}return[j.width,j.height]}var gt=gu(H),Ot=gu(oe),It=gt||Ot;if(As(Se)&&(!Ge||As(Ge))){if(gt&&Ot)return[H,oe];if(!ze&&!It)return[j.width,j.height];if(It&&ze){var lr=gt?H:oe*he,Kt=Ot?oe:H/he;return[lr,Kt]}var rr=gt?H:j.width,Br=Ot?oe:j.height;return[rr,Br]}if(ze){var or=0,Ar=0;return In(Se)?or=an(Se,j.width):In(Ge)&&(Ar=an(Ge,j.height)),As(Se)?or=Ar*he:(!Ge||As(Ge))&&(Ar=or/he),[or,Ar]}var tn=null,zr=null;if(In(Se)?tn=an(Se,j.width):Ge&&In(Ge)&&(zr=an(Ge,j.height)),tn!==null&&(!Ge||As(Ge))&&(zr=gt&&Ot?tn/H*oe:j.height),zr!==null&&As(Se)&&(tn=gt&&Ot?zr/oe*H:j.width),tn!==null&&zr!==null)return[tn,zr];throw new Error("Unable to calculate background-size for element")},cs=function(k,F){var j=k[F];return typeof j=="undefined"?k[0]:j},bA=function(k,F,j,H,oe){var he=F[0],Se=F[1],Ge=j[0],ze=j[1];switch(k){case 2:return[new Wt(Math.round(H.left),Math.round(H.top+Se)),new Wt(Math.round(H.left+H.width),Math.round(H.top+Se)),new Wt(Math.round(H.left+H.width),Math.round(ze+H.top+Se)),new Wt(Math.round(H.left),Math.round(ze+H.top+Se))];case 3:return[new Wt(Math.round(H.left+he),Math.round(H.top)),new Wt(Math.round(H.left+he+Ge),Math.round(H.top)),new Wt(Math.round(H.left+he+Ge),Math.round(H.height+H.top)),new Wt(Math.round(H.left+he),Math.round(H.height+H.top))];case 1:return[new Wt(Math.round(H.left+he),Math.round(H.top+Se)),new Wt(Math.round(H.left+he+Ge),Math.round(H.top+Se)),new Wt(Math.round(H.left+he+Ge),Math.round(H.top+Se+ze)),new Wt(Math.round(H.left+he),Math.round(H.top+Se+ze))];default:return[new Wt(Math.round(oe.left),Math.round(oe.top)),new Wt(Math.round(oe.left+oe.width),Math.round(oe.top)),new Wt(Math.round(oe.left+oe.width),Math.round(oe.height+oe.top)),new Wt(Math.round(oe.left),Math.round(oe.height+oe.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",CA=function(){function k(F){this._data={},this._document=F}return k.prototype.parseMetrics=function(F,j){var H=this._document.createElement("div"),oe=this._document.createElement("img"),he=this._document.createElement("span"),Se=this._document.body;H.style.visibility="hidden",H.style.fontFamily=F,H.style.fontSize=j,H.style.margin="0",H.style.padding="0",H.style.whiteSpace="nowrap",Se.appendChild(H),oe.src=EA,oe.width=1,oe.height=1,oe.style.margin="0",oe.style.padding="0",oe.style.verticalAlign="baseline",he.style.fontFamily=F,he.style.fontSize=j,he.style.margin="0",he.style.padding="0",he.appendChild(this._document.createTextNode(AA)),H.appendChild(he),H.appendChild(oe);var Ge=oe.offsetTop-he.offsetTop+2;H.removeChild(he),H.appendChild(this._document.createTextNode(AA)),H.style.lineHeight="normal",oe.style.verticalAlign="super";var ze=oe.offsetTop-H.offsetTop+2;return Se.removeChild(H),{baseline:Ge,middle:ze}},k.prototype.getMetrics=function(F,j){var H=F+" "+j;return typeof this._data[H]=="undefined"&&(this._data[H]=this.parseMetrics(F,j)),this._data[H]},k}(),cA=function(){function k(F,j){this.context=F,this.options=j}return k}(),wA=1e4,xA=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe._activeEffects=[],oe.canvas=H.canvas?H.canvas:document.createElement("canvas"),oe.ctx=oe.canvas.getContext("2d"),H.canvas||(oe.canvas.width=Math.floor(H.width*H.scale),oe.canvas.height=Math.floor(H.height*H.scale),oe.canvas.style.width=H.width+"px",oe.canvas.style.height=H.height+"px"),oe.fontMetrics=new CA(document),oe.ctx.scale(oe.options.scale,oe.options.scale),oe.ctx.translate(-H.x,-H.y),oe.ctx.textBaseline="bottom",oe._activeEffects=[],oe.context.logger.debug("Canvas renderer initialized ("+H.width+"x"+H.height+") with scale "+H.scale),oe}return F.prototype.applyEffects=function(j){for(var H=this;this._activeEffects.length;)this.popEffect();j.forEach(function(oe){return H.applyEffect(oe)})},F.prototype.applyEffect=function(j){this.ctx.save(),tl(j)&&(this.ctx.globalAlpha=j.opacity),ii(j)&&(this.ctx.translate(j.offsetX,j.offsetY),this.ctx.transform(j.matrix[0],j.matrix[1],j.matrix[2],j.matrix[3],j.matrix[4],j.matrix[5]),this.ctx.translate(-j.offsetX,-j.offsetY)),Ta(j)&&(this.path(j.path),this.ctx.clip()),this._activeEffects.push(j)},F.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},F.prototype.renderStack=function(j){return Q(this,void 0,void 0,function(){var H;return D(this,function(oe){switch(oe.label){case 0:return H=j.element.container.styles,H.isVisible()?[4,this.renderStackContent(j)]:[3,2];case 1:oe.sent(),oe.label=2;case 2:return[2]}})})},F.prototype.renderNode=function(j){return Q(this,void 0,void 0,function(){return D(this,function(H){switch(H.label){case 0:if(kn(j.container.flags,16))debugger;return j.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(j)]:[3,3];case 1:return H.sent(),[4,this.renderNodeContent(j)];case 2:H.sent(),H.label=3;case 3:return[2]}})})},F.prototype.renderTextWithLetterSpacing=function(j,H,oe){var he=this;if(H===0)this.ctx.fillText(j.text,j.bounds.left,j.bounds.top+oe);else{var Se=Vs(j.text);Se.reduce(function(Ge,ze){return he.ctx.fillText(ze,Ge,j.bounds.top+oe),Ge+he.ctx.measureText(ze).width},j.bounds.left)}},F.prototype.createFontStyle=function(j){var H=j.fontVariant.filter(function(Se){return Se==="normal"||Se==="small-caps"}).join(""),oe=_A(j.fontFamily).join(", "),he=_a(j.fontSize)?""+j.fontSize.number+j.fontSize.unit:j.fontSize.number+"px";return[[j.fontStyle,H,j.fontWeight,he,oe].join(" "),oe,he]},F.prototype.renderTextNode=function(j,H){return Q(this,void 0,void 0,function(){var oe,he,Se,Ge,ze,ot,gt,Ot,It=this;return D(this,function(lr){return oe=this.createFontStyle(H),he=oe[0],Se=oe[1],Ge=oe[2],this.ctx.font=he,this.ctx.direction=H.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ze=this.fontMetrics.getMetrics(Se,Ge),ot=ze.baseline,gt=ze.middle,Ot=H.paintOrder,j.textBounds.forEach(function(Kt){Ot.forEach(function(rr){switch(rr){case 0:It.ctx.fillStyle=jn(H.color),It.renderTextWithLetterSpacing(Kt,H.letterSpacing,ot);var Br=H.textShadow;Br.length&&Kt.text.trim().length&&(Br.slice(0).reverse().forEach(function(or){It.ctx.shadowColor=jn(or.color),It.ctx.shadowOffsetX=or.offsetX.number*It.options.scale,It.ctx.shadowOffsetY=or.offsetY.number*It.options.scale,It.ctx.shadowBlur=or.blur.number,It.renderTextWithLetterSpacing(Kt,H.letterSpacing,ot)}),It.ctx.shadowColor="",It.ctx.shadowOffsetX=0,It.ctx.shadowOffsetY=0,It.ctx.shadowBlur=0),H.textDecorationLine.length&&(It.ctx.fillStyle=jn(H.textDecorationColor||H.color),H.textDecorationLine.forEach(function(or){switch(or){case 1:It.ctx.fillRect(Kt.bounds.left,Math.round(Kt.bounds.top+ot),Kt.bounds.width,1);break;case 2:It.ctx.fillRect(Kt.bounds.left,Math.round(Kt.bounds.top),Kt.bounds.width,1);break;case 3:It.ctx.fillRect(Kt.bounds.left,Math.ceil(Kt.bounds.top+gt),Kt.bounds.width,1);break}}));break;case 1:H.webkitTextStrokeWidth&&Kt.text.trim().length&&(It.ctx.strokeStyle=jn(H.webkitTextStrokeColor),It.ctx.lineWidth=H.webkitTextStrokeWidth,It.ctx.lineJoin=window.chrome?"miter":"round",It.ctx.strokeText(Kt.text,Kt.bounds.left,Kt.bounds.top+ot)),It.ctx.strokeStyle="",It.ctx.lineWidth=0,It.ctx.lineJoin="miter";break}})}),[2]})})},F.prototype.renderReplacedElement=function(j,H,oe){if(oe&&j.intrinsicWidth>0&&j.intrinsicHeight>0){var he=mu(j),Se=Ga(H);this.path(Se),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(oe,0,0,j.intrinsicWidth,j.intrinsicHeight,he.left,he.top,he.width,he.height),this.ctx.restore()}},F.prototype.renderNodeContent=function(j){return Q(this,void 0,void 0,function(){var H,oe,he,Se,Ge,ze,ot,ot,gt,Ot,It,lr,Kt,rr,Br,or,Ar,tn,zr,ot,fn,Kt,or;return D(this,function(ur){switch(ur.label){case 0:this.applyEffects(j.getEffects(4)),H=j.container,oe=j.curves,he=H.styles,Se=0,Ge=H.textNodes,ur.label=1;case 1:return Se<Ge.length?(ze=Ge[Se],[4,this.renderTextNode(ze,he)]):[3,4];case 2:ur.sent(),ur.label=3;case 3:return Se++,[3,1];case 4:if(!(H instanceof Xs))return[3,8];ur.label=5;case 5:return ur.trys.push([5,7,,8]),[4,this.context.cache.match(H.src)];case 6:return ot=ur.sent(),this.renderReplacedElement(H,oe,ot),[3,8];case 7:return ur.sent(),this.context.logger.error("Error loading image "+H.src),[3,8];case 8:if(H instanceof Ys&&this.renderReplacedElement(H,oe,H.canvas),!(H instanceof Zl))return[3,12];ur.label=9;case 9:return ur.trys.push([9,11,,12]),[4,this.context.cache.match(H.svg)];case 10:return ot=ur.sent(),this.renderReplacedElement(H,oe,ot),[3,12];case 11:return ur.sent(),this.context.logger.error("Error loading svg "+H.svg.substring(0,255)),[3,12];case 12:return H instanceof nu&&H.tree?(gt=new F(this.context,{scale:this.options.scale,backgroundColor:H.backgroundColor,x:0,y:0,width:H.width,height:H.height}),[4,gt.render(H.tree)]):[3,14];case 13:Ot=ur.sent(),H.width&&H.height&&this.ctx.drawImage(Ot,0,0,H.width,H.height,H.bounds.left,H.bounds.top,H.bounds.width,H.bounds.height),ur.label=14;case 14:if(H instanceof as&&(It=Math.min(H.bounds.width,H.bounds.height),H.type===Ka?H.checked&&(this.ctx.save(),this.path([new Wt(H.bounds.left+It*.39363,H.bounds.top+It*.79),new Wt(H.bounds.left+It*.16,H.bounds.top+It*.5549),new Wt(H.bounds.left+It*.27347,H.bounds.top+It*.44071),new Wt(H.bounds.left+It*.39694,H.bounds.top+It*.5649),new Wt(H.bounds.left+It*.72983,H.bounds.top+It*.23),new Wt(H.bounds.left+It*.84,H.bounds.top+It*.34085),new Wt(H.bounds.left+It*.39363,H.bounds.top+It*.79)]),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()):H.type===oa&&(H.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(H.bounds.left+It/2,H.bounds.top+It/2,It/4,0,Math.PI*2,!0),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()))),BA(H)&&H.value.length){lr=this.createFontStyle(he),Kt=lr[0],rr=lr[1],Br=this.fontMetrics.getMetrics(Kt,rr).baseline,this.ctx.font=Kt,this.ctx.fillStyle=jn(he.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=SA(H.styles.textAlign),or=mu(H),Ar=0;switch(H.styles.textAlign){case 1:Ar+=or.width/2;break;case 2:Ar+=or.width;break}tn=or.add(Ar,0,0,-or.height/2+1),this.ctx.save(),this.path([new Wt(or.left,or.top),new Wt(or.left+or.width,or.top),new Wt(or.left+or.width,or.top+or.height),new Wt(or.left,or.top+or.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Mi(H.value,tn),he.letterSpacing,Br),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!kn(H.styles.display,2048))return[3,20];if(!(H.styles.listStyleImage!==null))return[3,19];if(zr=H.styles.listStyleImage,!(zr.type===0))return[3,18];ot=void 0,fn=zr.url,ur.label=15;case 15:return ur.trys.push([15,17,,18]),[4,this.context.cache.match(fn)];case 16:return ot=ur.sent(),this.ctx.drawImage(ot,H.bounds.left-(ot.width+10),H.bounds.top),[3,18];case 17:return ur.sent(),this.context.logger.error("Error loading list-style-image "+fn),[3,18];case 18:return[3,20];case 19:j.listValue&&H.styles.listStyleType!==-1&&(Kt=this.createFontStyle(he)[0],this.ctx.font=Kt,this.ctx.fillStyle=jn(he.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",or=new _(H.bounds.left,H.bounds.top+an(H.styles.paddingTop,H.bounds.width),H.bounds.width,Pn(he.lineHeight,he.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Mi(j.listValue,or),he.letterSpacing,Pn(he.lineHeight,he.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),ur.label=20;case 20:return[2]}})})},F.prototype.renderStackContent=function(j){return Q(this,void 0,void 0,function(){var H,oe,he,Se,Ge,he,ze,ot,he,gt,Ot,he,It,lr,he,Kt,rr,he,Br,or,he;return D(this,function(Ar){switch(Ar.label){case 0:if(kn(j.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(j.element)];case 1:Ar.sent(),H=0,oe=j.negativeZIndex,Ar.label=2;case 2:return H<oe.length?(he=oe[H],[4,this.renderStack(he)]):[3,5];case 3:Ar.sent(),Ar.label=4;case 4:return H++,[3,2];case 5:return[4,this.renderNodeContent(j.element)];case 6:Ar.sent(),Se=0,Ge=j.nonInlineLevel,Ar.label=7;case 7:return Se<Ge.length?(he=Ge[Se],[4,this.renderNode(he)]):[3,10];case 8:Ar.sent(),Ar.label=9;case 9:return Se++,[3,7];case 10:ze=0,ot=j.nonPositionedFloats,Ar.label=11;case 11:return ze<ot.length?(he=ot[ze],[4,this.renderStack(he)]):[3,14];case 12:Ar.sent(),Ar.label=13;case 13:return ze++,[3,11];case 14:gt=0,Ot=j.nonPositionedInlineLevel,Ar.label=15;case 15:return gt<Ot.length?(he=Ot[gt],[4,this.renderStack(he)]):[3,18];case 16:Ar.sent(),Ar.label=17;case 17:return gt++,[3,15];case 18:It=0,lr=j.inlineLevel,Ar.label=19;case 19:return It<lr.length?(he=lr[It],[4,this.renderNode(he)]):[3,22];case 20:Ar.sent(),Ar.label=21;case 21:return It++,[3,19];case 22:Kt=0,rr=j.zeroOrAutoZIndexOrTransformedOrOpacity,Ar.label=23;case 23:return Kt<rr.length?(he=rr[Kt],[4,this.renderStack(he)]):[3,26];case 24:Ar.sent(),Ar.label=25;case 25:return Kt++,[3,23];case 26:Br=0,or=j.positiveZIndex,Ar.label=27;case 27:return Br<or.length?(he=or[Br],[4,this.renderStack(he)]):[3,30];case 28:Ar.sent(),Ar.label=29;case 29:return Br++,[3,27];case 30:return[2]}})})},F.prototype.mask=function(j){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(j.slice(0).reverse()),this.ctx.closePath()},F.prototype.path=function(j){this.ctx.beginPath(),this.formatPath(j),this.ctx.closePath()},F.prototype.formatPath=function(j){var H=this;j.forEach(function(oe,he){var Se=Sn(oe)?oe.start:oe;he===0?H.ctx.moveTo(Se.x,Se.y):H.ctx.lineTo(Se.x,Se.y),Sn(oe)&&H.ctx.bezierCurveTo(oe.startControl.x,oe.startControl.y,oe.endControl.x,oe.endControl.y,oe.end.x,oe.end.y)})},F.prototype.renderRepeat=function(j,H,oe,he){this.path(j),this.ctx.fillStyle=H,this.ctx.translate(oe,he),this.ctx.fill(),this.ctx.translate(-oe,-he)},F.prototype.resizeImage=function(j,H,oe){var he;if(j.width===H&&j.height===oe)return j;var Se=(he=this.canvas.ownerDocument)!==null&&he!==void 0?he:document,Ge=Se.createElement("canvas");Ge.width=Math.max(1,H),Ge.height=Math.max(1,oe);var ze=Ge.getContext("2d");return ze.drawImage(j,0,0,j.width,j.height,0,0,H,oe),Ge},F.prototype.renderBackgroundImage=function(j){return Q(this,void 0,void 0,function(){var H,oe,he,Se,Ge,ze;return D(this,function(ot){switch(ot.label){case 0:H=j.styles.backgroundImage.length-1,oe=function(gt){var Ot,It,lr,Kt,rr,Br,or,Ar,tn,zr,Kt,rr,Br,or,Ar,fn,ur,un,pn,Kr,xi,bi,Oi,ai,tn,la,Kt,Va,Xa,or,Ar,Ya,rr,Br,Lo,ua,Ja,_o,Oo,Sa,Io,La;return D(this,function(ds){switch(ds.label){case 0:if(!(gt.type===0))return[3,5];Ot=void 0,It=gt.url,ds.label=1;case 1:return ds.trys.push([1,3,,4]),[4,he.context.cache.match(It)];case 2:return Ot=ds.sent(),[3,4];case 3:return ds.sent(),he.context.logger.error("Error loading background-image "+It),[3,4];case 4:return Ot&&(lr=nA(j,H,[Ot.width,Ot.height,Ot.width/Ot.height]),Kt=lr[0],rr=lr[1],Br=lr[2],or=lr[3],Ar=lr[4],tn=he.ctx.createPattern(he.resizeImage(Ot,or,Ar),"repeat"),he.renderRepeat(Kt,tn,rr,Br)),[3,6];case 5:pl(gt)?(zr=nA(j,H,[null,null,null]),Kt=zr[0],rr=zr[1],Br=zr[2],or=zr[3],Ar=zr[4],fn=yu(gt.angle,or,Ar),ur=fn[0],un=fn[1],pn=fn[2],Kr=fn[3],xi=fn[4],bi=document.createElement("canvas"),bi.width=or,bi.height=Ar,Oi=bi.getContext("2d"),ai=Oi.createLinearGradient(un,Kr,pn,xi),cl(gt.stops,ur).forEach(function(rl){return ai.addColorStop(rl.stop,jn(rl.color))}),Oi.fillStyle=ai,Oi.fillRect(0,0,or,Ar),or>0&&Ar>0&&(tn=he.ctx.createPattern(bi,"repeat"),he.renderRepeat(Kt,tn,rr,Br))):ml(gt)&&(la=nA(j,H,[null,null,null]),Kt=la[0],Va=la[1],Xa=la[2],or=la[3],Ar=la[4],Ya=gt.position.length===0?[ps]:gt.position,rr=an(Ya[0],or),Br=an(Ya[Ya.length-1],Ar),Lo=Ia(gt,rr,Br,or,Ar),ua=Lo[0],Ja=Lo[1],ua>0&&Ja>0&&(_o=he.ctx.createRadialGradient(Va+rr,Xa+Br,0,Va+rr,Xa+Br,ua),cl(gt.stops,ua*2).forEach(function(rl){return _o.addColorStop(rl.stop,jn(rl.color))}),he.path(Kt),he.ctx.fillStyle=_o,ua!==Ja?(Oo=j.bounds.left+.5*j.bounds.width,Sa=j.bounds.top+.5*j.bounds.height,Io=Ja/ua,La=1/Io,he.ctx.save(),he.ctx.translate(Oo,Sa),he.ctx.transform(1,0,0,Io,0,0),he.ctx.translate(-Oo,-Sa),he.ctx.fillRect(Va,La*(Xa-Sa)+Sa,or,Ar*La),he.ctx.restore()):he.ctx.fill())),ds.label=6;case 6:return H--,[2]}})},he=this,Se=0,Ge=j.styles.backgroundImage.slice(0).reverse(),ot.label=1;case 1:return Se<Ge.length?(ze=Ge[Se],[5,oe(ze)]):[3,4];case 2:ot.sent(),ot.label=3;case 3:return Se++,[3,1];case 4:return[2]}})})},F.prototype.renderSolidBorder=function(j,H,oe){return Q(this,void 0,void 0,function(){return D(this,function(he){return this.path(lA(oe,H)),this.ctx.fillStyle=jn(j),this.ctx.fill(),[2]})})},F.prototype.renderDoubleBorder=function(j,H,oe,he){return Q(this,void 0,void 0,function(){var Se,Ge;return D(this,function(ze){switch(ze.label){case 0:return H<3?[4,this.renderSolidBorder(j,oe,he)]:[3,2];case 1:return ze.sent(),[2];case 2:return Se=fA(he,oe),this.path(Se),this.ctx.fillStyle=jn(j),this.ctx.fill(),Ge=pA(he,oe),this.path(Ge),this.ctx.fill(),[2]}})})},F.prototype.renderNodeBackgroundAndBorders=function(j){return Q(this,void 0,void 0,function(){var H,oe,he,Se,Ge,ze,ot,gt,Ot=this;return D(this,function(It){switch(It.label){case 0:return this.applyEffects(j.getEffects(2)),H=j.container.styles,oe=!ki(H.backgroundColor)||H.backgroundImage.length,he=[{style:H.borderTopStyle,color:H.borderTopColor,width:H.borderTopWidth},{style:H.borderRightStyle,color:H.borderRightColor,width:H.borderRightWidth},{style:H.borderBottomStyle,color:H.borderBottomColor,width:H.borderBottomWidth},{style:H.borderLeftStyle,color:H.borderLeftColor,width:H.borderLeftWidth}],Se=TA(cs(H.backgroundClip,0),j.curves),oe||H.boxShadow.length?(this.ctx.save(),this.path(Se),this.ctx.clip(),ki(H.backgroundColor)||(this.ctx.fillStyle=jn(H.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(j.container)]):[3,2];case 1:It.sent(),this.ctx.restore(),H.boxShadow.slice(0).reverse().forEach(function(lr){Ot.ctx.save();var Kt=yi(j.curves),rr=lr.inset?0:wA,Br=dA(Kt,-rr+(lr.inset?1:-1)*lr.spread.number,(lr.inset?1:-1)*lr.spread.number,lr.spread.number*(lr.inset?-2:2),lr.spread.number*(lr.inset?-2:2));lr.inset?(Ot.path(Kt),Ot.ctx.clip(),Ot.mask(Br)):(Ot.mask(Kt),Ot.ctx.clip(),Ot.path(Br)),Ot.ctx.shadowOffsetX=lr.offsetX.number+rr,Ot.ctx.shadowOffsetY=lr.offsetY.number,Ot.ctx.shadowColor=jn(lr.color),Ot.ctx.shadowBlur=lr.blur.number,Ot.ctx.fillStyle=lr.inset?jn(lr.color):"rgba(0,0,0,1)",Ot.ctx.fill(),Ot.ctx.restore()}),It.label=2;case 2:Ge=0,ze=0,ot=he,It.label=3;case 3:return ze<ot.length?(gt=ot[ze],gt.style!==0&&!ki(gt.color)&>.width>0?gt.style===2?[4,this.renderDashedDottedBorder(gt.color,gt.width,Ge,j.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return It.sent(),[3,11];case 5:return gt.style===3?[4,this.renderDashedDottedBorder(gt.color,gt.width,Ge,j.curves,3)]:[3,7];case 6:return It.sent(),[3,11];case 7:return gt.style===4?[4,this.renderDoubleBorder(gt.color,gt.width,Ge,j.curves)]:[3,9];case 8:return It.sent(),[3,11];case 9:return[4,this.renderSolidBorder(gt.color,Ge,j.curves)];case 10:It.sent(),It.label=11;case 11:Ge++,It.label=12;case 12:return ze++,[3,3];case 13:return[2]}})})},F.prototype.renderDashedDottedBorder=function(j,H,oe,he,Se){return Q(this,void 0,void 0,function(){var Ge,ze,ot,gt,Ot,It,lr,Kt,rr,Br,or,Ar,tn,zr,fn,ur,fn,ur;return D(this,function(un){return this.ctx.save(),Ge=mA(he,oe),ze=lA(he,oe),Se===2&&(this.path(ze),this.ctx.clip()),Sn(ze[0])?(ot=ze[0].start.x,gt=ze[0].start.y):(ot=ze[0].x,gt=ze[0].y),Sn(ze[1])?(Ot=ze[1].end.x,It=ze[1].end.y):(Ot=ze[1].x,It=ze[1].y),oe===0||oe===2?lr=Math.abs(ot-Ot):lr=Math.abs(gt-It),this.ctx.beginPath(),Se===3?this.formatPath(Ge):this.formatPath(ze.slice(0,2)),Kt=H<3?H*3:H*2,rr=H<3?H*2:H,Se===3&&(Kt=H,rr=H),Br=!0,lr<=Kt*2?Br=!1:lr<=Kt*2+rr?(or=lr/(2*Kt+rr),Kt*=or,rr*=or):(Ar=Math.floor((lr+rr)/(Kt+rr)),tn=(lr-Ar*Kt)/(Ar-1),zr=(lr-(Ar+1)*Kt)/Ar,rr=zr<=0||Math.abs(rr-tn)<Math.abs(rr-zr)?tn:zr),Br&&(Se===3?this.ctx.setLineDash([0,Kt+rr]):this.ctx.setLineDash([Kt,rr])),Se===3?(this.ctx.lineCap="round",this.ctx.lineWidth=H):this.ctx.lineWidth=H*2+1.1,this.ctx.strokeStyle=jn(j),this.ctx.stroke(),this.ctx.setLineDash([]),Se===2&&(Sn(ze[0])&&(fn=ze[3],ur=ze[0],this.ctx.beginPath(),this.formatPath([new Wt(fn.end.x,fn.end.y),new Wt(ur.start.x,ur.start.y)]),this.ctx.stroke()),Sn(ze[1])&&(fn=ze[1],ur=ze[2],this.ctx.beginPath(),this.formatPath([new Wt(fn.end.x,fn.end.y),new Wt(ur.start.x,ur.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},F.prototype.render=function(j){return Q(this,void 0,void 0,function(){var H;return D(this,function(oe){switch(oe.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=jn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),H=hA(j),[4,this.renderStack(H)];case 1:return oe.sent(),this.applyEffects([]),[2,this.canvas]}})})},F}(cA),BA=function(k){return k instanceof ru||k instanceof tu?!0:k instanceof as&&k.type!==oa&&k.type!==Ka},TA=function(k,F){switch(k){case 0:return yi(F);case 2:return Wn(F);case 1:default:return Ga(F)}},SA=function(k){switch(k){case 1:return"center";case 2:return"right";case 0:default:return"left"}},LA=["-apple-system","system-ui"],_A=function(k){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?k.filter(function(F){return LA.indexOf(F)===-1}):k},OA=function(k){N(F,k);function F(j,H){var oe=k.call(this,j,H)||this;return oe.canvas=H.canvas?H.canvas:document.createElement("canvas"),oe.ctx=oe.canvas.getContext("2d"),oe.options=H,oe.canvas.width=Math.floor(H.width*H.scale),oe.canvas.height=Math.floor(H.height*H.scale),oe.canvas.style.width=H.width+"px",oe.canvas.style.height=H.height+"px",oe.ctx.scale(oe.options.scale,oe.options.scale),oe.ctx.translate(-H.x,-H.y),oe.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+H.width+"x"+H.height+" at "+H.x+","+H.y+") with scale "+H.scale),oe}return F.prototype.render=function(j){return Q(this,void 0,void 0,function(){var H,oe;return D(this,function(he){switch(he.label){case 0:return H=es(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,j),[4,IA(H)];case 1:return oe=he.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=jn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(oe,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},F}(cA),IA=function(k){return new Promise(function(F,j){var H=new Image;H.onload=function(){F(H)},H.onerror=j,H.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(k))})},DA=function(){function k(F){var j=F.id,H=F.enabled;this.id=j,this.enabled=H,this.start=Date.now()}return k.prototype.debug=function(){for(var F=[],j=0;j<arguments.length;j++)F[j]=arguments[j];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,w([this.id,this.getTime()+"ms"],F)):this.info.apply(this,F))},k.prototype.getTime=function(){return Date.now()-this.start},k.prototype.info=function(){for(var F=[],j=0;j<arguments.length;j++)F[j]=arguments[j];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,w([this.id,this.getTime()+"ms"],F)))},k.prototype.warn=function(){for(var F=[],j=0;j<arguments.length;j++)F[j]=arguments[j];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,w([this.id,this.getTime()+"ms"],F)):this.info.apply(this,F))},k.prototype.error=function(){for(var F=[],j=0;j<arguments.length;j++)F[j]=arguments[j];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,w([this.id,this.getTime()+"ms"],F)):this.info.apply(this,F))},k.instances={},k}(),RA=function(){function k(F,j){var H;this.windowBounds=j,this.instanceName="#"+k.instanceCount++,this.logger=new DA({id:this.instanceName,enabled:F.logging}),this.cache=(H=F.cache)!==null&&H!==void 0?H:new Fr(this,F)}return k.instanceCount=1,k}(),MA=function(k,F){return F===void 0&&(F={}),UA(k,F)};typeof window!="undefined"&&fr.setContext(window);var UA=function(k,F){return Q(void 0,void 0,void 0,function(){var j,H,oe,he,Se,Ge,ze,ot,gt,Ot,It,lr,Kt,rr,Br,or,Ar,tn,zr,fn,ur,un,ur,pn,Kr,xi,bi,Oi,ai,la,Va,Xa,Ya,Lo,ua,Ja,_o,Oo,Sa,Io;return D(this,function(La){switch(La.label){case 0:if(!k||typeof k!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(j=k.ownerDocument,!j)throw new Error("Element is not attached to a Document");if(H=j.defaultView,!H)throw new Error("Document is not attached to a Window");return oe={allowTaint:(pn=F.allowTaint)!==null&&pn!==void 0?pn:!1,imageTimeout:(Kr=F.imageTimeout)!==null&&Kr!==void 0?Kr:15e3,proxy:F.proxy,useCORS:(xi=F.useCORS)!==null&&xi!==void 0?xi:!1},he=L({logging:(bi=F.logging)!==null&&bi!==void 0?bi:!0,cache:F.cache},oe),Se={windowWidth:(Oi=F.windowWidth)!==null&&Oi!==void 0?Oi:H.innerWidth,windowHeight:(ai=F.windowHeight)!==null&&ai!==void 0?ai:H.innerHeight,scrollX:(la=F.scrollX)!==null&&la!==void 0?la:H.pageXOffset,scrollY:(Va=F.scrollY)!==null&&Va!==void 0?Va:H.pageYOffset},Ge=new _(Se.scrollX,Se.scrollY,Se.windowWidth,Se.windowHeight),ze=new RA(he,Ge),ot=(Xa=F.foreignObjectRendering)!==null&&Xa!==void 0?Xa:!1,gt={allowTaint:(Ya=F.allowTaint)!==null&&Ya!==void 0?Ya:!1,onclone:F.onclone,ignoreElements:F.ignoreElements,inlineImages:ot,copyStyles:ot},ze.logger.debug("Starting document clone with size "+Ge.width+"x"+Ge.height+" scrolled to "+-Ge.left+","+-Ge.top),Ot=new I(ze,k,gt),It=Ot.clonedReferenceElement,It?[4,Ot.toIFrame(j,Ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return lr=La.sent(),Kt=En(It)||tA(It)?C(It.ownerDocument):c(ze,It),rr=Kt.width,Br=Kt.height,or=Kt.left,Ar=Kt.top,tn=FA(ze,It,F.backgroundColor),zr={canvas:F.canvas,backgroundColor:tn,scale:(ua=(Lo=F.scale)!==null&&Lo!==void 0?Lo:H.devicePixelRatio)!==null&&ua!==void 0?ua:1,x:((Ja=F.x)!==null&&Ja!==void 0?Ja:0)+or,y:((_o=F.y)!==null&&_o!==void 0?_o:0)+Ar,width:(Oo=F.width)!==null&&Oo!==void 0?Oo:Math.ceil(rr),height:(Sa=F.height)!==null&&Sa!==void 0?Sa:Math.ceil(Br)},ot?(ze.logger.debug("Document cloned, using foreign object rendering"),ur=new OA(ze,zr),[4,ur.render(It)]):[3,3];case 2:return fn=La.sent(),[3,5];case 3:return ze.logger.debug("Document cloned, element located at "+or+","+Ar+" with size "+rr+"x"+Br+" using computed rendering"),ze.logger.debug("Starting DOM parsing"),un=au(ze,It),tn===un.styles.backgroundColor&&(un.styles.backgroundColor=Li.TRANSPARENT),ze.logger.debug("Starting renderer for element at "+zr.x+","+zr.y+" with size "+zr.width+"x"+zr.height),ur=new xA(ze,zr),[4,ur.render(un)];case 4:fn=La.sent(),La.label=5;case 5:return((Io=F.removeContainer)!==null&&Io!==void 0?Io:!0)&&(I.destroy(lr)||ze.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ze.logger.debug("Finished rendering"),[2,fn]}})})},FA=function(k,F,j){var H=F.ownerDocument,oe=H.documentElement?da(k,getComputedStyle(H.documentElement).backgroundColor):Li.TRANSPARENT,he=H.body?da(k,getComputedStyle(H.body).backgroundColor):Li.TRANSPARENT,Se=typeof j=="string"?da(k,j):j===null?Li.TRANSPARENT:4294967295;return F===H.documentElement?ki(oe)?ki(he)?Se:he:oe:Se};return MA})},wRmb:function($e,me,z){"use strict";z.d(me,"a",function(){return x});var J=z("rePB"),N=z("KQm4"),L=z("VTBJ"),Q=z("Ff2n"),D=z("q1tI"),w=z.n(D),_=z("Kwbf"),c=z("Zm9Q"),C=z("hW8S");function x(y){return Object(c.a)(y).filter(function(B){return D.isValidElement(B)}).map(function(B){var u=B.key,s=B.props,l=s.children,f=Object(Q.a)(s,["children"]),m=Object(L.a)({key:u},f);return l&&(m.children=x(l)),m})}function i(y){return y.reduce(function(B,u){var s=u.fixed,l=s===!0?"left":s,f=u.children;return f&&f.length>0?[].concat(Object(N.a)(B),Object(N.a)(i(f).map(function(m){return Object(L.a)({fixed:l},m)}))):[].concat(Object(N.a)(B),[Object(L.a)(Object(L.a)({},u),{},{fixed:l})])},[])}function h(y){for(var B=!0,u=0;u<y.length;u+=1){var s=y[u];if(B&&s.fixed!=="left")B=!1;else if(!B&&s.fixed==="left"){Object(_.a)(!1,"Index ".concat(u-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,f=y.length-1;f>=0;f-=1){var m=y[f];if(l&&m.fixed!=="right")l=!1;else if(!l&&m.fixed==="right"){Object(_.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function O(y){return y.map(function(B){var u=B.fixed,s=Object(Q.a)(B,["fixed"]),l=u;return u==="left"?l="right":u==="right"&&(l="left"),Object(L.a)({fixed:l},s)})}function T(y,B){var u=y.prefixCls,s=y.columns,l=y.children,f=y.expandable,m=y.expandedKeys,E=y.getRowKey,v=y.onTriggerExpand,R=y.expandIcon,p=y.rowExpandable,a=y.expandIconColumnIndex,r=y.direction,n=y.expandRowByClick,o=D.useMemo(function(){return s||x(l)},[s,l]),S=D.useMemo(function(){if(f){var U,K=a||0,W=o[K],q=(U={},Object(J.a)(U,C.a,{className:"".concat(u,"-expand-icon-col")}),Object(J.a)(U,"title",""),Object(J.a)(U,"fixed",W?W.fixed:null),Object(J.a)(U,"className","".concat(u,"-row-expand-icon-cell")),Object(J.a)(U,"render",function(te,X,se){var le=E(X,se),Te=m.has(le),Ee=p?p(X):!0,Be=R({prefixCls:u,expanded:Te,expandable:Ee,record:X,onExpand:v});return n?D.createElement("span",{onClick:function(Ve){return Ve.stopPropagation()}},Be):Be}),U),Y=o.slice();return K>=0&&Y.splice(K,0,q),Y}return o},[f,o,E,m,R,r]),b=D.useMemo(function(){var U=S;return B&&(U=B(U)),U.length||(U=[{render:function(){return null}}]),U},[B,S,r]),g=D.useMemo(function(){return r==="rtl"?O(i(b)):i(b)},[b,r]);return[b,g]}me.b=T},x6Kt:function($e,me,z){var J=z("y+Vt"),N=z("VpOo"),L=z("nPnh"),Q=L.subPixelOptimizeRect,D={},w=J.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(_,c){var C,x,i,h;this.subPixelOptimize?(Q(D,c,this.style),C=D.x,x=D.y,i=D.width,h=D.height,D.r=c.r,c=D):(C=c.x,x=c.y,i=c.width,h=c.height),c.r?N.buildPath(_,c):_.rect(C,x,i,h),_.closePath();return}});$e.exports=w},"y+Vt":function($e,me,z){var J=z("Gev7"),N=z("bYtY"),L=z("IMiH"),Q=z("2DNl"),D=z("3C/r"),w=D.prototype.getCanvasPattern,_=Math.abs,c=new L(!0);function C(i){J.call(this,i),this.path=null}C.prototype={constructor:C,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,h){var O=this.style,T=this.path||c,y=O.hasStroke(),B=O.hasFill(),u=O.fill,s=O.stroke,l=B&&!!u.colorStops,f=y&&!!s.colorStops,m=B&&!!u.image,E=y&&!!s.image;if(O.bind(i,this,h),this.setTransform(i),this.__dirty){var v;l&&(v=v||this.getBoundingRect(),this._fillGradient=O.getGradient(i,u,v)),f&&(v=v||this.getBoundingRect(),this._strokeGradient=O.getGradient(i,s,v))}l?i.fillStyle=this._fillGradient:m&&(i.fillStyle=w.call(u,i)),f?i.strokeStyle=this._strokeGradient:E&&(i.strokeStyle=w.call(s,i));var R=O.lineDash,p=O.lineDashOffset,a=!!i.setLineDash,r=this.getGlobalScale();if(T.setScale(r[0],r[1],this.segmentIgnoreThreshold),this.__dirtyPath||R&&!a&&y?(T.beginPath(i),R&&!a&&(T.setLineDash(R),T.setLineDashOffset(p)),this.buildPath(T,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),B)if(O.fillOpacity!=null){var n=i.globalAlpha;i.globalAlpha=O.fillOpacity*O.opacity,T.fill(i),i.globalAlpha=n}else T.fill(i);if(R&&a&&(i.setLineDash(R),i.lineDashOffset=p),y)if(O.strokeOpacity!=null){var n=i.globalAlpha;i.globalAlpha=O.strokeOpacity*O.opacity,T.stroke(i),i.globalAlpha=n}else T.stroke(i);R&&a&&i.setLineDash([]),O.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,h,O){},createPathProxy:function(){this.path=new L},getBoundingRect:function(){var i=this._rect,h=this.style,O=!i;if(O){var T=this.path;T||(T=this.path=new L),this.__dirtyPath&&(T.beginPath(),this.buildPath(T,this.shape,!1)),i=T.getBoundingRect()}if(this._rect=i,h.hasStroke()){var y=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||O){y.copy(i);var B=h.lineWidth,u=h.strokeNoScale?this.getLineScale():1;h.hasFill()||(B=Math.max(B,this.strokeContainThreshold||4)),u>1e-10&&(y.width+=B/u,y.height+=B/u,y.x-=B/u/2,y.y-=B/u/2)}return y}return i},contain:function(i,h){var O=this.transformCoordToLocal(i,h),T=this.getBoundingRect(),y=this.style;if(i=O[0],h=O[1],T.contain(i,h)){var B=this.path.data;if(y.hasStroke()){var u=y.lineWidth,s=y.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(y.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),Q.containStroke(B,u/s,i,h)))return!0}if(y.hasFill())return Q.contain(B,i,h)}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,h){i==="shape"?(this.setShape(h),this.__dirtyPath=!0,this._rect=null):J.prototype.attrKV.call(this,i,h)},setShape:function(i,h){var O=this.shape;if(O){if(N.isObject(i))for(var T in i)i.hasOwnProperty(T)&&(O[T]=i[T]);else O[i]=h;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&_(i[0]-1)>1e-10&&_(i[3]-1)>1e-10?Math.sqrt(_(i[0]*i[3]-i[2]*i[1])):1}},C.extend=function(i){var h=function(T){C.call(this,T),i.style&&this.style.extendFrom(i.style,!1);var y=i.shape;if(y){this.shape=this.shape||{};var B=this.shape;for(var u in y)!B.hasOwnProperty(u)&&y.hasOwnProperty(u)&&(B[u]=y[u])}i.init&&i.init.call(this,T)};N.inherits(h,C);for(var O in i)O!=="style"&&O!=="shape"&&(h.prototype[O]=i[O]);return h},N.inherits(C,J);var x=C;$e.exports=x},"y0+3":function($e,me,z){"use strict";z.d(me,"a",function(){return i}),z.d(me,"b",function(){return O});var J=/margin|padding|width|height|max|min|offset/,N={left:!0,top:!0},L={cssFloat:1,styleFloat:1,float:1};function Q(T){return T.nodeType===1?T.ownerDocument.defaultView.getComputedStyle(T,null):{}}function D(T,y,B){if(y=y.toLowerCase(),B==="auto"){if(y==="height")return T.offsetHeight;if(y==="width")return T.offsetWidth}return y in N||(N[y]=J.test(y)),N[y]?parseFloat(B)||0:B}function w(T,y){var B=arguments.length,u=Q(T);return y=L[y]?"cssFloat"in T.style?"cssFloat":"styleFloat":y,B===1?u:D(T,y,u[y]||T.style[y])}function _(T,y,B){var u=arguments.length;if(y=L[y]?"cssFloat"in T.style?"cssFloat":"styleFloat":y,u===3)return typeof B=="number"&&J.test(y)&&(B="".concat(B,"px")),T.style[y]=B,B;for(var s in y)y.hasOwnProperty(s)&&_(T,s,y[s]);return Q(T)}function c(T){return T===document.body?document.documentElement.clientWidth:T.offsetWidth}function C(T){return T===document.body?window.innerHeight||document.documentElement.clientHeight:T.offsetHeight}function x(){var T=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),y=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:T,height:y}}function i(){var T=document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight;return{width:T,height:y}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function O(T){var y=T.getBoundingClientRect(),B=document.documentElement;return{left:y.left+(window.pageXOffset||B.scrollLeft)-(B.clientLeft||document.body.clientLeft||0),top:y.top+(window.pageYOffset||B.scrollTop)-(B.clientTop||document.body.clientTop||0)}}},y23F:function($e,me){function z(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}z.prototype={constructor:z,_dragStart:function(L){for(var Q=L.target;Q&&!Q.draggable;)Q=Q.parent;Q&&(this._draggingTarget=Q,Q.dragging=!0,this._x=L.offsetX,this._y=L.offsetY,this.dispatchToElement(J(Q,L),"dragstart",L.event))},_drag:function(L){var Q=this._draggingTarget;if(Q){var D=L.offsetX,w=L.offsetY,_=D-this._x,c=w-this._y;this._x=D,this._y=w,Q.drift(_,c,L),this.dispatchToElement(J(Q,L),"drag",L.event);var C=this.findHover(D,w,Q).target,x=this._dropTarget;this._dropTarget=C,Q!==C&&(x&&C!==x&&this.dispatchToElement(J(x,L),"dragleave",L.event),C&&C!==x&&this.dispatchToElement(J(C,L),"dragenter",L.event))}},_dragEnd:function(L){var Q=this._draggingTarget;Q&&(Q.dragging=!1),this.dispatchToElement(J(Q,L),"dragend",L.event),this._dropTarget&&this.dispatchToElement(J(this._dropTarget,L),"drop",L.event),this._draggingTarget=null,this._dropTarget=null}};function J(L,Q){return{target:L,topTarget:Q&&Q.topTarget}}var N=z;$e.exports=N},yxFR:function($e,me,z){var J=z("y+Vt"),N=z("nPnh"),L=N.subPixelOptimizeLine,Q={},D=J.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(w,_){var c,C,x,i;this.subPixelOptimize?(L(Q,_,this.style),c=Q.x1,C=Q.y1,x=Q.x2,i=Q.y2):(c=_.x1,C=_.y1,x=_.x2,i=_.y2);var h=_.percent;if(h===0)return;w.moveTo(c,C),h<1&&(x=c*(1-h)+x*h,i=C*(1-h)+i*h),w.lineTo(x,i)},pointAt:function(w){var _=this.shape;return[_.x1*(1-w)+_.x2*w,_.y1*(1-w)+_.y2*w]}});$e.exports=D},z9Ch:function($e,me,z){$e.exports={flex_box_center:"flex_box_center___3OoGm",flex_space_between:"flex_space_between___1T26N",flex_box_vertical_center:"flex_box_vertical_center___1ToJb",flex_box_center_end:"flex_box_center_end___3yWc3",flex_box_column:"flex_box_column___2DqGp",title:"title___27RYc",export:"export___23HFM",title1_right:"title1_right___QCRrC",userPic:"userPic___1IO2N",userInfo:"userInfo___1tmSz",listItem:"listItem___j4sdw",rightInfo:"rightInfo___163Ic",shixunTitle:"shixunTitle___15lHO",shixunWrp:"shixunWrp___O2H0q",footerBar:"footerBar___NH_yZ",footerBarStatic:"footerBarStatic___2dJUI",exitComment:"exitComment___2O-uT",nextComment:"nextComment___2fkhG",modal:"modal___LOSk6"}},zarK:function($e,me,z){var J=z("YH21"),N=J.addEventListener,L=J.removeEventListener,Q=J.normalizeEvent,D=J.getNativeEvent,w=z("bYtY"),_=z("H6uX"),c=z("ItGF"),C=300,x=c.domSupported,i=function(){var g=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],U=["touchstart","touchend","touchmove"],K={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},W=w.map(g,function(q){var Y=q.replace("mouse","pointer");return K.hasOwnProperty(Y)?Y:q});return{mouse:g,touch:U,pointer:W}}(),h={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function O(g){return g==="mousewheel"&&c.browser.firefox?"DOMMouseScroll":g}function T(g){var U=g.pointerType;return U==="pen"||U==="touch"}function y(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 B(g){g&&(g.zrByTouch=!0)}function u(g,U){return Q(g.dom,new l(g,U),!0)}function s(g,U){for(var K=U,W=!1;K&&K.nodeType!==9&&!(W=K.domBelongToZr||K!==U&&K===g.painterRoot);)K=K.parentNode;return W}function l(g,U){this.type=U.type,this.target=this.currentTarget=g.dom,this.pointerType=U.pointerType,this.clientX=U.clientX,this.clientY=U.clientY}var f=l.prototype;f.stopPropagation=f.stopImmediatePropagation=f.preventDefault=w.noop;var m={mousedown:function(g){g=Q(this.dom,g),this._mayPointerCapture=[g.zrX,g.zrY],this.trigger("mousedown",g)},mousemove:function(g){g=Q(this.dom,g);var U=this._mayPointerCapture;U&&(g.zrX!==U[0]||g.zrY!==U[1])&&r(this,!0),this.trigger("mousemove",g)},mouseup:function(g){g=Q(this.dom,g),r(this,!1),this.trigger("mouseup",g)},mouseout:function(g){g=Q(this.dom,g),this._pointerCapturing&&(g.zrEventControl="no_globalout");var U=g.toElement||g.relatedTarget;g.zrIsToLocalDOM=s(this,U),this.trigger("mouseout",g)},touchstart:function(g){g=Q(this.dom,g),B(g),this._lastTouchMoment=new Date,this.handler.processGesture(g,"start"),m.mousemove.call(this,g),m.mousedown.call(this,g)},touchmove:function(g){g=Q(this.dom,g),B(g),this.handler.processGesture(g,"change"),m.mousemove.call(this,g)},touchend:function(g){g=Q(this.dom,g),B(g),this.handler.processGesture(g,"end"),m.mouseup.call(this,g),+new Date-this._lastTouchMoment<C&&m.click.call(this,g)},pointerdown:function(g){m.mousedown.call(this,g)},pointermove:function(g){T(g)||m.mousemove.call(this,g)},pointerup:function(g){m.mouseup.call(this,g)},pointerout:function(g){T(g)||m.mouseout.call(this,g)}};w.each(["click","mousewheel","dblclick","contextmenu"],function(g){m[g]=function(U){U=Q(this.dom,U),this.trigger(g,U)}});var E={pointermove:function(g){T(g)||E.mousemove.call(this,g)},pointerup:function(g){E.mouseup.call(this,g)},mousemove:function(g){this.trigger("mousemove",g)},mouseup:function(g){var U=this._pointerCapturing;r(this,!1),this.trigger("mouseup",g),U&&(g.zrEventControl="only_globalout",this.trigger("mouseout",g))}};function v(g,U){var K=U.domHandlers;c.pointerEventsSupported?w.each(i.pointer,function(W){p(U,W,function(q){K[W].call(g,q)})}):(c.touchEventsSupported&&w.each(i.touch,function(W){p(U,W,function(q){K[W].call(g,q),y(U)})}),w.each(i.mouse,function(W){p(U,W,function(q){q=D(q),U.touching||K[W].call(g,q)})}))}function R(g,U){c.pointerEventsSupported?w.each(h.pointer,K):c.touchEventsSupported||w.each(h.mouse,K);function K(W){function q(Y){Y=D(Y),s(g,Y.target)||(Y=u(g,Y),U.domHandlers[W].call(g,Y))}p(U,W,q,{capture:!0})}}function p(g,U,K,W){g.mounted[U]=K,g.listenerOpts[U]=W,N(g.domTarget,O(U),K,W)}function a(g){var U=g.mounted;for(var K in U)U.hasOwnProperty(K)&&L(g.domTarget,O(K),U[K],g.listenerOpts[K]);g.mounted={}}function r(g,U){if(g._mayPointerCapture=null,x&&g._pointerCapturing^U){g._pointerCapturing=U;var K=g._globalHandlerScope;U?R(g,K):a(K)}}function n(g,U){this.domTarget=g,this.domHandlers=U,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function o(g,U){_.call(this),this.dom=g,this.painterRoot=U,this._localHandlerScope=new n(g,m),x&&(this._globalHandlerScope=new n(document,E)),this._pointerCapturing=!1,this._mayPointerCapture=null,v(this,this._localHandlerScope)}var S=o.prototype;S.dispose=function(){a(this._localHandlerScope),x&&a(this._globalHandlerScope)},S.setCursor=function(g){this.dom.style&&(this.dom.style.cursor=g||"default")},w.mixin(o,_);var b=o;$e.exports=b}}]);
|